/**!
 * IMPORTANT NOTE:
 *    This file is licensed only for use in providing the iCloud
 *    service or any part thereof, and is subject to the iCloud
 *    Terms and Conditions. You may not port this file to another
 *    platform without Apple's written consent.
 *
 *    Portions of this Apple Software may utilize copyrighted material under open source licenses.
 *    Please see the file at https://www.icloud.com/system/icloud.com/2608Build39/en-us/acknowledgements.txt for licensing information.
 */
!function(e){const t="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self;try{const{performance:o,Promise:n,MessageChannel:s,requestAnimationFrame:r}=t;if(!(o&&o.mark&&n&&s&&r))return;const a=t=>o.mark("chunk-"+e+"-"+t);let c=!1,f=!1,i=n.resolve();a("exec-start");for(let e=0;e<5;e++)i=i.then();i.then((()=>{a("exec-sync-end")}));if("undefined"!=typeof window){let e=()=>{c&&!f&&(a("after-paint"),f=!0)},t=new s;t.port1.onmessage=e,t.port2.postMessage(null),setTimeout(e),r((()=>{c=!0,a("raf"),t.port2.postMessage(null),setTimeout(e)}))}}catch(e){t.__jsPerformanceMarksError=e}}("main");/*! For license information please see main.js.LICENSE.txt */
function __CW_loadBinaries(e,t,n,r,i,o,a){var s=e.URL||e.webkitURL;i=i||(e.__CW_BLOB_URLS={}),e.__CW_BLOBS_READY=!1;var c,u,l=["image/gif","image/png","image/jpeg","image/svg+xml"],d=3,p=!1,f=!1,h=(o||"cw")+"-css",m=o?"_"+o:"";t.match(/\/$/)||(t+="/");function g(n){if(!p){p=!0,b("__CW_SPRITE_START");var r=new XMLHttpRequest;r.open("GET",t+n,!0),r.withCredentials=a,r.responseType="arraybuffer",r.onload=function(){!function(t){try{if(t&&t instanceof ArrayBuffer)for(var n=new DataView(t),r=n.byteLength,o=0;o<r;){var a=n.getUint16(o),c=n.getUint8(o+2),u=n.getUint32(o+3),d=y(t,o+=7,o+u),f=new Blob([d],{type:l[c-1]});i[a]=s.createObjectURL(f),o+=u}p=!1,e.__CW_BLOBS_READY=!0,b("__CW_SPRITE_LOADED")}catch(h){v(h)}}(r.response)},r.onerror=function(e){--d>=0?(p=!1,g(n)):v(e)},r.send()}}function v(t){p=!1,e.__CW_BLOBS_READY=!1,b("__CW_SPRITE_ERROR",t)}function y(e,t,n){if(e.slice)return e.slice(t,n);var r=e.byteLength;if(t=t||0,n=n||r,0===r||t>=r||t>=n)return new ArrayBuffer(0);var i=Math.min(r-t,n-t),o=new ArrayBuffer(i);return new Uint8Array(o).set(new Uint8Array(e,t,i)),o}function b(e,t){var n=document.createEvent("Event");n.data=t,n.initEvent(e+m,!0,!0),document.dispatchEvent(n)}function w(e){var t=i[e],n=new RegExp("\\(blob_"+e+"\\)","gi");return function(e){e.target.onload=null,c++,r&&(r=r.replace(n,"("+JSON.stringify(t)+")"),c===u&&function(){var e=document.getElementById(h);e||((e=document.createElement("link")).rel="stylesheet",e.id=h),e.onload=function(){b("__CW_CSS_LOADED"),r=null,f=!1},e.href="data:text/css;base64,"+btoa(r),document.head.appendChild(e)}())}}document.addEventListener("__CW_SPRITE_LOADED"+m,(function(){if(!f)if(f=!0,b("__CW_CSS_START"),i&&(u=Object.keys(i).length),i&&u>0){c=0;var t=function(){var t="cw-img-container-r"+e.devicePixelRatio,n=document.getElementById(t);if(!n){(n=document.createElement("div")).setAttribute("aria-hidden",!0),n.id=t;var r=n.style;r.overflow="hidden",r.height="0",r.width="0",document.body.appendChild(n)}return n}();for(var n in i){var r=document.createElement("img");r.onload=w(n),r.src=i[n],t.appendChild(r)}}else f=!1})),function(e){for(var t=Math.ceil(e);t>=1&&!n[t-1];)t--;var r=n[t-1];r||(r=n[0]),g(r)}(e.devicePixelRatio)}!function(e,t,n,r){var i=e.__CW_IMG_URLS={};function o(t){var n=Math.ceil(e.devicePixelRatio);return 1===n?t:t.replace(/@\d{1}(?=x)/i,"@"+n)}var a=function(e){var r=n[e];Object.defineProperty(i,e,{get:function(){return[t,o(r)].join("/")}})};for(var s in n)a(s)}(this,"/system/icloud.com/2608Build39/en-us/",{}),__CW_loadBinaries(this,"/system/icloud.com/2608Build39/en-us/",["images@1x.bin","images@2x.bin"],".browser-notifications-success-alert .title::before{background-image:url(blob_12)}\n",void 0,void 0,!1),function(e){function t(t){for(var n,r,s=t[0],c=t[1],u=t[3]||[],d=0,p=[];d<s.length;d++)r=s[d],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&p.push(i[r][0]),i[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(t),u.forEach((function(e){if(void 0===i[e]){i[e]=null;var t=document.createElement("link");a.nc&&t.setAttribute("nonce",a.nc),t.rel="prefetch",t.as="script",t.href=o(e),document.head.appendChild(t)}}));p.length;)p.shift()()}var n={},r={0:0},i={0:0};function o(e){return a.p+""+({1:"Routes-HomePageRoute",2:"RootComponentRoute",3:"vendors~HomeTiles-Invites-InvitesTileWrapper-InvitesTileWrapper",4:"vendors~Routes-HomePageRoute",5:"Routes-CalendarEventReplyRoute",6:"vendors~RootComponentRoute",7:"OutOfNetWorkSharing-OutOfNetworkSharing",8:"Routes-CKShareAcceptanceRoute~Routes-LegacyShareAcceptanceRoute",9:"Routes-UnauthedShareRoute",10:"HomeTiles-Invites-InvitesTileWrapper-InvitesTileWrapper",12:"Routes-LegacyShareAcceptanceRoute",13:"Routes-CKShareAcceptanceRoute"}[e]||e)+".js"}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]&&{1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var i=e+".main.css",o=a.p+i,s=document.getElementsByTagName("link"),c=0;c<s.length;c++){var u=(d=s[c]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(u===i||u===o))return t()}var l=document.getElementsByTagName("style");for(c=0;c<l.length;c++){var d;if((u=(d=l[c]).getAttribute("data-href"))===i||u===o)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onerror=p.onload=function(i){if(p.onerror=p.onload=null,"load"===i.type)t();else{var a=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.href||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");c.code="CSS_CHUNK_LOAD_FAILED",c.type=a,c.request=s,delete r[e],p.parentNode.removeChild(p),n(c)}},p.href=o,document.head.appendChild(p)})).then((function(){r[e]=0})));var n=i[e];if(0!==n)if(n)t.push(n[2]);else{var s=new Promise((function(t,r){n=i[e]=[t,r]}));t.push(n[2]=s);var c=new Error,u=function t(n,r){var s,u=document.createElement("script"),l="&retry-attempt="+(2-r+1);u.charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.src=n,s=function(n){u.onerror=u.onload=null,clearTimeout(d);var a=i[e];if(0!==a)if(a)if(0===r){var s=n&&("load"===n.type?"missing":n.type),p=n&&n.target&&n.target.src;c.message="Loading chunk "+e+" failed after 2 retries.\n("+s+": "+p+")",c.name="ChunkLoadError",c.type=s,c.request=p,a[1](c),i[e]=void 0}else setTimeout((function(){var n="cache-bust=true"+l,i=t(o(e)+"?"+n,r-1);document.head.appendChild(i)}),1e4);else i[e]=void 0};var d=setTimeout((function(){s({type:"timeout",target:u})}),12e4);return u.onerror=u.onload=s,u}(o(e),2);document.head.appendChild(u)}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="/system/icloud.com/2608Build39/en-us/",a.oe=function(e){throw console.error(e),e};var s=window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var l=c;a(a.s=467)}(Array(465).concat([function(e,t,n){"use strict";function r(e){return{ok:!0,value:e}}function i(e){return{ok:!1,error:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Result=t.isFailure=t.isSuccess=t.failure=t.success=void 0,t.success=r,t.failure=i,t.isSuccess=function(e){return e.ok},t.isFailure=function(e){return!e.ok},t.Result={success:r,failure:i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u}));const r="device-pairing",i=3,o="pairingKeys",a="pendingPairingKeys",s="dsid",c=32,u=7776e6},function(e,t,n){n(468),n(468),n(469),n(866),n(867),n(868),e.exports=n(2137)},function(e,t){},function(e,t,n){"use strict";n.r(t),n(470),n(517),n(518),n(558),n(559),n(575),n(576),n(577),n(579),n(581),n(582),n(583),n(587),n(589),n(592),n(593),n(595),n(597),n(598),n(603),n(608),n(616),n(617),n(621),n(624),n(625),n(634),n(635),n(637),n(638),n(640),n(641),n(642),n(643),n(644),n(645),n(646),n(647),n(649),n(652),n(656),n(657),n(658),n(665),n(670),n(672),n(673),n(680),n(681),n(682),n(684),n(688),n(691),n(701),n(703),n(705),n(707),n(709),n(712),n(714),n(715),n(716),n(727),n(731),n(732),n(733),n(751),n(752),n(753),n(754),n(755),n(756),n(757),n(758),n(759),n(760),n(761),n(762),n(763),n(764),n(765),n(766),n(771),n(772),n(773),n(774),n(775),n(776),n(777),n(778),n(779),n(780),n(781),n(782),n(783),n(784),n(785),n(786),n(787),n(788),n(789),n(790),n(791),n(792),n(793),n(794),n(795),n(796),n(797),n(798),n(799),n(800),n(801),n(802),n(803),n(804),n(805),n(806),n(807),n(808),n(809),n(810),n(811),n(812),n(813),n(814),n(815),n(816),n(817),n(818),n(819),n(820),n(821),n(822),n(823),n(824),n(825),n(826),n(827),n(828),n(829),n(830),n(831),n(832),n(833),n(834),n(839),n(841),n(848),n(849),n(859),n(860),n(861),n(862),n(863),n(864),n(865)},function(e,t,n){"use strict";var r=n(471),i=n(473),o=n(493).f,a=n(511).f,s=r.Symbol;if(i("asyncDispose"),s){var c=a(s,"asyncDispose");c.enumerable&&c.configurable&&c.writable&&o(s,"asyncDispose",{value:c.value,enumerable:!1,configurable:!1,writable:!1})}},function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()}).call(this,n(472))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(474),i=n(475),o=n(482),a=n(493).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(471);e.exports=r},function(e,t,n){"use strict";var r=n(476),i=n(479),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},function(e,t,n){"use strict";var r=n(477),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);e.exports=r?a:function(e){return function(){return o.apply(e,arguments)}}},function(e,t,n){"use strict";var r=n(478);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";var r=n(480),i=Object;e.exports=function(e){return i(r(e))}},function(e,t,n){"use strict";var r=n(481),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},function(e,t,n){"use strict";e.exports=function(e){return null===e||void 0===e}},function(e,t,n){"use strict";var r=n(483);t.f=r},function(e,t,n){"use strict";var r=n(471),i=n(484),o=n(475),a=n(488),s=n(489),c=n(492),u=r.Symbol,l=i("wks"),d=c?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return o(l,e)||(l[e]=s&&o(u,e)?u[e]:d("Symbol."+e)),l[e]}},function(e,t,n){"use strict";var r=n(485);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},function(e,t,n){"use strict";var r=n(486),i=n(471),o=n(487),a="__core-js_shared__",s=e.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var r=n(471),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){"use strict";var r=n(476),i=0,o=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},function(e,t,n){"use strict";var r=n(490),i=n(478),o=n(471).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){"use strict";var r,i,o=n(471),a=n(491),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},function(e,t,n){"use strict";var r=n(471).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},function(e,t,n){"use strict";var r=n(489);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(494),i=n(495),o=n(499),a=n(500),s=n(501),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=r?o?function(e,t,n){if(a(e),t=s(t),a(n),"function"===typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=l(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:d in n?n[d]:r[d],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(a(e),t=s(t),a(n),i)try{return u(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var r=n(478);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=n(494),i=n(478),o=n(496);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(471),i=n(497),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){"use strict";var r=n(498);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){"use strict";var r="object"==typeof document&&document.all;e.exports="undefined"==typeof r&&void 0!==r?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(494),i=n(478);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){"use strict";var r=n(497),i=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(502),i=n(504);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},function(e,t,n){"use strict";var r=n(503),i=n(497),o=n(504),a=n(507),s=n(510),c=n(483),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var n,c=a(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||o(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},function(e,t,n){"use strict";var r=n(477),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},function(e,t,n){"use strict";var r=n(505),i=n(498),o=n(506),a=n(492),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&o(t.prototype,s(e))}},function(e,t,n){"use strict";var r=n(471),i=n(498);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},function(e,t,n){"use strict";var r=n(476);e.exports=r({}.isPrototypeOf)},function(e,t,n){"use strict";var r=n(508),i=n(481);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},function(e,t,n){"use strict";var r=n(498),i=n(509),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not a function")}},function(e,t,n){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},function(e,t,n){"use strict";var r=n(503),i=n(498),o=n(497),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!o(s=r(n,e)))return s;if(i(n=e.valueOf)&&!o(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!o(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(494),i=n(503),o=n(512),a=n(513),s=n(514),c=n(501),u=n(475),l=n(495),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),l)try{return d(e,t)}catch(n){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(515),i=n(480);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(476),i=n(478),o=n(516),a=Object,s=r("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?s(e,""):a(e)}:a},function(e,t,n){"use strict";var r=n(476),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},function(e,t,n){"use strict";var r=n(471),i=n(473),o=n(493).f,a=n(511).f,s=r.Symbol;if(i("dispose"),s){var c=a(s,"dispose");c.enumerable&&c.configurable&&c.writable&&o(s,"dispose",{value:c.value,enumerable:!1,configurable:!1,writable:!1})}},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(542),a=n(543),s="WebAssembly",c=i[s],u=7!==new Error("e",{cause:7}).cause,l=function(e,t){var n={};n[e]=a(e,t,u),r({global:!0,constructor:!0,arity:1,forced:u},n)},d=function(e,t){if(c&&c[e]){var n={};n[e]=a(s+"."+e,t,u),r({target:s,stat:!0,constructor:!0,arity:1,forced:u},n)}};l("Error",(function(e){return function(t){return o(e,this,arguments)}})),l("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),l("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),l("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),l("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),l("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),l("URIError",(function(e){return function(t){return o(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},function(e,t,n){"use strict";var r=n(471),i=n(511).f,o=n(520),a=n(521),s=n(487),c=n(529),u=n(541);e.exports=function(e,t){var n,l,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):r[h]&&r[h].prototype)for(l in t){if(p=t[l],d=e.dontCallGetSet?(f=i(n,l))&&f.value:n[l],!u(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),a(n,l,p,e)}}},function(e,t,n){"use strict";var r=n(494),i=n(493),o=n(513);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(498),i=n(493),o=n(522),a=n(487);e.exports=function(e,t,n,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(r(n)&&o(n,u,s),s.global)c?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(l){}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},function(e,t,n){"use strict";var r=n(476),i=n(478),o=n(498),a=n(475),s=n(494),c=n(523).CONFIGURABLE,u=n(524),l=n(525),d=l.enforce,p=l.get,f=String,h=Object.defineProperty,m=r("".slice),g=r("".replace),v=r([].join),y=s&&!i((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=e.exports=function(e,t,n){"Symbol("===m(f(t),0,7)&&(t="["+g(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(s?h(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&a(n,"arity")&&e.length!==n.arity&&h(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=d(e);return a(r,"source")||(r.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=w((function(){return o(this)&&p(this).source||u(this)}),"toString")},function(e,t,n){"use strict";var r=n(494),i=n(475),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},function(e,t,n){"use strict";var r=n(476),i=n(498),o=n(485),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},function(e,t,n){"use strict";var r,i,o,a=n(526),s=n(471),c=n(497),u=n(520),l=n(475),d=n(485),p=n(527),f=n(528),h="Object already initialized",m=s.TypeError,g=s.WeakMap;if(a||d.state){var v=d.state||(d.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,r=function(e,t){if(v.has(e))throw new m(h);return t.facade=e,v.set(e,t),t},i=function(e){return v.get(e)||{}},o=function(e){return v.has(e)}}else{var y=p("state");f[y]=!0,r=function(e,t){if(l(e,y))throw new m(h);return t.facade=e,u(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var r=n(471),i=n(498),o=r.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},function(e,t,n){"use strict";var r=n(484),i=n(488),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(475),i=n(530),o=n(511),a=n(493);e.exports=function(e,t,n){for(var s=i(t),c=a.f,u=o.f,l=0;l<s.length;l++){var d=s[l];r(e,d)||n&&r(n,d)||c(e,d,u(t,d))}}},function(e,t,n){"use strict";var r=n(505),i=n(476),o=n(531),a=n(540),s=n(500),c=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?c(t,n(e)):t}},function(e,t,n){"use strict";var r=n(532),i=n(539).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(476),i=n(475),o=n(514),a=n(533).indexOf,s=n(528),c=r([].push);e.exports=function(e,t){var n,r=o(e),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~a(l,n)||c(l,n));return l}},function(e,t,n){"use strict";var r=n(514),i=n(534),o=n(537),a=function(e){return function(t,n,a){var s=r(t),c=o(s);if(0===c)return!e&&-1;var u,l=i(a,c);if(e&&n!==n){for(;c>l;)if((u=s[l++])!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var r=n(535),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){"use strict";var r=n(536);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?i:r)(t)}},function(e,t,n){"use strict";var r=n(538);e.exports=function(e){return r(e.length)}},function(e,t,n){"use strict";var r=n(535),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(478),i=n(498),o=/#|\.prototype\./,a=function(e,t){var n=c[s(e)];return n===l||n!==u&&(i(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var r=n(477),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},function(e,t,n){"use strict";var r=n(505),i=n(475),o=n(520),a=n(506),s=n(544),c=n(529),u=n(548),l=n(549),d=n(550),p=n(554),f=n(555),h=n(494),m=n(486);e.exports=function(e,t,n,g){var v="stackTraceLimit",y=g?2:1,b=e.split("."),w=b[b.length-1],S=r.apply(null,b);if(S){var C=S.prototype;if(!m&&i(C,"cause")&&delete C.cause,!n)return S;var _=r("Error"),O=t((function(e,t){var n=d(g?t:e,void 0),r=g?new S(e):new S;return void 0!==n&&o(r,"message",n),f(r,O,r.stack,2),this&&a(C,this)&&l(r,this,O),arguments.length>y&&p(r,arguments[y]),r}));if(O.prototype=C,"Error"!==w?s?s(O,_):c(O,_,{name:!0}):h&&v in S&&(u(O,S,v),u(O,S,"prepareStackTrace")),c(O,S),!m)try{C.name!==w&&o(C,"name",w),C.constructor=O}catch(E){}return O}}},function(e,t,n){"use strict";var r=n(545),i=n(497),o=n(480),a=n(546);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(s){}return function(n,r){return o(n),a(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},function(e,t,n){"use strict";var r=n(476),i=n(508);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(o){}}},function(e,t,n){"use strict";var r=n(547),i=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},function(e,t,n){"use strict";var r=n(497);e.exports=function(e){return r(e)||null===e}},function(e,t,n){"use strict";var r=n(493).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},function(e,t,n){"use strict";var r=n(498),i=n(497),o=n(544);e.exports=function(e,t,n){var a,s;return o&&r(a=t.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(e,s),e}},function(e,t,n){"use strict";var r=n(551);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},function(e,t,n){"use strict";var r=n(552),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},function(e,t,n){"use strict";var r=n(553),i=n(498),o=n(516),a=n(483)("toStringTag"),s=Object,c="Arguments"===o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=s(e),a))?n:c?o(t):"Object"===(r=o(t))&&i(t.callee)?"Arguments":r}},function(e,t,n){"use strict";var r={};r[n(483)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(497),i=n(520);e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},function(e,t,n){"use strict";var r=n(520),i=n(556),o=n(557),a=Error.captureStackTrace;e.exports=function(e,t,n,s){o&&(a?a(e,t):r(e,"stack",i(n,s)))}},function(e,t,n){"use strict";var r=n(476),i=Error,o=r("".replace),a=String(new i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(a);e.exports=function(e,t){if(c&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=o(e,s,"");return e}},function(e,t,n){"use strict";var r=n(478),i=n(513);e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},function(e,t,n){"use strict";var r=n(519),i=n(505),o=n(497),a=n(552),s=n(478),c="Error",u="DOMException",l=Object.setPrototypeOf||{}.__proto__,d=i(u),p=Error,f=p.isError;r({target:"Error",stat:!0,sham:!0,forced:!f||!l||s((function(){return d&&!f(new d(u))||!f(new p(c,{cause:function(){}}))||f(i("Object","create")(p.prototype))}))},{isError:function(e){if(!o(e))return!1;var t=a(e);return t===c||t===u}})},function(e,t,n){"use strict";n(560)},function(e,t,n){"use strict";var r=n(519),i=n(506),o=n(561),a=n(544),s=n(529),c=n(563),u=n(520),l=n(513),d=n(554),p=n(555),f=n(567),h=n(550),m=n(483)("toStringTag"),g=Error,v=[].push,y=function(e,t){var n,r=i(b,this);a?n=a(new g,r?o(this):b):(n=r?this:c(b),u(n,m,"Error")),void 0!==t&&u(n,"message",h(t)),p(n,y,n.stack,1),arguments.length>2&&d(n,arguments[2]);var s=[];return f(e,v,{that:s}),u(n,"errors",s),n};a?a(y,g):s(y,g,{name:!0});var b=y.prototype=c(g.prototype,{constructor:l(1,y),message:l(1,""),name:l(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:y})},function(e,t,n){"use strict";var r=n(475),i=n(498),o=n(479),a=n(527),s=n(562),c=a("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=o(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},function(e,t,n){"use strict";var r=n(478);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r,i=n(500),o=n(564),a=n(539),s=n(528),c=n(566),u=n(496),l=n(527),d="prototype",p="script",f=l("IE_PROTO"),h=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}v="undefined"!=typeof document?document.domain&&r?g(r):function(){var e,t=u("iframe"),n="java"+p+":";return t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F}():g(r);for(var e=a.length;e--;)delete v[d][a[e]];return v()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=i(e),n=new h,h[d]=null,n[f]=e):n=v(),void 0===t?n:o.f(n,t)}},function(e,t,n){"use strict";var r=n(494),i=n(499),o=n(493),a=n(500),s=n(514),c=n(565);t.f=r&&!i?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),i=c(t),u=i.length,l=0;u>l;)o.f(e,n=i[l++],r[n]);return e}},function(e,t,n){"use strict";var r=n(532),i=n(539);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(505);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(568),i=n(503),o=n(500),a=n(509),s=n(570),c=n(537),u=n(506),l=n(572),d=n(573),p=n(574),f=TypeError,h=function(e,t){this.stopped=e,this.result=t},m=h.prototype;e.exports=function(e,t,n){var g,v,y,b,w,S,C,_=n&&n.that,O=!(!n||!n.AS_ENTRIES),E=!(!n||!n.IS_RECORD),I=!(!n||!n.IS_ITERATOR),A=!(!n||!n.INTERRUPTED),T=r(t,_),P=function(e){return g&&p(g,"normal"),new h(!0,e)},R=function(e){return O?(o(e),A?T(e[0],e[1],P):T(e[0],e[1])):A?T(e,P):T(e)};if(E)g=e.iterator;else if(I)g=e;else{if(!(v=d(e)))throw new f(a(e)+" is not iterable");if(s(v)){for(y=0,b=c(e);b>y;y++)if((w=R(e[y]))&&u(m,w))return w;return new h(!1)}g=l(e,v)}for(S=E?e.next:g.next;!(C=i(S,g)).done;){try{w=R(C.value)}catch(k){p(g,"throw",k)}if("object"==typeof w&&w&&u(m,w))return w}return new h(!1)}},function(e,t,n){"use strict";var r=n(569),i=n(508),o=n(477),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(516),i=n(476);e.exports=function(e){if("Function"===r(e))return i(e)}},function(e,t,n){"use strict";var r=n(483),i=n(571),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(503),i=n(508),o=n(500),a=n(509),s=n(573),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return o(r(n,e));throw new c(a(e)+" is not iterable")}},function(e,t,n){"use strict";var r=n(552),i=n(507),o=n(481),a=n(571),s=n(483)("iterator");e.exports=function(e){if(!o(e))return i(e,s)||i(e,"@@iterator")||a[r(e)]}},function(e,t,n){"use strict";var r=n(503),i=n(500),o=n(507);e.exports=function(e,t,n){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(c){s=!0,a=c}if("throw"===t)throw n;if(s)throw a;return i(a),n}},function(e,t,n){"use strict";var r=n(519),i=n(505),o=n(542),a=n(478),s=n(543),c="AggregateError",u=i(c),l=!a((function(){return 1!==u([1]).errors[0]}))&&a((function(){return 7!==u([1],c,{cause:7}).cause}));r({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:s(c,(function(e){return function(t,n){return o(e,this,arguments)}}),l,!0)})},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(506),a=n(561),s=n(544),c=n(529),u=n(563),l=n(520),d=n(513),p=n(555),f=n(550),h=n(483),m=n(478),g=n(486),v=i.SuppressedError,y=h("toStringTag"),b=Error,w=!!v&&3!==v.length,S=!!v&&m((function(){return 4===new v(1,2,3,{cause:4}).cause})),C=w||S,_=function(e,t,n){var r,i=o(O,this);return s?r=!C||i&&a(this)!==O?s(new b,i?a(this):O):new v:(r=i?this:u(O),l(r,y,"Error")),void 0!==n&&l(r,"message",f(n)),p(r,_,r.stack,1),l(r,"error",e),l(r,"suppressed",t),r};s?s(_,b):c(_,b,{name:!0});var O=_.prototype=C?v.prototype:u(b.prototype,{constructor:d(1,_),message:d(1,""),name:d(1,"SuppressedError")});C&&!g&&(O.constructor=_),r({global:!0,constructor:!0,arity:3,forced:C},{SuppressedError:_})},function(e,t,n){"use strict";var r=n(519),i=n(479),o=n(537),a=n(535),s=n(578);r({target:"Array",proto:!0},{at:function(e){var t=i(this),n=o(t),r=a(e),s=r>=0?r:n+r;return s<0||s>=n?void 0:t[s]}}),s("at")},function(e,t,n){"use strict";var r=n(483),i=n(563),o=n(493).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){"use strict";var r=n(519),i=n(580).findLast,o=n(578);r({target:"Array",proto:!0},{findLast:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findLast")},function(e,t,n){"use strict";var r=n(568),i=n(515),o=n(479),a=n(537),s=function(e){var t=1===e;return function(n,s,c){for(var u,l=o(n),d=i(l),p=a(d),f=r(s,c);p-- >0;)if(f(u=d[p],p,l))switch(e){case 0:return u;case 1:return p}return t?-1:void 0}};e.exports={findLast:s(0),findLastIndex:s(1)}},function(e,t,n){"use strict";var r=n(519),i=n(580).findLastIndex,o=n(578);r({target:"Array",proto:!0},{findLastIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findLastIndex")},function(e,t,n){"use strict";var r=n(519),i=n(533).includes,o=n(478),a=n(578);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,n){"use strict";var r=n(519),i=n(479),o=n(537),a=n(584),s=n(586);r({target:"Array",proto:!0,arity:1,forced:n(478)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=o(t),r=arguments.length;s(n+r);for(var c=0;c<r;c++)t[n]=arguments[c],n++;return a(t,n),n}})},function(e,t,n){"use strict";var r=n(494),i=n(585),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!a(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},function(e,t,n){"use strict";var r=n(516);e.exports=Array.isArray||function(e){return"Array"===r(e)}},function(e,t,n){"use strict";var r=TypeError;e.exports=function(e){if(e>9007199254740991)throw r("Maximum allowed index exceeded");return e}},function(e,t,n){"use strict";var r=n(519),i=n(588),o=n(514),a=n(578),s=Array;r({target:"Array",proto:!0},{toReversed:function(){return i(o(this),s)}}),a("toReversed")},function(e,t,n){"use strict";var r=n(537);e.exports=function(e,t){for(var n=r(e),i=new t(n),o=0;o<n;o++)i[o]=e[n-o-1];return i}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(508),a=n(514),s=n(590),c=n(591),u=n(578),l=Array,d=i(c("Array","sort"));r({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&o(e);var t=a(this),n=s(l,t);return d(n,e)}}),u("toSorted")},function(e,t,n){"use strict";var r=n(537);e.exports=function(e,t,n){for(var i=0,o=arguments.length>2?n:r(t),a=new e(o);o>i;)a[i]=t[i++];return a}},function(e,t,n){"use strict";var r=n(471);e.exports=function(e,t){var n=r[e],i=n&&n.prototype;return i&&i[t]}},function(e,t,n){"use strict";var r=n(519),i=n(578),o=n(586),a=n(537),s=n(534),c=n(514),u=n(535),l=Array,d=Math.max,p=Math.min;r({target:"Array",proto:!0},{toSpliced:function(e,t){var n,r,i,f,h=c(this),m=a(h),g=s(e,m),v=arguments.length,y=0;for(0===v?n=r=0:1===v?(n=0,r=m-g):(n=v-2,r=p(d(u(t),0),m-g)),i=o(m+n-r),f=l(i);y<g;y++)f[y]=h[y];for(;y<g+n;y++)f[y]=arguments[y-g+2];for(;y<i;y++)f[y]=h[y+r-n];return f}}),i("toSpliced")},function(e,t,n){"use strict";var r=n(519),i=n(479),o=n(537),a=n(584),s=n(594),c=n(586);r({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=i(this),n=o(t),r=arguments.length;if(r){c(n+r);for(var u=n;u--;){var l=u+r;u in t?t[l]=t[u]:s(t,l)}for(var d=0;d<r;d++)t[d]=arguments[d]}return a(t,n+r)}})},function(e,t,n){"use strict";var r=n(509),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},function(e,t,n){"use strict";var r=n(519),i=n(596),o=n(514),a=Array;r({target:"Array",proto:!0,forced:function(){try{[].with({valueOf:function(){throw 4}},null)}catch(e){return 4!==e}}()},{with:function(e,t){return i(o(this),a,e,t)}})},function(e,t,n){"use strict";var r=n(537),i=n(535),o=RangeError;e.exports=function(e,t,n,a){var s=r(e),c=i(n),u=c<0?s+c:c;if(u>=s||u<0)throw new o("Incorrect index");for(var l=new t(s),d=0;d<s;d++)l[d]=d===u?a:e[d];return l}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=Math.pow,a=o(2,-24),s=.0009765625,c=i(DataView.prototype.getUint16);r({target:"DataView",proto:!0},{getFloat16:function(e){return function(e){var t=e>>>15,n=e>>>10&31,r=1023&e;return 31===n?0===r?0===t?1/0:-1/0:NaN:0===n?r*(0===t?a:-a):o(2,n-15)*(0===t?1+r*s:-1-r*s)}(c(this,e,arguments.length>1&&arguments[1]))}})},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(599),a=n(600),s=n(601),c=n(602),u=Math.pow,l=1024,d=i(DataView.prototype.setUint16);r({target:"DataView",proto:!0},{setFloat16:function(e,t){d(o(this),a(e),function(e){if(e!==e)return 32256;if(0===e)return(1/e===-1/0)<<15;var t=e<0;if(t&&(e=-e),e>=65520)return t<<15|31744;if(e<61005353927612305e-21)return t<<15|c(16777216*e);var n=0|s(e);if(-15===n)return t<<15|l;var r=c((e*u(2,-n)-1)*l);return r===l?t<<15|n+16<<10:t<<15|n+15<<10|r}(+t),arguments.length>2&&arguments[2])}})},function(e,t,n){"use strict";var r=n(552),i=TypeError;e.exports=function(e){if("DataView"===r(e))return e;throw new i("Argument is not a DataView")}},function(e,t,n){"use strict";var r=n(535),i=n(538),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw new o("Wrong length or index");return n}},function(e,t,n){"use strict";var r=Math.log,i=Math.LN2;e.exports=Math.log2||function(e){return r(e)/i}},function(e,t,n){"use strict";var r=4503599627370496;e.exports=function(e){return e+r-r}},function(e,t,n){"use strict";var r=n(494),i=n(604),o=n(605),a=ArrayBuffer.prototype;r&&!("detached"in a)&&i(a,"detached",{configurable:!0,get:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(522),i=n(493);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},function(e,t,n){"use strict";var r=n(471),i=n(606),o=n(607),a=r.DataView;e.exports=function(e){if(!i||0!==o(e))return!1;try{return new a(e),!1}catch(t){return!0}}},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var r=n(471),i=n(545),o=n(516),a=r.ArrayBuffer,s=r.TypeError;e.exports=a&&i(a.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==o(e))throw new s("ArrayBuffer expected");return e.byteLength}},function(e,t,n){"use strict";var r=n(519),i=n(609);i&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(471),i=n(476),o=n(545),a=n(600),s=n(610),c=n(607),u=n(611),l=n(615),d=r.structuredClone,p=r.ArrayBuffer,f=r.DataView,h=Math.min,m=p.prototype,g=f.prototype,v=i(m.slice),y=o(m,"resizable","get"),b=o(m,"maxByteLength","get"),w=i(g.getInt8),S=i(g.setInt8);e.exports=(l||u)&&function(e,t,n){var r,i=c(e),o=void 0===t?i:a(t),m=!y||!y(e);if(s(e),l&&(e=d(e,{transfer:[e]}),i===o&&(n||m)))return e;if(i>=o&&(!n||m))r=v(e,0,o);else{var g=n&&!m&&b?{maxByteLength:b(e)}:void 0;r=new p(o,g);for(var C=new f(e),_=new f(r),O=h(o,i),E=0;E<O;E++)S(_,E,w(C,E))}return l||u(e),r}},function(e,t,n){"use strict";var r=n(605),i=TypeError;e.exports=function(e){if(r(e))throw new i("ArrayBuffer is detached");return e}},function(e,t,n){"use strict";var r,i,o,a,s=n(471),c=n(612),u=n(615),l=s.structuredClone,d=s.ArrayBuffer,p=s.MessageChannel,f=!1;if(u)f=function(e){l(e,{transfer:[e]})};else if(d)try{p||(r=c("worker_threads"))&&(p=r.MessageChannel),p&&(i=new p,o=new d(2),a=function(e){i.port1.postMessage(null,[e])},2===o.byteLength&&(a(o),0===o.byteLength&&(f=a)))}catch(h){}e.exports=f},function(e,t,n){"use strict";var r=n(471),i=n(613);e.exports=function(e){if(i){try{return r.process.getBuiltinModule(e)}catch(t){}try{return Function('return require("'+e+'")')()}catch(t){}}}},function(e,t,n){"use strict";var r=n(614);e.exports="NODE"===r},function(e,t,n){"use strict";var r=n(471),i=n(491),o=n(516),a=function(e){return i.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},function(e,t,n){"use strict";var r=n(471),i=n(478),o=n(490),a=n(614),s=r.structuredClone;e.exports=!!s&&!i((function(){if("DENO"===a&&o>92||"NODE"===a&&o>94||"BROWSER"===a&&o>97)return!1;var e=new ArrayBuffer(8),t=s(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}))},function(e,t,n){"use strict";var r=n(519),i=n(609);i&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},function(e,t,n){"use strict";var r=n(519),i=n(494),o=n(505),a=n(508),s=n(618),c=n(521),u=n(619),l=n(604),d=n(483),p=n(525),f=n(620),h=o("SuppressedError"),m=ReferenceError,g=d("dispose"),v=d("toStringTag"),y="DisposableStack",b=p.set,w=p.getterFor(y),S="sync-dispose",C="disposed",_=function(e){var t=w(e);if(t.state===C)throw new m(y+" already disposed");return t},O=function(){b(s(this,E),{type:y,state:"pending",stack:[]}),i||(this.disposed=!1)},E=O.prototype;u(E,{dispose:function(){var e=w(this);if(e.state!==C){e.state=C,i||(this.disposed=!0);for(var t,n=e.stack,r=n.length,o=!1;r;){var a=n[--r];n[r]=null;try{a()}catch(s){o?t=new h(s,t):(o=!0,t=s)}}if(e.stack=null,o)throw t}},use:function(e){return f(_(this),e,S),e},adopt:function(e,t){var n=_(this);return a(t),f(n,void 0,S,(function(){t(e)})),e},defer:function(e){var t=_(this);a(e),f(t,void 0,S,e)},move:function(){var e=_(this),t=new O;return w(t).stack=e.stack,e.stack=[],e.state=C,i||(this.disposed=!0),t}}),i&&l(E,"disposed",{configurable:!0,get:function(){return w(this).state===C}}),c(E,g,E.dispose,{name:"dispose"}),c(E,v,y,{nonWritable:!0}),r({global:!0,constructor:!0},{DisposableStack:O})},function(e,t,n){"use strict";var r=n(506),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i("Incorrect invocation")}},function(e,t,n){"use strict";var r=n(521);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(505),i=n(503),o=n(476),a=n(568),s=n(500),c=n(508),u=n(481),l=n(507),d=n(483),p=d("asyncDispose"),f=d("dispose"),h=o([].push),m=function(e,t,n){return arguments.length<3&&!u(e)&&(n=c(function(e,t){if("async-dispose"===t){var n=l(e,p);return void 0!==n||void 0===(n=l(e,f))?n:function(){var e=this;return new(r("Promise"))((function(t){i(n,e),t(void 0)}))}}return l(e,f)}(s(e),t))),void 0===n?function(){}:a(n,e)};e.exports=function(e,t,n,r){var i;if(arguments.length<4){if(u(t)&&"sync-dispose"===n)return;i=m(t,n)}else i=m(void 0,n,r);h(e.stack,i)}},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(618),a=n(500),s=n(498),c=n(561),u=n(604),l=n(622),d=n(478),p=n(475),f=n(483),h=n(623).IteratorPrototype,m=n(494),g=n(486),v="constructor",y="Iterator",b=f("toStringTag"),w=TypeError,S=i[y],C=g||!s(S)||S.prototype!==h||!d((function(){S({})})),_=function(){if(o(this,h),c(this)===h)throw new w("Abstract class Iterator not directly constructable")},O=function(e,t){m?u(h,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===h)throw new w("You can't redefine this property");p(this,e)?this[e]=t:l(this,e,t)}}):h[e]=t};p(h,b)||O(b,y),!C&&p(h,v)&&h[v]!==Object||O(v,_),_.prototype=h,r({global:!0,constructor:!0,forced:C},{Iterator:_})},function(e,t,n){"use strict";var r=n(494),i=n(493),o=n(513);e.exports=function(e,t,n){r?i.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){"use strict";var r,i,o,a=n(478),s=n(498),c=n(497),u=n(563),l=n(561),d=n(521),p=n(483),f=n(486),h=p("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(r=i):m=!0),!c(r)||a((function(){var e={};return r[h].call(e)!==e}))?r={}:f&&(r=u(r)),s(r[h])||d(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:m}},function(e,t,n){"use strict";var r=n(503),i=n(521),o=n(507),a=n(475),s=n(483),c=n(623).IteratorPrototype,u=s("dispose");a(c,u)||i(c,u,(function(){var e=o(this,"return");e&&r(e,this)}))},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(500),a=n(626),s=n(627),c=n(628),u=n(574),l=n(629),d=n(632),p=n(633),f=n(486),h=!f&&!d("drop",0),m=!f&&!h&&p("drop",RangeError),g=f||h||m,v=l((function(){for(var e,t=this.iterator,n=this.next;this.remaining;)if(this.remaining--,e=o(i(n,t)),this.done=!!e.done)return;if(e=o(i(n,t)),!(this.done=!!e.done))return e.value}));r({target:"Iterator",proto:!0,real:!0,forced:g},{drop:function(e){var t;o(this);try{t=c(s(+e))}catch(n){u(this,"throw",n)}return m?i(m,this,t):new v(a(this),{remaining:t})}})},function(e,t,n){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},function(e,t,n){"use strict";var r=RangeError;e.exports=function(e){if(e===e)return e;throw new r("NaN is not allowed")}},function(e,t,n){"use strict";var r=n(535),i=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw new i("The argument can't be less than 0");return t}},function(e,t,n){"use strict";var r=n(503),i=n(563),o=n(520),a=n(619),s=n(483),c=n(525),u=n(507),l=n(623).IteratorPrototype,d=n(630),p=n(574),f=n(631),h=s("toStringTag"),m="IteratorHelper",g="WrapForValidIterator",v="normal",y="throw",b=c.set,w=function(e){var t=c.getterFor(e?g:m);return a(i(l),{next:function(){var n=t(this);if(e)return n.nextHandler();if(n.done)return d(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:d(r,n.done)}catch(i){throw n.done=!0,i}},return:function(){var n=t(this),i=n.iterator;if(n.done=!0,e){var o=u(i,"return");return o?r(o,i):d(void 0,!0)}if(n.inner)try{p(n.inner.iterator,v)}catch(a){return p(i,y,a)}if(n.openIters)try{f(n.openIters,v)}catch(a){return p(i,y,a)}return i&&p(i,v),d(void 0,!0)}})},S=w(!0),C=w(!1);o(C,h,"Iterator Helper"),e.exports=function(e,t,n){var r=function(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=t?g:m,i.returnHandlerResult=!!n,i.nextHandler=e,i.counter=0,i.done=!1,b(this,i)};return r.prototype=t?S:C,r}},function(e,t,n){"use strict";e.exports=function(e,t){return{value:e,done:t}}},function(e,t,n){"use strict";var r=n(574);e.exports=function(e,t,n){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{n=r(e[i].iterator,t,n)}catch(o){t="throw",n=o}if("throw"===t)throw n;return n}},function(e,t,n){"use strict";e.exports=function(e,t){var n="function"==typeof Iterator&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(r){return!0}}},function(e,t,n){"use strict";var r=n(471);e.exports=function(e,t){var n=r.Iterator,i=n&&n.prototype,o=i&&i[e],a=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(s){s instanceof t||(a=!1)}if(!a)return o}},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(567),a=n(508),s=n(500),c=n(626),u=n(574),l=n(633)("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{every:function(e){s(this);try{a(e)}catch(r){u(this,"throw",r)}if(l)return i(l,this,e);var t=c(this),n=0;return!o(t,(function(t,r){if(!e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(508),a=n(500),s=n(626),c=n(629),u=n(636),l=n(486),d=n(574),p=n(632),f=n(633),h=!l&&!p("filter",(function(){})),m=!l&&!h&&f("filter",TypeError),g=l||h||m,v=c((function(){for(var e,t,n=this.iterator,r=this.predicate,o=this.next;;){if(e=a(i(o,n)),this.done=!!e.done)return;if(t=e.value,u(n,r,[t,this.counter++],!0))return t}}));r({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function(e){a(this);try{o(e)}catch(t){d(this,"throw",t)}return m?i(m,this,e):new v(s(this),{predicate:e})}})},function(e,t,n){"use strict";var r=n(500),i=n(574);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){i(e,"throw",a)}}},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(567),a=n(508),s=n(500),c=n(626),u=n(574),l=n(633)("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{find:function(e){s(this);try{a(e)}catch(r){u(this,"throw",r)}if(l)return i(l,this,e);var t=c(this),n=0;return o(t,(function(t,r){if(e(t,n++))return r(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(508),a=n(500),s=n(626),c=n(639),u=n(629),l=n(574),d=n(486),p=n(632),f=n(633),h=!d&&!p("flatMap",(function(){})),m=!d&&!h&&f("flatMap",TypeError),g=d||h||m,v=u((function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=a(i(t.next,t.iterator))).done)return e.value;this.inner=null}catch(o){l(n,"throw",o)}if(e=a(i(this.next,n)),this.done=!!e.done)return;try{this.inner=c(r(e.value,this.counter++),!1)}catch(o){l(n,"throw",o)}}}));r({target:"Iterator",proto:!0,real:!0,forced:g},{flatMap:function(e){a(this);try{o(e)}catch(t){l(this,"throw",t)}return m?i(m,this,e):new v(s(this),{mapper:e,inner:null})}})},function(e,t,n){"use strict";var r=n(503),i=n(500),o=n(626),a=n(573);e.exports=function(e,t){t&&"string"===typeof e||i(e);var n=a(e);return o(i(void 0!==n?r(n,e):e))}},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(567),a=n(508),s=n(500),c=n(626),u=n(574),l=n(633)("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{forEach:function(e){s(this);try{a(e)}catch(r){u(this,"throw",r)}if(l)return i(l,this,e);var t=c(this),n=0;o(t,(function(t){e(t,n++)}),{IS_RECORD:!0})}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(479),a=n(506),s=n(623).IteratorPrototype,c=n(629),u=n(639),l=n(486)||function(){try{Iterator.from({return:null}).return()}catch(e){return!0}}(),d=c((function(){return i(this.next,this.iterator)}),!0);r({target:"Iterator",stat:!0,forced:l},{from:function(e){var t=u("string"==typeof e?o(e):e,!0);return a(s,t.iterator)?t.iterator:new d(t)}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(508),a=n(500),s=n(626),c=n(629),u=n(636),l=n(574),d=n(632),p=n(633),f=n(486),h=!f&&!d("map",(function(){})),m=!f&&!h&&p("map",TypeError),g=f||h||m,v=c((function(){var e=this.iterator,t=a(i(this.next,e));if(!(this.done=!!t.done))return u(e,this.mapper,[t.value,this.counter++],!0)}));r({target:"Iterator",proto:!0,real:!0,forced:g},{map:function(e){a(this);try{o(e)}catch(t){l(this,"throw",t)}return m?i(m,this,e):new v(s(this),{mapper:e})}})},function(e,t,n){"use strict";var r=n(519),i=n(567),o=n(508),a=n(500),s=n(626),c=n(574),u=n(633),l=n(542),d=n(478),p=TypeError,f=d((function(){[].keys().reduce((function(){}),void 0)})),h=!f&&u("reduce",p);r({target:"Iterator",proto:!0,real:!0,forced:f||h},{reduce:function(e){a(this);try{o(e)}catch(d){c(this,"throw",d)}var t=arguments.length<2,n=t?void 0:arguments[1];if(h)return l(h,this,t?[e]:[e,n]);var r=s(this),u=0;if(i(r,(function(r){t?(t=!1,n=r):n=e(n,r,u),u++}),{IS_RECORD:!0}),t)throw new p("Reduce of empty iterator with no initial value");return n}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(567),a=n(508),s=n(500),c=n(626),u=n(574),l=n(633)("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{some:function(e){s(this);try{a(e)}catch(r){u(this,"throw",r)}if(l)return i(l,this,e);var t=c(this),n=0;return o(t,(function(t,r){if(e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(500),a=n(626),s=n(627),c=n(628),u=n(629),l=n(574),d=n(633),p=n(486),f=!p&&d("take",RangeError),h=u((function(){var e=this.iterator;if(!this.remaining--)return this.done=!0,l(e,"normal",void 0);var t=o(i(this.next,e));return(this.done=!!t.done)?void 0:t.value}));r({target:"Iterator",proto:!0,real:!0,forced:p||f},{take:function(e){var t;o(this);try{t=c(s(+e))}catch(n){l(this,"throw",n)}return f?i(f,this,t):new h(a(this),{remaining:t})}})},function(e,t,n){"use strict";var r=n(519),i=n(500),o=n(567),a=n(626),s=[].push;r({target:"Iterator",proto:!0,real:!0},{toArray:function(){var e=[];return o(a(i(this)),s,{that:e,IS_RECORD:!0}),e}})},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(508),a=n(480),s=n(567),c=n(648),u=n(486),l=n(478),d=c.Map,p=c.has,f=c.get,h=c.set,m=i([].push),g=u||l((function(){return 1!==d.groupBy("ab",(function(e){return e})).get("a").length}));r({target:"Map",stat:!0,forced:u||g},{groupBy:function(e,t){a(e),o(t);var n=new d,r=0;return s(e,(function(e){var i=t(e,r++);p(n,i)?m(f(n,i),e):h(n,i,[e])})),n}})},function(e,t,n){"use strict";var r=n(476),i=Map.prototype;e.exports={Map:Map,set:r(i.set),get:r(i.get),has:r(i.has),remove:r(i.delete),proto:i}},function(e,t,n){"use strict";var r=n(519),i=n(650);r({target:"Math",stat:!0},{f16round:function(e){return i(e,.0009765625,65504,6103515625e-14)}})},function(e,t,n){"use strict";var r=n(651),i=n(602),o=Math.abs;e.exports=function(e,t,n,a){var s=+e,c=o(s),u=r(s);if(c<a)return u*i(c/a/t)*a*t;var l=(1+t/2220446049250313e-31)*c,d=l-(l-c);return d>n||d!==d?u*(1/0):u*d}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!==t?t:t<0?-1:1}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(535),a=n(653),s=n(654),c=n(655),u=n(478),l=RangeError,d=String,p=isFinite,f=Math.abs,h=Math.floor,m=Math.pow,g=Math.round,v=i(1.1.toExponential),y=i(s),b=i("".slice),w="-6.9000e-11"===v(-69e-12,4)&&"1.25e+0"===v(1.255,2)&&"1.235e+4"===v(12345,3)&&"3e+1"===v(25,0);r({target:"Number",proto:!0,forced:!w||!(u((function(){v(1,1/0)}))&&u((function(){v(1,-1/0)})))||!!u((function(){v(1/0,1/0),v(NaN,1/0)}))},{toExponential:function(e){var t=a(this);if(void 0===e)return v(t);var n=o(e);if(!p(t))return String(t);if(n<0||n>20)throw new l("Incorrect fraction digits");if(w)return v(t,n);var r,i,s,u,S="";if(t<0&&(S="-",t=-t),0===t)i=0,r=y("0",n+1);else{var C=c(t);i=h(C);var _=m(10,i-n),O=g(t/_);2*t>=(2*O+1)*_&&(O+=1),O>=m(10,n+1)&&(O/=10,i+=1),r=d(O)}return 0!==n&&(r=b(r,0,1)+"."+b(r,1)),0===i?(s="+",u="0"):(s=i>0?"+":"-",u=d(f(i))),S+(r+"e")+s+u}})},function(e,t,n){"use strict";var r=n(476);e.exports=r(1.1.valueOf)},function(e,t,n){"use strict";var r=n(535),i=n(551),o=n(480),a=RangeError;e.exports=function(e){var t=i(o(this)),n="",s=r(e);if(s<0||s===1/0)throw new a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},function(e,t,n){"use strict";var r=Math.log,i=Math.LOG10E;e.exports=Math.log10||function(e){return r(e)*i}},function(e,t,n){"use strict";var r=n(519),i=n(622),o=n(505),a=n(476),s=n(508),c=n(480),u=n(501),l=n(567),d=n(478),p=Object.groupBy,f=o("Object","create"),h=a([].push);r({target:"Object",stat:!0,forced:!p||d((function(){return 1!==p("ab",(function(e){return e})).a.length}))},{groupBy:function(e,t){c(e),s(t);var n=f(null),r=0;return l(e,(function(e){var o=u(t(e,r++));o in n?h(n[o],e):i(n,o,[e])})),n}})},function(e,t,n){"use strict";n(519)({target:"Object",stat:!0},{hasOwn:n(475)})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(508),a=n(505),s=n(659),c=n(660),u=n(567),l=n(661),d="No one promise resolved";r({target:"Promise",stat:!0,forced:l},{any:function(e){var t=this,n=a("AggregateError"),r=s.f(t),l=r.resolve,p=r.reject,f=c((function(){var r=o(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var o=s++,u=!1;c++,i(r,t,e).then((function(e){u||f||(f=!0,l(e))}),(function(e){u||f||(u=!0,a[o]=e,--c||p(new n(a,d)))}))})),--c||p(new n(a,d))}));return f.error&&p(f.value),r.promise}})},function(e,t,n){"use strict";var r=n(508),i=TypeError,o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new i("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var r=n(662),i=n(663),o=n(664).CONSTRUCTOR;e.exports=o||!i((function(e){r.all(e).then(void 0,(function(){}))}))},function(e,t,n){"use strict";var r=n(471);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(483)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(s){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(s){return!1}var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(s){}return n}},function(e,t,n){"use strict";var r=n(471),i=n(662),o=n(498),a=n(541),s=n(524),c=n(483),u=n(614),l=n(486),d=n(490),p=i&&i.prototype,f=c("species"),h=!1,m=o(r.PromiseRejectionEvent),g=a("Promise",(function(){var e=s(i),t=e!==String(i);if(!t&&66===d)return!0;if(l&&(!p.catch||!p.finally))return!0;if(!d||d<51||!/native code/.test(e)){var n=new i((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[f]=r,!(h=n.then((function(){}))instanceof r))return!0}return!t&&("BROWSER"===u||"DENO"===u)&&!m}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:m,SUBCLASSING:h}},function(e,t,n){"use strict";var r=n(519),i=n(486),o=n(662),a=n(478),s=n(505),c=n(498),u=n(666),l=n(669),d=n(521),p=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){p.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),n=c(e);return this.then(n?function(n){return l(t,e()).then((function(){return n}))}:e,n?function(n){return l(t,e()).then((function(){throw n}))}:e)}}),!i&&c(o)){var f=s("Promise").prototype.finally;p.finally!==f&&d(p,"finally",f,{unsafe:!0})}},function(e,t,n){"use strict";var r=n(500),i=n(667),o=n(481),a=n(483)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||o(n=r(s)[a])?t:i(n)}},function(e,t,n){"use strict";var r=n(668),i=n(509),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not a constructor")}},function(e,t,n){"use strict";var r=n(476),i=n(478),o=n(498),a=n(552),s=n(505),c=n(524),u=function(){},l=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=r(d.exec),f=!d.test(u),h=function(e){if(!o(e))return!1;try{return l(u,[],e),!0}catch(t){return!1}},m=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!p(d,c(e))}catch(t){return!0}};m.sham=!0,e.exports=!l||i((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?m:h},function(e,t,n){"use strict";var r=n(500),i=n(497),o=n(659);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(542),a=n(671),s=n(659),c=n(508),u=n(660),l=i.Promise,d=!1;r({target:"Promise",stat:!0,forced:!l||!l.try||u((function(){l.try((function(e){d=8===e}),8)})).error||!d},{try:function(e){var t=arguments.length>1?a(arguments,1):[],n=s.f(this),r=u((function(){return o(c(e),void 0,t)}));return(r.error?n.reject:n.resolve)(r.value),n.promise}})},function(e,t,n){"use strict";var r=n(476);e.exports=r([].slice)},function(e,t,n){"use strict";var r=n(519),i=n(659);r({target:"Promise",stat:!0},{withResolvers:function(){var e=i.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},function(e,t,n){"use strict";var r=n(519),i=n(674),o=n(478),a=Array.fromAsync;r({target:"Array",stat:!0,forced:!a||o((function(){var e=0;return a.call((function(){return e++,[]}),{length:0}),1!==e}))},{fromAsync:i})},function(e,t,n){"use strict";var r=n(568),i=n(476),o=n(479),a=n(668),s=n(675),c=n(572),u=n(626),l=n(573),d=n(507),p=n(505),f=n(591),h=n(483),m=n(676),g=n(678).toArray,v=h("asyncIterator"),y=i(f("Array","values")),b=i(y([]).next),w=function(){return new S(this)},S=function(e){this.iterator=y(e)};S.prototype.next=function(){return b(this.iterator)},e.exports=function(e){var t=this,n=arguments.length,i=n>1?arguments[1]:void 0,f=n>2?arguments[2]:void 0;return new(p("Promise"))((function(n){var p=o(e);void 0!==i&&(i=r(i,f));var h=d(p,v),y=h?void 0:l(p)||w,b=a(t)?new t:[],S=h?s(p,h):new m(u(c(p,y)));n(g(S,i,b))}))}},function(e,t,n){"use strict";var r=n(503),i=n(676),o=n(500),a=n(572),s=n(626),c=n(507),u=n(483)("asyncIterator");e.exports=function(e,t){var n=arguments.length<2?c(e,u):t;return n?o(r(n,e)):new i(s(a(e)))}},function(e,t,n){"use strict";var r=n(503),i=n(500),o=n(563),a=n(507),s=n(619),c=n(525),u=n(574),l=n(505),d=n(677),p=n(630),f=l("Promise"),h="AsyncFromSyncIterator",m=c.set,g=c.getterFor(h),v=function(e,t,n,r,i){var o=e.done;f.resolve(e.value).then((function(e){t(p(e,o))}),(function(e){if(!o&&i)try{u(r,"throw",e)}catch(t){e=t}n(e)}))},y=function(e){e.type=h,m(this,e)};y.prototype=s(o(d),{next:function(){var e=g(this);return new f((function(t,n){var o=i(r(e.next,e.iterator));v(o,t,n,e.iterator,!0)}))},return:function(){var e=g(this).iterator;return new f((function(t,n){var o=a(e,"return");if(void 0===o)return t(p(void 0,!0));var s=i(r(o,e));v(s,t,n,e)}))}}),e.exports=y},function(e,t,n){"use strict";var r,i,o=n(471),a=n(485),s=n(498),c=n(563),u=n(561),l=n(521),d=n(483),p=n(486),f="USE_FUNCTION_CONSTRUCTOR",h=d("asyncIterator"),m=o.AsyncIterator,g=a.AsyncIteratorPrototype;if(g)r=g;else if(s(m))r=m.prototype;else if(a[f]||o[f])try{i=u(u(u(Function("return async function*(){}()")()))),u(i)===Object.prototype&&(r=i)}catch(v){}r?p&&(r=c(r)):r={},s(r[h])||l(r,h,(function(){return this})),e.exports=r},function(e,t,n){"use strict";var r=n(503),i=n(508),o=n(500),a=n(497),s=n(586),c=n(505),u=n(626),l=n(679),d=function(e){var t=0===e,n=1===e,d=2===e,p=3===e;return function(e,f,h){o(e);var m=void 0!==f;!m&&t||i(f);var g=u(e),v=c("Promise"),y=g.iterator,b=g.next,w=0;return new v((function(e,i){var c=function(e){l(y,i,e,i)},u=function(){try{if(m)try{s(w)}catch(g){c(g)}v.resolve(o(r(b,y))).then((function(r){try{if(o(r).done)t?(h.length=w,e(h)):e(!p&&(d||void 0));else{var s=r.value;try{if(m){var g=f(s,w),b=function(r){if(n)u();else if(d)r?u():l(y,e,!1,i);else if(t)try{h[w++]=r,u()}catch(o){c(o)}else r?l(y,e,p||s,i):u()};a(g)?v.resolve(g).then(b,c):b(g)}else h[w++]=s,u()}catch(S){c(S)}}}catch(C){i(C)}}),i)}catch(S){i(S)}};u()}))}};e.exports={toArray:d(0),forEach:d(1),every:d(2),some:d(3),find:d(4)}},function(e,t,n){"use strict";var r=n(503),i=n(505),o=n(507);e.exports=function(e,t,n,a){try{var s=o(e,"return");if(s)return i("Promise").resolve(r(s,e)).then((function(){t(n)}),(function(e){a(e)}))}catch(c){return a(c)}t(n)}},function(e,t,n){"use strict";var r=n(519),i=n(494),o=n(505),a=n(508),s=n(618),c=n(521),u=n(619),l=n(604),d=n(483),p=n(525),f=n(620),h=n(490),m=o("Promise"),g=o("SuppressedError"),v=ReferenceError,y=d("asyncDispose"),b=d("toStringTag"),w="AsyncDisposableStack",S=p.set,C=p.getterFor(w),_="async-dispose",O="disposed",E=function(e){var t=C(e);if(t.state===O)throw new v(w+" already disposed");return t},I=function(){S(s(this,A),{type:w,state:"pending",stack:[]}),i||(this.disposed=!1)},A=I.prototype;u(A,{disposeAsync:function(){var e=this;return new m((function(t,n){var r=C(e);if(r.state===O)return t(void 0);r.state=O,i||(e.disposed=!0);var o,a=r.stack,s=a.length,c=!1,u=function(e){c?o=new g(e,o):(c=!0,o=e),l()},l=function(){if(s){var e=a[--s];a[s]=null;try{m.resolve(e()).then(l,u)}catch(i){u(i)}}else r.stack=null,c?n(o):t(void 0)};l()}))},use:function(e){return f(E(this),e,_),e},adopt:function(e,t){var n=E(this);return a(t),f(n,void 0,_,(function(){return t(e)})),e},defer:function(e){var t=E(this);a(e),f(t,void 0,_,e)},move:function(){var e=E(this),t=new I;return C(t).stack=e.stack,e.stack=[],e.state=O,i||(this.disposed=!0),t}}),i&&l(A,"disposed",{configurable:!0,get:function(){return C(this).state===O}}),c(A,y,A.disposeAsync,{name:"disposeAsync"}),c(A,b,w,{nonWritable:!0}),r({global:!0,constructor:!0,forced:h&&h<136},{AsyncDisposableStack:I})},function(e,t,n){"use strict";var r=n(503),i=n(521),o=n(505),a=n(507),s=n(475),c=n(483),u=n(677),l=c("asyncDispose"),d=o("Promise");s(u,l)||i(u,l,(function(){var e=this;return new d((function(t,n){var i=a(e,"return");i?d.resolve(r(i,e)).then((function(){t(void 0)}),n):t(void 0)}))}))},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(683);r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},function(e,t,n){"use strict";var r=n(493).f,i=n(475),o=n(483)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(685),a=n(475),s=n(686).start,c=n(687),u=Array,l=RegExp.escape,d=i("".charAt),p=i("".charCodeAt),f=i(1.1.toString),h=i([].join),m=/^[0-9a-z]/i,g=/^[$()*+./?[\\\]^{|}]/,v=RegExp("^[!\"#%&',\\-:;<=>@`~"+c+"]"),y=i(m.exec),b={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},w=function(e){var t=f(p(e,0),16);return t.length<3?"\\x"+s(t,2,"0"):"\\u"+s(t,4,"0")};r({target:"RegExp",stat:!0,forced:!l||"\\x61b"!==l("ab")},{escape:function(e){o(e);for(var t=e.length,n=u(t),r=0;r<t;r++){var i=d(e,r);if(0===r&&y(m,i))n[r]=w(i);else if(a(b,i))n[r]="\\"+b[i];else if(y(g,i))n[r]="\\"+i;else if(y(v,i))n[r]=w(i);else{var s=p(i,0);55296!==(63488&s)?n[r]=i:s>=56320||r+1>=t||56320!==(64512&p(e,r+1))?n[r]=w(i):(n[r]=i,n[++r]=d(e,r))}}return h(n,"")}})},function(e,t,n){"use strict";var r=TypeError;e.exports=function(e){if("string"==typeof e)return e;throw new r("Argument is not a string")}},function(e,t,n){"use strict";var r=n(476),i=n(538),o=n(551),a=n(654),s=n(480),c=r(a),u=r("".slice),l=Math.ceil,d=function(e){return function(t,n,r){var a,d,p=o(s(t)),f=i(n),h=p.length,m=void 0===r?" ":o(r);return f<=h||""===m?p:((d=c(m,l((a=f-h)/m.length))).length>a&&(d=u(d,0,a)),e?p+d:d+p)}};e.exports={start:d(!1),end:d(!0)}},function(e,t,n){"use strict";e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(494),i=n(604),o=n(689),a=n(690);r&&!o.correct&&(i(RegExp.prototype,"flags",{configurable:!0,get:a}),o.correct=!0)},function(e,t,n){"use strict";var r=n(471),i=n(478),o=r.RegExp,a=!i((function(){var e=!0;try{o(".","d")}catch(c){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(o.prototype,"flags").get.call(t)!==r||n!==r}));e.exports={correct:a}},function(e,t,n){"use strict";var r=n(500);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(519),i=n(692),o=n(478);r({target:"Set",proto:!0,real:!0,forced:!n(700)("difference",(function(e){return 0===e.size}))||o((function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size}))},{difference:i})},function(e,t,n){"use strict";var r=n(693),i=n(694),o=n(695),a=n(698),s=n(699),c=n(696),u=n(697),l=i.has,d=i.remove;e.exports=function(e){var t=r(this),n=s(e),i=o(t);return a(t)<=n.size?c(t,(function(e){n.includes(e)&&d(i,e)})):u(n.getIterator(),(function(e){l(i,e)&&d(i,e)})),i}},function(e,t,n){"use strict";var r=n(694).has;e.exports=function(e){return r(e),e}},function(e,t,n){"use strict";var r=n(476),i=Set.prototype;e.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},function(e,t,n){"use strict";var r=n(694),i=n(696),o=r.Set,a=r.add;e.exports=function(e){var t=new o;return i(e,(function(e){a(t,e)})),t}},function(e,t,n){"use strict";var r=n(476),i=n(697),o=n(694),a=o.Set,s=o.proto,c=r(s.forEach),u=r(s.keys),l=u(new a).next;e.exports=function(e,t,n){return n?i({iterator:u(e),next:l},t):c(e,t)}},function(e,t,n){"use strict";var r=n(503);e.exports=function(e,t,n){for(var i,o,a=n?e:e.iterator,s=e.next;!(i=r(s,a)).done;)if(void 0!==(o=t(i.value)))return o}},function(e,t,n){"use strict";var r=n(545),i=n(694);e.exports=r(i.proto,"size","get")||function(e){return e.size}},function(e,t,n){"use strict";var r=n(508),i=n(500),o=n(503),a=n(535),s=n(626),c="Invalid size",u=RangeError,l=TypeError,d=Math.max,p=function(e,t){this.set=e,this.size=d(t,0),this.has=r(e.has),this.keys=r(e.keys)};p.prototype={getIterator:function(){return s(i(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!==t)throw new l(c);var n=a(t);if(n<0)throw new u(c);return new p(e,n)}},function(e,t,n){"use strict";var r=n(505),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},o=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var n=r("Set");try{(new n)[e](i(0));try{return(new n)[e](i(-1)),!1}catch(a){if(!t)return!0;try{return(new n)[e](o(-1/0)),!1}catch(s){return t(new n([1,2])[e](o(1/0)))}}}catch(s){return!1}}},function(e,t,n){"use strict";var r=n(519),i=n(478),o=n(702);r({target:"Set",proto:!0,real:!0,forced:!n(700)("intersection",(function(e){return 2===e.size&&e.has(1)&&e.has(2)}))||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:o})},function(e,t,n){"use strict";var r=n(693),i=n(694),o=n(698),a=n(699),s=n(696),c=n(697),u=i.Set,l=i.add,d=i.has;e.exports=function(e){var t=r(this),n=a(e),i=new u;return o(t)>n.size?c(n.getIterator(),(function(e){d(t,e)&&l(i,e)})):s(t,(function(e){n.includes(e)&&l(i,e)})),i}},function(e,t,n){"use strict";var r=n(519),i=n(704);r({target:"Set",proto:!0,real:!0,forced:!n(700)("isDisjointFrom",(function(e){return!e}))},{isDisjointFrom:i})},function(e,t,n){"use strict";var r=n(693),i=n(694).has,o=n(698),a=n(699),s=n(696),c=n(697),u=n(574);e.exports=function(e){var t=r(this),n=a(e);if(o(t)<=n.size)return!1!==s(t,(function(e){if(n.includes(e))return!1}),!0);var l=n.getIterator();return!1!==c(l,(function(e){if(i(t,e))return u(l,"normal",!1)}))}},function(e,t,n){"use strict";var r=n(519),i=n(706);r({target:"Set",proto:!0,real:!0,forced:!n(700)("isSubsetOf",(function(e){return e}))},{isSubsetOf:i})},function(e,t,n){"use strict";var r=n(693),i=n(698),o=n(696),a=n(699);e.exports=function(e){var t=r(this),n=a(e);return!(i(t)>n.size)&&!1!==o(t,(function(e){if(!n.includes(e))return!1}),!0)}},function(e,t,n){"use strict";var r=n(519),i=n(708);r({target:"Set",proto:!0,real:!0,forced:!n(700)("isSupersetOf",(function(e){return!e}))},{isSupersetOf:i})},function(e,t,n){"use strict";var r=n(693),i=n(694).has,o=n(698),a=n(699),s=n(697),c=n(574);e.exports=function(e){var t=r(this),n=a(e);if(o(t)<n.size)return!1;var u=n.getIterator();return!1!==s(u,(function(e){if(!i(t,e))return c(u,"normal",!1)}))}},function(e,t,n){"use strict";var r=n(519),i=n(710),o=n(711);r({target:"Set",proto:!0,real:!0,forced:!n(700)("symmetricDifference")||!o("symmetricDifference")},{symmetricDifference:i})},function(e,t,n){"use strict";var r=n(693),i=n(694),o=n(695),a=n(699),s=n(697),c=i.add,u=i.has,l=i.remove;e.exports=function(e){var t=r(this),n=a(e).getIterator(),i=o(t);return s(n,(function(e){u(t,e)?l(i,e):c(i,e)})),i}},function(e,t,n){"use strict";e.exports=function(e){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](n);return 1===r.size&&4===r.values().next().value}catch(i){return!1}}},function(e,t,n){"use strict";var r=n(519),i=n(713),o=n(711);r({target:"Set",proto:!0,real:!0,forced:!n(700)("union")||!o("union")},{union:i})},function(e,t,n){"use strict";var r=n(693),i=n(694).add,o=n(695),a=n(699),s=n(697);e.exports=function(e){var t=r(this),n=a(e).getIterator(),c=o(t);return s(n,(function(e){i(c,e)})),c}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(480),a=n(535),s=n(551),c=n(478),u=i("".charAt);r({target:"String",proto:!0,forced:c((function(){return"\ud842"!=="\ud842\udfb7".at(-2)}))},{at:function(e){var t=s(o(this)),n=t.length,r=a(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:u(t,i)}})},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(480),a=n(551),s=i("".charCodeAt);r({target:"String",proto:!0},{isWellFormed:function(){for(var e=a(o(this)),t=e.length,n=0;n<t;n++){var r=s(e,n);if(55296===(63488&r)&&(r>=56320||++n>=t||56320!==(64512&s(e,n))))return!1}return!0}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(569),a=n(717),s=n(630),c=n(480),u=n(538),l=n(551),d=n(500),p=n(497),f=n(516),h=n(718),m=n(719),g=n(507),v=n(521),y=n(478),b=n(483),w=n(666),S=n(720),C=n(722),_=n(525),O=n(486),E=b("matchAll"),I="RegExp String",A=I+" Iterator",T=_.set,P=_.getterFor(A),R=RegExp.prototype,k=TypeError,D=o("".indexOf),M=o("".matchAll),N=!!M&&!y((function(){M("a",/./)})),x=a((function(e,t,n,r){T(this,{type:A,regexp:e,string:t,global:n,unicode:r,done:!1})}),I,(function(){var e=P(this);if(e.done)return s(void 0,!0);var t=e.regexp,n=e.string,r=C(t,n);return null===r?(e.done=!0,s(void 0,!0)):e.global?(""===l(r[0])&&(t.lastIndex=S(n,u(t.lastIndex),e.unicode)),s(r,!1)):(e.done=!0,s(r,!1))})),L=function(e){var t,n,r,i=d(this),o=l(e),a=w(i,RegExp),s=l(m(i));return t=new a(a===RegExp?i.source:i,s),n=!!~D(s,"g"),r=!!~D(s,"u"),t.lastIndex=u(i.lastIndex),new x(t,o,n,r)};r({target:"String",proto:!0,forced:N},{matchAll:function(e){var t,n,r,o,a=c(this);if(p(e)){if(h(e)&&(t=l(c(m(e))),!~D(t,"g")))throw new k("`.matchAll` does not allow non-global regexes");if(N)return M(a,e);if(void 0===(r=g(e,E))&&O&&"RegExp"===f(e)&&(r=L),r)return i(r,e,a)}else if(N)return M(a,e);return n=l(a),o=new RegExp(e,"g"),O?i(L,o,n):o[E](n)}}),O||E in R||v(R,E,L)},function(e,t,n){"use strict";var r=n(623).IteratorPrototype,i=n(563),o=n(513),a=n(683),s=n(571),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:o(+!u,n)}),a(e,l,!1,!0),s[l]=c,e}},function(e,t,n){"use strict";var r=n(497),i=n(516),o=n(483)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},function(e,t,n){"use strict";var r=n(503),i=n(475),o=n(506),a=n(689),s=n(690),c=RegExp.prototype;e.exports=a.correct?function(e){return e.flags}:function(e){return a.correct||!o(c,e)||i(e,"flags")?e.flags:r(s,e)}},function(e,t,n){"use strict";var r=n(721).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(476),i=n(535),o=n(551),a=n(480),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,d=o(a(t)),p=i(n),f=d.length;return p<0||p>=f?e?"":void 0:(r=c(d,p))<55296||r>56319||p+1===f||(l=c(d,p+1))<56320||l>57343?e?s(d,p):r:e?u(d,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},function(e,t,n){"use strict";var r=n(503),i=n(500),o=n(498),a=n(516),s=n(723),c=TypeError;e.exports=function(e,t){var n=e.exec;if(o(n)){var u=r(n,e,t);return null!==u&&i(u),u}if("RegExp"===a(e))return r(s,e,t);throw new c("RegExp#exec called on incompatible receiver")}},function(e,t,n){"use strict";var r=n(503),i=n(476),o=n(551),a=n(690),s=n(724),c=n(484),u=n(563),l=n(525).get,d=n(725),p=n(726),f=c("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,m=h,g=i("".charAt),v=i("".indexOf),y=i("".replace),b=i("".slice),w=function(){var e=/a/,t=/b*/g;return r(h,e,"a"),r(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),S=s.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(w||C||S||d||p)&&(m=function(e){var t,n,i,s,c,d,p,_=this,O=l(_),E=o(e),I=O.raw;if(I)return I.lastIndex=_.lastIndex,t=r(m,I,E),_.lastIndex=I.lastIndex,t;var A=O.groups,T=S&&_.sticky,P=r(a,_),R=_.source,k=0,D=E;if(T&&(P=y(P,"y",""),-1===v(P,"g")&&(P+="g"),D=b(E,_.lastIndex),_.lastIndex>0&&(!_.multiline||_.multiline&&"\n"!==g(E,_.lastIndex-1))&&(R="(?: "+R+")",D=" "+D,k++),n=new RegExp("^(?:"+R+")",P)),C&&(n=new RegExp("^"+R+"$(?!\\s)",P)),w&&(i=_.lastIndex),s=r(h,T?n:_,D),T?s?(s.input=b(s.input,k),s[0]=b(s[0],k),s.index=_.lastIndex,_.lastIndex+=s[0].length):_.lastIndex=0:w&&s&&(_.lastIndex=_.global?s.index+s[0].length:i),C&&s&&s.length>1&&r(f,s[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&A)for(s.groups=d=u(null),c=0;c<A.length;c++)d[(p=A[c])[0]]=s[p[1]];return s}),e.exports=m},function(e,t,n){"use strict";var r=n(478),i=n(471).RegExp,o=r((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},function(e,t,n){"use strict";var r=n(478),i=n(471).RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},function(e,t,n){"use strict";var r=n(478),i=n(471).RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},function(e,t,n){"use strict";var r=n(542),i=n(503),o=n(476),a=n(728),s=n(478),c=n(500),u=n(498),l=n(497),d=n(535),p=n(538),f=n(551),h=n(480),m=n(720),g=n(507),v=n(730),y=n(719),b=n(722),w=n(483)("replace"),S=Math.max,C=Math.min,_=o([].concat),O=o([].push),E=o("".indexOf),I=o("".slice),A="$0"==="a".replace(/./,"$0"),T=!!/./[w]&&""===/./[w]("a","$0");a("replace",(function(e,t,n){var o=T?"$":"$0";return[function(e,n){var r=h(this),o=l(e)?g(e,w):void 0;return o?i(o,e,r,n):i(t,f(r),e,n)},function(e,i){var a=c(this),s=f(e);if("string"==typeof i&&-1===E(i,o)&&-1===E(i,"$<")){var l=n(t,a,s,i);if(l.done)return l.value}var h=u(i);h||(i=f(i));var g,w=f(y(a)),A=-1!==E(w,"g");A&&(g=-1!==E(w,"u"),a.lastIndex=0);for(var T,P=[];null!==(T=b(a,s))&&(O(P,T),A);)""===f(T[0])&&(a.lastIndex=m(s,p(a.lastIndex),g));for(var R,k="",D=0,M=0;M<P.length;M++){for(var N,x=f((T=P[M])[0]),L=S(C(d(T.index),s.length),0),j=[],U=1;U<T.length;U++)O(j,void 0===(R=T[U])?R:String(R));var F=T.groups;if(h){var z=_([x],j,L,s);void 0!==F&&O(z,F),N=f(r(i,void 0,z))}else N=v(x,s,L,j,F,i);L>=D&&(k+=I(s,D,L)+N,D=L+x.length)}return k+I(s,D)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!A||T)},function(e,t,n){"use strict";n(729);var r=n(503),i=n(521),o=n(723),a=n(478),s=n(483),c=n(520),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,d){var p=s(e),f=!a((function(){var t={};return t[p]=function(){return 7},7!==""[e](t)})),h=f&&!a((function(){var t=!1,n=/a/;if("split"===e){var r={};r[u]=function(){return n},(n={constructor:r,flags:""})[p]=/./[p]}return n.exec=function(){return t=!0,null},n[p](""),!t}));if(!f||!h||n){var m=/./[p],g=t(p,""[e],(function(e,t,n,i,a){var s=t.exec;return s===o||s===l.exec?f&&!a?{done:!0,value:r(m,t,n,i)}:{done:!0,value:r(e,n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(l,p,g[1])}d&&c(l[p],"sham",!0)}},function(e,t,n){"use strict";var r=n(519),i=n(723);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(476),i=n(479),o=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,p){var f=n+e.length,h=r.length,m=l;return void 0!==d&&(d=i(d),m=u),s(p,m,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,f);case"<":u=d[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>h){var p=o(l/10);return 0===p?i:p<=h?void 0===r[p-1]?a(s,1):r[p-1]+a(s,1):i}u=r[l-1]}return void 0===u?"":u}))}},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(476),a=n(480),s=n(498),c=n(497),u=n(718),l=n(551),d=n(507),p=n(719),f=n(730),h=n(483),m=n(486),g=h("replace"),v=TypeError,y=o("".indexOf),b=o("".replace),w=o("".slice),S=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,h,C,_,O,E,I,A,T=a(this),P=0,R="";if(c(e)){if((n=u(e))&&(r=l(a(p(e))),!~y(r,"g")))throw new v("`.replaceAll` does not allow non-global regexes");if(o=d(e,g))return i(o,e,T,t);if(m&&n)return b(l(T),e,t)}for(h=l(T),C=l(e),(_=s(t))||(t=l(t)),O=C.length,E=S(1,O),I=y(h,C);-1!==I;)A=_?l(t(C,I,h)):f(C,h,I,[],void 0,t),R+=w(h,P,I)+A,P=I+O,I=I+E>h.length?-1:y(h,C,I+E);return P<h.length&&(R+=w(h,P)),R}})},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(476),a=n(480),s=n(551),c=n(478),u=Array,l=o("".charAt),d=o("".charCodeAt),p=o([].join),f="".toWellFormed,h=f&&c((function(){return"1"!==i(f,1)}));r({target:"String",proto:!0,forced:h},{toWellFormed:function(){var e=s(a(this));if(h)return i(f,e);for(var t=e.length,n=u(t),r=0;r<t;r++){var o=d(e,r);55296!==(63488&o)?n[r]=l(e,r):o>=56320||r+1>=t||56320!==(64512&d(e,r+1))?n[r]="\ufffd":(n[r]=l(e,r),n[++r]=l(e,r))}return p(n,"")}})},function(e,t,n){"use strict";n(734)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(503),a=n(494),s=n(735),c=n(736),u=n(737),l=n(618),d=n(513),p=n(520),f=n(741),h=n(538),m=n(600),g=n(742),v=n(743),y=n(501),b=n(475),w=n(552),S=n(497),C=n(504),_=n(563),O=n(506),E=n(544),I=n(531).f,A=n(744),T=n(747).forEach,P=n(750),R=n(604),k=n(493),D=n(511),M=n(590),N=n(525),x=n(549),L=N.get,j=N.set,U=N.enforce,F=k.f,z=D.f,B=i.RangeError,K=u.ArrayBuffer,H=K.prototype,W=u.DataView,q=c.NATIVE_ARRAY_BUFFER_VIEWS,V=c.TYPED_ARRAY_TAG,$=c.TypedArray,G=c.TypedArrayPrototype,Z=c.isTypedArray,Q="BYTES_PER_ELEMENT",Y="Wrong length",J=function(e,t){R(e,t,{configurable:!0,get:function(){return L(this)[t]}})},X=function(e){var t;return O(H,e)||"ArrayBuffer"===(t=w(e))||"SharedArrayBuffer"===t},ee=function(e,t){return Z(e)&&!C(t)&&t in e&&f(+t)&&t>=0},te=function(e,t){return t=y(t),ee(e,t)?d(2,e[t]):z(e,t)},ne=function(e,t,n){return t=y(t),!(ee(e,t)&&S(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?F(e,t,n):(e[t]=n.value,e)};a?(q||(D.f=te,k.f=ne,J(G,"buffer"),J(G,"byteOffset"),J(G,"byteLength"),J(G,"length")),r({target:"Object",stat:!0,forced:!q},{getOwnPropertyDescriptor:te,defineProperty:ne}),e.exports=function(e,t,n){var a=e.match(/\d+/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,d="set"+e,f=i[c],y=f,b=y&&y.prototype,w={},C=function(e,t){F(e,t,{get:function(){return function(e,t){var n=L(e);return n.view[u](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=L(e);i.view[d](t*a+i.byteOffset,n?v(r):r,!0)}(this,t,e)},enumerable:!0})};q?s&&(y=t((function(e,t,n,r){return l(e,b),x(S(t)?X(t)?void 0!==r?new f(t,g(n,a),r):void 0!==n?new f(t,g(n,a)):new f(t):Z(t)?M(y,t):o(A,y,t):new f(m(t)),e,y)})),E&&E(y,$),T(I(f),(function(e){e in y||p(y,e,f[e])})),y.prototype=b):(y=t((function(e,t,n,r){l(e,b);var i,s,c,u=0,d=0;if(S(t)){if(!X(t))return Z(t)?M(y,t):o(A,y,t);i=t,d=g(n,a);var p=t.byteLength;if(void 0===r){if(p%a)throw new B(Y);if((s=p-d)<0)throw new B(Y)}else if((s=h(r)*a)+d>p)throw new B(Y);c=s/a}else c=m(t),i=new K(s=c*a);for(j(e,{buffer:i,byteOffset:d,byteLength:s,length:c,view:new W(i)});u<c;)C(e,u++)})),E&&E(y,$),b=y.prototype=_(G)),b.constructor!==y&&p(b,"constructor",y),U(b).TypedArrayConstructor=y,V&&p(b,V,c);var O=y!==f;w[c]=y,r({global:!0,constructor:!0,forced:O,sham:!q},w),Q in y||p(y,Q,a),Q in b||p(b,Q,a),P(c)}):e.exports=function(){}},function(e,t,n){"use strict";var r=n(471),i=n(478),o=n(663),a=n(736).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,c=r.Int8Array;e.exports=!a||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},function(e,t,n){"use strict";var r,i,o,a=n(606),s=n(494),c=n(471),u=n(498),l=n(497),d=n(475),p=n(552),f=n(509),h=n(520),m=n(521),g=n(604),v=n(506),y=n(561),b=n(544),w=n(483),S=n(488),C=n(525),_=C.enforce,O=C.get,E=c.Int8Array,I=E&&E.prototype,A=c.Uint8ClampedArray,T=A&&A.prototype,P=E&&y(E),R=I&&y(I),k=Object.prototype,D=c.TypeError,M=w("toStringTag"),N=S("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",L=a&&!!b&&"Opera"!==p(c.opera),j=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},z=function(e){var t=y(e);if(l(t)){var n=O(t);return n&&d(n,x)?n[x]:z(t)}},B=function(e){if(!l(e))return!1;var t=p(e);return d(U,t)||d(F,t)};for(r in U)(o=(i=c[r])&&i.prototype)?_(o)[x]=i:L=!1;for(r in F)(o=(i=c[r])&&i.prototype)&&(_(o)[x]=i);if((!L||!u(P)||P===Function.prototype)&&(P=function(){throw new D("Incorrect invocation")},L))for(r in U)c[r]&&b(c[r],P);if((!L||!R||R===k)&&(R=P.prototype,L))for(r in U)c[r]&&b(c[r].prototype,R);if(L&&y(T)!==R&&b(T,R),s&&!d(R,M))for(r in j=!0,g(R,M,{configurable:!0,get:function(){return l(this)?this[N]:void 0}}),U)c[r]&&h(c[r],N,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:j&&N,aTypedArray:function(e){if(B(e))return e;throw new D("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!b||v(P,e)))return e;throw new D(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var i in U){var o=c[i];if(o&&d(o.prototype,e))try{delete o.prototype[e]}catch(a){try{o.prototype[e]=t}catch(u){}}}R[e]&&!n||m(R,e,n?t:L&&I[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(s){if(b){if(n)for(r in U)if((i=c[r])&&d(i,e))try{delete i[e]}catch(o){}if(P[e]&&!n)return;try{return m(P,e,n?t:L&&P[e]||t)}catch(o){}}for(r in U)!(i=c[r])||i[e]&&!n||m(i,e,t)}},getTypedArrayConstructor:z,isView:function(e){if(!l(e))return!1;var t=p(e);return"DataView"===t||d(U,t)||d(F,t)},isTypedArray:B,TypedArray:P,TypedArrayPrototype:R}},function(e,t,n){"use strict";var r=n(471),i=n(476),o=n(494),a=n(606),s=n(523),c=n(520),u=n(604),l=n(619),d=n(478),p=n(618),f=n(535),h=n(538),m=n(600),g=n(738),v=n(739),y=n(561),b=n(544),w=n(740),S=n(671),C=n(549),_=n(529),O=n(683),E=n(525),I=s.PROPER,A=s.CONFIGURABLE,T="ArrayBuffer",P="DataView",R="prototype",k="Wrong index",D=E.getterFor(T),M=E.getterFor(P),N=E.set,x=r[T],L=x,j=L&&L[R],U=r[P],F=U&&U[R],z=Object.prototype,B=r.Array,K=r.RangeError,H=i(w),W=i([].reverse),q=v.pack,V=v.unpack,$=function(e){return[255&e]},G=function(e){return[255&e,e>>8&255]},Z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Y=function(e){return q(g(e),23,4)},J=function(e){return q(e,52,8)},X=function(e,t,n){u(e[R],t,{configurable:!0,get:function(){return n(this)[t]}})},ee=function(e,t,n,r){var i=M(e),o=m(n),a=!!r;if(o+t>i.byteLength)throw new K(k);var s=i.bytes,c=o+i.byteOffset,u=S(s,c,c+t);return a?u:W(u)},te=function(e,t,n,r,i,o){var a=M(e),s=m(n),c=r(+i),u=!!o;if(s+t>a.byteLength)throw new K(k);for(var l=a.bytes,d=s+a.byteOffset,p=0;p<t;p++)l[d+p]=c[u?p:t-p-1]};if(a){var ne=I&&x.name!==T;d((function(){x(1)}))&&d((function(){new x(-1)}))&&!d((function(){return new x,new x(1.5),new x(NaN),1!==x.length||ne&&!A}))?ne&&A&&c(x,"name",T):((L=function(e){return p(this,j),C(new x(m(e)),this,L)})[R]=j,j.constructor=L,_(L,x)),b&&y(F)!==z&&b(F,z);var re=new U(new L(2)),ie=i(F.setInt8);re.setInt8(0,2147483648),re.setInt8(1,2147483649),!re.getInt8(0)&&re.getInt8(1)||l(F,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else j=(L=function(e){p(this,j);var t=m(e);N(this,{type:T,bytes:H(B(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[R],F=(U=function(e,t,n){p(this,F),p(e,j);var r=D(e),i=r.byteLength,a=f(t);if(a<0||a>i)throw new K("Wrong offset");if(a+(n=void 0===n?i-a:h(n))>i)throw new K("Wrong length");N(this,{type:P,buffer:e,byteLength:n,byteOffset:a,bytes:r.bytes}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=a)})[R],o&&(X(L,"byteLength",D),X(U,"buffer",M),X(U,"byteLength",M),X(U,"byteOffset",M)),l(F,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return V(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return V(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,$,t)},setUint8:function(e,t){te(this,1,e,$,t)},setInt16:function(e,t){te(this,2,e,G,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,G,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,Z,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,Z,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,Y,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,J,t,arguments.length>2&&arguments[2])}});O(L,T),O(U,P),e.exports={ArrayBuffer:L,DataView:U}},function(e,t,n){"use strict";var r=n(650);e.exports=Math.fround||function(e){return r(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},function(e,t,n){"use strict";var r=Array,i=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,c=Math.LN2;e.exports={pack:function(e,t,n){var u,l,d,p=r(n),f=8*n-t-1,h=(1<<f)-1,m=h>>1,g=23===t?o(2,-24)-o(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=i(e))!==e||e===1/0?(l=e!==e?1:0,u=h):(u=a(s(e)/c),e*(d=o(2,-u))<1&&(u--,d*=2),(e+=u+m>=1?g/d:g*o(2,1-m))*d>=2&&(u++,d/=2),u+m>=h?(l=0,u=h):u+m>=1?(l=(e*d-1)*o(2,t),u+=m):(l=e*o(2,m-1)*o(2,t),u=0));t>=8;)p[y++]=255&l,l/=256,t-=8;for(u=u<<t|l,f+=t;f>0;)p[y++]=255&u,u/=256,f-=8;return p[y-1]|=128*v,p},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=r-1,l=e[u--],d=127&l;for(l>>=7;c>0;)d=256*d+e[u--],c-=8;for(n=d&(1<<-c)-1,d>>=-c,c+=t;c>0;)n=256*n+e[u--],c-=8;if(0===d)d=1-s;else{if(d===a)return n?NaN:l?-1/0:1/0;n+=o(2,t),d-=s}return(l?-1:1)*n*o(2,d-t)}}},function(e,t,n){"use strict";var r=n(479),i=n(534),o=n(537);e.exports=function(e){for(var t=r(this),n=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(497),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){"use strict";var r=n(628),i=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw new i("Wrong offset");return n}},function(e,t,n){"use strict";var r=Math.round;e.exports=function(e){var t=r(e);return t<0?0:t>255?255:255&t}},function(e,t,n){"use strict";var r=n(568),i=n(503),o=n(667),a=n(479),s=n(537),c=n(572),u=n(573),l=n(570),d=n(745),p=n(736).aTypedArrayConstructor,f=n(746);e.exports=function(e){var t,n,h,m,g,v,y,b,w=o(this),S=a(e),C=arguments.length,_=C>1?arguments[1]:void 0,O=void 0!==_,E=u(S);if(E&&!l(E))for(b=(y=c(S,E)).next,S=[];!(v=i(b,y)).done;)S.push(v.value);for(O&&C>2&&(_=r(_,arguments[2])),n=s(S),h=new(p(w))(n),m=d(h),t=0;n>t;t++)g=O?_(S[t],t):S[t],h[t]=m?f(g):+g;return h}},function(e,t,n){"use strict";var r=n(552);e.exports=function(e){var t=r(e);return"BigInt64Array"===t||"BigUint64Array"===t}},function(e,t,n){"use strict";var r=n(502),i=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}},function(e,t,n){"use strict";var r=n(568),i=n(476),o=n(515),a=n(479),s=n(537),c=n(748),u=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,d=6===e,p=7===e,f=5===e||d;return function(h,m,g,v){for(var y,b,w=a(h),S=o(w),C=s(S),_=r(m,g),O=0,E=v||c,I=t?E(h,C):n||p?E(h,0):void 0;C>O;O++)if((f||O in S)&&(b=_(y=S[O],O,w),e))if(t)I[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:u(I,y)}else switch(e){case 4:return!1;case 7:u(I,y)}return d?-1:i||l?l:I}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(e,t,n){"use strict";var r=n(749);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},function(e,t,n){"use strict";var r=n(585),i=n(668),o=n(497),a=n(483)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},function(e,t,n){"use strict";var r=n(505),i=n(604),o=n(483),a=n(494),s=o("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";n(734)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){"use strict";n(734)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(734)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(736),i=n(537),o=n(535),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",(function(e){var t=a(this),n=i(t),r=o(e),s=r>=0?r:n+r;return s<0||s>=n?void 0:t[s]}))},function(e,t,n){"use strict";var r=n(736),i=n(740),o=n(746),a=n(552),s=n(503),c=n(476),u=n(478),l=r.aTypedArray,d=r.exportTypedArrayMethod,p=c("".slice);d("fill",(function(e){var t=arguments.length;l(this);var n="Big"===p(a(this),0,3)?o(e):+e;return s(i,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},function(e,t,n){"use strict";var r=n(736),i=n(580).findLast,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLast",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(736),i=n(580).findLastIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLastIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(735);(0,n(736).exportTypedArrayStaticMethod)("from",n(744),r)},function(e,t,n){"use strict";var r=n(736),i=n(735),o=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(o(this))(t);t>e;)n[e]=arguments[e++];return n}),i)},function(e,t,n){"use strict";var r=n(471),i=n(503),o=n(736),a=n(537),s=n(742),c=n(479),u=n(478),l=r.RangeError,d=r.Int8Array,p=d&&d.prototype,f=p&&p.set,h=o.aTypedArray,m=o.exportTypedArrayMethod,g=!u((function(){var e=new Uint8ClampedArray(2);return i(f,e,{length:1,0:3},1),3!==e[1]})),v=g&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){h(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=c(e);if(g)return i(f,this,n,t);var r=this.length,o=a(n),u=0;if(o+t>r)throw new l("Wrong length");for(;u<o;)this[t+u]=n[u++]}),!g||v)},function(e,t,n){"use strict";var r=n(471),i=n(569),o=n(478),a=n(508),s=n(767),c=n(736),u=n(768),l=n(769),d=n(490),p=n(770),f=c.aTypedArray,h=c.exportTypedArrayMethod,m=r.Uint16Array,g=m&&i(m.prototype.sort),v=!!g&&!(o((function(){g(new m(2),null)}))&&o((function(){g(new m(2),{})}))),y=!!g&&!o((function(){if(d)return d<74;if(u)return u<67;if(l)return!0;if(p)return p<602;var e,t,n=new m(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(g(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));h("sort",(function(e){return void 0!==e&&a(e),y?g(this,e):s(f(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!==n?-1:t!==t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!y||v)},function(e,t,n){"use strict";var r=n(671),i=Math.floor,o=function(e,t){var n=e.length;if(n<8)for(var a,s,c=1;c<n;){for(s=c,a=e[c];s&&t(e[s-1],a)>0;)e[s]=e[--s];s!==c++&&(e[s]=a)}else for(var u=i(n/2),l=o(r(e,0,u),t),d=o(r(e,u),t),p=l.length,f=d.length,h=0,m=0;h<p||m<f;)e[h+m]=h<p&&m<f?t(l[h],d[m])<=0?l[h++]:d[m++]:h<p?l[h++]:d[m++];return e};e.exports=o},function(e,t,n){"use strict";var r=n(491).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},function(e,t,n){"use strict";var r=n(491);e.exports=/MSIE|Trident/.test(r)},function(e,t,n){"use strict";var r=n(491).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},function(e,t,n){"use strict";var r=n(588),i=n(736),o=i.aTypedArray,a=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;a("toReversed",(function(){return r(o(this),s(this))}))},function(e,t,n){"use strict";var r=n(736),i=n(476),o=n(508),a=n(590),s=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,l=i(r.TypedArrayPrototype.sort);u("toSorted",(function(e){void 0!==e&&o(e);var t=s(this),n=a(c(t),t);return l(n,e)}))},function(e,t,n){"use strict";var r=n(596),i=n(736),o=n(745),a=n(535),s=n(746),c=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,d=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),p=d&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();l("with",{with:function(e,t){var n=c(this),i=a(e),l=o(n)?s(t):+t;return r(n,u(n),i,l)}}.with,!d||p)},function(e,t,n){"use strict";n(559)},function(e,t,n){"use strict";n(576)},function(e,t,n){"use strict";n(673)},function(e,t,n){"use strict";n(577)},function(e,t,n){"use strict";n(579)},function(e,t,n){"use strict";n(581)},function(e,t,n){"use strict";n(587)},function(e,t,n){"use strict";n(589)},function(e,t,n){"use strict";n(592)},function(e,t,n){"use strict";n(595)},function(e,t,n){"use strict";n(603)},function(e,t,n){"use strict";n(608)},function(e,t,n){"use strict";n(616)},function(e,t,n){"use strict";n(680)},function(e,t,n){"use strict";n(681)},function(e,t,n){"use strict";n(597)},function(e,t,n){"use strict";n(598)},function(e,t,n){"use strict";n(617)},function(e,t,n){"use strict";n(558)},function(e,t,n){"use strict";n(621)},function(e,t,n){"use strict";n(624)},function(e,t,n){"use strict";n(625)},function(e,t,n){"use strict";n(634)},function(e,t,n){"use strict";n(635)},function(e,t,n){"use strict";n(637)},function(e,t,n){"use strict";n(638)},function(e,t,n){"use strict";n(640)},function(e,t,n){"use strict";n(641)},function(e,t,n){"use strict";n(642)},function(e,t,n){"use strict";n(643)},function(e,t,n){"use strict";n(644)},function(e,t,n){"use strict";n(645)},function(e,t,n){"use strict";n(646)},function(e,t,n){"use strict";n(647)},function(e,t,n){"use strict";n(649)},function(e,t,n){"use strict";n(657)},function(e,t,n){"use strict";n(656)},function(e,t,n){"use strict";n(658)},function(e,t,n){"use strict";n(670)},function(e,t,n){"use strict";n(672)},function(e,t,n){"use strict";n(684)},function(e,t,n){"use strict";n(691)},function(e,t,n){"use strict";n(701)},function(e,t,n){"use strict";n(703)},function(e,t,n){"use strict";n(705)},function(e,t,n){"use strict";n(707)},function(e,t,n){"use strict";n(709)},function(e,t,n){"use strict";n(712)},function(e,t,n){"use strict";n(715)},function(e,t,n){"use strict";n(716)},function(e,t,n){"use strict";n(731)},function(e,t,n){"use strict";n(732)},function(e,t,n){"use strict";n(470)},function(e,t,n){"use strict";n(517)},function(e,t,n){"use strict";n(759)},function(e,t,n){"use strict";n(761)},function(e,t,n){"use strict";n(762)},function(e,t,n){"use strict";n(771)},function(e,t,n){"use strict";n(772)},function(e,t,n){"use strict";n(773)},function(e,t,n){"use strict";var r=n(471),i=n(835),o=n(836),a=n(837),s=n(520),c=n(683),u=n(483)("iterator"),l=a.values,d=function(e,t){if(e){if(e[u]!==l)try{s(e,u,l)}catch(r){e[u]=l}if(c(e,t,!0),i[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(r){e[n]=a[n]}}};for(var p in i)d(r[p]&&r[p].prototype,p);d(o,"DOMTokenList")},function(e,t,n){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var r=n(496)("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},function(e,t,n){"use strict";var r=n(514),i=n(578),o=n(571),a=n(525),s=n(493).f,c=n(838),u=n(630),l=n(486),d=n(494),p="Array Iterator",f=a.set,h=a.getterFor(p);e.exports=c(Array,"Array",(function(e,t){f(this,{type:p,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var m=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&d&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(g){}},function(e,t,n){"use strict";var r=n(519),i=n(503),o=n(486),a=n(523),s=n(498),c=n(717),u=n(561),l=n(544),d=n(683),p=n(520),f=n(521),h=n(483),m=n(571),g=n(623),v=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,S=h("iterator"),C="keys",_="values",O="entries",E=function(){return this};e.exports=function(e,t,n,a,h,g,I){c(n,t,a);var A,T,P,R=function(e){if(e===h&&x)return x;if(!w&&e&&e in M)return M[e];switch(e){case C:case _:case O:return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",D=!1,M=e.prototype,N=M[S]||M["@@iterator"]||h&&M[h],x=!w&&N||R(h),L="Array"===t&&M.entries||N;if(L&&(A=u(L.call(new e)))!==Object.prototype&&A.next&&(o||u(A)===b||(l?l(A,b):s(A[S])||f(A,S,E)),d(A,k,!0,!0),o&&(m[k]=E)),v&&h===_&&N&&N.name!==_&&(!o&&y?p(M,"name",_):(D=!0,x=function(){return i(N,this)})),h)if(T={values:R(_),keys:g?x:R(C),entries:R(O)},I)for(P in T)(w||D||!(P in M))&&f(M,P,T[P]);else r({target:t,proto:!0,forced:w||D},T);return o&&!I||M[S]===x||f(M,S,x,{name:h}),m[t]=x,T}},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(505),a=n(513),s=n(493).f,c=n(475),u=n(618),l=n(549),d=n(550),p=n(840),f=n(556),h=n(494),m=n(486),g="DOMException",v=o("Error"),y=o(g),b=function(){u(this,w);var e=arguments.length,t=d(e<1?void 0:arguments[0]),n=d(e<2?void 0:arguments[1],"Error"),r=new y(t,n),i=new v(t);return i.name=g,s(r,"stack",a(1,f(i.stack,1))),l(r,this,b),r},w=b.prototype=y.prototype,S="stack"in new v(g),C="stack"in new y(1,2),_=y&&h&&Object.getOwnPropertyDescriptor(i,g),O=!!_&&!(_.writable&&_.configurable),E=S&&!O&&!C;r({global:!0,constructor:!0,forced:m||E},{DOMException:E?b:y});var I=o(g),A=I.prototype;if(A.constructor!==I)for(var T in m||s(A,"constructor",a(1,I)),p)if(c(p,T)){var P=p[T],R=P.s;c(I,R)||s(I,R,a(6,P.c))}},function(e,t,n){"use strict";e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(e,t,n){"use strict";n(842),n(846)},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(843).clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==o},{clearImmediate:o})},function(e,t,n){"use strict";var r,i,o,a,s=n(471),c=n(542),u=n(568),l=n(498),d=n(475),p=n(478),f=n(566),h=n(671),m=n(496),g=n(844),v=n(845),y=n(613),b=s.setImmediate,w=s.clearImmediate,S=s.process,C=s.Dispatch,_=s.Function,O=s.MessageChannel,E=s.String,I=0,A={},T="onreadystatechange";p((function(){r=s.location}));var P=function(e){if(d(A,e)){var t=A[e];delete A[e],t()}},R=function(e){return function(){P(e)}},k=function(e){P(e.data)},D=function(e){s.postMessage(E(e),r.protocol+"//"+r.host)};b&&w||(b=function(e){g(arguments.length,1);var t=l(e)?e:_(e),n=h(arguments,1);return A[++I]=function(){c(t,void 0,n)},i(I),I},w=function(e){delete A[e]},y?i=function(e){S.nextTick(R(e))}:C&&C.now?i=function(e){C.now(R(e))}:O&&!v?(a=(o=new O).port2,o.port1.onmessage=k,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!p(D)?(i=D,s.addEventListener("message",k,!1)):i=T in m("script")?function(e){f.appendChild(m("script"))[T]=function(){f.removeChild(this),P(e)}}:function(e){setTimeout(R(e),0)}),e.exports={set:b,clear:w}},function(e,t,n){"use strict";var r=TypeError;e.exports=function(e,t){if(e<t)throw new r("Not enough arguments");return e}},function(e,t,n){"use strict";var r=n(491);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(e,t,n){"use strict";var r=n(519),i=n(471),o=n(843).set,a=n(847),s=i.setImmediate?a(o,!1):o;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==s},{setImmediate:s})},function(e,t,n){"use strict";var r=n(471),i=n(542),o=n(498),a=n(614),s=n(491),c=n(671),u=n(844),l=r.Function,d=/MSIE .\./.test(s)||"BUN"===a&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return d?function(r,a){var s=u(arguments.length,1)>n,d=o(r)?r:l(r),p=s?c(arguments,n):[],f=s?function(){i(d,this,p)}:d;return t?e(f,a):e(f)}:e}},function(e,t,n){"use strict";var r,i=n(486),o=n(519),a=n(471),s=n(505),c=n(476),u=n(478),l=n(488),d=n(498),p=n(668),f=n(481),h=n(497),m=n(504),g=n(567),v=n(500),y=n(552),b=n(475),w=n(622),S=n(520),C=n(537),_=n(844),O=n(719),E=n(648),I=n(694),A=n(696),T=n(611),P=n(557),R=n(615),k=a.Object,D=a.Array,M=a.Date,N=a.Error,x=a.TypeError,L=a.PerformanceMark,j=s("DOMException"),U=E.Map,F=E.has,z=E.get,B=E.set,K=I.Set,H=I.add,W=I.has,q=s("Object","keys"),V=c([].push),$=c((!0).valueOf),G=c(1.1.valueOf),Z=c("".valueOf),Q=c(M.prototype.getTime),Y=l("structuredClone"),J="DataCloneError",X="Transferring",ee=function(e){return!u((function(){var t=new a.Set([7]),n=e(t),r=e(k(7));return n===t||!n.has(7)||!h(r)||7!==+r}))&&e},te=function(e,t){return!u((function(){var n=new t,r=e({a:n,b:n});return!(r&&r.a===r.b&&r.a instanceof t&&r.a.stack===n.stack)}))},ne=a.structuredClone,re=i||!te(ne,N)||!te(ne,j)||(r=ne,!!u((function(){var e=r(new a.AggregateError([1],Y,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==Y||3!==e.cause}))),ie=!ne&&ee((function(e){return new L(Y,{detail:e}).detail})),oe=ee(ne)||ie,ae=function(e){throw new j("Uncloneable type: "+e,J)},se=function(e,t){throw new j((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",J)},ce=function(e,t){return oe||se(t),oe(e)},ue=function(e,t,n){if(F(t,e))return z(t,e);var r,i,o,s,c,u;if("SharedArrayBuffer"===(n||y(e)))r=oe?oe(e):e;else{var l=a.DataView;l||d(e.slice)||se("ArrayBuffer");try{if(d(e.slice)&&!e.resizable)r=e.slice(0);else{i=e.byteLength,o="maxByteLength"in e?{maxByteLength:e.maxByteLength}:void 0,r=new ArrayBuffer(i,o),s=new l(e),c=new l(r);for(u=0;u<i;u++)c.setUint8(u,s.getUint8(u))}}catch(p){throw new j("ArrayBuffer is detached",J)}}return B(t,e,r),r},le=function(e,t){if(m(e)&&ae("Symbol"),!h(e))return e;if(t){if(F(t,e))return z(t,e)}else t=new U;var n,r,i,o,c,u,l,p,f=y(e);switch(f){case"Array":i=D(C(e));break;case"Object":i={};break;case"Map":i=new U;break;case"Set":i=new K;break;case"RegExp":i=new RegExp(e.source,O(e));break;case"Error":switch(r=e.name){case"AggregateError":i=new(s(r))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":i=new(s(r));break;case"CompileError":case"LinkError":case"RuntimeError":i=new(s("WebAssembly",r));break;default:i=new N}break;case"DOMException":i=new j(e.message,e.name);break;case"ArrayBuffer":case"SharedArrayBuffer":i=ue(e,t,f);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":u="DataView"===f?e.byteLength:e.length,i=function(e,t,n,r,i){var o=a[t];return h(o)||se(t),new o(ue(e.buffer,i),n,r)}(e,f,e.byteOffset,u,t);break;case"DOMQuad":try{i=new DOMQuad(le(e.p1,t),le(e.p2,t),le(e.p3,t),le(e.p4,t))}catch(g){i=ce(e,f)}break;case"File":if(oe)try{i=oe(e),y(i)!==f&&(i=void 0)}catch(g){}if(!i)try{i=new File([e],e.name,e)}catch(g){}i||se(f);break;case"FileList":if(o=function(){var e;try{e=new a.DataTransfer}catch(g){try{e=new a.ClipboardEvent("").clipboardData}catch(t){}}return e&&e.items&&e.files?e:null}()){for(c=0,u=C(e);c<u;c++)o.items.add(le(e[c],t));i=o.files}else i=ce(e,f);break;case"ImageData":try{i=new ImageData(le(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(g){i=ce(e,f)}break;default:if(oe)i=oe(e);else switch(f){case"BigInt":i=k(e.valueOf());break;case"Boolean":i=k($(e));break;case"Number":i=k(G(e));break;case"String":i=k(Z(e));break;case"Date":i=new M(Q(e));break;case"Blob":try{i=e.slice(0,e.size,e.type)}catch(g){se(f)}break;case"DOMPoint":case"DOMPointReadOnly":n=a[f];try{i=n.fromPoint?n.fromPoint(e):new n(e.x,e.y,e.z,e.w)}catch(g){se(f)}break;case"DOMRect":case"DOMRectReadOnly":n=a[f];try{i=n.fromRect?n.fromRect(e):new n(e.x,e.y,e.width,e.height)}catch(g){se(f)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=a[f];try{i=n.fromMatrix?n.fromMatrix(e):new n(e)}catch(g){se(f)}break;case"AudioData":case"VideoFrame":d(e.clone)||se(f);try{i=e.clone()}catch(g){ae(f)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":se(f);default:ae(f)}}switch(B(t,e,i),f){case"Array":case"Object":for(l=q(e),c=0,u=C(l);c<u;c++)p=l[c],w(i,p,le(e[p],t));break;case"Map":e.forEach((function(e,n){B(i,le(n,t),le(e,t))}));break;case"Set":e.forEach((function(e){H(i,le(e,t))}));break;case"Error":S(i,"message",le(e.message,t)),b(e,"cause")&&S(i,"cause",le(e.cause,t)),"AggregateError"===r?i.errors=le(e.errors,t):"SuppressedError"===r&&(i.error=le(e.error,t),i.suppressed=le(e.suppressed,t));case"DOMException":P&&S(i,"stack",le(e.stack,t))}return i};o({global:!0,enumerable:!0,sham:!R,forced:re},{structuredClone:function(e){var t,n,r=_(arguments.length,1)>1&&!f(arguments[1])?v(arguments[1]):void 0,i=r?r.transfer:void 0;void 0!==i&&(n=function(e,t){if(!h(e))throw new x("Transfer option cannot be converted to a sequence");var n=[];g(e,(function(e){V(n,v(e))}));for(var r,i,o,s,c,u=0,l=C(n),f=new K;u<l;){if(r=n[u++],"ArrayBuffer"===(i=y(r))?W(f,r):F(t,r))throw new j("Duplicate transferable",J);if("ArrayBuffer"!==i){if(R)s=ne(r,{transfer:[r]});else switch(i){case"ImageBitmap":o=a.OffscreenCanvas,p(o)||se(i,X);try{(c=new o(r.width,r.height)).getContext("bitmaprenderer").transferFromImageBitmap(r),s=c.transferToImageBitmap()}catch(m){}break;case"AudioData":case"VideoFrame":d(r.clone)&&d(r.close)||se(i,X);try{s=r.clone(),r.close()}catch(m){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":se(i,X)}if(void 0===s)throw new j("This object cannot be transferred: "+i,J);B(t,r,s)}else H(f,r)}return f}(i,t=new U));var o=le(e,t);return n&&function(e){A(e,(function(e){R?oe(e,{transfer:[e]}):d(e.transfer)?e.transfer():T?T(e):se("ArrayBuffer",X)}))}(n),o}})},function(e,t,n){"use strict";n(850)},function(e,t,n){"use strict";n(851);var r,i=n(519),o=n(494),a=n(852),s=n(471),c=n(568),u=n(476),l=n(521),d=n(604),p=n(618),f=n(475),h=n(853),m=n(854),g=n(671),v=n(721).codeAt,y=n(855),b=n(551),w=n(683),S=n(844),C=n(856),_=n(525),O=_.set,E=_.getterFor("URL"),I=C.URLSearchParams,A=C.getState,T=s.URL,P=s.TypeError,R=s.parseInt,k=Math.floor,D=Math.pow,M=u("".charAt),N=u(/./.exec),x=u([].join),L=u(1.1.toString),j=u([].pop),U=u([].push),F=u("".replace),z=u([].shift),B=u("".split),K=u("".slice),H=u("".toLowerCase),W=u([].unshift),q="Invalid scheme",V="Invalid host",$="Invalid port",G=/[a-z]/i,Z=/[\d+-.a-z]/i,Q=/\d/,Y=/^0x/i,J=/^[0-7]+$/,X=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,re=/^[\u0000-\u0020]+/,ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oe=/[\t\n\r]/g,ae=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)W(t,e%256),e=k(e/256);return x(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=L(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},se={},ce=h({},se,{" ":1,'"':1,"<":1,">":1,"`":1}),ue=h({},ce,{"#":1,"?":1,"{":1,"}":1}),le=h({},ue,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),de=function(e,t){var n=v(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},pe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},fe=function(e,t){var n;return 2===e.length&&N(G,M(e,0))&&(":"===(n=M(e,1))||!t&&"|"===n)},he=function(e){var t;return e.length>1&&fe(K(e,0,2))&&(2===e.length||"/"===(t=M(e,2))||"\\"===t||"?"===t||"#"===t)},me=function(e){return"."===e||"%2e"===H(e)},ge={},ve={},ye={},be={},we={},Se={},Ce={},_e={},Oe={},Ee={},Ie={},Ae={},Te={},Pe={},Re={},ke={},De={},Me={},Ne={},xe={},Le={},je=function(e,t,n){var r,i,o,a=b(e);if(t){if(i=this.parse(a))throw new P(i);this.searchParams=null}else{if(void 0!==n&&(r=new je(n,!0)),i=this.parse(a,null,r))throw new P(i);(o=A(new I)).bindURL(this),this.searchParams=o}};je.prototype={type:"URL",parse:function(e,t,n){var i,o,a,s,c,u=this,l=t||ge,d=0,p="",h=!1,v=!1,y=!1;for(e=b(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=F(e,re,""),e=F(e,ie,"$1")),e=F(e,oe,""),i=m(e);d<=i.length;){switch(o=i[d],l){case ge:if(!o||!N(G,o)){if(t)return q;l=ye;continue}p+=H(o),l=ve;break;case ve:if(o&&(N(Z,o)||"+"===o||"-"===o||"."===o))p+=H(o);else{if(":"!==o){if(t)return q;p="",l=ye,d=0;continue}if(t&&(u.isSpecial()!==f(pe,p)||"file"===p&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=p,t)return void(u.isSpecial()&&pe[u.scheme]===u.port&&(u.port=null));p="","file"===u.scheme?l=Pe:u.isSpecial()&&n&&n.scheme===u.scheme?l=be:u.isSpecial()?l=_e:"/"===i[d+1]?(l=we,d++):(u.cannotBeABaseURL=!0,U(u.path,""),l=Ne)}break;case ye:if(!n||n.cannotBeABaseURL&&"#"!==o)return q;if(n.cannotBeABaseURL&&"#"===o){u.scheme=n.scheme,u.path=g(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Le;break}l="file"===n.scheme?Pe:Se;continue;case be:if("/"!==o||"/"!==i[d+1]){l=Se;continue}l=Oe,d++;break;case we:if("/"===o){l=Ee;break}l=Me;continue;case Se:if(u.scheme=n.scheme,o===r)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query;else if("/"===o||"\\"===o&&u.isSpecial())l=Ce;else if("?"===o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query="",l=xe;else{if("#"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.path.length--,l=Me;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query,u.fragment="",l=Le}break;case Ce:if(!u.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Me;continue}l=Ee}else l=Oe;break;case _e:if(l=Oe,"/"!==o||"/"!==M(p,d+1))continue;d++;break;case Oe:if("/"!==o&&"\\"!==o){l=Ee;continue}break;case Ee:if("@"===o){h&&(p="%40"+p),h=!0,a=m(p);for(var w=0;w<a.length;w++){var S=a[w];if(":"!==S||y){var C=de(S,le);y?u.password+=C:u.username+=C}else y=!0}p=""}else if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()){if(h&&""===p)return"Invalid authority";d-=m(p).length+1,p="",l=Ie}else p+=o;break;case Ie:case Ae:if(t&&"file"===u.scheme){l=ke;continue}if(":"!==o||v){if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()){if(u.isSpecial()&&""===p)return V;if(t&&""===p&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(p))return s;if(p="",l=De,t)return;continue}"["===o?v=!0:"]"===o&&(v=!1),p+=o}else{if(""===p)return V;if(s=u.parseHost(p))return s;if(p="",l=Te,t===Ae)return}break;case Te:if(!N(Q,o)){if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()||t){if(""!==p){var _=R(p,10);if(_>65535)return $;u.port=u.isSpecial()&&_===pe[u.scheme]?null:_,p=""}if(t)return;l=De;continue}return $}p+=o;break;case Pe:if(u.scheme="file","/"===o||"\\"===o)l=Re;else{if(!n||"file"!==n.scheme){l=Me;continue}switch(o){case r:u.host=n.host,u.path=g(n.path),u.query=n.query;break;case"?":u.host=n.host,u.path=g(n.path),u.query="",l=xe;break;case"#":u.host=n.host,u.path=g(n.path),u.query=n.query,u.fragment="",l=Le;break;default:he(x(g(i,d),""))||(u.host=n.host,u.path=g(n.path),u.shortenPath()),l=Me;continue}}break;case Re:if("/"===o||"\\"===o){l=ke;break}n&&"file"===n.scheme&&!he(x(g(i,d),""))&&(fe(n.path[0],!0)?U(u.path,n.path[0]):u.host=n.host),l=Me;continue;case ke:if(o===r||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&fe(p))l=Me;else if(""===p){if(u.host="",t)return;l=De}else{if(s=u.parseHost(p))return s;if("localhost"===u.host&&(u.host=""),t)return;p="",l=De}continue}p+=o;break;case De:if(u.isSpecial()){if(l=Me,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==r&&(l=Me,"/"!==o))continue}else u.fragment="",l=Le;else u.query="",l=xe;break;case Me:if(o===r||"/"===o||"\\"===o&&u.isSpecial()||!t&&("?"===o||"#"===o)){if(".."===(c=H(c=p))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"===o||"\\"===o&&u.isSpecial()||U(u.path,"")):me(p)?"/"===o||"\\"===o&&u.isSpecial()||U(u.path,""):("file"===u.scheme&&!u.path.length&&fe(p)&&(u.host&&(u.host=""),p=M(p,0)+":"),U(u.path,p)),p="","file"===u.scheme&&(o===r||"?"===o||"#"===o))for(;u.path.length>1&&""===u.path[0];)z(u.path);"?"===o?(u.query="",l=xe):"#"===o&&(u.fragment="",l=Le)}else p+=de(o,ue);break;case Ne:"?"===o?(u.query="",l=xe):"#"===o?(u.fragment="",l=Le):o!==r&&(u.path[0]+=de(o,se));break;case xe:t||"#"!==o?o!==r&&("'"===o&&u.isSpecial()?u.query+="%27":u.query+="#"===o?"%23":de(o,se)):(u.fragment="",l=Le);break;case Le:o!==r&&(u.fragment+=de(o,ce))}d++}},parseHost:function(e){var t,n,r;if("["===M(e,0)){if("]"!==M(e,e.length-1))return V;if(t=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,p=function(){return M(e,d)};if(":"===p()){if(":"!==M(e,1))return;d+=2,l=++u}for(;p();){if(8===u)return;if(":"!==p()){for(t=n=0;n<4&&N(ee,p());)t=16*t+R(p(),16),d++,n++;if("."===p()){if(0===n)return;if(d-=n,u>6)return;for(r=0;p();){if(i=null,r>0){if(!("."===p()&&r<4))return;d++}if(!N(Q,p()))return;for(;N(Q,p());){if(o=R(p(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;d++}c[u]=256*c[u]+i,2!==++r&&4!==r||u++}if(4!==r)return;break}if(":"===p()){if(d++,!p())return}else if(p())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(a=u-l,u=7;0!==u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!==u)return;return c}(K(e,1,-1)),!t)return V;this.host=t}else if(this.isSpecial()){if(e=y(e),N(te,e))return V;if(t=function(e){var t,n,r,i,o,a,s,c=B(e,".");if(c.length&&""===c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(i=c[r]))return e;if(o=10,i.length>1&&"0"===M(i,0)&&(o=N(Y,i)?16:8,i=K(i,8===o?1:2)),""===i)a=0;else{if(!N(10===o?X:8===o?J:ee,i))return e;a=R(i,o)}U(n,a)}for(r=0;r<t;r++)if(a=n[r],r===t-1){if(a>=D(256,5-t))return null}else if(a>255)return null;for(s=j(n),r=0;r<n.length;r++)s+=n[r]*D(256,3-r);return s}(e),null===t)return V;this.host=t}else{if(N(ne,e))return V;for(t="",n=m(e),r=0;r<n.length;r++)t+=de(n[r],se);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return f(pe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&fe(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=ae(i),null!==o&&(u+=":"+o)):"file"===t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+x(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw new P(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Ue(e.path[0]).origin}catch(n){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+ae(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",ge)},getUsername:function(){return this.username},setUsername:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=de(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=de(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ae(e):ae(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ie)},getHostname:function(){var e=this.host;return null===e?"":ae(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ae)},getPort:function(){var e=this.port;return null===e?"":b(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=b(e))?this.port=null:this.parse(e,Te))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+x(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,De))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=b(e))?this.query=null:("?"===M(e,0)&&(e=K(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=b(e))?("#"===M(e,0)&&(e=K(e,1)),this.fragment="",this.parse(e,Le)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ue=function(e){var t=p(this,Fe),n=S(arguments.length,1)>1?arguments[1]:void 0,r=O(t,new je(e,!1,n));o||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Fe=Ue.prototype,ze=function(e,t){return{get:function(){return E(this)[e]()},set:t&&function(e){return E(this)[t](e)},configurable:!0,enumerable:!0}};if(o&&(d(Fe,"href",ze("serialize","setHref")),d(Fe,"origin",ze("getOrigin")),d(Fe,"protocol",ze("getProtocol","setProtocol")),d(Fe,"username",ze("getUsername","setUsername")),d(Fe,"password",ze("getPassword","setPassword")),d(Fe,"host",ze("getHost","setHost")),d(Fe,"hostname",ze("getHostname","setHostname")),d(Fe,"port",ze("getPort","setPort")),d(Fe,"pathname",ze("getPathname","setPathname")),d(Fe,"search",ze("getSearch","setSearch")),d(Fe,"searchParams",ze("getSearchParams")),d(Fe,"hash",ze("getHash","setHash"))),l(Fe,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),l(Fe,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),T){var Be=T.createObjectURL,Ke=T.revokeObjectURL;Be&&l(Ue,"createObjectURL",c(Be,T)),Ke&&l(Ue,"revokeObjectURL",c(Ke,T))}w(Ue,"URL"),i({global:!0,constructor:!0,forced:!a,sham:!o},{URL:Ue})},function(e,t,n){"use strict";var r=n(721).charAt,i=n(551),o=n(525),a=n(838),s=n(630),c="String Iterator",u=o.set,l=o.getterFor(c);a(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},function(e,t,n){"use strict";var r=n(478),i=n(483),o=n(494),a=n(486),s=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),a&&(!e.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!t.size&&(a||!o)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("https://a#\u0431").hash||"a1c3"!==r||"x"!==new URL("https://x",void 0).host}))},function(e,t,n){"use strict";var r=n(494),i=n(476),o=n(503),a=n(478),s=n(565),c=n(540),u=n(512),l=n(479),d=n(515),p=Object.assign,f=Object.defineProperty,h=i([].concat);e.exports=!p||a((function(){if(r&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!==p({},e)[n]||s(p({},t)).join("")!==i}))?function(e,t){for(var n=l(e),i=arguments.length,a=1,p=c.f,f=u.f;i>a;)for(var m,g=d(arguments[a++]),v=p?h(s(g),p(g)):s(g),y=v.length,b=0;y>b;)m=v[b++],r&&!o(f,g,m)||(n[m]=g[m]);return n}:p},function(e,t,n){"use strict";var r=n(568),i=n(503),o=n(479),a=n(636),s=n(570),c=n(668),u=n(537),l=n(622),d=n(572),p=n(573),f=Array;e.exports=function(e){var t=o(e),n=c(this),h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m;g&&(m=r(m,h>2?arguments[2]:void 0));var v,y,b,w,S,C,_=p(t),O=0;if(!_||this===f&&s(_))for(v=u(t),y=n?new this(v):f(v);v>O;O++)C=g?m(t[O],O):t[O],l(y,O,C);else for(y=n?new this:[],S=(w=d(t,_)).next;!(b=i(S,w)).done;O++)C=g?a(w,m,[b.value,O],!0):b.value,l(y,O,C);return y.length=O,y}},function(e,t,n){"use strict";var r=n(476),i=2147483647,o=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=r(a.exec),l=Math.floor,d=String.fromCharCode,p=r("".charCodeAt),f=r([].join),h=r([].push),m=r("".replace),g=r("".split),v=r("".toLowerCase),y=function(e){return e+22+75*(e<26)},b=function(e,t,n){var r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),r+=36;return l(r+36*e/(e+38))},w=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=p(e,n++);if(i>=55296&&i<=56319&&n<r){var o=p(e,n++);56320===(64512&o)?h(t,((1023&i)<<10)+(1023&o)+65536):(h(t,i),n--)}else h(t,i)}return t}(e);var n,r,o=e.length,a=128,u=0,m=72;for(n=0;n<e.length;n++)(r=e[n])<128&&h(t,d(r));var g=t.length,v=g;for(g&&h(t,"-");v<o;){var w=i;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<w&&(w=r);var S=v+1;if(w-a>l((i-u)/S))throw new c(s);for(u+=(w-a)*S,a=w,n=0;n<e.length;n++){if((r=e[n])<a&&++u>i)throw new c(s);if(r===a){for(var C=u,_=36;;){var O=_<=m?1:_>=m+26?26:_-m;if(C<O)break;var E=C-O,I=36-O;h(t,d(y(O+E%I))),C=l(E/I),_+=36}h(t,d(y(C))),m=b(u,S,v===g),u=0,v++}}u++,a++}return f(t,"")};e.exports=function(e){var t,n,r=[],i=g(m(v(e),a,"."),".");for(t=0;t<i.length;t++)n=i[t],h(r,u(o,n)?"xn--"+w(n):n);return f(r,".")}},function(e,t,n){"use strict";n(837),n(857);var r=n(519),i=n(471),o=n(858),a=n(505),s=n(503),c=n(476),u=n(494),l=n(852),d=n(521),p=n(604),f=n(619),h=n(683),m=n(717),g=n(525),v=n(618),y=n(498),b=n(475),w=n(568),S=n(552),C=n(500),_=n(497),O=n(551),E=n(563),I=n(513),A=n(572),T=n(573),P=n(630),R=n(844),k=n(483),D=n(767),M=k("iterator"),N="URLSearchParams",x=N+"Iterator",L=g.set,j=g.getterFor(N),U=g.getterFor(x),F=o("fetch"),z=o("Request"),B=o("Headers"),K=z&&z.prototype,H=B&&B.prototype,W=i.TypeError,q=i.encodeURIComponent,V=String.fromCharCode,$=a("String","fromCodePoint"),G=parseInt,Z=c("".charAt),Q=c([].join),Y=c([].push),J=c("".replace),X=c([].shift),ee=c([].splice),te=c("".split),ne=c("".slice),re=c(/./.exec),ie=/\+/g,oe=/^[0-9a-f]+$/i,ae=function(e,t){var n=ne(e,t,t+2);return re(oe,n)?G(n,16):NaN},se=function(e){for(var t=0,n=128;n>0&&0!==(e&n);n>>=1)t++;return t},ce=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ue=function(e){for(var t=(e=J(e,ie," ")).length,n="",r=0;r<t;){var i=Z(e,r);if("%"===i){if("%"===Z(e,r+1)||r+3>t){n+="%",r++;continue}var o=ae(e,r+1);if(o!==o){n+=i,r++;continue}r+=2;var a=se(o);if(0===a)i=V(o);else{if(1===a||a>4){n+="\ufffd",r++;continue}for(var s=[o],c=1;c<a&&!(3+ ++r>t||"%"!==Z(e,r));){var u=ae(e,r+1);if(u!==u){r+=3;break}if(u>191||u<128)break;Y(s,u),r+=2,c++}if(s.length!==a){n+="\ufffd";continue}var l=ce(s);null===l?n+="\ufffd":i=$(l)}}n+=i,r++}return n},le=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},pe=function(e){return de[e]},fe=function(e){return J(q(e),le,pe)},he=m((function(e,t){L(this,{type:x,target:j(e).entries,index:0,kind:t})}),N,(function(){var e=U(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,P(void 0,!0);var r=t[n];switch(e.kind){case"keys":return P(r.key,!1);case"values":return P(r.value,!1)}return P([r.key,r.value],!1)}),!0),me=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Z(e,0)?ne(e,1):e:O(e)))};me.prototype={type:N,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,c,u=this.entries,l=T(e);if(l)for(n=(t=A(e,l)).next;!(r=s(n,t)).done;){if(o=(i=A(C(r.value))).next,(a=s(o,i)).done||(c=s(o,i)).done||!s(o,i).done)throw new W("Expected sequence with length 2");Y(u,{key:O(a.value),value:O(c.value)})}else for(var d in e)b(e,d)&&Y(u,{key:d,value:O(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=te(e,"&"),o=0;o<i.length;)(t=i[o++]).length&&(n=te(t,"="),Y(r,{key:ue(X(n)),value:ue(Q(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Y(n,fe(e.key)+"="+fe(e.value));return Q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ge=function(){v(this,ve);var e=L(this,new me(arguments.length>0?arguments[0]:void 0));u||(this.size=e.entries.length)},ve=ge.prototype;if(f(ve,{append:function(e,t){var n=j(this);R(arguments.length,2),Y(n.entries,{key:O(e),value:O(t)}),u||this.size++,n.updateURL()},delete:function(e){for(var t=j(this),n=R(arguments.length,1),r=t.entries,i=O(e),o=n<2?void 0:arguments[1],a=void 0===o?o:O(o),s=0;s<r.length;){var c=r[s];if(c.key!==i||void 0!==a&&c.value!==a)s++;else if(ee(r,s,1),void 0!==a)break}u||(this.size=r.length),t.updateURL()},get:function(e){var t=j(this).entries;R(arguments.length,1);for(var n=O(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=j(this).entries;R(arguments.length,1);for(var n=O(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Y(r,t[i].value);return r},has:function(e){for(var t=j(this).entries,n=R(arguments.length,1),r=O(e),i=n<2?void 0:arguments[1],o=void 0===i?i:O(i),a=0;a<t.length;){var s=t[a++];if(s.key===r&&(void 0===o||s.value===o))return!0}return!1},set:function(e,t){var n=j(this);R(arguments.length,1);for(var r,i=n.entries,o=!1,a=O(e),s=O(t),c=0;c<i.length;c++)(r=i[c]).key===a&&(o?ee(i,c--,1):(o=!0,r.value=s));o||Y(i,{key:a,value:s}),u||(this.size=i.length),n.updateURL()},sort:function(){var e=j(this);D(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=j(this).entries,r=w(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new he(this,"keys")},values:function(){return new he(this,"values")},entries:function(){return new he(this,"entries")}},{enumerable:!0}),d(ve,M,ve.entries,{name:"entries"}),d(ve,"toString",(function(){return j(this).serialize()}),{enumerable:!0}),u&&p(ve,"size",{get:function(){return j(this).entries.length},configurable:!0,enumerable:!0}),h(ge,N),r({global:!0,constructor:!0,forced:!l},{URLSearchParams:ge}),!l&&y(B)){var ye=c(H.has),be=c(H.set),we=function(e){if(_(e)){var t,n=e.body;if(S(n)===N)return t=e.headers?new B(e.headers):new B,ye(t,"content-type")||be(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),E(e,{body:I(0,O(n)),headers:I(0,t)})}return e};if(y(F)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return F(e,arguments.length>1?we(arguments[1]):{})}}),y(z)){var Se=function(e){return v(this,K),new z(e,arguments.length>1?we(arguments[1]):{})};K.constructor=Se,Se.prototype=K,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Se})}}e.exports={URLSearchParams:ge,getState:j}},function(e,t,n){"use strict";var r=n(519),i=n(476),o=n(534),a=RangeError,s=String.fromCharCode,c=String.fromCodePoint,u=i([].join);r({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;r>i;){if(t=+arguments[i++],o(t,1114111)!==t)throw new a(t+" is not a valid code point");n[i]=t<65536?s(t):s(55296+((t-=65536)>>10),t%1024+56320)}return u(n,"")}})},function(e,t,n){"use strict";var r=n(471),i=n(494),o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!i)return r[e];var t=o(r,e);return t&&t.value}},function(e,t,n){"use strict";var r=n(519),i=n(505),o=n(478),a=n(844),s=n(551),c=n(852),u=i("URL"),l=c&&o((function(){u.canParse()})),d=o((function(){return 1!==u.canParse.length}));r({target:"URL",stat:!0,forced:!l||d},{canParse:function(e){var t=a(arguments.length,1),n=s(e),r=t<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new u(n,r)}catch(i){return!1}}})},function(e,t,n){"use strict";var r=n(519),i=n(505),o=n(844),a=n(551),s=n(852),c=i("URL");r({target:"URL",stat:!0,forced:!s},{parse:function(e){var t=o(arguments.length,1),n=a(e),r=t<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return new c(n,r)}catch(i){return null}}})},function(e,t,n){"use strict";var r=n(519),i=n(503);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},function(e,t,n){"use strict";n(856)},function(e,t,n){"use strict";var r=n(521),i=n(476),o=n(551),a=n(844),s=URLSearchParams,c=s.prototype,u=i(c.append),l=i(c.delete),d=i(c.forEach),p=i([].push),f=new s("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!=="a=2"&&r(c,"delete",(function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return l(this,e);var r=[];d(this,(function(e,t){p(r,{key:t,value:e})})),a(t,1);for(var i,s=o(e),c=o(n),f=0,h=0,m=!1,g=r.length;f<g;)i=r[f++],m||i.key===s?(m=!0,l(this,i.key)):h++;for(;h<g;)(i=r[h++]).key===s&&i.value===c||u(this,i.key,i.value)}),{enumerable:!0,unsafe:!0})},function(e,t,n){"use strict";var r=n(521),i=n(476),o=n(551),a=n(844),s=URLSearchParams,c=s.prototype,u=i(c.getAll),l=i(c.has),d=new s("a=1");!d.has("a",2)&&d.has("a",void 0)||r(c,"has",(function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return l(this,e);var r=u(this,e);a(t,1);for(var i=o(n),s=0;s<r.length;)if(r[s++]===i)return!0;return!1}),{enumerable:!0,unsafe:!0})},function(e,t,n){"use strict";var r=n(494),i=n(476),o=n(604),a=URLSearchParams.prototype,s=i(a.forEach);r&&!("size"in a)&&o(a,"size",{get:function(){var e=0;return s(this,(function(){e++})),e},configurable:!0,enumerable:!0})},function(e,t,n){"use strict";if(globalThis.performance||(globalThis.performance={}),!globalThis.performance.now){var r,i=globalThis.performance.timing;r=i&&i.navigationStart?i.navigationStart:Date.now(),globalThis.performance.now=function(){return Date.now()-r}}},function(e,t,n){"use strict";var r=crypto;!r.subtle&&r.webkitSubtle&&(r.subtle=r.webkitSubtle),r.randomUUID||(r.randomUUID=function(){var e=crypto.getRandomValues(new Uint8Array(16));e[6]=15&e[6]|64,e[8]=63&e[8]|128;var t,n="";for(t=0;t<16;++t)n+=e[t].toString(16).padStart(2,"0"),3!==t&&5!==t&&7!==t&&9!==t||(n+="-");return n})},function(e,t,n){const r=globalThis.MediaQueryList?MediaQueryList.prototype:Object.getPrototypeOf(matchMedia(""));r.addEventListener||(r.addEventListener=function(e,t,n){"change"===e&&this.addListener(t)}),r.removeEventListener||(r.removeEventListener=function(e,t,n){"change"===e&&this.removeListener(t)})},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(871)},function(e,t,n){"use strict";var r=n(872),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,c=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(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 y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function S(){}function C(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=w.prototype;var _=C.prototype=new S;_.constructor=C,r(_,w.prototype),_.isPureReactComponent=!0;var O={current:null},E=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!I.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===i[r]&&(i[r]=c[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:O.current}}function T(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var P=/\/+/g,R=[];function k(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function M(e,t,n,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case o:case a:s=!0}}if(s)return n(r,e,""===t?"."+x(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=t+x(i=e[c],c);s+=M(i,u,n,r)}else if("function"===typeof(u=null===e||"object"!==typeof e?null:"function"===typeof(u=g&&e[g]||e["@@iterator"])?u:null))for(e=u.call(e),c=0;!(i=e.next()).done;)s+=M(i=i.value,u=t+x(i,c++),n,r);else if("object"===i)throw n=""+e,Error(v(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function N(e,t,n){return null==e?0:M(e,"",t,n)}function x(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 L(e,t){e.func.call(e.context,t,e.count++)}function j(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?U(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),r.push(e))}function U(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(P,"$&/")+"/"),N(e,j,t=k(t,o,r,i)),D(t)}var F={current:null};function z(){var e=F.current;if(null===e)throw Error(v(321));return e}var B={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return U(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;N(e,L,t=k(null,null,t,n)),D(t)},count:function(e){return N(e,(function(){return null}),null)},toArray:function(e){var t=[];return U(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=u,t.PureComponent=C,t.StrictMode=c,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,c=O.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)E.call(t,l)&&!I.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var d=0;d<l;d++)u[d]=arguments[d+2];i.children=u}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:c}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;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(i){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(874)},function(e,t,n){"use strict";var r=n(870),i=n(872),o=n(875);function a(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(a(227));function s(e,t,n,r,i,o,a,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(l){this.onError(l)}}var c=!1,u=null,l=!1,d=null,p={onError:function(e){c=!0,u=e}};function f(e,t,n,r,i,o,a,l,d){c=!1,u=null,s.apply(p,arguments)}var h=null,m=null,g=null;function v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,i,o,s,p,h){if(f.apply(this,arguments),c){if(!c)throw Error(a(198));var m=u;c=!1,u=null,l||(l=!0,d=m)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function w(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!C[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in C[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,c=r;if(_.hasOwnProperty(c))throw Error(a(99,c));_[c]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&S(u[i],s,c);i=!0}else o.registrationName?(S(o.registrationName,s,c),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function S(e,t,n){if(O[e])throw Error(a(100,e));O[e]=t,E[e]=t.eventTypes[n].dependencies}var C=[],_={},O={},E={};function I(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var A=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),T=null,P=null,R=null;function k(e){if(e=m(e)){if("function"!==typeof T)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),T(e.stateNode,e.type,t))}}function D(e){P?R?R.push(e):R=[e]:P=e}function M(){if(P){var e=P,t=R;if(R=P=null,k(e),t)for(e=0;e<t.length;e++)k(t[e])}}function N(e,t){return e(t)}function x(e,t,n,r,i){return e(t,n,r,i)}function L(){}var j=N,U=!1,F=!1;function z(){null===P&&null===R||(L(),M())}function B(e,t,n){if(F)return e(t,n);F=!0;try{return j(e,t,n)}finally{F=!1,z()}}var K=/^[: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]*$/,H=Object.prototype.hasOwnProperty,W={},q={};function V(e,t,n,r,i,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=o}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){$[e]=new V(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];$[t]=new V(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){$[e]=new V(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){$[e]=new V(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){$[e]=new V(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){$[e]=new V(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){$[e]=new V(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){$[e]=new V(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){$[e]=new V(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"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(G,Z);$[t]=new V(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Z);$[t]=new V(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Z);$[t]=new V(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){$[e]=new V(e,1,!1,e.toLowerCase(),null,!1)})),$.xlinkHref=new V("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){$[e]=new V(e,1,!1,e.toLowerCase(),null,!0)}));var Q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(e,t,n,r){var i=$.hasOwnProperty(t)?$[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||"undefined"===typeof 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!!H.call(q,e)||!H.call(W,e)&&(K.test(e)?q[e]=!0:(W[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))))}Q.hasOwnProperty("ReactCurrentDispatcher")||(Q.ReactCurrentDispatcher={current:null}),Q.hasOwnProperty("ReactCurrentBatchConfig")||(Q.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,X="function"===typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,ie=X?Symbol.for("react.profiler"):60114,oe=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,se=X?Symbol.for("react.concurrent_mode"):60111,ce=X?Symbol.for("react.forward_ref"):60112,ue=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,de=X?Symbol.for("react.memo"):60115,pe=X?Symbol.for("react.lazy"):60116,fe=X?Symbol.for("react.block"):60121,he="function"===typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(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 ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case ue:return"Suspense";case le:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case ce:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ge(e.type);case fe:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ve(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,o=ge(e.type);n=null,r&&(n=ge(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.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 Se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ce(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 _e(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(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 Oe(e,t){null!=(t=t.checked)&&Y(e,"checked",t,!1)}function Ee(e,t){Oe(e,t);var n=ye(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")?Ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ae(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ie(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 Ae(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Te(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 Pe(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=""+ye(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 Re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ke(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function De(e,t){var n=ye(t.value),r=ye(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 Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ne(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 xe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ne(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Le,je,Ue=(je=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Le=Le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return je(e,t)}))}:je);function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function ze(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:ze("Animation","AnimationEnd"),animationiteration:ze("Animation","AnimationIteration"),animationstart:ze("Animation","AnimationStart"),transitionend:ze("Transition","TransitionEnd")},Ke={},He={};function We(e){if(Ke[e])return Ke[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in He)return Ke[e]=n[t];return e}A&&(He=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var qe=We("animationend"),Ve=We("animationiteration"),$e=We("animationstart"),Ge=We("transitionend"),Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qe=new("function"===typeof WeakMap?WeakMap:Map);function Ye(e){var t=Qe.get(e);return void 0===t&&(t=new Map,Qe.set(e,t)),t}function Je(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 Xe(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 et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return et(i),e;if(o===r)return et(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!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 nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function ot(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)v(e,t[r],n[r]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(it=nt(it,e)),e=it,it=null,e){if(rt(e,ot),it)throw Error(a(95));if(l)throw e=d,l=!1,d=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ct(e){if(!A)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t}var ut=[];function lt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ut.length&&ut.push(e)}function dt(e,t,n,r){if(ut.length){var i=ut.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=kn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=st(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,c=0;c<C.length;c++){var u=C[c];u&&(u=u.extractEvents(r,t,o,i,a))&&(s=nt(s,u))}at(s)}}function ft(e,t,n){if(!n.has(e)){switch(e){case"scroll":$t(t,"scroll",!0);break;case"focus":case"blur":$t(t,"focus",!0),$t(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ct(e)&&$t(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ze.indexOf(e)&&Vt(e,t)}n.set(e,null)}}var ht,mt,gt,vt=!1,yt=[],bt=null,wt=null,St=null,Ct=new Map,_t=new Map,Ot=[],Et="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),It="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function At(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Tt(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":St=null;break;case"pointerover":case"pointerout":Ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_t.delete(t.pointerId)}}function Pt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=At(t,n,r,i,o),null!==t&&null!==(t=Dn(t))&&mt(t),e):(e.eventSystemFlags|=r,e)}function Rt(e){var t=kn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function kt(e){if(null!==e.blockedOn)return!1;var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Dn(t);return null!==n&&mt(n),e.blockedOn=t,!1}return!0}function Dt(e,t,n){kt(e)&&n.delete(t)}function Mt(){for(vt=!1;0<yt.length;){var e=yt[0];if(null!==e.blockedOn){null!==(e=Dn(e.blockedOn))&&ht(e);break}var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:yt.shift()}null!==bt&&kt(bt)&&(bt=null),null!==wt&&kt(wt)&&(wt=null),null!==St&&kt(St)&&(St=null),Ct.forEach(Dt),_t.forEach(Dt)}function Nt(e,t){e.blockedOn===t&&(e.blockedOn=null,vt||(vt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Mt)))}function xt(e){function t(t){return Nt(t,e)}if(0<yt.length){Nt(yt[0],e);for(var n=1;n<yt.length;n++){var r=yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Nt(bt,e),null!==wt&&Nt(wt,e),null!==St&&Nt(St,e),Ct.forEach(t),_t.forEach(t),n=0;n<Ot.length;n++)(r=Ot[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ot.length&&null===(n=Ot[0]).blockedOn;)Rt(n),null===n.blockedOn&&Ot.shift()}var Lt={},jt=new Map,Ut=new Map,Ft=["abort","abort",qe,"animationEnd",Ve,"animationIteration",$e,"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",Ge,"transitionEnd","waiting","waiting"];function zt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Ut.set(r,t),jt.set(r,o),Lt[i]=o}}zt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus 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),zt("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),zt(Ft,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Kt=0;Kt<Bt.length;Kt++)Ut.set(Bt[Kt],0);var Ht=o.unstable_UserBlockingPriority,Wt=o.unstable_runWithPriority,qt=!0;function Vt(e,t){$t(t,e,!1)}function $t(e,t,n){var r=Ut.get(t);switch(void 0===r?2:r){case 0:r=Gt.bind(null,t,1,e);break;case 1:r=Zt.bind(null,t,1,e);break;default:r=Qt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Gt(e,t,n,r){U||L();var i=Qt,o=U;U=!0;try{x(i,e,t,n,r)}finally{(U=o)||z()}}function Zt(e,t,n,r){Wt(Ht,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){if(qt)if(0<yt.length&&-1<Et.indexOf(e))e=At(null,e,t,n,r),yt.push(e);else{var i=Yt(e,t,n,r);if(null===i)Tt(e,r);else if(-1<Et.indexOf(e))e=At(i,e,t,n,r),yt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return bt=Pt(bt,e,t,n,r,i),!0;case"dragenter":return wt=Pt(wt,e,t,n,r,i),!0;case"mouseover":return St=Pt(St,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ct.set(o,Pt(Ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,_t.set(o,Pt(_t.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){Tt(e,r),e=dt(e,r,null,t);try{B(pt,e)}finally{lt(e)}}}}function Yt(e,t,n,r){if(null!==(n=kn(n=st(r)))){var i=Je(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=Xe(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=dt(e,r,n,t);try{B(pt,e)}finally{lt(e)}return null}var Jt={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},Xt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Jt).forEach((function(e){Xt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=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 rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62,""))}}function on(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}}var an="http://www.w3.org/1999/xhtml";function sn(e,t){var n=Ye(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=E[t];for(var r=0;r<t.length;r++)ft(t[r],e,n)}function cn(){}function un(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=ln(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=ln(r)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fn(){for(var e=window,t=un();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=un((e=t.contentWindow).document)}return t}function hn(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 mn="$",gn="/$",vn="$?",yn="$!",bn=null,wn=null;function Sn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Cn(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 _n="function"===typeof setTimeout?setTimeout:void 0,On="function"===typeof clearTimeout?clearTimeout:void 0;function En(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function In(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if(n===mn||n===yn||n===vn){if(0===t)return e;t--}else n===gn&&t++}e=e.previousSibling}return null}var An=Math.random().toString(36).slice(2),Tn="__reactInternalInstance$"+An,Pn="__reactEventHandlers$"+An,Rn="__reactContainere$"+An;function kn(e){var t=e[Tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Rn]||n[Tn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=In(e);null!==e;){if(n=e[Tn])return n;e=In(e)}return t}n=(e=n).parentNode}return null}function Dn(e){return!(e=e[Tn]||e[Rn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Mn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Nn(e){return e[Pn]||null}function xn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Ln(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!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(a(231,t,typeof n));return n}function jn(e,t,n){(t=Ln(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Un(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=xn(t);for(t=n.length;0<t--;)jn(n[t],"captured",e);for(t=0;t<n.length;t++)jn(n[t],"bubbled",e)}}function Fn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Ln(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function zn(e){e&&e.dispatchConfig.registrationName&&Fn(e._targetInst,null,e)}function Bn(e){rt(e,Un)}var Kn=null,Hn=null,Wn=null;function qn(){if(Wn)return Wn;var e,t,n=Hn,r=n.length,i="value"in Kn?Kn.value:Kn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Wn=i.slice(e,1<t?1-t:void 0)}function Vn(){return!0}function $n(){return!1}function Gn(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Vn:$n,this.isPropagationStopped=$n,this}function Zn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Qn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Yn(e){e.eventPool=[],e.getPooled=Zn,e.release=Qn}i(Gn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Vn)},persist:function(){this.isPersistent=Vn},isPersistent:$n,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=$n,this._dispatchInstances=this._dispatchListeners=null}}),Gn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Gn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Yn(n),n},Yn(Gn);var Jn=Gn.extend({data:null}),Xn=Gn.extend({data:null}),er=[9,13,27,32],tr=A&&"CompositionEvent"in window,nr=null;A&&"documentMode"in document&&(nr=document.documentMode);var rr=A&&"TextEvent"in window&&!nr,ir=A&&(!tr||nr&&8<nr&&11>=nr),or=String.fromCharCode(32),ar={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},sr=!1;function cr(e,t){switch(e){case"keyup":return-1!==er.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ur(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var lr=!1,dr={eventTypes:ar,extractEvents:function(e,t,n,r){var i;if(tr)e:{switch(e){case"compositionstart":var o=ar.compositionStart;break e;case"compositionend":o=ar.compositionEnd;break e;case"compositionupdate":o=ar.compositionUpdate;break e}o=void 0}else lr?cr(e,n)&&(o=ar.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=ar.compositionStart);return o?(ir&&"ko"!==n.locale&&(lr||o!==ar.compositionStart?o===ar.compositionEnd&&lr&&(i=qn()):(Hn="value"in(Kn=r)?Kn.value:Kn.textContent,lr=!0)),o=Jn.getPooled(o,t,n,r),(i||null!==(i=ur(n)))&&(o.data=i),Bn(o),i=o):i=null,(e=rr?function(e,t){switch(e){case"compositionend":return ur(t);case"keypress":return 32!==t.which?null:(sr=!0,or);case"textInput":return(e=t.data)===or&&sr?null:e;default:return null}}(e,n):function(e,t){if(lr)return"compositionend"===e||!tr&&cr(e,t)?(e=qn(),Wn=Hn=Kn=null,lr=!1,e):null;switch(e){case"paste":default: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 ir&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Xn.getPooled(ar.beforeInput,t,n,r)).data=e,Bn(t)):t=null,null===i?t:null===t?i:[i,t]}},pr={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 fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!pr[e.type]:"textarea"===t}var hr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function mr(e,t,n){return(e=Gn.getPooled(hr.change,e,t,n)).type="change",D(n),Bn(e),e}var gr=null,vr=null;function yr(e){at(e)}function br(e){if(Se(Mn(e)))return e}function wr(e,t){if("change"===e)return t}var Sr=!1;function Cr(){gr&&(gr.detachEvent("onpropertychange",_r),vr=gr=null)}function _r(e){if("value"===e.propertyName&&br(vr))if(e=mr(vr,e,st(e)),U)at(e);else{U=!0;try{N(yr,e)}finally{U=!1,z()}}}function Or(e,t,n){"focus"===e?(Cr(),vr=n,(gr=t).attachEvent("onpropertychange",_r)):"blur"===e&&Cr()}function Er(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return br(vr)}function Ir(e,t){if("click"===e)return br(t)}function Ar(e,t){if("input"===e||"change"===e)return br(t)}A&&(Sr=ct("input")&&(!document.documentMode||9<document.documentMode));var Tr={eventTypes:hr,_isInputEventSupported:Sr,extractEvents:function(e,t,n,r){var i=t?Mn(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=wr;else if(fr(i))if(Sr)a=Ar;else{a=Er;var s=Or}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Ir);if(a&&(a=a(e,t)))return mr(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Ae(i,"number",i.value)}},Pr=Gn.extend({view:null,detail:null}),Rr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Rr[e])&&!!t[e]}function Dr(){return kr}var Mr=0,Nr=0,xr=!1,Lr=!1,jr=Pr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Dr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Mr;return Mr=e.screenX,xr?"mousemove"===e.type?e.screenX-t:0:(xr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Nr;return Nr=e.screenY,Lr?"mousemove"===e.type?e.screenY-t:0:(Lr=!0,0)}}),Ur=jr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Fr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},zr={eventTypes:Fr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?kn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=jr,c=Fr.mouseLeave,u=Fr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Ur,c=Fr.pointerLeave,u=Fr.pointerEnter,l="pointer");if(e=null==a?o:Mn(a),o=null==t?o:Mn(t),(c=s.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=o,(n=s.getPooled(u,t,n,r)).type=l+"enter",n.target=o,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(u=l,a=0,e=s=r;e;e=xn(e))a++;for(e=0,t=u;t;t=xn(t))e++;for(;0<a-e;)s=xn(s),a--;for(;0<e-a;)u=xn(u),e--;for(;a--;){if(s===u||s===u.alternate)break e;s=xn(s),u=xn(u)}s=null}else s=null;for(u=s,s=[];r&&r!==u&&(null===(a=r.alternate)||a!==u);)s.push(r),r=xn(r);for(r=[];l&&l!==u&&(null===(a=l.alternate)||a!==u);)r.push(l),l=xn(l);for(l=0;l<s.length;l++)Fn(s[l],"bubbled",c);for(l=r.length;0<l--;)Fn(r[l],"captured",n);return 0===(64&i)?[c]:[c,n]}},Br="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Kr=Object.prototype.hasOwnProperty;function Hr(e,t){if(Br(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(!Kr.call(t,n[r])||!Br(e[n[r]],t[n[r]]))return!1;return!0}var Wr=A&&"documentMode"in document&&11>=document.documentMode,qr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vr=null,$r=null,Gr=null,Zr=!1;function Qr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Zr||null==Vr||Vr!==un(n)?null:(n="selectionStart"in(n=Vr)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Gr&&Hr(Gr,n)?null:(Gr=n,(e=Gn.getPooled(qr.select,$r,e,t)).type="select",e.target=Vr,Bn(e),e))}var Yr={eventTypes:qr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Ye(i),o=E.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?Mn(t):window,e){case"focus":(fr(i)||"true"===i.contentEditable)&&(Vr=i,$r=t,Gr=null);break;case"blur":Gr=$r=Vr=null;break;case"mousedown":Zr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Zr=!1,Qr(n,r);case"selectionchange":if(Wr)break;case"keydown":case"keyup":return Qr(n,r)}return null}},Jr=Gn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Xr=Gn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ei=Pr.extend({relatedTarget:null});function ti(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}var ni={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ri={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"},ii=Pr.extend({key:function(e){if(e.key){var t=ni[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ti(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ri[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Dr,charCode:function(e){return"keypress"===e.type?ti(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ti(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),oi=jr.extend({dataTransfer:null}),ai=Pr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Dr}),si=Gn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ci=jr.extend({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:null,deltaMode:null}),ui={eventTypes:Lt,extractEvents:function(e,t,n,r){var i=jt.get(e);if(!i)return null;switch(e){case"keypress":if(0===ti(n))return null;case"keydown":case"keyup":e=ii;break;case"blur":case"focus":e=ei;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=jr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ai;break;case qe:case Ve:case $e:e=Jr;break;case Ge:e=si;break;case"scroll":e=Pr;break;case"wheel":e=ci;break;case"copy":case"cut":case"paste":e=Xr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ur;break;default:e=Gn}return Bn(t=e.getPooled(i,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Nn,m=Dn,g=Mn,I({SimpleEventPlugin:ui,EnterLeaveEventPlugin:zr,ChangeEventPlugin:Tr,SelectEventPlugin:Yr,BeforeInputEventPlugin:dr});var li=[],di=-1;function pi(e){0>di||(e.current=li[di],li[di]=null,di--)}function fi(e,t){di++,li[di]=e.current,e.current=t}var hi={},mi={current:hi},gi={current:!1},vi=hi;function yi(e,t){var n=e.type.contextTypes;if(!n)return hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function bi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function wi(){pi(gi),pi(mi)}function Si(e,t,n){if(mi.current!==hi)throw Error(a(168));fi(mi,t),fi(gi,n)}function Ci(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,ge(t)||"Unknown",o));return i({},n,{},r)}function _i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,vi=mi.current,fi(mi,e),fi(gi,gi.current),!0}function Oi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ci(e,t,vi),r.__reactInternalMemoizedMergedChildContext=e,pi(gi),pi(mi),fi(mi,e)):pi(gi),fi(gi,n)}var Ei=o.unstable_runWithPriority,Ii=o.unstable_scheduleCallback,Ai=o.unstable_cancelCallback,Ti=o.unstable_requestPaint,Pi=o.unstable_now,Ri=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,Di=o.unstable_UserBlockingPriority,Mi=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,xi=o.unstable_IdlePriority,Li={},ji=o.unstable_shouldYield,Ui=void 0!==Ti?Ti:function(){},Fi=null,zi=null,Bi=!1,Ki=Pi(),Hi=1e4>Ki?Pi:function(){return Pi()-Ki};function Wi(){switch(Ri()){case ki:return 99;case Di:return 98;case Mi:return 97;case Ni:return 96;case xi:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return ki;case 98:return Di;case 97:return Mi;case 96:return Ni;case 95:return xi;default:throw Error(a(332))}}function Vi(e,t){return e=qi(e),Ei(e,t)}function $i(e,t,n){return e=qi(e),Ii(e,t,n)}function Gi(e){return null===Fi?(Fi=[e],zi=Ii(ki,Qi)):Fi.push(e),Li}function Zi(){if(null!==zi){var e=zi;zi=null,Ai(e)}Qi()}function Qi(){if(!Bi&&null!==Fi){Bi=!0;var e=0;try{var t=Fi;Vi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Fi=null}catch(n){throw null!==Fi&&(Fi=Fi.slice(e+1)),Ii(ki,Zi),n}finally{Bi=!1}}}function Yi(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Ji(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}var Xi={current:null},eo=null,to=null,no=null;function ro(){no=to=eo=null}function io(e){var t=Xi.current;pi(Xi),e.type._context._currentValue=t}function oo(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 ao(e,t){eo=e,no=to=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Na=!0),e.firstContext=null)}function so(e,t){if(no!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(no=e,t=1073741823),t={context:e,observedBits:t,next:null},null===to){if(null===eo)throw Error(a(308));to=t,eo.dependencies={expirationTime:0,firstContext:t,responders:null}}else to=to.next=t;return e._currentValue}var co=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function po(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fo(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 ho(e,t){var n=e.alternate;null!==n&&lo(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function mo(e,t,n,r){var o=e.updateQueue;co=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var c=a.next;a.next=s.next,s.next=c}a=s,o.shared.pending=null,null!==(c=e.alternate)&&null!==(c=c.updateQueue)&&(c.baseQueue=s)}if(null!==a){c=a.next;var u=o.baseState,l=0,d=null,p=null,f=null;if(null!==c)for(var h=c;;){if((s=h.expirationTime)<r){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===f?(p=f=m,d=u):f=f.next=m,s>l&&(l=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),wc(s,h.suspenseConfig);e:{var g=e,v=h;switch(s=t,m=n,v.tag){case 1:if("function"===typeof(g=v.payload)){u=g.call(m,u,s);break e}u=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null===(s="function"===typeof(g=v.payload)?g.call(m,u,s):g)||void 0===s)break e;u=i({},u,s);break e;case 2:co=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[h]:s.push(h))}if(null===(h=h.next)||h===c){if(null===(s=o.shared.pending))break;h=a.next=s.next,s.next=c,o.baseQueue=a=s,o.shared.pending=null}}null===f?d=u:f.next=p,o.baseState=d,o.baseQueue=f,Sc(l),e.expirationTime=l,e.memoizedState=u}}function go(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(a(191,r));r.call(i)}}}var vo=Q.ReactCurrentBatchConfig,yo=(new r.Component).refs;function bo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var wo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=sc(),i=vo.suspense;(i=po(r=cc(r,e,i),i)).payload=t,void 0!==n&&null!==n&&(i.callback=n),fo(e,i),uc(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=sc(),i=vo.suspense;(i=po(r=cc(r,e,i),i)).tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fo(e,i),uc(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=sc(),r=vo.suspense;(r=po(n=cc(n,e,r),r)).tag=2,void 0!==t&&null!==t&&(r.callback=t),fo(e,r),uc(e,n)}};function So(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||!Hr(n,r)||!Hr(i,o)}function Co(e,t,n){var r=!1,i=hi,o=t.contextType;return"object"===typeof o&&null!==o?o=so(o):(i=bi(t)?vi:mi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?yi(e,i):hi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=wo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function _o(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&&wo.enqueueReplaceState(t,t.state,null)}function Oo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=yo,uo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=so(o):(o=bi(t)?vi:mi.current,i.context=yi(e,o)),mo(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(bo(e,t,o,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&&wo.enqueueReplaceState(i,i.state,null),mo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.effectTag|=4)}var Eo=Array.isArray;function Io(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(a(309));var r=n.stateNode}if(!r)throw Error(a(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===yo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ao(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function To(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=Bc(e,t)).index=0,e.sibling=null,e}function o(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 c(e,t,n,r){return null===t||6!==t.tag?((t=Wc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Io(e,t,n),r.return=e,r):((r=Kc(n.type,n.key,n.props,null,e.mode,r)).ref=Io(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=qc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Hc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Wc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Kc(t.type,t.key,t.props,null,e.mode,n)).ref=Io(e,null,t),n.return=e,n;case te:return(t=qc(t,e.mode,n)).return=e,t}if(Eo(t)||me(t))return(t=Hc(t,e.mode,n,null)).return=e,t;Ao(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:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case te:return n.key===i?l(e,t,n,r):null}if(Eo(n)||me(n))return null!==i?null:d(e,t,n,r,null);Ao(e,n)}return null}function h(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?d(t,e,r.props.children,i,r.key):u(t,e,r,i);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Eo(r)||me(r))return d(t,e=e.get(n)||null,r,i,null);Ao(t,r)}return null}function m(i,a,s,c){for(var u=null,l=null,d=a,m=a=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],c);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===l?u=v:l.sibling=v,l=v,d=g}if(m===s.length)return n(i,d),u;if(null===d){for(;m<s.length;m++)null!==(d=p(i,s[m],c))&&(a=o(d,a,m),null===l?u=d:l.sibling=d,l=d);return u}for(d=r(i,d);m<s.length;m++)null!==(g=h(d,i,m,s[m],c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===l?u=g:l.sibling=g,l=g);return e&&d.forEach((function(e){return t(i,e)})),u}function g(i,s,c,u){var l=me(c);if("function"!==typeof l)throw Error(a(150));if(null==(c=l.call(c)))throw Error(a(151));for(var d=l=null,m=s,g=s=0,v=null,y=c.next();null!==m&&!y.done;g++,y=c.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?l=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),l;if(null===m){for(;!y.done;g++,y=c.next())null!==(y=p(i,y.value,u))&&(s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return l}for(m=r(i,m);!y.done;g++,y=c.next())null!==(y=h(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),l}return function(e,r,o,c){var u="object"===typeof o&&null!==o&&o.type===ne&&null===o.key;u&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case ee:e:{for(l=o.key,u=r;null!==u;){if(u.key===l){if(7===u.tag){if(o.type===ne){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}}else if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=Io(e,u,o),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}o.type===ne?((r=Hc(o.props.children,e.mode,c,o.key)).return=e,e=r):((c=Kc(o.type,o.key,o.props,null,e.mode,c)).ref=Io(e,r,o),c.return=e,e=c)}return s(e);case te:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=qc(o,e.mode,c)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Wc(o,e.mode,c)).return=e,e=r),s(e);if(Eo(o))return m(e,r,o,c);if(me(o))return g(e,r,o,c);if(l&&Ao(e,o),"undefined"===typeof o&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Po=To(!0),Ro=To(!1),ko={},Do={current:ko},Mo={current:ko},No={current:ko};function xo(e){if(e===ko)throw Error(a(174));return e}function Lo(e,t){switch(fi(No,t),fi(Mo,e),fi(Do,ko),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xe(null,"");break;default:t=xe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}pi(Do),fi(Do,t)}function jo(){pi(Do),pi(Mo),pi(No)}function Uo(e){xo(No.current);var t=xo(Do.current),n=xe(t,e.type);t!==n&&(fi(Mo,e),fi(Do,n))}function Fo(e){Mo.current===e&&(pi(Do),pi(Mo))}var zo={current:0};function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===vn||n.data===yn))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 Ko(e,t){return{responder:e,props:t}}var Ho=Q.ReactCurrentDispatcher,Wo=Q.ReactCurrentBatchConfig,qo=0,Vo=null,$o=null,Go=null,Zo=!1;function Qo(){throw Error(a(321))}function Yo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,o){if(qo=o,Vo=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ho.current=null===e||null===e.memoizedState?Sa:Ca,e=n(r,i),t.expirationTime===qo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Go=$o=null,t.updateQueue=null,Ho.current=_a,e=n(r,i)}while(t.expirationTime===qo)}if(Ho.current=wa,t=null!==$o&&null!==$o.next,qo=0,Go=$o=Vo=null,Zo=!1,t)throw Error(a(300));return e}function Xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Go?Vo.memoizedState=Go=e:Go=Go.next=e,Go}function ea(){if(null===$o){var e=Vo.alternate;e=null!==e?e.memoizedState:null}else e=$o.next;var t=null===Go?Vo.memoizedState:Go.next;if(null!==t)Go=t,$o=e;else{if(null===e)throw Error(a(310));e={memoizedState:($o=e).memoizedState,baseState:$o.baseState,baseQueue:$o.baseQueue,queue:$o.queue,next:null},null===Go?Vo.memoizedState=Go=e:Go=Go.next=e}return Go}function ta(e,t){return"function"===typeof t?t(e):t}function na(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=$o,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var c=s=o=null,u=i;do{var l=u.expirationTime;if(l<qo){var d={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===c?(s=c=d,o=r):c=c.next=d,l>Vo.expirationTime&&(Vo.expirationTime=l,Sc(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),wc(l,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==i);null===c?o=r:c.next=s,Br(r,t.memoizedState)||(Na=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ra(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Br(o,t.memoizedState)||(Na=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ia(e){var t=Xo();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e}).dispatch=ba.bind(null,Vo,e),[t.memoizedState,e]}function oa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Vo.updateQueue)?(t={lastEffect:null},Vo.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 aa(){return ea().memoizedState}function sa(e,t,n,r){var i=Xo();Vo.effectTag|=e,i.memoizedState=oa(1|t,n,void 0,void 0===r?null:r)}function ca(e,t,n,r){var i=ea();r=void 0===r?null:r;var o=void 0;if(null!==$o){var a=$o.memoizedState;if(o=a.destroy,null!==r&&Yo(r,a.deps))return void oa(t,n,o,r)}Vo.effectTag|=e,i.memoizedState=oa(1|t,n,o,r)}function ua(e,t){return sa(516,4,e,t)}function la(e,t){return ca(516,4,e,t)}function da(e,t){return ca(4,2,e,t)}function pa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ca(4,2,pa.bind(null,t,e),n)}function ha(){}function ma(e,t){return Xo().memoizedState=[e,void 0===t?null:t],e}function ga(e,t){var n=ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function va(e,t){var n=ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Yo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ya(e,t,n){var r=Wi();Vi(98>r?98:r,(function(){e(!0)})),Vi(97<r?97:r,(function(){var r=Wo.suspense;Wo.suspense=void 0===t?null:t;try{e(!1),n()}finally{Wo.suspense=r}}))}function ba(e,t,n){var r=sc(),i=vo.suspense;i={expirationTime:r=cc(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Vo||null!==o&&o===Vo)Zo=!0,i.expirationTime=qo,Vo.expirationTime=qo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Br(s,a))return}catch(c){}uc(e,r)}}var wa={readContext:so,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useResponder:Qo,useDeferredValue:Qo,useTransition:Qo},Sa={readContext:so,useCallback:ma,useContext:so,useEffect:ua,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,sa(4,2,pa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sa(4,2,e,t)},useMemo:function(e,t){var n=Xo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xo();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=ba.bind(null,Vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Xo().memoizedState=e},useState:ia,useDebugValue:ha,useResponder:Ko,useDeferredValue:function(e,t){var n=ia(e),r=n[0],i=n[1];return ua((function(){var n=Wo.suspense;Wo.suspense=void 0===t?null:t;try{i(e)}finally{Wo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ia(!1),n=t[0];return t=t[1],[ma(ya.bind(null,t,e),[t,e]),n]}},Ca={readContext:so,useCallback:ga,useContext:so,useEffect:la,useImperativeHandle:fa,useLayoutEffect:da,useMemo:va,useReducer:na,useRef:aa,useState:function(){return na(ta)},useDebugValue:ha,useResponder:Ko,useDeferredValue:function(e,t){var n=na(ta),r=n[0],i=n[1];return la((function(){var n=Wo.suspense;Wo.suspense=void 0===t?null:t;try{i(e)}finally{Wo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(ta),n=t[0];return t=t[1],[ga(ya.bind(null,t,e),[t,e]),n]}},_a={readContext:so,useCallback:ga,useContext:so,useEffect:la,useImperativeHandle:fa,useLayoutEffect:da,useMemo:va,useReducer:ra,useRef:aa,useState:function(){return ra(ta)},useDebugValue:ha,useResponder:Ko,useDeferredValue:function(e,t){var n=ra(ta),r=n[0],i=n[1];return la((function(){var n=Wo.suspense;Wo.suspense=void 0===t?null:t;try{i(e)}finally{Wo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ra(ta),n=t[0];return t=t[1],[ga(ya.bind(null,t,e),[t,e]),n]}},Oa=null,Ea=null,Ia=!1;function Aa(e,t){var n=Fc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ta(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);default:return!1}}function Pa(e){if(Ia){var t=Ea;if(t){var n=t;if(!Ta(e,t)){if(!(t=En(n.nextSibling))||!Ta(e,t))return e.effectTag=-1025&e.effectTag|2,Ia=!1,void(Oa=e);Aa(Oa,n)}Oa=e,Ea=En(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ia=!1,Oa=e}}function Ra(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Oa=e}function ka(e){if(e!==Oa)return!1;if(!Ia)return Ra(e),Ia=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Cn(t,e.memoizedProps))for(t=Ea;t;)Aa(e,t),t=En(t.nextSibling);if(Ra(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if(n===gn){if(0===t){Ea=En(e.nextSibling);break e}t--}else n!==mn&&n!==yn&&n!==vn||t++}e=e.nextSibling}Ea=null}}else Ea=Oa?En(e.stateNode.nextSibling):null;return!0}function Da(){Ea=Oa=null,Ia=!1}var Ma=Q.ReactCurrentOwner,Na=!1;function xa(e,t,n,r){t.child=null===e?Ro(t,null,n,r):Po(t,e.child,n,r)}function La(e,t,n,r,i){n=n.render;var o=t.ref;return ao(t,i),r=Jo(e,t,n,r,o,i),null===e||Na?(t.effectTag|=1,xa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Xa(e,t,i))}function ja(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||zc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Kc(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Hr)(i,r)&&e.ref===t.ref)?Xa(e,t,o):(t.effectTag|=1,(e=Bc(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,i,o){return null!==e&&Hr(e.memoizedProps,r)&&e.ref===t.ref&&(Na=!1,i<o)?(t.expirationTime=e.expirationTime,Xa(e,t,o)):za(e,t,n,r,o)}function Fa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function za(e,t,n,r,i){var o=bi(n)?vi:mi.current;return o=yi(t,o),ao(t,i),n=Jo(e,t,n,r,o,i),null===e||Na?(t.effectTag|=1,xa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Xa(e,t,i))}function Ba(e,t,n,r,i){if(bi(n)){var o=!0;_i(t)}else o=!1;if(ao(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Co(t,n,r),Oo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=n.contextType;u="object"===typeof u&&null!==u?so(u):yi(t,u=bi(n)?vi:mi.current);var l=n.getDerivedStateFromProps,d="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==u)&&_o(t,a,r,u),co=!1;var p=t.memoizedState;a.state=p,mo(t,r,a,i),c=t.memoizedState,s!==r||p!==c||gi.current||co?("function"===typeof l&&(bo(t,n,l,r),c=t.memoizedState),(s=co||So(t,n,s,r,p,c,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,lo(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Ji(t.type,s),c=a.context,u="object"===typeof(u=n.contextType)&&null!==u?so(u):yi(t,u=bi(n)?vi:mi.current),(d="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==u)&&_o(t,a,r,u),co=!1,c=t.memoizedState,a.state=c,mo(t,r,a,i),p=t.memoizedState,s!==r||c!==p||gi.current||co?("function"===typeof l&&(bo(t,n,l,r),p=t.memoizedState),(l=co||So(t,n,s,r,c,p,u))?(d||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof a.componentDidUpdate&&(t.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Ka(e,t,n,r,o,i)}function Ka(e,t,n,r,i,o){Fa(e,t);var a=0!==(64&t.effectTag);if(!r&&!a)return i&&Oi(t,n,!1),Xa(e,t,o);r=t.stateNode,Ma.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Po(t,e.child,null,o),t.child=Po(t,null,s,o)):xa(e,t,s,o),t.memoizedState=r.state,i&&Oi(t,n,!0),t.child}function Ha(e){var t=e.stateNode;t.pendingContext?Si(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Si(0,t.context,!1),Lo(e,t.containerInfo)}var Wa,qa,Va,$a,Ga={dehydrated:null,retryTime:0};function Za(e,t,n){var r,i=t.mode,o=t.pendingProps,a=zo.current,s=!1;if((r=0!==(64&t.effectTag))||(r=0!==(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),fi(zo,1&a),null===e){if(void 0!==o.fallback&&Pa(t),s){if(s=o.fallback,(o=Hc(null,i,0,null)).return=t,0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Hc(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=Ga,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Ro(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Bc(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=Bc(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=Ga,t.child=n,i}return n=Po(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Hc(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Hc(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=Ga,t.child=o,n}return t.memoizedState=null,t.child=Po(t,e,o.children,n)}function Qa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oo(e.return,t)}function Ya(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Ja(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xa(e,t,r.children,n),0!==(2&(r=zo.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&&Qa(e,n);else if(19===e.tag)Qa(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(fi(zo,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===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ya(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ya(t,!0,n,null,o,t.lastEffect);break;case"together":Ya(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Xa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&Sc(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Bc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function es(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 ts(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:case 17:return bi(t.type)&&wi(),null;case 3:return jo(),pi(gi),pi(mi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ka(t)||(t.effectTag|=4),qa(t),null;case 5:Fo(t),n=xo(No.current);var o=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=xo(Do.current),ka(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[Tn]=t,r[Pn]=s,o){case"iframe":case"object":case"embed":Vt("load",r);break;case"video":case"audio":for(e=0;e<Ze.length;e++)Vt(Ze[e],r);break;case"source":Vt("error",r);break;case"img":case"image":case"link":Vt("error",r),Vt("load",r);break;case"form":Vt("reset",r),Vt("submit",r);break;case"details":Vt("toggle",r);break;case"input":_e(r,s),Vt("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Vt("invalid",r),sn(n,"onChange");break;case"textarea":ke(r,s),Vt("invalid",r),sn(n,"onChange")}for(var c in rn(o,s),e=null,s)if(s.hasOwnProperty(c)){var u=s[c];"children"===c?"string"===typeof u?r.textContent!==u&&(e=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(e=["children",""+u]):O.hasOwnProperty(c)&&null!=u&&sn(n,c)}switch(o){case"input":we(r),Ie(r,s,!0);break;case"textarea":we(r),Me(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=cn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(c=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Ne(o)),e===an?"script"===o?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(o,{is:r.is}):(e=c.createElement(o),"select"===o&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,o),e[Tn]=t,e[Pn]=r,Wa(e,t,!1,!1),t.stateNode=e,c=on(o,r),o){case"iframe":case"object":case"embed":Vt("load",e),u=r;break;case"video":case"audio":for(u=0;u<Ze.length;u++)Vt(Ze[u],e);u=r;break;case"source":Vt("error",e),u=r;break;case"img":case"image":case"link":Vt("error",e),Vt("load",e),u=r;break;case"form":Vt("reset",e),Vt("submit",e),u=r;break;case"details":Vt("toggle",e),u=r;break;case"input":_e(e,r),u=Ce(e,r),Vt("invalid",e),sn(n,"onChange");break;case"option":u=Te(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},u=i({},r,{value:void 0}),Vt("invalid",e),sn(n,"onChange");break;case"textarea":ke(e,r),u=Re(e,r),Vt("invalid",e),sn(n,"onChange");break;default:u=r}rn(o,u);var l=u;for(s in l)if(l.hasOwnProperty(s)){var d=l[s];"style"===s?tn(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&Ue(e,d):"children"===s?"string"===typeof d?("textarea"!==o||""!==d)&&Fe(e,d):"number"===typeof d&&Fe(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(O.hasOwnProperty(s)?null!=d&&sn(n,s):null!=d&&Y(e,s,d,c))}switch(o){case"input":we(e),Ie(e,r,!1);break;case"textarea":we(e),Me(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Pe(e,!!r.multiple,n,!1):null!=r.defaultValue&&Pe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof u.onClick&&(e.onclick=cn)}Sn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)$a(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=xo(No.current),xo(Do.current),ka(t)?(n=t.stateNode,r=t.memoizedProps,n[Tn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Tn]=t,t.stateNode=n)}return null;case 13:return pi(zo),r=t.memoizedState,0!==(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ka(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&zo.current)?Bs===ks&&(Bs=Ns):(Bs!==ks&&Bs!==Ns||(Bs=xs),0!==Vs&&null!==Us&&(Gc(Us,zs),Zc(Us,Vs)))),(n||r)&&(t.effectTag|=4),null);case 4:return jo(),qa(t),null;case 10:return io(t),null;case 19:if(pi(zo),null===(r=t.memoizedState))return null;if(o=0!==(64&t.effectTag),null===(s=r.rendering)){if(o)es(r,!1);else if(Bs!==ks||null!==e&&0!==(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Bo(s))){for(t.effectTag|=64,es(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return fi(zo,1&zo.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=Bo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),es(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Hi()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,es(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Hi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Hi(),n.sibling=null,t=zo.current,fi(zo,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function ns(e){switch(e.tag){case 1:bi(e.type)&&wi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(jo(),pi(gi),pi(mi),0!==(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Fo(e),null;case 13:return pi(zo),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return pi(zo),null;case 4:return jo(),null;case 10:return io(e),null;default:return null}}function rs(e,t){return{value:e,source:t,stack:ve(t)}}Wa=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}},qa=function(){},Va=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,c,u=t.stateNode;switch(xo(Do.current),e=null,n){case"input":a=Ce(u,a),r=Ce(u,r),e=[];break;case"option":a=Te(u,a),r=Te(u,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Re(u,a),r=Re(u,r),e=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(u.onclick=cn)}for(s in rn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(c in u=a[s])u.hasOwnProperty(c)&&(n||(n={}),n[c]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(O.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(u=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==u&&(null!=l||null!=u))if("style"===s)if(u){for(c in u)!u.hasOwnProperty(c)||l&&l.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in l)l.hasOwnProperty(c)&&u[c]!==l[c]&&(n||(n={}),n[c]=l[c])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(e=e||[]).push(s,l)):"children"===s?u===l||"string"!==typeof l&&"number"!==typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(O.hasOwnProperty(s)?(null!=l&&sn(o,s),e||u===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},$a=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var is="function"===typeof WeakSet?WeakSet:Set;function os(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ve(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(i){setTimeout((function(){throw i}))}}function as(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Mc(e,n)}else t.current=null}function ss(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17: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:Ji(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function cs(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 us(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 ls(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void us(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:Ji(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&go(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}go(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&Sn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function ds(e,t,n){switch("function"===typeof jc&&jc(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;Vi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(o){Mc(i,o)}}e=e.next}while(e!==r)}))}break;case 1:as(t),"function"===typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){Mc(e,n)}}(t,n);break;case 5:as(t);break;case 4:vs(e,t,n)}}function ps(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&&ps(t)}function fs(e){return 5===e.tag||3===e.tag||4===e.tag}function hs(e){e:{for(var t=e.return;null!==t;){if(fs(t)){var n=t;break e}t=t.return}throw Error(a(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(a(161))}16&n.effectTag&&(Fe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||fs(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?ms(e,n,t):gs(e,n,t)}function ms(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=cn));else if(4!==r&&null!==(e=e.child))for(ms(e,t,n),e=e.sibling;null!==e;)ms(e,t,n),e=e.sibling}function gs(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(gs(e,t,n),e=e.sibling;null!==e;)gs(e,t,n),e=e.sibling}function vs(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var c=e,u=o,l=n,d=u;;)if(ds(c,d,l),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===u)break e;for(;null===d.sibling;){if(null===d.return||d.return===u)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}i?(c=r,u=o.stateNode,8===c.nodeType?c.parentNode.removeChild(u):c.removeChild(u)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(ds(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function ys(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void cs(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Pn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Oe(n,r),on(e,i),t=on(e,r),i=0;i<o.length;i+=2){var s=o[i],c=o[i+1];"style"===s?tn(n,c):"dangerouslySetInnerHTML"===s?Ue(n,c):"children"===s?Fe(n,c):Y(n,s,c,t)}switch(e){case"input":Ee(n,r);break;case"textarea":De(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Pe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Pe(n,!!r.multiple,r.defaultValue,!0):Pe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,xt(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Gs=Hi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=void 0!==(i=e.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=en("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void bs(t);case 19:return void bs(t)}throw Error(a(163))}function bs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new is),t.forEach((function(t){var r=xc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ws="function"===typeof WeakMap?WeakMap:Map;function Ss(e,t,n){(n=po(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ys||(Ys=!0,Js=r),os(e,t)},n}function Cs(e,t,n){(n=po(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return os(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),os(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var _s,Os=Math.ceil,Es=Q.ReactCurrentDispatcher,Is=Q.ReactCurrentOwner,As=0,Ts=8,Ps=16,Rs=32,ks=0,Ds=1,Ms=2,Ns=3,xs=4,Ls=5,js=As,Us=null,Fs=null,zs=0,Bs=ks,Ks=null,Hs=1073741823,Ws=1073741823,qs=null,Vs=0,$s=!1,Gs=0,Zs=500,Qs=null,Ys=!1,Js=null,Xs=null,ec=!1,tc=null,nc=90,rc=null,ic=0,oc=null,ac=0;function sc(){return(js&(Ps|Rs))!==As?1073741821-(Hi()/10|0):0!==ac?ac:ac=1073741821-(Hi()/10|0)}function cc(e,t,n){if(0===(2&(t=t.mode)))return 1073741823;var r=Wi();if(0===(4&t))return 99===r?1073741823:1073741822;if((js&Ps)!==As)return zs;if(null!==n)e=Yi(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Yi(e,150,100);break;case 97:case 96:e=Yi(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Us&&e===zs&&--e,e}function uc(e,t){if(50<ic)throw ic=0,oc=null,Error(a(185));if(null!==(e=lc(e,t))){var n=Wi();1073741823===t?(js&Ts)!==As&&(js&(Ps|Rs))===As?hc(e):(pc(e),js===As&&Zi()):pc(e),(4&js)===As||98!==n&&99!==n||(null===rc?rc=new Map([[e,t]]):(void 0===(n=rc.get(e))||n>t)&&rc.set(e,t))}}function lc(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&&(Us===i&&(Sc(t),Bs===xs&&Gc(i,zs)),Zc(i,t)),i}function dc(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!$c(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function pc(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Gi(hc.bind(null,e));else{var t=dc(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=sc();if(r=1073741823===t?99:1===t||2===t?95: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!==Li&&Ai(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Gi(hc.bind(null,e)):$i(r,fc.bind(null,e),{timeout:10*(1073741821-t)-Hi()}),e.callbackNode=t}}}function fc(e,t){if(ac=0,t)return Qc(e,t=sc()),pc(e),null;var n=dc(e);if(0!==n){if(t=e.callbackNode,(js&(Ps|Rs))!==As)throw Error(a(327));if(Rc(),e===Us&&n===zs||vc(e,n),null!==Fs){var r=js;js|=Ps;for(var i=bc();;)try{_c();break}catch(c){yc(e,c)}if(ro(),js=r,Es.current=i,Bs===Ds)throw t=Ks,vc(e,n),Gc(e,n),pc(e),t;if(null===Fs)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Bs,Us=null,r){case ks:case Ds:throw Error(a(345));case Ms:Qc(e,2<n?2:n);break;case Ns:if(Gc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Ic(i)),1073741823===Hs&&10<(i=Gs+Zs-Hi())){if($s){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,vc(e,n);break}}if(0!==(o=dc(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=_n(Ac.bind(null,e),i);break}Ac(e);break;case xs:if(Gc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Ic(i)),$s&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,vc(e,n);break}if(0!==(i=dc(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ws?r=10*(1073741821-Ws)-Hi():1073741823===Hs?r=0:(r=10*(1073741821-Hs)-5e3,0>(r=(i=Hi())-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*Os(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=_n(Ac.bind(null,e),r);break}Ac(e);break;case Ls:if(1073741823!==Hs&&null!==qs){o=Hs;var s=qs;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Hi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Gc(e,n),e.timeoutHandle=_n(Ac.bind(null,e),r);break}}Ac(e);break;default:throw Error(a(329))}if(pc(e),e.callbackNode===t)return fc.bind(null,e)}}return null}function hc(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,(js&(Ps|Rs))!==As)throw Error(a(327));if(Rc(),e===Us&&t===zs||vc(e,t),null!==Fs){var n=js;js|=Ps;for(var r=bc();;)try{Cc();break}catch(i){yc(e,i)}if(ro(),js=n,Es.current=r,Bs===Ds)throw n=Ks,vc(e,t),Gc(e,t),pc(e),n;if(null!==Fs)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Us=null,Ac(e),pc(e)}return null}function mc(e,t){var n=js;js|=1;try{return e(t)}finally{(js=n)===As&&Zi()}}function gc(e,t){var n=js;js&=-2,js|=Ts;try{return e(t)}finally{(js=n)===As&&Zi()}}function vc(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,On(n)),null!==Fs)for(n=Fs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&wi();break;case 3:jo(),pi(gi),pi(mi);break;case 5:Fo(r);break;case 4:jo();break;case 13:case 19:pi(zo);break;case 10:io(r)}n=n.return}Us=e,Fs=Bc(e.current,null),zs=t,Bs=ks,Ks=null,Ws=Hs=1073741823,qs=null,Vs=0,$s=!1}function yc(e,t){for(;;){try{if(ro(),Ho.current=wa,Zo)for(var n=Vo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(qo=0,Go=$o=Vo=null,Zo=!1,null===Fs||null===Fs.return)return Bs=Ds,Ks=t,Fs=null;e:{var i=e,o=Fs.return,a=Fs,s=t;if(t=zs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var c=s;if(0===(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!==(1&zo.current),d=o;do{var p;if(p=13===d.tag){var f=d.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var m=d.updateQueue;if(null===m){var g=new Set;g.add(c),d.updateQueue=g}else m.add(c);if(0===(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=po(1073741823,null);v.tag=2,fo(a,v)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new ws,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(a)){s.add(a);var b=Nc.bind(null,i,c,a);c.then(b,b)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((ge(a.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."+ve(a))}Bs!==Ls&&(Bs=Ms),s=rs(s,a),d=o;do{switch(d.tag){case 3:c=s,d.effectTag|=4096,d.expirationTime=t,ho(d,Ss(d,c,t));break e;case 1:c=s;var w=d.type,S=d.stateNode;if(0===(64&d.effectTag)&&("function"===typeof w.getDerivedStateFromError||null!==S&&"function"===typeof S.componentDidCatch&&(null===Xs||!Xs.has(S)))){d.effectTag|=4096,d.expirationTime=t,ho(d,Cs(d,c,t));break e}}d=d.return}while(null!==d)}Fs=Ec(Fs)}catch(C){t=C;continue}break}}function bc(){var e=Es.current;return Es.current=wa,null===e?wa:e}function wc(e,t){e<Hs&&2<e&&(Hs=e),null!==t&&e<Ws&&2<e&&(Ws=e,qs=t)}function Sc(e){e>Vs&&(Vs=e)}function Cc(){for(;null!==Fs;)Fs=Oc(Fs)}function _c(){for(;null!==Fs&&!ji();)Fs=Oc(Fs)}function Oc(e){var t=_s(e.alternate,e,zs);return e.memoizedProps=e.pendingProps,null===t&&(t=Ec(e)),Is.current=null,t}function Ec(e){Fs=e;do{var t=Fs.alternate;if(e=Fs.return,0===(2048&Fs.effectTag)){if(t=ts(t,Fs,zs),1===zs||1!==Fs.childExpirationTime){for(var n=0,r=Fs.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Fs.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Fs.firstEffect),null!==Fs.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Fs.firstEffect),e.lastEffect=Fs.lastEffect),1<Fs.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Fs:e.firstEffect=Fs,e.lastEffect=Fs))}else{if(null!==(t=ns(Fs)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Fs.sibling))return t;Fs=e}while(null!==Fs);return Bs===ks&&(Bs=Ls),null}function Ic(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function Ac(e){var t=Wi();return Vi(99,Tc.bind(null,e,t)),null}function Tc(e,t){do{Rc()}while(null!==tc);if((js&(Ps|Rs))!==As)throw Error(a(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(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Ic(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===Us&&(Fs=Us=null,zs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=js;js|=Rs,Is.current=null,bn=qt;var s=fn();if(hn(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{var u=(c=(c=s.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(u&&0!==u.rangeCount){c=u.anchorNode;var l=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{c.nodeType,d.nodeType}catch(I){c=null;break e}var p=0,f=-1,h=-1,m=0,g=0,v=s,y=null;t:for(;;){for(var b;v!==c||0!==l&&3!==v.nodeType||(f=p+l),v!==d||0!==u&&3!==v.nodeType||(h=p+u),3===v.nodeType&&(p+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===s)break t;if(y===c&&++m===l&&(f=p),y===d&&++g===u&&(h=p),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}c=-1===f||-1===h?null:{start:f,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;wn={activeElementDetached:null,focusedElem:s,selectionRange:c},qt=!1,Qs=i;do{try{Pc()}catch(I){if(null===Qs)throw Error(a(330));Mc(Qs,I),Qs=Qs.nextEffect}}while(null!==Qs);Qs=i;do{try{for(s=e,c=t;null!==Qs;){var w=Qs.effectTag;if(16&w&&Fe(Qs.stateNode,""),128&w){var S=Qs.alternate;if(null!==S){var C=S.ref;null!==C&&("function"===typeof C?C(null):C.current=null)}}switch(1038&w){case 2:hs(Qs),Qs.effectTag&=-3;break;case 6:hs(Qs),Qs.effectTag&=-3,ys(Qs.alternate,Qs);break;case 1024:Qs.effectTag&=-1025;break;case 1028:Qs.effectTag&=-1025,ys(Qs.alternate,Qs);break;case 4:ys(Qs.alternate,Qs);break;case 8:vs(s,l=Qs,c),ps(l)}Qs=Qs.nextEffect}}catch(I){if(null===Qs)throw Error(a(330));Mc(Qs,I),Qs=Qs.nextEffect}}while(null!==Qs);if(C=wn,S=fn(),w=C.focusedElem,c=C.selectionRange,S!==w&&w&&w.ownerDocument&&pn(w.ownerDocument.documentElement,w)){null!==c&&hn(w)&&(S=c.start,void 0===(C=c.end)&&(C=S),"selectionStart"in w?(w.selectionStart=S,w.selectionEnd=Math.min(C,w.value.length)):(C=(S=w.ownerDocument||document)&&S.defaultView||window).getSelection&&(C=C.getSelection(),l=w.textContent.length,s=Math.min(c.start,l),c=void 0===c.end?s:Math.min(c.end,l),!C.extend&&s>c&&(l=c,c=s,s=l),l=dn(w,s),d=dn(w,c),l&&d&&(1!==C.rangeCount||C.anchorNode!==l.node||C.anchorOffset!==l.offset||C.focusNode!==d.node||C.focusOffset!==d.offset)&&((S=S.createRange()).setStart(l.node,l.offset),C.removeAllRanges(),s>c?(C.addRange(S),C.extend(d.node,d.offset)):(S.setEnd(d.node,d.offset),C.addRange(S))))),S=[];for(C=w;C=C.parentNode;)1===C.nodeType&&S.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof w.focus&&w.focus(),w=0;w<S.length;w++)(C=S[w]).element.scrollLeft=C.left,C.element.scrollTop=C.top}qt=!!bn,wn=bn=null,e.current=n,Qs=i;do{try{for(w=e;null!==Qs;){var _=Qs.effectTag;if(36&_&&ls(w,Qs.alternate,Qs),128&_){S=void 0;var O=Qs.ref;if(null!==O){var E=Qs.stateNode;Qs.tag,S=E,"function"===typeof O?O(S):O.current=S}}Qs=Qs.nextEffect}}catch(I){if(null===Qs)throw Error(a(330));Mc(Qs,I),Qs=Qs.nextEffect}}while(null!==Qs);Qs=null,Ui(),js=o}else e.current=n;if(ec)ec=!1,tc=e,nc=t;else for(Qs=i;null!==Qs;)t=Qs.nextEffect,Qs.nextEffect=null,Qs=t;if(0===(t=e.firstPendingTime)&&(Xs=null),1073741823===t?e===oc?ic++:(ic=0,oc=e):ic=0,"function"===typeof Lc&&Lc(n.stateNode,r),pc(e),Ys)throw Ys=!1,e=Js,Js=null,e;return(js&Ts)!==As||Zi(),null}function Pc(){for(;null!==Qs;){var e=Qs.effectTag;0!==(256&e)&&ss(Qs.alternate,Qs),0===(512&e)||ec||(ec=!0,$i(97,(function(){return Rc(),null}))),Qs=Qs.nextEffect}}function Rc(){if(90!==nc){var e=97<nc?97:nc;return nc=90,Vi(e,kc)}}function kc(){if(null===tc)return!1;var e=tc;if(tc=null,(js&(Ps|Rs))!==As)throw Error(a(331));var t=js;for(js|=Rs,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:cs(5,n),us(5,n)}}catch(r){if(null===e)throw Error(a(330));Mc(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return js=t,Zi(),!0}function Dc(e,t,n){fo(e,t=Ss(e,t=rs(n,t),1073741823)),null!==(e=lc(e,1073741823))&&pc(e)}function Mc(e,t){if(3===e.tag)Dc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Dc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){fo(n,e=Cs(n,e=rs(t,e),1073741823)),null!==(n=lc(n,1073741823))&&pc(n);break}}n=n.return}}function Nc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Us===e&&zs===n?Bs===xs||Bs===Ns&&1073741823===Hs&&Hi()-Gs<Zs?vc(e,zs):$s=!0:$c(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,pc(e)))}function xc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=cc(t=sc(),e,null)),null!==(e=lc(e,t))&&pc(e)}_s=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||gi.current)Na=!0;else{if(r<n){switch(Na=!1,t.tag){case 3:Ha(t),Da();break;case 5:if(Uo(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:bi(t.type)&&_i(t);break;case 4:Lo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,fi(Xi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Za(e,t,n):(fi(zo,1&zo.current),null!==(t=Xa(e,t,n))?t.sibling:null);fi(zo,1&zo.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Ja(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),fi(zo,zo.current),!r)return null}return Xa(e,t,n)}Na=!1}}else Na=!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=yi(t,mi.current),ao(t,n),i=Jo(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,bi(r)){var o=!0;_i(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,uo(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&bo(t,r,s,e),i.updater=wo,t.stateNode=i,i._reactInternalFiber=t,Oo(t,r,e,n),t=Ka(null,t,r,!0,o,n)}else t.tag=0,xa(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,o=t.tag=function(e){if("function"===typeof e)return zc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ce)return 11;if(e===de)return 14}return 2}(i),e=Ji(i,e),o){case 0:t=za(null,t,i,e,n);break e;case 1:t=Ba(null,t,i,e,n);break e;case 11:t=La(null,t,i,e,n);break e;case 14:t=ja(null,t,i,Ji(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 3:if(Ha(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,lo(e,t),mo(t,r,null,n),(r=t.memoizedState.element)===i)Da(),t=Xa(e,t,n);else{if((i=t.stateNode.hydrate)&&(Ea=En(t.stateNode.containerInfo.firstChild),Oa=t,i=Ia=!0),i)for(n=Ro(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else xa(e,t,r,n),Da();t=t.child}return t;case 5:return Uo(t),null===e&&Pa(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Cn(r,i)?s=null:null!==o&&Cn(r,o)&&(t.effectTag|=16),Fa(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(xa(e,t,s,n),t=t.child),t;case 6:return null===e&&Pa(t),null;case 13:return Za(e,t,n);case 4:return Lo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Po(t,null,r,n):xa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,La(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 7:return xa(e,t,t.pendingProps,n),t.child;case 8:case 12:return xa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var c=t.type._context;if(fi(Xi,c._currentValue),c._currentValue=o,null!==s)if(c=s.value,0===(o=Br(c,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(c,o):1073741823))){if(s.children===i.children&&!gi.current){t=Xa(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var u=c.dependencies;if(null!==u){s=c.child;for(var l=u.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===c.tag&&((l=po(n,null)).tag=2,fo(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),oo(c.return,n),u.expirationTime<n&&(u.expirationTime=n);break}l=l.next}}else s=10===c.tag&&c.type===t.type?null:c.child;if(null!==s)s.return=c;else for(s=c;null!==s;){if(s===t){s=null;break}if(null!==(c=s.sibling)){c.return=s.return,s=c;break}s=s.return}c=s}xa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(i=so(i,o.unstable_observedBits)),t.effectTag|=1,xa(e,t,r,n),t.child;case 14:return o=Ji(i=t.type,t.pendingProps),ja(e,t,i,o=Ji(i.type,o),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ji(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,bi(r)?(e=!0,_i(t)):e=!1,ao(t,n),Co(t,r,i),Oo(t,r,i,n),Ka(null,t,r,!0,e,n);case 19:return Ja(e,t,n)}throw Error(a(156,t.tag))};var Lc=null,jc=null;function Uc(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 Fc(e,t,n,r){return new Uc(e,t,n,r)}function zc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bc(e,t){var n=e.alternate;return null===n?((n=Fc(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 Kc(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)zc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case ne:return Hc(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=Fc(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case ue:return(e=Fc(13,n,t,i)).type=ue,e.elementType=ue,e.expirationTime=o,e;case le:return(e=Fc(19,n,t,i)).elementType=le,e.expirationTime=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case ce:s=11;break e;case de:s=14;break e;case pe:s=16,r=null;break e;case fe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fc(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Hc(e,t,n,r){return(e=Fc(7,e,r,t)).expirationTime=n,e}function Wc(e,t,n){return(e=Fc(6,e,null,t)).expirationTime=n,e}function qc(e,t,n){return(t=Fc(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vc(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 $c(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Gc(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 Zc(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))}function Qc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Yc(e,t,n,r){var i=t.current,o=sc(),s=vo.suspense;o=cc(o,i,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(bi(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(a(171))}if(1===n.tag){var u=n.type;if(bi(u)){n=Ci(n,u,c);break e}}n=c}else n=hi;return null===t.context?t.context=n:t.pendingContext=n,(t=po(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fo(i,t),uc(i,o),o}function Jc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Xc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function eu(e,t){Xc(e,t),(e=e.alternate)&&Xc(e,t)}function tu(e,t,n){var r=new Vc(e,t,n=null!=n&&!0===n.hydrate),i=Fc(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,uo(i),e[Rn]=r.current,n&&0!==t&&function(e,t){var n=Ye(t);Et.forEach((function(e){ft(e,t,n)})),It.forEach((function(e){ft(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function nu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ru(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Jc(a);s.call(e)}}Yc(t,a,e,i)}else{if(o=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 tu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var c=i;i=function(){var e=Jc(a);c.call(e)}}gc((function(){Yc(t,a,e,i)}))}return Jc(a)}function iu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nu(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}tu.prototype.render=function(e){Yc(e,this._internalRoot,null,null)},tu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yc(null,e,null,(function(){t[Rn]=null}))},ht=function(e){if(13===e.tag){var t=Yi(sc(),150,100);uc(e,t),eu(e,t)}},mt=function(e){13===e.tag&&(uc(e,3),eu(e,3))},gt=function(e){if(13===e.tag){var t=sc();uc(e,t=cc(t,e,null)),eu(e,t)}},T=function(e,t,n){switch(t){case"input":if(Ee(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=Nn(r);if(!i)throw Error(a(90));Se(r),Ee(r,i)}}}break;case"textarea":De(e,n);break;case"select":null!=(t=n.value)&&Pe(e,!!n.multiple,t,!1)}},N=mc,x=function(e,t,n,r,i){var o=js;js|=4;try{return Vi(98,e.bind(null,t,n,r,i))}finally{(js=o)===As&&Zi()}},L=function(){(js&(1|Ps|Rs))===As&&(function(){if(null!==rc){var e=rc;rc=null,e.forEach((function(e,t){Qc(t,e),pc(t)})),Zi()}}(),Rc())},j=function(e,t){var n=js;js|=2;try{return e(t)}finally{(js=n)===As&&Zi()}};var ou={Events:[Dn,Mn,Nn,I,_,Bn,function(e){rt(e,zn)},D,M,Qt,at,Rc,{current:!1}]};!function(e){var t=e.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);Lc=function(e){try{t.onCommitFiberRoot(n,e,void 0,64===(64&e.current.effectTag))}catch(r){}},jc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}}(i({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:kn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ou,t.createPortal=iu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if((js&(Ps|Rs))!==As)throw Error(a(187));var n=js;js|=1;try{return Vi(99,e.bind(null,t))}finally{js=n,Zi()}},t.hydrate=function(e,t,n){if(!nu(t))throw Error(a(200));return ru(null,e,t,!0,n)},t.render=function(e,t,n){if(!nu(t))throw Error(a(200));return ru(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!nu(e))throw Error(a(40));return!!e._reactRootContainer&&(gc((function(){ru(null,null,e,!1,(function(){e._reactRootContainer=null,e[Rn]=null}))})),!0)},t.unstable_batchedUpdates=mc,t.unstable_createPortal=function(e,t){return iu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return ru(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(876)},function(e,t,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,u=null,l=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(n){throw setTimeout(l,0),n}},d=Date.now();t.unstable_now=function(){return Date.now()-d},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(l,0))},i=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,f=window.Date,h=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 p&&"function"===typeof p.now)t.unstable_now=function(){return p.now()};else{var v=f.now();t.unstable_now=function(){return f.now()-v}}var y=!1,b=null,w=-1,S=5,C=0;a=function(){return t.unstable_now()>=C},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"):S=0<e?Math.floor(1e3/e):5};var _=new MessageChannel,O=_.port2;_.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();C=e+S;try{b(!0,e)?O.postMessage(null):(y=!1,b=null)}catch(n){throw O.postMessage(null),n}}else y=!1},r=function(e){b=e,y||(y=!0,O.postMessage(null))},i=function(e,n){w=h((function(){e(t.unstable_now())}),n)},o=function(){m(w),w=-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 I(e){return void 0===(e=e[0])?null:e}function A(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 o=2*(r+1)-1,a=e[o],s=o+1,c=e[s];if(void 0!==a&&0>T(a,n))void 0!==c&&0>T(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,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 P=[],R=[],k=1,D=null,M=3,N=!1,x=!1,L=!1;function j(e){for(var t=I(R);null!==t;){if(null===t.callback)A(R);else{if(!(t.startTime<=e))break;A(R),t.sortIndex=t.expirationTime,E(P,t)}t=I(R)}}function U(e){if(L=!1,j(e),!x)if(null!==I(P))x=!0,r(F);else{var t=I(R);null!==t&&i(U,t.startTime-e)}}function F(e,n){x=!1,L&&(L=!1,o()),N=!0;var r=M;try{for(j(n),D=I(P);null!==D&&(!(D.expirationTime>n)||e&&!a());){var s=D.callback;if(null!==s){D.callback=null,M=D.priorityLevel;var c=s(D.expirationTime<=n);n=t.unstable_now(),"function"===typeof c?D.callback=c:D===I(P)&&A(P),j(n)}else A(P);D=I(P)}if(null!==D)var u=!0;else{var l=I(R);null!==l&&i(U,l.startTime-n),u=!1}return u}finally{D=null,M=r,N=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=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(){x||N||(x=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return M},t.unstable_getFirstCallbackNode=function(){return I(P)},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=B,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,a){var s=t.unstable_now();if("object"===typeof a&&null!==a){var c=a.delay;c="number"===typeof c&&0<c?s+c:s,a="number"===typeof a.timeout?a.timeout:z(e)}else a=z(e),c=s;return e={id:k++,callback:n,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>s?(e.sortIndex=c,E(R,e),null===I(P)&&e===I(R)&&(L?o():L=!0,i(U,c-s))):(e.sortIndex=a,E(P,e),x||N||(x=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=I(P);return n!==D&&null!==D&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<D.expirationTime||a()},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(878);Object(r.a)(Object(r.b)(),{"Application.Title":"iCloud","IndexFile.Meta.Description":"Log in to iCloud to access your photos, mail, notes, documents and more. Sign in with your Apple Account or create a new account to start using Apple services.","Calendar.Application.Title":"Calendar - Apple iCloud","Calendar.IndexFile.Meta.Description":"Organize your time, schedule events and share calendars with Calendar on the web. Changes will sync across your devices with iCloud.","Contacts.Application.Title":"Contacts - Apple iCloud","Contacts.IndexFile.Meta.Description":"View and edit your contacts with Contacts on the web. Changes will sync across your devices with iCloud.","Find.Application.Title":"Find Devices - Apple iCloud","Find.IndexFile.Meta.Description":"Find your Apple devices like iPhone, Apple Watch, AirPods and more with Find My. Play sound, activate Lost Mode, or locate devices from your Family Sharing group.","iCloudDrive.Application.Title":"iCloud Drive - Apple iCloud","iCloudDrive.IndexFile.Meta.Description":"Store, organize and collaborate on files and folders with iCloud Drive. Easily upload, delete or recover files. Changes will sync across your devices with iCloud.","iCloudPlus.Application.Title":"iCloud+ (Plus) - Apple iCloud","iCloudPlus.IndexFile.Meta.Description":"Upgrade to iCloud+ (Plus) to get more storage and premium features like iCloud Private Relay, Hide My Email, and HomeKit Secure Video.","Keynote.Application.Title":"Keynote - Apple iCloud","Keynote.IndexFile.Meta.Description":"Create, edit, collaborate and share Keynote presentations with Keynote on the web. Changes will sync across your devices with iCloud.","Mail.Application.Title":"iCloud Mail - Apple iCloud","Mail.IndexFile.Meta.Description":"View and send mail from your iCloud email address on the web. Sign in or create a new account to get started.","Notes.Application.Title":"Notes - Apple iCloud","Notes.IndexFile.Meta.Description":"View, edit, create and share your notes with Notes on the web. Changes will sync across your devices with iCloud.","Numbers.Application.Title":"Numbers - Apple iCloud","Numbers.IndexFile.Meta.Description":"Create, edit, collaborate and share spreadsheets with Numbers on the web. Changes will sync across your devices with iCloud.","Pages.Application.Title":"Pages - Apple iCloud","Pages.IndexFile.Meta.Description":"Create, edit, collaborate and share documents with Pages on the web. Changes will sync across your devices with iCloud.","Photos.Application.Title":"iCloud Photos - Apple iCloud","Photos.IndexFile.Meta.Description":"View, organize, and share photos and videos with iCloud Photos on the web. Changes will sync across your devices with iCloud.","Plan.Application.Title":"iCloud Plan - Apple iCloud","Plan.IndexFile.Meta.Description":"Learn about iCloud+ plans and choose what’s right for you. Compare prices, storage, access to premium features and more.","Recovery.Application.Title":"iCloud Recovery - Apple iCloud","Recovery.IndexFile.Meta.Description":"Recover files deleted from both iCloud Drive and other apps within the last 30 days, or restore an earlier version of your Calendar, Contacts and Safari bookmarks.","Reminders.Application.Title":"Reminders - Apple iCloud","Reminders.IndexFile.Meta.Description":"Create and view your reminders with Reminders on the web. Changes will sync across your devices with iCloud.","Settings.Application.Title":"Settings - Apple iCloud","Settings.IndexFile.Meta.Description":"Easily update your Apple Account information and personalize your iCloud plan and settings. Get quick access to helpful links and more.","Storage.Application.Title":"Storage - Apple iCloud","Storage.IndexFile.Meta.Description":"Log in to iCloud.com to view your iCloud Storage usage, check your family’s usage and learn how to upgrade.","Invites.Application.Title":"Apple Invites - Apple iCloud","Invites.IndexFile.Meta.Description":"Create online party invitations - for birthdays, graduations, baby showers & more. Track RSVPs, create shared albums, and send instantly by email or text.","AccountMenuPopover.Settings":"Account Settings","AccountMenuPopover.ManageAppleId":"Manage Apple Account","AccountMenuPopover.SignOut":"Sign Out","VoiceOver.Menu.Close":"Close menu","VoiceOver.Close":"Close","AccountMenuPopover.Button.AriaLabel":"Account","AccountTilePopover.Button.Text":"There was a problem loading your Apple Account picture.","HelpMenu.UserGuide":"iCloud User Guide","HelpMenu.AriaLabel":"Apple Support Page (opens in new tab)","IDMSAuthWidget.SignInLabel":"Sign in to iCloud","VoiceOver.HomePage":"iCloud.com Home Page","VoiceOver.HomePage.CustomizationMode":"Customizing Home Page: iCloud.com Home Page","ProfileCard.PlanType.MAID":"Managed Apple Account","ProfileCard.PlanType.WebOnly":"iCloud Web-Only","ProfileCard.PlanType.Standard":"iCloud","ProfileCard.PlanType.Plus":"iCloud+","VoiceOver.ProfileCard.Heading":"Account Information","Avatar.ImageAlt":"Your profile Image","ImagePicker.CancelButtonLabel":"Cancel","ImagePicker.DoneButtonLabel":"Save","ImagePicker.CompactDoneButtonLabel":"Save Changes","ImagePicker.ChangeImageButtonLabel":"Browse your device for a new image…","ImagePicker.Alert.Title.UnsupportedFileType":"Invalid Image Format","ImagePicker.Alert.Title.FileTooLarge":"Could Not Upload Photo","ImagePicker.Alert.Title.Generic":"Could Not Upload Photo","ImagePicker.Alert.Description.UnsupportedFileType":"Make sure the format of your photo is JPEG, GIF, PNG, or BMP.","ImagePicker.Alert.Description.FileTooLarge":"The image you are trying to upload is too large. Maximum file size allowed is 10 MB.","ImagePicker.Alert.Description.Generic":"Please try again.","ImagePicker.Alert.Action.Ok":"OK","ImagePicker.Instructions":"To replace your Apple Account photo, drag an image onto the box or browse your device.","ImagePicker.Title":"Change Apple Account Photo","ImagePicker.ErrorImageFailedToLoad":"Couldn’t load the image","ImagePicker.DropZoneLabel":"Drop Here","ImagePicker.ZoomControl.ZoomLabel":"Zoom","ImagePicker.RotationControl.RotateLabel":"Rotate","VoiceOver.ImagePicker.ZoomControl.ZoomControlAriaLabel":"Adjust zoom level","VoiceOver.ImagePicker.RotationControl.RotateLabel":"Rotate","VoiceOver.ImagePicker.LoadingAriaLabel":"Loading image","VoiceOver.ImagePicker.CloseButtonLabel":"Cancel","HomeTile.Loading":"Loading","HomeTile.NotLoaded":"—","HomeTile.Error":"Error","VoiceOver.HomeTile.LoadingComplete":"Loading Complete","VoiceOver.HomeTile.LongPressOpenQuickAction":"Long press to open quick action menu.","VoiceOver.QuickActionMenu.ButtonAriaLabel":"%{actionLabel}. Quick action button for item %{tileRowSummaryAriaLabel}","Tile.Edit":"Edit","VoiceOver.Tile.EditAriaLabel":"Edit %{tileName} tile","VoiceOver.Tile.RemoveAriaLabel":"Remove %{tileName} tile","ErrorHomeTileContent.Message":"There was a problem loading this content.","ErrorHomeTileContent.TryAgain":"Try Again","ErrorHomeTileContent.OpenApp":"Open %{appName}","DeletedErrorTileContent.Mail.Message":"Previously selected folder has been deleted.","DeletedErrorTileContent.Reminders.Message":"Previously selected list has been deleted.","DeletedErrorTileContent.Drive.Message":"Previously selected folder has been deleted.","DeletedErrorTileContent.Photos.Message":"Previously selected album has been deleted.","DeletedErrorTileContent.Notes.Message":"Previously selected folder has been deleted.","DeletedErrorTileContent.Calendar.Message":"Previously selected calendar has been deleted.","DeletedErrorTileContent.Calendar.Multiple.Message":"Previously selected calendars has been deleted.","InvitesHomeTile.Title":"Upcoming Event","MailHomeTile.Heading":"Mail","MailHomeTile.SelectedFolderDeleted.ActionName":"Show Inbox","MailHomeTile.TotalNumber.Zero":"%{mailboxName} • No unread messages","MailHomeTile.TotalNumber.One":"%{mailboxName} • 1 unread message","MailHomeTile.TotalNumber.Two":"%{mailboxName} • 2 unread messages","MailHomeTile.TotalNumber.Many":"%{mailboxName} • %{count} unread messages","MailHomeTile.TotalNumber.Loading":"Loading…","MailHomeTile.EmptyContent":"No messages","MailHomeTile.SetUp":"Set Up","MailHomeTile.SetUpTitle":"Set Up iCloud Mail","MailHomeTile.SetUpMessage":"Private, secure, and personal email from Apple.","VoiceOver.MailHomeTile.PrimaryActionDescription":"New Message","VoiceOver.InvitesHomeTile.PrimaryActionDescription":"New Invite","VoiceOver.MailHomeTile.Messages":"Messages","MailHomeTile.TilePicker.Name":"List of mail folders","MailHomeTile.TilePicker.LastSelected.Name":"List of last selected children mail folders","MailHomeTile.TilePicker.Inbox.Label":"Inbox","MailHomeTile.TilePicker.Category.Primary.Label":"Primary","MailHomeTile.TilePicker.Category.Transactions.Label":"Transactions","MailHomeTile.TilePicker.Category.Promotions.Label":"Promotions","MailHomeTile.TilePicker.Category.Updates.Label":"Updates","MailHomeTile.TilePicker.VIP.Label":"VIP","MailHomeTile.TilePicker.Folder.Label":"Folders","MailHomeTile.TilePicker.Categories.Label":"Categories","MailHomeTile.FilterPicker.Name":"List of filter collections","MailHomeTile.FilterPicker.Item.Unread":"Unread","MailHomeTile.FilterPicker.Item.Flagged":"Flagged","MailHomeTile.FilterPicker.Item.ToMe":"To: Me","MailHomeTile.FilterPicker.Item.CcMe":"Cc: Me","MailHomeTile.FilterPicker.Item.OnlyVIPs":"Only VIPs","MailHomeTile.FilterPicker.Item.OnlyHideMyEmail":"Only Hide My Email","MailHomeTile.FilterPicker.Filters.Many":"%{filterCount} filters","MailHomeTile.QuickAction.MarkAsRead.One":"Mark as Read","MailHomeTile.QuickAction.MarkAsRead.Many":"Mark as Read (%{count})","MailHomeTile.QuickAction.MarkAsUnread.One":"Mark as Unread","MailHomeTile.QuickAction.MarkAsUnread.Many":"Mark as Unread (%{count})","MailHomeTile.QuickAction.Flag.One":"Flag","MailHomeTile.QuickAction.Flag.Many":"Flag %{count} messages","MailHomeTile.QuickAction.Unflag.One":"Unflag","MailHomeTile.QuickAction.Unflag.Many":"Unflag %{count} messages","MailHomeTile.QuickAction.Delete.One":"Delete","MailHomeTile.QuickAction.Delete.Many":"Delete %{count} messages","MailHomeTile.QuickAction.MoveToJunk.One":"Move to Junk","MailHomeTile.QuickAction.MoveToJunk.Many":"Move to Junk (%{count})","MailHomeTile.QuickAction.Error.MarkAsRead.Title":"Cannot Mark Message As Read","MailHomeTile.QuickAction.Error.MarkAsRead.Description":"One or more messages cannot be marked as read at this time. Try again later.","MailHomeTile.QuickAction.Error.MarkAsUnread.Title":"Cannot Mark Message As Unread","MailHomeTile.QuickAction.Error.MarkAsUnread.Description":"One or more messages cannot be marked as unread at this time. Try again later.","MailHomeTile.QuickAction.Error.Flag.Title":"Cannot Flag Message","MailHomeTile.QuickAction.Error.Flag.Description":"One or more messages cannot be flagged at this time. Try again later.","MailHomeTile.QuickAction.Error.Unflag.Title":"Cannot Unflag Message","MailHomeTile.QuickAction.Error.Unflag.Description":"One or more messages cannot be unflagged at this time. Try again later.","MailHomeTile.QuickAction.Error.Delete.Title":"Cannot Delete Message","MailHomeTile.QuickAction.Error.Delete.Description":"One or more messages cannot be deleted at this time. Try again later.","MailHomeTile.QuickAction.Error.MoveToJunk.Title":"Cannot Move Message to Junk","MailHomeTile.QuickAction.Error.MoveToJunk.Description":"One or more messages cannot be moved to junk at this time. Try again later.","MailHomeTile.QuickAction.Error.OK":"OK","Notification.Description.EVENT_REQUEST":"Invitation from %{organizer}.","Notification.Description.EVENT_UPDATE":"Updated by %{organizer}.","Notification.Description.EVENT_CANCEL":"Event was cancelled.","Notification.Description.EVENT_REPLY_ACCEPTED":"%{invitee} accepted your invitation.","Notification.Description.EVENT_REPLY_TENTATIVE":"%{invitee} replied “Maybe” to your invitation.","Notification.Description.EVENT_REPLY_DECLINED":"%{invitee} declined your invitation.","Notification.Description.CALENDAR_REQUEST":"Invitation to share a calendar with %{organizer}.","Notification.Description.CALENDAR_CANCEL":"Calendar is no longer shared.","Notification.Description.CALENDAR_PUBLIC":"Calendar is now public.","Notification.Description.CALENDAR_REPLY":"%{invitee} joined your shared calendar.","Notification.Description.CALENDAR_ACCEPTED":"%{invitee} joined your shared calendar.","Notification.Description.CALENDAR_DECLINED":"%{invitee} declined this shared calendar invitation.","Notification.Description.CALENDAR_RESOURCE_CREATE":"Added to %{calendar} by %{person}.","Notification.Description.CALENDAR_RESOURCE_DELETE":"Deleted from %{calendar} by %{person}.","Notification.Description.CALENDAR_RESOURCE_UPDATE":"Changed in %{calendar} by %{person}.","VoiceOver.MailHomeRow.Summary.AriaLabel.Message":"%{from} %{subject} on %{time}","VoiceOver.MailHomeRow.Unread":"Unread","VoiceOver.MailHomeRow.HasAttachment":"Attachment","VoiceOver.MailHomeRow.Flagged":"Flagged","VoiceOver.MailHomeRow.MessageCount":"%{count} message conversation","VoiceOver.MailHomeRow.OpenEmail":"Tap to go to email from %{from}.","NotesHomeTile.Heading":"Notes","NotesHomeTile.TotalNumber.Description":"All iCloud","NotesHomeTile.Pinned.Description":"Pinned","NotesHomeTile.SelectedFolderDeleted.ActionName":"Show All iCloud","NotesHomeTile.TotalNumber.Loading":"Loading…","VoiceOver.NotesHomeTile.PrimaryActionDescription":"New Note","VoiceOver.NotesHomeTile.Notes":"Notes","NotesHomeTileEmpty.Create.Short":"Create your first note","NotesHomeTile.EmptyContent":"No notes","NotesHomeRow.QuickAction.Delete":"Delete Note","NotesHomeRow.QuickAction.Pin":"Pin Note","NotesHomeRow.QuickAction.Unpin":"Unpin Note","NotesHomeRow.QuickAction.SharedNoteDeletionConfirmation.Title":"Delete this shared note?","NotesHomeRow.QuickAction.SharedNoteDeletionConfirmation.Description":"If you delete this shared note, other people will no longer have access, and it will be deleted on all of their devices.","NotesHomeRow.QuickAction.SharedNoteDeletionConfirmation.Buttons.Ok":"OK","NotesHomeRow.QuickAction.SharedNoteDeletionConfirmation.Buttons.Cancel":"Cancel","NotesHomeRow.QuickAction.Error.Title":"Cannot Delete Note","NotesHomeRow.QuickAction.Error.Title.Pin":"Cannot Pin Note","NotesHomeRow.QuickAction.Error.Title.Unpin":"Cannot Unpin Note","NotesHomeRow.QuickAction.Error.Description":"One or more notes cannot be deleted at this time. Try again later.","NotesHomeRow.QuickAction.Error.Description.Pin":"One or more notes cannot be pinned at this time. Try again later.","NotesHomeRow.QuickAction.Error.Description.Unpin":"One or more notes cannot be unpinned at this time. Try again later.","NotesHomeRow.QuickAction.Error.OK":"OK","NotesHomeRow.QuickAction.FirstDeletionAlert.Title":"Deleted notes are moved to the Recently Deleted folder","NotesHomeRow.QuickAction.FirstDeletionAlert.Description":"Notes are available for 30 days. After that time, notes will be permanently deleted. This may take up to 40 days.","NotesHomeRow.QuickAction.FirstDeletionAlert.OK":"OK","NotesHomeTile.TilePicker.Name":"List of notes folders","VoiceOver.NotesHomeRow.Summary.AriaLabel":"%{isShared}%{title} %{snippet} on %{time}","VoiceOver.NotesHomeRow.Shared":"Shared","VoiceOver.NotesHomeRow.Locked":"Locked","VoiceOver.NotesHomeRow.OpenNote":"Tap to go to %{title} note.","RemindersHomeTile.Heading":"Reminders","RemindersHomeTile.CreateFirst.TotalNumber.Zero":"All iCloud","RemindersHomeTile.SelectedFolderDeleted.ActionName":"Show All iCloud","RemindersHomeTile.TotalNumber.Zero":"%{reminderListName} • No Reminders","RemindersHomeTile.TotalNumber.One":"%{reminderListName} • 1 Reminder","RemindersHomeTile.TotalNumber.Two":"%{reminderListName} • 2 Reminders","RemindersHomeTile.TotalNumber.Many":"%{reminderListName} • %{count} Reminders","RemindersHomeTile.TotalNumber.Loading":"Loading…","VoiceOver.RemindersHomeTile.PrimaryActionDescription":"New Reminder","VoiceOver.RemindersHomeTile.Reminders":"Reminders","RemindersHomeTileEmpty.Create":"Create your first reminder in Reminders for iCloud","RemindersHomeTileEmpty.Create.Short":"Create your first reminder","RemindersHomeTile.NoReminders":"No Reminders","RemindersHomeTile.Completed":"All Items Completed","RemindersHomeTile.TilePicker.AriaLabel":"List of reminders lists","RemindersHomeTile.TilePicker.AlliCloud":"All iCloud","RemindersTile.Date.Yesterday":"Yesterday","RemindersTile.Date.Yesterday.Time":"Yesterday, %{time}","RemindersTile.Date.Today.Time":"Today, %{time}","RemindersTile.Date.Today":"Today","RemindersTile.Date.Tomorrow":"Tomorrow","RemindersTile.Date.Tomorrow.Time":"Tomorrow, %{time}","VoiceOver.RemindersHomeRow.Summary.AriaLabel.Scheduled":"%{title} due %{date}","VoiceOver.RemindersHomeRow.Summary.AriaLabel.NotScheduled":"%{title}","VoiceOver.RemindersHomeRow.OpenReminder":"Tap to go to %{title} reminder.","VoiceOver.RemindersHomeRow.ReminderCheckmark.AriaLabel":"Mark as completed","VoiceOver.RemindersRowCompleteButton.AriaLabel":"Mark as complete, %{title}","VoiceOver.RemindersRow.Flag.AriaLabel":"Flagged","RemindersHomeTile.QuickAction.MarkAsComplete":"Mark as complete","RemindersHomeTile.QuickAction.Flag":"Flag","RemindersHomeTile.QuickAction.Unflag":"Unflag","RemindersHomeTile.QuickAction.Error.MarkAsComplete.Title":"Cannot Complete Reminder","RemindersHomeTile.QuickAction.Error.MarkAsComplete.Description":"One or more reminders cannot be completed at this time. Try again later.","RemindersHomeTile.QuickAction.Error.Flag.Title":"Cannot Flag Reminder","RemindersHomeTile.QuickAction.Error.Flag.Description":"One or more reminders cannot be flagged at this time. Try again later.","RemindersHomeTile.QuickAction.Error.Unflag.Title":"Cannot Unflag Reminder","RemindersHomeTile.QuickAction.Error.Unflag.Description":"One or more reminders cannot be unflagged at this time. Try again later.","RemindersHomeTile.QuickAction.Error.OK":"OK","NumbersHomeTile.Heading":"Numbers","NumbersHomeTile.CreateFirst.TotalNumber.Zero":"All iCloud","NumbersHomeTile.TotalNumber.Zero":"%{numbersListName} • No Spreadsheets","NumbersHomeTile.TotalNumber.One":"%{numbersListName} • 1 Spreadsheet","NumbersHomeTile.TotalNumber.Two":"%{numbersListName} • 2 Spreadsheets","NumbersHomeTile.TotalNumber.Many":"%{numbersListName} • %{count} Spreadsheets","VoiceOver.NumbersHomeTile.PrimaryActionDescription":"New Spreadsheet","VoiceOver.NumbersHomeTile.Spreadsheets":"Spreadsheets","NumbersHomeTileEmpty.Create.Short":"Create your first spreadsheet","NumbersHomeTile.TilePicker.Name":"List of Numbers folders","PagesHomeTile.Heading":"Pages","PagesHomeTile.CreateFirst.TotalNumber.Zero":"All iCloud","PagesHomeTile.TotalNumber.Zero":"%{pagesListName} • No Documents","PagesHomeTile.TotalNumber.One":"%{pagesListName} • 1 Document","PagesHomeTile.TotalNumber.Two":"%{pagesListName} • 2 Documents","PagesHomeTile.TotalNumber.Many":"%{pagesListName} • %{count} Documents","VoiceOver.PagesHomeTile.PrimaryActionDescription":"New Page","VoiceOver.PagesHomeTile.Documents":"Documents","PagesHomeTileEmpty.Create.Short":"Create your first document","PagesHomeTile.TilePicker.Name":"List of Pages folders","KeynoteHomeTile.Heading":"Keynote","KeynoteHomeTile.CreateFirst.TotalNumber.Zero":"All iCloud","KeynoteHomeTile.TotalNumber.Zero":"%{keynoteListName} • No Presentations","KeynoteHomeTile.TotalNumber.One":"%{keynoteListName} • 1 Presentation","KeynoteHomeTile.TotalNumber.Two":"%{keynoteListName} • 2 Presentations","KeynoteHomeTile.TotalNumber.Many":"%{keynoteListName} • %{count} Presentations","VoiceOver.KeynoteHomeTile.PrimaryActionDescription":"New Presentation","VoiceOver.KeynoteHomeTile.Keynotes":"Presentations","KeynoteHomeTileEmpty.Create.Short":"Create your first presentation","KeynoteHomeTile.TilePicker.Name":"List of Keynote folders","IWorkHomeTile.TilePicker.AlliCloud":"All iCloud","IWorkHomeTile.TilePicker.SharedByMe":"Shared by Me","IWorkHomeTile.TilePicker.SharedByOthers":"Shared by Others","DriveHomeTile.Heading":"Drive","DriveHomeTile.Description":"All Files","DriveHomeTile.SelectedFolderDeleted.ActionName":"Show Recents","DriveHomeTile.FoldersPicker.Folder.Label":"Folders","DriveHomeTile.FoldersPicker.MenuItem.Label":"Open %{foldersName} in Drive","DriveHomeTile.TileCustomization.List.Name":"List of drive folders","DriveHomeTile.TileCustomization.List.RecentFiles":"Recents","DriveHomeTile.TileCustomization.List.Favorites":"Favorites","VoiceOver.DriveHomeTile.Documents":"Documents","VoiceOver.DriveHomeTile.FoldersList.Close":"Close Folders List","DriveHomeTileEmpty.Create":"Upload your first file","DriveHomeTileEmpty.Create.File":"Upload file","DriveHomeTileEmpty.Folder":"No files in this folder.","DriveHomeTileEmpty.FoldersList.Count.MoreThanTen":"10+","DriveHomeTile.Folders.Button.AriaLabel.TotalNumber.Zero":"No folders","DriveHomeTile.Folders.Button.AriaLabel.TotalNumber.One":"1 folder","DriveHomeTile.Folders.Button.AriaLabel.TotalNumber.Two":"2 folders","DriveHomeTile.Folders.Button.AriaLabel.TotalNumber.Many":"%{count} folders","DriveHomeTile.Folders.Button.AriaLabel.TotalNumber.MoreThanTen":"More than ten folders","DriveHomeTileEmpty.FoldersList.ViewAllInDrive":"View all folders in Drive","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.Title":"Are you sure you want to delete this shared file?","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.ShareToMe.Description":"It will be deleted from iCloud Drive on all of your devices. To rejoin this shared file, use the link you were invited with.","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.InSharedFolder.Description":"If you delete this file, other people will no longer have access to it and it will be deleted from iCloud Drive on all of their devices.","DriveHomeTile.QuickAction.SharedIWorkFileDeletionConfirmation.Title":"Are you sure you want to delete this shared %{data}?","DriveHomeTile.QuickAction.SharedIWorkFileDeletionConfirmation.ShareToMe.Description":"It will be deleted from iCloud Drive on all of your devices. To rejoin this shared %{data}, use the link you were invited with.","DriveHomeTile.QuickAction.SharedIWorkFileDeletionConfirmation.InSharedFolder.Description":"If you delete this %{data}, other people will no longer have access to it and it will be deleted from iCloud Drive on all of their devices.","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.Buttons.Ok":"Delete","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.Buttons.Cancel":"Cancel","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.InSharedFolder.Title.OneTimeOnly":"Deleted shared items are moved to your Recently Deleted folder, and other people will no longer have access to them.","DriveHomeTile.QuickAction.SharedFileDeletionConfirmation.InSharedFolder.Description.OneTimeOnly":"You can recover or remove from Recently Deleted within 30 days.","DriveHomeTile.QuickAction.Error.Title":"Cannot Delete File","DriveHomeTile.QuickAction.Error.Description":"One or more files cannot be deleted at this time. Try again later.","DriveHomeTile.QuickAction.Error.OK":"OK","DriveHomeTile.ErrorContent.NeedsUpdate":"Launch iCloud Drive to update.","FileIcon.FileType.aac":"AAC audio","FileIcon.FileType.abbu":"Contacts Archive File","FileIcon.FileType.ai":"Adobe Illustrator Document","FileIcon.FileType.aiff":"AIFF-C Audio","FileIcon.FileType.apk":"Android Application","FileIcon.FileType.app":"Application","FileIcon.FileType.avi":"AVI movie","FileIcon.FileType.band":"GarageBand Project","FileIcon.FileType.bat":"Batch File","FileIcon.FileType.bin":"MacBinary archive","FileIcon.FileType.blend":"Blend File","FileIcon.FileType.bmp":"Windows bitmap image","FileIcon.FileType.c":"C source code","FileIcon.FileType.c4d":"Cinema 4D File","FileIcon.FileType.class":"Java class","FileIcon.FileType.cpp":"C++ source code","FileIcon.FileType.css":"Cascading Style Sheet","FileIcon.FileType.cer":"Certificate","FileIcon.FileType.csv":"comma-separated values","FileIcon.FileType.dae":"Collada","FileIcon.FileType.dmg":"Disk Image","FileIcon.FileType.dng":"Adobe raw image","FileIcon.FileType.doc":"Microsoft Word 97-2004 document","FileIcon.FileType.docx":"Office Open XML word processing document","FileIcon.FileType.dxf":"AutoCAD DXF File","FileIcon.FileType.eps":"Encapsulated PostScript","FileIcon.FileType.exe":"Microsoft Windows application","FileIcon.FileType.fbx":"Filmbox File","FileIcon.FileType.gif":"Graphics Interchange Format","FileIcon.FileType.gz":"GZip archive","FileIcon.FileType.h":"C header code","FileIcon.FileType.hqx":"BinHex archive","FileIcon.FileType.htm":"HTML text","FileIcon.FileType.epub":"Electronic Publication (EPUB)","FileIcon.FileType.ibooks":"Electronic Publication (Apple Books)","FileIcon.FileType.icns":"Apple icon image","FileIcon.FileType.ico":"Windows icon image","FileIcon.FileType.ics":"ICS File","FileIcon.FileType.indd":"Adobe InDesign Document","FileIcon.FileType.ipa":"iOS App","FileIcon.FileType.iso":"ISO Disk Image","FileIcon.FileType.java":"Java source code","FileIcon.FileType.jpg":"JPEG image","FileIcon.FileType.js":"JavaScript","FileIcon.FileType.key":"Keynote Presentation","FileIcon.FileType.keychain":"keychain","FileIcon.FileType.log":"Log File","FileIcon.FileType.m":"Objective-C source code","FileIcon.FileType.m3u":"M3U Playlist","FileIcon.FileType.m4a":"Apple MPEG-4 audio","FileIcon.FileType.m4p":"protected MPEG-4 audo","FileIcon.FileType.m4r":"Ringtone","FileIcon.FileType.m4v":"Apple MPEG-4 movie","FileIcon.FileType.mid":"Midi audio","FileIcon.FileType.qt":"QuickTime movie","FileIcon.FileType.mp3":"MP3 Audio","FileIcon.FileType.mp4":"MPEG-4 movie","FileIcon.FileType.mpeg":"MPEG movie","FileIcon.FileType.numbers":"Numbers Spreadsheet","FileIcon.FileType.obj":"Wavefront 3D Object File","FileIcon.FileType.otf":"PostScript® OpenType™ font","FileIcon.FileType.pages":"Pages Document","FileIcon.FileType.pdf":"Portable Document Format (PDF)","FileIcon.FileType.perl":"Perl script","FileIcon.FileType.pkg":"Installer package archive","FileIcon.FileType.png":"PNG image","FileIcon.FileType.pps":"Microsoft PowerPoint 97-2004 slide show","FileIcon.FileType.ppsx":"Office Open XML slide show","FileIcon.FileType.ppt":"Microsoft PowerPoint 97-2004 presentation","FileIcon.FileType.pptx":"Office Open XML presentation","FileIcon.FileType.ps":"PostScript","FileIcon.FileType.psd":"Adobe Photoshop document","FileIcon.FileType.py":"Python script","FileIcon.FileType.rar":"RAR archive","FileIcon.FileType.rtf":"Rich Text File","FileIcon.FileType.safariextz":"Safari extension","FileIcon.FileType.scpt":"Script","FileIcon.FileType.sh":"shell script","FileIcon.FileType.stl":"Stereolithography File","FileIcon.FileType.svg":"scalable vector graphics (SVG)","FileIcon.FileType.swift":"Swift File","FileIcon.FileType.tar":"tar archive","FileIcon.FileType.tiff":"TIFF image","FileIcon.FileType.ttf":"TrueType® OpenType™ font","FileIcon.FileType.txt":"Text","FileIcon.FileType.vcf":"Electronic business card","FileIcon.FileType.wave":"Waveform audio","FileIcon.FileType.wma":"Windows media audio","FileIcon.FileType.wmv":"Windows media","FileIcon.FileType.xcodeproj":"Xcode Project","FileIcon.FileType.xhtml":"XHTML","FileIcon.FileType.xlam":"Microsoft Excel add-in","FileIcon.FileType.xls":"Microsoft Excel 97-2004 worksheet","FileIcon.FileType.xlsx":"Office Open XML spreadsheet","FileIcon.FileType.xml":"XML text","FileIcon.FileType.zip":"ZIP archive","FileIcon.FileType.default":"File icon","EmptyHomeTileContent.LearnMore":"Learn more","DocumentHomeRow.SharedBy":"by %{sharedBy}","DocumentHomeRow.SharedByMe":"by Me","DocumentHomeRow.OpenFileErrorAlert.Title":"Can’t Find File","DocumentHomeRow.OpenFileErrorAlert.Description":"There was a problem accessing %{file}. Try again later.","DocumentHomeRow.OpenFileErrorAlert.OK":"OK","DocumentHomeRow.PrimaryClickMenu.OpenInKeynoteOnWeb":"Open in Keynote on the Web","DocumentHomeRow.PrimaryClickMenu.OpenInPagesOnWeb":"Open in Pages on the Web","DocumentHomeRow.PrimaryClickMenu.OpenInNumbersOnWeb":"Open in Numbers on the Web","DocumentHomeRow.PrimaryClickMenu.QuickLook":"Quick Look","DocumentHomeRow.PrimaryClickMenu.DownloadFile":"Download File","DocumentHomeRow.PrimaryClickMenu.DeleteFile":"Delete File","DocumentHomeRow.PrimaryClickMenu.ViewInDrive":"View in Drive","DocumentHomeRow.PrimaryClickMenu.Open":"Open","DocumentHomeRow.PrimaryClickMenu.Preview.ImageAltLabel":"Preview of file %{name}","VoiceOver.DocumentHomeRow.Summary.SingleShare.AriaLabel":"%{title} on %{time}, 1 share","VoiceOver.DocumentHomeRow.Summary.MultiShares.AriaLabel":"%{title} on %{time}, %{numSharedWith} shares","VoiceOver.DocumentHomeRow.Summary.MissingNumShared.AriaLabel":"%{title} on %{time}, shared","VoiceOver.DocumentHomeRow.Summary.NotShared.AriaLabel":"%{title} on %{time}","VoiceOver.DocumentHomeRow.SingleShare":"1 share","VoiceOver.DocumentHomeRow.MultiShares":"%{numSharedWith} shares","VoiceOver.DocumentHomeRow.MissingNumShared":"shared","VoiceOver.DocumentHomeRow.OpenDocument":"Tap to go to %{title}.","VoiceOver.DocumentHomeRow.OpenPrimaryClickMenu":"Tap to view more options for %{title}.","VoiceOver.DocumentHomeRow.OpensInNewTab.Description":"opens in a new tab","StorageUsage.Message":"%{used} of %{total} used","Utils.BytesToHumanizedFormat.Size.bytes":"%{value} bytes","Utils.BytesToHumanizedFormat.Size.KB":"%{value} KB","Utils.BytesToHumanizedFormat.Size.MB":"%{value} MB","Utils.BytesToHumanizedFormat.Size.GB":"%{value} GB","Utils.BytesToHumanizedFormat.Size.TB":"%{value} TB","Utils.BytesToHumanizedFormat.Size.PB":"%{value} PB","Utils.BytesToHumanizedFormat.Size.EB":"%{value} EB","Utils.BytesToHumanizedFormat.Size.ZB":"%{value} ZB","Utils.BytesToHumanizedFormat.Size.YB":"%{value} YB","Utils.BytesToHumanizedFormat.Size.bytes.Compact":"%{value}bytes","Utils.BytesToHumanizedFormat.Size.KB.Compact":"%{value}KB","Utils.BytesToHumanizedFormat.Size.MB.Compact":"%{value}MB","Utils.BytesToHumanizedFormat.Size.GB.Compact":"%{value}GB","Utils.BytesToHumanizedFormat.Size.TB.Compact":"%{value}TB","Utils.BytesToHumanizedFormat.Size.PB.Compact":"%{value}PB","Utils.BytesToHumanizedFormat.Size.EB.Compact":"%{value}EB","Utils.BytesToHumanizedFormat.Size.ZB.Compact":"%{value}ZB","Utils.BytesToHumanizedFormat.Size.YB.Compact":"%{value}YB","Utils.FormatExtensionByType.Default":"File","SandwichMenu.NavLinks.ToggleIcon":"Toggle the menu for navigation.","SandwichMenu.AriaLabel":"Quick Links","NavLinks.Home":"Home","NavLinks.Home.Label":"Navigate to icloud.com home page","NavLinks.Shared":"Shared","NavLinks.Restore":"Restore","NavLinks.Plan":"Your Plan","NavLinks.Storage":"Your Storage","NavLinks.ICloudPlus":"iCloud+ Features","NavLinks.DataRecovery":"Data Recovery","NavLinks.Settings":"Settings","LongName.NavLinks.Plan":"Your iCloud Plan","LongName.NavLinks.Storage":"Your iCloud Storage","LongName.NavLinks.ICloudPlus":"iCloud+ Features","LongName.NavLinks.DataRecovery":"Data Recovery","LongName.NavLinks.Settings":"Settings","ShortName.NavLinks.Plan":"iCloud Plan","ShortName.NavLinks.Storage":"iCloud Storage","ShortName.NavLinks.ICloudPlus":"iCloud+ Features","ShortName.NavLinks.DataRecovery":"Data Recovery","ShortName.NavLinks.Settings":"Settings","NavLinks.Status":"Status","VoiceOver.NavLinks.OpeningPage":"Now showing %{name} page","VoiceOver.ExternalLink.Description":"(opens in a new tab)","DateTime.Relative.Yesterday":"Yesterday","DateTime.Relative.TodayTime":"Today  %{time}","DateTime.Relative.YesterdayTime":"Yesterday  %{time}","DateTime.Relative.DateTime":"%{date}  %{time}","Note.Empty.Title":"New Note","Note.Empty.Snippet":"No additional text","PhotosHomeTile.Heading":"Photos","VoiceOver.PhotosHomeTile.Photos":"Photos","Media.Count.0.0.0.0":"0 Photos","Media.Count.0.0.1.0":"1 Other Item","Media.Count.0.0.2.0":"2 Other Items","Media.Count.0.0.More.0":"%{otherItemsCount} Other Items","Media.Count.0.1.0.0":"1 Video","Media.Count.0.1.1.0":"1 Video, 1 Other Item","Media.Count.0.1.2.0":"1 Video, 2 Other Items","Media.Count.0.1.More.0":"1 Video, %{otherItemsCount} Other Items","Media.Count.0.2.0.0":"2 Videos","Media.Count.0.2.1.0":"2 Videos, 1 Other Item","Media.Count.0.2.2.0":"2 Videos, 2 Other Items","Media.Count.0.2.More.0":"2 Videos, %{otherItemsCount} Other Items","Media.Count.0.More.0.0":"%{videosCount} Videos","Media.Count.0.More.1.0":"%{videosCount} Videos, 1 Other Item","Media.Count.0.More.2.0":"%{videosCount} Videos, 2 Other Items","Media.Count.0.More.More.0":"%{videosCount} Videos, %{otherItemsCount} Other Items","Media.Count.1.0.0.0":"1 Photo","Media.Count.1.0.1.0":"1 Photo, 1 Other Item","Media.Count.1.0.2.0":"1 Photo, 2 Other Items","Media.Count.1.0.More.0":"1 Photo, %{otherItemsCount} Other Items","Media.Count.1.1.0.0":"1 Photo, 1 Video","Media.Count.1.1.1.0":"1 Photo, 1 Video, 1 Other Item","Media.Count.1.1.2.0":"1 Photo, 1 Video, 2 Other Items","Media.Count.1.1.More.0":"1 Photo, 1 Video, %{otherItemsCount} Other Items","Media.Count.1.2.0.0":"1 Photo, 2 Videos","Media.Count.1.2.1.0":"1 Photo, 2 Videos, 1 Other Item","Media.Count.1.2.2.0":"1 Photo, 2 Videos, 2 Other Items","Media.Count.1.2.More.0":"1 Photo, 2 Videos, %{otherItemsCount} Other Items","Media.Count.1.More.0.0":"1 Photo, %{videosCount} Videos","Media.Count.1.More.1.0":"1 Photo, %{videosCount} Videos, 1 Other Item","Media.Count.1.More.2.0":"1 Photo, %{videosCount} Videos, 2 Other Items","Media.Count.1.More.More.0":"1 Photo, %{videosCount} Videos, %{otherItemsCount} Other Items","Media.Count.2.0.0.0":"2 Photos","Media.Count.2.0.1.0":"2 Photos, 1 Other Item","Media.Count.2.0.2.0":"2 Photos, 2 Other Items","Media.Count.2.0.More.0":"2 Photos, %{otherItemsCount} Other Items","Media.Count.2.1.0.0":"2 Photos, 1 Video","Media.Count.2.1.1.0":"2 Photos, 1 Video, 1 Other Item","Media.Count.2.1.2.0":"2 Photos, 1 Video, 2 Other Items","Media.Count.2.1.More.0":"2 Photos, 1 Video, %{otherItemsCount} Other Items","Media.Count.2.2.0.0":"2 Photos, 2 Videos","Media.Count.2.2.1.0":"2 Photos, 2 Videos, 1 Other Item","Media.Count.2.2.2.0":"2 Photos, 2 Videos, 2 Other Items","Media.Count.2.2.More.0":"2 Photos, 2 Videos, %{otherItemsCount} Other Items","Media.Count.2.More.0.0":"2 Photos, %{videosCount} Videos","Media.Count.2.More.1.0":"2 Photos, %{videosCount} Videos, 1 Other Item","Media.Count.2.More.2.0":"2 Photos, %{videosCount} Videos, 2 Other Items","Media.Count.2.More.More.0":"2 Photos, %{videosCount} Videos, %{otherItemsCount} Other Items","Media.Count.More.0.0.0":"%{photosCount} Photos","Media.Count.More.0.1.0":"%{photosCount} Photos, 1 Other Item","Media.Count.More.0.2.0":"%{photosCount} Photos, 2 Other Items","Media.Count.More.0.More.0":"%{photosCount} Photos, %{otherItemsCount} Other Items","Media.Count.More.1.0.0":"%{photosCount} Photos, 1 Video","Media.Count.More.1.1.0":"%{photosCount} Photos, 1 Video, 1 Other Item","Media.Count.More.1.2.0":"%{photosCount} Photos, 1 Video, 2 Other Items","Media.Count.More.1.More.0":"%{photosCount} Photos, 1 Video, %{otherItemsCount} Other Items","Media.Count.More.2.0.0":"%{photosCount} Photos, 2 Videos","Media.Count.More.2.1.0":"%{photosCount} Photos, 2 Videos, 1 Other Item","Media.Count.More.2.2.0":"%{photosCount} Photos, 2 Videos, 2 Other Items","Media.Count.More.2.More.0":"%{photosCount} Photos, 2 Videos, %{otherItemsCount} Other Items","Media.Count.More.More.0.0":"%{photosCount} Photos, %{videosCount} Videos","Media.Count.More.More.1.0":"%{photosCount} Photos, %{videosCount} Videos, 1 Other Item","Media.Count.More.More.2.0":"%{photosCount} Photos, %{videosCount} Videos, 2 Other Items","Media.Count.More.More.More.0":"%{photosCount} Photos, %{videosCount} Videos, %{otherItemsCount} Other Items","Media.Count.Total.Zero":"0 items","Media.Count.Total.One":"1 item","Media.Count.Total.Two":"2 items","Media.Count.Total.More":"%{count} items","Media.Count.WithListName":"%{selectedLibrary} • %{count}","Media.Count.No.Content":"0 Photos","PhotosHomeTile.TotalNumber.Loading":"Loading…","PhotosHomeTile.EmptyContent":"No photos or videos","PhotosHomeTile.SetUp":"Set Up","PhotosHomeTile.SetUpTitle":"Turn On iCloud Photos","PhotosHomeTile.SetUpMessage":"Turn on iCloud Photos on your iPhone, iPad, iPod touch, or Mac and keep your photos and videos safely stored and up-to date on the web and synced between your devices.","PhotosHomeTile.OpenPhotosApp":"Open Photos App to view your %{selectedItem}","PhotosHomeTile.TileCustomization.BothLibraries.Name":"Both Libraries","PhotosHomeTile.TileCustomization.PersonalLibrary.Name":"Personal Library","PhotosHomeTile.TileCustomization.ShareLibrary.Name":"Shared Library","PhotosHomeTile.TileCustomization.Library.Name":"Library","PhotosHomeTile.TileCustomization.Favorites.Name":"Favorites","PhotosHomeTile.TileCustomization.Recents.Name":"Recents","PhotosHomeTile.TileCustomization.List.Name":"List of photos libraries","PhotosHomeTile.SelectedAlbumDeleted.ActionName":"Show Library","PhotosHomeTile.TileCustomization.NoFolderAlbum":"No Albums or Folders","VoiceOver.PhotosHomeTile.OpenPhoto.Captioned":"Tap to go to item captioned %{caption}.","VoiceOver.PhotosHomeTile.OpenPhoto.Titled":"Tap to go to item titled %{title}.","VoiceOver.PhotosHomeTile.OpenPhoto":"Tap to go to item from %{date}.","PhotosGrid.PhotoPreview.QuickActions.Favorite.Label":"Favorite","PhotosGrid.PhotoPreview.QuickActions.Unfavorite.Label":"Unfavorite","PhotosGrid.PhotoPreview.QuickActions.Delete.Label":"Delete","PhotosGrid.QuickAction.Error.Title":"Cannot Update","PhotosGrid.QuickAction.Error.Description":"One or more items cannot be updated at this time. Try again later.","PhotosGrid.QuickAction.Error.OK":"OK","PhotosGrid.QuickAction.Delete.Alert.Title":"Delete Item From All Your Devices?","PhotosGrid.QuickAction.Delete.Alert.Description":"This item will be deleted from iCloud Photos on all your devices.","PhotosGrid.QuickAction.Delete.Alert.Confirm":"Delete","PhotosGrid.QuickAction.Delete.Alert.Cancel":"Cancel","VoiceOver.ProfileCard.SettingsLink":"Go to iCloud Settings Page","Toolbar.Button.AppLauncher.AriaLabel":"Quick Access","Toolbar.Button.CreateNew.AriaLabel":"Create","Toolbar.Button.HelpButton.AriaLabel":"Help Menu","Toolbar.Button.FeedbackButton.AriaLabel":"Submit feedback","Toolbar.Button.ADPButton.AriaLabel":"Advanced Data Protection","Toolbar.Button.BeneficiaryButton.AriaLabel":"Legacy Contact","CalendarHomeTile.Heading":"Calendar","CalendarHomeTile.SelectedFolderDeleted.ActionName":"Show All Calendars","CalendarHomeTile.Calendars.TotalNumber.All":"All Calendars","CalendarHomeTile.Calendars.TotalNumber.One":"%{calendarName}","CalendarHomeTile.Calendars.TotalNumber.Two":"2 Calendars","CalendarHomeTile.Calendars.TotalNumber.Many":"%{count} Calendars","CalendarHomeTile.TotalNumber.Zero":"No Events","CalendarHomeTile.TotalNumber.One":"1 Event","CalendarHomeTile.TotalNumber.Two":"2 Events","CalendarHomeTile.TotalNumber.Many":"%{count} Events","CalendarHomeTile.TotalNumber.Loading":"Loading…","CalendarHomeTile.EmptyContent.NoMoreEvents":"No more events today","CalendarHomeTile.TilePicker.Name":"List of calendar collections","CalendarHomeTile.QuickAction.Accept":"Accept","CalendarHomeTile.QuickAction.Decline":"Decline","CalendarHomeTile.QuickAction.Maybe":"Maybe","CalendarHomeTile.QuickAction.Delete":"Delete Event","CalendarHomeTile.QuickAction.Header.Organizer":"From %{organizerName}","CalendarHomeTile.QuickAction.Header.Accepted":"Accepted","CalendarHomeTile.QuickAction.Header.Maybe":"Maybe","CalendarHomeTile.QuickAction.Error.Title":"Cannot Reply to Calendar Invite","CalendarHomeTile.QuickAction.Error.Description":"One or more calendar invites cannot be replied to at this time. Try again later.","CalendarHomeTile.QuickAction.Error.OK":"OK","CalendarHomeTile.QuickAction.Delete.OrganizerEventWithInvitees.Title":"Delete event and notify invitees?","CalendarHomeTile.QuickAction.Delete.OrganizerEventWithInvitees.Description":"If you delete \"%{eventName}\", its invitees will be notified that this event has been canceled.","CalendarHomeTile.QuickAction.Delete.OrganizerEventWithInvitees.Buttons.Ok":"Delete and Notify","CalendarHomeTile.QuickAction.Delete.OrganizerEventWithInvitees.Buttons.Cancel":"Cancel","CalendarHomeRow.Time.AllDay":"all-day","CalendarHomeRow.Time.EndsAt":"Ends %{time}","CalendarHomeRow.Event.Maybe":"Maybe","CalendarHomeRow.FallbackEventTitle":"New Event","CalendarHomeRow.QuickAction.RecurrenceConfirmation.Title":"Reply to This Event or All Events?","CalendarHomeRow.QuickAction.RecurrenceConfirmation.Description":"You’re replying to a repeating event. Do you want to repond only to this event, or to all occurences of the event?","CalendarHomeRow.QuickAction.RecurrenceConfirmation.Buttons.This":"Only This Event","CalendarHomeRow.QuickAction.RecurrenceConfirmation.Buttons.All":"All Events","CalendarHomeRow.QuickAction.RecurrenceConfirmation.Buttons.Cancel":"Cancel","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Title":"Delete repeating event?","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Description":"You’re deleting a repeating event. Do you want to delete only this occurrence or all future occurrences","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Buttons.This":"Only This Event","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Buttons.All":"All Events","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Buttons.Future":"All Future Events","CalendarHomeRow.QuickAction.DeleteRecurrenceConfirmation.Buttons.Cancel":"Cancel","VoiceOver.CalendarHomeTile.PrimaryActionDescription":"New Event","VoiceOver.CalendarHomeTile.Events":"Calendar events","HideMyEmailTile.Heading":"Hide My Email","HideMyEmailTile.Description":"Keep your email private","HideMyEmailTile.Content.Title":"Addresses","HideMyEmailTile.Content.ListItem.Active":"%{count} Active","HideMyEmailTile.Content.ListItem.Inactive":"%{count} Inactive","HideMyEmailTile.Create":"Keep your email address private by creating unique, random addresses that forward to your personal inbox.","CustomEmailDomainTile.Heading":"Custom Email Domain","CustomEmailDomainTile.Description":"Send mail with your own domain","CustomEmailDomainTile.Content.Title.Zero":"0 Domains","CustomEmailDomainTile.Content.Title.One":"1 Domain","CustomEmailDomainTile.Content.Title.Two":"2 Domains","CustomEmailDomainTile.Content.Title.Many":"%{count} Domains","CustomEmailDomainTile.Create":"You and your family and friends can use iCloud Mail to send and receive email with a custom domain.","PrivateRelayTile.Heading":"Private Relay","PrivateRelayTile.Description":"Protect your internet browsing","PrivateRelayTile.Content.Description":"Use iCloud Private Relay on your iPhone, iPad, iPod touch, and Mac to hide your IP address and browsing activity in Safari and protect your unencrypted internet traffic.","HomeKitSecureVideoTile.Heading":"HomeKit Secure Video","HomeKitSecureVideoTile.Description.One":"Support for 1 camera","HomeKitSecureVideoTile.Description.Two":"For up to 2 security cameras","HomeKitSecureVideoTile.Description.Many":"For up to %{count} security cameras","HomeKitSecureVideoTile.Description.Unlimited":"Support for unlimited cameras","HomeKitSecureVideoTile.Content.Description":"Use HomeKit Secure Video to store video from home security cameras in iCloud. You can view your footage from anywhere, and it remains private and secure.","FamilySharingTile.Heading":"Family Sharing","FamilySharingTile.Description.Five":"Share your purchases","FamilySharingTile.Content.Description":"Share your iCloud+ subscription with your family members at no extra cost. They’ll get access to iCloud+ storage and features.","FamilySharingTile.Description.Member":"Shared by %{name}","FamilySharingTile.Content.Description.Member":"You are using the iCloud+ plan shared by %{name}.","InvitesPlusTile.Content.Title":"Events","InvitesPlusTile.Description":"Send unique invitations","InvitesPlusTile.Content":"Create rich invitations with custom backgrounds, shared playlists and photo albums","NavigationDrawer.AriaLabel":"Plan and Storage","NavigationDrawer.Plan.Drawer.AriaLabel":"Your Plan","NavigationDrawer.Plan.Type.Standard":"Standard","NavigationDrawer.Plan.Type.Icloud+":"iCloud+","NavigationDrawer.Plan.Type.Lite":"Web-Only","NavigationDrawer.Plan.Type.MAID":"Managed Apple Account","NavigationDrawer.Plan.Type.Standard.Size":"5 GB","NavigationDrawer.Plan.Description.Large":"%{size} Storage","NavigationDrawer.Plan.Description.Small.Free":"Free","NavigationDrawer.Plan.Description.Small.MAID":"Included with your Managed Apple Account","NavigationDrawer.Plan.Description.Small.AppleOne":"Included in Apple One","NavigationDrawer.Plan.Description.Small.AppleOneWithExtra":"Apple One + Extra Storage","NavigationDrawer.Plan.Description.Small.FamilySharing":"Shared by %{planOwnerName} (Family Sharing)","NavigationDrawer.Recovery.Drawer.AriaLabel":"Data Recovery","NavigationDrawer.Recovery.Description":"Restore deleted files, bookmarks, contacts, and calendars.","NavigationDrawer.Recovery.Description.Lite":"Restore deleted files and contacts.","NavigationDrawer.Storage.Drawer.AriaLabel":"Your Storage","NavigationDrawer.Storage.Description.Large":"%{usedSize} Used","NavigationDrawer.Storage.Description.Small":"%{percentageUsed}% of %{totalSize}","VoiceOver.CalendarHomeRow.OpenCalendarEvent":"Tap to go to %{title} event.","VoiceOver.CalendarHomeRow.Summary.AriaLabel":"%{calendar}, %{title}, %{time}","VoiceOver.AppSwitcher.Open":"Open %{appName}","VoiceOver.AppSwitcher.Close":"Close Application Switcher","VoiceOver.AppSwitcher.Applications":"Applications","VoiceOver.AppSwitcher.Notifications.One":"1 new item","VoiceOver.AppSwitcher.Notifications.Many":"%{count} new items","VoiceOver.AppSwitcher.Calendar.Notifications.One":"1 calendar invite","VoiceOver.AppSwitcher.Calendar.Notifications.Many":"%{count} calendar invites","VoiceOver.AppSwitcher.Mail.Notifications.One":"1 unread email","VoiceOver.AppSwitcher.Mail.Notifications.Many":"%{count} unread emails","VoiceOver.AppSwitcher.Reminders.Notifications.One":"1 reminder list invite","VoiceOver.AppSwitcher.Reminders.Notifications.Many":"%{count} reminder list invites","VoiceOver.AppIconButton.Launcher.Label":"Open %{appName} application","VoiceOver.AppIconButton.TilePicker.Label":"Change to %{appName} tile","VoiceOver.AppIconButton.TilePicker.Add.Label":"Add %{appName} tile","VoiceOver.PageHeader.LinksButton":"See links to related pages","DeviceBackupList.Heading":"iCloud Backup","DeviceBackupList.TotalNumber.Zero":"0 Devices","DeviceBackupList.TotalNumber.One":"1 Device","DeviceBackupList.TotalNumber.Two":"2 Devices","DeviceBackupList.TotalNumber.Many":"%{count} Devices","VoiceOver.DeviceBackupList.BackupTime.TimeDescription":"Latest back-up time","StorageUsageList.Heading":"Storage Usage","StorageUsageList.Description":"#{freeStorage} • #{usedStorage}","StorageUsageList.Description.Loading":"Loading…","StorageUsageList.Description.Error":"Failed to load","StorageUsageList.Content.Error.Description":"There was a problem loading your iCloud Storage Details.","StorageUsageList.Content.Error.Button.Label":"Try Again","StorageUsageList.FreeStorage":"Free %{free}","StorageUsageList.UsedStorage":"Used %{used}","StorageUsageList.Messages.Count":"All Messages","StorageUsageList.Drive.Heading":"Documents","StorageUsageList.Drive.Count":"All Files","StorageUsageList.Family.Count":"All Other Members","StorageUsageList.Family.Personal.Title":"Used by You","StorageUsageList.Family.Personal.TitleWithName":"Used by %{firstName}","StorageUsageList.Family.Title":"Used by Family","StorageUsageList.Family.TitleWithName":"Used by %{firstName}’s Family","StorageUsageList.Family.List.Me":"(Me)","StorageUsageList.Family.ImageAlt":"%{familyMemberName}’s profile image","VoiceOver.StorageUsageList.StorageUsed":"%{percentage} of total storage","VoiceOver.StorageUsageList.Table":"Storage Usage","VoiceOver.StorageUsageList.FamilyUsageList":"Family Members Storage Usage","RecoveryPage.Title":"Data Recovery","RecoveryPage.Details.Standard":"Recover files deleted from both iCloud Drive and other apps within the last 30 days, or restore an earlier version of your Calendar, Contacts and Safari bookmarks.","RecoveryPage.Details.WebOnly":"Recover files deleted from iCloud Drive within the last 30 days, or restore an earlier version of your Contacts.","RecoveryPage.Loading":"Loading","RecoveryPage.TileContent.NoItems":"-","RecoveryPage.ArchivesTile.Title.Contacts":"Restore Contacts","RecoveryPage.ArchivesTile.Title.Calendars":"Restore Calendars","RecoveryPage.ArchivesTile.TotalNumber.Zero":"No Archives","RecoveryPage.ArchivesTile.TotalNumber.One":"1 Archive","RecoveryPage.ArchivesTile.TotalNumber.Two":"2 Archives","RecoveryPage.ArchivesTile.TotalNumber.Many":"%{count} Archives","RecoveryPage.BookmarksTile.Title":"Restore Bookmarks","RecoveryPage.BookmarksTile.TotalNumber.Zero":"No Bookmarks","RecoveryPage.BookmarksTile.TotalNumber.One":"1 Bookmark","RecoveryPage.BookmarksTile.TotalNumber.Two":"2 Bookmarks","RecoveryPage.BookmarksTile.TotalNumber.Many":"%{count} Bookmarks","RecoveryPage.DriveItemsTile.Title":"Restore Files","RecoveryPage.DriveItemsTile.TotalNumber.Zero":"No Files","RecoveryPage.DriveItemsTile.TotalNumber.One":"1 File","RecoveryPage.DriveItemsTile.TotalNumber.Two":"2 Files","RecoveryPage.DriveItemsTile.TotalNumber.Many":"%{count} Files","RecoveryPage.ArchivesRecoveryList.LoadingDescription":"Archives loading","RecoveryPage.ArchivesRecoveryList.EmptyList":"No archives to restore.","RecoveryPage.ArchivesRecoveryList.RestoringArchiveDescription":"Restoring archive from %{date}","RecoveryPage.ArchivesRecoveryList.RestoreButton":"Restore","RecoveryPage.ArchivesRecoveryList.Restoring":"Restoring…","VoiceOver.RecoveryPage.ArchivesRecoveryList.ArchiveTableLabel":"List of archives","VoiceOver.RecoveryPage.ArchivesRecoveryList.RestoreButtonLabel":"Restore archive from %{date}","RecoveryPage.ArchivesRecoveryModalContent.LearnMore":"Learn more","RecoveryPage.FilesRecoveryModalContent.Title":"Restore Files","RecoveryPage.ContactsRecoveryModalContent.Title":"Restore Contacts","RecoveryPage.ContactsRecoveryModalContent.Description":"You can restore your contacts from an earlier version that was automatically archived in iCloud.","RecoveryPage.ContactsRecoveryModalContent.ListDescription.FirstLine":"When you restore to a new archive of contacts:","RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointOne":"The archive of contacts you select will replace contacts on all your devices","RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointTwo":"Your current contacts will be archived so that you can get them back if needed.","RecoveryPage.CalendarsRecoveryModalContent.Title":"Restore Calendars","RecoveryPage.CalendarsRecoveryModalContent.Reminders.Title":"Restore Calendars and Reminders","RecoveryPage.CalendarsRecoveryModalContent.Description":"You can restore your calendars and events from an earlier version that was automatically archived in iCloud.","RecoveryPage.CalendarsRecoveryModalContent.Reminders.Description":"You can restore your calendars and events (along with your reminders and reminder lists) from an earlier version that was automatically archived in iCloud.","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.FirstLine":"When you restore to a new archive of calendars:","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointOne":"The archive of calendars you select will replace the calendars on all your devices.","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointTwo":"Your current calendars will be saved and archived.","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointThree":"If you have shared calendars, all sharing information is removed when you restore them. You’ll need to share your calendars again, and ask other people to reinvite you to share their calendars.","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Title":"Restore Calendars?","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Description":"The archive you selected will replace the calendars on all your devices. Your current calendars will be archived. Changes made to calendars while restoration is in progress won’t be saved. Wait until it’s finished before making changes.","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.RestoreButton":"Restore","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Title":"Calendars Restored","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Description":"Your calendars were successfully restored at %{time}. Restored calendars will appear on all your devices.","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Title":"Couldn’t Restore Calendars","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Description":"Calendars syncing has been disabled because of an error. Contact iCloud Support for assistance.","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Title":"Restore Contacts?","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Description":"The archive you selected will replace the contacts on all your devices. Your current contacts will be archived. Changes made to contacts while restoration is in progress won’t be saved. Wait until it’s finished before making changes.","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.RestoreButton":"Restore","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Title":"Contacts Restored","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Description":"Your contacts were successfully restored at %{time}. Restored contacts will appear on all your devices.","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Title":"Couldn’t Restore Contacts","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Description":"The syncing of contacts has been disabled because of an error. Contact iCloud Support for assistance.","RecoveryPage.BookmarksRecoveryModal.Title":"Restore Safari Bookmarks","RecoveryPage.BookmarksRecoveryModal.Description":"You can restore your Safari bookmarks from an earlier version that was automatically archived in iCloud.","RecoveryPage.BookmarksRecoveryModal.LearnMore":"Learn more","RecoveryPage.BookmarksRecoveryModal.ListDescription.FirstLine":"Bookmarks show the days remaining until they will be permanently deleted.","RecoveryPage.BookmarksRecoveryModal.SelectAll":"Select All","RecoveryPage.BookmarksRecoveryModal.DeselectAll":"Deselect All","RecoveryPage.BookmarksRecoveryModal.LoadingDescription":"Bookmarks loading","RecoveryPage.BookmarksRecoveryModal.EmptyList":"No bookmarks to restore.","RecoveryPage.BookmarksRecoveryModal.LocalizedName.FavoritesBar":"Favorites","RecoveryPage.BookmarksRecoveryModal.LocalizedName.BookmarksMenu":"Bookmarks Menu","RecoveryPage.BookmarksRecoveryModal.Deleting":"Deleting…","RecoveryPage.BookmarksRecoveryModal.Delete":"Delete","RecoveryPage.BookmarksRecoveryModal.Restoring":"Restoring","RecoveryPage.BookmarksRecoveryModal.Restore":"Restore","RecoveryPage.BookmarksRecoveryModal.DeletedToday":"Deleted Today • %{daysRemaining} days remaining","RecoveryPage.BookmarksRecoveryModal.DeletedYesterday":"Deleted Yesterday • %{daysRemaining} days remaining","RecoveryPage.BookmarksRecoveryModal.DeletedDaysAgo":"Deleted %{daysAgo} days ago • %{daysRemaining} days remaining","RecoveryPage.BookmarksRecoveryModal.DateDeleted":"Date Deleted","RecoveryPage.BookmarksRecoveryModal.Name":"Name","RecoveryPage.BookmarksRecoveryModal.Folder":"Folder","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Title":"Delete Bookmark Permanently?","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Description":"Are you sure you want to permanently delete the bookmarks permanently? Permanently deleted bookmarks cannot be restored.","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Cancel":"Cancel","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Delete":"Delete Bookmark","VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel":"Close","FileRecovery.RestoreButton":"Restore","FileRecovery.RestoreButton.One":"Restore 1 File","FileRecovery.RestoreButton.Two":"Restore 2 Files","FileRecovery.RestoreButton.Many":"Restore %{count} Files","FileRecovery.PurgeButton":"Delete","FileRecovery.PurgeButton.One":"Delete 1 File","FileRecovery.PurgeButton.Two":"Delete 2 Files","FileRecovery.PurgeButton.Many":"Delete %{count} Files","FileRecovery.TombstonesLoading":"Files loading…","FileRecovery.Restoring.One":"Restoring 1 File…","FileRecovery.Restoring.Two":"Restoring 2 Files…","FileRecovery.Restoring.Many":"Restoring %{count} Files…","FileRecovery.Purging.One":"Deleting 1 File…","FileRecovery.Purging.Two":"Deleting 2 Files…","FileRecovery.Purging.Many":"Deleting %{count} Files…","FileRecovery.ModalDescription":"Deleted files can be restored here. You can also go to iCloud Drive’s Recently Deleted, where you can restore other deleted files. #{learnMoreLink}","FileRecovery.ModalDescription.LearnMoreLink":"Learn more","FileRecovery.NoFiles":"No files to restore","FileRecovery.SelectFile":"Select Files to Restore","FileRecovery.FileCount.One":"1 File Selected","FileRecovery.FileCount.Two":"2 Files Selected","FileRecovery.FileCount.Many":"%{count} Files Selected","FileRecovery.RemainingDays.MoreThanOne":"Permanently deleted in %{days} days","FileRecovery.RemainingDays.One":"Permanently deleted in 1 day","FileRecovery.PathSeparator":" ▸ ","FileRecovery.Separator":" • ","FileRecovery.DeletedOnDate":"Deleted %{friendlyDate}","FileRecovery.PurgeConfirmation.Title":"Are you sure you want to permanently delete selected files?","FileRecovery.PurgeConfirmation.Description":"Deleting these files means you will no longer be able to restore them back into iCloud Drive.","FileRecovery.PurgeConfirmation.Cancel":"Cancel","FileRecovery.PurgeConfirmation.Purge":"Delete","FileRecovery.SortByDateDeleted":"Sort by Date Deleted","FileRecovery.SortByName":"Sort by Name","FileRecovery.SortBySize":"Sort by Size","FileRecovery.DateDeleted":"Date Deleted","FileRecovery.Name":"Name","FileRecovery.Size":"Size","FileRecovery.DeselectAll":"Deselect All (%{count})","FileRecovery.SelectAll":"Select All (%{count})","FileRecovery.Restore.Error.Title.One":"1 file can’t be restored","FileRecovery.Restore.Error.Title.Two":"2 files can’t be restored","FileRecovery.Restore.Error.Title.Many":"%{count} files can’t be restored","FileRecovery.Restore.Error.Description":"Try again later.","FileRecovery.Restore.Error.OutOfStorage.Description.One":"Not enough space to restore the file. Delete files from iCloud Drive or upgrade your storage plan.","FileRecovery.Restore.Error.OutOfStorage.Description.Two":"Not enough space to restore 2 files. Delete files from iCloud Drive or upgrade your storage plan.","FileRecovery.Restore.Error.OutOfStorage.Description.Many":"Not enough space to restore %{count} files. Delete files from iCloud Drive or upgrade your storage plan.","FileRecovery.Purge.Error.Title.One":"1 file can’t be deleted","FileRecovery.Purge.Error.Title.Two":"2 files can’t be deleted","FileRecovery.Purge.Error.Title.Many":"%{count} files can’t be deleted","FileRecovery.Purge.Error.Description":"Try deleting files again later.","FileRecovery.Error.OK.Button":"OK","FileRecovery.Error.LoadingAllFiles.Text":"There was a problem loading all restorable files. #{tryAgainButton}","FileRecovery.CloseWarning.Title":"Restoration in Progress","FileRecovery.CloseWarning.Description":"Files are currently being restored. Closing this window may interrupt the process. Are you sure you want to continue?","FileRecovery.CloseWarning.Cancel":"Cancel","FileRecovery.CloseWarning.CloseAnyway":"Close Anyway","FileRecovery.Progress.FilesRestored.One":"1 of %{totalItems} files restored.","FileRecovery.Progress.FilesRestored.Two":"2 of %{totalItems} files restored.","FileRecovery.Progress.FilesRestored.Many":"%{restoredItems} of %{totalItems} files restored.","FileRecovery.Progress.StayOnPage":"Keep this page open until all files are restored.","FileRecovery.Progress.AriaLabel.One":"Restoration progress: %{restoredItems} of %{totalItems} file restored","FileRecovery.Progress.AriaLabel.Two":"Restoration progress: %{restoredItems} of %{totalItems} files restored","FileRecovery.Progress.AriaLabel.Many":"Restoration progress: %{restoredItems} of %{totalItems} files restored","FileRecovery.Success.Title.One":"File Restored","FileRecovery.Success.Title.Many":"%{count} Files Restored","FileRecovery.Success.Description.One":"It’s been restored to its original location.","FileRecovery.Success.Description.Many":"They’ve been restored to their original locations.","FileRecovery.Purge.Success.Title":"Files Deleted Successfully","FileRecovery.Purge.Success.Description":"The selected files have been permanently deleted.","FileRecovery.Cancel.Title":"Cancel Restoration","FileRecovery.Cancel.Description.One":"%{restoredItems} of 1 file has been restored. If you cancel, the file won't be restored.","FileRecovery.Cancel.Description.Two":"%{restoredItems} of 2 files have been restored. If you cancel, %{remainingItems} files won't be restored.","FileRecovery.Cancel.Description.Two.OneRemaining":"%{restoredItems} of 2 files have been restored. If you cancel, 1 file won't be restored.","FileRecovery.Cancel.Description.Many":"%{restoredItems} of %{totalItems} files have been restored. If you cancel, %{remainingItems} files won't be restored.","FileRecovery.Cancel.Description.Many.OneRemaining":"%{restoredItems} of %{totalItems} files have been restored. If you cancel, 1 file won't be restored.","FileRecovery.Cancel.Continue":"Continue Restoration","FileRecovery.Cancel.Cancel":"Cancel Restoration","FileRecovery.Cancel.Button":"Cancel","FileRecovery.Progress.PopupAriaLabel":"File Restoration Progress","Truncate.ExtraItems.Zero":"","Truncate.ExtraItems.One":"And 1 more","Truncate.ExtraItems.Two":"And 2 more","Truncate.ExtraItems.Many":"And %{count} more","CustomEmailDomainTile.Status.InProgress":"%{domain} (pending)","DescribePlanPricing.Monthly":"%{price}/month","DescribePlanPricing.Yearly":"%{price}/year","DescribePlanPricing.Monthly.WithSpace":"%{price} / month","DescribePlanPricing.Yearly.WithSpace":"%{price} / year","DescribePlanPricing.Free":"Free","PlanDetailsPage.Title.Lite":"iCloud Plan","PlanDetailsPage.Title":"Your iCloud Plan","PlanDetailsPage.TitleWithName":"%{firstName}’s iCloud Plan","PlanDetailsPage.Lite.Details":"Web-Only Access with 1 GB storage","PlanDetailsPage.Lite.Price":"Free","PlanDetailsPage.Standard.Details":"5 GB storage","PlanDetailsPage.Standard.Price":"Free","PlanDetailsPage.Plus.Details":"iCloud+ with %{storage} storage","PlanDetailsPage.Plus.Free":"Free","PlanDetailsPage.MAID.Details":"%{storage} storage","PlanDetailsPage.MAID.Price":"Included with your Managed Apple Account","PlanDetailsPage.AppleOne":"Included in Apple One","PlanDetailsPage.ExtraStorage":"%{storage} Extra Storage","PlanDetailsPage.SharedBy":"Shared by %{planOwnerName} (Family Sharing)","PlanDetailsPage.ChangePlanSection.Title.Lite":"About Web-Only Access to iCloud","PlanDetailsPage.ChangePlanSection.Body.Lite":"Includes 1 GB of storage to share and collaborate on documents, spreadsheets, and presentations. If you have an iPhone, iPad, iPod touch, or Mac, sign in to iCloud on your device to get immediate access to all iCloud features and 5 GB of free storage. From your device, you can also upgrade to iCloud+ to access premium features such as iCloud Private Relay, Hide My Email, and HomeKit Secure Video.","PlanDetailsPage.ChangePlanSection.Body.Lite.LearnMore.Title":"Learn more","PlanDetailsPage.ChangePlanSection.LearnMore.Text":"View #{iCloudPlusLink}","PlanDetailsPage.ChangePlanSection.LearnMore.Link.Title":"iCloud+ Plans","PlanDetailsPage.Includes":"Includes","PlanDetailsPage.Included":"Included","PlanDetailsPage.Bullets.Lite.Storage":"1 GB of storage","PlanDetailsPage.Bullets.Lite.FeaturesHeader":"Access on icloud.com to:","PlanDetailsPage.Bullets.Standard.Storage":"5 GB of storage","PlanDetailsPage.Bullets.StandardPlus.FeaturesHeader":"Apps and Features","PlanDetailsPage.Bullets.Plus.Storage":"%{storage} of storage","PlanDetailsPage.Bullets.Plus.Premium.Header":"Premium","PlanDetailsPage.Bullets.Plus.Premium.PrivateRelay":"Private Relay","PlanDetailsPage.Bullets.Plus.Premium.HideMyEmail":"Hide My Email","PlanDetailsPage.Bullets.Plus.Premium.CustomEmailDomain":"Custom Email Domain","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.One":"Support for one HomeKit Secure Video Camera","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Two":"Support for two HomeKit Secure Video Cameras","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Many":"Support for %{count} HomeKit Secure Video Cameras","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Unlimited":"Support for unlimited HomeKit Secure Video Cameras","PlanDetailsPage.Bullets.Plus.Premium.FamilySharing":"Family Sharing","PlanDetailsPage.Bullets.Features.Drive":"iCloud Drive","PlanDetailsPage.Bullets.Features.Notes":"Notes","PlanDetailsPage.Bullets.Features.Contacts":"Contacts","PlanDetailsPage.Bullets.Features.Pages":"Pages","PlanDetailsPage.Bullets.Features.Numbers":"Numbers","PlanDetailsPage.Bullets.Features.Keynote":"Keynote","PlanDetailsPage.Bullets.Features.Photos":"iCloud Photos","PlanDetailsPage.Bullets.Features.Backup":"iCloud Backup","PlanDetailsPage.Bullets.Features.Mail":"iCloud Mail","PlanDetailsPage.Bullets.Features.PasswordAndKeychain":"iCloud Passwords and Keychain","PlanDetailsPage.Included.iCloudFeatures.Link.Title":"apps and features that use iCloud","PlanDetailsPage.Included.iCloudMail.Link.Title":"iCloud Mail address","PlanDetailsPage.Included.StandardPlus.LearnMore.Features":"See all #{iCloudFeaturesLink}","PlanDetailsPage.Included.StandardPlus.LearnMore.Mail":"Learn more about #{iCloudMailLink}","PlanDetailsPage.Downgrade.Link.Title":"Downgrade or cancel your iCloud+","ICloudPlusPage.Title":"iCloud+ Features","ICloudPlusPage.Description":"Your iCloud+ Plan gives you storage for all your data in iCloud, plus premium features like Private Relay and Hide My Email. Manage or learn more about each of these features.","ICloudPlusPage.PlanNavLink":"View Plan","ICloudPlusPage.OnlyOnDevices.Title":"Only on your devices","ICloudPlusPage.OnlyOnDevices.Description":"Some of your iCloud+ features can only be set up and managed from an Apple device. Learn more about each feature, and get links to manage them on your devices.","ICloudPlusPage.ModalContent.LearnMore":"Learn more","ICloudPlusPage.PrivateRelayModalContent.Title":"Private Relay","ICloudPlusPage.PrivateRelayModalContent.SubTitle":"Protect your internet browsing","ICloudPlusPage.PrivateRelayModalContent.Section.Description":"Private Relay hides your IP address and browsing activity in Safari. This protects your unencrypted internet traffic so that no one, including Apple, can see who you are or what sites you’re visting.","ICloudPlusPage.HomeKitSecureVideoModalContent.Title":"HomeKit Secure Video","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.One":"For 1 Home Security Camera","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Two":"For up to 2 Home Security Cameras","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Many":"For up to %{count} Home Security Cameras","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Unlimited":"For unlimited Home Security Cameras","ICloudPlusPage.HomeKitSecureVideoModalContent.Section.Description":"Add your home security cameras in the Home app to record your footage and view it from anywhere. It’s all end-to-end encrypted, and none of the video counts toward your iCloud storage. You can access HomeKit Secure Video on your iPhone, iPad, iPod touch, Mac, or Apple TV.","ICloudPlusPage.FamilySharingModalContent.Title":"Family Sharing","ICloudPlusPage.FamilySharingModalContent.SubTitle.NotSharing":"Share your plan with up to 5 family members","ICloudPlusPage.FamilySharingModalContent.SubTitle.Sharing":"Shared by %{name}","ICloudPlusPage.FamilySharingModalContent.Section.Description.NotSharing":"With Family Sharing, you can share your iCloud+ subscription with up to 5 other people at no extra cost. They’ll automatically get access to iCloud+ storage and privacy features like Private Relay and Hide My Email.","ICloudPlusPage.FamilySharingModalContent.Section.Description.Sharing":"You are using the iCloud+ plan shared by %{name}.","AppLibraryHomeTile.Heading":"Apps","StoragePage.Title.Lite":"iCloud Storage","StoragePage.Title":"Your iCloud Storage","StoragePage.TitleWithName":"%{firstName}’s iCloud Storage","StoragePage.Description.WebOnly":"Use your storage to store, share, and collaborate on documents, spreadsheets, presentations, and files.","StoragePage.Description.Standard":"Use your iCloud storage to keep your most important information—like your photos, files, backups, and more—secure, up to date, and available across all your devices.","StoragePage.Description.Neutral":"iCloud Storage can be used for iCloud backups, to keep photos and videos stored in iCloud Photos, to keep documents up to date in iCloud Drive, and more.","StoragePage.Badge":"View Plan","StoragePage.Callout.Content.WebOnly":"To manage your storage, open iCloud Drive and choose the files you want to keep and delete those that you don’t need anymore.","StoragePage.Callout.ContinueButton.Title.WebOnly":"Open iCloud Drive…","StoragePage.AppCounts.Mail.All":"All Email Messages","StoragePage.StorageWarning.AlmostFull":"Your iCloud storage is almost full. Upgrade your plan to get more space.","StoragePage.StorageWarning.AlmostFull.NoUpgrade":"Your iCloud storage is almost full. If you run out, new data won’t be synced to iCloud.","StoragePage.StorageWarning.Full":"Your iCloud storage is full. Upgrade your plan to get more space.","StoragePage.StorageWarning.Full.NoUpgrade":"Your iCloud storage is full. If you run out, new data won’t be synced to iCloud.","CloudOS.Button.Cancel.Title":"Cancel","CloudOS.Button.Download.Title":"Download","CloudOS.Button.GoBack.Title":"Go Back","CloudOS.Button.OK.Title":"OK","CloudOS.MailDrop.Download.Title":"%{shareTitle} • %{size}","CloudOS.MailDrop.Download.Size":"size <b>%{size}</b>","CloudOS.MailDrop.Download.Description":"This file was uploaded by the sender using Mail Drop.","CloudOS.MailDrop.Downloading.Title":"Your download will begin shortly…","CloudOS.MailDrop.Downloading.Description":"Check your downloads folder for:","MailDropPage.Download.Button.Text":"Download to your device","MailDropPage.Description":"Mail Drop Attachment","MailDropPage.Download.Item.Description":"%{fileType} • %{size}","MailDropPage.Error.Title.Expired":"Expired","MailDropPage.Error.Description.Expired":"This file is no longer available for download. Ask the sender to send it again.","MailDropPage.Error.Title.NotFound":"File Not Found","MailDropPage.Error.Description.NotFound":"Check the address or ask the sender to send it again.","MailDropPage.Error.Title.MaxDownloads":"File No Longer Available","MailDropPage.Error.Description.MaxDownloads":"The file is no longer available because it has been downloaded the maximum number of times. Ask the sender to send it again.","MailDropPage.Error.Title":"Something Went Wrong","MailDropPage.Error.Description":"There was a problem downloading the file. Try again later.","CloudOS.LocalizationFormatter.FileSize.bytes":"%{value} bytes","CloudOS.LocalizationFormatter.FileSize.KB":"%{value} KB","CloudOS.LocalizationFormatter.FileSize.MB":"%{value} MB","CloudOS.LocalizationFormatter.FileSize.GB":"%{value} GB","CloudOS.LocalizationFormatter.FileSize.TB":"%{value} TB","CloudOS.LocalizationFormatter.DecimalSymbol":".","CloudOS.LandingPage.description":"The best place for all your photos, files, notes, mail, and more.","CloudOS.LandingPage.description.gcbd":"Your home on the web for iCloud photos, files, notes, mail, and more.","CloudOS.LandingPage.Animation.Description":"Animation showing different users’ Memojis surrounded by the icons of the apps the user personally uses most","CloudOS.LandingPage.iCloudPlusTile.Title":"More storage, plus features to protect your privacy and connect with friends","CloudOS.LandingPage.iCloudPlusTile.Description":"Upgrade to iCloud+ to get more storage, plan events with Apple Invites, and have peace of mind with privacy features like iCloud Private Relay, Hide My Email, and HomeKit Secure Video. You can even share your subscription with your family. Learn more at #{icloudPlusLink}.","CloudOS.LandingPage.iCloudPlusTile.Description.gcbd":"Upgrade to iCloud+ to get more storage and additional features like Hide My Email and HomeKit Secure Video. You can even share your subscription with your family. Learn more at #{icloudPlusLink}.","CloudOS.LandingPage.iCloudPlusTile.Description.LinkLabel":"apple.com/icloud","CloudOS.LandingPage.iCloudPlusTile.Image.Description":"Graphic depicting the icons for various iCloud+ benefits, including up to 12TB of storage","CloudOS.LandingPage.iCloudWeb.Title":"Easily access apps and data from your iPhone on the web","CloudOS.LandingPage.iCloudWeb.Description":"iCloud is essential for keeping personal information from your devices safe, up to date, and available wherever you are. At iCloud.com, you can access your photos, files, and more from any web browser. Changes you make will sync to your iPhone and other devices, so you’re always up to date.","CloudOS.LandingPage.iCloudWeb.Image.Description":"Collection of icons for apps available on iCloud.com, including Mail, Find My, and Reminders","CloudOS.LandingPage.Find.DisplayName":"Find Devices","CloudOS.LandingPage.Find.Description":"Find your iPhone, iPad, Mac, Apple Watch, AirPods, or Beats. Or help locate Family Sharing devices.","CloudOS.LandingPage.Mail.Description":"Private, secure, and personal email from Apple.","CloudOS.LandingPage.Photos.Description":"Easily view and share your photos and videos stored in iCloud on any device and the web.","CloudOS.LandingPage.IClouddrive.Description":"Easily view and share all your files stored in iCloud on any device and on the web.","CloudOS.LandingPage.Notes.Description":"Capture thoughts or detailed notes. Your notes are always up to date on any device and on the web.","CloudOS.LandingPage.Reminders.Description":"Your reminders are always up to date on any device and on the web.","CloudOS.LandingPage.Calendar.Description":"Organize your time with iCloud Calendar. It’s always up to date on any device and on the web.","CloudOS.LandingPage.Pages.Description":"Create stunning documents with Pages. Collaborate with your team on any device and on the web.","CloudOS.LandingPage.Numbers.Description":"Bring your data to life with Numbers. Collaborate with your team on any device and on the web.","CloudOS.LandingPage.Keynote.Description":"Create memorable presentations with Keynote. Collaborate with your team on any device or on the web.","CloudOS.LandingPage.Contacts.Description":"Access all your contacts stored in iCloud. They’re always up to date on any device and on the web.","CloudOS.LandingPage.NewsPublisher.Description":"News Publisher is the iCloud application for publishing articles to Apple News.","CloudOS.LandingPage.Directory.Description":"Access all your business contacts stored in iCloud. They’re always up to date on any device and on the web.","CloudOS.LandingPage.NewsPublisher.LearnMoreLink.Text":"Learn more about publishing on Apple News","CloudOS.LandingPage.LearnMoreLink.Text":"Learn more about %{applicationNameToBeDisplayed}","CloudOS.LandingPage.Unsupported.Phone.Description":"To use %{applicationNameToBeDisplayed} on iCloud.com, switch to a tablet or desktop browser.","CloudOS.LandingPage.Unsupported.Phone.Subdescription":"Other apps, including Mail, Photos, and Drive, are available on this browser.","CloudOS.LandingPage.Unsupported.Tablet.Description":"To use %{applicationNameToBeDisplayed} on iCloud.com, switch to a desktop browser.","CloudOS.LandingPage.Unsupported.Tablet.Subdescription":"Other apps, including Mail, Photos, and Drive, are available on this browser.","CloudOS.LandingPage.Unsupported.LiteAccount.Description":"%{applicationNameToBeDisplayed} isn’t available for your Apple Account","CloudOS.LandingPage.Unsupported.LiteAccount.Subdescription":"The Apple Account %{appleId} has web-only access to iCloud, which doesn’t include %{applicationNameToBeDisplayed}. You can use other apps, like Drive, Notes and Numbers. To use %{applicationNameToBeDisplayed}, sign in with an Apple Account you use with an Apple device.","CloudOS.LandingPage.Unsupported.LiteAccount.SignOut":"Sign Out","CloudOS.LandingPage.Unsupported.Subdescription":"%{applicationNameToBeDisplayed} is not available for your account.","CloudOS.LandingPage.Mail.Subdescription":"Sign in with your Apple Account to access your mail or create a new mail account.","CloudOS.LandingPage.Mail.Tile.A.Title":"Seamlessly Integrated","CloudOS.LandingPage.Mail.Tile.A.Description":"iCloud Mail seamlessly integrates into the Mail app on your Apple devices with powerful features like smart search, undo send, rich links, remind me, and more. And of course, you can access your mail from anywhere on icloud.com.","CloudOS.LandingPage.Mail.Tile.A.CategorizationSupported.Title":"Email, by Apple","CloudOS.LandingPage.Mail.Tile.A.CategorizationSupported.Description":"iCloud Mail seamlessly integrates into the Mail app on your Apple devices with powerful features like categorization, smart search, undo send, rich links, remind me, and more. And of course, you can access your mail from anywhere on icloud.com.","CloudOS.LandingPage.Mail.Tile.B.Title":"Always Ad-free","CloudOS.LandingPage.Mail.Tile.B.Description":"Your email messages are never scanned for advertising and you’ll never see ads in your inbox.","CloudOS.LandingPage.Mail.Tile.Cleanup.Title":"iCloud Mail Cleanup","CloudOS.LandingPage.Mail.Tile.Cleanup.Description":"Unsubscribe and remove unwanted or older messages to further reduce noise from your inbox.","CloudOS.LandingPage.Mail.Tile.C.Title":"Private and Secure","CloudOS.LandingPage.Mail.Tile.C.Description":"Mail Privacy Protection prevents senders from gathering information about your Mail activity. It hides your IP address so senders can’t connect it to your other online activity or determine your location. Two-factor authentication and encryption helps keep your email secure.","CloudOS.LandingPage.Mail.Tile.D.Title":"Hide My Email","CloudOS.LandingPage.Mail.Tile.D.Description":"With iCloud+, you’ll get access to Hide My Email which lets you generate a unique, random email addresses that forward to your inbox - so you can send and receive email without sharing your real address.","CloudOS.LandingPage.Mail.Tile.E.Title":"Personalize with a Custom Domain","CloudOS.LandingPage.Mail.Tile.E.Description":"With iCloud+, you can customize your email address with a personal domain name. Import a domain you already own or purchase a new one right from Mail settings.","CloudOS.LandingPage.Mail.Tile.F.Title":"Spam and Phishing Protection","CloudOS.LandingPage.Mail.Tile.F.Description":"iCloud Mail uses industry leading spam filtering technology. Digitally certified brand indicators help keep you safe from fraudulent phishing emails.","CloudOS.LandingPage.Mail.FAQ.SeeAll":"See all FAQ","CloudOS.LandingPage.Mail.FAQ.A.Question":"Is iCloud Mail free?","CloudOS.LandingPage.Mail.FAQ.A.Answer":"Yes. When you create an Apple Account and set up your iCloud Mail account, you’ll receive 5GB of free iCloud storage for your mail, photos and other content. You can get additional space and features like custom domain support and Hide My Email by upgrading to iCloud+.","CloudOS.LandingPage.Mail.FAQ.B.Question":"What is a custom email domain? How do I get one?","CloudOS.LandingPage.Mail.FAQ.B.Answer":"A custom email domain allows you to personalize your mail address for yourself or for your small business. For example instead of name@icloud.com, your address could be name@yourdomain.com. You can set up a domain you already own, or easily purchase one, right from Settings. Learn more about how to set up a custom domain #{customDomainLink}. Setting up a custom domain requires iCloud+.","CloudOS.LandingPage.Mail.FAQ.B.Answer.CustomDomainLinkText":"here","CloudOS.LandingPage.Mail.FAQ.C.Question":"Does iCloud Mail support email aliases?","CloudOS.LandingPage.Mail.FAQ.C.Answer":"Yes. Every iCloud Mail user can add up to three additional @icloud.com email addresses to your account for categorizing messages or keeping a particular address private.","CloudOS.LandingPage.Mail.FAQ.D.Question":"What is iCloud+?","CloudOS.LandingPage.Mail.FAQ.D.Answer":"iCloud+ is Apple’s premium cloud service that gives you the storage you need for all the photos, documents, notes, and more you store in iCloud, plus premium features like Custom Email Domains, Hide My Email, Private Relay, and HomeKit Secure Video.","CloudOS.LandingPage.Plan.DisplayName":"iCloud+","CloudOS.LandingPage.Plan.Description":"Get more storage with iCloud+ to save your photos, files, mail, and more along with enhanced privacy features to protect you and your data. It’s all the power of iCloud. Plus.","CloudOS.LandingPage.Plan.SigninButtonText":"Upgrade to iCloud+","CloudOS.LandingPage.Plan.Subdescription":"Sign in to view, upgrade or manage your plan.","CloudOS.LandingPage.Plan.Tile.A.Title":"Everything that matters. Saved and sound.","CloudOS.LandingPage.Plan.Tile.A.Description":"Keep a lifetime of photos, files, notes, messages, and more safely stored in iCloud. #{iCloudPlusPlansLink}","CloudOS.LandingPage.Plan.Tile.LinkText":"Choose the plan that’s right for you.","CloudOS.LandingPage.Plan.Tile.B.Title":"More privacy. More protection. More peace of mind.","CloudOS.LandingPage.Plan.Tile.B.Description":"iCloud+ gives you access to enhanced privacy features like iCloud Private Relay, Hide My Email, and HomeKit Secure Video.","CloudOS.LandingPage.Plan.FAQ.A.Question":"What is iCloud+?","CloudOS.LandingPage.Plan.FAQ.A.Answer":"iCloud+ gives you additional storage for all your data plus powerful features like iCloud Private Relay, Hide My Email, Custom Email Domain, and HomeKit Secure Video to help protect your privacy online.","CloudOS.LandingPage.Plan.FAQ.B.Question":"How do I upgrade to iCloud+?","CloudOS.LandingPage.Plan.FAQ.B.Answer":"It’s easy. Just click on the upgrade button on this page, or go to iCloud Settings on your iPhone, iPad, or Mac to upgrade to iCloud+.","CloudOS.LandingPage.Plan.FAQ.C.Question":"Can my family share an iCloud+ plan?","CloudOS.LandingPage.Plan.FAQ.C.Answer":"Yes. You can share any iCloud+ plan with up to five other people in your Family Sharing group. Everyone will get access to the storage they need, along with features that keep them in control of their privacy, at no additional cost per user. A single subscription can cover everyone in your household, and each person’s files, documents, and other personal information remain private and separate.","CloudOS.LandingPage.FAQ.Title":"Questions? Answered.","CloudOS.LandingPage.Invites.Tile.A.Title":"Get the Party Started","CloudOS.LandingPage.Invites.Tile.A.Description":"Customize your invitation with a curated background or photo of your own. You can even add details with Apple Music, Photos, Maps, and more to bring your event to life.","CloudOS.LandingPage.Invites.Tile.B.Title":"Everyone’s Invited","CloudOS.LandingPage.Invites.Tile.B.Description":"All of your guests can RSVP easily, whether from the iPhone app or from iCloud.com on any device. They can even add to collaborative playlists and shared photo albums for the event.","CloudOS.LandingPage.Invites.Tile.C.Title":"Party on with iCloud+","CloudOS.LandingPage.Invites.Tile.C.Description":"iCloud+ subscribers get full access to Apple Invites. There are no ads, additional costs, or limits on the amount of events you can host.","CloudOS.LandingPage.Invites.Description":"Create unique invitations for life’s most exciting moments.","CloudOS.LandingPage.Invites.FAQ.A.Title":"How do I get Apple Invites?","CloudOS.LandingPage.Invites.FAQ.A.Content":"Apple Invites is available to download in the App Store and on iCloud.com.","CloudOS.LandingPage.Invites.FAQ.B.Title":"How do I send invitations with Apple Invites?","CloudOS.LandingPage.Invites.FAQ.B.Content":"It’s easy to create and invite others to Apple Invites. Just copy the link and send to family and friends on any messaging platform. Up to 100 guests can participate per event, and there’s no limit on how many events you can host.","CloudOS.LandingPage.Invites.FAQ.C.Title":"Do invitees need to have an Apple device with the app to attend an event?","CloudOS.LandingPage.Invites.FAQ.C.Content":"Apple Invites is for everyone. Guests don’t need the app, an Apple device, or an account to RSVP to an event.","CloudOS.LandingPage.Invites.FAQ.D.Title":"What is iCloud+?","CloudOS.LandingPage.Invites.FAQ.D.Content":"iCloud+ is a premium subscription that includes Apple Invites and provides additional storage to keep your photos, videos, files, and more backed up and automatically available across your devices. It also includes access to features like iCloud Private Relay, Hide My Email, Custom Email Domain, and HomeKit Secure Video for an even more private and connected experience.","CloudOS.Authentication.SignIn.Button":"Sign In","CloudOS.Authentication.SignIn.AppleIdView.Title":"Sign in with Apple Account","CloudOS.Authentication.SignIn.ShareAcceptance.Title":"Shared via iCloud","CloudOS.Authentication.SignIn.ShareAcceptance.Open.Subtitle":"You need an Apple Account to access this file.","CloudOS.Authentication.SignIn.ShareAcceptance.Manage.Subtitle":"Sign in with your Apple Account to review access.","CloudOS.Authentication.SignIn.ShareAcceptance.CreateDescription":"If you don’t have an Apple Account, create one for free.","CloudOS.Authentication.SignIn.ShareAcceptance.CreateButton":"Create Apple Account","CloudOS.Authentication.SignIn.ShareAcceptance.CreateAriaLabel":"Create Apple Account","CloudOS.Authentication.SignInButton.Title":"Sign In","CloudOS.Authentication.SignOutButton.Title":"Sign Out","CloudOS.Authentication.TrustBrowserAndSignOutButton.Title":"Trust and Sign Out","CloudOS.Authentication.TrustBrowser.SignOut.Title":"Sign Out of iCloud.com?","CloudOS.Authentication.TrustBrowser.SignOut.Description":"If you trust this browser, you will not be asked for a verification code the next time you sign in.","CloudOS.Authentication.QuickAccess.Title":"If you can’t enter a code because you’ve lost your device, you can use Find Devices to locate it or Manage Devices to remove your Apple Pay cards from it.","CloudOS.Authentication.QuickAccess.ManageDevices.Title":"Manage Devices","CloudOS.Authentication.QuickAccess.FMIP.Title":"Find Devices","CloudOS.Authentication.WebAccessBlockedQuickAccess.Title":"Lost a device?","CloudOS.Error.UnableToLoadApp.Title":"Unable to load %{applicationName}","CloudOS.Error.UnableToLoadiCloud.Title":"Unable to load iCloud","CloudOS.Error.UnableToLoadApp.iCloudLiteAccount.Description":"Your Apple Account %{appleId} is unable to view %{applicationTitle}. Please sign in with the Apple Account used on your device.","CloudOS.Application.Title":"this application","CloudOS.AccountInfoMenuView.ManagedId.Title":"Manage Apple Account","CloudOS.Help.Title":"Help","CloudOS.Error.TermsUpdateRequired.Title":"Terms and Conditions","CloudOS.Error.TermsUpdateRequired.Description":"In order to proceed, please accept the iCloud terms and conditions on an iOS or macOS device.","CloudOS.UnsavedChanges.Alert.Title":"Changes are being saved.","CloudOS.UnsavedChanges.Alert.Description":"%{applicationName} is saving your latest changes. If you leave, any unsaved changes will be lost.","CloudOS.UnsavedChanges.Alert.SignOutButton":"Sign Out","CloudOS.UnsavedChanges.Alert.DontSignOutButton":"Cancel","Alert.ManageAppleId.Button.Title":"Manage Apple Account","Alert.Settings.Button.Title":"Settings","Alert.Help.Button.Title":"Help","Alert.Cancel.Button.Title":"Cancel","CloudOS.AccountMenu.Settings.Title":"iCloud Settings","CloudOS.Springboard.Greeting.0-6":"Good evening.","CloudOS.Springboard.Greeting.6-12":"Good morning.","CloudOS.Springboard.Greeting.12-18":"Good afternoon.","CloudOS.Springboard.Greeting.18-0":"Good evening.","CloudOS.Springboard.SettingsLink.Title":"Account Settings","CloudOS.Springboard.LearnMore.Phone.Text":"Use more Apps on iCloud.com on an iPad or desktop computer.","CloudOS.Springboard.LearnMore.Phone.Link.Title":"Learn more…","CloudOS.Springboard.LearnMore.Tablet.Text":"Use more Apps on iCloud.com by making Safari wider.","CloudOS.Springboard.LearnMore.Tablet.Link.Title":"Learn how…","CloudOS.Springboard.ManageAccessLink.Title":"Manage %{firstName}’s Account","CloudOS.Springboard.ManageAccessLink.Title.NameIsCJK":"Manage %{firstName}’s Account","CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title":"System Status","CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title":"Privacy Policy","CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title":"Terms & Conditions","CloudOS.LegalFooterView.Text.Fragment.SafetyLink.Title":"Learn More About Online Safety","CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title":"Terms and Conditions for Schools","CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title":"Terms and Conditions for Businesses","CloudOS.LegalFooterView.Text.Fragment.Copyright":"Copyright © %{currentYear} Apple Inc. All rights reserved.","CloudOS.AppSwitcherItemView.Offline":"Offline","CloudOS.AppSwitcherItemView.Maintenance":"Maintenance","Photos.DisplayName":"Photos","Photos.TitleName":"iCloud Photos","Photos.DataName":"photos","Photos.DataNameTitleCase":"Photos","Photo.Captioned":"Photo captioned %{caption}","Photo.Titled":"Photo titled %{title}","Photo.Created":"Photo created on %{date}","Photos.CloudKit.Recoverable.Title":"Shared photos not currently available.","Photos.CloudKit.Recoverable.Subtitle":"Please check back soon.","Photos.CloudKit.Unrecoverable.Title":"Shared photos not available.","KVS.Unavailable.Title":"%{appName} not currently available","SampleApp.DisplayName":"Sample App","Default.DataName":"data","Default.DataNameTitleCase":"Data","FMIP.DisplayName":"Find My","FMIP.TitleName":"iCloud Find Devices","Mail.DisplayName":"Mail","Mail.TitleName":"iCloud Mail","Contacts.DisplayName":"Contacts","Contacts.TitleName":"iCloud Contacts","Calendar.DisplayName":"Calendar","Calendar.TitleName":"iCloud Calendar","ICloudDrive.DisplayName":"Drive","ICloudDrive.TitleName":"iCloud Drive","ICloudDrive.DataName":"files and documents","ICloudDrive.DataNameTitleCase":"Files and Documents","Notes.DisplayName":"Notes","Notes.TitleName":"iCloud Notes","Notes.DataName":"notes","Notes.DataNameTitleCase":"Notes","Reminders.DisplayName":"Reminders","Reminders.TitleName":"iCloud Reminders","Reminders.DataName":"reminders","Reminders.DataNameTitleCase":"Reminders","Pages.DisplayName":"Pages","Pages.TitleName":"iCloud Pages","Pages.DataName":"files and documents","Pages.DataNameTitleCase":"Files and Documents","Numbers.DisplayName":"Numbers","Numbers.TitleName":"iCloud Numbers","Numbers.DataName":"files and documents","Numbers.DataNameTitleCase":"Files and Documents","Keynote.DisplayName":"Keynote","Keynote.TitleName":"iCloud Keynote","Keynote.DataName":"files and documents","Keynote.DataNameTitleCase":"Files and Documents","Settings.DisplayName":"Settings","Settings.TitleName":"Settings","CustomDomainSettings.DisplayName":"Custom Domain Settings","CustomDomainSettings.TitleName":"iCloud - Custom Domain Settings","HideMyEmail.DisplayName":"Hide My Email","HideMyEmail.TitleName":"iCloud - Hide My Email","Invites.DisplayName":"Invites","Invites.TitleName":"Apple Invites","Invites.DataName":"events","Invites.DataNameTitleCase":"Events","Newspublisher.ResourcesTitle":"Resources & Support","CloudOS.TermsAndConditions.AgreeButton.Title":"Agree","CloudOS.TermsAndConditions.DisagreeButton.Title":"Disagree","CloudOS.TermsAndConditions.CancelButton.Title":"Cancel","CloudOS.TermsAndConditions.Title":"iCloud Terms and Conditions","CloudOS.TermsAndConditions.Title.WithoutiCloud":"Terms and Conditions","CloudOS.TermsAndConditions.Description":"I agree to the iCloud Terms and Conditions.","CloudOS.TermsAndConditions.DownloadCopyButton.Title":"Download","CloudOS.TermsAndConditions.ContinueButton.Title":"Continue","CloudOS.TermsAndConditions.Content.Title":"Welcome to iCloud","CloudOS.TermsAndConditions.Content":"You must accept the iCloud Terms and Conditions before using iCloud. These terms cover important information, please read them carefully.","CloudOS.TermsAndConditions.ChinaTerms.Content":"You must accept the iCloud Terms and Conditions. These terms cover important information, please read them carefully. If you choose to use iCloud in China, you are agreeing to be bound by the iCloud and GCBD Terms and Conditions, and acknowledging that GCBD will be processing iCloud data.","CloudOS.TermsAndConditions.ChinaTerms.Title":"Your iCloud Account","CloudOS.TermsAndConditions.ChinaTerms.Description":"I agree to the iCloud operated by GCBD Terms and Conditions.","CloudOS.TermsAndConditions.ChinaTerms.Paragraph.One":"iCloud Services in the mainland of China are now operated by Chinese internet services company Guizhou on the Cloud Big Data Industrial Development Co., Ltd. (GCBD). This allows us to continue to improve the speed and reliability of iCloud and comply with Chinese regulations.","CloudOS.TermsAndConditions.ChinaTerms.Paragraph.Two":"iCloud services and the data you store with iCloud, including photos, videos, documents, and backups, will be subject to the terms and conditions of iCloud operated by GCBD.","CloudOS.TermsAndConditions.SuccessConfirmation.Title":"Terms and Conditions","CloudOS.TermsAndConditions.SuccessConfirmation.Description":"You have successfully accepted the iCloud Terms and Conditions.","CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.Description":"You have successfully accepted the iCloud Terms and Conditions. Go to Game Center on your Mac or device and sign in again.","CloudOS.TermsAndConditions.SuccessConfirmation.UpToDate.Description":"Your Terms and Conditions are up to date.","CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.UpToDate.Description":"Your Terms and Conditions are up to date. Go to Game Center on your Mac or device and sign in again.","CloudOS.AccountNeedsSetup.Domain.icloud.com":"iCloud.com","CloudOS.AccountNeedsSetup.Domain.icloud.com.cn":"iCloud.com.cn","CloudOS.AccountNeedsSetup.Title":"Set up iCloud on a device to use %{currentDomain}.","CloudOS.AccountNeedsSetup.Description":"Your Apple Account must be used to set up iCloud on an iOS or macOS device before you can use %{currentDomain}.","CloudOS.AccountNeedsSetup.CloseButton.Title":"Close","CloudOS.AccountNeedsSetup.LearnMoreButton.Title":"Learn More","CloudOS.AccountNeedsSetup.HomePageButton.Title":"iCloud Home Page","CloudOS.AppIcon.Badge.LargeNumber":"%{badgeCount}+","CalendarIcon.Sunday":"Sunday","CalendarIcon.Monday":"Monday","CalendarIcon.Tuesday":"Tuesday","CalendarIcon.Wednesday":"Wednesday","CalendarIcon.Thursday":"Thursday","CalendarIcon.Friday":"Friday","CalendarIcon.Saturday":"Saturday","Banner.QuotaExceeded.FullAccount.Title":"Your iCloud storage is full.","Banner.QuotaExceeded.FullAccount.Description":"Photos, videos, documents, and data are no longer being updated.","Banner.QuotaExceeded.OptionalLink.Text":"Learn More","Banner.QuotaAlmostExceeded.FullAccount.Title":"Your iCloud storage is almost full.","Banner.QuotaAlmostExceeded.FullAccount.Description":"If you run out of storage, photos, videos, documents, and data will no longer be updated.","Banner.QuotaExceeded.LiteAccount.Title":"Your iCloud storage is full.","Banner.QuotaExceeded.LiteAccount.Description":"Documents are no longer being updated.","Banner.QuotaAlmostExceeded.LiteAccount.Title":"Your iCloud storage is almost full.","Banner.QuotaAlmostExceeded.LiteAccount.Description":"If you run out of storage, documents will no longer be updated.","Banner.Beneficiary.Single.Description":"You have access to %{firstName}’s account until %{date}. After this date, %{firstName}’s data and account will be permanently deleted.","Banner.Beneficiary.Single.Description.NameIsCJK":"You have access to %{firstName}’s account until %{date}. After this date, %{firstName}’s data and account will be permanently deleted.","Banner.Beneficiary.Multiple.Description":"You have access to %{firstName}’s account until %{date}. After this date, %{firstName}’s data and account will be permanently deleted. Any changes to this account can be viewed by %{firstName}’s other legacy contacts.","Banner.Beneficiary.Multiple.Description.NameIsCJK":"You have access to %{firstName}’s account until %{date}. After this date, %{firstName}’s data and account will be permanently deleted. Any changes to this account can be viewed by %{firstName}’s other legacy contacts.","Banner.Beneficiary.OptionalLink.Text":"Learn more","Banner.ADP.Title":"Advanced Data Protection is On","Banner.ADP.Description":"%{currentDomain} doesn’t have access to display some of your data, such as photos, notes, reminders, files, documents, and others. Select an app to allow access using your Apple device.","Banner.Promotion.Beta.Title":"Try Out the Latest Features","Banner.Promotion.Beta.Description":"Be the first to explore new features in beta and let us know what you think.","VoiceOver.Banner.DismissBetaAriaLabel":"Dismiss beta banner","Banner.Promotion.Windows.Title":"Get the iCloud for Windows app","Banner.Promotion.Windows.Description":"Access your photos, files, and passwords directly on your PC using the iCloud for Windows app.","VoiceOver.Banner.DismissWindowsAriaLabel":"Dismiss Windows banner","Banner.Promotion.Mail.Title":"Create Your Own iCloud Email Address","Banner.Promotion.Mail.Description":"iCloud Mail is seamlessly built into the Mail app on any Apple device and is always ad-free.","VoiceOver.Banner.DismissMailAriaLabel":"Dismiss Mail banner","Banner.Promotion.HideMyEmail.Description":"Protect your email privacy with Hide My Email and set up custom email addresses as part of your iCloud+ plan.","Banner.Promotion.HideMyEmail.Link":"Get started in Settings","VoiceOver.Banner.Heading":"Banner notification","VoiceOver.Announcement.AriaLabel":"Announcement","Notification.Alarm.Dismiss.Title":"Dismiss","Notification.Alarm.Snooze.Title":"Snooze","Notification.Alarm.Today.Message":"“%{eventTitle}” at %{time}","Notification.Alarm.Tomorrow.Message":"“%{eventTitle}” tomorrow at %{time}","Notification.Alarm.Future.Message":"“%{eventTitle}” on %{date} at %{time}","Notification.PlaceholderDescription.mail":"No Subject","Notification.Push.AccessibilityLabel":"Open %{applicationName}","VoiceOver.Notification.Push.Heading":"Push notification","Notice.EP.PreB.Text":"To sign in using your Face ID or Touch ID, update this device to the latest software.","Notice.EP.LearnHow.Text":"Learn how","CloudOS.InNetworkAcceptance.NotNowButton.Title":"Not Now","CloudOS.Sharing.Unavailable.Title":"%{fileType} Unavailable","CloudOS.Sharing.Unavailable.Description":"The owner stopped sharing, or you don’t have permission to open this %{fileType}.","CloudOS.Sharing.Unavailable.NoLongerShared.Description":"This %{fileType} is no longer shared.","CloudOS.Sharing.Unavailable.AlreadyAccepted.Description":"The invitation to view this %{fileType} has already been accepted.","CloudOS.Sharing.Unavailable.OkButton.Title":"OK","CloudOS.iclouddrive.FileType":"item","CloudOS.notes.FileType":"note","CloudOS.pages.FileType":"document","CloudOS.numbers.FileType":"spreadsheet","CloudOS.keynote.FileType":"presentation","CloudOS.iclouddrive.folder.FileType":"folder","CloudOS.reminders.FileType":"reminder","CloudOS.calendar.FileType":"calendar","Error.AppNotLoading.Title":"Can’t load %{appName}.","Error.AppNotLoading.Description":"There was a problem opening %{appName}.","CloudOS.Authentication.Panel.AppName.Title":"Sign in to iCloud","CloudOS.OutOfNetworkAcceptance.VerifyAccess.Title":"Verify Your Access","CloudOS.OutOfNetworkAcceptance.SendVerificationButton.Title":"Send Verification Link","CloudOS.OutOfNetworkAcceptance.CancelButton.Title":"Cancel","CloudOS.OutOfNetworkAcceptance.DoneButton.Title":"Done","EmailAddress.Title":"email address","PhoneNumber.Title":"phone number","EmailAddressOrPhoneNumber.Title":"email address or phone number","CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.Description":"Select your %{modeOfCommunication}, and we’ll send you a verification link.","CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.FooterText":"If you don’t see your %{modeOfCommunication}, contact the person who invited you.","CloudOS.OutOfNetworkAcceptance.EmailSent.Title":"Verification Email Sent","CloudOS.OutOfNetworkAcceptance.EmailSent.Description":"Follow the instructions in the email to complete verification.","CloudOS.OutOfNetworkAcceptance.TextMessageSent.Title":"Verification Text Message Sent","CloudOS.OutOfNetworkAcceptance.TextMessageSent.Description":"A text message with a verification link has been sent to %{phoneNumber}.","CloudOS.OutOfNetworkAcceptance.TextMessageSent.AdditionalDescription":"Use the link in the message to complete verification.","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Title":"The verification link has expired.","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Description":"There was a problem verifying your email address or phone number.","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.DescriptionTwo":"Try opening the shared file again, or try opening it on another device.","CloudOS.OutOfNetworkAcceptance.Error.Title":"Couldn’t Send Verification Link","CloudOS.OutOfNetworkAcceptance.Error.Description":"There was a problem sending your verification link. Try again later.","CloudOS.OutOfNetworkAcceptance.PhoneVettedError.Description":"The phone number %{phoneNumber} is already used by another Apple Account. Sign in to iCloud with that Apple Account and try again.","CloudOS.RedirectedAuthentication.RedirectNeeded.Title":"This Apple Account can’t sign in to %{currentDomain}.","CloudOS.RedirectedAuthentication.RedirectNeeded.Subtitle":"To sign in with this Apple Account, go to %{destinationDomain}.","CloudOS.RedirectedAuthentication.RedirectNeeded.RedirectButton.Title":"Go to %{destinationDomain}","CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com":"iCloud.com","CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com.cn":"iCloud.com.cn","CloudOS.Sharing.Error.UpgradeToiCloudDrive.Title":"Upgrade to iCloud Drive","CloudOS.Sharing.Error.UpgradeToiCloudDrive.SubTitle":"To open this document, you’ll need to upgrade your account to iCloud Drive. You can upgrade by turning on iCloud Drive in Settings on a device with iOS 8 or later.","CloudOS.Sharing.Error.UpgradeToNotes.Title":"It’s time to upgrade your notes!","CloudOS.Sharing.Error.UpgradeToNotes.SubTitle":"To open shared notes on the web, you’ll need to open the Notes app on iOS 9, OS X 10.11, or later and upgrade your iCloud account.","AutoUpdate.Title":"%{currentDomain} Updated","AutoUpdate.Description":"Reload to use the latest version.","AutoUpdate.Reload":"Reload","AutoUpdate.Later":"Later","AutoUpdate.Domain.icloud.com":"iCloud.com","AutoUpdate.Domain.icloud.com.cn":"iCloud.com.cn","LoadingPage.Loading":"Loading…","LoadingPage.Problem":"There was a problem opening %{application}.","LoadingPage.TryAgain":"Try Again","LoadingPage.SystemStatus":"System Status","CloudOS.Error.AppPCSDeleted.Title":"%{applicationName} is locked","CloudOS.Error.AppPCSDeleted.Description":"This application cannot be launched. Please contact customer support.","CloudOS.Error.AppPCSRequired.Title":"Can’t load %{applicationName}.","CloudOS.Error.AppPCSRequired.Description":"There was a problem loading your data for this application.","CloudOS.Error.ServiceLocked.Title":"%{applicationName} is locked.","CloudOS.Error.ServiceLocked.Description.NoETA":"Due to account maintenance, %{applicationName} is currently unavailable.","CloudOS.Error.ServiceLocked.Description.Hour":"Due to account maintenance, %{applicationName} will be unavailable for the next hour.","CloudOS.Error.ServiceLocked.Description.HourOrMore":"Due to account maintenance, %{applicationName} will be unavailable for a few hours.","Error.UnsupportedBrowser.Warning.Title":"Unsupported Browser","Error.UnsupportedBrowser.Warning.Description":"You can use your current browser, but iCloud works best with the latest version of Safari, Chrome, Firefox, Microsoft Edge, or Internet Explorer.","Error.UnsupportedBrowser.IgnoreButton.Title":"Ignore","Error.UnsupportedBrowser.LearnMoreLink.Title":"Learn More","CloudOS.Error.MailNotEnabled.Title":"iCloud Email Needed","CloudOS.Error.MailNotEnabled.Description":"To use iCloud %{applicationName}, create a new email address by turning on %{applicationName} in your iCloud settings using iOS or macOS.","CloudOS.Error.MailBlocked.Title":"Unable to Open iCloud Mail","CloudOS.Error.MailBlocked.Description":"iCloud %{applicationName} cannot be loaded at this time.","CloudOS.Error.AuthDidNotConnect.Title":"Connection Error","CloudOS.Error.AuthDidNotConnect.Description":"iCloud encountered an error while trying to connect to the server.","CloudOS.Error.AuthDidNotConnect.Support":"Support","CloudOS.Error.AuthDidNotValidateOffline.Title":"You are not connected to the Internet.","CloudOS.Error.AuthDidNotValidateOffline.Description":"You can’t log in to iCloud because your device is currently offline.","CloudOS.Error.Button.Report":"Report…","Name.Display.FirstAndFamilyNames":"%{firstName} %{familyName}","Name.Display.NameIsCJK.FirstAndFamilyNames":"%{familyName}%{firstName}","CloudOS.Spinner.Loading":"Loading","CloudOS.AppIcon.Loading.AccessibilityLabel":"%{applicationName} - Loading","CloudOS.AppIcon.Locked.AccessibilityLabel":"%{applicationName} - Locked","CloudOS.AppIcon.Disabled.AccessibilityLabel":"%{applicationName} - Disabled","CloudOS.Toolbar.Apple.AccessibilityLabel":"Apple","CloudOS.Toolbar.AppSwitcherMenu.HomePage":"iCloud Home Page","CloudOS.Toolbar.AppSwitcherMenu.YourStorage":"Your iCloud Storage","CloudOS.Toolbar.AppSwitcherMenu.YourPlan":"Your iCloud Plan","CloudOS.Toolbar.AppSwitcherMenu.Storage":"iCloud Storage","CloudOS.Toolbar.AppSwitcherMenu.Plan":"iCloud Plan","CloudOS.Toolbar.AppSwitcherMenu.Customize":"Customize Home Page","CloudOS.Toolbar.AppSwitcherMenu.ReleaseNotes":"New on iCloud.com","CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide":"iCloud User Guide","CloudOS.Toolbar.AppSwitcherMenu.Heading.Apps":"Apps","CloudOS.Toolbar.AppSwitcherMenu.Heading.ICloudPlus":"iCloud+ Features","CloudOS.Toolbar.AppSwitcherMenu.Heading.More":"More","CloudOS.Toolbar.AccountMenuButton.AccessibilityLabel":"Account","CloudOS.Toolbar.AccountMenu.Profile.AccessibilityLabel":"You are signed in as %{name}, %{email}","CloudOS.Toolbar.AccountMenu.ICloudSettings":"iCloud Settings","CloudOS.Toolbar.AccountMenu.DigitalLegacyPortal":"Digital Legacy Portal","CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus":"Upgrade to iCloud+","CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan":"About Web-Only Plan","CloudOS.Toolbar.HelpMenu.SignIn":"Sign In","CloudOS.Toolbar.WhatsNew.Button":"NEW","CloudOS.Toolbar.OverflowMenu.BeneficiaryAnnouncement.Label":"Legacy Contact","CloudOS.Toolbar.OverflowMenu.ADPAnnouncement.Label":"Advanced Data Protection is On","CloudOS.Toolbar.OverflowMenu.StorageWarningAlmostFull.Label":"Storage is Almost Full","CloudOS.Toolbar.OverflowMenu.StorageWarningFull.Label":"Storage is Full","CloudOS.Toolbar.OverflowMenu.WhatsNew.Label":"What’s New on iCloud.com","CloudOS.Toolbar.OverflowMenu.WhatsNew.LabelForApp":"What’s New in %{appTitle}","CloudOS.Toolbar.OverflowMenu.Feedback.Label":"Send Feedback","VoiceOver.CloudOS.Toolbar.OverflowMenu.Label":"More toolbar items","VoiceOver.CloudOS.Toolbar.Beta":"Beta","VoiceOver.CloudOS.Toolbar.Alert":"1 Alert","WhatsNew.Modal.Title":"What’s New on iCloud.com","WhatsNew.Modal.Title.InApp":"What’s New in %{appTitle}","WhatsNew.Modal.OK":"OK","WhatsNew.ReleaseNotesBlock.Title":"What’s New on iCloud.com","WhatsNew.ReleaseNotesBlock.Description":"Use Dark Mode, customize your homepage background, and experience new features across apps.","ReleaseNotes.Title":"New on iCloud.com","ReleaseNotes.SubHeadline.Date":"October 2024","CrashReporter.Heading":"%{appName} has stopped responding.","CrashReporter.Title":"An error has prevented this application from working properly. Help Apple improve its products by sending us diagnostic and usage information about %{appName}.","CrashReporter.Details.Collapsed":"▶ Details","CrashReporter.Details.Open":"▼ Details","CrashReporter.Privacy":"By clicking ‘Send to Apple’ you agree that Apple will collect and use this information as part of its support services and to improve its products and services. This report will include personal information such as your member name and user data. To learn more about Apple’s Privacy Policy, see ","CrashReporter.SendToApple":"Send to Apple","CrashReporter.CreateRadar":"Create a Radar","CrashReporter.Close":"Close","WelcomePage.Welcome.Text":"Welcome, %{name}.","WelcomePage.WelcomeBack.Text":"Welcome back, %{name}.","WelcomePage.Welcome.Beneficiary":"%{name}’s iCloud","CreationMenu.CreateNew":"Create New","CreationMenu.Mail":"Email Message","CreationMenu.Mail.AriaLabel":"New Message","CreationMenu.Note":"Note","CreationMenu.Note.AriaLabel":"New Note","CreationMenu.Event":"Calendar Event","CreationMenu.Event.AriaLabel":"New Event","CreationMenu.Reminder":"Reminder","CreationMenu.Reminder.AriaLabel":"New Reminder","CreationMenu.Document":"Pages Document","CreationMenu.Document.AriaLabel":"New Page","CreationMenu.Spreadsheet":"Numbers Spreadsheet","CreationMenu.Spreadsheet.AriaLabel":"New Spreadsheet","CreationMenu.Presentation":"Keynote Presentation","CreationMenu.Presentation.AriaLabel":"New Presentation","CreationMenu.Contact.AriaLabel":"New Contact","CreationMenu.DriveFolder.AriaLabel":"New Folder","CreationMenu.Invites":"Invitation","CreationMenu.Invites.AriaLabel":"New Invitation","ShareAcceptancePage.Button.Add.iCloud.Drive":"Add to iCloud Drive","ShareAcceptancePage.Button.Accept":"Accept Invitation","ShareAcceptancePage.Button.Accept.AriaLabel":"Accept Invitation","ShareAcceptancePage.Button.NotNow":"Not Now","ShareAcceptancePage.Button.NotNow.AriaLabel":"Do not accept now","ShareAcceptancePage.Button.Download":"Download a copy","ShareAcceptancePage.Button.Download.AriaLabel":"Download a copy of the item shared","ShareAcceptancePage.Title":"Shared via iCloud","ShareAcceptancePage.Title.Calendar":"iCloud Calendar","ShareAcceptancePage.User.Description.Folder":"%{displayName} invited you to collaborate on a shared folder.","ShareAcceptancePage.User.Description.Note":"%{displayName} invited you to collaborate on a note.","ShareAcceptancePage.User.Description.Document":"%{displayName} invited you to collaborate on a document.","ShareAcceptancePage.User.Description.Numbers":"%{displayName} invited you to collaborate on a spreadsheet.","ShareAcceptancePage.User.Description.Keynote":"%{displayName} invited you to collaborate on a presentation.","ShareAcceptancePage.User.Description.DriveFile":"%{displayName} invited you to collaborate on a %{fileExtension} file.","ShareAcceptancePage.User.Description.DriveFile.NoExtension":"%{displayName} invited you to collaborate on an item.","ShareAcceptancePage.User.Description.Calendar":"%{displayName} invited you to collaborate on a shared calendar.","ShareAcceptancePage.User.Description.Calendar.Name":"Shared Calendar","ShareAcceptancePage.User.Description.Reminders.Name":"Reminders List","ShareAcceptancePage.User.Description.iWorks.Name":"%{appName} Document","ShareAcceptancePage.User.Description.Folder.Name":"Shared Folder","ShareAcceptancePage.User.Description.Note.Name":"Note","ShareAcceptancePage.Public.Sharing.Description":"%{displayName} shared an item with you.","ShareAcceptancePage.User.Description.RemindersList":"%{displayName} invited you to collaborate on a shared reminders list.","ShareAcceptancePage.Description.Public":"Download a copy to your device or sign in with your Apple Account to add to your iCloud Drive.","ShareAcceptancePage.Description.Public.Folder":"Sign in with your Apple Account to add to your iCloud Drive.","ShareAcceptancePage.Description.Public.Notes":"You will need to sign in to your Apple Account.","ShareAcceptancePage.Description.Public.Notes.Subdescription":"Once you successfully sign in, this note will be added to your Notes.","ShareAcceptancePage.Description.Private":"You will join as %{userName} (%{shareeId})","ShareAcceptancePage.Accept.Description.Folder":"If you accept the invitation, this folder will be added to your iCloud Drive, but won’t count toward your iCloud storage.","ShareAcceptancePage.Accept.Description.Folder.UnsupportedDevices":"If you accept the invitation, this folder will be added to your iCloud Drive, but won’t count toward your iCloud storage. Shared Folders can be viewed only on devices running at least iOS 13.4 or macOS Catalina 10.15.4.","ShareAcceptancePage.Accept.Description.Note":"If you accept the invitation, this note will be added to your Notes.","ShareAcceptancePage.Accept.Description.NoteFolder":"If you accept this invitation, this folder will be added to your Notes.","ShareAcceptancePage.Accept.Description.Document":"If you accept the invitation, this document will be added to your iCloud Drive, but won’t count toward your iCloud storage.","ShareAcceptancePage.Accept.Description.Calendar":"If you accept this invitation, this calendar will be added to your Calendars.","ShareAcceptancePage.Accept.Description.RemindersList":"If you accept this invitation, this reminders list will be added to your Reminders.","ShareAcceptancePage.Button.SignIn":"Sign In","ShareAcceptancePage.Button.ReportContent":"Report Content","ShareAcceptancePage.NewAccount.Description":"Don’t have an Apple Account? You can create one for free.","ShareAcceptancePage.Button.NewAccount":"Create Your Apple Account","ShareAcceptancePage.VerifyAccessDialog.Title":"Verification","ShareAcceptancePage.VerifyAccessDialog.Content":"Please verify that you’re allowed to view this invitation using %{sharer}.","ShareAcceptancePage.VerifyAccessDialog.Buttons.NotNow":"Not Now","ShareAcceptancePage.VerifyAccessDialog.Buttons.Continue":"Continue","ShareAcceptancePage.EmailVerificationDialog.Title":"Send Verification Link","ShareAcceptancePage.EmailVerificationDialog.Content":"Select your email address or phone number from the list below, and we’ll send you a verification link. If you don’t see your email address or phone number, contact the person who invited you.","ShareAcceptancePage.EmailVerificationDialog.Buttons.Cancel":"Cancel","ShareAcceptancePage.EmailVerificationDialog.Buttons.Verify":"Verify","ShareAcceptancePage.EmailVerificationSentDialog.Title":"Verification Link Sent","ShareAcceptancePage.EmailVerificationSentDialog.Content.Email":"Follow the instructions in the email to complete the verification.","ShareAcceptancePage.EmailVerificationSentDialog.Content.Message":"Follow the instructions in the message to complete the verification.","ShareAcceptancePage.EmailVerificationSentDialog.Buttons.Ok":"OK","VoiceOver.CalendarEventReplyPage.Loading":"Loading","CalendarEventReplyPage.OrganizerWithName.Label":"%{name} (%{email}) invited you to","CalendarEventReplyPage.OrganizerWithoutName.Label":"%{email} invited you to","CalendarEventReplyPage.Event.DefaultTitle":"New Event","CalendarEventReplyPage.Comment.Title":"Your Comment","CalendarEventReplyPage.Comment.SubtitleWithName":"Replying as %{name} (%{email})","CalendarEventReplyPage.Comment.SubtitleWithoutName":"Replying as %{email}","CalendarEventReplyPage.Comment.Placeholder":"Your comment will be sent directly to the organizer.","CalendarEventReplyPage.Comment.Button.Save":"Save","CalendarEventReplyPage.Comment.Saving.Label":"Saving…","VoiceOver.CalendarEventReplyPage.Comment.Saved.AriaLabel":"Saved","CalendarEventReplyPage.ReplyOption.Accept":"Accept","CalendarEventReplyPage.ReplyOption.Decline":"Decline","CalendarEventReplyPage.ReplyOption.Maybe":"Maybe","CalendarEventReplyPage.ReplyConfirmation.Title":"Reply Sent","CalendarEventReplyPage.ReplyConfirmation.Subtitle":"iCloud Calendar","CalendarEventReplyPage.InviteeStatus.Accepted":"Accepted","CalendarEventReplyPage.InviteeStatus.Declined":"Declined","CalendarEventReplyPage.InviteeStatus.Maybe":"Maybe","CalendarEventReplyPage.Location.Title":"Location","CalendarEventReplyPage.Notes.Title":"Notes","CalendarEventReplyPage.Invitees.Title":"Participants","CalendarEventReplyPage.FaceTime.Title":"FaceTime","CalendarEventReplyPage.FaceTime.JoinLink.Label":"Join FaceTime","CalendarEventReplyPage.Url.Title":"URL","CalendarEventReplyPage.Attachments.Title.Zero":"Attachments","CalendarEventReplyPage.Attachments.Title.One":"Attachment","CalendarEventReplyPage.Attachments.Title.Two":"Attachments","CalendarEventReplyPage.Attachments.Title.Many":"Attachments","VoiceOver.CalendarEventReplyPage.Invitees.Accepted.AriaLabel":"Accepted","VoiceOver.CalendarEventReplyPage.Invitees.Declined.AriaLabel":"Declined","VoiceOver.CalendarEventReplyPage.Invitees.Tentative.AriaLabel":"Maybe","VoiceOver.CalendarEventReplyPage.Invitees.NeedsAction.AriaLabel":"No Reply","CalendarEventReplyPage.Invitees.NameWithRole.Organizer":"%{name} (Organizer)","CalendarEventReplyPage.Invitees.NameWithRole.Self":"%{name} (You)","CalendarEventReplyPage.Invitees.NameWithRole.SelfOptional":"%{name} (You) (Optional)","CalendarEventReplyPage.Invitees.NameWithRole.OtherOptional":"%{name} (Optional)","CalendarEventReplyPage.DownloadICS.Label":"Download .ics","CalendarEventReplyPage.Error.LoadFailure.Title":"iCloud Calendar","CalendarEventReplyPage.Error.LoadFailure.Description":"Cannot find event details. This event may have been changed or cancelled.","CalendarEventReplyPage.Error.UpdateFailure.Title":"Unable to update event","CalendarEventReplyPage.Error.UpdateFailure.Description":"There was an error updating this event. Please try again.","CalendarEventReplyPage.ReportJunk.Title":"Report as Junk?","CalendarEventReplyPage.ReportJunk.Description":"This cannot be undone.","CalendarEventReplyPage.ReportJunk.Confirm":"Report as Junk","CalendarEventReplyPage.ReportJunk.Sending":"Sending Junk Report…","CalendarEventReplyPage.ReportJunk.Success.Title":"Reported as Junk","CalendarEventReplyPage.ReportJunk.Success.Description":"Junk invitations are automatically deleted from your calendar.","CalendarEventReplyPage.ReportJunk.Error.Title":"Junk Report Not Sent","CalendarEventReplyPage.ReportJunk.Error.Description":"There was a problem sending the report. Click on the link in your email to try again.","RemindersTemplatePage.Title.RemindersTemplate":"Reminders Template","RemindersTemplatePage.Button.RemindersTemplate":"Preview on your device","RemindersTemplatePage.Description.UnsupportedOs":"Available on Apple Devices Only","RemindersTemplatePage.Description.UnsupportedMacOsVersion":"Templates require macOS 13 or later.","RemindersTemplatePage.Description.UnsupportedIOsVersion":"Templates require iOS 16 or later.","RemindersTemplatePage.Description.UnsupportedIpadOsVersion":"Templates require iPadOS 16 or later.","RemindersTemplatePage.Description.Supported":"List templates can be previewed and saved only with the Reminders app on your Apple devices.","RemindersTemplatePage.Description.Unsupported":"List templates can be previewed and saved only with the Reminders app on Apple devices running at least iOS 16, iPadOS 16, or macOS 13.","Drive.Icon.Description.Key":"Keynote Presentation","Drive.Icon.Description.Numbers":"Numbers Spreadsheet","Drive.Icon.Description.Pages":"Pages Document","Drive.Icon.Description.PowerPoint":"PowerPoint Presentation","Drive.Icon.Description.Excel":"Excel Spreadsheet","Drive.Icon.Description.Word":"Word Document","Drive.Icon.Description.Pdf":"PDF","Drive.Icon.Description.Default":"Item","Drive.Icon.Description.Archive":"ZIP Archive","Drive.Icon.Description.Image":"%{fileExtension} Image","Drive.Icon.Description.Audio":"%{fileExtension} Audio","Drive.Icon.Description.Video":"%{fileExtension} Video","HomePage.CustomizeDashboard":"Customize","VoiceOver.CustomizeDashboard.OpeningPage":"Now showing Home Page Customization","VoiceOver.CustomizeDashboard.ClosingPage":"Now showing Home Page","HomePage.CustomizeDashboard.Header.Heading":"Home Page Customization","HomePage.CustomizeDashboard.Header.Button.ChangeWallpaper":"Change Wallpaper","HomePage.CustomizeDashboard.Header.Button.AddTile":"Add Tile","HomePage.CustomizeDashboard.Header.Button.ShowTips":"Show Tips","HomePage.CustomizeDashboard.Header.Button.Done":"Done","HomePage.CustomizeDashboard.Header.Button.EditBackground":"Select Background Color","HomePage.CustomizeDashboard.AddButton.AriaLabel":"Add a new tile to the dashboard","HomePage.CustomizeDashboard.AddedTile.AriaLabel":"Added %{tileName} tile","HomePage.CustomizeDashboard.RemoveButton.AriaLabel":"Remove the %{tileName} tile from the dashboard","HomePage.CustomizeDashboard.RemovedTile.AriaLabel":"Removed %{tileName} tile","HomePage.CustomizeDashboard.TilePicker.Label":"Which tile do you want to use?","HomePage.CustomizeDashboard.TilePicker.Add.Label":"Which tile do you want to add?","HomePage.CustomizeDashboard.TilePicker.Close.AriaLabel":"Close tile picker","BackgroundColorPicker.Title":"Select a Color","BackgroundColorPicker.VoiceOver.Button.Label":"Select %{colorName} as background color","BackgroundColorPicker.Color.Name.default":"blue","BackgroundColorPicker.Color.Name.purple":"purple","BackgroundColorPicker.Color.Name.green":"green","BackgroundColorPicker.Color.Name.red":"red","BackgroundColorPicker.Color.Name.orange":"orange","BackgroundColorPicker.Color.Name.yellow":"yellow","Ellipsis":"…","AccountPage.PlanCard.iCloud+.Title":"iCloud+","AccountPage.PlanCard.iCloud.Title":"iCloud","AccountPage.PlanCard.MAID.Title":"iCloud","AccountPage.PlanCard.WebOnly.Title":"iCloud","AccountPage.PlanCard.WebOnly.Description":"Web-Only Access","AccountPage.PlanCard.Plan.Link.Name":"Plan","AccountPage.PlanCard.Storage.Link.Name":"Storage","AccountPage.PlanCard.iCloud+.Link.Name":"Features","AccountPage.PlanCard.Upgrade.Link.Name":"Upgrade","AccountPage.Settings.Title":"iCloud Settings","AccountPage.Settings.Customize.Title":"Customize","AccountPage.Settings.Customize.Description":"Choose the apps you want to see in your iCloud.com home page.","AccountPage.Settings.Customize.Button.Name":"Customize Home Page","AccountPage.Settings.LookMeUpByEmail.Title":"Look Me Up By Email","AccountPage.Settings.LookMeUpByEmail.Description":"Allow people to look you up by your Apple Account in the apps you use and see your first and last name.","AccountPage.Settings.LookMeUpByEmail.Button.Name":"Manage Apps","AccountPage.Settings.LookMeUpByEmail.Modal.Title":"Look Me Up by Email","AccountPage.Settings.LookMeUpByEmail.Modal.LearnMore":"Learn more","AccountPage.Settings.LookMeUpByEmail.Modal.Description":"iOS, iPadOS, and macOS apps that let other users of those apps look you up by the email address associated with your Apple Account will appear here. Anyone who looks you up can also see your first and last name.","AccountPage.Settings.LookMeUpByEmail.Modal.LoadingDescription":"Loading","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Many":"%{appsCount} Apps","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.One":"1 App","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Two":"2 Apps","AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Title":"No Apps","AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Content":"You can prevent any listed app from showing your name and email address to other users by deselecting the app’s checkbox.","AccountPage.Settings.LookMeUpByEmail.Modal.List.Description":"You can prevent any listed app from showing your name and email address to other users by deselecting the app’s checkbox.","VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.AriaLabel":"List of apps","VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.Checkbox.AriaLbel":"whether %{appName} can show your name and email to other users","AccountPage.Settings.Access.Title":"Sign Out of All Browsers","AccountPage.Settings.Access.Button.Name":"Sign Out of All Browsers","AccountPage.Settings.Access.Description":"Immediately sign out of all browsers currently signed in to iCloud.com with this Apple Account.","AccountPage.Settings.Access.Signout.Modal.Title":"Sign Out of All Browsers?","AccountPage.Settings.Access.Signout.Modal.Description":"Are you sure you want to sign out of iCloud on all browsers? You will be asked to verify your identity the next time you sign in.","AccountPage.Settings.Access.Signout.Cancel":"Cancel","AccountPage.Settings.Access.Signout.Confirm":"Sign Out","AccountPage.AppleId.Title":"Apple Account","AccountPage.Settings.Photo.Title":"Photo","AccountPage.Settings.Photo.ChangeAppleIDPhoto.Button.Name":"Change Apple Account Photo","AccountPage.Settings.AppleID.Title":"Apple Account Settings","AccountPage.Settings.AppleID.Description":"Review or update important information like your name, password, and security details. See how others can reach you, check your payment information, and manage the devices connected to your account.","AccountPage.Settings.AppleID.Button.Name":"account.apple.com","AccountPage.Settings.FindDevices.Title":"Find Your Devices","AccountPage.Settings.FindDevices.Description":"Find your iPhone, iPad, Mac, Apple Watch, AirPods, or Beats. Or help locate Family Sharing devices.","AccountPage.Settings.FindDevices.Button.Name":"Find Devices","VoiceOver.AccountPage.PlanCard":"iCloud plan, storage and links to other pages.","AccountPage.Settings.ChangeNotificationSettings.Title":"Browser Notifications for Apps","AccountPage.Settings.ChangeNotificationSettings.Description":"Receive notifications from your iCloud apps also when you don’t have an iCloud.com page open.","AccountPage.Settings.ChangeNotificationSettings.Button.Label":"Manage Browser Notifications","AccountPage.Settings.ChangeNotificationSettings.NotSupported.Description":"iCloud.com notifications are not currently supported on this device.","AccountPage.Settings.ChangeNotificationSettings.NotSupported.Button.Label":"Learn more","UpgradePlanTiles.Upgrade":"Upgrade to iCloud+","UpgradePlanTiles.Upgrade.Description":"When you upgrade to iCloud+ you get the storage you need plus premium features to protect your privacy.","UpgradePlanTiles.MoreStorage":"More Storage","UpgradePlanTiles.MoreStorage.Description":"Choose the amount of storage that’s right for you. iCloud+ plans include 50 GB, 200 GB, 2 TB, 6 TB or 12 TB of storage.","UpgradePlanTiles.MoreStorage.LinkText":"Learn more about iCloud+ Plans and Pricing","UpgradePlanTiles.MoreStorage.ImageAlt":"Bar graph displaying the storage options for iCloud+ plans, which are 50 GB, 200 GB, and 2 TB","UpgradePlanTiles.PrivateRelay":"iCloud Private Relay","UpgradePlanTiles.PrivateRelay.Description":"Use iCloud Private Relay on your iPhone, iPad, iPod touch, and Mac to hide your IP address and browsing activity in Safari and protect your unencrypted internet traffic.","UpgradePlanTiles.PrivateRelay.LinkText":"Learn more about Private Relay","UpgradePlanTiles.HideMyEmail":"Hide My Email","UpgradePlanTiles.HideMyEmail.Description":"Create unique, random email addresses that forward to your inbox so you can send and receive email without having to share your personal email address.","UpgradePlanTiles.HideMyEmail.LinkText":"Learn more about Hide My Email","UpgradePlanTiles.HideMyEmail.ImageAlt":"iPhone showing a sign-up page for Nike membership with an overlay titled ‘Hide My Email’ with a randomized email address and a ‘Continue’ button","UpgradePlanTiles.HomeKitSecureVideo":"HomeKit Secure Video","UpgradePlanTiles.HomeKitSecureVideo.Description":"Connect your home security cameras in the Home App so you can record and view the footage from anywhere. It’s private, secure, and doesn’t use your iCloud storage.","UpgradePlanTiles.HomeKitSecureVideo.LinkText":"Learn more about HomeKit Secure Video","UpgradePlanTiles.CustomEmailDomain":"Custom Email Domain","UpgradePlanTiles.CustomEmailDomain.Description":"Personalize your iCloud Mail address with a custom domain name. You can even invite your family and friends to use the same domain with their iCloud Mail accounts.","UpgradePlanTiles.CustomEmailDomain.LinkText":"Learn more about Custom Email Domain","UpgradePlanTiles.FamilySharing":"Family Sharing","UpgradePlanTiles.FamilySharing.Description":"Share your iCloud+ plan with up to five family members so that everyone gets extra storage and premium features. Each family member uses their own Apple Account, so everyone’s content stays private.","UpgradePlanTiles.FamilySharing.LinkText":"Learn more about iCloud+ Family Sharing","UpgradePlanTiles.Beta":"BETA","Breadcrumbs":"Breadcrumbs","Alert.OkButton":"OK","Alert.CancelButton":"Cancel","Alert.ContactSupport":"iCloud Support","AppSwitcherOnboardingPopover.QuickAccess.Title":"Quick Access","AppSwitcherOnboardingPopover.QuickAccess.Content":"Go directly to an app, review your plan and storage usage, or learn more about iCloud features.","AppSwitcherOnboardingPopover.Customize.Title":"Customize","AppSwitcherOnboardingPopover.Customize.Content":"Choose the apps you want to see on your home page.","AppSwitcherOnboardingPopover.CloseButton.AriaLabel":"Close Tip","UnsupportedApps.Mobile":"To use %{appName} on iCloud.com, switch to a tablet or desktop browser.","UnsupportedApps.Tablet":"To use %{appName} on iCloud.com, switch to a desktop browser.","UnsupportedApps.HomePageButton":"iCloud Home Page","StaticPages.UnsupportedSafariVersionTabGroups.Message":"Upgrade to Safari 16 or later to use shared Tab Groups.","StaticPages.EnableCookies.Message":"To use iCloud, enable cookies in your browser, then try again.","StaticPages.UnsupportedBrowserTabGroups.Message":"Shared Tab Groups are only available on Safari 16 or later.","StaticPages.UnsupportedMobile.Message":"Your browser is not currently supported.","StaticPages.UnsupportedMobile.SubMessage":"You may be able to use iCloud with the mail, contacts, and calendar apps on your device.","StaticPages.WebsiteUnavailable.Message":"iCloud.com is not available in your country or region.","StaticPages.UnsupportedBrowser.Message":"Your browser is not supported.","StaticPages.UnsupportedBrowser.SubMessage":"To use iCloud, we recommend using the latest version of Safari, Firefox, Microsoft Edge, or Chrome.","StaticPages.NotFound.Message":"iCloud can’t find that page.","StaticPages.LearnMore":"Learn more","StaticPages.TryAgain":"Try again","StaticPages.HomePage":"iCloud Home Page","RemoveTileAlert.Title":"Remove “%{tileName}” Tile?","RemoveTileAlert.Description":"Removing this tile will not delete any data. You can still go directly to %{tileName} from the quick access menu.","RemoveTileAlert.Cancel":"Cancel","RemoveTileAlert.Remove":"Remove","ContinueOnDevice.ContinueButton.Title":"Continue on Device…","ContinueOnDevice.ContinueButton.Title.Sending":"Sending Notification…","ContinueOnDevice.SuccessDialog.Title":"Notification Sent","ContinueOnDevice.SuccessDialog.Description.LineOne.MoreThanThree":"Look for the Settings notification on %{device1}, %{device2}, %{device3}, and %{restCount} more.","ContinueOnDevice.SuccessDialog.Description.LineOne.ThreeDevices":"Look for the Settings notification on %{device1}, %{device2}, and %{device3}.","ContinueOnDevice.SuccessDialog.Description.LineOne.TwoDevices":"Look for the Settings notification on %{device1} and %{device2}.","ContinueOnDevice.SuccessDialog.Description.LineOne.OneDevice":"Look for the Settings notification on %{device1}.","ContinueOnDevice.SuccessDialog.Description.LineTwo":"Requires a device running at least iOS 15.2, iPadOS 15.2, or macOS Monterey 12.1.","ContinueOnDevice.FailedDialog.Title":"Couldn’t Send Notification","ContinueOnDevice.FailedDialog.Description":"There was a problem sending your notification. Try again later.","ContinueOnDevice.iCloudPlanUpgrade.Title":"How to Change Your iCloud Plan","ContinueOnDevice.iCloudPlanUpgrade.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to iCloud Plan Settings.","ContinueOnDevice.setupPrivateRelay.Title":"How to Manage Private Relay Settings","ContinueOnDevice.setupPrivateRelay.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to Private Relay settings. You can manage Private Relay settings for each of your devices running at least iOS 15, iPadOS 15, or macOS Monterey 12.","ContinueOnDevice.homeKitSecureVideo.Title":"How to Set Up HomeKit Secure Video","ContinueOnDevice.homeKitSecureVideo.Description":"To set up HomeKit Secure Video, first enable iCloud for Home. On an iPhone or iPad, go to Settings #{chevron} %{fullName} #{chevron} iCloud and turn on Home. On a Mac, go to System Settings #{chevron} Apple Account #{chevron} iCloud, then select Home. Next, go to the Home app and turn on “Stream & Allow Recording” in Recording Options for your camera.","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.Title":"How to Manage iCloud+ Family Sharing ","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to iCloud+ Family Sharing settings.","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.Title":"How to Start Sharing with Family","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to Family Sharing setup.","ContinueOnDevice.iCloudPlusFamilySharing.Member.Title":"How to Stop Using Shared iCloud+ Plan","ContinueOnDevice.iCloudPlusFamilySharing.Member.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to Shared iCloud+ Plan settings.","ContinueOnDevice.iCloudStorageManage.Title":"How to Manage Your iCloud Storage","ContinueOnDevice.iCloudStorageManage.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to iCloud Storage Settings.","ContinueOnDevice.iCloudStorageManage.StorageFull.Title":"How to Change iCloud Plan and Add Storage","ContinueOnDevice.iCloudStorageManage.StorageFull.Description":"Use Continue on Device to send a notification to your Apple devices that will take you directly to iCloud Plan Settings.","ContinueOnDevice.NoDevice.IOS.Description":"On an iPhone, iPad, or iPod touch","ContinueOnDevice.NoDevice.Mac.Description":"On a Mac","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Title":"How to Change Your iCloud Plan","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} Manage Account Storage #{chevron} Change Storage Plan","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Description2":"Go to System Settings #{chevron} Apple Account #{chevron} iCloud #{chevron} Manage… #{chevron} Change Storage Plan…","ContinueOnDevice.setupPrivateRelay.NoDevice.Title":"How to Manage Private Relay Settings for Your Device","ContinueOnDevice.setupPrivateRelay.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} Private Relay","ContinueOnDevice.setupPrivateRelay.NoDevice.Description2":"Go to System Settings #{chevron} Apple Account #{chevron} iCloud #{chevron} Private Relay Options","ContinueOnDevice.setupPrivateRelay.NoDevice.Notice":"Private Relay requires a device running at least iOS 15, iPadOS 15, or macOS Monterey 12.","ContinueOnDevice.homeKitSecureVideo.NoDevice.Title":"How to Set Up HomeKit Secure Video","ContinueOnDevice.homeKitSecureVideo.NoDevice.Description":"To set up HomeKit Secure Video, first enable iCloud for Home. On iOS, go to Settings #{chevron} %{fullName} #{chevron} iCloud and turn on Home. On a Mac, go to System Settings #{chevron} Apple Account #{chevron} iCloud, then select Home. Next, go to the Home app and turn on “Stream & Allow Recording” in Recording Options for your camera.","ContinueOnDevice.homeKitSecureVideo.NoDevice.Description2":"","ContinueOnDevice.homeKitSecureVideo.NoDevice.Notice":"Setting up HomeKit Secure Video requires a device running at least iOS 15, iPadOS 15, or macOS Monterey 12.","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Title":"How to Manage iCloud+ Family Sharing ","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} iCloud Storage #{chevron} Family Usage","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Description2":"Go to System Settings #{chevron} Family Sharing #{chevron} iCloud Storage","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Title":"How to Start Sharing with Family","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} iCloud Storage #{chevron} Share With Family","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Description2":"Go to System Settings #{chevron} Family Sharing #{chevron} iCloud Storage #{chevron} Share…","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Title":"How to Stop Using Shared iCloud+ Plan","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} iCloud Storage #{chevron} Family Usage","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Description2":"Go to System Settings #{chevron} Family Sharing #{chevron} iCloud Storage","ContinueOnDevice.iCloudStorageManage.NoDevice.Title":"How to Manage Your iCloud Storage","ContinueOnDevice.iCloudStorageManage.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} iCloud Storage","ContinueOnDevice.iCloudStorageManage.NoDevice.Description2":"Go to System Settings #{chevron} Apple Account #{chevron} iCloud #{chevron} iCloud Storage: Manage","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Title":"How to Change iCloud Plan and Add Storage","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Description":"Go to Settings #{chevron} %{fullName} #{chevron} iCloud #{chevron} Manage Account Storage #{chevron} Change Storage Plan","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Description2":"Go to System Settings #{chevron} Apple Account #{chevron} iCloud #{chevron} Manage #{chevron} Change Storage Plan","WebAccessBlocked.Greeting.0-6":"Good evening, %{firstName}.","WebAccessBlocked.Greeting.6-12":"Good morning, %{firstName}.","WebAccessBlocked.Greeting.12-18":"Good afternoon, %{firstName}.","WebAccessBlocked.Greeting.18-0":"Good evening, %{firstName}.","WebAccessBlocked.Greeting.Beneficiary":"%{firstName}’s iCloud","WebAccessBlocked.Greeting.Beneficiary.NameIsCJK":"%{firstName}’s iCloud","WebAccessBlocked.Title":"You Turned Off iCloud Data Web Access","WebAccessBlocked.Title.ADP":"iCloud Data Web Access is Off","WebAccessBlocked.Title.Sending":"Sending Notification to Your Devices…","WebAccessBlocked.Title.Failed":"Couldn’t Send Notification","WebAccessBlocked.Title.Sent":"Check the Notification on Your iPhone or iPad","WebAccessBlocked.Title.Beneficiary":"Can’t access %{firstName}’s data on %{currentDomain}","WebAccessBlocked.Title.Beneficiary.NameIsCJK":"Can’t access %{firstName}’s data on %{currentDomain}","WebAccessBlocked.Description":"To access data on %{currentDomain}, you’ll need to turn on web access in iCloud settings on your device.","WebAccessBlocked.Description.ADP":"You turned on Advanced Data Protection. To access data on %{currentDomain}, you’ll need to turn on web access in iCloud settings on your device.","WebAccessBlocked.Description.Failed":"There was a problem sending your notification.","WebAccessBlocked.Description.Sent":"The notification was sent to devices running iOS 16.2, or iPadOS 16.2, or later. Use it to go to iCloud settings and turn on “Access iCloud Data on the Web”.","WebAccessBlocked.Description2.Sent":"You can also turn on “Access iCloud Data on the Web” on a Mac running Ventura 13.1 or later. Go to System Settings #{chevron} %{fullName} #{chevron} iCloud.","WebAccessBlocked.Description.Beneficiary":"%{firstName} turned on Advanced Data Protection, so the data in %{firstName}’s account can only be accessed on an Apple device.","WebAccessBlocked.Description.Beneficiary.NameIsCJK":"%{firstName} turned on Advanced Data Protection, so the data in %{firstName}’s account can only be accessed on an Apple device.","WebAccessBlocked.NoDevice.Description":"Turn on “Access iCloud Data on the Web” in Settings #{chevron} %{fullName} #{chevron} iCloud","WebAccessBlocked.NoDevice.Description2":"Turn on “Access iCloud Data on the Web” in System Settings #{chevron} %{fullName} #{chevron} iCloud","WebAccessBlocked.NoDevice.Notice":"Requires a device running at least iOS 16.2, iPadOS 16.2 or macOS Ventura 13.1.","WebAccessBlocked.ManageButton.Title":"Manage on Device…","WebAccessBlocked.ManageButton.Title.SendAgain":"Send New Notification","WebAccessBlocked.ManageButton.Title.TryAgain":"Try Again","WebAccessBlocked.Notice":"Send a notification to your Apple devices that will take you directly to iCloud settings.","WebAccessBlocked.Notice.Sent":"Didn’t get the notification?","AccountMaintenance.Title":"Account Maintenance","AccountMaintenance.Description.ShortDuration":"Syncing will start again in about 30 mins.","AccountMaintenance.Description.MediumDuration":"Syncing will start again in about 1 hour.","AccountMaintenance.Description.LongDuration":"Syncing will start again in about %{hours} hours.","AccountMaintenance.Description":"Your account is undergoing standard maintenance. Your data is safe.","AccountMaintenance.LearnMore":"Learn More","EP.Loading.Message":"Getting your iCloud data.","ADP.BookmarksRecoveryTile.Title":"Advanced Data Protection","ADP.ArmingRequestState.Title":"Sending Access Request to Your Devices","ADP.AwaitingDeviceConsentState.Title":"Check the Notification on Your Devices","ADP.AwaitingDeviceConsentState.Description.WithOSList":"To allow %{domain} to access and display your data, respond to the notification that was sent to your Apple devices running %{osList}, or later.","ADP.AwaitingDeviceConsentState.DidntReceive":"Didn’t get the notification?","ADP.AwaitingDeviceConsentState.SendAgain":"Send New Access Request","ADP.AwaitingDeviceConsentState.Cancel":"Cancel","ADP.FetchingKeysState.Title":"Getting Access","ADP.FetchingKeysState.Description":"Your device is giving %{domain} temporary access to display your %{data}.","ADP.FetchingKeysState.Description.MailDrop":"Your device is giving %{domain} temporary access to use Mail Drop.","ADP.FetchingKeysState.Description.RestoreFiles":"Your device is giving %{domain} temporary access to display your files.","ADP.FetchingKeysState.Description.RestoreBookmarks":"Your device is giving %{domain} temporary access to display your bookmarks.","ADP.Domain.icloud.com":"iCloud.com","ADP.Domain.icloud.com.cn":"iCloud.com.cn","ADP.FailedToSendAccessRequest.Title":"Unable to Send Access Request","ADP.FailedToSendAccessRequest.Description.WithOSList":"To receive the access request you need to be signed in with your Apple Account “%{appleId}” to a device running %{osList} or later.","ADP.FailedToSendAccessRequest.Description.NoUser.WithOSList":"To receive the access request you need to be signed in with your Apple Account to a device running %{osList}, or later.","ADP.FailedToSendAccessRequest.TryAgain":"Send New Access Request","ADP.FailedToSendAccessRequest.OK":"OK","ADP.FailedToObtainConsent.Title":"Can’t Display Your %{data}","ADP.FailedToObtainConsent.Title.MailDrop":"Can’t Use Mail Drop","ADP.FailedToObtainConsent.Description":"There was no response to the request sent to your devices. Your %{data} can’t be displayed until you grant %{domain} access from one of your devices.","ADP.FailedToObtainConsent.Description.MailDrop":"There was no response to the request sent to your devices. Mail Drop can’t be used until you grant %{domain} access from one of your devices.","ADP.FailedToObtainConsent.TryAgain":"Send New Access Request","ADP.FailedToObtainConsent.OK":"OK","ADP.DeviceConsentDenied.Title":"Can’t Display Your %{data}","ADP.DeviceConsentDenied.Title.MailDrop":"Can’t Use Mail Drop","ADP.DeviceConsentDenied.Description":"You have denied %{domain} access to display your %{data}.","ADP.DeviceConsentDenied.Description.MailDrop":"You have denied %{domain} access to use Mail Drop.","ADP.DeviceConsentDenied.TryAgain":"Send New Access Request","ADP.DeviceConsentDenied.OK":"OK","ADP.FailedToFetchKeys.Title":"Can’t Display Your %{data}","ADP.FailedToFetchKeys.Description":"Your device hasn’t given access to display your %{data}. Check that it is on and connected to the internet.","ADP.FailedToFetchKeys.ArmedDeviceNotSupported.Description":"Your device hasn’t given access to display your %{data}. Sign out of iCloud.com, update the device where you received the notification to %{osList}, or later. Then try again.","ADP.FailedToFetchKeys.TryAgain":"Try Again","ADP.FailedToFetchKeys.OK":"OK","ADP.SupportedOS.Default":"iOS 16.2, iPadOS 16.2, or macOS Ventura 13.1","ADP.SupportedOS.Invites":"iOS 18.1, iPadOS 18.1, or macOS Sequoia 15.1","StorageWarning.Full.Title":"iCloud Storage is Full","StorageWarning.AlmostFull.Title":"iCloud Storage is Almost Full","StorageWarning.Full.FreeUser.Message":"Some data isn’t syncing to iCloud. Upgrade to iCloud+ for more space.","StorageWarning.Full.PaidUser.Message":"Some data isn’t syncing to iCloud. Upgrade your plan for more space.","StorageWarning.AlmostFull.FreeUser.Message":"Upgrade to iCloud+ to make sure your data keeps syncing to iCloud.","StorageWarning.AlmostFull.PaidUser.Message":"Upgrade your plan to make sure your data keeps syncing to iCloud.","StorageWarning.Usage":"%{usedStorage} of %{totalStorage} Used","HomePage.FilterPicker.Title":"Filter","VoiceOver.HomePage.FilterPicker.Button.AriaLabel":"Show filter content customization popover","HomePage.TilePicker.Title":"Show","VoiceOver.HomePage.TilePicker.Button.AriaLabel":"Show %{heading} tile content customization popover","NotificationSettings.ChangeNotificationSettings.Title":"Browser Notifications for Apps","NotificationSettings.ChangeNotificationSettings.Description":"iCloud can notify you using your browser or the native notification system of your device.","NotificationSettings.Switches.Title":"Choose the apps you want to receive notifications from:","NotificationSettings.Mail.Title":"iCloud Mail","NotificationSettings.Mail.Description":"You’ll be notified every time you receive a new email.","NotificationSettings.Calendar.Title":"iCloud Calendar","NotificationSettings.Calendar.Description.Title":"You’ll be notified when you are invited to events, shared calendars, or there are updates to an event.*","NotificationSettings.ChangeNotificationSettings.Note":"You’ll receive notifications based on your preferences as long as you remain signed in to iCloud.com. If you get signed out, notifications will be automatically paused and will re-start only at your next log in.","NotificationSettings.ChangeNotificationSettings.Note.LearnMore":"Learn more","NotificationSettings.Calendar.Note":"* iCloud Calendar notifications will be sent only if you have chosen to receive “in App” invitations and updates. You can change how to receive invitations and updates in the “Account” tab of iCloud Calendar Settings.","NotificationSettings.Error.UnableToSave.Title":"Unable to Save Browser Notifications Preferences","NotificationSettings.Error.UnableToSave.Description":"There was a problem saving your Browser Notifications preferences. Please try again.","NotificationSettings.Error.UnableToSave.Acknowledge":"Ok","NotificationSettings.Error.Denied.Title":"This browser is blocking icloud.com to show notifications","NotificationSettings.Error.Denied.Description":"Browser notifications for iCloud apps won’t work unless you allow icloud.com to show notifications.","NotificationSettings.Error.Denied.ExternalLink":"How to unblock iCloud.com on this browser","NotificationSettings.Loading.MainContent":"Loading main content area of Browser Notifications for Apps","NotificationSettings.Loading.MailSwitch":"Mail switch is waiting for user response","NotificationSettings.Loading.CalendarSwitch":"Calendar switch is waiting for user response","VoiceOver.TileCustomization.List.Open":"Open","VoiceOver.TileCustomization.List.Back":"Back","TileCustomization.Symbol.Ellipsis":"...","TileCustomization.Symbol.GreaterThan":" > ","TileCustomization.Modal.SelectFolder":"Choose Folder","TileCustomization.Modal.Confirm":"Confirm","VoiceOver.QuickAction.PreviewMenuItem.Label":"Open the file preview","VoiceOver.QuickAction.PreviewMenuItem.Loading":"File preview is loading","VoiceOver.QuickActions.QuickMenuButton.Label":"Open quick action menu for %{contentSummary}","QuickLook.Header.Open":"Open","VoiceOver.QuickLook.Header.Close":"Close","VoiceOver.QuickLook.Header.Download":"Download","VoiceOver.QuickLook.Header.Open":"Open the file in a new tab","VoiceOver.QuickLook.ImageLoadingSpinner":"Image loading","Banner.Promotion.Sb.Title":"Search for Files and Photos","Banner.Promotion.Sb.Description":"Quickly find the files and photos you’re looking for by connecting \"%{descriptionString}\".","VoiceOver.Banner.DismissSbAriaLabel":"Dismiss search banner","Sb.Modal.ContinueButton.Title":"Continue","Sb.Modal.LearnMore":"Learn more","Sb.Modal.Resend":"Resend","Sb.Modal.Connect.Title":"Turn On Search","Sb.Modal.Connect.Description":"Connect “%{deviceName}” so you can search for files and photos.","Sb.Modal.Sent.Title":"Notification Sent to “%{deviceName}”","Sb.Modal.Sent.Description.Line1":"Look for a notification on “%{deviceName}” asking if you want to turn on search.","Sb.Modal.Sent.Description.Line2":"Didn’t get a notification?","Sb.Modal.Start.Title":"Start Searching","Sb.Modal.Start.Description.Line1":"You can now search files and photos on iCloud.com.","Sb.Modal.Start.Description.Line2":"Keep “%{deviceName}” or another trusted Apple device connected to the internet in order to search."})},function(e,t,n){"use strict";function r(){return l}function i(e){var t;if(e===i.__TEST_RESET_LOCALES)return l="en-us",d.clear(),void p.clear();if(e!==l){if(!a(e))throw new Error("setLocale can only be called for locales whose strings have been previously loaded.");l=e,null===(t=self.document)||void 0===t||t.documentElement.setAttribute("lang",e),p.forEach((function(t){return t(e)}))}}function o(e,t,n){var r=d.get(e)||{};if("undefined"!=typeof DEBUG&&DEBUG&&!(null===n||void 0===n?void 0:n.skipDuplicateKeyCheck))for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];if(r.hasOwnProperty(a))throw new Error("@apple/localization [".concat(e,']: Duplicate loc key "').concat(a,'" is changed from `').concat(r[a],"' to `").concat(t[a],"'!"))}d.set(e,Object.assign({},r,t))}function a(e){return d.has(e)}function s(e){return p.add(e),function(){p.delete(e)}}function c(e){var t=u(e);return function(e,n){return t(l,e,n)}}function u(e){return function(t,n,r){var i=d.get(t),o=null===i||void 0===i?void 0:i[n];if(void 0===o){var a="".concat(n,"::::").concat(t);return(null===e||void 0===e?void 0:e.logMissingLocKey)&&!h.has(a)&&(h.add(a),e.logMissingLocKey("LocKeyMissing",{locKey:n,locale:t})),"{{".concat(n,"}}")}return r?o.replace(f,(function(i,o){var a=r[o];if(void 0===a){var s=o in r?"us":"loc",c="".concat(n,"::::").concat(o,"::::").concat(t,"::::").concat(s);return"us"===s?((null===e||void 0===e?void 0:e.logBadUndefinedInput)&&!m.has(c)&&(m.add(c),e.logBadUndefinedInput("LocBadUndefinedInput",{locKey:n,badReplacementKey:o})),"{{{Undefined input value for ".concat(JSON.stringify(o)," passed to ").concat(JSON.stringify(n),"}}}")):((null===e||void 0===e?void 0:e.logBadReplacementKey)&&!m.has(c)&&(m.add(c),e.logBadReplacementKey("LocBadReplacementKey",{locKey:n,badReplacementKey:o,locale:t})),"{{{".concat(JSON.stringify(t)," translation for ").concat(JSON.stringify(n)," references bad variable ").concat(JSON.stringify(o),"; legal: ").concat(JSON.stringify(Object.keys(r)).slice(1,-1),"}}}"))}return String(a)})):o}}n.d(t,"b",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u}));var l=self.document&&self.document.documentElement.getAttribute("lang")||"en-us",d=new Map,p=new Set,f=/%\{\s*(.+?)\s*\}/g;i.__TEST_RESET_LOCALES=Symbol();var h=new Set,m=new Set},function(e,t,n){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function a(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function c(){document.addEventListener("mousemove",u),document.addEventListener("mousedown",u),document.addEventListener("mouseup",u),document.addEventListener("pointermove",u),document.addEventListener("pointerdown",u),document.addEventListener("pointerup",u),document.addEventListener("touchmove",u),document.addEventListener("touchstart",u),document.addEventListener("touchend",u)}function u(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",u),document.removeEventListener("pointermove",u),document.removeEventListener("pointerdown",u),document.removeEventListener("pointerup",u),document.removeEventListener("touchmove",u),document.removeEventListener("touchstart",u),document.removeEventListener("touchend",u))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&a(e.activeElement),t=!0)}),!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),c())}),!0),c(),e.addEventListener("focus",(function(e){o(e.target)&&(t||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!i[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(e.target))&&a(e.target)}),!0),e.addEventListener("blur",(function(e){var t;o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!==typeof window&&"undefined"!==typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(n){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!==typeof document&&e(document)}()},function(e,t,n){"use strict";e.exports=n(881)},function(e,t,n){"use strict";var r=n(870),i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s((function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,n,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},function(e,t,n){e.exports=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function i(t,i,o){if("undefined"!==typeof document){"number"===typeof(o=e({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}return Object.create({set:i,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(c){}}return e?r[e]:r}},remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(884);function i(e){var t,n,i,o,a,s,c,u,l,d;const p=null!==(t=null===(n=e.authenticatedUserDetails)||void 0===n||null===(n=n.mailFlags)||void 0===n?void 0:n.rawBits)&&void 0!==t?t:[],f=function(e){const t=e.authenticatedUserDetails;if(!t)return null;const{dsid:n,ageRestricted:r,aDsID:i,firstName:o,lastName:a,fullName:s,appleId:c,isManagedAppleID:u,statusCode:l,brMigrated:d,brZoneConsolidated:p,tantorMigrated:f,notesMigrated:h,appleIdEntries:m,beneficiaryInfo:g,isHideMyEmailSubscriptionActive:v,isCustomDomainTransferSubscriptionActive:y,isCustomDomainPurchaseSubscriptionActive:b,isPaidDeveloper:w,customEmailDomainServiceEndDate:S,hasUnreleasedOS:C,ICDRSCapableDeviceList:_,ICDRSCapableDeviceCount:O,SBCapableDeviceCount:E,isCustomDomainsFeatureAvailable:I,isHideMyEmailFeatureAvailable:A,mailFlags:T,analyticsOptInStatus:P,isAppleOrgManagedID:R}=t,{totalAuthenticationSteps:k,completedAuthenticationStep:D,accountType:M}=e;return{dsid:n,ageRestricted:r,alternateDSID:i,firstName:o,lastName:a,fullName:s,appleId:c,isManagedAppleID:u,statusCode:l,brMigrated:d,brZoneConsolidated:p,tantorMigrated:f,notesMigrated:h,appleIdEntries:m,completedAuthenticationStep:D,totalAuthenticationSteps:k,accountType:M,beneficiaryInfo:g,isHideMyEmailSubscriptionActive:!!v,isCustomDomainTransferSubscriptionActive:!!y,isCustomDomainPurchaseSubscriptionActive:!!b,isPaidDeveloper:!!w,customEmailDomainServiceEndDate:S,hasUnreleasedOS:!!C,ICDRSCapableDeviceList:_,ICDRSCapableDeviceCount:O,SBCapableDeviceCount:E,isCustomDomainsFeatureAvailable:!!I,isHideMyEmailFeatureAvailable:!!A,mailFlags:T,analyticsOptInStatus:P,isAppleOrgManagedID:R}}(e);return{hsaTrustedBrowser:e.hsaTrustedBrowser,termsUpdateNeeded:e.termsUpdateNeeded,showGcbdPrivacyNotice:e.showGcbdPrivacyNotice,isCarryUser:e.isCarryUser,details:f,countryCode:null!==(i=null===(o=e.authenticatedUserDetails)||void 0===o?void 0:o.countryCode)&&void 0!==i?i:null,isAuthenticationComplete:e.isAuthenticated,isExtendedLogin:e.isExtendedLogin,requestInfo:e.requestInfo,primaryEmail:e.primaryEmail,isThreadingAvailable:null!==(a=null===(s=e.authenticatedUserDetails)||void 0===s||null===(s=s.mailFlags)||void 0===s?void 0:s.isThreadingAvailable)&&void 0!==a&&a,ageRestricted:null!==(c=null===(u=e.authenticatedUserDetails)||void 0===u?void 0:u.ageRestricted)&&void 0!==c&&c,isMailBlocked:!!(p[2]||p[3]||p[4]&&null!==(l=e.webServices)&&void 0!==l&&l.has("mail")),isMAKOAccount:!!f&&Object(r.c)(f),isMAIDAccount:null!==(d=null===f||void 0===f?void 0:f.isManagedAppleID)&&void 0!==d&&d,isLITEAccount:!!f&&Object(r.e)(f),isMailCategorizationEnabled:!!p[10]&&!!p[11],userPartition:"userPartition"in e?e.userPartition:void 0}}},function(e,t,n){"use strict";var r;function i(e){return e.completedAuthenticationStep>0&&e.completedAuthenticationStep===e.totalAuthenticationSteps}function o(e){return 4===e.statusCode}function a(e){return e.isHideMyEmailSubscriptionActive||e.isCustomDomainTransferSubscriptionActive}function s(e){const t=e.appleIdEntries.find((e=>e.isPrimary));return!!t&&"PHONE_NUMBER"===t.type}function c(e){const t=e.appleIdEntries.find((e=>e.isPrimary));return!!t&&"EMAIL"===t.type}function u(e){return e.isManagedAppleID?r.MAID:o(e)?r.LITE:r.REGULAR}function l(e){return e?{primaryAppleIdType:c(e)?"email":s(e)?"phone_number":null,appleId:e.appleId,firstName:e.firstName,lastName:e.lastName}:null}n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return l})),function(e){e.REGULAR="Regular",e.MAID="ManagedAppleID",e.LITE="Lite"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(465),i=r.Result.success(void 0),o=r.Result.failure(void 0),a={};function s(e,t,n,r){return void 0===n&&(n=3),a[e]=a[e]||new Promise((function(a){var s=function(){return a(i)};if(t())return s();for(var l=document.scripts,d=0;d<l.length;d++){var p=l[d];if(p.src===e)return Promise.race([c(p,"load"),c(p,"error"),u(t,r)]).then(f)}return f();function f(){if(t())return s();if(--n<0)return a(o);var r=document.createElement("script");r.onload=r.onerror=f,document.head.appendChild(r),r.src=e}}))}var c=function(e,t){return new Promise((function(n){return e.addEventListener(t,n)}))};function u(e,t,n){void 0===t&&(t=2e4),void 0===n&&(n=50);var r=Date.now();return new Promise((function(a){var s=function(){return a(i)};if(e())return s();var c=setInterval((function(){e()?(clearInterval(c),s()):Date.now()-r>t&&(clearInterval(c),a(o))}),n)}))}},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(887);function i(e,t,n){const r=c(e,t);if(!r)throw new Error(`urlForServiceName: Service ${t} was not found`);return void 0===n?r.url:`${r.url}/${n}`}function o(e,t){return!!c(e,t)}function a(e,t){const n=c(e,t);if(!n)throw new Error(`isWebServiceActive: Service ${t} was not found`);return"active"===n.status}function s(e,t){const n=u(e);let r=null;return n.forEach(((e,n)=>{const i=":443";let o=e.url;if(o){if(o.endsWith(i)){const e=o.match(`(.*)${i}`);e&&(o=e[1])}t.startsWith(o)&&(r=n)}})),r}function c(e,t){const n=u(e).get(t);return n||("feedbackws"===t?l(e):null)}function u(e){return(null===e||void 0===e?void 0:e.webServices)||function(e){return new Map([["ckdatabasews",{url:`https://ckdatabasews.${r.a.servicesDomain}`,status:"active"}],["docws",{url:`https://docws.${r.a.servicesDomain}`,status:"active"}],["feedbackws",l(e)]])}(e)}function l(e){const t=r.a.servicesDomain;let n="";const i=null===e||void 0===e?void 0:e.webServices;if(i&&r.b){const e=/^https:\/\/(p\d{2,})/g,t={};let r;i.forEach((n=>{let{url:r}=n;const i=e.exec(r);if(i&&i.length){const e=i[1];t[e]?t[e]=1:t[e]+=1}}));for(const n in t)(!r||t[n]>t[r])&&(r=n);r&&(n=`${r}-`)}return{url:`https://${n}feedbackws.${t}`,status:"active"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(2249);const i={url:Object(r.c)("https://www.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"www"},o={url:Object(r.c)("https://www.icloud.com.cn/"),servicesDomain:"icloud.com.cn",domainLogo:"icloud.cn.logo",cookiesDomain:"icloud.com.cn",rootDomain:"www"},a={url:Object(r.c)("https://beta.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"beta"},s=[i,o,a,{url:Object(r.c)("https://future.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:a,cookiesDomain:"icloud.com",rootDomain:"future"},{url:Object(r.c)("https://carry.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"carry"},{url:Object(r.c)("https://sprinkles.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"sprinkles"}],c=(()=>{const e=globalThis.location.hostname;for(const t of s)if(t.url.hostname===e)return t;throw new Error(`hostname ${e} is not supported`)})(),u=c===o},function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"BRAND",(function(){return Fe})),n.d(t,"DIRTY",(function(){return b})),n.d(t,"EMPTY_PATH",(function(){return m})),n.d(t,"INVALID",(function(){return y})),n.d(t,"NEVER",(function(){return kt})),n.d(t,"OK",(function(){return w})),n.d(t,"ParseStatus",(function(){return v})),n.d(t,"Schema",(function(){return M})),n.d(t,"ZodAny",(function(){return le})),n.d(t,"ZodArray",(function(){return he})),n.d(t,"ZodBigInt",(function(){return ie})),n.d(t,"ZodBoolean",(function(){return oe})),n.d(t,"ZodBranded",(function(){return ze})),n.d(t,"ZodCatch",(function(){return je})),n.d(t,"ZodDate",(function(){return ae})),n.d(t,"ZodDefault",(function(){return Le})),n.d(t,"ZodDiscriminatedUnion",(function(){return be})),n.d(t,"ZodEffects",(function(){return Me})),n.d(t,"ZodEnum",(function(){return Re})),n.d(t,"ZodError",(function(){return u})),n.d(t,"ZodFirstPartyTypeKind",(function(){return qe})),n.d(t,"ZodFunction",(function(){return Ie})),n.d(t,"ZodIntersection",(function(){return Se})),n.d(t,"ZodIssueCode",(function(){return s})),n.d(t,"ZodLazy",(function(){return Ae})),n.d(t,"ZodLiteral",(function(){return Te})),n.d(t,"ZodMap",(function(){return Oe})),n.d(t,"ZodNaN",(function(){return Ue})),n.d(t,"ZodNativeEnum",(function(){return ke})),n.d(t,"ZodNever",(function(){return pe})),n.d(t,"ZodNull",(function(){return ue})),n.d(t,"ZodNullable",(function(){return xe})),n.d(t,"ZodNumber",(function(){return re})),n.d(t,"ZodObject",(function(){return ge})),n.d(t,"ZodOptional",(function(){return Ne})),n.d(t,"ZodParsedType",(function(){return o})),n.d(t,"ZodPipeline",(function(){return Be})),n.d(t,"ZodPromise",(function(){return De})),n.d(t,"ZodReadonly",(function(){return Ke})),n.d(t,"ZodRecord",(function(){return _e})),n.d(t,"ZodSchema",(function(){return M})),n.d(t,"ZodSet",(function(){return Ee})),n.d(t,"ZodString",(function(){return te})),n.d(t,"ZodSymbol",(function(){return se})),n.d(t,"ZodTransformer",(function(){return Me})),n.d(t,"ZodTuple",(function(){return Ce})),n.d(t,"ZodType",(function(){return M})),n.d(t,"ZodUndefined",(function(){return ce})),n.d(t,"ZodUnion",(function(){return ve})),n.d(t,"ZodUnknown",(function(){return de})),n.d(t,"ZodVoid",(function(){return fe})),n.d(t,"addIssueToContext",(function(){return g})),n.d(t,"any",(function(){return nt})),n.d(t,"array",(function(){return at})),n.d(t,"bigint",(function(){return Qe})),n.d(t,"boolean",(function(){return Ye})),n.d(t,"coerce",(function(){return Rt})),n.d(t,"custom",(function(){return He})),n.d(t,"date",(function(){return Je})),n.d(t,"datetimeRegex",(function(){return J})),n.d(t,"default",(function(){return Dt})),n.d(t,"defaultErrorMap",(function(){return l})),n.d(t,"discriminatedUnion",(function(){return lt})),n.d(t,"effect",(function(){return Ct})),n.d(t,"enum",(function(){return bt})),n.d(t,"function",(function(){return gt})),n.d(t,"getErrorMap",(function(){return f})),n.d(t,"getParsedType",(function(){return a})),n.d(t,"instanceof",(function(){return Ve})),n.d(t,"intersection",(function(){return dt})),n.d(t,"isAborted",(function(){return S})),n.d(t,"isAsync",(function(){return O})),n.d(t,"isDirty",(function(){return C})),n.d(t,"isValid",(function(){return _})),n.d(t,"late",(function(){return We})),n.d(t,"lazy",(function(){return vt})),n.d(t,"literal",(function(){return yt})),n.d(t,"makeIssue",(function(){return h})),n.d(t,"map",(function(){return ht})),n.d(t,"nan",(function(){return Ze})),n.d(t,"nativeEnum",(function(){return wt})),n.d(t,"never",(function(){return it})),n.d(t,"null",(function(){return tt})),n.d(t,"nullable",(function(){return Ot})),n.d(t,"number",(function(){return Ge})),n.d(t,"object",(function(){return st})),n.d(t,"objectUtil",(function(){return i})),n.d(t,"oboolean",(function(){return Pt})),n.d(t,"onumber",(function(){return Tt})),n.d(t,"optional",(function(){return _t})),n.d(t,"ostring",(function(){return At})),n.d(t,"pipeline",(function(){return It})),n.d(t,"preprocess",(function(){return Et})),n.d(t,"promise",(function(){return St})),n.d(t,"quotelessJson",(function(){return c})),n.d(t,"record",(function(){return ft})),n.d(t,"set",(function(){return mt})),n.d(t,"setErrorMap",(function(){return p})),n.d(t,"strictObject",(function(){return ct})),n.d(t,"string",(function(){return $e})),n.d(t,"symbol",(function(){return Xe})),n.d(t,"transformer",(function(){return Ct})),n.d(t,"tuple",(function(){return pt})),n.d(t,"undefined",(function(){return et})),n.d(t,"union",(function(){return ut})),n.d(t,"unknown",(function(){return rt})),n.d(t,"util",(function(){return r})),n.d(t,"void",(function(){return ot})),n.d(t,"z",(function(){return Dt})),function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!==typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"===typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"===typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"===typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((e=>"string"===typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"===typeof t?t.toString():t}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(i||(i={}));const o=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),a=e=>{switch(typeof e){case"undefined":return o.undefined;case"string":return o.string;case"number":return isNaN(e)?o.nan:o.number;case"boolean":return o.boolean;case"function":return o.function;case"bigint":return o.bigint;case"symbol":return o.symbol;case"object":return Array.isArray(e)?o.array:null===e?o.null:e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?o.promise:"undefined"!==typeof Map&&e instanceof Map?o.map:"undefined"!==typeof Set&&e instanceof Set?o.set:"undefined"!==typeof Date&&e instanceof Date?o.date:o.object;default:return o.unknown}},s=r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),c=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class u extends Error{get errors(){return this.issues}constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){const n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof u))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e.message;const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}u.create=e=>new u(e);const l=(e,t)=>{let n;switch(e.code){case s.invalid_type:n=e.received===o.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case s.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case s.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,", ")}`;break;case s.invalid_union:n="Invalid input";break;case s.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case s.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case s.invalid_arguments:n="Invalid function arguments";break;case s.invalid_return_type:n="Invalid function return type";break;case s.invalid_date:n="Invalid date";break;case s.invalid_string:"object"===typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"===typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case s.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case s.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case s.custom:n="Invalid input";break;case s.invalid_intersection_types:n="Intersection results could not be merged";break;case s.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case s.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.assertNever(e)}return{message:n}};let d=l;function p(e){d=e}function f(){return d}const h=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(void 0!==i.message)return{...i,path:o,message:i.message};let s="";const c=r.filter((e=>!!e)).slice().reverse();for(const u of c)s=u(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},m=[];function g(e,t){const n=f(),r=h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===l?void 0:l].filter((e=>!!e))});e.common.issues.push(r)}class v{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return y;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return v.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:i}=r;if("aborted"===t.status)return y;if("aborted"===i.status)return y;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===t.value||"undefined"===typeof i.value&&!r.alwaysSet||(n[t.value]=i.value)}return{status:e.value,value:n}}}const y=Object.freeze({status:"aborted"}),b=e=>({status:"dirty",value:e}),w=e=>({status:"valid",value:e}),S=e=>"aborted"===e.status,C=e=>"dirty"===e.status,_=e=>"valid"===e.status,O=e=>"undefined"!==typeof Promise&&e instanceof Promise;function E(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 I(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}var A,T,P;"function"===typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"===typeof e?{message:e}:e||{},e.toString=e=>"string"===typeof e?e:null===e||void 0===e?void 0:e.message}(A||(A={}));class R{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const k=(e,t)=>{if(_(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new u(e.common.issues);return this._error=t,this._error}}};function D(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var o,a;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!==s&&void 0!==s?s:i.defaultError}:"undefined"===typeof i.data?{message:null!==(o=null!==s&&void 0!==s?s:r)&&void 0!==o?o:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(a=null!==s&&void 0!==s?s:n)&&void 0!==a?a:i.defaultError}},description:i}}class M{get description(){return this._def.description}_getType(e){return a(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:a(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new v,ctx:{common:e.parent.common,data:e.data,parsedType:a(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(O(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null===t||void 0===t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null===t||void 0===t?void 0:t.errorMap},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:a(e)},i=this._parseSync({data:e,path:r.path,parent:r});return k(r,i)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:a(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return _(t)?{value:t.value}:{issues:r.common.issues}}catch(i){(null===(n=null===(t=null===i||void 0===i?void 0:i.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>_(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null===t||void 0===t?void 0:t.errorMap,async:!0},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:a(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(O(r)?r:Promise.resolve(r));return k(n,i)}refine(e,t){const n=e=>"string"===typeof t||"undefined"===typeof t?{message:t}:"function"===typeof t?t(e):t;return this._refinement(((t,r)=>{const i=e(t),o=()=>r.addIssue({code:s.custom,...n(t)});return"undefined"!==typeof Promise&&i instanceof Promise?i.then((e=>!!e||(o(),!1))):!!i||(o(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"===typeof t?t(n,r):t),!1)))}_refinement(e){return new Me({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ne.create(this,this._def)}nullable(){return xe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return he.create(this)}promise(){return De.create(this,this._def)}or(e){return ve.create([this,e],this._def)}and(e){return Se.create(this,e,this._def)}transform(e){return new Me({...D(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"===typeof e?e:()=>e;return new Le({...D(this._def),innerType:this,defaultValue:t,typeName:qe.ZodDefault})}brand(){return new ze({typeName:qe.ZodBranded,type:this,...D(this._def)})}catch(e){const t="function"===typeof e?e:()=>e;return new je({...D(this._def),innerType:this,catchValue:t,typeName:qe.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Be.create(this,e)}readonly(){return Ke.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const N=/^c[^\s-]{8,}$/i,x=/^[0-9a-z]+$/,L=/^[0-9A-HJKMNP-TV-Z]{26}$/i,j=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,U=/^[a-z0-9_-]{21}$/i,F=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,z=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,B=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let K;const H=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,W=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Z="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Q=new RegExp(`^${Z}$`);function Y(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function J(e){let t=`${Z}T${Y(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function X(e,t){if(!F.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return"object"===typeof i&&null!==i&&!(!i.typ||!i.alg)&&(!t||i.alg===t)}catch(n){return!1}}function ee(e,t){return!("v4"!==t&&t||!W.test(e))||!("v6"!==t&&t||!V.test(e))}class te extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==o.string){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.string,received:t.parsedType}),y}const t=new v;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:s.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:s.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const r=e.data.length>o.value,i=e.data.length<o.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?g(n,{code:s.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&g(n,{code:s.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)B.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"email",code:s.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)K||(K=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),K.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"emoji",code:s.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)j.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"uuid",code:s.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)U.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"nanoid",code:s.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)N.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid",code:s.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)x.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid2",code:s.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"ulid",code:s.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(c){n=this._getOrReturnCtx(e,n),g(n,{validation:"url",code:s.invalid_string,message:o.message}),t.dirty()}else"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"regex",code:s.invalid_string,message:o.message}),t.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty()):"datetime"===o.kind?J(o).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:"datetime",message:o.message}),t.dirty()):"date"===o.kind?Q.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:"date",message:o.message}),t.dirty()):"time"===o.kind?new RegExp(`^${Y(o)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:s.invalid_string,validation:"time",message:o.message}),t.dirty()):"duration"===o.kind?z.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"duration",code:s.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(i=e.data,("v4"!==(a=o.version)&&a||!H.test(i))&&("v6"!==a&&a||!q.test(i))&&(n=this._getOrReturnCtx(e,n),g(n,{validation:"ip",code:s.invalid_string,message:o.message}),t.dirty())):"jwt"===o.kind?X(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"jwt",code:s.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?ee(e.data,o.version)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cidr",code:s.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?$.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64",code:s.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?G.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64url",code:s.invalid_string,message:o.message}),t.dirty()):r.assertNever(o);var i,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:s.invalid_string,...A.errToObj(n)})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){var t,n;return"string"===typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:"undefined"===typeof(null===e||void 0===e?void 0:e.precision)?null:null===e||void 0===e?void 0:e.precision,offset:null!==(t=null===e||void 0===e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null===e||void 0===e?void 0:e.local)&&void 0!==n&&n,...A.errToObj(null===e||void 0===e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"===typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:"undefined"===typeof(null===e||void 0===e?void 0:e.precision)?null:null===e||void 0===e?void 0:e.precision,...A.errToObj(null===e||void 0===e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...A.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null===t||void 0===t?void 0:t.position,...A.errToObj(null===t||void 0===t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...A.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...A.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...A.errToObj(t)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new te({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new te({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new te({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ne(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}te.create=e=>{var t;return new te({checks:[],typeName:qe.ZodString,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t,...D(e)})};class re extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==o.number){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.number,received:t.parsedType}),y}let t;const n=new v;for(const i of this._def.checks)"int"===i.kind?r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:s.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):"multipleOf"===i.kind?0!==ne(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:s.not_finite,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,A.toString(t))}gt(e,t){return this.setLimit("min",e,!1,A.toString(t))}lte(e,t){return this.setLimit("max",e,!0,A.toString(t))}lt(e,t){return this.setLimit("max",e,!1,A.toString(t))}setLimit(e,t,n,r){return new re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:A.toString(r)}]})}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}re.create=e=>new re({checks:[],typeName:qe.ZodNumber,coerce:(null===e||void 0===e?void 0:e.coerce)||!1,...D(e)});class ie extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(i){return this._getInvalidInput(e)}if(this._getType(e)!==o.bigint)return this._getInvalidInput(e);let t;const n=new v;for(const o of this._def.checks)"min"===o.kind?(o.inclusive?e.data<o.value:e.data<=o.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):"max"===o.kind?(o.inclusive?e.data>o.value:e.data>=o.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),g(t,{code:s.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):r.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,A.toString(t))}gt(e,t){return this.setLimit("min",e,!1,A.toString(t))}lte(e,t){return this.setLimit("max",e,!0,A.toString(t))}lt(e,t){return this.setLimit("max",e,!1,A.toString(t))}setLimit(e,t,n,r){return new ie({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:A.toString(r)}]})}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ie.create=e=>{var t;return new ie({checks:[],typeName:qe.ZodBigInt,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t,...D(e)})};class oe extends M{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==o.boolean){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.boolean,received:t.parsedType}),y}return w(e.data)}}oe.create=e=>new oe({typeName:qe.ZodBoolean,coerce:(null===e||void 0===e?void 0:e.coerce)||!1,...D(e)});class ae extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==o.date){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.date,received:t.parsedType}),y}if(isNaN(e.data.getTime()))return g(this._getOrReturnCtx(e),{code:s.invalid_date}),y;const t=new v;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:s.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:s.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):r.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ae.create=e=>new ae({checks:[],coerce:(null===e||void 0===e?void 0:e.coerce)||!1,typeName:qe.ZodDate,...D(e)});class se extends M{_parse(e){if(this._getType(e)!==o.symbol){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.symbol,received:t.parsedType}),y}return w(e.data)}}se.create=e=>new se({typeName:qe.ZodSymbol,...D(e)});class ce extends M{_parse(e){if(this._getType(e)!==o.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.undefined,received:t.parsedType}),y}return w(e.data)}}ce.create=e=>new ce({typeName:qe.ZodUndefined,...D(e)});class ue extends M{_parse(e){if(this._getType(e)!==o.null){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.null,received:t.parsedType}),y}return w(e.data)}}ue.create=e=>new ue({typeName:qe.ZodNull,...D(e)});class le extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}le.create=e=>new le({typeName:qe.ZodAny,...D(e)});class de extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}de.create=e=>new de({typeName:qe.ZodUnknown,...D(e)});class pe extends M{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.never,received:t.parsedType}),y}}pe.create=e=>new pe({typeName:qe.ZodNever,...D(e)});class fe extends M{_parse(e){if(this._getType(e)!==o.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.void,received:t.parsedType}),y}return w(e.data)}}fe.create=e=>new fe({typeName:qe.ZodVoid,...D(e)});class he extends M{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==o.array)return g(t,{code:s.invalid_type,expected:o.array,received:t.parsedType}),y;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(g(t,{code:e?s.too_big:s.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(g(t,{code:s.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(g(t,{code:s.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new R(t,e,t.path,n))))).then((e=>v.mergeArray(n,e)));const i=[...t.data].map(((e,n)=>r.type._parseSync(new R(t,e,t.path,n))));return v.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new he({...this._def,minLength:{value:e,message:A.toString(t)}})}max(e,t){return new he({...this._def,maxLength:{value:e,message:A.toString(t)}})}length(e,t){return new he({...this._def,exactLength:{value:e,message:A.toString(t)}})}nonempty(e){return this.min(1,e)}}function me(e){if(e instanceof ge){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ne.create(me(r))}return new ge({...e._def,shape:()=>t})}return e instanceof he?new he({...e._def,type:me(e.element)}):e instanceof Ne?Ne.create(me(e.unwrap())):e instanceof xe?xe.create(me(e.unwrap())):e instanceof Ce?Ce.create(e.items.map((e=>me(e)))):e}he.create=(e,t)=>new he({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...D(t)});class ge extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==o.object){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.object,received:t.parsedType}),y}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof pe&&"strip"===this._def.unknownKeys))for(const o in n.data)i.includes(o)||a.push(o);const c=[];for(const o of i){const e=r[o],t=n.data[o];c.push({key:{status:"valid",value:o},value:e._parse(new R(n,t,n.path,o)),alwaysSet:o in n.data})}if(this._def.catchall instanceof pe){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of a)c.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)a.length>0&&(g(n,{code:s.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const r=n.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new R(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of c){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>v.mergeObjectSync(t,e))):v.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new ge({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,a;const s=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=A.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new ge({...this._def,unknownKeys:"strip"})}passthrough(){return new ge({...this._def,unknownKeys:"passthrough"})}extend(e){return new ge({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ge({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:qe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ge({...this._def,catchall:e})}pick(e){const t={};return r.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new ge({...this._def,shape:()=>t})}omit(e){const t={};return r.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new ge({...this._def,shape:()=>t})}deepPartial(){return me(this)}partial(e){const t={};return r.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new ge({...this._def,shape:()=>t})}required(e){const t={};return r.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ne;)e=e._def.innerType;t[n]=e}})),new ge({...this._def,shape:()=>t})}keyof(){return Pe(r.objectKeys(this.shape))}}ge.create=(e,t)=>new ge({shape:()=>e,unknownKeys:"strip",catchall:pe.create(),typeName:qe.ZodObject,...D(t)}),ge.strictCreate=(e,t)=>new ge({shape:()=>e,unknownKeys:"strict",catchall:pe.create(),typeName:qe.ZodObject,...D(t)}),ge.lazycreate=(e,t)=>new ge({shape:e,unknownKeys:"strip",catchall:pe.create(),typeName:qe.ZodObject,...D(t)});class ve extends M{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new u(e.ctx.common.issues)));return g(t,{code:s.invalid_union,unionErrors:n}),y}));{let e;const r=[];for(const o of n){const n={...t,common:{...t.common,issues:[]},parent:null},i=o._parseSync({data:t.data,path:t.path,parent:n});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new u(e)));return g(t,{code:s.invalid_union,unionErrors:i}),y}}get options(){return this._def.options}}ve.create=(e,t)=>new ve({options:e,typeName:qe.ZodUnion,...D(t)});const ye=e=>e instanceof Ae?ye(e.schema):e instanceof Me?ye(e.innerType()):e instanceof Te?[e.value]:e instanceof Re?e.options:e instanceof ke?r.objectValues(e.enum):e instanceof Le?ye(e._def.innerType):e instanceof ce?[void 0]:e instanceof ue?[null]:e instanceof Ne?[void 0,...ye(e.unwrap())]:e instanceof xe?[null,...ye(e.unwrap())]:e instanceof ze||e instanceof Ke?ye(e.unwrap()):e instanceof je?ye(e._def.innerType):[];class be extends M{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.object)return g(t,{code:s.invalid_type,expected:o.object,received:t.parsedType}),y;const n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(g(t,{code:s.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const i of t){const t=ye(i.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,i)}}return new be({typeName:qe.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...D(n)})}}function we(e,t){const n=a(e),i=a(t);if(e===t)return{valid:!0,data:e};if(n===o.object&&i===o.object){const n=r.objectKeys(t),i=r.objectKeys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const r of i){const n=we(e[r],t[r]);if(!n.valid)return{valid:!1};o[r]=n.data}return{valid:!0,data:o}}if(n===o.array&&i===o.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const i=we(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===o.date&&i===o.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Se extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(S(e)||S(r))return y;const i=we(e.value,r.value);return i.valid?((C(e)||C(r))&&t.dirty(),{status:t.value,value:i.data}):(g(n,{code:s.invalid_intersection_types}),y)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((e=>{let[t,n]=e;return r(t,n)})):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Se.create=(e,t,n)=>new Se({left:e,right:t,typeName:qe.ZodIntersection,...D(n)});class Ce extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.array)return g(n,{code:s.invalid_type,expected:o.array,received:n.parsedType}),y;if(n.data.length<this._def.items.length)return g(n,{code:s.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:s.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new R(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>v.mergeArray(t,e))):v.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Ce({...this._def,rest:e})}}Ce.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ce({items:e,typeName:qe.ZodTuple,rest:null,...D(t)})};class _e extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.object)return g(n,{code:s.invalid_type,expected:o.object,received:n.parsedType}),y;const r=[],i=this._def.keyType,a=this._def.valueType;for(const o in n.data)r.push({key:i._parse(new R(n,o,n.path,o)),value:a._parse(new R(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?v.mergeObjectAsync(t,r):v.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new _e(t instanceof M?{keyType:e,valueType:t,typeName:qe.ZodRecord,...D(n)}:{keyType:te.create(),valueType:e,typeName:qe.ZodRecord,...D(t)})}}class Oe extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.map)return g(n,{code:s.invalid_type,expected:o.map,received:n.parsedType}),y;const r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(((e,t)=>{let[o,a]=e;return{key:r._parse(new R(n,o,n.path,[t,"key"])),value:i._parse(new R(n,a,n.path,[t,"value"]))}}));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return y;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return y;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}Oe.create=(e,t,n)=>new Oe({valueType:t,keyType:e,typeName:qe.ZodMap,...D(n)});class Ee extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.set)return g(n,{code:s.invalid_type,expected:o.set,received:n.parsedType}),y;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(g(n,{code:s.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(g(n,{code:s.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const i=this._def.valueType;function a(e){const n=new Set;for(const r of e){if("aborted"===r.status)return y;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const c=[...n.data.values()].map(((e,t)=>i._parse(new R(n,e,n.path,t))));return n.common.async?Promise.all(c).then((e=>a(e))):a(c)}min(e,t){return new Ee({...this._def,minSize:{value:e,message:A.toString(t)}})}max(e,t){return new Ee({...this._def,maxSize:{value:e,message:A.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ee.create=(e,t)=>new Ee({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...D(t)});class Ie extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.function)return g(t,{code:s.invalid_type,expected:o.function,received:t.parsedType}),y;function n(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,f(),l].filter((e=>!!e)),issueData:{code:s.invalid_arguments,argumentsError:n}})}function r(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,f(),l].filter((e=>!!e)),issueData:{code:s.invalid_return_type,returnTypeError:n}})}const i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof De){const e=this;return w((async function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];const c=new u([]),l=await e._def.args.parseAsync(o,i).catch((e=>{throw c.addIssue(n(o,e)),c})),d=await Reflect.apply(a,this,l);return await e._def.returns._def.type.parseAsync(d,i).catch((e=>{throw c.addIssue(r(d,e)),c}))}))}{const e=this;return w((function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];const c=e._def.args.safeParse(o,i);if(!c.success)throw new u([n(o,c.error)]);const l=Reflect.apply(a,this,c.data),d=e._def.returns.safeParse(l,i);if(!d.success)throw new u([r(l,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ie({...this._def,args:Ce.create(t).rest(de.create())})}returns(e){return new Ie({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ie({args:e||Ce.create([]).rest(de.create()),returns:t||de.create(),typeName:qe.ZodFunction,...D(n)})}}class Ae extends M{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ae.create=(e,t)=>new Ae({getter:e,typeName:qe.ZodLazy,...D(t)});class Te extends M{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:s.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Pe(e,t){return new Re({values:e,typeName:qe.ZodEnum,...D(t)})}Te.create=(e,t)=>new Te({value:e,typeName:qe.ZodLiteral,...D(t)});class Re extends M{constructor(){super(...arguments),T.set(this,void 0)}_parse(e){if("string"!==typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return g(t,{expected:r.joinValues(n),received:t.parsedType,code:s.invalid_type}),y}if(E(this,T,"f")||I(this,T,new Set(this._def.values),"f"),!E(this,T,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return g(t,{received:t.data,code:s.invalid_enum_value,options:n}),y}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return Re.create(e,{...this._def,...t})}exclude(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return Re.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}T=new WeakMap,Re.create=Pe;class ke extends M{constructor(){super(...arguments),P.set(this,void 0)}_parse(e){const t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==o.string&&n.parsedType!==o.number){const e=r.objectValues(t);return g(n,{expected:r.joinValues(e),received:n.parsedType,code:s.invalid_type}),y}if(E(this,P,"f")||I(this,P,new Set(r.getValidEnumValues(this._def.values)),"f"),!E(this,P,"f").has(e.data)){const e=r.objectValues(t);return g(n,{received:n.data,code:s.invalid_enum_value,options:e}),y}return w(e.data)}get enum(){return this._def.values}}P=new WeakMap,ke.create=(e,t)=>new ke({values:e,typeName:qe.ZodNativeEnum,...D(t)});class De extends M{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.promise&&!1===t.common.async)return g(t,{code:s.invalid_type,expected:o.promise,received:t.parsedType}),y;const n=t.parsedType===o.promise?t.data:Promise.resolve(t.data);return w(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}De.create=(e,t)=>new De({type:e,typeName:qe.ZodPromise,...D(t)});class Me extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:e=>{g(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===i.type){const e=i.transform(n.data,o);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return y;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?y:"dirty"===r.status||"dirty"===t.value?b(r.value):r}));{if("aborted"===t.value)return y;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?y:"dirty"===r.status||"dirty"===t.value?b(r.value):r}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?y:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?y:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!_(e))return e;const r=i.transform(e.value,o);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>_(e)?Promise.resolve(i.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}r.assertNever(i)}}Me.create=(e,t,n)=>new Me({schema:e,typeName:qe.ZodEffects,effect:t,...D(n)}),Me.createWithPreprocess=(e,t,n)=>new Me({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...D(n)});class Ne extends M{_parse(e){return this._getType(e)===o.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:qe.ZodOptional,...D(t)});class xe extends M{_parse(e){return this._getType(e)===o.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xe.create=(e,t)=>new xe({innerType:e,typeName:qe.ZodNullable,...D(t)});class Le extends M{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===o.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Le.create=(e,t)=>new Le({innerType:e,typeName:qe.ZodDefault,defaultValue:"function"===typeof t.default?t.default:()=>t.default,...D(t)});class je extends M{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return O(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new u(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new u(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}je.create=(e,t)=>new je({innerType:e,typeName:qe.ZodCatch,catchValue:"function"===typeof t.catch?t.catch:()=>t.catch,...D(t)});class Ue extends M{_parse(e){if(this._getType(e)!==o.nan){const t=this._getOrReturnCtx(e);return g(t,{code:s.invalid_type,expected:o.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Ue.create=e=>new Ue({typeName:qe.ZodNaN,...D(e)});const Fe=Symbol("zod_brand");class ze extends M{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Be extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?y:"dirty"===e.status?(t.dirty(),b(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?y:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Be({in:e,out:t,typeName:qe.ZodPipeline})}}class Ke extends M{_parse(e){const t=this._def.innerType._parse(e),n=e=>(_(e)&&(e.value=Object.freeze(e.value)),e);return O(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e?le.create().superRefine(((r,i)=>{var o,a;if(!e(r)){const e="function"===typeof t?t(r):"string"===typeof t?{message:t}:t,s=null===(a=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===a||a,c="string"===typeof e?{message:e}:e;i.addIssue({code:"custom",...c,fatal:s})}})):le.create()}Ke.create=(e,t)=>new Ke({innerType:e,typeName:qe.ZodReadonly,...D(t)});const We={object:ge.lazycreate};var qe;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(qe||(qe={}));const Ve=function(e){return He((t=>t instanceof e),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:`Input not instance of ${e.name}`})},$e=te.create,Ge=re.create,Ze=Ue.create,Qe=ie.create,Ye=oe.create,Je=ae.create,Xe=se.create,et=ce.create,tt=ue.create,nt=le.create,rt=de.create,it=pe.create,ot=fe.create,at=he.create,st=ge.create,ct=ge.strictCreate,ut=ve.create,lt=be.create,dt=Se.create,pt=Ce.create,ft=_e.create,ht=Oe.create,mt=Ee.create,gt=Ie.create,vt=Ae.create,yt=Te.create,bt=Re.create,wt=ke.create,St=De.create,Ct=Me.create,_t=Ne.create,Ot=xe.create,Et=Me.createWithPreprocess,It=Be.create,At=()=>$e().optional(),Tt=()=>Ge().optional(),Pt=()=>Ye().optional(),Rt={string:e=>te.create({...e,coerce:!0}),number:e=>re.create({...e,coerce:!0}),boolean:e=>oe.create({...e,coerce:!0}),bigint:e=>ie.create({...e,coerce:!0}),date:e=>ae.create({...e,coerce:!0})},kt=y;var Dt=Object.freeze({__proto__:null,defaultErrorMap:l,setErrorMap:p,getErrorMap:f,makeIssue:h,EMPTY_PATH:m,addIssueToContext:g,ParseStatus:v,INVALID:y,DIRTY:b,OK:w,isAborted:S,isDirty:C,isValid:_,isAsync:O,get util(){return r},get objectUtil(){return i},ZodParsedType:o,getParsedType:a,ZodType:M,datetimeRegex:J,ZodString:te,ZodNumber:re,ZodBigInt:ie,ZodBoolean:oe,ZodDate:ae,ZodSymbol:se,ZodUndefined:ce,ZodNull:ue,ZodAny:le,ZodUnknown:de,ZodNever:pe,ZodVoid:fe,ZodArray:he,ZodObject:ge,ZodUnion:ve,ZodDiscriminatedUnion:be,ZodIntersection:Se,ZodTuple:Ce,ZodRecord:_e,ZodMap:Oe,ZodSet:Ee,ZodFunction:Ie,ZodLazy:Ae,ZodLiteral:Te,ZodEnum:Re,ZodNativeEnum:ke,ZodPromise:De,ZodEffects:Me,ZodTransformer:Me,ZodOptional:Ne,ZodNullable:xe,ZodDefault:Le,ZodCatch:je,ZodNaN:Ue,BRAND:Fe,ZodBranded:ze,ZodPipeline:Be,ZodReadonly:Ke,custom:He,Schema:M,ZodSchema:M,late:We,get ZodFirstPartyTypeKind(){return qe},coerce:Rt,any:nt,array:at,bigint:Qe,boolean:Ye,date:Je,discriminatedUnion:lt,effect:Ct,enum:bt,function:gt,instanceof:Ve,intersection:dt,lazy:vt,literal:yt,map:ht,nan:Ze,nativeEnum:wt,never:it,null:tt,nullable:Ot,number:Ge,object:st,oboolean:Pt,onumber:Tt,optional:_t,ostring:At,pipeline:It,preprocess:Et,promise:St,record:ft,set:mt,strictObject:ct,string:$e,symbol:Xe,transformer:Ct,tuple:pt,undefined:et,union:ut,unknown:rt,void:ot,NEVER:kt,ZodIssueCode:s,quotelessJson:c,ZodError:u})},function(e,t,n){"use strict";var r,i,o,a,s,c;n.d(t,"f",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l})),function(e){e.LITE="lite",e.DARK="dark",e.DARK_STANDARD="dark-standard"}(r||(r={})),function(e){e.NATIVE_TAKE_OVER_LOGIN="TIBURON",e.DEFAULT="DEFAULT"}(i||(i={})),function(e){e.UNKNOWN="UNKNOWN",e.SA="SA",e.NONSA="NON-SA",e.HSA1="HSA1",e.HSA2="HSA2",e.MANAGED="MANAGED",e.RESTRICTED="RESTRICTED"}(o||(o={})),function(e){e.TIMEOUT="Timeout loading authentication",e.INVALID_DATA="Invalid data received",e.UNABLE_TO_CONTINUE_AUTHENTICATION="Unable to continue authentication",e.NATIVE_TAKE_OVER_LOGIN_FAILURE="Sign in With Apple Id failed",e.WIDGET_FAILURE="Auth widget throws auth failure error",e.TIMEOUT_LOADING_AUTH_WIDGET_JS="Timeout loading idms auth widget javascript file"}(a||(a={})),function(e){e.KEEP_ME_SIGNED_IN="keep-me-signed-in",e.REMEMBER_ME="remember-me"}(s||(s={})),function(e){e.UNKNOWN="UNKNOWN",e.REPAIR="REPAIR",e.NONSA="NON-SA",e.SA="SA",e.HSA1="HSA1",e.HSA2="HSA2",e.INTERSTITIAL="INTERSTITIAL",e.SIGNIN="SIGNIN",e.MANAGED="MANAGED",e.RESTRICTED="RESTRICTED",e.FEDERATED="FEDERATED"}(c||(c={}));const u=1e3;function l(e){switch(e){case o.MANAGED:case o.HSA1:case o.HSA2:return 2;case o.UNKNOWN:case o.SA:case o.NONSA:case o.RESTRICTED:return 1}}},function(e,t,n){"use strict";function r(e,t,n){const r=typeof e;if("string"!==r){const t=null===e?e:r;throw o.from(`Bad JSON root type: ${t}`,n)}try{const n=JSON.parse(e);return t.parse(n)}catch(i){throw o.from(i,n)}}async function i(e,t,n){try{let n=await e.json();return t.parse(n)}catch(r){throw o.from(r,n)}}n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));class o extends Error{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"UnnamedSchema",r=arguments.length>3?arguments[3]:void 0;super(e,t),this.schemaName=n,this.zodError=r,this.name="ParseJsonError",this.cause=t.cause}static from(e,t){let n,r,i;if(a(e)){n=e;const{formErrors:t}=e.flatten();t.length>0?(r="Bad form",i=t):(r="Bad keys",i=(e.issues||[]).map((e=>{let{path:t,message:n}=e;return`${t.join(".")}: ${n}`})))}else e instanceof SyntaxError?(r="Bad JSON",i=[e.message]):(r="Bad stuff",i=[e]);const s=i.length>1?"\n":" ",c=[`${t}: ${r}:`,...i].join(s);return new o(c,{cause:e},t,n)}}function a(e){const t=e;return e instanceof Error&&Array.isArray(t.issues)&&"function"==typeof t.flatten}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(884);function i(e){return Boolean((null===e||void 0===e?void 0:e.details)&&Object(r.d)(e.details)&&e.isAuthenticationComplete)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(893),i=n(894),o=n(2215);class a extends r.Event{constructor(e,t){super("connect"),this.connection=e,this.source=t}}class s extends r.EventTarget{constructor(e,t){super(),this.bufferedConnects=[],this.started=!1,this.closed=!1,this.unregisterService=null,this.connections=new Set,this.broadcastProxy=(()=>{const e=this;return new Proxy({},{get:(t,n,r)=>function(){const t=[];for(const r of Array.from(e.connections))t.push(r.remoteObjectProxy[n](...arguments));return Promise.allSettled(t)}})})(),this.handleConnection=(e,t)=>{this.closed||(this.started?this.createConnection(e,t):this.bufferedConnects.push([e,t]))},this.handleConnectionStateChange=e=>{const t=e.target;t instanceof i.a&&"closed"===t.connectionState&&(t.removeEventListener("connectionstatechange",this.handleConnectionStateChange),this.connections.delete(t))},this._onconnect=null,this.__onconnect=null,this._onclose=null,this.__onclose=null,this.serviceName=e,this.options=t?Object.assign({},t):t,this.unregisterService=o.a.registerService(e,this.handleConnection,{serviceZone:null===t||void 0===t?void 0:t.serviceZone,connectionOrigin:null===t||void 0===t?void 0:t.connectionOrigin})}start(){if(!this.closed&&!this.started){this.started=!0;for(const e of this.bufferedConnects)this.createConnection(e[0],e[1]);this.bufferedConnects.length=0}}close(){var e;this.closed||(this.closed=!0,null===(e=this.unregisterService)||void 0===e||e.call(this),this.bufferedConnects.length=0,this.dispatchEvent(new r.Event("close")))}createConnection(e,t){var n,r,o;const s=new i.a(e,{keepaliveTime:null===(n=this.options)||void 0===n?void 0:n.defaultConnectionKeepaliveTime,keepaliveInterval:null===(r=this.options)||void 0===r?void 0:r.defaultConnectionKeepaliveInterval,keepaliveRetry:null===(o=this.options)||void 0===o?void 0:o.defaultConnectionKeepaliveRetry});this.connections.add(s),s.addEventListener("connectionstatechange",this.handleConnectionStateChange);const c=new a(s,t);this.dispatchEvent(c),c.defaultPrevented&&s.close()}get onconnect(){return this._onconnect}set onconnect(e){if(this._onconnect!==e&&(this.__onconnect&&this.removeEventListener("connect",this.__onconnect),this._onconnect=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onconnect=t,this.addEventListener("connect",t)}}get onclose(){return this._onclose}set onclose(e){if(this._onclose!==e&&(this.__onclose&&this.removeEventListener("close",this.__onclose),this._onclose=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onclose=t,this.addEventListener("close",t)}}}},function(e,t,n){"use strict";function r(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];throw new TypeError(i(t,r))}}function i(e,t){let n=0;return e.replace(/%[os]/gu,(()=>o(t[n++])))}function o(e){return"object"!==typeof e||null===e?String(e):Object.prototype.toString.call(e)}let a;Object.defineProperty(t,"__esModule",{value:!0});const s="undefined"!==typeof window?window:"undefined"!==typeof self?self:"undefined"!==typeof globalThis||"undefined"!==typeof globalThis?globalThis:void 0;let c;class u{constructor(e,t){this.code=e,this.message=t}warn(){var e;try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(c)return void c({...this,args:n});const i=(null!==(e=(new Error).stack)&&void 0!==e?e:"").replace(/^(?:.+?\n){2}/gu,"\n");console.warn(this.message,...n,i)}catch(i){}}}const l=new u("W01","Unable to initialize event under dispatching."),d=new u("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),p=new u("W03","Assigning any truthy value to 'returnValue' property has no effect."),f=new u("W04","Unable to preventDefault on non-cancelable events."),h=new u("W05","Unable to preventDefault inside passive event listener invocation."),m=new u("W06","An event listener wasn't added because it has been added already: %o, %o"),g=new u("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),v=new u("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),y=new u("W09","Event attribute handler must be a function: %o");class b{static get NONE(){return w}static get CAPTURING_PHASE(){return S}static get AT_TARGET(){return C}static get BUBBLING_PHASE(){return _}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=null!==t&&void 0!==t?t:{};O.set(this,{type:String(e),bubbles:Boolean(n.bubbles),cancelable:Boolean(n.cancelable),composed:Boolean(n.composed),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return E(this).type}get target(){return E(this).target}get srcElement(){return E(this).target}get currentTarget(){return E(this).currentTarget}composedPath(){const e=E(this).currentTarget;return e?[e]:[]}get NONE(){return w}get CAPTURING_PHASE(){return S}get AT_TARGET(){return C}get BUBBLING_PHASE(){return _}get eventPhase(){return E(this).dispatchFlag?2:0}stopPropagation(){E(this).stopPropagationFlag=!0}get cancelBubble(){return E(this).stopPropagationFlag}set cancelBubble(e){e?E(this).stopPropagationFlag=!0:d.warn()}stopImmediatePropagation(){const e=E(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return E(this).bubbles}get cancelable(){return E(this).cancelable}get returnValue(){return!E(this).canceledFlag}set returnValue(e){e?p.warn():I(E(this))}preventDefault(){I(E(this))}get defaultPrevented(){return E(this).canceledFlag}get composed(){return E(this).composed}get isTrusted(){return!1}get timeStamp(){return E(this).timeStamp}initEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=E(this);r.dispatchFlag?l.warn():O.set(this,{...r,type:String(e),bubbles:Boolean(t),cancelable:Boolean(n),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}}const w=0,S=1,C=2,_=3,O=new WeakMap;function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"this";const n=O.get(e);return r(null!=n,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),n}function I(e){e.inPassiveListenerFlag?h.warn():e.cancelable?e.canceledFlag=!0:f.warn()}Object.defineProperty(b,"NONE",{enumerable:!0}),Object.defineProperty(b,"CAPTURING_PHASE",{enumerable:!0}),Object.defineProperty(b,"AT_TARGET",{enumerable:!0}),Object.defineProperty(b,"BUBBLING_PHASE",{enumerable:!0});const A=Object.getOwnPropertyNames(b.prototype);for(let te=0;te<A.length;++te)"constructor"!==A[te]&&Object.defineProperty(b.prototype,A[te],{enumerable:!0});let T;"undefined"!==typeof s&&"undefined"!==typeof s.Event&&Object.setPrototypeOf(b.prototype,s.Event.prototype);const P={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};function R(e){const t=Object.keys(P);for(let n=0;n<t.length;++n){const r=t[n],i=P[r];Object.defineProperty(e,r,{get:()=>i,configurable:!0,enumerable:!0})}}class k extends b{static wrap(e){return new(x(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),D.set(this,{original:e});const t=Object.keys(e);for(let n=0;n<t.length;++n){const r=t[n];r in this||Object.defineProperty(this,r,L(e,r))}}stopPropagation(){super.stopPropagation();const{original:e}=M(this);"stopPropagation"in e&&e.stopPropagation()}get cancelBubble(){return super.cancelBubble}set cancelBubble(e){super.cancelBubble=e;const{original:t}=M(this);"cancelBubble"in t&&(t.cancelBubble=e)}stopImmediatePropagation(){super.stopImmediatePropagation();const{original:e}=M(this);"stopImmediatePropagation"in e&&e.stopImmediatePropagation()}get returnValue(){return super.returnValue}set returnValue(e){super.returnValue=e;const{original:t}=M(this);"returnValue"in t&&(t.returnValue=e)}preventDefault(){super.preventDefault();const{original:e}=M(this);"preventDefault"in e&&e.preventDefault()}get timeStamp(){const{original:e}=M(this);return"timeStamp"in e?e.timeStamp:super.timeStamp}}const D=new WeakMap;function M(e){const t=D.get(e);return r(null!=t,"'this' is expected an Event object, but got",e),t}const N=new WeakMap;function x(e){const t=Object.getPrototypeOf(e);if(null==t)return k;let n=N.get(t);return null==n&&(n=function(e,t){class n extends e{}const r=Object.keys(t);for(let i=0;i<r.length;++i)Object.defineProperty(n.prototype,r[i],L(t,r[i]));return n}(x(t),t),N.set(t,n)),n}function L(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return{get(){const e=M(this).original,n=e[t];return"function"===typeof n?n.bind(e):n},set(e){M(this).original[t]=e},configurable:n.configurable,enumerable:n.enumerable}}function j(e){return 1===(1&e.flags)}function U(e){return 2===(2&e.flags)}function F(e){return 4===(4&e.flags)}function z(e){return 8===(8&e.flags)}function B(e,t,n){let{callback:r}=e;try{"function"===typeof r?r.call(t,n):"function"===typeof r.handleEvent&&r.handleEvent(n)}catch(i){!function(e){try{const t=e instanceof Error?e:new Error(o(e));if(a)return void a(t);if("function"===typeof dispatchEvent&&"function"===typeof ErrorEvent)dispatchEvent(new ErrorEvent("error",{error:t,message:t.message}));else if("undefined"!==typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",t);console.error(t)}catch(t){}}(i)}}function K(e,t,n){let{listeners:r}=e;for(let i=0;i<r.length;++i)if(r[i].callback===t&&j(r[i])===n)return i;return-1}function H(e,t,n,r,i,o){let a;o&&(a=W.bind(null,e,t,n),o.addEventListener("abort",a));const s=function(e,t,n,r,i,o){return{callback:e,flags:(t?1:0)|(n?2:0)|(r?4:0),signal:i,signalListener:o}}(t,n,r,i,o,a);return e.cow?(e.cow=!1,e.listeners=[...e.listeners,s]):e.listeners.push(s),s}function W(e,t,n){const r=K(e,t,n);return-1!==r&&q(e,r)}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.listeners[t];return function(e){e.flags|=8}(r),r.signal&&r.signal.removeEventListener("abort",r.signalListener),e.cow&&!n?(e.cow=!1,e.listeners=e.listeners.filter(((e,n)=>n!==t)),!1):(e.listeners.splice(t,1),!0)}function V(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}N.set(Object.prototype,k),"undefined"!==typeof s&&"undefined"!==typeof s.Event&&N.set(s.Event.prototype,k);class ${constructor(){G.set(this,Object.create(null))}addEventListener(e,t,n){const r=Z(this),{callback:i,capture:o,once:a,passive:s,signal:c,type:u}=function(e,t,n){var r;return Q(t),"object"===typeof n&&null!==n?{type:String(e),callback:null!==t&&void 0!==t?t:void 0,capture:Boolean(n.capture),passive:Boolean(n.passive),once:Boolean(n.once),signal:null!==(r=n.signal)&&void 0!==r?r:void 0}:{type:String(e),callback:null!==t&&void 0!==t?t:void 0,capture:Boolean(n),passive:!1,once:!1,signal:void 0}}(e,t,n);if(null==i||(null===c||void 0===c?void 0:c.aborted))return;const l=V(r,u),d=K(l,i,o);-1===d?H(l,i,o,s,a,c):function(e,t,n,r){m.warn(j(e)?"capture":"bubble",e.callback),U(e)!==t&&g.warn("passive"),F(e)!==n&&g.warn("once"),e.signal!==r&&g.warn("signal")}(l.listeners[d],s,a,c)}removeEventListener(e,t,n){const r=Z(this),{callback:i,capture:o,type:a}=function(e,t,n){return Q(t),"object"===typeof n&&null!==n?{type:String(e),callback:null!==t&&void 0!==t?t:void 0,capture:Boolean(n.capture)}:{type:String(e),callback:null!==t&&void 0!==t?t:void 0,capture:Boolean(n)}}(e,t,n),s=r[a];null!=i&&s&&W(s,i,o)}dispatchEvent(e){const t=Z(this)[String(e.type)];if(null==t)return!0;const n=e instanceof b?e:k.wrap(e),r=E(n,"event");if(r.dispatchFlag)throw i="This event has been in dispatching.",s.DOMException?new s.DOMException(i,"InvalidStateError"):(null==T&&(T=class e extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,e)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(T.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),R(T),R(T.prototype)),new T(i));var i;if(r.dispatchFlag=!0,r.target=r.currentTarget=this,!r.stopPropagationFlag){const{cow:e,listeners:i}=t;t.cow=!0;for(let o=0;o<i.length;++o){const a=i[o];if(!z(a)&&(F(a)&&q(t,o,!e)&&(o-=1),r.inPassiveListenerFlag=U(a),B(a,this,n),r.inPassiveListenerFlag=!1,r.stopImmediatePropagationFlag))break}e||(t.cow=!1)}return r.target=null,r.currentTarget=null,r.stopImmediatePropagationFlag=!1,r.stopPropagationFlag=!1,r.dispatchFlag=!1,!r.canceledFlag}}const G=new WeakMap;function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"this";const n=G.get(e);return r(null!=n,"'%s' must be an object that EventTarget constructor created, but got another one: %o",t,e),n}function Q(e){if("function"!==typeof e&&("object"!==typeof e||null===e||"function"!==typeof e.handleEvent)){if(null!=e&&"object"!==typeof e)throw new TypeError(i(v.message,[e]));v.warn(e)}}const Y=Object.getOwnPropertyNames($.prototype);for(let te=0;te<Y.length;++te)"constructor"!==Y[te]&&Object.defineProperty($.prototype,Y[te],{enumerable:!0});function J(e,t){var n,r;return null!==(r=null===(n=Z(e,"target")[t])||void 0===n?void 0:n.attrCallback)&&void 0!==r?r:null}function X(e,t,n){null!=n&&"function"!==typeof n&&y.warn(n),"function"===typeof n||"object"===typeof n&&null!==n?function(e,t,n){const r=V(Z(e,"target"),String(t));r.attrCallback=n,null==r.attrListener&&(r.attrListener=H(r,function(e){return function(t){const n=e.attrCallback;"function"===typeof n&&n.call(this,t)}}(r),!1,!1,!1,void 0))}(e,t,n):function(e,t){const n=Z(e,"target")[String(t)];n&&n.attrListener&&(W(n,n.attrListener.callback,!1),n.attrCallback=n.attrListener=void 0)}(e,t)}function ee(e,t,n){Object.defineProperty(e,`on${t}`,{get(){return J(this,t)},set(e){X(this,t,e)},configurable:!0,enumerable:!0})}"undefined"!==typeof s&&"undefined"!==typeof s.EventTarget&&Object.setPrototypeOf($.prototype,s.EventTarget.prototype),t.Event=b,t.EventTarget=$,t.default=$,t.defineCustomEventTarget=function(){class e extends ${}for(let t=0;t<arguments.length;++t)ee(e.prototype,t<0||arguments.length<=t?void 0:arguments[t]);return e},t.defineEventAttribute=ee,t.getEventAttributeValue=J,t.setErrorHandler=function(e){r("function"===typeof e||void 0===e,"The error handler must be a function or undefined, but got %o.",e),a=e},t.setEventAttributeValue=X,t.setWarningHandler=function(e){r("function"===typeof e||void 0===e,"The warning handler must be a function or undefined, but got %o.",e),c=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(893),i=n(895);class o extends r.EventTarget{constructor(e,t){super(),this.sequenceNumber=1,this.activeRequests=new Map,this.started=!1,this.closed=!1,this.remoteObjectProxy=(()=>{const e=this;return new Proxy({},{get:(t,n,r)=>function(){const t=""+e.sequenceNumber++,r=new Promise(((n,r)=>{e.activeRequests.set(t,[n,r])}));for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e.connection.postMessage({jsonrpc:"2.0",id:t,methodName:n,params:o}),r}})})(),this.exportedObject=null,this.handleConnectionStateChange=()=>{this.dispatchEvent(new r.Event("connectionstatechange"))},this.handleMessage=e=>{var t;const n=e.data;if(!n||"object"!==typeof n)return;if("2.0"!==n.jsonrpc)return;const r=n.id;if("string"!==typeof r)return;const i=n.methodName;if("string"===typeof i){const a=null!==(t=n.params)&&void 0!==t?t:[];if(!Array.isArray(a))return void this.connection.postMessage({jsonrpc:"2.0",id:r,error:"Parameters for RPC call is not an array"});const s=this.exportedObject;if(!s)return void this.connection.postMessage({jsonrpc:"2.0",id:r,error:`No exported object for RPC call to ${i}`});const c=s[i];return"function"!==typeof c?void this.connection.postMessage({jsonrpc:"2.0",id:r,error:`Exported object property ${i} is not a function`}):void(()=>{var i,a,u,l;i=this,a=void 0,l=function*(){try{o.current=this;const e=yield c.apply(s,n.params);this.connection.postMessage({jsonrpc:"2.0",id:r,result:e})}catch(e){this.connection.postMessage({jsonrpc:"2.0",id:r,error:`Error during RPC call: ${(()=>{try{return""+e}catch(t){return"<failed to stringify>"}})()}`})}},new((u=void 0)||(u=Promise))((function(t,n){function r(t){try{s(l.next(t))}catch(e){n(e)}}function o(t){try{s(l.throw(t))}catch(e){n(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof u?n:new u((function(e){e(n)}))).then(r,o)}s((l=l.apply(i,a||[])).next())}))})()}const a=this.activeRequests.get(r);a&&("result"in n?(this.activeRequests.delete(r),a[0](n.result)):"error"in n&&(this.activeRequests.delete(r),a[1](new Error(n.error))))},this._onconnectionstatechange=null,this.__onconnectionstatechange=null,this.connection=new i.a(e,t),this.connection.addEventListener("message",this.handleMessage),this.connection.addEventListener("connectionstatechange",this.handleConnectionStateChange)}close(){this.closed||(this.closed=!0,this.connection.close(),this.connection.removeEventListener("message",this.handleMessage),this.connection.removeEventListener("connectionstatechange",this.handleConnectionStateChange))}start(){this.closed||this.started||(this.started=!0,this.connection.start())}usePort(e){this.connection.usePort(e)}get connectionState(){return this.connection.connectionState}get onconnectionstatechange(){return this._onconnectionstatechange}set onconnectionstatechange(e){if(this._onconnectionstatechange!==e&&(this.__onconnectionstatechange&&this.removeEventListener("connectionstatechange",this.__onconnectionstatechange),this._onconnectionstatechange=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onconnectionstatechange=t,this.addEventListener("connectionstatechange",t)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(893);class i extends r.EventTarget{constructor(e,t){var n,r,i;super(),this.bufferedPostMessages=[],this.started=!1,this.closed=!1,this.lastMessageReceivedTime=globalThis.performance.now(),this._onmessage=null,this.__onmessage=null,this._onmessageerror=null,this.__onmessageerror=null,this._onconnectionstatechange=null,this.__onconnectionstatechange=null,this.handlePortMessage=e=>{if(this.lastMessageReceivedTime=globalThis.performance.now(),null!==(t=n=e.data)&&"object"===typeof t&&"1.0"===n.__messagePortConnection&&"string"===typeof n.type){if(function(e){return"keepaliverequest"===e.type}(e.data))return void this.postMessage({__messagePortConnection:"1.0",type:"keepaliveresponse"});if(function(e){return"keepaliveresponse"===e.type}(e.data))return;if(function(e){return"disconnect"===e.type}(e.data))return void this.close()}var t,n;this.dispatchEvent(new MessageEvent("message",{data:e.data}))},this.handlePortMessageError=e=>{this.lastMessageReceivedTime=globalThis.performance.now(),this.dispatchEvent(new MessageEvent("messageerror",{data:e.data}))},this.keepaliveTime=null!==(n=null===t||void 0===t?void 0:t.keepaliveTime)&&void 0!==n?n:6e5,this.keepaliveInterval=null!==(r=null===t||void 0===t?void 0:t.keepaliveInterval)&&void 0!==r?r:6e4,this.keepaliveRetry=null!==(i=null===t||void 0===t?void 0:t.keepaliveRetry)&&void 0!==i?i:5,e&&this.usePort(e)}close(){if(this.closed)return;this.closed=!0;const e=this.port;e&&(this.stopKeepalive(),e.removeEventListener("message",this.handlePortMessage),e.removeEventListener("messageerror",this.handlePortMessageError),e.postMessage({__messagePortConnection:"1.0",type:"disconnect"}),e.close()),this.port=null,null!==e&&this.dispatchEvent(new r.Event("connectionstatechange"))}start(){this.closed||this.started||(this.started=!0,this.port&&(this.startKeepalive(),this.port.start()))}postMessage(e,t){this.closed||(this.port?this.port.postMessage(e,t):this.bufferedPostMessages.push([e,t]))}usePort(e){if(this.closed)return;if(this.port===e)return;const t=this.port;t&&(this.stopKeepalive(),t.removeEventListener("message",this.handlePortMessage),t.removeEventListener("messageerror",this.handlePortMessageError),t.postMessage({__messagePortConnection:"1.0",type:"disconnect"}),t.close()),e.addEventListener("message",this.handlePortMessage),e.addEventListener("messageerror",this.handlePortMessageError),this.started&&(this.startKeepalive(),e.start());for(const n of this.bufferedPostMessages)e.postMessage(n[0],n[1]);this.bufferedPostMessages.length=0,this.port=e,void 0===t&&this.dispatchEvent(new r.Event("connectionstatechange"))}get connectionState(){switch(this.port){case void 0:return"connecting";case null:return"closed";default:return"open"}}startKeepalive(){let e=0,t=globalThis.performance.now();this.lastMessageReceivedTime=t;const n=()=>{var i;if(this.lastMessageReceivedTime<=t)e>=this.keepaliveRetry?this.close():(null===(i=this.port)||void 0===i||i.postMessage({__messagePortConnection:"1.0",type:"keepaliverequest"}),++e),this.keepaliveIntervalHandle=globalThis.setTimeout(n,this.keepaliveInterval);else{this.keepaliveIntervalHandle=void 0;const e=globalThis.performance.now()-this.lastMessageReceivedTime,t=Math.max(0,this.keepaliveTime-e);this.keepaliveTimeHandle=globalThis.setTimeout(r,t)}},r=()=>{const i=globalThis.performance.now()-this.lastMessageReceivedTime;if(this.keepaliveInterval<=i)this.keepaliveTimeHandle=void 0,e=0,t=this.lastMessageReceivedTime,n();else{const e=Math.max(0,this.keepaliveTime-i);this.keepaliveTimeHandle=globalThis.setTimeout(r,e)}};this.keepaliveTimeHandle=globalThis.setTimeout(r,this.keepaliveTime)}get onmessage(){return this._onmessage}set onmessage(e){if(this._onmessage!==e&&(this.__onmessage&&this.removeEventListener("message",this.__onmessage),this._onmessage=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onmessage=t,this.addEventListener("message",t)}}get onmessageerror(){return this._onmessageerror}set onmessageerror(e){if(this._onmessageerror!==e&&(this.__onmessageerror&&this.removeEventListener("messageerror",this.__onmessageerror),this._onmessageerror=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onmessageerror=t,this.addEventListener("messageerror",t)}}get onconnectionstatechange(){return this._onconnectionstatechange}set onconnectionstatechange(e){if(this._onconnectionstatechange!==e&&(this.__onconnectionstatechange&&this.removeEventListener("connectionstatechange",this.__onconnectionstatechange),this._onconnectionstatechange=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onconnectionstatechange=t,this.addEventListener("connectionstatechange",t)}}stopKeepalive(){globalThis.clearTimeout(this.keepaliveTimeHandle),globalThis.clearTimeout(this.keepaliveIntervalHandle)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(893);const i="com.icloud.auth";r.Event},function(e,t,n){"use strict";function r(e){return{environment:e.environment,applications:e.applications,urls:e.urls,accountCreateEnabled:e.accountCreateEnabled,trustTokens:e.trustTokens,isPCSKeyDeleted:e.isPCSKeyDeleted,webServices:e.webServices,rawConfiguration:e.rawResponse,safariBookmarksHasMigratedToCloudKit:null===e||void 0===e?void 0:e.safariBookmarksHasMigratedToCloudKit}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return b}));var r,i,o=n(902),a=n(2249),s=n(878),c=n(904),u=n(922),l=n(903),d=n(900),p=n(901),f=n(924),h=n(899),m=n(923),g=n(905),v=n(917);class y{static get domain(){return d.a.sharedInstance.current}static set domain(e){this.supportedDomains.includes(e)&&Object(o.a)(window.location.href.replace(this.domain.url.hostname,e.url.hostname))}static get primaryInteractionMode(){return l.c.sharedInstance.primaryInteractionMode}static get applicationName(){return h.a}static get protocol(){return window.location.protocol}static get hostname(){return window.location.hostname}static get masteringNumber(){return __CW_BUILD_INFO.masteringNumber}static get buildNumber(){return __CW_BUILD_INFO.buildNumber}static get locale(){return Object(s.b)()}static get isRTL(){return Object(c.c)(Object(s.b)())}static get theme(){return"modern"}static get platformType(){return l.c.sharedInstance.platformType}static get secondaryLocale(){return y._secondaryLocale}static set secondaryLocale(e){y._secondaryLocale=e}static get deviceType(){return l.c.sharedInstance.deviceType}static pushHistoryState(e,t,n,r,i,o){let a="";"newspublisher"===n?(o=`#${n}`,n="",r&&(o=`${o}/${r}`)):(n&&(a=`${n}/`),r&&(a=`${a}${r}`));const s=w(y.protocol,y.hostname,a,i,o);window.history.pushState(e,t,s),g.b.broadcast(e,t,s,"pushState"),t&&(this.title=t)}static replaceHistoryState(e,t,n,r,i,o){let a="";"newspublisher"===n?(o=`#${n}`,n="",r&&(o=`${o}/${r}`)):(n&&(a=`${n}/`),r&&(a=`${a}${r}`));const s=w(y.protocol,y.hostname,a,i,o);let c=!1;return window.history.state===e&&window.location.href===s||(window.history.replaceState(e,"",s),g.b.broadcast(e,t,s,"replaceState"),c=!0),t&&this.title!==t&&(this.title=t,c=!0),c}static get title(){return window.document.title}static set title(e){window.document.title=e}static get isDesktopPlatform(){const{sharedInstance:e}=l.c;return e.primaryInteractionMode===l.b.MOUSE||e.isiPad}}function b(e,t,n,r,i,o,a){e.endsWith(":")||(e=`${e}:`);const s=Object(f.a)(`${e}//${t}/applications/${r}/current/${n}`,{rootDomain:a});return void 0!==i&&(s.port=i.toString()),o&&(s.pathname+=`/${o}`),s.href}function w(e,t,n,r,i){e.endsWith(":")||(e=`${e}:`);const o=Object(a.c)(`${e}//${t}`);return n&&(o.pathname=n),r&&(o.search=r),i&&(o.hash=i),o.href}y.supportedDomains=Object.entries(p.a).map((e=>{let[,t]=e;return t})),y._secondaryLocale=null,y.clientId=null!==(r=null!==(i=window.__earlyClientId)&&void 0!==i?i:Object(v.a)())&&void 0!==r?r:Object(u.a)(),y.supportedLocales=m.b,y.childApplicationSupportedLocales=m.c,y.protocolVersion=2},function(e){e.exports=JSON.parse('{"a":"cloudos2"}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(901);class o{constructor(){this.current=(()=>{const e=window.location.hostname;for(const t of i.a)if(t.url.hostname===e)return t;throw new Error(`hostname ${e} is not supported`)})(),this.allowedRemoteOrigins=i.a.map((e=>e.url.origin))}findAvailableHostname(e){for(let t=this.current;t;t=t.fallbackDomain)if(e.includes(t))return t.url.hostname;return null}get isDomainCN(){return this.current===i.d}isUrlCurrentDomain(e){const t=!!e.match(/^.*\.icloud\.com\.cn$/);return this.isDomainCN===t}}r=o,o.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"a",(function(){return l}));var r=n(2249);const i={url:Object(r.c)("https://www.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"www"},o={url:Object(r.c)("https://www.icloud.com.cn/"),servicesDomain:"icloud.com.cn",domainLogo:"icloud.cn.logo",cookiesDomain:"icloud.com.cn",rootDomain:"www"},a={url:Object(r.c)("https://beta.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"beta"},s={url:Object(r.c)("https://future.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:a,cookiesDomain:"icloud.com",rootDomain:"future"},c={url:Object(r.c)("https://carry.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"carry"},u={url:Object(r.c)("https://sprinkles.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"sprinkles"},l=[i,o,a,s,c,u]},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2249);function i(e){const t=Object(r.c)(e);globalThis.location.href=t.href}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return c}));let i=function(e){return e.PHONE="PHONE",e.TABLET="TABLET",e.DESKTOP="DESKTOP",e}({}),o=function(e){return e.COMPACT="COMPACT",e.REGULAR="REGULAR",e}({}),a=function(e){return e.MOUSE="MOUSE",e.TOUCH="TOUCH",e}({}),s=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.WINDOWS="WINDOWS",e.MAC="MAC",e.LINUX="LINUX",e.CHROMEOS="CHROMEOS",e.UNKNOWN="UNKNOWN",e}({});class c{constructor(){this.platformType=function(){const e=window.navigator.userAgent;return/ipad|ipod|iphone/i.test(e)?s.IOS:/android/i.test(e)?s.ANDROID:/mac/i.test(e)&&!/like mac/i.test(e)?"ontouchstart"in window||"createTouch"in window.document?s.IOS:s.MAC:/windows/i.test(e)?s.WINDOWS:/\bcros\b/i.test(e)?s.CHROMEOS:/\blinux\b/i.test(e)?s.LINUX:s.UNKNOWN}(),this.isAndroid=this.platformType===s.ANDROID,this.isWindows=this.platformType===s.WINDOWS,this.isMac=this.platformType===s.MAC,this.isiOS=this.platformType===s.IOS,this.primaryInteractionMode=this.isiOS||this.isAndroid?a.TOUCH:a.MOUSE,this.isTouch=this.primaryInteractionMode===a.TOUCH,this.isMouse=this.primaryInteractionMode===a.MOUSE,this.deviceType=this.isMouse?i.DESKTOP:Math.min(window.screen.width,window.screen.height)>667?i.TABLET:i.PHONE,this.isiPad=this.isiOS&&this.deviceType===i.TABLET,this.isiPhoneOriPod=this.isiOS&&this.deviceType===i.PHONE}}r=c,c.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r,i=["ar","iw","he","ur","fa","sd"];function o(e){return i.some((function(t){return e.startsWith(t)}))}function a(e){return o(e)?r.RTL:r.LTR}!function(e){e.LTR="ltr",e.RTL="rtl"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(906),i=n(2249),o=n(919),a=n(2208);const s=new WeakMap,c=new WeakMap;function u(e,t){const n=`/${t.applicationInfo.configuration.identifier}/`;d.registerChildContext(e,n),s.set(e,((e,r,o)=>{const a=o?Object(i.b)(o):window.location,s={...t.currentHistoryState,applicationHash:a.hash,applicationHistoryState:e,applicationRelativePath:a.pathname.substring(n.length)};return void 0!==r&&(s.applicationTitleName=r),s})),l(e);const r=e=>{var t;if(!window.location.pathname.startsWith(n))return;const r=null===(t=e.state)||void 0===t?void 0:t.applicationTitleName;"string"===typeof r&&(document.title=r)};addEventListener("popstate",r),c.set(e,(()=>{removeEventListener("popstate",r)}))}function l(e){var t;null===(t=c.get(e))||void 0===t||t(),c.delete(e)}const d=new r.HistoryLink({allowUpdatingDocumentTitle:!0,mapParentStateToChildState(e){try{return null===e||void 0===e?void 0:e.applicationHistoryState}catch{return}},mapChildStateToParentState(e,t,n,r){const i=s.get(r);return i?i(e,t,n):e},mapParentStateToTitle(e){try{const t=null===e||void 0===e?void 0:e.applicationTitleName;return"string"===typeof t?t:void 0}catch{return}},pushOrReplaceStateDidThrow(e){a.b.sharedInstance.recordStat(new o.a("historyServiceError",{message:e instanceof Error?e.message:"(unknown)"}))}})},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}),i(n(907),t),i(n(910),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryLink=void 0;const r=n(2210),i=n(909),o=n(910);t.HistoryLink=class{constructor(e){this.options=e,this.listener=new r.JsonRpcServiceListener(i.serviceName),this.pathnamePrefixMap=new WeakMap,this.connections=new WeakMap,this.listeners=new Set,this.closed=!1,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.onConnect=e=>{var t,n;const r=null!==(n=null===(t=this.options)||void 0===t?void 0:t.mockChildContext)&&void 0!==n?n:e.source;if(!(r instanceof HTMLIFrameElement))return e.connection.start(),e.connection.remoteObjectProxy.initFailed("unregistered browsing context"),void e.connection.close();const i=this.connections.get(r);if(i&&"closed"!==i.connectionState)return e.connection.start(),e.connection.remoteObjectProxy.initFailed("connection already active"),void e.connection.close();const a=this.pathnamePrefixMap.get(r);if(void 0===a)return e.connection.start(),e.connection.remoteObjectProxy.initFailed("unregistered pathname prefix"),void e.connection.close();new o.HistoryService(this,r,e.connection,a).start(),this.connections.set(r,e.connection)},this.listener.addEventListener("connect",this.onConnect),this.listener.start()}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close()}}registerChildContext(e,t){this.pathnamePrefixMap.set(e,t)}broadcast(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;for(const o of this.listeners)o(e,t,n,r,i)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(894),i=n(2215);class o extends r.a{constructor(e,t){super(void 0,t),this.serviceName=e;const n=i.a.connectToService(e,{serviceZone:null===t||void 0===t?void 0:t.serviceZone,serviceOrigin:null===t||void 0===t?void 0:t.serviceOrigin,connectionTimeout:null===t||void 0===t?void 0:t.timeout});(()=>{var e,t,r,i;e=this,t=void 0,i=function*(){const e=yield n;e&&this.usePort(e)},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(t){o(t)}}function s(e){try{c(i.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))})()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serviceName=void 0,t.serviceName="com.icloud.history"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryService=void 0;const r=n(465),i=n(2242);t.HistoryService=class{constructor(e,t,n,r){this.link=e,this.remoteElement=t,this.connection=n,this.pathnamePrefix=r,this.seq=0,this.pushState=(e,t,n)=>this.updateState(e,t,n,"pushState"),this.replaceState=(e,t,n)=>this.updateState(e,t,n,"replaceState");const o=this.link.options,a=e=>{this.currentPathnameMatchesServicePrefix()&&this.connection.remoteObjectProxy.update(++this.seq,(null===o||void 0===o?void 0:o.mapParentStateToChildState)?o.mapParentStateToChildState(e.state):e.state,(null===o||void 0===o?void 0:o.mapParentStateToTitle)?o.mapParentStateToTitle(e.state):void 0,location.toString(),"user")};addEventListener("popstate",a);const s=e.subscribe(((e,t,n,r,a)=>{a!==this.remoteElement&&(0,i.parsePageUrl)(n).pathname.startsWith(this.pathnamePrefix)&&this.connection.remoteObjectProxy.update(++this.seq,(null===o||void 0===o?void 0:o.mapParentStateToChildState)?o.mapParentStateToChildState(e):e,t,n,r).then((()=>{}),(()=>{}))}));this.connection.addEventListener("connectionstatechange",(()=>{"closed"===this.connection.connectionState&&(removeEventListener("popstate",a),s())})),this.connection.exportedObject={pushState:this.pushState,replaceState:this.replaceState};const c=this.currentPathnameMatchesServicePrefix();this.connection.remoteObjectProxy.init({pathnamePrefix:this.pathnamePrefix,state:c?(null===o||void 0===o?void 0:o.mapParentStateToChildState)?o.mapParentStateToChildState(history.state):history.state:void 0,url:c?location.toString():void 0}).then((()=>{}),(()=>{}))}start(){this.connection.start()}close(){this.connection.close()}updateState(e,t,n,i){var o,a,s,c;if(!this.currentPathnameMatchesServicePrefix())return Promise.resolve(r.Result.failure("iframe inactive"));const u=this.parseAndValidateUrl(n);if(!u.ok)return Promise.resolve(r.Result.failure("pathname prefix violation"));const l=null===(o=this.link.options)||void 0===o?void 0:o.mapChildStateToParentState,d=l?l(e,t,n,this.remoteElement):e;try{history[i](d,"",u.value)}catch(f){return null===(s=null===(a=this.link.options)||void 0===a?void 0:a.pushOrReplaceStateDidThrow)||void 0===s||s.call(a,f),Promise.resolve(r.Result.failure("native exception"))}(null===(c=this.link.options)||void 0===c?void 0:c.allowUpdatingDocumentTitle)&&void 0!==t&&(document.title=t);const p=location.toString();return this.link.broadcast(d,t,p,i,this.remoteElement),Promise.resolve(r.Result.success({seq:++this.seq,url:p}))}currentPathnameMatchesServicePrefix(){return location.pathname.startsWith(this.pathnamePrefix)}parseAndValidateUrl(e){if(void 0===e)return r.Result.success(void 0);const t=(0,i.parsePageUrl)(e,{base:location.toString()});return t.pathname.startsWith(this.pathnamePrefix)?r.Result.success(t):r.Result.failure()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2249);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=""===e?"":Object(r.c)(e).href,i=t.dangerouslyDisableDefaultFeatures?[]:["noopener","noreferrer"];return globalThis.open(n,t.target,[i,...t.features||[]].join(","))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(913);function i(e){return`${r.a.serviceUrl}${e}`}let o=function(e){return e.STAT="STAT",e.PERF_STAT="PERF_STAT",e}({});const a=new Set(["mail2.stat.thread.operation","mail2.stat.thread.open","mail2.stat.search.suggestion.select","mail2.stat.search.suggestion.load","mail2.stat.search.show","mail2.stat.search.result.open","mail2.stat.search.hide","mail2.stat.search.commit","mail2.rte.richLink.deactivate","mail2.rte.richLink.activateAttempt","mail2.stat.compose.sendAttempt","mail2.stat.didAttemptToEmptyTrash","mail2.stat.didAttemptToEmptyJunk","mail2.stat.mailDrop.uploadAttempt","mail2.stat.didSwitchToSettingsApp"]);class s{static queueStat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.STAT;e=function(e){return delete e.dsid,"user"===e.statCategory&&(e.__allow_user||function(e){return a.has(e.statName)}(e)?(delete e.sessionID,delete e.sessionDuration):(e.statCategory="session",e.categoryRewrite=!0)),delete e.__allow_user,e}(e),t===o.PERF_STAT?this.perfStatsQueue.push(e):this.statsQueue.push(e)}static scheduleFlush(){void 0!==this.flushInterval&&window.clearInterval(this.flushInterval),this.flushInterval=window.setInterval((()=>{this.sendAllStats()}),r.a.flushInterval)}static async sendAllStats(){try{const{statsQueue:e,perfStatsQueue:t}=this;if(0===e.length&&0===t.length)return;let n={};e.length>0&&(n.stats=e,this.statsQueue=[]),t.length>0&&(n.perfStats=t,this.perfStatsQueue=[]),r.a.isSendingStatsEnabled?window.fetch(i("reportStats"),{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"include",body:JSON.stringify(n)}).catch((()=>{})):console.log("The following stats have been recorded but will not be sent to feedbackws because we are in debug mode",n)}catch(e){}}static async sendCrashError(e){try{if(!(await window.fetch(i("reportError"),{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"include",body:JSON.stringify(e)})).ok)return}catch(t){}}}s.statsQueue=[],s.perfStatsQueue=[],s.flushInterval=void 0},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(914),i=n(915);const o={appName:"",environmentInfo:"",localizedAppName:"",buildInfo:"",radarComponentID:"",radarTitle:"",isAppleInternal:!1,isSendingStatsEnabled:!1,flushInterval:6e4,serviceUrl:"https://feedbackws.icloud.com/",sessionID:Object(r.a)(),primaryInteractionMode:i.a.MOUSE,radarComponentName:null,radarComponentVersion:null,userDSID:null,userAppleId:null}},function(e,t,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=Object.freeze({MOUSE:"MOUSE",TOUCH:"TOUCH"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(917),o=n(914);class a{get identifier(){return this._sessionIdentifier}get duration(){return Date.now()-this._sessionStart}constructor(){var e;this._sessionIdentifier=null!==(e=Object(i.b)())&&void 0!==e?e:Object(o.a)(),this._sessionStart=Date.now(),window.setInterval((()=>this._setSessionIdentifier()),288e5)}_setSessionIdentifier(){this._sessionIdentifier=Object(o.a)(),this._sessionStart=Date.now()}}r=a,a.sharedInstance=new r},function(e,t,n){"use strict";function r(){return o("cid")}function i(){return o("sid")}function o(e){try{var t;const n=null!==(t=window.sessionStorage.getItem(e))&&void 0!==t?t:"",r=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(n);return sessionStorage.removeItem(e),r?n:void 0}catch{return}}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u}));var r=n(912),i=n(898);function o(e,t,n,i,o,s,c,u,l){return a(e,t,n,i,o,s,c,u,l,r.b.PERF_STAT)}function a(e,t,n,i,o,a,s,l){let d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},p=arguments.length>9&&void 0!==arguments[9]?arguments[9]:r.b.STAT;const f={appName:e,statName:l,masteringNumber:t,buildNumber:n,hostname:o,browserLocale:a,primaryInteractionMode:s};f.sessionID=i,f.sessionDuration=d.sessionDuration,delete f.dsid,delete d.dsid,delete d.sessionDuration;try{if(p===r.b.PERF_STAT){if(!d||null===d.duration||void 0===d.duration)throw"_createStat: no duration specified for a perf stat";f.duration=d.duration}else d&&d.urlPath&&(d.urlPath=u(d.urlPath));return{...d,...f}}catch(h){return c(h,f)}}function s(e){switch(typeof e){case"string":case"number":case"boolean":case"function":case"symbol":case"bigint":return e.toString();case"object":return e?e.toString():"null";default:return"undefined"}}function c(e,t){return{exceptionTitle:s(e),statParameters:t,appName:i.a.applicationName,statName:"createStatFailed"}}function u(e){const t=new Array;return e.split("/").forEach((e=>{e.match(/^[0-9]/)&&e.length>5||e.length>20&&/^\d+$/.test(e)||/\d{3}/.test(e)||/^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$/.test(e)?t.push("*"):t.push(e)})),t.join("/")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c}));var r=n(2208);let i=function(e){return e.NOT_SET="NOT_SET",e.SUCCESS="SUCCESS",e.FAILURE="FAILURE",e}({}),o=function(e){return e.NOT_SET="NOT_SET",e.MANUAL="MANUAL",e.AUTOMATIC="AUTOMATIC",e}({});function a(e,t){return Math.max(0,Math.round(e/t)*t)}const s=globalThis.performance&&globalThis.performance.timing?globalThis.performance.timing:{};class c{get isRecorded(){return this._isRecorded}markRecorded(){this._isRecorded=!0}get duration(){if(void 0!==this.startTimestamp&&void 0!==this.endTimestamp)return this.endTimestamp-this.startTimestamp}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;this.startTimestamp=void 0,this.endTimestamp=void 0,this._isRecorded=void 0,this.statName=void 0,this.additionalProperties=void 0,this.status=i.NOT_SET,this._timingMode=o.NOT_SET,this._timing=void 0,this._processStartTimestamp=void 0,this.statName=e,this.additionalProperties=t,this._timing=n,this._isRecorded=!1;const{timeString:r,timezoneString:a}=function(e){const t=e.toString(),n=`${t} (${e.getTime()})`,r=t.match(/\(([a-zA-Z\s]*)\)/);let i="UNKNOWN";return r&&(i=r[1]),{timeString:n,timezoneString:i}}(new Date);this.addAdditionalProperties({time:r,timezone:a})}addAdditionalProperties(e){return this.additionalProperties={...this.additionalProperties,...e},this}record(){r.b.sharedInstance.recordStat(this)}recordOnce(){this.isRecorded||this.record()}time(){return this._timingMode=o.MANUAL,this.startTimestamp=Date.now(),this}timeFromProcessStart(){return this.timeWithTotalDurationFromBaseline()}timeWithTotalDurationFromBaseline(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._timing.domInteractive,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._timing.navigationStart;return this._timingMode=o.AUTOMATIC,this.startTimestamp=e,this._processStartTimestamp=t,this}end(){return this.endTimestamp=Date.now(),this}toJSON(){const{status:e,additionalProperties:t}=this;let{statName:n}=this;e===i.SUCCESS?n+=".success":e===i.FAILURE&&(n+=".failure");const r={...t,statName:n};return this._timingMode!==o.NOT_SET&&(this.endTimestamp||this.end(),r.duration=a(this.duration||0,10),this._timingMode===o.AUTOMATIC&&(r.totalDuration=a(this._totalDuration||0,10))),r}success(e){return this._finish(i.SUCCESS,e)}failure(e){return this._finish(i.FAILURE,e)}static withEventAndLabel(e,t,n){return new c(`${e}_${t}`,n)}get _totalDuration(){if(void 0!==this._processStartTimestamp&&void 0!==this.endTimestamp)return this.endTimestamp-this._processStartTimestamp}_finish(e,t){return this.status=e,this.addAdditionalProperties(t),null!==this._timingMode&&this.end(),this}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=function(e){return e.SESSION="session",e.USER="user",e}({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{toJSON(){const{additionalProperties:e,statName:t}=this;return{...e,statName:t}}constructor(e,t){this.statName=void 0,this.additionalProperties=void 0,t.duration||(t.duration=0),this.statName=e,this.additionalProperties=t}}},function(e,t,n){"use strict";function r(){return crypto.randomUUID()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));const r=["ar-sa","bn-bd","ca-es","cs-cz","da-dk","de-de","el-gr","en-au","en-ca","en-gb","en-nz","en-us","es-es","es-mx","fi-fi","fr-ca","fr-fr","gu-in","hi-in","hr-hr","hu-hu","id-id","it-it","iw-il","ja-jp","kn-in","ko-kr","ml-in","mr-in","ms-my","nl-nl","no-no","or-in","pa-in","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sv-se","ta-in","te-in","th-th","tr-tr","uk-ua","ur-pk","vi-vi","zh-cn","zh-hk","zh-tw"],i=r;function o(e){return r.some((t=>t===e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2249);function i(e,t){const n=r.b(e),{searchParams:i}=n;for(const[r,o]of Object.entries(t))null!==o&&void 0!==o&&i.set(r,String(o));return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n(877);var r=n(878),i=n(926);const o=Object(r.d)(),a=Object(i.a)()},function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(870),i=n(878),o=n(904);function a(){var e=Object(r.useState)((function(){return Object(i.b)()})),t=e[0],n=e[1];return Object(r.useEffect)((function(){return Object(i.f)(n)}),[]),t}function s(e){var t=Object(i.e)(e);return function(e,n){return t(a(),e,n)}}function c(){var e=Object(r.useState)((function(){return Object(o.c)(Object(i.b)())})),t=e[0],n=e[1];return Object(r.useEffect)((function(){var e=Object(i.f)((function(e){return n(Object(o.c)(e))}));return function(){return e()}}),[]),t}function u(){return c()?o.a.RTL:o.a.LTR}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return f}));var r=n(903),i=n(2170),o=n(916),a=n(929),s=n(898),c=n(928),u=n(2248);let l;function d(e){l=e}let p=!0;class f{static disableStats(){p=!1}static sendExceptionToSentry(e,t){var n,r;let{reportedErrorTitle:i,stack:o,...l}=e;const d=new Error(i);d.stack=o,Object(c.b)(null!==(n=null===(r=u.c.value)||void 0===r?void 0:r.environment)&&void 0!==n?n:"PROD",s.a.buildNumber)&&a.m((function(e){e.setExtra("metadata",l),e.setExtra("shouldSendStackTrace",t),a.c(d)}))}static showCrashReporter(e,t,n,a){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i.a;if(!t)throw"[CrashReporterUtils] no crashing application info specified";const c=r.c.sharedInstance.primaryInteractionMode===r.b.TOUCH,l={sessionID:o.a.sharedInstance.identifier,isSendingStatsEnabled:p,primaryInteractionMode:c?r.b.TOUCH:r.b.MOUSE},{localizedApplicationName:d,applicationIdentifier:f,buildInfo:h,environmentInfo:m,radarComponentId:g,dsid:v,appleId:y,isAppleInternal:b}=t;if(l.appName=f,l.localizedAppName=d,l.buildInfo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{buildNumber:t="UNKNOWN",masteringNumber:n="UNKNOWN",locale:r="UNKNOWN"}=e;return`${t}__${n}__${r}`}(h),l.masteringNumber=h.masteringNumber,l.buildNumber=h.buildNumber,l.isAppleInternal=b,l.environmentInfo=m,v&&(l.userDSID=v),y&&(l.userAppleId=y),l.serviceUrl=Object(u.j)("feedbackws",""),b){const t=e.message,n=t?`: ${t}`:"";l.radarComponentID=g,l.radarTitle=`${f} crashed${n}`}if(n){const{applicationIdentifier:e,buildInfo:t,environmentInfo:r,dsid:i,appleId:o,isAppleInternal:a}=n;l.hostingAppName=e,l.environmentInfo=r,i&&(l.userDSID=i),o&&(l.userAppleId=o),a&&(l.isAppleInternal=a),l.cloudOSMasteringNumber=t.masteringNumber,l.cloudOSBuildNumber=t.buildNumber}s.configure(l),s.handleError(e,l.primaryInteractionMode,a),window.scrollTo(0,0),window.document.body.classList.add("disable-scroll")}static showCrashReporterWithTerminationReasonAndInfo(e){let 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],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i.a;f.showCrashReporterWithTerminationReasonAndInfoForHost(e,t,n,null!==l&&void 0!==l?l:null,r,o)}static showCrashReporterWithTerminationReasonAndInfoForHost(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.a;const c=n.error||n,u=c.buildInfo,l={type:e,...c},d=r.localizedApplicationName,p=r.radarComponentId,h={applicationIdentifier:null!==(t=r.applicationName)&&void 0!==t?t:"UNKNOWN",localizedApplicationName:d,radarComponentId:p,buildInfo:u};f.showCrashReporter(l,h,o,a,s)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return u}));var r=n(900);const i=["ICLOUD1","ICLOUD2","ICLOUD3"],o=[""],a=e=>i.some((t=>t===e)),{isDomainCN:s}=r.a.sharedInstance,c=(e,t)=>(e=>o.some((t=>t===e)))(e)&&(e=>"current"!==e)(t)&&!s,u=(e,t)=>{var n,r;if(null!==(n=t.extra)&&void 0!==n&&n.shouldSendStackTrace)return t;if(a(e))return t;if(null!==(r=t.exception)&&void 0!==r&&r.values)for(const i of t.exception.values)delete i.stacktrace;return t},l=e=>(e.filename&&(e.filename=e.filename.replace(/\?.*/,"").replace(/.*\/(?=en-us)/,"").replace(/^/,"/")),e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return m}));var r=n(930);function i(e,t){return Object(r.b)().captureException(e,{captureContext:t})}function o(e,t){const n="string"===typeof t?t:void 0,i="string"!==typeof t?{captureContext:t}:void 0;return Object(r.b)().captureMessage(e,n,i)}function a(e,t){return Object(r.b)().captureEvent(e,t)}function s(e){Object(r.b)().configureScope(e)}function c(e){Object(r.b)().addBreadcrumb(e)}function u(e,t){Object(r.b)().setContext(e,t)}function l(e){Object(r.b)().setExtras(e)}function d(e,t){Object(r.b)().setExtra(e,t)}function p(e){Object(r.b)().setTags(e)}function f(e,t){Object(r.b)().setTag(e,t)}function h(e){Object(r.b)().setUser(e)}function m(e){Object(r.b)().withScope(e)}function g(e,t){return Object(r.b)().startTransaction({...e},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return y}));var r=n(938),i=n(933),o=n(944),a=n(935),s=n(936),c=n(931),u=n(932);const l=4,d=100;class p{__init(){this._stack=[{}]}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;this._version=n,p.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=c.a.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Object(r.h)(),i=new Error("Sentry syntheticException");return this._withClient(((r,o)=>{r.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},o)})),n}captureMessage(e,t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Object(r.h)(),o=new Error(e);return this._withClient(((r,a)=>{r.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:i},a)})),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Object(r.h)();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=d}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const c={timestamp:Object(i.c)(),...e},u=a?Object(o.b)((()=>a(c,t))):c;null!==u&&n.addBreadcrumb(u,s)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=h(this);try{e(this)}finally{h(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&Object(u.a)(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:o}=a.a.navigator||{},s=Object(u.b)({release:r,environment:i,...t&&{user:t.getUser()},...o&&{userAgent:o},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&Object(u.c)(e,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e){const t=f().__SENTRY__;if(t&&t.extensions&&"function"===typeof t.extensions[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.extensions[e].apply(this,r)}}}function f(){return a.a.__SENTRY__=a.a.__SENTRY__||{extensions:{},hub:void 0},a.a}function h(e){const t=f(),n=v(t);return y(t,e),n}function m(){const e=f();return g(e)&&!v(e).isOlderThan(l)||y(e,new p),Object(s.b)()?function(e){try{const t=f().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return v(e);if(!g(n)||v(n).isOlderThan(l)){const t=v(e).getStackTop();y(n,new p(t.client,c.a.clone(t.scope)))}return v(n)}catch(t){return v(e)}}(e):v(e)}function g(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function v(e){return Object(a.c)("hub",(()=>new p),e)}function y(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(940),i=n(933),o=n(943),a=n(938),s=n(935),c=n(932);class u{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new u;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Object(c.c)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"===typeof e){const t=e(this);return t instanceof u?t:this}return e instanceof u?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(r.i)(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"===typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(i.c)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...l(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new o.a(((o,a)=>{const s=e[i];if(null===t||"function"!==typeof s)o(t);else{const c=s({...t},n);Object(r.n)(c)?c.then((t=>this._notifyEventProcessors(e,t,n,i+1).then(o))).then(null,a):this._notifyEventProcessors(e,c,n,i+1).then(o).then(null,a)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Object(a.d)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function l(){return Object(s.c)("globalEventProcessors",(()=>[]))}function d(e){l().push(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(933),i=n(938),o=n(941);function a(e){const t=Object(r.d)(),n={sid:Object(i.h)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(o.c)({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&s(n,e),n}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(r.d)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Object(i.h)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function c(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),s(e,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return p}));var r=n(936),i=n(935);const o=Object(i.b)(),a={nowSeconds:()=>Date.now()/1e3},s=Object(r.b)()?function(){try{return Object(r.a)(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=o;if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),c=void 0===s?a:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},u=a.nowSeconds.bind(a),l=c.nowSeconds.bind(c),d=l,p=void 0!==s;let f;const h=(()=>{const{performance:e}=o;if(!e||!e.now)return void(f="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,s=e.timing&&e.timing.navigationStart,c="number"===typeof s?Math.abs(s+n-r):t;return a||c<t?i<=c?(f="timeOrigin",e.timeOrigin):(f="navigationStart",s):(f="dateNow",r)})()}).call(this,n(934)(e))},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";(function(e){function r(e){return e&&e.Math==Math?e:void 0}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof globalThis&&r(e)||function(){return this}()||{};function o(){return i}function a(e,t,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(472))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));var r=n(937);function i(){return!Object(r.a)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0)}function o(e,t){return e.require(t)}function a(t){let n;try{n=o(e,t)}catch(r){}try{const{cwd:r}=o(e,"process");n=o(e,`${r()}/node_modules/${t}`)}catch(r){}return n}}).call(this,n(934)(e))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return a}));var r=n(941),i=n(939),o=n(935);function a(){const e=o.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function s(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function c(e){const{message:t,event_id:n}=e;if(t)return t;const r=s(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function u(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function l(e,t){const n=s(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}const d=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function p(e){const t=e.match(d)||[],n=parseInt(t[1],10),r=parseInt(t[2],10),i=parseInt(t[3],10);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(i)?void 0:i,prerelease:t[4]}}function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map((e=>Object(i.d)(e,0))),t.context_line=Object(i.d)(e[Math.min(r-1,o)],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map((e=>Object(i.d)(e,0)))}function h(e){if(e&&e.__sentry_captured__)return!0;try{Object(r.a)(e,"__sentry_captured__",!0)}catch(t){}return!1}function m(e){return Array.isArray(e)?e:[e]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return i}));var r=n(940);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function o(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function a(e,t){if(!Array.isArray(e))return"";const n=[];for(let i=0;i<e.length;i++){const t=e[i];try{n.push(String(t))}catch(r){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):!!Object(r.l)(t)&&(n?e===t:e.includes(t)))}function c(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((n=>s(e,n,t)))}function u(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return v})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return u})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return m}));const r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(e,Error)}}function o(e,t){return r.call(e)===`[object ${t}]`}function a(e){return o(e,"ErrorEvent")}function s(e){return o(e,"DOMError")}function c(e){return o(e,"DOMException")}function u(e){return o(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function d(e){return o(e,"Object")}function p(e){return"undefined"!==typeof Event&&y(e,Event)}function f(e){return"undefined"!==typeof Element&&y(e,Element)}function h(e){return o(e,"RegExp")}function m(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function g(e){return d(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function v(e){return"number"===typeof e&&e!==e}function y(e,t){try{return e instanceof t}catch(n){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return v})),n.d(t,"i",(function(){return l}));var r=n(942),i=n(940),o=n(939);function a(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"===typeof i)try{c(i,r)}catch(o){}e[t]=i}function s(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function c(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,s(e,"__sentry_original__",t)}function u(e){return e.__sentry_original__}function l(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}function d(e){if(Object(i.d)(e))return{message:e.message,name:e.name,stack:e.stack,...f(e)};if(Object(i.f)(e)){const t={type:e.type,target:p(e.target),currentTarget:p(e.currentTarget),...f(e)};return"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return Object(i.c)(e)?Object(r.c)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function f(e){if("object"===typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(o.f)(n[0],t);for(let r=n.length;r>0;r--){const e=n.slice(0,r).join(", ");if(!(e.length>t))return r===n.length?e:Object(o.f)(e,t)}return""}function m(e){return g(e,new Map)}function g(e,t){if(Object(i.i)(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const i of Object.keys(e))"undefined"!==typeof e[i]&&(r[i]=g(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(g(e,t))})),r}return e}function v(e){let t;switch(!0){case void 0===e||null===e:t=new String(e);break;case"symbol"===typeof e||"bigint"===typeof e:t=Object(e);break;case Object(i.j)(e):t=new e.constructor(e);break;default:t=e}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s}));var r=n(940),i=n(935);const o=Object(i.b)(),a=80;function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{let n=e;const r=5,i=[];let o=0,s=0;const u=" > ",l=u.length;let d;const p=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||a;for(;n&&o++<r&&(d=c(n,p),!("html"===d||o>1&&s+i.length*l+d.length>=f));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(u)}catch(n){return"<unknown>"}}function c(e,t){const n=e,i=[];let o,a,s,c,u;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),o=n.className,o&&Object(r.l)(o))for(a=o.split(/\s+/),u=0;u<a.length;u++)i.push(`.${a[u]}`);const d=["type","name","title","alt"];for(u=0;u<d.length;u++)s=d[u],c=n.getAttribute(s),c&&i.push(`[${s}="${c}"]`);return i.join("")}function u(){try{return o.document.location.href}catch(e){return""}}function l(e){return o.document&&o.document.querySelector?o.document.querySelector(e):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));var r,i=n(940);function o(e){return new s((t=>{t(e)}))}function a(e){return new s(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(r||(r={}));class s{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){s.prototype.__init.call(this),s.prototype.__init2.call(this),s.prototype.__init3.call(this),s.prototype.__init4.call(this),s.prototype.__init5.call(this),s.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new s(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new s(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===r.PENDING&&(Object(i.n)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)}))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(935);const i=["debug","info","warn","error","log","assert","trace"];function o(e){if(!("console"in r.a))return e();const t=r.a.console,n={};i.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}let a;a=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return i.forEach((e=>{t[e]=()=>{}})),t}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r={iCloud:"https://www.apple.com/icloud/",systemStatus:"https://www.apple.com/support/systemstatus/",privacyPolicy:"https://www.apple.com/legal/privacy/",termsAndCondition:"https://www.apple.com/legal/internet-services/icloud/",appleTermsOfUse:"https://www.apple.com/legal/internet-services/terms/site.html",iCloudGetStarted:"http://www.apple.com/icloud/get-started",schoolTerms:"https://www.apple.com/legal/education/apple-school-manager/",businessTerms:"https://www.apple.com/legal/enterprise/apple-business-manager/",cnPrivacyPolicy:"https://www.icloud.com.cn/gcbd-privacy-policy/",digitalLegacyPortal:"https://digital-legacy.apple.com/manage",auOnlineSafety:"https://www.apple.com/au/legal/online-safety/",gbOnlineSafety:"https://www.apple.com/uk/legal/online-safety/"};function i(e){if(!r[e])throw new Error(`No link found for ${e}`);return r[e]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(941),i=n(947);const o="7";function a(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="string"===typeof t?t:t.tunnel,i="string"!==typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${a(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(r.i)({sentry_key:e.publicKey,sentry_version:o,...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,i)}`}function c(e,t){const n=Object(i.c)(e),r=`${a(n)}embed/error-page/`;let o=`dsn=${Object(i.b)(n)}`;for(const i in t)if("dsn"!==i)if("user"===i){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}},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 c}));var r=n(948);const i=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`}function a(e){const t=i.exec(e);if(!t)throw new r.a(`Invalid Sentry Dsn: ${e}`);const[n,o,a="",c,u="",l]=t.slice(1);let d="",p=l;const f=p.split("/");if(f.length>1&&(d=f.slice(0,-1).join("/"),p=f.pop()),p){const e=p.match(/^\d+/);e&&(p=e[0])}return s({host:c,pass:a,path:d,projectId:p,port:u,protocol:n,publicKey:o})}function s(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function c(e){return"string"===typeof e?a(e):s(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warn";super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(938),i=n(930),o=n(931);const a=[];function s(e){const t=e.defaultIntegrations||[],n=e.integrations;let i;t.forEach((e=>{e.isDefaultInstance=!0})),i=Array.isArray(n)?[...t,...n]:"function"===typeof n?Object(r.d)(n(t)):t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(i),a=o.findIndex((e=>"Debug"===e.name));if(-1!==a){const[e]=o.splice(a,1);o.push(e)}return o}function c(e){const t={};return e.forEach((e=>{t[e.name]=e,-1===a.indexOf(e.name)&&(e.setupOnce(o.b,i.b),a.push(e.name))})),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return l}));var r=n(947),i=n(951),o=n(941);function a(e){return[e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]]}function s(e,t){const[n,r]=e;return[n,[...r,t]]}function c(e,t){e[1].forEach((e=>{const n=e[0].type;t(e,n)}))}function u(e,t){return(t||new TextEncoder).encode(e)}function l(e,t){const[n,r]=e;let o=JSON.stringify(n);function a(e){"string"===typeof o?o="string"===typeof e?o+e:[u(o,t),e]:o.push("string"===typeof e?u(e,t):e)}for(const c of r){const[e,t]=c;if(a(`\n${JSON.stringify(e)}\n`),"string"===typeof t||t instanceof Uint8Array)a(t);else{let e;try{e=JSON.stringify(t)}catch(s){e=JSON.stringify(Object(i.a)(t))}a(e)}}return"string"===typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(o)}function d(e,t){const n="string"===typeof e.data?u(e.data,t):e.data;return[Object(o.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const p={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile"};function f(e){return p[e]}function h(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function m(e,t,n,i){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Object(r.b)(i)},..."transaction"===e.type&&a&&{trace:Object(o.c)({...a})}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(940),i=n(952),o=n(941),a=n(953);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return u("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400;const r=s(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?c(e,t-1,n):r;var i}function u(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(i.a)();const[d,p]=l;if(null===n||["number","boolean","string"].includes(typeof n)&&!Object(r.h)(n))return n;const f=function(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof globalThis&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":Object(r.m)(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?`[Function: ${Object(a.b)(n)}]`:"symbol"===typeof n?`[${String(n)}]`:"bigint"===typeof n?`[BigInt: ${String(n)}]`:`[object ${Object.getPrototypeOf(n).constructor.name}]`}catch(i){return`**non-serializable** (${i})`}}(t,n);if(!f.startsWith("[object "))return f;if(n.__sentry_skip_normalization__)return n;if(0===s)return f.replace("object ","");if(d(n))return"[Circular ~]";const h=n;if(h&&"function"===typeof h.toJSON)try{return u("",h.toJSON(),s-1,c,l)}catch(y){}const m=Array.isArray(n)?[]:{};let g=0;const v=Object(o.b)(n);for(const e in v){if(!Object.prototype.hasOwnProperty.call(v,e))continue;if(g>=c){m[e]="[MaxProperties ~]";break}const t=v[e];m[e]=u(e,t,s-1,c,l),g++}return p(n),m}}).call(this,n(472))},function(e,t,n){"use strict";function r(){const e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s}));var r=n(954);const i=50;function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];for(const i of e.split("\n").slice(t)){const e=i.replace(/\(error: (.*)\)/,"$1");for(const t of r){const r=t(e);if(r){n.push(r);break}}}return s(n)}}function a(e){return Array.isArray(e)?o(...e):e}function s(e){if(!e.length)return[];let t=e;const n=t[0].function||"",r=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,i).map((e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"}))).reverse()}const c="<anonymous>";function u(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}function l(e){const t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return i=>{if(i.match(t))return{filename:i};const o=i.match(n);if(!o)return;let a,s,c,u,l;if(o[1]){c=o[1];let e=c.lastIndexOf(".");if("."===c[e-1]&&e--,e>0){a=c.substr(0,e),s=c.substr(e+1);const t=a.indexOf(".Module");t>0&&(c=c.substr(t+1),a=a.substr(0,t))}u=void 0}s&&(u=a,l=s),"<anonymous>"===s&&(l=void 0,c=void 0),void 0===c&&(l=l||"<anonymous>",c=u?`${u}.${l}`:l);const d=Object(r.a)([o,"access",e=>e[2],"optionalAccess",e=>e.startsWith,"call",e=>e("file://")])?o[2].substr(7):o[2],p=!("native"===o[5]||d&&!d.startsWith("/")&&!d.startsWith(".")&&1!==d.indexOf(":\\"))&&void 0!==d&&!d.includes("node_modules/");return{filename:d,module:Object(r.a)([e,"optionalCall",e=>e(d)]),function:c,lineno:parseInt(o[3],10)||void 0,colno:parseInt(o[4],10)||void 0,in_app:p}}}function d(e){return[90,l(e)]}},function(e,t,n){"use strict";function r(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o((function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return n.call(t,...r)})),t=void 0)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(930);function i(e,t){!0===t.debug&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const n=Object(r.b)(),i=n.getScope();i&&i.update(t.initialScope);const o=new e(t);n.bindClient(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(957),i=n(950),o=n(958),a=n(943),s=n(948);const c=30;function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(r.a)(e.bufferSize||c),u={};return{send:function(r){const c=[];if(Object(i.f)(r,((t,n)=>{const r=Object(i.e)(n);if(Object(o.c)(u,r)){const i=l(t,n);e.recordDroppedEvent("ratelimit_backoff",r,i)}else c.push(t)})),0===c.length)return Object(a.c)();const d=Object(i.c)(r[0],c),p=t=>{Object(i.f)(d,((n,r)=>{const o=l(n,r);e.recordDroppedEvent(t,Object(i.e)(r),o)}))};return n.add((()=>t({body:Object(i.h)(d,e.textEncoder)}).then((e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),u=Object(o.e)(u,e)}),(e=>{p("network_error")})))).then((e=>e),(e=>{if(e instanceof s.a)return p("queue_overflow"),Object(a.c)();throw e}))},flush:e=>n.drain(e)}}function l(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(948),i=n(943);function o(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(o){if(!(void 0===e||t.length<e))return Object(i.b)(new r.a("Not adding Promise because buffer limit was reached."));const a=o();return-1===t.indexOf(a)&&t.push(a),a.then((()=>n(a))).then(null,(()=>n(a).then(null,(()=>{})))),a},drain:function(e){return new i.a(((n,r)=>{let o=t.length;if(!o)return n(!0);const a=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Object(i.c)(e).then((()=>{--o||(clearTimeout(a),n(!0))}),r)}))}))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s}));const r=6e4;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const i=Date.parse(`${e}`);return isNaN(i)?r:i-t}function o(e,t){return e[t]||e.all||0}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return o(e,t)>n}function s(e,t){let{statusCode:n,headers:r}=t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();const a={...e},s=r&&r["x-sentry-rate-limits"],c=r&&r["retry-after"];if(s)for(const i of s.trim().split(",")){const[e,t]=i.split(":",2),n=parseInt(e,10),r=1e3*(isNaN(n)?60:n);if(t)for(const i of t.split(";"))a[i]=o+r;else a.all=o+r}else c?a.all=o+i(c,o):429===n&&(a.all=o+6e4);return a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="7.27.0"},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(940),i=n(944),o=n(941),a=n(961),s=n(935);const c=Object(s.b)(),u={},l={};function d(e,t){u[e]=u[e]||[],u[e].push(t),function(e){if(!l[e])switch(l[e]=!0,e){case"console":"console"in c&&i.a.forEach((function(e){e in c.console&&Object(o.e)(c.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];p("console",{args:r,level:e}),t&&t.apply(c.console,r)}}))}));break;case"dom":!function(){if(!("document"in c))return;const e=p.bind(null,"dom"),t=b(e,!0);c.document.addEventListener("click",t,!1),c.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=c[t]&&c[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(o.e)(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=b(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(o){}return t.call(this,n,r,i)}})),Object(o.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(i){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in c))return;const e=XMLHttpRequest.prototype;Object(o.e)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const a=this,s=n[1],c=a.__sentry_xhr__={method:Object(r.l)(n[0])?n[0].toUpperCase():n[0],url:n[1]};Object(r.l)(s)&&"POST"===c.method&&s.match(/sentry_key/)&&(a.__sentry_own_request__=!0);const u=function(){if(4===a.readyState){try{c.status_code=a.status}catch(e){}p("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:a})}};return"onreadystatechange"in a&&"function"===typeof a.onreadystatechange?Object(o.e)(a,"onreadystatechange",(function(e){return function(){u();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(a,n)}})):a.addEventListener("readystatechange",u),e.apply(a,n)}})),Object(o.e)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),p("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":Object(a.g)()&&Object(o.e)(c,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i={args:n,fetchData:{method:f(n),url:h(n)},startTimestamp:Date.now()};return p("fetch",{...i}),e.apply(c,n).then((e=>(p("fetch",{...i,endTimestamp:Date.now(),response:e}),e)),(e=>{throw p("fetch",{...i,endTimestamp:Date.now(),error:e}),e}))}}));break;case"history":!function(){if(!Object(a.f)())return;const e=c.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n.length>2?n[2]:void 0;if(i){const e=m,t=String(i);m=t,p("history",{from:e,to:t})}return e.apply(this,n)}}c.onpopstate=function(){const t=c.location.href,n=m;if(m=t,p("history",{from:n,to:t}),e)try{for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.apply(this,i)}catch(a){}},Object(o.e)(c.history,"pushState",t),Object(o.e)(c.history,"replaceState",t)}();break;case"error":w=c.onerror,c.onerror=function(e,t,n,r,i){return p("error",{column:r,error:i,line:n,msg:e,url:t}),!!w&&w.apply(this,arguments)};break;case"unhandledrejection":S=c.onunhandledrejection,c.onunhandledrejection=function(e){return p("unhandledrejection",e),!S||S.apply(this,arguments)};break;default:;}}(e)}function p(e,t){if(e&&u[e])for(const r of u[e]||[])try{r(t)}catch(n){}}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in c&&Object(r.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in c&&Object(r.g)(e[0],Request)?e[0].url:String(e[0])}let m;const g=1e3;let v,y;function b(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{if(!n||y===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===v||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(n){}return!1}(y,n))&&(e({event:n,name:r,global:t}),y=n),clearTimeout(v),v=c.setTimeout((()=>{v=void 0}),g)}}let w=null,S=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return p})),n.d(t,"i",(function(){return d}));var r=n(935);const i=Object(r.b)();function o(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function a(){try{return new DOMError(""),!0}catch(e){return!1}}function s(){try{return new DOMException(""),!0}catch(e){return!1}}function c(){if(!("fetch"in i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function u(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function l(){if(!c())return!1;if(u(i.fetch))return!0;let e=!1;const t=i.document;if(t&&"function"===typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=u(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){}return e}function d(){return"ReportingObserver"in i}function p(){if(!c())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}function f(){const e=i.chrome,t=e&&e.app&&e.app.runtime,n="history"in i&&!!i.history.pushState&&!!i.history.replaceState;return!t&&n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r}));const r=["fatal","error","warning","log","info","debug"];function i(e){return o(e)}function o(e){return"warn"===e?"warning":r.includes(e)?e:"log"}},function(e,t,n){"use strict";function r(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function i(e){return e.split(/[\?#]/,1)[0]}function o(e){return e.split(/\\?\//).filter((e=>e.length>0&&","!==e)).length}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(950),i=n(933);function o(e,t,n){const o=[{type:"client_report"},{timestamp:n||Object(i.c)(),discarded_events:e}];return Object(r.c)(t?{dsn:t}:{},[o])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"m",(function(){return a})),n.d(t,"s",(function(){return s})),n.d(t,"i",(function(){return c})),n.d(t,"p",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"o",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"k",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g})),n.d(t,"r",(function(){return v})),n.d(t,"l",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"j",(function(){return S})),n.d(t,"n",(function(){return C})),n.d(t,"q",(function(){return _}));var r=n(2155),i=n(966);function o(e,t){return Object(r.c)().authenticateUser(e,t)}function a(e,t,n,i){return Object(r.c)().reauthenticateUser(e,t,n,i)}function s(){return Object(r.c)().validateUser()}function c(){return Object(r.c)().isWebAccessAllowed}function u(e){Object(r.c)().isWebAccessAllowed=e}function l(){return Object(r.c)().isICDRSDisabled}function d(e){Object(r.c)().isICDRSDisabled=e}function p(){return Object(r.c)().deviceConsentForPCSExpirySignal}function f(){return Object(r.c)().pcsServiceIdentitiesIncluded}function h(){return r.b.value}function m(){return Object(r.c)().cancelUserAuthenticate()}function g(){return Object(r.c)().continueAuthentication()}function v(){return Object(r.c)().updateAuthenticationState()}function y(){return Object(r.c)().pendingUserValidatePromise}function b(){return Object(r.c)().isRedirectedToCorrectDomain}function w(){return Object(r.c)().isUnderMaintenance}function S(){return Object(r.c)().maintenanceDuration}function C(e,t,n,i,o,a){return Object(r.c)().retrieveSession(e,t,n,i,o,a)}function _(){return Object(i.a)().unauthenticate({trustBrowser:!1,allBrowsers:!0})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2159),i=n(908),o=n(883),a=n(897),s=n(886),c=n(896),u=n(891);class l{constructor(){this.connection=new i.a(c.a),this._currentAuthContainerId=void 0,this._isNativeTakeOverSignal=Object(r.signal)(!1),this.isNativeTakeOverSignal=Object(r.computed)((()=>this._isNativeTakeOverSignal.value)),this._authenticationResultSignal=Object(r.signal)(void 0),this.authenticationResultSignal=Object(r.computed)((()=>this._authenticationResultSignal.value)),this.isAuthStateReadySignal=Object(r.computed)((()=>!!this.authenticationResultSignal.value)),this.userSignal=Object(r.computed)((()=>{const e=this.authenticationResultSignal.value;if("success"===(null===e||void 0===e?void 0:e.responseKind))return Object(o.a)(e)})),this.configurationsSignal=Object(r.computed)((()=>{const e=this.authenticationResultSignal.value;if("success"===(null===e||void 0===e?void 0:e.responseKind)||"partial"===(null===e||void 0===e?void 0:e.responseKind))return Object(a.a)(e)})),this.waitForAuthStateReadyPromise=new Promise((e=>{const t=Object(r.effect)((()=>{this.authenticationResultSignal.value&&(e(this.authenticationResultSignal.value),t())}))})),this.isAuthenticatedSignal=Object(r.computed)((()=>{var e;return Object(u.a)(this.userSignal.value)&&!(null!==(e=this.userSignal.value)&&void 0!==e&&e.termsUpdateNeeded)})),this.onUserWillUnauthenticateCallback=void 0,this.appleIdControllerDelegates=new Map;const e=this;this.connection.exportedObject={resume2FA(){var e;null===(e=globalThis.AppleID)||void 0===e||null===(e=e.service.auth)||void 0===e||e.resume2FA()},updateAuthenticationResult(t){queueMicrotask((()=>{e._authenticationResultSignal.value=t}))},updateIsNativeTakeOver(t){queueMicrotask((()=>{e._isNativeTakeOverSignal.value=t}))},userWillUnauthenticate:()=>e.onUserWillUnauthenticateCallback?e.onUserWillUnauthenticateCallback():Promise.resolve(),appleIdWillStart(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdWillStart(...n),Promise.resolve()},appleIdStepDidComplete(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdStepDidComplete(...n),Promise.resolve()},appleIdDidFinish(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdDidFinish(...n),Promise.resolve()},appleIdModeDidChange(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdModeDidChange(...n),Promise.resolve()},appleIdRepairDidStart(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdRepairDidStart(...n),Promise.resolve()},appleIdModeWillChange(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdModeWillChange(...n),Promise.resolve()},appleIdDidCancel(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdDidCancel(...n),Promise.resolve()},appleIdError(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[i]=n,o=e.appleIdControllerDelegates.get(i);return o&&o.appleIdError(...n),Promise.resolve()}},this.connection.start()}get currentAuthContainerId(){return this._currentAuthContainerId}set currentAuthContainerId(e){this._currentAuthContainerId=e}onNativeTakeOverDidStart(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onNativeTakeOverDidStart(this.currentAuthContainerId):Promise.resolve()}onNativeTakeOverDidComplete(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onNativeTakeOverDidComplete(this.currentAuthContainerId):Promise.resolve()}onNativeTakeOverError(e){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onNativeTakeOverError(this.currentAuthContainerId,e):Promise.resolve()}onNativeTakeOverDidCancel(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onNativeTakeOverDidCancel(this.currentAuthContainerId):Promise.resolve()}onAuthReady(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthReady(this.currentAuthContainerId):Promise.resolve()}onAuthSuccess(e){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthSuccess(this.currentAuthContainerId,e):Promise.resolve()}onAuthFailure(e,t){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthFailure(this.currentAuthContainerId,e,t):Promise.resolve()}onPasswordAuthDone(e,t){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onPasswordAuthDone(this.currentAuthContainerId,e,t):Promise.resolve()}onRepairStart(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onRepairStart(this.currentAuthContainerId):Promise.resolve()}onAuthTeardown(e){return this.connection.remoteObjectProxy.onAuthTeardown(e)}onAuthCancel(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthCancel(this.currentAuthContainerId):Promise.resolve()}onAuthWidgetWillChangeFlow(e){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthWidgetWillChangeFlow(this.currentAuthContainerId,e):Promise.resolve()}onAuthWidgetDidChangeFlow(e){return this.currentAuthContainerId?this.connection.remoteObjectProxy.onAuthWidgetDidChangeFlow(this.currentAuthContainerId,e):Promise.resolve()}onCreateAccountCompleted(e){this.connection.remoteObjectProxy.onCreateAccountCompleted(e)}onCreateAccountFailed(e){this.connection.remoteObjectProxy.onCreateAccountFailed(e)}getAuthWidgetConfig(){return this.connection.remoteObjectProxy.getAuthWidgetConfig()}initAuthWidget(e,t){return this.currentAuthContainerId=e,this.connection.remoteObjectProxy.initAuthWidget(e,t)}continueAuthentication(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.continueAuthentication(this.currentAuthContainerId):Promise.resolve()}disposeAuthWidget(){return this.currentAuthContainerId?this.connection.remoteObjectProxy.disposeAuthWidget(this.currentAuthContainerId):Promise.resolve()}close(){this.connection.close()}unauthenticate(e){return this.connection.remoteObjectProxy.unauthenticate(e)}urlForServiceName(e,t){return Object(s.e)(this.configurationsSignal.value,e,t)}getWebServices(){return Object(s.a)(this.configurationsSignal.value)}registerOnUserWillUnauthenticate(e){this.onUserWillUnauthenticateCallback=e}registerAppleIdControllerDelegate(e,t){this.appleIdControllerDelegates.set(e,t)}unregisterAppleIdControllerDelegate(e){this.appleIdControllerDelegates.delete(e)}showOnDemand2FA(){this.connection.remoteObjectProxy.showOnDemand2FA()}fetchOnDemand2FAToken(){return this.connection.remoteObjectProxy.fetchOnDemand2FAToken()}}let d;function p(){return null!==d&&void 0!==d?d:d=new l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(968),i=n(903),o=n(1262),a=n(925),s=n(2249),c=n(969),u=n(923);window.hasEnteredLimitedExperienceMode=window.hasEnteredLimitedExperienceMode||!1;class l{get applicationIdentifier(){return this._applicationIdentifier}get shortGuid(){return this._shortGuid}get longGuid(){return this._longGuid}get mailDropDetail(){return this._mailDropDetail}get mailEmail(){return this._mailEmail}get calendarEvent(){return this._calendarEvent}get calendarEventReplyDetails(){return this._calendarEventReplyDetails}get informationalPageDetails(){return this._informationalPageDetails}get detectedLocale(){return this._detectedLocale}get relativePath(){return this._relativePath}get hash(){return this._hash}get url(){return this._url}get redirectUrlPath(){return this._redirectUrlPath}parseLocaleAwareUrl(e){if(!e)return{pathParts:[],detectedLocale:null};const t=Object(r.a)(e);if(t.length>0){const e=t[0].toLowerCase(),n=/^[a-z]{2}-[a-z]{2}$/.test(e),r=Object(u.a)(e);return{pathParts:n?t.slice(1):t,detectedLocale:r?e:null}}return{pathParts:t,detectedLocale:null}}constructor(e){var t,n,r,u;this._applicationIdentifier=void 0,this._shortGuid=void 0,this._longGuid=void 0,this._mailDropDetail=null,this._mailEmail=null,this._calendarEvent=null,this._calendarEventReplyDetails=null,this._informationalPageDetails=null,this._detectedLocale=null,this._relativePath=void 0,this._hash=void 0,this._url=void 0,this._redirectUrlPath=void 0,this.supportsShareURLs=!1,this.isSelfRouteSupported=!1,this.isSelfRouteUnauthSupported=!1,this.userAgent=void 0,this.isEdge=void 0,this._isFirefoxiOS=void 0,this._isChrome=void 0,this._isSafari=void 0,this._isFirefox=void 0,this.isIE=void 0,this.isAndroid=void 0,this.isWindows=void 0,this.isMac=void 0,this.isIOS=void 0,this.isFBMessenger=void 0,this.isMobileSafari=void 0,this.osMajorVersion=0,this.osMinorVersion=0,this.osMicroVersion=0,this.isDesktopClassIpad=void 0,this.iOSDevice=void 0,this.browserFinders=(()=>{const e=this;return{safari:{get matches(){return e._isSafari},regexp:/version\/(\d+\.*\d+).*?safari/},mobilesafari:{get matches(){return e.isMobileSafari},regexp:/version\/(\d+\.*\d+).*?safari/},ios:{get matches(){return e.isMobileSafari},get version(){return e.osMajorVersion}},android:{get matches(){return!!/android/.test(e.userAgent)},regexp:/android (\d+\.*\d*)/},firefox:{get matches(){return e._isFirefox},regexp:/firefox\/(\d+\.*\d+)/},chrome:{get matches(){return e._isChrome},regexp:/chrome\/(\d+\.*\d+)/},opera:{get matches(){return!!/opera/.test(e.userAgent)},regexp:/version\/(\d+\.*\d+)/},ie:{get matches(){return e.isIE},regexp:/(msie |trident.*?rv:)(\d+\.*\d+)/},edge:{get matches(){return e.isEdge},regexp:/edge\/(\d+\.*\d+)/},crios:{get matches(){return!!e.userAgent.match(/\scrios\//)},regexp:/crios\/(\d+\.*\d+)/},fxios:{get matches(){return!!e.userAgent.match(/\sfxios\//)},regexp:/fxios\/(\d+\.*\d+)/},googlebot:{get matches(){return!!e.userAgent.match(/\sgooglebot\//)},regexp:/googlebot\/(\d+\.*\d+)/},mobilesafariwebview:{get matches(){return e.isMobileSafari&&!!e.userAgent.match(/^((?!safari).)*$/)},regexp:/applewebkit\/\d+\.*\d+.*mobile\/(\d+[A-z]*\d+)$/}}})();const l=function(e){var t;if(-1===e.hash.indexOf("redirectingUserToCorrectDomain=true"))return e;const n=Object(s.c)(e.href),r=n.hash,i=r.indexOf("?");let o=r.substring(0,i);o.length<=1&&(o="");const a=r.substring(i);return n.hash=o,n.search=a,null===(t=window.top)||void 0===t||t.history.replaceState(history.state,document.title,n.href),n}(e);this._url=l;const{pathParts:f,detectedLocale:h}=this.parseLocaleAwareUrl(e.pathname);this._detectedLocale=h;const m=l.hash,g=window.navigator.userAgent.toLowerCase();this.userAgent=g,this.isEdge=/\sedge\//.test(g),this._isFirefoxiOS=!this.isEdge&&/fxios/.test(g),this._isChrome=!this.isEdge&&!this._isFirefoxiOS&&/chrome|crios/.test(g),this._isSafari=!this.isEdge&&!this._isFirefoxiOS&&!this._isChrome&&/safari/.test(g),this._isFirefox=this._isFirefoxiOS||!this.isEdge&&!this._isChrome&&!this._isSafari&&/firefox/.test(g),this.isIE=!this.isEdge&&!this._isChrome&&!this._isSafari&&!this._isFirefox&&/trident|msie/.test(g),this.isAndroid=!!/android/.test(g),this.isWindows=!!/windows/.test(g);const v=(g.match(/webkit\/(.+?) /)||[])[1],y=g.split(/\s*[;)(]\s*/)||[];this.iOSDevice=(y[1]||"").toLowerCase();const b=this.isMac=!!/macintosh/.test(g)||/mac os x/.test(g)&&!/like mac os x/.test(g);this.isDesktopClassIpad=b&&i.c.sharedInstance.primaryInteractionMode===i.b.TOUCH&&!this._isChrome;const w=this.isIOS="ipad"===this.iOSDevice||this.iOSDevice.indexOf("ipod")>=0||"iphone"===this.iOSDevice||this.isDesktopClassIpad;if(this.isFBMessenger=/applewebkit\/(\d+)[.*\d+]+ .*mobile\/(\d+[A-z]*\d+).*fban\/(messengerforios|messengerliteforios)/.test(g),this.isMobileSafari=!this.isFBMessenger&&(!!(/apple.*mobile/.test(g)&&w&&v)||this.isDesktopClassIpad),this.isDesktopClassIpad)this.osMajorVersion=13,this.osMinorVersion=0;else if(b){const e=g.match(/mac os x (\d+)[ _.](\d+)[ _.]?(\d+)?/);e&&(this.osMajorVersion=Number(e[1]),this.osMinorVersion=Number(e[2]),this.osMicroVersion=Number(e[3]||""))}else if(this.isWindows){const e=g.match(/windows[ a-z]+?(\d+)[ _.](\d+)/);e&&(this.osMajorVersion=Number(e[1]),this.osMinorVersion=Number(e[2]))}else if(w){const e=g.match(/\b(ipad|iphone|ipod)\b.*\bos (\d+)_(\d+)/i);e&&(this.osMajorVersion=Number(e[2]),this.osMinorVersion=Number(e[3]))}const S=["share","iclouddrive","notes","pages","numbers","keynote","reminders","photos","calendar","reminders","invites"],C=c.a.filter((e=>e.applicationInfo.applicationWillHandleRouteManagement)).map((e=>e.identifier)),_=c.a.filter((e=>e.applicationInfo.selfRouteInfo)).map((e=>({identifier:e.identifier,selfRouteInfo:e.applicationInfo.selfRouteInfo}))),O=new Set(["v","terms"]);if(0===f.length&&m&&m.length>0){if(m.length>1&&m.indexOf("#/")>=0)return;let e=m;const t=e.startsWith("#newspublisher");"#"!==e[0]||t||(e=e.substring(1));const n=e.split("/"),r=d(n[0]),o=S.indexOf(r)>=0;this.supportsShareURLs=o,O.has(r)||-1!==r.indexOf("postLoginRedirectUrl=")||("share"!==r&&(this._applicationIdentifier=d(r).toLowerCase()),n.length>1&&o?this._shortGuid=d(n[1]):(this._relativePath=n.slice(1).join("/"),this._hash=m),t||i.c.sharedInstance.primaryInteractionMode===i.b.TOUCH&&"calendar"!==this._applicationIdentifier||(this._redirectUrlPath=p(r,this._relativePath,this._shortGuid)))}else if(f.length>0){const t=d(f[0]);switch(t){case"terms":case"ssoRedirect":break;case"v":this._shortGuid=d(f[1]);break;case"attachment":this._mailDropDetail=function(e){const t={downloadURL:null},n=e.indexOf("u=");if(n<0)return t;let r=e.substring(n+2);const i=r.indexOf("&sz=");if(i<0)return t;const o=r.indexOf("&f=");if(o<0)return t;const a=r.indexOf("&uk=");if(a<0)return t;const c=parseInt(r.substring(i+4),10);r=r.substring(0,i);const u=r.substring(o+3);r=r.substring(0,o);const l=r.substring(a+4);r=r.substring(0,a);const d=Object(s.c)(r.replace("${f}",u).replace("${uk}",l));return"https:"!==d.protocol?t:/((.*\.icloud-content.com)|(.*\.icloud-content.com.cn)|(.*\.icloud.com)|(.*\.icloud.com.cn)|(.*\.digitalhub.com))$/g.exec(d.hostname)?c<0?t:u?{downloadURL:d,size:c,title:u,fileType:u.indexOf(".")>=0?u.substring(u.lastIndexOf(".")+1):null}:t:t}(decodeURIComponent(e.toString())),this._applicationIdentifier="mail";break;case"plan":this._informationalPageDetails={route:o.b.plan,title:Object(a.a)("NavLinks.Plan"),relativePath:f.slice(1).join("/"),hash:m},this._applicationIdentifier=o.b.plan;break;case"storage":this._informationalPageDetails={route:o.b.storage,title:Object(a.a)("NavLinks.Storage"),relativePath:f.slice(1).join("/"),hash:m},this._applicationIdentifier=o.b.storage;break;case"recovery":this._informationalPageDetails={route:o.b.recovery,title:Object(a.a)("NavLinks.DataRecovery"),relativePath:f.slice(1).join("/"),hash:m},this._applicationIdentifier=o.b.recovery;break;case"hidemyemail":case"customdomain":this._informationalPageDetails={route:o.b.icloudplus,title:Object(a.a)("NavLinks.ICloudPlus"),relativePath:f.slice(0).join("/"),hash:m},this._applicationIdentifier=o.b.icloudplus;break;case"icloudplus":this._informationalPageDetails={route:o.b.icloudplus,title:Object(a.a)("NavLinks.ICloudPlus"),relativePath:f.slice(1).join("/"),hash:m},this._applicationIdentifier=o.b.icloudplus;break;case"notifications":this._informationalPageDetails={route:o.b.settings,title:Object(a.a)("NavLinks.Settings"),relativePath:f.slice(0).join("/"),hash:m},this._applicationIdentifier=o.b.settings;break;case"settings":this._informationalPageDetails={route:o.b.settings,title:Object(a.a)("NavLinks.Settings"),relativePath:f.slice(1).join("/"),hash:m},this._applicationIdentifier=o.b.settings;break;default:{const n=S.includes(t);this.supportsShareURLs=n,"share"!==t&&(this._applicationIdentifier=d(t).toLowerCase());const r=_.filter((e=>e.identifier===t)).map((e=>e.selfRouteInfo));if(1===r.length){const e=m.split("&");if(1===e.length&&e[0].length>0){var E;const t=null===(E=r[0])||void 0===E?void 0:E.base;if(t&&e[0].indexOf(t)>=0){var I;this.isSelfRouteSupported=!0,this._hash=m;const t=null===(I=r[0])||void 0===I?void 0:I.unauthenticated;for(const n of null!==t&&void 0!==t?t:[])"string"===typeof n?e[0].indexOf(n)>=0&&(this.isSelfRouteUnauthSupported=!0):new RegExp(n).test(e[0])&&(this.isSelfRouteUnauthSupported=!0)}}}if(2===f.length&&"mail"===t&&"open"===f[1]&&e.search){const t=e.search.match(/^\?id=([0-9A-Za-z-_]+)$/);if(!t||2!==t.length)return;this._mailEmail={threadId:t[1]}}if(1===f.length&&"calendar"===t&&m&&m.length>0){const e=decodeURIComponent(m).match(/^#c=([0-9A-Za-z-_=]+)&e=([0-9A-Za-z-_]+)$/);e&&3===e.length&&(this._calendarEvent={eventId:window.atob(e[2]),collectionId:window.atob(e[1])})}if(2===f.length&&"calendar"===t&&"open"===f[1]&&e.search){const t=e.search.match(/^\?eid=([0-9A-Za-z-_]+)&cid=([0-9A-Za-z-_]+)$/);if(!t||3!==t.length)return;this._calendarEvent={eventId:t[1],collectionId:t[2]}}if(2===f.length&&"calendar"===t&&"event"===f[1]&&m&&m.length>0){const e=m.match(/^#t=([0-9A-Za-z-_]+)&p=(p\d+)(&reply=(accept|decline|tentative|junk)(&blob=(.*?))?)?$/);if(!e||e.length<5)return;this._calendarEventReplyDetails={token:e[1],partition:e[2],reply:e[4],blob:e[6]},window.location.hash=window.location.hash.replace(/&reply=(.*)$/,"")}else if(f.length>1&&"share"!==f[1]&&n){const e=C.includes(d(t).toLowerCase());f.length>2&&"reminders"===t&&"template"===f[1]?(this._longGuid=d(f[2]),this._relativePath=f[1]):f.length>2&&e?this._relativePath=f.slice(1).join("/"):this._shortGuid=d(f[1])}else if(m&&m.length>1&&n)if(1===m.split("&").length)this.isSelfRouteSupported||(this._shortGuid=d(m));else{const e=m.match(/st=(.*)&i=(.*)/),n=e?"e"===e[1]?"calendar":"t"===e[1]?"reminders":null:null;if(this._shortGuid=e?e[2]:void 0,n&&n!==t){const e=window.location.href.replace(t,n);this._applicationIdentifier=n,window.history.replaceState(window.history.state,window.document.title,e)}}else this._relativePath=f.slice(1).join("/"),this._hash=m;break}}}switch(this._applicationIdentifier){case"find-my-iphone":this._redirectUrlPath=p("find",this._relativePath,this._shortGuid);break;case"notes2":case"notes3":this._redirectUrlPath=p("notes",this._relativePath,this._shortGuid);break;case"drive":this._redirectUrlPath=p("iclouddrive",this._relativePath,this._shortGuid);break;case"settings":var A,T,P;"hidemyemail"!==(null===(t=this._informationalPageDetails)||void 0===t?void 0:t.relativePath)&&"customdomain"!==(null===(n=this._informationalPageDetails)||void 0===n?void 0:n.relativePath)||(this._redirectUrlPath=p("icloudplus",null===(A=this._informationalPageDetails)||void 0===A?void 0:A.relativePath,null===(T=this._informationalPageDetails)||void 0===T?void 0:T.hash)),"#hidemyemail"!==(null===(r=this._informationalPageDetails)||void 0===r?void 0:r.hash)&&"#customdomain"!==(null===(u=this._informationalPageDetails)||void 0===u?void 0:u.hash)||(this._redirectUrlPath=p("icloudplus",null===(P=this._informationalPageDetails)||void 0===P?void 0:P.hash.slice(1),""))}}get isSafari(){return this._isSafari}get isIphone(){return"iphone"===this.iOSDevice}get isChrome(){return this._isChrome}get isFirefox(){return this._isFirefox}isBrowserVersionAtLeast(e){for(const n in e){if("otherwise"===n)continue;const r=this.browserFinders[n];if(!r)continue;if(!r.matches)continue;const i=e[n];if("number"!==typeof i)continue;if(-1===i)return!1;const o=r.version;if(void 0!==o&&o>=i)return!0;const a=r.regexp;var t;if(a)if(Number((null===(t=this.userAgent.match(a))||void 0===t?void 0:t.slice(-1)[0])||0)>=i)return!0;return!1}return!!e.otherwise}}function d(e){let t=e;if("#"===t[0]&&(t=t.substring(1)),t.indexOf("#")>=0){const e=t.split("#");t=e[0]}const n=t.indexOf("?");return n>0&&(t=t.substring(0,n)),t}function p(e,t,n){return`/${e}${t?`/${t}`:""}${n?n.includes("#")?`/${n}`:`/#${n}`:""}`}},function(e,t,n){"use strict";function r(e){const t=[],n=e.split("/");for(let r=0,i=n.length;r<i;r++){const e=n[r];e&&""!==e&&t.push(e)}return t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(1430),i=n(970),o=n(1258),a=n(1211),s=n(1204),c=n(1259),u=n(1210),l=n(1208),d=n(2161),p=n(2261),f=n(1205),h=n(1206),m=n(1207),g=n(1167),v=n(1209),y=n(2171);const b=[i.d,o.b,a.b,s.b,c.b,u.b,l.b,d.f,p.b,f.b,h.b,m.b,g.b,v.b,r.a,y.c]},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p}));var r=n(2175),i=n(901),o=n(903),a=n(971);const s="dce593a0ac013016a778712b850dc2cf21af8266",c="com.me.cal",u={...a.a,authBagId:"calendar",applicationName:"calendar",path:"calendar",requiredServices:["calendar","keyvalue"],pushTopic:{hash:s,name:c},shouldShowPushNotifications:!0,shouldAwakeInBackgroundFromPush:!0,unsupportedLocales:r.a.RTL?void 0:["ar-sa","iw-il"],supportedDevices:[{primaryInteractionMode:o.b.MOUSE,sizeClass:o.e.REGULAR},{primaryInteractionMode:o.b.MOUSE,sizeClass:o.e.COMPACT},{primaryInteractionMode:o.b.TOUCH,sizeClass:o.e.REGULAR}],supportedDomains:[i.e,i.d,i.b,i.c,i.f,i.g],supportedFileExtensions:[],radarComponentId:1567033,configuration:null},l="calendar",d={identifier:l,displayNameLocKey:"Calendar.DisplayName",titleNameLocKey:"Calendar.TitleName",generations:[u],applicationInfo:u},p={identifier:l,displayNameLocKey:"Calendar.DisplayName",titleNameLocKey:"Calendar.TitleName",descriptionLocKey:"CloudOS.LandingPage.Calendar.Description",learnMoreLinkKey:"calendar",nameToBeDisplayedLocKey:"Calendar.TitleName"};u.configuration=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return v}));var r=n(898),i=n(2241),o=n(972),a=n(2175),s=n(2248),c=n(903),u=n(901),l=n(900),d=n(2249),p=n(923);const f={shouldRedirectForDocument:!1,generation:1,supportedDeviceTypes:[c.a.PHONE,c.a.TABLET,c.a.DESKTOP],supportedDevices:[{primaryInteractionMode:c.b.MOUSE,sizeClass:c.e.REGULAR},{primaryInteractionMode:c.b.MOUSE,sizeClass:c.e.COMPACT},{primaryInteractionMode:c.b.TOUCH,sizeClass:c.e.REGULAR},{primaryInteractionMode:c.b.TOUCH,sizeClass:c.e.COMPACT}],shouldPreloadCoreTypes:!1,allowsUnauthenticatedMode:!1,allowsOneFactorAuthenticationMode:!1,allowsMAIDAccounts:!0,allowsPhoneNumberAsAppleId:!0,hasUIForAcceptedSharesOnMobile:!1,isUsingCloudOSPreferencesAPI:!1,isPCSRequired:!1,pcsKeyIdentifier:null,allowsFullscreen:!1,shouldShowPushNotifications:!1,shouldAwakeInBackgroundFromPush:!1,isHidden:!1,helpUsesAppleSupportSite:!1,pushTopic:null,requiredServices:[],supportedDomains:[],supportsTile:!0,isPushDisabled:()=>!1,inAppShareAcceptance:!1,skipLoadingAppPreferences:!1,applicationWillHandleRouteManagement:!1,selfRouteInfo:void 0};function h(e,t){void 0!==t.requiredServices&&(e.requiredServices=t.requiredServices),void 0!==t.supportedFileExtensions&&(e.supportedFileExtensions=t.supportedFileExtensions),void 0!==t.isHidden&&(e.isHidden=t.isHidden),void 0!==t.isPCSRequired&&(e.isPCSRequired=t.isPCSRequired),void 0!==t.supportedLocales&&(e.supportedLocales=t.supportedLocales),void 0!==t.radarComponentId&&(e.radarComponentId=t.radarComponentId),void 0!==t.requiresAuth&&(e.allowsUnauthenticatedMode=!t.requiresAuth),void 0!==t.isWWW&&m(e,l.a.sharedInstance.isDomainCN?u.d:u.e,t.isWWW),void 0!==t.isBeta&&m(e,u.b,t.isBeta),void 0!==t.isFuture&&m(e,u.f,t.isFuture),void 0!==t.isCarry&&m(e,u.c,t.isCarry),void 0!==t.shareInfo&&(e.shareAcceptanceInfo=t.shareInfo),t.isQualifiedForBeta,void 0!==t.preloadCoreTypes&&(e.shouldPreloadCoreTypes=t.preloadCoreTypes),void 0!==t.hasPreferences&&(e.isUsingCloudOSPreferencesAPI=t.hasPreferences),void 0!==t.showsPushNotifications&&(e.shouldShowPushNotifications=t.showsPushNotifications),void 0!==t.awakesInBackgroundFromPush&&(e.shouldAwakeInBackgroundFromPush=t.awakesInBackgroundFromPush),void 0!==t.supportsMAID&&(e.allowsMAIDAccounts=t.supportsMAID),void 0!==t.supportsPhoneNumberBasedAppleId&&(e.allowsPhoneNumberAsAppleId=t.supportsPhoneNumberBasedAppleId),void 0!==t.canLaunchWithOneFactor&&(e.allowsOneFactorAuthenticationMode=t.canLaunchWithOneFactor),e.path||(e.path=e.authBagId);const n=[];for(const r of e.requiredServices)Object(s.e)(r)&&Object(s.g)(r)||n.push(r);e.missingRequiredServices=n}function m(e,t,n){const r=e.supportedDomains;if(n)r.includes(t)||r.push(t);else{const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}function g(e){const t=l.a.sharedInstance.findAvailableHostname(e.supportedDomains);return t?d.c(`${r.a.protocol}//${t}/${e.configuration.identifier}`).toString():null}function v(e){var t;const n=l.a.sharedInstance.findAvailableHostname(e.supportedDomains);return n?Object(r.b)(r.a.protocol,n,function(e){var t,n,i;const c=new Set,u=new Set,l=a.a.locale;l&&c.add(Object(o.c)(l));const d=r.a.locale;c.add(Object(o.c)(d));const f=r.a.secondaryLocale;f&&c.add(Object(o.c)(f)),c.add(Object(o.c)("en-us"));const h=null!==(t=e.supportedLocales)&&void 0!==t?t:[];if(h.length>0)for(const r of h)u.add(Object(o.c)(r));else for(const r of p.c)u.add(Object(o.c)(r));-1!==["reminders2","notes3","find-my-iphone"].indexOf(e.applicationName)&&"PROD"===(null!==(n=null===(i=s.c.value)||void 0===i?void 0:i.environment)&&void 0!==n?n:"PROD")&&(u.delete(Object(o.c)("ar-sa")),u.delete(Object(o.c)("iw-il")));for(const r of null!==(m=e.unsupportedLocales)&&void 0!==m?m:[]){var m;u.delete(Object(o.c)(r))}for(const r of c)if(u.has(r))return r;return"en-us"}(e),e.path,null!==(t=i.a.sharedInstance.port)&&void 0!==t?t:void 0,"index.html",l.a.sharedInstance.current.rootDomain):null}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(2209);function i(e){return e.replace("_","-").toLowerCase()}function o(e){const t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function a(e){const t=e?e.split("-"):["en","us"];let n=t[0].toLowerCase();return t.length>2?(n+="-"+o(t[1]),n+="-"+t[2].toUpperCase()):t.length>1&&(n+=t[1].length>2?"-"+o(t[1]):"-"+t[1].toUpperCase()),n}function s(e){const{regionFormatterLocaleMap:t}=r.a.sharedInstance,n=t[a(e)];return n?n.toLowerCase():e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(2251);const o=(e,t)=>e instanceof Error?e:new Error(`${t}: ${e}`);class a{static async fetchURL(e,t){return Object(i.b)(e,{...t,credentials:"include"})}static postURL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.b)(e,{...t,credentials:"include",method:"POST"})}static async fetchJSON(e,t){const{type:n}=t.validate||{},r=(n?`${n}: `:"")+"Fetch failed";let i,s,c;try{i=await a.safeFetchURL(e,t)}catch(u){s=u,i=null}if(!i||0===i.status)return{ok:!1,error:o(s,r),response:null};try{return c=await i.json(),{ok:!0,value:c,response:i}}catch(u){return{ok:!1,error:o(u,r),response:i}}}static fetchURLWithRetry(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{maxAttempts:5};return Object(i.b)(e,{...t,...n,credentials:"include"})}static fetchURLWithoutCredentials(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.b)(e,{...t,credentials:"omit"})}}r=a,a.safeFetchURL=r.fetchURL},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(975);function i(e,t){if(!t)return!1;const n=t.replace(/^Wire/,"");return function(e){if("*"===e)return!0;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(!e||!n.length||!n.every(r.a))return!1;const o=e.split(/,\s*/g);return n.some((e=>o.includes(e)))}(e,t,n,o(t),o(n))}const o=e=>e.replace(/Response$/,"")},function(e,t,n){"use strict";function r(e){return Boolean(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2175);function i(e,t,n){return new Promise((i=>window.setTimeout((()=>{t&&r.a.logTimeouts&&console.info(`${t} timed out after ${e}ms`),i(n)}),e)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(465),i=n(890),o=n(921),a=n(2208),s=n(974),c=n(2175),u=n(899);function l(e){return e instanceof Object&&"validated"in e&&"unvalidatedJson"in e}const d=(e,t,n)=>{const r=e.clone();return Object.assign(e,{validated:!0,json:p(r,t,n),unvalidatedJson:()=>r.json()})};function p(e,t,n){let r,l;const{schema:d,type:p}=t;return async()=>{if(void 0!==r)return r;if(void 0!==l)return Promise.reject(l);if(Object(s.a)(c.a.failSchemas,t.type))return Promise.reject(i.a.from("manual featureFlag-induced schema failure",t.type));try{const n=d;return r=await i.d(e,n,p),Object(s.a)(c.a.logResponses,t.type)&&console.info(`${t.type}:`,r),r}catch(h){return l=f(h,p),a.b.sharedInstance.recordPerfStat(new o.a(`${u.a}.schemaFailure`,{schemaName:p,message:l.message,duration:window.performance.now()-n,appName:u.a})),Promise.reject(l)}}}function f(e,t){return e instanceof Error?e:i.a.from("SchemaFailure: non-Error thrown",t)}function h(e,t,n){const s=typeof e;if("string"!==s){const t=null===e?e:s;throw i.a.from(`Bad JSON root type: ${t}`,n)}try{const n=JSON.parse(e),i=t.parse(n);return r.Result.success(i)}catch(c){const e=f(c,n);return a.b.sharedInstance.recordPerfStat(new o.a(`${u.a}.schemaFailure`,{schemaName:n,message:e.message,duration:0,appName:u.a})),r.Result.failure(e)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(878);function i(e){const t="https://support.apple.com",n=Object(r.b)();switch(n.toLowerCase()){case"ca-es":return`${t}/es-es/${e}/`;case"vi-vi":return`${t}/vi-vi/${e}/`;case"en-us":return`${t}/${e}/`;default:return`${t}/${n}/${e}/`}}const o="HT4847",a="HT208681"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));class r{constructor(){this.isInitialized=!1}}class i{constructor(e){this.registeredServices=[],this.isClosed=!1;for(const t of e)this.registeredServices.push(t)}init(){if(this.isClosed)throw new Error("Service manager is closed");for(const e of this.registeredServices)e.isInitialized||(e.init(),e.isInitialized=!0)}addService(e){if(!this.isClosed){for(const t of this.registeredServices)if(t.constructor.name===e.constructor.name)return;e.isInitialized||(e.init(),e.isInitialized=!0),this.registeredServices.push(e)}}getInstance(e){if(!this.isClosed)for(const t of this.registeredServices)if(t instanceof e)return t}close(){for(const e of this.registeredServices)e.close();this.registeredServices=[],this.isClosed=!0}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return l}));var r=n(984),i=n(981),o=n(2251),a=n(979),s=n(2248);let c=null;const u=()=>null!==c&&void 0!==c?c:c=new i.QuotaController;class l extends a.a{constructor(){super(...arguments),this.quotaLink=null,this.quotaService=null}init(){this.quotaLink=new r.QuotaLink(Object(s.j)("account","setup/ws/1/storageUsageInfo"),o.a),this.quotaService=new r.QuotaService(this.quotaLink),this.quotaLink.start()}close(){var e;null===(e=this.quotaService)||void 0===e||e.close()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotaController=void 0;var r=n(982);Object.defineProperty(t,"QuotaController",{enumerable:!0,get:function(){return r.QuotaController}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotaController=void 0;const r=n(893),i=n(2210),o=n(983);class a extends r.EventTarget{constructor(){super(),this.connection=new i.JsonRpcServiceConnection(o.quotaServiceName,{timeout:"indefinite"}),this.currentFetch=null,this.__isFetching=!1,this.__storageQuota=null,this.connection.exportedObject=this,this.connection.start()}get _isFetching(){return this.__isFetching}set _isFetching(e){e!==this.__isFetching&&(this.__isFetching=e,this.dispatchEvent(new r.Event("fetchingchange")))}get isFetching(){return this.__isFetching}get _storageQuota(){return this.__storageQuota}set _storageQuota(e){e!==this.__storageQuota&&(this.__storageQuota=e,this.dispatchEvent(new r.Event("change")))}get storageQuota(){return this.__storageQuota}async quotaDataLoadingStatusDidChange(e){this._isFetching=e}async quotaDidChange(e){this._storageQuota=e}fetchStorageQuota(){const e=this.currentFetch;if(e)return e;const t=(async()=>{try{const e=await this.connection.remoteObjectProxy.fetchStorageQuota();return e?(this._storageQuota=e,e):this.storageQuota}finally{this.currentFetch=null}})();return this.currentFetch=t,t}}t.QuotaController=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.quotaServiceName=void 0,t.quotaServiceName="com.icloud.quota"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotaLink=t.QuotaService=void 0;var r=n(985);Object.defineProperty(t,"QuotaService",{enumerable:!0,get:function(){return r.QuotaService}});var i=n(986);Object.defineProperty(t,"QuotaLink",{enumerable:!0,get:function(){return i.QuotaLink}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotaService=void 0;const r=n(2210),i=n(983);t.QuotaService=class{constructor(e){this.quotaLink=e,this.listener=new r.JsonRpcServiceListener(i.quotaServiceName),this.closed=!1,this.listener.addEventListener("connect",(t=>{t.connection.exportedObject=this,t.connection.start(),e.storageQuota&&t.connection.remoteObjectProxy.quotaDidChange(e.storageQuota),e.isFetching&&t.connection.remoteObjectProxy.quotaDataLoadingStatusDidChange(!0)})),this.listener.start(),e.quotaDataObservers.add(this),this.fetchStorageQuota()}async fetchStorageQuota(){return this.quotaLink.refreshQuotaData()}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close()}}quotaDataDidChange(){const e=this.quotaLink.storageQuota;e&&this.listener.broadcastProxy.quotaDidChange(e)}quotaDataLoadingStatusDidChange(){this.listener.broadcastProxy.quotaDataLoadingStatusDidChange(this.quotaLink.isFetching)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotaLink=void 0;const r=n(888);t.QuotaLink=class{get storageQuota(){return this._storageQuota}setStorageQuota(e){this._storageQuota=e,this.quotaDataObservers.forEach((e=>e.quotaDataDidChange()))}get currentRequest(){return this._currentRequest}setCurrentRequest(e){this._currentRequest!==e&&(this._currentRequest=e,this.quotaDataObservers.forEach((e=>e.quotaDataLoadingStatusDidChange())))}constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:84e4;this.quotaServiceUrl=e,this.fetch=t,this.pollInterval=n,this._storageQuota=null,this._currentRequest=null,this.isRunning=!1,this.quotaDataObservers=new Set}async start(){if(!this.isRunning)for(this.isRunning=!0;this.isRunning;)await this.refreshQuotaData(),await new Promise((e=>{window.setTimeout(e,this.pollInterval)}))}get isFetching(){return null!==this.currentRequest}async refreshQuotaData(){const e=this.currentRequest;if(e)return e;const t=(async()=>{const e=await this.fetchQuotaData();return e?(this.setStorageQuota(e),this.setCurrentRequest(null),e):null})();this.setCurrentRequest(t);try{return await t}finally{this.setCurrentRequest(null)}}async fetchQuotaData(){try{const e=await this.fetch(this.quotaServiceUrl,{method:"POST",credentials:"include"});if(e.ok){const t=await e.json(),n=o.safeParse(t);if(n.success)return{storageUsageByMedia:n.data.storageUsageByMedia,storageUsageInfo:n.data.storageUsageInfo,quotaStatus:n.data.quotaStatus,familyStorageUsageInfo:n.data.familyStorageUsageInfo}}}catch{}return this.storageQuota}};const i=r.z.union([r.z.literal("photos"),r.z.literal("mail"),r.z.literal("backup"),r.z.literal("messages"),r.z.literal("docs"),r.z.literal("family")]),o=r.z.object({storageUsageByMedia:r.z.object({mediaKey:i,displayLabel:r.z.string(),displayColor:r.z.string(),usageInBytes:r.z.number()}).array(),storageUsageInfo:r.z.object({compStorageInBytes:r.z.number(),usedStorageInBytes:r.z.number(),totalStorageInBytes:r.z.number(),commerceStorageInBytes:r.z.number()}),quotaStatus:r.z.object({overQuota:r.z.boolean(),haveMaxQuotaTier:r.z.boolean(),"almost-full":r.z.boolean(),paidQuota:r.z.boolean()}),familyStorageUsageInfo:r.z.object({mediaKey:i,displayLabel:r.z.string(),displayColor:r.z.string(),usageInBytes:r.z.number(),familyMembers:r.z.object({appleId:r.z.string(),dsid:r.z.number(),id:r.z.string(),firstName:r.z.string(),fullName:r.z.string(),lastName:r.z.string(),usageInBytes:r.z.number()}).array()}).optional()})},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(991),i=n(988),o=n(2208),a=n(2248),s=n(919),c=n(2251),u=n(979);let l=null;const d=()=>null!==l&&void 0!==l?l:l=new i.MeCardController;class p extends u.a{constructor(){super(...arguments),this.meCardLink=null,this.meCardService=null}init(){var e;if(!Object(a.e)("contacts")||!Object(a.g)("contacts"))return void o.b.sharedInstance.recordStatOnce(new s.a("meCardServiceInit.failure",{reason:"Service unavailable"}));const t=Object(a.j)("contacts","co/mecard/");null!==(e=this.meCardLink)&&void 0!==e||(this.meCardLink=new r.MeCardLink(t,c.a)),this.meCardService=new r.MeCardService(this.meCardLink)}close(){var e;null===(e=this.meCardService)||void 0===e||e.close()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeCardController=void 0;var r=n(989);Object.defineProperty(t,"MeCardController",{enumerable:!0,get:function(){return r.MeCardController}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeCardController=void 0;const r=n(893),i=n(2210),o=n(990);class a extends r.EventTarget{constructor(){super(),this.connection=new i.JsonRpcServiceConnection(o.meCardServiceName),this.currentFetch=null,this.__meCard=null,this.__isFetching=!1,this.connection.exportedObject=this,this.connection.start()}get _meCard(){return this.__meCard}set _meCard(e){e!==this.__meCard&&(this.__meCard=e,this.dispatchEvent(new r.Event("change")))}get meCard(){return this.__meCard||void 0}get _isFetching(){return this.__isFetching}set _isFetching(e){e!==this.__isFetching&&(this.__isFetching=e,this.dispatchEvent(new r.Event("fetchingchange")))}get isFetching(){return this.__isFetching}get photo(){var e;return null===(e=this.meCard)||void 0===e||null===(e=e.contacts[0])||void 0===e?void 0:e.photo}async isFetchingDidChange(e){this._isFetching=e}async didChange(e){this._meCard=e}async refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.currentFetch;if(t)return t;const n=(async()=>{try{await this.connection.remoteObjectProxy.refresh(e)}finally{this.currentFetch=null}})();return this.currentFetch=n,n}async deletePhoto(){return this.connection.remoteObjectProxy.deletePhoto()}async storePhoto(e,t){return this.connection.remoteObjectProxy.storePhoto(e,t)}}t.MeCardController=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.meCardServiceName=void 0,t.meCardServiceName="com.icloud.mecard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeCardService=t.MeCardLink=void 0;var r=n(992);Object.defineProperty(t,"MeCardLink",{enumerable:!0,get:function(){return r.MeCardLink}});var i=n(993);Object.defineProperty(t,"MeCardService",{enumerable:!0,get:function(){return i.MeCardService}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMeCardPhoto=t.MeCardLink=void 0;const r=n(888);function i(e){var t;return"unset"===e||0===e.contacts.length?null:null!==(t=e.contacts[0].photo)&&void 0!==t?t:null}async function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis.fetch;try{const r=await n(e,{method:"POST",body:JSON.stringify(t),credentials:"include"});if(r.ok){const e=await r.json(),t=c.safeParse(e);if(t.success)return t.data}}catch{}return null}t.MeCardLink=class{get meCard(){return"unset"===this._meCard?null:this._meCard}get photo(){return this._photo}set photo(e){e!==this._photo&&(this._photo=e,this.photoObservers.forEach((t=>t(e))))}get isFetching(){return!!this.refreshPromise}addPhotoChangedObserver(e){this.photoChangedObservers.add(e),null===this._meCard&&this.isFetching?e(!0):null===this._meCard||this.isFetching||e(!1)}addPhotoObserver(e){this.photoObservers.add(e),null===this._meCard&&this.isFetching?e(!0):null===this._meCard||this.isFetching||e(!1)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis.fetch;this.serviceUrl=e,this.customFetch=t,this.photoObservers=new Set,this.photoChangedObservers=new Set,this._meCard=null,this.refreshPromise=null,this._photo=null}async storePhoto(e,t){const n=this.meCard;if(this.photoChangedObservers.forEach((e=>e(!0))),n){n.contacts[0].photo=t;const e=await o(this.serviceUrl,n,this.customFetch);if(!e)return!1;const r=i(e);return!!r&&(this.setMeCard(e),this.photoChangedObservers.forEach((e=>e(!1))),!!r)}const r=this.createContactFromContactDetails(e,t);if(!r)return!1;const a=await o(this.serviceUrl,{contacts:[r]},this.customFetch);if(!a)return!1;const s=i(a);return!!s&&(this.setMeCard(a),this.photoChangedObservers.forEach((e=>e(!1))),!!s)}async deletePhoto(){const e=this.meCard;if(!e)return!0;if(!i(e))return!0;delete e.contacts[0].photo;const t=await o(this.serviceUrl,e,this.customFetch);return!!t&&(this.setMeCard(t),!0)}refreshMeCard(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.refreshPromise;if(t)return t;if(!e&&this._meCard)return Promise.resolve();const n=(async()=>{const e=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis.fetch;try{const n=await t(e,{credentials:"include"});if(n.ok){const e=await n.json(),t=c.safeParse(e);return t.success?t.data:"unset"}}catch{}return null}(this.serviceUrl,this.customFetch);e&&this.setMeCard(e),this.refreshPromise=null,this.photoChangedObservers.forEach((e=>e(!1)))})();return this.refreshPromise=n,this.photoChangedObservers.forEach((e=>e(!0))),n}setMeCard(e){this._meCard=e,this.photo=i(e)}createContactFromContactDetails(e,t){if(null===t||void 0===t||!t.contactId)return null;const n=[],r=[];switch(e.primaryAppleIdType){case"email":r.push({field:e.appleId,label:"home"});break;case"phone_number":n.push({field:e.appleId,label:"mobile"})}return{firstName:e.firstName,lastName:e.lastName,emailAddresses:r,phones:n,photo:t,contactId:t.contactId}}},t.getMeCardPhoto=i;const a=r.z.object({url:r.z.string(),signature:r.z.string().optional(),crop:r.z.object({x:r.z.number(),y:r.z.number(),width:r.z.number(),height:r.z.number()}).optional(),contactId:r.z.string().optional()}),s=(r.z.object({field:r.z.string(),label:r.z.string()}),r.z.object({firstName:r.z.string().optional(),lastName:r.z.string().optional(),emailAddresses:r.z.object({field:r.z.string(),label:r.z.string().optional()}).array().optional(),phones:r.z.object({field:r.z.string(),label:r.z.string().optional()}).array().optional(),photo:a.optional(),contactId:r.z.string(),etag:r.z.string().optional()})),c=r.z.object({contacts:s.array()})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeCardService=void 0;const r=n(2210),i=n(990);t.MeCardService=class{constructor(e){this.meCardLink=e,this.listener=new r.JsonRpcServiceListener(i.meCardServiceName),this.handlePhotoChanged=()=>{this.listener.broadcastProxy.isFetchingDidChange(this.meCardLink.isFetching)},this.handlePhoto=()=>{this.listener.broadcastProxy.didChange(this.meCardLink.meCard)},this.closed=!1,this.listener.addEventListener("connect",(t=>{t.connection.exportedObject=this,t.connection.start(),e.meCard&&t.connection.remoteObjectProxy.didChange(e.meCard),e.isFetching&&t.connection.remoteObjectProxy.isFetchingDidChange(e.isFetching)})),e.photoChangedObservers.add(this.handlePhotoChanged),e.photoObservers.add(this.handlePhoto),this.listener.start(),this.refresh()}async refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.meCardLink.refreshMeCard(e)}deletePhoto(){return this.meCardLink.deletePhoto()}async storePhoto(e,t){return this.meCardLink.storePhoto(e,t)}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close();this.meCardLink.photoChangedObservers.delete(this.handlePhotoChanged),this.meCardLink.photoObservers.delete(this.handlePhoto)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionService=t.FeaturesLink=t.UpsellFlowLink=void 0;var r=n(995);Object.defineProperty(t,"UpsellFlowLink",{enumerable:!0,get:function(){return r.UpsellFlowLink}});var i=n(1003);Object.defineProperty(t,"FeaturesLink",{enumerable:!0,get:function(){return i.FeaturesLink}});var o=n(1004);Object.defineProperty(t,"SubscriptionService",{enumerable:!0,get:function(){return o.SubscriptionService}})},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.UpsellFlowLink=t.DISMISS_NOTIFICATION_PAYLOAD=void 0;const i=n(996),o=n(465),a=n(997),s=r(n(1002));t.DISMISS_NOTIFICATION_PAYLOAD="DISMISS",t.UpsellFlowLink=class{get upsellPlanData(){return this._subscriptionUpsellPlan}setUpsellPlanData(e){this._subscriptionUpsellPlan=e,this.upsellPlanDataObservers.forEach((e=>e.upsellPlanDataDidChange()))}get currentPlanDataRequest(){return this._currentPlanDataRequest}setCurrentPlanDataRequest(e){this._currentPlanDataRequest!==e&&(this._currentPlanDataRequest=e,this.upsellPlanDataObservers.forEach((e=>e.upsellPlanDataLoadingStatusDidChange())))}constructor(e,t,n,r){this.isCNDomain=e,this.dsId=t,this.fetch=n,this.recordStat=r,this._subscriptionUpsellPlan=null,this._currentPlanDataRequest=null,this.upsellPlanDataObservers=new Set}recordUpsellFlowStat(e){return this.recordStat(e)}get isFetchingPlanData(){return null!==this.currentPlanDataRequest}async refreshNextLargerPlanData(){const e=this.currentPlanDataRequest;if(e)return e;const t=(async()=>{const e=await this.fetchNextLargerPlanData();return e?(this.setUpsellPlanData(e),this.setCurrentPlanDataRequest(null),e):null})();this.setCurrentPlanDataRequest(t);try{return await t}finally{this.setCurrentPlanDataRequest(null)}}async fetchNextLargerPlanData(){try{const e=await this.fetch(u(this.isCNDomain,this.dsId),{method:"GET",credentials:"include"});if(e.ok){const t=await e.json(),n=i.wireSubscriptionUpsellNextLargerPlanSchema.safeParse(t);if(n.success){if(n.data.userEligibleForOffer)throw new Error("upsell_type_not_supported");return n.data}}}catch{}return this.upsellPlanData}async fetchUpsellScreenData(e){try{const t=await this.fetch(l(this.isCNDomain,this.dsId,e),{method:"GET",credentials:"include"});if(t.ok){const e=await t.json(),n=i.wireSubscriptionUpsellScreenSchema.safeParse(e);if(n.success)return n.data.content}throw new Error("upsell_launch_upgrade_screen_failed")}catch{return null}}async sendScreenInteration(e,t){if(t)try{await this.fetch(f(this.isCNDomain,this.dsId,e),{method:"PUT",credentials:"include",body:JSON.stringify({buttonId:t}),headers:{"content-type":"application/json"}})}catch(n){return}}async continuePurchaseOnDevice(e,t){try{const r=await this.fetch((n=this.isCNDomain,`${h(n)}${m}`),{method:"POST",credentials:"include",body:JSON.stringify({feature:"iCloudPlanUpgradePayOnDevice",context:`${i.ContinueOnDeviceContext[t]}`,action:encodeURIComponent(e.replace(/\s/g,""))})});if(r.ok){const e=await r.json(),t=i.wireContinueOnDeviceSchema.safeParse(e);if(t.success&&!0===t.data.success)return o.Result.success(!0)}throw new Error("upsell_continue_on_device_failed")}catch{return o.Result.failure(new Error("failed to send continue on device request"))}var n}async fetchPostPurchaseScreenData(e){try{const t=await this.fetch(p(this.isCNDomain,this.dsId,e),{method:"POST",credentials:"include",body:JSON.stringify({purchaseStatus:"0",amsErrorCodes:"0"}),headers:{"content-type":"application/json"}});if(t.ok){const e=await t.json(),n=i.wireSubscriptionPostPurchaselScreenSchema.safeParse(e);if(n.success)return n.data.content}throw new Error("upsell_launch_postpurchase_screen_failed")}catch{return d}}async getCoDEligibleDevicesList(){try{const t=await this.fetch((e=this.isCNDomain,`${h(e)}${g}`),{method:"POST",credentials:"include"});if(t.ok){const e=await t.json(),n=i.wireContinueOnDeviceEligibleDeviceInfoSchema.safeParse(e);if(n.success&&n.data.ContinueOnDeviceEligibleDeviceInfo.length>0)return o.Result.success(n.data)}return o.Result.failure()}catch{return o.Result.failure()}var e}};const c=e=>e?"https://gatewayws.icloud.com.cn/acsegateway":"https://gatewayws.icloud.com/acsegateway",u=(e,t)=>`${c(e)}/v1/accounts/${t}/web/plans/next-larger-plan`,l=(e,t,n)=>`${c(e)}/v1/accounts/${t}/web/screens/upsells/${i.EntryPointContext[n]}`,d={header:{title:(0,a.loc)("PostPurchase.Heading.Title"),message:(0,a.loc)("PostPurchase.Heading.Message"),imageURL:s.default},actions:[{title:(0,a.loc)("PostPurchase.Footer.ActionButton.Done"),action:"dismiss",isDefault:!0,id:"PurchaseCompletionScreen_Done"}]},p=(e,t,n)=>`${c(e)}/v1/accounts/${t}/web/screens/purchases/${i.EntryPointContext[n]}`,f=(e,t,n)=>`${c(e)}/v1/accounts/${t}/web/screens/interactions/${i.EntryPointContext[n]}`,h=e=>e?"https://setup.icloud.com.cn/setup/ws/1":"https://setup.icloud.com/setup/ws/1",m="/continueOnDevice",g="/getCoDEligibleDevicesList/cb"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContinueOnDeviceContext=t.EntryPointContext=t.EntryPoint=t.SubscriptionFeaturesServiceName=t.SubscriptionUpsellsServiceName=t.wireContinueOnDeviceEligibleDeviceInfoSchema=t.wireContinueOnDeviceSchema=t.wireSubscriptionPostPurchaselScreenSchema=t.wireSubscriptionFeaturesSchema=t.wireSubscriptionUpsellScreenSchema=t.wireSubscriptionUpsellNextLargerPlanSchema=t.UserPlan=void 0;const r=n(888);var i;(i=t.UserPlan||(t.UserPlan={})).MAID="managedAppleID",i.Lite="lite",i.Standard="standard",i.Plus="plus",t.wireSubscriptionUpsellNextLargerPlanSchema=r.z.object({priceForDisplay:r.z.string().min(1,"priceForDisplay cannot be empty!"),planName:r.z.string().min(1,"planName cannot be empty!"),highestTierPlanName:r.z.string().min(1,"highestTierPlanName cannot be empty!"),userEligibleForOffer:r.z.boolean().optional()});const o=r.z.object({planName:r.z.string(),title:r.z.string(),details:r.z.string(),selected:r.z.boolean().optional(),footer:r.z.string(),subtitle:r.z.string(),buyParams:r.z.string()}),a=r.z.object({header:r.z.object({imageURL:r.z.string(),title:r.z.string(),message:r.z.string()}),purchaseOptions:o.array(),actions:r.z.object({title:r.z.string(),action:r.z.string(),isDefault:r.z.boolean(),id:r.z.string(),url:r.z.string(),urlOnActionComplete:r.z.string()}).array()});t.wireSubscriptionUpsellScreenSchema=r.z.object({content:a});const s=r.z.union([r.z.literal("cloud.storage"),r.z.literal("home.cameras"),r.z.literal("mail.custom-domains.transfer"),r.z.literal("mail.custom-domains.purchase"),r.z.literal("mail.hide-my-email.create"),r.z.literal("networking.privacy.attestation"),r.z.literal("networking.privacy.subscriber"),r.z.literal("apps.rsvp.create-event")]),c=r.z.union([r.z.literal("GIB"),r.z.literal("TIB")]),u=r.z.object({featureKey:s,canUse:r.z.boolean(),limit:r.z.number().optional(),limitUnits:c.optional(),cacheTill:r.z.string(),accessToken:r.z.string().optional()});t.wireSubscriptionFeaturesSchema=r.z.array(u);const l=r.z.object({title:r.z.string(),subtitle:r.z.string(),body:r.z.string(),iconURL:r.z.string()}),d=r.z.object({header:r.z.object({imageURL:r.z.string(),title:r.z.string(),message:r.z.string()}),features:l.array(),actions:r.z.object({title:r.z.string(),action:r.z.string(),isDefault:r.z.boolean(),id:r.z.string()}).array()});var p;t.wireSubscriptionPostPurchaselScreenSchema=r.z.object({content:d}),t.wireContinueOnDeviceSchema=r.z.object({success:r.z.boolean()}),t.wireContinueOnDeviceEligibleDeviceInfoSchema=r.z.object({ContinueOnDeviceEligibleDeviceInfo:r.z.array(r.z.string())}),t.SubscriptionUpsellsServiceName="com.icloud.subscription.upsells",t.SubscriptionFeaturesServiceName="com.icloud.subscription.features",(p=t.EntryPoint||(t.EntryPoint={})).PlanPage="PlanPage",p.StoragePage="StoragePage",p.SettingsPage="SettingsPage",p.StorageAlert="StorageAlert",p.PhotosApp="PhotosApp",p.Invites="Invites",t.EntryPointContext={PlanPage:window.btoa("iCloudStorage_null_iCloudWeb_yourPlanPage_null_null"),StoragePage:window.btoa("iCloudStorage_null_iCloudWeb_yourStoragePage_null_null"),SettingsPage:window.btoa("iCloudStorage_null_iCloudWeb_settingsPage_null_null"),StorageAlert:window.btoa("iCloudStorage_null_iCloudWeb_storageAlertNavBar_null_null"),PhotosApp:window.btoa("iCloudStorage_null_iCloudWeb_storageAlertPhotos_null_null"),Invites:window.btoa("iCloudStorage_null_iCloudWeb_appleInvites_null_null")},t.ContinueOnDeviceContext={PlanPage:window.btoa("externalApp_com.apple.icloud_yourPlanPage"),StoragePage:window.btoa("externalApp_com.apple.icloud_yourStoragePage"),SettingsPage:window.btoa("externalApp_com.apple.icloud_settingsPage"),StorageAlert:window.btoa("externalApp_com.apple.icloud_storageAlertFromHomepage"),PhotosApp:window.btoa("externalApp_com.apple.icloud_storageAlertFromPhotos"),Invites:window.btoa("externalApp_com.apple.icloud_appleInvites")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoc=t.loc=void 0,n(998);const r=n(2211);t.loc=(0,r.makeLoc)(),t.useLoc=(0,r.makeUseLoc)()},function(e,t,n){"use strict";n.r(t);var r=n(878);Object(r.a)(Object(r.b)(),{"VoiceOver.Subscription.PlanUpgradeyModal.CloseButtonLabel":"close","PlanUpgrade.ContinueOnDevice.SuccessDialog.MoreThanTwo":"%{device1} and %{restCount} other devices","PlanUpgrade.ContinueOnDevice.SuccessDialog.TwoDevices":"%{device1} or %{device2}","PlanUpgrade.ContinueOnDevice.SuccessDialog.OneDevice":"%{device1}","PlanUpgrade.ContinueOnDevice.SuccessDialog.Description":"Look for a notification sent to #{deviceList} to finish upgrading your plan. Requires iOS 17.4 or iPadOS 17.4 or later.","PlanUpgrade.ContinueOnDevice.SuccessDialog.Title":"Complete your purchase on your device","PlanUpgrade.ContinueOnDevice.SuccessDialog.Resend":"Resend","PlanUpgrade.ContinueOnDevice.SuccessDialog.DidNotGetNotification.Description":"Didn't get a notification? #{resend}","PlanUpgrade.Error.Title":"Something Went Wrong","PlanUpgrade.Error.Description":"There was a problem upgrading your iCloud+ Plan. Try again later.","PlanUpgrade.Error.ActionButton.Done":"Done","PlanUpgrade.Header.iCloud+":"iCloud+","PlanUpgrade.Footer.ActionButton.UpgradePlan":"Upgrade Plan","PlanUpgrade.Footer.Description":"A notification will be sent to your Apple devices to complete your purchase. #{planRenewalInfo}","PlanUpgrade.Footer.ActionButton.SendingNotification":"Sending Notification","PlanUpgrade.Footer.ActionButton.SendingNotification.Description":"Sending notification to the devices.","PlanUpgrade.UpgradeCard.FreeUser.Title":"Upgrade to iCloud+","PlanUpgrade.UpgradeCard.FreeUser.Body":"Upgrade to iCloud+ to get even more storage and enhanced privacy features that protect you and your data.","PlanPage.PlanUpgrade.ButtonText":"Upgrade iCloud+ Plan","PlanPage.PlanUpgrade.Button.Loading":"Loading Upgrade Options","PlanPage.PlanUpgrade.ButtonTextWithStorageAndPrice":"Upgrade to %{storage} for %{pricePerMonth}/month","PlanPage.PlanUpgrade.ButtonTextWithPrice":"Upgrade for %{pricePerMonth}/month","PlanPage.PlanUpgrade.RedeemICloudPlusOffer":"Redeem iCloud+ Offer","PlanPage.PlanUpgrade.StorageFull.Title":"Upgrade iCloud+ Plan","PlanPage.PlanUpgrade.StorageFull.Body":"Upgrade to %{nextTier} to get even more storage and enhanced privacy features that protect you and your data.","StoragePage.UpgradeCard.PlanUpgrade.AlmostFull.Title":"iCloud Storage is Almost Full","StoragePage.UpgradeCard.PlanUpgrade.Full.Title":"iCloud Storage is Full","StoragePage.UpgradeCard.PlanUpgrade.FreeUser.AlmostFull.Description":"Upgrade to iCloud+ to make sure your data keeps syncing to iCloud.","StoragePage.UpgradeCard.PlanUpgrade.FreeUser.Full.Description":"Upgrade to iCloud+ to make sure your data keeps syncing to iCloud.","StoragePage.UpgradeCard.PlanUpgrade.PaidUser.AlmostFull.Description":"Upgrade your plan to make sure your data keeps syncing to iCloud.","StoragePage.UpgradeCard.PlanUpgrade.PaidUser.Full.Description":"Upgrade your plan to make sure your data keeps syncing to iCloud.","PostPurchase.Heading.Title":"Welcome to iCloud+","PostPurchase.Heading.Message":"<a href = https://support.apple.com/kb/HT201318 target = \"_blank\"> Learn More About iCloud+</a>","PostPurchase.Footer.ActionButton.Done":"OK","AppUpgrade.Button.GetMoreStorage":"Get More Storage","AppUpgrade.AlmostFull.Message":"You have %{storage} available.","AppUpgrade.Title.StorageFull":"iCloud Storage is Full","AppUpgrade.Title.StorageAlmostFull":"iCloud Storage is Almost Full","PhotosUpgrade.Description":"You have %{photosCount} photos and videos backed up with iCloud. Keep more of your photos safe and synced across devices when you upgrade.","PhotosUpgrade.Features.Title":"iCloud+ %{storage} for %{price}","PhotosUpgrade.Features.List.1":"Access to iCloud+ features","PhotosUpgrade.Features.List.2":"Optimize iPhone storage space","PhotosUpgrade.Features.List.3":"%{storage} of iCloud Storage","PhotosUpgrade.Features.List.4":"Keep photos safe and in sync","PhotosUpgrade.Button.Title.SeeOtherPlan":"See Other Plans","PhotosUpgrade.Title.Header":"Add more storage to keep your photos backed up","Utils.BytesToHumanizedFormat.Size.bytes":"%{value} bytes","Utils.BytesToHumanizedFormat.Size.KB":"%{value} KB","Utils.BytesToHumanizedFormat.Size.MB":"%{value} MB","Utils.BytesToHumanizedFormat.Size.GB":"%{value} GB","Utils.BytesToHumanizedFormat.Size.TB":"%{value} TB","LocalizationFormatter.DecimalSymbol":"."})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1e3);function i(e,t){var n,i=t.givenName,a=t.familyName,s=t.emailAddress,c=t.phoneNumber,u=t.nickname,l=t.companyName,d=u||i;return d&&a&&(n=Object(r.a)(d)&&Object(r.a)(a)?function(e,t){return"".concat(t).concat(e)}(d,a):function(e,t,n){switch(e){case"hu-hu":case"vi-vi":case"vi-vn":return"".concat(n," ").concat(t);default:return"".concat(t," ").concat(n)}}(e,d,a)),o(n)||(n=o(d)||o(a)||o(s)||o(c)||o(l)),n}function o(e){return e&&!/^\s*$/.test(e)?e:""}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=[[4352,4607],[11904,12031],[12032,12255],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[63744,64255],[65072,65103]],i=function(e){var t,n=r;if(!e)return!1;for(var i=0,o=n.length;i<o;++i)if(e>=(t=n[i])[0]&&e<=t[1])return!0;return!1},o=function(e){if(0===(e=e.trim()).length)return!1;for(var t=0,n=e.length-1;t<=n;)if(!i(e.charCodeAt(t++))||!i(e.charCodeAt(n--)))return!1;return!0}},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return s}));var r="us",i="vn",o="hu",a=new Set(["cn","kr","jp",i,o,"hk","tw"]),s=function(e){var t,n;return null===(n=null===(t=/^.*[-_](\w\w)\b.*/.exec(e))||void 0===t?void 0:t[1])||void 0===n?void 0:n.toLowerCase()}},function(e,t,n){"use strict";n.r(t),t.default="../9bd600b2f59a4abf78032e8ee3e436c4.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeaturesLink=void 0;const r=n(996);t.FeaturesLink=class{get features(){return this._subscriptionFeatures}setFeatures(e){this._subscriptionFeatures=e,this.featuresDataObservers.forEach((e=>e.featuresDataDidChange()))}get currentRequest(){return this._currentRequest}setCurrentRequest(e){this._currentRequest!==e&&(this._currentRequest=e,this.featuresDataObservers.forEach((e=>e.featuresDataLoadingStatusDidChange())))}constructor(e,t,n){this.isCNDomain=e,this.dsId=t,this.fetch=n,this._subscriptionFeatures=null,this._currentRequest=null,this.featuresDataObservers=new Set}get isFetching(){return null!==this.currentRequest}async refreshFeaturesData(){const e=this.currentRequest;if(e)return e;const t=(async()=>{const e=await this.fetchFeaturesData();return e?(this.setFeatures(e),this.setCurrentRequest(null),e):null})();this.setCurrentRequest(t);try{return await t}finally{this.setCurrentRequest(null)}}async fetchFeaturesData(){try{const e=await this.fetch(i(this.isCNDomain,this.dsId),{method:"GET",credentials:"include",headers:{"X-Apple-SoftwareCapabilityFlags":"apps.rsvp.create-event"}});if(e.ok){const t=await e.json(),n=r.wireSubscriptionFeaturesSchema.safeParse(t);if(n.success)return n.data}}catch{}return this.features}};const i=(e,t)=>`${e?"https://gatewayws.icloud.com.cn/acsegateway":"https://gatewayws.icloud.com/acsegateway"}/v4/accounts/${t}/subscriptions/features`},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionService=void 0;const r=n(2210),i=n(996);t.SubscriptionService=class{constructor(e,t){this.upsellFlowLink=e,this.featuresLink=t,this.listener=new r.JsonRpcServiceListener(i.SubscriptionUpsellsServiceName),this.featuresListener=new r.JsonRpcServiceListener(i.SubscriptionFeaturesServiceName),this.closed=!1,this.listener.addEventListener("connect",(t=>{t.connection.exportedObject=this,t.connection.start(),e.upsellPlanData&&t.connection.remoteObjectProxy.upsellPlanDataDidChange(e.upsellPlanData),e.isFetchingPlanData&&t.connection.remoteObjectProxy.upsellPlanDataLoadingStatusDidChange(!0)})),this.featuresListener.addEventListener("connect",(e=>{e.connection.exportedObject=this,e.connection.start(),t.features&&e.connection.remoteObjectProxy.featuresDataDidChange(t.features),t.isFetching&&e.connection.remoteObjectProxy.featuresDataLoadingStatusDidChange(!0)})),this.listener.start(),this.featuresListener.start(),e.upsellPlanDataObservers.add(this),t.featuresDataObservers.add(this)}async fetchNextLargerPlanData(){return this.upsellFlowLink.refreshNextLargerPlanData()}async fetchUpsellScreenData(e){return this.upsellFlowLink.fetchUpsellScreenData(e)}async fetchSubscriptionFeaturesData(){return this.featuresLink.refreshFeaturesData()}async sendScreenInteration(e,t){return this.upsellFlowLink.sendScreenInteration(e,t)}async continuePurchaseOnDevice(e,t){return this.upsellFlowLink.continuePurchaseOnDevice(e,t)}async fetchPostPurchaseScreenData(e){return this.upsellFlowLink.fetchPostPurchaseScreenData(e)}async getCoDEligibleDevicesList(){return this.upsellFlowLink.getCoDEligibleDevicesList()}recordUpsellFlowStat(e){return this.upsellFlowLink.recordUpsellFlowStat(e)}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close();this.featuresListener.close();for(const e of this.featuresListener.connections)e.close()}}upsellPlanDataDidChange(){const e=this.upsellFlowLink.upsellPlanData;e&&this.listener.broadcastProxy.upsellPlanDataDidChange(e)}upsellPlanDataLoadingStatusDidChange(){this.listener.broadcastProxy.upsellPlanDataLoadingStatusDidChange(this.upsellFlowLink.isFetchingPlanData)}featuresDataDidChange(){const e=this.featuresLink.features;e&&this.featuresListener.broadcastProxy.featuresDataDidChange(e)}featuresDataLoadingStatusDidChange(){this.featuresListener.broadcastProxy.featuresDataLoadingStatusDidChange(this.featuresLink.isFetching)}}},function(e,t,n){var r=n(1006),i=n(1008),o=String.fromCharCode(0);function a(e){this.mode=e===Array?"array":"string",this.clear()}a.prototype.clear=function(){this.root={},this.size=0},a.prototype.set=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t,this},a.prototype.update=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t(r[o]),this},a.prototype.get=function(e){var t,n,r=this.root;for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return;if(o in r)return r[o]},a.prototype.delete=function(e){var t,n,r,i,a=this.root,s=null,c=null;for(r=0,i=e.length;r<i;r++){if(t=a,"undefined"===typeof(a=a[n=e[r]]))return!1;null!==s?Object.keys(a).length>1&&(s=null,c=null):Object.keys(a).length<2&&(s=t,c=n)}return o in a&&(this.size--,s?delete s[c]:delete a[o],!0)},a.prototype.has=function(e){for(var t=this.root,n=0,r=e.length;n<r;n++)if("undefined"===typeof(t=t[e[n]]))return!1;return o in t},a.prototype.find=function(e){var t,n,r="string"===typeof e,i=this.root,a=[];for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(i=i[e[t]]))return a;for(var s,c=[i],u=[e];c.length;)for(s in e=u.pop(),i=c.pop())s!==o?(c.push(i[s]),u.push(r?e+s:e.concat(s))):a.push([e,i[o]]);return a},a.prototype.values=function(e){var t,n,r=this.root,a=[];if(e)for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty();return a.push(r),new i((function(){for(var e,t,n=!1;a.length;){for(t in e=a.pop())t!==o?a.push(e[t]):n=!0;if(n)return{done:!1,value:e[o]}}return{done:!0}}))},a.prototype.prefixes=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:t}}return{done:!0}}))},a.prototype.keys=a.prototype.prefixes,a.prototype.entries=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:[t,e[o]]}}return{done:!0}}))},"undefined"!==typeof Symbol&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=function(){for(var e,t=new Array(this.size),n=this.entries(),r=0;!(e=n.next()).done;)t[r++]=e.value;return Object.defineProperty(t,"constructor",{value:a,enumerable:!1}),t},"undefined"!==typeof Symbol&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.prototype.toJSON=function(){return this.root},a.from=function(e){var t=new a;return r(e,(function(e,n){t.set(n,e)})),t},a.SENTINEL=o,e.exports=a},function(e,t,n){var r=n(1007),i=r.ARRAY_BUFFER_SUPPORT,o=r.SYMBOL_SUPPORT;e.exports=function(e,t){var n,r,a,s,c;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if("function"!==typeof t)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||"string"===typeof e||"[object Arguments]"===e.toString())for(a=0,s=e.length;a<s;a++)t(e[a],a);else if("function"!==typeof e.forEach)if(o&&Symbol.iterator in e&&"function"!==typeof e.next&&(e=e[Symbol.iterator]()),"function"!==typeof e.next)for(r in e)e.hasOwnProperty(r)&&t(e[r],r);else for(n=e,a=0;!0!==(c=n.next()).done;)t(c.value,a),a++;else e.forEach(t)}},function(e,t){t.ARRAY_BUFFER_SUPPORT="undefined"!==typeof ArrayBuffer,t.SYMBOL_SUPPORT="undefined"!==typeof Symbol},function(e,t){function n(e){if("function"!==typeof e)throw new Error("obliterator/iterator: expecting a function!");this.next=e}"undefined"!==typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var e=arguments,t=e.length,r=0;return new n((function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}}))},n.empty=function(){return new n((function(){return{done:!0}}))},n.fromSequence=function(e){var t=0,r=e.length;return new n((function(){return t>=r?{done:!0}:{done:!1,value:e[t++]}}))},n.is=function(e){return e instanceof n||"object"===typeof e&&null!==e&&"function"===typeof e.next},e.exports=n},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.carry="carry",e.sandbox="carry",e.tc="tc",e.qa1="qa1",e.qa2="qa2",e.prod="prod"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r,i=n(2176),o=n(2217),a=n(2254),s=n(1011),c=function(){return c=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},c.apply(this,arguments)},u=1,l=function(){function e(e,t,n){var i,a;void 0===n&&(n=null),this.message=e,this.parent=n,this.isLogReference=!0,this.uniqueID=u++,t||(t=Object(s.b)(r||(i=["T-",""],a=["T-",""],Object.defineProperty?Object.defineProperty(i,"raw",{value:a}):i.raw=a,r=i),Object(o.c)(this.uniqueID).anonymizedID())),this.id=t}return e.fromJSON=function(t){return new e("string"===typeof t.m?new s.a([Object(o.c)(t.m).constant()]):s.a.fromJSON(t.m),"string"===typeof t.i?new s.a([Object(o.c)(t.i).constant()]):s.a.fromJSON(t.i),t.p?e.fromJSON(t.p):null)},Object.defineProperty(e.prototype,"stack",{get:function(){for(var e=[this],t=this.parent;t;)e.push(t),t=t.parent;return e.reverse(),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logString",{get:function(){return Object(a.a)(this)},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(e){return void 0===e&&(e=i.a.none),c(c({},this.parent?{p:this.parent.toJSON(e)}:{}),{m:this.message.isConst?this.message.toString():this.message.toJSON(e),i:this.id.isConst?this.id.toString():this.id.toJSON(e)})},e.prototype.toString=function(e,t,n){return void 0===e&&(e=i.a.none),void 0===t&&(t=0),void 0===n&&(n=1/0),Object(a.a)(this,t,n).toString(e)},e}();function d(e){return e&&e.isLogReference}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p}));var r=n(1012),i=n(2176),o=n(2217),a=n(1015),s=n(1017),c=Object(o.c)("\n").withClass(r.a.Const),u=Object(o.c)(":").withClass(r.a.Const),l=Object(o.c)('"').withClass(r.a.Const),d=function(){function e(e,t){void 0===t&&(t=[]),this.fragments=e,this.metadata=t,this.isLoggable=!0}return Object.defineProperty(e.prototype,"logString",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConst",{get:function(){return 0===this.metadata.length&&this.fragments.every((function(e){return e.piiClass===r.a.Const}))},enumerable:!1,configurable:!0}),e.fromJSON=function(t){return new e(t.f.map((function(e){return o.a.fromJSON(e)})),t.m.map((function(e){return Object(a.b)(e)})))},e.prototype.equals=function(e){if(this===e)return!0;if(!e||"object"!==typeof e||e.constructor!==this.constructor)return!1;var t=this.fragments,n=this.metadata;if(n.length!==e.metadata.length)return!1;if(t.length!==e.fragments.length)return!1;var r=i.a.DEBUG_INTERNAL_ALL;return t.every((function(t,n){var r=e.fragments[n];return t._unsafeValue===r._unsafeValue&&t.piiClass===r.piiClass}))&&n.every((function(t,n){return t.toJSON(r)===e.metadata[n].toJSON(r)}))},e.prototype.toJSON=function(e){return void 0===e&&(e=i.a.none),{f:this.fragments.map((function(t){return t.toJSON(e)})),m:this.metadata.map((function(t){return t.toJSON(e)}))}},e.prototype.toString=function(e){return void 0===e&&(e=i.a.none),this.fragments.map((function(t){return t.toString(e)})).join("")},e.empty=new e([]),e.newline=new e([c]),e}();function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Object(s.a)(e))return e.logString;for(var i=[],u=[],l=0;l<e.length;l++){if(""!==e[l])for(var p=e[l].split(/\n/g),h=0;h<p.length;h++){var m=p[h];h>0&&i.push(c),m.length>0&&i.push(Object(o.c)(m).withClass(r.a.Const))}if(t.length>l){var g=t[l];if(Object(s.a)(g))i.push.apply(i,g.logString.fragments);else if(Object(a.a)(g))u.push(g);else{var v=Object(o.c)(g),y=v._unsafeValue;"string"===typeof y?f(i,y,v):i.push(v)}}}return 0===i.length&&0===u.length?d.empty:new d(i,u)}function f(e,t,n){for(var r,i=t.split(/\n/g),a=0;a<i.length;a++){var s=i[a];a>0&&e.push(c);var d=null!==(r=s.match(/^(\s*)(.*?)(\s*)$/))&&void 0!==r?r:[s,"",s,""],p=d[1],f=d[2],h=d[3];p.length>0&&e.push(Object(o.c)(p).notPII().forCertain());var m=f.match(/^"([^"]+)"(\s*):(\s*)(.*)$/);if(m){m[0];var g=m[1],v=m[2],y=m[3],b=m[4];e.push(l),e.push(n.withValue(g)),e.push(l),v.length>0&&e.push(Object(o.c)(v).notPII().forCertain()),e.push(u),y.length>0&&e.push(Object(o.c)(y).notPII().forCertain()),b.length>0&&e.push(n.withValue(b))}else f.length>0&&e.push(n.withValue(f));h.length>0&&e.push(Object(o.c)(h).notPII().forCertain())}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.Personal=0]="Personal",e[e.Sensitive=1]="Sensitive",e[e.UserID=2]="UserID",e[e.UserInfo=3]="UserInfo",e[e.DeviceInfo=4]="DeviceInfo",e[e.SessionID=5]="SessionID",e[e.SessionInfo=6]="SessionInfo",e[e.AnonymizedID=7]="AnonymizedID",e[e.UserAgent=8]="UserAgent",e[e.Performance=9]="Performance",e[e.NotPII=10]="NotPII",e[e.Const=11]="Const"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=1,i=function(){function e(e){this.groupLabel=e,this.groupID=r++,this.nextID=1,this.assignedIDs=new Map}return e.piiIDGroup=function(t){var n=this.allPIIIDGroups.get(t);if(n)return n;var r=new e(t);return this.allPIIIDGroups.set(t,r),r},e.fromJSON=function(e){return this.piiIDGroup(e.groupLabel)},e.prototype.idFor=function(e){return this.assignedIDs.has(e)||this.assignedIDs.set(e,this.nextID++),this.assignedIDs.get(e)},e.prototype.reset=function(){this.nextID=1,this.assignedIDs=new Map},e.prototype.toJSON=function(){return{groupLabel:this.groupLabel,groupID:this.groupID}},e.allPIIIDGroups=new Map,e}();function o(e){return i.piiIDGroup(e)}var a=o("ID")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(2217),i=Symbol("piiObjectKeyMetadata");function o(e){return function(t){var n;if(null===t||void 0===t)return t;var o={},a=((n={})[i]=o,n);for(var s in t)e[s]&&(o[s]=Object(r.c)(s).constant()),a[s]=e[s]?e[s](t[s]):t[s];return a}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d}));var r,i=n(2217),o=n(1016),a=n(1011),s=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},c=new Map;function u(e,t){c.set(e,t)}function l(e){var t=c.get(e.metadataType);if(!t)throw new o.a(Object(a.b)(r||(r=s(["Unknown log string metadata type: ",""],["Unknown log string metadata type: ",""])),Object(i.c)(t).notPII().forCertain()));return t(e)}function d(e){return e&&e.isLogStringMetadata}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r,i=n(2176),o=n(1011),a=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},c=function(e){function t(n,r){void 0===r&&(r="");var i=e.call(this,n.logString.toString())||this;return i.description=n,i.id=r,i.isLoggable=!0,i.isLogError=!0,Object.defineProperty(i,"logString",{get:function(){return i.description.logString}}),i.toString=t.prototype.toString,i}return a(t,e),Object.defineProperty(t.prototype,"logString",{get:function(){return this.description.logString},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=i.a.none),this.logString.toString(e)},t}(Error);function u(e,t){void 0===t&&(t=function(){return Object(o.b)(r||(r=s([""],[""])))});var n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(void 0,n);return new c(i,e)};return n.id=e,n.is=function(t){return(n=t)&&n.isLogError&&t.id===e;var n},n}},function(e,t,n){"use strict";function r(e){return Boolean(e&&e.isLoggable)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(2176),i=n(1019),o=n(1022),a=n(1021),s=n(1010),c=n(1011),u=n(1020),l=n(1023),d=n(1024),p=function(){return p=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},p.apply(this,arguments)},f=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function h(e,t){return"function"===typeof t?t(e):t}var m=[],g=0,v=function(){function e(e,t){var n=void 0===t?{}:t,r=n.logTimestamp,s=void 0===r?Object(i.a)():r,c=n.logTagKeys,l=void 0===c?m:c,d=n.logMessageID,p=void 0===d?g++:d,f=n.logTagValues,h=void 0===f?m:f,v=n.logStyle,y=void 0===v?u.a.None:v,b=n.logLevel,w=void 0===b?a.a.Info:b;this.isLoggable=!0,this.logTimestamp=Object(i.a)(),this.logStyle=u.a.None,this.logString=e.logString,this.logLevel=w,this.logMessageID=p,this.logTimestamp=s,this.logTagKeys=l,this.logTagValues=h,this.logStyle=y;for(var S=[],C=0,_=this.logString.metadata;C<_.length;C++){var O=_[C];Object(o.b)(O)&&(S||(S=[]),S.push(O))}if(S.length>0){for(var E={},I={},A=0,T=0,P=this.logTagKeys;T<P.length;T++){var R=P[T];E[R.key]=R,I[R.key]=this.logTagValues[A],A++}for(var k=0,D=S;k<D.length;k++)E[(O=D[k]).type.key]=O.type,I[O.type.key]=O.value;var M=[],N=[];for(var x in E)M.push(E[x]),N.push(I[x]);this.logTagKeys=M,this.logTagValues=N}}return Object.defineProperty(e.prototype,"logActivityStack",{get:function(){for(var e=[],t=this.logActivity;t;)e.push(t),t=Object(s.b)(t)?t.parent:null;return e.reverse(),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logRootActivity",{get:function(){var e;return null!==(e=this.logActivityStack[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logActivity",{get:function(){return this.getTag(l.a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logSource",{get:function(){return this.getTag(l.h)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logParams",{get:function(){var e=this,t=e.logTimestamp,n=e.logLevel,r=e.logMessageID,i=e.logTagKeys,o=e.logTagValues;return{logTimestamp:t,logMessageID:r,logLevel:n,logStyle:e.logStyle,logTagKeys:i,logTagValues:o}},enumerable:!1,configurable:!0}),e.fromJSON=function(t){var n=[],r=[];for(var i in t.tg){var o=t.tg[i];n.push(Object(l.c)(i)),r.push(Object(d.a)(o))}return new e(c.a.fromJSON(t.m),{logTimestamp:t.t,logMessageID:t.i,logLevel:t.l,logStyle:t.s,logTagKeys:n,logTagValues:r})},e.prototype.params=function(e){var t=h(this.logParams,e);return new this.constructor(this.logString,p(p({},this.logParams),t))},e.prototype.level=function(e){var t=h(this.logLevel,e);return this.params({logLevel:t})},e.prototype.source=function(e){return this.tag(l.h,e)},e.prototype.activity=function(e){return this.tag(l.a,e)},e.prototype.tag=function(e,t){void 0===t&&(t=null);var n=this.logTagKeys.indexOf(e);if(n>=0){var r=h(this.logTagValues[n],t);return this.withTags(this.logTagKeys,f(f(f([],this.logTagValues.slice(0,n)),[r]),this.logTagValues.slice(n+1)))}return this.withTags(f(f([],this.logTagKeys),[e]),f(f([],this.logTagValues),[h(null,t)]))},e.prototype.withTags=function(e,t){return this.params({logTagKeys:e,logTagValues:t})},e.prototype.getTag=function(e){var t=this.logTagKeys.indexOf(e);return t<0?null:this.logTagValues[t]},e.prototype.tags=function(e,t){if(this.logTagKeys===m)return this.withTags(e,t);for(var n=this,r=0;r<e.length;r++)n=n.tag(e[r],t[r]);return n},e.prototype.style=function(e){var t=h(this.logStyle,e);return this.params({logStyle:t})},e.prototype.message=function(e){var t=h(this.logString,e);return new this.constructor(t,this.logParams)},e.prototype.timestamp=function(e){var t=h(this.logTimestamp,e);return this.params({logTimestamp:t})},e.prototype.toJSON=function(e){var t=this;return void 0===e&&(e=r.a.none),{i:this.logMessageID,t:this.logTimestamp,l:this.logLevel,m:this.logString.toJSON(e),tg:Object.fromEntries(this.logTagKeys.map((function(n,r){var i=t.logTagValues[r];return[n.key,Object(d.b)(i,e)]}))),s:this.logStyle}},e.prototype.toString=function(e){return void 0===e&&(e=r.a.none),this.logString.toString(e)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=Date.now(),i="undefined"!==typeof performance?r-performance.now():0;var o="undefined"===typeof performance?function(){return Date.now()}:function(){return performance.now()+i};function a(){return o()}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.None=0]="None",e[e.Separator=1]="Separator",e[e.Break=2]="Break",e[e.H1=3]="H1",e[e.H2=4]="H2",e[e.H3=5]="H3",e[e.H4=6]="H4",e[e.H5=7]="H5"}(r||(r={}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.Error=0]="Error",e[e.Warn=1]="Warn",e[e.Info=2]="Info",e[e.HTTP=3]="HTTP",e[e.Performance=4]="Performance",e[e.Verbose=5]="Verbose",e[e.Debug=6]="Debug",e[e.Silly=7]="Silly"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1015),i=n(1023),o=n(1024),a=function(){function e(e,t){this.type=e,this.value=t,this.isLogStringMetadata=!0,this.isLogStringTagMetadata=!0}return e.fromJSON=function(t){var n=t,r=Object(i.c)(n.type),a=n.value;return new e(r,Object(o.a)(a))},e.prototype.toJSON=function(e){return{metadataType:"__tag",type:this.type.key,value:Object(o.b)(this.value,e)}},e}();function s(e){return e&&e.isLogStringTagMetadata}Object(r.c)("__tag",(function(e){return a.fromJSON(e)}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"a",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"i",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return w}));var r=n(1017),i=n(1022),o=n(1010),a=n(1011),s={},c=[null],u=1,l=function(){function e(e){this.key=e,this.id=u++,c[this.id]=this}return e.prototype.tag=function(e){return void 0===e&&(e=null),Object(o.b)(e)?new i.a(this,e):Object(r.a)(e)?new i.a(this,e.logString):new i.a(this,Object(a.b)(p||(t=["",""],n=["",""],Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,p=t),e));var t,n},e}();function d(e){return s[e]||(s[e]=new l(e),s[e])}var p,f=d("source"),h=d("activity"),m=d("package"),g=d("subsystem"),v=(d("process"),d("thread"),d("cat")),y=d("mark"),b=d("measureStart"),w=d("measureEnd")},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(2217),i=n(1010),o=n(1011);function a(e){return null===e?null:"string"===typeof e?new o.a([Object(r.c)(e).constant()]):"r"===e.t?i.a.fromJSON(e.v):o.a.fromJSON(e.v)}function s(e,t){return e instanceof i.a?{t:"r",v:e.toJSON(t)}:null!==e&&e.isConst?e.toString():null!==e?{t:"s",v:null===e||void 0===e?void 0:e.toJSON(t)}:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1017),i=n(1018),o=n(1011),a=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function s(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof i.a?e:Object(r.a)(e)?new i.a(e):new i.a(o.b.apply(void 0,a([e],t)))}},function(e,t,n){"use strict";function r(e){return!(!e||!0!==e.isLogger)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return p}));var r=n(1016),i=n(1011),o=n(2217),a=n(1028);function s(e){return a.fromByteArray(e)}const c=/[\w+/-]/g,u=/={0,2}$/;function l(e){if(e instanceof Error)return e;if("string"===typeof e){const t=(e||"").replace(u,"");if(""!==t.replace(c,"")){const e=t.replace(c,"-");return new r.a(i.b`Found invalid Base64 chars: "${Object(o.c)(e).notPII().forCertain()}"`)}}try{return a.toByteArray(e)}catch(t){return t}}function d(e){return a.fromByteArray(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function p(e){if(e||(e=new Error("Missing base64URL!")),e instanceof Error)return e;try{let t=e.replace(/-/g,"+").replace(/_/g,"/");const n=t.length;switch(n%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:return new r.a(i.b`base64url string has an invalid length. Length: ${Object(o.c)(n).notPII().forCertain()}`)}return l(t)}catch(t){return t}}new TextDecoder},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),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,d=s>0?a-4:a;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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],i[a.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,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,n){e.exports=function(){"use strict";var e=Math.imul,t=Math.clz32;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},n(e)}function r(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(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&&s(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(){return u=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i},u.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){function n(){return u(e,arguments,a(this).constructor)}if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!=typeof t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},l(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){var t=c();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 function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,n)}}function f(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,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||h(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 h(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(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}var g=function(e){var t=Math.abs,r=Math.max,a=Math.floor;function s(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=c.call(this,e)).sign=t,Object.setPrototypeOf(d(n),s.prototype),e>s.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return n}o(s,e);var c=p(s);return i(s,[{key:"toDebugString",value:function(){var e,t=["BigInt["],n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(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 o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push((r?(r>>>0).toString(16):r)+", ")}}catch(e){n.e(e)}finally{n.f()}return t.push("]"),t.join("")}},{key:"toString",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10;if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(e&e-1)?s.__toStringBasePowerOfTwo(this,e):s.__toStringGeneric(this,e,!1)}},{key:"valueOf",value:function(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function(){for(var e=new s(this.length,this.sign),t=0;t<this.length;t++)e[t]=this[t];return e}},{key:"__trim",value:function(){for(var e=this.length,t=this[e-1];0===t;)t=this[--e-1],this.pop();return 0===e&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var e=0;e<this.length;e++)this[e]=0}},{key:"__clzmsd",value:function(){return s.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function(e,t,n){n>this.length&&(n=this.length);for(var r=32767&e,i=e>>>15,o=0,a=t,c=0;c<n;c++){var u=this.__digit(c),l=32767&u,d=u>>>15,p=s.__imul(l,r),f=s.__imul(l,i),h=s.__imul(d,r),m=a+p+o;o=m>>>30,m&=1073741823,o+=(m+=((32767&f)<<15)+((32767&h)<<15))>>>30,a=s.__imul(d,i)+(f>>>15)+(h>>>15),this.__setDigit(c,1073741823&m)}if(0!==o||0!==a)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,n){for(var r,i=0,o=0;o<n;o++)i=(r=this.__halfDigit(t+o)+e.__halfDigit(o)+i)>>>15,this.__setHalfDigit(t+o,32767&r);return i}},{key:"__inplaceSub",value:function(e,t,n){var r=0;if(1&t){t>>=1;for(var i=this.__digit(t),o=32767&i,a=0;a<n-1>>>1;a++){var s=e.__digit(a),c=(i>>>15)-(32767&s)-r;r=1&c>>>15,this.__setDigit(t+a,(32767&c)<<15|32767&o),r=1&(o=(32767&(i=this.__digit(t+a+1)))-(s>>>15)-r)>>>15}var u=e.__digit(a),l=(i>>>15)-(32767&u)-r;if(r=1&l>>>15,this.__setDigit(t+a,(32767&l)<<15|32767&o),t+a+1>=this.length)throw new RangeError("out of bounds");0==(1&n)&&(r=1&(o=(32767&(i=this.__digit(t+a+1)))-(u>>>15)-r)>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;for(var d=0;d<e.length-1;d++){var p=this.__digit(t+d),f=e.__digit(d),h=(32767&p)-(32767&f)-r,m=(p>>>15)-(f>>>15)-(r=1&h>>>15);r=1&m>>>15,this.__setDigit(t+d,(32767&m)<<15|32767&h)}var g=this.__digit(t+d),v=e.__digit(d),y=(32767&g)-(32767&v)-r;r=1&y>>>15;var b=0;0==(1&n)&&(r=1&(b=(g>>>15)-(v>>>15)-r)>>>15),this.__setDigit(t+d,(32767&b)<<15|32767&y)}return r}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t,n=this.__digit(0)>>>e,r=this.length-1,i=0;i<r;i++)t=this.__digit(i+1),this.__setDigit(i,1073741823&t<<30-e|n),n=t>>>e;this.__setDigit(r,n)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:"__setHalfDigit",value:function(e,t){var n=e>>>1,r=this.__digit(n),i=1&e?32767&r|t<<15:1073709056&r|32767&t;this.__setDigit(n,i)}}],[{key:"BigInt",value:function(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return s.__zero();if(s.__isOneDigitInt(e))return 0>e?s.__oneDigit(-e,!0):s.__oneDigit(e,!1);if(!t(e)||a(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return s.__fromDouble(e)}if("string"==typeof e){var r=s.__fromString(e);if(null===r)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return r}if("boolean"==typeof e)return!0===e?s.__oneDigit(1,!1):s.__zero();if("object"===n(e)){if(e.constructor===s)return e;var i=s.__toPrimitive(e);return s.BigInt(i)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var n=e.__unsignedDigit(0);return e.sign?-n:n}var r=e.__digit(t-1),i=s.__clz30(r),o=30*t-i;if(1024<o)return e.sign?-1/0:1/0;var a=o-1,c=r,u=t-1,l=i+3,d=32===l?0:c<<l;d>>>=12;var p=l-12,f=12<=l?0:c<<20+l,h=20+l;for(0<p&&0<u&&(u--,d|=(c=e.__digit(u))>>>30-p,f=c<<p+2,h=p+2);0<h&&0<u;)u--,c=e.__digit(u),f|=30<=h?c<<h-30:c>>>30-h,h-=30;var m=s.__decideRounding(e,h,u,c);if((1===m||0===m&&1==(1&f))&&0===(f=f+1>>>0)&&0!=++d>>>20&&(d=0,1023<++a))return e.sign?-1/0:1/0;var g=e.sign?-2147483648:0;return a=a+1023<<20,s.__kBitConversionInts[1]=g|a|d,s.__kBitConversionInts[0]=f,s.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?s.__absoluteSubOne(e).__trim():s.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return s.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?s.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");var n=t.__unsignedDigit(0);if(1===n)return e;if(n>=s.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var r=1+(0|n/30),i=new s(r,e.sign&&0!=(1&n));i.__initializeDigits();var o=1<<n%30;return i.__setDigit(r-1,o),i}var a=null,c=e;for(0!=(1&n)&&(a=e),n>>=1;0!==n;n>>=1)c=s.multiply(c,c),0!=(1&n)&&(a=null===a?c:s.multiply(a,c));return a}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var n=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&n--;var r=new s(n,e.sign!==t.sign);r.__initializeDigits();for(var i=0;i<e.length;i++)s.__multiplyAccumulate(t,e.__digit(i),r,i);return r.__trim()}},{key:"divide",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return s.__zero();var n,r=e.sign!==t.sign,i=t.__unsignedDigit(0);if(1===t.length&&32767>=i){if(1===i)return r===e.sign?e:s.unaryMinus(e);n=s.__absoluteDivSmall(e,i,null)}else n=s.__absoluteDivLarge(e,t,!0,!1);return n.sign=r,n.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return e;var n=t.__unsignedDigit(0);if(1===t.length&&32767>=n){if(1===n)return s.__zero();var r=s.__absoluteModSmall(e,n);return 0===r?s.__zero():s.__oneDigit(r,e.sign)}var i=s.__absoluteDivLarge(e,t,!1,!0);return i.sign=e.sign,i.__trim()}},{key:"add",value:function(e,t){var n=e.sign;return n===t.sign?s.__absoluteAdd(e,t,n):0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,n):s.__absoluteSub(t,e,!n)}},{key:"subtract",value:function(e,t){var n=e.sign;return n===t.sign?0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,n):s.__absoluteSub(t,e,!n):s.__absoluteAdd(e,t,n)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?s.__rightShiftByAbsolute(e,t):s.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?s.__leftShiftByAbsolute(e,t):s.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>s.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=s.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0<s.__compareToBigInt(e,t)}},{key:"greaterThanOrEqual",value:function(e,t){return 0<=s.__compareToBigInt(e,t)}},{key:"equal",value:function(e,t){if(e.sign!==t.sign)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e.__digit(n)!==t.__digit(n))return!1;return!0}},{key:"notEqual",value:function(e,t){return!s.equal(e,t)}},{key:"bitwiseAnd",value:function(e,t){if(!e.sign&&!t.sign)return s.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){var n=r(e.length,t.length)+1,i=s.__absoluteSubOne(e,n),o=s.__absoluteSubOne(t);return i=s.__absoluteOr(i,o,i),s.__absoluteAddOne(i,!0,i).__trim()}if(e.sign){var a=[t,e];e=a[0],t=a[1]}return s.__absoluteAndNot(e,s.__absoluteSubOne(t)).__trim()}},{key:"bitwiseXor",value:function(e,t){if(!e.sign&&!t.sign)return s.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){var n=r(e.length,t.length),i=s.__absoluteSubOne(e,n),o=s.__absoluteSubOne(t);return s.__absoluteXor(i,o,i).__trim()}var a=r(e.length,t.length)+1;if(e.sign){var c=[t,e];e=c[0],t=c[1]}var u=s.__absoluteSubOne(t,a);return u=s.__absoluteXor(u,e,u),s.__absoluteAddOne(u,!0,u).__trim()}},{key:"bitwiseOr",value:function(e,t){var n=r(e.length,t.length);if(!e.sign&&!t.sign)return s.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){var i=s.__absoluteSubOne(e,n),o=s.__absoluteSubOne(t);return i=s.__absoluteAnd(i,o,i),s.__absoluteAddOne(i,!0,i).__trim()}if(e.sign){var a=[t,e];e=a[0],t=a[1]}var c=s.__absoluteSubOne(t,n);return c=s.__absoluteAndNot(c,e,c),s.__absoluteAddOne(c,!0,c).__trim()}},{key:"asIntN",value:function(e,t){if(0===t.length)return t;if(0>(e=a(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(e>=s.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length<n)return t;var r=t.__unsignedDigit(n-1),i=1<<(e-1)%30;if(t.length===n&&r<i)return t;if((r&i)!==i)return s.__truncateToNBits(e,t);if(!t.sign)return s.__truncateAndSubFromPowerOfTwo(e,t,!0);if(0==(r&i-1)){for(var o=n-2;0<=o;o--)if(0!==t.__digit(o))return s.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===n&&r===i?t:s.__truncateToNBits(e,t)}return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}},{key:"asUintN",value:function(e,t){if(0===t.length)return t;if(0>(e=a(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(t.sign){if(e>s.__kMaxLengthBits)throw new RangeError("BigInt too big");return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=s.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length<n)return t;var r=e%30;if(t.length==n){if(0===r)return t;if(0==t.__digit(n-1)>>>r)return t}return s.__truncateToNBits(e,t)}},{key:"ADD",value:function(e,t){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)&&s.__isBigInt(t))return s.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return s.__compare(e,t,0)}},{key:"LE",value:function(e,t){return s.__compare(e,t,1)}},{key:"GT",value:function(e,t){return s.__compare(e,t,2)}},{key:"GE",value:function(e,t){return s.__compare(e,t,3)}},{key:"EQ",value:function(e,t){for(;;){if(s.__isBigInt(e))return s.__isBigInt(t)?s.equal(e,t):s.EQ(t,e);if("number"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,e);if("object"!==n(t))return e==t;t=s.__toPrimitive(t)}else if("string"==typeof e){if(s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.equal(e,t);if("object"!==n(t))return e==t;t=s.__toPrimitive(t)}else if("boolean"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,+e);if("object"!==n(t))return e==t;t=s.__toPrimitive(t)}else if("symbol"===n(e)){if(s.__isBigInt(t))return!1;if("object"!==n(t))return e==t;t=s.__toPrimitive(t)}else{if("object"!==n(e))return e==t;if("object"===n(t)&&t.constructor!==s)return e==t;e=s.__toPrimitive(e)}}}},{key:"NE",value:function(e,t){return!s.EQ(e,t)}},{key:"DataViewGetBigInt64",value:function(e,t){var n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return s.asIntN(64,s.DataViewGetBigUint64(e,t,n))}},{key:"DataViewGetBigUint64",value:function(e,t){var n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],r=f(n?[4,0]:[0,4],2),i=r[0],o=r[1],a=e.getUint32(t+i,n),c=e.getUint32(t+o,n),u=new s(3,!1);return u.__setDigit(0,1073741823&c),u.__setDigit(1,(268435455&a)<<2|c>>>30),u.__setDigit(2,a>>>28),u.__trim()}},{key:"DataViewSetBigInt64",value:function(e,t,n){var r=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];s.DataViewSetBigUint64(e,t,n,r)}},{key:"DataViewSetBigUint64",value:function(e,t,n){var r=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3],i=0,o=0;if(0<(n=s.asUintN(64,n)).length&&(o=n.__digit(0),1<n.length)){var a=n.__digit(1);o|=a<<30,i=a>>>2,2<n.length&&(i|=n.__digit(2)<<28)}var c=f(r?[4,0]:[0,4],2),u=c[0],l=c[1];e.setUint32(t+u,i,r),e.setUint32(t+l,o,r)}},{key:"__zero",value:function(){return new s(0,!1)}},{key:"__oneDigit",value:function(e,t){var n=new s(1,t);return n.__setDigit(0,e),n}},{key:"__decideRounding",value:function(e,t,n,r){if(0<t)return-1;var i;if(0>t)i=-t-1;else{if(0===n)return-1;n--,r=e.__digit(n),i=29}var o=1<<i;if(0==(r&o))return-1;if(0!=(r&(o-=1)))return 1;for(;0<n;)if(n--,0!==e.__digit(n))return 1;return 0}},{key:"__fromDouble",value:function(e){s.__kBitConversionDouble[0]=e;var t,n=(2047&s.__kBitConversionInts[1]>>>20)-1023,r=1+(0|n/30),i=new s(r,0>e),o=1048575&s.__kBitConversionInts[1]|1048576,a=s.__kBitConversionInts[0],c=n%30,u=0;if(c<20){var l=20-c;u=l+32,t=o>>>l,o=o<<32-l|a>>>l,a<<=32-l}else if(20===c)u=32,t=o,o=a,a=0;else{var d=c-20;u=32-d,t=o<<d|a>>>32-d,o=a<<d,a=0}i.__setDigit(r-1,t);for(var p=r-2;0<=p;p--)0<u?(u-=30,t=o>>>2,o=o<<30|a>>>2,a<<=30):t=0,i.__setDigit(p,t);return i.__trim()}},{key:"__isWhitespace",value:function(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=0,r=e.length,i=0;if(i===r)return s.__zero();for(var o=e.charCodeAt(i);s.__isWhitespace(o);){if(++i===r)return s.__zero();o=e.charCodeAt(i)}if(43===o){if(++i===r)return null;o=e.charCodeAt(i),n=1}else if(45===o){if(++i===r)return null;o=e.charCodeAt(i),n=-1}if(0===t){if(t=10,48===o){if(++i===r)return s.__zero();if(88===(o=e.charCodeAt(i))||120===o){if(t=16,++i===r)return null;o=e.charCodeAt(i)}else if(79===o||111===o){if(t=8,++i===r)return null;o=e.charCodeAt(i)}else if(66===o||98===o){if(t=2,++i===r)return null;o=e.charCodeAt(i)}}}else if(16===t&&48===o){if(++i===r)return s.__zero();if(88===(o=e.charCodeAt(i))||120===o){if(++i===r)return null;o=e.charCodeAt(i)}}if(0!==n&&10!==t)return null;for(;48===o;){if(++i===r)return s.__zero();o=e.charCodeAt(i)}var a=r-i,c=s.__kMaxBitsPerChar[t],u=s.__kBitsPerCharTableMultiplier-1;if(a>1073741824/c)return null;var l=new s(0|(29+(c*a+u>>>s.__kBitsPerCharTableShift))/30,!1),d=10>t?t:10,p=10<t?t-10:0;if(0==(t&t-1)){c>>=s.__kBitsPerCharTableShift;var f=[],h=[],m=!1;do{for(var g,v=0,y=0;;){if(g=void 0,o-48>>>0<d)g=o-48;else{if(!((32|o)-97>>>0<p)){m=!0;break}g=(32|o)-87}if(y+=c,v=v<<c|g,++i===r){m=!0;break}if(o=e.charCodeAt(i),30<y+c)break}f.push(v),h.push(y)}while(!m);s.__fillFromParts(l,f,h)}else{l.__initializeDigits();var b=!1,w=0;do{for(var S,C=0,_=1;;){if(S=void 0,o-48>>>0<d)S=o-48;else{if(!((32|o)-97>>>0<p)){b=!0;break}S=(32|o)-87}var O=_*t;if(1073741823<O)break;if(_=O,C=C*t+S,w++,++i===r){b=!0;break}o=e.charCodeAt(i)}var E=0|(c*w+(u=30*s.__kBitsPerCharTableMultiplier-1)>>>s.__kBitsPerCharTableShift)/30;l.__inplaceMultiplyAdd(_,C,E)}while(!b)}if(i!==r){if(!s.__isWhitespace(o))return null;for(i++;i<r;i++)if(o=e.charCodeAt(i),!s.__isWhitespace(o))return null}return l.sign=-1===n,l.__trim()}},{key:"__fillFromParts",value:function(e,t,n){for(var r=0,i=0,o=0,a=t.length-1;0<=a;a--){var s=t[a],c=n[a];i|=s<<o,30===(o+=c)?(e.__setDigit(r++,i),o=0,i=0):30<o&&(e.__setDigit(r++,1073741823&i),i=s>>>c-(o-=30))}if(0!==i){if(r>=e.length)throw new Error("implementation bug");e.__setDigit(r++,i)}for(;r<e.length;r++)e.__setDigit(r,0)}},{key:"__toStringBasePowerOfTwo",value:function(e,t){var n=e.length,r=t-1,i=r=(15&(r=(51&(r=(85&r>>>1)+(85&r))>>>2)+(51&r))>>>4)+(15&r),o=t-1,a=e.__digit(n-1),c=0|(30*n-s.__clz30(a)+i-1)/i;if(e.sign&&c++,268435456<c)throw new Error("string too long");for(var u=Array(c),l=c-1,d=0,p=0,f=0;f<n-1;f++){var h=e.__digit(f),m=(d|h<<p)&o;u[l--]=s.__kConversionChars[m];var g=i-p;for(d=h>>>g,p=30-g;p>=i;)u[l--]=s.__kConversionChars[d&o],d>>>=i,p-=i}var v=(d|a<<p)&o;for(u[l--]=s.__kConversionChars[v],d=a>>>i-p;0!==d;)u[l--]=s.__kConversionChars[d&o],d>>>=i;if(e.sign&&(u[l--]="-"),-1!==l)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(e,t,n){var r=e.length;if(0===r)return"";if(1===r){var i=e.__unsignedDigit(0).toString(t);return!1===n&&e.sign&&(i="-"+i),i}var o,a,c=30*r-s.__clz30(e.__digit(r-1)),u=s.__kMaxBitsPerChar[t]-1,l=c*s.__kBitsPerCharTableMultiplier,d=1+(l=0|(l+=u-1)/u)>>1,p=s.exponentiate(s.__oneDigit(t,!1),s.__oneDigit(d,!1)),f=p.__unsignedDigit(0);if(1===p.length&&32767>=f){(o=new s(e.length,!1)).__initializeDigits();for(var h,m=0,g=2*e.length-1;0<=g;g--)h=m<<15|e.__halfDigit(g),o.__setHalfDigit(g,0|h/f),m=0|h%f;a=m.toString(t)}else{var v=s.__absoluteDivLarge(e,p,!0,!0);o=v.quotient;var y=v.remainder.__trim();a=s.__toStringGeneric(y,t,!0)}o.__trim();for(var b=s.__toStringGeneric(o,t,!0);a.length<d;)a="0"+a;return!1===n&&e.sign&&(b="-"+b),b+a}},{key:"__unequalSign",value:function(e){return e?-1:1}},{key:"__absoluteGreater",value:function(e){return e?-1:1}},{key:"__absoluteLess",value:function(e){return e?1:-1}},{key:"__compareToBigInt",value:function(e,t){var n=e.sign;if(n!==t.sign)return s.__unequalSign(n);var r=s.__absoluteCompare(e,t);return 0<r?s.__absoluteGreater(n):0>r?s.__absoluteLess(n):0}},{key:"__compareToNumber",value:function(e,n){if(s.__isOneDigitInt(n)){var r=e.sign,i=0>n;if(r!==i)return s.__unequalSign(r);if(0===e.length){if(i)throw new Error("implementation bug");return 0===n?0:-1}if(1<e.length)return s.__absoluteGreater(r);var o=t(n),a=e.__unsignedDigit(0);return a>o?s.__absoluteGreater(r):a<o?s.__absoluteLess(r):0}return s.__compareToDouble(e,n)}},{key:"__compareToDouble",value:function(e,t){if(t!==t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;var n=e.sign;if(n!==0>t)return s.__unequalSign(n);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;s.__kBitConversionDouble[0]=t;var r=2047&s.__kBitConversionInts[1]>>>20;if(2047==r)throw new Error("implementation bug: handled elsewhere");var i=r-1023;if(0>i)return s.__absoluteGreater(n);var o=e.length,a=e.__digit(o-1),c=s.__clz30(a),u=30*o-c,l=i+1;if(u<l)return s.__absoluteLess(n);if(u>l)return s.__absoluteGreater(n);var d=1048576|1048575&s.__kBitConversionInts[1],p=s.__kBitConversionInts[0],f=29-c;if(f!==(0|(u-1)%30))throw new Error("implementation bug");var h,m=0;if(f<20){var g=20-f;m=g+32,h=d>>>g,d=d<<32-g|p>>>g,p<<=32-g}else if(20===f)m=32,h=d,d=p,p=0;else{var v=f-20;m=32-v,h=d<<v|p>>>32-v,d=p<<v,p=0}if((a>>>=0)>(h>>>=0))return s.__absoluteGreater(n);if(a<h)return s.__absoluteLess(n);for(var y=o-2;0<=y;y--){0<m?(m-=30,h=d>>>2,d=d<<30|p>>>2,p<<=30):h=0;var b=e.__unsignedDigit(y);if(b>h)return s.__absoluteGreater(n);if(b<h)return s.__absoluteLess(n)}if(0!==d||0!==p){if(0===m)throw new Error("implementation bug");return s.__absoluteLess(n)}return 0}},{key:"__equalToNumber",value:function(e,n){return s.__isOneDigitInt(n)?0===n?0===e.length:1===e.length&&e.sign===0>n&&e.__unsignedDigit(0)===t(n):0===s.__compareToDouble(e,n)}},{key:"__comparisonResultToBool",value:function(e,t){return 0===t?0>e:1===t?0>=e:2===t?0<e:3===t?0<=e:void 0}},{key:"__compare",value:function(e,t,n){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(n){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(s.__isBigInt(e)&&"string"==typeof t)return null!==(t=s.__fromString(t))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),n);if("string"==typeof e&&s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),n);if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)){if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToBigInt(e,t),n);if("number"!=typeof t)throw new Error("implementation bug");return s.__comparisonResultToBool(s.__compareToNumber(e,t),n)}if("number"!=typeof e)throw new Error("implementation bug");if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToNumber(t,e),2^n);if("number"!=typeof t)throw new Error("implementation bug");return 0===n?e<t:1===n?e<=t:2===n?e>t:3===n?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,n){if(e.length<t.length)return s.__absoluteAdd(t,e,n);if(0===e.length)return e;if(0===t.length)return e.sign===n?e:s.unaryMinus(e);var r=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&r++;for(var i,o=new s(r,n),a=0,c=0;c<t.length;c++)a=(i=e.__digit(c)+t.__digit(c)+a)>>>30,o.__setDigit(c,1073741823&i);for(;c<e.length;c++){var u=e.__digit(c)+a;a=u>>>30,o.__setDigit(c,1073741823&u)}return c<o.length&&o.__setDigit(c,a),o.__trim()}},{key:"__absoluteSub",value:function(e,t,n){if(0===e.length)return e;if(0===t.length)return e.sign===n?e:s.unaryMinus(e);for(var r,i=new s(e.length,n),o=0,a=0;a<t.length;a++)o=1&(r=e.__digit(a)-t.__digit(a)-o)>>>30,i.__setDigit(a,1073741823&r);for(;a<e.length;a++){var c=e.__digit(a)-o;o=1&c>>>30,i.__setDigit(a,1073741823&c)}return i.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length;null===n?n=new s(r,t):n.sign=t;for(var i,o=1,a=0;a<r;a++)o=(i=e.__digit(a)+o)>>>30,n.__setDigit(a,1073741823&i);return 0!==o&&n.__setDigitGrow(r,1),n}},{key:"__absoluteSubOne",value:function(e,t){for(var n,r=e.length,i=new s(t=t||r,!1),o=1,a=0;a<r;a++)o=1&(n=e.__digit(a)-o)>>>30,i.__setDigit(a,1073741823&n);if(0!==o)throw new Error("implementation bug");for(var c=r;c<t;c++)i.__setDigit(c,0);return i}},{key:"__absoluteAnd",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(r<i){o=r;var a=e,c=r;e=t,r=i,t=a,i=c}var u=o;null===n?n=new s(u,!1):u=n.length;for(var l=0;l<o;l++)n.__setDigit(l,e.__digit(l)&t.__digit(l));for(;l<u;l++)n.__setDigit(l,0);return n}},{key:"__absoluteAndNot",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;r<i&&(o=r);var a=r;null===n?n=new s(a,!1):a=n.length;for(var c=0;c<o;c++)n.__setDigit(c,e.__digit(c)&~t.__digit(c));for(;c<r;c++)n.__setDigit(c,e.__digit(c));for(;c<a;c++)n.__setDigit(c,0);return n}},{key:"__absoluteOr",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(r<i){o=r;var a=e,c=r;e=t,r=i,t=a,i=c}var u=r;null===n?n=new s(u,!1):u=n.length;for(var l=0;l<o;l++)n.__setDigit(l,e.__digit(l)|t.__digit(l));for(;l<r;l++)n.__setDigit(l,e.__digit(l));for(;l<u;l++)n.__setDigit(l,0);return n}},{key:"__absoluteXor",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(r<i){o=r;var a=e,c=r;e=t,r=i,t=a,i=c}var u=r;null===n?n=new s(u,!1):u=n.length;for(var l=0;l<o;l++)n.__setDigit(l,e.__digit(l)^t.__digit(l));for(;l<r;l++)n.__setDigit(l,e.__digit(l));for(;l<u;l++)n.__setDigit(l,0);return n}},{key:"__absoluteCompare",value:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var r=e.length-1;0<=r&&e.__digit(r)===t.__digit(r);)r--;return 0>r?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,n,r){if(0!==t){for(var i=32767&t,o=t>>>15,a=0,c=0,u=0;u<e.length;u++,r++){var l=n.__digit(r),d=e.__digit(u),p=32767&d,f=d>>>15,h=s.__imul(p,i),m=s.__imul(p,o),g=s.__imul(f,i);a=(l+=c+h+a)>>>30,l&=1073741823,a+=(l+=((32767&m)<<15)+((32767&g)<<15))>>>30,c=s.__imul(f,o)+(m>>>15)+(g>>>15),n.__setDigit(r,1073741823&l)}for(;0!==a||0!==c;r++){var v=n.__digit(r);v+=a+c,c=0,a=v>>>30,n.__setDigit(r,1073741823&v)}}}},{key:"__internalMultiplyAdd",value:function(e,t,n,r,i){for(var o=n,a=0,c=0;c<r;c++){var u=e.__digit(c),l=s.__imul(32767&u,t),d=s.__imul(u>>>15,t),p=l+((32767&d)<<15)+a+o;o=p>>>30,a=d>>>15,i.__setDigit(c,1073741823&p)}if(i.length>r)for(i.__setDigit(r++,o+a);r<i.length;)i.__setDigit(r++,0);else if(0!==o+a)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=new s(e.length,!1));for(var r=0,i=2*e.length-1;0<=i;i-=2){var o=(r<<15|e.__halfDigit(i))>>>0,a=0|o/t,c=0|(o=((r=0|o%t)<<15|e.__halfDigit(i-1))>>>0)/t;r=0|o%t,n.__setDigit(i>>>1,a<<15|c)}return n}},{key:"__absoluteModSmall",value:function(e,t){for(var n=0,r=2*e.length-1;0<=r;r--)n=0|((n<<15|e.__halfDigit(r))>>>0)%t;return n}},{key:"__absoluteDivLarge",value:function(e,t,n,r){var i=t.__halfDigitLength(),o=t.length,a=e.__halfDigitLength()-i,c=null;n&&(c=new s(a+2>>>1,!1)).__initializeDigits();var u=new s(i+2>>>1,!1);u.__initializeDigits();var l=s.__clz15(t.__halfDigit(i-1));0<l&&(t=s.__specialLeftShift(t,l,0));for(var d=s.__specialLeftShift(e,l,1),p=t.__halfDigit(i-1),f=0,h=a;0<=h;h--){var m=32767,g=d.__halfDigit(h+i);if(g!==p){var v=(g<<15|d.__halfDigit(h+i-1))>>>0;m=0|v/p;for(var y=0|v%p,b=t.__halfDigit(i-2),w=d.__halfDigit(h+i-2);s.__imul(m,b)>>>0>(y<<16|w)>>>0&&(m--,!(32767<(y+=p))););}s.__internalMultiplyAdd(t,m,0,o,u);var S=d.__inplaceSub(u,h,i+1);0!==S&&(S=d.__inplaceAdd(t,h,i),d.__setHalfDigit(h+i,32767&d.__halfDigit(h+i)+S),m--),n&&(1&h?f=m<<15:c.__setDigit(h>>>1,f|m))}if(r)return d.__inplaceRightShift(l),n?{quotient:c,remainder:d}:d;if(n)return c;throw new Error("unreachable")}},{key:"__clz15",value:function(e){return s.__clz30(e)-15}},{key:"__specialLeftShift",value:function(e,t,n){var r=e.length,i=new s(r+n,!1);if(0===t){for(var o=0;o<r;o++)i.__setDigit(o,e.__digit(o));return 0<n&&i.__setDigit(r,0),i}for(var a,c=0,u=0;u<r;u++)a=e.__digit(u),i.__setDigit(u,1073741823&a<<t|c),c=a>>>30-t;return 0<n&&i.__setDigit(r,c),i}},{key:"__leftShiftByAbsolute",value:function(e,t){var n=s.__toShiftAmount(t);if(0>n)throw new RangeError("BigInt too big");var r=0|n/30,i=n%30,o=e.length,a=0!==i&&0!=e.__digit(o-1)>>>30-i,c=o+r+(a?1:0),u=new s(c,e.sign);if(0===i){for(var l=0;l<r;l++)u.__setDigit(l,0);for(;l<c;l++)u.__setDigit(l,e.__digit(l-r))}else{for(var d=0,p=0;p<r;p++)u.__setDigit(p,0);for(var f,h=0;h<o;h++)f=e.__digit(h),u.__setDigit(h+r,1073741823&f<<i|d),d=f>>>30-i;if(a)u.__setDigit(o+r,d);else if(0!==d)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var n=e.length,r=e.sign,i=s.__toShiftAmount(t);if(0>i)return s.__rightShiftByMaximum(r);var o=0|i/30,a=i%30,c=n-o;if(0>=c)return s.__rightShiftByMaximum(r);var u=!1;if(r)if(0!=(e.__digit(o)&(1<<a)-1))u=!0;else for(var l=0;l<o;l++)if(0!==e.__digit(l)){u=!0;break}u&&0===a&&0==~e.__digit(n-1)&&c++;var d=new s(c,r);if(0===a){d.__setDigit(c-1,0);for(var p=o;p<n;p++)d.__setDigit(p-o,e.__digit(p))}else{for(var f,h=e.__digit(o)>>>a,m=n-o-1,g=0;g<m;g++)f=e.__digit(g+o+1),d.__setDigit(g,1073741823&f<<30-a|h),h=f>>>a;d.__setDigit(m,h)}return u&&(d=s.__absoluteAddOne(d,!0,d)),d.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?s.__oneDigit(1,!0):s.__zero()}},{key:"__toShiftAmount",value:function(e){if(1<e.length)return-1;var t=e.__unsignedDigit(0);return t>s.__kMaxLengthBits?-1:t}},{key:"__toPrimitive",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"default";if("object"!==n(e))return e;if(e.constructor===s)return e;if("undefined"!=typeof Symbol&&"symbol"===n(Symbol.toPrimitive)){var r=e[Symbol.toPrimitive];if(r){var i=r(t);if("object"!==n(i))return i;throw new TypeError("Cannot convert object to primitive value")}}var o=e.valueOf;if(o){var a=o.call(e);if("object"!==n(a))return a}var c=e.toString;if(c){var u=c.call(e);if("object"!==n(u))return u}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(e){return s.__isBigInt(e)?e:+e}},{key:"__isBigInt",value:function(e){return"object"===n(e)&&null!==e&&e.constructor===s}},{key:"__truncateToNBits",value:function(e,t){for(var n=0|(e+29)/30,r=new s(n,t.sign),i=n-1,o=0;o<i;o++)r.__setDigit(o,t.__digit(o));var a=t.__digit(i);if(0!=e%30){var c=32-e%30;a=a<<c>>>c}return r.__setDigit(i,a),r.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,n){for(var r,i=Math.min,o=0|(e+29)/30,a=new s(o,n),c=0,u=o-1,l=0,d=i(u,t.length);c<d;c++)l=1&(r=0-t.__digit(c)-l)>>>30,a.__setDigit(c,1073741823&r);for(;c<u;c++)a.__setDigit(c,1073741823&-l);var p,f=u<t.length?t.__digit(u):0,h=e%30;if(0===h)p=0-f-l,p&=1073741823;else{var m=32-h,g=1<<32-m;p=g-(f=f<<m>>>m)-l,p&=g-1}return a.__setDigit(u,p),a.__trim()}},{key:"__digitPow",value:function(e,t){for(var n=1;0<t;)1&t&&(n*=e),t>>>=1,e*=e;return n}},{key:"__isOneDigitInt",value:function(e){return(1073741823&e)===e}}]),s}(l(Array));return g.__kMaxLength=33554432,g.__kMaxLengthBits=g.__kMaxLength<<5,g.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],g.__kBitsPerCharTableShift=5,g.__kBitsPerCharTableMultiplier=1<<g.__kBitsPerCharTableShift,g.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],g.__kBitConversionBuffer=new ArrayBuffer(8),g.__kBitConversionDouble=new Float64Array(g.__kBitConversionBuffer),g.__kBitConversionInts=new Int32Array(g.__kBitConversionBuffer),g.__clz30=t?function(e){return t(e)-2}:function(e){var t=Math.LN2,n=Math.log;return 0===e?30:0|29-(0|n(e>>>0)/t)},g.__imul=e||function(e,t){return 0|e*t},g}()},function(e,t,n){var r;r=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="./src/rtc_reporting/rtcreporting.ts")}({"./node_modules/@marcom/useragent-detect/src/js/defaults.js":function(e,t,n){"use strict";e.exports={browser:{safari:!1,chrome:!1,firefox:!1,ie:!1,opera:!1,android:!1,edge:!1,edgeChromium:!1,version:{string:"",major:0,minor:0,patch:0,documentMode:!1}},os:{osx:!1,ios:!1,android:!1,windows:!1,linux:!1,fireos:!1,chromeos:!1,version:{string:"",major:0,minor:0,patch:0}}}},"./node_modules/@marcom/useragent-detect/src/js/dictionary.js":function(e,t,n){"use strict";e.exports={browser:[{name:"edge",userAgent:"Edge",version:["rv","Edge"],test:function(e){return e.ua.indexOf("Edge")>-1||"Mozilla/5.0 (Windows NT 10.0; Win64; x64)"===e.ua}},{name:"edgeChromium",userAgent:"Edge",version:["rv","Edg"],test:function(e){return e.ua.indexOf("Edg")>-1&&-1===e.ua.indexOf("Edge")}},{name:"chrome",userAgent:"Chrome"},{name:"firefox",test:function(e){return e.ua.indexOf("Firefox")>-1&&-1===e.ua.indexOf("Opera")},version:"Firefox"},{name:"android",userAgent:"Android"},{name:"safari",test:function(e){return e.ua.indexOf("Safari")>-1&&e.vendor.indexOf("Apple")>-1},version:"Version"},{name:"ie",test:function(e){return e.ua.indexOf("IE")>-1||e.ua.indexOf("Trident")>-1},version:["MSIE","rv"],parseDocumentMode:function(){var e=!1;return document.documentMode&&(e=parseInt(document.documentMode,10)),e}},{name:"opera",userAgent:"Opera",version:["Version","Opera"]}],os:[{name:"windows",test:function(e){return e.ua.indexOf("Windows")>-1},version:"Windows NT"},{name:"osx",userAgent:"Mac",test:function(e){return e.ua.indexOf("Macintosh")>-1}},{name:"ios",test:function(e){return e.ua.indexOf("iPhone")>-1||e.ua.indexOf("iPad")>-1},version:["iPhone OS","CPU OS"]},{name:"linux",userAgent:"Linux",test:function(e){return(e.ua.indexOf("Linux")>-1||e.platform.indexOf("Linux")>-1)&&-1===e.ua.indexOf("Android")}},{name:"fireos",test:function(e){return e.ua.indexOf("Firefox")>-1&&e.ua.indexOf("Mobile")>-1},version:"rv"},{name:"android",userAgent:"Android",test:function(e){return e.ua.indexOf("Android")>-1}},{name:"chromeos",userAgent:"CrOS"}]}},"./node_modules/@marcom/useragent-detect/src/js/parseUserAgent.js":function(e,t,n){"use strict";var r=n("./node_modules/@marcom/useragent-detect/src/js/defaults.js"),i=n("./node_modules/@marcom/useragent-detect/src/js/dictionary.js");function o(e,t){if("function"===typeof e.parseVersion)return e.parseVersion(t);var n,r=e.version||e.userAgent;"string"===typeof r&&(r=[r]);for(var i,o=r.length,a=0;a<o;a++)if((i=t.match((n=r[a],new RegExp(n+"[a-zA-Z\\s/:]+([0-9_.]+)","i"))))&&i.length>1)return i[1].replace(/_/g,".");return!1}function a(e,t,n){for(var r,i,a=e.length,s=0;s<a;s++)if("function"===typeof e[s].test?!0===e[s].test(n)&&(r=e[s].name):n.ua.indexOf(e[s].userAgent)>-1&&(r=e[s].name),r){if(t[r]=!0,"string"===typeof(i=o(e[s],n.ua))){var c=i.split(".");t.version.string=i,c&&c.length>0&&(t.version.major=parseInt(c[0]||0),t.version.minor=parseInt(c[1]||0),t.version.patch=parseInt(c[2]||0))}else"edge"===r&&(t.version.string="12.0.0",t.version.major="12",t.version.minor="0",t.version.patch="0");return"function"===typeof e[s].parseDocumentMode&&(t.version.documentMode=e[s].parseDocumentMode()),t}return t}e.exports=function(e){var t={};return t.browser=a(i.browser,r.browser,e),t.os=a(i.os,r.os,e),t}},"./node_modules/@marcom/useragent-detect/src/js/useragent-detect.js":function(e,t,n){"use strict";var r={ua:window.navigator.userAgent,platform:window.navigator.platform,vendor:window.navigator.vendor};e.exports=n("./node_modules/@marcom/useragent-detect/src/js/parseUserAgent.js")(r)},"./node_modules/webpack/buildin/harmony-module.js":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}},"./src/rtc_reporting/reporting_agent.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"RTCReportingAgent",(function(){return u}));var r=n("./src/rtc_reporting/reporting_reporter.ts"),i=n("./src/rtc_reporting/reporting_event.ts"),o=n("./src/rtc_reporting/reporting_storebag.ts"),a=n("./src/rtc_reporting/reporting_config.ts"),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._objectNotToDestroy=e,this._objectToDestroy=null}addInstantiatedObject(e){this._objectNotToDestroy=this._objectToDestroy=e}get instance(){return this._objectNotToDestroy}destroy(){this._objectToDestroy&&this._objectToDestroy.destroy(),this._objectNotToDestroy=this._objectNotToDestroy=null}}class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console.log.bind(console);this.logFunc=n,this.logFunc=Object(a.makeLogger)(n),this._sessionInfo={},this._reportingDisabled=!1,this.storebag=new c,this.reporter=null,this.reportingVersion="1",this.fuzzFactor=0,this.sessionStartTime=0,this._initializeReportingAgent(e),t&&this._issueSessionBeginEvent()}static withSamplingUUID(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var r;return s(this,void 0,void 0,(function*(){const i=u._samplingFactorForUUID(e),o=new u(t,!1,n),a=(null===(r=o.storebag.instance)||void 0===r?void 0:r.setupPromise)||Promise.reject("missing storebag!");return Promise.all([i,a]).then((e=>{let[t]=e;return o.reporter.sampleFactor=t,o.logFunc("Sampling factor now",o.reporter.sampleFactor),o._issueSessionBeginEvent(),o}))}))}destroy(){this.endSession()}get ReportingAllowed(){return!this._reportingDisabled}static get version(){return"1.1.0-alpha3"}issueReportingEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.RTCReportingAgentEventTypes.BatchEvent,r=arguments.length>3?arguments[3]:void 0,o=null;if(this.ReportingAllowed&&this.reporter){let s=new i.RTCReportingEvent(e,a.RTCReportingSessionEventStatus.EventStatusSessionBegin,t,this._FuzzFactor,n);o=this.reporter.issueReportingEvent(s,this._sessionInfo,r)}else o=new a.RTCReportingError("Reporting not allowed.");return o}endSession(){this.ReportingAllowed&&this.reporter&&(this._issueSessionEndEvent(),this.reporter.flushAllEvents()),this._sessionInfo=null,this.reporter=null,this.storebag.destroy(),this.storebag=null}get SessionInfo(){return this._sessionInfo}get SessionID(){return this._sessionInfo[a.RTCReportingEventMetadataKeys.SessionID]}get ClientName(){return this._sessionInfo[a.RTCReportingAgentConfigKeys.ClientName]}get ServiceName(){return this._sessionInfo[a.RTCReportingAgentConfigKeys.ServiceName]}get _FuzzFactor(){return this.fuzzFactor}_initializeReportingAgent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Date.now(),{applicationName:n,_clientName:i,sender:s,deviceName:l,osVersion:d,storebagURL:p,reportingDisabled:f,hlsEventEmitter:h,userInfoDict:m,SenderOSVersion:g,reportingStoreBag:v,UseHTTPHeaders:y}=e,b=e._sessionID||u._createSessionID();let w,S,C=e._serviceName;const _={clientName:i,applicationName:n,serviceName:C,sessionID:b};for(const r in _){const e=_[r];if(!e)return void this.logFunc(`Missing required parameter ${r} (${e})!`)}if(m&&(w=m.senderAltConfig,w&&(delete m.senderAltConfig,S=w.ServiceIdentifier,Object.keys(w).length&&Object.assign(m,w))),this._sessionInfo[a.RTCReportingAgentConfigKeys.ClientName]=i,this._sessionInfo[a.RTCReportingAgentConfigKeys.ServiceName]=C,this._sessionInfo[a.RTCReportingAgentConfigKeys.ApplicationName]=n,this._sessionInfo[a.RTCReportingAgentConfigKeys.DeviceName]=l,this._sessionInfo[a.RTCReportingEventMetadataKeys.OSVersion]=d,this._sessionInfo[a.RTCReportingEventMetadataKeys.Sender]=s,this._sessionInfo[a.RTCReportingEventMetadataKeys.RTCSchemeVersion]=this.reportingVersion,this._sessionInfo[a.RTCReportingEventMetadataKeys.RTCReportingVersion]=u.version,this._reportingDisabled=!!f,this._sessionInfo[a.RTCReportingEventMetadataKeys.SessionID]=b,this._sessionInfo[a.RTCReportingEventMetadataKeys.SenderOSVersion]=g,this._addUAToSessionInfo(),n&&C&&(C=C+"."+n),S&&C&&(C=C+"."+S),this._sessionInfo[a.RTCReportingAgentConfigKeys.ServiceName]=C,this.fuzzFactor=t-6e4*Math.floor(t/6e4),this.sessionStartTime=t-this.fuzzFactor,Object.keys(this._sessionInfo).forEach((e=>null==this._sessionInfo[e]&&delete this._sessionInfo[e])),m&&Object.keys(m)&&Object.assign(this._sessionInfo,m),!this._reportingDisabled){if(v)this.storebag=new c(v);else{if(!p)return void this.logFunc("Missing required parameter: storebagURL or reportingStoreBag!");this.storebag.addInstantiatedObject(new o.RTCReportingStoreBag(p,i,C,n,l,void 0,void 0,this.logFunc))}this.reporter=new r.RTCReporter(i,C,s,this.storebag.instance,this.reportingVersion,h,n,S,y,b,void 0,this.logFunc),this.logFunc(`Created reporting agent using rtc.js version ${u.version}`)}}static _findUA(e){for(const t in e)if(!0===e[t])return t;return"unknown"}_addUAToSessionInfo(){if("undefined"!==typeof window){const e=n("./node_modules/@marcom/useragent-detect/src/js/useragent-detect.js");this._sessionInfo._osName=u._findUA(e.os),this._sessionInfo._osVersion=`${e.os.version.major}.${e.os.version.minor}`,this._sessionInfo._browserName=u._findUA(e.browser),this._sessionInfo._browserVersion=`${e.browser.version.major}.${e.browser.version.minor}`}}_issueSessionBeginEvent(){let e=new i.RTCReportingEvent(a.RTCReportingAgentMethods.ReportingSessionMethod,a.RTCReportingSessionEventStatus.EventStatusSessionBegin,null,this._FuzzFactor,a.RTCReportingAgentEventTypes.BatchEvent);this.reporter&&e&&this.reporter.issueReportingEvent(e,this.SessionInfo)}_issueSessionEndEvent(){let e=new i.RTCReportingEvent(a.RTCReportingAgentMethods.ReportingSessionMethod,a.RTCReportingSessionEventStatus.EventStatusSessionEnd,null,this._FuzzFactor,a.RTCReportingAgentEventTypes.RealTimeEvent);this.reporter&&this.reporter.issueReportingEvent(e,this.SessionInfo)}static _samplingFactorForUUID(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>s(this,void 0,void 0,(function*(){var t;return(null===(t=null===crypto||void 0===crypto?void 0:crypto.subtle)||void 0===t?void 0:t.digest("SHA-256",(new TextEncoder).encode(e)))||Promise.reject("browser does not support crypto.subtle!")}));return s(this,void 0,void 0,(function*(){if("function"!==typeof BigInt)return Promise.reject("browser does not support BigInt!");const n=yield t(e),r=new DataView(n);let i=BigInt(0);for(let e=0;e<n.byteLength/8;e++){const t=BigInt(r.getUint32(8*e,!0)>>>0);i^=BigInt(r.getUint32(8*e+4,!0)>>>0)<<BigInt(32)|t}const o=i%BigInt(100),a=Number(o)/100;return Promise.resolve(a)}))}static _createSessionID(){let e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;const i=255;let o=[];for(let a=0;a<256;++a)o[a]=(a<16?"0":"")+a.toString(16);return o[e&i]+o[e>>8&i]+o[e>>16&i]+o[e>>24&i]+"-"+o[t&i]+o[t>>8&i]+"-"+o[t>>8&15|64]+o[t>>16&i]+"-"+o[63&n|128]+o[n>>8&i]+"-"+o[n>>8&i]+o[n>>16&i]+o[r&i]+o[r>>8&i]+o[r>>16&i]+o[r>>24&i]}}},"./src/rtc_reporting/reporting_config.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"makeLogger",(function(){return s})),n.d(t,"RTCReportingAgentDefaultConfig",(function(){return a})),n.d(t,"RTCReportingAgentConfigKeys",(function(){return c})),n.d(t,"RTCReportingAgentEventTypes",(function(){return u})),n.d(t,"RTCReportingHTTPHeaderKeys",(function(){return r})),n.d(t,"RTCReportingHTTPHeaderDefault",(function(){return i})),n.d(t,"RTCReportingEventMetadataKeys",(function(){return o})),n.d(t,"RTCReportingStoreBagConfig",(function(){return d})),n.d(t,"RTCReportingReporterConfig",(function(){return p})),n.d(t,"RTCReportingAgentMethods",(function(){return l})),n.d(t,"RTCReportingSessionEventStatus",(function(){return f})),n.d(t,"RTCReportingStoreBagKeys",(function(){return h})),n.d(t,"RTCReportingError",(function(){return g})),n.d(t,"RTCReportingBuildTypes",(function(){return m})),n.d(t,"RTC_REPORTING_EVENTS_DISPATCHED",(function(){return v}));const r={ContentType:"ContentType",InternalBuild:"X-RTC-Internal-Build",ClientName:"X-RTC-Client-Name",ServiceName:"X-RTC-Service-Name",ClientVersion:"X-RTC-Client-Version",Sender:"X-RTC-Sender",UserAgent:"User-Agent",SessionID:"X-RTC-Session-ID"},i={ContentTypekey:"application/json;charset=UTF-8"},o={EventID:"_method",EventType:"_eventType",EventNumber:"_eventNumber",EventTime:"eventTime",Sender:"_sender",Status:"_status",ClientTS:"_clientTS",TimeZoneOffset:"_timezoneOffset",PostTime:"postTime",Events:"events",SessionID:"_sessionID",OSVersion:"osVersion",RTCReportingVersion:"_reportVers",StoreBagVersion:"StorebagVersion",RTCSchemeVersion:"_reportScheme",BagSchemeVersion:"StorebagScheme",StoreBagName:"StorebagName",SessionTag:"SessionTag",SenderOSVersion:"SenderOSVersion"},a={RunInlineIfNoWebWorker:!0,BatchEvent:!0,LogMsgPrefix:"[RTC_RA]:"},s=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e(a.LogMsgPrefix,...n)},c={ClientName:"_clientName",ServiceName:"_serviceName",StorebagURL:"storebagURL",ApplicationName:"applicationName",Sender:"sender",DeviceName:"deviceName",Model:"model",FirmwareVersion:"firmwareVersion",OSVersion:"osVersion",ReportingDisabled:"reportingDisabled",HLSEventEmitter:"hlsEventEmitter",BuildType:"internal",UserInfoDict:"userInfoDict",ReportingStoreBag:"reportingStoreBag",SenderAltConfig:"senderAltConfig",ServiceIdentifier:"ServiceIdentifier",UseHTTPHeaders:"UseHTTPHeaders"};var u;!function(e){e[e.BatchEvent=0]="BatchEvent",e[e.RealTimeEvent=1]="RealTimeEvent"}(u||(u={}));const l={ReportingSessionMethod:0},d={StoreBagFetchSyncMode:0,StoreBagFetchAsyncMode:1,StoreBagVersionSupported:1},p={BatchThreshold:50},f={EventStatusSessionBegin:0,EventStatusSessionEnd:1,EventStatusSessionEndWithError:2},h={Version:"Version",Scheme:"Scheme",BagVersion:"BagVersion",Configurations:"Configurations",ConfigurationList:"ConfigurationList",PostURLs:"PostURLs",Filters:"Filters",BagList:"BagList",MinOSVersionDict:"MinOSVersionDict",ClientName:"ClientName",ServiceName:"ServiceName",ServiceNameList:"ServiceNameList",SenderServiceIDList:"SenderServiceIDList",ApplicationNameList:"ApplicationNameList",DeviceList:"DeviceList",Remove:"Remove",EventThreshold:"EventThreshold",SamplingThreshold:"SamplingThreshold",DeviceWhiteList:"DeviceWhiteList",FlushEventsInterval:"FlushEventsInterval"};var m;!function(e){e[e.BuildTypePublic=0]="BuildTypePublic",e[e.BuildTypeInternal=1]="BuildTypeInternal",e[e.BuildTypeSeed=2]="BuildTypeSeed",e[e.BuildTypeInternalSeed=3]="BuildTypeInternalSeed"}(m||(m={}));class g extends Error{constructor(){super(...arguments),Error.captureStackTrace&&"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,g)}}const v="rtcReportingEventsDispatched"},"./src/rtc_reporting/reporting_event.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"RTCReportingEvent",(function(){return i}));var r=n("./src/rtc_reporting/reporting_config.ts");class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:r.RTCReportingAgentEventTypes.BatchEvent;this.eventID=e,this.eventType=o,this.payload=n||{},this.payload[r.RTCReportingEventMetadataKeys.EventID]=e,this.payload[r.RTCReportingEventMetadataKeys.Status]=t,this.payload[r.RTCReportingEventMetadataKeys.EventType]=o,this.fuzzFactor=i,this.isEventRealTime=o===r.RTCReportingAgentEventTypes.RealTimeEvent,this._addEventMetadata()}prepareEventPayload(e,t,n){Object.keys(e).forEach((t=>{this.payload[t]=e[t]})),this.isEventRealTime&&n&&t&&(this.payload.sizeOfLastBatch=n,this.payload.sizeTillLastBatch=t)}get EventPayload(){return this.payload}get IsEventRealTime(){return this.isEventRealTime}_addEventMetadata(){let e=new Date;this.payload[r.RTCReportingEventMetadataKeys.EventTime]=e.getTime()/1e3,this.payload[r.RTCReportingEventMetadataKeys.TimeZoneOffset]=60*e.getTimezoneOffset()}}},"./src/rtc_reporting/reporting_reporter.ts":function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"RTCReporter",(function(){return s})),n.d(t,"ReportingContentType",(function(){return i})),n.d(t,"ReportingVersion",(function(){return o}));var r=n("./src/rtc_reporting/reporting_config.ts");const i="application/json;charset=UTF-8",o="RTCReportingJS/0.314";class a{constructor(t,n,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.logFunc=i,this.logFunc=Object(r.makeLogger)(i),this._eventWriter=null,this._sessionID=n,this._eventDispatcher=t,a&&this.logFunc("uniqueString"),"undefined"!==typeof navigator&&navigator&&"undefined"!==typeof navigator.sendBeacon&&navigator.sendBeacon||a||this.module===e?this._eventWriter=this._sendEventDataWithHTTPPost:this._eventWriter=this._sendEventDataWithHTTPHeaders,o&&(this._eventWriter=this._sendEventDataWithHTTPHeaders)}sendEventData(e,t,n,i,o,a){this._eventWriter&&(this._eventWriter(e,t,n,i,o,a),this._eventDispatcher&&this._eventDispatcher.emit(r.RTC_REPORTING_EVENTS_DISPATCHED,t))}_sendEventDataUsingBeacon(e,t,n,r,i,o){let a=this._createEventPayloadAsJSON(n,r,i,o),s=new FormData;s.append("headers",a),s.append("payload",t),navigator.sendBeacon(e,s)}_sendEventDataWithHTTPPost(e,t,n,r,i,o){let a=this._createEventPayloadAsJSON(n,r,i,o),s=new FormData;s.append("headers",a),s.append("payload",t);let c=new XMLHttpRequest;c.open("POST",e,!0),c.send(s)}_createEventPayloadAsJSON(e,t,n,i){let o={};return o[r.RTCReportingHTTPHeaderKeys.InternalBuild]=0,o[r.RTCReportingHTTPHeaderKeys.ClientName]=e,o[r.RTCReportingHTTPHeaderKeys.ServiceName]=t,o[r.RTCReportingHTTPHeaderKeys.ClientVersion]=n,o[r.RTCReportingHTTPHeaderKeys.Sender]=i,o[r.RTCReportingHTTPHeaderKeys.ContentType]="application/json;charset=UTF-8",JSON.stringify(o)}_sendEventDataWithHTTPHeaders(e,t,n,a,s,c){let u=new XMLHttpRequest;u.onload=function(){},u.open("POST",e,!0),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.ContentType,i),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.InternalBuild,"0"),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.ClientName,n),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.ServiceName,a),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.ClientVersion,s),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.Sender,String(c)),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.ClientVersion,o),u.setRequestHeader(r.RTCReportingHTTPHeaderKeys.SessionID,this._sessionID),u.send(t)}}class s{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]&&arguments[8],l=arguments.length>9?arguments[9]:void 0,d=arguments.length>10&&void 0!==arguments[10]&&arguments[10],p=arguments.length>11&&void 0!==arguments[11]?arguments[11]:console.log.bind(console);this.clientName=e,this.serviceName=t,this.sender=n,this.reportingStoreBag=r,this.clientVersion=i,this.hlsEventEmitter=o,this.applicationName=s,this.senderServiceID=c,this.logFunc=p,this.eventList=[],this._storebagStats={},this.storeBag=null,this._count=0,this._eventDispatcher=new a(o,l,p,u,d),this.sampleFactor=Math.random(),this._sizeTillLastBatch=this._sizeOfLastBatch=0,this.checkAndConfigureEventFlushTimeoutOnce=!1}issueReportingEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e?(this._updateEventMetadata(e),e.prepareEventPayload(t,this._sizeTillLastBatch,this._sizeOfLastBatch),"function"===typeof n&&n(e.payload,e.eventID,e.eventType),this.eventList.push(e),this.checkAndConfigureEventFlushTimeoutOnce||this.canReportEvents()&&this._configureEventFlushTimer(),this.eventList.length>r.RTCReportingReporterConfig.BatchThreshold||e.IsEventRealTime?this.flushAllEvents():null):new r.RTCReportingError("not a valid event to report")}canReportEvents(){var e,t,n;let i;return void 0!==this._canReport?this._canReport:!(this.reportingStoreBag&&!this.storeBag&&(this.storeBag=this.reportingStoreBag.createParsedStoreBag(this.applicationName,this.senderServiceID),!this.storeBag))&&(this.storeBag&&this.storeBag.IsValid?(this._canReport=!0,i=this.storeBag.getStoreBagProperty(r.RTCReportingStoreBagKeys.SamplingThreshold),i&&parseFloat(i)<this.sampleFactor&&(this._canReport=!1)):this.storeBag&&this.logFunc(`StoreBag for client ${this.clientName}, service ${this.serviceName}, app ${this.applicationName} senderService ${this.senderServiceID} not valid ${this.storeBag.IsValid} `),this._canReport&&(this._storebagStats[r.RTCReportingStoreBagKeys.SamplingThreshold]=i,this._storebagStats[r.RTCReportingEventMetadataKeys.BagSchemeVersion]=null===(e=this.storeBag)||void 0===e?void 0:e.StoreBagSchemeVersion,this._storebagStats[r.RTCReportingEventMetadataKeys.StoreBagVersion]=null===(t=this.storeBag)||void 0===t?void 0:t.StoreBagVersion,this._storebagStats[r.RTCReportingEventMetadataKeys.StoreBagName]=null===(n=this.storeBag)||void 0===n?void 0:n.StoreBagName),this.logFunc(`Event reporting is ${this._canReport} for client ${this.clientName} service ${this.serviceName}, app ${this.applicationName}, senderService ${this.senderServiceID}`),!!this._canReport)}flushEventTimeout(){this.flushAllEvents()}flushAllEvents(){let e=null;return this.canReportEvents()?this._sendAllEvents():e=new r.RTCReportingError("no valid storebag configured or blocked by sampling threshold, ignoring events."),this.eventList=[],e}batchedEventsCount(){return this.eventList.length}get _EventList(){return this.eventList}_updateEventMetadata(e){e.EventPayload[r.RTCReportingEventMetadataKeys.EventNumber]=this._eventCounter(),e.EventPayload[r.RTCReportingEventMetadataKeys.ClientTS]=Date.now()/1e3,e.EventPayload[r.RTCReportingEventMetadataKeys.Sender]=this.sender,e.EventPayload[r.RTCReportingAgentConfigKeys.ClientName]=this.clientName,e.EventPayload[r.RTCReportingAgentConfigKeys.ServiceName]=this.serviceName}_sendAllEvents(){var e,t;const n=this.batchedEventsCount();if(0===n)return;let r=null===(e=this.storeBag)||void 0===e?void 0:e.listOfSupportedBackEnds();if(!r||r.length<=0)return;let i=null===(t=this.storeBag)||void 0===t?void 0:t.listOfKeysToBlock();i&&this.eventList.forEach((e=>{e.prepareEventPayload(this._storebagStats,this._sizeTillLastBatch,this._sizeOfLastBatch),i.forEach((function(t){delete e.EventPayload[t]}))}));let o=this._marshallAsJSONString();this._sizeTillLastBatch+=o.length,this._sizeOfLastBatch=o.length,r.forEach((e=>{this._eventDispatcher.sendEventData(e,o,this.clientName,this.serviceName,this.clientVersion,this.sender)})),this.logFunc("events reported:",n)}_marshallAsJSONString(){const e=Date.now()/1e3,t=this.eventList.map((e=>e.EventPayload));return JSON.stringify({[r.RTCReportingEventMetadataKeys.PostTime]:e,[r.RTCReportingEventMetadataKeys.Events]:t})}_eventCounter(){return this._count++}_configureEventFlushTimer(){let e=null;this.checkAndConfigureEventFlushTimeoutOnce=!0,this.storeBag&&this.storeBag.IsValid?e=this.storeBag.getStoreBagProperty(r.RTCReportingStoreBagKeys.FlushEventsInterval):this.logFunc((this.storeBag?"Invalid":"Missing")+" storebag!!!"),e?(e=1e3*parseInt(e,10),e>=1e4?(setInterval(this.flushEventTimeout.bind(this),e),this.logFunc(`set interval for flush timeout: every ${e}ms`)):this.logFunc(`this store bag's flushTimeout is too small (${e/1e3} < 10s!)`)):this.logFunc("this store bag forgot to set a flushTimeout!")}}}.call(this,n("./node_modules/webpack/buildin/harmony-module.js")(e))},"./src/rtc_reporting/reporting_storebag.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"RTCReportingStoreBag",(function(){return o})),n.d(t,"RTCReportingParsedStoreBag",(function(){return i}));var r=n("./src/rtc_reporting/reporting_config.ts");class i{constructor(e,t,n,r){this.storeBagConfig=e,this.selectedBagName=t,this.bagVersion=n,this.setupPromise=r}listOfSupportedBackEnds(){return this.getStoreBagProperty(r.RTCReportingStoreBagKeys.PostURLs)}listOfKeysToBlock(){if(!this.storeBagConfig)return null;let e=this.storeBagConfig[r.RTCReportingStoreBagKeys.Filters];return e?e[r.RTCReportingStoreBagKeys.Remove]:null}get IsValid(){return Boolean(this.storeBagConfig)}get StoreBagName(){return this.IsValid?this.selectedBagName:null}get StoreBagVersion(){return this.IsValid?this.bagVersion:null}get StoreBagSchemeVersion(){return r.RTCReportingStoreBagConfig.StoreBagVersionSupported}getStoreBagProperty(e){let t=null;return this.IsValid&&e&&e in this.storeBagConfig&&(t=this.storeBagConfig[e]),t}}class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r.RTCReportingStoreBagConfig.StoreBagFetchAsyncMode,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:console.log.bind(console);this.storebagURL=e,this.clientName=t,this.serviceName=n,this.applicationName=i,this.deviceName=o,this.mode=a,this.storebagAsJSON=s,this.logFunc=c,this.logFunc=Object(r.makeLogger)(c),this.storeBagConfig=null,this.storebagLoader=null,this.selectedBagName=null,this.bagVersion=null,this.setupPromise=this.fetchAndParseStoreBag()}destroy(){this.storebagLoader&&(this.storebagLoader.abort(),this.storebagLoader=null)}fetchAndParseStoreBag(){return this.storebagAsJSON?Promise.resolve():this.storebagURL?this._requestStoreBagAsync():Promise.reject()}createParsedStoreBag(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.applicationName,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.storebagAsJSON?this._parseAndReturnStoreBag(this.storebagAsJSON,e,t):(this.logFunc("no bag available!"),null)}_parseAndReturnStoreBag(e,t,n){let o=null,a=null,s=null,c=null;return e.forEach((e=>{if(o=null,e[r.RTCReportingStoreBagKeys.Scheme]===r.RTCReportingStoreBagConfig.StoreBagVersionSupported){let i=e[r.RTCReportingStoreBagKeys.BagList];Object.keys(i).some((a=>{let u=i[a];return!!this._canUseBagConfig(u,t,n)&&(o=u,s=a,c=e[r.RTCReportingStoreBagKeys.BagVersion],!1)}))}o&&(a=this._fillSelectedBagConfig(o,e))})),a||this.logFunc("Failed to select a storebag."),new i(a,s,c,this.setupPromise)}_requestStoreBagAsync(){return new Promise(((e,t)=>{const n=this.storebagLoader=new XMLHttpRequest;n.onabort=t,n.onreadystatechange=()=>{const t=n&&4===n.readyState&&200===n.status&&n.responseText;t&&(this.storebagAsJSON=JSON.parse(t),e(this))},n.open("GET",this.storebagURL,!0),n.send(null)}))}_canUseBagConfig(e,t,n){let i=e[r.RTCReportingStoreBagKeys.ClientName];if(i&&i!==this.clientName)return!1;let o=e[r.RTCReportingStoreBagKeys.ServiceNameList],a=e[r.RTCReportingStoreBagKeys.ServiceName];if(o&&o.length>0&&-1===o.indexOf(this.serviceName))return!1;if(!o&&a&&a!==this.serviceName)return!1;let s=e[r.RTCReportingStoreBagKeys.ApplicationNameList];if(s&&s.length>0&&-1===s.indexOf(t))return!1;let c=e[r.RTCReportingStoreBagKeys.DeviceList];if(c&&c.length>0&&-1===c.indexOf(this.deviceName))return!1;let u=e[r.RTCReportingStoreBagKeys.SenderServiceIDList];return!(u&&u.length>0&&-1===u.indexOf(n))}_fillSelectedBagConfig(e,t){let n=null,i=t[r.RTCReportingStoreBagKeys.ConfigurationList];return(e[r.RTCReportingStoreBagKeys.Configurations]||[]).forEach((function(e){let t=i[e];n=n||{},Object.assign(n,t)})),n}}},"./src/rtc_reporting/rtcreporting.ts":function(e,t,n){"use strict";n.r(t);var r=n("./src/rtc_reporting/reporting_config.ts");n.d(t,"RTCReportingAgentDefaultConfig",(function(){return r.RTCReportingAgentDefaultConfig})),n.d(t,"RTCReportingAgentConfigKeys",(function(){return r.RTCReportingAgentConfigKeys})),n.d(t,"RTCReportingAgentEventTypes",(function(){return r.RTCReportingAgentEventTypes})),n.d(t,"RTCReportingHTTPHeaderDefault",(function(){return r.RTCReportingHTTPHeaderDefault})),n.d(t,"RTCReportingHTTPHeaderKeys",(function(){return r.RTCReportingHTTPHeaderKeys})),n.d(t,"RTCReportingEventMetadataKeys",(function(){return r.RTCReportingEventMetadataKeys})),n.d(t,"RTC_REPORTING_EVENTS_DISPATCHED",(function(){return r.RTC_REPORTING_EVENTS_DISPATCHED})),n.d(t,"RTCReportingStoreBagConfig",(function(){return r.RTCReportingStoreBagConfig}));var i=n("./src/rtc_reporting/reporting_storebag.ts");n.d(t,"RTCStorebag",(function(){return i}));var o=n("./src/rtc_reporting/reporting_agent.ts");n.d(t,"RTCReportingAgent",(function(){return o.RTCReportingAgent})),t.default={RTCReportingAgent:o.RTCReportingAgent,RTCStorebag:i,RTCReportingAgentDefaultConfig:r.RTCReportingAgentDefaultConfig,RTCReportingAgentConfigKeys:r.RTCReportingAgentConfigKeys,RTCReportingAgentEventTypes:r.RTCReportingAgentEventTypes,RTCReportingHTTPHeaderDefault:r.RTCReportingHTTPHeaderDefault,RTCReportingHTTPHeaderKeys:r.RTCReportingHTTPHeaderKeys,RTCReportingEventMetadataKeys:r.RTCReportingEventMetadataKeys,RTC_REPORTING_EVENTS_DISPATCHED:r.RTC_REPORTING_EVENTS_DISPATCHED,RTCReportingStoreBagConfig:r.RTCReportingStoreBagConfig}}}).default},e.exports=r()},function(e,t,n){"use strict";function r(e,t,n){const r=i(e),o=r?e:Object.assign(e,{endReason:t});n||(n={endReasonClass:r?"Unknown":"OK"});for(const i in n){const e=i;o[e]||(o[e]=n[e])}return o}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n(1016),n(1032),n(1033);const i=e=>e&&e instanceof Error&&"endReason"in e,o=e=>{const t={};for(const n in e)("providerEndReason"===n||n.startsWith("endReason"))&&(t[n]=e[n]);return t}},function(e,t,n){"use strict";var r,i;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),function(e){e[e.NoReason=0]="NoReason",e[e.Declined=2]="Declined",e[e.RelayFailedConferenceFailed=8]="RelayFailedConferenceFailed",e[e.CallFailed=14]="CallFailed",e[e.Kicked=26]="Kicked",e[e.DecryptionTimeout=1e3]="DecryptionTimeout",e[e.IDSQueryRatelimited=1001]="IDSQueryRatelimited",e[e.UnknownFailure=1002]="UnknownFailure",e[e.BadLink=1003]="BadLink",e[e.QRSessionAllocateResponseFailed=1004]="QRSessionAllocateResponseFailed",e[e.QRSessionAllocateResponseTimeout=1005]="QRSessionAllocateResponseTimeout",e[e.IDSPushConnectTimeout=1006]="IDSPushConnectTimeout",e[e.IDSInitialRegisterCallTimeout=1007]="IDSInitialRegisterCallTimeout",e[e.PushConnectionCloseFailed=1008]="PushConnectionCloseFailed",e[e.LetMeInFailedForUnknownReasons=1009]="LetMeInFailedForUnknownReasons",e[e.LetMeInResponseTimeout=1010]="LetMeInResponseTimeout",e[e.GotResponseFromAbandonedJoinAttempt=1011]="GotResponseFromAbandonedJoinAttempt",e[e.BadPushConnectTokenBase64=1017]="BadPushConnectTokenBase64",e[e.NoPushConnectToken=1018]="NoPushConnectToken",e[e.IDSInitialQueryTimeout=1019]="IDSInitialQueryTimeout",e[e.RegistrationReturnedAlreadyUsedURI=1020]="RegistrationReturnedAlreadyUsedURI",e[e.PushConnectionImmediatelyClosed=1021]="PushConnectionImmediatelyClosed",e[e.EmptyIDSInitialRegisterResponse=1022]="EmptyIDSInitialRegisterResponse",e[e.EmptyIDSInitialQueryResponse=1023]="EmptyIDSInitialQueryResponse"}(r||(r={})),function(e){e[e.MissingPseudonym=1]="MissingPseudonym",e[e.MissingPubkey=2]="MissingPubkey",e[e.MalformedPubkeyBase64=3]="MalformedPubkeyBase64",e[e.WrongPubKeyLength=4]="WrongPubKeyLength",e[e.TheirPubKeyIsBad=5]="TheirPubKeyIsBad",e[e.OurPubKeyIsBad=6]="OurPubKeyIsBad",e[e.MalformedNicknameBase64=7]="MalformedNicknameBase64",e[e.CouldNotReadLink=8]="CouldNotReadLink"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return u}));var r=n(1011),i=n(2217);n(1031),n(1032);class o extends Error{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.b`${e} (${Object(i.c)(t).notPII().forCertain()}ms)`;super(n.toString()),this.title=e,this.duration=t,this.logString=n,this.isLoggable=!0}}function a(e){return new Promise((t=>e?setTimeout(t,e):t()))}async function s(e,t){return await a(e),new o(t,e)}let c=null;function u(e,t,n){return Promise.race([e,s(null!==c?c:t,n)])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(1013),i=n(2217);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;const n=Object(r.b)(e);return{group:n,helper:e=>void 0===e||null===e?Object(i.c)(null).notPII().forCertain():Object(i.c)(t(e)).userID(n)}}const{group:a,helper:s}=o("error"),{group:c,helper:u}=o("conversationTimeRef"),{group:l,helper:d}=o("terminalError"),{group:p,helper:f}=o("uiElement"),{group:h,helper:m}=o("uiState"),{group:g,helper:v}=o("uiVerb")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1016),i=n(1011);function o(e,t){const n=e instanceof Error?e:new r.a(i.b`${e}`);if(!n.stack)try{throw new Error}catch(e){n.stack=e.stack}return n}},function(e,t,n){"use strict";function r(e){const t=function(n){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e(n):n.get(t)};return t.useInstance=e=>new i(t,e),t.use=e=>({type:t,componentFor:e}),t}n.d(t,"a",(function(){return r}));class i{constructor(e,t){this.type=e,this.component=t}componentFor(){return this.component}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.components=new Map;for(const t of e)this.components.set(t.type,t.componentFor(this))}has(e){return this.components.has(e)}get(e){const t=this.components.get(e);if(t)return t;const n=e(this,!0);return this.components.set(e,n),n}set(e){this.components.set(e.type,e.componentFor(this))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1036),i=n(2228);const o=Object(r.a)((()=>Object(i.a)()))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1036),i=n(1038),o=n(2227);let a;const s=Object(r.a)((e=>null!==a&&void 0!==a?a:a=Object(o.a)(e.get(i.a))))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1016),i=n(1011),o=n(1036);const a=Object(o.a)((()=>{throw new r.a(i.b`feedbackComponent can only be made by useInstance`)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(1036),i=n(1016),o=n(1011),a=n(1042);const s=Object(r.a)((()=>{throw new i.a(o.b`Registered IDS environments cannot be auto-instantiated. An existing instance must be passed to the provider.`)})),c=Object(r.a)((()=>a.b.prod))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return w}));var r=n(2148),i=n(1043),o=n(1035),a=n(1033),s=n(2228),c=n(1016),u=n(1011),l=n(2217),d=n(1027),p=n(1046),f=n(1029),h=n.n(f),m=n(1009);const g=new TextDecoder;function v(e){const t=function(e){return"prod"===e?"":`-${e}`}(e);return{registerURL:`https://identity${t}.ess.apple.com/WebObjects/TDIdentityService.woa/wa/webregister`,queryURL:`https://query${t}.ess.apple.com/WebObjects/QueryService.woa/wa/webquery`}}class y{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis.fetch;this.urls=e,this.logger=t,this.bplist=new r.a(this.logger),this.fetch=n}async request(e,t,n){let{method:r,body:i,headers:o={},credentials:a=!1}=n;const s={...o,"x-protocol-version":"1",Authorization:"Basic aGVsbG86d29ybGQ=","Content-Type":"application/x-bplist","x-push-token":Object(d.c)(e),accept:"application/x-bplist"};return this.fetch.call(globalThis,t,{method:r,body:this.bplist.write(i),credentials:a?"include":"omit",headers:s})}async parseResponse(e){const t=await e.arrayBuffer(),n=new i.a(t);return Object(r.b)(n)?this.bplist.parse(t):JSON.parse(g.decode(t))}async register(e,t){try{const r=await this.request(e,this.urls.registerURL,{method:"POST",body:t}),i=await this.parseResponse(r);if(i instanceof Error)throw i;return h.a.EQ(i.status,p.b.SUCCESS)?i:new c.a(u.b`IDS register failed with status ${Object(l.c)(i.status).notPII().forCertain()}: ${null!==(n=Object(l.c)(p.b[S(i.status)]).constant())&&void 0!==n?n:u.b`unknown`}`);var n}catch(r){return Object(o.a)(r)}}async query(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.logger;try{const o=await this.request(e,this.urls.queryURL,{method:"POST",body:t}),s=await this.parseResponse(o);if(s instanceof Error)throw s;const{status:d,"retry-interval":f=30}=s;return h.a.EQ(d,p.b.SUCCESS)?s:h.a.EQ(s.status,p.b.RETRY_OVER_LIMIT)?n>0&&f<60?(await Object(a.c)(1e3*f),this.query(e,t,n-1,r)):new p.a:new c.a(u.b`IDS query failed with status ${Object(l.c)(s.status.toString()).notPII().forCertain()}: ${null!==(i=Object(l.c)(p.b[S(s.status)]).constant())&&void 0!==i?i:u.b`unknown`}`);var i}catch(s){return Object(o.a)(s)}}}class b extends y{}const w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(s.a)();return{prod:new b(v(m.a.prod),t,e),gateway:new b({registerURL:"https://gatewayws.icloud.com/identity/WebObjects/TDIdentityService.woa/wa/webregister",queryURL:"https://gatewayws.icloud.com/query/WebObjects/QueryService.woa/wa/webquery"},t,e),carry:new b(v(m.a.carry),t,e),tc:new b(v(m.a.tc),t,e),qa1:new b(v(m.a.qa1),t,e),qa2:new b(v(m.a.qa2),t,e)}}(globalThis.fetch);function S(e){return e instanceof h.a?h.a.toNumber(e):e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(1016),i=n(1011),o=n(1045),a=n(1044);const s=new TextEncoder,c=new TextDecoder("utf-8"),u=new TextDecoder("utf-16be"),l=new DataView(new ArrayBuffer(32)),d=new Uint8Array(l.buffer,l.byteOffset,32),p=new DataView(new ArrayBuffer(64)),f=new Uint8Array(p.buffer,p.byteOffset,64);class h{get buffer(){return this._buffer}constructor(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.positionStack=[],this.byteOffset=0,this.size=0,ArrayBuffer.isView(t))e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(Object(a.a)(t))e=new Uint8Array(t);else if(Array.isArray(t))e=new Uint8Array(t);else{if("number"!==typeof t)throw new r.a(i.b`Unexpected arguments to new ByteStream(): sizeOrBuffer should be ArrayBuffer, ArrayView, number array, or number (size)`);e=new Uint8Array(t)}this.size=e.length,this._buffer=e}get bytes(){return this.buffer.slice(0,this.size)}push(){this.positionStack.push(this.byteOffset)}pop(){const e=this.positionStack.pop();if(void 0===e)throw new r.a(i.b`unbalanced ByteStream#push/pop`);this.byteOffset=e}ensureSpaceFor(e){for(;this.byteOffset+e>this.buffer.byteLength;){const e=new Uint8Array(2*Math.max(this.buffer.length,32));e.set(this.buffer),this._buffer=e}}writeByte(e){this.ensureSpaceFor(1),this.buffer[this.size]=e,this.byteOffset++,this.size=Math.max(this.byteOffset,this.size)}writeBytes(e){this.ensureSpaceFor(e.length);for(let t=0;t<e.length;t++)this.buffer[this.byteOffset++]=e[t];this.size=Math.max(this.byteOffset,this.size)}writeUInt(e,t){const n=e/8;if(n!==Math.round(n))return new r.a(i.b`Invalid bit count: ${e}`);this.ensureSpaceFor(n);let o=t;for(let r=this.byteOffset+n-1;r>=this.byteOffset;r--)this.buffer[r]=255&o,o>>>=8;this.byteOffset+=n,this.size=Math.max(this.byteOffset,this.size)}readUInt(e){const t=e/8;if(t!==Math.round(t))return new r.a(i.b`Invalid bit count: ${e}`);let n=0;for(let r=this.byteOffset;r<this.byteOffset+t;r++)n*=256,n+=this.buffer[r];return this.byteOffset+=t,n}readBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint8Array(e);if(this.size<this.byteOffset+e)return new r.a(i.b`cannot read bytes: not enough bytes in stream`);for(let n=0;n<e;n++)t[n]=this.buffer[this.byteOffset+n];return this.byteOffset+=e,t}readASCII(e){const t=this.readBytes(e);return t instanceof Error?t:c.decode(t)}readUTF8(e){const t=this.readBytes(e);return t instanceof Error?t:c.decode(t)}readUTF16BE(e){const t=this.readBytes(e);return t instanceof Error?t:u.decode(t)}peek(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;const t=this.byteOffset,n=this.readUInt(e);return this.byteOffset=t,n}writeASCII(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n>=256)return new r.a(i.b`String is not ascii`);this.writeByte(n)}}writeUTF8(e){const t=s.encode(e);this.writeBytes(t)}writeUTF16(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);this.writeUInt(16,n)}}readFloat64(){const e=this.readBytes(8,f);return e instanceof Error?e:p.getFloat64(0,!1)}readBigInt64(){const e=this.readBytes(8,f);return e instanceof Error?e:Object(o.a)(f,!1,0)}readBigUint64(){const e=this.readBytes(8,f);return e instanceof Error?e:Object(o.a)(f,!0,0)}readFloat32(){const e=this.readBytes(4,d);return e instanceof Error?e:l.getFloat32(0,!1)}writeFloat64(e){p.setFloat64(0,e,!1),this.writeBytes(f.slice(0,8))}writeBigInt64(e){const t=Object(o.b)(e);this.writeBytes(t)}writeBigUint64(e){const t=Object(o.b)(e);this.writeBytes(t)}writeFloat32(e){l.setFloat32(0,e,!1),this.writeBytes(d.slice(0,4))}}},function(e,t,n){"use strict";function r(e){return!(!e||"number"!==typeof e.byteLength||"function"!==typeof e.slice||ArrayBuffer.isView(e))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1029),i=n.n(r);function o(e){const t=i.a.BigInt(8),n=i.a.BigInt(255),r=new Uint8Array(8);return r[7]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[6]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[5]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[4]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[3]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[2]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[1]=i.a.toNumber(i.a.bitwiseAnd(e,n)),e=i.a.signedRightShift(e,t),r[0]=i.a.toNumber(i.a.bitwiseAnd(e,n)),r}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=i.a.BigInt(8);let o=i.a.BigInt(0);return o=i.a.bitwiseOr(o,i.a.BigInt(e[n+0])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+1])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+2])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+3])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+4])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+5])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+6])),o=i.a.leftShift(o,r),o=i.a.bitwiseOr(o,i.a.BigInt(e[n+7])),!t&&i.a.GE(o,i.a.exponentiate(i.a.BigInt(2),i.a.BigInt(63)))&&(o=i.a.add(i.a.unaryMinus(i.a.exponentiate(i.a.BigInt(2),i.a.BigInt(64))),o)),o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u}));var r,i=n(1037),o=(n(1038),n(1039),n(1040),n(1036)),a=n(1011),s=n(1016);n(2166),n(1041),n(1072),n(1073),function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.SUCCESS=0]="SUCCESS",e[e.DO_NOT_RETRY=6001]="DO_NOT_RETRY",e[e.RETRY_WITH_DELAY=6002]="RETRY_WITH_DELAY",e[e.RETRY_WITH_CORRECTED_TIME=6003]="RETRY_WITH_CORRECTED_TIME",e[e.REINITIALIZE_ABSINTHE=6004]="REINITIALIZE_ABSINTHE",e[e.REFRESH_CREDENTIALS=6005]="REFRESH_CREDENTIALS",e[e.REFRESH_REGISTRATION=6006]="REFRESH_REGISTRATION",e[e.RETRY_OVER_LIMIT=6007]="RETRY_OVER_LIMIT",e[e.AUTHENTICATION_FAILED=6008]="AUTHENTICATION_FAILED",e[e.NEVER_RETRY=6009]="NEVER_RETRY",e[e.REFRESH_DS_SESSSION=6010]="REFRESH_DS_SESSSION",e[e.PROVISION_LIMIT_REACHED=6011]="PROVISION_LIMIT_REACHED",e[e.REPLACE_ALL_KEYS=6012]="REPLACE_ALL_KEYS",e[e.ALTERNATE_LOCATION=6020]="ALTERNATE_LOCATION"}(r||(r={}));class c extends Error{constructor(){super("IDSQueryRatelimitError"),this.isLoggable=!0,this.logString=a.b`IDSURIRatelimitError`}}i.a;const u=Object(o.a)((e=>{throw new s.a(a.b`IDS cannot be auto-instantiated. An existing instance must be passed to the provider: ${e}`)}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return v})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return w}));var r=n(1048),i=n(1035),o=n(1016),a=n(1011),s=n(1029),c=n.n(s),u=n(1027),l=n(1049);const d=c.a.BigInt(1),p={p:c.a.BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),a:c.a.BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:c.a.BigInt("0x5aC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),yForX(e){const t=c.a.add(c.a.multiply(e,c.a.multiply(e,e)),c.a.add(c.a.multiply(this.a,e),this.b)),n=this.powerModP(t,c.a.divide(c.a.add(this.p,c.a.BigInt(1)),c.a.BigInt(4))),r=c.a.LT(n,c.a.subtract(this.p,n))?n:c.a.subtract(this.p,n),i=c.a.remainder(c.a.multiply(r,r),this.p),s=c.a.remainder(t,this.p);if(c.a.notEqual(i,s))throw new o.a(a.b`Invalid P256 test point`);return r},powerModP(e,t){let n=this.modP(e),r=d,i=t;for(;c.a.GT(i,0);)c.a.equal(c.a.bitwiseAnd(i,d),d)&&(r=c.a.remainder(c.a.multiply(r,n),this.p)),i=c.a.signedRightShift(i,d),n=c.a.remainder(c.a.multiply(n,n),this.p);return r},modP(e){const t=c.a.remainder(e,this.p);return c.a.GE(t,0)?t:c.a.add(this.p,t)}};async function f(e){return m(e,"ECDSA")}async function h(e){return m(e,"ECDH")}async function m(e,t){const n=function(e){if(e instanceof Error)return e;if(!e||0===e.length)return new o.a(a.b`p256 compact key is empty`);const t=`0x${Object(r.b)(e)}`,n=c.a.BigInt(t),i=n.toString(16).padStart(64,"0"),s=Object(r.a)(i),l=p.yForX(n).toString(16).padStart(64,"0"),d=Object(r.a)(l);return s instanceof Error?s:d instanceof Error?d:{crv:"P-256",ext:!0,key_ops:[],kty:"EC",x:Object(u.d)(s),y:Object(u.d)(d)}}(e);if(n instanceof Error)return n;const s="ECDH"===t?[]:["verify"],l={...n,key_ops:s};try{return await crypto.subtle.importKey("jwk",l,{name:t,namedCurve:"P-256"},!0,s)}catch(d){return Object(i.a)(d)}}let g=new WeakMap;async function v(e){if(e instanceof Error)return e;const t=g.get(e);if(t)return t;try{const t=(n=await crypto.subtle.exportKey("jwk",e))instanceof Error?n:Object(u.b)(n.x);return t instanceof Error||g.set(e,t),t}catch(r){return Object(i.a)(r)}var n}async function y(e){if(!e)return!1;const t=Object(l.a)(e)?e.publicKey:e,n=await crypto.subtle.exportKey("jwk",t),i=Object(u.b)(n.x),o=Object(u.b)(n.y);if(i instanceof Error||o instanceof Error)return!1;const a=c.a.BigInt("0x"+Object(r.b)(o)),s=p.p,d=c.a.subtract(s,a);return c.a.LE(a,d)}async function b(){return S({name:"ECDSA",namedCurve:"P-256"},["sign","verify"],arguments.length>0&&void 0!==arguments[0]&&arguments[0])}async function w(){return S({name:"ECDH",namedCurve:"P-256"},["deriveBits","deriveKey"],arguments.length>0&&void 0!==arguments[0]&&arguments[0])}async function S(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(let i=0;i<1e3;i++)if(n=await globalThis.crypto.subtle.generateKey(e,r,t),await y(n))return{publicKey:n.publicKey,privateKey:n.privateKey};throw new o.a(a.b`Failed to generate a keypair`)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1016),i=n(1011);function o(e){let t="";for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,"0");return t}function a(e){if(e instanceof Error)return e;if(e.length%2!==0)return new r.a(i.b`hex string has invalid length`);const t=[];for(let n=0;n<e.length;n+=2){const o=parseInt(e.substr(n,2),16);if(Number.isNaN(o))return new r.a(i.b`hex string has invalid characters`);t.push(o)}return new Uint8Array(t)}},function(e,t,n){"use strict";function r(e){return e&&e.publicKey&&e.privateKey&&!0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){for(const o of e)if(o instanceof Error)return o;const t=e,n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;for(const o of t)r.set(o,i),i+=o.length;return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p}));var r=n(1035),i=n(1044),o=n(1045),a=n(1029),s=n.n(a),c=n(1052),u=n.n(c),l=n(1053);function d(e,t){if(t instanceof Error)return t;try{return f(e.decode(t))}catch(n){return Object(r.a)(n)}}function p(e,t){return e.encode(h(t)).finish()}function f(e){return ArrayBuffer.isView(e)||Object(i.a)(e)?e:c.isLong(e)?Object(o.a)(e.toBytesBE(),e.unsigned,0):Array.isArray(e)?e.map((e=>f(e))):null===e?e:"object"===typeof e?Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,f(n)]}))):e}function h(e){return e instanceof s.a?c.fromBytesBE(Array.from(Object(o.b)(e))):ArrayBuffer.isView(e)||Object(i.a)(e)?e:Array.isArray(e)?e.map((e=>h(e))):null===e?e:"object"===typeof e?Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,h(n)]}))):e}l.util.Long=u.a,l.configure()},function(e,t){e.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(I){}function r(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function i(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=i;var o={},a={};function s(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=a[e])?r:(n=u(e,(0|e)<0?-1:0,!0),i&&(a[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=u(e,e<0?-1:0,!1),i&&(o[e]=n),n)}function c(e,t){if(isNaN(e))return t?y:v;if(t){if(e<0)return y;if(e>=h)return _}else{if(e<=-m)return O;if(e+1>=m)return C}return e<0?c(-e,t).neg():u(e%f|0,e/f|0,t)}function u(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=c,r.fromBits=u;var l=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return v;if("number"===typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return d(e.substring(1),t,n).neg();for(var i=c(l(n,8)),o=v,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),u=parseInt(e.substring(a,a+s),n);if(s<8){var p=c(l(n,s));o=o.mul(p).add(c(u))}else o=(o=o.mul(i)).add(c(u))}return o.unsigned=t,o}function p(e,t){return"number"===typeof e?c(e,t):"string"===typeof e?d(e,t):u(e.low,e.high,"boolean"===typeof t?t:e.unsigned)}r.fromString=d,r.fromValue=p;var f=4294967296,h=f*f,m=h/2,g=s(1<<24),v=s(0);r.ZERO=v;var y=s(0,!0);r.UZERO=y;var b=s(1);r.ONE=b;var w=s(1,!0);r.UONE=w;var S=s(-1);r.NEG_ONE=S;var C=u(-1,2147483647,!1);r.MAX_VALUE=C;var _=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=_;var O=u(0,-2147483648,!1);r.MIN_VALUE=O;var E=r.prototype;E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(O)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=c(l(e,6),this.unsigned),o=this,a="";;){var s=o.div(i),u=(o.sub(s.mul(i)).toInt()>>>0).toString(e);if((o=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(O)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},E.isZero=function(){return 0===this.high&&0===this.low},E.eqz=E.isZero,E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1===(1&this.low)},E.isEven=function(){return 0===(1&this.low)},E.equals=function(e){return i(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(i(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(b)},E.neg=E.negate,E.add=function(e){i(e)||(e=p(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,c=e.low>>>16,l=0,d=0,f=0,h=0;return f+=(h+=o+(65535&e.low))>>>16,d+=(f+=r+c)>>>16,l+=(d+=n+s)>>>16,l+=t+a,u((f&=65535)<<16|(h&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},E.subtract=function(e){return i(e)||(e=p(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return v;if(i(e)||(e=p(e)),n)return u(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return v;if(this.eq(O))return e.isOdd()?O:v;if(e.eq(O))return this.isOdd()?O:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return c(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,d=e.low>>>16,f=65535&e.low,h=0,m=0,y=0,b=0;return y+=(b+=a*f)>>>16,m+=(y+=o*f)>>>16,y&=65535,m+=(y+=a*d)>>>16,h+=(m+=r*f)>>>16,m&=65535,h+=(m+=o*d)>>>16,m&=65535,h+=(m+=a*l)>>>16,h+=t*f+r*d+o*l+a*s,u((y&=65535)<<16|(b&=65535),(h&=65535)<<16|(m&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(i(e)||(e=p(e)),e.isZero())throw Error("division by zero");var t,r,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return w;o=y}else{if(this.eq(O))return e.eq(b)||e.eq(S)?O:e.eq(O)?b:(t=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?b:S:(r=this.sub(e.mul(t)),o=t.add(r.div(e)));if(e.eq(O))return this.unsigned?y:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=v}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(t)/Math.LN2),s=a<=48?1:l(2,a-48),d=c(t),f=d.mul(e);f.isNegative()||f.gt(r);)f=(d=c(t-=s,this.unsigned)).mul(e);d.isZero()&&(d=b),o=o.add(d),r=r.sub(f)}return o},E.div=E.divide,E.modulo=function(e){return i(e)||(e=p(e)),n?u((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return u(~this.low,~this.high,this.unsigned)},E.and=function(e){return i(e)||(e=p(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return i(e)||(e=p(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return i(e)||(e=p(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(e){return i(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(i(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,n){"use strict";e.exports=n(1054)},function(e,t,n){"use strict";var r=t;function i(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(1055),r.BufferWriter=n(1065),r.Reader=n(1066),r.BufferReader=n(1067),r.util=n(1056),r.rpc=n(1068),r.roots=n(1070),r.configure=i,i()},function(e,t,n){"use strict";e.exports=d;var r,i=n(1056),o=i.LongBits,a=i.base64,s=i.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function l(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 c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return i.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function m(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 g(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=p(),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 c(e,t,n),this.len+=t,this},h.prototype=Object.create(c.prototype),h.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 h((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(m,10,o.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=o.from(e);return this._push(m,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},d.prototype.bool=function(e){return this._push(f,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(g,4,t.lo)._push(g,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 v=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(f,1,0);if(i.isString(e)){var n=d.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(v,t,e)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,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 c(u,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,d.create=p(),r._configure()}},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 o(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(1057),r.base64=n(1058),r.EventEmitter=n(1059),r.float=n(1060),r.inquire=n(1061),r.utf8=n(1062),r.pool=n(1063),r.LongBits=n(1064),r.isNode=Boolean("undefined"!==typeof e&&e&&e.process&&e.process.versions&&e.process.versions.node),r.global=r.isNode&&e||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},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(t){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=o,r.ProtocolError=o("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(472))},function(e,t,n){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,i=2,o=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise((function(i,a){n[r]=function(e){if(o)if(o=!1,e)a(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(s){o&&(o=!1,a(s))}}))}},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),o=new Array(123),a=0;a<64;)o[i[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;r.encode=function(e,t,n){for(var r,o=null,a=[],s=0,c=0;t<n;){var u=e[t++];switch(c){case 0:a[s++]=i[u>>2],r=(3&u)<<4,c=1;break;case 1:a[s++]=i[r|u>>4],r=(15&u)<<2,c=2;break;case 2:a[s++]=i[r|u>>6],a[s++]=i[63&u],c=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=i[r],a[s++]=61,1===c&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var s="invalid encoding";r.decode=function(e,t,n){for(var r,i=n,a=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=o[u]))throw Error(s);switch(a){case 0:r=u,a=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(s);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 o(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 a(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:o,e.writeFloatBE=r?o:i,e.readFloatLE=r?a:s,e.readFloatBE=r?s:a}():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 o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,r)}}function n(e,t,n){var r=e(t,n),i=2*(r>>31)+1,o=r>>>23&255,a=8388607&r;return 255===o?a?NaN:i*(1/0):0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o),e.readFloatLE=n.bind(null,a),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 o(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 a(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:o,e.writeDoubleBE=r?o:i,e.readDoubleLE=r?a:s,e.readDoubleBE=r?s:a}():function(){function t(e,t,n,r,i,o){var a=r<0?1:0;if(a&&(r=-r),0===r)e(0,i,o+t),e(1/r>0?0:2147483648,i,o+n);else if(isNaN(r))e(0,i,o+t),e(2146959360,i,o+n);else if(r>17976931348623157e292)e(0,i,o+t),e((a<<31|2146435072)>>>0,i,o+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,i,o+t),e((a<<31|s/4294967296)>>>0,i,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=r*Math.pow(2,-c))>>>0,i,o+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,i,o+n)}}}function n(e,t,n,r,i){var o=e(r,i+t),a=e(r,i+n),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=n.bind(null,a,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 o(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 a(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,o=[],a=0;t<n;)(r=e[t++])<128?o[a++]=r:r>191&&r<224?o[a++]=(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,o[a++]=55296+(r>>10),o[a++]=56320+(1023&r)):o[a++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(e,t,n){for(var r,i,o=n,a=0;a<e.length;++a)(r=e.charCodeAt(a))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296===(64512&r)&&56320===(64512&(i=e.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&i),++a,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-o}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=n||8192,i=r>>>1,o=null,a=r;return function(n){if(n<1||n>i)return e(n);a+n>r&&(o=e(r),a=0);var s=t.call(o,a,a+=n);return 7&a&&(a=1+(7|a)),s}}},function(e,t,n){"use strict";e.exports=i;var r=n(1056);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;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):o},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===a?o: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(1055);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(1056);function o(){r.call(this)}function a(e,t,n){e.length<40?i.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.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++]}},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(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},function(e,t,n){"use strict";e.exports=c;var r,i=n(1056),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u};function d(){var e=new o(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 p(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 o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|p(this.buf,this.pos+=4)},c.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},c.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},c.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)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.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},c.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},c._configure=function(e){r=e,c.create=l(),r._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.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";e.exports=o;var r=n(1066);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(1056);function o(e){r.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},function(e,t,n){"use strict";t.Service=n(1069)},function(e,t,n){"use strict";e.exports=i;var r=n(1056);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,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return s.emit("error",e,t),a(e);if(null!==n){if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",n,t),a(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){a(c)}),0)}else setTimeout((function(){a(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";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=s.SecMessageProtection=(()=>{const e={};return e.LegacyKey=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.encryptionKey=a.newBuffer([]),e.prototype.signingKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.encryptionKey),t.uint32(18).bytes(e.signingKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.LegacyKey;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.encryptionKey=e.bytes();break;case 2:r.signingKey=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("encryptionKey"))throw a.ProtocolError("missing required 'encryptionKey'",{instance:r});if(!r.hasOwnProperty("signingKey"))throw a.ProtocolError("missing required 'signingKey'",{instance:r});return r},e}(),e.OuterMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.encryptedPayload=a.newBuffer([]),e.prototype.ephemeralPubKey=a.newBuffer([]),e.prototype.signature=a.newBuffer([]),e.prototype.keyValidator=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.encryptedPayload),t.uint32(18).bytes(e.ephemeralPubKey),t.uint32(26).bytes(e.signature),null!=e.keyValidator&&Object.hasOwnProperty.call(e,"keyValidator")&&t.uint32(794).bytes(e.keyValidator),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.OuterMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.encryptedPayload=e.bytes();break;case 2:r.ephemeralPubKey=e.bytes();break;case 3:r.signature=e.bytes();break;case 99:r.keyValidator=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("encryptedPayload"))throw a.ProtocolError("missing required 'encryptedPayload'",{instance:r});if(!r.hasOwnProperty("ephemeralPubKey"))throw a.ProtocolError("missing required 'ephemeralPubKey'",{instance:r});if(!r.hasOwnProperty("signature"))throw a.ProtocolError("missing required 'signature'",{instance:r});return r},e}(),e.InnerMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.message=a.newBuffer([]),e.prototype.counter=0,e.prototype.ktGossipData=a.newBuffer([]),e.prototype.debugInfo=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.message),null!=e.counter&&Object.hasOwnProperty.call(e,"counter")&&t.uint32(16).uint32(e.counter),null!=e.ktGossipData&&Object.hasOwnProperty.call(e,"ktGossipData")&&t.uint32(26).bytes(e.ktGossipData),null!=e.debugInfo&&Object.hasOwnProperty.call(e,"debugInfo")&&t.uint32(794).bytes(e.debugInfo),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.InnerMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.message=e.bytes();break;case 2:r.counter=e.uint32();break;case 3:r.ktGossipData=e.bytes();break;case 99:r.debugInfo=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("message"))throw a.ProtocolError("missing required 'message'",{instance:r});return r},e}(),e.PublicDeviceIdentity=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.signingKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.signingKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.PublicDeviceIdentity;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.signingKey=e.bytes():e.skipType(7&t)}if(!r.hasOwnProperty("signingKey"))throw a.ProtocolError("missing required 'signingKey'",{instance:r});return r},e}(),e.PublicDevicePrekey=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.prekey=a.newBuffer([]),e.prototype.prekeySignature=a.newBuffer([]),e.prototype.timestamp=0,e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.prekey),t.uint32(18).bytes(e.prekeySignature),t.uint32(25).double(e.timestamp),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.PublicDevicePrekey;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.prekey=e.bytes();break;case 2:r.prekeySignature=e.bytes();break;case 3:r.timestamp=e.double();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("prekey"))throw a.ProtocolError("missing required 'prekey'",{instance:r});if(!r.hasOwnProperty("prekeySignature"))throw a.ProtocolError("missing required 'prekeySignature'",{instance:r});if(!r.hasOwnProperty("timestamp"))throw a.ProtocolError("missing required 'timestamp'",{instance:r});return r},e}(),e.DevicePreKey=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.dhKey=null,e.prototype.timestamp=0,e.prototype.prekeySignature=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.dhKey&&Object.hasOwnProperty.call(e,"dhKey")&&s.SecMessageProtection.P256Key.encode(e.dhKey,t.uint32(10).fork()).ldelim(),t.uint32(17).double(e.timestamp),t.uint32(26).bytes(e.prekeySignature),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.DevicePreKey;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.dhKey=s.SecMessageProtection.P256Key.decode(e,e.uint32());break;case 2:r.timestamp=e.double();break;case 3:r.prekeySignature=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("timestamp"))throw a.ProtocolError("missing required 'timestamp'",{instance:r});if(!r.hasOwnProperty("prekeySignature"))throw a.ProtocolError("missing required 'prekeySignature'",{instance:r});return r},e}(),e.FullDeviceIdentity=function(){function e(e){if(this.prekeys=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.signingKey=null,e.prototype.prekeys=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),s.SecMessageProtection.P256Key.encode(e.signingKey,t.uint32(10).fork()).ldelim(),null!=e.prekeys&&e.prekeys.length)for(let n=0;n<e.prekeys.length;++n)s.SecMessageProtection.DevicePreKey.encode(e.prekeys[n],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.FullDeviceIdentity;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.signingKey=s.SecMessageProtection.P256Key.decode(e,e.uint32());break;case 2:r.prekeys&&r.prekeys.length||(r.prekeys=[]),r.prekeys.push(s.SecMessageProtection.DevicePreKey.decode(e,e.uint32()));break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("signingKey"))throw a.ProtocolError("missing required 'signingKey'",{instance:r});return r},e}(),e.P256Key=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.keychainTag="",e.prototype.keystore=1,e.prototype.keyData=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.keychainTag&&Object.hasOwnProperty.call(e,"keychainTag")&&t.uint32(10).string(e.keychainTag),t.uint32(16).int32(e.keystore),null!=e.keyData&&Object.hasOwnProperty.call(e,"keyData")&&t.uint32(26).bytes(e.keyData),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.SecMessageProtection.P256Key;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.keychainTag=e.string();break;case 2:r.keystore=e.int32();break;case 3:r.keyData=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("keystore"))throw a.ProtocolError("missing required 'keystore'",{instance:r});return r},e.Keystore=function(){const e={},t=Object.create(e);return t[e[1]="Software"]=1,t[e[2]="SEP"]=2,t[e[3]="SecKey"]=3,t[e[4]="CTKTokenOID"]=4,t}(),e}(),e})()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(1048),i=n(1036);class o{constructor(){this.controllersByURI=new Map}byURI(e){var t;return null!==(t=this.controllersByURI.get(e))&&void 0!==t?t:null}byPushToken(e){const t=Object(r.b)(e);for(const[,n]of this.controllersByURI){const e=n.push.pushToken;if(e&&Object(r.b)(e)===t)return n}return null}}const a=Object(i.a)((()=>new o))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1036),i=n(1016),o=n(1011);class a{constructor(){this.closers=[]}add(e){this.closers.push(e)}close(){for(const e of this.closers)e();this.closers.length=0}}const s=Object(r.a)((()=>{throw new i.a(o.b`Lifetime components should not be auto-instantiated.`)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1036);const i={qa1:"websocket.sandbox.push.apple.com",qa2:"websocket.qa2.push.apple.com",prod:"websocket.push.apple.com",carry:"websocket-carry.push.apple.com",tc:"websocket-tc.push.apple.com",sandbox:"websocket.sandbox.push.apple.com"},o=Object(r.a)((()=>i.sandbox))},function(e,t,n){"use strict";n.d(t,"a",(function(){return M})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return L}));var r=n(1044),i=n(1038),o=n(1040),a=n(1082),s=n(1083),c=n(1034),u=n(1031),l=n(1032),d=n(1033),p=n(1045),f=n(1036),h=n(1016),m=n(1011),g=n(2217),v=n(1088),y=n(1029),b=n.n(y),w=n(1027),S=n(1073),C=n(1080),_=n(1084),O=n(2182),E=n(2283),I=n(2281),A=n(1074),T=n(2282),P=n(1076),R=n(1077);const k=new TextEncoder;class D extends Error{constructor(e){super(),this.event=e}}class M extends Error{constructor(e){super("Invalid nonce from server; retry with server timestamp"),this.serverTimestamp=e}}const N=[100,1e3,5e3,1e4,3e4];class x{get pushToken(){return this._pushToken}get isConnected(){return!!this._pushToken}constructor(e,t){this.provider=e,this.allowedTopics=t,this._isConnected=!1,this.isChannel=!0,this._pushToken=null,this._reconnectTimeouts=N.slice(),this.topicsByHash=new Map,this.knownTopics=new Set,this.jwtExpirationTimestamp=0,this.logger=Object(i.a)(this.provider).child`PushConnection`().package`Messaging`.subsystem`push`,this.feedbackWS=Object(o.a)(this.provider),this.down=null,this.up=null,this.pushEnvironment=Object(A.b)(this.provider),this.pendingJwtRequests=[],Object(S.b)(e).add((()=>this.dispose())),this.hashUnknownTopics(t),this._connectionPromise=new Promise((()=>{}))}async hashUnknownTopics(e){e.forEach((async e=>{const{topicsByHash:t,knownTopics:n}=this;if(n.has(e))return;const r=await Object(P.c)(e);t.set(...r),n.add(e)}))}connect(){const{up:e,down:t}=Object(R.b)(this.provider).activeDuplex;this.up=e,this.down=t,t.pipe(this);const n=new a.a;return this._connectionPromise=new Promise((e=>{this._didConnect=t=>{e(t),this.feedbackWS.reportPerf("timeToConnectWS",{duration:Math.floor(n.duration)})}})),this._connectionPromise}connectWithMessage(e){const t=Object(R.b)(this.provider);return Object(s.a)(t.connectWithMessage(e)),this.connect()}dispose(){try{var e;null===(e=this.down)||void 0===e||e.unpipe(this)}catch(t){this.logger.silly`Error ${Object(c.c)(t)} while attempting to unpipe after dispose was called.`}}open(){}async close(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.logger;if(this._isConnected=!1,n.info`unpipng ...`,null===(t=this.down)||void 0===t||t.unpipe(this),this.didClose)this.didClose(new D(e));else{if(e.code!==O.a){const{code:t,reason:r}=e,i=n.error`Push Connection Closed: ${Object(g.c)(t).notPII().forCertain()}: ${Object(g.c)(r).notPII().forCertain()}`;this._didConnect&&this._didConnect(Object(u.a)(i,l.b.PushConnectionCloseFailed,{endReasonClass:"WebCourierClose",endReasonDetail:r||String(t),endReasonWebCourierClose:t}))}await this.attemptReconnect(n)}}async attemptReconnect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.logger;const t={value:null},n=new a.a;if(e.verbose`have reconnect handler? ${Object(g.c)(!!this._reconnectHandler).notPII().forCertain()}; tries left: ${Object(g.c)(this._reconnectTimeouts.length).notPII().forCertain()}`,this._reconnectHandler&&this._reconnectTimeouts.length>0){const r=this._reconnectTimeouts.shift();e.info`Attempting reconnect in ${Object(g.c)(r).notPII().forCertain()}ms`,await Object(d.b)(r,m.b``);do{if(e.info`Attempting reconnect if online...`,!1===navigator.onLine){e.warn`Can't attempt reconnect because offline.`;const t=this._reconnectTimeouts.shift();if(t){e.info`Attempting reconnect in ${Object(g.c)(t).notPII().forCertain()}`,await Object(d.b)(t,m.b``);continue}e.info`No retries left. Giving up.`;break}e.info`Attempting reconnect; ${Object(g.c)(this._reconnectTimeouts.length).notPII().forCertain()} attempts remaining`;const r=await this._reconnectHandler(t.value);if(r instanceof M){t.value=r.serverTimestamp,e.error`Attempting reconnect failed: ${Object(g.c)(r.message)}`;const n=this._reconnectTimeouts.shift();if(n){await Object(d.b)(n,m.b``);continue}}else if(r instanceof Error){e.error`Attempting reconnect failed: ${Object(g.c)(r.message)}`;const t=this._reconnectTimeouts.shift();if(t){await Object(d.b)(t,m.b``);continue}}else this.feedbackWS.reportPerf("timeFromWSAttemptReconnectToSuccess",{duration:Math.floor(n.duration)});break}while(this._reconnectTimeouts.length)}}waitForConnection(){return this._connectionPromise}async reconnect(){const{up:e,down:t}=Object(R.b)(this.provider).activeDuplex;try{var n;null===(n=this.down)||void 0===n||n.unpipe(this)}catch(r){this.logger.silly`Error ${Object(c.c)(r)} while attempting to unpipe; assuming this is normal and continuing with reconnect.`}return this._isConnected&&(this._isConnected=!1),this.up=e,this.down=t,t.pipe(this),this._connectionPromise=new Promise((e=>{this._didConnect=e})),this._connectionPromise}reconnectWithMessage(e){const t=Object(R.b)(this.provider);return Object(s.a)(t.reconnect(e)),this.reconnect()}setReconnectHandler(e){this._reconnectHandler=e}async message(e){const t=C.a.decode(await async function(e){if("string"===typeof e)return k.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(Object(r.a)(e))return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new h.a(m.b`Invalid WebSocket message`)}(e));if(t.connectionResponseMessage)return this.logger.info`Connected to webcourier...`,void this.connectedMessage(t.connectionResponseMessage);if(t.pushMessage){const e=t.pushMessage;this.logger.info`[PushConnection--> webClientPushMessage]: ${Object(g.c)(e.id).sessionID(_.c)} ${Object(g.c)(e.expirationTimeSecs).device()}`}if(t.jwtResponse)return void this.jwtResponseMessage(t.jwtResponse);const n=Object(I.b)(this.provider),i=await n.handleIncomingMessage({message:t,pushToken:this.pushToken});i instanceof E.a||(i instanceof Error?this.logger.error`Failed to handle push: ${i}\n${i.stack}`:i||this.logger.warn`No handler for push: ${Object.keys(t)}`)}async connectedMessage(e){switch(this.logger.info`[PushConnection--> connectedMessage]: ${JSON.stringify(e)}`,e.status){case C.d.Status.OK:{const t=e.pushToken?Object(w.a)(e.pushToken):Object(u.a)(new h.a(m.b`Got connected message, but no push token`),l.b.NoPushConnectToken);if(t instanceof Error)return void(this._didConnect&&this._didConnect(Object(u.a)(t,l.b.BadPushConnectTokenBase64)));this._pushToken=t,this._reconnectTimeouts=N.slice(),this._didConnect&&(this._didConnect(this),this._didConnect=void 0,this._isConnected=!0);const{allowedTopics:n}=this;n.length>0&&Object(T.a)(this.provider).send({webFilterMessage:{allowedTopics:n}});break}case C.d.Status.AUTH_FAILED:case C.d.Status.BAD_REQUEST:case C.d.Status.EXPIRED_PUSH_TOKEN:case C.d.Status.INTERNAL_ERROR:case C.d.Status.RATE_LIMITED:default:{var t;const n=new h.a(m.b`Got connected message, but no push token, status ${e.status}`);null===(t=this._didConnect)||void 0===t||t.call(this,Object(u.a)(n,l.b.BadPushConnectTokenBase64));break}case C.d.Status.INVALID_NONCE:{const t=e.serverTimestampSeconds;if(t){var n;const e=Object(p.a)(t.toBytesBE(),t.unsigned),r=b.a.multiply(e,b.a.BigInt(1e3));null===(n=this._didConnect)||void 0===n||n.call(this,new M(r))}else{var r;const t=new h.a(m.b`Got connected message, but no push token, status ${e.status}`);null===(r=this._didConnect)||void 0===r||r.call(this,Object(u.a)(t,l.b.BadPushConnectTokenBase64))}break}}}async sendMessage(e){return this.logger.info`sending WebClientToServerMessage - ${e}`,this.up.message(C.c.encode(e).finish())}get jwt(){if(!(Date.now()>=this.jwtExpirationTimestamp))return this._jwt}invalidateJwt(e){this._jwt===e&&(this._jwt=void 0)}sendJwtRequest(){return new Promise((e=>{this.pendingJwtRequests.push(e),this.pendingJwtRequests.length>1||(this.logger.info`[PushConnection--> sendJwtRequest]: requesting JWT`,Object(T.a)(this.provider).send({jwtRequestMessage:{expirationDurationSeconds:600}}))}))}jwtResponseMessage(e){if(this.logger.info`[PushConnection--> jwtResponseMessage]: got JWT response with status ${e.status}`,1===e.status&&e.jwToken){this._jwt=e.jwToken;const t=6e5;this.jwtExpirationTimestamp=Date.now()+t}for(const t of this.pendingJwtRequests.splice(0,this.pendingJwtRequests.length))t(e)}}!function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(v.a)()],x.prototype,"close",null);const L=Object(f.a)((()=>{throw new h.a(m.b`pushConnectionComponent can only be made by useInstance`)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c}));var r,i=n(1048);!function(e){e.FaceTimeMulti="com.apple.private.alloy.facetime.multi",e.Multiplex1="com.apple.private.alloy.multiplex1",e.Willow="com.apple.private.alloy.willow",e.QuickRelay="com.apple.private.alloy.quickrelay",e.QuickRelaySignaling="com.apple.private.alloy.quickrelay.web.signaling",e.GroupRemoteControlCloud="com.apple.private.alloy.groupRemoteControl.cloud",e.GroupRemoteControlSession="com.apple.private.alloy.groupRemoteControl.session",e.ICloudWeb="com.apple.private.alloy.icloudweb",e.Mail="com.me.mail",e.Calendar="com.me.cal",e.DataAccess="com.apple.web.dataaccess",e.TokenAccess="om.apple.web.tokenaccess",e.Quote="com.icloud.quota",e.Photos="com.apple.photos.cloud",e.CloudDocs="com.apple.clouddocs",e.Notes="com.apple.notes"}(r||(r={}));const o=new TextEncoder;async function a(e){const t=o.encode(e),n=await crypto.subtle.digest("SHA-1",t);return[Object(i.b)(new Uint8Array(n)),e]}const s=new TextDecoder;function c(e,t){var n;let r;const o=Object(i.b)(e);return r=null!==(n=t.get(o))&&void 0!==n?n:s.decode(e),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return m}));var r=n(1078),i=n(1048),o=n(1039),a=n(2185),s=n(1082),c=n(1036),u=n(1016),l=n(1011),d=n(1080),p=n(2182),f=n(1074);class h extends r.a{constructor(e){super(e),this.socketProvider=Object(p.b)(this.provider),this.webCourierUrlBase=`wss://${Object(f.b)(this.provider)}`}get activeDuplex(){return this._activeDuplex||(this._activeDuplex=this.socketProvider(this.webCourierUrlBase)),this._activeDuplex}connectWithMessage(e){if(this._activeDuplex)return new u.a(l.b`Active connection already exists.`);const t=(()=>{try{return d.b.encode({connectionMessageV1:e}).finish()}catch{return null}})();return t?(this._activeDuplex=this.socketProvider(`${this.webCourierUrlBase}/v2/${Object(i.b)(t)}`),this._activeDuplex):new u.a(l.b`Failed to encode ConnectionMessageV1 for connection`)}reconnect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:async(e,t)=>{Object(o.a)(this.provider).log(new a.c(e.stopTimer()))};const n=new s.a;this._activeDuplex&&this._activeDuplex.up.close();const r=(()=>{try{return d.b.encode({connectionMessageV1:e}).finish()}catch{return null}})();return r?(this._activeDuplex=this.socketProvider(`${this.webCourierUrlBase}/v2/${Object(i.b)(r)}`),this._activeDuplex.timeToFirstMessage.then((e=>t(n,e))),this._activeDuplex):new u.a(l.b`Failed to encode ConnectionMessageV1 for reconnect`)}close(){this._activeDuplex&&this._activeDuplex.up.close(),this._activeDuplex=void 0}}const m=Object(c.a)((e=>new h(e)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e){this.provider=e}get(e){return this.provider.get(e)}}},function(e,t,n){"use strict";function r(){let e;return{promise:new Promise((t=>e=t)),resolve:e}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a}));var r=n(1081);const i=r.a.ServerToWebClientMessage,o=r.a.WebClientConnectionMessage,a=(r.a.WebClientConnectionMessage.ConnectionMessageV1,r.a.WebClientToServerMessage),s=r.a.WebConnectionResponseMessage},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=s.websocketpush=(()=>{const e={};return e.WebClientConnectionMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.connectionMessageV1=null,Object.defineProperty(e.prototype,"message",{get:a.oneOfGetter(t=["connectionMessageV1"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.connectionMessageV1&&Object.hasOwnProperty.call(e,"connectionMessageV1")&&s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.encode(e.connectionMessageV1,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebClientConnectionMessage;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.connectionMessageV1=s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.decode(e,e.uint32()):e.skipType(7&t)}return r},e.ConnectionMessageV1=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.publicKey=a.newBuffer([]),e.prototype.nonce=a.newBuffer([]),e.prototype.signature=a.newBuffer([]),e.prototype.connectWithPushToken=null,e.prototype.newConnectionRequest=null,Object.defineProperty(e.prototype,"RequestType",{get:a.oneOfGetter(t=["connectWithPushToken","newConnectionRequest"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.publicKey&&Object.hasOwnProperty.call(e,"publicKey")&&t.uint32(10).bytes(e.publicKey),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(18).bytes(e.nonce),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(26).bytes(e.signature),null!=e.connectWithPushToken&&Object.hasOwnProperty.call(e,"connectWithPushToken")&&s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.ConnectWithPushToken.encode(e.connectWithPushToken,t.uint32(34).fork()).ldelim(),null!=e.newConnectionRequest&&Object.hasOwnProperty.call(e,"newConnectionRequest")&&s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.NewConnectionRequest.encode(e.newConnectionRequest,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.publicKey=e.bytes();break;case 2:r.nonce=e.bytes();break;case 3:r.signature=e.bytes();break;case 4:r.connectWithPushToken=s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.ConnectWithPushToken.decode(e,e.uint32());break;case 5:r.newConnectionRequest=s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.NewConnectionRequest.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e.ConnectWithPushToken=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.pushToken="",e.encode=function(e,t){return t||(t=o.create()),null!=e.pushToken&&Object.hasOwnProperty.call(e,"pushToken")&&t.uint32(10).string(e.pushToken),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.ConnectWithPushToken;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.pushToken=e.string():e.skipType(7&t)}return r},e}(),e.NewConnectionRequest=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.tokenExpirationSeconds=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.tokenExpirationSeconds&&Object.hasOwnProperty.call(e,"tokenExpirationSeconds")&&t.uint32(8).uint32(e.tokenExpirationSeconds),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebClientConnectionMessage.ConnectionMessageV1.NewConnectionRequest;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.tokenExpirationSeconds=e.uint32():e.skipType(7&t)}return r},e}(),e}(),e}(),e.WebConnectionResponseMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.pushToken="",e.prototype.status=0,e.prototype.serverTimestampSeconds=a.Long?a.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=o.create()),null!=e.pushToken&&Object.hasOwnProperty.call(e,"pushToken")&&t.uint32(10).string(e.pushToken),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(16).int32(e.status),null!=e.serverTimestampSeconds&&Object.hasOwnProperty.call(e,"serverTimestampSeconds")&&t.uint32(24).uint64(e.serverTimestampSeconds),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebConnectionResponseMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.pushToken=e.string();break;case 2:r.status=e.int32();break;case 3:r.serverTimestampSeconds=e.uint64();break;default:e.skipType(7&t)}}return r},e.Status=function(){const e={},t=Object.create(e);return t[e[0]="OK"]=0,t[e[1]="BAD_REQUEST"]=1,t[e[2]="INVALID_NONCE"]=2,t[e[3]="AUTH_FAILED"]=3,t[e[4]="RATE_LIMITED"]=4,t[e[5]="INTERNAL_ERROR"]=5,t[e[6]="EXPIRED_PUSH_TOKEN"]=6,t}(),e}(),e.WebChannelSubscriptionsRequest=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.payload=null,e.prototype.messageId=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&s.websocketpush.WebChannelSubscriptionsRequest.Payload.encode(e.payload,t.uint32(10).fork()).ldelim(),null!=e.messageId&&Object.hasOwnProperty.call(e,"messageId")&&t.uint32(16).uint32(e.messageId),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsRequest;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.payload=s.websocketpush.WebChannelSubscriptionsRequest.Payload.decode(e,e.uint32());break;case 2:r.messageId=e.uint32();break;default:e.skipType(7&t)}}return r},e.Payload=function(){function e(e){if(this.appChannelSubscriptions=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.appChannelSubscriptions=a.emptyArray,e.prototype.subscriptionsType=0,e.prototype.sequenceNumber=a.Long?a.Long.fromBits(0,0,!0):0,e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).int32(e.version),null!=e.appChannelSubscriptions&&e.appChannelSubscriptions.length)for(let n=0;n<e.appChannelSubscriptions.length;++n)s.websocketpush.WebChannelSubscriptionsRequest.Payload.AppChannelSubscriptions.encode(e.appChannelSubscriptions[n],t.uint32(18).fork()).ldelim();return null!=e.subscriptionsType&&Object.hasOwnProperty.call(e,"subscriptionsType")&&t.uint32(24).int32(e.subscriptionsType),null!=e.sequenceNumber&&Object.hasOwnProperty.call(e,"sequenceNumber")&&t.uint32(32).uint64(e.sequenceNumber),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsRequest.Payload;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.int32();break;case 2:r.appChannelSubscriptions&&r.appChannelSubscriptions.length||(r.appChannelSubscriptions=[]),r.appChannelSubscriptions.push(s.websocketpush.WebChannelSubscriptionsRequest.Payload.AppChannelSubscriptions.decode(e,e.uint32()));break;case 3:r.subscriptionsType=e.int32();break;case 4:r.sequenceNumber=e.uint64();break;default:e.skipType(7&t)}}return r},e.SubscriptionType=function(){const e={},t=Object.create(e);return t[e[0]="DELTA_SUBSCRIPTION"]=0,t[e[1]="FULL_SUBSCRIPTION"]=1,t}(),e.Version=function(){const e={},t=Object.create(e);return t[e[0]="V_UNUSED"]=0,t[e[1]="V_1"]=1,t[e[2]="V_2"]=2,t}(),e.ChannelSubscription=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.channelId=a.newBuffer([]),e.prototype.checkpoint=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.messageReplayCount=a.Long?a.Long.fromBits(0,0,!0):0,Object.defineProperty(e.prototype,"SubscriptionInfo",{get:a.oneOfGetter(t=["checkpoint","messageReplayCount"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(10).bytes(e.channelId),null!=e.checkpoint&&Object.hasOwnProperty.call(e,"checkpoint")&&t.uint32(16).uint64(e.checkpoint),null!=e.messageReplayCount&&Object.hasOwnProperty.call(e,"messageReplayCount")&&t.uint32(32).uint64(e.messageReplayCount),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelSubscription;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.channelId=e.bytes();break;case 2:r.checkpoint=e.uint64();break;case 4:r.messageReplayCount=e.uint64();break;default:e.skipType(7&t)}}return r},e}(),e.ChannelUnsubscription=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.channelId=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(10).bytes(e.channelId),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelUnsubscription;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.channelId=e.bytes():e.skipType(7&t)}return r},e}(),e.AppChannelSubscriptions=function(){function e(e){if(this.subscriptionChannels=[],this.unsubscriptionChannels=[],e)for(let 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.subscriptionChannels=a.emptyArray,e.prototype.unsubscriptionChannels=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(10).string(e.topic),null!=e.subscriptionChannels&&e.subscriptionChannels.length)for(let n=0;n<e.subscriptionChannels.length;++n)s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelSubscription.encode(e.subscriptionChannels[n],t.uint32(18).fork()).ldelim();if(null!=e.unsubscriptionChannels&&e.unsubscriptionChannels.length)for(let n=0;n<e.unsubscriptionChannels.length;++n)s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelUnsubscription.encode(e.unsubscriptionChannels[n],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsRequest.Payload.AppChannelSubscriptions;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.topic=e.string();break;case 2:r.subscriptionChannels&&r.subscriptionChannels.length||(r.subscriptionChannels=[]),r.subscriptionChannels.push(s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelSubscription.decode(e,e.uint32()));break;case 3:r.unsubscriptionChannels&&r.unsubscriptionChannels.length||(r.unsubscriptionChannels=[]),r.unsubscriptionChannels.push(s.websocketpush.WebChannelSubscriptionsRequest.Payload.ChannelUnsubscription.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e}(),e}(),e.WebChannelSubscriptionsResponse=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.payload=null,e.prototype.messageId=0,e.prototype.status=0,e.prototype.retryIntervalSeconds=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&s.websocketpush.WebChannelSubscriptionsResponse.Payload.encode(e.payload,t.uint32(10).fork()).ldelim(),null!=e.messageId&&Object.hasOwnProperty.call(e,"messageId")&&t.uint32(16).uint32(e.messageId),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(24).int32(e.status),null!=e.retryIntervalSeconds&&Object.hasOwnProperty.call(e,"retryIntervalSeconds")&&t.uint32(32).uint32(e.retryIntervalSeconds),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.payload=s.websocketpush.WebChannelSubscriptionsResponse.Payload.decode(e,e.uint32());break;case 2:r.messageId=e.uint32();break;case 3:r.status=e.int32();break;case 4:r.retryIntervalSeconds=e.uint32();break;default:e.skipType(7&t)}}return r},e.Payload=function(){function e(e){if(this.appChannelSubscriptionResponse=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.appChannelSubscriptionResponse=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.appChannelSubscriptionResponse&&e.appChannelSubscriptionResponse.length)for(let n=0;n<e.appChannelSubscriptionResponse.length;++n)s.websocketpush.WebChannelSubscriptionsResponse.Payload.AppChannelSubscriptionResponse.encode(e.appChannelSubscriptionResponse[n],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsResponse.Payload;for(;e.pos<n;){let t=e.uint32();t>>>3===1?(r.appChannelSubscriptionResponse&&r.appChannelSubscriptionResponse.length||(r.appChannelSubscriptionResponse=[]),r.appChannelSubscriptionResponse.push(s.websocketpush.WebChannelSubscriptionsResponse.Payload.AppChannelSubscriptionResponse.decode(e,e.uint32()))):e.skipType(7&t)}return r},e.ChannelStatus=function(){const e={},t=Object.create(e);return t[e[0]="CHANNEL_ID_INVALID"]=0,t[e[1]="CHECKPOINT_LATEST"]=1,t[e[2]="TOO_MANY_GLOBAL_SUBSCRIPTIONS"]=2,t[e[3]="TOO_MANY_DEVICE_APP_SUBSCRIPTIONS"]=3,t}(),e.ChannelResponse=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.channelId=a.newBuffer([]),e.prototype.channelStatus=0,e.prototype.channelSubscriptionCheckpoint=a.Long?a.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=o.create()),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(10).bytes(e.channelId),null!=e.channelStatus&&Object.hasOwnProperty.call(e,"channelStatus")&&t.uint32(16).int32(e.channelStatus),null!=e.channelSubscriptionCheckpoint&&Object.hasOwnProperty.call(e,"channelSubscriptionCheckpoint")&&t.uint32(24).uint64(e.channelSubscriptionCheckpoint),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsResponse.Payload.ChannelResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.channelId=e.bytes();break;case 2:r.channelStatus=e.int32();break;case 3:r.channelSubscriptionCheckpoint=e.uint64();break;default:e.skipType(7&t)}}return r},e}(),e.AppChannelSubscriptionResponse=function(){function e(e){if(this.subscriptionChannelResponse=[],this.unsubscriptionChannelResponse=[],e)for(let 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.subscriptionChannelResponse=a.emptyArray,e.prototype.unsubscriptionChannelResponse=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(10).string(e.topic),null!=e.subscriptionChannelResponse&&e.subscriptionChannelResponse.length)for(let n=0;n<e.subscriptionChannelResponse.length;++n)s.websocketpush.WebChannelSubscriptionsResponse.Payload.ChannelResponse.encode(e.subscriptionChannelResponse[n],t.uint32(18).fork()).ldelim();if(null!=e.unsubscriptionChannelResponse&&e.unsubscriptionChannelResponse.length)for(let n=0;n<e.unsubscriptionChannelResponse.length;++n)s.websocketpush.WebChannelSubscriptionsResponse.Payload.ChannelResponse.encode(e.unsubscriptionChannelResponse[n],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsResponse.Payload.AppChannelSubscriptionResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.topic=e.string();break;case 2:r.subscriptionChannelResponse&&r.subscriptionChannelResponse.length||(r.subscriptionChannelResponse=[]),r.subscriptionChannelResponse.push(s.websocketpush.WebChannelSubscriptionsResponse.Payload.ChannelResponse.decode(e,e.uint32()));break;case 3:r.unsubscriptionChannelResponse&&r.unsubscriptionChannelResponse.length||(r.unsubscriptionChannelResponse=[]),r.unsubscriptionChannelResponse.push(s.websocketpush.WebChannelSubscriptionsResponse.Payload.ChannelResponse.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e}(),e.Status=function(){const e={},t=Object.create(e);return t[e[0]="SUCCESS"]=0,t[e[1]="BAD_REQUEST"]=1,t[e[2]="SUBSCRIPTION_FAILURE"]=2,t[e[3]="INTERNAL_ERROR"]=3,t}(),e}(),e.WebChannelSubscriptionsUpdate=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.payload=null,e.prototype.messageId=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&s.websocketpush.WebChannelSubscriptionsUpdate.Payload.encode(e.payload,t.uint32(10).fork()).ldelim(),null!=e.messageId&&Object.hasOwnProperty.call(e,"messageId")&&t.uint32(16).uint32(e.messageId),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsUpdate;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.payload=s.websocketpush.WebChannelSubscriptionsUpdate.Payload.decode(e,e.uint32());break;case 2:r.messageId=e.uint32();break;default:e.skipType(7&t)}}return r},e.Payload=function(){function e(e){if(this.appChannelUpdates=[],this.subscriptionUpdates=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.appChannelUpdates=a.emptyArray,e.prototype.subscriptionUpdates=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.appChannelUpdates&&e.appChannelUpdates.length)for(let n=0;n<e.appChannelUpdates.length;++n)s.websocketpush.WebChannelSubscriptionsUpdate.Payload.AppChannelUpdates.encode(e.appChannelUpdates[n],t.uint32(10).fork()).ldelim();if(null!=e.subscriptionUpdates&&e.subscriptionUpdates.length)for(let n=0;n<e.subscriptionUpdates.length;++n)s.websocketpush.WebChannelSubscriptionsUpdate.Payload.SubscriptionUpdate.encode(e.subscriptionUpdates[n],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsUpdate.Payload;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.appChannelUpdates&&r.appChannelUpdates.length||(r.appChannelUpdates=[]),r.appChannelUpdates.push(s.websocketpush.WebChannelSubscriptionsUpdate.Payload.AppChannelUpdates.decode(e,e.uint32()));break;case 2:r.subscriptionUpdates&&r.subscriptionUpdates.length||(r.subscriptionUpdates=[]),r.subscriptionUpdates.push(s.websocketpush.WebChannelSubscriptionsUpdate.Payload.SubscriptionUpdate.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e.SubscriptionStatus=function(){const e={},t=Object.create(e);return t[e[0]="RESEND_SUBSCRIPTIONS"]=0,t}(),e.SubscriptionUpdate=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.subscriptionsStatus=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.subscriptionsStatus&&Object.hasOwnProperty.call(e,"subscriptionsStatus")&&t.uint32(8).int32(e.subscriptionsStatus),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsUpdate.Payload.SubscriptionUpdate;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.subscriptionsStatus=e.int32():e.skipType(7&t)}return r},e}(),e.ChannelStatus=function(){const e={},t=Object.create(e);return t[e[0]="CHANNEL_ID_DOES_NOT_EXIST"]=0,t[e[1]="CHECKPOINT_LATEST"]=1,t[e[2]="TOO_MANY_GLOBAL_SUBSCRIPTIONS"]=2,t}(),e.ChannelUpdate=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.channelId=a.newBuffer([]),e.prototype.channelStatus=0,e.prototype.checkpoint=a.Long?a.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=o.create()),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(10).bytes(e.channelId),null!=e.channelStatus&&Object.hasOwnProperty.call(e,"channelStatus")&&t.uint32(16).int32(e.channelStatus),null!=e.checkpoint&&Object.hasOwnProperty.call(e,"checkpoint")&&t.uint32(24).uint64(e.checkpoint),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsUpdate.Payload.ChannelUpdate;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.channelId=e.bytes();break;case 2:r.channelStatus=e.int32();break;case 3:r.checkpoint=e.uint64();break;default:e.skipType(7&t)}}return r},e}(),e.AppChannelUpdates=function(){function e(e){if(this.channelUpdates=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.appId="",e.prototype.channelUpdates=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.appId&&Object.hasOwnProperty.call(e,"appId")&&t.uint32(10).string(e.appId),null!=e.channelUpdates&&e.channelUpdates.length)for(let n=0;n<e.channelUpdates.length;++n)s.websocketpush.WebChannelSubscriptionsUpdate.Payload.ChannelUpdate.encode(e.channelUpdates[n],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebChannelSubscriptionsUpdate.Payload.AppChannelUpdates;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.appId=e.string();break;case 2:r.channelUpdates&&r.channelUpdates.length||(r.channelUpdates=[]),r.channelUpdates.push(s.websocketpush.WebChannelSubscriptionsUpdate.Payload.ChannelUpdate.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e}(),e}(),e.WebClientToServerMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.channelSubscriptionRequest=null,e.prototype.pushAcknowledgmentMessage=null,e.prototype.webFilterMessage=null,e.prototype.webBootstrapRequest=null,e.prototype.webQueryRequest=null,e.prototype.reversePushMessage=null,e.prototype.jwtRequestMessage=null,Object.defineProperty(e.prototype,"message",{get:a.oneOfGetter(t=["channelSubscriptionRequest","pushAcknowledgmentMessage","webFilterMessage","webBootstrapRequest","webQueryRequest","reversePushMessage","jwtRequestMessage"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.channelSubscriptionRequest&&Object.hasOwnProperty.call(e,"channelSubscriptionRequest")&&s.websocketpush.WebChannelSubscriptionsRequest.encode(e.channelSubscriptionRequest,t.uint32(10).fork()).ldelim(),null!=e.pushAcknowledgmentMessage&&Object.hasOwnProperty.call(e,"pushAcknowledgmentMessage")&&s.AcknowledgementMessage.encode(e.pushAcknowledgmentMessage,t.uint32(18).fork()).ldelim(),null!=e.webFilterMessage&&Object.hasOwnProperty.call(e,"webFilterMessage")&&s.WebFilterMessage.encode(e.webFilterMessage,t.uint32(26).fork()).ldelim(),null!=e.webBootstrapRequest&&Object.hasOwnProperty.call(e,"webBootstrapRequest")&&s.WebBootstrapRequest.encode(e.webBootstrapRequest,t.uint32(34).fork()).ldelim(),null!=e.webQueryRequest&&Object.hasOwnProperty.call(e,"webQueryRequest")&&s.WebQueryRequest.encode(e.webQueryRequest,t.uint32(42).fork()).ldelim(),null!=e.reversePushMessage&&Object.hasOwnProperty.call(e,"reversePushMessage")&&s.WebClientPushMessage.encode(e.reversePushMessage,t.uint32(50).fork()).ldelim(),null!=e.jwtRequestMessage&&Object.hasOwnProperty.call(e,"jwtRequestMessage")&&s.websocketpush.WebJwtRequestMessage.encode(e.jwtRequestMessage,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebClientToServerMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.channelSubscriptionRequest=s.websocketpush.WebChannelSubscriptionsRequest.decode(e,e.uint32());break;case 2:r.pushAcknowledgmentMessage=s.AcknowledgementMessage.decode(e,e.uint32());break;case 3:r.webFilterMessage=s.WebFilterMessage.decode(e,e.uint32());break;case 4:r.webBootstrapRequest=s.WebBootstrapRequest.decode(e,e.uint32());break;case 5:r.webQueryRequest=s.WebQueryRequest.decode(e,e.uint32());break;case 6:r.reversePushMessage=s.WebClientPushMessage.decode(e,e.uint32());break;case 7:r.jwtRequestMessage=s.websocketpush.WebJwtRequestMessage.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e}(),e.ServerToWebClientMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.connectionResponseMessage=null,e.prototype.pushMessage=null,e.prototype.channelSubscriptionResponse=null,e.prototype.channelSubscriptionUpdate=null,e.prototype.webBootstrapResponse=null,e.prototype.webQueryResponse=null,e.prototype.pushAcknowledgmentMessage=null,e.prototype.jwtResponse=null,Object.defineProperty(e.prototype,"message",{get:a.oneOfGetter(t=["connectionResponseMessage","pushMessage","channelSubscriptionResponse","channelSubscriptionUpdate","webBootstrapResponse","webQueryResponse","pushAcknowledgmentMessage","jwtResponse"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.connectionResponseMessage&&Object.hasOwnProperty.call(e,"connectionResponseMessage")&&s.websocketpush.WebConnectionResponseMessage.encode(e.connectionResponseMessage,t.uint32(10).fork()).ldelim(),null!=e.pushMessage&&Object.hasOwnProperty.call(e,"pushMessage")&&s.WebClientPushMessage.encode(e.pushMessage,t.uint32(18).fork()).ldelim(),null!=e.channelSubscriptionResponse&&Object.hasOwnProperty.call(e,"channelSubscriptionResponse")&&s.websocketpush.WebChannelSubscriptionsResponse.encode(e.channelSubscriptionResponse,t.uint32(26).fork()).ldelim(),null!=e.channelSubscriptionUpdate&&Object.hasOwnProperty.call(e,"channelSubscriptionUpdate")&&s.websocketpush.WebChannelSubscriptionsUpdate.encode(e.channelSubscriptionUpdate,t.uint32(34).fork()).ldelim(),null!=e.webBootstrapResponse&&Object.hasOwnProperty.call(e,"webBootstrapResponse")&&s.WebBootstrapResponse.encode(e.webBootstrapResponse,t.uint32(42).fork()).ldelim(),null!=e.webQueryResponse&&Object.hasOwnProperty.call(e,"webQueryResponse")&&s.WebQueryResponse.encode(e.webQueryResponse,t.uint32(50).fork()).ldelim(),null!=e.pushAcknowledgmentMessage&&Object.hasOwnProperty.call(e,"pushAcknowledgmentMessage")&&s.AcknowledgementMessage.encode(e.pushAcknowledgmentMessage,t.uint32(58).fork()).ldelim(),null!=e.jwtResponse&&Object.hasOwnProperty.call(e,"jwtResponse")&&s.websocketpush.WebJwtResponseMessage.encode(e.jwtResponse,t.uint32(66).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.ServerToWebClientMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.connectionResponseMessage=s.websocketpush.WebConnectionResponseMessage.decode(e,e.uint32());break;case 2:r.pushMessage=s.WebClientPushMessage.decode(e,e.uint32());break;case 3:r.channelSubscriptionResponse=s.websocketpush.WebChannelSubscriptionsResponse.decode(e,e.uint32());break;case 4:r.channelSubscriptionUpdate=s.websocketpush.WebChannelSubscriptionsUpdate.decode(e,e.uint32());break;case 5:r.webBootstrapResponse=s.WebBootstrapResponse.decode(e,e.uint32());break;case 6:r.webQueryResponse=s.WebQueryResponse.decode(e,e.uint32());break;case 7:r.pushAcknowledgmentMessage=s.AcknowledgementMessage.decode(e,e.uint32());break;case 8:r.jwtResponse=s.websocketpush.WebJwtResponseMessage.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e}(),e.WebJwtRequestMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.expirationDurationSeconds=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.expirationDurationSeconds&&Object.hasOwnProperty.call(e,"expirationDurationSeconds")&&t.uint32(8).int32(e.expirationDurationSeconds),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebJwtRequestMessage;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.expirationDurationSeconds=e.int32():e.skipType(7&t)}return r},e}(),e.WebJwtResponseMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.jwToken="",e.prototype.status=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.jwToken&&Object.hasOwnProperty.call(e,"jwToken")&&t.uint32(10).string(e.jwToken),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(16).int32(e.status),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.websocketpush.WebJwtResponseMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.jwToken=e.string();break;case 2:r.status=e.int32();break;default:e.skipType(7&t)}}return r},e.Status=function(){const e={},t=Object.create(e);return t[e[0]="STATUS_UNSPECIFIED"]=0,t[e[1]="OK"]=1,t[e[2]="BAD_REQUEST"]=2,t[e[3]="RATE_LIMITED"]=3,t[e[4]="INTERNAL_ERROR"]=4,t}(),e}(),e})();s.IDSWebRegisterRequest=(()=>{function e(e){if(this.services=[],e)for(let 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.ktLoggableData="",e.prototype.clientData=a.newBuffer([]),e.prototype.services=a.emptyArray,e.prototype.featureId="",e.encode=function(e,t){if(t||(t=o.create()),null!=e.username&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),null!=e.ktLoggableData&&Object.hasOwnProperty.call(e,"ktLoggableData")&&t.uint32(18).string(e.ktLoggableData),null!=e.clientData&&Object.hasOwnProperty.call(e,"clientData")&&t.uint32(26).bytes(e.clientData),null!=e.services&&e.services.length)for(let n=0;n<e.services.length;++n)t.uint32(34).string(e.services[n]);return null!=e.featureId&&Object.hasOwnProperty.call(e,"featureId")&&t.uint32(42).string(e.featureId),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.IDSWebRegisterRequest;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.username=e.string();break;case 2:r.ktLoggableData=e.string();break;case 3:r.clientData=e.bytes();break;case 4:r.services&&r.services.length||(r.services=[]),r.services.push(e.string());break;case 5:r.featureId=e.string();break;default:e.skipType(7&t)}}return r},e})(),s.IDSWebQueryRequest=(()=>{function e(e){if(this.queriedUri=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.queriedUri=a.emptyArray,e.prototype.topic=a.newBuffer([]),e.prototype.uuid=a.newBuffer([]),e.prototype.selfUri="",e.encode=function(e,t){if(t||(t=o.create()),null!=e.queriedUri&&e.queriedUri.length)for(let n=0;n<e.queriedUri.length;++n)t.uint32(10).string(e.queriedUri[n]);return null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(18).bytes(e.topic),null!=e.uuid&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(26).bytes(e.uuid),null!=e.selfUri&&Object.hasOwnProperty.call(e,"selfUri")&&t.uint32(34).string(e.selfUri),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.IDSWebQueryRequest;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.queriedUri&&r.queriedUri.length||(r.queriedUri=[]),r.queriedUri.push(e.string());break;case 2:r.topic=e.bytes();break;case 3:r.uuid=e.bytes();break;case 4:r.selfUri=e.string();break;default:e.skipType(7&t)}}return r},e})(),s.WebRequest=(()=>{function e(e){if(this.headers={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.uuid=a.newBuffer([]),e.prototype.payload=a.newBuffer([]),e.prototype.headers=a.emptyObject,e.encode=function(e,t){if(t||(t=o.create()),null!=e.uuid&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(10).bytes(e.uuid),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&t.uint32(18).bytes(e.payload),null!=e.headers&&Object.hasOwnProperty.call(e,"headers"))for(let n=Object.keys(e.headers),r=0;r<n.length;++r)t.uint32(26).fork().uint32(10).string(n[r]).uint32(18).string(e.headers[n[r]]).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n,r,o=void 0===t?e.len:e.pos+t,c=new s.WebRequest;for(;e.pos<o;){let t=e.uint32();switch(t>>>3){case 1:c.uuid=e.bytes();break;case 2:c.payload=e.bytes();break;case 3:c.headers===a.emptyObject&&(c.headers={});let i=e.uint32()+e.pos;for(n="",r="";e.pos<i;){let t=e.uint32();switch(t>>>3){case 1:n=e.string();break;case 2:r=e.string();break;default:e.skipType(7&t)}}c.headers[n]=r;break;default:e.skipType(7&t)}}return c},e})(),s.WebQueryRequest=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.webRequest=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.webRequest&&Object.hasOwnProperty.call(e,"webRequest")&&s.WebRequest.encode(e.webRequest,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebQueryRequest;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.webRequest=s.WebRequest.decode(e,e.uint32()):e.skipType(7&t)}return r},e})(),s.WebBootstrapRequest=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.webRequest=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.webRequest&&Object.hasOwnProperty.call(e,"webRequest")&&s.WebRequest.encode(e.webRequest,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebBootstrapRequest;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.webRequest=s.WebRequest.decode(e,e.uint32()):e.skipType(7&t)}return r},e})(),s.IDSWebRegisterResponse=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.uri="",e.prototype.credentials="",e.encode=function(e,t){return t||(t=o.create()),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(10).string(e.uri),null!=e.credentials&&Object.hasOwnProperty.call(e,"credentials")&&t.uint32(18).string(e.credentials),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.IDSWebRegisterResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.uri=e.string();break;case 2:r.credentials=e.string();break;default:e.skipType(7&t)}}return r},e})(),s.Identity=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.pushToken="",e.prototype.sessionToken="",e.prototype.clientData=a.newBuffer([]),e.prototype.ktLoggableData="",e.prototype.sessionTokenRefreshSeconds=0,e.prototype.sessionTokenExpiresSeconds=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.pushToken&&Object.hasOwnProperty.call(e,"pushToken")&&t.uint32(10).string(e.pushToken),null!=e.sessionToken&&Object.hasOwnProperty.call(e,"sessionToken")&&t.uint32(18).string(e.sessionToken),null!=e.clientData&&Object.hasOwnProperty.call(e,"clientData")&&t.uint32(26).bytes(e.clientData),null!=e.ktLoggableData&&Object.hasOwnProperty.call(e,"ktLoggableData")&&t.uint32(34).string(e.ktLoggableData),null!=e.sessionTokenRefreshSeconds&&Object.hasOwnProperty.call(e,"sessionTokenRefreshSeconds")&&t.uint32(40).int32(e.sessionTokenRefreshSeconds),null!=e.sessionTokenExpiresSeconds&&Object.hasOwnProperty.call(e,"sessionTokenExpiresSeconds")&&t.uint32(48).int32(e.sessionTokenExpiresSeconds),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.Identity;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.pushToken=e.string();break;case 2:r.sessionToken=e.string();break;case 3:r.clientData=e.bytes();break;case 4:r.ktLoggableData=e.string();break;case 5:r.sessionTokenRefreshSeconds=e.int32();break;case 6:r.sessionTokenExpiresSeconds=e.int32();break;default:e.skipType(7&t)}}return r},e})(),s.UriResult=(()=>{function e(e){if(this.identity=[],e)for(let 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.identity=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).uint32(e.status),null!=e.identity&&e.identity.length)for(let n=0;n<e.identity.length;++n)s.Identity.encode(e.identity[n],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.UriResult;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.status=e.uint32();break;case 2:r.identity&&r.identity.length||(r.identity=[]),r.identity.push(s.Identity.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e})(),s.IDSWebQueryResponse=(()=>{function e(e){if(this.results={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.results=a.emptyObject,e.prototype.uuid=a.newBuffer([]),e.prototype.status=0,e.prototype.retryInterval=0,e.encode=function(e,t){if(t||(t=o.create()),null!=e.results&&Object.hasOwnProperty.call(e,"results"))for(let n=Object.keys(e.results),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),s.UriResult.encode(e.results[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.uuid&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(18).bytes(e.uuid),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(24).int32(e.status),null!=e.retryInterval&&Object.hasOwnProperty.call(e,"retryInterval")&&t.uint32(32).int32(e.retryInterval),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n,r,o=void 0===t?e.len:e.pos+t,c=new s.IDSWebQueryResponse;for(;e.pos<o;){let t=e.uint32();switch(t>>>3){case 1:c.results===a.emptyObject&&(c.results={});let i=e.uint32()+e.pos;for(n="",r=null;e.pos<i;){let t=e.uint32();switch(t>>>3){case 1:n=e.string();break;case 2:r=s.UriResult.decode(e,e.uint32());break;default:e.skipType(7&t)}}c.results[n]=r;break;case 2:c.uuid=e.bytes();break;case 3:c.status=e.int32();break;case 4:c.retryInterval=e.int32();break;default:e.skipType(7&t)}}return c},e})(),s.IDSWebResponse=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.webRegisterResponse=null,e.prototype.webQueryResponse=null,Object.defineProperty(e.prototype,"response",{get:a.oneOfGetter(t=["webRegisterResponse","webQueryResponse"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.webRegisterResponse&&Object.hasOwnProperty.call(e,"webRegisterResponse")&&s.IDSWebRegisterResponse.encode(e.webRegisterResponse,t.uint32(10).fork()).ldelim(),null!=e.webQueryResponse&&Object.hasOwnProperty.call(e,"webQueryResponse")&&s.IDSWebQueryResponse.encode(e.webQueryResponse,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.IDSWebResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.webRegisterResponse=s.IDSWebRegisterResponse.decode(e,e.uint32());break;case 2:r.webQueryResponse=s.IDSWebQueryResponse.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e})(),s.WebResponse=(()=>{function e(e){if(this.headers={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.uuid=a.newBuffer([]),e.prototype.payload=a.newBuffer([]),e.prototype.status=0,e.prototype.headers=a.emptyObject,e.prototype.errorMsg="",e.encode=function(e,t){if(t||(t=o.create()),null!=e.uuid&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(10).bytes(e.uuid),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&t.uint32(18).bytes(e.payload),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(24).int32(e.status),null!=e.headers&&Object.hasOwnProperty.call(e,"headers"))for(let n=Object.keys(e.headers),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(18).string(e.headers[n[r]]).ldelim();return null!=e.errorMsg&&Object.hasOwnProperty.call(e,"errorMsg")&&t.uint32(42).string(e.errorMsg),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n,r,o=void 0===t?e.len:e.pos+t,c=new s.WebResponse;for(;e.pos<o;){let t=e.uint32();switch(t>>>3){case 1:c.uuid=e.bytes();break;case 2:c.payload=e.bytes();break;case 3:c.status=e.int32();break;case 4:c.headers===a.emptyObject&&(c.headers={});let i=e.uint32()+e.pos;for(n="",r="";e.pos<i;){let t=e.uint32();switch(t>>>3){case 1:n=e.string();break;case 2:r=e.string();break;default:e.skipType(7&t)}}c.headers[n]=r;break;case 5:c.errorMsg=e.string();break;default:e.skipType(7&t)}}return c},e})(),s.WebQueryResponse=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.webResponse=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.webResponse&&Object.hasOwnProperty.call(e,"webResponse")&&s.WebResponse.encode(e.webResponse,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebQueryResponse;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.webResponse=s.WebResponse.decode(e,e.uint32()):e.skipType(7&t)}return r},e})(),s.WebBootstrapResponse=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.webResponse=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.webResponse&&Object.hasOwnProperty.call(e,"webResponse")&&s.WebResponse.encode(e.webResponse,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebBootstrapResponse;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.webResponse=s.WebResponse.decode(e,e.uint32()):e.skipType(7&t)}return r},e})(),s.WebClientPushMessage=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.topic=a.newBuffer([]),e.prototype.id=0,e.prototype.expirationTimeSecs=0,e.prototype.payload=a.newBuffer([]),e.prototype.channelMetadata=null,e.prototype.uuid=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(10).bytes(e.topic),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).uint32(e.id),null!=e.expirationTimeSecs&&Object.hasOwnProperty.call(e,"expirationTimeSecs")&&t.uint32(24).uint32(e.expirationTimeSecs),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&t.uint32(34).bytes(e.payload),null!=e.channelMetadata&&Object.hasOwnProperty.call(e,"channelMetadata")&&s.WebClientPushMessage.ChannelSubscriptionsPushMetadata.encode(e.channelMetadata,t.uint32(58).fork()).ldelim(),null!=e.uuid&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(66).bytes(e.uuid),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebClientPushMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.topic=e.bytes();break;case 2:r.id=e.uint32();break;case 3:r.expirationTimeSecs=e.uint32();break;case 4:r.payload=e.bytes();break;case 7:r.channelMetadata=s.WebClientPushMessage.ChannelSubscriptionsPushMetadata.decode(e,e.uint32());break;case 8:r.uuid=e.bytes();break;default:e.skipType(7&t)}}return r},e.ChannelSubscriptionsPushMetadata=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.channelId=a.newBuffer([]),e.prototype.checkpoint=a.Long?a.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=o.create()),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(42).bytes(e.channelId),null!=e.checkpoint&&Object.hasOwnProperty.call(e,"checkpoint")&&t.uint32(48).uint64(e.checkpoint),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebClientPushMessage.ChannelSubscriptionsPushMetadata;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 5:r.channelId=e.bytes();break;case 6:r.checkpoint=e.uint64();break;default:e.skipType(7&t)}}return r},e}(),e})(),s.AcknowledgementMessage=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.topic=a.newBuffer([]),e.prototype.id=0,e.prototype.deliveryStatus=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(10).bytes(e.topic),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).uint32(e.id),null!=e.deliveryStatus&&Object.hasOwnProperty.call(e,"deliveryStatus")&&t.uint32(24).int32(e.deliveryStatus),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.AcknowledgementMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.topic=e.bytes();break;case 2:r.id=e.uint32();break;case 3:r.deliveryStatus=e.int32();break;default:e.skipType(7&t)}}return r},e})(),s.WebFilterMessage=(()=>{function e(e){if(this.allowedTopics=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.allowedTopics=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.allowedTopics&&e.allowedTopics.length)for(let n=0;n<e.allowedTopics.length;++n)t.uint32(10).string(e.allowedTopics[n]);return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.WebFilterMessage;for(;e.pos<n;){let t=e.uint32();t>>>3===1?(r.allowedTopics&&r.allowedTopics.length||(r.allowedTopics=[]),r.allowedTopics.push(e.string())):e.skipType(7&t)}return r},e})(),s.ConnectedResponseMessage=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.pushToken="",e.prototype.reconnectToken="",e.encode=function(e,t){return t||(t=o.create()),null!=e.pushToken&&Object.hasOwnProperty.call(e,"pushToken")&&t.uint32(10).string(e.pushToken),null!=e.reconnectToken&&Object.hasOwnProperty.call(e,"reconnectToken")&&t.uint32(26).string(e.reconnectToken),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.ConnectedResponseMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.pushToken=e.string();break;case 3:r.reconnectToken=e.string();break;default:e.skipType(7&t)}}return r},e})(),s.ChallengeNonceRequest=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.nonce=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(26).bytes(e.nonce),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.ChallengeNonceRequest;for(;e.pos<n;){let t=e.uint32();t>>>3===3?r.nonce=e.bytes():e.skipType(7&t)}return r},e})(),s.ChallengeNonceResponse=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.signature=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(10).bytes(e.signature),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.ChallengeNonceResponse;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.signature=e.bytes():e.skipType(7&t)}return r},e})(),s.Message=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.webClientPushMessage=null,e.prototype.acknowledgmentMessage=null,e.prototype.connectedResponseMessage=null,e.prototype.idsWebResponse=null,e.prototype.idsWebQueryRequest=null,e.prototype.challengeNonceRequest=null,e.prototype.challengeNonceResponse=null,Object.defineProperty(e.prototype,"message",{get:a.oneOfGetter(t=["webClientPushMessage","acknowledgmentMessage","connectedResponseMessage","idsWebResponse","idsWebQueryRequest","challengeNonceRequest","challengeNonceResponse"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.webClientPushMessage&&Object.hasOwnProperty.call(e,"webClientPushMessage")&&s.WebClientPushMessage.encode(e.webClientPushMessage,t.uint32(10).fork()).ldelim(),null!=e.acknowledgmentMessage&&Object.hasOwnProperty.call(e,"acknowledgmentMessage")&&s.AcknowledgementMessage.encode(e.acknowledgmentMessage,t.uint32(18).fork()).ldelim(),null!=e.connectedResponseMessage&&Object.hasOwnProperty.call(e,"connectedResponseMessage")&&s.ConnectedResponseMessage.encode(e.connectedResponseMessage,t.uint32(26).fork()).ldelim(),null!=e.idsWebResponse&&Object.hasOwnProperty.call(e,"idsWebResponse")&&s.IDSWebResponse.encode(e.idsWebResponse,t.uint32(34).fork()).ldelim(),null!=e.idsWebQueryRequest&&Object.hasOwnProperty.call(e,"idsWebQueryRequest")&&s.IDSWebQueryRequest.encode(e.idsWebQueryRequest,t.uint32(42).fork()).ldelim(),null!=e.challengeNonceRequest&&Object.hasOwnProperty.call(e,"challengeNonceRequest")&&s.ChallengeNonceRequest.encode(e.challengeNonceRequest,t.uint32(50).fork()).ldelim(),null!=e.challengeNonceResponse&&Object.hasOwnProperty.call(e,"challengeNonceResponse")&&s.ChallengeNonceResponse.encode(e.challengeNonceResponse,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.Message;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.webClientPushMessage=s.WebClientPushMessage.decode(e,e.uint32());break;case 2:r.acknowledgmentMessage=s.AcknowledgementMessage.decode(e,e.uint32());break;case 3:r.connectedResponseMessage=s.ConnectedResponseMessage.decode(e,e.uint32());break;case 4:r.idsWebResponse=s.IDSWebResponse.decode(e,e.uint32());break;case 5:r.idsWebQueryRequest=s.IDSWebQueryRequest.decode(e,e.uint32());break;case 6:r.challengeNonceRequest=s.ChallengeNonceRequest.decode(e,e.uint32());break;case 7:r.challengeNonceResponse=s.ChallengeNonceResponse.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e})(),s.DeliveryStatus=function(){const e={},t=Object.create(e);return t[e[0]="OK"]=0,t[e[1]="OFFLINE"]=1,t[e[2]="FAILED"]=2,t[e[3]="RECEIVED"]=3,t[e[4]="DROPPED"]=4,t}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=()=>{var e,t;return null!==(e=null===(t=performance)||void 0===t?void 0:t.now())&&void 0!==e?e:Date.now()};class i{constructor(){this.start=r(),this.stop=null}stopTimer(){return this.stop=r(),this}get duration(){var e;return(null!==(e=this.stop)&&void 0!==e?e:r())-this.start}}},function(e,t,n){"use strict";function r(e){if(e instanceof Error)throw e;return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1013);Object(r.b)("SessionToken");const i=Object(r.b)("PushToken"),o=Object(r.b)("messageID");var a,s,c;!function(e){e[e.Initiate=1]="Initiate",e[e.Accept=2]="Accept",e[e.Reject=3]="Reject",e[e.Cancel=4]="Cancel",e[e.RelayInitiate=5]="RelayInitiate",e[e.RelayUpdate=6]="RelayUpdate",e[e.RelayCancel=7]="RelayCancel",e[e.SendMessage=8]="SendMessage",e[e.Reregister=32]="Reregister",e[e.DevicesUpdated=34]="DevicesUpdated",e[e.EmailConfirmed=64]="EmailConfirmed",e[e.HandlesUpdated=66]="HandlesUpdated",e[e.ReloadBagPush=90]="ReloadBagPush",e[e.TextMessage=100]="TextMessage",e[e.DeliveryReceipt=101]="DeliveryReceipt",e[e.ReadReceipt=102]="ReadReceipt",e[e.CancelMessage=103]="CancelMessage",e[e.AttachmentMessage=104]="AttachmentMessage",e[e.PlayedReceipt=105]="PlayedReceipt",e[e.SavedReceipt=106]="SavedReceipt",e[e.ReflectedDeliveryReceipt=107]="ReflectedDeliveryReceipt",e[e.CertifiedDeliveryReceipt=109]="CertifiedDeliveryReceipt",e[e.OTRNegotiation=110]="OTRNegotiation",e[e.InternalErrorMessage=115]="InternalErrorMessage",e[e.ErrorMessage=120]="ErrorMessage",e[e.PeerCacheInvalidate=130]="PeerCacheInvalidate",e[e.NicknameUpdate=131]="NicknameUpdate",e[e.SMSTextMessage=140]="SMSTextMessage",e[e.SMSTextDownloadMessage=141]="SMSTextDownloadMessage",e[e.SMSOutgoing=143]="SMSOutgoing",e[e.SMSDownloadOutgoing=144]="SMSDownloadOutgoing",e[e.SMSDeliveryReceipt=146]="SMSDeliveryReceipt",e[e.SMSReadReceipt=147]="SMSReadReceipt",e[e.SMSFailure=149]="SMSFailure",e[e.RequestMMCSUploadAuthToken=150]="RequestMMCSUploadAuthToken",e[e.RequestMMCSDownloadAuthToken=151]="RequestMMCSDownloadAuthToken",e[e.UploadFailure=155]="UploadFailure",e[e.PreUpload=156]="PreUpload",e[e.PreDownload=157]="PreDownload",e[e.OfflineMessagePendingStorageCheck=160]="OfflineMessagePendingStorageCheck",e[e.StorageEmpty=165]="StorageEmpty",e[e.GenericMessage=180]="GenericMessage",e[e.GenericGroupMessage=190]="GenericGroupMessage",e[e.Generic=200]="Generic",e[e.NiceGroupSessionInternalMessage=206]="NiceGroupSessionInternalMessage",e[e.NiceGroupSessionJoin=207]="NiceGroupSessionJoin",e[e.NiceGroupSessionLeave=208]="NiceGroupSessionLeave",e[e.NiceGroupSessionUpdate=209]="NiceGroupSessionUpdate",e[e.NiceGroupSessionPrekey=210]="NiceGroupSessionPrekey",e[e.NiceGroupSessionMKM=211]="NiceGroupSessionMKM",e[e.NiceMessage=227]="NiceMessage",e[e.NiceAttachment=228]="NiceAttachment",e[e.NiceAttachmentInitiate=229]="NiceAttachmentInitiate",e[e.NiceAttachmentAccept=230]="NiceAttachmentAccept",e[e.NiceAttachmentReject=231]="NiceAttachmentReject",e[e.NiceSessionInvitation=232]="NiceSessionInvitation",e[e.NiceSessionAccept=233]="NiceSessionAccept",e[e.NiceSessionDecline=234]="NiceSessionDecline",e[e.NiceSessionCancel=235]="NiceSessionCancel",e[e.NiceSessionMessage=236]="NiceSessionMessage",e[e.NiceSessionEnd=237]="NiceSessionEnd",e[e.NiceGroupSessionMessage=239]="NiceGroupSessionMessage",e[e.NiceData=242]="NiceData",e[e.NiceProtobuf=243]="NiceProtobuf",e[e.NiceAppAck=244]="NiceAppAck",e[e.HomekitAccessoryMessage=250]="HomekitAccessoryMessage",e[e.Response=255]="Response"}(a||(a={})),function(e){e[e.NiceGroupSessionInternalMessage=206]="NiceGroupSessionInternalMessage",e[e.NiceGroupSessionJoin=207]="NiceGroupSessionJoin",e[e.NiceGroupSessionLeave=208]="NiceGroupSessionLeave",e[e.NiceGroupSessionUpdate=209]="NiceGroupSessionUpdate",e[e.NiceGroupSessionPrekey=210]="NiceGroupSessionPrekey",e[e.NiceGroupSessionMKM=211]="NiceGroupSessionMKM",e[e.NiceMessage=227]="NiceMessage",e[e.NiceAttachment=228]="NiceAttachment",e[e.NiceAttachmentInitiate=229]="NiceAttachmentInitiate",e[e.NiceAttachmentAccept=230]="NiceAttachmentAccept",e[e.NiceAttachmentReject=231]="NiceAttachmentReject",e[e.NiceSessionInvitation=232]="NiceSessionInvitation",e[e.NiceSessionAccept=233]="NiceSessionAccept",e[e.NiceSessionDecline=234]="NiceSessionDecline",e[e.NiceSessionCancel=235]="NiceSessionCancel",e[e.NiceSessionMessage=236]="NiceSessionMessage",e[e.NiceSessionEnd=237]="NiceSessionEnd",e[e.NiceGroupSessionMessage=239]="NiceGroupSessionMessage",e[e.NiceData=242]="NiceData",e[e.NiceProtobuf=243]="NiceProtobuf",e[e.NiceAppAck=244]="NiceAppAck"}(s||(s={})),function(e){e.Audio="au",e.Video="vd",e.Photo="ph",e.Other="ot"}(c||(c={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(1079),i=n(1033),o=n(1016),a=n(1011);class s{constructor(){this.handlers=[]}subscribe(e){return this.handlers.push(e),()=>{const t=this.handlers.indexOf(e);if(t<0)throw new o.a(a.b`Handler removed too many times`);this.handlers.splice(t,1)}}async dispatch(e){for(let t=0;t<this.handlers.length;t++){const n=this.handlers[t],r=await n(e);if(r instanceof Error||r)return r;this.handlers[t]!==n&&t--}return!1}async waitFor(e,t,n){return async function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.b`Timeout`,s=!1;const{promise:c,resolve:u}=Object(r.a)(),l=e.subscribe((async e=>!!await t(e)&&(s||l(),s=!0,u(e),!0))),d=Object(i.d)(c,n,o),p=await d;return s||l(),s=!0,p}(this,e,t,n)}}class c extends s{constructor(e,t){super(),this.provider=e,this.topic=t}handleIncomingMessage(e){return this.dispatch({topic:this.topic,...e})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1036),i=n(2148),o=n(1038);const a=Object(r.a)((e=>new i.a(Object(o.a)(e))))},function(e,t,n){"use strict";function r(){const e=new Uint32Array(1);return globalThis.crypto.getRandomValues(e),e[0]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,i,o,a,s,c=n(2217),u=n(1026),l=n(1017),d=n(1025),p=n(1021),f=n(1011),h=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},m=function(){return m=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},m.apply(this,arguments)},g=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},v=/^\[object/;function y(e){return void 0===e&&(e=p.a.Silly),function(t,n,p){var y,b,w=p.value,S=null!==(b=null===(y=t.constructor)||void 0===y?void 0:y.name)&&void 0!==b?b:null,C=S.match(v)?null:Object(c.c)(S).constant();return m(m({},p),{value:function(){for(var t,p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];var y=this.toString();t=Object(l.a)(this)?this.logString:C||(y.match(v)?Object(f.b)(r||(r=h([""],[""]))):Object(c.c)(y).constant());var b=p.slice(),S=b[b.length-1];Object(u.a)(S)?b.pop():S=this.logger;var _=this.logger.activity(S).begin(i||(i=h(["",":",""],["",":",""])),t,n).id(o||(o=h([""],[""])))();b.push(_);var O=Object(d.a)(a||(a=h(["() {"],["() {"]))).level(e);_.log(_.logTransform(O));var E=w.call.apply(w,g([this],b)),I=Object(d.a)(s||(s=h(["}"],["}"]))).level(e);return _.log(_.logTransform(I)),E}})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1034),i=n(2173),o=n(1045);const{group:a,helper:s}=Object(r.b)("uri"),{group:c,helper:u}=Object(r.b)("participantUUID"),{group:l,helper:d}=Object(r.b)("qrid"),{group:p,helper:f}=Object(r.b)("mki",(e=>Object(i.d)(e).toString())),{group:h,helper:m}=Object(r.b)("keyID",(e=>{const t=Object(o.b)(e),n=new Uint8Array(16);return n.set(t),n[6]=15&n[6]|64,n[8]=63&n[8]|128,Object(i.d)(n).toString()})),{group:g,helper:v}=Object(r.b)("groupID"),{group:y,helper:b}=Object(r.b)("nickname")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(1011),i=n(1033);async function o(e,t){let n,r=0;do{r++,n=await e(r)}while(n instanceof Error&&r<t);return n}async function a(e,t){return Promise.race([e(t),Object(i.b)(t,r.b`Timeout expired (${t})`)])}function s(e,t){return e instanceof Error&&(null===t||void 0===t||t(e),!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=s.callservicesd=(()=>{const e={};return e.RelayMessage=function(){function e(e){if(this.protoCall=[],this.otherUniqueProxyIdentifiers=[],this.providers=[],this.remoteParticipantHandles=[],this.routes=[],this.endpointIDSDestinationURIs=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=0,e.prototype.uniqueProxyIdentifier="",e.prototype.destinationID="",e.prototype.sourceIdentifier="",e.prototype.protoCallModelState=null,e.prototype.protoService=0,e.prototype.protoWantsHoldMusic=!1,e.prototype.protoCannotBeAnswered=!1,e.prototype.protoDTMFKey=a.newBuffer([]),e.prototype.protoDisconnectedReason=0,e.prototype.OBSOLETEConferenceIdentifier="",e.prototype.protoVoicemail=!1,e.prototype.callerNameFromNetwork="",e.prototype.protoCall=a.emptyArray,e.prototype.hardPauseDigits="",e.prototype.hardPauseState=0,e.prototype.receivedMessageType=0,e.prototype.protoProtocolVersion=0,e.prototype.protoShouldSuppressRingtone=!1,e.prototype.dummyPayload=a.newBuffer([]),e.prototype.hostCallCreationTime=0,e.prototype.messageSendTime=0,e.prototype.protoNeedsManualInCallSounds=!1,e.prototype.protoCannotRelayAudioOrVideoOnPairedDevice=!1,e.prototype.protoExpectedEndpointOnMessagingDevice=!1,e.prototype.contactIdentifier="",e.prototype.protoCallCapabilitiesState=null,e.prototype.protoSoundRegion=0,e.prototype.protoEmergency=!1,e.prototype.otherUniqueProxyIdentifiers=a.emptyArray,e.prototype.protoCallModel=null,e.prototype.handle=null,e.prototype.protoSOS=!1,e.prototype.providers=a.emptyArray,e.prototype.protoDisplayContext=null,e.prototype.inviteData=null,e.prototype.protoProvider=null,e.prototype.protoVideo=!1,e.prototype.protoUplinkMuted=!1,e.prototype.protoRemoteUplinkMuted=!1,e.prototype.systemVolume=0,e.prototype.localSenderIdentityUUIDString="",e.prototype.remoteParticipantHandles=a.emptyArray,e.prototype.localSenderIdentityAccountUUIDString="",e.prototype.protoTTYType=0,e.prototype.protoSupportsTTYWithVoice=!1,e.prototype.requestActionType=0,e.prototype.routes=a.emptyArray,e.prototype.route=null,e.prototype.endpointIDSDestinationURIs=a.emptyArray,e.prototype.isoCountryCode="",e.prototype.protoPriority=0,e.prototype.protoOriginatingUIType=0,e.prototype.protoFailureExpected=!1,e.prototype.protoSupportsEmergencyFallback=!1,e.encode=function(e,t){if(t||(t=o.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.uniqueProxyIdentifier&&Object.hasOwnProperty.call(e,"uniqueProxyIdentifier")&&t.uint32(18).string(e.uniqueProxyIdentifier),null!=e.destinationID&&Object.hasOwnProperty.call(e,"destinationID")&&t.uint32(26).string(e.destinationID),null!=e.sourceIdentifier&&Object.hasOwnProperty.call(e,"sourceIdentifier")&&t.uint32(34).string(e.sourceIdentifier),null!=e.protoCallModelState&&Object.hasOwnProperty.call(e,"protoCallModelState")&&s.callservicesd.CallModelState.encode(e.protoCallModelState,t.uint32(42).fork()).ldelim(),null!=e.protoService&&Object.hasOwnProperty.call(e,"protoService")&&t.uint32(48).uint32(e.protoService),null!=e.protoWantsHoldMusic&&Object.hasOwnProperty.call(e,"protoWantsHoldMusic")&&t.uint32(56).bool(e.protoWantsHoldMusic),null!=e.protoCannotBeAnswered&&Object.hasOwnProperty.call(e,"protoCannotBeAnswered")&&t.uint32(64).bool(e.protoCannotBeAnswered),null!=e.protoDTMFKey&&Object.hasOwnProperty.call(e,"protoDTMFKey")&&t.uint32(74).bytes(e.protoDTMFKey),null!=e.protoDisconnectedReason&&Object.hasOwnProperty.call(e,"protoDisconnectedReason")&&t.uint32(80).uint32(e.protoDisconnectedReason),null!=e.OBSOLETEConferenceIdentifier&&Object.hasOwnProperty.call(e,"OBSOLETEConferenceIdentifier")&&t.uint32(90).string(e.OBSOLETEConferenceIdentifier),null!=e.protoVoicemail&&Object.hasOwnProperty.call(e,"protoVoicemail")&&t.uint32(96).bool(e.protoVoicemail),null!=e.callerNameFromNetwork&&Object.hasOwnProperty.call(e,"callerNameFromNetwork")&&t.uint32(106).string(e.callerNameFromNetwork),null!=e.protoCall&&e.protoCall.length)for(let n=0;n<e.protoCall.length;++n)s.callservicesd.Call.encode(e.protoCall[n],t.uint32(114).fork()).ldelim();if(null!=e.hardPauseDigits&&Object.hasOwnProperty.call(e,"hardPauseDigits")&&t.uint32(122).string(e.hardPauseDigits),null!=e.hardPauseState&&Object.hasOwnProperty.call(e,"hardPauseState")&&t.uint32(128).uint32(e.hardPauseState),null!=e.receivedMessageType&&Object.hasOwnProperty.call(e,"receivedMessageType")&&t.uint32(136).int32(e.receivedMessageType),null!=e.protoProtocolVersion&&Object.hasOwnProperty.call(e,"protoProtocolVersion")&&t.uint32(144).uint32(e.protoProtocolVersion),null!=e.protoShouldSuppressRingtone&&Object.hasOwnProperty.call(e,"protoShouldSuppressRingtone")&&t.uint32(152).bool(e.protoShouldSuppressRingtone),null!=e.dummyPayload&&Object.hasOwnProperty.call(e,"dummyPayload")&&t.uint32(162).bytes(e.dummyPayload),null!=e.hostCallCreationTime&&Object.hasOwnProperty.call(e,"hostCallCreationTime")&&t.uint32(169).double(e.hostCallCreationTime),null!=e.messageSendTime&&Object.hasOwnProperty.call(e,"messageSendTime")&&t.uint32(177).double(e.messageSendTime),null!=e.protoNeedsManualInCallSounds&&Object.hasOwnProperty.call(e,"protoNeedsManualInCallSounds")&&t.uint32(184).bool(e.protoNeedsManualInCallSounds),null!=e.protoCannotRelayAudioOrVideoOnPairedDevice&&Object.hasOwnProperty.call(e,"protoCannotRelayAudioOrVideoOnPairedDevice")&&t.uint32(192).bool(e.protoCannotRelayAudioOrVideoOnPairedDevice),null!=e.protoExpectedEndpointOnMessagingDevice&&Object.hasOwnProperty.call(e,"protoExpectedEndpointOnMessagingDevice")&&t.uint32(200).bool(e.protoExpectedEndpointOnMessagingDevice),null!=e.contactIdentifier&&Object.hasOwnProperty.call(e,"contactIdentifier")&&t.uint32(210).string(e.contactIdentifier),null!=e.protoCallCapabilitiesState&&Object.hasOwnProperty.call(e,"protoCallCapabilitiesState")&&s.callservicesd.CallCapabilitiesState.encode(e.protoCallCapabilitiesState,t.uint32(218).fork()).ldelim(),null!=e.protoSoundRegion&&Object.hasOwnProperty.call(e,"protoSoundRegion")&&t.uint32(224).uint32(e.protoSoundRegion),null!=e.protoEmergency&&Object.hasOwnProperty.call(e,"protoEmergency")&&t.uint32(232).bool(e.protoEmergency),null!=e.otherUniqueProxyIdentifiers&&e.otherUniqueProxyIdentifiers.length)for(let n=0;n<e.otherUniqueProxyIdentifiers.length;++n)t.uint32(250).string(e.otherUniqueProxyIdentifiers[n]);if(null!=e.protoCallModel&&Object.hasOwnProperty.call(e,"protoCallModel")&&s.callservicesd.CallModel.encode(e.protoCallModel,t.uint32(258).fork()).ldelim(),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(266).fork()).ldelim(),null!=e.protoSOS&&Object.hasOwnProperty.call(e,"protoSOS")&&t.uint32(272).bool(e.protoSOS),null!=e.providers&&e.providers.length)for(let n=0;n<e.providers.length;++n)s.callservicesd.CallProvider.encode(e.providers[n],t.uint32(282).fork()).ldelim();if(null!=e.protoDisplayContext&&Object.hasOwnProperty.call(e,"protoDisplayContext")&&s.callservicesd.CallDisplayContext.encode(e.protoDisplayContext,t.uint32(290).fork()).ldelim(),null!=e.inviteData&&Object.hasOwnProperty.call(e,"inviteData")&&s.callservicesd.AVConferenceInviteData.encode(e.inviteData,t.uint32(298).fork()).ldelim(),null!=e.protoProvider&&Object.hasOwnProperty.call(e,"protoProvider")&&s.callservicesd.CallProvider.encode(e.protoProvider,t.uint32(306).fork()).ldelim(),null!=e.protoVideo&&Object.hasOwnProperty.call(e,"protoVideo")&&t.uint32(312).bool(e.protoVideo),null!=e.protoUplinkMuted&&Object.hasOwnProperty.call(e,"protoUplinkMuted")&&t.uint32(320).bool(e.protoUplinkMuted),null!=e.protoRemoteUplinkMuted&&Object.hasOwnProperty.call(e,"protoRemoteUplinkMuted")&&t.uint32(328).bool(e.protoRemoteUplinkMuted),null!=e.systemVolume&&Object.hasOwnProperty.call(e,"systemVolume")&&t.uint32(341).float(e.systemVolume),null!=e.localSenderIdentityUUIDString&&Object.hasOwnProperty.call(e,"localSenderIdentityUUIDString")&&t.uint32(346).string(e.localSenderIdentityUUIDString),null!=e.remoteParticipantHandles&&e.remoteParticipantHandles.length)for(let n=0;n<e.remoteParticipantHandles.length;++n)s.callservicesd.Handle.encode(e.remoteParticipantHandles[n],t.uint32(354).fork()).ldelim();if(null!=e.localSenderIdentityAccountUUIDString&&Object.hasOwnProperty.call(e,"localSenderIdentityAccountUUIDString")&&t.uint32(362).string(e.localSenderIdentityAccountUUIDString),null!=e.protoTTYType&&Object.hasOwnProperty.call(e,"protoTTYType")&&t.uint32(368).uint32(e.protoTTYType),null!=e.protoSupportsTTYWithVoice&&Object.hasOwnProperty.call(e,"protoSupportsTTYWithVoice")&&t.uint32(376).bool(e.protoSupportsTTYWithVoice),null!=e.requestActionType&&Object.hasOwnProperty.call(e,"requestActionType")&&t.uint32(384).int32(e.requestActionType),null!=e.routes&&e.routes.length)for(let n=0;n<e.routes.length;++n)s.callservicesd.Route.encode(e.routes[n],t.uint32(394).fork()).ldelim();if(null!=e.route&&Object.hasOwnProperty.call(e,"route")&&s.callservicesd.Route.encode(e.route,t.uint32(402).fork()).ldelim(),null!=e.endpointIDSDestinationURIs&&e.endpointIDSDestinationURIs.length)for(let n=0;n<e.endpointIDSDestinationURIs.length;++n)t.uint32(410).string(e.endpointIDSDestinationURIs[n]);return null!=e.isoCountryCode&&Object.hasOwnProperty.call(e,"isoCountryCode")&&t.uint32(418).string(e.isoCountryCode),null!=e.protoPriority&&Object.hasOwnProperty.call(e,"protoPriority")&&t.uint32(424).uint32(e.protoPriority),null!=e.protoOriginatingUIType&&Object.hasOwnProperty.call(e,"protoOriginatingUIType")&&t.uint32(432).uint32(e.protoOriginatingUIType),null!=e.protoFailureExpected&&Object.hasOwnProperty.call(e,"protoFailureExpected")&&t.uint32(440).bool(e.protoFailureExpected),null!=e.protoSupportsEmergencyFallback&&Object.hasOwnProperty.call(e,"protoSupportsEmergencyFallback")&&t.uint32(448).bool(e.protoSupportsEmergencyFallback),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.RelayMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.type=e.int32();break;case 2:r.uniqueProxyIdentifier=e.string();break;case 3:r.destinationID=e.string();break;case 4:r.sourceIdentifier=e.string();break;case 5:r.protoCallModelState=s.callservicesd.CallModelState.decode(e,e.uint32());break;case 6:r.protoService=e.uint32();break;case 7:r.protoWantsHoldMusic=e.bool();break;case 8:r.protoCannotBeAnswered=e.bool();break;case 9:r.protoDTMFKey=e.bytes();break;case 10:r.protoDisconnectedReason=e.uint32();break;case 11:r.OBSOLETEConferenceIdentifier=e.string();break;case 12:r.protoVoicemail=e.bool();break;case 13:r.callerNameFromNetwork=e.string();break;case 14:r.protoCall&&r.protoCall.length||(r.protoCall=[]),r.protoCall.push(s.callservicesd.Call.decode(e,e.uint32()));break;case 15:r.hardPauseDigits=e.string();break;case 16:r.hardPauseState=e.uint32();break;case 17:r.receivedMessageType=e.int32();break;case 18:r.protoProtocolVersion=e.uint32();break;case 19:r.protoShouldSuppressRingtone=e.bool();break;case 20:r.dummyPayload=e.bytes();break;case 21:r.hostCallCreationTime=e.double();break;case 22:r.messageSendTime=e.double();break;case 23:r.protoNeedsManualInCallSounds=e.bool();break;case 24:r.protoCannotRelayAudioOrVideoOnPairedDevice=e.bool();break;case 25:r.protoExpectedEndpointOnMessagingDevice=e.bool();break;case 26:r.contactIdentifier=e.string();break;case 27:r.protoCallCapabilitiesState=s.callservicesd.CallCapabilitiesState.decode(e,e.uint32());break;case 28:r.protoSoundRegion=e.uint32();break;case 29:r.protoEmergency=e.bool();break;case 31:r.otherUniqueProxyIdentifiers&&r.otherUniqueProxyIdentifiers.length||(r.otherUniqueProxyIdentifiers=[]),r.otherUniqueProxyIdentifiers.push(e.string());break;case 32:r.protoCallModel=s.callservicesd.CallModel.decode(e,e.uint32());break;case 33:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 34:r.protoSOS=e.bool();break;case 35:r.providers&&r.providers.length||(r.providers=[]),r.providers.push(s.callservicesd.CallProvider.decode(e,e.uint32()));break;case 36:r.protoDisplayContext=s.callservicesd.CallDisplayContext.decode(e,e.uint32());break;case 37:r.inviteData=s.callservicesd.AVConferenceInviteData.decode(e,e.uint32());break;case 38:r.protoProvider=s.callservicesd.CallProvider.decode(e,e.uint32());break;case 39:r.protoVideo=e.bool();break;case 40:r.protoUplinkMuted=e.bool();break;case 41:r.protoRemoteUplinkMuted=e.bool();break;case 42:r.systemVolume=e.float();break;case 43:r.localSenderIdentityUUIDString=e.string();break;case 44:r.remoteParticipantHandles&&r.remoteParticipantHandles.length||(r.remoteParticipantHandles=[]),r.remoteParticipantHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;case 45:r.localSenderIdentityAccountUUIDString=e.string();break;case 46:r.protoTTYType=e.uint32();break;case 47:r.protoSupportsTTYWithVoice=e.bool();break;case 48:r.requestActionType=e.int32();break;case 49:r.routes&&r.routes.length||(r.routes=[]),r.routes.push(s.callservicesd.Route.decode(e,e.uint32()));break;case 50:r.route=s.callservicesd.Route.decode(e,e.uint32());break;case 51:r.endpointIDSDestinationURIs&&r.endpointIDSDestinationURIs.length||(r.endpointIDSDestinationURIs=[]),r.endpointIDSDestinationURIs.push(e.string());break;case 52:r.isoCountryCode=e.string();break;case 53:r.protoPriority=e.uint32();break;case 54:r.protoOriginatingUIType=e.uint32();break;case 55:r.protoFailureExpected=e.bool();break;case 56:r.protoSupportsEmergencyFallback=e.bool();break;default:e.skipType(7&t)}}return r},e.RelayMessageType=function(){const e={},t=Object.create(e);return t[e[0]="NoAction"]=0,t[e[1]="IncomingCall"]=1,t[e[2]="DialCall"]=2,t[e[3]="CallDialed"]=3,t[e[4]="AnswerCall"]=4,t[e[5]="CallAnsweredElsewhere"]=5,t[e[6]="CallDisconnected"]=6,t[e[7]="PlayDTMFToneForKey"]=7,t[e[8]="CallConnected"]=8,t[e[9]="DisconnectCall"]=9,t[e[10]="PullRelayingCalls"]=10,t[e[11]="HoldCall"]=11,t[e[12]="UnholdCall"]=12,t[e[13]="GroupCall"]=13,t[e[14]="UngroupCall"]=14,t[e[15]="ResetWantsHoldMusic"]=15,t[e[16]="SwapCalls"]=16,t[e[17]="UpdateCallModel"]=17,t[e[18]="DeviceUnavailable"]=18,t[e[19]="EndActiveAndAnswer"]=19,t[e[20]="EndHeldAndAnswer"]=20,t[e[21]="DisconnectCurrentCallAndActivateHeld"]=21,t[e[22]="DisconnectAllCalls"]=22,t[e[23]="ResetState"]=23,t[e[24]="HardPauseDigitsAvailability"]=24,t[e[25]="SendHardPauseDigits"]=25,t[e[26]="UpdateRemoteCallState"]=26,t[e[27]="SuppressRingtone"]=27,t[e[28]="RequestCallContext"]=28,t[e[29]="CallStartedConnecting"]=29,t[e[30]="PushHostedCalls"]=30,t[e[31]="PullHostedCalls"]=31,t[e[32]="PushRelayingCalls"]=32,t[e[33]="UpdateCallContext"]=33,t[e[34]="NeedsManualInCallSoundsChange"]=34,t[e[35]="InvitationSent"]=35,t[e[36]="HoldActiveAndAnswer"]=36,t[e[37]="UpdateCallDisplayContext"]=37,t[e[38]="SetUplinkMuted"]=38,t[e[39]="UpdateRemoteUplinkMuted"]=39,t[e[40]="UpdateSystemVolume"]=40,t[e[41]="UpdateSupportsTTYWithVoice"]=41,t[e[42]="SetTTYType"]=42,t[e[43]="RequestAction"]=43,t[e[44]="UpdateRoutes"]=44,t[e[45]="PickRoute"]=45,t[e[46]="DowngradeToAudio"]=46,t[e[47]="UpdateFailureExpected"]=47,t[e[48]="UpdateSupportsEmergencyFallback"]=48,t}(),e}(),e.Call=function(){function e(e){if(this.remoteParticipantHandles=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.uniqueProxyIdentifier="",e.prototype.protoStatus=0,e.prototype.protoConferenced=!1,e.prototype.destinationID="",e.prototype.sourceIdentifier="",e.prototype.protoService=0,e.prototype.protoWantsHoldMusic=!1,e.prototype.protoDisconnectedReason=0,e.prototype.protoVoicemail=!1,e.prototype.callerNameFromNetwork="",e.prototype.protoTimeConnected=0,e.prototype.protoOutgoing=!1,e.prototype.protoShouldSuppressRingtone=!1,e.prototype.protoNeedsManualInCallSounds=!1,e.prototype.protoSoundRegion=0,e.prototype.protoEmergency=!1,e.prototype.protoHasSentInvitation=!1,e.prototype.handle=null,e.prototype.protoSOS=!1,e.prototype.protoProvider=null,e.prototype.protoVideo=!1,e.prototype.protoUplinkMuted=!1,e.prototype.protoCallModel=null,e.prototype.localSenderIdentityUUIDString="",e.prototype.remoteParticipantHandles=a.emptyArray,e.prototype.localSenderIdentityAccountUUIDString="",e.prototype.protoTTYType=0,e.prototype.protoSupportsTTYWithVoice=!1,e.prototype.isoCountryCode="",e.prototype.protoOriginatingUIType=0,e.prototype.protoFailureExpected=!1,e.prototype.protoSupportsEmergencyFallback=!1,e.encode=function(e,t){if(t||(t=o.create()),null!=e.uniqueProxyIdentifier&&Object.hasOwnProperty.call(e,"uniqueProxyIdentifier")&&t.uint32(10).string(e.uniqueProxyIdentifier),null!=e.protoStatus&&Object.hasOwnProperty.call(e,"protoStatus")&&t.uint32(16).uint32(e.protoStatus),null!=e.protoConferenced&&Object.hasOwnProperty.call(e,"protoConferenced")&&t.uint32(24).bool(e.protoConferenced),null!=e.destinationID&&Object.hasOwnProperty.call(e,"destinationID")&&t.uint32(34).string(e.destinationID),null!=e.sourceIdentifier&&Object.hasOwnProperty.call(e,"sourceIdentifier")&&t.uint32(42).string(e.sourceIdentifier),null!=e.protoService&&Object.hasOwnProperty.call(e,"protoService")&&t.uint32(48).uint32(e.protoService),null!=e.protoWantsHoldMusic&&Object.hasOwnProperty.call(e,"protoWantsHoldMusic")&&t.uint32(56).bool(e.protoWantsHoldMusic),null!=e.protoDisconnectedReason&&Object.hasOwnProperty.call(e,"protoDisconnectedReason")&&t.uint32(64).uint32(e.protoDisconnectedReason),null!=e.protoVoicemail&&Object.hasOwnProperty.call(e,"protoVoicemail")&&t.uint32(72).bool(e.protoVoicemail),null!=e.callerNameFromNetwork&&Object.hasOwnProperty.call(e,"callerNameFromNetwork")&&t.uint32(82).string(e.callerNameFromNetwork),null!=e.protoTimeConnected&&Object.hasOwnProperty.call(e,"protoTimeConnected")&&t.uint32(89).double(e.protoTimeConnected),null!=e.protoOutgoing&&Object.hasOwnProperty.call(e,"protoOutgoing")&&t.uint32(96).bool(e.protoOutgoing),null!=e.protoShouldSuppressRingtone&&Object.hasOwnProperty.call(e,"protoShouldSuppressRingtone")&&t.uint32(104).bool(e.protoShouldSuppressRingtone),null!=e.protoNeedsManualInCallSounds&&Object.hasOwnProperty.call(e,"protoNeedsManualInCallSounds")&&t.uint32(112).bool(e.protoNeedsManualInCallSounds),null!=e.protoSoundRegion&&Object.hasOwnProperty.call(e,"protoSoundRegion")&&t.uint32(120).uint32(e.protoSoundRegion),null!=e.protoEmergency&&Object.hasOwnProperty.call(e,"protoEmergency")&&t.uint32(128).bool(e.protoEmergency),null!=e.protoHasSentInvitation&&Object.hasOwnProperty.call(e,"protoHasSentInvitation")&&t.uint32(136).bool(e.protoHasSentInvitation),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(146).fork()).ldelim(),null!=e.protoSOS&&Object.hasOwnProperty.call(e,"protoSOS")&&t.uint32(152).bool(e.protoSOS),null!=e.protoProvider&&Object.hasOwnProperty.call(e,"protoProvider")&&s.callservicesd.CallProvider.encode(e.protoProvider,t.uint32(162).fork()).ldelim(),null!=e.protoVideo&&Object.hasOwnProperty.call(e,"protoVideo")&&t.uint32(168).bool(e.protoVideo),null!=e.protoUplinkMuted&&Object.hasOwnProperty.call(e,"protoUplinkMuted")&&t.uint32(176).bool(e.protoUplinkMuted),null!=e.protoCallModel&&Object.hasOwnProperty.call(e,"protoCallModel")&&s.callservicesd.CallModel.encode(e.protoCallModel,t.uint32(186).fork()).ldelim(),null!=e.localSenderIdentityUUIDString&&Object.hasOwnProperty.call(e,"localSenderIdentityUUIDString")&&t.uint32(194).string(e.localSenderIdentityUUIDString),null!=e.remoteParticipantHandles&&e.remoteParticipantHandles.length)for(let n=0;n<e.remoteParticipantHandles.length;++n)s.callservicesd.Handle.encode(e.remoteParticipantHandles[n],t.uint32(202).fork()).ldelim();return null!=e.localSenderIdentityAccountUUIDString&&Object.hasOwnProperty.call(e,"localSenderIdentityAccountUUIDString")&&t.uint32(210).string(e.localSenderIdentityAccountUUIDString),null!=e.protoTTYType&&Object.hasOwnProperty.call(e,"protoTTYType")&&t.uint32(216).uint32(e.protoTTYType),null!=e.protoSupportsTTYWithVoice&&Object.hasOwnProperty.call(e,"protoSupportsTTYWithVoice")&&t.uint32(224).bool(e.protoSupportsTTYWithVoice),null!=e.isoCountryCode&&Object.hasOwnProperty.call(e,"isoCountryCode")&&t.uint32(234).string(e.isoCountryCode),null!=e.protoOriginatingUIType&&Object.hasOwnProperty.call(e,"protoOriginatingUIType")&&t.uint32(240).uint32(e.protoOriginatingUIType),null!=e.protoFailureExpected&&Object.hasOwnProperty.call(e,"protoFailureExpected")&&t.uint32(248).bool(e.protoFailureExpected),null!=e.protoSupportsEmergencyFallback&&Object.hasOwnProperty.call(e,"protoSupportsEmergencyFallback")&&t.uint32(256).bool(e.protoSupportsEmergencyFallback),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.Call;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.uniqueProxyIdentifier=e.string();break;case 2:r.protoStatus=e.uint32();break;case 3:r.protoConferenced=e.bool();break;case 4:r.destinationID=e.string();break;case 5:r.sourceIdentifier=e.string();break;case 6:r.protoService=e.uint32();break;case 7:r.protoWantsHoldMusic=e.bool();break;case 8:r.protoDisconnectedReason=e.uint32();break;case 9:r.protoVoicemail=e.bool();break;case 10:r.callerNameFromNetwork=e.string();break;case 11:r.protoTimeConnected=e.double();break;case 12:r.protoOutgoing=e.bool();break;case 13:r.protoShouldSuppressRingtone=e.bool();break;case 14:r.protoNeedsManualInCallSounds=e.bool();break;case 15:r.protoSoundRegion=e.uint32();break;case 16:r.protoEmergency=e.bool();break;case 17:r.protoHasSentInvitation=e.bool();break;case 18:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 19:r.protoSOS=e.bool();break;case 20:r.protoProvider=s.callservicesd.CallProvider.decode(e,e.uint32());break;case 21:r.protoVideo=e.bool();break;case 22:r.protoUplinkMuted=e.bool();break;case 23:r.protoCallModel=s.callservicesd.CallModel.decode(e,e.uint32());break;case 24:r.localSenderIdentityUUIDString=e.string();break;case 25:r.remoteParticipantHandles&&r.remoteParticipantHandles.length||(r.remoteParticipantHandles=[]),r.remoteParticipantHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;case 26:r.localSenderIdentityAccountUUIDString=e.string();break;case 27:r.protoTTYType=e.uint32();break;case 28:r.protoSupportsTTYWithVoice=e.bool();break;case 29:r.isoCountryCode=e.string();break;case 30:r.protoOriginatingUIType=e.uint32();break;case 31:r.protoFailureExpected=e.bool();break;case 32:r.protoSupportsEmergencyFallback=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.CallModel=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.supportsHolding=!1,e.prototype.supportsGrouping=!1,e.prototype.supportsUngrouping=!1,e.prototype.supportsDTMF=!1,e.prototype.supportsUnambiguousMultiPartyState=!1,e.prototype.supportsAddCall=!1,e.prototype.supportsSendingToVoicemail=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.supportsHolding&&Object.hasOwnProperty.call(e,"supportsHolding")&&t.uint32(8).bool(e.supportsHolding),null!=e.supportsGrouping&&Object.hasOwnProperty.call(e,"supportsGrouping")&&t.uint32(16).bool(e.supportsGrouping),null!=e.supportsUngrouping&&Object.hasOwnProperty.call(e,"supportsUngrouping")&&t.uint32(24).bool(e.supportsUngrouping),null!=e.supportsDTMF&&Object.hasOwnProperty.call(e,"supportsDTMF")&&t.uint32(32).bool(e.supportsDTMF),null!=e.supportsUnambiguousMultiPartyState&&Object.hasOwnProperty.call(e,"supportsUnambiguousMultiPartyState")&&t.uint32(48).bool(e.supportsUnambiguousMultiPartyState),null!=e.supportsAddCall&&Object.hasOwnProperty.call(e,"supportsAddCall")&&t.uint32(56).bool(e.supportsAddCall),null!=e.supportsSendingToVoicemail&&Object.hasOwnProperty.call(e,"supportsSendingToVoicemail")&&t.uint32(64).bool(e.supportsSendingToVoicemail),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallModel;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.supportsHolding=e.bool();break;case 2:r.supportsGrouping=e.bool();break;case 3:r.supportsUngrouping=e.bool();break;case 4:r.supportsDTMF=e.bool();break;case 6:r.supportsUnambiguousMultiPartyState=e.bool();break;case 7:r.supportsAddCall=e.bool();break;case 8:r.supportsSendingToVoicemail=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.CallCapabilitiesState=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.faceTimeAudioAvailable=!1,e.prototype.faceTimeVideoAvailable=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.faceTimeAudioAvailable&&Object.hasOwnProperty.call(e,"faceTimeAudioAvailable")&&t.uint32(8).bool(e.faceTimeAudioAvailable),null!=e.faceTimeVideoAvailable&&Object.hasOwnProperty.call(e,"faceTimeVideoAvailable")&&t.uint32(16).bool(e.faceTimeVideoAvailable),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallCapabilitiesState;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.faceTimeAudioAvailable=e.bool();break;case 2:r.faceTimeVideoAvailable=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.CallProvider=function(){function e(e){if(this.handoffIdentifier=[],this.protoSupportedHandleType=[],this.emergencyLabeledHandles=[],this.prioritizedSenderIdentities=[],this.emergencyHandles=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.identifier="",e.prototype.localizedName="",e.prototype.bundleURLString="",e.prototype.maximumCallGroups=0,e.prototype.maximumCallsPerCallGroup=0,e.prototype.supportsAudioOnly=!1,e.prototype.supportsAudioAndVideo=!1,e.prototype.supportsEmergency=!1,e.prototype.supportsVoicemail=!1,e.prototype.ringtoneSoundURLString="",e.prototype.originalRingtoneSoundURLString="",e.prototype.handoffIdentifier=a.emptyArray,e.prototype.protoSupportedHandleType=a.emptyArray,e.prototype.emergencyLabeledHandles=a.emptyArray,e.prototype.supportsRecents=!1,e.prototype.prioritizedSenderIdentities=a.emptyArray,e.prototype.emergencyHandles=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.identifier&&Object.hasOwnProperty.call(e,"identifier")&&t.uint32(10).string(e.identifier),null!=e.localizedName&&Object.hasOwnProperty.call(e,"localizedName")&&t.uint32(18).string(e.localizedName),null!=e.bundleURLString&&Object.hasOwnProperty.call(e,"bundleURLString")&&t.uint32(26).string(e.bundleURLString),null!=e.maximumCallGroups&&Object.hasOwnProperty.call(e,"maximumCallGroups")&&t.uint32(32).uint32(e.maximumCallGroups),null!=e.maximumCallsPerCallGroup&&Object.hasOwnProperty.call(e,"maximumCallsPerCallGroup")&&t.uint32(40).uint32(e.maximumCallsPerCallGroup),null!=e.supportsAudioOnly&&Object.hasOwnProperty.call(e,"supportsAudioOnly")&&t.uint32(48).bool(e.supportsAudioOnly),null!=e.supportsAudioAndVideo&&Object.hasOwnProperty.call(e,"supportsAudioAndVideo")&&t.uint32(56).bool(e.supportsAudioAndVideo),null!=e.supportsEmergency&&Object.hasOwnProperty.call(e,"supportsEmergency")&&t.uint32(64).bool(e.supportsEmergency),null!=e.supportsVoicemail&&Object.hasOwnProperty.call(e,"supportsVoicemail")&&t.uint32(72).bool(e.supportsVoicemail),null!=e.ringtoneSoundURLString&&Object.hasOwnProperty.call(e,"ringtoneSoundURLString")&&t.uint32(82).string(e.ringtoneSoundURLString),null!=e.originalRingtoneSoundURLString&&Object.hasOwnProperty.call(e,"originalRingtoneSoundURLString")&&t.uint32(90).string(e.originalRingtoneSoundURLString),null!=e.handoffIdentifier&&e.handoffIdentifier.length)for(let n=0;n<e.handoffIdentifier.length;++n)t.uint32(98).string(e.handoffIdentifier[n]);if(null!=e.protoSupportedHandleType&&e.protoSupportedHandleType.length)for(let n=0;n<e.protoSupportedHandleType.length;++n)t.uint32(104).uint32(e.protoSupportedHandleType[n]);if(null!=e.emergencyLabeledHandles&&e.emergencyLabeledHandles.length)for(let n=0;n<e.emergencyLabeledHandles.length;++n)s.callservicesd.LabeledHandle.encode(e.emergencyLabeledHandles[n],t.uint32(114).fork()).ldelim();if(null!=e.supportsRecents&&Object.hasOwnProperty.call(e,"supportsRecents")&&t.uint32(120).bool(e.supportsRecents),null!=e.prioritizedSenderIdentities&&e.prioritizedSenderIdentities.length)for(let n=0;n<e.prioritizedSenderIdentities.length;++n)s.callservicesd.SenderIdentity.encode(e.prioritizedSenderIdentities[n],t.uint32(130).fork()).ldelim();if(null!=e.emergencyHandles&&e.emergencyHandles.length)for(let n=0;n<e.emergencyHandles.length;++n)s.callservicesd.Handle.encode(e.emergencyHandles[n],t.uint32(138).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallProvider;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.identifier=e.string();break;case 2:r.localizedName=e.string();break;case 3:r.bundleURLString=e.string();break;case 4:r.maximumCallGroups=e.uint32();break;case 5:r.maximumCallsPerCallGroup=e.uint32();break;case 6:r.supportsAudioOnly=e.bool();break;case 7:r.supportsAudioAndVideo=e.bool();break;case 8:r.supportsEmergency=e.bool();break;case 9:r.supportsVoicemail=e.bool();break;case 10:r.ringtoneSoundURLString=e.string();break;case 11:r.originalRingtoneSoundURLString=e.string();break;case 12:r.handoffIdentifier&&r.handoffIdentifier.length||(r.handoffIdentifier=[]),r.handoffIdentifier.push(e.string());break;case 13:if(r.protoSupportedHandleType&&r.protoSupportedHandleType.length||(r.protoSupportedHandleType=[]),2===(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)r.protoSupportedHandleType.push(e.uint32())}else r.protoSupportedHandleType.push(e.uint32());break;case 14:r.emergencyLabeledHandles&&r.emergencyLabeledHandles.length||(r.emergencyLabeledHandles=[]),r.emergencyLabeledHandles.push(s.callservicesd.LabeledHandle.decode(e,e.uint32()));break;case 15:r.supportsRecents=e.bool();break;case 16:r.prioritizedSenderIdentities&&r.prioritizedSenderIdentities.length||(r.prioritizedSenderIdentities=[]),r.prioritizedSenderIdentities.push(s.callservicesd.SenderIdentity.decode(e,e.uint32()));break;case 17:r.emergencyHandles&&r.emergencyHandles.length||(r.emergencyHandles=[]),r.emergencyHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e.CallModelState=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.ambiguityState=0,e.prototype.swappable=!1,e.prototype.mergeable=!1,e.prototype.holdAllowed=!1,e.prototype.addCallAllowed=!1,e.prototype.takingCallsPrivateAllowed=!1,e.prototype.hardPauseAvailable=!1,e.prototype.endAndAnswerAllowed=!1,e.prototype.holdAndAnswerAllowed=!1,e.prototype.sendToVoicemailAllowed=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.ambiguityState&&Object.hasOwnProperty.call(e,"ambiguityState")&&t.uint32(8).uint32(e.ambiguityState),null!=e.swappable&&Object.hasOwnProperty.call(e,"swappable")&&t.uint32(16).bool(e.swappable),null!=e.mergeable&&Object.hasOwnProperty.call(e,"mergeable")&&t.uint32(24).bool(e.mergeable),null!=e.holdAllowed&&Object.hasOwnProperty.call(e,"holdAllowed")&&t.uint32(32).bool(e.holdAllowed),null!=e.addCallAllowed&&Object.hasOwnProperty.call(e,"addCallAllowed")&&t.uint32(40).bool(e.addCallAllowed),null!=e.takingCallsPrivateAllowed&&Object.hasOwnProperty.call(e,"takingCallsPrivateAllowed")&&t.uint32(48).bool(e.takingCallsPrivateAllowed),null!=e.hardPauseAvailable&&Object.hasOwnProperty.call(e,"hardPauseAvailable")&&t.uint32(56).bool(e.hardPauseAvailable),null!=e.endAndAnswerAllowed&&Object.hasOwnProperty.call(e,"endAndAnswerAllowed")&&t.uint32(64).bool(e.endAndAnswerAllowed),null!=e.holdAndAnswerAllowed&&Object.hasOwnProperty.call(e,"holdAndAnswerAllowed")&&t.uint32(72).bool(e.holdAndAnswerAllowed),null!=e.sendToVoicemailAllowed&&Object.hasOwnProperty.call(e,"sendToVoicemailAllowed")&&t.uint32(80).bool(e.sendToVoicemailAllowed),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallModelState;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.ambiguityState=e.uint32();break;case 2:r.swappable=e.bool();break;case 3:r.mergeable=e.bool();break;case 4:r.holdAllowed=e.bool();break;case 5:r.addCallAllowed=e.bool();break;case 6:r.takingCallsPrivateAllowed=e.bool();break;case 7:r.hardPauseAvailable=e.bool();break;case 8:r.endAndAnswerAllowed=e.bool();break;case 9:r.holdAndAnswerAllowed=e.bool();break;case 10:r.sendToVoicemailAllowed=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.CallMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=0,e.prototype.protoProtocolVersion=0,e.prototype.protoWantsVideo=!1,e.prototype.inviteData=null,e.prototype.OBSOLETEProtoMomentsAvailable=!1,e.prototype.protoSenderMuteUplink=!1,e.prototype.protoShouldSuppressInCallUI=!1,e.prototype.protoMomentsV2Available=!1,e.prototype.protoUpgradeSessionUUID="",e.encode=function(e,t){return t||(t=o.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.protoProtocolVersion&&Object.hasOwnProperty.call(e,"protoProtocolVersion")&&t.uint32(16).uint32(e.protoProtocolVersion),null!=e.protoWantsVideo&&Object.hasOwnProperty.call(e,"protoWantsVideo")&&t.uint32(24).bool(e.protoWantsVideo),null!=e.inviteData&&Object.hasOwnProperty.call(e,"inviteData")&&s.callservicesd.AVConferenceInviteData.encode(e.inviteData,t.uint32(34).fork()).ldelim(),null!=e.OBSOLETEProtoMomentsAvailable&&Object.hasOwnProperty.call(e,"OBSOLETEProtoMomentsAvailable")&&t.uint32(40).bool(e.OBSOLETEProtoMomentsAvailable),null!=e.protoSenderMuteUplink&&Object.hasOwnProperty.call(e,"protoSenderMuteUplink")&&t.uint32(48).bool(e.protoSenderMuteUplink),null!=e.protoShouldSuppressInCallUI&&Object.hasOwnProperty.call(e,"protoShouldSuppressInCallUI")&&t.uint32(56).bool(e.protoShouldSuppressInCallUI),null!=e.protoMomentsV2Available&&Object.hasOwnProperty.call(e,"protoMomentsV2Available")&&t.uint32(64).bool(e.protoMomentsV2Available),null!=e.protoUpgradeSessionUUID&&Object.hasOwnProperty.call(e,"protoUpgradeSessionUUID")&&t.uint32(74).string(e.protoUpgradeSessionUUID),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.type=e.int32();break;case 2:r.protoProtocolVersion=e.uint32();break;case 3:r.protoWantsVideo=e.bool();break;case 4:r.inviteData=s.callservicesd.AVConferenceInviteData.decode(e,e.uint32());break;case 5:r.OBSOLETEProtoMomentsAvailable=e.bool();break;case 6:r.protoSenderMuteUplink=e.bool();break;case 7:r.protoShouldSuppressInCallUI=e.bool();break;case 8:r.protoMomentsV2Available=e.bool();break;case 9:r.protoUpgradeSessionUUID=e.string();break;default:e.skipType(7&t)}}return r},e.CallMessageType=function(){const e={},t=Object.create(e);return t[e[0]="Unknown"]=0,t[e[1]="Invite"]=1,t[e[2]="SenderMuteUplink"]=2,t}(),e}(),e.AVConferenceInviteData=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.SKEBlob=a.newBuffer([]),e.prototype.mediaBlob=a.newBuffer([]),e.prototype.callInfoBlob=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.SKEBlob&&Object.hasOwnProperty.call(e,"SKEBlob")&&t.uint32(10).bytes(e.SKEBlob),null!=e.mediaBlob&&Object.hasOwnProperty.call(e,"mediaBlob")&&t.uint32(18).bytes(e.mediaBlob),null!=e.callInfoBlob&&Object.hasOwnProperty.call(e,"callInfoBlob")&&t.uint32(26).bytes(e.callInfoBlob),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.AVConferenceInviteData;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.SKEBlob=e.bytes();break;case 2:r.mediaBlob=e.bytes();break;case 3:r.callInfoBlob=e.bytes();break;default:e.skipType(7&t)}}return r},e}(),e.Handle=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=0,e.prototype.value="",e.prototype.normalizedValue="",e.prototype.isoCountryCode="",e.encode=function(e,t){return t||(t=o.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),null!=e.normalizedValue&&Object.hasOwnProperty.call(e,"normalizedValue")&&t.uint32(26).string(e.normalizedValue),null!=e.isoCountryCode&&Object.hasOwnProperty.call(e,"isoCountryCode")&&t.uint32(34).string(e.isoCountryCode),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.Handle;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.type=e.int32();break;case 2:r.value=e.string();break;case 3:r.normalizedValue=e.string();break;case 4:r.isoCountryCode=e.string();break;default:e.skipType(7&t)}}return r},e.HandleType=function(){const e={},t=Object.create(e);return t[e[0]="None"]=0,t[e[1]="Generic"]=1,t[e[2]="PhoneNumber"]=2,t[e[3]="EmailAddress"]=3,t}(),e}(),e.LabeledHandle=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.handle=null,e.prototype.label="",e.encode=function(e,t){return t||(t=o.create()),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(10).fork()).ldelim(),null!=e.label&&Object.hasOwnProperty.call(e,"label")&&t.uint32(18).string(e.label),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.LabeledHandle;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 2:r.label=e.string();break;default:e.skipType(7&t)}}return r},e}(),e.SenderIdentity=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.protoUUID="",e.prototype.handle=null,e.prototype.localizedName="",e.prototype.localizedShortName="",e.prototype.accountUUIDString="",e.prototype.localizedServiceName="",e.encode=function(e,t){return t||(t=o.create()),null!=e.protoUUID&&Object.hasOwnProperty.call(e,"protoUUID")&&t.uint32(10).string(e.protoUUID),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(18).fork()).ldelim(),null!=e.localizedName&&Object.hasOwnProperty.call(e,"localizedName")&&t.uint32(26).string(e.localizedName),null!=e.localizedShortName&&Object.hasOwnProperty.call(e,"localizedShortName")&&t.uint32(34).string(e.localizedShortName),null!=e.accountUUIDString&&Object.hasOwnProperty.call(e,"accountUUIDString")&&t.uint32(42).string(e.accountUUIDString),null!=e.localizedServiceName&&Object.hasOwnProperty.call(e,"localizedServiceName")&&t.uint32(50).string(e.localizedServiceName),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.SenderIdentity;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.protoUUID=e.string();break;case 2:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 3:r.localizedName=e.string();break;case 4:r.localizedShortName=e.string();break;case 5:r.accountUUIDString=e.string();break;case 6:r.localizedServiceName=e.string();break;default:e.skipType(7&t)}}return r},e}(),e.PersonNameComponents=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.namePrefix="",e.prototype.givenName="",e.prototype.middleName="",e.prototype.familyName="",e.prototype.nameSuffix="",e.prototype.nickname="",e.prototype.phoneticRepresentation=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.namePrefix&&Object.hasOwnProperty.call(e,"namePrefix")&&t.uint32(10).string(e.namePrefix),null!=e.givenName&&Object.hasOwnProperty.call(e,"givenName")&&t.uint32(18).string(e.givenName),null!=e.middleName&&Object.hasOwnProperty.call(e,"middleName")&&t.uint32(26).string(e.middleName),null!=e.familyName&&Object.hasOwnProperty.call(e,"familyName")&&t.uint32(34).string(e.familyName),null!=e.nameSuffix&&Object.hasOwnProperty.call(e,"nameSuffix")&&t.uint32(42).string(e.nameSuffix),null!=e.nickname&&Object.hasOwnProperty.call(e,"nickname")&&t.uint32(50).string(e.nickname),null!=e.phoneticRepresentation&&Object.hasOwnProperty.call(e,"phoneticRepresentation")&&s.callservicesd.PersonNameComponents.encode(e.phoneticRepresentation,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.PersonNameComponents;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.namePrefix=e.string();break;case 2:r.givenName=e.string();break;case 3:r.middleName=e.string();break;case 4:r.familyName=e.string();break;case 5:r.nameSuffix=e.string();break;case 6:r.nickname=e.string();break;case 7:r.phoneticRepresentation=s.callservicesd.PersonNameComponents.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e}(),e.CallDisplayContext=function(){function e(e){if(this.contactIdentifiers=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.protoPersonNameComponents=null,e.prototype.suggestedName="",e.prototype.label="",e.prototype.companyName="",e.prototype.mapName="",e.prototype.location="",e.prototype.contactName="",e.prototype.contactLabel="",e.prototype.callDirectoryLabel="",e.prototype.callDirectoryLocalizedExtensionContainingAppName="",e.prototype.callDirectoryExtensionIdentifier="",e.prototype.contactIdentifier="",e.prototype.contactIdentifiers=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.protoPersonNameComponents&&Object.hasOwnProperty.call(e,"protoPersonNameComponents")&&s.callservicesd.PersonNameComponents.encode(e.protoPersonNameComponents,t.uint32(18).fork()).ldelim(),null!=e.suggestedName&&Object.hasOwnProperty.call(e,"suggestedName")&&t.uint32(26).string(e.suggestedName),null!=e.label&&Object.hasOwnProperty.call(e,"label")&&t.uint32(34).string(e.label),null!=e.companyName&&Object.hasOwnProperty.call(e,"companyName")&&t.uint32(42).string(e.companyName),null!=e.mapName&&Object.hasOwnProperty.call(e,"mapName")&&t.uint32(50).string(e.mapName),null!=e.location&&Object.hasOwnProperty.call(e,"location")&&t.uint32(58).string(e.location),null!=e.contactName&&Object.hasOwnProperty.call(e,"contactName")&&t.uint32(66).string(e.contactName),null!=e.contactLabel&&Object.hasOwnProperty.call(e,"contactLabel")&&t.uint32(74).string(e.contactLabel),null!=e.callDirectoryLabel&&Object.hasOwnProperty.call(e,"callDirectoryLabel")&&t.uint32(82).string(e.callDirectoryLabel),null!=e.callDirectoryLocalizedExtensionContainingAppName&&Object.hasOwnProperty.call(e,"callDirectoryLocalizedExtensionContainingAppName")&&t.uint32(90).string(e.callDirectoryLocalizedExtensionContainingAppName),null!=e.callDirectoryExtensionIdentifier&&Object.hasOwnProperty.call(e,"callDirectoryExtensionIdentifier")&&t.uint32(98).string(e.callDirectoryExtensionIdentifier),null!=e.contactIdentifier&&Object.hasOwnProperty.call(e,"contactIdentifier")&&t.uint32(106).string(e.contactIdentifier),null!=e.contactIdentifiers&&e.contactIdentifiers.length)for(let n=0;n<e.contactIdentifiers.length;++n)t.uint32(114).string(e.contactIdentifiers[n]);return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.CallDisplayContext;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.name=e.string();break;case 2:r.protoPersonNameComponents=s.callservicesd.PersonNameComponents.decode(e,e.uint32());break;case 3:r.suggestedName=e.string();break;case 4:r.label=e.string();break;case 5:r.companyName=e.string();break;case 6:r.mapName=e.string();break;case 7:r.location=e.string();break;case 8:r.contactName=e.string();break;case 9:r.contactLabel=e.string();break;case 10:r.callDirectoryLabel=e.string();break;case 11:r.callDirectoryLocalizedExtensionContainingAppName=e.string();break;case 12:r.callDirectoryExtensionIdentifier=e.string();break;case 13:r.contactIdentifier=e.string();break;case 14:r.contactIdentifiers&&r.contactIdentifiers.length||(r.contactIdentifiers=[]),r.contactIdentifiers.push(e.string());break;default:e.skipType(7&t)}}return r},e}(),e.ConversationParticipantDidJoinContext=function(){function e(e){if(this.members=[],this.otherInvitedHandles=[],this.lightweightMembers=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.members=a.emptyArray,e.prototype.message=null,e.prototype.messagesGroupUUIDString="",e.prototype.messagesGroupName="",e.prototype.isMomentsAvailable=!1,e.prototype.activitySession=null,e.prototype.video=!1,e.prototype.isScreenSharingAvailable=!1,e.prototype.providerIdentifier="",e.prototype.otherInvitedHandles=a.emptyArray,e.prototype.isMirageAvailable=!1,e.prototype.lightweightMembers=a.emptyArray,e.prototype.isLightweight=!1,e.prototype.isGondolaCallingAvailable=!1,e.prototype.videoEnabled=!1,e.prototype.sharePlayProtocolVersion=0,e.prototype.isGFTDowngradeToOneToOneAvailable=!1,e.prototype.participantAssociation=null,e.prototype.isUPlusNDowngradeAvailable=!1,e.prototype.avMode=0,e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.members&&e.members.length)for(let n=0;n<e.members.length;++n)s.callservicesd.ConversationMember.encode(e.members[n],t.uint32(18).fork()).ldelim();if(null!=e.message&&Object.hasOwnProperty.call(e,"message")&&s.callservicesd.ConversationMessage.encode(e.message,t.uint32(26).fork()).ldelim(),null!=e.messagesGroupUUIDString&&Object.hasOwnProperty.call(e,"messagesGroupUUIDString")&&t.uint32(34).string(e.messagesGroupUUIDString),null!=e.messagesGroupName&&Object.hasOwnProperty.call(e,"messagesGroupName")&&t.uint32(42).string(e.messagesGroupName),null!=e.isMomentsAvailable&&Object.hasOwnProperty.call(e,"isMomentsAvailable")&&t.uint32(48).bool(e.isMomentsAvailable),null!=e.activitySession&&Object.hasOwnProperty.call(e,"activitySession")&&s.callservicesd.ConversationActivitySession.encode(e.activitySession,t.uint32(58).fork()).ldelim(),null!=e.video&&Object.hasOwnProperty.call(e,"video")&&t.uint32(64).bool(e.video),null!=e.isScreenSharingAvailable&&Object.hasOwnProperty.call(e,"isScreenSharingAvailable")&&t.uint32(72).bool(e.isScreenSharingAvailable),null!=e.providerIdentifier&&Object.hasOwnProperty.call(e,"providerIdentifier")&&t.uint32(82).string(e.providerIdentifier),null!=e.otherInvitedHandles&&e.otherInvitedHandles.length)for(let n=0;n<e.otherInvitedHandles.length;++n)s.callservicesd.Handle.encode(e.otherInvitedHandles[n],t.uint32(90).fork()).ldelim();if(null!=e.isMirageAvailable&&Object.hasOwnProperty.call(e,"isMirageAvailable")&&t.uint32(96).bool(e.isMirageAvailable),null!=e.lightweightMembers&&e.lightweightMembers.length)for(let n=0;n<e.lightweightMembers.length;++n)s.callservicesd.ConversationMember.encode(e.lightweightMembers[n],t.uint32(106).fork()).ldelim();return null!=e.isLightweight&&Object.hasOwnProperty.call(e,"isLightweight")&&t.uint32(112).bool(e.isLightweight),null!=e.isGondolaCallingAvailable&&Object.hasOwnProperty.call(e,"isGondolaCallingAvailable")&&t.uint32(120).bool(e.isGondolaCallingAvailable),null!=e.videoEnabled&&Object.hasOwnProperty.call(e,"videoEnabled")&&t.uint32(128).bool(e.videoEnabled),null!=e.sharePlayProtocolVersion&&Object.hasOwnProperty.call(e,"sharePlayProtocolVersion")&&t.uint32(136).uint32(e.sharePlayProtocolVersion),null!=e.isGFTDowngradeToOneToOneAvailable&&Object.hasOwnProperty.call(e,"isGFTDowngradeToOneToOneAvailable")&&t.uint32(144).bool(e.isGFTDowngradeToOneToOneAvailable),null!=e.participantAssociation&&Object.hasOwnProperty.call(e,"participantAssociation")&&s.callservicesd.ConversationParticipantAssociation.encode(e.participantAssociation,t.uint32(154).fork()).ldelim(),null!=e.isUPlusNDowngradeAvailable&&Object.hasOwnProperty.call(e,"isUPlusNDowngradeAvailable")&&t.uint32(160).bool(e.isUPlusNDowngradeAvailable),null!=e.avMode&&Object.hasOwnProperty.call(e,"avMode")&&t.uint32(168).uint32(e.avMode),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationParticipantDidJoinContext;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.members&&r.members.length||(r.members=[]),r.members.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 3:r.message=s.callservicesd.ConversationMessage.decode(e,e.uint32());break;case 4:r.messagesGroupUUIDString=e.string();break;case 5:r.messagesGroupName=e.string();break;case 6:r.isMomentsAvailable=e.bool();break;case 7:r.activitySession=s.callservicesd.ConversationActivitySession.decode(e,e.uint32());break;case 8:r.video=e.bool();break;case 9:r.isScreenSharingAvailable=e.bool();break;case 10:r.providerIdentifier=e.string();break;case 11:r.otherInvitedHandles&&r.otherInvitedHandles.length||(r.otherInvitedHandles=[]),r.otherInvitedHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;case 12:r.isMirageAvailable=e.bool();break;case 13:r.lightweightMembers&&r.lightweightMembers.length||(r.lightweightMembers=[]),r.lightweightMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 14:r.isLightweight=e.bool();break;case 15:r.isGondolaCallingAvailable=e.bool();break;case 16:r.videoEnabled=e.bool();break;case 17:r.sharePlayProtocolVersion=e.uint32();break;case 18:r.isGFTDowngradeToOneToOneAvailable=e.bool();break;case 19:r.participantAssociation=s.callservicesd.ConversationParticipantAssociation.decode(e,e.uint32());break;case 20:r.isUPlusNDowngradeAvailable=e.bool();break;case 21:r.avMode=e.uint32();break;default:e.skipType(7&t)}}return r},e}(),e.LinkSyncMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.type=0,e.prototype.updateMessage=null,e.prototype.checkInMessage=null,e.prototype.recoverMessage=null,e.encode=function(e,t){return t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(16).int32(e.type),null!=e.updateMessage&&Object.hasOwnProperty.call(e,"updateMessage")&&s.callservicesd.LinkSyncUpdateMessage.encode(e.updateMessage,t.uint32(26).fork()).ldelim(),null!=e.checkInMessage&&Object.hasOwnProperty.call(e,"checkInMessage")&&s.callservicesd.LinkSyncCheckInMessage.encode(e.checkInMessage,t.uint32(34).fork()).ldelim(),null!=e.recoverMessage&&Object.hasOwnProperty.call(e,"recoverMessage")&&s.callservicesd.LinkSyncRecoverMessage.encode(e.recoverMessage,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.LinkSyncMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.type=e.int32();break;case 3:r.updateMessage=s.callservicesd.LinkSyncUpdateMessage.decode(e,e.uint32());break;case 4:r.checkInMessage=s.callservicesd.LinkSyncCheckInMessage.decode(e,e.uint32());break;case 5:r.recoverMessage=s.callservicesd.LinkSyncRecoverMessage.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e.LinkSyncMessageType=function(){const e={},t=Object.create(e);return t[e[0]="Unknown"]=0,t[e[1]="Update"]=1,t[e[2]="CheckIn"]=2,t[e[3]="Recover"]=3,t}(),e}(),e.LinkSyncUpdateMessage=function(){function e(e){if(this.link=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.link=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.link&&e.link.length)for(let n=0;n<e.link.length;++n)s.callservicesd.ConversationLink.encode(e.link[n],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.LinkSyncUpdateMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.link&&r.link.length||(r.link=[]),r.link.push(s.callservicesd.ConversationLink.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e.LinkSyncCheckInMessage=function(){function e(e){if(this.generatorDescriptors=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.shouldCheckAllGenerators=!1,e.prototype.generatorDescriptors=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.shouldCheckAllGenerators&&Object.hasOwnProperty.call(e,"shouldCheckAllGenerators")&&t.uint32(16).bool(e.shouldCheckAllGenerators),null!=e.generatorDescriptors&&e.generatorDescriptors.length)for(let n=0;n<e.generatorDescriptors.length;++n)s.callservicesd.ConversationLinkGeneratorDescriptor.encode(e.generatorDescriptors[n],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.LinkSyncCheckInMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.shouldCheckAllGenerators=e.bool();break;case 3:r.generatorDescriptors&&r.generatorDescriptors.length||(r.generatorDescriptors=[]),r.generatorDescriptors.push(s.callservicesd.ConversationLinkGeneratorDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e}(),e.LinkSyncRecoverMessage=function(){function e(e){if(this.pseudonym=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.pseudonym=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.pseudonym&&e.pseudonym.length)for(let n=0;n<e.pseudonym.length;++n)t.uint32(18).string(e.pseudonym[n]);return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.LinkSyncRecoverMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.pseudonym&&r.pseudonym.length||(r.pseudonym=[]),r.pseudonym.push(e.string());break;default:e.skipType(7&t)}}return r},e}(),e.ConversationMessage=function(){function e(e){if(this.activeParticipants=[],this.addedMembers=[],this.activitySessions=[],this.invitationPreferences=[],this.removedMembers=[],this.lightweightMembers=[],this.activeLightweightParticipants=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.type=0,e.prototype.shouldSuppressInCallUI=!1,e.prototype.activeParticipants=a.emptyArray,e.prototype.conversationGroupUUIDString="",e.prototype.addedMembers=a.emptyArray,e.prototype.disconnectedReason=0,e.prototype.protoUpgradeSessionUUID="",e.prototype.activitySessions=a.emptyArray,e.prototype.nickname="",e.prototype.link=null,e.prototype.reportData=null,e.prototype.isLetMeInApproved=!1,e.prototype.encryptedMessage=null,e.prototype.letMeInDelegationHandle="",e.prototype.letMeInDelegationUUID="",e.prototype.enclosedEncryptedType=0,e.prototype.invitationPreferences=a.emptyArray,e.prototype.removedMembers=a.emptyArray,e.prototype.unicastConnectorBlob=a.newBuffer([]),e.prototype.lightweightMembers=a.emptyArray,e.prototype.activeLightweightParticipants=a.emptyArray,e.prototype.guestModeEnabled=!1,e.prototype.highlightIdentifier="",e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(16).int32(e.type),null!=e.shouldSuppressInCallUI&&Object.hasOwnProperty.call(e,"shouldSuppressInCallUI")&&t.uint32(24).bool(e.shouldSuppressInCallUI),null!=e.activeParticipants&&e.activeParticipants.length)for(let n=0;n<e.activeParticipants.length;++n)s.callservicesd.ConversationParticipant.encode(e.activeParticipants[n],t.uint32(34).fork()).ldelim();if(null!=e.conversationGroupUUIDString&&Object.hasOwnProperty.call(e,"conversationGroupUUIDString")&&t.uint32(42).string(e.conversationGroupUUIDString),null!=e.addedMembers&&e.addedMembers.length)for(let n=0;n<e.addedMembers.length;++n)s.callservicesd.ConversationMember.encode(e.addedMembers[n],t.uint32(50).fork()).ldelim();if(null!=e.disconnectedReason&&Object.hasOwnProperty.call(e,"disconnectedReason")&&t.uint32(56).uint32(e.disconnectedReason),null!=e.protoUpgradeSessionUUID&&Object.hasOwnProperty.call(e,"protoUpgradeSessionUUID")&&t.uint32(66).string(e.protoUpgradeSessionUUID),null!=e.activitySessions&&e.activitySessions.length)for(let n=0;n<e.activitySessions.length;++n)s.callservicesd.ConversationActivitySession.encode(e.activitySessions[n],t.uint32(74).fork()).ldelim();if(null!=e.nickname&&Object.hasOwnProperty.call(e,"nickname")&&t.uint32(82).string(e.nickname),null!=e.link&&Object.hasOwnProperty.call(e,"link")&&s.callservicesd.ConversationLink.encode(e.link,t.uint32(90).fork()).ldelim(),null!=e.reportData&&Object.hasOwnProperty.call(e,"reportData")&&s.callservicesd.ConversationReport.encode(e.reportData,t.uint32(98).fork()).ldelim(),null!=e.isLetMeInApproved&&Object.hasOwnProperty.call(e,"isLetMeInApproved")&&t.uint32(104).bool(e.isLetMeInApproved),null!=e.encryptedMessage&&Object.hasOwnProperty.call(e,"encryptedMessage")&&s.callservicesd.EncryptedConversationMessage.encode(e.encryptedMessage,t.uint32(114).fork()).ldelim(),null!=e.letMeInDelegationHandle&&Object.hasOwnProperty.call(e,"letMeInDelegationHandle")&&t.uint32(122).string(e.letMeInDelegationHandle),null!=e.letMeInDelegationUUID&&Object.hasOwnProperty.call(e,"letMeInDelegationUUID")&&t.uint32(130).string(e.letMeInDelegationUUID),null!=e.enclosedEncryptedType&&Object.hasOwnProperty.call(e,"enclosedEncryptedType")&&t.uint32(136).int32(e.enclosedEncryptedType),null!=e.invitationPreferences&&e.invitationPreferences.length)for(let n=0;n<e.invitationPreferences.length;++n)s.callservicesd.ConversationInvitationPreference.encode(e.invitationPreferences[n],t.uint32(154).fork()).ldelim();if(null!=e.removedMembers&&e.removedMembers.length)for(let n=0;n<e.removedMembers.length;++n)s.callservicesd.ConversationMember.encode(e.removedMembers[n],t.uint32(162).fork()).ldelim();if(null!=e.unicastConnectorBlob&&Object.hasOwnProperty.call(e,"unicastConnectorBlob")&&t.uint32(170).bytes(e.unicastConnectorBlob),null!=e.lightweightMembers&&e.lightweightMembers.length)for(let n=0;n<e.lightweightMembers.length;++n)s.callservicesd.ConversationMember.encode(e.lightweightMembers[n],t.uint32(178).fork()).ldelim();if(null!=e.activeLightweightParticipants&&e.activeLightweightParticipants.length)for(let n=0;n<e.activeLightweightParticipants.length;++n)s.callservicesd.ConversationParticipant.encode(e.activeLightweightParticipants[n],t.uint32(186).fork()).ldelim();return null!=e.guestModeEnabled&&Object.hasOwnProperty.call(e,"guestModeEnabled")&&t.uint32(192).bool(e.guestModeEnabled),null!=e.highlightIdentifier&&Object.hasOwnProperty.call(e,"highlightIdentifier")&&t.uint32(202).string(e.highlightIdentifier),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.type=e.int32();break;case 3:r.shouldSuppressInCallUI=e.bool();break;case 4:r.activeParticipants&&r.activeParticipants.length||(r.activeParticipants=[]),r.activeParticipants.push(s.callservicesd.ConversationParticipant.decode(e,e.uint32()));break;case 5:r.conversationGroupUUIDString=e.string();break;case 6:r.addedMembers&&r.addedMembers.length||(r.addedMembers=[]),r.addedMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 7:r.disconnectedReason=e.uint32();break;case 8:r.protoUpgradeSessionUUID=e.string();break;case 9:r.activitySessions&&r.activitySessions.length||(r.activitySessions=[]),r.activitySessions.push(s.callservicesd.ConversationActivitySession.decode(e,e.uint32()));break;case 10:r.nickname=e.string();break;case 11:r.link=s.callservicesd.ConversationLink.decode(e,e.uint32());break;case 12:r.reportData=s.callservicesd.ConversationReport.decode(e,e.uint32());break;case 13:r.isLetMeInApproved=e.bool();break;case 14:r.encryptedMessage=s.callservicesd.EncryptedConversationMessage.decode(e,e.uint32());break;case 15:r.letMeInDelegationHandle=e.string();break;case 16:r.letMeInDelegationUUID=e.string();break;case 17:r.enclosedEncryptedType=e.int32();break;case 19:r.invitationPreferences&&r.invitationPreferences.length||(r.invitationPreferences=[]),r.invitationPreferences.push(s.callservicesd.ConversationInvitationPreference.decode(e,e.uint32()));break;case 20:r.removedMembers&&r.removedMembers.length||(r.removedMembers=[]),r.removedMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 21:r.unicastConnectorBlob=e.bytes();break;case 22:r.lightweightMembers&&r.lightweightMembers.length||(r.lightweightMembers=[]),r.lightweightMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 23:r.activeLightweightParticipants&&r.activeLightweightParticipants.length||(r.activeLightweightParticipants=[]),r.activeLightweightParticipants.push(s.callservicesd.ConversationParticipant.decode(e,e.uint32()));break;case 24:r.guestModeEnabled=e.bool();break;case 25:r.highlightIdentifier=e.string();break;default:e.skipType(7&t)}}return r},e.ConversationMessageType=function(){const e={},t=Object.create(e);return t[e[0]="Unknown"]=0,t[e[1]="Invitation"]=1,t[e[2]="Upgrade"]=2,t[e[3]="AddMember"]=3,t[e[4]="ResendAVCBlobRequest"]=4,t[e[5]="ResendAVCBlobResponse"]=5,t[e[6]="RespondedElsewhere"]=6,t[e[7]="RequestShareScreen"]=7,t[e[8]="AddActivitySession"]=8,t[e[9]="Decline"]=9,t[e[10]="LetMeInRequest"]=10,t[e[11]="LinkCreated"]=11,t[e[12]="NicknameUpdated"]=12,t[e[13]="EncryptedConversationMessage"]=13,t[e[14]="LetMeInDelegation"]=14,t[e[15]="LetMeInDelegationResponse"]=15,t[e[16]="LetMeInResponse"]=16,t[e[19]="RemoveMember"]=19,t[e[20]="UnicastConnector"]=20,t[e[21]="RemoveActivitySession"]=21,t[e[22]="RequestVideoUpgrade"]=22,t[e[23]="UpdateActivity"]=23,t[e[24]="LinkInvalidated"]=24,t[e[25]="AddLightweightMember"]=25,t[e[26]="LinkChanged"]=26,t[e[27]="UpdateActivityImage"]=27,t[e[28]="GuestModeUpdated"]=28,t[e[29]="Endorse"]=29,t[e[30]="AddHighlight"]=30,t}(),e}(),e.EncryptedConversationMessage=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.publicKey=a.newBuffer([]),e.prototype.conversationMessageBytes=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.publicKey&&Object.hasOwnProperty.call(e,"publicKey")&&t.uint32(10).bytes(e.publicKey),null!=e.conversationMessageBytes&&Object.hasOwnProperty.call(e,"conversationMessageBytes")&&t.uint32(18).bytes(e.conversationMessageBytes),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.EncryptedConversationMessage;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.publicKey=e.bytes();break;case 2:r.conversationMessageBytes=e.bytes();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationMember=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.handle=null,e.prototype.nickname="",e.prototype.lightweightPrimary=null,e.prototype.lightweightPrimaryParticipantID=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.validationSource=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(18).fork()).ldelim(),null!=e.nickname&&Object.hasOwnProperty.call(e,"nickname")&&t.uint32(26).string(e.nickname),null!=e.lightweightPrimary&&Object.hasOwnProperty.call(e,"lightweightPrimary")&&s.callservicesd.Handle.encode(e.lightweightPrimary,t.uint32(34).fork()).ldelim(),null!=e.lightweightPrimaryParticipantID&&Object.hasOwnProperty.call(e,"lightweightPrimaryParticipantID")&&t.uint32(40).uint64(e.lightweightPrimaryParticipantID),null!=e.validationSource&&Object.hasOwnProperty.call(e,"validationSource")&&t.uint32(48).int32(e.validationSource),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationMember;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 3:r.nickname=e.string();break;case 4:r.lightweightPrimary=s.callservicesd.Handle.decode(e,e.uint32());break;case 5:r.lightweightPrimaryParticipantID=e.uint64();break;case 6:r.validationSource=e.int32();break;default:e.skipType(7&t)}}return r},e.ValidationSource=function(){const e={},t=Object.create(e);return t[e[0]="None"]=0,t[e[1]="Endorsement"]=1,t}(),e}(),e.ConversationParticipant=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.identifier=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.handle=null,e.prototype.avcData=a.newBuffer([]),e.prototype.isMomentsAvailable=!1,e.prototype.isScreenSharingAvailable=!1,e.prototype.isGondolaCallingAvailable=!1,e.prototype.isMirageAvailable=!1,e.prototype.isLightweight=!1,e.prototype.sharePlayProtocolVersion=0,e.prototype.options=0,e.prototype.isGFTDowngradeToOneToOneAvailable=!1,e.prototype.guestModeEnabled=!1,e.prototype.association=null,e.prototype.isUPlusNDowngradeAvailable=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.identifier&&Object.hasOwnProperty.call(e,"identifier")&&t.uint32(16).uint64(e.identifier),null!=e.handle&&Object.hasOwnProperty.call(e,"handle")&&s.callservicesd.Handle.encode(e.handle,t.uint32(26).fork()).ldelim(),null!=e.avcData&&Object.hasOwnProperty.call(e,"avcData")&&t.uint32(34).bytes(e.avcData),null!=e.isMomentsAvailable&&Object.hasOwnProperty.call(e,"isMomentsAvailable")&&t.uint32(40).bool(e.isMomentsAvailable),null!=e.isScreenSharingAvailable&&Object.hasOwnProperty.call(e,"isScreenSharingAvailable")&&t.uint32(48).bool(e.isScreenSharingAvailable),null!=e.isGondolaCallingAvailable&&Object.hasOwnProperty.call(e,"isGondolaCallingAvailable")&&t.uint32(56).bool(e.isGondolaCallingAvailable),null!=e.isMirageAvailable&&Object.hasOwnProperty.call(e,"isMirageAvailable")&&t.uint32(64).bool(e.isMirageAvailable),null!=e.isLightweight&&Object.hasOwnProperty.call(e,"isLightweight")&&t.uint32(72).bool(e.isLightweight),null!=e.sharePlayProtocolVersion&&Object.hasOwnProperty.call(e,"sharePlayProtocolVersion")&&t.uint32(80).uint32(e.sharePlayProtocolVersion),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&t.uint32(88).uint32(e.options),null!=e.isGFTDowngradeToOneToOneAvailable&&Object.hasOwnProperty.call(e,"isGFTDowngradeToOneToOneAvailable")&&t.uint32(96).bool(e.isGFTDowngradeToOneToOneAvailable),null!=e.guestModeEnabled&&Object.hasOwnProperty.call(e,"guestModeEnabled")&&t.uint32(104).bool(e.guestModeEnabled),null!=e.association&&Object.hasOwnProperty.call(e,"association")&&s.callservicesd.ConversationParticipantAssociation.encode(e.association,t.uint32(114).fork()).ldelim(),null!=e.isUPlusNDowngradeAvailable&&Object.hasOwnProperty.call(e,"isUPlusNDowngradeAvailable")&&t.uint32(120).bool(e.isUPlusNDowngradeAvailable),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationParticipant;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.identifier=e.uint64();break;case 3:r.handle=s.callservicesd.Handle.decode(e,e.uint32());break;case 4:r.avcData=e.bytes();break;case 5:r.isMomentsAvailable=e.bool();break;case 6:r.isScreenSharingAvailable=e.bool();break;case 7:r.isGondolaCallingAvailable=e.bool();break;case 8:r.isMirageAvailable=e.bool();break;case 9:r.isLightweight=e.bool();break;case 10:r.sharePlayProtocolVersion=e.uint32();break;case 11:r.options=e.uint32();break;case 12:r.isGFTDowngradeToOneToOneAvailable=e.bool();break;case 13:r.guestModeEnabled=e.bool();break;case 14:r.association=s.callservicesd.ConversationParticipantAssociation.decode(e,e.uint32());break;case 15:r.isUPlusNDowngradeAvailable=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationParticipantAssociation=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.identifier=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.avcIdentifier="",e.encode=function(e,t){return t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.identifier&&Object.hasOwnProperty.call(e,"identifier")&&t.uint32(16).uint64(e.identifier),null!=e.avcIdentifier&&Object.hasOwnProperty.call(e,"avcIdentifier")&&t.uint32(26).string(e.avcIdentifier),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationParticipantAssociation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.identifier=e.uint64();break;case 3:r.avcIdentifier=e.string();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationActivityContext=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contextIdentifier="",e.prototype.actionDescription="",e.prototype.ongoingDescription="",e.prototype.completedDescription="",e.encode=function(e,t){return t||(t=o.create()),null!=e.contextIdentifier&&Object.hasOwnProperty.call(e,"contextIdentifier")&&t.uint32(10).string(e.contextIdentifier),null!=e.actionDescription&&Object.hasOwnProperty.call(e,"actionDescription")&&t.uint32(18).string(e.actionDescription),null!=e.ongoingDescription&&Object.hasOwnProperty.call(e,"ongoingDescription")&&t.uint32(26).string(e.ongoingDescription),null!=e.completedDescription&&Object.hasOwnProperty.call(e,"completedDescription")&&t.uint32(34).string(e.completedDescription),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationActivityContext;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.contextIdentifier=e.string();break;case 2:r.actionDescription=e.string();break;case 3:r.ongoingDescription=e.string();break;case 4:r.completedDescription=e.string();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationActivityMetadata=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.fallbackURL="",e.prototype.supportsContinuationOnTV=!1,e.prototype.title="",e.prototype.subtitle="",e.prototype.image=a.newBuffer([]),e.prototype.preferredBroadcastingAttributes=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.fallbackURL&&Object.hasOwnProperty.call(e,"fallbackURL")&&t.uint32(10).string(e.fallbackURL),null!=e.supportsContinuationOnTV&&Object.hasOwnProperty.call(e,"supportsContinuationOnTV")&&t.uint32(16).bool(e.supportsContinuationOnTV),null!=e.title&&Object.hasOwnProperty.call(e,"title")&&t.uint32(26).string(e.title),null!=e.subtitle&&Object.hasOwnProperty.call(e,"subtitle")&&t.uint32(34).string(e.subtitle),null!=e.image&&Object.hasOwnProperty.call(e,"image")&&t.uint32(42).bytes(e.image),null!=e.preferredBroadcastingAttributes&&Object.hasOwnProperty.call(e,"preferredBroadcastingAttributes")&&t.uint32(48).uint32(e.preferredBroadcastingAttributes),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationActivityMetadata;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.fallbackURL=e.string();break;case 2:r.supportsContinuationOnTV=e.bool();break;case 3:r.title=e.string();break;case 4:r.subtitle=e.string();break;case 5:r.image=e.bytes();break;case 6:r.preferredBroadcastingAttributes=e.uint32();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationActivity=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.identifierUUIDString="",e.prototype.applicationContext=a.newBuffer([]),e.prototype.bundleIdentifier="",e.prototype.activityIdentifier="",e.prototype.metadata=a.newBuffer([]),e.prototype.activityContext=null,e.prototype.originatorHandle=null,e.prototype.updatedDateEpochTime=0,e.prototype.fallbackApplicationName="",e.prototype.activityMetadata=null,e.prototype.isSystemActivity=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.identifierUUIDString&&Object.hasOwnProperty.call(e,"identifierUUIDString")&&t.uint32(10).string(e.identifierUUIDString),null!=e.applicationContext&&Object.hasOwnProperty.call(e,"applicationContext")&&t.uint32(18).bytes(e.applicationContext),null!=e.bundleIdentifier&&Object.hasOwnProperty.call(e,"bundleIdentifier")&&t.uint32(26).string(e.bundleIdentifier),null!=e.activityIdentifier&&Object.hasOwnProperty.call(e,"activityIdentifier")&&t.uint32(34).string(e.activityIdentifier),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(42).bytes(e.metadata),null!=e.activityContext&&Object.hasOwnProperty.call(e,"activityContext")&&s.callservicesd.ConversationActivityContext.encode(e.activityContext,t.uint32(58).fork()).ldelim(),null!=e.originatorHandle&&Object.hasOwnProperty.call(e,"originatorHandle")&&s.callservicesd.Handle.encode(e.originatorHandle,t.uint32(66).fork()).ldelim(),null!=e.updatedDateEpochTime&&Object.hasOwnProperty.call(e,"updatedDateEpochTime")&&t.uint32(73).double(e.updatedDateEpochTime),null!=e.fallbackApplicationName&&Object.hasOwnProperty.call(e,"fallbackApplicationName")&&t.uint32(82).string(e.fallbackApplicationName),null!=e.activityMetadata&&Object.hasOwnProperty.call(e,"activityMetadata")&&s.callservicesd.ConversationActivityMetadata.encode(e.activityMetadata,t.uint32(90).fork()).ldelim(),null!=e.isSystemActivity&&Object.hasOwnProperty.call(e,"isSystemActivity")&&t.uint32(96).bool(e.isSystemActivity),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationActivity;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.identifierUUIDString=e.string();break;case 2:r.applicationContext=e.bytes();break;case 3:r.bundleIdentifier=e.string();break;case 4:r.activityIdentifier=e.string();break;case 5:r.metadata=e.bytes();break;case 7:r.activityContext=s.callservicesd.ConversationActivityContext.decode(e,e.uint32());break;case 8:r.originatorHandle=s.callservicesd.Handle.decode(e,e.uint32());break;case 9:r.updatedDateEpochTime=e.double();break;case 10:r.fallbackApplicationName=e.string();break;case 11:r.activityMetadata=s.callservicesd.ConversationActivityMetadata.decode(e,e.uint32());break;case 12:r.isSystemActivity=e.bool();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationActivitySession=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.identifierUUIDString="",e.prototype.activity=null,e.prototype.creationDateEpochTime=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.identifierUUIDString&&Object.hasOwnProperty.call(e,"identifierUUIDString")&&t.uint32(10).string(e.identifierUUIDString),null!=e.activity&&Object.hasOwnProperty.call(e,"activity")&&s.callservicesd.ConversationActivity.encode(e.activity,t.uint32(18).fork()).ldelim(),null!=e.creationDateEpochTime&&Object.hasOwnProperty.call(e,"creationDateEpochTime")&&t.uint32(25).double(e.creationDateEpochTime),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationActivitySession;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.identifierUUIDString=e.string();break;case 2:r.activity=s.callservicesd.ConversationActivity.decode(e,e.uint32());break;case 3:r.creationDateEpochTime=e.double();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationLink=function(){function e(e){if(this.invitedHandles=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.pseudonym="",e.prototype.publicKey=a.newBuffer([]),e.prototype.privateKey=a.newBuffer([]),e.prototype.invitedHandles=a.emptyArray,e.prototype.creationDateEpochTime=0,e.prototype.groupUUIDString="",e.prototype.originatorHandle=null,e.prototype.pseudonymExpirationDateEpochTime=0,e.prototype.isActivated=!1,e.prototype.generatorDescriptor=null,e.prototype.linkName="",e.prototype.linkLifetimeScope=0,e.encode=function(e,t){if(t||(t=o.create()),null!=e.pseudonym&&Object.hasOwnProperty.call(e,"pseudonym")&&t.uint32(10).string(e.pseudonym),null!=e.publicKey&&Object.hasOwnProperty.call(e,"publicKey")&&t.uint32(18).bytes(e.publicKey),null!=e.privateKey&&Object.hasOwnProperty.call(e,"privateKey")&&t.uint32(26).bytes(e.privateKey),null!=e.invitedHandles&&e.invitedHandles.length)for(let n=0;n<e.invitedHandles.length;++n)s.callservicesd.Handle.encode(e.invitedHandles[n],t.uint32(34).fork()).ldelim();return null!=e.creationDateEpochTime&&Object.hasOwnProperty.call(e,"creationDateEpochTime")&&t.uint32(41).double(e.creationDateEpochTime),null!=e.groupUUIDString&&Object.hasOwnProperty.call(e,"groupUUIDString")&&t.uint32(50).string(e.groupUUIDString),null!=e.originatorHandle&&Object.hasOwnProperty.call(e,"originatorHandle")&&s.callservicesd.Handle.encode(e.originatorHandle,t.uint32(58).fork()).ldelim(),null!=e.pseudonymExpirationDateEpochTime&&Object.hasOwnProperty.call(e,"pseudonymExpirationDateEpochTime")&&t.uint32(65).double(e.pseudonymExpirationDateEpochTime),null!=e.isActivated&&Object.hasOwnProperty.call(e,"isActivated")&&t.uint32(72).bool(e.isActivated),null!=e.generatorDescriptor&&Object.hasOwnProperty.call(e,"generatorDescriptor")&&s.callservicesd.ConversationLinkGeneratorDescriptor.encode(e.generatorDescriptor,t.uint32(82).fork()).ldelim(),null!=e.linkName&&Object.hasOwnProperty.call(e,"linkName")&&t.uint32(90).string(e.linkName),null!=e.linkLifetimeScope&&Object.hasOwnProperty.call(e,"linkLifetimeScope")&&t.uint32(96).int32(e.linkLifetimeScope),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationLink;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.pseudonym=e.string();break;case 2:r.publicKey=e.bytes();break;case 3:r.privateKey=e.bytes();break;case 4:r.invitedHandles&&r.invitedHandles.length||(r.invitedHandles=[]),r.invitedHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;case 5:r.creationDateEpochTime=e.double();break;case 6:r.groupUUIDString=e.string();break;case 7:r.originatorHandle=s.callservicesd.Handle.decode(e,e.uint32());break;case 8:r.pseudonymExpirationDateEpochTime=e.double();break;case 9:r.isActivated=e.bool();break;case 10:r.generatorDescriptor=s.callservicesd.ConversationLinkGeneratorDescriptor.decode(e,e.uint32());break;case 11:r.linkName=e.string();break;case 12:r.linkLifetimeScope=e.int32();break;default:e.skipType(7&t)}}return r},e.ConversationLinkLifetimeScope=function(){const e={},t=Object.create(e);return t[e[0]="Indefinite"]=0,t[e[1]="CallDuration"]=1,t}(),e}(),e.ConversationLinkGeneratorDescriptor=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.generatorID="",e.prototype.generatorVersion=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.generatorID&&Object.hasOwnProperty.call(e,"generatorID")&&t.uint32(10).string(e.generatorID),null!=e.generatorVersion&&Object.hasOwnProperty.call(e,"generatorVersion")&&t.uint32(16).uint32(e.generatorVersion),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationLinkGeneratorDescriptor;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.generatorID=e.string();break;case 2:r.generatorVersion=e.uint32();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationInvitationPreference=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.handleType=0,e.prototype.notificationStyles=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.handleType&&Object.hasOwnProperty.call(e,"handleType")&&t.uint32(16).int32(e.handleType),null!=e.notificationStyles&&Object.hasOwnProperty.call(e,"notificationStyles")&&t.uint32(24).uint32(e.notificationStyles),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationInvitationPreference;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.handleType=e.int32();break;case 3:r.notificationStyles=e.uint32();break;default:e.skipType(7&t)}}return r},e.PreferenceHandleType=function(){const e={},t=Object.create(e);return t[e[0]="None"]=0,t[e[1]="Generic"]=1,t[e[2]="PhoneNumber"]=2,t[e[3]="EmailAddress"]=3,t}(),e}(),e.Route=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.uniqueIdentifier="",e.prototype.name="",e.prototype.deviceType=0,e.prototype.protoCurrentlyPicked=!1,e.prototype.protoGuest=!1,e.prototype.protoSupportsRelay=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.uniqueIdentifier&&Object.hasOwnProperty.call(e,"uniqueIdentifier")&&t.uint32(10).string(e.uniqueIdentifier),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.deviceType&&Object.hasOwnProperty.call(e,"deviceType")&&t.uint32(24).int32(e.deviceType),null!=e.protoCurrentlyPicked&&Object.hasOwnProperty.call(e,"protoCurrentlyPicked")&&t.uint32(32).bool(e.protoCurrentlyPicked),null!=e.protoGuest&&Object.hasOwnProperty.call(e,"protoGuest")&&t.uint32(40).bool(e.protoGuest),null!=e.protoSupportsRelay&&Object.hasOwnProperty.call(e,"protoSupportsRelay")&&t.uint32(48).bool(e.protoSupportsRelay),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.Route;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.uniqueIdentifier=e.string();break;case 2:r.name=e.string();break;case 3:r.deviceType=e.int32();break;case 4:r.protoCurrentlyPicked=e.bool();break;case 5:r.protoGuest=e.bool();break;case 6:r.protoSupportsRelay=e.bool();break;default:e.skipType(7&t)}}return r},e.RouteDeviceType=function(){const e={},t=Object.create(e);return t[e[0]="Unknown"]=0,t[e[1]="AirPods"]=1,t[e[2]="BeatsSolo"]=2,t[e[3]="BeatsX"]=3,t[e[4]="Powerbeats"]=4,t[e[5]="BeatsStudio"]=5,t[e[6]="HomePod"]=6,t[e[7]="iPod"]=7,t[e[8]="iPad"]=8,t[e[9]="iMac"]=9,t[e[10]="MacBook"]=10,t[e[11]="MacMini"]=11,t[e[12]="MacPro"]=12,t[e[13]="Watch"]=13,t[e[14]="HomePodStereoPair"]=14,t[e[15]="iPadPro"]=15,t[e[16]="PowerbeatsPro"]=16,t[e[17]="BeatsSoloPro"]=17,t[e[18]="AirPodsPro"]=18,t[e[19]="Powerbeats4"]=19,t[e[20]="HeadPods"]=20,t[e[21]="BeatsX2"]=21,t[e[22]="HomePodMini"]=22,t[e[23]="HomePodMiniStereoPair"]=23,t[e[24]="BeatsStudioBuds"]=24,t[e[25]="BeatsFitPro"]=25,t[e[26]="AirPods3"]=26,t}(),e}(),e.Conversation=function(){function e(e){if(this.remoteMembers=[],this.activeRemoteParticipants=[],this.activitySessions=[],this.otherInvitedHandles=[],this.lightweightMembers=[],this.activeLightweightParticipants=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.version=0,e.prototype.UUIDString="",e.prototype.groupUUIDString="",e.prototype.messagesGroupUUIDString="",e.prototype.locallyCreated=!1,e.prototype.initiator=null,e.prototype.localMember=null,e.prototype.remoteMembers=a.emptyArray,e.prototype.activeRemoteParticipants=a.emptyArray,e.prototype.activitySessions=a.emptyArray,e.prototype.link=null,e.prototype.reportData=null,e.prototype.conversationProviderIdentifier="",e.prototype.otherInvitedHandles=a.emptyArray,e.prototype.lightweightMembers=a.emptyArray,e.prototype.activeLightweightParticipants=a.emptyArray,e.prototype.highlightIdentifier="",e.encode=function(e,t){if(t||(t=o.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.UUIDString&&Object.hasOwnProperty.call(e,"UUIDString")&&t.uint32(18).string(e.UUIDString),null!=e.groupUUIDString&&Object.hasOwnProperty.call(e,"groupUUIDString")&&t.uint32(26).string(e.groupUUIDString),null!=e.messagesGroupUUIDString&&Object.hasOwnProperty.call(e,"messagesGroupUUIDString")&&t.uint32(34).string(e.messagesGroupUUIDString),null!=e.locallyCreated&&Object.hasOwnProperty.call(e,"locallyCreated")&&t.uint32(40).bool(e.locallyCreated),null!=e.initiator&&Object.hasOwnProperty.call(e,"initiator")&&s.callservicesd.Handle.encode(e.initiator,t.uint32(50).fork()).ldelim(),null!=e.localMember&&Object.hasOwnProperty.call(e,"localMember")&&s.callservicesd.ConversationMember.encode(e.localMember,t.uint32(58).fork()).ldelim(),null!=e.remoteMembers&&e.remoteMembers.length)for(let n=0;n<e.remoteMembers.length;++n)s.callservicesd.ConversationMember.encode(e.remoteMembers[n],t.uint32(66).fork()).ldelim();if(null!=e.activeRemoteParticipants&&e.activeRemoteParticipants.length)for(let n=0;n<e.activeRemoteParticipants.length;++n)s.callservicesd.ConversationParticipant.encode(e.activeRemoteParticipants[n],t.uint32(74).fork()).ldelim();if(null!=e.activitySessions&&e.activitySessions.length)for(let n=0;n<e.activitySessions.length;++n)s.callservicesd.ConversationActivitySession.encode(e.activitySessions[n],t.uint32(82).fork()).ldelim();if(null!=e.link&&Object.hasOwnProperty.call(e,"link")&&s.callservicesd.ConversationLink.encode(e.link,t.uint32(90).fork()).ldelim(),null!=e.reportData&&Object.hasOwnProperty.call(e,"reportData")&&s.callservicesd.ConversationReport.encode(e.reportData,t.uint32(98).fork()).ldelim(),null!=e.conversationProviderIdentifier&&Object.hasOwnProperty.call(e,"conversationProviderIdentifier")&&t.uint32(114).string(e.conversationProviderIdentifier),null!=e.otherInvitedHandles&&e.otherInvitedHandles.length)for(let n=0;n<e.otherInvitedHandles.length;++n)s.callservicesd.Handle.encode(e.otherInvitedHandles[n],t.uint32(122).fork()).ldelim();if(null!=e.lightweightMembers&&e.lightweightMembers.length)for(let n=0;n<e.lightweightMembers.length;++n)s.callservicesd.ConversationMember.encode(e.lightweightMembers[n],t.uint32(130).fork()).ldelim();if(null!=e.activeLightweightParticipants&&e.activeLightweightParticipants.length)for(let n=0;n<e.activeLightweightParticipants.length;++n)s.callservicesd.ConversationParticipant.encode(e.activeLightweightParticipants[n],t.uint32(138).fork()).ldelim();return null!=e.highlightIdentifier&&Object.hasOwnProperty.call(e,"highlightIdentifier")&&t.uint32(146).string(e.highlightIdentifier),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.Conversation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.version=e.uint32();break;case 2:r.UUIDString=e.string();break;case 3:r.groupUUIDString=e.string();break;case 4:r.messagesGroupUUIDString=e.string();break;case 5:r.locallyCreated=e.bool();break;case 6:r.initiator=s.callservicesd.Handle.decode(e,e.uint32());break;case 7:r.localMember=s.callservicesd.ConversationMember.decode(e,e.uint32());break;case 8:r.remoteMembers&&r.remoteMembers.length||(r.remoteMembers=[]),r.remoteMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 9:r.activeRemoteParticipants&&r.activeRemoteParticipants.length||(r.activeRemoteParticipants=[]),r.activeRemoteParticipants.push(s.callservicesd.ConversationParticipant.decode(e,e.uint32()));break;case 10:r.activitySessions&&r.activitySessions.length||(r.activitySessions=[]),r.activitySessions.push(s.callservicesd.ConversationActivitySession.decode(e,e.uint32()));break;case 11:r.link=s.callservicesd.ConversationLink.decode(e,e.uint32());break;case 12:r.reportData=s.callservicesd.ConversationReport.decode(e,e.uint32());break;case 14:r.conversationProviderIdentifier=e.string();break;case 15:r.otherInvitedHandles&&r.otherInvitedHandles.length||(r.otherInvitedHandles=[]),r.otherInvitedHandles.push(s.callservicesd.Handle.decode(e,e.uint32()));break;case 16:r.lightweightMembers&&r.lightweightMembers.length||(r.lightweightMembers=[]),r.lightweightMembers.push(s.callservicesd.ConversationMember.decode(e,e.uint32()));break;case 17:r.activeLightweightParticipants&&r.activeLightweightParticipants.length||(r.activeLightweightParticipants=[]),r.activeLightweightParticipants.push(s.callservicesd.ConversationParticipant.decode(e,e.uint32()));break;case 18:r.highlightIdentifier=e.string();break;default:e.skipType(7&t)}}return r},e}(),e.ConversationReport=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.conversationID="",e.prototype.timebase=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.conversationID&&Object.hasOwnProperty.call(e,"conversationID")&&t.uint32(10).string(e.conversationID),null!=e.timebase&&Object.hasOwnProperty.call(e,"timebase")&&t.uint32(17).double(e.timebase),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.callservicesd.ConversationReport;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.conversationID=e.string();break;case 2:r.timebase=e.double();break;default:e.skipType(7&t)}}return r},e}(),e})()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=s.KeyTransparencyLoggableData=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.ngmPublicIdentity=a.newBuffer([]),e.prototype.ngmVersion=0,e.prototype.ktVersion=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.ngmPublicIdentity&&Object.hasOwnProperty.call(e,"ngmPublicIdentity")&&t.uint32(10).bytes(e.ngmPublicIdentity),null!=e.ngmVersion&&Object.hasOwnProperty.call(e,"ngmVersion")&&t.uint32(16).uint32(e.ngmVersion),null!=e.ktVersion&&Object.hasOwnProperty.call(e,"ktVersion")&&t.uint32(24).uint32(e.ktVersion),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.KeyTransparencyLoggableData;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.ngmPublicIdentity=e.bytes();break;case 2:r.ngmVersion=e.uint32();break;case 3:r.ktVersion=e.uint32();break;default:e.skipType(7&t)}}return r},e})()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1045);async function i(e,t,n){const i=await crypto.subtle.exportKey("raw",e.publicKey),a=new Uint8Array(i);let s;const c=n&&o[n];s=void 0!=c?function(e,t){const n=new Uint8Array(18);return n[0]=1,n.set(Object(r.b)(e),1),n[9]=t,crypto.getRandomValues(n.subarray(10)),n}(t,c):function(e){const t=new Uint8Array(17);return t[0]=0,t.set(Object(r.b)(e),1),crypto.getRandomValues(t.subarray(9)),t}(t);const u=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},e.privateKey,s)),l=u.length/2,d=u.subarray(0,l),p=u.subarray(l),f=u[0]>127,h=u[l]>127,m=l+(f?1:0),g=l+(h?1:0);let v=0;const y=new Uint8Array(m+g+2+2+4);return y[v++]=1,y[v++]=3,y[v++]=48,y[v++]=m+g+4,y[v++]=2,y[v++]=m,f&&(y[v++]=0),y.set(d,v),v+=l,y[v++]=2,y[v++]=g,h&&(y[v++]=0),y.set(p,v),v+=l,{publicKey:a,nonce:s,signature:y}}const o={ids:1,pds:2}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=(s.VCMediaNegotiationBlobV2GeneralInfo=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.ntpTime=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.cname="",e.prototype.abSwitches=0,e.prototype.screenRes=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.ntpTime&&Object.hasOwnProperty.call(e,"ntpTime")&&t.uint32(8).uint64(e.ntpTime),null!=e.cname&&Object.hasOwnProperty.call(e,"cname")&&t.uint32(18).string(e.cname),null!=e.abSwitches&&Object.hasOwnProperty.call(e,"abSwitches")&&t.uint32(24).uint32(e.abSwitches),null!=e.screenRes&&Object.hasOwnProperty.call(e,"screenRes")&&t.uint32(32).uint32(e.screenRes),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2GeneralInfo;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.ntpTime=e.uint64();break;case 2:r.cname=e.string();break;case 3:r.abSwitches=e.uint32();break;case 4:r.screenRes=e.uint32();break;default:e.skipType(7&t)}}return r},e.ABSwitch=function(){const e={},t=Object.create(e);return t[e[1]="preferRelayOverP2P"]=1,t[e[2]="alwaysOnAudioRedundancyEnabled"]=2,t[e[4]="highFecEnabled"]=4,t[e[8]="lowFpsVideoEnabled"]=8,t[e[16]="vplrFecEnabled"]=16,t[e[32]="rampDownBWDropEnabled"]=32,t[e[64]="fastMediaDuplicationEnabled"]=64,t[e[128]="iRATRtpEnabled"]=128,t[e[256]="preWarmCellEnabled"]=256,t[e[512]="duplicateImportantPktsEnabled"]=512,t[e[1024]="allowBurstyLossRampDownEnabled"]=1024,t[e[2048]="hevcWifiTiersEnabled"]=2048,t[e[4096]="viewpointCorrectionEnabled"]=4096,t[e[8192]="heifHevcLivePhotosEnabled"]=8192,t[e[16384]="wifiLowTierRedundancyEnabled"]=16384,t[e[32768]="cellularLowTierRedundancyEnabled"]=32768,t[e[65536]="iRATMetricsEnabled"]=65536,t[e[131072]="fecHeaderV1Enabled"]=131072,t[e[262144]="updatedAFRCHeaderEnabled"]=262144,t[e[524288]="secureMessagingEnabled"]=524288,t[e[1048576]="disableSIPEnabled"]=1048576,t[e[2097152]="wifiAssistDuplicationEnabled"]=2097152,t[e[4194304]="wifiAssistBudgetStatusEnabled"]=4194304,t[e[8388608]="wifiAssistStatusBarEnabled"]=8388608,t[e[16777216]="lowNetworkModeEnabled"]=16777216,t[e[33554432]="duplicationEnhancementEnabled"]=33554432,t[e[67108864]="videoJBEnabled"]=67108864,t[e[134217728]="iRATDuplicationEnabled"]=134217728,t[e[268435456]="wrmThresholdEnabled"]=268435456,t}(),e})(),s.VCMediaNegotiationBlobV2CodecFeatures=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.audioFeatures=0,e.prototype.videoFeatures=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.audioFeatures&&Object.hasOwnProperty.call(e,"audioFeatures")&&t.uint32(8).uint32(e.audioFeatures),null!=e.videoFeatures&&Object.hasOwnProperty.call(e,"videoFeatures")&&t.uint32(18).bytes(e.videoFeatures),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2CodecFeatures;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.audioFeatures=e.uint32();break;case 2:r.videoFeatures=e.bytes();break;default:e.skipType(7&t)}}return r},e.AudioFeature=function(){const e={},t=Object.create(e);return t[e[1]="Recording"]=1,t}(),e})(),s.VCMediaNegotiationBlobV2BandwidthSettings=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.cap2G=100,e.prototype.cap3G=228,e.prototype.capLTE=600,e.prototype.cap5G=2e3,e.prototype.capWifi=4100,e.encode=function(e,t){return t||(t=o.create()),null!=e.cap2G&&Object.hasOwnProperty.call(e,"cap2G")&&t.uint32(8).uint32(e.cap2G),null!=e.cap3G&&Object.hasOwnProperty.call(e,"cap3G")&&t.uint32(16).uint32(e.cap3G),null!=e.capLTE&&Object.hasOwnProperty.call(e,"capLTE")&&t.uint32(24).uint32(e.capLTE),null!=e.cap5G&&Object.hasOwnProperty.call(e,"cap5G")&&t.uint32(32).uint32(e.cap5G),null!=e.capWifi&&Object.hasOwnProperty.call(e,"capWifi")&&t.uint32(40).uint32(e.capWifi),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2BandwidthSettings;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.cap2G=e.uint32();break;case 2:r.cap3G=e.uint32();break;case 3:r.capLTE=e.uint32();break;case 4:r.cap5G=e.uint32();break;case 5:r.capWifi=e.uint32();break;default:e.skipType(7&t)}}return r},e})(),s.VCMediaNegotiationBlobV2MicrophoneSettingsU1=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.rtpSSRC=0,e.prototype.payloads=15,e.encode=function(e,t){return t||(t=o.create()),null!=e.rtpSSRC&&Object.hasOwnProperty.call(e,"rtpSSRC")&&t.uint32(8).uint32(e.rtpSSRC),null!=e.payloads&&Object.hasOwnProperty.call(e,"payloads")&&t.uint32(16).uint32(e.payloads),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2MicrophoneSettingsU1;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.rtpSSRC=e.uint32();break;case 2:r.payloads=e.uint32();break;default:e.skipType(7&t)}}return r},e.Payload=function(){const e={},t=Object.create(e);return t[e[1]="AACELD_24000"]=1,t[e[2]="EVS_32000"]=2,t[e[4]="CN"]=4,t[e[8]="RED"]=8,t[e[15]="SupportedMask"]=15,t}(),e})(),s.VCMediaNegotiationBlobV2VideoPayload=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.videoPayload=1,e.prototype.parameterSet=0,e.prototype.encodeFormats=0,e.prototype.decodeFormats=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.videoPayload&&Object.hasOwnProperty.call(e,"videoPayload")&&t.uint32(8).uint32(e.videoPayload),null!=e.parameterSet&&Object.hasOwnProperty.call(e,"parameterSet")&&t.uint32(16).uint32(e.parameterSet),null!=e.encodeFormats&&Object.hasOwnProperty.call(e,"encodeFormats")&&t.uint32(24).uint32(e.encodeFormats),null!=e.decodeFormats&&Object.hasOwnProperty.call(e,"decodeFormats")&&t.uint32(32).uint32(e.decodeFormats),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2VideoPayload;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.videoPayload=e.uint32();break;case 2:r.parameterSet=e.uint32();break;case 3:r.encodeFormats=e.uint32();break;case 4:r.decodeFormats=e.uint32();break;default:e.skipType(7&t)}}return r},e.VideoPayload=function(){const e={},t=Object.create(e);return t[e[1]="H264"]=1,t[e[2]="HEVC"]=2,t[e[3]="SupportedMask"]=3,t}(),e.ParameterSet=function(){const e={},t=Object.create(e);return t[e[1]="ImageDescription"]=1,t[e[2]="SPS"]=2,t[e[4]="PPS"]=4,t[e[8]="VPS"]=8,t[e[15]="SupportedMask"]=15,t}(),e.VideoFormat=function(){const e={},t=Object.create(e);return t[e[1]="video_192x112_15"]=1,t[e[2]="video_320x240_15"]=2,t[e[4]="video_320x240_30"]=4,t[e[8]="video_480x272_15"]=8,t[e[16]="video_480x272_30"]=16,t[e[32]="video_480x368_15"]=32,t[e[64]="video_480x368_30"]=64,t[e[128]="video_640x480_15"]=128,t[e[256]="video_640x480_30"]=256,t[e[512]="video_848x480_15"]=512,t[e[1024]="video_848x480_30"]=1024,t[e[2048]="video_896x672_15"]=2048,t[e[4096]="video_896x672_30"]=4096,t[e[8192]="video_896x672_60"]=8192,t[e[16384]="video_1024x576_15"]=16384,t[e[32768]="video_1024x768_15"]=32768,t[e[65536]="video_1024x768_30"]=65536,t[e[131072]="video_1024x768_60"]=131072,t[e[262144]="video_1280x720_15"]=262144,t[e[524288]="video_1024x576_30"]=524288,t[e[1048576]="video_1280x720_30"]=1048576,t[e[2097152]="video_1280x720_60"]=2097152,t[e[4194304]="video_1440x1080_30"]=4194304,t[e[8388608]="video_1664x1248_30"]=8388608,t[e[16777216]="video_1664x1248_60"]=16777216,t[e[33554432]="video_1920x1080_30"]=33554432,t[e[67108864]="video_1920x1080_60"]=67108864,t[e[134217727]="video_SUPPORTED"]=134217727,t}(),e})(),s.VCMediaNegotiationBlobV2CameraSettingsU1=(()=>{function e(e){if(this.payloads=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.rtpSSRC=0,e.prototype.payloads=a.emptyArray,e.prototype.orientMismatchDisplayRatio=196610,e.encode=function(e,t){if(t||(t=o.create()),null!=e.rtpSSRC&&Object.hasOwnProperty.call(e,"rtpSSRC")&&t.uint32(8).uint32(e.rtpSSRC),null!=e.payloads&&e.payloads.length)for(let n=0;n<e.payloads.length;++n)s.VCMediaNegotiationBlobV2VideoPayload.encode(e.payloads[n],t.uint32(18).fork()).ldelim();return null!=e.orientMismatchDisplayRatio&&Object.hasOwnProperty.call(e,"orientMismatchDisplayRatio")&&t.uint32(24).uint32(e.orientMismatchDisplayRatio),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2CameraSettingsU1;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.rtpSSRC=e.uint32();break;case 2:r.payloads&&r.payloads.length||(r.payloads=[]),r.payloads.push(s.VCMediaNegotiationBlobV2VideoPayload.decode(e,e.uint32()));break;case 3:r.orientMismatchDisplayRatio=e.uint32();break;default:e.skipType(7&t)}}return r},e})(),s.VCMediaNegotiationBlobV2MomentsSettings=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.capabilities=4,e.prototype.supportedCodecs=10,e.encode=function(e,t){return t||(t=o.create()),null!=e.capabilities&&Object.hasOwnProperty.call(e,"capabilities")&&t.uint32(8).uint32(e.capabilities),null!=e.supportedCodecs&&Object.hasOwnProperty.call(e,"supportedCodecs")&&t.uint32(16).uint32(e.supportedCodecs),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2MomentsSettings;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.capabilities=e.uint32();break;case 2:r.supportedCodecs=e.uint32();break;default:e.skipType(7&t)}}return r},e.Capabilities=function(){const e={},t=Object.create(e);return t[e[1]="history_image"]=1,t[e[2]="history_video"]=2,t[e[4]="multiway_history_image"]=4,t[e[8]="multiway_history_video"]=8,t[e[15]="SupportedMask"]=15,t}(),e.Codec=function(){const e={},t=Object.create(e);return t[e[1]="H264"]=1,t[e[2]="HEVC"]=2,t[e[4]="JPEG"]=4,t[e[8]="HEIF"]=8,t[e[15]="SupportedMask"]=15,t}(),e})(),s.VCMediaNegotiationBlobV2StreamGroupStream=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.metadata=0,e.prototype.payloadSpecOrPayloads=0,e.prototype.qualityIndex=0,e.prototype.rtpSSRC=0,e.prototype.streamID=0,e.prototype.maxNetworkBitrate=0,e.prototype.repairedMaxNetworkBitrate=0,e.prototype.audioChannelCount=1,e.prototype.streamIndex=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(8).uint32(e.metadata),null!=e.payloadSpecOrPayloads&&Object.hasOwnProperty.call(e,"payloadSpecOrPayloads")&&t.uint32(16).uint32(e.payloadSpecOrPayloads),null!=e.qualityIndex&&Object.hasOwnProperty.call(e,"qualityIndex")&&t.uint32(24).uint32(e.qualityIndex),null!=e.rtpSSRC&&Object.hasOwnProperty.call(e,"rtpSSRC")&&t.uint32(32).uint32(e.rtpSSRC),null!=e.streamID&&Object.hasOwnProperty.call(e,"streamID")&&t.uint32(40).uint32(e.streamID),null!=e.maxNetworkBitrate&&Object.hasOwnProperty.call(e,"maxNetworkBitrate")&&t.uint32(48).uint32(e.maxNetworkBitrate),null!=e.repairedMaxNetworkBitrate&&Object.hasOwnProperty.call(e,"repairedMaxNetworkBitrate")&&t.uint32(56).uint32(e.repairedMaxNetworkBitrate),null!=e.audioChannelCount&&Object.hasOwnProperty.call(e,"audioChannelCount")&&t.uint32(64).uint32(e.audioChannelCount),null!=e.streamIndex&&Object.hasOwnProperty.call(e,"streamIndex")&&t.uint32(72).uint32(e.streamIndex),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2StreamGroupStream;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.metadata=e.uint32();break;case 2:r.payloadSpecOrPayloads=e.uint32();break;case 3:r.qualityIndex=e.uint32();break;case 4:r.rtpSSRC=e.uint32();break;case 5:r.streamID=e.uint32();break;case 6:r.maxNetworkBitrate=e.uint32();break;case 7:r.repairedMaxNetworkBitrate=e.uint32();break;case 8:r.audioChannelCount=e.uint32();break;case 9:r.streamIndex=e.uint32();break;default:e.skipType(7&t)}}return r},e.Metadata=function(){const e={},t=Object.create(e);return t[e[1]="SubStream"]=1,t[e[2]="TemporalStream"]=2,t[e[4]="onDemand"]=4,t[e[8]="UsePayloadSpec"]=8,t[e[15]="SupportedMask"]=15,t}(),e.Payload=function(){const e={},t=Object.create(e);return t[e[0]="Invalid"]=0,t[e[1]="H264"]=1,t[e[2]="HEVC"]=2,t[e[4]="Data"]=4,t[e[8]="OPUS"]=8,t[e[16]="AACELD_24000"]=16,t[e[32]="EVS_32000"]=32,t[e[64]="AACELD_48000"]=64,t[e[128]="RED"]=128,t[e[256]="CN"]=256,t[e[511]="SupportedMask"]=511,t}(),e})(),s.VCMediaNegotiationBlobV2StreamGroupPayload=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.codecType=0,e.prototype.rtpPayload=0,e.prototype.pTime=0,e.prototype.rtcpFlags=0,e.prototype.mediaFlags=0,e.prototype.profileLevelId=0,e.prototype.rtpSampleRate=0,e.prototype.cipherSuite=0,e.encode=function(e,t){return t||(t=o.create()),null!=e.codecType&&Object.hasOwnProperty.call(e,"codecType")&&t.uint32(8).uint32(e.codecType),null!=e.rtpPayload&&Object.hasOwnProperty.call(e,"rtpPayload")&&t.uint32(16).uint32(e.rtpPayload),null!=e.pTime&&Object.hasOwnProperty.call(e,"pTime")&&t.uint32(24).uint32(e.pTime),null!=e.rtcpFlags&&Object.hasOwnProperty.call(e,"rtcpFlags")&&t.uint32(32).uint32(e.rtcpFlags),null!=e.mediaFlags&&Object.hasOwnProperty.call(e,"mediaFlags")&&t.uint32(40).uint32(e.mediaFlags),null!=e.profileLevelId&&Object.hasOwnProperty.call(e,"profileLevelId")&&t.uint32(48).uint32(e.profileLevelId),null!=e.rtpSampleRate&&Object.hasOwnProperty.call(e,"rtpSampleRate")&&t.uint32(56).uint32(e.rtpSampleRate),null!=e.cipherSuite&&Object.hasOwnProperty.call(e,"cipherSuite")&&t.uint32(64).uint32(e.cipherSuite),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2StreamGroupPayload;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.codecType=e.uint32();break;case 2:r.rtpPayload=e.uint32();break;case 3:r.pTime=e.uint32();break;case 4:r.rtcpFlags=e.uint32();break;case 5:r.mediaFlags=e.uint32();break;case 6:r.profileLevelId=e.uint32();break;case 7:r.rtpSampleRate=e.uint32();break;case 8:r.cipherSuite=e.uint32();break;default:e.skipType(7&t)}}return r},e.RTCPFlag=function(){const e={},t=Object.create(e);return t[e[0]="None"]=0,t[e[1]="PSFB_PLI"]=1,t[e[2]="PSFB_FIR"]=2,t[e[4]="SR"]=4,t[e[7]="SupportedMask"]=7,t}(),e.MediaFlag=function(){const e={},t=Object.create(e);return t[e[0]="None"]=0,t[e[1]="UseInBandFEC"]=1,t}(),e.CipherSuite=function(){const e={},t=Object.create(e);return t[e[1]="CipherNoneAuthNone"]=1,t[e[2]="CipherSFRAME_AESCM128AuthSHA256_80"]=2,t[e[3]="CipherSFRAME_AESCM128AuthSHA256_32"]=3,t[e[4]="CipherSRTP_AESCM128AuthNoneRCCM3"]=4,t}(),e.CodecType=function(){const e={},t=Object.create(e);return t[e[0]="Invalid"]=0,t[e[1]="H264"]=1,t[e[2]="HEVC"]=2,t[e[3]="OPUS16K"]=3,t[e[4]="OPUS24K"]=4,t[e[5]="AACELD48K"]=5,t[e[6]="Data"]=6,t[e[7]="AACELD24K"]=7,t[e[8]="EVSSWB"]=8,t[e[9]="CN"]=9,t}(),e})(),s.VCMediaNegotiationBlobV2StreamGroup=(()=>{function e(e){if(this.payloads=[],this.streams=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streamGroup=0,e.prototype.payloads=a.emptyArray,e.prototype.streams=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.streamGroup&&Object.hasOwnProperty.call(e,"streamGroup")&&t.uint32(8).uint32(e.streamGroup),null!=e.payloads&&e.payloads.length)for(let n=0;n<e.payloads.length;++n)s.VCMediaNegotiationBlobV2StreamGroupPayload.encode(e.payloads[n],t.uint32(18).fork()).ldelim();if(null!=e.streams&&e.streams.length)for(let n=0;n<e.streams.length;++n)s.VCMediaNegotiationBlobV2StreamGroupStream.encode(e.streams[n],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2StreamGroup;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.streamGroup=e.uint32();break;case 2:r.payloads&&r.payloads.length||(r.payloads=[]),r.payloads.push(s.VCMediaNegotiationBlobV2StreamGroupPayload.decode(e,e.uint32()));break;case 3:r.streams&&r.streams.length||(r.streams=[]),r.streams.push(s.VCMediaNegotiationBlobV2StreamGroupStream.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e.StreamGroup=function(){const e={},t=Object.create(e);return t[e[0]="Invalid"]=0,t[e[1]="Camera"]=1,t[e[2]="Microphone"]=2,t[e[3]="Screen"]=3,t[e[4]="SystemAudio"]=4,t[e[5]="CameraWebRTC"]=5,t[e[6]="MicrophoneWebRTC"]=6,t[e[7]="Captions"]=7,t}(),e})(),s.VCMediaNegotiationBlobV2=(()=>{function e(e){if(this.streamGroups=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.generalInfo=null,e.prototype.bandwidthSettings=null,e.prototype.codecSupport=null,e.prototype.microphoneU1=null,e.prototype.cameraU1=null,e.prototype.momentsSettings=null,e.prototype.streamGroups=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.generalInfo&&Object.hasOwnProperty.call(e,"generalInfo")&&s.VCMediaNegotiationBlobV2GeneralInfo.encode(e.generalInfo,t.uint32(10).fork()).ldelim(),null!=e.bandwidthSettings&&Object.hasOwnProperty.call(e,"bandwidthSettings")&&s.VCMediaNegotiationBlobV2BandwidthSettings.encode(e.bandwidthSettings,t.uint32(18).fork()).ldelim(),null!=e.codecSupport&&Object.hasOwnProperty.call(e,"codecSupport")&&s.VCMediaNegotiationBlobV2CodecFeatures.encode(e.codecSupport,t.uint32(26).fork()).ldelim(),null!=e.microphoneU1&&Object.hasOwnProperty.call(e,"microphoneU1")&&s.VCMediaNegotiationBlobV2MicrophoneSettingsU1.encode(e.microphoneU1,t.uint32(34).fork()).ldelim(),null!=e.cameraU1&&Object.hasOwnProperty.call(e,"cameraU1")&&s.VCMediaNegotiationBlobV2CameraSettingsU1.encode(e.cameraU1,t.uint32(42).fork()).ldelim(),null!=e.momentsSettings&&Object.hasOwnProperty.call(e,"momentsSettings")&&s.VCMediaNegotiationBlobV2MomentsSettings.encode(e.momentsSettings,t.uint32(50).fork()).ldelim(),null!=e.streamGroups&&e.streamGroups.length)for(let n=0;n<e.streamGroups.length;++n)s.VCMediaNegotiationBlobV2StreamGroup.encode(e.streamGroups[n],t.uint32(58).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCMediaNegotiationBlobV2;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.generalInfo=s.VCMediaNegotiationBlobV2GeneralInfo.decode(e,e.uint32());break;case 2:r.bandwidthSettings=s.VCMediaNegotiationBlobV2BandwidthSettings.decode(e,e.uint32());break;case 3:r.codecSupport=s.VCMediaNegotiationBlobV2CodecFeatures.decode(e,e.uint32());break;case 4:r.microphoneU1=s.VCMediaNegotiationBlobV2MicrophoneSettingsU1.decode(e,e.uint32());break;case 5:r.cameraU1=s.VCMediaNegotiationBlobV2CameraSettingsU1.decode(e,e.uint32());break;case 6:r.momentsSettings=s.VCMediaNegotiationBlobV2MomentsSettings.decode(e,e.uint32());break;case 7:r.streamGroups&&r.streamGroups.length||(r.streamGroups=[]),r.streamGroups.push(s.VCMediaNegotiationBlobV2StreamGroup.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return r},e})())},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(1052);var r=n(1053);const i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={}),c=s.VCCallInfoBlob=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.callID=0,e.prototype.clientVersion=0,e.prototype.deviceType="",e.prototype.frameworkVersion="",e.prototype.osVersion="",e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).uint32(e.callID),t.uint32(16).uint32(e.clientVersion),t.uint32(26).string(e.deviceType),t.uint32(34).string(e.frameworkVersion),t.uint32(42).string(e.osVersion),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));let n=void 0===t?e.len:e.pos+t,r=new s.VCCallInfoBlob;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.callID=e.uint32();break;case 2:r.clientVersion=e.uint32();break;case 3:r.deviceType=e.string();break;case 4:r.frameworkVersion=e.string();break;case 5:r.osVersion=e.string();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("callID"))throw a.ProtocolError("missing required 'callID'",{instance:r});if(!r.hasOwnProperty("clientVersion"))throw a.ProtocolError("missing required 'clientVersion'",{instance:r});if(!r.hasOwnProperty("deviceType"))throw a.ProtocolError("missing required 'deviceType'",{instance:r});if(!r.hasOwnProperty("frameworkVersion"))throw a.ProtocolError("missing required 'frameworkVersion'",{instance:r});if(!r.hasOwnProperty("osVersion"))throw a.ProtocolError("missing required 'osVersion'",{instance:r});return r},e})()},function(e,t,n){"use strict";(function(e){function t(){}function n(e){return"object"==typeof e&&null!==e||"function"==typeof e}const r=t;function i(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}const o=Promise,a=Promise.resolve.bind(o),s=Promise.prototype.then,c=Promise.reject.bind(o),u=a;function l(e){return new o(e)}function d(e){return l((t=>t(e)))}function p(e){return c(e)}function f(e,t,n){return s.call(e,t,n)}function h(e,t,n){f(f(e,t,n),void 0,r)}function m(e,t){h(e,t)}function g(e,t){h(e,void 0,t)}function v(e,t,n){return f(e,t,n)}function y(e){f(e,void 0,r)}let b=e=>{if("function"==typeof queueMicrotask)b=queueMicrotask;else{const e=d(void 0);b=t=>f(e,t)}return b(e)};function w(e,t,n){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,n)}function S(e,t,n){try{return d(w(e,t,n))}catch(e){return p(e)}}class C{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let n=t;16383===t._elements.length&&(n={_elements:[],_next:void 0}),t._elements.push(e),n!==t&&(this._back=n,t._next=n),++this._size}shift(){const e=this._front;let t=e;const n=this._cursor;let r=n+1;const i=e._elements,o=i[n];return 16384===r&&(t=e._next,r=0),--this._size,this._cursor=r,e!==t&&(this._front=t),i[n]=void 0,o}forEach(e){let t=this._cursor,n=this._front,r=n._elements;for(;!(t===r.length&&void 0===n._next||t===r.length&&(n=n._next,r=n._elements,t=0,0===r.length));)e(r[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}const _=Symbol("[[AbortSteps]]"),O=Symbol("[[ErrorSteps]]"),E=Symbol("[[CancelSteps]]"),I=Symbol("[[PullSteps]]"),A=Symbol("[[ReleaseSteps]]");function T(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?D(e):"closed"===t._state?function(e){D(e),x(e)}(e):M(e,t._storedError)}function P(e,t){return Un(e._ownerReadableStream,t)}function R(e){const t=e._ownerReadableStream;"readable"===t._state?N(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e){M(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[A](),t._reader=void 0,e._ownerReadableStream=void 0}function k(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function D(e){e._closedPromise=l(((t,n)=>{e._closedPromise_resolve=t,e._closedPromise_reject=n}))}function M(e,t){D(e),N(e,t)}function N(e,t){void 0!==e._closedPromise_reject&&(y(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function x(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const L=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},j=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function U(e,t){if(void 0!==e&&"object"!=typeof(n=e)&&"function"!=typeof n)throw new TypeError(`${t} is not an object.`);var n}function F(e,t){if("function"!=typeof e)throw new TypeError(`${t} is not a function.`)}function z(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(`${t} is not an object.`)}function B(e,t,n){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${n}'.`)}function K(e,t,n){if(void 0===e)throw new TypeError(`${t} is required in '${n}'.`)}function H(e){return Number(e)}function W(e){return 0===e?0:e}function q(e,t){const n=Number.MAX_SAFE_INTEGER;let r=Number(e);if(r=W(r),!L(r))throw new TypeError(`${t} is not a finite number`);if(r=function(e){return W(j(e))}(r),r<0||r>n)throw new TypeError(`${t} is outside the accepted range of 0 to ${n}, inclusive`);return L(r)&&0!==r?r:0}function V(e,t){if(!Ln(e))throw new TypeError(`${t} is not a ReadableStream.`)}function $(e){return new J(e)}function G(e,t){e._reader._readRequests.push(t)}function Z(e,t,n){const r=e._reader._readRequests.shift();n?r._closeSteps():r._chunkSteps(t)}function Q(e){return e._reader._readRequests.length}function Y(e){const t=e._reader;return void 0!==t&&!!X(t)}class J{constructor(e){if(B(e,1,"ReadableStreamDefaultReader"),V(e,"First parameter"),jn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");T(this,e),this._readRequests=new C}get closed(){return X(this)?this._closedPromise:p(ne("closed"))}cancel(e=void 0){return X(this)?void 0===this._ownerReadableStream?p(k("cancel")):P(this,e):p(ne("cancel"))}read(){if(!X(this))return p(ne("read"));if(void 0===this._ownerReadableStream)return p(k("read from"));let e,t;const n=l(((n,r)=>{e=n,t=r}));return ee(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),n}releaseLock(){if(!X(this))throw ne("releaseLock");void 0!==this._ownerReadableStream&&function(e){R(e),te(e,new TypeError("Reader was released"))}(this)}}function X(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof J}function ee(e,t){const n=e._ownerReadableStream;n._disturbed=!0,"closed"===n._state?t._closeSteps():"errored"===n._state?t._errorSteps(n._storedError):n._readableStreamController[I](t)}function te(e,t){const n=e._readRequests;e._readRequests=new C,n.forEach((e=>{e._errorSteps(t)}))}function ne(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}var re,ie,oe;function ae(e){return e.slice()}function se(e,t,n,r,i){new Uint8Array(e).set(new Uint8Array(n,r,i),t)}Object.defineProperties(J.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(J.prototype.cancel,"cancel"),i(J.prototype.read,"read"),i(J.prototype.releaseLock,"releaseLock"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(J.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});let ce=e=>(ce="function"==typeof e.transfer?e=>e.transfer():"function"==typeof structuredClone?e=>structuredClone(e,{transfer:[e]}):e=>e,ce(e)),ue=e=>(ue="boolean"==typeof e.detached?e=>e.detached:e=>0===e.byteLength,ue(e));function le(e,t,n){if(e.slice)return e.slice(t,n);const r=n-t,i=new ArrayBuffer(r);return se(i,0,e,t,r),i}function de(e,t){const n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(`${String(t)} is not a function`);return n}}function pe(e){try{const t=e.done,n=e.value;return f(u(n),(e=>({done:t,value:e})))}catch(e){return p(e)}}const fe=null!==(oe=null!==(re=Symbol.asyncIterator)&&void 0!==re?re:null===(ie=Symbol.for)||void 0===ie?void 0:ie.call(Symbol,"Symbol.asyncIterator"))&&void 0!==oe?oe:"@@asyncIterator";function he(e,t="sync",r){if(void 0===r)if("async"===t){if(void 0===(r=de(e,fe)))return function(e){const t={next(){let t;try{t=me(e)}catch(e){return p(e)}return pe(t)},return(t){let r;try{const n=de(e.iterator,"return");if(void 0===n)return d({done:!0,value:t});r=w(n,e.iterator,[t])}catch(e){return p(e)}return n(r)?pe(r):p(new TypeError("The iterator.return() method must return an object"))}};return{iterator:t,nextMethod:t.next,done:!1}}(he(e,"sync",de(e,Symbol.iterator)))}else r=de(e,Symbol.iterator);if(void 0===r)throw new TypeError("The object is not iterable");const i=w(r,e,[]);if(!n(i))throw new TypeError("The iterator method must return an object");return{iterator:i,nextMethod:i.next,done:!1}}function me(e){const t=w(e.nextMethod,e.iterator,[]);if(!n(t))throw new TypeError("The iterator.next() method must return an object");return t}class ge{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,t,t):t(),this._ongoingPromise}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;let t,n;const r=l(((e,r)=>{t=e,n=r}));return ee(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,b((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,R(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,R(e),n(t)}}),r}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(!this._preventCancel){const n=P(t,e);return R(t),v(n,(()=>({value:e,done:!0})))}return R(t),d({value:e,done:!0})}}const ve={next(){return ye(this)?this._asyncIteratorImpl.next():p(be("next"))},return(e){return ye(this)?this._asyncIteratorImpl.return(e):p(be("return"))},[fe](){return this}};function ye(e){if(!n(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof ge}catch(e){return!1}}function be(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}Object.defineProperty(ve,fe,{enumerable:!1});const we=Number.isNaN||function(e){return e!=e};function Se(e){const t=le(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function Ce(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function _e(e,t,n){if("number"!=typeof(r=n)||we(r)||r<0||n===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var r;e._queue.push({value:t,size:n}),e._queueTotalSize+=n}function Oe(e){e._queue=new C,e._queueTotalSize=0}function Ee(e){return e===DataView}class Ie{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Pe(this))throw tt("view");return this._view}respond(e){if(!Pe(this))throw tt("respond");if(B(e,1,"respond"),e=q(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(ue(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Je(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Pe(this))throw tt("respondWithNewView");if(B(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(ue(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Xe(this._associatedReadableByteStreamController,e)}}Object.defineProperties(Ie.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(Ie.prototype.respond,"respond"),i(Ie.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Ae{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Te(this))throw nt("byobRequest");return Qe(this)}get desiredSize(){if(!Te(this))throw nt("desiredSize");return Ye(this)}close(){if(!Te(this))throw nt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);Ve(this)}enqueue(e){if(!Te(this))throw nt("enqueue");if(B(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);$e(this,e)}error(e=void 0){if(!Te(this))throw nt("error");Ge(this,e)}[E](e){ke(this),Oe(this);const t=this._cancelAlgorithm(e);return qe(this),t}[I](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0)return void Ze(this,e);const n=this._autoAllocateChunkSize;if(void 0!==n){let r;try{r=new ArrayBuffer(n)}catch(t){return void e._errorSteps(t)}const i={buffer:r,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}G(t,e),Re(this)}[A](){if(this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new C,this._pendingPullIntos.push(e)}}}function Te(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Ae}function Pe(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof Ie}function Re(e){const t=function(e){const t=e._controlledReadableByteStream;return"readable"===t._state&&(!e._closeRequested&&(!!e._started&&(!!(Y(t)&&Q(t)>0)||(!!(st(t)&&at(t)>0)||Ye(e)>0))))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,h(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Re(e)),null)),(t=>(Ge(e,t),null)))))}function ke(e){Be(e),e._pendingPullIntos=new C}function De(e,t){let n=!1;"closed"===e._state&&(n=!0);const r=Ne(t);"default"===t.readerType?Z(e,r,n):function(e,t,n){const r=e._reader._readIntoRequests.shift();n?r._closeSteps(t):r._chunkSteps(t)}(e,r,n)}function Me(e,t){for(let n=0;n<t.length;++n)De(e,t[n])}function Ne(e){const t=e.bytesFilled,n=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/n)}function xe(e,t,n,r){e._queue.push({buffer:t,byteOffset:n,byteLength:r}),e._queueTotalSize+=r}function Le(e,t,n,r){let i;try{i=le(t,n,n+r)}catch(t){throw Ge(e,t),t}xe(e,i,0,r)}function je(e,t){t.bytesFilled>0&&Le(e,t.buffer,t.byteOffset,t.bytesFilled),We(e)}function Ue(e,t){const n=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),r=t.bytesFilled+n;let i=n,o=!1;const a=r-r%t.elementSize;a>=t.minimumFill&&(i=a-t.bytesFilled,o=!0);const s=e._queue;for(;i>0;){const n=s.peek(),r=Math.min(i,n.byteLength),o=t.byteOffset+t.bytesFilled;se(t.buffer,o,n.buffer,n.byteOffset,r),n.byteLength===r?s.shift():(n.byteOffset+=r,n.byteLength-=r),e._queueTotalSize-=r,Fe(0,r,t),i-=r}return o}function Fe(e,t,n){n.bytesFilled+=t}function ze(e){0===e._queueTotalSize&&e._closeRequested?(qe(e),Fn(e._controlledReadableByteStream)):Re(e)}function Be(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ke(e){const t=[];for(;e._pendingPullIntos.length>0&&0!==e._queueTotalSize;){const n=e._pendingPullIntos.peek();Ue(e,n)&&(We(e),t.push(n))}return t}function He(e,t){const n=e._pendingPullIntos.peek();Be(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&We(e);const n=e._controlledReadableByteStream;if(st(n)){const t=[];for(;t.length<at(n);)t.push(We(e));Me(n,t)}}(e,n):function(e,t,n){if(Fe(0,t,n),"none"===n.readerType){je(e,n);const t=Ke(e);return void Me(e._controlledReadableByteStream,t)}if(n.bytesFilled<n.minimumFill)return;We(e);const r=n.bytesFilled%n.elementSize;if(r>0){const t=n.byteOffset+n.bytesFilled;Le(e,n.buffer,t-r,r)}n.bytesFilled-=r;const i=Ke(e);De(e._controlledReadableByteStream,n),Me(e._controlledReadableByteStream,i)}(e,t,n),Re(e)}function We(e){return e._pendingPullIntos.shift()}function qe(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ve(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();if(t.bytesFilled%t.elementSize!==0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ge(e,t),t}}qe(e),Fn(t)}}function $e(e,t){const n=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==n._state)return;const{buffer:r,byteOffset:i,byteLength:o}=t;if(ue(r))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const a=ce(r);if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();if(ue(t.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Be(e),t.buffer=ce(t.buffer),"none"===t.readerType&&je(e,t)}Y(n)?(function(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(0===e._queueTotalSize)return;Ze(e,t._readRequests.shift())}}(e),0===Q(n)?xe(e,a,i,o):(e._pendingPullIntos.length>0&&We(e),Z(n,new Uint8Array(a,i,o),!1))):st(n)?(xe(e,a,i,o),Me(n,Ke(e))):xe(e,a,i,o),Re(e)}function Ge(e,t){const n=e._controlledReadableByteStream;"readable"===n._state&&(ke(e),Oe(e),qe(e),zn(n,t))}function Ze(e,t){const n=e._queue.shift();e._queueTotalSize-=n.byteLength,ze(e);const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);t._chunkSteps(r)}function Qe(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),n=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),r=Object.create(Ie.prototype);!function(e,t,n){e._associatedReadableByteStreamController=t,e._view=n}(r,e,n),e._byobRequest=r}return e._byobRequest}function Ye(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Je(e,t){const n=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(n.bytesFilled+t>n.byteLength)throw new RangeError("bytesWritten out of range")}n.buffer=ce(n.buffer),He(e,t)}function Xe(e,t){const n=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(n.byteOffset+n.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(n.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(n.bytesFilled+t.byteLength>n.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const r=t.byteLength;n.buffer=ce(t.buffer),He(e,r)}function et(e,t,n,r,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Oe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=r,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new C,e._readableStreamController=t,h(d(n()),(()=>(t._started=!0,Re(t),null)),(e=>(Ge(t,e),null)))}function tt(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function nt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function rt(e,t){if("byob"!==(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function it(e){return new ct(e)}function ot(e,t){e._reader._readIntoRequests.push(t)}function at(e){return e._reader._readIntoRequests.length}function st(e){const t=e._reader;return void 0!==t&&!!ut(t)}Object.defineProperties(Ae.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Ae.prototype.close,"close"),i(Ae.prototype.enqueue,"enqueue"),i(Ae.prototype.error,"error"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Ae.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class ct{constructor(e){if(B(e,1,"ReadableStreamBYOBReader"),V(e,"First parameter"),jn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Te(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");T(this,e),this._readIntoRequests=new C}get closed(){return ut(this)?this._closedPromise:p(pt("closed"))}cancel(e=void 0){return ut(this)?void 0===this._ownerReadableStream?p(k("cancel")):P(this,e):p(pt("cancel"))}read(e,t={}){if(!ut(this))return p(pt("read"));if(!ArrayBuffer.isView(e))return p(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return p(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return p(new TypeError("view's buffer must have non-zero byteLength"));if(ue(e.buffer))return p(new TypeError("view's buffer has been detached"));let n;try{n=function(e,t){var n;return U(e,t),{min:q(null!==(n=null==e?void 0:e.min)&&void 0!==n?n:1,`${t} has member 'min' that`)}}(t,"options")}catch(e){return p(e)}const r=n.min;if(0===r)return p(new TypeError("options.min must be greater than 0"));if(function(e){return Ee(e.constructor)}(e)){if(r>e.byteLength)return p(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(r>e.length)return p(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return p(k("read from"));let i,o;const a=l(((e,t)=>{i=e,o=t}));return lt(this,e,r,{_chunkSteps:e=>i({value:e,done:!1}),_closeSteps:e=>i({value:e,done:!0}),_errorSteps:e=>o(e)}),a}releaseLock(){if(!ut(this))throw pt("releaseLock");void 0!==this._ownerReadableStream&&function(e){R(e),dt(e,new TypeError("Reader was released"))}(this)}}function ut(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof ct}function lt(e,t,n,r){const i=e._ownerReadableStream;i._disturbed=!0,"errored"===i._state?r._errorSteps(i._storedError):function(e,t,n,r){const i=e._controlledReadableByteStream,o=t.constructor,a=function(e){return Ee(e)?1:e.BYTES_PER_ELEMENT}(o),{byteOffset:s,byteLength:c}=t,u=n*a;let l;try{l=ce(t.buffer)}catch(e){return void r._errorSteps(e)}const d={buffer:l,bufferByteLength:l.byteLength,byteOffset:s,byteLength:c,bytesFilled:0,minimumFill:u,elementSize:a,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(d),void ot(i,r);if("closed"!==i._state){if(e._queueTotalSize>0){if(Ue(e,d)){const t=Ne(d);return ze(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return Ge(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(d),ot(i,r),Re(e)}else{const e=new o(d.buffer,d.byteOffset,0);r._closeSteps(e)}}(i._readableStreamController,t,n,r)}function dt(e,t){const n=e._readIntoRequests;e._readIntoRequests=new C,n.forEach((e=>{e._errorSteps(t)}))}function pt(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function ft(e,t){const{highWaterMark:n}=e;if(void 0===n)return t;if(we(n)||n<0)throw new RangeError("Invalid highWaterMark");return n}function ht(e){const{size:t}=e;return t||(()=>1)}function mt(e,t){U(e,t);const n=null==e?void 0:e.highWaterMark,r=null==e?void 0:e.size;return{highWaterMark:void 0===n?void 0:H(n),size:void 0===r?void 0:gt(r,`${t} has member 'size' that`)}}function gt(e,t){return F(e,t),t=>H(e(t))}function vt(e,t,n){return F(e,n),n=>S(e,t,[n])}function yt(e,t,n){return F(e,n),()=>S(e,t,[])}function bt(e,t,n){return F(e,n),n=>w(e,t,[n])}function wt(e,t,n){return F(e,n),(n,r)=>S(e,t,[n,r])}function St(e,t){if(!Et(e))throw new TypeError(`${t} is not a WritableStream.`)}Object.defineProperties(ct.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(ct.prototype.cancel,"cancel"),i(ct.prototype.read,"read"),i(ct.prototype.releaseLock,"releaseLock"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(ct.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class Ct{constructor(e={},t={}){void 0===e?e=null:z(e,"First parameter");const n=mt(t,"Second parameter"),r=function(e,t){U(e,t);const n=null==e?void 0:e.abort,r=null==e?void 0:e.close,i=null==e?void 0:e.start,o=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===n?void 0:vt(n,e,`${t} has member 'abort' that`),close:void 0===r?void 0:yt(r,e,`${t} has member 'close' that`),start:void 0===i?void 0:bt(i,e,`${t} has member 'start' that`),write:void 0===a?void 0:wt(a,e,`${t} has member 'write' that`),type:o}}(e,"First parameter");if(Ot(this),void 0!==r.type)throw new RangeError("Invalid type is specified");const i=ht(n);!function(e,t,n,r){const i=Object.create(Kt.prototype);let o,a,s,c;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.write?e=>t.write(e,i):()=>d(void 0),s=void 0!==t.close?()=>t.close():()=>d(void 0),c=void 0!==t.abort?e=>t.abort(e):()=>d(void 0),Wt(e,i,o,a,s,c,n,r)}(this,r,ft(n,1),i)}get locked(){if(!Et(this))throw Yt("locked");return It(this)}abort(e=void 0){return Et(this)?It(this)?p(new TypeError("Cannot abort a stream that already has a writer")):At(this,e):p(Yt("abort"))}close(){return Et(this)?It(this)?p(new TypeError("Cannot close a stream that already has a writer")):Dt(this)?p(new TypeError("Cannot close an already-closing stream")):Tt(this):p(Yt("close"))}getWriter(){if(!Et(this))throw Yt("getWriter");return _t(this)}}function _t(e){return new xt(e)}function Ot(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new C,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Et(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof Ct}function It(e){return void 0!==e._writer}function At(e,t){var n;if("closed"===e._state||"errored"===e._state)return d(void 0);e._writableStreamController._abortReason=t,null===(n=e._writableStreamController._abortController)||void 0===n||n.abort(t);const r=e._state;if("closed"===r||"errored"===r)return d(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let i=!1;"erroring"===r&&(i=!0,t=void 0);const o=l(((n,r)=>{e._pendingAbortRequest={_promise:void 0,_resolve:n,_reject:r,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=o,i||Rt(e,t),o}function Tt(e){const t=e._state;if("closed"===t||"errored"===t)return p(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const n=l(((t,n)=>{const r={_resolve:t,_reject:n};e._closeRequest=r})),r=e._writer;var i;return void 0!==r&&e._backpressure&&"writable"===t&&ln(r),_e(i=e._writableStreamController,Bt,0),$t(i),n}function Pt(e,t){"writable"!==e._state?kt(e):Rt(e,t)}function Rt(e,t){const n=e._writableStreamController;e._state="erroring",e._storedError=t;const r=e._writer;void 0!==r&&Ut(r,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&n._started&&kt(e)}function kt(e){e._state="errored",e._writableStreamController[O]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new C,void 0===e._pendingAbortRequest)return void Mt(e);const n=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,n._wasAlreadyErroring)return n._reject(t),void Mt(e);h(e._writableStreamController[_](n._reason),(()=>(n._resolve(),Mt(e),null)),(t=>(n._reject(t),Mt(e),null)))}function Dt(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Mt(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&rn(t,e._storedError)}function Nt(e,t){const n=e._writer;void 0!==n&&t!==e._backpressure&&(t?function(e){an(e)}(n):ln(n)),e._backpressure=t}Object.defineProperties(Ct.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(Ct.prototype.abort,"abort"),i(Ct.prototype.close,"close"),i(Ct.prototype.getWriter,"getWriter"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Ct.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});class xt{constructor(e){if(B(e,1,"WritableStreamDefaultWriter"),St(e,"First parameter"),It(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!Dt(e)&&e._backpressure?an(this):cn(this),tn(this);else if("erroring"===t)sn(this,e._storedError),tn(this);else if("closed"===t)cn(this),tn(this),on(this);else{const t=e._storedError;sn(this,t),nn(this,t)}}get closed(){return Lt(this)?this._closedPromise:p(Xt("closed"))}get desiredSize(){if(!Lt(this))throw Xt("desiredSize");if(void 0===this._ownerWritableStream)throw en("desiredSize");return function(e){const t=e._ownerWritableStream,n=t._state;return"errored"===n||"erroring"===n?null:"closed"===n?0:Vt(t._writableStreamController)}(this)}get ready(){return Lt(this)?this._readyPromise:p(Xt("ready"))}abort(e=void 0){return Lt(this)?void 0===this._ownerWritableStream?p(en("abort")):function(e,t){return At(e._ownerWritableStream,t)}(this,e):p(Xt("abort"))}close(){if(!Lt(this))return p(Xt("close"));const e=this._ownerWritableStream;return void 0===e?p(en("close")):Dt(e)?p(new TypeError("Cannot close an already-closing stream")):jt(this)}releaseLock(){if(!Lt(this))throw Xt("releaseLock");void 0!==this._ownerWritableStream&&Ft(this)}write(e=void 0){return Lt(this)?void 0===this._ownerWritableStream?p(en("write to")):zt(this,e):p(Xt("write"))}}function Lt(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof xt}function jt(e){return Tt(e._ownerWritableStream)}function Ut(e,t){"pending"===e._readyPromiseState?un(e,t):function(e,t){sn(e,t)}(e,t)}function Ft(e){const t=e._ownerWritableStream,n=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ut(e,n),function(e,t){"pending"===e._closedPromiseState?rn(e,t):function(e,t){nn(e,t)}(e,t)}(e,n),t._writer=void 0,e._ownerWritableStream=void 0}function zt(e,t){const n=e._ownerWritableStream,r=n._writableStreamController,i=function(e,t){if(void 0===e._strategySizeAlgorithm)return 1;try{return e._strategySizeAlgorithm(t)}catch(t){return Gt(e,t),1}}(r,t);if(n!==e._ownerWritableStream)return p(en("write to"));const o=n._state;if("errored"===o)return p(n._storedError);if(Dt(n)||"closed"===o)return p(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return p(n._storedError);const a=function(e){return l(((t,n)=>{const r={_resolve:t,_reject:n};e._writeRequests.push(r)}))}(n);return function(e,t,n){try{_e(e,t,n)}catch(t){return void Gt(e,t)}const r=e._controlledWritableStream;Dt(r)||"writable"!==r._state||Nt(r,Zt(e)),$t(e)}(r,t,i),a}Object.defineProperties(xt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(xt.prototype.abort,"abort"),i(xt.prototype.close,"close"),i(xt.prototype.releaseLock,"releaseLock"),i(xt.prototype.write,"write"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(xt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Bt={};class Kt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ht(this))throw Jt("abortReason");return this._abortReason}get signal(){if(!Ht(this))throw Jt("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e=void 0){if(!Ht(this))throw Jt("error");"writable"===this._controlledWritableStream._state&&Qt(this,e)}[_](e){const t=this._abortAlgorithm(e);return qt(this),t}[O](){Oe(this)}}function Ht(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Kt}function Wt(e,t,n,r,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._abortReason=void 0,t._abortController=function(){if("function"==typeof AbortController)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=r,t._closeAlgorithm=i,t._abortAlgorithm=o;const c=Zt(t);Nt(e,c),h(d(n()),(()=>(t._started=!0,$t(t),null)),(n=>(t._started=!0,Pt(e,n),null)))}function qt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Vt(e){return e._strategyHWM-e._queueTotalSize}function $t(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void kt(t);if(0===e._queue.length)return;const n=e._queue.peek().value;n===Bt?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Ce(e);const n=e._closeAlgorithm();qt(e),h(n,(()=>(function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&on(t)}(t),null)),(e=>(function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pt(e,t)}(t,e),null)))}(e):function(e,t){const n=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(n),h(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(n);const t=n._state;if(Ce(e),!Dt(n)&&"writable"===t){const t=Zt(e);Nt(n,t)}return $t(e),null}),(t=>("writable"===n._state&&qt(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pt(e,t)}(n,t),null)))}(e,n)}function Gt(e,t){"writable"===e._controlledWritableStream._state&&Qt(e,t)}function Zt(e){return Vt(e)<=0}function Qt(e,t){const n=e._controlledWritableStream;qt(e),Rt(n,t)}function Yt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Jt(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function Xt(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function en(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function tn(e){e._closedPromise=l(((t,n)=>{e._closedPromise_resolve=t,e._closedPromise_reject=n,e._closedPromiseState="pending"}))}function nn(e,t){tn(e),rn(e,t)}function rn(e,t){void 0!==e._closedPromise_reject&&(y(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function on(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function an(e){e._readyPromise=l(((t,n)=>{e._readyPromise_resolve=t,e._readyPromise_reject=n})),e._readyPromiseState="pending"}function sn(e,t){an(e),un(e,t)}function cn(e){an(e),ln(e)}function un(e,t){void 0!==e._readyPromise_reject&&(y(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ln(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Kt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Kt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const dn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof e?e:void 0,pn=function(){const e=null==dn?void 0:dn.DOMException;return function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}(e)?e:void 0}()||function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return i(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function fn(e,n,r,i,o,a){const s=$(e),c=_t(n);e._disturbed=!0;let u=!1,v=d(void 0);return l(((b,w)=>{let S;if(void 0!==a){if(S=()=>{const t=void 0!==a.reason?a.reason:new pn("Aborted","AbortError"),r=[];i||r.push((()=>"writable"===n._state?At(n,t):d(void 0))),o||r.push((()=>"readable"===e._state?Un(e,t):d(void 0))),A((()=>Promise.all(r.map((e=>e())))),!0,t)},a.aborted)return void S();a.addEventListener("abort",S)}var C,_,O;if(I(e,s._closedPromise,(e=>(i?T(!0,e):A((()=>At(n,e)),!0,e),null))),I(n,c._closedPromise,(t=>(o?T(!0,t):A((()=>Un(e,t)),!0,t),null))),C=e,_=s._closedPromise,O=()=>(r?T():A((()=>function(e){const t=e._ownerWritableStream,n=t._state;return Dt(t)||"closed"===n?d(void 0):"errored"===n?p(t._storedError):jt(e)}(c))),null),"closed"===C._state?O():m(_,O),Dt(n)||"closed"===n._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");o?T(!0,t):A((()=>Un(e,t)),!0,t)}function E(){const e=v;return f(v,(()=>e!==v?E():void 0))}function I(e,t,n){"errored"===e._state?n(e._storedError):g(t,n)}function A(e,t,r){function i(){return h(e(),(()=>P(t,r)),(e=>P(!0,e))),null}u||(u=!0,"writable"!==n._state||Dt(n)?i():m(E(),i))}function T(e,t){u||(u=!0,"writable"!==n._state||Dt(n)?P(e,t):m(E(),(()=>P(e,t))))}function P(e,t){return Ft(c),R(s),void 0!==a&&a.removeEventListener("abort",S),e?w(t):b(void 0),null}y(l(((e,n)=>{!function r(i){i?e():f(u?d(!0):f(c._readyPromise,(()=>l(((e,n)=>{ee(s,{_chunkSteps:n=>{v=f(zt(c,n),void 0,t),e(!1)},_closeSteps:()=>e(!0),_errorSteps:n})})))),r,n)}(!1)})))}))}class hn{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!mn(this))throw En("desiredSize");return Cn(this)}close(){if(!mn(this))throw En("close");if(!_n(this))throw new TypeError("The stream is not in a state that permits close");bn(this)}enqueue(e=void 0){if(!mn(this))throw En("enqueue");if(!_n(this))throw new TypeError("The stream is not in a state that permits enqueue");return wn(this,e)}error(e=void 0){if(!mn(this))throw En("error");Sn(this,e)}[E](e){Oe(this);const t=this._cancelAlgorithm(e);return yn(this),t}[I](e){const t=this._controlledReadableStream;if(this._queue.length>0){const n=Ce(this);this._closeRequested&&0===this._queue.length?(yn(this),Fn(t)):gn(this),e._chunkSteps(n)}else G(t,e),gn(this)}[A](){}}function mn(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof hn}function gn(e){vn(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,h(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,gn(e)),null)),(t=>(Sn(e,t),null)))))}function vn(e){const t=e._controlledReadableStream;return!!_n(e)&&!!e._started&&(!!(jn(t)&&Q(t)>0)||Cn(e)>0)}function yn(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function bn(e){if(!_n(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(yn(e),Fn(t))}function wn(e,t){if(!_n(e))return;const n=e._controlledReadableStream;if(jn(n)&&Q(n)>0)Z(n,t,!1);else{let n;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Sn(e,t),t}try{_e(e,t,n)}catch(t){throw Sn(e,t),t}}gn(e)}function Sn(e,t){const n=e._controlledReadableStream;"readable"===n._state&&(Oe(e),yn(e),zn(n,t))}function Cn(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function _n(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function On(e,t,n,r,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=r,t._cancelAlgorithm=i,e._readableStreamController=t,h(d(n()),(()=>(t._started=!0,gn(t),null)),(e=>(Sn(t,e),null)))}function En(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function In(e){return n(r=e)&&void 0!==r.getReader?function(e){let r;return r=Mn(t,(function(){let t;try{t=e.read()}catch(t){return p(t)}return v(t,(e=>{if(!n(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(e.done)bn(r._readableStreamController);else{const t=e.value;wn(r._readableStreamController,t)}}))}),(function(t){try{return d(e.cancel(t))}catch(t){return p(t)}}),0),r}(e.getReader()):function(e){let r;const i=he(e,"async");return r=Mn(t,(function(){let e;try{e=me(i)}catch(e){return p(e)}return v(d(e),(e=>{if(!n(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(e.done)bn(r._readableStreamController);else{const t=e.value;wn(r._readableStreamController,t)}}))}),(function(e){const t=i.iterator;let r;try{r=de(t,"return")}catch(e){return p(e)}return void 0===r?d(void 0):v(S(r,t,[e]),(e=>{if(!n(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}),0),r}(e);var r}function An(e,t,n){return F(e,n),n=>S(e,t,[n])}function Tn(e,t,n){return F(e,n),n=>S(e,t,[n])}function Pn(e,t,n){return F(e,n),n=>w(e,t,[n])}function Rn(e,t){if("bytes"!==(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function kn(e,t){U(e,t);const n=null==e?void 0:e.preventAbort,r=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(`${t} is not an AbortSignal.`)}(o,`${t} has member 'signal' that`),{preventAbort:Boolean(n),preventCancel:Boolean(r),preventClose:Boolean(i),signal:o}}Object.defineProperties(hn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(hn.prototype.close,"close"),i(hn.prototype.enqueue,"enqueue"),i(hn.prototype.error,"error"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(hn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Dn{constructor(e={},t={}){void 0===e?e=null:z(e,"First parameter");const n=mt(t,"Second parameter"),r=function(e,t){U(e,t);const n=e,r=null==n?void 0:n.autoAllocateChunkSize,i=null==n?void 0:n.cancel,o=null==n?void 0:n.pull,a=null==n?void 0:n.start,s=null==n?void 0:n.type;return{autoAllocateChunkSize:void 0===r?void 0:q(r,`${t} has member 'autoAllocateChunkSize' that`),cancel:void 0===i?void 0:An(i,n,`${t} has member 'cancel' that`),pull:void 0===o?void 0:Tn(o,n,`${t} has member 'pull' that`),start:void 0===a?void 0:Pn(a,n,`${t} has member 'start' that`),type:void 0===s?void 0:Rn(s,`${t} has member 'type' that`)}}(e,"First parameter");if(xn(this),"bytes"===r.type){if(void 0!==n.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,n){const r=Object.create(Ae.prototype);let i,o,a;i=void 0!==t.start?()=>t.start(r):()=>{},o=void 0!==t.pull?()=>t.pull(r):()=>d(void 0),a=void 0!==t.cancel?e=>t.cancel(e):()=>d(void 0);const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");et(e,r,i,o,a,n,s)}(this,r,ft(n,0))}else{const e=ht(n);!function(e,t,n,r){const i=Object.create(hn.prototype);let o,a,s;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.pull?()=>t.pull(i):()=>d(void 0),s=void 0!==t.cancel?e=>t.cancel(e):()=>d(void 0),On(e,i,o,a,s,n,r)}(this,r,ft(n,1),e)}}get locked(){if(!Ln(this))throw Bn("locked");return jn(this)}cancel(e=void 0){return Ln(this)?jn(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Un(this,e):p(Bn("cancel"))}getReader(e=void 0){if(!Ln(this))throw Bn("getReader");return void 0===function(e,t){U(e,t);const n=null==e?void 0:e.mode;return{mode:void 0===n?void 0:rt(n,`${t} has member 'mode' that`)}}(e,"First parameter").mode?$(this):it(this)}pipeThrough(e,t={}){if(!Ln(this))throw Bn("pipeThrough");B(e,1,"pipeThrough");const n=function(e,t){U(e,t);const n=null==e?void 0:e.readable;K(n,"readable","ReadableWritablePair"),V(n,`${t} has member 'readable' that`);const r=null==e?void 0:e.writable;return K(r,"writable","ReadableWritablePair"),St(r,`${t} has member 'writable' that`),{readable:n,writable:r}}(e,"First parameter"),r=kn(t,"Second parameter");if(jn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(It(n.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return y(fn(this,n.writable,r.preventClose,r.preventAbort,r.preventCancel,r.signal)),n.readable}pipeTo(e,t={}){if(!Ln(this))return p(Bn("pipeTo"));if(void 0===e)return p("Parameter 1 is required in 'pipeTo'.");if(!Et(e))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let n;try{n=kn(t,"Second parameter")}catch(e){return p(e)}return jn(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):It(e)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):fn(this,e,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!Ln(this))throw Bn("tee");return ae(function(e){return Te(e._readableStreamController)?function(e){let t,n,r,i,o,a=$(e),s=!1,c=!1,u=!1,p=!1,f=!1;const h=l((e=>{o=e}));function m(e){g(e._closedPromise,(t=>(e!==a||(Ge(r._readableStreamController,t),Ge(i._readableStreamController,t),p&&f||o(void 0)),null)))}function v(){ut(a)&&(R(a),a=$(e),m(a)),ee(a,{_chunkSteps:t=>{b((()=>{c=!1,u=!1;const n=t;let a=t;if(!p&&!f)try{a=Se(t)}catch(t){return Ge(r._readableStreamController,t),Ge(i._readableStreamController,t),void o(Un(e,t))}p||$e(r._readableStreamController,n),f||$e(i._readableStreamController,a),s=!1,c?w():u&&S()}))},_closeSteps:()=>{s=!1,p||Ve(r._readableStreamController),f||Ve(i._readableStreamController),r._readableStreamController._pendingPullIntos.length>0&&Je(r._readableStreamController,0),i._readableStreamController._pendingPullIntos.length>0&&Je(i._readableStreamController,0),p&&f||o(void 0)},_errorSteps:()=>{s=!1}})}function y(t,n){X(a)&&(R(a),a=it(e),m(a));const l=n?i:r,d=n?r:i;lt(a,t,1,{_chunkSteps:t=>{b((()=>{c=!1,u=!1;const r=n?f:p;if(n?p:f)r||Xe(l._readableStreamController,t);else{let n;try{n=Se(t)}catch(t){return Ge(l._readableStreamController,t),Ge(d._readableStreamController,t),void o(Un(e,t))}r||Xe(l._readableStreamController,t),$e(d._readableStreamController,n)}s=!1,c?w():u&&S()}))},_closeSteps:e=>{s=!1;const t=n?f:p,r=n?p:f;t||Ve(l._readableStreamController),r||Ve(d._readableStreamController),void 0!==e&&(t||Xe(l._readableStreamController,e),!r&&d._readableStreamController._pendingPullIntos.length>0&&Je(d._readableStreamController,0)),t&&r||o(void 0)},_errorSteps:()=>{s=!1}})}function w(){if(s)return c=!0,d(void 0);s=!0;const e=Qe(r._readableStreamController);return null===e?v():y(e._view,!1),d(void 0)}function S(){if(s)return u=!0,d(void 0);s=!0;const e=Qe(i._readableStreamController);return null===e?v():y(e._view,!0),d(void 0)}function C(){}return r=Nn(C,w,(function(r){if(p=!0,t=r,f){const r=ae([t,n]),i=Un(e,r);o(i)}return h})),i=Nn(C,S,(function(r){if(f=!0,n=r,p){const r=ae([t,n]),i=Un(e,r);o(i)}return h})),m(a),[r,i]}(e):function(e){const t=$(e);let n,r,i,o,a,s=!1,c=!1,u=!1,p=!1;const f=l((e=>{a=e}));function h(){return s?(c=!0,d(void 0)):(s=!0,ee(t,{_chunkSteps:e=>{b((()=>{c=!1;const t=e,n=e;u||wn(i._readableStreamController,t),p||wn(o._readableStreamController,n),s=!1,c&&h()}))},_closeSteps:()=>{s=!1,u||bn(i._readableStreamController),p||bn(o._readableStreamController),u&&p||a(void 0)},_errorSteps:()=>{s=!1}}),d(void 0))}function m(){}return i=Mn(m,h,(function(t){if(u=!0,n=t,p){const t=ae([n,r]),i=Un(e,t);a(i)}return f})),o=Mn(m,h,(function(t){if(p=!0,r=t,u){const t=ae([n,r]),i=Un(e,t);a(i)}return f})),g(t._closedPromise,(e=>(Sn(i._readableStreamController,e),Sn(o._readableStreamController,e),u&&p||a(void 0),null))),[i,o]}(e)}(this))}values(e=void 0){if(!Ln(this))throw Bn("values");return function(e,t){const n=$(e),r=new ge(n,t),i=Object.create(ve);return i._asyncIteratorImpl=r,i}(this,function(e){U(e,"First parameter");const t=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(t)}}(e).preventCancel)}[fe](e){return this.values(e)}static from(e){return In(e)}}function Mn(e,t,n,r=1,i=()=>1){const o=Object.create(Dn.prototype);return xn(o),On(o,Object.create(hn.prototype),e,t,n,r,i),o}function Nn(e,t,n){const r=Object.create(Dn.prototype);return xn(r),et(r,Object.create(Ae.prototype),e,t,n,0,void 0),r}function xn(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Ln(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Dn}function jn(e){return void 0!==e._reader}function Un(e,n){if(e._disturbed=!0,"closed"===e._state)return d(void 0);if("errored"===e._state)return p(e._storedError);Fn(e);const r=e._reader;if(void 0!==r&&ut(r)){const e=r._readIntoRequests;r._readIntoRequests=new C,e.forEach((e=>{e._closeSteps(void 0)}))}return v(e._readableStreamController[E](n),t)}function Fn(e){e._state="closed";const t=e._reader;if(void 0!==t&&(x(t),X(t))){const e=t._readRequests;t._readRequests=new C,e.forEach((e=>{e._closeSteps()}))}}function zn(e,t){e._state="errored",e._storedError=t;const n=e._reader;void 0!==n&&(N(n,t),X(n)?te(n,t):dt(n,t))}function Bn(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Kn(e,t){U(e,t);const n=null==e?void 0:e.highWaterMark;return K(n,"highWaterMark","QueuingStrategyInit"),{highWaterMark:H(n)}}Object.defineProperties(Dn,{from:{enumerable:!0}}),Object.defineProperties(Dn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Dn.from,"from"),i(Dn.prototype.cancel,"cancel"),i(Dn.prototype.getReader,"getReader"),i(Dn.prototype.pipeThrough,"pipeThrough"),i(Dn.prototype.pipeTo,"pipeTo"),i(Dn.prototype.tee,"tee"),i(Dn.prototype.values,"values"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Dn.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Dn.prototype,fe,{value:Dn.prototype.values,writable:!0,configurable:!0});const Hn=e=>e.byteLength;i(Hn,"size");class Wn{constructor(e){B(e,1,"ByteLengthQueuingStrategy"),e=Kn(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Vn(this))throw qn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Vn(this))throw qn("size");return Hn}}function qn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Vn(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Wn}Object.defineProperties(Wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Wn.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const $n=()=>1;i($n,"size");class Gn{constructor(e){B(e,1,"CountQueuingStrategy"),e=Kn(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Qn(this))throw Zn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Qn(this))throw Zn("size");return $n}}function Zn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Qn(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Gn}function Yn(e,t,n){return F(e,n),n=>S(e,t,[n])}function Jn(e,t,n){return F(e,n),n=>w(e,t,[n])}function Xn(e,t,n){return F(e,n),(n,r)=>S(e,t,[n,r])}function er(e,t,n){return F(e,n),n=>S(e,t,[n])}Object.defineProperties(Gn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Gn.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class tr{constructor(e={},t={},n={}){void 0===e&&(e=null);const r=mt(t,"Second parameter"),i=mt(n,"Third parameter"),o=function(e,t){U(e,t);const n=null==e?void 0:e.cancel,r=null==e?void 0:e.flush,i=null==e?void 0:e.readableType,o=null==e?void 0:e.start,a=null==e?void 0:e.transform,s=null==e?void 0:e.writableType;return{cancel:void 0===n?void 0:er(n,e,`${t} has member 'cancel' that`),flush:void 0===r?void 0:Yn(r,e,`${t} has member 'flush' that`),readableType:i,start:void 0===o?void 0:Jn(o,e,`${t} has member 'start' that`),transform:void 0===a?void 0:Xn(a,e,`${t} has member 'transform' that`),writableType:s}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");const a=ft(i,0),s=ht(i),c=ft(r,1),u=ht(r);let f;!function(e,t,n,r,i,o){function a(){return t}e._writable=function(e,t,n,r,i=1,o=()=>1){const a=Object.create(Ct.prototype);return Ot(a),Wt(a,Object.create(Kt.prototype),e,t,n,r,i,o),a}(a,(function(t){return function(e,t){const n=e._transformStreamController;return e._backpressure?v(e._backpressureChangePromise,(()=>{const r=e._writable;if("erroring"===r._state)throw r._storedError;return dr(n,t)})):dr(n,t)}(e,t)}),(function(){return function(e){const t=e._transformStreamController;if(void 0!==t._finishPromise)return t._finishPromise;const n=e._readable;t._finishPromise=l(((e,n)=>{t._finishPromise_resolve=e,t._finishPromise_reject=n}));const r=t._flushAlgorithm();return ur(t),h(r,(()=>("errored"===n._state?hr(t,n._storedError):(bn(n._readableStreamController),fr(t)),null)),(e=>(Sn(n._readableStreamController,e),hr(t,e),null))),t._finishPromise}(e)}),(function(t){return function(e,t){const n=e._transformStreamController;if(void 0!==n._finishPromise)return n._finishPromise;const r=e._readable;n._finishPromise=l(((e,t)=>{n._finishPromise_resolve=e,n._finishPromise_reject=t}));const i=n._cancelAlgorithm(t);return ur(n),h(i,(()=>("errored"===r._state?hr(n,r._storedError):(Sn(r._readableStreamController,t),fr(n)),null)),(e=>(Sn(r._readableStreamController,e),hr(n,e),null))),n._finishPromise}(e,t)}),n,r),e._readable=Mn(a,(function(){return function(e){return ar(e,!1),e._backpressureChangePromise}(e)}),(function(t){return function(e,t){const n=e._transformStreamController;if(void 0!==n._finishPromise)return n._finishPromise;const r=e._writable;n._finishPromise=l(((e,t)=>{n._finishPromise_resolve=e,n._finishPromise_reject=t}));const i=n._cancelAlgorithm(t);return ur(n),h(i,(()=>("errored"===r._state?hr(n,r._storedError):(Gt(r._writableStreamController,t),or(e),fr(n)),null)),(t=>(Gt(r._writableStreamController,t),or(e),hr(n,t),null))),n._finishPromise}(e,t)}),i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,ar(e,!0),e._transformStreamController=void 0}(this,l((e=>{f=e})),c,u,a,s),function(e,t){const n=Object.create(sr.prototype);let r,i,o;r=void 0!==t.transform?e=>t.transform(e,n):e=>{try{return lr(n,e),d(void 0)}catch(e){return p(e)}},i=void 0!==t.flush?()=>t.flush(n):()=>d(void 0),o=void 0!==t.cancel?e=>t.cancel(e):()=>d(void 0),function(e,t,n,r,i){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=n,t._flushAlgorithm=r,t._cancelAlgorithm=i,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}(e,n,r,i,o)}(this,o),void 0!==o.start?f(o.start(this._transformStreamController)):f(void 0)}get readable(){if(!nr(this))throw mr("readable");return this._readable}get writable(){if(!nr(this))throw mr("writable");return this._writable}}function nr(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof tr}function rr(e,t){Sn(e._readable._readableStreamController,t),ir(e,t)}function ir(e,t){ur(e._transformStreamController),Gt(e._writable._writableStreamController,t),or(e)}function or(e){e._backpressure&&ar(e,!1)}function ar(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=l((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(tr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(tr.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});class sr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!cr(this))throw pr("desiredSize");return Cn(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!cr(this))throw pr("enqueue");lr(this,e)}error(e=void 0){if(!cr(this))throw pr("error");var t;t=e,rr(this._controlledTransformStream,t)}terminate(){if(!cr(this))throw pr("terminate");!function(e){const t=e._controlledTransformStream;bn(t._readable._readableStreamController),ir(t,new TypeError("TransformStream terminated"))}(this)}}function cr(e){return!!n(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof sr}function ur(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function lr(e,t){const n=e._controlledTransformStream,r=n._readable._readableStreamController;if(!_n(r))throw new TypeError("Readable side is not in a state that permits enqueue");try{wn(r,t)}catch(e){throw ir(n,e),n._readable._storedError}const i=function(e){return!vn(e)}(r);i!==n._backpressure&&ar(n,!0)}function dr(e,t){return v(e._transformAlgorithm(t),void 0,(t=>{throw rr(e._controlledTransformStream,t),t}))}function pr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function fr(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function hr(e,t){void 0!==e._finishPromise_reject&&(y(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function mr(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties(sr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(sr.prototype.enqueue,"enqueue"),i(sr.prototype.error,"error"),i(sr.prototype.terminate,"terminate"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(sr.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0})}).call(this,n(472))},function(e,t,n){"use strict";(function(e){var t=n(1098);const r="undefined"==typeof globalThis?"undefined"==typeof self?"undefined"==typeof e?{}:e:self:globalThis;"undefined"==typeof r.CompressionStream&&(r.CompressionStream=Object(t.a)(TransformStream)),"undefined"==typeof r.DecompressionStream&&(r.DecompressionStream=Object(t.b)(TransformStream))}).call(this,n(472))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(1099);const i=e=>class{constructor(){this.i=new e,this.i.ondata=(e,t)=>{this.ondata(null,e,t)}}push(e,t){try{this.queuedSize+=e.length,this.i.push(e,t),this.queuedSize-=e.length,this.ondrain&&this.ondrain(e.length)}catch(n){this.ondata(n,null,t||!1)}}};let o=1;try{(new r.AsyncDeflate).terminate()}catch(d){o=0}const a=o?{gzip:r.AsyncGzip,deflate:r.AsyncZlib,"deflate-raw":r.AsyncDeflate}:{gzip:i(r.Gzip),deflate:i(r.Zlib),"deflate-raw":i(r.Deflate)},s=o?{gzip:r.AsyncGunzip,deflate:r.AsyncUnzlib,"deflate-raw":r.AsyncInflate}:{gzip:i(r.Gunzip),deflate:i(r.Unzlib),"deflate-raw":i(r.Inflate)},c=(e,t,n)=>class extends e{constructor(e){if(!arguments.length)throw new TypeError(`Failed to construct '${n}': 1 argument required, but only 0 present.`);const r=t[e];if(!r)throw new TypeError(`Failed to construct '${n}': Unsupported compression format: '${e}'`);let i,o=new r;super({start:e=>{o.ondata=(t,n,r)=>{t?e.error(t):n&&(e.enqueue(n),r&&(i?i():e.terminate()))}},transform:e=>{if(e instanceof ArrayBuffer)e=new Uint8Array(e);else{if(!ArrayBuffer.isView(e))throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}if(o.push(e),o.queuedSize>=32768)return new Promise((e=>{o.ondrain=()=>{o.queuedSize<32768&&e()}}))},flush:()=>new Promise((e=>{i=e,o.push(new Uint8Array(0),!0)}))},{size:e=>0|e.byteLength,highWaterMark:65536},{size:e=>0|e.byteLength,highWaterMark:65536})}};function u(e){return c(e,a,"CompressionStream")}function l(e){return c(e,s,"DecompressionStream")}},function(e,t,n){"use strict";var r=n(1100),i=Uint8Array,o=Uint16Array,a=Int32Array,s=new i([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]),c=new i([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]),u=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var n=new o(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},d=l(s,2),p=d.b,f=d.r;p[28]=258,f[258]=28;for(var h=l(c,0),m=h.b,g=h.r,v=new o(32768),y=0;y<32768;++y){var b=(43690&y)>>1|(21845&y)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,v[y]=((65280&b)>>8|(255&b)<<8)>>1}var w=function(e,t,n){for(var r=e.length,i=0,a=new o(t);i<r;++i)e[i]&&++a[e[i]-1];var s,c=new o(t);for(i=1;i<t;++i)c[i]=c[i-1]+a[i-1]<<1;if(n){s=new o(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],d=t-e[i],p=c[e[i]-1]++<<d,f=p|(1<<d)-1;p<=f;++p)s[v[p]>>u]=l}else for(s=new o(r),i=0;i<r;++i)e[i]&&(s[i]=v[c[e[i]-1]++]>>15-e[i]);return s},S=new i(288);for(y=0;y<144;++y)S[y]=8;for(y=144;y<256;++y)S[y]=9;for(y=256;y<280;++y)S[y]=7;for(y=280;y<288;++y)S[y]=8;var C=new i(32);for(y=0;y<32;++y)C[y]=5;var _=w(S,9,0),O=w(S,9,1),E=w(C,5,0),I=w(C,5,1),A=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},T=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},P=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},R=function(e){return(e+7)/8|0},k=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new i(e.subarray(t,n))};t.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var D=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],M=function(e,t,n){var r=new Error(t||D[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,M),!n)throw r;return r},N=function(e,t,n,r){var o=e.length,a=r?r.length:0;if(!o||t.f&&!t.l)return n||new i(0);var l=!n,d=l||2!=t.i,f=t.i;l&&(n=new i(3*o));var h=function(e){var t=n.length;if(e>t){var r=new i(Math.max(2*t,e));r.set(n),n=r}},g=t.f||0,v=t.p||0,y=t.b||0,b=t.l,S=t.d,C=t.m,_=t.n,E=8*o;do{if(!b){g=T(e,v,1);var D=T(e,v+1,3);if(v+=3,!D){var N=e[(q=R(v)+4)-4]|e[q-3]<<8,x=q+N;if(x>o){f&&M(0);break}d&&h(y+N),n.set(e.subarray(q,x),y),t.b=y+=N,t.p=v=8*x,t.f=g;continue}if(1==D)b=O,S=I,C=9,_=5;else if(2==D){var L=T(e,v,31)+257,j=T(e,v+10,15)+4,U=L+T(e,v+5,31)+1;v+=14;for(var F=new i(U),z=new i(19),B=0;B<j;++B)z[u[B]]=T(e,v+3*B,7);v+=3*j;var K=A(z),H=(1<<K)-1,W=w(z,K,1);for(B=0;B<U;){var q,V=W[T(e,v,H)];if(v+=15&V,(q=V>>4)<16)F[B++]=q;else{var $=0,G=0;for(16==q?(G=3+T(e,v,3),v+=2,$=F[B-1]):17==q?(G=3+T(e,v,7),v+=3):18==q&&(G=11+T(e,v,127),v+=7);G--;)F[B++]=$}}var Z=F.subarray(0,L),Q=F.subarray(L);C=A(Z),_=A(Q),b=w(Z,C,1),S=w(Q,_,1)}else M(1);if(v>E){f&&M(0);break}}d&&h(y+131072);for(var Y=(1<<C)-1,J=(1<<_)-1,X=v;;X=v){var ee=($=b[P(e,v)&Y])>>4;if((v+=15&$)>E){f&&M(0);break}if($||M(2),ee<256)n[y++]=ee;else{if(256==ee){X=v,b=null;break}var te=ee-254;if(ee>264){var ne=s[B=ee-257];te=T(e,v,(1<<ne)-1)+p[B],v+=ne}var re=S[P(e,v)&J],ie=re>>4;if(re||M(3),v+=15&re,Q=m[ie],ie>3&&(ne=c[ie],Q+=P(e,v)&(1<<ne)-1,v+=ne),v>E){f&&M(0);break}d&&h(y+131072);var oe=y+te;if(y<Q){var ae=a-Q,se=Math.min(Q,oe);for(ae+y<0&&M(3);y<se;++y)n[y]=r[ae+y]}for(;y<oe;++y)n[y]=n[y-Q]}}t.l=b,t.p=X,t.b=y,t.f=g,b&&(g=1,t.m=C,t.d=S,t.n=_)}while(!g);return y!=n.length&&l?k(n,0,y):n.subarray(0,y)},x=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},L=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},j=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,s=n.slice();if(!a)return{t:W,l:0};if(1==a){var c=new i(n[0].s+1);return c[n[0].s]=1,{t:c,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var u=n[0],l=n[1],d=0,p=1,f=2;for(n[0]={s:-1,f:u.f+l.f,l:u,r:l};p!=a-1;)u=n[n[d].f<n[f].f?d++:f++],l=n[d!=p&&n[d].f<n[f].f?d++:f++],n[p++]={s:-1,f:u.f+l.f,l:u,r:l};var h=s[0].s;for(r=1;r<a;++r)s[r].s>h&&(h=s[r].s);var m=new o(h+1),g=U(n[p-1],m,0);if(g>t){r=0;var v=0,y=g-t,b=1<<y;for(s.sort((function(e,t){return m[t.s]-m[e.s]||e.f-t.f}));r<a;++r){var w=s[r].s;if(!(m[w]>t))break;v+=b-(1<<g-m[w]),m[w]=t}for(v>>=y;v>0;){var S=s[r].s;m[S]<t?v-=1<<t-m[S]++-1:++r}for(;r>=0&&v;--r){var C=s[r].s;m[C]==t&&(--m[C],++v)}g=t}return{t:new i(m),l:g}},U=function(e,t,n){return-1==e.s?Math.max(U(e.l,t,n+1),U(e.r,t,n+1)):t[e.s]=n},F=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new o(++t),r=0,i=e[0],a=1,s=function(e){n[r++]=e},c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[c]}return{c:n.subarray(0,r),n:t}},z=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},B=function(e,t,n){var r=n.length,i=R(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 o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},K=function(e,t,n,r,i,a,l,d,p,f,h){x(t,h++,n),++i[256];for(var m=j(i,15),g=m.t,v=m.l,y=j(a,15),b=y.t,O=y.l,I=F(g),A=I.c,T=I.n,P=F(b),R=P.c,k=P.n,D=new o(19),M=0;M<A.length;++M)++D[31&A[M]];for(M=0;M<R.length;++M)++D[31&R[M]];for(var N=j(D,7),U=N.t,K=N.l,H=19;H>4&&!U[u[H-1]];--H);var W,q,V,$,G=f+5<<3,Z=z(i,S)+z(a,C)+l,Q=z(i,g)+z(a,b)+l+14+3*H+z(D,U)+2*D[16]+3*D[17]+7*D[18];if(p>=0&&G<=Z&&G<=Q)return B(t,h,e.subarray(p,p+f));if(x(t,h,1+(Q<Z)),h+=2,Q<Z){W=w(g,v,0),q=g,V=w(b,O,0),$=b;var Y=w(U,K,0);for(x(t,h,T-257),x(t,h+5,k-1),x(t,h+10,H-4),h+=14,M=0;M<H;++M)x(t,h+3*M,U[u[M]]);h+=3*H;for(var J=[A,R],X=0;X<2;++X){var ee=J[X];for(M=0;M<ee.length;++M){var te=31&ee[M];x(t,h,Y[te]),h+=U[te],te>15&&(x(t,h,ee[M]>>5&127),h+=ee[M]>>12)}}}else W=_,q=S,V=E,$=C;for(M=0;M<d;++M){var ne=r[M];if(ne>255){L(t,h,W[257+(te=ne>>18&31)]),h+=q[te+257],te>7&&(x(t,h,ne>>23&31),h+=s[te]);var re=31&ne;L(t,h,V[re]),h+=$[re],re>3&&(L(t,h,ne>>5&8191),h+=c[re])}else L(t,h,W[ne]),h+=q[ne]}return L(t,h,W[256]),h+q[256]},H=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),W=new i(0),q=function(e,t,n,r,u,l){var d=l.z||e.length,p=new i(r+d+5*(1+Math.ceil(d/7e3))+u),h=p.subarray(r,p.length-u),m=l.l,v=7&(l.r||0);if(t){v&&(h[0]=l.r>>3);for(var y=H[t-1],b=y>>13,w=8191&y,S=(1<<n)-1,C=l.p||new o(32768),_=l.h||new o(S+1),O=Math.ceil(n/3),E=2*O,I=function(t){return(e[t]^e[t+1]<<O^e[t+2]<<E)&S},A=new a(25e3),T=new o(288),P=new o(32),D=0,M=0,N=l.i||0,x=0,L=l.w||0,j=0;N+2<d;++N){var U=I(N),F=32767&N,z=_[U];if(C[F]=z,_[U]=F,L<=N){var W=d-N;if((D>7e3||x>24576)&&(W>423||!m)){v=K(e,h,0,A,T,P,M,x,j,N-j,v),x=D=M=0,j=N;for(var q=0;q<286;++q)T[q]=0;for(q=0;q<30;++q)P[q]=0}var V=2,$=0,G=w,Z=F-z&32767;if(W>2&&U==I(N-Z))for(var Q=Math.min(b,W)-1,Y=Math.min(32767,N),J=Math.min(258,W);Z<=Y&&--G&&F!=z;){if(e[N+V]==e[N+V-Z]){for(var X=0;X<J&&e[N+X]==e[N+X-Z];++X);if(X>V){if(V=X,$=Z,X>Q)break;var ee=Math.min(Z,X-2),te=0;for(q=0;q<ee;++q){var ne=N-Z+q&32767,re=ne-C[ne]&32767;re>te&&(te=re,z=ne)}}}Z+=(F=z)-(z=C[F])&32767}if($){A[x++]=268435456|f[V]<<18|g[$];var ie=31&f[V],oe=31&g[$];M+=s[ie]+c[oe],++T[257+ie],++P[oe],L=N+V,++D}else A[x++]=e[N],++T[e[N]]}}for(N=Math.max(N,L);N<d;++N)A[x++]=e[N],++T[e[N]];v=K(e,h,m,A,T,P,M,x,j,N-j,v),m||(l.r=7&v|h[v/8|0]<<3,v-=7,l.h=_,l.p=C,l.i=N,l.w=L)}else{for(N=l.w||0;N<d+m;N+=65535){var ae=N+65535;ae>=d&&(h[v/8|0]=m,ae=d),v=B(h,v+1,e.subarray(N,ae))}l.i=d}return k(p,0,r+R(v)+u)},V=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),$=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=V[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},G=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a<s;++a)i+=r+=n[a];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},Z=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),s=new i(a.length+e.length);s.set(a),s.set(e,a.length),e=s,o.w=a.length}return q(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,o)},Q=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Y=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],c=o[a];if("function"==typeof s){t+=";"+c+"=";var u=s.toString();if(s.prototype)if(-1!=u.indexOf("[native code]")){var l=u.indexOf(" ",8)+1;t+=u.slice(l,u.indexOf("(",l))}else for(var d in t+=u,s.prototype)t+=";"+c+".prototype."+d+"="+s.prototype[d].toString();else t+=u}else n[c]=s}return t},J=[],X=function(e,t,n,i){if(!J[n]){for(var o="",a={},s=e.length-1,c=0;c<s;++c)o=Y(e[c],o,a);J[n]={c:Y(e[s],o,a),e:a}}var u=Q({},J[n].e);return(0,r.default)(J[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(u),i)},ee=function(){return[i,o,a,s,c,u,p,m,O,I,v,D,w,A,T,P,R,k,M,N,Pe,ae,se]},te=function(){return[i,o,a,s,c,u,f,g,_,S,E,C,v,H,W,w,x,L,j,U,F,z,B,K,R,k,q,Z,Ee,ae]},ne=function(){return[me,ye,he,$,V]},re=function(){return[ge,ve]},ie=function(){return[be,he,G]},oe=function(){return[we]},ae=function(e){return postMessage(e,[e.buffer])},se=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},ce=function(e,t,n,r,i,o){var a=X(n,r,i,(function(e,t){a.terminate(),o(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},ue=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}},le=function(e,t,n,r,i,o,a){var s,c=X(e,r,i,(function(e,n){e?(c.terminate(),t.ondata.call(t,e)):Array.isArray(n)?1==n.length?(t.queuedSize-=n[0],t.ondrain&&t.ondrain(n[0])):(n[1]&&c.terminate(),t.ondata.call(t,e,n[0],n[1])):a(n)}));c.postMessage(n),t.queuedSize=0,t.push=function(e,n){t.ondata||M(5),s&&t.ondata(M(4,0,1),null,!!n),t.queuedSize+=e.length,c.postMessage([e,s=n],[e.buffer])},t.terminate=function(){c.terminate()},o&&(t.flush=function(){c.postMessage([])})},de=function(e,t){return e[t]|e[t+1]<<8},pe=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},fe=function(e,t){return pe(e,t)+4294967296*pe(e,t+4)},he=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},me=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&he(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},ge=function(e){31==e[0]&&139==e[1]&&8==e[2]||M(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},ve=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},ye=function(e){return 10+(e.filename?e.filename.length+1:0)},be=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=G();i.p(t.dictionary),he(e,2,i.d())}},we=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&M(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&M(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function Se(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var Ce=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new i(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(Z(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||M(5),this.s.l&&M(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new i(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var o=this.b.length-this.s.z;this.b.set(e.subarray(0,o),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(o),32768),this.s.z=e.length-o+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||M(5),this.s.l&&M(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}();t.Deflate=Ce;var _e=function(){return function(e,t){le([te,function(){return[ue,Ce]}],this,Se.call(this,e,t),(function(e){var t=new Ce(e.data);onmessage=ue(t)}),6,1)}}();function Oe(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[te],(function(e){return ae(Ee(e.data[0],e.data[1]))}),0,n)}function Ee(e,t){return Z(e,t||{},0,0)}t.AsyncDeflate=_e,t.deflate=Oe,t.deflateSync=Ee;var Ie=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new i(32768),this.p=new i(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||M(5),this.d&&M(4),this.p.length){if(e.length){var t=new i(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=N(this.p,this.s,this.o);this.ondata(k(n,t,this.s.b),this.d),this.o=k(n,this.s.b-32768),this.s.b=this.o.length,this.p=k(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=Ie;var Ae=function(){return function(e,t){le([ee,function(){return[ue,Ie]}],this,Se.call(this,e,t),(function(e){var t=new Ie(e.data);onmessage=ue(t)}),7,0)}}();function Te(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[ee],(function(e){return ae(Pe(e.data[0],se(e.data[1])))}),1,n)}function Pe(e,t){return N(e,{i:2},t&&t.out,t&&t.dictionary)}t.AsyncInflate=Ae,t.inflate=Te,t.inflateSync=Pe;var Re=function(){function e(e,t){this.c=$(),this.l=0,this.v=1,Ce.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Ce.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=Z(e,this.o,this.v&&ye(this.o),t&&8,this.s);this.v&&(me(n,this.o),this.v=0),t&&(he(n,n.length-8,this.c.d()),he(n,n.length-4,this.l)),this.ondata(n,t)},e.prototype.flush=function(){Ce.prototype.flush.call(this)},e}();t.Gzip=Re,t.Compress=Re;var ke=function(){return function(e,t){le([te,ne,function(){return[ue,Ce,Re]}],this,Se.call(this,e,t),(function(e){var t=new Re(e.data);onmessage=ue(t)}),8,1)}}();function De(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[te,ne,function(){return[Me]}],(function(e){return ae(Me(e.data[0],e.data[1]))}),2,n)}function Me(e,t){t||(t={});var n=$(),r=e.length;n.p(e);var i=Z(e,t,ye(t),8),o=i.length;return me(i,t),he(i,o-8,n.d()),he(i,o-4,r),i}t.AsyncGzip=ke,t.AsyncCompress=ke,t.gzip=De,t.compress=De,t.gzipSync=Me,t.compressSync=Me;var Ne=function(){function e(e,t){this.v=1,this.r=0,Ie.call(this,e,t)}return e.prototype.push=function(e,t){if(Ie.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),r=n.length>3?ge(n):4;if(r>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(r),this.v=0}Ie.prototype.c.call(this,t),!this.s.f||this.s.l||t||(this.v=R(this.s.p)+9,this.s={i:0},this.o=new i(0),this.push(new i(0),t))},e}();t.Gunzip=Ne;var xe=function(){return function(e,t){var n=this;le([ee,re,function(){return[ue,Ie,Ne]}],this,Se.call(this,e,t),(function(e){var t=new Ne(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ue(t)}),9,0,(function(e){return n.onmember&&n.onmember(e)}))}}();function Le(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[ee,re,function(){return[je]}],(function(e){return ae(je(e.data[0],e.data[1]))}),3,n)}function je(e,t){var n=ge(e);return n+8>e.length&&M(6,"invalid gzip data"),N(e.subarray(n,-8),{i:2},t&&t.out||new i(ve(e)),t&&t.dictionary)}t.AsyncGunzip=xe,t.gunzip=Le,t.gunzipSync=je;var Ue=function(){function e(e,t){this.c=G(),this.v=1,Ce.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Ce.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=Z(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(be(n,this.o),this.v=0),t&&he(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(){Ce.prototype.flush.call(this)},e}();t.Zlib=Ue;var Fe=function(){return function(e,t){le([te,ie,function(){return[ue,Ce,Ue]}],this,Se.call(this,e,t),(function(e){var t=new Ue(e.data);onmessage=ue(t)}),10,1)}}();function ze(e,t){t||(t={});var n=G();n.p(e);var r=Z(e,t,t.dictionary?6:2,4);return be(r,t),he(r,r.length-4,n.d()),r}t.AsyncZlib=Fe,t.zlib=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[te,ie,function(){return[ze]}],(function(e){return ae(ze(e.data[0],e.data[1]))}),4,n)},t.zlibSync=ze;var Be=function(){function e(e,t){Ie.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(Ie.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(we(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&M(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Ie.prototype.c.call(this,t)},e}();t.Unzlib=Be;var Ke=function(){return function(e,t){le([ee,oe,function(){return[ue,Ie,Be]}],this,Se.call(this,e,t),(function(e){var t=new Be(e.data);onmessage=ue(t)}),11,0)}}();function He(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),ce(e,t,[ee,oe,function(){return[We]}],(function(e){return ae(We(e.data[0],se(e.data[1])))}),5,n)}function We(e,t){return N(e.subarray(we(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}t.AsyncUnzlib=Ke,t.unzlib=He,t.unzlibSync=We;var qe=function(){function e(e,t){this.o=Se.call(this,e,t)||{},this.G=Ne,this.I=Ie,this.Z=Be}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n){e.ondata(t,n)}},e.prototype.push=function(e,t){if(this.ondata||M(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},e}();t.Decompress=qe;var Ve=function(){function e(e,t){qe.call(this,e,t),this.queuedSize=0,this.G=xe,this.I=Ae,this.Z=Ke}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n,r){e.ondata(t,n,r)},this.s.ondrain=function(t){e.queuedSize-=t,e.ondrain&&e.ondrain(t)}},e.prototype.push=function(e,t){this.queuedSize+=e.length,qe.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=Ve,t.decompress=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&M(7),31==e[0]&&139==e[1]&&8==e[2]?Le(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Te(e,t,n):He(e,t,n)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?je(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Pe(e,t):We(e,t)};var $e=function(e,t,n,r){for(var o in e){var a=e[o],s=t+o,c=r;Array.isArray(a)&&(c=Q(r,a[1]),a=a[0]),a instanceof i?n[s]=[a,c]:(n[s+="/"]=[new i(0),c],$e(a,s,n,r))}},Ge="undefined"!=typeof TextEncoder&&new TextEncoder,Ze="undefined"!=typeof TextDecoder&&new TextDecoder,Qe=0;try{Ze.decode(W,{stream:!0}),Qe=1}catch(yt){}var Ye=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:k(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}},Je=function(){function e(e){this.ondata=e,Qe?this.t=new TextDecoder:this.p=W}return e.prototype.push=function(e,t){if(this.ondata||M(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&M(8),this.t=null));this.p||M(4);var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=Ye(n),o=r.s,a=r.r;t?(a.length&&M(8),this.p=null):this.p=a,this.ondata(o,t)},e}();t.DecodeUTF8=Je;var Xe=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||M(5),this.d&&M(4),this.ondata(et(e),this.d=t||!1)},e}();function et(e,t){if(t){for(var n=new i(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Ge)return Ge.encode(e);var o=e.length,a=new i(e.length+(e.length>>1)),s=0,c=function(e){a[s++]=e};for(r=0;r<o;++r){if(s+5>a.length){var u=new i(s+8+(o-r<<1));u.set(a),a=u}var l=e.charCodeAt(r);l<128||t?c(l):l<2048?(c(192|l>>6),c(128|63&l)):l>55295&&l<57344?(c(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++r))>>18),c(128|l>>12&63),c(128|l>>6&63),c(128|63&l)):(c(224|l>>12),c(128|l>>6&63),c(128|63&l))}return k(a,0,s)}function tt(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Ze)return Ze.decode(e);var i=Ye(e),o=i.s;return(n=i.r).length&&M(8),o}t.EncodeUTF8=Xe,t.strToU8=et,t.strFromU8=tt;var nt=function(e){return 1==e?3:e<6?2:9==e?1:0},rt=function(e,t){return t+30+de(e,t+26)+de(e,t+28)},it=function(e,t,n){var r=de(e,t+28),i=tt(e.subarray(t+46,t+46+r),!(2048&de(e,t+8))),o=t+46+r,a=pe(e,t+20),s=n&&4294967295==a?ot(e,o):[a,pe(e,t+24),pe(e,t+42)],c=s[0],u=s[1],l=s[2];return[de(e,t+10),c,u,i,o+de(e,t+30)+de(e,t+32),l]},ot=function(e,t){for(;1!=de(e,t);t+=4+de(e,t+2));return[fe(e,t+12),fe(e,t+4),fe(e,t+20)]},at=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&M(9),t+=r+4}return t},st=function(e,t,n,r,i,o,a,s){var c=r.length,u=n.extra,l=s&&s.length,d=at(u);he(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var p=new Date(null==n.mtime?Date.now():n.mtime),f=p.getFullYear()-1980;if((f<0||f>119)&&M(10),he(e,t,f<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,-1!=o&&(he(e,t,n.crc),he(e,t+4,o<0?-o-2:o),he(e,t+8,n.size)),he(e,t+12,c),he(e,t+14,d),t+=16,null!=a&&(he(e,t,l),he(e,t+6,n.attrs),he(e,t+10,a),t+=14),e.set(r,t),t+=c,d)for(var h in u){var m=u[h],g=m.length;he(e,t,+h),he(e,t+2,g),e.set(m,t+4),t+=4+g}return l&&(e.set(s,t),t+=l),t},ct=function(e,t,n,r,i){he(e,t,101010256),he(e,t+8,n),he(e,t+10,n),he(e,t+12,r),he(e,t+16,i)},ut=function(){function e(e){this.filename=e,this.c=$(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||M(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ut;var lt=function(){function e(e,t){var n=this;t||(t={}),ut.call(this,e),this.d=new Ce(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=nt(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(yt){this.ondata(yt,null,t)}},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.ZipDeflate=lt;var dt=function(){function e(e,t){var n=this;t||(t={}),ut.call(this,e),this.d=new _e(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=nt(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=dt;var pt=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||M(5),2&this.d)this.ondata(M(4+8*(1&this.d),0,1),null,!1);else{var n=et(e.filename),r=n.length,o=e.comment,a=o&&et(o),s=r!=e.filename.length||a&&o.length!=a.length,c=r+at(e.extra)+30;r>65535&&this.ondata(M(11,0,1),null,!1);var u=new i(c);st(u,0,e,n,s,-1);var l=[u],d=function(){for(var e=0,n=l;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}l=[]},p=this.d;this.d=0;var f=this.u.length,h=Q(e,{f:n,u:s,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(d(),p){var e=t.u[f+1];e?e.r():t.d=1}p=1}}),m=0;e.ondata=function(n,r,o){if(n)t.ondata(n,r,o),t.terminate();else if(m+=r.length,l.push(r),o){var a=new i(16);he(a,0,134695760),he(a,4,e.crc),he(a,8,m),he(a,12,e.size),l.push(a),h.c=m,h.b=c+m+16,h.crc=e.crc,h.size=e.size,p&&h.r(),p=1}else p&&d()},this.u.push(h)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(M(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,o=this.u;r<o.length;r++)n+=46+(u=o[r]).f.length+at(u.extra)+(u.o?u.o.length:0);for(var a=new i(n+22),s=0,c=this.u;s<c.length;s++){var u=c[s];st(a,e,u,u.f,u.u,-u.c-2,t,u.o),e+=46+u.f.length+at(u.extra)+(u.o?u.o.length:0),t+=u.b}ct(a,e,this.u.length,n,t),this.ondata(null,a,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2},e}();t.Zip=pt,t.zip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&M(7);var r={};$e(e,"",r,t);var o=Object.keys(r),a=o.length,s=0,c=0,u=a,l=new Array(a),d=[],p=function(){for(var e=0;e<d.length;++e)d[e]()},f=function(e,t){vt((function(){n(e,t)}))};vt((function(){f=n}));var h=function(){var e=new i(c+22),t=s,n=c-s;c=0;for(var r=0;r<u;++r){var o=l[r];try{var a=o.c.length;st(e,c,o,o.f,o.u,a);var d=30+o.f.length+at(o.extra),p=c+d;e.set(o.c,p),st(e,s,o,o.f,o.u,a,c,o.m),s+=16+d+(o.m?o.m.length:0),c=p+a}catch(yt){return f(yt,null)}}ct(e,s,l.length,n,t),f(null,e)};a||h();for(var m=function(e){var t=o[e],n=r[t],i=n[0],u=n[1],m=$(),g=i.length;m.p(i);var v=et(t),y=v.length,b=u.comment,w=b&&et(b),S=w&&w.length,C=at(u.extra),_=0==u.level?0:8,O=function(n,r){if(n)p(),f(n,null);else{var i=r.length;l[e]=Q(u,{size:g,crc:m.d(),c:r,f:v,m:w,u:y!=t.length||w&&b.length!=S,compression:_}),s+=30+y+C+i,c+=76+2*(y+C)+(S||0)+i,--a||h()}};if(y>65535&&O(M(11,0,1),null),_)if(g<16e4)try{O(null,Ee(i,u))}catch(yt){O(yt,null)}else d.push(Oe(i,u,O));else O(null,i)},g=0;g<u;++g)m(g);return p},t.zipSync=function(e,t){t||(t={});var n={},r=[];$e(e,"",n,t);var o=0,a=0;for(var s in n){var c=n[s],u=c[0],l=c[1],d=0==l.level?0:8,p=(O=et(s)).length,f=l.comment,h=f&&et(f),m=h&&h.length,g=at(l.extra);p>65535&&M(11);var v=d?Ee(u,l):u,y=v.length,b=$();b.p(u),r.push(Q(l,{size:u.length,crc:b.d(),c:v,f:O,m:h,u:p!=s.length||h&&f.length!=m,o:o,compression:d})),o+=30+p+g+y,a+=76+2*(p+g)+(m||0)+y}for(var w=new i(a+22),S=o,C=a-o,_=0;_<r.length;++_){var O=r[_];st(w,O.o,O,O.f,O.u,O.c.length);var E=30+O.f.length+at(O.extra);w.set(O.c,O.o+E),st(w,o,O,O.f,O.u,O.c.length,O.o,O.m),o+=16+E+(O.m?O.m.length:0)}return ct(w,o,r.length,C,S),w};var ft=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();t.UnzipPassThrough=ft;var ht=function(){function e(){var e=this;this.i=new Ie((function(t,n){e.ondata(null,t,n)}))}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(yt){this.ondata(yt,null,t)}},e.compression=8,e}();t.UnzipInflate=ht;var mt=function(){function e(e,t){var n=this;t<32e4?this.i=new Ie((function(e,t){n.ondata(null,e,t)})):(this.i=new Ae((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=k(e,0)),this.i.push(e,t)},e.compression=8,e}();t.AsyncUnzipInflate=mt;var gt=function(){function e(e){this.onfile=e,this.k=[],this.o={0:ft},this.p=W}return e.prototype.push=function(e,t){var n=this;if(this.onfile||M(5),this.p||M(4),this.c>0){var r=Math.min(this.c,e.length),o=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(o,!this.c):this.k[0].push(o),(e=e.subarray(r)).length)return this.push(e,t)}else{var a=0,s=0,c=void 0,u=void 0;this.p.length?e.length?((u=new i(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var l=u.length,d=this.c,p=d&&this.d,f=function(){var e,t=pe(u,s);if(67324752==t){a=1,c=s,h.d=null,h.c=0;var r=de(u,s+6),i=de(u,s+8),o=2048&r,p=8&r,f=de(u,s+26),m=de(u,s+28);if(l>s+30+f+m){var g=[];h.k.unshift(g),a=2;var v,y=pe(u,s+18),b=pe(u,s+22),w=tt(u.subarray(s+30,s+=30+f),!o);4294967295==y?(e=p?[-2]:ot(u,s),y=e[0],b=e[1]):p&&(y=-1),s+=m,h.c=y;var S={name:w,compression:i,start:function(){if(S.ondata||M(5),y){var e=n.o[i];e||S.ondata(M(14,"unknown compression type "+i,1),null,!1),(v=y<0?new e(w):new e(w,y,b)).ondata=function(e,t,n){S.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var o=r[t];v.push(o,!1)}n.k[0]==g&&n.c?n.d=v:v.push(W,!0)}else S.ondata(null,W,!0)},terminate:function(){v&&v.terminate&&v.terminate()}};y>=0&&(S.size=y,S.originalSize=b),h.onfile(S)}return"break"}if(d){if(134695760==t)return c=s+=12+(-2==d&&8),a=3,h.c=0,"break";if(33639248==t)return c=s-=4,a=3,h.c=0,"break"}},h=this;s<l-4&&"break"!==f();++s);if(this.p=W,d<0){var m=a?u.subarray(0,c-12-(-2==d&&8)-(134695760==pe(u,c-16)&&4)):u.subarray(0,s);p?p.push(m,!!a):this.k[+(2==a)].push(m)}if(2&a)return this.push(u.subarray(s),t);this.p=u.subarray(s)}t&&(this.c&&M(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();t.Unzip=gt;var vt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};t.unzip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&M(7);var r=[],o=function(){for(var e=0;e<r.length;++e)r[e]()},a={},s=function(e,t){vt((function(){n(e,t)}))};vt((function(){s=n}));for(var c=e.length-22;101010256!=pe(e,c);--c)if(!c||e.length-c>65558)return s(M(13,0,1),null),o;var u=de(e,c+8);if(u){var l=u,d=pe(e,c+16),p=4294967295==d||65535==l;if(p){var f=pe(e,c-12);(p=101075792==pe(e,f))&&(l=u=pe(e,f+32),d=pe(e,f+48))}for(var h=t&&t.filter,m=function(t){var n=it(e,d,p),l=n[0],f=n[1],m=n[2],g=n[3],v=n[4],y=n[5],b=rt(e,y);d=v;var w=function(e,t){e?(o(),s(e,null)):(t&&(a[g]=t),--u||s(null,a))};if(!h||h({name:g,size:f,originalSize:m,compression:l}))if(l)if(8==l){var S=e.subarray(b,b+f);if(m<524288||f>.8*m)try{w(null,Pe(S,{out:new i(m)}))}catch(c){w(c,null)}else r.push(Te(S,{size:m},w))}else w(M(14,"unknown compression type "+l,1),null);else w(null,k(e,b,b+f));else w(null,null)},g=0;g<l;++g)m()}else s(null,{});return o},t.unzipSync=function(e,t){for(var n={},r=e.length-22;101010256!=pe(e,r);--r)(!r||e.length-r>65558)&&M(13);var o=de(e,r+8);if(!o)return{};var a=pe(e,r+16),s=4294967295==a||65535==o;if(s){var c=pe(e,r-12);(s=101075792==pe(e,c))&&(o=pe(e,c+32),a=pe(e,c+48))}for(var u=t&&t.filter,l=0;l<o;++l){var d=it(e,a,s),p=d[0],f=d[1],h=d[2],m=d[3],g=d[4],v=d[5],y=rt(e,v);a=g,u&&!u({name:m,size:f,originalSize:h,compression:p})||(p?8==p?n[m]=Pe(e.subarray(y,y+f),{out:new i(h)}):M(14,"unknown compression type "+p):n[m]=k(e,y,y+f))}return n}},function(e,t,n){"use strict";var r={};t.default=function(e,t,n,i,o){var a=new Worker(r[t]||(r[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},a.postMessage(n,i),a}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1102),i=n(1105),o=n(1106),a=n(1104),s=n(1107),c=n(1103),u=n(1108),l=n(1127),d=n(1128),p=n(1129),f=n(1132),h=n(1109),m=n(1133),g=n(1134),v=n(1136),y=n(1138),b=n(1111),w=n(1110),S=n(1126),C=n(1135),_=n(1139),O=n(1140),E=n(1131),I=n(1141),A=n(1142),T=n(1143),P=n(1144),R=n(1137);t.getDomElement=r.getDomElement,t.getLocationHref=r.getLocationHref,t.htmlTreeAsString=r.htmlTreeAsString,t.dsnFromString=i.dsnFromString,t.dsnToString=i.dsnToString,t.makeDsn=i.makeDsn,t.SentryError=o.SentryError,t.GLOBAL_OBJ=a.GLOBAL_OBJ,t.getGlobalObject=a.getGlobalObject,t.getGlobalSingleton=a.getGlobalSingleton,t.addInstrumentationHandler=s.addInstrumentationHandler,t.isDOMError=c.isDOMError,t.isDOMException=c.isDOMException,t.isElement=c.isElement,t.isError=c.isError,t.isErrorEvent=c.isErrorEvent,t.isEvent=c.isEvent,t.isInstanceOf=c.isInstanceOf,t.isNaN=c.isNaN,t.isPlainObject=c.isPlainObject,t.isPrimitive=c.isPrimitive,t.isRegExp=c.isRegExp,t.isString=c.isString,t.isSyntheticEvent=c.isSyntheticEvent,t.isThenable=c.isThenable,t.CONSOLE_LEVELS=u.CONSOLE_LEVELS,t.consoleSandbox=u.consoleSandbox,Object.defineProperty(t,"logger",{enumerable:!0,get:()=>u.logger}),t.memoBuilder=l.memoBuilder,t.addContextToFrame=d.addContextToFrame,t.addExceptionMechanism=d.addExceptionMechanism,t.addExceptionTypeValue=d.addExceptionTypeValue,t.arrayify=d.arrayify,t.checkOrSetAlreadyCaught=d.checkOrSetAlreadyCaught,t.getEventDescription=d.getEventDescription,t.parseSemver=d.parseSemver,t.uuid4=d.uuid4,t.dynamicRequire=p.dynamicRequire,t.isNodeEnv=p.isNodeEnv,t.loadModule=p.loadModule,t.normalize=f.normalize,t.normalizeToSize=f.normalizeToSize,t.walk=f.walk,t.addNonEnumerableProperty=h.addNonEnumerableProperty,t.convertToPlainObject=h.convertToPlainObject,t.dropUndefinedKeys=h.dropUndefinedKeys,t.extractExceptionKeysForMessage=h.extractExceptionKeysForMessage,t.fill=h.fill,t.getOriginalFunction=h.getOriginalFunction,t.markFunctionWrapped=h.markFunctionWrapped,t.objectify=h.objectify,t.urlEncode=h.urlEncode,t.basename=m.basename,t.dirname=m.dirname,t.isAbsolute=m.isAbsolute,t.join=m.join,t.normalizePath=m.normalizePath,t.relative=m.relative,t.resolve=m.resolve,t.makePromiseBuffer=g.makePromiseBuffer,t.addRequestDataToEvent=v.addRequestDataToEvent,t.addRequestDataToTransaction=v.addRequestDataToTransaction,t.extractPathForTransaction=v.extractPathForTransaction,t.extractRequestData=v.extractRequestData,t.severityFromString=y.severityFromString,t.severityLevelFromString=y.severityLevelFromString,t.validSeverityLevels=y.validSeverityLevels,t.createStackParser=b.createStackParser,t.getFunctionName=b.getFunctionName,t.nodeStackLineParser=b.nodeStackLineParser,t.stackParserFromStackParserOptions=b.stackParserFromStackParserOptions,t.stripSentryFramesAndReverse=b.stripSentryFramesAndReverse,t.escapeStringForRegex=w.escapeStringForRegex,t.isMatchingPattern=w.isMatchingPattern,t.safeJoin=w.safeJoin,t.snipLine=w.snipLine,t.stringMatchesSomePattern=w.stringMatchesSomePattern,t.truncate=w.truncate,t.isNativeFetch=S.isNativeFetch,t.supportsDOMError=S.supportsDOMError,t.supportsDOMException=S.supportsDOMException,t.supportsErrorEvent=S.supportsErrorEvent,t.supportsFetch=S.supportsFetch,t.supportsHistory=S.supportsHistory,t.supportsNativeFetch=S.supportsNativeFetch,t.supportsReferrerPolicy=S.supportsReferrerPolicy,t.supportsReportingObserver=S.supportsReportingObserver,t.SyncPromise=C.SyncPromise,t.rejectedSyncPromise=C.rejectedSyncPromise,t.resolvedSyncPromise=C.resolvedSyncPromise,Object.defineProperty(t,"_browserPerformanceTimeOriginMode",{enumerable:!0,get:()=>_._browserPerformanceTimeOriginMode}),t.browserPerformanceTimeOrigin=_.browserPerformanceTimeOrigin,t.dateTimestampInSeconds=_.dateTimestampInSeconds,t.timestampInSeconds=_.timestampInSeconds,t.timestampWithMs=_.timestampWithMs,t.usingPerformanceAPI=_.usingPerformanceAPI,t.TRACEPARENT_REGEXP=O.TRACEPARENT_REGEXP,t.extractTraceparentData=O.extractTraceparentData,t.isBrowserBundle=E.isBrowserBundle,t.addItemToEnvelope=I.addItemToEnvelope,t.createAttachmentEnvelopeItem=I.createAttachmentEnvelopeItem,t.createEnvelope=I.createEnvelope,t.createEventEnvelopeHeaders=I.createEventEnvelopeHeaders,t.envelopeItemTypeToDataCategory=I.envelopeItemTypeToDataCategory,t.forEachEnvelopeItem=I.forEachEnvelopeItem,t.getSdkMetadataForEnvelopeHeader=I.getSdkMetadataForEnvelopeHeader,t.serializeEnvelope=I.serializeEnvelope,t.createClientReportEnvelope=A.createClientReportEnvelope,t.DEFAULT_RETRY_AFTER=T.DEFAULT_RETRY_AFTER,t.disabledUntil=T.disabledUntil,t.isRateLimited=T.isRateLimited,t.parseRetryAfterHeader=T.parseRetryAfterHeader,t.updateRateLimits=T.updateRateLimits,t.BAGGAGE_HEADER_NAME=P.BAGGAGE_HEADER_NAME,t.MAX_BAGGAGE_STRING_LENGTH=P.MAX_BAGGAGE_STRING_LENGTH,t.SENTRY_BAGGAGE_KEY_PREFIX=P.SENTRY_BAGGAGE_KEY_PREFIX,t.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=P.SENTRY_BAGGAGE_KEY_PREFIX_REGEX,t.baggageHeaderToDynamicSamplingContext=P.baggageHeaderToDynamicSamplingContext,t.dynamicSamplingContextToSentryBaggageHeader=P.dynamicSamplingContextToSentryBaggageHeader,t.getNumberOfUrlSegments=R.getNumberOfUrlSegments,t.parseUrl=R.parseUrl,t.stripUrlQueryAndFragment=R.stripUrlQueryAndFragment},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103),i=n(1104).getGlobalObject();function o(e,t){const n=e,i=[];let o,a,s,c,u;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),o=n.className,o&&r.isString(o))for(a=o.split(/\s+/),u=0;u<a.length;u++)i.push(`.${a[u]}`);const d=["type","name","title","alt"];for(u=0;u<d.length;u++)s=d[u],c=n.getAttribute(s),c&&i.push(`[${s}="${c}"]`);return i.join("")}t.getDomElement=function(e){return i.document&&i.document.querySelector?i.document.querySelector(e):null},t.getLocationHref=function(){try{return i.document.location.href}catch(e){return""}},t.htmlTreeAsString=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{let n=e;const r=5,i=[];let a=0,s=0;const c=" > ",u=c.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(l=o(n,d),!("html"===l||a>1&&s+i.length*u+l.length>=p));)i.push(l),s+=l.length,n=n.parentNode;return i.reverse().join(c)}catch(n){return"<unknown>"}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Object.prototype.toString;function r(e,t){return n.call(e)===`[object ${t}]`}function i(e){return r(e,"Object")}function o(e,t){try{return e instanceof t}catch(n){return!1}}t.isDOMError=function(e){return r(e,"DOMError")},t.isDOMException=function(e){return r(e,"DOMException")},t.isElement=function(e){return"undefined"!==typeof Element&&o(e,Element)},t.isError=function(e){switch(n.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return o(e,Error)}},t.isErrorEvent=function(e){return r(e,"ErrorEvent")},t.isEvent=function(e){return"undefined"!==typeof Event&&o(e,Event)},t.isInstanceOf=o,t.isNaN=function(e){return"number"===typeof e&&e!==e},t.isPlainObject=i,t.isPrimitive=function(e){return null===e||"object"!==typeof e&&"function"!==typeof e},t.isRegExp=function(e){return r(e,"RegExp")},t.isString=function(e){return r(e,"String")},t.isSyntheticEvent=function(e){return i(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e},t.isThenable=function(e){return Boolean(e&&e.then&&"function"===typeof e.then)}},function(e,t,n){(function(e){function n(e){return e&&e.Math==Math?e:void 0}Object.defineProperty(t,"__esModule",{value:!0});const r="object"==typeof globalThis&&n(globalThis)||"object"==typeof window&&n(window)||"object"==typeof self&&n(self)||"object"==typeof globalThis&&n(e)||function(){return this}()||{};t.GLOBAL_OBJ=r,t.getGlobalObject=function(){return r},t.getGlobalSingleton=function(e,t,n){const i=n||r,o=i.__SENTRY__=i.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(472))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1106),i=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(e){const t=i.exec(e);if(!t)throw new r.SentryError(`Invalid Sentry Dsn: ${e}`);const[n,o,s="",c,u="",l]=t.slice(1);let d="",p=l;const f=p.split("/");if(f.length>1&&(d=f.slice(0,-1).join("/"),p=f.pop()),p){const e=p.match(/^\d+/);e&&(p=e[0])}return a({host:c,pass:s,path:d,projectId:p,port:u,protocol:n,publicKey:o})}function a(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}t.dsnFromString=o,t.dsnToString=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`},t.makeDsn=function(e){return"string"===typeof e?o(e):a(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warn";super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}t.SentryError=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103),i=n(1108),o=n(1109),a=(n(1111),n(1126)),s=n(1104).getGlobalObject(),c={},u={};function l(e,t){if(e&&c[e])for(const r of c[e]||[])try{r(t)}catch(n){}}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in s&&r.isInstanceOf(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in s&&r.isInstanceOf(e[0],Request)?e[0].url:String(e[0])}let f;const h=1e3;let m,g;function v(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{if(!n||g===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===m||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(n){}return!1}(g,n))&&(e({event:n,name:r,global:t}),g=n),clearTimeout(m),m=s.setTimeout((()=>{m=void 0}),h)}}let y=null,b=null;t.addInstrumentationHandler=function(e,t){c[e]=c[e]||[],c[e].push(t),function(e){if(!u[e])switch(u[e]=!0,e){case"console":"console"in s&&i.CONSOLE_LEVELS.forEach((function(e){e in s.console&&o.fill(s.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];l("console",{args:r,level:e}),t&&t.apply(s.console,r)}}))}));break;case"dom":!function(){if(!("document"in s))return;const e=l.bind(null,"dom"),t=v(e,!0);s.document.addEventListener("click",t,!1),s.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=s[t]&&s[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(o.fill(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=v(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(o){}return t.call(this,n,r,i)}})),o.fill(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(i){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in s))return;const e=XMLHttpRequest.prototype;o.fill(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const a=this,s=n[1],c=a.__sentry_xhr__={method:r.isString(n[0])?n[0].toUpperCase():n[0],url:n[1]};r.isString(s)&&"POST"===c.method&&s.match(/sentry_key/)&&(a.__sentry_own_request__=!0);const u=function(){if(4===a.readyState){try{c.status_code=a.status}catch(e){}l("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:a})}};return"onreadystatechange"in a&&"function"===typeof a.onreadystatechange?o.fill(a,"onreadystatechange",(function(e){return function(){u();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(a,n)}})):a.addEventListener("readystatechange",u),e.apply(a,n)}})),o.fill(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),l("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":a.supportsNativeFetch()&&o.fill(s,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i={args:n,fetchData:{method:d(n),url:p(n)},startTimestamp:Date.now()};return l("fetch",{...i}),e.apply(s,n).then((e=>(l("fetch",{...i,endTimestamp:Date.now(),response:e}),e)),(e=>{throw l("fetch",{...i,endTimestamp:Date.now(),error:e}),e}))}}));break;case"history":!function(){if(!a.supportsHistory())return;const e=s.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n.length>2?n[2]:void 0;if(i){const e=f,t=String(i);f=t,l("history",{from:e,to:t})}return e.apply(this,n)}}s.onpopstate=function(){const t=s.location.href,n=f;if(f=t,l("history",{from:n,to:t}),e)try{for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.apply(this,i)}catch(a){}},o.fill(s.history,"pushState",t),o.fill(s.history,"replaceState",t)}();break;case"error":y=s.onerror,s.onerror=function(e,t,n,r,i){return l("error",{column:r,error:i,line:n,msg:e,url:t}),!!y&&y.apply(this,arguments)};break;case"unhandledrejection":b=s.onunhandledrejection,s.onunhandledrejection=function(e){return l("unhandledrejection",e),!b||b.apply(this,arguments)};break;default:;}}(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1104),i=["debug","info","warn","error","log","assert","trace"];t.logger=void 0,t.logger=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return i.forEach((e=>{t[e]=()=>{}})),t}(),t.CONSOLE_LEVELS=i,t.consoleSandbox=function(e){if(!("console"in r.GLOBAL_OBJ))return e();const t=r.GLOBAL_OBJ.console,n={};i.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1102),i=n(1103),o=n(1110);function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function s(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,a(e,"__sentry_original__",t)}function c(e){if(i.isError(e))return{message:e.message,name:e.name,stack:e.stack,...l(e)};if(i.isEvent(e)){const t={type:e.type,target:u(e.target),currentTarget:u(e.currentTarget),...l(e)};return"undefined"!==typeof CustomEvent&&i.isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function u(e){try{return i.isElement(e)?r.htmlTreeAsString(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function l(e){if("object"===typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function d(e,t){if(i.isPlainObject(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const i of Object.keys(e))"undefined"!==typeof e[i]&&(r[i]=d(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(d(e,t))})),r}return e}t.addNonEnumerableProperty=a,t.convertToPlainObject=c,t.dropUndefinedKeys=function(e){return d(e,new Map)},t.extractExceptionKeysForMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(c(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return o.truncate(n[0],t);for(let r=n.length;r>0;r--){const e=n.slice(0,r).join(", ");if(!(e.length>t))return r===n.length?e:o.truncate(e,t)}return""},t.fill=function(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"===typeof i)try{s(i,r)}catch(o){}e[t]=i},t.getOriginalFunction=function(e){return e.__sentry_original__},t.markFunctionWrapped=s,t.objectify=function(e){let t;switch(!0){case void 0===e||null===e:t=new String(e);break;case"symbol"===typeof e||"bigint"===typeof e:t=Object(e);break;case i.isPrimitive(e):t=new e.constructor(e);break;default:t=e}return t},t.urlEncode=function(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!r.isString(e)&&(r.isRegExp(t)?t.test(e):!!r.isString(t)&&(n?e===t:e.includes(t)))}t.escapeStringForRegex=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},t.isMatchingPattern=i,t.safeJoin=function(e,t){if(!Array.isArray(e))return"";const n=[];for(let i=0;i<e.length;i++){const t=e[i];try{n.push(String(t))}catch(r){n.push("[value cannot be serialized]")}}return n.join(t)},t.snipLine=function(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n},t.stringMatchesSomePattern=function(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((n=>i(e,n,t)))},t.truncate=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}},function(e,t,n){var{_optionalChain:r}=n(1112);function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];for(const i of e.split("\n").slice(t)){const e=i.replace(/\(error: (.*)\)/,"$1");for(const t of r){const r=t(e);if(r){n.push(r);break}}}return o(n)}}function o(e){if(!e.length)return[];let t=e;const n=t[0].function||"",r=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"}))).reverse()}Object.defineProperty(t,"__esModule",{value:!0});const a="<anonymous>";function s(e){const t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return i=>{if(i.match(t))return{filename:i};const o=i.match(n);if(!o)return;let a,s,c,u,l;if(o[1]){c=o[1];let e=c.lastIndexOf(".");if("."===c[e-1]&&e--,e>0){a=c.substr(0,e),s=c.substr(e+1);const t=a.indexOf(".Module");t>0&&(c=c.substr(t+1),a=a.substr(0,t))}u=void 0}s&&(u=a,l=s),"<anonymous>"===s&&(l=void 0,c=void 0),void 0===c&&(l=l||"<anonymous>",c=u?`${u}.${l}`:l);const d=r([o,"access",e=>e[2],"optionalAccess",e=>e.startsWith,"call",e=>e("file://")])?o[2].substr(7):o[2],p=!("native"===o[5]||d&&!d.startsWith("/")&&!d.startsWith(".")&&1!==d.indexOf(":\\"))&&void 0!==d&&!d.includes("node_modules/");return{filename:d,module:r([e,"optionalCall",e=>e(d)]),function:c,lineno:parseInt(o[3],10)||void 0,colno:parseInt(o[4],10)||void 0,in_app:p}}}t.createStackParser=i,t.getFunctionName=function(e){try{return e&&"function"===typeof e&&e.name||a}catch(t){return a}},t.nodeStackLineParser=function(e){return[90,s(e)]},t.stackParserFromStackParserOptions=function(e){return Array.isArray(e)?i(...e):e},t.stripSentryFramesAndReverse=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1113),i=n(1115),o=n(1116),a=n(1117),s=n(1118),c=n(1119),u=n(1120),l=n(1121),d=n(1122),p=n(1123),f=n(1114),h=n(1124),m=n(1125);t._asyncNullishCoalesce=r._asyncNullishCoalesce,t._asyncOptionalChain=i._asyncOptionalChain,t._asyncOptionalChainDelete=o._asyncOptionalChainDelete,t._createNamedExportFrom=a._createNamedExportFrom,t._createStarExport=s._createStarExport,t._interopDefault=c._interopDefault,t._interopNamespace=u._interopNamespace,t._interopNamespaceDefaultOnly=l._interopNamespaceDefaultOnly,t._interopRequireDefault=d._interopRequireDefault,t._interopRequireWildcard=p._interopRequireWildcard,t._nullishCoalesce=f._nullishCoalesce,t._optionalChain=h._optionalChain,t._optionalChainDelete=m._optionalChainDelete},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1114);t._asyncNullishCoalesce=async function(e,t){return r._nullishCoalesce(e,t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._nullishCoalesce=function(e,t){return null!=e?e:t()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._asyncOptionalChain=async function(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=await o(n)):"call"!==i&&"optionalCall"!==i||(n=await o((function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return n.call(t,...r)})),t=void 0)}return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1115);t._asyncOptionalChainDelete=async function(e){const t=await r._asyncOptionalChain(e);return null==t||t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._createNamedExportFrom=function(e,n,r){t[n]=e[r]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._createStarExport=function(e){Object.keys(e).filter((e=>"default"!==e&&"__esModule"!==e&&!(e in t))).forEach((n=>t[n]=e[n]))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._interopDefault=function(e){return e.__esModule?e.default:e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._interopNamespace=function(e){return e.__esModule?e:{...e,default:e}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._interopNamespaceDefaultOnly=function(e){return{__proto__:null,default:e}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._interopRequireDefault=function(e){return e.__esModule?e:{default:e}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._interopRequireWildcard=function(e){return e.__esModule?e:{...e,default:e}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._optionalChain=function(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o((function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return n.call(t,...r)})),t=void 0)}return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1124);t._optionalChainDelete=function(e){const t=r._optionalChain(e);return null==t||t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(1108);const r=n(1104).getGlobalObject();function i(){if(!("fetch"in r))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function o(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}t.isNativeFetch=o,t.supportsDOMError=function(){try{return new DOMError(""),!0}catch(e){return!1}},t.supportsDOMException=function(){try{return new DOMException(""),!0}catch(e){return!1}},t.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(e){return!1}},t.supportsFetch=i,t.supportsHistory=function(){const e=r.chrome,t=e&&e.app&&e.app.runtime,n="history"in r&&!!r.history.pushState&&!!r.history.replaceState;return!t&&n},t.supportsNativeFetch=function(){if(!i())return!1;if(o(r.fetch))return!0;let e=!1;const t=r.document;if(t&&"function"===typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=o(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){}return e},t.supportsReferrerPolicy=function(){if(!i())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}},t.supportsReportingObserver=function(){return"ReportingObserver"in r}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.memoBuilder=function(){const e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1109),i=n(1110),o=n(1104);function a(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}const s=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;t.addContextToFrame=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map((e=>i.snipLine(e,0))),t.context_line=i.snipLine(e[Math.min(r-1,o)],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map((e=>i.snipLine(e,0)))},t.addExceptionMechanism=function(e,t){const n=a(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}},t.addExceptionTypeValue=function(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")},t.arrayify=function(e){return Array.isArray(e)?e:[e]},t.checkOrSetAlreadyCaught=function(e){if(e&&e.__sentry_captured__)return!0;try{r.addNonEnumerableProperty(e,"__sentry_captured__",!0)}catch(t){}return!1},t.getEventDescription=function(e){const{message:t,event_id:n}=e;if(t)return t;const r=a(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"},t.parseSemver=function(e){const t=e.match(s)||[],n=parseInt(t[1],10),r=parseInt(t[2],10),i=parseInt(t[3],10);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(i)?void 0:i,prerelease:t[4]}},t.uuid4=function(){const e=o.GLOBAL_OBJ,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1131);function i(e,t){return e.require(t)}t.dynamicRequire=i,t.isNodeEnv=function(){return!r.isBrowserBundle()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0)},t.loadModule=function(t){let n;try{n=i(e,t)}catch(r){}try{const{cwd:r}=i(e,"process");n=i(e,`${r()}/node_modules/${t}`)}catch(r){}return n}}).call(this,n(1130)(e))},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){Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserBundle=function(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103),i=n(1127),o=n(1109),a=n(1111);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return c("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function c(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i.memoBuilder();const[d,p]=l;if(null===n||["number","boolean","string"].includes(typeof n)&&!r.isNaN(n))return n;const f=function(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof globalThis&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":r.isSyntheticEvent(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?`[Function: ${a.getFunctionName(n)}]`:"symbol"===typeof n?`[${String(n)}]`:"bigint"===typeof n?`[BigInt: ${String(n)}]`:`[object ${Object.getPrototypeOf(n).constructor.name}]`}catch(i){return`**non-serializable** (${i})`}}(t,n);if(!f.startsWith("[object "))return f;if(n.__sentry_skip_normalization__)return n;if(0===s)return f.replace("object ","");if(d(n))return"[Circular ~]";const h=n;if(h&&"function"===typeof h.toJSON)try{return c("",h.toJSON(),s-1,u,l)}catch(y){}const m=Array.isArray(n)?[]:{};let g=0;const v=o.convertToPlainObject(n);for(const e in v){if(!Object.prototype.hasOwnProperty.call(v,e))continue;if(g>=u){m[e]="[MaxProperties ~]";break}const t=v[e];m[e]=c(e,t,s-1,u,l),g++}return p(n),m}t.normalize=s,t.normalizeToSize=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400;const i=s(t,n);return o=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>r?e(t,n-1,r):i;var o},t.walk=c}).call(this,n(472))},function(e,t){function n(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const t=e[r];"."===t?e.splice(r,1):".."===t?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}Object.defineProperty(t,"__esModule",{value:!0});const r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function i(e){const t=r.exec(e);return t?t.slice(1):[]}function o(){let e="",t=!1;for(let n=arguments.length-1;n>=-1&&!t;n--){const r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:"/";r&&(e=`${r}/${e}`,t="/"===r.charAt(0))}return e=n(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."}function a(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function s(e){const t=c(e),r="/"===e.substr(-1);let i=n(e.split("/").filter((e=>!!e)),!t).join("/");return i||t||(i="."),i&&r&&(i+="/"),(t?"/":"")+i}function c(e){return"/"===e.charAt(0)}t.basename=function(e,t){let n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.dirname=function(e){const t=i(e),n=t[0];let r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},t.isAbsolute=c,t.join=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(t.join("/"))},t.normalizePath=s,t.relative=function(e,t){e=o(e).substr(1),t=o(t).substr(1);const n=a(e.split("/")),r=a(t.split("/")),i=Math.min(n.length,r.length);let s=i;for(let o=0;o<i;o++)if(n[o]!==r[o]){s=o;break}let c=[];for(let o=s;o<n.length;o++)c.push("..");return c=c.concat(r.slice(s)),c.join("/")},t.resolve=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1106),i=n(1135);t.makePromiseBuffer=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(o){if(!(void 0===e||t.length<e))return i.rejectedSyncPromise(new r.SentryError("Not adding Promise because buffer limit was reached."));const a=o();return-1===t.indexOf(a)&&t.push(a),a.then((()=>n(a))).then(null,(()=>n(a).then(null,(()=>{})))),a},drain:function(e){return new i.SyncPromise(((n,r)=>{let o=t.length;if(!o)return n(!0);const a=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{i.resolvedSyncPromise(e).then((()=>{--o||(clearTimeout(a),n(!0))}),r)}))}))}}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103);var i;!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(i||(i={}));class o{__init(){this._state=i.PENDING}__init2(){this._handlers=[]}constructor(e){o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),o.prototype.__init4.call(this),o.prototype.__init5.call(this),o.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new o(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new o(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(i.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(i.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===i.PENDING&&(r.isThenable(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===i.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===i.RESOLVED&&e[1](this._value),this._state===i.REJECTED&&e[2](this._value),e[0]=!0)}))}}}t.SyncPromise=o,t.rejectedSyncPromise=function(e){return new o(((t,n)=>{n(e)}))},t.resolvedSyncPromise=function(e){return new o((t=>{t(e)}))}},function(e,t,n){var{_optionalChain:r}=n(1112);Object.defineProperty(t,"__esModule",{value:!0});const i=n(1103),o=n(1132),a=n(1137),s={ip:!1,request:!0,transaction:!0,user:!0},c=["cookies","data","headers","method","query_string","url"],u=["id","username","email"];function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.method&&e.method.toUpperCase();let r="",i="url";t.customRoute||e.route?(r=t.customRoute||`${e.baseUrl||""}${e.route&&e.route.path}`,i="route"):(e.originalUrl||e.url)&&(r=a.stripUrlQueryAndFragment(e.originalUrl||e.url||""));let o="";return t.method&&n&&(o+=n),t.method&&t.path&&(o+=" "),t.path&&r&&(o+=r),[o,i]}function d(e,t){const{include:n=c,deps:r}=t||{},a={},s=e.headers||{},u=e.method,l=e.hostname||e.host||s.host||"<no host>",d=`${"https"===e.protocol||e.socket&&e.socket.encrypted?"https":"http"}://${l}${e.originalUrl||e.url||""}`;return n.forEach((t=>{switch(t){case"headers":a.headers=s;break;case"method":a.method=u;break;case"url":a.url=d;break;case"cookies":a.cookies=e.cookies||s.cookie&&r&&r.cookie&&r.cookie.parse(s.cookie)||{};break;case"query_string":a.query_string=p(e,r);break;case"data":if("GET"===u||"HEAD"===u)break;void 0!==e.body&&(a.data=i.isString(e.body)?e.body:JSON.stringify(o.normalize(e.body)));break;default:({}).hasOwnProperty.call(e,t)&&(a[t]=e[t])}})),a}function p(e,t){let n=e.originalUrl||e.url||"";if(n)return n.startsWith("/")&&(n=`http://dogs.are.great${n}`),e.query||void 0!==typeof URL&&new URL(n).search.replace("?","")||t&&t.url&&t.url.parse(n).query||void 0}t.addRequestDataToEvent=function(e,t,n){const o={...s,...r([n,"optionalAccess",e=>e.include])};if(o.request){const i=Array.isArray(o.request)?d(t,{include:o.request,deps:r([n,"optionalAccess",e=>e.deps])}):d(t,{deps:r([n,"optionalAccess",e=>e.deps])});e.request={...e.request,...i}}if(o.user){const n=t.user&&i.isPlainObject(t.user)?function(e,t){const n={};return(Array.isArray(t)?t:u).forEach((t=>{e&&t in e&&(n[t]=e[t])})),n}(t.user,o.user):{};Object.keys(n).length&&(e.user={...e.user,...n})}if(o.ip){const n=t.ip||t.socket&&t.socket.remoteAddress;n&&(e.user={...e.user,ip_address:n})}return o.transaction&&!e.transaction&&(e.transaction=function(e,t){switch(t){case"path":return l(e,{path:!0})[0];case"handler":return e.route&&e.route.stack&&e.route.stack[0]&&e.route.stack[0].name||"<anonymous>";default:return l(e,{path:!0,method:!0})[0]}}(t,o.transaction)),e},t.addRequestDataToTransaction=function(e,t,n){e&&(e.metadata.source&&"url"!==e.metadata.source||e.setName(...l(t,{path:!0,method:!0})),e.setData("url",t.originalUrl||t.url),t.baseUrl&&e.setData("baseUrl",t.baseUrl),e.setData("query",p(t,n)))},t.extractPathForTransaction=l,t.extractRequestData=d},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getNumberOfUrlSegments=function(e){return e.split(/\\?\//).filter((e=>e.length>0&&","!==e)).length},t.parseUrl=function(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}},t.stripUrlQueryAndFragment=function(e){return e.split(/[\?#]/,1)[0]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=["fatal","error","warning","log","info","debug"];function r(e){return"warn"===e?"warning":n.includes(e)?e:"log"}t.severityFromString=function(e){return r(e)},t.severityLevelFromString=r,t.validSeverityLevels=n},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1129),i=n(1104).getGlobalObject(),o={nowSeconds:()=>Date.now()/1e3},a=r.isNodeEnv()?function(){try{return r.dynamicRequire(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=i;if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),s=void 0===a?o:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},c=o.nowSeconds.bind(o),u=s.nowSeconds.bind(s),l=u,d=void 0!==a;t._browserPerformanceTimeOriginMode=void 0;const p=(()=>{const{performance:e}=i;if(!e||!e.now)return void(t._browserPerformanceTimeOriginMode="none");const n=36e5,r=e.now(),o=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-o):n,s=a<n,c=e.timing&&e.timing.navigationStart,u="number"===typeof c?Math.abs(c+r-o):n;return s||u<n?a<=u?(t._browserPerformanceTimeOriginMode="timeOrigin",e.timeOrigin):(t._browserPerformanceTimeOriginMode="navigationStart",c):(t._browserPerformanceTimeOriginMode="dateNow",o)})();t.browserPerformanceTimeOrigin=p,t.dateTimestampInSeconds=c,t.timestampInSeconds=u,t.timestampWithMs=l,t.usingPerformanceAPI=d}).call(this,n(1130)(e))},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");t.TRACEPARENT_REGEXP=n,t.extractTraceparentData=function(e){const t=e.match(n);if(!e||!t)return;let r;return"1"===t[3]?r=!0:"0"===t[3]&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1105),i=n(1132),o=n(1109);function a(e,t){return(t||new TextEncoder).encode(e)}const s={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile"};t.addItemToEnvelope=function(e,t){const[n,r]=e;return[n,[...r,t]]},t.createAttachmentEnvelopeItem=function(e,t){const n="string"===typeof e.data?a(e.data,t):e.data;return[o.dropUndefinedKeys({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]},t.createEnvelope=function(e){return[e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]]},t.createEventEnvelopeHeaders=function(e,t,n,i){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:r.dsnToString(i)},..."transaction"===e.type&&a&&{trace:o.dropUndefinedKeys({...a})}}},t.envelopeItemTypeToDataCategory=function(e){return s[e]},t.forEachEnvelopeItem=function(e,t){e[1].forEach((e=>{const n=e[0].type;t(e,n)}))},t.getSdkMetadataForEnvelopeHeader=function(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}},t.serializeEnvelope=function(e,t){const[n,r]=e;let o=JSON.stringify(n);function s(e){"string"===typeof o?o="string"===typeof e?o+e:[a(o,t),e]:o.push("string"===typeof e?a(e,t):e)}for(const a of r){const[e,t]=a;if(s(`\n${JSON.stringify(e)}\n`),"string"===typeof t||t instanceof Uint8Array)s(t);else{let e;try{e=JSON.stringify(t)}catch(c){e=JSON.stringify(i.normalize(t))}s(e)}}return"string"===typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(o)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1141),i=n(1139);t.createClientReportEnvelope=function(e,t,n){const o=[{type:"client_report"},{timestamp:n||i.dateTimestampInSeconds(),discarded_events:e}];return r.createEnvelope(t?{dsn:t}:{},[o])}},function(e,t){function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function r(e,t){return e[t]||e.all||0}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_RETRY_AFTER=6e4,t.disabledUntil=r,t.isRateLimited=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return r(e,t)>n},t.parseRetryAfterHeader=n,t.updateRateLimits=function(e,t){let{statusCode:r,headers:i}=t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();const a={...e},s=i&&i["x-sentry-rate-limits"],c=i&&i["retry-after"];if(s)for(const n of s.trim().split(",")){const[e,t]=n.split(":",2),r=parseInt(e,10),i=1e3*(isNaN(r)?60:r);if(t)for(const n of t.split(";"))a[n]=o+i;else a.all=o+i}else c?a.all=o+n(c,o):429===r&&(a.all=o+6e4);return a}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1103),i=(n(1108),"sentry-"),o=/^sentry-/;function a(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})}t.BAGGAGE_HEADER_NAME="baggage",t.MAX_BAGGAGE_STRING_LENGTH=8192,t.SENTRY_BAGGAGE_KEY_PREFIX=i,t.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=o,t.baggageHeaderToDynamicSamplingContext=function(e){if(!r.isString(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...a(t)})),{});else{if(!e)return;t=a(e)}const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return n.match(o)&&(e[n.slice(7)]=r),e}),{});return Object.keys(n).length>0?n:void 0},t.dynamicSamplingContextToSentryBaggageHeader=function(e){return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce(((e,t,n)=>{let[r,i]=t;const o=`${encodeURIComponent(r)}=${encodeURIComponent(i)}`,a=0===n?o:`${e},${o}`;return a.length>8192?e:a}),"")}(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return r&&(e[`${i}${n}`]=r),e}),{}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(1146);const r=n(2181),i=n(1147),o=n(1158),a=n(2138),s=n(1149),c=n(1153),u=n(1155),l=n(1156),d=n(1150),p=n(1157),f=n(1159),h=n(1160),m=n(1151),g=n(1161),v=n(1162),y=n(1163);let b={};i.WINDOW.Sentry&&i.WINDOW.Sentry.Integrations&&(b=i.WINDOW.Sentry.Integrations);const w={...b,...r.Integrations,...o};t.FunctionToString=r.FunctionToString,t.Hub=r.Hub,t.InboundFilters=r.InboundFilters,t.SDK_VERSION=r.SDK_VERSION,t.Scope=r.Scope,t.addBreadcrumb=r.addBreadcrumb,t.addGlobalEventProcessor=r.addGlobalEventProcessor,t.captureEvent=r.captureEvent,t.captureException=r.captureException,t.captureMessage=r.captureMessage,t.configureScope=r.configureScope,t.createTransport=r.createTransport,t.getCurrentHub=r.getCurrentHub,t.getHubFromCarrier=r.getHubFromCarrier,t.makeMain=r.makeMain,t.setContext=r.setContext,t.setExtra=r.setExtra,t.setExtras=r.setExtras,t.setTag=r.setTag,t.setTags=r.setTags,t.setUser=r.setUser,t.startTransaction=r.startTransaction,t.withScope=r.withScope,t.WINDOW=i.WINDOW,t.Replay=a.Replay,t.BrowserClient=s.BrowserClient,t.makeFetchTransport=c.makeFetchTransport,t.makeXHRTransport=u.makeXHRTransport,t.chromeStackLineParser=l.chromeStackLineParser,t.defaultStackLineParsers=l.defaultStackLineParsers,t.defaultStackParser=l.defaultStackParser,t.geckoStackLineParser=l.geckoStackLineParser,t.opera10StackLineParser=l.opera10StackLineParser,t.opera11StackLineParser=l.opera11StackLineParser,t.winjsStackLineParser=l.winjsStackLineParser,t.eventFromException=d.eventFromException,t.eventFromMessage=d.eventFromMessage,t.close=p.close,t.defaultIntegrations=p.defaultIntegrations,t.flush=p.flush,t.forceLoad=p.forceLoad,t.init=p.init,t.lastEventId=p.lastEventId,t.onLoad=p.onLoad,t.showReportDialog=p.showReportDialog,t.wrap=p.wrap,t.GlobalHandlers=f.GlobalHandlers,t.TryCatch=h.TryCatch,t.Breadcrumbs=m.Breadcrumbs,t.LinkedErrors=g.LinkedErrors,t.HttpContext=v.HttpContext,t.Dedupe=y.Dedupe,t.Integrations=w},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(1147),o=n(1149);n(1152);const a=n(1156),s=n(1150),c=n(1157);n(1158),t.FunctionToString=r.FunctionToString,t.Hub=r.Hub,t.InboundFilters=r.InboundFilters,t.SDK_VERSION=r.SDK_VERSION,t.Scope=r.Scope,t.addBreadcrumb=r.addBreadcrumb,t.addGlobalEventProcessor=r.addGlobalEventProcessor,t.captureEvent=r.captureEvent,t.captureException=r.captureException,t.captureMessage=r.captureMessage,t.configureScope=r.configureScope,t.createTransport=r.createTransport,t.getCurrentHub=r.getCurrentHub,t.getHubFromCarrier=r.getHubFromCarrier,t.makeMain=r.makeMain,t.setContext=r.setContext,t.setExtra=r.setExtra,t.setExtras=r.setExtras,t.setTag=r.setTag,t.setTags=r.setTags,t.setUser=r.setUser,t.startTransaction=r.startTransaction,t.withScope=r.withScope,t.WINDOW=i.WINDOW,t.BrowserClient=o.BrowserClient,t.chromeStackLineParser=a.chromeStackLineParser,t.defaultStackLineParsers=a.defaultStackLineParsers,t.defaultStackParser=a.defaultStackParser,t.geckoStackLineParser=a.geckoStackLineParser,t.opera10StackLineParser=a.opera10StackLineParser,t.opera11StackLineParser=a.opera11StackLineParser,t.winjsStackLineParser=a.winjsStackLineParser,t.eventFromException=s.eventFromException,t.eventFromMessage=s.eventFromMessage,t.close=c.close,t.defaultIntegrations=c.defaultIntegrations,t.flush=c.flush,t.forceLoad=c.forceLoad,t.init=c.init,t.lastEventId=c.lastEventId,t.onLoad=c.onLoad,t.showReportDialog=c.showReportDialog,t.wrap=c.wrap},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=i.GLOBAL_OBJ;let a=0;function s(){a++,setTimeout((()=>{a--}))}t.WINDOW=o,t.ignoreNextOnError=s,t.shouldIgnoreOnError=function(){return a>0},t.wrap=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if("function"!==typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(i.getOriginalFunction(t))return t}catch(c){return t}const a=function(){const a=Array.prototype.slice.call(arguments);try{o&&"function"===typeof o&&o.apply(this,arguments);const r=a.map((t=>e(t,n)));return t.apply(this,r)}catch(c){throw s(),r.withScope((e=>{e.addEventProcessor((e=>(n.mechanism&&(i.addExceptionTypeValue(e,void 0,void 0),i.addExceptionMechanism(e,n.mechanism)),e.extra={...e.extra,arguments:a},e))),r.captureException(c)})),c}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}catch(u){}i.markFunctionWrapped(a,t),i.addNonEnumerableProperty(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get:()=>t.name})}catch(u){}return a}},function(e,t,n){"use strict";function r(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const t=e[r];"."===t?e.splice(r,1):".."===t?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return a}));const i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function o(e){const t=i.exec(e);return t?t.slice(1):[]}function a(){let e="",t=!1;for(let n=arguments.length-1;n>=-1&&!t;n--){const r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:"/";r&&(e=`${r}/${e}`,t="/"===r.charAt(0))}return e=r(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."}function s(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function c(e,t){e=a(e).substr(1),t=a(t).substr(1);const n=s(e.split("/")),r=s(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let c=[];for(let a=o;a<n.length;a++)c.push("..");return c=c.concat(r.slice(o)),c.join("/")}function u(e){const t=l(e),n="/"===e.substr(-1);let i=r(e.split("/").filter((e=>!!e)),!t).join("/");return i||t||(i="."),i&&n&&(i+="/"),(t?"/":"")+i}function l(e){return"/"===e.charAt(0)}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(t.join("/"))}function p(e){const t=o(e),n=t[0];let r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."}function f(e,t){let n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n}},function(e,t,n){var{_optionalChain:r}=n(1112);Object.defineProperty(t,"__esModule",{value:!0});const i=n(2181),o=n(2199),a=n(1150),s=n(1147),c=n(1151);class u extends i.BaseClient{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:i.SDK_VERSION}],version:i.SDK_VERSION},super(e),e.sendClientReports&&s.WINDOW.document&&s.WINDOW.document.addEventListener("visibilitychange",(()=>{"hidden"===s.WINDOW.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return a.eventFromException(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return a.eventFromMessage(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(c.BREADCRUMB_INTEGRATION_ID);r([n,"optionalAccess",e=>e.addSentryBreadcrumb,"optionalCall",t=>t(e)]),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return;if(!this._dsn)return;const t=i.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,this._options),n=o.createClientReportEnvelope(e,this._options.tunnel&&o.dsnToString(this._dsn));try{"[object Navigator]"===Object.prototype.toString.call(s.WINDOW&&s.WINDOW.navigator)&&"function"===typeof s.WINDOW.navigator.sendBeacon&&!this._options.transportOptions?s.WINDOW.navigator.sendBeacon.bind(s.WINDOW.navigator)(t,o.serializeEnvelope(n)):this._sendEnvelope(n)}catch(r){}}}t.BrowserClient=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199);function o(e,t){const n=c(e,t),r={type:t&&t.name,value:l(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function a(e,t,n,o){const a=r.getCurrentHub().getClient(),s=a&&a.getOptions().normalizeDepth,u={exception:{values:[{type:i.isEvent(t)?t.constructor.name:o?"UnhandledRejection":"Error",value:`Non-Error ${o?"promise rejection":"exception"} captured with keys: ${i.extractExceptionKeysForMessage(t)}`}]},extra:{__serialized__:i.normalizeToSize(t,s)}};if(n){const t=c(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function s(e,t){return{exception:{values:[o(e,t)]}}}function c(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(u.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(i){}return[]}const u=/Minified React error #\d+;/i;function l(e){const t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function d(e,t,n,r,o){let c;if(i.isErrorEvent(t)&&t.error)return s(e,t.error);if(i.isDOMError(t)||i.isDOMException(t)){const o=t;if("stack"in t)c=s(e,t);else{const t=o.name||(i.isDOMError(o)?"DOMError":"DOMException"),a=o.message?`${t}: ${o.message}`:t;c=p(e,a,n,r),i.addExceptionTypeValue(c,a)}return"code"in o&&(c.tags={...c.tags,"DOMException.code":`${o.code}`}),c}return i.isError(t)?s(e,t):i.isPlainObject(t)||i.isEvent(t)?(c=a(e,t,n,o),i.addExceptionMechanism(c,{synthetic:!0}),c):(c=p(e,t,n,r),i.addExceptionTypeValue(c,`${t}`,void 0),i.addExceptionMechanism(c,{synthetic:!0}),c)}function p(e,t,n,r){const i={message:t};if(r&&n){const r=c(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}t.eventFromError=s,t.eventFromException=function(e,t,n,r){const o=d(e,t,n&&n.syntheticException||void 0,r);return i.addExceptionMechanism(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),i.resolvedSyncPromise(o)},t.eventFromMessage=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=p(e,t,r&&r.syntheticException||void 0,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),i.resolvedSyncPromise(a)},t.eventFromPlainObject=a,t.eventFromString=p,t.eventFromUnknownInput=d,t.exceptionFromError=o,t.parseStackFrames=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=n(1147),a="Breadcrumbs";class s{static __initStatic(){this.id=a}__init(){this.name=s.id}constructor(e){s.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){var e;this.options.console&&i.addInstrumentationHandler("console",c),this.options.dom&&i.addInstrumentationHandler("dom",(e=this.options.dom,function(t){let n,o="object"===typeof e?e.serializeAttribute:void 0,a="object"===typeof e&&"number"===typeof e.maxStringLength?e.maxStringLength:void 0;a&&a>1024&&(a=1024),"string"===typeof o&&(o=[o]);try{n=t.event.target?i.htmlTreeAsString(t.event.target,{keyAttrs:o,maxStringLength:a}):i.htmlTreeAsString(t.event,{keyAttrs:o,maxStringLength:a})}catch(s){n="<unknown>"}0!==n.length&&r.getCurrentHub().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})})),this.options.xhr&&i.addInstrumentationHandler("xhr",u),this.options.fetch&&i.addInstrumentationHandler("fetch",l),this.options.history&&i.addInstrumentationHandler("history",d)}addSentryBreadcrumb(e){this.options.sentry&&r.getCurrentHub().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:i.getEventDescription(e)},{event:e})}}function c(e){for(let n=0;n<e.args.length;n++)if("ref=Ref<"===e.args[n]){e.args[n+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:i.severityLevelFromString(e.level),message:i.safeJoin(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${i.safeJoin(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}r.getCurrentHub().addBreadcrumb(t,{input:e.args,level:e.level})}function u(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:i,body:o}=e.xhr.__sentry_xhr__||{};r.getCurrentHub().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:i},type:"http"},{xhr:e.xhr,input:o})}}function l(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?r.getCurrentHub().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):r.getCurrentHub().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function d(e){let t=e.from,n=e.to;const a=i.parseUrl(o.WINDOW.location.href);let s=i.parseUrl(t);const c=i.parseUrl(n);s.path||(s=a),a.protocol===c.protocol&&a.host===c.host&&(n=c.relative),a.protocol===s.protocol&&a.host===s.host&&(t=s.relative),r.getCurrentHub().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}s.__initStatic(),t.BREADCRUMB_INTEGRATION_ID=a,t.Breadcrumbs=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1153),i=n(1155);t.makeFetchTransport=r.makeFetchTransport,t.makeXHRTransport=i.makeXHRTransport},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=n(1154);t.makeFetchTransport=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.getNativeFetchImplementation();return r.createTransport(e,(function(n){const r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};try{return t(e.url,r).then((e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(a){return o.clearCachedFetchImplementation(),i.rejectedSyncPromise(a)}}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2199),i=n(1147);let o;t.clearCachedFetchImplementation=function(){o=void 0},t.getNativeFetchImplementation=function(){if(o)return o;if(r.isNativeFetch(i.WINDOW.fetch))return o=i.WINDOW.fetch.bind(i.WINDOW);const e=i.WINDOW.document;let t=i.WINDOW.fetch;if(e&&"function"===typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){}return o=t.bind(i.WINDOW)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199);t.makeXHRTransport=function(e){return r.createTransport(e,(function(t){return new i.SyncPromise(((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)}))}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2199),i="?";function o(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const a=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=[30,e=>{const t=a.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=s.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=w(t[1]||i,t[2]);return o(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=[50,e=>{const t=u.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=l.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||i;return[n,e]=w(n,e),o(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],p=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,f=[40,e=>{const t=p.exec(e);return t?o(t[2],t[1]||i,+t[3],t[4]?+t[4]:void 0):void 0}],h=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,m=[10,e=>{const t=h.exec(e);return t?o(t[2],t[3]||i,+t[1]):void 0}],g=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,v=[20,e=>{const t=g.exec(e);return t?o(t[5],t[3]||t[4]||i,+t[1],+t[2]):void 0}],y=[c,d,f],b=r.createStackParser(...y),w=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:i,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};t.chromeStackLineParser=c,t.defaultStackLineParsers=y,t.defaultStackParser=b,t.geckoStackLineParser=d,t.opera10StackLineParser=m,t.opera11StackLineParser=v,t.winjsStackLineParser=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=n(1149),a=n(1147);n(1158);const s=n(1156);n(1152);const c=n(1160),u=n(1151),l=n(1159),d=n(1161),p=n(1163),f=n(1162),h=n(1153),m=n(1155),g=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new c.TryCatch,new u.Breadcrumbs,new l.GlobalHandlers,new d.LinkedErrors,new p.Dedupe,new f.HttpContext];function v(e){e.startSession({ignoreDuration:!0}),e.captureSession()}t.close=function(e){const t=r.getCurrentHub().getClient();return t?t.close(e):i.resolvedSyncPromise(!1)},t.defaultIntegrations=g,t.flush=function(e){const t=r.getCurrentHub().getClient();return t?t.flush(e):i.resolvedSyncPromise(!1)},t.forceLoad=function(){},t.init=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0===e.defaultIntegrations&&(e.defaultIntegrations=g),void 0===e.release&&("string"===typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),a.WINDOW.SENTRY_RELEASE&&a.WINDOW.SENTRY_RELEASE.id&&(e.release=a.WINDOW.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:i.stackParserFromStackParserOptions(e.stackParser||s.defaultStackParser),integrations:r.getIntegrationsToSetup(e),transport:e.transport||(i.supportsFetch()?h.makeFetchTransport:m.makeXHRTransport)};r.initAndBind(o.BrowserClient,t),e.autoSessionTracking&&function(){if("undefined"===typeof a.WINDOW.document)return;const e=r.getCurrentHub();e.captureSession&&(v(e),i.addInstrumentationHandler("history",(e=>{let{from:t,to:n}=e;void 0!==t&&t!==n&&v(r.getCurrentHub())})))}()},t.lastEventId=function(){return r.getCurrentHub().lastEventId()},t.onLoad=function(e){e()},t.showReportDialog=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.getCurrentHub();if(!a.WINDOW.document)return;const{client:n,scope:i}=t.getStackTop(),o=e.dsn||n&&n.getDsn();if(!o)return;i&&(e.user={...i.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const s=a.WINDOW.document.createElement("script");s.async=!0,s.src=r.getReportDialogEndpoint(o,e),e.onLoad&&(s.onload=e.onLoad);const c=a.WINDOW.document.head||a.WINDOW.document.body;c&&c.appendChild(s)},t.wrap=function(e){return a.wrap(e)()}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1159),i=n(1160),o=n(1151),a=n(1161),s=n(1162),c=n(1163);t.GlobalHandlers=r.GlobalHandlers,t.TryCatch=i.TryCatch,t.Breadcrumbs=o.Breadcrumbs,t.LinkedErrors=a.LinkedErrors,t.HttpContext=s.HttpContext,t.Dedupe=c.Dedupe},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=n(1150),a=n(1147);class s{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=s.id}__init2(){this._installFunc={onerror:c,onunhandledrejection:u}}constructor(e){s.prototype.__init.call(this),s.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const t in e){const n=this._installFunc[t];n&&e[t]&&(n(),this._installFunc[t]=void 0)}}}function c(){i.addInstrumentationHandler("error",(e=>{const[t,n,r]=p();if(!t.getIntegration(s))return;const{msg:c,url:u,line:f,column:h,error:m}=e;if(a.shouldIgnoreOnError()||m&&m.__sentry_own_request__)return;const g=void 0===m&&i.isString(c)?function(e,t,n,r){let o=i.isErrorEvent(e)?e.message:e,a="Error";const s=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(a=s[1],o=s[2]);return l({exception:{values:[{type:a,value:o}]}},t,n,r)}(c,u,f,h):l(o.eventFromUnknownInput(n,m||c,void 0,r,!1),u,f,h);g.level="error",d(t,m,g,"onerror")}))}function u(){i.addInstrumentationHandler("unhandledrejection",(e=>{const[t,n,r]=p();if(!t.getIntegration(s))return;let c=e;try{"reason"in e?c=e.reason:"detail"in e&&"reason"in e.detail&&(c=e.detail.reason)}catch(l){}if(a.shouldIgnoreOnError()||c&&c.__sentry_own_request__)return!0;const u=i.isPrimitive(c)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(c)}`}]}}:o.eventFromUnknownInput(n,c,void 0,r,!0);u.level="error",d(t,c,u,"onunhandledrejection")}))}function l(e,t,n,r){const o=e.exception=e.exception||{},a=o.values=o.values||[],s=a[0]=a[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[],l=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,p=i.isString(t)&&t.length>0?t:i.getLocationHref();return 0===u.length&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:d}),e}function d(e,t,n,r){i.addExceptionMechanism(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function p(){const e=r.getCurrentHub(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}s.__initStatic(),t.GlobalHandlers=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2199),i=n(1147),o=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class a{static __initStatic(){this.id="TryCatch"}__init(){this.name=a.id}constructor(e){a.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&r.fill(i.WINDOW,"setTimeout",s),this._options.setInterval&&r.fill(i.WINDOW,"setInterval",s),this._options.requestAnimationFrame&&r.fill(i.WINDOW,"requestAnimationFrame",c),this._options.XMLHttpRequest&&"XMLHttpRequest"in i.WINDOW&&r.fill(XMLHttpRequest.prototype,"send",u);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:o).forEach(l)}}function s(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const a=n[0];return n[0]=i.wrap(a,{mechanism:{data:{function:r.getFunctionName(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function c(e){return function(t){return e.apply(this,[i.wrap(t,{mechanism:{data:{function:"requestAnimationFrame",handler:r.getFunctionName(e)},handled:!0,type:"instrument"}})])}}function u(e){return function(){const t=this;["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in t&&"function"===typeof t[e]&&r.fill(t,e,(function(t){const n={mechanism:{data:{function:e,handler:r.getFunctionName(t)},handled:!0,type:"instrument"}},o=r.getOriginalFunction(t);return o&&(n.mechanism.data.handler=r.getFunctionName(o)),i.wrap(t,n)}))}));for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e.apply(this,o)}}function l(e){const t=i.WINDOW,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(r.fill(n,"addEventListener",(function(t){return function(n,o,a){try{"function"===typeof o.handleEvent&&(o.handleEvent=i.wrap(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:r.getFunctionName(o),target:e},handled:!0,type:"instrument"}}))}catch(s){}return t.apply(this,[n,i.wrap(o,{mechanism:{data:{function:"addEventListener",handler:r.getFunctionName(o),target:e},handled:!0,type:"instrument"}}),a])}})),r.fill(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(o){}return e.call(this,t,i,r)}})))}a.__initStatic(),t.TryCatch=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(2199),o=n(1150);class a{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=a.id}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=r.getCurrentHub().getClient();e&&r.addGlobalEventProcessor(((t,n)=>{const i=r.getCurrentHub().getIntegration(a);return i?s(e.getOptions().stackParser,i._key,i._limit,t,n):t}))}}function s(e,t,n,r,o){if(!r.exception||!r.exception.values||!o||!i.isInstanceOf(o.originalException,Error))return r;const a=c(e,n,o.originalException,t);return r.exception.values=[...a,...r.exception.values],r}function c(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!i.isInstanceOf(n[r],Error)||a.length+1>=t)return a;const s=o.exceptionFromError(e,n[r]);return c(e,t,n[r],r,[s,...a])}a.__initStatic(),t.LinkedErrors=a,t._handler=s,t._walkErrorTree=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(2181),i=n(1147);class o{constructor(){o.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=o.id}setupOnce(){r.addGlobalEventProcessor((e=>{if(r.getCurrentHub().getIntegration(o)){if(!i.WINDOW.navigator&&!i.WINDOW.location&&!i.WINDOW.document)return e;const t=e.request&&e.request.url||i.WINDOW.location&&i.WINDOW.location.href,{referrer:n}=i.WINDOW.document||{},{userAgent:r}=i.WINDOW.navigator||{},o={...t&&{url:t},headers:{...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}}};return{...e,request:o}}return e}))}}o.__initStatic(),t.HttpContext=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(2199);class r{constructor(){r.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=r.id}setupOnce(e,t){const n=e=>{const n=t().getIntegration(r);if(n){try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!o(e,t)&&!!i(e,t))))}(e,t)||!!function(e,t){const n=a(t),r=a(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!o(e,t)&&!!i(e,t)))}(e,t))}(e,n._previousEvent))return null}catch(s){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function i(e,t){let n=s(e),r=s(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function o(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function a(e){return e.exception&&e.exception.values&&e.exception.values[0]}function s(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}r.__initStatic(),t.Dedupe=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=()=>"Notification"in window&&"serviceWorker"in navigator&&"PushManager"in window&&"indexedDB"in window},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));const r=(e,t)=>{try{window.localStorage.setItem(e,t)}catch(n){}},i=e=>{try{return window.localStorage.getItem(e)}catch(t){return null}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return N})),n.d(t,"c",(function(){return x}));var r=n(888),i=n(970),o=n(1211),a=n(1204),s=n(1210),c=n(1208),u=n(2161),l=n(1205),d=n(1206),p=n(1207),f=n(1167),h=n(1209),m=n(1203),g=n(1169),v=n(2171);const y="appLibrary",b=e=>({config:r.z.object({tilePickerOptions:e}).optional()}),w=r.z.object({identifier:r.z.literal(f.a),uuid:r.z.string()}).extend(b(r.z.object({selectedLibrary:r.z.object({library:r.z.nativeEnum(g.GoldilocksLibrary),list:r.z.nativeEnum(g.PhotosTileAssetListType)}).optional(),selectedMemory:r.z.object({memories:r.z.boolean()}).optional(),selectedAlbum:r.z.object({recordKey:r.z.object({recordName:r.z.string(),zoneID:r.z.object({zoneName:r.z.string(),ownerRecordName:r.z.string(),zoneType:r.z.string()})}),type:r.z.literal(g.PhotosTileAssetListType.SharedAlbum).or(r.z.literal(g.PhotosTileAssetListType.UserAlbum))}).optional()}).optional())),S=r.z.object({identifier:r.z.literal(u.a),uuid:r.z.string()}).extend(b(r.z.object({selectedMailbox:r.z.string().optional(),selectedFilterTypes:r.z.array(r.z.nativeEnum(m.a)).optional()}).optional())),C=r.z.object({identifier:r.z.literal(a.a),uuid:r.z.string()}).extend(b(r.z.object({selectedFolder:r.z.string().optional()}).optional())),_=r.z.object({identifier:r.z.literal(l.a),uuid:r.z.string()}).extend(b(r.z.object({selectedFolder:r.z.string().optional()}).optional())),O=r.z.object({identifier:r.z.literal(i.a),uuid:r.z.string()}).extend(b(r.z.object({selectedCalendars:r.z.array(r.z.string()).optional()}).optional())),E=r.z.object({identifier:r.z.literal(d.a),uuid:r.z.string()}).extend(b(r.z.object({selectedNumbersList:r.z.string().optional()}).optional())),I=r.z.object({identifier:r.z.literal(p.a),uuid:r.z.string()}).extend(b(r.z.object({selectedPagesList:r.z.string().optional()}).optional())),A=r.z.object({identifier:r.z.literal(c.a),uuid:r.z.string()}).extend(b(r.z.object({selectedKeynoteList:r.z.string().optional()}).optional())),T=r.z.object({identifier:r.z.literal(h.a),uuid:r.z.string()}).extend(b(r.z.object({selectedRemindersList:r.z.string().optional()}).optional())),P=r.z.object({identifier:r.z.literal(y),uuid:r.z.string(),config:r.z.void().optional()}),R=r.z.object({identifier:r.z.literal(s.a),uuid:r.z.string(),config:r.z.void().optional()}),k=r.z.object({identifier:r.z.literal(o.a),uuid:r.z.string(),config:r.z.void().optional()}),D=r.z.object({identifier:r.z.literal(v.a),uuid:r.z.string(),config:r.z.void().optional()}),M=r.z.discriminatedUnion("identifier",[w,S,C,_,O,E,I,A,T,P,R,k,D]),N=r.z.union([r.z.literal(f.a),r.z.literal(u.a),r.z.literal(a.a),r.z.literal(l.a),r.z.literal(i.a),r.z.literal(d.a),r.z.literal(p.a),r.z.literal(h.a),r.z.literal(c.a),r.z.literal(v.a),r.z.literal(y),r.z.literal(o.a),r.z.literal(s.a)]),x=r.z.object({configurations:r.z.array(M),defaultOrder:r.z.array(M),version:r.z.number()})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p}));var r=n(901),i=n(900),o=n(971),a=n(1168),s=n(884);const{servicesDomain:c}=i.a.sharedInstance.current,u={...o.a,authBagId:"photos",applicationName:"photos3",path:"photos3",generation:3,isPCSRequired:!0,pcsKeyIdentifier:Object(a.a)("photos"),requiredServices:["ckdatabasews"],supportedDomains:[r.e,r.d,r.b,r.c,r.f,r.g],supportedFileExtensions:[],allowsFullscreen:!0,allowsUnauthenticatedMode:!0,radarComponentId:740310,cloudKitInfo:{containerIdentifier:"com.apple.photos.cloud",partition:`https://ckdatabasews.${c}`,recoverableErrorTitleLocKey:"Photos.CloudKit.Recoverable.Title",recoverableErrorSubtitleLocKey:"Photos.CloudKit.Recoverable.Subtitle",unrecoverableErrorTitleLocKey:"Photos.CloudKit.Unrecoverable.Title"},configuration:null,selfRouteInfo:{base:"#/",unauthenticated:[/^#\/icloudlinks\/\S+$/,"#/photostream/join"]}},l="photos",d={identifier:l,displayNameLocKey:"Photos.DisplayName",titleNameLocKey:"Photos.TitleName",dataNameLocKey:"Photos.DataName",dataNameTitleCaseLocKey:"Photos.DataNameTitleCase",generations:[u],applicationInfo:u,setApplicationInfoForConfiguration(e){let{user:t}=e;return null!==t&&void 0!==t&&t.details&&Object(s.e)(t.details)?{...u,supportsTile:!1}:u}},p={identifier:l,displayNameLocKey:"Photos.DisplayName",titleNameLocKey:"Photos.TitleName",descriptionLocKey:"CloudOS.LandingPage.Photos.Description",learnMoreLinkKey:"photos",nameToBeDisplayedLocKey:"Photos.TitleName"};u.configuration=d},function(e,t,n){"use strict";function r(e){return e}n.d(t,"a",(function(){return r}))},function(e,t,n){!function(e,t){for(var n in t)e[n]=t[n]}(t,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=10)}([function(e,t){e.exports=n(888)},function(e,t){e.exports=n(465)},,function(e,t){e.exports=n(2242)},function(e,t){e.exports=n(1170)},function(e,t){e.exports=n(1181)},function(e,t){e.exports=n(1186)},function(e,t){e.exports=n(2167)},function(e,t){e.exports=n(1187)},,function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";let r;var i;function o(e){return void 0===e||null===e}n.r(t),n.d(t,"GoldilocksLibrary",(function(){return r})),n.d(t,"configure",(function(){return Me})),n.d(t,"getDerivativeUrlsForTile",(function(){return Fa})),n.d(t,"getCountsForTile",(function(){return es})),n.d(t,"getPhotosTileLists",(function(){return Ga})),n.d(t,"getFolderItemsForTile",(function(){return is})),n.d(t,"isValidPhotosTileAssetListKey",(function(){return Uo})),n.d(t,"getNameOrLocKey",(function(){return Fo})),n.d(t,"QuickActionType",(function(){return Ns})),n.d(t,"quickActionsForAssetList",(function(){return Ls})),n.d(t,"PhotosTileAssetListType",(function(){return No})),n.d(t,"PhotosTileFolderType",(function(){return xo})),n.d(t,"StartupErrorCode",(function(){return ye})),n.d(t,"SharedSyncZoneErrorCode",(function(){return be})),n.d(t,"DerivativeLoadErrorCode",(function(){return we})),n.d(t,"QuickActionErrorCode",(function(){return Se})),n.d(t,"LibraryCountsLoadErrorCode",(function(){return Ce})),n.d(t,"MemoriesLoadErrorCode",(function(){return _e})),n.d(t,"FolderItemsErrorCode",(function(){return Oe})),n.d(t,"UnknownExceptionCode",(function(){return Ee})),n.d(t,"PhotosTileError",(function(){return Ae})),n.d(t,"getMemoryTile",(function(){return Jc})),n.d(t,"MEMORIES_LAUNCH_PATH",(function(){return Wc})),n.d(t,"getMemoriesCount",(function(){return Xc})),function(e){e.Personal="Library.Personal",e.Shared="Library.Shared",e.Both="Library.Both"}(r||(r={})),function(e){e.ACCESS_DENIED="ACCESS_DENIED",e.ATOMIC_ERROR="ATOMIC_ERROR",e.AUTHENTICATION_FAILED="AUTHENTICATION_FAILED",e.AUTHENTICATION_REQUIRED="AUTHENTICATION_REQUIRED",e.BAD_REQUEST="BAD_REQUEST",e.CONFLICT="CONFLICT",e.EXISTS="EXISTS",e.INTERNAL_ERROR="INTERNAL_ERROR",e.NOT_FOUND="NOT_FOUND",e.QUOTA_EXCEEDED="QUOTA_EXCEEDED",e.THROTTLED="THROTTLED",e.TRY_AGAIN_LATER="TRY_AGAIN_LATER",e.UNIQUE_FIELD_ERROR="UNIQUE_FIELD_ERROR",e.VALIDATING_REFERENCE_ERROR="VALIDATING_REFERENCE_ERROR",e.ZONE_NOT_FOUND="ZONE_NOT_FOUND",e.ZONE_BUSY="ZONE_BUSY"}(i||(i={})),Object.values(i);class a{constructor(e){this.obj=void 0,this.obj=e}get serverErrorCode(){return this.obj.serverErrorCode}get retryAfter(){return this.obj.retryAfter}get extensionErrorCode(){return this.obj.extensionErrorCode}get message(){return this.obj.message}toJSON(){return this.obj}}function s(e){return"serverErrorCode"in e||"extensionErrorCode"in e}var c=n(3);class u extends Error{static fromCloudKitContainerError(e){return new u({errorCode:"NetworkRequestError",requestError:e})}static fromParseError(e){return new u({errorCode:"SchemaParsingError",schemaParsingError:e})}static fromCloudKitServerError(e){return new u({errorCode:"CloudKitServerError",requestError:e})}static fromUploadError(e){return new u({errorCode:"UploadError",uploadError:e})}get ckServerErrorCode(){if(this.requestError)return s(this.requestError)?this.requestError.serverErrorCode:"CloudKitServerError"===this.requestError.errorCode?this.requestError.error.serverErrorCode:void 0}constructor(e){let t=`[@icloudweb/photos-ck] [${e.errorCode}]`;"message"in e?t+=` ${e.message}`:"requestError"in e?"CloudKitServerError"===e.errorCode?t+=` ${e.requestError.serverErrorCode}`:t+=` ${e.requestError.message}`:"schemaParsingError"in e&&(t+=` ${e.schemaParsingError}`),super(t),this.errorCode=void 0,this.requestError=void 0,this.schemaParsingError=void 0,this.wrappedError=void 0,this.uploadError=void 0,this.errorCode=e.errorCode,"requestError"in e&&(this.requestError=e.requestError),"wrappedError"in e&&(this.wrappedError=e.wrappedError),"schemaParsingError"in e&&(this.schemaParsingError=e.schemaParsingError),"uploadError"in e&&(this.uploadError=e.uploadError)}}class l extends Error{constructor(e,t){const n=c.ParseJsonError.from(t,e);super(`BadResponseError: ${n.message}`),this.type=void 0,this.schemaError=void 0,this.parseJsonError=void 0,this.parseJsonError=n,this.type=e,this.schemaError=t}}var d=n(1);let p=1;const f=()=>p++;var h,m;!function(e){e[e.Manual=0]="Manual",e[e.CreationDate=1]="CreationDate",e[e.LastModifiedDate=2]="LastModifiedDate",e[e.ImportDate=3]="ImportDate",e[e.TrashDate=4]="TrashDate",e[e.Title=5]="Title",e[e.Custom=100]="Custom",e[e.CPLAlbumContentSortTypeTitle=101]="CPLAlbumContentSortTypeTitle"}(h||(h={})),function(e){e.Favorites="FAVORITE",e.Live="LIVE",e.Videos="VIDEO",e.Panoramas="PANORAMA",e.Depth="DEPTH",e.Exposure="EXPOSURE",e.Timelapse="TIMELAPSE",e.Slomo="SLOMO",e.Bursts="BURSTS",e.Screenshot="SCREENSHOT",e.Animated="ANIMATED"}(m||(m={}));const g=[m.Videos,m.Live,m.Depth,m.Exposure,m.Panoramas,m.Timelapse,m.Slomo,m.Bursts,m.Screenshot,m.Animated],v={[m.Favorites]:"Favorite",[m.Live]:"Live",[m.Videos]:"Video",[m.Panoramas]:"Panorama",[m.Timelapse]:"Timelapse",[m.Slomo]:"Slomo",[m.Screenshot]:"Screenshot",[m.Animated]:"Animated",[m.Exposure]:"Exposure",[m.Depth]:"Depth"};var y,b,w;function S(e){switch(e){case y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted:return"CPLAssetByAssetDateWithoutHiddenOrDeleted";case y.CPLAssetAndMasterByAddedDate:return"CPLAssetByAddedDate";case y.CPLMemoryIsFavoriteByCreateDate:return"CPLMemoryIsFavoritedByCreateDate";case y.CPLMemoryNotIsRejectedByCreateDate:return"CPLMemoryNotIsRejectedByCreateDate";case y.CPLAssetAndMasterInSmartAlbumByAssetDate:return"CPLAssetInSmartAlbumByAssetDate";case y.CPLContainerRelationLiveByAssetDate:case y.CPLContainerRelationLiveByPosition:return"CPLContainerRelationNotDeletedByAssetDate";case y.CPLAlbumByUserModificationDate:return"CPLAlbumByUserModificationDate";case y.CPLAlbumByPositionLive:return"CPLAlbumNotDeleted";case y.CPLAssetAndMasterHiddenByAssetDate:return"CPLAssetHiddenByAssetDate";case y.CPLAssetAndMasterDeletedByExpungedDate:return"CPLAssetDeletedByExpungedDate"}}!function(e){e.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted="CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted",e.CPLAssetAndMasterByAddedDate="CPLAssetAndMasterByAddedDate",e.CPLContainerRelationLiveByAssetDate="CPLContainerRelationLiveByAssetDate",e.CPLContainerRelationLiveByPosition="CPLContainerRelationLiveByPosition",e.CPLAlbumByPositionLive="CPLAlbumByPositionLive",e.CPLAlbumByUserModificationDate="CPLAlbumByUserModificationDate",e.CPLAssetAndMasterInSmartAlbumByAssetDate="CPLAssetAndMasterInSmartAlbumByAssetDate",e.CPLMemoryIsFavoriteByCreateDate="CPLMemoryIsFavoriteByCreateDate",e.CPLMemoryNotIsRejectedByCreateDate="CPLMemoryNotIsRejectedByCreateDate",e.CPLAssetAndMasterHiddenByAssetDate="CPLAssetAndMasterHiddenByAssetDate",e.CPLAssetAndMasterDeletedByExpungedDate="CPLAssetAndMasterDeletedByExpungedDate"}(y||(y={})),function(e){e.HyperionIndexCountLookup="HyperionIndexCountLookup",e.CountItemsInIndex="CountItemsInIndex"}(b||(b={})),function(e){e.CPLAlbum="CPLAlbum",e.CPLMaster="CPLMaster",e.CPLAsset="CPLAsset",e.CPLLibraryInfo="CPLLibraryInfo",e.CPLContainerRelation="CPLContainerRelation",e.IndexCountResult="IndexCountResult",e.ItemCount="ItemCount",e.CheckIndexingState="CheckIndexingState",e.CPLZoneState="CPLZoneState",e.CMMRoot="CMMRoot",e.Share="cloudkit.share",e.CPLMemory="CPLMemory",e.DBRMetadata="DBRMetadata"}(w||(w={}));var C=n(0);const _=C.z.object({zoneName:C.z.string(),ownerRecordName:C.z.string(),zoneType:C.z.string()}),O=C.z.object({zoneID:_,syncToken:C.z.string().optional(),deleted:C.z.boolean().optional()}),E=C.z.string(),I=C.z.object({timestamp:C.z.number(),userRecordName:C.z.string().nullable(),deviceID:C.z.string().optional().nullable()}),A=C.z.object({recordName:C.z.string(),action:C.z.string().optional(),zoneID:_.nullable().optional()}),T=C.z.object({recordName:E,recordType:C.z.nativeEnum(w),recordChangeTag:C.z.string(),created:I.optional(),modified:I.optional(),deleted:C.z.boolean().optional(),zoneID:_.optional().nullable(),fields:C.z.object({}).optional()});function P(e){return C.object({type:C.string(),value:e})}function R(e,t,n){const r={},i={};return Object.keys(t).forEach((e=>{const n=e,i=t[n];r[n]=P(i)})),Object.keys(n).forEach((e=>{const t=e,r=n[t];i[t]=P(r)})),T.extend({recordType:C.literal(e),fields:C.object(r).partial(),pluginFields:C.object(i).partial().optional()})}function k(e,t,n){return T.extend({recordType:C.literal(e),fields:C.object(t).partial(),pluginFields:C.object(n).partial().optional()})}const D="PrimarySync-0000-LI",M={photosCount:C.z.number(),videosCount:C.z.number(),othersCount:C.z.number(),albumsCount:C.z.number(),audiosCount:C.z.number(),memoriesCount:C.z.number(),irisCount:C.z.number(),burstsExcludedFromPhotosCount:C.z.number(),hiddenIrisCount:C.z.number(),hiddenVideosCount:C.z.number(),hiddenPhotosCount:C.z.number(),hiddenAudiosCount:C.z.number(),hiddenBurstsExcludedFromPhotosCount:C.z.number(),hiddenOthersCount:C.z.number(),featureVersion:C.z.number(),version:C.z.number(),lastSyncedToken:C.z.string(),accountFlags:C.z.string(),libraryInfoVersion:C.z.number(),featureVersionHistory:C.z.string(),cplAssetDistribution:C.z.string()},N=R(w.CPLLibraryInfo,M,{}),x=k(w.CPLLibraryInfo,M,{}),L="PrimarySync-0000-ZS";function j(e){if("number"!==typeof e||isNaN(e))return"";let t=e.toString().length-2,n=1;for(;t>0;)n*=10,t--;return Math.round(e/n)*n}function U(e){return e?e.startsWith("CMM-")?"CMM":e.startsWith("PrimarySync")?"PrimarySync":e.startsWith("SharedSync")?"SharedSync":e.startsWith("Exit-SharedSync")?"Exit-SharedSync":"Unknown":"NoZoneName"}function F(e){try{return Object(c.parseUrl)(e)}catch{return}}function z(){z=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,i){var o=RegExp(e,r);return t.set(o,i||t.get(e)),B(o,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var i=r[n];if("number"==typeof i)t[n]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1<i.length;)o++;t[n]=e[i[o]]}return t}),Object.create(null))}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var i=n.indices;i&&(i.groups=r(i,this))}return n},n.prototype[Symbol.replace]=function(n,i){if("string"==typeof i){var o=t.get(this);return e[Symbol.replace].call(this,n,i.replace(/\$<([^>]+)(>|$)/g,(function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""})))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},z.apply(this,arguments)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}const K="clientTiming",H=[y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted,y.CPLAssetAndMasterByAddedDate,y.CPLContainerRelationLiveByAssetDate,y.CPLContainerRelationLiveByPosition,y.CPLAlbumByPositionLive,y.CPLAlbumByUserModificationDate,y.CPLAssetAndMasterInSmartAlbumByAssetDate,y.CPLAssetAndMasterDeletedByExpungedDate,y.CPLAssetAndMasterHiddenByAssetDate,b.HyperionIndexCountLookup,w.CPLAlbum,w.CPLMaster,w.CPLAsset,w.CPLLibraryInfo,w.CPLContainerRelation,w.IndexCountResult,w.CheckIndexingState,w.CPLZoneState,w.CMMRoot,w.Share,D,"cmm-root","cmm-share","library-info",D,L,"CountItemsInIndex","CPLAssetByAssetDateWithoutHiddenOrDeleted","CPLAssetByAddedDate","CPLBurstStackAssetAndMasterByAssetDate","CPLAssetBurstStackAssetByAssetDate","CPLAssetHiddenByAssetDate","CPLAssetDeletedByExpungedDate","CPLContainerRelationSparseNotDeletedByAssetDate","CPLContainerRelationSparseLive","CPLAssetInSmartAlbumByAssetDate","CPLContainerRelationNotDeletedByAssetDate","CPLAlbumNotDeleted"],W="PrimarySync-0000-CI-";function q(e){var t,n;if((null===e||void 0===e||null===(t=e.query)||void 0===t||!t.recordType)&&"string"!==typeof(null===e||void 0===e||null===(n=e.query)||void 0===n?void 0:n.recordType))return"Unknown";const r=e.query.recordType.split(":")[0]||"";return-1!==H.indexOf(r)||r===W?r:"Redacted"}function V(e){return null!==e&&void 0!==e&&e.records?e.records.map((e=>{const t=e.recordName.split(":")[0]||"";return-1!==H.indexOf(e.recordName)||t===W?t:"Redacted"})).sort().join("__"):"Unknown"}const $=z(/\/production\/(\w*)\/(.*)\?/,{database:1,urlType:2}),G=z(/.+vandelay.+\/(sharedlibrary)\/((\w|\x2D)*)?/,{urlType:2}),Z=new class{constructor(){this._inflightRequests=new Map,this._completedRequests=[],this._observer=void 0}newTimings(e){const t=e.getEntries();for(let r=0;r<t.length;r++){const e=t[r];try{const t=F(e.name),n=t?t.searchParams.get(K):void 0;if(n&&this._inflightRequests.has(n)){const t=this._inflightRequests.get(n);this._inflightRequests.delete(n);const{url:r,id:i,...o}=t;this._completedRequests.push({...o,startTime:Math.floor(e.startTime),responseEnd:Math.floor(e.responseEnd),duration:Math.floor(e.duration),connectStart:Math.floor(e.connectStart),connectEnd:Math.floor(e.connectEnd),domainLookupStart:Math.floor(e.domainLookupStart),domainLookupEnd:Math.floor(e.domainLookupEnd)})}}catch(n){}}}get loggingData(){const e=this._completedRequests;return e.sort(((e,t)=>e.startTime-t.startTime)),e.map((e=>({photosType:e.photosType,cloudkitType:e.cloudkitType,database:e.database,zoneName:e.zoneName,startTime:e.startTime,responseEnd:e.responseEnd,duration:e.duration,connectStart:e.connectStart,connectEnd:e.connectEnd,domainLookupStart:e.domainLookupStart,domainLookupEnd:e.domainLookupEnd})))}get isRunning(){return!!this._observer}start(){if(!this.isRunning)try{"function"===typeof window.PerformanceObserver&&(this._observer=new PerformanceObserver(this.newTimings.bind(this)),this._observer.observe({entryTypes:["resource"]}))}catch{return}}stop(){this._observer&&(this._observer.disconnect(),this._observer=void 0),this._inflightRequests.clear()}clear(){this._inflightRequests.clear(),this._completedRequests=[]}logCloudKitRequest(e,t,n){if(this.isRunning)try{const o=f().toString();let a,s=t;if("string"===typeof s){var r;a=F(s);const e=null===(r=a)||void 0===r?void 0:r.searchParams;!e||null!==e&&void 0!==e&&e.has(K)||e.append(K,o)}else{var i;a="url"in s?F(s.url):s;const e=null===(i=a)||void 0===i?void 0:i.searchParams;!e||null!==e&&void 0!==e&&e.has(K)||e.append(K,o),a&&(s={...s,url:a.toString()})}if(a){const t=function(e,t){let n;const r=$.exec(e.toString());let i,o,a;if(r&&r.groups){var s;a=r.groups.database||"Unknown";try{n=t&&t.body&&"string"===typeof(null===t||void 0===t?void 0:t.body)?JSON.parse(t.body||"{}"):{}}catch{n={}}i=U(null===(s=n)||void 0===s||null===(s=s.zoneID)||void 0===s?void 0:s.zoneName),o=r.groups.urlType}else{const r=G.exec(e.toString());n=null===t||void 0===t?void 0:t.body,r&&r.groups&&(i="FEDERATED",o=r.groups.urlType,a="NotApplicable")}if(i&&o&&a)switch(o){case"changes/database":return{database:a,cloudkitType:o,photosType:"DatabaseChanges",zoneName:i};case"records/lookup":case"federated-lookup":return{database:a,cloudkitType:o,photosType:V(n),zoneName:i};case"records/query":case"federated-query":return{database:a,cloudkitType:o,photosType:q(n),zoneName:i};default:return{database:a,cloudkitType:o,photosType:"Unknown",zoneName:i}}}(a,n);if(t){const e={url:a.toString(),id:o,...t};this._inflightRequests.set(o,e)}return e(a.toString(),n)}}catch(o){}return e(t,n)}},Q="com.apple.photos.cloud";var Y;!function(e){e.Private="private",e.Shared="shared",e.Public="public"}(Y||(Y={}));class J{constructor(e,t,n){this.containerConfig=void 0,this.fetchFn=void 0,this.defaultRequestOptions=void 0,this.fetchFn=t,this.defaultRequestOptions=n,this.containerConfig="dsid"in e?{...e,privateDatabaseHost:ee(e.privateDatabaseHost),publicDatabaseHost:ee(e.publicDatabaseHost),sharedDatabaseHost:ee(e.sharedDatabaseHost)}:{...e,anonymousPublicAccess:e.anonymousPublicAccess}}static buildCloudKitURL(e){const{host:t,dbScope:n,path:r,environment:i,containerID:o}=e;return`${t}/database/1/${o}/${i}/${n}${r}${e.paramsString||""}`}buildCKURL(e,t,n){var r;let i;if("anonymousPublicAccess"in this.containerConfig)i=this.containerConfig.anonymousPublicAccess.databasePartition;else switch(e){case Y.Private:i=this.containerConfig.privateDatabaseHost;break;case Y.Shared:i=this.containerConfig.sharedDatabaseHost;break;case Y.Public:i=this.containerConfig.publicDatabaseHost}const o=this.containerConfig.containerIdentifier,a=this.containerConfig.environment,s=new URLSearchParams;null===(r=this.defaultRequestOptions)||void 0===r||null===(r=r.urlParams)||void 0===r||r.forEach(((e,t)=>{s.set(t,e)})),null===n||void 0===n||n.forEach(((e,t)=>{s.set(t,e)})),"anonymousPublicAccess"in this.containerConfig?s.set("publicAccessAuthToken",this.containerConfig.anonymousPublicAccess.token):s.set("dsid",this.containerConfig.dsid);const c=null===s||void 0===s?void 0:s.toString(),u=c.length?"?"+c:"";return J.buildCloudKitURL({host:i,containerID:o,environment:a,dbScope:e,path:t,paramsString:u})}lookupRecords(e,t,n){return this._performStandardRequest("/records/lookup",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"records")}queryRecords(e,t,n){return this._performStandardRequest("/records/query",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"records")}batchQueryRecords(e,t,n){return this._performBatchRequest("/internal/records/query/batch?parallel=true",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"records")}startCopyRecords(e,t,n){const r=this._buildAndSendRequest("/records/copy/start",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t);return r.ok?J._handleRequestFailures(r.value):Promise.resolve(r)}statusCopyRecords(e,t,n){const r=this._buildAndSendRequest("/records/copy/status",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t);return r.ok?J._handleRequestFailures(r.value):Promise.resolve(r)}prepareZipRecords(e,t,n){const r=this._buildAndSendRequest("/records/zip/prepare",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t);return r.ok?J._handleRequestFailures(r.value):Promise.resolve(r)}modifyRecords(e,t,n){return this._performStandardRequest("/records/modify",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"records")}listZones(e,t){return this._performStandardRequest("/zones/list",e,"GET",null===t||void 0===t?void 0:t.requestInit,null===t||void 0===t?void 0:t.urlParams,void 0,"zones")}modifyZones(e,t,n){return this._performStandardRequest("/zones/modify",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"zones")}databaseChanges(e,t,n){return this._performStandardRequest("/changes/database",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"zones")}zoneChanges(e,t,n){const r=this._buildAndSendRequest("/changes/zone",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t);return r.ok?J._handleRequestFailures(r.value):Promise.resolve(r)}uploadAssets(e,t,n){return this._performStandardRequest("/assets/upload",e,"POST",null===n||void 0===n?void 0:n.requestInit,null===n||void 0===n?void 0:n.urlParams,t,"tokens")}acceptRecords(e,t){const n=Y.Public;return this._performStandardRequest("/records/accept",n,"POST",null===t||void 0===t?void 0:t.requestInit,null===t||void 0===t?void 0:t.urlParams,e,"results")}resolveRecords(e,t){const n=Y.Public;return this._performStandardRequest("/records/resolve",n,"POST",null===t||void 0===t?void 0:t.requestInit,null===t||void 0===t?void 0:t.urlParams,e,"results")}_buildAndSendRequest(e,t,n,r,i,o){var a;const s=this.buildCKURL(t,e,i),c={...(null===(a=this.defaultRequestOptions)||void 0===a?void 0:a.requestInit)||{},...r,method:n};if(o&&"GET"!==n)try{c.body=JSON.stringify(o)}catch(u){return d.Result.failure({errorCode:"InvalidPayload",message:"Failed to JSON stringify payload: "+u,webService:"ckdatabasews"})}return d.Result.success(this.fetchFn(s,c))}_performStandardRequest(e,t,n,r,i,o,a){const s=this._buildAndSendRequest(e,t,n,r,i,o);return s.ok?J._handleRequestFailures(s.value).then((e=>e.ok?J._parseArrayRequestResult(e.value,a):e)):Promise.resolve(s)}_performBatchRequest(e,t,n,r,i,o,a){const s=this._buildAndSendRequest(e,t,n,r,i,o);return s.ok?J._handleRequestFailures(s.value).then((e=>e.ok?J._parseBatchArrayRequestResult(e.value,a):e)):Promise.resolve(s)}static _handleRequestFailures(e,t){const n=t||"ckdatabasews";return e.catch((e=>{throw{errorCode:"FetchRejected",message:(null===e||void 0===e?void 0:e.message)||e,webService:n}})).then((e=>{const{status:t,headers:r}=e;if(503===t)throw{errorCode:"ServiceUnavailable",message:e.statusText,response:e,webService:n};return e.json().then((i=>{if(t<200||t>=300){if(s(i)){const e={errorCode:"CloudKitServerError",error:new a(i),message:`Non-200 response (${t}) with CloudKit server error: `+i.serverErrorCode||i.extensionErrorCode,webService:n};return d.Result.failure(e)}const r={errorCode:"StatusNotOK",message:"Non-200 response: "+t,response:e,body:i,webService:n};return d.Result.failure(r)}return d.Result.success({body:i,headers:r,status:t,response:e})})).catch((r=>{if(t<200||t>=300){const r={errorCode:"StatusNotOK",message:"Non-200 response: "+t,response:e,webService:n};return d.Result.failure(r)}throw{errorCode:"JSONParseFailed",message:null===r||void 0===r?void 0:r.message,response:e,webService:n}}))})).catch((e=>function(e){return"errorCode"in e}(e)?d.Result.failure(e):d.Result.failure({errorCode:"UnknownCloudKitContainerError",error:e,message:(null===e||void 0===e?void 0:e.message)||"Unknown error in CloudKitContainer response",webService:n})))}static _parseArrayRequestResult(e,t){const{body:n,status:r,headers:i,response:o}=e,a=null===n||void 0===n?void 0:n[t];if(!Array.isArray(a))return d.Result.failure({errorCode:"ResponseNotArray",message:"Expected array in JSON for field: "+t,response:o,webService:"ckdatabasews"});const{parsedItems:s,errors:c}=X(a);return d.Result.success({status:r,body:n,headers:i,items:s,errors:c.length?c:void 0})}static _parseBatchArrayRequestResult(e,t){const{body:n,status:r,headers:i,response:o}=e,s=null===n||void 0===n?void 0:n.batch;if(!Array.isArray(s))return d.Result.failure({errorCode:"ResponseNotArray",message:"Expected array in JSON for field: batch",response:o,webService:"ckdatabasews"});const{parsedItems:c,errors:u}=X(s),l=c.map((e=>{return e.isError?e:Array.isArray(e.item[t])?{item:null===(n=X(e.item[t]))||void 0===n?void 0:n.parsedItems,isError:!1}:{isError:!0,error:new a({message:`Missing ${t} array`})};var n}));return d.Result.success({status:r,body:n,headers:i,batches:l,errors:u.length?u:void 0})}}function X(e){const t=[];return{parsedItems:e.map((e=>{if(!o((n=e).serverErrorCode)||!o(n.extensionErrorCode)){const n=new a(e);return t.push(n),{isError:!0,error:n}}var n;return{isError:!1,item:e}})),errors:t}}function ee(e){return e.endsWith("/")&&(e=e.substring(0,e.length-1)),e}class te{constructor(){this.cloudKitContainer=void 0,this.fetchFn=void 0,this._urlForServiceName=void 0,this.ckFetch=(e,t)=>{const n=this.fetchFn||fetch;return Z.logCloudKitRequest(n,e,t)}}static get instance(){return this._instance||(this._instance=new te)}get dsid(){var e;const t=null===(e=this.cloudKitContainer)||void 0===e?void 0:e.containerConfig;if(t&&"dsid"in t)return t.dsid}get anonymousPublicAccess(){var e;let t=null===(e=this.cloudKitContainer)||void 0===e?void 0:e.containerConfig;if(t&&!("dsid"in t))return t.anonymousPublicAccess}set anonymousPublicAccess(e){var t;let n=null===(t=this.cloudKitContainer)||void 0===t?void 0:t.containerConfig;n&&void 0!==e&&!("dsid"in n)&&(n.anonymousPublicAccess=e)}urlForServiceName(e,t){if(this._urlForServiceName)try{return this._urlForServiceName(e,t)}catch(n){}}configureCK(e){this.fetchFn=e.fetch,this._urlForServiceName=e.urlForServiceName;let t=this.urlForServiceName("ckdatabasews");return t?(this.cloudKitContainer=new J({containerIdentifier:Q,apnsEnvironment:"production",environment:"production",..."dsid"in e?{dsid:e.dsid,privateDatabaseHost:t,publicDatabaseHost:t,sharedDatabaseHost:t}:{anonymousPublicAccess:e.anonymousPublicAccess}},this.ckFetch,{urlParams:new URLSearchParams({remapEnums:"true",getCurrentSyncToken:"true"}),requestInit:{credentials:"include"}}),d.Result.success()):d.Result.failure(new u({errorCode:"NoPartitionForCKDatabaseWS",message:"Failed to get partition from urlForServiceName in initCK"}))}urlForCKShareService(){const{cloudKitContainer:e}=this;return`https://ckshare.icloud.com/ws/v1/${null===e||void 0===e?void 0:e.containerConfig.containerIdentifier}/${null===e||void 0===e?void 0:e.containerConfig.environment}/`}urlForQuotaService(){if(this.urlForServiceName)return this.urlForServiceName("account","setup/ws/1/storageUsageInfo")}}te._instance=void 0;let ne=window.fetch;const re="sharedstreams",ie={getAlbums:"webgetalbumslist",getPendingAlbums:"webgetpendingalbums",getAlbum:"webgetalbumview",getPublicAlbumContents:"webstream",getPublicAlbumAssetURLs:"webasseturls",getComments:"getcomments",getChanges:"getchanges",albumSummary:"albumsummary",createAlbum:"createalbum",deleteAlbum:"deletealbum",updateAlbum:"updatealbum",unsubscribe:"unsubscribe",subscribe:"subscribe",deleteComment:"deletecomment",setAlbumPublic:"setalbumpublic",addComment:"addcomment",share:"share",unshare:"unshare",getAssets:"webgetassets",deleteAssets:"deleteassets",getCount:"webgetassetcount",putAsset:"webputasset",getUploadURL:"webgetuploadurl",getUploadStatus:"webuploadstatus",reportSpam:"reportspam",sharingInfo:"webgetsharinginfos",keyAsset:"webgetkeyasset",publicURL:"publicurl"};function oe(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var ae,se;!function(e){e[e.ReportOnce=0]="ReportOnce",e[e.ReportAll=1]="ReportAll",e[e.ReportSum=2]="ReportSum"}(ae||(ae={})),ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportSum,ae.ReportSum,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportOnce,ae.ReportOnce,ae.ReportOnce,ae.ReportOnce,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportSum,ae.ReportSum,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportOnce,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,ae.ReportAll,new Set(["waterfall","orientationTestFinished","orientationTestFailed","appDidStart","oneUpLaunchSuccess"]),function(e){e.Upload="Upload",e.WebService="WebService",e.StartupFail="StartupFail",e.InvalidIndex="InvalidIndex",e.CanvasDrawImageError="CanvasDrawImageError",e.SystemAlbumAction="SystemAlbumAction"}(se||(se={}));class ce{static get instance(){return this._instance||(this._instance=new ce)}setParentSessionID(e){this.parentSessionID=e}setBundleID(e){this.bundleID=e}constructor(){this.externalFeedbackService=void 0,this._reportDidBecomeInteractive=void 0,this.eventsToReport=null,this.feedbackEventsWithTimestamp=void 0,this.reportedState=new Map,this.eventSumCount=new Map,this.eventSumFlushTime=1e4,this.doNotReportStat=!0,this.queue=[],this.getLibrary=void 0,this.getPageType=void 0,this.getIsLiteAccount=void 0,this.didFireInteractiveEvent=!1,this.parent=void 0,this.parentSessionID=void 0,this.bundleID=void 0,this.report=this.report.bind(this)}initialize(e){this.externalFeedbackService=e.externalFeedbackService,this._reportDidBecomeInteractive=e.reportDidBecomeInteractive,this.eventsToReport=e.eventsToReport,this.doNotReportStat=e.doNotReportStat||!1,this.feedbackEventsWithTimestamp=e.feedbackEventsWithTimestamp,this.parent=e.parent,this.queue.forEach((e=>this[e[0]].apply(this,e[1]))),this.queue.length=0}reportDidBecomeInteractive(e){if(this.didFireInteractiveEvent||!this._reportDidBecomeInteractive)return;this.didFireInteractiveEvent=!0;const t=this.getPageType?this.getPageType():void 0;this._reportDidBecomeInteractive(t,e),this.reportWaterfall()}report(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=!(null===(n=this.feedbackEventsWithTimestamp)||void 0===n||!n.has(e)),a={...t,...this.parentSessionID?{parentSessionID:this.parentSessionID}:void 0,...this.bundleID?{bundleID:this.bundleID}:void 0};if(o&&(a.now=Math.floor(performance.now())),!this.eventsToReport)return void this.queue.push(["report",[e,a,r,i]]);if(this.doNotReportStat)return;if(!this.externalFeedbackService)return;if(i&&a&&void 0===a.duration)return;if(r)return void(i?this.externalFeedbackService.recordPerfStat(e,a):this.externalFeedbackService.recordStat(e,a));const s=this.eventsToReport[e];if(void 0!==s&&null!==s)if(s===ae.ReportOnce)this.reportedState.get(e)||(i?this.externalFeedbackService.recordPerfStat(e,this.appendApplicationContext(a)):this.externalFeedbackService.recordStat(e,this.appendApplicationContext(a)),this.reportedState.set(e,!0));else if(s===ae.ReportAll){const t="requestInfo"===e?a:this.appendApplicationContext(a);i?this.externalFeedbackService.recordPerfStat(e,t):this.externalFeedbackService.recordStat(e,t)}else s===ae.ReportSum&&(void 0!==this.eventSumCount.get(e)?this.eventSumCount.set(e,this.eventSumCount.get(e)+1):(this.eventSumCount.set(e,1),setInterval((()=>{var t;this.eventSumCount.get(e)>0&&(null===(t=this.externalFeedbackService)||void 0===t||t.recordStat(e,{count:this.eventSumCount.get(e)}),this.eventSumCount.set(e,0))}),this.eventSumFlushTime)))}setGetPageType(e){this.getPageType=e}setGetLibrary(e){this.getLibrary=e}setGetIsLiteAccount(e){this.getIsLiteAccount=e}reportWaterfall(){const e=Z.loggingData;Z.stop(),Z.clear(),this.eventsToReport&&"waterfall"in this.eventsToReport&&e.forEach((e=>{this.report("waterfall",{...e})}))}flush(){var e;null!==(e=this.externalFeedbackService)&&void 0!==e&&e.flush&&this.externalFeedbackService.flush()}appendApplicationContext(e){var t;const n=null===(t=this.getPageType)||void 0===t?void 0:t.call(this),r=n&&{pageType:n},i="ValueNotSet";return{currentLibrary:this.getLibrary&&this.getLibrary()||i,isLiteAccount:this.getIsLiteAccount?this.getIsLiteAccount():i,...r,...this.parent?{parent:this.parent}:{},...e}}}let ue,le;function de(){return void 0===ue&&(ue=window.location.hostname.endsWith(".cn")),ue}ce._instance=void 0;const pe="sharedstreams",fe=3;function he(e){return ge(e,1,e.disableRetry?1:fe)}const me=".com.cn";function ge(e,t,n){const{endpoint:r,payload:i,expectNonJSONResponse:o}=e;if(!le)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumEndpointURL",message:"Shared albums request requires setting endpoint URL"})));const a=te.instance.dsid;if(!a)return Promise.resolve(d.Result.failure(new u({errorCode:"InvalidSharedAlbumRequestArguments",message:"Shared albums request requires a DSID"})));let c,l;if(i)try{c=JSON.stringify(i)}catch(f){return Promise.resolve(d.Result.failure(new u({errorCode:"InvalidSharedAlbumRequestArguments",message:"Failed to stringify payload: "+f})))}l=e.useDSIDBaseURL?void 0:de()&&!e.locationURL.includes(me)?e.locationURL.replace(".com",me):e.locationURL;const p=e.useDSIDBaseURL?function(e,t){return`${le}/${e}/${re}/${t}`}(a,r):`${l}${r}`;return function(e,t,n){const r=ne(e,t);return J._handleRequestFailures(r,n).then((e=>e.ok?e:d.Result.failure(u.fromCloudKitContainerError(e.error))))}(p,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:c||"{}"},"sharedstreams").then((i=>{if(!i.ok&&o){const e=i.error.requestError;if(!s(e)&&null!==e&&void 0!==e&&e.response&&"JSONParseFailed"===(null===e||void 0===e?void 0:e.errorCode)){const t=e.response;return d.Result.success({response:t,status:t.status,headers:t.headers,body:void 0})}}return i.ok||ce.instance.report("sharedAlbumRequestFailed",{endpoint:r,errorCode:i.error.errorCode,isRetry:t>1,status:i.error.requestError&&"errorCode"in i.error.requestError&&"StatusNotOK"===i.error.requestError.errorCode?i.error.requestError.message:void 0}),!i.ok&&500===function(e){if(e.requestError&&"response"in e.requestError){const t=e.requestError.response;return null===t||void 0===t?void 0:t.status}}(i.error)&&t<n?ge(e,t+1,n):i}))}class ve{constructor(){this._cloudKitContainer=void 0,this.fetchFn=void 0,this.ckFetch=(e,t)=>{const n=this.fetchFn||fetch;return Z.logCloudKitRequest(n,e,t)}}static get instance(){return this._instance||(this._instance=new ve)}get cloudKitContainer(){return this._cloudKitContainer}configureCK(e){this.fetchFn=e.fetch;let t=e.urlForServiceName("ckdatabasews");return t?(this._cloudKitContainer=new J({containerIdentifier:"com.apple.icloud-photos.fdb",apnsEnvironment:"production",environment:"production",dsid:e.dsid,privateDatabaseHost:t,publicDatabaseHost:t,sharedDatabaseHost:t},this.ckFetch,{urlParams:new URLSearchParams({remapEnums:"true"}),requestInit:{credentials:"include"}}),d.Result.success()):d.Result.failure(new u({errorCode:"NoPartitionForCKDatabaseWS",message:"Failed to get partition from urlForServiceName in initCK"}))}}let ye,be,we,Se,Ce,_e,Oe,Ee,Ie;ve._instance=void 0,function(e){e.ConfigureNotCalled="ConfigureNotCalled",e.CloudKitInitializationFailed="CloudKitInitializationFailed",e.GetZonesFailed="GetZonesFailed",e.NoPrimarySyncZone="NoPrimarySyncZone",e.GetZoneStateFailed="GetZoneStateFailed",e.GetIndexingStateFailed="GetIndexingStateFailed",e.PrimarySyncZoneIndexing="PrimarySyncZoneIndexing",e.PrimarySyncZoneDisabled="PrimarySyncZoneDisabled"}(ye||(ye={})),function(e){e.GetIndexingStateFailed="GetIndexingStateFailed",e.SharedSyncZoneIndexing="SharedSyncZoneIndexing"}(be||(be={})),function(e){e.PrimarySyncDerivativeLoadFailed="PrimarySyncDerivativeLoadFailed",e.SharedSyncDerivativeLoadFailed="SharedSyncDerivativeLoadFailed",e.DerivativeLoadParsingFailed="DerivativeLoadParsingFailed",e.DerivativeLoadCloudKitError="DerivativeLoadCloudKitError",e.SharedLibraryNotAvailable="SharedLibraryNotAvailable",e.SharedAlbumDerivativeLoadFailed="SharedAlbumDerivativeLoadFailed",e.UserAlbumDerivativeLoadFailed="UserAlbumDerivativeLoadFailed",e.UserAlbumDerivativesSharedLibraryNotSupported="UserAlbumDerivativesSharedLibraryNotSupported"}(we||(we={})),function(e){e.HydrateAssetError="HydrateAssetError",e.HydrateSharedAlbumError="HydrateSharedAlbumError",e.UpdateAssetError="UpdateAssetError",e.NoDatabaseScope="NoDatabaseScope",e.UnsupportedAction="UnsupportedAction",e.SharedAlbumAssetDeleteNotAllowed="SharedAlbumAssetDeleteNotAllowed"}(Se||(Se={})),function(e){e.PrimarySyncLibraryCountsLoadFailed="PrimarySyncLibraryCountsLoadFailed",e.SharedSyncLibraryCountsLoadFailed="SharedSyncLibraryCountsLoadFailed",e.SharedSyncSmartAlbumCountsLoadFailed="SharedSyncSmartAlbumCountsLoadFailed",e.PrimarySyncSmartAlbumCountsLoadFailed="PrimarySyncSmartAlbumCountsLoadFailed",e.SharedLibraryNotAvailable="SharedLibraryNotAvailable",e.UserAlbumMissing="UserAlbumMissing",e.UserAlbumDeleted="UserAlbumDeleted",e.UserAlbumCountsLoadFailed="UserAlbumCountsLoadFailed",e.UserAlbumCountsSharedLibraryNotSupported="UserAlbumCountsSharedLibraryNotSupported",e.SharedAlbumCountsLoadFailed="SharedAlbumCountsLoadFailed"}(Ce||(Ce={})),function(e){e.MemoriesLoadFailed="MemoriesLoadFailed",e.MemoriesCountFailed="MemoriesCountFailed",e.MemoriesKeyAssetLoadFailed="MemoriesKeyAssetLoadFailed",e.MemoriesParsingFailed="MemoriesParsingFailed"}(_e||(_e={})),function(e){e.SharedAlbumsListLoadFailed="SharedAlbumsListLoadFailed",e.MyAlbumsListLoadFailed="MyAlbumsListLoadFailed",e.UserAlbumsListLoadFailed="UserAlbumsListLoadFailed"}(Oe||(Oe={})),function(e){e.LoadCKJSException="LoadCKJSException",e.ConfigureException="ConfigureException",e.GetDerivativeUrlsForTileException="GetDerivativeUrlsForTileException",e.GetLibraryCountsException="GetLibraryCountsException",e.NetworkFailure="NetworkFailure"}(Ee||(Ee={}));class Ae extends Error{constructor(e){let t=`[@icloudweb/photos-tile] [${e.errorCode}]`;if("message"in e)t+=` ${e.message}`;else if("photosError"in e){var n;t+=` ${null===(n=e.photosError)||void 0===n?void 0:n.message}`}super(t),this.errorCode=void 0,this.photosError=void 0,this.errorCode=e.errorCode,"photosError"in e&&(this.photosError=e.photosError)}}!function(e){e.tile_ckjsLoadFailed="tile_ckjsLoadFailed",e.tile_ckjsLoadSuccess="tile_ckjsLoadSuccess",e.tile_configureNotCalled="tile_configureNotCalled",e.tile_ckInitFailed="tile_ckInitFailed",e.tile_getZonesFailed="tile_getZonesFailed",e.tile_noPrimarySyncZone="tile_noPrimarySyncZone",e.tile_numberOfLibraries="tile_numberOfLibraries",e.tile_getZoneStateFailed="tile_getZoneStateFailed",e.tile_primarySyncZoneDisabled="tile_primarySyncZoneDisabled",e.tile_getLibraryCountsFailed="tile_getLibraryCountsFailed",e.tile_getLibraryCountsStartupFailed="tile_getLibraryCountsStartupFailed",e.tile_getDerivativeUrlsFailed="tile_getDerivativeUrlsFailed",e.tile_getDerivativeUrlsStartupFailed="tile_getDerivativeUrlsStartupFailed",e.tile_getMemoriesStartupFailed="tile_getMemoriesStartupFailed",e.tile_getMemoriesCountStartupFailed="tile_getMemoriesCountStartupFailed",e.tile_getMemoriesCountFailed="tile_getMemoriesCountFailed",e.tile_getMemoriesFailed="tile_getMemoriesFailed",e.tile_getMemoriesKeyAssetFailed="tile_getMemoriesKeyAssetFailed",e.tile_startupSuccess="tile_startupSuccess",e.tile_derivativeLoadSuccess="tile_derivativeLoadSuccess",e.tile_libraryCountLoadSuccess="tile_libraryCountLoadSuccess",e.tile_getCountsStartupFailed="tile_getCountsStartupFailed",e.tile_getSmartAlbumCountsFailed="tile_getSmartAlbumCountsFailed",e.tile_getSmartAlbumCountsSuccess="tile_getSmartAlbumCountsSuccess",e.tile_getCountsForTileSuccess="tile_getCountsForTileSuccess",e.tile_getSharedAlbumsStartupFailed="tile_getSharedAlbumsStartupFailed",e.tile_getSharedAlbumsListFailed="tile_getSharedAlbumsListFailed",e.tile_getSharedAlbumsListSuccess="tile_getSharedAlbumsListSuccess",e.tile_getMyAlbumsStartupFailed="tile_getMyAlbumsStartupFailed",e.tile_getMyAlbumsListFailed="tile_getMyAlbumsListFailed",e.tile_getMyAlbumsListSuccess="tile_getMyAlbumsListSuccess",e.tile_getUserAlbumsStartupFailed="tile_getUserAlbumsStartupFailed",e.tile_getUserAlbumsListFailed="tile_getUserAlbumsListFailed",e.tile_getUserAlbumsListSuccess="tile_getUserAlbumsListSuccess",e.tile_getUserAlbumsCountFailed="tile_getUserAlbumsCountFailed",e.tile_getUserAlbumsCountSuccess="tile_getUserAlbumsCountSuccess",e.tile_getSharedAlbumsCountFailed="tile_getSharedAlbumsCountFailed",e.tile_getSharedAlbumsCountSuccess="tile_getSharedAlbumsCountSuccess"}(Ie||(Ie={}));const Te={tile_ckjsLoadFailed:ae.ReportAll,tile_ckjsLoadSuccess:ae.ReportAll,tile_configureNotCalled:ae.ReportAll,tile_ckInitFailed:ae.ReportAll,tile_getZonesFailed:ae.ReportAll,tile_noPrimarySyncZone:ae.ReportAll,tile_numberOfLibraries:ae.ReportAll,tile_getZoneStateFailed:ae.ReportAll,tile_primarySyncZoneDisabled:ae.ReportAll,tile_getLibraryCountsFailed:ae.ReportAll,tile_getLibraryCountsStartupFailed:ae.ReportAll,tile_getDerivativeUrlsFailed:ae.ReportAll,tile_getDerivativeUrlsStartupFailed:ae.ReportAll,tile_getMemoriesStartupFailed:ae.ReportAll,tile_getMemoriesFailed:ae.ReportAll,tile_getMemoriesKeyAssetFailed:ae.ReportAll,tile_startupSuccess:ae.ReportAll,tile_derivativeLoadSuccess:ae.ReportAll,tile_libraryCountLoadSuccess:ae.ReportAll,tile_getCountsStartupFailed:ae.ReportAll,tile_getSmartAlbumCountsFailed:ae.ReportAll,tile_getCountsForTileSuccess:ae.ReportAll,tile_getSmartAlbumCountsSuccess:ae.ReportAll,tile_getSharedAlbumsStartupFailed:ae.ReportAll,tile_getSharedAlbumsListFailed:ae.ReportAll,tile_getSharedAlbumsListSuccess:ae.ReportAll,tile_getMyAlbumsStartupFailed:ae.ReportAll,tile_getMyAlbumsListFailed:ae.ReportAll,tile_getMyAlbumsListSuccess:ae.ReportAll,tile_getUserAlbumsStartupFailed:ae.ReportAll,tile_getUserAlbumsListFailed:ae.ReportAll,tile_getUserAlbumsListSuccess:ae.ReportAll,tile_getUserAlbumsCountFailed:ae.ReportAll,tile_getUserAlbumsCountSuccess:ae.ReportAll,tile_getSharedAlbumsCountFailed:ae.ReportAll,tile_getSharedAlbumsCountSuccess:ae.ReportAll,tile_getMemoriesCountStartupFailed:ae.ReportAll,tile_getMemoriesCountFailed:ae.ReportAll},Pe=new ce;function Re(e,t){try{Pe.report(e,t)}catch(n){}}function ke(e,t){Re(e,{errorMessage:t.message})}let De=!1;function Me(e){if(!De)try{De=!0;const{telemetry:t,fetch:n,urlForServiceName:r,user:i}=e;!function(e){Pe.initialize({externalFeedbackService:e,eventsToReport:Te,reportDidBecomeInteractive:()=>{}}),Pe.setGetPageType((()=>"tile"))}(t),function(e){try{const t=e(pe);t&&(le=oe(t))}catch{}}(r);const o={fetch:n,urlForServiceName:r,dsid:i.dsid};te.instance.configureCK(o),ve.instance.configureCK(o)}catch(t){const e=new Ae({errorCode:Ee.ConfigureException,message:`Unknown error in configure: ${null===t||void 0===t?void 0:t.message}`});ke(Ie.tile_ckjsLoadFailed,e)}}var Ne,xe,Le,je,Ue,Fe;function ze(e,t){return te.instance.cloudKitContainer?te.instance.cloudKitContainer.queryRecords(e,t):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performQueryRequest",webService:"ckdatabasews"}))}!function(e){e.Personal="Library.Personal",e.Shared="Library.Shared",e.Both="Library.Both"}(Ne||(Ne={})),function(e){e.EQUALS="EQUALS",e.IN="IN"}(xe||(xe={})),function(e){e.INT64="INT64",e.STRING="STRING",e.TIMESTAMP="TIMESTAMP",e.STRING_LIST="STRING_LIST"}(Le||(Le={})),function(e){e.INT64="NUMBER_INT64"}(je||(je={})),function(e){e.INT64="NUMBER_INT64",e.STRING="STRING",e.TIMESTAMP="TIMESTAMP",e.STRING_LIST="STRING_LIST"}(Ue||(Ue={})),function(e){e.Ascending="ASCENDING",e.Descending="DESCENDING"}(Fe||(Fe={}));const Be={indexJobId:C.z.string(),progress:C.z.number(),state:C.z.string(),countJobId:C.z.string()},Ke=R(w.CheckIndexingState,Be,{}),He=k(w.CheckIndexingState,Be,{}),We={photosCount:C.z.number(),previewData:C.z.object({fileChecksum:C.z.string(),size:C.z.number(),wrappingKey:C.z.string(),referenceChecksum:C.z.string(),downloadURL:C.z.string()}),expiryDate:C.z.number(),endDate:C.z.number(),videosCount:C.z.number(),assetCount:C.z.number(),startDate:C.z.number(),createDate:C.z.number()},qe={expiryDate:C.z.number()},Ve=C.z.object({shortGUID:C.z.string().optional()}).shape,$e=R(w.CMMRoot,We,qe).extend(Ve),Ge=k(w.CMMRoot,We,qe).extend(Ve),Ze=C.z.object({userRecordName:C.z.string(),nameComponents:C.z.object({givenName:C.z.string(),familyName:C.z.string()}).partial(),lookupInfo:C.z.object({emailAddress:C.z.string(),phoneNumber:C.z.string()}).partial()}),Qe=C.z.object({participantId:C.z.string(),userIdentity:Ze,type:C.z.string(),acceptanceStatus:C.z.string(),permission:C.z.string(),orgUser:C.z.boolean(),publicKeyVersion:C.z.number(),outOfNetworkPrivateKey:C.z.string(),outOfNetworkKeyType:C.z.number(),protectionInfo:C.z.object({bytes:C.z.string(),pcsChangeTag:C.z.string()})}),Ye=Qe.merge(C.z.object({userIdentity:Ze.partial(),acceptanceStatus:C.z.literal("INVITED")})),Je={"cloudkit.type":C.z.string(),"cloudkit.title":C.z.string()},Xe=C.z.object({owner:Qe,zoneID:_,shortGUID:C.z.string(),share:C.z.object({recordName:C.z.string(),zoneID:_}),publicPermission:C.z.string().optional(),participants:C.z.array(Qe.or(Ye)).optional(),currentUserParticipant:Qe.or(Ye).optional(),displayedHostname:C.z.string().optional()}),et=R(w.Share,Je,{}).merge(Xe),tt=k(w.Share,Je,{}).merge(Xe),nt={albumNameEnc:C.z.string(),albumType:C.z.number(),position:C.z.number(),sortType:C.z.number(),sortAscending:C.z.number(),parentId:C.z.string(),isDeleted:C.z.number(),userModificationDate:C.z.number()},rt=R(w.CPLAlbum,nt,{}),it=rt.merge(C.z.object({zoneID:_})),ot=k(w.CPLAlbum,{...nt,albumNameEnc_decoded:C.z.string()},{}).merge(C.z.object({zoneID:_})),at=C.z.object({fileChecksum:C.z.string(),size:C.z.number(),wrappingKey:C.z.string().nullable().optional(),referenceChecksum:C.z.string(),downloadURL:C.z.string()}),st=at.omit({downloadURL:!0}).merge(C.z.object({receipt:C.z.string()})),ct=(C.z.object({singleFile:st}),{resJPEGThumbHeight:C.z.number(),resJPEGThumbWidth:C.z.number(),resJPEGThumbFingerprint:C.z.string(),resJPEGThumbFileType:C.z.string(),resJPEGThumbRes:at}),ut={resJPEGMedHeight:C.z.number(),resJPEGMedWidth:C.z.number(),resJPEGMedFingerprint:C.z.string(),resJPEGMedFileType:C.z.string(),resJPEGMedRes:at},lt={resJPEGLargeHeight:C.z.number(),resJPEGLargeWidth:C.z.number(),resJPEGLargeFingerprint:C.z.string(),resJPEGLargeFileType:C.z.string(),resJPEGLargeRes:at},dt={resJPEGFullHeight:C.z.number(),resJPEGFullWidth:C.z.number(),resJPEGFullFingerprint:C.z.string(),resJPEGFullFileType:C.z.string(),resJPEGFullRes:at},pt={resOriginalHeight:C.z.number(),resOriginalWidth:C.z.number(),resOriginalFingerprint:C.z.string(),resOriginalFileType:C.z.string(),resOriginalRes:at},ft={resVidSmallHeight:C.z.number(),resVidSmallWidth:C.z.number(),resVidSmallFingerprint:C.z.string(),resVidSmallFileType:C.z.string(),resVidSmallRes:at},ht={resVidMedHeight:C.z.number(),resVidMedWidth:C.z.number(),resVidMedFingerprint:C.z.string(),resVidMedFileType:C.z.string(),resVidMedRes:at},mt={resVidHDRMedHeight:C.z.number(),resVidHDRMedWidth:C.z.number(),resVidHDRMedFingerprint:C.z.string(),resVidHDRMedFileType:C.z.string(),resVidHDRMedRes:at},gt={resVidFullHeight:C.z.number(),resVidFullWidth:C.z.number(),resVidFullFingerprint:C.z.string(),resVidFullFileType:C.z.string(),resVidFullRes:at},vt={resOriginalVidComplHeight:C.z.number(),resOriginalVidComplWidth:C.z.number(),resOriginalVidComplFingerprint:C.z.string(),resOriginalVidComplFileType:C.z.string(),resOriginalVidComplRes:at},yt={resOriginalAltHeight:C.z.number(),resOriginalAltWidth:C.z.number(),resOriginalAltFingerprint:C.z.string(),resOriginalAltFileType:C.z.string(),resOriginalAltRes:at},bt=(C.z.string(),C.z.string(),C.z.string(),C.z.string(),C.z.string(),"Original");var wt,St;!function(e){e.JPEGThumb="JPEGThumb",e.JPEGMed="JPEGMed",e.JPEGLarge="JPEGLarge",e.JPEGFull="JPEGFull"}(wt||(wt={})),function(e){e.ScaledOriginal="ScaledOriginal",e.ScaledJPEGThumb="ScaledJPEGThumb",e.ScaledJPEGFull="ScaledJPEGFull"}(St||(St={}));const Ct={[St.ScaledJPEGThumb]:wt.JPEGThumb,[St.ScaledJPEGFull]:wt.JPEGFull,[St.ScaledOriginal]:bt},_t=[wt.JPEGThumb,wt.JPEGMed,wt.JPEGLarge,wt.JPEGFull,bt];var Ot;!function(e){e.VidSmall="VidSmall",e.VidMed="VidMed",e.VidFull="VidFull"}(Ot||(Ot={}));const Et=[Ot.VidSmall,Ot.VidMed,Ot.VidFull,bt],It=[..._t,...Et],At=It.map((e=>`res${e}Fingerprint`)),Tt={masterRef:A,adjustmentRenderType:C.z.number(),duration:C.z.number(),durationEnc:C.z.number(),orientation:C.z.number(),customRenderedValue:C.z.number(),customRenderedValueEnc:C.z.number(),isDeleted:C.z.number(),isFavorite:C.z.number(),isHidden:C.z.number(),isExpunged:C.z.number(),isSparsePrivateRecord:C.z.number(),linkedShareRecordName:C.z.string(),linkedShareZoneName:C.z.string(),contributors:C.z.array(C.z.object({recordName:C.z.string()})),remappedRef:C.z.object({recordName:C.z.string().optional(),zoneID:_.optional()}),remappedBy:C.z.string(),remappedByAsset:C.z.string(),captionEnc:C.z.string(),extendedDescEnc:C.z.string(),dateExpunged:C.z.number(),locationEnc:C.z.string(),locationV2Enc:C.z.string(),adjustmentType:C.z.string(),assetDate:C.z.number(),assetDateEnc:C.z.number(),addedDate:C.z.number(),timeZoneOffset:C.z.number(),timeZoneOffsetEnc:C.z.number(),timeZoneNameEnc:C.z.string(),assetSubtype:C.z.number(),assetSubtypeV2:C.z.number(),assetHDRType:C.z.number(),vidComplDurScale:C.z.number(),vidComplDispScale:C.z.number(),vidComplDurValue:C.z.number(),vidComplDispValue:C.z.number(),vidComplVisibilityState:C.z.number(),videoFrameRate:C.z.number(),burstFlags:C.z.number(),burstFlagsExt:C.z.number(),burstId:C.z.string(),...ct,...ut,...lt,...dt,...ft,...ht,...mt,...gt,...mt,contributedBy:C.z.string(),batchCreateDate:C.z.number()},Pt={dynamic_resJPEGThumbResScaledTemplate:C.z.string(),dynamic_resJPEGFullResScaledTemplate:C.z.string(),dynamic_resOriginalResScaledTemplate:C.z.string(),dynamic_resVidComplResScaledTemplate:C.z.string(),dynamic_HLSPlaylistURL:C.z.string(),likedByCaller:C.z.number(),likeCount:C.z.number()},Rt=R(w.CPLAsset,Tt,Pt).merge(C.z.object({zoneID:_})),kt=R(w.CPLAsset,Tt,Pt),Dt=k(w.CPLAsset,{...Tt,locationEnc_decoded:C.z.string(),locationV2Enc_decoded:C.z.string(),captionEnc_decoded:C.z.string(),extendedDescEnc_decoded:C.z.string(),timeZoneNameEnc_decoded:C.z.string()},Pt).merge(C.z.object({zoneID:_}));var Mt,Nt,xt,Lt,jt;!function(e){e[e.None=0]="None",e[e.PhotoPanorama=1]="PhotoPanorama",e[e.PhotoSupportingVideo=2]="PhotoSupportingVideo",e[e.PhotoScreenshot=3]="PhotoScreenshot",e[e.PhotoSpatial=4]="PhotoSpatial",e[e.VideoSlomo=100]="VideoSlomo",e[e.VideoTimelapse=101]="VideoTimelapse",e[e.VideoScreenRecording=102]="VideoScreenRecording",e[e.VideoActionCam=103]="VideoActionCam",e[e.VideoSpatial=104]="VideoSpatial"}(Mt||(Mt={})),function(e){e[e.NOT_IN_BURST=0]="NOT_IN_BURST",e[e.UNKNOWN=1]="UNKNOWN",e[e.NOT_PICKED=2]="NOT_PICKED",e[e.AUTO_PICKED=4]="AUTO_PICKED",e[e.USER_FAVORITE=8]="USER_FAVORITE",e[e.STACK=16]="STACK",e[e.FIRST_PICKED=32]="FIRST_PICKED"}(Nt||(Nt={})),function(e){e[e.NotCustom=0]="NotCustom",e[e.Custom=1]="Custom",e[e.HDRImage=2]="HDRImage",e[e.HDRPlusEV0_HDRImage=3]="HDRPlusEV0_HDRImage",e[e.HDRPlusEV0_EV0Image=4]="HDRPlusEV0_EV0Image",e[e.PanoramaImage=6]="PanoramaImage",e[e.SDOFImage=7]="SDOFImage",e[e.SDOFPlusOriginal_SDOFImage=8]="SDOFPlusOriginal_SDOFImage",e[e.SDOFPlusOriginal_OriginalImage=9]="SDOFPlusOriginal_OriginalImage",e[e.PLAssetHDRTypeHDRGainMap=10]="PLAssetHDRTypeHDRGainMap"}(xt||(xt={})),function(e){e[e.UNDEFINED=0]="UNDEFINED",e[e.AUTOLOOP=1]="AUTOLOOP",e[e.PORTRAIT=2]="PORTRAIT",e[e.LONG_EXPOSURE=4]="LONG_EXPOSURE",e[e.MIRROR=8]="MIRROR"}(Lt||(Lt={})),function(e){e[e.NONE=0]="NONE",e[e.HDR=1]="HDR",e[e.HDREV0=2]="HDREV0",e[e.EV0=3]="EV0",e[e.UNKNOWN=4]="UNKNOWN"}(jt||(jt={}));const Ut={itemId:C.z.string(),position:C.z.number(),containerId:C.z.string()},Ft=R(w.CPLContainerRelation,Ut,{}),zt=k(w.CPLContainerRelation,Ut,{}),Bt={itemType:C.z.string(),itemTypeEnc:C.z.string(),dataClassType:C.z.number(),filenameEnc:C.z.string(),originalOrientation:C.z.number(),importedBy:C.z.number(),importedByDisplayNameEnc:C.z.string(),importedByBundleIdentifierEnc:C.z.string(),videoFrameRate:C.z.number(),videoFrameRateEnc:C.z.number(),originalCreationDate:C.z.number(),originalCreationDateEnc:C.z.number(),mediaMetaDataType:C.z.string(),mediaMetaDataEnc:C.z.string(),codec:C.z.string(),codecEnc:C.z.string(),...ct,...ut,...lt,...dt,...ft,...ht,...mt,...gt,...mt,...pt,...vt,...yt},Kt={dynamic_resOriginalResScaledTemplate:C.z.string(),dynamic_resJPEGThumbResScaledTemplate:C.z.string(),dynamic_resJPEGFullResScaledTemplate:C.z.string(),dynamic_resVidComplResScaledTemplate:C.z.string(),dynamic_HLSPlaylistURL:C.z.string()},Ht=R(w.CPLMaster,Bt,Kt),Wt=Ht.merge(C.z.object({zoneID:_})),qt=k(w.CPLMaster,{...Bt,itemTypeEnc_decoded:C.z.string(),filenameEnc_decoded:C.z.string(),mediaMetaDataEnc_decoded:C.z.string(),codecEnc_decoded:C.z.string(),importedByDisplayNameEnc_decoded:C.z.string(),importedByBundleIdentifierEnc_decoded:C.z.string()},Kt).merge(C.z.object({zoneID:_}));var Vt;!function(e){e.ProRes="ProRes",e.HEVC="HEVC",e.H264="H264"}(Vt||(Vt={}));const $t={itemCount:C.z.number()},Gt=R(w.IndexCountResult,$t,{}),Zt=k(w.IndexCountResult,$t,{}),Qt={enabled:C.z.number(),disabledTime:C.z.number(),deleteTime:C.z.number(),availabilityType:C.z.number()},Yt=R(w.CPLZoneState,Qt,{}),Jt=k(w.CPLZoneState,Qt,{}),Xt={count:C.z.number()},en=R(w.ItemCount,Xt,{}),tn=k(w.ItemCount,Xt,{});var nn;function rn(e){if(!e)return;const t=e.toLowerCase(),n=Object.values(nn);for(let r=0;r<n.length;r++)if(n[r].toLowerCase()===t)return n[r]}!function(e){e.None="None",e.Dreamy="Dreamy",e.Sentimental="Sentimental",e.Gentle="Gentle",e.Chill="Chill",e.Neutral="Neutral",e.Happy="Happy",e.Uplifting="Uplifting",e.Epic="Epic",e.Club="Club",e.Extreme="Extreme"}(nn||(nn={}));const on=C.z.object({seedSongIdentifiers:C.z.object({flexmusic:C.z.string().optional()}).optional(),resources:C.z.object({assets:C.z.array(C.z.object({colorGradeCategory:C.z.string().optional(),url:C.z.string().optional(),id:C.z.string().optional()})).optional()}).optional()}),an=C.z.object({title:C.z.string().optional(),startDate:C.z.number().optional(),endDate:C.z.number().optional()}),sn=C.z.array(an),cn=C.z.object({assetIdentifier:C.z.string(),assetFlag:C.z.object({isRepresentative:C.z.boolean().optional(),isCurated:C.z.boolean().optional(),isMovieCurated:C.z.boolean().optional(),isKeyAsset:C.z.boolean().optional(),isExtendedCurated:C.z.boolean().optional(),isUserCurated:C.z.boolean().optional(),isCustomUserAsset:C.z.boolean().optional()}).optional()}),un=C.z.array(cn),ln=C.z.object({storyRecipeData:on.optional(),storyTitleCategory:C.z.string().optional(),storyColorGradeCategory:C.z.string().optional(),memoryCategory:C.z.string().optional(),fallbackMood:C.z.nativeEnum(nn).optional(),chapterTitles:sn.optional()}),dn={assetListPredicate:C.z.string(),notificationState:C.z.number(),assetList:C.z.string(),title:C.z.string(),type:C.z.string(),playCount:C.z.number(),score:C.z.string(),shareCount:C.z.number(),recordModificationDate:C.z.number(),subtype:C.z.string(),graphVersion:C.z.number(),isUserCreated:C.z.number(),subtitle:C.z.string(),isRejected:C.z.number(),graphData:C.z.string(),movieData:C.z.string(),viewCount:C.z.number(),createDate:C.z.number(),isFavorite:C.z.number(),resCustomUserAssetList:C.z.object({downloadURL:C.z.string().optional()})},pn=R(w.CPLMemory,dn,{}).merge(C.z.object({zoneID:_})),fn=R(w.CPLMemory,dn,{}),hn=k(w.CPLMemory,{...dn,title_decoded:C.z.string(),subtitle_decoded:C.z.string(),keyAsset_decoded:C.z.string(),keyAsset_zoneID:_,assetList_decoded:un,graphData_decoded:ln},{}).merge(C.z.object({zoneID:_}));var mn=n(4);const gn=mn.Reader,vn=mn.Writer,yn=mn.util,bn=mn.roots.default||(mn.roots.default={}),wn=bn.CPLMemoryAssetList=(()=>{function e(e){if(this.asset=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.asset=yn.emptyArray,e.prototype.version=0,e.encode=function(e,t){if(t||(t=vn.create()),null!=e.asset&&e.asset.length)for(let n=0;n<e.asset.length;++n)bn.CPLMemoryAssetList.CPLMemoryAsset.encode(e.asset[n],t.uint32(10).fork()).ldelim();return null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(16).uint32(e.version),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof gn||(e=gn.create(e));let n=void 0===t?e.len:e.pos+t,r=new bn.CPLMemoryAssetList;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.asset&&r.asset.length||(r.asset=[]),r.asset.push(bn.CPLMemoryAssetList.CPLMemoryAsset.decode(e,e.uint32()));break;case 2:r.version=e.uint32();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof gn||(e=new gn(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.asset&&e.hasOwnProperty("asset")){if(!Array.isArray(e.asset))return"asset: array expected";for(let t=0;t<e.asset.length;++t){let n=bn.CPLMemoryAssetList.CPLMemoryAsset.verify(e.asset[t]);if(n)return"asset."+n}}return null!=e.version&&e.hasOwnProperty("version")&&!yn.isInteger(e.version)?"version: integer expected":null},e.fromObject=function(e){if(e instanceof bn.CPLMemoryAssetList)return e;let t=new bn.CPLMemoryAssetList;if(e.asset){if(!Array.isArray(e.asset))throw TypeError(".CPLMemoryAssetList.asset: array expected");t.asset=[];for(let n=0;n<e.asset.length;++n){if("object"!==typeof e.asset[n])throw TypeError(".CPLMemoryAssetList.asset: object expected");t.asset[n]=bn.CPLMemoryAssetList.CPLMemoryAsset.fromObject(e.asset[n])}}return null!=e.version&&(t.version=e.version>>>0),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.asset=[]),t.defaults&&(n.version=0),e.asset&&e.asset.length){n.asset=[];for(let r=0;r<e.asset.length;++r)n.asset[r]=bn.CPLMemoryAssetList.CPLMemoryAsset.toObject(e.asset[r],t)}return null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,mn.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CPLMemoryAssetList"},e.CPLMemoryAssetFlag=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.isRepresentative=!1,e.prototype.isCurated=!1,e.prototype.isMovieCurated=!1,e.prototype.isKeyAsset=!1,e.prototype.isExtendedCurated=!1,e.prototype.isUserCurated=!1,e.prototype.isCustomUserAsset=!1,e.prototype.isAdaptiveExplictlyAdded=!1,e.prototype.isAdaptiveExplictlyRemoved=!1,e.prototype.isAdaptiveKeyAssetPrivate=!1,e.prototype.isAdaptiveKeyAssetShared=!1,e.encode=function(e,t){return t||(t=vn.create()),null!=e.isRepresentative&&Object.hasOwnProperty.call(e,"isRepresentative")&&t.uint32(8).bool(e.isRepresentative),null!=e.isCurated&&Object.hasOwnProperty.call(e,"isCurated")&&t.uint32(16).bool(e.isCurated),null!=e.isMovieCurated&&Object.hasOwnProperty.call(e,"isMovieCurated")&&t.uint32(24).bool(e.isMovieCurated),null!=e.isKeyAsset&&Object.hasOwnProperty.call(e,"isKeyAsset")&&t.uint32(32).bool(e.isKeyAsset),null!=e.isExtendedCurated&&Object.hasOwnProperty.call(e,"isExtendedCurated")&&t.uint32(40).bool(e.isExtendedCurated),null!=e.isUserCurated&&Object.hasOwnProperty.call(e,"isUserCurated")&&t.uint32(48).bool(e.isUserCurated),null!=e.isCustomUserAsset&&Object.hasOwnProperty.call(e,"isCustomUserAsset")&&t.uint32(56).bool(e.isCustomUserAsset),null!=e.isAdaptiveExplictlyAdded&&Object.hasOwnProperty.call(e,"isAdaptiveExplictlyAdded")&&t.uint32(64).bool(e.isAdaptiveExplictlyAdded),null!=e.isAdaptiveExplictlyRemoved&&Object.hasOwnProperty.call(e,"isAdaptiveExplictlyRemoved")&&t.uint32(72).bool(e.isAdaptiveExplictlyRemoved),null!=e.isAdaptiveKeyAssetPrivate&&Object.hasOwnProperty.call(e,"isAdaptiveKeyAssetPrivate")&&t.uint32(80).bool(e.isAdaptiveKeyAssetPrivate),null!=e.isAdaptiveKeyAssetShared&&Object.hasOwnProperty.call(e,"isAdaptiveKeyAssetShared")&&t.uint32(88).bool(e.isAdaptiveKeyAssetShared),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof gn||(e=gn.create(e));let n=void 0===t?e.len:e.pos+t,r=new bn.CPLMemoryAssetList.CPLMemoryAssetFlag;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.isRepresentative=e.bool();break;case 2:r.isCurated=e.bool();break;case 3:r.isMovieCurated=e.bool();break;case 4:r.isKeyAsset=e.bool();break;case 5:r.isExtendedCurated=e.bool();break;case 6:r.isUserCurated=e.bool();break;case 7:r.isCustomUserAsset=e.bool();break;case 8:r.isAdaptiveExplictlyAdded=e.bool();break;case 9:r.isAdaptiveExplictlyRemoved=e.bool();break;case 10:r.isAdaptiveKeyAssetPrivate=e.bool();break;case 11:r.isAdaptiveKeyAssetShared=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof gn||(e=new gn(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==typeof e||null===e?"object expected":null!=e.isRepresentative&&e.hasOwnProperty("isRepresentative")&&"boolean"!==typeof e.isRepresentative?"isRepresentative: boolean expected":null!=e.isCurated&&e.hasOwnProperty("isCurated")&&"boolean"!==typeof e.isCurated?"isCurated: boolean expected":null!=e.isMovieCurated&&e.hasOwnProperty("isMovieCurated")&&"boolean"!==typeof e.isMovieCurated?"isMovieCurated: boolean expected":null!=e.isKeyAsset&&e.hasOwnProperty("isKeyAsset")&&"boolean"!==typeof e.isKeyAsset?"isKeyAsset: boolean expected":null!=e.isExtendedCurated&&e.hasOwnProperty("isExtendedCurated")&&"boolean"!==typeof e.isExtendedCurated?"isExtendedCurated: boolean expected":null!=e.isUserCurated&&e.hasOwnProperty("isUserCurated")&&"boolean"!==typeof e.isUserCurated?"isUserCurated: boolean expected":null!=e.isCustomUserAsset&&e.hasOwnProperty("isCustomUserAsset")&&"boolean"!==typeof e.isCustomUserAsset?"isCustomUserAsset: boolean expected":null!=e.isAdaptiveExplictlyAdded&&e.hasOwnProperty("isAdaptiveExplictlyAdded")&&"boolean"!==typeof e.isAdaptiveExplictlyAdded?"isAdaptiveExplictlyAdded: boolean expected":null!=e.isAdaptiveExplictlyRemoved&&e.hasOwnProperty("isAdaptiveExplictlyRemoved")&&"boolean"!==typeof e.isAdaptiveExplictlyRemoved?"isAdaptiveExplictlyRemoved: boolean expected":null!=e.isAdaptiveKeyAssetPrivate&&e.hasOwnProperty("isAdaptiveKeyAssetPrivate")&&"boolean"!==typeof e.isAdaptiveKeyAssetPrivate?"isAdaptiveKeyAssetPrivate: boolean expected":null!=e.isAdaptiveKeyAssetShared&&e.hasOwnProperty("isAdaptiveKeyAssetShared")&&"boolean"!==typeof e.isAdaptiveKeyAssetShared?"isAdaptiveKeyAssetShared: boolean expected":null},e.fromObject=function(e){if(e instanceof bn.CPLMemoryAssetList.CPLMemoryAssetFlag)return e;let t=new bn.CPLMemoryAssetList.CPLMemoryAssetFlag;return null!=e.isRepresentative&&(t.isRepresentative=Boolean(e.isRepresentative)),null!=e.isCurated&&(t.isCurated=Boolean(e.isCurated)),null!=e.isMovieCurated&&(t.isMovieCurated=Boolean(e.isMovieCurated)),null!=e.isKeyAsset&&(t.isKeyAsset=Boolean(e.isKeyAsset)),null!=e.isExtendedCurated&&(t.isExtendedCurated=Boolean(e.isExtendedCurated)),null!=e.isUserCurated&&(t.isUserCurated=Boolean(e.isUserCurated)),null!=e.isCustomUserAsset&&(t.isCustomUserAsset=Boolean(e.isCustomUserAsset)),null!=e.isAdaptiveExplictlyAdded&&(t.isAdaptiveExplictlyAdded=Boolean(e.isAdaptiveExplictlyAdded)),null!=e.isAdaptiveExplictlyRemoved&&(t.isAdaptiveExplictlyRemoved=Boolean(e.isAdaptiveExplictlyRemoved)),null!=e.isAdaptiveKeyAssetPrivate&&(t.isAdaptiveKeyAssetPrivate=Boolean(e.isAdaptiveKeyAssetPrivate)),null!=e.isAdaptiveKeyAssetShared&&(t.isAdaptiveKeyAssetShared=Boolean(e.isAdaptiveKeyAssetShared)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.isRepresentative=!1,n.isCurated=!1,n.isMovieCurated=!1,n.isKeyAsset=!1,n.isExtendedCurated=!1,n.isUserCurated=!1,n.isCustomUserAsset=!1,n.isAdaptiveExplictlyAdded=!1,n.isAdaptiveExplictlyRemoved=!1,n.isAdaptiveKeyAssetPrivate=!1,n.isAdaptiveKeyAssetShared=!1),null!=e.isRepresentative&&e.hasOwnProperty("isRepresentative")&&(n.isRepresentative=e.isRepresentative),null!=e.isCurated&&e.hasOwnProperty("isCurated")&&(n.isCurated=e.isCurated),null!=e.isMovieCurated&&e.hasOwnProperty("isMovieCurated")&&(n.isMovieCurated=e.isMovieCurated),null!=e.isKeyAsset&&e.hasOwnProperty("isKeyAsset")&&(n.isKeyAsset=e.isKeyAsset),null!=e.isExtendedCurated&&e.hasOwnProperty("isExtendedCurated")&&(n.isExtendedCurated=e.isExtendedCurated),null!=e.isUserCurated&&e.hasOwnProperty("isUserCurated")&&(n.isUserCurated=e.isUserCurated),null!=e.isCustomUserAsset&&e.hasOwnProperty("isCustomUserAsset")&&(n.isCustomUserAsset=e.isCustomUserAsset),null!=e.isAdaptiveExplictlyAdded&&e.hasOwnProperty("isAdaptiveExplictlyAdded")&&(n.isAdaptiveExplictlyAdded=e.isAdaptiveExplictlyAdded),null!=e.isAdaptiveExplictlyRemoved&&e.hasOwnProperty("isAdaptiveExplictlyRemoved")&&(n.isAdaptiveExplictlyRemoved=e.isAdaptiveExplictlyRemoved),null!=e.isAdaptiveKeyAssetPrivate&&e.hasOwnProperty("isAdaptiveKeyAssetPrivate")&&(n.isAdaptiveKeyAssetPrivate=e.isAdaptiveKeyAssetPrivate),null!=e.isAdaptiveKeyAssetShared&&e.hasOwnProperty("isAdaptiveKeyAssetShared")&&(n.isAdaptiveKeyAssetShared=e.isAdaptiveKeyAssetShared),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,mn.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CPLMemoryAssetList.CPLMemoryAssetFlag"},e}(),e.CPLMemoryAsset=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.assetIdentifier="",e.prototype.assetFlag=null,e.prototype.assetMovieData=yn.newBuffer([]),e.prototype.masterFingerprint="",e.encode=function(e,t){return t||(t=vn.create()),null!=e.assetIdentifier&&Object.hasOwnProperty.call(e,"assetIdentifier")&&t.uint32(10).string(e.assetIdentifier),null!=e.assetFlag&&Object.hasOwnProperty.call(e,"assetFlag")&&bn.CPLMemoryAssetList.CPLMemoryAssetFlag.encode(e.assetFlag,t.uint32(18).fork()).ldelim(),null!=e.assetMovieData&&Object.hasOwnProperty.call(e,"assetMovieData")&&t.uint32(26).bytes(e.assetMovieData),null!=e.masterFingerprint&&Object.hasOwnProperty.call(e,"masterFingerprint")&&t.uint32(34).string(e.masterFingerprint),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof gn||(e=gn.create(e));let n=void 0===t?e.len:e.pos+t,r=new bn.CPLMemoryAssetList.CPLMemoryAsset;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.assetIdentifier=e.string();break;case 2:r.assetFlag=bn.CPLMemoryAssetList.CPLMemoryAssetFlag.decode(e,e.uint32());break;case 3:r.assetMovieData=e.bytes();break;case 4:r.masterFingerprint=e.string();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof gn||(e=new gn(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.assetIdentifier&&e.hasOwnProperty("assetIdentifier")&&!yn.isString(e.assetIdentifier))return"assetIdentifier: string expected";if(null!=e.assetFlag&&e.hasOwnProperty("assetFlag")){let t=bn.CPLMemoryAssetList.CPLMemoryAssetFlag.verify(e.assetFlag);if(t)return"assetFlag."+t}return null!=e.assetMovieData&&e.hasOwnProperty("assetMovieData")&&!(e.assetMovieData&&"number"===typeof e.assetMovieData.length||yn.isString(e.assetMovieData))?"assetMovieData: buffer expected":null!=e.masterFingerprint&&e.hasOwnProperty("masterFingerprint")&&!yn.isString(e.masterFingerprint)?"masterFingerprint: string expected":null},e.fromObject=function(e){if(e instanceof bn.CPLMemoryAssetList.CPLMemoryAsset)return e;let t=new bn.CPLMemoryAssetList.CPLMemoryAsset;if(null!=e.assetIdentifier&&(t.assetIdentifier=String(e.assetIdentifier)),null!=e.assetFlag){if("object"!==typeof e.assetFlag)throw TypeError(".CPLMemoryAssetList.CPLMemoryAsset.assetFlag: object expected");t.assetFlag=bn.CPLMemoryAssetList.CPLMemoryAssetFlag.fromObject(e.assetFlag)}return null!=e.assetMovieData&&("string"===typeof e.assetMovieData?yn.base64.decode(e.assetMovieData,t.assetMovieData=yn.newBuffer(yn.base64.length(e.assetMovieData)),0):e.assetMovieData.length>=0&&(t.assetMovieData=e.assetMovieData)),null!=e.masterFingerprint&&(t.masterFingerprint=String(e.masterFingerprint)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.assetIdentifier="",n.assetFlag=null,t.bytes===String?n.assetMovieData="":(n.assetMovieData=[],t.bytes!==Array&&(n.assetMovieData=yn.newBuffer(n.assetMovieData))),n.masterFingerprint=""),null!=e.assetIdentifier&&e.hasOwnProperty("assetIdentifier")&&(n.assetIdentifier=e.assetIdentifier),null!=e.assetFlag&&e.hasOwnProperty("assetFlag")&&(n.assetFlag=bn.CPLMemoryAssetList.CPLMemoryAssetFlag.toObject(e.assetFlag,t)),null!=e.assetMovieData&&e.hasOwnProperty("assetMovieData")&&(n.assetMovieData=t.bytes===String?yn.base64.encode(e.assetMovieData,0,e.assetMovieData.length):t.bytes===Array?Array.prototype.slice.call(e.assetMovieData):e.assetMovieData),null!=e.masterFingerprint&&e.hasOwnProperty("masterFingerprint")&&(n.masterFingerprint=e.masterFingerprint),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,mn.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CPLMemoryAssetList.CPLMemoryAsset"},e}(),e})();var Sn,Cn;!function(e){e.GetIndexingState="GetIndexingState",e.Lookup="Lookup",e.Query="Query",e.DatabaseChanges="DatabaseChanges",e.Modify="Modify",e.ListZones="ListZones",e.ZoneChanges="ZoneChanges",e.ZoneSave="ZoneSave",e.Delete="Delete",e.CreateAssetCopierJob="CreateAssetCopierJob",e.GetAssetCopierJob="CreateAssetCopierJob",e.BatchQuery="BatchQuery"}(Sn||(Sn={})),function(e){e.FederatedQuery="FederatedQuery",e.FederateLookup="FederatedLookup"}(Cn||(Cn={})),Error;class _n extends Error{constructor(e,t){const n=c.ParseJsonError.from(t,e);super(`BadResponseError: ${n.message}`),this.type=void 0,this.zodError=void 0,this.parseJsonError=void 0,this.parseJsonError=n,this.type=e,this.zodError=t}}var On=n(5),En=n(6);const In=new WeakMap,An={NSDictionary(e,t){const n=t["NS.keys"],r=t["NS.objects"];let i={};for(let o=0;o<n.length;o++){const t=n[o],a=r[o],s=Tn(e,t),c=Tn(e,a);if("string"!==typeof s)return{};i[s]=c}return i},NSArray:(e,t)=>t["NS.objects"].map((t=>Tn(e,t))),NSString:(e,t)=>t["NS.string"],NSDate:(e,t)=>parseInt(t["NS.time"]),NSData:(e,t)=>t["NS.data"]};function Tn(e,t){const{$objects:n}=e,r=n[t];if(!(i=r)||"object"!==typeof i||i.constructor!==Object)return r;var i;const o=function(e,t){const n=t.$class;if(!n)return"NS.objects"in t?An.NSArray:void 0;const{$objects:r}=e,i=r[n],o=In.get(i);if(o)return o;for(const a of i.$classes){const e=An[a];if(e)return In.set(i,e),e}}(e,r);return o?o(e,r):r}function Pn(e){const{graphData:t}=e.fields;if(!t)return d.Result.failure(new u({errorCode:"MissingCPLMemoryGraphData",message:"No CPLMemory graphData found"}));const n=function(e){try{const n=function(e){if(Object(On.loadByteStream)(e),!Object(On.isBPlist)(En.byteStream))return d.Result.failure("parseBplist error: not a bplist");const t=Object(On.parser)(En.byteStream);return t&&0!==t.length?d.Result.success(t):d.Result.failure("parseBplist error: failed to parse")}(e);if(!n.ok)return n;const r=n.value;return"NSKeyedArchiver"===(t=r).$archiver&&1e5===t.$version&&Reflect.has(t,"$top")&&Reflect.has(t,"$objects")?d.Result.success(function(e){return Tn(e,e.$top.root)}(r)):d.Result.failure("Not an NSKeyedArchive")}catch(n){return d.Result.failure("Exception unarchiving base64 string: "+n)}var t}(t);if(!n.ok)return ce.instance.report("memoryHydrationGraphDataParsingFailed"),d.Result.failure(new u({errorCode:"InvalidCPLMemoryGraphData",message:n.error}));const r=n.value;if(!r||"object"!==typeof r)return ce.instance.report("memoryHydrationGraphDataParsingFailed"),d.Result.failure(new u({errorCode:"InvalidCPLMemoryGraphData",message:"Unexpected CPLMemoryGraphData type: "+typeof r}));const i=r;let o,a,s,c,l,p;if("storyRecipeData"in i){const e=function(e){let t,n;try{t=new TextDecoder("utf-8").decode(e,{})}catch(i){return d.Result.failure(new u({errorCode:"InvalidCPLMemoryStoryRecipeData",message:"Failed to decode storyRecipeData"}))}try{n=JSON.parse(t)}catch(i){return d.Result.failure(new u({errorCode:"InvalidCPLMemoryStoryRecipeData",message:"Failed to parse JSON for storyRecipeData"}))}const r=on.safeParse(n);return r.success?d.Result.success(r.data):d.Result.failure(new u({errorCode:"InvalidCPLMemoryStoryRecipeData",message:new _n("decodeStoryRecipeError",r.error).message}))}(i.storyRecipeData);e.ok?o=e.value:ce.instance.report("memoryHydrationStoryRecipeDataParsingFailed")}else ce.instance.report("memoryHydrationMissingStoryRecipeData");if("info"in i&&i.info&&"object"===typeof i){const e=i.info,t=Rn(e.suggestedMood);if(t.length)a=t[0];else{const t=Rn(e.recommendedMoods);t.length&&(a=t[0])}}"storyColorGradeCategory"in i&&"string"===typeof i.storyColorGradeCategory&&(s=i.storyColorGradeCategory),"storyTitleCategory"in i&&"string"===typeof i.storyTitleCategory&&(c=i.storyTitleCategory),"graphMemoryIdentifier"in i&&"string"===typeof i.graphMemoryIdentifier&&(l=i.graphMemoryIdentifier.split("|")[0]),"chapterTitles"in i&&(p=function(e){const t=sn.safeParse(e);if(t.success)return t.data;ce.instance.report("memoryHydrationChapterTitleParsingFailed")}(i.chapterTitles));const f={storyRecipeData:o,storyColorGradeCategory:s,storyTitleCategory:c,memoryCategory:l,fallbackMood:a,chapterTitles:p};return d.Result.success(f)}function Rn(e){const t=[];if(!e||"string"!==typeof e)return t;const n=e.split(",");for(let i=0;i<n.length;i++){var r;const e=null===(r=n[i])||void 0===r?void 0:r.trim();if(e){const n=rn(e);n&&t.push(n)}}return t}var kn,Dn,Mn,Nn;function xn(e){return void 0!==e}!function(e){e.Reflective="reflective",e.Sentimental="sentimental",e.Nostalgic="nostalgic",e.Peaceful="peaceful",e.Playful="playful",e.Motivational="motivational",e.Epic="epic",e.Energetic="energetic",e.Extreme="extreme",e.Silly="silly",e.Romantic="romantic",e.Hopeful="hopeful",e.Inspirational="inspirational"}(kn||(kn={})),function(e){e.Baby="baby",e.LastMonthAtHome="lastmonthathome",e.DayInHistory="dayinhistory",e.BusinessLocation="businesslocation",e.EarlyMomentsWithPerson="earlymomentswithperson",e.PersonOverTime="personovertime",e.RegionLocation="regionlocation",e.AreaLocation="arealocation",e.ExcitingMoments="excitingmoments",e.Trends="trends",e.SocialGroup="socialgroup",e.PetOutdoor="petoutdoor",e.Person="person",e.LastSeason="lastseason",e.SingleMoment="singlemoment",e.ChildAndPerson="childandperson",e.MeaningfulEvent="meaningfulevent",e.Foodie="foodie",e.Season="season",e.RecentHighlights="recenthighlights",e.YearInReview="yearinreview",e.Pet="pet",e.ChildActivity="childactivity",e.SocialGroupOverTime="socialgroupovertime",e.CityLocation="citylocation",e.Trip="trip"}(Dn||(Dn={})),function(e){e.Sleek="sleek",e.Fun="fun",e.Delightful="delightful",e.Round="round",e.Hipster="hipster",e.Traditional="traditional"}(Mn||(Mn={})),function(e){e.RegularCustomZone="REGULAR_CUSTOM_ZONE",e.FakeSharedAlbumZone="FAKE_SHARED_ALBUM_ZONE"}(Nn||(Nn={}));const Ln="Exit-";var jn,Un;!function(e){function t(e){return o(e,"PrimarySync")}function n(e){return o(e,"SharedSync")}function r(e){return o(e,"SA-")}function i(e,t){return o(e.zoneID,t)}function o(e,t){return!!e.zoneName.startsWith(t)}function a(e,t){return e.ownerRecordName===t.ownerRecordName&&e.zoneName===t.zoneName&&e.zoneType===t.zoneType}e.isPrimarySyncZone=function(e){return t(e.zoneID)},e.isPrimarySyncZoneID=t,e.isSharedSyncZone=function(e){return n(e.zoneID)},e.isSharedSyncZoneID=n,e.isSharedAlbumZoneID=r,e.isExitSharedSyncZone=function(e){return i(e,Ln)},e.isCMMZone=function(e){return i(e,"CMM")},e.isCMMZoneID=function(e){return o(e,"CMM")},e.zoneHasPrefix=i,e.zoneIDHasPrefix=o,e.isZoneEqual=function(e,t){return a(e.zoneID,t.zoneID)},e.isZoneIDEqual=a,e.getUserRecordNameForExitZone=function(e){const t=e.zoneName;if(!t||!t.startsWith(Ln))return;const n=t.split("_");return n&&2===n.length?"_".concat(n[1]):void 0},e.createSharedAlbumFakeZoneFromGUID=function(e){return{zoneName:`SA-${e}`,ownerRecordName:"",zoneType:Nn.FakeSharedAlbumZone}},e.albumGUIDFromZoneID=function(e){if(r(e))return e.zoneName.slice(3)}}(jn||(jn={})),function(e){function t(e){return`${e.zoneType}_${e.ownerRecordName}_${e.zoneName}`}function n(e){return Array.from(e).sort(((e,t)=>e.zoneName.localeCompare(t.zoneName))).map(t).join("|")}function r(e){return`${t(e.zoneID)}_${e.recordName}`}function i(e){return`PublicSharedAlbumKey_${e.guid}`}function o(e){return`SharedAlbumKey_${e.guid}`}function a(t){return e.isItemListKey(t)&&"indexID"in t}function s(e){return"string"!==typeof e&&"isMemoryItemListKey"in e&&e.isMemoryItemListKey}function c(e){return!!e&&"string"!==typeof e&&"isAlbumItemListKey"in e&&e.isAlbumItemListKey}function u(e){return"string"!==typeof e&&"isFolderItemListKey"in e&&e.isFolderItemListKey}function l(e){return"string"!==typeof e&&"albumIndex"in e&&(e.albumIndex===y.CPLAlbumByPositionLive||e.albumIndex===y.CPLAlbumByUserModificationDate)}function d(e){return a(e)&&e.indexID.smartAlbum===m.Favorites}function p(e){return a(e)&&e.indexID.cplIndex===y.CPLAssetAndMasterHiddenByAssetDate}function f(e){return!!e&&"string"!==typeof e&&"isSharedAlbumKey"in e}function h(e){return!!e&&"string"!==typeof e&&"isPublicSharedAlbumKey"in e}function g(e){return!!e&&a(e)&&e.indexID.cplIndex===y.CPLAssetAndMasterDeletedByExpungedDate}function v(e){return a(e)&&"isAssetPickerGridKey"in e}function b(t){if(t)return"string"===typeof t?t:s(t)?r({recordName:t.recordName,zoneID:t.goldilocksZones[0]}):e.itemListKeyString(t)}function w(e){return!(!e||"string"===typeof e)}e.areGridKeysEqual=function(e,t){return!(!e||!t)&&b(e)===b(t)},e.areRecordKeysEqual=function(e,t){return!(!e||!t)&&r(e)===r(t)},e.areSharedAlbumKeysEqual=function(e,t){return!(!e||!t)&&e.guid===t.guid},e.zoneKeyString=t,e.zoneListKeyString=n,e.recordKeyString=r,e.sanitizedStringForItemListKey=function(e){return h(e)?"PublicSharedAlbum":f(e)?"SharedAlbum":v(e)?"AssetPickerGridKey":l(e)?"MyAlbums":u(e)?"Folder":c(e)?"Album":s(e)?"MemoryItemListKey":"indexID"in e?"cplIndex"in e.indexID?e.indexID.cplIndex:`${y.CPLAssetAndMasterInSmartAlbumByAssetDate}_${e.indexID.smartAlbum}`:"Other"},e.itemListKeyString=function(t){if(h(t))return i(t);if(f(t))return o(t);if(e.isAssetPickerGridKey(t))return"assetPickerGridKey";if(e.isMyAlbumsListKey(t))return"MyAlbums";if(e.isFolderItemListKey(t))return`FOLDER_${r(t)}`;const a=n(t.goldilocksZones);let c;return s(t)?c=r({recordName:t.recordName,zoneID:t.goldilocksZones[0]}):"indexID"in t?(c="cplIndex"in t.indexID?t.indexID.cplIndex:`${y.CPLAssetAndMasterInSmartAlbumByAssetDate}_${t.indexID.smartAlbum}`,c+=t.direction):c=r({recordName:t.recordName,zoneID:t.zoneID}),`${a}_${c}`},e.publicSharedAlbumKeyString=i,e.sharedAlbumKeyString=o,e.sharedAlbumCommentListKeyString=function(e){return`${e.albumGUID}_${e.assetGUID}`},e.isIndexListKey=a,e.isMemoriesListKey=function(t){return!!e.isItemListKey(t)&&("indexID"in t&&t.indexID.cplIndex===y.CPLMemoryIsFavoriteByCreateDate||"indexID"in t&&t.indexID.cplIndex===y.CPLMemoryNotIsRejectedByCreateDate)},e.isAllMemoriesListKey=function(e){return"string"!==typeof e&&"indexID"in e&&e.indexID.cplIndex===y.CPLMemoryNotIsRejectedByCreateDate},e.isFavoriteMemoriesListKey=function(e){return"string"!==typeof e&&"indexID"in e&&e.indexID.cplIndex===y.CPLMemoryIsFavoriteByCreateDate},e.isMemoryItemListKey=s,e.isAlbumItemListKey=c,e.isFolderItemListKey=u,e.isAlbumListKey=function(e){return l(e)||u(e)},e.isMyAlbumsListKey=l,e.isFavoritesListKey=d,e.isPanoramaListKey=function(e){return a(e)&&e.indexID.smartAlbum===m.Panoramas},e.isRecentsListKey=function(e){return a(e)&&e.indexID.cplIndex===y.CPLAssetAndMasterByAddedDate},e.isHiddenListKey=p,e.isSharedAlbumKey=f,e.isEmbeddedSharedAlbumKey=function(e){return!!e&&"string"!==typeof e&&"isEmbeddedSharedAlbumKey"in e},e.isPublicSharedAlbumKey=h,e.isSharedAlbumListKey=function(e){return"SharedAlbums"===e},e.isICloudLinksKey=function(e){return!!e&&"ICloudLinks"===e},e.isMediaTypeListKey=function(e){return a(e)&&!!e.indexID.smartAlbum&&!d(e)&&!g(e)&&!p(e)},e.isAssetListKey=function(t){return!!t&&e.isItemListKey(t)&&!e.isMemoriesListKey(t)&&(e.isIndexListKey(t)||e.isMemoryItemListKey(t)||e.isAlbumItemListKey(t)||e.isSharedAlbumKey(t)||e.isPublicSharedAlbumKey(t))},e.isNotRecentlyDeletedList=function(e){return!s(e)&&!l(e)&&!u(e)&&(c(e)||!g(e))},e.isRecentlyDeletedList=g,e.isAssetPickerGridKey=v,e.isCMMAssetListKey=function(e){return!!e&&a(e)&&jn.isCMMZoneID(e.goldilocksZones[0])},e.gridKeyString=b,e.isItemListKey=w,e.cmmListKeyForZoneID=function(e){return{goldilocksZones:[e],indexID:{cplIndex:y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted},direction:Fe.Descending}},e.keyForSmartAlbum=function(e,t){return{goldilocksZones:t,direction:Fe.Descending,indexID:{smartAlbum:e}}},e.isLibraryKey=function(e){return w(e)&&a(e)&&e.indexID.cplIndex===y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted&&e.goldilocksZones[0]&&!jn.isCMMZoneID(e.goldilocksZones[0])},e.isCKRecordKey=function(e){return"string"!==typeof e&&"zoneID"in e}}(Un||(Un={}));class Fn{constructor(e){this.map=void 0,this.listeners=void 0,this.maxSize=void 0,this.maxSize=e||Number.POSITIVE_INFINITY,this.map=new Map,this.listeners={}}_get(e){let t=this.map.get(e);return t&&(this.map.delete(e),this.map.set(e,t)),t}_set(e,t){const n=this._get(e);if(!n&&this.map.size>=this.maxSize){const[e]=this.map.entries().next().value;this._delete(e)}this.map.set(e,t),this._notifyListeners(e,n,this._get(e))}_has(e){return this.map.has(e)}_delete(e){const t=this.map.get(e);return this.map.delete(e),this._notifyListeners(e,t,void 0),t}clear(){const e=new Map(this.map);this.map.clear();const t=e.entries();for(const[n,r]of t)this._notifyListeners(n,r,void 0)}_keys(){return Array.from(this.map.keys())}_values(){return Array.from(this.map.values())}_addListener(e,t){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),()=>this._removeListener(e,t)}_removeListener(e,t){this.listeners[e]&&this.listeners[e].delete(t)}_notifyListeners(e,t,n,r){this.listeners[e]&&this.listeners[e].forEach((e=>{e({currentValue:n,previousValue:t,context:r})}))}}class zn extends Fn{constructor(){super(...arguments),this.keyMap={}}get(e){return this._get(this.getKeyString(e))}set(e,t){const n=this.getKeyString(e);return this.keyMap[n]=e,this._set(n,t)}has(e){return this._has(this.getKeyString(e))}delete(e){const t=this.getKeyString(e);return delete this.keyMap[t],this._delete(t)}clear(){super.clear(),this.keyMap={}}keys(){return this._keys().map((e=>this.keyMap[e]))}values(){return this._values()}addListener(e,t){return this._addListener(this.getKeyString(e),t)}removeListener(e,t){return this._removeListener(this.getKeyString(e),t)}}class Bn extends zn{get(e){return super.get(e)}set(e,t){return super.set(e,t)}has(e){return super.has(e)}delete(e){return super.delete(e)}keys(){return super.keys()}values(){return super.values()}}const Kn="primarySync",Hn="sharedSync",Wn="cmmZones";class qn extends Bn{getKeyString(e){return Un.zoneKeyString(e)}}class Vn extends Fn{constructor(){super(...arguments),this.zoneDatabases={},this._zoneShareStore=new qn(10),this._zoneAddedListeners=new Set}get zoneShareStore(){return this._zoneShareStore}get primarySyncZone(){return this._get(Kn)}get sharedSyncZone(){return this._get(Hn)}get cmmZones(){return this._get(Wn)}getDatabaseScopeForZoneID(e){return this.zoneDatabases[Un.zoneKeyString(e)]}getAllAvailableSyncZonesAndDatabaseScopes(){var e,t;const n=[null===(e=this.primarySyncZone)||void 0===e?void 0:e.zoneID,null===(t=this.sharedSyncZone)||void 0===t?void 0:t.zoneID].filter(xn),r=[];for(let i=0;i<n.length;i++){const e=n[i],t=this.getDatabaseScopeForZoneID(e);e&&t&&r.push({zoneID:e,databaseScope:t})}return r}getAllGoldilocksZones(){const{primarySyncZone:e,sharedSyncZone:t}=this;return e&&t?[e.zoneID,t.zoneID]:e?[e.zoneID]:t?[t.zoneID]:void 0}validateDatabaseScope(e){if(!e||"string"!==typeof e)return;const t=e.toLowerCase();return Object.values(Y).includes(t)?t:void 0}ingestZones(e,t){const n=[];for(const r of e)r.deleted?this.removeZone(r):n.push(r);this.addZones(n,t)}addZones(e,t){const n=this.cmmZones||[],r=[];for(const i of e){if(jn.isPrimarySyncZone(i))this.primarySyncZone&&jn.isZoneEqual(this.primarySyncZone,i)||(this._set(Kn,i),this.notifyZoneAddedListeners(i));else if(jn.isSharedSyncZone(i))this.sharedSyncZone&&(jn.isZoneEqual(this.sharedSyncZone,i)||jn.isExitSharedSyncZone(this.sharedSyncZone))||(this._set(Hn,i),this.notifyZoneAddedListeners(i));else if(jn.isExitSharedSyncZone(i)){if(this.sharedSyncZone&&jn.isZoneEqual(i,this.sharedSyncZone))continue;this._set(Hn,i),this.notifyZoneAddedListeners(i)}else if(jn.isCMMZone(i)){const e=n.find((e=>jn.isZoneEqual(e,i))),t=r.find((e=>jn.isZoneEqual(e,i)));e||t||r.push(i)}this.zoneDatabases[Un.zoneKeyString(i.zoneID)]=t}if(r.length>0){const e=[...n,...r];this._set(Wn,e),e.forEach((e=>this.notifyZoneAddedListeners(e)))}}removeZone(e){if(jn.isPrimarySyncZone(e))this._delete(Kn);else if(jn.isSharedSyncZone(e))this._delete(Hn);else if(this.cmmZones){const t=this.cmmZones.filter((t=>!jn.isZoneEqual(e,t)));this._set(Wn,t)}}setCMMZonesEmpty(){this._set(Wn,[])}addPrimarySyncZoneListener(e){return this._addListener(Kn,e)}removePrimarySyncZoneListener(e){this._removeListener(Kn,e)}addSharedSyncZoneListener(e){return this._addListener(Hn,e)}removeSharedSyncZoneListener(e){this._removeListener(Hn,e)}addCMMZonesListener(e){return this._addListener(Wn,e)}removeCMMZonesListener(e){this._removeListener(Wn,e)}notifyZoneAddedListeners(e){this._zoneAddedListeners.forEach((t=>t(e)))}addZoneAddedListener(e){this._zoneAddedListeners.add(e)}removeZoneAddedListener(e){this._zoneAddedListeners.delete(e)}}class $n extends Bn{constructor(){super(...arguments),this.inflightFieldsCache=new Map,this.cachedReturnObjects=new WeakMap}_get(e){const t=super._get(e);if(!t)return;const n=this.inflightFieldsCache.get(e);if(n&&n.length){let e=this.cachedReturnObjects.get(t);return e||(e={...t},this.combineItemWithInflightData(e,n),this.cachedReturnObjects.set(t,e)),e}return t}addInflightData(e,t){const n=this.getKeyString(e),r=this.get(e),i=super._get(n),o=f(),a={requestID:o,data:t},s=this.inflightFieldsCache.get(n)||[];return s.push(a),this.inflightFieldsCache.set(n,s),void 0!==i&&this.cachedReturnObjects.delete(i),this._notifyListeners(n,r,this.get(e)),o}removeInflightData(e,t){const n=this.getKeyString(e),r=this.get(e),i=super._get(n),o=this.inflightFieldsCache.get(n);if(o&&0!==o.length)for(let a=0;a<o.length;a++)if(o[a].requestID===t)return o.splice(a,1),void 0!==i&&this.cachedReturnObjects.delete(i),void this._notifyListeners(n,r,this.get(e))}_notifyListeners(e,t,n,r){t&&this.cachedReturnObjects.delete(t),super._notifyListeners(e,t,n,r)}}class Gn extends $n{combineItemWithInflightData(e,t){let n={};for(let r=0;r<t.length;r++){const e=t[r];n={...n,...e.data}}e.fields={...e.fields,...n}}getKeyString(e){return Un.recordKeyString(e)}set(e,t){const n=this.get(e);null!==n&&void 0!==n&&n.modified&&t.modified&&n.modified.timestamp>t.modified.timestamp||super.set(e,t)}}class Zn extends zn{constructor(){super(...arguments),this.outOfDateKeys=new Set}getListCount(e){var t;return null===(t=this.getListItems(e))||void 0===t?void 0:t.length}getListItems(e){return this.get(e)}initializeListItemsWithCount(e,t){this.outOfDateKeys.delete(this.getKeyString(e)),this.set(e,new Array(Math.max(0,t)))}initializeListItemsWithArray(e,t){this.outOfDateKeys.delete(this.getKeyString(e)),this.set(e,t)}removeList(e){this.outOfDateKeys.delete(this.getKeyString(e)),this.delete(e)}markListOutOfDate(e){if(!this.get(e))return;this.outOfDateKeys.add(this.getKeyString(e));const t=this.get(e);this._notifyListeners(this.getKeyString(e),t,t,{outOfDate:!0})}updateListItemsAtIndex(e,t,n){const r=this.get(e);if(!r)return;const i=[...r],o=new Set;let a=n;for(let s=0;s<t.length;s++)r[a]=t[s],o.add(a),a++;this._notifyListeners(this.getKeyString(e),i,this.get(e),{indicesUpdated:o})}clearListItemsInRanges(e,t){const n=this.get(e);if(!n)return;const r=new Set,i=[...n];for(const o of t){for(let e=o[0];e<=o[1]&&e<n.length;e++)void 0!==n[e]&&(n[e]=void 0,r.add(e));this._notifyListeners(this.getKeyString(e),i,this.get(e),{indicesUpdated:r})}}addListItemsAtIndex(e,t,n){const r=this.get(e);if(!r)return;const i=[...r];r.splice(n,0,...t),this._notifyListeners(this.getKeyString(e),i,r)}sortListItems(e,t){const n=this.get(e);if(!n)return;const r=[...n];n.sort(t),this._notifyListeners(this.getKeyString(e),r,n)}hasListItem(e,t){const n=this.get(e);return!!n&&n.findIndex((e=>e&&this.areItemsEqual(t,e)))>=0}findListItemIndex(e,t){const n=this.get(e);return n?n.findIndex((e=>void 0!==e&&this.areItemsEqual(t,e))):-1}removeListItems(e,t){const n=this.get(e);if(!n)return;const r=[...n];let i=!1;for(let o=0;o<t.length;o++){const e=t[o],r=n.findIndex((t=>t&&this.areItemsEqual(e,t)));r>=0&&(i=!0,n.splice(r,1))}i&&this._notifyListeners(this.getKeyString(e),r,n)}removeListItemsAtIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=this.get(e);if(!r)return;const i=[...r];r.splice(t,n),this._notifyListeners(this.getKeyString(e),i,r)}needsLoad(e){return this.outOfDateKeys.has(this.getKeyString(e))||void 0===this.getListItems(e)}}class Qn extends Zn{getKeyString(e){return Un.gridKeyString(e)}areItemsEqual(e,t){return Un.recordKeyString(e)===Un.recordKeyString(t)}initializeListItemsWithCount(e,t){t<0&&ce.instance.report("invalidListCount",{type:Un.sanitizedStringForItemListKey(e)}),super.initializeListItemsWithCount(e,t)}}class Yn extends Bn{getKeyString(e){return Un.zoneKeyString(e)}}class Jn extends zn{constructor(e){super(e),this.jobCreatedListeners=void 0,this.jobCreatedListeners=new Set}getKeyString(e){return e}jobPropertiesMatch(e,t,n,r){if(jn.isZoneIDEqual(e,r.sourceZoneID)&&jn.isZoneIDEqual(t,r.targetZoneID)){let e,t=!1;return"includeRecords"in r?e=r.includeRecords.some((e=>Un.areRecordKeysEqual(e,n))):t=!r.excludeRecords.some((e=>Un.areRecordKeysEqual(e,n))),e||t}return!1}addJob(e,t){super.set(e,t),this._notifyJobCreatedListeners(e,t)}updateJob(e,t){var n,r;const i=this.get(e);t===i||(null===i||void 0===i?void 0:i.jobStatus.status)===t.jobStatus.status&&(null===i||void 0===i?void 0:i.jobStatus.jobID)===(null===t||void 0===t?void 0:t.jobStatus.jobID)&&(null===i||void 0===i||null===(n=i.jobStatus)||void 0===n?void 0:n.itemsProcessed)===(null===t||void 0===t||null===(r=t.jobStatus)||void 0===r?void 0:r.itemsProcessed)||super.set(e,t)}getJob(e){return super.get(e)}addJobCreatedListener(e){this.jobCreatedListeners.add(e)}removeJobCreatedListener(e){this.jobCreatedListeners.delete(e)}_notifyJobCreatedListeners(e,t){this.jobCreatedListeners.forEach((n=>{n(e,t)}))}values(){return super.values()}}class Xn extends Bn{constructor(e){super(e),this.acceptedCMMs=void 0,this.acceptedCMMs=new Set}getKeyString(e){return Un.zoneKeyString(e)}hasAcceptedCMM(e){return this.acceptedCMMs.has(e)}addAcceptedCMM(e){this.acceptedCMMs.add(e)}delete(e){const t=this.get(e),n=null===t||void 0===t?void 0:t.cmmRoot.shortGUID;return n&&this.acceptedCMMs.delete(n),super.delete(e)}}class er extends Bn{getKeyString(e){return e}}class tr extends Bn{constructor(){super(...arguments),this._isHistogramOutOfDate=!1}set isHistogramOutOfDate(e){this._isHistogramOutOfDate=e}get isHistogramOutOfDate(){return this._isHistogramOutOfDate}getKeyString(e){return Un.zoneListKeyString(e)}set(e,t){return this._isHistogramOutOfDate=!1,super.set(e,t)}}var nr;let rr;!function(e){e.PhotosCleanUpCredit="Apple Photos Clean Up",e.PlaygroundCredit="Apple Image Playground"}(nr||(nr={}));class ir extends Bn{getKeyString(e){return Un.recordKeyString(e)}storeAiTypeIfNeeded(e,t){if(!t)return;const n=t.Credit;void 0!==n&&(function(e){return null!=e&&!!function(){return rr||(e=(t=nr,Object.entries(t)).map((e=>{let[t,n]=e;return[n,t]})),rr=Object.fromEntries(e));var e,t}()[e]}(n)?this.set(e,n):this.delete(e))}}const or=Number.POSITIVE_INFINITY,ar=1e4;class sr{static get instance(){return this._instance||(this._instance=new sr),this._instance}constructor(){this.zoneStore=void 0,this.assetStore=void 0,this.masterStore=void 0,this.albumStore=void 0,this.listStore=void 0,this.libraryInfoStore=void 0,this.jobStore=void 0,this.cmmInfoStore=void 0,this.memoriesStore=void 0,this.musicStore=void 0,this.histogramStore=void 0,this.aiTypeStore=void 0,this.zoneStore=new Vn,this.assetStore=new Gn(ar),this.masterStore=new Gn(ar),this.albumStore=new Gn,this.listStore=new Qn(or),this.libraryInfoStore=new Yn(200),this.jobStore=new Jn(200),this.cmmInfoStore=new Xn(1e3),this.memoriesStore=new Gn(1e3),this.musicStore=new er(100),this.histogramStore=new tr(100),this.aiTypeStore=new ir(ar)}setAssetsAndMasters(e){e.masters.forEach((e=>{e.zoneID&&this.masterStore.set({zoneID:e.zoneID,recordName:e.recordName},e)})),e.assets.forEach((e=>{e.zoneID&&this.assetStore.set({zoneID:e.zoneID,recordName:e.recordName},e)}))}getGoldilocksZonesAndDatabaseScopes(){var e,t;const n=[null===(e=this.zoneStore.primarySyncZone)||void 0===e?void 0:e.zoneID,null===(t=this.zoneStore.sharedSyncZone)||void 0===t?void 0:t.zoneID].filter(xn),r=[];for(let i=0;i<n.length;i++){const e=n[i],t=this.zoneStore.getDatabaseScopeForZoneID(e);e&&t&&r.push({zoneID:e,databaseScope:t})}return r}}var cr;sr._instance=void 0,function(e){function t(e){if(e&&e.fields.keyAsset_decoded&&e.fields.keyAsset_zoneID)return{recordName:e.fields.keyAsset_decoded,zoneID:e.fields.keyAsset_zoneID}}e.getColorGradeCategory=function(e){const t=e.storyColorGradeCategory;if(t&&(n=t,Object.values(kn).includes(n)))return t;var n},e.getKeyAssetRecordKey=t,e.getMemoryCategory=function(e){const t=e.memoryCategory;if(t){const e=t.toLowerCase();if(function(e){return Object.values(Dn).includes(e)}(e))return e}},e.getStoryTitleCategory=function(e){if(e){const n=e.storyTitleCategory;if(n&&(t=n,Object.values(Mn).includes(t)))return n}var t},e.decodeCPLMemory=function(e){if(e.fields.assetList){const n=pr.decodeFieldValue(e.fields.assetList);if(n.ok)try{const t=Uint8Array.from(n.value.split("").map((e=>e.charCodeAt(0)))),r=wn.decode(t).asset;if(r){const t=un.safeParse(r);if(t.success){e.fields.assetList_decoded=t.data;const n=t.data.find((e=>{var t;return null===(t=e.assetFlag)||void 0===t?void 0:t.isKeyAsset}));n?e.fields.keyAsset_decoded=n.assetIdentifier:ce.instance.report("memoryHydrationNoKeyAsset")}else ce.instance.report("memoryHydrationCKAssetParsingFailed")}}catch(t){ce.instance.report("memoryHydrationCKAssetParsingFailed")}}if(e.fields.subtitle){const t=pr.decodeFieldValue(e.fields.subtitle);e.fields.subtitle_decoded=t.ok?t.value:void 0}if(e.fields.title){const t=pr.decodeFieldValue(e.fields.title);e.fields.title_decoded=t.ok?t.value:void 0}if(e.fields.graphData){const t=Pn(e);t.ok&&(e.fields.graphData_decoded=t.value)}return e},e.ensureKeyAssetLocally=function(e){var n,r,i;const{memoriesStore:o,assetStore:a,zoneStore:s}=sr.instance,c=o.get(e),u=t(e);if(u)return d.Result.success(u);const l=e.fields.keyAsset_decoded;if(!l)return d.Result.failure({});if(c&&c!==e){const n=t(c);if(n&&n.recordName===l)return e.fields.keyAsset_zoneID=n.zoneID,d.Result.success(n)}const p=null===(n=s.primarySyncZone)||void 0===n?void 0:n.zoneID,f=null===(r=s.sharedSyncZone)||void 0===r?void 0:r.zoneID,h=null!==(i=p&&a.get({recordName:l,zoneID:p}))&&void 0!==i?i:f&&a.get({recordName:l,zoneID:f});if(h){const{zoneID:t}=h;return e.fields.keyAsset_zoneID=t,d.Result.success({recordName:l,zoneID:t})}return d.Result.failure({recordName:l})}}(cr||(cr={}));const ur={clientOrgKey:C.z.string()},lr=R(w.DBRMetadata,ur,{}),dr=k(w.DBRMetadata,ur,{});var pr,fr;function hr(e,t){return vr(e,t,pr.getQueryRecordSchemaForRecordType(t))}function mr(e,t,n){const r=gr(e,t,n);if(0===r.length)return d.Result.failure(new u({errorCode:"NoModels",message:`Expected 1 valid ${t} in result, got ${r.length}`}));if(1!==r.length)return d.Result.failure(new u({errorCode:"WrongNumberOfModels",message:`Expected 1 valid ${t} in result, got ${r.length}`}));const i=r[0];if(i.isOK)return d.Result.success(i.model);if("serverError"in i){const e=i.serverError;return d.Result.failure(new u({errorCode:"CloudKitServerError",requestError:e}))}if("schemaError"in i){const e=i.schemaError;return d.Result.failure(new u({errorCode:"SchemaParsingError",schemaParsingError:new l(t,e)}))}return d.Result.failure(new u({errorCode:"MissingModelData",message:"Missing schemaError from parse failure in parseSingleCKRecord"}))}function gr(e,t,n){return vr(e,t,pr.getRecordSchemaForRecordType(t),n)}function vr(e,t,n,r){const i=[];if(e)for(let o=0;o<e.length;o++){const a=e[o];if(a.isError)i.push({isOK:!1,serverError:a.error});else{const e=a.item,o=e.recordType;if(o&&t===o){let o;const a=n.safeParse(e);if(a.success){let e=a.data;r&&(e.zoneID?jn.isZoneIDEqual(r,e.zoneID)||ce.instance.report("zoneIDMismatch",{recordType:t,requestZonePrefix:U(r.zoneName),recordZonePrefix:U(e.zoneID.zoneName)}):e.zoneID=r),o={isOK:!0,model:pr.recordToModel(e)}}else ce.instance.report("schemaParseFailure",{recordType:t,errorMessage:c.ParseJsonError.from(a.error).message}),o={isOK:!1,rawData:e,schemaError:a.error};i.push(o)}}}return i}!function(e){function t(e){try{return d.Result.success(decodeURIComponent(escape(atob(e)||"")))}catch(t){try{return d.Result.success(atob(e))}catch(n){return d.Result.failure(n)}}}function n(e){switch(e){case w.CPLAlbum:return rt;case w.CPLAsset:return kt;case w.CPLMaster:return Ht;case w.CPLContainerRelation:return Ft;case w.CPLLibraryInfo:return N;case w.IndexCountResult:return Gt;case w.CheckIndexingState:return Ke;case w.CPLZoneState:return Yt;case w.CMMRoot:return $e;case w.Share:return et;case w.ItemCount:return en;case w.CPLMemory:return fn;case w.DBRMetadata:return lr}}e.isCPLAsset=function(e){return e.recordType===w.CPLAsset},e.isCPLMaster=function(e){return e.recordType===w.CPLMaster},e.isCPLAlbum=function(e){return e.recordType===w.CPLAlbum},e.isCPLContainerRelation=function(e){return e.recordType===w.CPLContainerRelation},e.isCPLMemory=function(e){return e.recordType===w.CPLMemory},e.isCKRecord=function(e){return"recordType"in e},e.getKey=function(e){if(!e)return;const t=e.recordName,n=e.zoneID;return t&&n?{recordName:t,zoneID:n}:void 0},e.recordToModel=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r={},i=["fields","pluginFields"];return Object.keys(e).forEach((o=>{if(function(e){return i.includes(e)}(o)){const i=e[o];if(i){const a={};Object.keys(i).forEach((r=>{const o=i[r];if(!o)return;let s=o.value;if(n&&"ENCRYPTED_BYTES"===o.type&&e.recordType!==w.CPLMemory){const e=t(s);s=e.ok?e.value:void 0,r+="_decoded"}a[r]=s})),r[o]=a}}else r[o]=e[o]})),e.recordType===w.CPLMemory&&cr.decodeCPLMemory(r),r},e.decodeFieldValue=t,e.encodeFieldValue=function(e){try{return d.Result.success(btoa(unescape(encodeURIComponent(e))))}catch(t){try{return d.Result.success(btoa(e))}catch(n){return d.Result.failure(n)}}},e.getRecordSchemaForRecordType=n,e.getQueryRecordSchemaForRecordType=function(e){switch(e){case w.CPLAlbum:return it;case w.CPLAsset:return Rt;case w.CPLMemory:return pn;case w.CPLMaster:return Wt;default:return n(e)}},e.getModelSchemaForRecordType=function(e){switch(e){case w.CPLAlbum:return ot;case w.CPLAsset:return Dt;case w.CPLMaster:return qt;case w.CPLContainerRelation:return zt;case w.CPLLibraryInfo:return x;case w.IndexCountResult:return Zt;case w.CheckIndexingState:return He;case w.CPLZoneState:return Jt;case w.CMMRoot:return Ge;case w.Share:return tt;case w.ItemCount:return tn;case w.CPLMemory:return hn;case w.DBRMetadata:return dr}}}(pr||(pr={})),function(e){e[e.AddedDate=0]="AddedDate",e[e.AssetDate=1]="AssetDate"}(fr||(fr={}));const yr={success:function(e,t){return{...d.Result.success(t),args:e}},failure:function(e,t){return{...d.Result.failure(t),args:e}}},br="federated-query",wr="federated-lookup",Sr="move";var Cr;!function(e){e.FederatedQuery="FederatedQuery",e.FederateLookup="FederatedLookup",e.Move="Move"}(Cr||(Cr={}));const _r={[br]:Cr.FederatedQuery,[wr]:Cr.FederateLookup,[Sr]:Cr.Move};function Or(e,t,n){return function(e,t,n,r){return t.requestedZoneIDs=n,function(e,t,n){const r=_r[t];try{const i=te.instance.dsid;if(!i)return Promise.resolve(d.Result.failure({message:`${r} request failed, missing DSID`,webService:"sharedlibrary",errorCode:"ServiceUnavailable"}));const o=te.instance.urlForServiceName("sharedlibrary");if(!o)return Promise.resolve(d.Result.failure({message:`${r} request failed`,webService:"sharedlibrary",errorCode:"ServiceUnavailable"}));const a=new URLSearchParams;a.set("dsid",i);const s=a.toString(),c=`${o}sharedlibrary/${t}${s.length?"?"+s:""}`,u=Z.logCloudKitRequest(te.instance.ckFetch,c,{method:"POST",headers:{"Content-Type":"text/plain"},credentials:"include",body:JSON.stringify(e)});return J._handleRequestFailures(u).then((e=>e.ok?J._parseArrayRequestResult(e.value,n):d.Result.failure({...e.error,message:`${e.error.message}: ${r} request failed}`,webservice:"sharedlibrary"})))}catch(i){return Promise.resolve(d.Result.failure({message:`${r} request failed before it went to the network`,errorCode:"InvalidPayload",webService:"sharedlibrary"}))}}({...e,...t},r,"records")}({query:e},t,n,"federated-query")}function Er(e,t,n){return e===Fe.Ascending?t:n-1-t}function Ir(e,t){if(!e.ok)return yr.failure(t,new u({errorCode:"NetworkRequestError",requestError:e.error,message:"Request error in getIndexItems"}));const n=hr(e.value.items,w.CPLMaster),r=hr(e.value.items,w.CPLAsset);return yr.success(t,{masterResponse:n,assetResponse:r})}function Ar(e,t,n,r,i,o,a){const s="goldilocksZones"in t;let c,u=Le.INT64;s?u=Ue.INT64:a&&(u=je.INT64);const l=[{fieldName:"direction",comparator:xe.EQUALS,fieldValue:{value:e.direction,type:s?Ue.STRING:Le.STRING}}];return"smartAlbum"in e.indexID?e.indexID.smartAlbum===m.Bursts?c="CPLBurstStackAssetAndMasterByAssetDate":(c=y.CPLAssetAndMasterInSmartAlbumByAssetDate,l.push({fieldName:"smartAlbum",comparator:xe.EQUALS,fieldValue:{value:e.indexID.smartAlbum,type:s?Ue.STRING:Le.STRING}})):c=e.indexID.cplIndex,void 0!==i&&void 0!==r&&l.push({fieldName:"startRank",comparator:xe.EQUALS,fieldValue:{value:Er(e.direction,i,r),type:u}}),{query:{recordType:c,filterBy:l},...{...s?{}:{zoneID:t.zoneID},resultsLimit:n,desiredKeys:o}}}var Tr;!function(e){e.CaMcgillMniBicMnc="ca.mcgill.mni.bic.mnc",e.ComAdobeFlashVideo="com.adobe.flash.video",e.ComAdobeIllustratorAiImage="com.adobe.illustrator.ai-image",e.ComAdobePdf="com.adobe.pdf",e.ComAdobePhotoshopImage="com.adobe.photoshop-image",e.ComAdobePhotoshopLargeImage="com.adobe.photoshop-large-image",e.ComAdobeRawImage="com.adobe.raw-image",e.ComAppleAvurlassetContent="com.apple.avurlasset-content",e.ComAppleCoreaudioFormat="com.apple.coreaudio-format",e.ComAppleDrawing="com.apple.drawing",e.ComAppleFinderPictclipping="com.apple.finder.pictclipping",e.ComAppleGaragebandProject="com.apple.garageband.project",e.ComAppleIcns="com.apple.icns",e.ComAppleM4aAudio="com.apple.m4a-audio",e.ComAppleM4vVideo="com.apple.m4v-video",e.ComAppleMacpaintImage="com.apple.macpaint-image",e.ComAppleMediaextensionContent="com.apple.mediaextension-content",e.ComAppleMpeg4Ringtone="com.apple.mpeg-4-ringtone",e.ComApplePict="com.apple.pict",e.ComAppleProtectedMpeg4Audio="com.apple.protected-mpeg-4-audio",e.ComAppleProtectedMpeg4AudioB="com.apple.protected-mpeg-4-audio-b",e.ComAppleProtectedMpeg4Video="com.apple.protected-mpeg-4-video",e.ComAppleQuicktimeAudio="com.apple.quicktime-audio",e.ComAppleQuicktimeImage="com.apple.quicktime-image",e.ComAppleQuicktimeMovie="com.apple.quicktime-movie",e.ComAudibleAaAudio="com.audible.aa-audio",e.ComAudibleAaAudiobook="com.audible.aa-audiobook",e.ComAudibleAaxAudiobook="com.audible.aax-audiobook",e.ComAvidOpenMediaFramework="com.avid.open-media-framework",e.ComCanonCr2RawImage="com.canon.cr2-raw-image",e.ComCanonCr3RawImage="com.canon.cr3-raw-image",e.ComCanonCrwRawImage="com.canon.crw-raw-image",e.ComCanonTifRawImage="com.canon.tif-raw-image",e.ComCompuserveGif="com.compuserve.gif",e.ComDigidesignSd2Audio="com.digidesign.sd2-audio",e.ComDxoRawImage="com.dxo.raw-image",e.ComEpsonRawImage="com.epson.raw-image",e.ComFujiRawImage="com.fuji.raw-image",e.ComGoogleWebp="com.google.webp",e.ComHasselblad3frRawImage="com.hasselblad.3fr-raw-image",e.ComHasselbladFffRawImage="com.hasselblad.fff-raw-image",e.ComIlmOpenexrImage="com.ilm.openexr-image",e.ComKodakFlashpixImage="com.kodak.flashpix-image",e.ComKodakRawImage="com.kodak.raw-image",e.ComKonicaminoltaRawImage="com.konicaminolta.raw-image",e.ComLeafamericaRawImage="com.leafamerica.raw-image",e.ComLeicaPwlRawImage="com.leica.pwl-raw-image",e.ComLeicaRawImage="com.leica.raw-image",e.ComLeicaRwlRawImage="com.leica.rwl-raw-image",e.ComMicrosoftAdvancedStreamRedirector="com.microsoft.advanced-stream-redirector",e.ComMicrosoftAdvancedSystemsFormat="com.microsoft.advanced-systems-format",e.ComMicrosoftBmp="com.microsoft.bmp",e.ComMicrosoftIco="com.microsoft.ico",e.ComMicrosoftWaveformAudio="com.microsoft.waveform-audio",e.ComMicrosoftWindowsMediaWax="com.microsoft.windows-media-wax",e.ComMicrosoftWindowsMediaWm="com.microsoft.windows-media-wm",e.ComMicrosoftWindowsMediaWma="com.microsoft.windows-media-wma",e.ComMicrosoftWindowsMediaWmp="com.microsoft.windows-media-wmp",e.ComMicrosoftWindowsMediaWmv="com.microsoft.windows-media-wmv",e.ComMicrosoftWindowsMediaWmx="com.microsoft.windows-media-wmx",e.ComMicrosoftWindowsMediaWvx="com.microsoft.windows-media-wvx",e.ComNikonNefxRawImage="com.nikon.nefx-raw-image",e.ComNikonNrwRawImage="com.nikon.nrw-raw-image",e.ComNikonRawImage="com.nikon.raw-image",e.ComOlympusOrRawImage="com.olympus.or-raw-image",e.ComOlympusRawImage="com.olympus.raw-image",e.ComOlympusSrRawImage="com.olympus.sr-raw-image",e.ComPanasonicRawImage="com.panasonic.raw-image",e.ComPanasonicRw2RawImage="com.panasonic.rw2-raw-image",e.ComPentaxRawImage="com.pentax.raw-image",e.ComPhaseoneRawImage="com.phaseone.raw-image",e.ComRealRealaudio="com.real.realaudio",e.ComRealRealmedia="com.real.realmedia",e.ComRealRealmediaVbr="com.real.realmedia-vbr",e.ComSamsungRawImage="com.samsung.raw-image",e.ComSgiSgiImage="com.sgi.sgi-image",e.ComSonyArwRawImage="com.sony.arw-raw-image",e.ComSonyAxrRawImage="com.sony.axr-raw-image",e.ComSonyRawImage="com.sony.raw-image",e.ComSonySr2RawImage="com.sony.sr2-raw-image",e.ComSonyWave64="com.sony.wave64",e.ComSoundblasterSoundfont="com.soundblaster.soundfont",e.ComTruevisionTgaImage="com.truevision.tga-image",e.Org3gppAdaptiveMultiRateAudio="org.3gpp.adaptive-multi-rate-audio",e.OrgKhronosColladaDigitalAssetExchange="org.khronos.collada.digital-asset-exchange",e.OrgNemaDicom="org.nema.dicom",e.OrgOasisOpenOpendocumentImage="org.oasis-open.opendocument.image",e.OrgOasisOpenOpendocumentImageTemplate="org.oasis-open.opendocument.image-template",e.OrgSmpteMxf="org.smpte.mxf",e.OrgWebmprojectWebm="org.webmproject.webm",e.OrgWebmprojectWebp="org.webmproject.webp",e.OrgXiphFlac="org.xiph.flac",e._3gpp="public.3gpp",e._3gpp2="public.3gpp2",e.AacAudio="public.aac-audio",e.Ac3Audio="public.ac3-audio",e.AifcAudio="public.aifc-audio",e.AiffAudio="public.aiff-audio",e.AuAudio="public.au-audio",e.Audio="public.audio",e.AudiovisualContent="public.audiovisual-content",e.Avci="public.avci",e.Avcs="public.avcs",e.Avi="public.avi",e.Avif="public.avif",e.CameraRawImage="public.camera-raw-image",e.CddaAudio="public.cdda-audio",e.Data="public.data",e.DownloadableSound="public.downloadable-sound",e.DvMovie="public.dv-movie",e.EnhancedAc3Audio="public.enhanced-ac3-audio",e.FlcAnimation="public.flc-animation",e.Heic="public.heic",e.Heics="public.heics",e.Heif="public.heif",e.HeifStandard="public.heif-standard",e.Heifs="public.heifs",e.Image="public.image",e.Item="public.item",e.Jpeg="public.jpeg",e.Jpeg2000="public.jpeg-2000",e.JpegXl="public.jpeg-xl",e.M3uPlaylist="public.m3u-playlist",e.MidiAudio="public.midi-audio",e.Movie="public.movie",e.Mp2="public.mp2",e.Mp3="public.mp3",e.Mp4aLatm="public.mp4a-latm",e.Mp4aLoas="public.mp4a-loas",e.Mpeg="public.mpeg",e.Mpeg2TransportStream="public.mpeg-2-transport-stream",e.Mpeg2Video="public.mpeg-2-video",e.Mpeg4="public.mpeg-4",e.Mpeg4Audio="public.mpeg-4-audio",e.MpoImage="public.mpo-image",e.Playlist="public.playlist",e.PlsPlaylist="public.pls-playlist",e.Png="public.png",e.SvgImage="public.svg-image",e.Tiff="public.tiff",e.UlawAudio="public.ulaw-audio",e.Video="public.video",e.VoiceAudio="public.voice-audio",e.XbitmapImage="public.xbitmap-image"}(Tr||(Tr={}));const Pr={[Tr.ComAdobePdf]:{conformsTo:[Tr.Data],mimeType:["application/pdf"],extension:["pdf"]},[Tr.ComCompuserveGif]:{conformsTo:[Tr.Image],mimeType:["image/gif"],extension:["gif"]},[Tr.ComMicrosoftBmp]:{conformsTo:[Tr.Image],mimeType:["image/bmp"],extension:["bmp","dib"]},[Tr.ComMicrosoftIco]:{conformsTo:[Tr.Image],mimeType:["image/vnd.microsoft.icon"],extension:["ico"]},[Tr.OrgWebmprojectWebp]:{conformsTo:[Tr.Image],mimeType:["image/webp"],extension:["webp"]},[Tr.OrgWebmprojectWebm]:{conformsTo:[Tr.Movie],mimeType:["video/webm","audio/webm"],extension:["webm"]},[Tr.OrgOasisOpenOpendocumentImage]:{conformsTo:[Tr.Image],mimeType:["application/vnd.oasis.opendocument.image"],extension:["odi"]},[Tr.OrgOasisOpenOpendocumentImageTemplate]:{conformsTo:[Tr.Image],mimeType:["application/vnd.oasis.opendocument.image-template"],extension:["oti"]},[Tr.ComAppleGaragebandProject]:{conformsTo:[Tr.AudiovisualContent],mimeType:[],extension:["band","gbProj"]},[Tr.ComAdobePhotoshopImage]:{conformsTo:[Tr.Image],mimeType:["image/vnd.adobe.photoshop","image/photoshop","image/x-photoshop","image/psd","application/photoshop"],extension:["psd"]},[Tr.ComAdobePhotoshopLargeImage]:{conformsTo:[Tr.Image],mimeType:[],extension:["psb"]},[Tr.ComAdobeIllustratorAiImage]:{conformsTo:[Tr.Image],mimeType:[],extension:["ai"]},[Tr.ComTruevisionTgaImage]:{conformsTo:[Tr.Image],mimeType:["image/targa","image/tga","application/tga"],extension:["tga"]},[Tr.ComSgiSgiImage]:{conformsTo:[Tr.Image],mimeType:["image/sgi"],extension:["sgi"]},[Tr.ComIlmOpenexrImage]:{conformsTo:[Tr.Image],mimeType:[],extension:["exr"]},[Tr.ComKodakFlashpixImage]:{conformsTo:[Tr.Image],mimeType:["image/fpx","application/vnd.fpx"],extension:["fpx"]},[Tr.HeifStandard]:{conformsTo:[Tr.Image],mimeType:[],extension:[]},[Tr.Heif]:{conformsTo:[Tr.HeifStandard],mimeType:["image/heif"],extension:["heif","hif"]},[Tr.Heic]:{conformsTo:[Tr.HeifStandard],mimeType:["image/heic"],extension:["heic"]},[Tr.Avci]:{conformsTo:[Tr.HeifStandard],mimeType:["image/avci"],extension:["avci"]},[Tr.Heifs]:{conformsTo:[Tr.HeifStandard],mimeType:["image/heif-sequence"],extension:["heifs"]},[Tr.Heics]:{conformsTo:[Tr.HeifStandard],mimeType:["image/heic-sequence"],extension:["heics"]},[Tr.Avcs]:{conformsTo:[Tr.HeifStandard],mimeType:["image/avcs"],extension:["avcs"]},[Tr.Avif]:{conformsTo:[Tr.HeifStandard],mimeType:["image/avif"],extension:["avif"]},[Tr.ComAppleDrawing]:{conformsTo:[Tr.Image],mimeType:[],extension:["drawing"]},[Tr.ComDigidesignSd2Audio]:{conformsTo:[Tr.Audio],mimeType:[],extension:["sd2"]},[Tr.ComMicrosoftWaveformAudio]:{conformsTo:[Tr.Audio],mimeType:["audio/vnd.wave","audio/wav","audio/wave","audio/x-wav"],extension:["wav","wave","bwf"]},[Tr.ComMicrosoftAdvancedSystemsFormat]:{conformsTo:[Tr.AudiovisualContent],mimeType:["video/x-ms-asf"],extension:["asf"]},[Tr.ComMicrosoftWindowsMediaWm]:{conformsTo:[Tr.Movie,Tr.ComMicrosoftAdvancedSystemsFormat],mimeType:["video/x-ms-wm"],extension:["wm"]},[Tr.ComMicrosoftWindowsMediaWmv]:{conformsTo:[Tr.Movie,Tr.ComMicrosoftAdvancedSystemsFormat],mimeType:["video/x-ms-wmv"],extension:["wmv"]},[Tr.ComMicrosoftWindowsMediaWmp]:{conformsTo:[Tr.Movie,Tr.ComMicrosoftAdvancedSystemsFormat],mimeType:["video/x-ms-wmp"],extension:["wmp"]},[Tr.ComMicrosoftWindowsMediaWma]:{conformsTo:[Tr.Audio,Tr.ComMicrosoftAdvancedSystemsFormat],mimeType:["video/x-ms-wma"],extension:["wma"]},[Tr.ComMicrosoftAdvancedStreamRedirector]:{conformsTo:[Tr.AudiovisualContent],mimeType:["video/x-ms-asx"],extension:["asx"]},[Tr.ComMicrosoftWindowsMediaWmx]:{conformsTo:[Tr.Movie,Tr.ComMicrosoftAdvancedStreamRedirector],mimeType:["video/x-ms-wmx"],extension:["wmx"]},[Tr.ComMicrosoftWindowsMediaWvx]:{conformsTo:[Tr.Movie,Tr.ComMicrosoftAdvancedStreamRedirector],mimeType:["video/x-ms-wvx"],extension:["wvx"]},[Tr.ComMicrosoftWindowsMediaWax]:{conformsTo:[Tr.Audio,Tr.ComMicrosoftAdvancedStreamRedirector],mimeType:["video/x-ms-wax"],extension:["wax"]},[Tr.ComRealRealmedia]:{conformsTo:[Tr.Movie],mimeType:["application/vnd.rn-realmedia"],extension:["rm"]},[Tr.ComRealRealmediaVbr]:{conformsTo:[Tr.Movie],mimeType:["application/vnd.rn-realmedia-vbr"],extension:["rmvb"]},[Tr.OrgSmpteMxf]:{conformsTo:[Tr.Movie],mimeType:["application/mxf"],extension:["mxf"]},[Tr.ComRealRealaudio]:{conformsTo:[Tr.Audio],mimeType:["audio/vnd.rn-realaudio","audio/x-pn-realaudio","audio/x-realaudio"],extension:["ram","ra"]},[Tr.ComSoundblasterSoundfont]:{conformsTo:[Tr.Audio],mimeType:[],extension:["sf2"]},[Tr.OrgXiphFlac]:{conformsTo:[Tr.Audio],mimeType:["audio/flac"],extension:["flac"]},[Tr.ComAvidOpenMediaFramework]:{conformsTo:[Tr.AudiovisualContent],mimeType:[],extension:["omf"]},[Tr.Mp4aLoas]:{conformsTo:[Tr.Audio],mimeType:[],extension:["loas","latm"]},[Tr.Mp4aLatm]:{conformsTo:[Tr.Audio],mimeType:["audio/mp4a-latm"],extension:[]},[Tr.ComAdobeFlashVideo]:{conformsTo:[Tr.Movie],mimeType:["video/x-flv"],extension:["flv","f4v","f4p","f4a","f4b"]},[Tr.OrgKhronosColladaDigitalAssetExchange]:{conformsTo:[Tr.AudiovisualContent],mimeType:[],extension:["dae"]},[Tr.ComAdobeRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-adobe-dng"],extension:["dng"]},[Tr.ComDxoRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-dxo-dxo"],extension:["dxo"]},[Tr.ComCanonCrwRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-canon-crw"],extension:["crw"]},[Tr.ComCanonCr2RawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-canon-cr2"],extension:["cr2"]},[Tr.ComCanonCr3RawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-canon-cr3"],extension:["cr3"]},[Tr.ComCanonTifRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-canon-tif"],extension:["tif"]},[Tr.ComEpsonRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-epson-erf"],extension:["erf"]},[Tr.ComFujiRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-fuji-raf"],extension:["raf"]},[Tr.ComHasselbladFffRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-hasselblad-fff"],extension:["fff"]},[Tr.ComHasselblad3frRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-hasselblad-3fr"],extension:["3fr"]},[Tr.ComKodakRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-kodak-dcr"],extension:["dcr"]},[Tr.ComKonicaminoltaRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-minolta-mrw"],extension:["mrw"]},[Tr.ComLeafamericaRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-leaf-mos"],extension:["mos"]},[Tr.ComLeicaPwlRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-leica-pwl"],extension:["pwl"]},[Tr.ComNikonRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-nikon-nef"],extension:["nef"]},[Tr.ComNikonNrwRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-nikon-nrw"],extension:["nrw"]},[Tr.ComNikonNefxRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-nikon-nefx"],extension:["nefx"]},[Tr.ComOlympusRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-olympus-orf"],extension:["orf"]},[Tr.ComPanasonicRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-panasonic-raw"],extension:["raw"]},[Tr.ComPanasonicRw2RawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-panasonic-rw2"],extension:["rw2"]},[Tr.ComLeicaRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-leica-raw"],extension:["raw"]},[Tr.ComSamsungRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-samsung-srw"],extension:["srw"]},[Tr.ComLeicaRwlRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-leica-rwl"],extension:["rwl"]},[Tr.ComPentaxRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-pentax-pef"],extension:["pef"]},[Tr.ComSonyRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-sony-srf"],extension:["srf"]},[Tr.ComSonyArwRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-sony-arw"],extension:["arw"]},[Tr.ComSonyAxrRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-sony-axr"],extension:["axr"]},[Tr.ComSonySr2RawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-sony-sr2"],extension:["sr2"]},[Tr.ComOlympusSrRawImage]:{conformsTo:[Tr.ComOlympusRawImage],mimeType:["image/x-olympus-sr"],extension:["orf"]},[Tr.ComOlympusOrRawImage]:{conformsTo:[Tr.ComOlympusRawImage],mimeType:["image/x-olympus-or"],extension:["orf"]},[Tr.ComPhaseoneRawImage]:{conformsTo:[Tr.CameraRawImage],mimeType:["image/x-phaseone-iiq"],extension:["iiq"]},[Tr.ComAppleFinderPictclipping]:{conformsTo:[Tr.Image],mimeType:[],extension:["pictclipping"]},[Tr.Image]:{conformsTo:[Tr.Data],mimeType:[],extension:[]},[Tr.CameraRawImage]:{conformsTo:[Tr.Image],mimeType:[],extension:[]},[Tr.Jpeg]:{conformsTo:[Tr.Image],mimeType:["image/jpeg","image/jpg"],extension:["jpeg","jpg","jpe"]},[Tr.Jpeg2000]:{conformsTo:[Tr.Image],mimeType:["image/jp2"],extension:["jp2","jpf","jpx","j2k","j2c"]},[Tr.JpegXl]:{conformsTo:[Tr.Image],mimeType:["image/jxl"],extension:["jxl"]},[Tr.Tiff]:{conformsTo:[Tr.Image],mimeType:["image/tiff"],extension:["tiff","tif"]},[Tr.ComApplePict]:{conformsTo:[Tr.Image],mimeType:["image/pict","image/x-pict","image/x-macpict"],extension:["pict","pct","pic"]},[Tr.ComAppleMacpaintImage]:{conformsTo:[Tr.Image],mimeType:[],extension:["pntg"]},[Tr.Png]:{conformsTo:[Tr.Image],mimeType:["image/png"],extension:["png"]},[Tr.SvgImage]:{conformsTo:[Tr.Image],mimeType:["image/svg+xml"],extension:["svg","svgz"]},[Tr.ComAppleQuicktimeImage]:{conformsTo:[Tr.Image],mimeType:["image/x-quicktime"],extension:["qtif","qti"]},[Tr.ComAppleIcns]:{conformsTo:[Tr.Image],mimeType:[],extension:["icns"]},[Tr.XbitmapImage]:{conformsTo:[Tr.Image],mimeType:["image/x-xbitmap"],extension:["xbm"]},[Tr.MpoImage]:{conformsTo:[Tr.Image],mimeType:[],extension:["mpo"]},[Tr.CaMcgillMniBicMnc]:{conformsTo:[Tr.Image],mimeType:[],extension:["mnc","minc"]},[Tr.OrgNemaDicom]:{conformsTo:[Tr.Image],mimeType:["application/dicom"],extension:["dcm","dicom"]},[Tr.AudiovisualContent]:{conformsTo:[Tr.Data],mimeType:[],extension:[]},[Tr.Movie]:{conformsTo:[Tr.AudiovisualContent],mimeType:[],extension:[]},[Tr.Video]:{conformsTo:[Tr.Movie],mimeType:[],extension:[]},[Tr.Audio]:{conformsTo:[Tr.AudiovisualContent],mimeType:[],extension:[]},[Tr.VoiceAudio]:{conformsTo:[Tr.Audio],mimeType:[],extension:[]},[Tr.ComAppleQuicktimeMovie]:{conformsTo:[Tr.Movie],mimeType:["video/quicktime"],extension:["mov","qt"]},[Tr.Mpeg]:{conformsTo:[Tr.Movie],mimeType:["video/mpeg","video/mpg","video/x-mpeg","video/x-mpg"],extension:["mpg","mpeg","mpe","m75","m15"]},[Tr.Mpeg2Video]:{conformsTo:[Tr.Video],mimeType:["video/mpeg2","video/mpeg2-video"],extension:["m2v"]},[Tr.Mpeg4]:{conformsTo:[Tr.Movie],mimeType:["video/mp4","video/mp4v-es"],extension:["mp4","mpg4"]},[Tr.ComAppleM4vVideo]:{conformsTo:[Tr.Mpeg4],mimeType:["video/x-m4v"],extension:["m4v"]},[Tr.ComAppleProtectedMpeg4Video]:{conformsTo:[Tr.ComAppleM4vVideo],mimeType:[],extension:[]},[Tr.DvMovie]:{conformsTo:[Tr.Movie],mimeType:["video/x-dv"],extension:["dv","dif"]},[Tr.Avi]:{conformsTo:[Tr.Movie],mimeType:["video/avi","video/msvideo","video/x-msvideo"],extension:["avi","vfw"]},[Tr._3gpp]:{conformsTo:[Tr.Movie],mimeType:["video/3gpp","audio/3gpp"],extension:["3gp","3gpp","sdv"]},[Tr._3gpp2]:{conformsTo:[Tr.Movie],mimeType:["video/3gpp2","audio/3gpp2"],extension:["3g2","3gp2"]},[Tr.FlcAnimation]:{conformsTo:[Tr.Movie],mimeType:["video/flc"],extension:["flc","fli","cel"]},[Tr.Mpeg2TransportStream]:{conformsTo:[Tr.Movie],mimeType:[],extension:["ts"]},[Tr.ComAppleMediaextensionContent]:{conformsTo:[Tr.Movie],mimeType:[],extension:[]},[Tr.ComAppleAvurlassetContent]:{conformsTo:[Tr.Movie],mimeType:[],extension:[]},[Tr.Mp2]:{conformsTo:[Tr.Audio],mimeType:[],extension:["mp2"]},[Tr.Mp3]:{conformsTo:[Tr.Audio],mimeType:["audio/mpeg","audio/mpeg3","audio/mpg","audio/mp3","audio/x-mpeg","audio/x-mpeg3","audio/x-mpg","audio/x-mp3"],extension:["mp3","mpga"]},[Tr.Playlist]:{conformsTo:[],mimeType:[],extension:[]},[Tr.M3uPlaylist]:{conformsTo:[Tr.Playlist],mimeType:["audio/mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl"],extension:["m3u","m3u8"]},[Tr.PlsPlaylist]:{conformsTo:[Tr.Playlist],mimeType:["audio/x-scpls"],extension:["pls"]},[Tr.Mpeg4Audio]:{conformsTo:[Tr.Audio],mimeType:["audio/mp4","audio/mp4a-latm"],extension:["mp4","mpg4"]},[Tr.ComAppleM4aAudio]:{conformsTo:[Tr.Mpeg4Audio],mimeType:["audio/x-m4a"],extension:["m4a"]},[Tr.ComAppleMpeg4Ringtone]:{conformsTo:[Tr.Mpeg4Audio],mimeType:["audio/x-m4r"],extension:["m4r"]},[Tr.ComAppleProtectedMpeg4Audio]:{conformsTo:[Tr.Audio],mimeType:[],extension:["m4p"]},[Tr.ComAppleProtectedMpeg4AudioB]:{conformsTo:[Tr.ComAppleProtectedMpeg4Audio],mimeType:[],extension:["m4b"]},[Tr.UlawAudio]:{conformsTo:[Tr.Audio],mimeType:[],extension:["ul","ulw","ulaw"]},[Tr.AuAudio]:{conformsTo:[Tr.Audio],mimeType:["audio/basic"],extension:["au","snd"]},[Tr.AifcAudio]:{conformsTo:[Tr.Audio],mimeType:[],extension:["aifc"]},[Tr.AiffAudio]:{conformsTo:[Tr.AifcAudio],mimeType:["audio/aiff","audio/x-aiff"],extension:["aiff","aif"]},[Tr.CddaAudio]:{conformsTo:[Tr.AifcAudio],mimeType:[],extension:["cdda"]},[Tr.MidiAudio]:{conformsTo:[Tr.Audio],mimeType:["audio/midi","audio/x-midi"],extension:["midi","mid","smf","kar"]},[Tr.DownloadableSound]:{conformsTo:[Tr.Audio],mimeType:["audio/dls"],extension:["dls"]},[Tr.ComAppleCoreaudioFormat]:{conformsTo:[Tr.Audio],mimeType:[],extension:["caf"]},[Tr.Ac3Audio]:{conformsTo:[Tr.Audio],mimeType:["audio/ac3"],extension:["ac3"]},[Tr.EnhancedAc3Audio]:{conformsTo:[Tr.Audio],mimeType:["audio/eac3"],extension:["eac3","ec3"]},[Tr.Org3gppAdaptiveMultiRateAudio]:{conformsTo:[Tr.Audio],mimeType:["audio/amr"],extension:["amr"]},[Tr.AacAudio]:{conformsTo:[Tr.Audio],mimeType:["audio/aac","audio/x-aac"],extension:["aac","adts"]},[Tr.ComAudibleAaAudio]:{conformsTo:[Tr.Audio],mimeType:[],extension:[]},[Tr.ComAudibleAaAudiobook]:{conformsTo:[Tr.ComAudibleAaAudio],mimeType:["audio/audible","audio/x-pn-audibleaudio","audio/x-audible"],extension:["aa"]},[Tr.ComAudibleAaxAudiobook]:{conformsTo:[Tr.ComAudibleAaAudio],mimeType:["audio/vnd.audible.aax"],extension:["aax"]},[Tr.ComSonyWave64]:{conformsTo:[Tr.Audio],mimeType:[],extension:["w64"]},[Tr.ComAppleQuicktimeAudio]:{conformsTo:[Tr.Audio],mimeType:[],extension:["qta"]},[Tr.Item]:{conformsTo:[],mimeType:[],extension:[]},[Tr.Data]:{conformsTo:[Tr.Item],mimeType:["application/octet-stream"],extension:[]},[Tr.ComGoogleWebp]:{conformsTo:[Tr.OrgWebmprojectWebp],mimeType:[],extension:[]}};function Rr(e){return Object.keys(Pr).includes(e)}function kr(e,t){if(e&&Rr(e)){const n=Pr[e],r=t(n);if(r)return r;if(n)for(let e=0;e<n.conformsTo.length;e++){const r=kr(n.conformsTo[e],t);if(r)return r}}}function Dr(e,t){if(!e||!t)return!1;if(e===t)return!0;if(Rr(e)){const n=[...Pr[e].conformsTo];if(!n||n.length<1)return!1;if(n.includes(t))return!0;if(n)for(let e=0;e<n.length;e++)if(Dr(n[e],t))return!0}return!1}function Mr(e){return kr(e,(e=>null===e||void 0===e?void 0:e.mimeType[0]))}const Nr=[...Pr[Tr.Jpeg].mimeType,...Pr[Tr.Png].mimeType,...Pr[Tr.ComCompuserveGif].mimeType,...Pr[Tr.ComMicrosoftBmp].mimeType],xr=function(){let e=!1;const t=new Image;return t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=()=>{const n=t.width>0&&t.height>0;e=n},function(){return e}}();let Lr,jr={};var Ur,Fr,zr,Br;function Kr(e){if(e)return Dr(e,Tr.Jpeg)?Tr.Jpeg:Dr(e,Tr.HeifStandard)?Tr.HeifStandard:Dr(e,Tr.CameraRawImage)?Tr.CameraRawImage:Dr(e,Tr.ComCompuserveGif)?Tr.ComCompuserveGif:Dr(e,Tr.Png)?Tr.Png:Dr(e,Tr.Tiff)?Tr.Tiff:Dr(e,Tr.ComAdobePdf)?Tr.ComAdobePdf:Dr(e,Tr.ComAdobePhotoshopImage)?Tr.ComAdobePhotoshopImage:Dr(e,Tr.Jpeg2000)?Tr.Jpeg2000:Dr(e,Tr.Audio)?Tr.Audio:Dr(e,Tr.Movie)?Tr.Movie:Dr(e,Tr.OrgWebmprojectWebp)?Tr.OrgWebmprojectWebp:void 0}!function(e){e[e.Unknown=0]="Unknown",e[e.Image=1]="Image",e[e.Movie=2]="Movie",e[e.Audio=3]="Audio"}(Ur||(Ur={})),function(e){function t(e){if(!e)return;const t=e.fields.codecEnc_decoded||e.fields.codec;if(!t)return;const n=t.toLowerCase().split(".").join("");return-1!==n.indexOf("prores")?Vt.ProRes:-1!==n.indexOf("hevc")?Vt.HEVC:-1!==n.indexOf("h264")?Vt.H264:void 0}e.getItemType=function(e){return e.fields.itemTypeEnc_decoded||e.fields.itemType},e.getVideoFrameRate=function(e){return e.fields.videoFrameRateEnc||e.fields.videoFrameRate},e.getOriginalCreationDate=function(e){var t;return null!==(t=e.fields.originalCreationDateEnc)&&void 0!==t?t:e.fields.originalCreationDate},e.originalType=function(e){var t;return Kr(null===(t=e.fields)||void 0===t?void 0:t.resOriginalFileType)},e.altType=function(e){var t;return Kr(null===e||void 0===e||null===(t=e.fields)||void 0===t?void 0:t.resOriginalAltFileType)},e.isProRes=function(e){return t(e)===Vt.ProRes},e.codecForMaster=t,e.isHDRVideo=function(e){return void 0!==e&&void 0!==e.fields.resVidHDRMedRes},e.isAudio=function(e){return e.fields.dataClassType===Ur.Audio},e.isImage=function(e){return e.fields.dataClassType===Ur.Image},e.isVideo=function(e){return e.fields.dataClassType===Ur.Movie},e.isEPP=function(e){return"B"===e.recordName.charAt(0)},e.getBaseFileName=function(e){const t=e.fields.filenameEnc_decoded||"";let n=t.lastIndexOf(".");return n>=0?t.slice(0,n):t}}(Fr||(Fr={})),function(e){function t(e){return e?Math.max(e.naturalWidth||e.width||0,e.naturalHeight||e.height||0):0}function n(e,n){return t(r(e,n))}function r(e,t){if(e===bt)return pr.isCPLAsset(t)?{width:void 0,height:void 0}:{width:t.fields.resOriginalWidth,height:t.fields.resOriginalHeight};{const n=`res${e}Width`,r=`res${e}Height`;return{width:t.fields[n],height:t.fields[r]}}}function i(e,t){var n;let r,i,o,a;if(e===bt){var s,c;pr.isCPLMaster(t)&&(r=t.fields.resOriginalFileType,i=null===(s=t.fields.resOriginalRes)||void 0===s?void 0:s.downloadURL,o=null===(c=t.fields.resOriginalRes)||void 0===c?void 0:c.size,a=Fr.codecForMaster(t))}else{var u,l;const n=`res${e}FileType`,a=`res${e}Res`;r=t.fields[n],i=null===(u=t.fields[a])||void 0===u?void 0:u.downloadURL,o=null===(l=t.fields[a])||void 0===l?void 0:l.size}var d;r===Tr.ComAppleQuicktimeMovie&&(r=e===bt&&pr.isCPLMaster(t)&&"hevc"===(null===(d=a)||void 0===d?void 0:d.toLowerCase())?Tr.ComAppleM4vVideo:Tr.Mpeg4);return r=null===(n=r)||void 0===n?void 0:n.toLowerCase(),{fileType:r&&Rr(r)?r:void 0,downloadURL:i,fileSize:o}}function o(e,t){const{fileType:n,downloadURL:r}=i(e,t);let o;if(r&&n){const e=kr(n,(e=>{const t=null===e||void 0===e?void 0:e.extension[0];return t?`public.${t}`:void 0}))||"unknown.jpeg";o=r.split("${f}").join(encodeURIComponent(e))}return o}function a(e,t,n){const{fileType:r,downloadURL:o}=i(e,t),a=n===bi.Video?function(e){if(!e)return!1;if(!Dr(e,Tr.Video)&&!Dr(e,Tr.Movie))return!1;const t=Mr(e);return!!t&&!!function(e){const t=e.slice(0,5);if("video"===t||"audio"===t){const t=jr[e];if(void 0!==t)return t||!1;Lr||(Lr=document.createElement("video"));const n=Lr.canPlayType&&Lr.canPlayType(e);return jr[e]="maybe"===n||"probably"===n}return!1}(t)}(r):function(e){if(!e)return!1;if(!Dr(e,Tr.Image))return!1;const t=Mr(e);return!!t&&!!function(e){return Nr.indexOf(e)>-1||Pr[Tr.OrgWebmprojectWebp].mimeType.indexOf(e)>-1&&xr()}(t)}(r);return Boolean(void 0!==o&&a)}e.isRenderableDerivativeType=function(e){const t=e.fields.dataClassType;if(t===Ur.Image||t===Ur.Movie)return!0;const n=Fr.getItemType(e);return!(t!==Ur.Unknown||!n)&&Dr(n,Tr.ComAdobePdf)},e.getMSL=t,e.getSmallestRenderableMSL=function(e,t,r){for(const i of[e,t])for(let e=0;e<_t.length;e++){const t=_t[e];if(o(t,i)&&a(t,i,r))return n(t,i)}},e.getLargestRenderableMSL=function(e,t,r){for(const i of[e,t])for(let e=_t.length-1;e>0;--e){const t=_t[e];if(o(t,i)&&a(t,i,r))return n(t,i)}},e.getMSLforSlot=n,e.isOriginalSlot=function(e){return e===bt},e.derivativeSizeForSlot=r,e.fileDataForSlot=i,e.urlForSlot=o,e.isRenderableDerivativeSlot=a,e.getAspectRatio=function(t){function n(t){for(let n=0;n<_t.length;n++){const r=_t[n];let{width:i,height:o}=e.derivativeSizeForSlot(r,t);if(i&&o)return i/o}}return"record"in t?n(t.record):n(t.asset)||n(t.master)},e.byteSizeForSlot=function(e,t){if(e===bt){var n;if(pr.isCPLAsset(t))return;return null===(n=t.fields.resOriginalRes)||void 0===n?void 0:n.size}{var r;const n=`res${e}Res`;return null===(r=t.fields[n])||void 0===r?void 0:r.size}},e.isContentDifferent=function(e,t){for(let n=0,r=At.length;n<r;n++){const r=At[n];if("resOriginalFingerprint"!==r&&e.fields[r]!==t.fields[r])return!0}return!1},e.isSizeLargeEnough=function(t,n,r,i,o){return t>=n||t>=(e.getLargestRenderableMSL(r,i,o)||0)},e.isTranscodingSlot=function(e){return Object.values(St).includes(e)},e.isGIF=function(e){const t=Fr.originalType(e);return!!t&&Dr(t,Tr.ComCompuserveGif)}}(zr||(zr={})),function(e){function t(e){return void 0!==e.fields.assetSubtypeV2?e.fields.assetSubtypeV2:e.fields.assetSubtype}function n(e){return e.fields.customRenderedValueEnc||e.fields.customRenderedValue}function r(e){return!!e.fields.durationEnc||!!e.fields.duration}e.getLargestDimensions=function(e){let t=0,n=0;for(const r of _t){if(r===bt)continue;const{width:i,height:o}=zr.derivativeSizeForSlot(r,e);i&&o&&i>=t&&o>=n&&(t=i,n=o)}return{width:t,height:n}},e.isBurst=function(e){if(e.fields.burstId&&(void 0!==e.fields.burstFlags||void 0!==e.fields.burstFlagsExt)){const t=31&(e.fields.burstFlags||0)|2147483616&(e.fields.burstFlagsExt||0);return Boolean(t&Nt.STACK)}return!1},e.getAssetSubtype=t,e.getUrl=function(e,t){},e.getCustomRenderedValue=n,e.isSDOF=function(e){if(!e)return!1;const t=n(e);let r=!1;if(void 0!==e.fields.adjustmentRenderType){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;if(e<2)return[e];const n=[];for(let r=0;r<t;r++){const t=1<<r;e&t&&n.push(t)}return n}(e.fields.adjustmentRenderType||0,4);r=t.includes(Lt.PORTRAIT)}return t===xt.SDOFImage||t===xt.SDOFPlusOriginal_SDOFImage||r},e.isHDRImage=function(e){return!(void 0===e.fields.assetHDRType||e.fields.assetHDRType===jt.NONE||e.fields.assetHDRType===jt.EV0)},e.getAssetDate=function(e){var t;return null!==(t=e.fields.assetDateEnc)&&void 0!==t?t:e.fields.assetDate},e.getTimeZoneOffset=function(e){var t;return null!==(t=e.fields.timeZoneOffsetEnc)&&void 0!==t?t:e.fields.timeZoneOffset},e.isVideo=r,e.videoDuration=function(e){return r(e)?e.fields.durationEnc||e.fields.duration:void 0},e.isLivePhoto=function(e){return void 0!==e.fields.vidComplDurValue&&e.fields.vidComplDurValue>0},e.isSpatialCapture=function(t){return!!t&&(e.getAssetSubtype(t)===Mt.VideoSpatial||e.getAssetSubtype(t)===Mt.PhotoSpatial)},e.isPanorama=function(e){const n=t(e);return Boolean(n&&n===Mt.PhotoPanorama)},e.hasDerivatives=function(e){for(const t of It){if(t===bt)continue;const n=`res${t}Res`;if(e.fields[n])return!0}return!1},e.computeFingerprintString=function(e){let t="";for(const n of At){if("resOriginalFingerprint"===n)continue;const r=e.fields[n];r&&(t+=r)}return t},e.getMasterRefRecordKey=function(e){if(!e)return;const t=e.fields.masterRef;return t&&t.recordName?{zoneID:e.zoneID,recordName:t.recordName}:void 0},e.getSharedAlbumAssetLikeData=function(e){var t,n;return{isLikedByYou:Boolean(null===e||void 0===e||null===(t=e.pluginFields)||void 0===t?void 0:t.likedByCaller),likeCount:null===e||void 0===e||null===(n=e.pluginFields)||void 0===n?void 0:n.likeCount}},e.isCPLAssetContributor=function(e,t){return Boolean(!e.fields.contributors||e.fields.contributors&&e.fields.contributors.find((e=>e.recordName===t)))}}(Br||(Br={}));var Hr=n(7);class Wr{constructor(){this._lastWriteTime=0,this._bytesTransferred=0,this._bytesTotal=0,this._isDeterminate=!1,this.listeners=new Set,this.percentCompleteListeners=new Set}get lastWriteTime(){return this._lastWriteTime}get bytesTransferred(){return this._bytesTransferred}get bytesTotal(){return this._bytesTotal}get isDeterminate(){return this._isDeterminate}get percentComplete(){return this.bytesTotal?this.bytesTransferred/this.bytesTotal:0}update(e,t,n,r){const i=this.percentComplete,o=this._bytesTransferred,a=this._bytesTotal;this._lastWriteTime=e,this._bytesTransferred=t,this._bytesTotal=n,this._isDeterminate=r;const s=this.percentComplete;this.listeners.forEach((e=>e(this))),i!==s&&this.percentCompleteListeners.forEach((e=>e({previousValue:{percentComplete:i,bytesTransferred:o,bytesTotal:a},currentValue:{percentComplete:s,bytesTransferred:t,bytesTotal:n}})))}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}addPercentCompleteListener(e){this.percentCompleteListeners.add(e)}removePercentCompleteListener(e){this.percentCompleteListeners.delete(e)}}let qr;function Vr(){return void 0===qr&&(qr="dynamicRangeLimit"in document.body.style),qr}const $r="test_images/orientation_test_image.jpeg";let Gr=!0,Zr=!1;function Qr(e,t,n){if(!e)return;const r=Math.floor(t/100);let i;switch(r){case 0:i=".timeout";break;case 2:i="";break;default:i=`.${r}xx`}e(`cvws${i}`,{duration:n},!1,!0)}function Yr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,Math.floor(Math.log(e)/Math.log(10)+1e-9)-(t-1));return Math.round(e/n)*n}function Jr(e){return!!e&&e.startsWith("https://cvws-h2.icloud-content.com")}let Xr=null;function ei(){if(null===Xr)try{var e;Xr=Boolean((null===(e=navigator.userAgentData)||void 0===e?void 0:e.brands.map((e=>e.brand)).includes("Chromium"))||!1)}catch{Xr=!1}return Xr}const ti=[()=>0,()=>150+300*Math.random(),()=>500+1e3*Math.random()],ni=[null],ri={type:null},ii=.01,oi=new class{constructor(e){this.set=void 0,this.maxSize=void 0,this.set=new Set,this.maxSize=e}add(e){if(this.set.size===this.maxSize){const e=this.set.values().next().value;this.set.delete(e)}this.set.add(e)}has(e){return this.set.has(e)}delete(e){this.set.delete(e)}get size(){return this.set.size}keys(){return this.set.keys()}values(){return this.set.values()}entries(){return this.set.entries()}clear(){return this.set.clear()}}(5e3);function ai(e){const{Orientation:t,Credit:n}=e;return{Orientation:t,Credit:n}}var si,ci,ui;!function(e){e.Unloaded="unloaded",e.Loading="loading",e.Preparing="preparing",e.Loaded="loaded",e.Errored="errored"}(si||(si={})),function(e){e.Gone="Gone",e.ServerError="ServerError",e.Unknown="Unknown"}(ci||(ci={})),function(e){e.ResourcePrefetch="Resource Prefetch",e.ResourceDownload="Resource Download"}(ui||(ui={}));const li=Object.values(ui).map((e=>encodeURIComponent(e)));class di{get mimeType(){return this._xhrResponseMimetype?this._xhrResponseMimetype:this.expectedMimeType?this.expectedMimeType:""}get image(){return this.state===si.Loaded?this._image:void 0}set state(e){const t=this._state;this._state=e,e===si.Loaded&&this.onFinish&&this.onFinish(this,this._image,this._metadata),e===si.Errored&&this.onFail&&this.onFail(this,this._errorReason||ci.Unknown),e!==si.Unloaded||!this.onCancel||t!==si.Loading&&t!==si.Preparing||this.onCancel(this)}get state(){return this._state}get totalLoadAttemptsMade(){return 3-this._remainingLoadAttemptCount}get shouldUseArrayBufferModeOnXHR(){return this.shouldCheckOrientation||this.shouldReadMetadata||this.shouldRemoveChromiumHDR}constructor(e){var t,n;this.url=void 0,this.expectedMimeType=void 0,this.shouldCheckOrientation=void 0,this.shouldReadMetadata=void 0,this.shouldRemoveChromiumHDR=void 0,this.offscreeniness=void 0,this.isTranscoderRequest=void 0,this.priority=void 0,this.reportingData=void 0,this.onFinish=void 0,this.onFail=void 0,this.onCancel=void 0,this.progress=new Wr,this._image=void 0,this._state=si.Unloaded,this._errorReason=void 0,this._xhrSentTimestamp=void 0,this._timeToFirstByte=void 0,this._offscreeninessAtSend=void 0,this._priorityAtSend=void 0,this._remainingLoadAttemptCount=3,this._metadata={Orientation:1},this._xhr=new XMLHttpRequest,this._delayedSendTimeout=void 0,this._xhrResponseMimetype=void 0,this.url=e.url,this.expectedMimeType=e.mimeType,this.shouldCheckOrientation=null!==(t=e.shouldCheckOrientation)&&void 0!==t&&t,this.shouldReadMetadata=null!==(n=e.shouldReadMetadata)&&void 0!==n&&n,this.shouldRemoveChromiumHDR=Boolean(ei()&&!Vr()&&e.shouldRemoveChromiumHDR),this.offscreeniness=e.offscreeniness||0,this.priority=e.priority,this.isTranscoderRequest=e.isTranscoderRequest,this.reportingData=e.reportingData,this.onFinish=e.onFinish,this.onFail=e.onFail,this.onCancel=e.onCancel,this._handleXHRReadyStateChange=this._handleXHRReadyStateChange.bind(this),this._handleXHRProgress=this._handleXHRProgress.bind(this),this._physicallySendXHR=this._physicallySendXHR.bind(this),this._imageLoadDidFinish=this._imageLoadDidFinish.bind(this),this._imageLoadDidFail=this._imageLoadDidFail.bind(this)}send(){this.state=si.Loading,this._offscreeninessAtSend=this.offscreeniness,this._priorityAtSend=this.priority,this._sendWithXHR()}cleanup(){this._cleanUpXHR(),this.state===si.Preparing&&this._cleanUpImageElement(),this._image=void 0}_finalURLTransform(e){const t=this._offscreeninessAtSend<=1?ui.ResourceDownload:ui.ResourcePrefetch;if(3!==this._remainingLoadAttemptCount)return`${e}&og=${encodeURIComponent(t)}`;for(const r of li){const t=`${e}&og=${r}`;if(oi.has(t))return t}const n=`${e}&og=${encodeURIComponent(t)}`;return oi.add(n),n}_sendWithXHR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this._xhr,n=this._finalURLTransform(this.url);t.open("GET",n,!0),t.responseType=this.shouldUseArrayBufferModeOnXHR?"arraybuffer":"blob",t.addEventListener("readystatechange",this._handleXHRReadyStateChange),t.addEventListener("progress",this._handleXHRProgress),e>0?this._delayedSendTimeout=setTimeout(this._physicallySendXHR,e):this._physicallySendXHR(),this._remainingLoadAttemptCount--}_physicallySendXHR(){1===this._xhr.readyState&&(this._xhrSentTimestamp=Date.now(),this._xhr.send(null))}_handleXHRReadyStateChange(){if(this.state!==si.Loading)return;const e=this._xhr;return e.readyState>=2&&200!==e.status?this._xhrLoadDidFail():4===e.readyState&&200===e.status?this._xhrLoadDidFinish():void 0}_handleXHRProgress(e){this.state===si.Loading&&(!this._timeToFirstByte&&this._xhrSentTimestamp&&(this._timeToFirstByte=Date.now()-this._xhrSentTimestamp),this.progress.update(Date.now(),e.loaded,e.total,e.lengthComputable))}_loadDidFail(){this.state=si.Errored}_xhrLoadDidFail(){let e=0;const t=this._xhr,n=t.status;if(this._remainingLoadAttemptCount>0&&n>400&&404!==n&&n!==gi&&520!==n){const n=t.getResponseHeader("Retry-After");if(n&&(e=Math.floor(1e3*parseFloat(n))),!e){const t=ti[this.totalLoadAttemptsMade];e=Math.floor(t&&t())}}const r=Date.now()-this._xhrSentTimestamp,i=ce.instance;if(Qr(i.report,n,r),this._cleanUpXHR(),n===gi)return i.report("derivativeGone"),this._errorReason=ci.Gone,void this._loadDidFail();500===n&&(this._errorReason=ci.ServerError),e>0?this._sendWithXHR(e):(400===n&&i.report("cvwsRequestFailureFileNotFound",{totalLoadAttemptsMade:this.totalLoadAttemptsMade,xhrStatus:n,derivativeIsTranscoded:this.isTranscoderRequest,isHttp2:Jr(this.url)}),i.report("cvwsRequestFailure",{totalLoadAttemptsMade:this.totalLoadAttemptsMade,xhrStatus:n,derivativeIsTranscoded:this.isTranscoderRequest,isHttp2:Jr(this.url)}),this._loadDidFail())}_cleanUpXHR(){clearTimeout(this._delayedSendTimeout);const e=this._xhr;e.removeEventListener("readystatechange",this._handleXHRReadyStateChange),e.removeEventListener("progress",this._handleXHRProgress),e.abort()}_xhrLoadDidFinish(){if(Math.random()<ii&&this._reportDerivativeRequest(),this.state=si.Preparing,!this._xhrResponseMimetype)try{const e=this._xhr.getResponseHeader("content-type");e&&(this._xhrResponseMimetype=e)}catch{}if(this.shouldUseArrayBufferModeOnXHR){const e=this._xhr.response;if(this.shouldCheckOrientation&&Gr){const t=Hr.Reader.readAndZeroOrientation(e,this.shouldRemoveChromiumHDR);t&&(this._metadata=ai(t))}else if(this.shouldReadMetadata||this.shouldRemoveChromiumHDR){const t=Hr.Reader.read(e,!1,this.shouldRemoveChromiumHDR);t&&(this._metadata=ai(t))}this._loadImageFromArrayBuffer(e)}else{const e=this._xhr.response;this._loadImageFromBlob(e)}}_reportDerivativeRequest(){const e=this.reportingData;if(!e)return;const t=Date.now()-this._xhrSentTimestamp,n=this._xhr.response||{},r=n.size||n.byteLength,i=Jr(this.url);!function(e){const{reportStatFn:t,...n}=e;if(!t)return;let r={...n},i={};const o="derivativeTimeToFirstFrame"in n?n.derivativeTimeToFirstFrame:n.derivativeTimeToFirstByte,a=void 0!==o&&!isNaN(o);a&&(r.duration=o,i={duration:o}),t("derivativeRequest",r,!1,a),t(`derivativeRequestFrom${r.derivativeRequestReason}`,i,!1,a);const s=r.derivativeOffscreeninessAtSend>1?"Background":"Foreground";r.derivativeIsTranscoded?t(`derivativeTranscoder${s}RequestFrom${r.derivativeTranscodeSourceDerivativeNameNominal||"Unknown"}`,i,!1,a):t(`derivativeNontranscoder${s}Request`,i,!1,a),void 0!==r.xhrStatus&&410!==r.xhrStatus&&Qr(t,r.xhrStatus,r.duration)}({reportStatFn:ce.instance.report,derivativeApproxByteSize:Yr(r),derivativeTimeToFirstByte:this._timeToFirstByte||t,derivativeTimeToComplete:t,derivativeMIMETypeForWebClient:this.mimeType||"UNKNOWN",derivativeIsTranscoded:this.isTranscoderRequest,derivativeTotalLoadAttemptsMade:this.totalLoadAttemptsMade,derivativeOffscreeninessAtSend:this._offscreeninessAtSend,derivativeOffscreeninessAtReceipt:this.offscreeniness,derivativeLoadRefPriorityAtSend:this._priorityAtSend,derivativeRequestReportProbability:ii,xhrStatus:this._xhr.status||0,isHttp2:i,...e})}_loadImageFromArrayBuffer(e){ni[0]=e,ri.type=this.mimeType,this._loadImageFromBlob(new Blob(ni,ri)),ni[0]=null,ri.type=null}_loadImageFromBlob(e){this._loadImageFromSrc(URL.createObjectURL(e))}_loadImageFromSrc(e){const t=new Image;this._image=t,t.addEventListener("load",this._imageLoadDidFinish),t.addEventListener("error",this._imageLoadDidFail),t.decoding="async",t.draggable=!1,t.src=e}_imageLoadDidFinish(){this._cleanUpImageElement(),this.state=si.Loaded}_imageLoadDidFail(){this._cleanUpImageElement(),this._image=void 0,this._loadDidFail()}_cleanUpImageElement(){const e=this._image;e&&(URL.revokeObjectURL(e.src),e.removeEventListener("load",this._imageLoadDidFinish),e.removeEventListener("error",this._imageLoadDidFail))}}var pi;!function(e){e.MicroThumbLike="MicroThumbLike",e.ThumbLike="ThumbLike",e.EqualOrGreaterMSL="EqualOrGreaterMSL"}(pi||(pi={}));const fi=Tr.Jpeg,hi=480,mi=1500,gi=410;function vi(e){return!!Object.keys(wt).includes(e)||!!Object.keys(St).includes(e)||e===bt}function yi(e){return void 0!==e&&vi(e.slot)}var bi;function wi(e,t,n,r,i){const o=function(e,t,n,r,i,o){return _i(e,t,n,Si(Br.hasDerivatives(e)?e:t,n,r,i,o),r,o)}(e,t,bi.Image,n,r,i);return yi(o)?o:void 0}function Si(e,t,n,r,i){const o=t===bi.Video?Et:_t;let a,s=0;for(const c of o){if(i&&i.includes(c))continue;if(!zr.isRenderableDerivativeSlot(c,e,t))continue;const{width:o,height:u}=zr.derivativeSizeForSlot(c,e);if(!o||!u)continue;const l=Math.max(o,u);if(l!==s){if(l===n)return c;if(l<n)a=c,s=l;else if(l>n)return r&&a?a:c}}return a}function Ci(e,t,n,r,i){const o=function(e,t,n,r,i,o){const a=function(e,t,n,r,i){if(r!==pi.EqualOrGreaterMSL){const n=t===bi.Video?Ot.VidSmall:wt.JPEGThumb;return null!==i&&void 0!==i&&i.includes(n)||!zr.isRenderableDerivativeSlot(n,e,t)?Si(e,t,0,!0,i):n}return Si(e,t,n,!1,i)}(Br.hasDerivatives(e)?e:t,n,r,i,o);return _i(e,t,n,a,r,o)}(e,t,bi.Image,n,r,i);return yi(o)?o:void 0}function _i(e,t,n,r,i,o){const a=Br.hasDerivatives(e)?e:t;let s;if(r&&(s=zr.urlForSlot(r,a)),!s||!r){let t;if(n!==bi.Video){const n=function(e,t,n){let r,i;var o,a,s;!(t<=hi)||n&&n.includes(St.ScaledJPEGThumb)||(r=null===(o=e.pluginFields)||void 0===o?void 0:o.dynamic_resJPEGThumbResScaledTemplate,i=St.ScaledJPEGThumb);r||!(t<=mi)||n&&n.includes(St.ScaledJPEGFull)||(r=null===(a=e.pluginFields)||void 0===a?void 0:a.dynamic_resJPEGFullResScaledTemplate,i=St.ScaledJPEGFull);r||n&&n.includes(St.ScaledOriginal)||(r=null===(s=e.pluginFields)||void 0===s?void 0:s.dynamic_resOriginalResScaledTemplate,i=St.ScaledOriginal);if(r&&i)return{url:r.split("${f}").join(encodeURIComponent(fi)).split("${m}").join(`${t}`),slot:i}}(e,i,null===o||void 0===o?void 0:o.filter(vi)),r=fi,s=Mr(r);n&&s&&(t={slot:n.slot,url:n.url,isTranscoded:!0,shouldCheckOrientation:!1,mimeType:s,utType:r,derivativeMSL:i,record:a,fileSize:-1})}return t}const{fileType:c,fileSize:u}=zr.fileDataForSlot(r,a);if(!c)return;const l=Mr(c);return l?{slot:r,url:s,isTranscoded:!1,shouldCheckOrientation:zr.isOriginalSlot(r)&&l===Pr[Tr.Jpeg].mimeType[0],mimeType:l,utType:c,derivativeMSL:zr.getMSLforSlot(r,a),record:a,fileSize:u||-1}:void 0}!function(e){e.Image="Image",e.Video="Video"}(bi||(bi={}));class Oi extends Bn{getKeyString(e){return Un.itemListKeyString(e)}}class Ei extends Zn{areItemsEqual(e,t){return e.commenttimestamp===t.commenttimestamp&&e.comment===t.comment}getKeyString(e){return Un.sharedAlbumCommentListKeyString(e)}}class Ii extends Bn{getKeyString(e){return Un.itemListKeyString(e)}}class Ai extends Bn{getKeyString(e){return Un.sharedAlbumKeyString(e)}}class Ti extends Bn{getKeyString(e){return Un.itemListKeyString(e)}}class Pi extends Zn{areItemsEqual(e,t){return Un.areGridKeysEqual(e,t)}getKeyString(e){return e}}class Ri extends Bn{getKeyString(e){return Un.itemListKeyString(e)}}class ki extends $n{combineItemWithInflightData(e,t){let n={};for(let r=0;r<t.length;r++){const e=t[r];n={...n,...e.data}}e.attributes={...e.attributes,...n}}getKeyString(e){return Un.itemListKeyString(e)}}const Di=1e3;class Mi{static get instance(){return this._instance||(this._instance=new Mi),this._instance}constructor(){this.rootctag=void 0,this.signedInUserPersonId=void 0,this.albumStore=void 0,this.pendingAlbumStore=void 0,this.keyAssetStore=void 0,this.sharingInfoStore=void 0,this.listStore=void 0,this.commentListStore=void 0,this.invitationStore=void 0,this.dbrMetadataStore=void 0,this.albumStore=new ki(Di),this.pendingAlbumStore=new Oi(Di),this.keyAssetStore=new Ti(Di),this.sharingInfoStore=new Ri(Di),this.listStore=new Pi(2),this.commentListStore=new Ei(100),this.invitationStore=new Ai(Di),this.dbrMetadataStore=new Ii(Di)}}var Ni,xi,Li,ji;function Ui(e,t){const n=null===e||void 0===e?void 0:e.commentposition,r=null===t||void 0===t?void 0:t.commentposition;if(void 0===n||void 0===r)return 0;const i=parseInt(n),o=parseInt(r);return isNaN(i)||isNaN(o)?0:i-o}function Fi(e,t,n){const r=Mi.instance.signedInUserPersonId;if(!r)return!1;const i=ji.isOwned(t);return e.fields.contributedBy===r||i}Mi._instance=void 0,function(e){e.Text="0",e.Like="1",e.Deleted="89"}(Ni||(Ni={})),function(e){function t(e){return"1"===e.createdbyme}function n(e,t){const n=e.firstname||e.fullname;if(n)return n;if(!t)return e.lastname;const r=e.personid;for(const i of t)if(r===i.personid){let e;if(i.phonenumbers)for(const t of i.phonenumbers)if(t.phonenumber){e=t.phonenumber;break}return i.firstname||i.fullname||i.email||e||i.lastname}}e.isTextComment=function(e){return Boolean(e&&(null===e||void 0===e?void 0:e.commenttype)===Ni.Text)},e.isLike=function(e){return Boolean(e&&(null===e||void 0===e?void 0:e.commenttype)===Ni.Like)},e.getTextCommentsByPosition=function(t){if(t)return t.filter(e.isTextComment).sort(Ui)},e.getLikesByPosition=function(t){if(t)return t.filter(e.isLike).sort(Ui)},e.isCreatedByMe=t,e.getLikedByNames=function(e,r){const i=[];if(!e)return i;for(let o of e)if(!t(o)){const e=n(o,r);e&&i.push(e)}return i},e.getLikeData=function(e){if(!e)return{likedByNames:[],isLikedByMe:!1};const n=[];let r;for(let i of e)!t(i)&&i.firstname?n.push(i.firstname):t(i)&&(r=i);return r?{likedByNames:n,isLikedByMe:!0,likedByMeComment:r}:{likedByNames:n,isLikedByMe:!1}},e.getLikedByMeComment=function(n){if(!n)return;const r=n.filter(e.isLike);for(let e of r)if(t(e))return e},e.getAssetAttributionInfo=function(e,t,n){const r={isOwnedByYou:!1,ownerName:""},i=e.fields.contributedBy;if(i&&t){for(const e of t)if(i===e.personid){if(i===n)return r.isOwnedByYou=!0,r;let t;if(e.phonenumbers)for(const n of e.phonenumbers)if(n.phonenumber){t=n.phonenumber;break}r.ownerName=e.firstname||e.fullname||e.email||t||e.lastname||""}return r}},e.getCommentAttributionName=n}(xi||(xi={})),function(e){e.Subscribed="subscribed",e.Owned="owned",e.Pending="pending",e.Unsubscribed="unsubscribed",e.Rejected="rejected",e.Unknown="unknown",e.Unshared="unshared"}(Li||(Li={})),function(e){function t(e){return!!e&&e.sharingtype===Li.Owned}function n(e){return e.sharingtype===Li.Owned}function r(e){var t;return!!e&&"1"===(null===(t=e.attributes)||void 0===t?void 0:t.allowcontributions)}e.isOwned=t,e.isSubscribed=function(e){return e.sharingtype===Li.Subscribed},e.getLocationURL=function(e){if(!e)return;if(t(e))return{useDSIDBaseURL:!0};const n=e.albumlocation;return n?{useDSIDBaseURL:!1,locationURL:n}:void 0},e.getNonOwnerSharees=function(e){return e.filter((e=>!n(e)&&(e.sharingtype===Li.Pending||e.sharingtype===Li.Subscribed)))},e.isSubscriberOwner=n,e.isInvitePending=function(e){return!!e&&e.sharingtype===Li.Pending},e.isInviteUnsubscribed=function(e){return!!e&&e.sharingtype===Li.Unsubscribed},e.getAlbumOwnerInfo=function(e){if(e)return e.find((e=>n(e)))},e.allowsContributions=r,e.isUploadOrAddDisallowed=function(e){return!t(e)&&!r(e)},e.isPublic=function(e){var t;return!!e&&"1"===(null===(t=e.attributes)||void 0===t?void 0:t.ispublic)},e.isSharedAlbum=function(e){return"albumguid"in e&&"attributes"in e},e.isPendingAlbum=function(e){return!!e&&e.sharingtype===Li.Pending},e.isInvitation=function(e){return"invitationguid"in e},e.compareSharedAlbumsBasedOnLastModified=function(e,t){var n,r;const i=void 0===e.lastModified?null===(n=e.attributes)||void 0===n?void 0:n.creationDate:e.lastModified,o=void 0===t.lastModified?null===(r=t.attributes)||void 0===r?void 0:r.creationDate:t.lastModified;return void 0===i&&void 0===o?0:void 0===o?-1:void 0===i?1:o-i}}(ji||(ji={}));const zi=",";var Bi;!function(e){e.Recents="recents",e.FavoriteMemories="favoritememories",e.AllMemories="memories",e.MyAlbums="albums",e.MediaTypes="mediatypes",e.ICloudLinks="icloudlinks",e.Favorites="favorites",e.Hidden="hidden",e.Deleted="recentlydeleted",e.SharedAlbums="sharedalbums",e.Slideshow="slideshow"}(Bi||(Bi={}));const Ki="",Hi={[m.Favorites]:Bi.Favorites,[m.Live]:"livephotos",[m.Videos]:"videos",[m.Panoramas]:"panoramas",[m.Depth]:"portrait",[m.Exposure]:"longexposure",[m.Timelapse]:"time-lapse",[m.Slomo]:"slo-mo",[m.Bursts]:"bursts",[m.Screenshot]:"screenshots",[m.Animated]:"animated"};var Wi,qi;function Vi(e,t,n){let r="";e===Wi.OneUpItem&&!jn.isSharedAlbumZoneID(t.zoneID)&&(r=jn.isSharedSyncZone({zoneID:t.zoneID})?qi.SharedSync:qi.PrimarySync,r=`${r}${zi}`);let i="";return void 0!==n&&(i=`${zi}${n}`),`${e}${zi}${r}${t.recordName}${i}`}function $i(e,t){return Vi(Wi.OneUpItem,e,t)}!function(e){e.Album="a",e.Folder="f",e.OneUpItem="i",e.SharedAlbum="sa"}(Wi||(Wi={})),function(e){e.PrimarySync="pz",e.SharedSync="sz"}(qi||(qi={}));const Gi={[y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted]:Ki,[y.CPLAssetAndMasterByAddedDate]:Bi.Recents,[y.CPLMemoryIsFavoriteByCreateDate]:Bi.FavoriteMemories,[y.CPLMemoryNotIsRejectedByCreateDate]:Bi.AllMemories,[y.CPLAssetAndMasterHiddenByAssetDate]:Bi.Hidden,[y.CPLAssetAndMasterDeletedByExpungedDate]:Bi.Deleted};function Zi(e){return Hi[e]}const Qi="/";var Yi,Ji,Xi;!function(e){e[e.Hidden=1]="Hidden",e[e.Published=2]="Published",e[e.NotAvailable=3]="NotAvailable"}(Yi||(Yi={})),(Ji||(Ji={})).isValidState=function(e){return!e||!!e.fields.enabled||e.fields.availabilityType===Yi.Published};class eo{constructor(){this._store={},this.listeners={}}get(e){return this._store[e]}set(e,t){const n=this._store[e];this._store[e]=t,this._notifyListeners(e,n,t)}_notifyListeners(e,t,n){const r=this.listeners[e];r&&r.forEach((e=>{e({currentValue:n,previousValue:t})}))}addListener(e,t){let n=this.listeners[e];return n||(n=new Set,this.listeners[e]=n),n.add(t),()=>this.removeListener(e,t)}removeListener(e,t){const n=this.listeners[e];n&&n.delete(t)}}!function(e){e.HasiCPL="hasiCPL",e.NoiCPL="noiCPL",e.Undetermined="undetermined"}(Xi||(Xi={}));class to extends eo{static get instance(){return this._instance||(this._instance=new to),this._instance}constructor(){super(),this.set("iCPLStatus",Xi.Undetermined)}}function no(e,t){return te.instance.cloudKitContainer?te.instance.cloudKitContainer.lookupRecords(e,t):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performLookupRequest",webService:"ckdatabasews"}))}to._instance=void 0;const ro=200;function io(e){return Promise.all(e).then((e=>{const t=[],n=[];for(const r of e){if(!r.ok)return r;r.value.errors&&n.push(...r.value.errors),t.push(...r.value.items)}return d.Result.success({items:t,errors:n||void 0})}))}function oo(e){const{databaseScope:t,zoneID:n,recordType:r,recordNames:i}=e;return function(e,t){const n=[...t.records],r=[];let i=n.length;for(;i>0;){const o=n.splice(0,ro);i=n.length,r.push(no(e,{records:o,zoneID:t.zoneID,desiredKeys:t.desiredKeys}))}return io(r)}(t,so(n,i)).then((t=>t.ok?yr.success(e,gr(t.value.items,r,n)):yr.failure(e,new u({errorCode:"NetworkRequestError",requestError:t.error}))))}function ao(e){const{databaseScope:t,zoneID:n,recordName:r}=e;return no(t,so(n,[r])).then((t=>function(e,t){const{zoneID:n,recordType:r}=t;if(!e.ok)return yr.failure(t,u.fromCloudKitContainerError(e.error));const i=mr(e.value.items,r,n);return i.ok?yr.success(t,i.value):yr.failure(t,i.error)}(t,e)))}function so(e,t){return{records:t.map((e=>({recordName:e}))),zoneID:e}}function co(e,t){if(!e.ok)return ce.instance.report("zoneStateLoadFailed"),yr.failure(t,u.fromCloudKitContainerError(e.error));const n=mr(e.value.items,w.CPLZoneState,t.zone);return n.ok?yr.success(t,n.value):"CloudKitServerError"===n.error.errorCode&&n.error.requestError&&"serverErrorCode"in n.error.requestError&&n.error.requestError.serverErrorCode===i.NOT_FOUND?yr.success(t,void 0):(ce.instance.report("zoneStateLoadFailed"),yr.failure(t,n.error))}const uo=C.z.object({moreComing:C.z.boolean().optional(),zones:C.z.array(O)});function lo(e){const{databaseScope:t,includeCMMs:n=!1}=e;return function(e,t){return te.instance.cloudKitContainer?te.instance.cloudKitContainer.listZones(e,t?{requestInit:{headers:[["X-Apple-Internal-IncludeCMMZones","true"]]}}:void 0):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performListZonesRequest",webService:"ckdatabasews"}))}(t,n).then((t=>po(t,e)))}function po(e,t){if(!e.ok)return yr.failure(t,u.fromCloudKitContainerError(e.error));const n=uo.safeParse(e.value.body);return n.success?yr.success(t,n.data.zones.filter((e=>!e.deleted))):yr.failure(t,u.fromParseError(new l("ZoneResponse",n.error)))}function fo(e){const{zone:t}=e,n=(r=t,{query:{recordType:w.CheckIndexingState},zoneID:r});var r;return ze(Y.Private,n).then((t=>t.ok?yr.success(e,void 0):(ce.instance.report("indexingStateListFailed"),yr.failure(e,u.fromCloudKitContainerError(t.error)))))}function ho(e){const{itemListKeys:t,...n}=e,r=function(e,t){const n="goldilocksZones"in t;return{query:{recordType:b.HyperionIndexCountLookup,filterBy:[{fieldName:"indexCountID",comparator:xe.IN,fieldValue:{value:e.map((e=>function(e){if(e.cplIndex)return S(e.cplIndex);{const t=e.smartAlbum;return t===m.Bursts?"CPLAssetBurstStackAssetByAssetDate":`${S(y.CPLAssetAndMasterInSmartAlbumByAssetDate)}:${v[t]}`}}(e.indexID))),type:n?Ue.STRING_LIST:Le.STRING_LIST}}]},...n?{}:{zoneID:t.zoneID}}}(t,n);let i;if("goldilocksZones"in e){const t=[...e.goldilocksZones];i=()=>Or(r.query,r,t)}else i=()=>ze(e.databaseScope,{...r,zoneID:e.zoneID});return i().then((t=>mo(t,e)))}function mo(e,t){if(!e.ok)return yr.failure(t,u.fromCloudKitContainerError(e.error));const n=hr(e.value.items,w.IndexCountResult);return yr.success(t,n)}C.z.object({anonymousPublicAccess:C.z.object({token:C.z.string(),tokenTTL:C.z.number(),databasePartition:C.z.string(),resolvedPartitionNumber:C.z.number()}),rootRecord:$e,share:et,zoneID:_,databaseScope:C.z.string()});const go={zoneName:"PrimarySync",zoneType:Nn.RegularCustomZone};function vo(e){return e.then((e=>{if(!e.ok)throw e.error;return e.value}))}const yo=window.__CW_BUILD_INFO?`clientBuildNumber=${window.__CW_BUILD_INFO.buildNumber}&clientMasteringNumber=${window.__CW_BUILD_INFO.masteringNumber}`:"";function bo(e,t,n){return`${t}/database/1/com.apple.photos.cloud/production/${arguments.length>3&&void 0!==arguments[3]?arguments[3]:"private"}/${e}?remapEnums=true&getCurrentSyncToken=true${void 0!==n?`&dsid=${n}`:""}${yo?"&"+yo:""}`}const wo={headers:{"content-type":"text/plain"},method:"POST",credentials:"include"},So="____PhotosBootstrap",Co=`${So}Functions`,_o=`${So}AuthFunctions`;function Oo(e,t,n){return Eo(bo("zones/list",e,t,n),{method:"GET",credentials:"include"})}function Eo(e,t){return new Promise((n=>{fetch(e,t).then((e=>{n({ok:!0,value:e})})).catch((e=>{n({ok:!1,error:e})}))}))}let Io=!1;const Ao=6e4;function To(e,t,n){return new Promise((r=>{let i=!1;const o={getIndexCounts:void 0,listZonesPrivate:void 0,listZonesShared:void 0,getPrimarySyncZoneState:void 0},a=function(e,t){const n=window[Co];n&&(Io=!0);const r=Y.Private,i=vo(null!==n&&void 0!==n&&n.privateZones?n.privateZones:Oo(e,t,r));return J._handleRequestFailures(i).then((e=>e.ok?po(J._parseArrayRequestResult(e.value,"zones"),{databaseScope:r}):yr.failure({databaseScope:r},u.fromCloudKitContainerError(e.error))))}(e,t).then((e=>{if(o.listZonesPrivate=e,!e.ok)return i=!0,r(d.Result.failure({...o,reason:"Private Database Zones List failed"})),e;if(!i){const t=e.value;sr.instance.zoneStore.ingestZones(t,Y.Private)}return e})),s=function(e,t){const n=window[Co],r=Y.Shared,i=vo(null!==n&&void 0!==n&&n.sharedZones?n.sharedZones:Oo(e,t,r));return J._handleRequestFailures(i).then((e=>e.ok?po(J._parseArrayRequestResult(e.value,"zones"),{databaseScope:r}):yr.failure({databaseScope:r},u.fromCloudKitContainerError(e.error))))}(e,t).then((e=>{if(o.listZonesShared=e,!e.ok)return i=!0,r(d.Result.failure({...o,reason:"Shared Database Zones List failed"})),e;if(!i){const t=e.value;sr.instance.zoneStore.ingestZones(t,Y.Shared)}return e})),c=function(e,t){const n=window[Co],r=null!==n&&void 0!==n&&n.zoneState?n.zoneState:function(e,t){return Eo(bo("records/lookup",e,t),{body:JSON.stringify({records:[{recordName:"PrimarySync-0000-ZS"}],zoneID:go}),...wo})}(e,t),i=vo(r),o=Y.Private;return J._handleRequestFailures(i).then((e=>e.ok?co(J._parseArrayRequestResult(e.value,"records"),{databaseScope:o,zone:go}):yr.failure({databaseScope:o,zone:go},u.fromCloudKitContainerError(e.error))))}(e,t).then((e=>{if(o.getPrimarySyncZoneState=e,!e.ok)return i=!0,r(d.Result.failure({...o,reason:"PrimarySync Zone State failed"})),e;if(i)return e;const t=e.value;return null!==t&&void 0!==t&&t.fields.disabledTime&&to.instance.set("iCPLExitedDate",t.fields.disabledTime),Ji.isValidState(t)?d.Result.success():d.Result.failure("InvalidPrimarySyncZone")})),l=function(e,t){const n=window[Co],r=null!==n&&void 0!==n&&n.indexCount?n.indexCount:function(e,t){return Eo(bo("records/query",e,t),{body:JSON.stringify({query:{recordType:"HyperionIndexCountLookup",filterBy:[{fieldName:"indexCountID",comparator:"IN",fieldValue:{value:["CPLAssetByAssetDateWithoutHiddenOrDeleted"],type:"STRING_LIST"}}]},zoneID:go}),...wo})}(e,t),i=vo(r),o={databaseScope:Y.Private,itemListKeys:[{indexID:{cplIndex:y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted},goldilocksZones:[go],direction:Fe.Descending}],zoneID:go};return J._handleRequestFailures(i).then((e=>e.ok?mo(J._parseArrayRequestResult(e.value,"records"),o):yr.failure(o,u.fromCloudKitContainerError(e.error))))}(e,t).then((e=>(o.getIndexCounts=e,e.ok||(i=!0,r(d.Result.failure({...o,reason:"Index Count failed"}))),e)));let p;n||(p=function(e,t){const n=window[Co],r=null!==n&&void 0!==n&&n.assetsAndMasters?n.assetsAndMasters:function(e,t){return Eo(bo("records/query",e,t),{body:JSON.stringify({query:{recordType:"CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted",filterBy:[{fieldName:"direction",comparator:"EQUALS",fieldValue:{value:"DESCENDING",type:"STRING"}}]},zoneID:go,resultsLimit:18}),...wo})}(e,t),i=vo(r),o={databaseScope:Y.Private,key:{indexID:{cplIndex:y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted},goldilocksZones:[go],direction:Fe.Descending},zoneID:go,limit:18};return J._handleRequestFailures(i).then((e=>e.ok?Ir(J._parseArrayRequestResult(e.value,"records"),o):yr.failure(o,u.fromCloudKitContainerError(e.error))))}(e,t)),Promise.all([l,a,s,c]).then((e=>{if(i)return;const[t,n,a,s]=e;if(!t.ok||!n.ok||!a.ok||!s.ok)return i=!0,void r(d.Result.failure({...o,reason:"Zone State is invalid"}));if(!t.value.length||!t.value[0].isOK||!sr.instance.zoneStore.primarySyncZone||!t.value[0].model.zoneID||!jn.isZoneIDEqual(t.value[0].model.zoneID,sr.instance.zoneStore.primarySyncZone.zoneID))return void r(d.Result.failure({...o,reason:"Index count zoneID does not match"}));if(void 0===t.value[0].model.fields.itemCount)return void r(d.Result.failure({...o,reason:"No index count result"}));const c={indexID:{cplIndex:y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted},goldilocksZones:[sr.instance.zoneStore.primarySyncZone.zoneID],direction:Fe.Descending};if(sr.instance.listStore.initializeListItemsWithCount(c,t.value[0].model.fields.itemCount),p){const e=e=>{if(sr.instance.zoneStore.primarySyncZone&&e.ok&&e.value.assetResponse.length&&e.value.assetResponse[0].isOK&&t.value.length&&t.value[0].isOK&&void 0!==t.value[0].model.fields.itemCount&&jn.isZoneIDEqual(e.value.assetResponse[0].model.zoneID,sr.instance.zoneStore.primarySyncZone.zoneID)){for(const t of e.value.masterResponse)t.isOK&&sr.instance.masterStore.set(pr.getKey(t.model),t.model);const n=function(e,t){const n=t<=e.length,r=[...e],i=n?r:function(e){const t=[...e];if(t.length<=1)return[];for(let n=0;n<t.length-1;n++){const e=t[n],r=t[n+1];if(e.isOK&&r.isOK&&void 0!==e.model.fields.assetDate&&void 0!==r.model.fields.assetDate&&r.model.fields.assetDate-e.model.fields.assetDate>=Ao)return t.splice(0,n+1),t}return[]}(r);return function(e){const t=[...e];return t.length<=1||t.sort(((e,t)=>{if(!e.isOK||!t.isOK)return 0;const n=Br.getAssetDate(e.model),r=Br.getAssetDate(t.model);return void 0===n||void 0===r?0:n-r})),t}(i)}(e.value.assetResponse.reverse(),t.value[0].model.fields.itemCount);if(n.length>0){const e=n.map((e=>(e.isOK&&sr.instance.assetStore.set(pr.getKey(e.model),e.model),e&&e.isOK?pr.getKey(e.model):void 0)));sr.instance.listStore.updateListItemsAtIndex(c,e,t.value[0].model.fields.itemCount-n.length)}}};p.then(e)}i=!0,r(d.Result.success(o))}))}))}var Po,Ro;!function(e){e.AuthenticationFailure="AuthenticationFailure",e.ApplicationMountFailure="ApplicationMountFailure",e.NetworkError="NetworkError"}(Po||(Po={})),function(e){e.NoPrimarySyncZone="NoPrimarySyncZone",e.InvalidPrimarySyncZone="InvalidPrimarySyncZone",e.DisabledPrimarySyncZone="DisabledPrimarySyncZone",e.NetworkFailure="NetworkFailure"}(Ro||(Ro={}));const ko=5e3;function Do(e){return e.ckdatabasewsURL&&e.dsid?(Z.start(),To(e.ckdatabasewsURL,e.dsid).then((e=>{var t,n;if(e.ok&&sr.instance.zoneStore.primarySyncZone)return ce.instance.report("startupSucceeded",{type:"parallel",usedBootstrap:Io}),d.Result.success({primarySync:sr.instance.zoneStore.primarySyncZone,sharedSync:sr.instance.zoneStore.sharedSyncZone});const r=e.ok?e.value:e.error,i=null!==(t=r.listZonesPrivate)&&void 0!==t&&t.ok?r.listZonesPrivate:lo({databaseScope:Y.Private}).then((e=>{if(e.ok){const t=e.value;sr.instance.zoneStore.ingestZones(t,Y.Private)}return e})),o=null!==(n=r.listZonesShared)&&void 0!==n&&n.ok?r.listZonesShared:lo({databaseScope:Y.Shared}).then((e=>{if(e.ok){const t=e.value;sr.instance.zoneStore.ingestZones(t,Y.Shared)}return e}));return Promise.all([i,o]).then((t=>{for(const e of t)if(!e.ok)return Promise.resolve(d.Result.failure(Ro.NetworkFailure));const n=sr.instance.zoneStore.primarySyncZone,r=sr.instance.zoneStore.sharedSyncZone;return n?function(e){const{zone:t,databaseScope:n}=e;return no(n,so(t,[L])).then((t=>co(t,e)))}({databaseScope:Y.Private,zone:n.zoneID}).then((t=>{if(!t.ok)return d.Result.failure(Ro.NetworkFailure);const i=t.value;return null!==i&&void 0!==i&&i.fields.disabledTime&&to.instance.set("iCPLExitedDate",i.fields.disabledTime),Ji.isValidState(i)?(ce.instance.report("startupSucceeded",{type:"sequential",reason:e.ok?"Unknown":e.error.reason,usedBootstrap:!1}),d.Result.success({primarySync:n,sharedSync:r})):null!==i&&void 0!==i&&i.fields.enabled?d.Result.failure(Ro.InvalidPrimarySyncZone):d.Result.failure(Ro.DisabledPrimarySyncZone)})):Promise.resolve(d.Result.failure(Ro.NoPrimarySyncZone))}))})).then((e=>(ce.instance.reportWaterfall(),e.ok?(to.instance.set("iCPLStatus",Xi.HasiCPL),sr.instance.zoneStore.sharedSyncZone&&jn.isExitSharedSyncZone(sr.instance.zoneStore.sharedSyncZone)&&to.instance.set("sharedLibraryWasExited",!0),setTimeout((()=>{if(fo({zone:e.value.primarySync.zoneID}),e.value.sharedSync){const t=e.value.sharedSync.zoneID;sr.instance.zoneStore.getDatabaseScopeForZoneID(t)===Y.Private&&fo({zone:t})}}),ko)):(to.instance.set("iCPLStatus",Xi.NoiCPL),e.error===Ro.NoPrimarySyncZone?ce.instance.report("iCPLstat",{type:"enabled:no_viable_zone"}):e.error===Ro.DisabledPrimarySyncZone?ce.instance.report("iCPLstat",{type:"disabled:previously_enabled"}):e.error===Ro.InvalidPrimarySyncZone&&ce.instance.report("iCPLstat",{type:"not_enabled"})),e)))):Promise.resolve(d.Result.failure(Po.AuthenticationFailure))}let Mo,No,xo;function Lo(){if(Mo)return Mo;const e=te.instance.dsid,t=function(e){if(e)try{const t=e("ckdatabasews");if(t)return oe(t)}catch{}return de()?"https://ckdatabasews.icloud.com.cn":"https://ckdatabasews.icloud.com"}((e=>te.instance.urlForServiceName(e)));if(!e||!t){const e=new Ae({errorCode:ye.ConfigureNotCalled,message:"The `configure` function was not called."});return ke(Ie.tile_configureNotCalled,e),Promise.resolve(d.Result.failure(e))}return Mo=Do({ckdatabasewsURL:t,dsid:e,skipLibraryAssets:!0}).then((e=>{if(!e.ok){let t;switch(e.error){case"InvalidPrimarySyncZone":case"NoPrimarySyncZone":t=new Ae({errorCode:ye.NoPrimarySyncZone,message:"No PrimarySync Zone found."});break;default:t=new Ae({errorCode:Ee.NetworkFailure,message:"Failed startup due to network error."})}return d.Result.failure(t)}const{sharedSync:t,primarySync:n}=e.value;let r=!1;if(t&&(r=jn.isExitSharedSyncZone(t)),!n){const e=new Ae({errorCode:ye.NoPrimarySyncZone,message:"No PrimarySync Zone found."});return d.Result.failure(e)}const i={primarySync:{zone:n,scope:sr.instance.zoneStore.getDatabaseScopeForZoneID(n.zoneID)}};return r&&t?i.exit={zone:t,scope:sr.instance.zoneStore.getDatabaseScopeForZoneID(t.zoneID)}:t&&(i.sharedSync={zone:t,scope:sr.instance.zoneStore.getDatabaseScopeForZoneID(t.zoneID)}),d.Result.success(i)})),Mo}!function(e){e.UserAlbum="PhotosTileList.UserAlbum",e.SharedAlbum="PhotosTileList.SharedAlbum",e.Library="PhotosTileList.Library",e.Favorites="PhotosTileList.Favorites",e.Recents="PhotosTileList.Recents"}(No||(No={})),function(e){e.MyAlbums="PhotosTileFolder.MyAlbums",e.SharedAlbums="PhotosTileFolder.SharedAlbums",e.MediaTypeAlbums="PhotosTileFolder.MediaTypeAlbums",e.UserFolder="PhotosTileFolder.UserFolder"}(xo||(xo={}));const jo=g;function Uo(e){return e===No.Library||e===No.Favorites||e===No.Recents||"object"===typeof e&&"type"in e&&"recordKey"in e&&(e.type===No.UserAlbum||e.type===No.SharedAlbum)}function Fo(e){return"string"===typeof e.key?{locKey:e.key}:{name:e.name}}function zo(e){return"string"!==typeof e&&e.type===No.UserAlbum}function Bo(e){return"string"!==typeof e&&e.type===No.SharedAlbum}function Ko(e){return"string"===typeof e&&(t=e,g.includes(t));var t}const Ho=C.z.object({firstname:C.z.string(),subscriptiondate:C.z.number().or(C.z.string()).transform($o),invitationguid:C.z.string(),personid:C.z.string(),fullname:C.z.string(),sharingtype:C.z.string(),email:C.z.string(),lastname:C.z.string(),phonenumbers:C.z.array(C.z.object({phonenumber:C.z.string(),invitationtoken:C.z.string()}))}).partial(),Wo=C.z.array(Ho),qo=C.z.object({allowcontributions:C.z.string(),name:C.z.string(),ispublic:C.z.string(),creationDate:C.z.number().or(C.z.string()).transform($o)}).partial(),Vo=C.z.object({albumlocation:C.z.string(),albumctag:C.z.string(),personid:C.z.string(),firstname:C.z.string(),fullname:C.z.string(),appleid:C.z.string(),publicurl:C.z.string(),attributes:qo,sharingtype:C.z.string(),hasfailure:C.z.string(),publictoken:C.z.string(),failedinvitations:C.z.array(C.z.object({invitationguid:C.z.string(),reason:C.z.string()})),lastModified:C.z.number(),requiresminimumos:C.z.boolean(),_deleted:C.z.boolean()}).partial().merge(C.z.object({albumguid:C.z.string(),ownerdsid:C.z.string()}));function $o(e){if(void 0!==e){if("string"===typeof e){const t=new Date(e).getTime();return isNaN(t)?void 0:t}return e}}function Go(e,t,n){const r=e.safeParse(t.body);if(r.success)return d.Result.success(r.data);{const e=u.fromParseError(new l(n,r.error));return ce.instance.report("sharedAlbumRequestParseFailed",{endpoint:n,errorMessage:e.message}),d.Result.failure(e)}}C.z.object({albumguid:C.z.string(),attributes:qo.optional(),sharinginfo:Wo});const Zo=C.z.object({albums:C.z.array(Vo.merge(C.z.object({sharinginfo:Wo.optional()}))),callerId:C.z.string().optional(),rootctag:C.z.string().optional()});function Qo(e){const t={albumguids:[e.albumGUID]};return he({endpoint:ie.getAlbum,payload:t,useDSIDBaseURL:!0}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=Go(Zo,t.value,ie.getAlbum);if(!n.ok)return yr.failure(e,n.error);const r=n.value.albums.length;if(1!==r)return yr.failure(e,new u({errorCode:"WrongNumberOfModels",message:`Expected 1 valid SharedAlbum in result, got ${r}`}));const{sharinginfo:i,...o}=n.value.albums[0];return yr.success(e,{sharedAlbum:o,sharingInfo:i,callerId:n.value.callerId,rootCTag:n.value.rootctag})}))}function Yo(e,t,n){const r=jn.createSharedAlbumFakeZoneFromGUID(e.guid);let i,o;if(n&&"recordName"in n){const e=mr([{item:n,isError:!1}],w.CPLMaster,r);e&&e.ok&&(i=e.value)}if(t&&"recordName"in t){const e=mr([{item:t,isError:!1}],w.CPLAsset,r);e.ok&&(o=e.value,void 0===o.fields.assetDate&&i&&(o.fields.assetDate=i.fields.originalCreationDate),void 0===o.fields.assetDateEnc&&i&&(o.fields.assetDateEnc=i.fields.originalCreationDateEnc))}if(o&&i)return{asset:o,master:i}}const Jo=C.z.object({albums:C.z.array(C.z.object({albumguid:C.z.string(),keyAsset:kt.or(C.z.object({})).optional(),keyMaster:Ht.or(C.z.object({})).optional()}).or(C.z.object({albumguid:C.z.string(),httpstatus:C.z.string(),reason:C.z.string()})))}),Xo={};function ea(e){const t=Mi.instance.albumStore.get({guid:e,isSharedAlbumKey:!0});return ji.getLocationURL(t)}var ta,na;function ra(e,t){return e?{clientOrgKey:e,...t}:t}function ia(e){const{key:t,startRank:n,endRank:r,albumCTag:i,clientOrgKey:o,...a}=e,s=i?{albumctag:i}:void 0,c=ra(o,{albumguid:t.guid,offset:`${n}`,limit:`${r+1}`,...s});return he({endpoint:ie.getAssets,payload:c,...a}).then((n=>{if(!n.ok)return yr.failure(e,n.error);const r=J._parseArrayRequestResult(n.value,"records");if(!r.ok)return yr.failure(e,u.fromCloudKitContainerError(r.error));const i=jn.createSharedAlbumFakeZoneFromGUID(t.guid),o=r.value.items,a=gr(o,w.CPLMaster,i),s=gr(o,w.CPLAsset,i),c={},l={};for(const e of a)e.isOK&&(c[e.model.recordName]=e.model.fields.originalCreationDate,l[e.model.recordName]=e.model.fields.originalCreationDateEnc);return s.forEach((e=>{if(e.isOK){const{assetDateEnc:t,assetDate:n,masterRef:r}=e.model.fields;void 0===n&&null!==r&&void 0!==r&&r.recordName&&(e.model.fields.assetDate=c[r.recordName]),void 0===t&&null!==r&&void 0!==r&&r.recordName&&(e.model.fields.assetDateEnc=l[r.recordName])}})),yr.success(e,{masterResponse:a,assetResponse:s})}))}function oa(e){const{albums:t,...n}=e,r=function(e,t){const n="goldilocksZones"in e;return{query:{recordType:b.HyperionIndexCountLookup,filterBy:{fieldName:"indexCountID",comparator:xe.IN,fieldValue:{value:t?t.map((e=>e.fields.albumType===na.Folder?`CPLAlbumNotDeleted:${e.recordName}`:`CPLContainerRelationNotDeletedByAssetDate:${e.recordName}`)):["CPLAlbumNotDeleted:"],type:n?Ue.STRING_LIST:Le.STRING_LIST}}},...n?{}:{zoneID:e.zoneID}}}(n,t);let i;if("goldilocksZones"in e){const t=[...e.goldilocksZones];i=()=>Or(r.query,r,t)}else i=()=>ze(e.databaseScope,{...r,zoneID:e.zoneID});return i().then((t=>t.ok?yr.success(e,hr(t.value.items,w.IndexCountResult)):yr.failure(e,u.fromCloudKitContainerError(t.error))))}function aa(e,t){const n=function(e){if(!e.ok)return e;const t=e.value;return d.Result.success(t.map((e=>e.isOK?e.model:void 0)))}(e);return n.ok?1===n.value.length&&n.value[0]?d.Result.success(n.value[0]):d.Result.failure(new u({errorCode:"WrongNumberOfModelsInResult",message:`Expected 1 valid ${t} in result, got ${n.value.length}`})):n}function sa(e){const{zoneID:t,databaseScope:n,assetRecordNames:r}=e;return oo({databaseScope:n,zoneID:t,recordType:w.CPLAsset,recordNames:r}).then((r=>{if(!r.ok)return yr.failure(e,r.error);const i=r.value,o=i.map((e=>{var t;return e.isOK&&null!==(t=e.model.fields.masterRef)&&void 0!==t&&t.recordName?e.model.fields.masterRef.recordName:void 0})).filter((e=>!!e));return oo({databaseScope:n,zoneID:t,recordType:w.CPLMaster,recordNames:o}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=i.map((e=>e.isOK?e.model:void 0)).filter(xn),r=t.value.map((e=>e.isOK?e.model:void 0)).filter(xn);return 0===n.length?yr.failure(e,new u({errorCode:"WrongNumberOfModelsInResult",message:"No CPL assets returned from getCPLAssetsAndMastersByRecordNames"})):yr.success(e,{assets:n,masters:r})}))}))}function ca(e){const{zoneIDAndDatabaseScopes:t,assetRecordNames:n}=e,r=[];for(const i of t){const{zoneID:t,databaseScope:o}=i,a=sa({databaseScope:o,zoneID:t,assetRecordNames:n}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const{assets:n,masters:r}=t.value,i=n.filter((e=>void 0!==e&&1!==e.fields.isSparsePrivateRecord));return yr.success(e,{assets:i,masters:r})}));r.push(a)}return Promise.all(r).then((t=>{const n=[],r=[];if(1===t.length)return t[0];for(const e of t)e.ok&&(n.push(...e.value.assets),r.push(...e.value.masters));return yr.success(e,{assets:n,masters:r})}))}function ua(e){const t=sr.instance.zoneStore.getAllAvailableSyncZonesAndDatabaseScopes(),n=[];for(const r of e){const e=r.fields.keyAsset_decoded;e&&n.push(e)}return ca({zoneIDAndDatabaseScopes:t,assetRecordNames:n}).then((t=>{if(t.ok){const n={},{assets:r,masters:i}=t.value;for(const e of i)sr.instance.masterStore.set(e,e);for(const e of r)n[e.recordName]=e;e.forEach((e=>{const t=e.fields.keyAsset_decoded;if(t){const r=n[t];if(r&&!r.fields.isDeleted){e.fields.keyAsset_zoneID=r.zoneID;const t=pr.getKey(r);return void sr.instance.assetStore.set(t,r)}}e.fields.keyAsset_decoded=void 0,e.fields.keyAsset_zoneID=void 0}))}}))}!function(e){e.log=function(){},e.warn=function(){},e.error=function(){}}(ta||(ta={})),function(e){e[e.Normal=0]="Normal",e[e.Smart=1]="Smart",e[e.Face=2]="Face",e[e.Folder=3]="Folder",e[e.PredefinedSmart=4]="PredefinedSmart",e[e.Referencing=5]="Referencing",e[e.UserSmart=6]="UserSmart",e[e.Project=7]="Project"}(na||(na={}));const la={};function da(e){const{cplMemoryKey:t,forceNetworkUpdate:n}=e,r=t.zoneID,i=sr.instance.memoriesStore.get(t),o={recordName:t.recordName,isMemoryItemListKey:!0,goldilocksZones:[t.zoneID]},a=sr.instance.listStore.getListItems(o),s=sr.instance.listStore.needsLoad(o);if(i&&a&&!s&&!n)return{isLoading:!1,promise:Promise.resolve(d.Result.success(a)),data:a};const c=sr.instance.zoneStore.getDatabaseScopeForZoneID(r);if(!c)return{isLoading:!1,promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database found for zone in hydrateCPLMemoryAssets"})))};const l=Un.recordKeyString(t);let p=la[l];return p?{isLoading:!0,promise:p}:function(e){const{cplMemoryKey:t,databaseScope:n,existingGetCKRecordsPromise:r}=e,i=sr.instance.memoriesStore.get(t),o=e=>{let n=!0;return function(e){return new Promise((t=>{var n;const r=null===(n=e.fields.resCustomUserAssetList)||void 0===n?void 0:n.downloadURL;if(!r)return t(d.Result.success(void 0));fetch(r).then((e=>{e.arrayBuffer().then((e=>{if(e)try{const n=new Uint8Array(e),r=wn.decode(n);if(r){const e=un.safeParse(r.asset);if(e.success&&e.data.length>0){const n=e.data.map((e=>e.assetIdentifier));t(d.Result.success(n))}}}catch(n){ce.instance.report("memoryHydrationCKAssetParsingFailed"),d.Result.failure(new u({errorCode:"MissingAssetsListForMemory",message:"Failed parsing for the downloadURL assets"}))}t(d.Result.success(void 0))}))})).catch((()=>{ce.instance.report("memoryHydrationCKAssetFetchFailed"),t(d.Result.failure(new u({errorCode:"MissingAssetsListForMemory",message:"Fetch asset list from downloadURL failed"})))}))}))}(e).then((r=>{let i;if(r.ok&&r.value)i=r.value,n=!1;else{const t=function(e){if(!e.fields.assetList_decoded)return d.Result.failure(new u({errorCode:"MissingAssetsListForMemory",message:"No assets list found for the CPLMemory"}));const t=e.fields.assetList_decoded,n=[],r=[];for(let a=0;a<t.length;a++){const e=t[a];var i,o;e.assetIdentifier&&(null!==(i=e.assetFlag)&&void 0!==i&&i.isUserCurated&&n.push(e.assetIdentifier),null!==(o=e.assetFlag)&&void 0!==o&&o.isCurated&&r.push(e.assetIdentifier))}return 0!==n.length?d.Result.success(n):d.Result.success(r)}(e);if(!t.ok)return d.Result.failure(t.error);i=t.value}const o=sr.instance.getGoldilocksZonesAndDatabaseScopes();return ca({zoneIDAndDatabaseScopes:o,assetRecordNames:i}).then((r=>{if(!r.ok)return ce.instance.report("memoryHydrationOfAssetsFailed"),d.Result.failure(r.error);const i=(()=>{if(!e.fields.keyAsset_decoded||!e.fields.keyAsset_zoneID)return!0;{const t=sr.instance.assetStore.get({recordName:e.fields.keyAsset_decoded,zoneID:e.fields.keyAsset_zoneID});if(null!==t&&void 0!==t&&t.fields.isDeleted)return!0}return!1})(),o=((e,n,r,i)=>{sr.instance.setAssetsAndMasters({assets:n,masters:r});const o=n.filter((e=>{const t=Br.getMasterRefRecordKey(e),n=t&&void 0!==sr.instance.masterStore.get(t),r=e.fields.isDeleted&&1===e.fields.isDeleted,i=e.fields.isHidden&&1===e.fields.isHidden;return!r&&!i&&n}));i&&o.sort(((e,t)=>(Br.getAssetDate(e)||0)-(Br.getAssetDate(t)||0)));const a=o.findIndex((t=>t.recordName===(null===e||void 0===e?void 0:e.fields.keyAsset_decoded)));if(a>0){const e=o[a];o.splice(a,1),o.unshift(e)}const s=o.map((e=>pr.getKey(e)));ce.instance.report("memoryHydrationSuccess",{numItems:j(s.length)});const c={recordName:t.recordName,isMemoryItemListKey:!0,goldilocksZones:[t.zoneID]};return sr.instance.listStore.initializeListItemsWithArray(c,s),s})(e,r.value.assets,r.value.masters,n);if(i&&o.length>0){const n={...e};n.fields={...e.fields},n.fields.keyAsset_decoded=o[0].recordName,n.fields.keyAsset_zoneID=o[0].zoneID,sr.instance.memoriesStore.set(t,n)}return d.Result.success(o)}))}))};let a;a=i?o(i):(r||ao({databaseScope:n,zoneID:t.zoneID,recordType:w.CPLMemory,recordName:t.recordName})).then((e=>{if(e.ok){const n=e.value;return sr.instance.memoriesStore.set(t,n),ua([n]).then((()=>o(n)))}return e}));const s=Un.recordKeyString(t);return la[s]=a,a.then((()=>{delete la[s]})),{isLoading:!0,promise:a}}({cplMemoryKey:t,databaseScope:c})}const pa=C.z.object({albumassetcount:C.z.number()});function fa(e){const{albumGUID:t,...n}=e,r={albumguid:t};return he({endpoint:ie.getCount,payload:r,...n}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=Go(pa,t.value,ie.getCount);return n.ok?yr.success(e,n.value.albumassetcount):yr.failure(e,n.error)}))}const ha={};function ma(e){const{listStore:t,zoneStore:n}=sr.instance,{itemListKey:r,force:i,skipListStoreUpdate:o}=e,a=t.getListItems(r);if(a&&!t.needsLoad(r)&&!i){const e=a.length;return{data:e,isLoading:!1,promise:Promise.resolve(d.Result.success(e))}}const s=Un.itemListKeyString(r);let c=ha[s];if(!c){var l;const e=null===(l=n.primarySyncZone)||void 0===l?void 0:l.zoneID;if(Un.isPublicSharedAlbumKey(r)){const e=(null===a||void 0===a?void 0:a.length)||0;return{data:e,isLoading:!1,promise:Promise.resolve(d.Result.success(e))}}if(Un.isSharedAlbumKey(r))return function(e,t,n){const r=ea(e.guid);if(r)return ga(e,t,r,n);return{isLoading:!0,promise:_a({albumKey:e}).promise.then((()=>{const r=ea(e.guid);return r?ga(e,t,r,n).promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumLocationURL",message:"Missing album location URL in hydrateListCount"})))}))}}(r,s,!!o);if(Un.isMyAlbumsListKey(r)){const i=e?n.getDatabaseScopeForZoneID(e):void 0;if(!i||!e)return{isLoading:!1,promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"Missing primaryZoneID or databaseScope in hydrateListCount for My Albums"})))};const a=oa({zoneID:e,databaseScope:i}).then((e=>{delete ha[s];const n=aa(e,w.CPLAlbum);if(n.ok){const e=n.value.fields.itemCount||0;return o||t.initializeListItemsWithCount(r,e),d.Result.success(e)}return d.Result.failure(n.error)}));return ha[s]=a,{isLoading:!0,promise:a}}const p=Un.isFolderItemListKey(r),f=Un.isMemoriesListKey(r),h=p||f?e:r.goldilocksZones[0],m=h?n.getDatabaseScopeForZoneID(h):void 0;if(!m||!h)return{isLoading:!1,promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database found for zone in hydrateListCount for a Folder"})))};if(Un.isMemoryItemListKey(r)){const{promise:e,data:t,isLoading:n}=da({cplMemoryKey:{recordName:r.recordName,zoneID:r.goldilocksZones[0]}});if(t)return{promise:Promise.resolve(d.Result.success(t.length)),isLoading:!1,data:t.length};{let t=e.then((e=>(delete ha[s],e.ok?d.Result.success(e.value.length):d.Result.failure(e.error))));return ha[s]=t,{promise:t,isLoading:n}}}let g;if(Un.isIndexListKey(r)||Un.isMemoriesListKey(r))g=Un.isNotRecentlyDeletedList(r)?ho(1===r.goldilocksZones.length?{databaseScope:m,zoneID:h,itemListKeys:[r]}:{itemListKeys:[r],goldilocksZones:r.goldilocksZones}).then((e=>aa(e,w.IndexCountResult))):function(e){const t=function(e){const t="goldilocksZones"in e;return{query:{recordType:b.CountItemsInIndex,filterBy:[{fieldName:"indexName",comparator:xe.EQUALS,fieldValue:{value:"CPLAssetDeletedByExpungedDate",type:Le.STRING}},{fieldName:"preset",comparator:xe.EQUALS,fieldValue:{value:"NOT_EXPUNGED_BY_DATE",type:Le.STRING}}]},...t?{}:{zoneID:e.zoneID}}}(e);let n;if("goldilocksZones"in e){const r=[...e.goldilocksZones];n=()=>Or(t.query,t,r)}else n=()=>ze(e.databaseScope,{...t,zoneID:e.zoneID});return n().then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const n=hr(t.value.items,w.ItemCount);return yr.success(e,n)}))}(1===r.goldilocksZones.length?{databaseScope:m,zoneID:h,itemListKeys:[r]}:{itemListKeys:[r],goldilocksZones:r.goldilocksZones}).then((e=>aa(e,w.ItemCount)));else{const{albumStore:e}=sr.instance,t={recordName:r.recordName,zoneID:h},n=e.get(t);g=n?oa({databaseScope:m,zoneID:h,albums:[n]}).then((e=>aa(e,w.IndexCountResult))):oo({databaseScope:m,zoneID:h,recordType:w.CPLAlbum,recordNames:[r.recordName]}).then((n=>{const r=aa(n,w.CPLAlbum);if(r.ok){const n=r.value;return e.set(t,n),oa({databaseScope:m,zoneID:h,albums:[n]}).then((e=>aa(e,w.IndexCountResult)))}return r}))}c=g.then((e=>{if(delete ha[s],e.ok){const n=e.value.fields;let a;return"count"in n?a=n.count:"itemCount"in n&&(a=n.itemCount),void 0===a?d.Result.failure(new u({errorCode:"NoValidCountModelsFromQuery",message:"No valid count result returned from hydrator query request"})):((t.needsLoad(r)||i)&&(o||t.initializeListItemsWithCount(r,a)),d.Result.success(a))}return e})),ha[s]=c}return{isLoading:!0,promise:c}}function ga(e,t,n,r){const i=fa({albumGUID:e.guid,...n}).then((n=>(delete ha[t],n.ok&&(r||sr.instance.listStore.initializeListItemsWithCount(e,n.value)),n)));return ha[t]=i,{promise:i,isLoading:!0}}const va={};function ya(e){const{albumKey:t,force:n}=e,r=Un.sharedAlbumKeyString(t),i=va[r];if(i&&!n)return{isLoading:!0,promise:i};const o=Mi.instance.keyAssetStore.get(t);if(o&&!n)return{isLoading:!1,data:o,promise:Promise.resolve(d.Result.success(o))};const a=ea(t.guid);let s;if(a){var c;const e=null===(c=Mi.instance.albumStore.get(t))||void 0===c?void 0:c.albumctag;s=ma({itemListKey:t}).promise.then((n=>{var i;if(n.ok&&!n.value)return delete va[r],d.Result.success(void 0);const o=n.ok?n.value-1:0,s=null===(i=Mi.instance.dbrMetadataStore.get(t))||void 0===i||null===(i=i.fields)||void 0===i?void 0:i.clientOrgKey;return ia({key:t,startRank:o,endRank:o,albumCTag:e,clientOrgKey:s,...a}).then((e=>{if(delete va[r],!e.ok)return d.Result.failure(e.error);const{assetResponse:n,masterResponse:i}=e.value;if(!e.value||0===n.length||0===i.length)return d.Result.success(void 0);if(n[0].isOK&&i[0].isOK){const e=n[0].model,r=i[0].model,o=pr.getKey(e);return sr.instance.masterStore.set(r,r),sr.instance.assetStore.set(e,e),Mi.instance.keyAssetStore.set(t,o),d.Result.success(o)}return d.Result.failure(new u({errorCode:"MissingKeyAssetMasterPair",message:"Key asset for shared album failed"}))}))}))}else s=Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumLocationURL",message:"Missing album location URL in getSharedAlbumPreviewImages"})));return va[r]=s,{data:void 0,isLoading:!0,promise:s}}function ba(e){const{albums:t,force:n}=e,r=[],i=[];for(const a of t){const e=Mi.instance.albumStore.get(a.sharedAlbumKey);e&&(ji.isOwned(e)?r.push(a):i.push(a))}const o=[];if(r.length>0){const e=function(e){const{albums:t,force:n}=e,r=t.map((e=>Un.sharedAlbumKeyString(e.sharedAlbumKey))).join(";"),i=Xo[r];if(i&&!n)return{isLoading:!0,promise:i};const o={},a=[];for(const c of t){const e=c.sharedAlbumKey,t=Mi.instance.keyAssetStore.get(e);t&&!n?o[Un.sharedAlbumKeyString(e)]=t:a.push(c)}if(0===a.length){const e=t.map((e=>o[Un.sharedAlbumKeyString(e.sharedAlbumKey)]));return{isLoading:!1,data:e,promise:Promise.resolve(d.Result.success(e))}}const s=function(e){const t={albumguids:e.albums.map((e=>e.sharedAlbumKey.guid))};return he({endpoint:ie.keyAsset,payload:t,useDSIDBaseURL:!0}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=Go(Jo,t.value,ie.keyAsset);if(!n.ok)return yr.failure(e,n.error);const r=[];for(let e=0;e<n.value.albums.length;e++){const t=n.value.albums[e];if("keyAsset"in t){const e={isSharedAlbumKey:!0,guid:t.albumguid},n={albumKey:e,assetAndMaster:Yo(e,t.keyAsset,t.keyMaster)};r.push(n)}}return yr.success(e,r)}))}({albums:a}).then((e=>{if(delete Xo[r],!e.ok)return d.Result.failure(e.error);for(const t of e.value){const{albumKey:e,assetAndMaster:n}=t;if(n){const t=pr.getKey(n.asset);sr.instance.masterStore.set(n.master,n.master),sr.instance.assetStore.set(n.asset,n.asset),Mi.instance.keyAssetStore.set(e,t),o[Un.sharedAlbumKeyString(e)]=t}}const n=t.map((e=>o[Un.sharedAlbumKeyString(e.sharedAlbumKey)]));return d.Result.success(n)}));return Xo[r]=s,{data:void 0,isLoading:!0,promise:s}}({albums:r,force:n});o.push(e.promise)}if(i.length>0)for(const a of i){const e=ya({albumKey:a.sharedAlbumKey,clientOrgKey:a.clientOrgKey,force:n});o.push(e.promise)}return{data:void 0,isLoading:!0,promise:Promise.all(o).then((e=>{let t=[];for(const n of e)n.ok&&(n.value?Array.isArray(n.value)?t=[...t,...n.value]:t.push(n.value):t.push(void 0));return t.length>0?d.Result.success(t):d.Result.failure(new u({errorCode:"MissingKeyAssetMasterPair",message:"No assets or masters returned from hydration of shared album key assets"}))}))}}const wa="DBRMetadata";const Sa={},Ca={};function _a(e){var t,n;const{albumKey:r,force:i}=e,o=Mi.instance.albumStore.get(r),a=Mi.instance.pendingAlbumStore.get(r),s=null===(t=Mi.instance.sharingInfoStore.get(r))||void 0===t?void 0:t.sharingInfo;if(!i&&s&&(o||a)){let e;if(o?e={sharedAlbum:o,sharingInfo:s}:a&&(e={pendingSharedAlbum:a,sharingInfo:s}),e)return{isLoading:!1,data:e,promise:Promise.resolve(d.Result.success(e))}}const c=Un.sharedAlbumKeyString(r),l=Ca[c];if(l&&!i)return{isLoading:!0,promise:l};const p=null===(n=Mi.instance.dbrMetadataStore.get(r))||void 0===n?void 0:n.fields.clientOrgKey,f=Qo({albumGUID:r.guid,clientOrgKey:p}).then((e=>e.ok&&!p&&e.value.sharedAlbum.requiresminimumos?(i||p||ce.instance.report("sharedAlbumRequiresClientOrgKey"),function(e){const{albumKey:t,isOwned:n,force:r}=e,i=Mi.instance.dbrMetadataStore.get(t),o=null===i||void 0===i?void 0:i.fields.clientOrgKey,a=o?{clientOrgKey:o}:void 0;if(a&&!r)return{data:a,isLoading:!1,promise:Promise.resolve(d.Result.success(a))};let s=Sa[t.guid];return s||(s=function(e){const{zoneID:t,databaseScope:n}=e;return function(e,t){return ve.instance.cloudKitContainer?ve.instance.cloudKitContainer.lookupRecords(e,t):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performFoundationDBLookupRequest",webService:"ckdatabasews"}))}(n,{records:[{recordName:wa}],zoneID:t,desiredKeys:["clientOrgKey"]}).then((n=>{if(!n.ok)return yr.failure(e,u.fromCloudKitContainerError(n.error));const r=mr(n.value.items,w.DBRMetadata,t);return r.ok?yr.success(e,r.value):yr.failure(e,r.error)}))}({databaseScope:n?Y.Private:Y.Shared,zoneID:{...jn.createSharedAlbumFakeZoneFromGUID(t.guid),zoneType:Nn.RegularCustomZone}}).then((e=>{if(!e.ok)return e;const n=e.value.fields.clientOrgKey;return n?(Mi.instance.dbrMetadataStore.set(t,e.value),d.Result.success({clientOrgKey:n})):d.Result.failure(new u({errorCode:"MissingClientOrgKey",message:"Missing clientOrgKey in hydrateSharedAlbumDBRMetadata"}))}))),{isLoading:!0,promise:s}}({albumKey:r,isOwned:ji.isOwned(e.value.sharedAlbum)}).promise.then((e=>{if(!e.ok)return d.Result.failure(e.error);const t=e.value.clientOrgKey;return Qo({albumGUID:r.guid,clientOrgKey:t}).then((e=>Oa(e,t)))}))):Oa(e,void 0)));return Ca[c]=f,f.finally((()=>{delete Ca[c]})),{data:void 0,isLoading:!0,promise:f}}function Oa(e,t){if(!e.ok)return d.Result.failure(e.error);const{sharedAlbum:n,rootCTag:r,callerId:i,sharingInfo:o=[]}=e.value,a={isSharedAlbumKey:!0,guid:n.albumguid},s=ji.isPendingAlbum(n);if(r&&(Mi.instance.rootctag=r),Mi.instance.signedInUserPersonId||(Mi.instance.signedInUserPersonId=i),s){const e={...n,sharinginfo:o};return Mi.instance.pendingAlbumStore.set(a,e),d.Result.success({pendingSharedAlbum:e,sharingInfo:o})}return Mi.instance.sharingInfoStore.set(a,{sharingInfo:o}),Mi.instance.albumStore.set(a,n),ba({albums:[{sharedAlbumKey:a,clientOrgKey:t}]}),d.Result.success({sharedAlbum:n,sharingInfo:o})}const Ea={};var Ia,Aa;(Aa=Ia||(Ia={})).DESIRED_POSITION_SPACING_ALBUM=2,Aa.MAX_POSITION_VALUE=Number.MAX_SAFE_INTEGER-1024,Aa.getDisplayName=function(e){var t;return null===(t=e.fields)||void 0===t?void 0:t.albumNameEnc_decoded},Aa.isFolder=function(e){return e.fields.albumType===na.Folder},Aa.isManuallySorted=function(e){return e.fields.sortType===h.Manual},Aa.listKeyFromAlbum=function(e,t){const n=pr.getKey(e);return Aa.isFolder(e)?{...n,isFolderItemListKey:!0}:{...n,goldilocksZones:t,isAlbumItemListKey:!0}},Aa.isAlbumUsable=function(e){var t;if(!e)return!1;if("----Root-Folder----"===e.recordName||e.recordName.startsWith("----"))return!1;const n=null===(t=e.fields)||void 0===t?void 0:t.albumType;return n===na.Normal||n===na.Folder},Aa.getPositionOfFirstAlbum=function(e){return e.reduce(((e,t)=>{const n=null===t||void 0===t?void 0:t.fields.position;return void 0===n?Aa.MAX_POSITION_VALUE:Math.min(e,n)}),Aa.MAX_POSITION_VALUE)},Aa.getPositionOfLastAlbum=function(e){return e.reduce(((e,t)=>{const n=null===t||void 0===t?void 0:t.fields.position;return void 0===n?0:Math.max(e,n)}),Aa.MAX_POSITION_VALUE)},Aa.getPositionGivenFirstPosition=function(e){return void 0===e?Aa.MAX_POSITION_VALUE:Math.max(e-Aa.DESIRED_POSITION_SPACING_ALBUM,0)};const Ta={[No.Library]:Ki,[No.Recents]:Bi.Recents,[No.Favorites]:Bi.Favorites};function Pa(){return function(){let e="";for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n){if(!i||i===Ki)continue;let t=i;t.charAt(0)===Qi&&(t=t.substring(1)),t.charAt(t.length-1)===Qi&&(t=t.substring(0,t.length-1)),e+=Qi+t}return e+=Qi,e}(...arguments)}function Ra(e){return"string"===typeof e?Ko(e)?Zi(e):Ta[e]:e.type===No.SharedAlbum?function(e){let t;if(Un.isIndexListKey(e)||Un.isMemoriesListKey(e)){const n=e.indexID;t=n.cplIndex?Gi[n.cplIndex]:Zi(n.smartAlbum)}else t=Un.isMyAlbumsListKey(e)?"MyAlbums":Un.isFolderItemListKey(e)?`${Wi.Folder}${zi}${e.recordName}`:Un.isSharedAlbumKey(e)?`${Wi.SharedAlbum}${zi}${e.guid}`:Un.isPublicSharedAlbumKey(e)?`${e.guid}`:`${Wi.Album}${zi}${e.recordName}`;return t}({isSharedAlbumKey:!0,guid:e.recordKey.recordName}):Vi(Wi.Album,e.recordKey)}function ka(e){if(!Ia.isFolder(e))return Da(e);const t=e.fields.albumNameEnc_decoded||"";return{isFolder:!0,key:{recordKey:{recordName:e.recordName,zoneID:e.zoneID},type:xo.UserFolder},name:t}}function Da(e){const t=e.fields.albumNameEnc_decoded||"",n={recordKey:{recordName:e.recordName,zoneID:e.zoneID},type:No.UserAlbum};return{isFolder:!1,key:n,name:t,launchRoute:Pa(Ra(n))}}function Ma(e){var t;const n={recordKey:{recordName:e.albumguid,zoneID:jn.createSharedAlbumFakeZoneFromGUID(e.albumguid)},type:No.SharedAlbum};return{key:n,launchRoute:Pa(Ra(n)),isFolder:!1,name:(null===(t=e.attributes)||void 0===t?void 0:t.name)||""}}function Na(e){const{albumKey:t,goldilocksKey:n,forceHydration:r}=e;if(n.goldilocksZones.length>1||!jn.isPrimarySyncZoneID(n.goldilocksZones[0])){const e=new Ae({errorCode:Ce.UserAlbumCountsSharedLibraryNotSupported,message:"Shared library counts are not supported in getUserAlbumCountForTile"});return ke(Ie.tile_getUserAlbumsCountFailed,e),Promise.resolve(d.Result.failure(e))}return function(e){const{albumRecordKey:t,forceNetworkUpdate:n}=e,r=sr.instance.albumStore.get(t);if(r&&!n)return{data:r,isLoading:!1,promise:Promise.resolve(d.Result.success(r))};{let e=Ea[Un.recordKeyString(t)];if(e)return{isLoading:!0,promise:e};{const n=sr.instance.zoneStore.getDatabaseScopeForZoneID(t.zoneID);return n?(e=function(e){const{databaseScope:t,zoneID:n,recordName:r}=e;return oo({databaseScope:t,zoneID:n,recordType:w.CPLAlbum,recordNames:[r]}).then((t=>function(e,t,n){if(!t.ok)return yr.failure(n,t.error);const r=t.value;if(1!==r.length)return yr.failure(n,new u({errorCode:"WrongNumberOfModels",message:"Unexpected response in validateSingleRecordResult for: "+e}));const i=r[0];if(!i.isOK){if("schemaError"in i){const t=i.schemaError;return yr.failure(n,new u({errorCode:"SchemaParsingError",schemaParsingError:new l(e,t)}))}return yr.failure(n,new u({errorCode:"MissingModelData",message:"Missing response in validateSingleRecordResult for: "+e}))}return yr.success(n,i.model)}(w.CPLAlbum,t,e)))}({databaseScope:n,...t}).then((e=>(e.ok&&sr.instance.albumStore.set(t,e.value),e))),{isLoading:!0,promise:e}):{data:void 0,isLoading:!1,promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database found for zone in CPLAlbum hydrator"})))}}}}({albumRecordKey:t,forceNetworkUpdate:r}).promise.then((e=>{if(!e.ok){const t=new Ae({errorCode:"WrongNumberOfModels"===e.error.errorCode?Ce.UserAlbumMissing:Ce.UserAlbumCountsLoadFailed,message:"Failed to load album in getUserAlbumCountForTile: "+e.error.message});return ke(Ie.tile_getUserAlbumsCountFailed,t),d.Result.failure(t)}const t=e.value;if(t.fields.isDeleted){const e=new Ae({errorCode:Ce.UserAlbumDeleted,message:"Failed to load album in getUserAlbumCountForTile because it is deleted"});return ke(Ie.tile_getUserAlbumsCountFailed,e),d.Result.failure(e)}return oa({albums:[t],zoneID:n.goldilocksZones[0],databaseScope:Y.Private}).then((e=>{if(!e.ok){const t=new Ae({errorCode:Ce.UserAlbumCountsLoadFailed,message:"Failed to load count in getUserAlbumCountForTile: "+e.error.message});return ke(Ie.tile_getUserAlbumsCountFailed,t),d.Result.failure(t)}const n=e.value[0];if(!n||!n.isOK||void 0===n.model.fields.itemCount){const e=new Ae({errorCode:Ce.UserAlbumCountsLoadFailed,message:"Invalid response in getUserAlbumCountForTile"});return ke(Ie.tile_getUserAlbumsCountFailed,e),d.Result.failure(e)}return Re(Ie.tile_getUserAlbumsCountSuccess),d.Result.success({itemsCount:n.model.fields.itemCount,album:t,assetList:Da(t)})}))}))}const xa=12,La=8,ja=400,Ua=1500;function Fa(e){const{library:t,assetListKey:n}=e,r=zo(n)||Bo(n)?Ne.Personal:t;return Lo().then((e=>{if(!e.ok)return ke(Ie.tile_getDerivativeUrlsStartupFailed,e.error),e;const{primarySync:t,sharedSync:i,exit:o,sharedSyncError:a}=e.value,s=[];if(Pe.setGetLibrary((()=>r)),r!==Ne.Personal&&r!==Ne.Both||s.push(za(t,n)),r===Ne.Shared||r===Ne.Both){const e=!o||i&&!a?i:o;if(void 0!==e)s.push(za(e,n));else{const e=new Ae({errorCode:we.SharedLibraryNotAvailable,message:"Shared library was requested, but does not exist"});ke(Ie.tile_getDerivativeUrlsFailed,e)}}return Promise.all(s).then((e=>{const t=function(e,t){const n=[],r={};for(let i=0;i<e.length;i++){const t=e[i];if(!t.ok)return t.error instanceof Ae?d.Result.failure(t.error):d.Result.failure(new Ae({photosError:t.error,errorCode:0===i?we.PrimarySyncDerivativeLoadFailed:we.SharedSyncDerivativeLoadFailed}));const{assetResponse:o,masterResponse:a}=t.value,s=a.find((e=>!e.isOK));if(s&&!s.isOK){let e;return e="schemaError"in s?u.fromParseError(new l(w.CPLMaster,s.schemaError)):"serverError"in s?u.fromCloudKitServerError(s.serverError):new u({errorCode:"MissingModelData",message:"Missing schemaError from parse failure in parseSingleCKRecord"}),d.Result.failure(new Ae({errorCode:we.DerivativeLoadParsingFailed,photosError:e}))}const c=o.find((e=>!e.isOK));if(c&&!c.isOK){let e;return e="schemaError"in c?u.fromParseError(new l(w.CPLMaster,c.schemaError)):"serverError"in c?u.fromCloudKitServerError(c.serverError):new u({errorCode:"MissingModelData",message:"Missing schemaError from parse failure in parseSingleCKRecord"}),d.Result.failure(new Ae({errorCode:we.DerivativeLoadParsingFailed,photosError:e}))}n.push(...o.map((e=>e.isOK?e.model:void 0)));for(const e of a.map((e=>e.isOK?e.model:void 0)))e&&(r[Un.recordKeyString({zoneID:e.zoneID,recordName:e.recordName})]=e)}return t===No.Recents?n.sort(((e,t)=>(e.fields.addedDate||0)-(t.fields.addedDate||0))):zo(t)?n.reverse():Bo(t)||n.sort(((e,t)=>(e.fields.assetDate||0)-(t.fields.assetDate||0))),d.Result.success({assets:n,masters:r})}(e,n);if(!t.ok)return ke(Ie.tile_getDerivativeUrlsFailed,t.error),t;const{assets:r,masters:i}=t.value,o=function(e,t,n){let r=!1;const i=e.map((e=>{var i;if(e.fields.isHidden)return void(r=!0);const o=null===(i=e.fields.masterRef)||void 0===i?void 0:i.recordName;if(o){const r=t[Un.recordKeyString({zoneID:e.zoneID,recordName:o})];if(r){const t=wi(e,r,ja),i=wi(e,r,Ua);if(t){const o={zoneID:e.zoneID,recordName:e.recordName};let a=!1;if(Bo(n)){const t={isSharedAlbumKey:!0,guid:n.recordKey.recordName},r=Mi.instance.albumStore.get(t),i=Mi.instance.sharingInfoStore.get(t);r&&i&&(a=!Fi(e,r,i.sharingInfo))}return{assetKey:o,tileUrl:t.url,oneUpUrl:(null===i||void 0===i?void 0:i.url)||t.url,originalWidth:r.fields.resOriginalWidth,originalHeight:r.fields.resOriginalHeight,date:e.fields.assetDate,title:e.fields.captionEnc_decoded,caption:e.fields.extendedDescEnc_decoded,dataClassType:r.fields.dataClassType,isFavorite:Boolean(e.fields.isFavorite),isDeleteForbidden:a,launchRoute:Pa(Ra(n),$i(o))}}}}})).filter((e=>void 0!==e)),o=i.length,a=Math.max(o-La,0);return{derivativeItems:i.slice(a,o),isLimitedDataset:i.length<La&&r}}(r,i,n);return Re(Ie.tile_derivativeLoadSuccess,{hasDerivatives:!!o.derivativeItems.length,hasMaxDerivatives:o.derivativeItems.length===La}),d.Result.success(o)}))})).catch((e=>{const t=new Ae({errorCode:Ee.GetDerivativeUrlsForTileException,message:`Unknown error in getDerivativeUrlsForTile: ${null===e||void 0===e?void 0:e.message}`,library:r,tileList:n});return ke(Ie.tile_getDerivativeUrlsFailed,t),d.Result.failure(t)}))}function za(e,t){return Bo(t)?function(e){const{albumGUID:t,numItems:n}=e,r={isSharedAlbumKey:!0,guid:t};return _a({albumKey:r}).promise.then((e=>{if(!e.ok){const t=new Ae({errorCode:we.SharedAlbumDerivativeLoadFailed,message:"Failed to load items in getSharedAlbumItemsForTile: "+e.error.message});return ke(Ie.tile_getDerivativeUrlsFailed,t),d.Result.failure(t)}return ma({itemListKey:r}).promise.then((t=>{var i,o;if(!t.ok){const e=new Ae({errorCode:we.SharedAlbumDerivativeLoadFailed,message:"Failed to load count in getSharedAlbumItemsForTile: "+t.error.message});return ke(Ie.tile_getDerivativeUrlsFailed,e),d.Result.failure(e)}const a=t.value;0===a&&d.Result.success([]);const s=null===(i=Mi.instance.albumStore.get(r))||void 0===i?void 0:i.albumctag,c=null===(o=Mi.instance.dbrMetadataStore.get(r))||void 0===o||null===(o=o.fields)||void 0===o?void 0:o.clientOrgKey;return ia({key:r,startRank:Math.max(0,a-n),endRank:a-1,albumCTag:s,clientOrgKey:c,...ji.getLocationURL(e.value.sharedAlbum)||{useDSIDBaseURL:!0}}).then((e=>{if(!e.ok){const t=new Ae({errorCode:we.SharedAlbumDerivativeLoadFailed,message:"Failed to load items in getSharedAlbumItemsForTile: "+e.error.message});return ke(Ie.tile_getDerivativeUrlsFailed,t),d.Result.failure(t)}return d.Result.success(e.value)}))}))}))}({albumGUID:t.recordKey.recordName,numItems:xa}):zo(t)?function(e){const{albumKey:t,goldilocksKey:n,numItems:r}=e;if(n.goldilocksZones.length>1||!jn.isPrimarySyncZoneID(n.goldilocksZones[0])){const e=new Ae({errorCode:we.UserAlbumDerivativesSharedLibraryNotSupported,message:"Shared library items are not supported in getUserAlbumItemsForTile"});return ke(Ie.tile_getUserAlbumsCountFailed,e),Promise.resolve(d.Result.failure(e))}return Na({albumKey:t,goldilocksKey:n,forceHydration:!1}).then((e=>{if(!e.ok){const t=new Ae({errorCode:we.UserAlbumDerivativeLoadFailed,message:"Failed to load album and count in getUserAlbumItemsForTile: "+e.error.message});return ke(Ie.tile_getDerivativeUrlsFailed,t),d.Result.failure(t)}const{album:i,itemsCount:o}=e.value,a=void 0!==(null===i||void 0===i?void 0:i.fields.sortType)?null===i||void 0===i?void 0:i.fields.sortType:h.CreationDate,s=a===h.CreationDate?Fe.Ascending:Fe.Descending;return function(e){if("goldilocksZones"in e)return Promise.resolve(yr.failure(e,new u({errorCode:"FederatedNotSupported",message:"Federated index queries not yet implemented"})));const{databaseScope:t,key:n,sortType:r,direction:i,startRank:o,limit:a,listLength:s}=e,c=function(e,t,n,r,i,o){const a=function(e){return e===h.Manual?y.CPLContainerRelationLiveByPosition:y.CPLContainerRelationLiveByAssetDate}(t);return{query:{recordType:a,filterBy:[{fieldName:"startRank",comparator:xe.EQUALS,fieldValue:{value:Er(r,n,o),type:Le.INT64}},{fieldName:"direction",comparator:xe.EQUALS,fieldValue:{value:r,type:Le.STRING}},{fieldName:"parentId",comparator:xe.EQUALS,fieldValue:{value:e.recordName,type:Le.STRING}}]},zoneID:e.zoneID,resultsLimit:i}}(n,r,o,i,a,s);return ze(t,c).then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const n=hr(t.value.items,w.CPLMaster),r=hr(t.value.items,w.CPLAsset),i=hr(t.value.items,w.CPLContainerRelation);return yr.success(e,{masterResponse:n,assetResponse:r,containerRelationResponse:i})}))}({key:{isAlbumItemListKey:!0,...t,...n},sortType:a,direction:s,startRank:0,limit:3*r,listLength:o,zoneID:n.goldilocksZones[0],databaseScope:Y.Private}).then((e=>{if(!e.ok){const t=new Ae({errorCode:we.UserAlbumDerivativeLoadFailed,message:"Failed to load items in getUserAlbumItemsForTile: "+e.error.message});return ke(Ie.tile_getDerivativeUrlsFailed,t),d.Result.failure(t)}return d.Result.success(e.value)}))}))}({numItems:xa,albumKey:t.recordKey,goldilocksKey:{goldilocksZones:[e.zone.zoneID]}}):function(e){const{key:t,limit:n,desiredKeys:r,...i}=e;let o;const a="goldilocksZones"in e;if(o="listLength"in e&&"startRank"in e?Ar(t,i,n,e.listLength,e.startRank,r):Ar(t,i,n,void 0,void 0,r),o.query.filterBy)for(const c of o.query.filterBy)if("startRank"===c.fieldName&&"number"===typeof c.fieldValue&&c.fieldValue<0)return ce.instance.report("invalidNegativeStartRankRequest"),Promise.resolve(yr.failure(e,new u({errorCode:"InvalidNegativeStartRankProvided",message:"Invalid negative start rank provided to getIndexItems"})));let s;return s=a?()=>Or(o.query,o,e.goldilocksZones):()=>ze(e.databaseScope,{...o,zoneID:e.zoneID}),s().then((t=>Ir(t,e)))}({databaseScope:e.scope,key:Ba(e,t),zoneID:e.zone.zoneID,limit:2*xa})}function Ba(e,t){const n=[e.zone.zoneID];let r={cplIndex:y.CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted},i=Fe.Descending;return Ko(t)?(r={smartAlbum:t},i=Fe.Ascending):t===No.Favorites?(r={smartAlbum:m.Favorites},i=Fe.Ascending):t===No.Recents&&(r={cplIndex:y.CPLAssetAndMasterByAddedDate},i=Fe.Ascending),{goldilocksZones:n,indexID:r,direction:i}}const Ka=D,Ha={key:No.Library,name:No.Library,launchRoute:Pa(Ki),isFolder:!1},Wa={key:No.Recents,name:No.Recents,launchRoute:Pa(Bi.Recents),isFolder:!1},qa={key:No.Favorites,name:No.Favorites,launchRoute:Pa(Bi.Favorites),isFolder:!1},Va=[Ha,Wa,qa],$a=[xo.SharedAlbums,xo.MyAlbums];function Ga(){return Lo().then((e=>{if(e.ok){const t=e.value.sharedSync||e.value.exit;return d.Result.success({albumFolders:$a,goldilocksLibraryAssetLists:Va,goldilocksLibraries:t?[Ne.Both,Ne.Personal,Ne.Shared]:[Ne.Personal]})}return d.Result.failure(e.error)}))}function Za(e){return e===No.Favorites?qa:e===No.Recents?Wa:Ha}function Qa(e){return function(e){const{zoneID:t,databaseScope:n}=e;return ao({databaseScope:n,zoneID:t,recordName:Ka,recordType:w.CPLLibraryInfo}).then((t=>t.ok?yr.success(e,t.value):(ce.instance.report("libraryInfoLoadFailed"),yr.failure(e,t.error))))}({databaseScope:e.scope,zoneID:e.zone.zoneID})}function Ya(e){return{isFolder:!1,key:e,name:e,launchRoute:Pa(Ra(e))}}function Ja(e,t,n){const r=[],{primarySync:i,sharedSync:o,exit:a,sharedSyncError:s}=e;if(n!==Ne.Both&&n!==Ne.Personal||r.push(ho(Xa(i,t))),n===Ne.Both||n===Ne.Shared){const e=!a||o&&!s?o:a;if(void 0!==e)r.push(ho(Xa(e,t)));else{const e=new Ae({errorCode:Ce.SharedLibraryNotAvailable,message:"Shared library was requested, but does not exist",library:n});ke(Ie.tile_getSmartAlbumCountsFailed,e)}}let c=0;return Promise.all(r).then((e=>{for(let t=0;t<e.length;t++){const r=e[t],o={errorCode:"zoneID"in r.args&&r.args.zoneID===i.zone.zoneID?Ce.PrimarySyncSmartAlbumCountsLoadFailed:Ce.SharedSyncSmartAlbumCountsLoadFailed,library:n};if(!r.ok){const e=new Ae({photosError:r.error,...o});return ke(Ie.tile_getSmartAlbumCountsFailed,e),d.Result.failure(e)}const a=r.value;if(!a.length||!a[0].isOK){const e=new Ae({message:"getSmartAlbumCount(): invalid response format",...o});return ke(Ie.tile_getSmartAlbumCountsFailed,e),d.Result.failure(e)}const s=a[0].model;c+=s.fields.itemCount||0}Re(Ie.tile_getSmartAlbumCountsSuccess,{count:j(c),smartAlbum:t,library:n});const r={itemsCount:c,assetList:t===m.Favorites?Za(No.Favorites):Ya(t)};return d.Result.success(r)}))}function Xa(e,t){const n={direction:Fe.Descending,goldilocksZones:[e.zone.zoneID],indexID:{smartAlbum:t,cplIndex:void 0}};return{databaseScope:e.scope,itemListKeys:[n],zoneID:e.zone.zoneID}}function es(e){const{assetListKey:t,library:n}=e;return Lo().then((e=>{if(!e.ok)return ke(Ie.tile_getCountsStartupFailed,e.error),e;const{primarySync:r,sharedSync:i}=e.value;if(Pe.setGetLibrary((()=>n)),Ko(t))return Ja(e.value,t,n);if(Bo(t))return function(e){const{albumGUID:t,forceHydration:n}=e;return _a({albumKey:{isSharedAlbumKey:!0,guid:t},force:n}).promise.then((e=>{if(!e.ok||!e.value.sharedAlbum){const t=e.ok?"No shared album found":e.error.message,n=new Ae({errorCode:Ce.SharedAlbumCountsLoadFailed,message:"Failed to load album in getSharedAlbumCountForTile: "+t});return ke(Ie.tile_getSharedAlbumsCountFailed,n),d.Result.failure(n)}const n=e.value.sharedAlbum;return fa({albumGUID:t,...ji.getLocationURL(n)||{useDSIDBaseURL:!0}}).then((e=>{if(!e.ok){const t=new Ae({errorCode:Ce.SharedAlbumCountsLoadFailed,message:"Failed to load count in getSharedAlbumCountForTile: "+e.error.message});return ke(Ie.tile_getSharedAlbumsCountFailed,t),d.Result.failure(t)}const t=e.value;return Re(Ie.tile_getSharedAlbumsCountSuccess),d.Result.success({itemsCount:t,assetList:Ma(n)})}))}))}({albumGUID:t.recordKey.recordName,forceHydration:!0});if(zo(t)){const e=function(e){const{primarySync:t,sharedSync:n,library:r}=e;let i;if(r===Ne.Both){if(!n)return;i=[t,n]}else if(r===Ne.Shared){if(!n)return;i=[n]}else i=[t];return{goldilocksZones:i}}({primarySync:r.zone.zoneID,sharedSync:null===i||void 0===i?void 0:i.zone.zoneID,library:n});if(!e){const e=new Ae({errorCode:Ce.SharedLibraryNotAvailable,message:"Shared library was requested, but does not exist",library:n});return ke(Ie.tile_getUserAlbumsCountFailed,e),d.Result.failure(e)}return Na({albumKey:t.recordKey,goldilocksKey:e,forceHydration:!0})}return t===No.Favorites?Ja(e.value,m.Favorites,n):function(e,t){return Lo().then((n=>{if(!n.ok)return ke(Ie.tile_getLibraryCountsStartupFailed,n.error),n;const{primarySync:r,sharedSync:i,exit:o,sharedSyncError:a}=n.value,s=[];if(t!==Ne.Both&&t!==Ne.Personal&&t||s.push(Qa(r)),t===Ne.Both||t===Ne.Shared){const e=!o||i&&!a?i:o;if(void 0!==e)s.push(Qa(e));else{const e=new Ae({errorCode:Ce.SharedLibraryNotAvailable,message:"Shared library was requested, but does not exist",library:t});ke(Ie.tile_getLibraryCountsFailed,e)}}let c=0,u=0,l=0;return Promise.all(s).then((n=>{for(let e=0;e<n.length;e++){const r=n[e];if(!r.ok){const n=new Ae({photosError:r.error,errorCode:0===e?Ce.PrimarySyncLibraryCountsLoadFailed:Ce.SharedSyncLibraryCountsLoadFailed,library:t});return ke(Ie.tile_getLibraryCountsFailed,n),d.Result.failure(n)}const i=r.value;c+=i.fields.photosCount||0,u+=i.fields.videosCount||0,l+=i.fields.othersCount||0,l+=i.fields.audiosCount||0}return Re(Ie.tile_libraryCountLoadSuccess,{count:j(c+u+l)}),d.Result.success({itemsCount:c+u+l,assetList:Za(e),breakdown:{photosCount:c,videosCount:u,othersCount:l}})}))})).catch((e=>{const n=new Ae({errorCode:Ee.GetLibraryCountsException,message:`Unknown error in getLibraryCounts: ${null===e||void 0===e?void 0:e.message}`,library:t});return ke(Ie.tile_getLibraryCountsFailed,n),d.Result.failure(n)}))}(t,n)}))}const ts=C.z.object({albums:C.z.array(Vo),rootctag:C.z.string().optional(),callerId:C.z.string().optional()});function ns(e){const{databaseScope:t,zoneID:n,parentRecordName:r}=e,i=function(e,t,n,r){const i={recordType:t};if(n){const e=[{fieldName:"parentId",comparator:xe.EQUALS,fieldValue:{value:n,type:Le.STRING}}];i.filterBy=e}let o={zoneID:e};return r&&(o={...o,continuationMarker:r}),{query:i,...o}}(n,e.albumIndex,r,e.continuationMarker);return ze(t,i).then((t=>{var n;if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const i=null===(n=t.value.body)||void 0===n?void 0:n.continuationMarker,o=hr(t.value.items,w.CPLAlbum);return i&&"string"===typeof i?ns({...e,continuationMarker:i}).then((t=>{if(t.ok){const n=[...o,...t.value];return yr.success(e,n)}return yr.failure(e,t.error)})):(void 0===r&&ce.instance.report("myAlbumsCount",{count:j(o.length)}),yr.success(e,o))}))}const rs={selectionLimit:1e3,isGoldilocksMoveEnabled:!1,isSharedAlbumsEnabled:!de(),isPendingSharedAlbumsListEnabled:!0,printFeedbackStats:!1,useDateAlbumSort:!1};function is(e){const{folderKey:t}=e;return t===xo.MediaTypeAlbums?Promise.resolve(d.Result.success(function(){const e=[];for(const t of jo)e.push(Ya(t));return e}())):t===xo.SharedAlbums?he({endpoint:ie.getAlbums,useDSIDBaseURL:!0}).then((e=>{if(!e.ok)return yr.failure(void 0,e.error);const t=Go(ts,e.value,ie.getAlbums);return t.ok?yr.success(void 0,{albums:t.value.albums,rootctag:t.value.rootctag,callerId:t.value.callerId}):yr.failure(void 0,t.error)})).then((e=>{if(!e.ok){const t=new Ae({photosError:e.error,errorCode:Oe.SharedAlbumsListLoadFailed});return ke(Ie.tile_getSharedAlbumsListFailed,t),d.Result.failure(t)}return Re(Ie.tile_getSharedAlbumsListSuccess),d.Result.success(e.value.albums.map((e=>Ma(e))))})):function(e){const{folderKey:t}=e;return Lo().then((e=>{if(!e.ok)return ke(Ie.tile_getUserAlbumsStartupFailed,e.error),e;const{primarySync:n}=e.value;return ns({databaseScope:n.scope,zoneID:n.zone.zoneID,parentRecordName:t===xo.MyAlbums?void 0:t.recordKey.recordName||void 0,albumIndex:rs.useDateAlbumSort?y.CPLAlbumByUserModificationDate:y.CPLAlbumByPositionLive}).then((e=>{if(!e.ok){const t=new Ae({photosError:e.error,errorCode:Oe.UserAlbumsListLoadFailed});return ke(Ie.tile_getUserAlbumsListFailed,t),d.Result.failure(t)}Re(Ie.tile_getUserAlbumsListSuccess);const t=[];for(const n of e.value)n.isOK&&Ia.isAlbumUsable(n.model)&&t.push(ka(n.model));return d.Result.success(t)}))}))}({folderKey:t})}const os={};function as(e){const{assetKey:t,masterKey:n,forceNetworkUpdate:r}=e;let i,o;i=sr.instance.assetStore.get(t);const a=n||Br.getMasterRefRecordKey(i);if(a&&(o=sr.instance.masterStore.get(a),i&&o&&!r)){const e={asset:i,master:o};return{data:e,isLoading:!1,promise:Promise.resolve(d.Result.success(e))}}let s=os[Un.recordKeyString(t)];if(s)return{isLoading:!0,promise:s};if(jn.isSharedAlbumZoneID(t.zoneID))s=function(e){const t=jn.albumGUIDFromZoneID(e.zoneID);if(!t)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumGUID",message:"No album guid found for zone in CPLAsset/Master hydrator"})));const n={isSharedAlbumKey:!0,guid:t},r=ea(n.guid);return r?cs(e,n,r):_a({albumKey:n}).promise.then((()=>{const t=ea(n.guid);return t?cs(e,n,t):Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumLocationURL",message:"No location URL available in CPLAsset/Master hydrator"})))}))}(t);else{const e=sr.instance.zoneStore.getDatabaseScopeForZoneID(t.zoneID);if(!e)return{data:void 0,isLoading:!1,promise:Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database found for zone in CPLAsset/Master hydrator"})))};if(a&&(!i&&!o||r))s=function(e){const{zoneID:t,databaseScope:n,assetRecordName:r,masterRecordName:i}=e;return no(n,so(t,[r,i])).then((n=>{if(!n.ok)return yr.failure(e,u.fromCloudKitContainerError(n.error));const r=mr(n.value.items,w.CPLMaster,t),i=mr(n.value.items,w.CPLAsset,t);return r.ok?i.ok?yr.success(e,{asset:i.value,master:r.value}):yr.failure(e,i.error):yr.failure(e,r.error)}))}({databaseScope:e,zoneID:t.zoneID,assetRecordName:t.recordName,masterRecordName:a.recordName}).then((e=>e.ok?(sr.instance.setAssetsAndMasters({assets:[e.value.asset],masters:[e.value.master]}),d.Result.success(e.value)):d.Result.failure(e.error)));else if(i&&!r&&a){const t=i;s=ss(a,w.CPLMaster,e).then((e=>e.ok?(sr.instance.masterStore.set(a,e.value),d.Result.success({asset:t,master:e.value})):e))}else s=ss(t,w.CPLAsset,e).then((n=>{if(n.ok){const i=n.value;if(sr.instance.assetStore.set(t,i),o&&!r)return d.Result.success({asset:i,master:o});{const t=Br.getMasterRefRecordKey(i);return t?ss(t,w.CPLMaster,e).then((e=>{if(e.ok){const n=e.value;return sr.instance.masterStore.set(t,n),d.Result.success({asset:i,master:n})}return e})):d.Result.failure(new u({errorCode:"MissingCPLMasterRef",message:"In hydrateCPLAssetAndMaster, asset returned from network has no master ref"}))}}return n}))}return os[Un.recordKeyString(t)]=s,s.then((()=>delete os[Un.recordKeyString(t)])),{isLoading:!0,promise:s}}function ss(e,t,n){return oo({databaseScope:n,zoneID:e.zoneID,recordType:t,recordNames:[e.recordName]}).then((e=>{if(e.ok&&e.value.length>0&&e.value[0]&&e.value[0].isOK){const t=e.value[0].model;return d.Result.success(t)}return e.ok?d.Result.failure(new u({errorCode:"NoValidCPLAssetOrMasterFromLookup",message:`No ${t} returned from lookup request`})):d.Result.failure(e.error)}))}function cs(e,t,n){var r,i;const o=null===(r=Mi.instance.albumStore.get(t))||void 0===r?void 0:r.albumctag,a=null===(i=Mi.instance.dbrMetadataStore.get(t))||void 0===i||null===(i=i.fields)||void 0===i?void 0:i.clientOrgKey;return function(e){const{albumGUID:t,assetKey:n,albumCTag:r,clientOrgKey:i,...o}=e,a=r?{albumctag:r}:void 0,s=ra(i,{albumguid:t,assets:[n.recordName],...a});return he({endpoint:ie.getAssets,payload:s,...o}).then((n=>{if(!n.ok)return yr.failure(e,n.error);const r=J._parseArrayRequestResult(n.value,"records");if(!r.ok)return yr.failure(e,u.fromCloudKitContainerError(r.error));const i=jn.createSharedAlbumFakeZoneFromGUID(t),o=r.value.items,a=mr(o,w.CPLMaster,i),s=mr(o,w.CPLAsset,i);return a.ok?s.ok?(s.value.fields.assetDate=a.value.fields.originalCreationDate,s.value.fields.assetDateEnc=a.value.fields.originalCreationDateEnc,yr.success(e,{asset:s.value,master:a.value})):yr.failure(e,s.error):yr.failure(e,a.error)}))}({assetKey:e,albumGUID:t.guid,albumCTag:o,clientOrgKey:a,...n}).then((e=>e.ok?(sr.instance.setAssetsAndMasters({assets:[e.value.asset],masters:[e.value.master]}),d.Result.success(e.value)):d.Result.failure(e.error)))}class us{constructor(){this.listeners={}}addListener(e,t){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),()=>this.removeListener(e,t)}removeListener(e,t){var n;null===(n=this.listeners[e])||void 0===n||n.delete(t)}notifyListeners(e,t){this.listeners[e]&&this.listeners[e].forEach((e=>{e(t)}))}}const ls=C.z.object({recordName:C.z.string(),deleted:C.z.literal(!0)}),ds=C.z.object({zones:C.z.array(C.z.object({zoneID:_,records:C.z.array(C.z.union([ls,kt,Ht,Ft,rt,N,fn,T.extend({recordType:C.z.string()})])),moreComing:C.z.boolean(),syncToken:C.z.string()}))});function ps(e){const{databaseScope:t,syncToken:n,zoneID:r}=e;return function(e,t){return te.instance.cloudKitContainer?te.instance.cloudKitContainer.zoneChanges(e,{zones:[t]}):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performZoneChangesRequest",webService:"ckdatabasews"}))}(t,{syncToken:n,zoneID:r}).then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const n=ds.safeParse(t.value.body);return n.success?yr.success(e,n.data):yr.failure(e,new u({errorCode:"SchemaParsingError",schemaParsingError:new l("ZoneChangesResponse",n.error)}))}))}const fs=C.z.object({ck:C.z.object({nid:C.z.string().optional(),met:C.z.object({zid:C.z.string(),dbs:C.z.number(),zoid:C.z.string(),sid:C.z.string()}),cid:C.z.literal(Q)})});class hs{static get instance(){return this._instance||(this._instance=new hs({feedbackReporter:ce.instance})),this._instance}constructor(e){let{feedbackReporter:t}=e;this._listeners=new Set,this.feedbackReporter=void 0,this._isRegisteredForNotifications=!1,this.feedbackReporter=t}addNotificationListener(e){this._listeners.add(e)}removeNotificationListener(e){this._listeners.delete(e)}didReceiveRemoteNotification(e){if(!this.isRegisteredForNotifications)return;const t=fs.safeParse(e);var n;if(!t.success)return void((null===e||void 0===e||null===(n=e.ck)||void 0===n?void 0:n.cid)===Q&&this.feedbackReporter.report("unknownPushSchema"));const r=t.data,i={notificationID:r.ck.nid||"",containerIdentifier:r.ck.cid,zoneID:{zoneName:r.ck.met.zid,ownerRecordName:r.ck.met.zoid},subscriptionID:r.ck.met.sid};this._listeners.forEach((e=>e(i)))}registerForNotifications(){this.isRegisteredForNotifications||(this._isRegisteredForNotifications=!0)}unregisterForNotifications(){this.isRegisteredForNotifications&&(this._isRegisteredForNotifications=!1)}get isRegisteredForNotifications(){return this._isRegisteredForNotifications}}hs._instance=void 0;class ms extends Bn{getKeyString(e){return Un.zoneKeyString(e)}}class gs extends us{static get instance(){if(!this._instance){const{zoneStore:e}=sr.instance;this._instance=new gs({zoneStore:e,pushRegistry:hs.instance,zoneChangesHandler:e=>ps(e).then((e=>{e.ok&&this._instance.notifyListeners("zoneChanges",{response:e.value})}))})}return this._instance}manuallyGetZoneChanges(e,t,n){const r=this.getSyncTokenForZoneID(e);return null!==n&&void 0!==n&&n.skipReportingProgress||ys.itemStarted(),ps({zoneID:e,databaseScope:t,syncToken:r}).then((e=>(e.ok&&this.notifyListeners("zoneChanges",{response:e.value,manuallyTriggered:!0}),null!==n&&void 0!==n&&n.skipReportingProgress||ys.itemFinished(),e)))}constructor(e){let{zoneStore:t,pushRegistry:n,zoneChangesHandler:r}=e;super(),this._updateTimer=void 0,this.zoneStore=void 0,this.pushRegistry=void 0,this.zoneChangesHandler=void 0,this._cleanupZoneListener=void 0,this.syncTokens={},this.lastUpdatedStore=new ms,this.handlePushNotification=e=>{if(e.containerIdentifier!==Q)return;this._updateTimer&&(clearInterval(this._updateTimer),this._updateTimer=void 0);const{zoneID:t}=e,n={...t,zoneType:Nn.RegularCustomZone},r=this.zoneStore.getDatabaseScopeForZoneID(n),i=this.getSyncTokenForZoneID(n);r&&i&&this.zoneChangesHandler({databaseScope:r,syncToken:i,zoneID:n})},this._subscribedGridKeys=new Array,this.zoneStore=t,this.pushRegistry=n,this.zoneChangesHandler=r;for(const o of[t.primarySyncZone,t.sharedSyncZone])o&&(o.syncToken?this.setSyncTokenForZoneID(o.zoneID,o.syncToken):this.lastUpdatedStore.set(o.zoneID,Date.now()));const i=e=>{e.syncToken&&(jn.isCMMZone(e)||this.setSyncTokenForZoneID(e.zoneID,e.syncToken))};t.addZoneAddedListener(i),this._cleanupZoneListener=()=>t.removeZoneAddedListener(i),this._updateTimer=window.setInterval(this.pollForUpdates.bind(this),3e4)}pollForUpdates(){var e;const t=null===(e=this.zoneStore.primarySyncZone)||void 0===e?void 0:e.zoneID;if(t){const e=this.zoneStore.getDatabaseScopeForZoneID(t),n=this.getSyncTokenForZoneID(t);this.zoneChangesHandler({databaseScope:e,syncToken:n,zoneID:t})}}cleanup(){this._cleanupZoneListener()}addLastUpdatedListener(e,t){return this.lastUpdatedStore.addListener(e,t)}getZoneIDLastUpdatedTime(e){return this.lastUpdatedStore.get(e)}getSyncTokenForZoneID(e){return this.syncTokens[Un.zoneKeyString(e)]}setSyncTokenForZoneID(e,t){const n=Date.now();this.syncTokens[Un.zoneKeyString(e)]=t,this.lastUpdatedStore.set(e,n)}registerForNotifications(){const{pushRegistry:e}=this;e.isRegisteredForNotifications||(e.registerForNotifications(),e.addNotificationListener(this.handlePushNotification))}unregisterForNotifications(){const{pushRegistry:e}=this;e.isRegisteredForNotifications&&(e.unregisterForNotifications(),e.removeNotificationListener(this.handlePushNotification))}isSubscribed(e){return this._subscribedGridKeys.includes(Un.gridKeyString(e))}subscribeForGridKey(e){return 0===this._subscribedGridKeys.length&&this.registerForNotifications(),this._subscribedGridKeys.push(Un.gridKeyString(e)),()=>this.unsubscribeForGridKey(e)}unsubscribeForGridKey(e){const t=Un.gridKeyString(e),n=this._subscribedGridKeys.findIndex((e=>t===e));n>=0&&this._subscribedGridKeys.splice(n,1),0===this._subscribedGridKeys.length&&this.unregisterForNotifications()}}gs._instance=void 0;const vs=new class{constructor(e){this.notificationManager=void 0,this.maximumParallelTasks=void 0,this.inProgressItems=new Set,this.pendingItems=[],this.shouldProcessNextTask=void 0,this.maximumParallelTasks=(null===e||void 0===e?void 0:e.maxParallelTasks)||1,this.shouldProcessNextTask=null===e||void 0===e?void 0:e.shouldProcessNextTask,this.notificationManager=new us}get numTasksInProgress(){return this.inProgressItems.size}get numTasksPending(){return this.pendingItems.length}get tasksInProgress(){const e=[];return this.inProgressItems.forEach((t=>{e.push(t.task)})),e}enqueue(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Promise(((n,r)=>{const i={task:e,resolve:n,reject:r};t?this.pendingItems.unshift(i):this.pendingItems.push(i),this.notificationManager.notifyListeners("requestQueueStateChange",{numTasksPending:this.numTasksPending,numTasksInProgress:this.numTasksInProgress})}));return this.performTasksIfPossible(),n}performTasksIfPossible(){for(;this.pendingItems.length>0&&this.inProgressItems.size<this.maximumParallelTasks&&(!this.shouldProcessNextTask||this.shouldProcessNextTask(this.pendingItems[0].task));){const e=this.pendingItems.shift();if(this.notificationManager.notifyListeners("requestQueueStateChange",{numTasksPending:this.numTasksPending,numTasksInProgress:this.numTasksInProgress}),!e)return;this.inProgressItems.add(e),this.notificationManager.notifyListeners("requestQueueStateChange",{numTasksPending:this.numTasksPending,numTasksInProgress:this.numTasksInProgress}),e.task().then((t=>e.resolve(t))).catch((t=>e.reject(t))).finally((()=>{this.inProgressItems.delete(e),this.notificationManager.notifyListeners("requestQueueStateChange",{numTasksPending:this.numTasksPending,numTasksInProgress:this.numTasksInProgress}),this.performTasksIfPossible()}))}}}({maxParallelTasks:1}),ys=new class{constructor(){this.notificationManager=void 0,this.started=0,this.finished=0,this.notificationManager=new us}get needsProgressBar(){return 0!==this.started}get progressPercent(){if(0!==this.started)return this.finished/this.started}get numPending(){return this.started-this.finished}get numCompleted(){return this.finished}itemStarted(){this.started++,this.notificationManager.notifyListeners("progressPercent",this.progressPercent),this.notificationManager.notifyListeners("numPending",this.numPending)}itemFinished(){this.finished++,this.notificationManager.notifyListeners("progressPercent",this.progressPercent),this.notificationManager.notifyListeners("numPending",this.numPending),this.started===this.finished&&this.reset()}reset(){this.started=0,this.finished=0,this.notificationManager.notifyListeners("needsBar",!1)}};function bs(e,t,n){const r=te.instance.cloudKitContainer;return r?(null!==n&&void 0!==n&&n.skipReportingProgress||ys.itemStarted(),vs.enqueue((()=>r.modifyRecords(e,t).finally((()=>{null!==n&&void 0!==n&&n.skipManualChangesUpdate||gs.instance.manuallyGetZoneChanges(t.zoneID,e,n),null!==n&&void 0!==n&&n.skipReportingProgress||ys.itemFinished()}))))):Promise.resolve(d.Result.failure({errorCode:"ContainerNotInitialized",message:"Missing cloudKitContainer in performModifyRequest",webService:"ckdatabasews"}))}function ws(e,t,n){const r=[...t.operations],i=[];let o=r.length;for(;o>0;){const a=r.splice(0,ro);o=r.length,i.push(bs(e,{...t,operations:a},n))}return io(i)}const Ss=["parentId"],Cs={assetDateEnc:{type:"TIMESTAMP",isEncrypted:!0}};function _s(e,t){const n={};return Object.keys(t).forEach((e=>{const r=e;(void 0!==t[r]||Ss.includes(e))&&(n[r]={value:t[r],...Cs[e]})})),e.map((e=>({recordName:e.recordName,recordChangeTag:e.recordChangeTag,recordType:e.recordType,fields:n})))}function Os(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};const s=[],c={};for(const u of r){const e=n.get(u);if(e){s.push(e);const t=n.addInflightData(u,{...o,...a}),r=Un.recordKeyString(u);c[r]=t}}const l=_s(s,o),p=()=>{for(let e=0;e<r.length;e++){const t=Un.recordKeyString(r[e]);n.removeInflightData(r[e],c[t])}};return s.length>0?function(e){const{databaseScope:t,zoneID:n,recordType:r,ckRecords:i,updatedFields:o}=e,a=_s(i,o),s=function(e,t){return{atomic:!0,operations:t.map((e=>({operationType:"update",record:e}))),zoneID:e}}(n,a);return ws(t,s).then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const i=gr(t.value.items,r,n);return yr.success(e,i)}))}({databaseScope:e,zoneID:t,recordType:i,ckRecords:l,updatedFields:o}).then((e=>{if(e.ok){const r=e.value;for(const e of r)if(e.isOK){const r=pr.getKey(e.model);if(i===w.CPLMemory){var t;const i=n.get(r);e.model.fields&&null!==i&&void 0!==i&&null!==(t=i.fields)&&void 0!==t&&t.keyAsset_zoneID&&(e.model.fields.keyAsset_zoneID=null===i||void 0===i?void 0:i.fields.keyAsset_zoneID)}n.set(r,e.model)}return p(),e.value.length!==s.length?d.Result.failure(new u({errorCode:"WrongNumberOfModelsInResult",message:"Wrong number of models returned for a modify from the server"})):d.Result.success(e.value)}return p(),d.Result.failure(e.error)})):Promise.resolve(d.Result.failure(new u({errorCode:"NoRecordsToBeMutated",message:"In optimisticallyModifyAndStoreCKRecords, no records passed in"})))}const Es=C.z.array(C.z.object({assetguid:C.z.string(),success:C.z.string(),reason:C.z.string().optional()}));function Is(e,t,n,r,i){const o=document.createElement("link");o.rel=t,n&&(o.as=n),o.href=e,r&&(o.crossOrigin=r),i&&"fetchPriority"in o&&(o.fetchPriority=i),document.head.append(o)}new Set;class As extends eo{constructor(){super(...arguments),this.authPromiseResolved=!1,this.signInFn=void 0,this.startupFn=e=>Do(e).then((e=>e.ok)),this._webServices=new Map,this._userLocationInfo=void 0,this._fetchPromise=void 0,this._fetchResolve=void 0}static get instance(){return this._instance||(this._instance=new As)}configure(e,t){this.signInFn=e,t&&(this.startupFn=t)}signIn(){return this.signInFn?this.signInFn():Promise.resolve(!1)}signInAndStartup(){return this.signIn().then((e=>{var t;const n=te.instance.urlForServiceName("ckdatabasews");return e&&null!==(t=this.user)&&void 0!==t&&t.dsid&&n?this.startupFn({dsid:this.user.dsid,ckdatabasewsURL:n}):Promise.resolve(!1)}))}get userLocationInfo(){return this._userLocationInfo}get coskCompatibleAuthenticatedService(){return{user:this.user,webServices:this.webServices}}get user(){return this.get("authenticatedUser")}get isLiteAccount(){var e;return 4===(null===(e=this.user)||void 0===e?void 0:e.statusCode)}get isAuthenticated(){return!!this.user}get webServices(){return this._webServices}preconnectToHost(e){var t;const n=null===(t=this.webServices.get(e))||void 0===t?void 0:t.url;if(n){const e=F(n);e&&Is(e.toString(),"preconnect",void 0,"use-credentials")}}setUserLocationInfo(e){e&&(this._userLocationInfo=e)}setFromExternalConfiguration(e,t,n){this._webServices=new Map(Object.entries(t)),this.setUserLocationInfo(n),this.set("authenticatedUser",e),this.authPromiseResolved=!0,this.preconnectToHost("ckdatabasews"),this.preconnectToHost("geows"),this._fetchResolve&&(this._fetchResolve(d.Result.success()),this._fetchResolve=void 0)}fetch(){return this._fetchPromise?this._fetchPromise:this._fetchPromise=new Promise((e=>{this._fetchResolve=e;const t=window[_o];let n;n=null!==t&&void 0!==t&&t.auth?t.auth:Eo(`${de()?"https://setup.icloud.com.cn":"https://setup.icloud.com"}/setup/ws/1/validate?${yo}`,{method:"POST",credentials:"include"}),vo(n).then((t=>{200===t.status||401===t.status||421===t.status||403===t.status||this.authPromiseResolved?t.json().then((t=>{if(r=t,Ps.safeParse(r).success)this._fetchResolve=void 0,this.authPromiseResolved=!0,this.set("authenticatedUser",t.dsInfo),this._userLocationInfo=t.requestInfo,this._webServices=new Map(Object.entries(t.webservices).filter((e=>!!e[1].url))),this.preconnectToHost("ckdatabasews"),this.preconnectToHost("geows");else if(function(e){return Rs.safeParse(e).success}(t)){var n;null!==(n=t.requestInfo)&&void 0!==n&&n.length&&(this._userLocationInfo=t.requestInfo[0])}var r;e(d.Result.success())})).catch((()=>{e(d.Result.failure(void 0))})):e(d.Result.failure(t.status))})).catch((()=>{e(d.Result.failure(void 0))}))}))}}As._instance=void 0;const Ts=C.z.object({country:C.z.string().optional(),region:C.z.string().optional(),timeZone:C.z.string().optional()}),Ps=C.z.object({apps:C.z.record(C.z.object({isQualifiedForBeta:C.z.boolean().optional(),canLaunchWithOneFactor:C.z.boolean().optional(),isHidden:C.z.boolean().optional()})),dsInfo:C.z.object({dsid:C.z.string(),aDsID:C.z.string(),firstName:C.z.string(),lastName:C.z.string(),fullName:C.z.string(),appleId:C.z.string(),statusCode:C.z.number().optional()}),webservices:C.z.record(C.z.object({url:C.z.string().optional(),status:C.z.string().optional(),pcsRequired:C.z.boolean().optional()})),isCarryUser:C.z.boolean().optional(),requestInfo:Ts.optional()}),Rs=C.z.object({requestInfo:C.z.array(Ts).optional()});window.AuthService=As.instance;const ks=C.z.object({albums:C.z.array(C.z.object({albumguid:C.z.string(),sharingtype:C.z.string().optional(),albumlocation:C.z.string().optional(),delete:C.z.string().optional()})).optional(),ctagrespected:C.z.string().optional(),rootctag:C.z.string()});class Ds{constructor(){this._updateTimer=void 0,this._subscribedGridKeys=new Set,this._handleSharedAlbumChanges=void 0,this._albumGUID=void 0}static get instance(){return this._instance||(this._instance=new Ds),this._instance}configure(e){this._handleSharedAlbumChanges=e.handleSharedAlbumChanges,this._albumGUID=e.albumGUID}manuallyGetSharedAlbumListChanges(){return this.getChanges(!0)}startPolling(){const e=As.instance.isAuthenticated;!this._updateTimer&&e&&(this._updateTimer=window.setInterval(this.pollForUpdates.bind(this),1e4))}stopPolling(){this._updateTimer&&(window.clearInterval(this._updateTimer),this._updateTimer=void 0)}subscribe(e){0===this._subscribedGridKeys.size&&this.startPolling(),this._subscribedGridKeys.add(this.keyToString(e))}isSubscribed(e){return this._subscribedGridKeys.has(this.keyToString(e))}unsubscribe(e){this._subscribedGridKeys.delete(this.keyToString(e)),0===this._subscribedGridKeys.size&&this.stopPolling()}keyToString(e){return"string"===typeof e?e:Un.gridKeyString(e)}getChanges(e){return function(e){const t=e.rootctag?e:void 0;return he({endpoint:ie.getChanges,payload:t,useDSIDBaseURL:!0}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=Go(ks,t.value,ie.getChanges);return n.ok?yr.success(e,n.value):yr.failure(e,n.error)}))}({rootctag:Mi.instance.rootctag}).then((t=>{if(t.ok&&Mi.instance.rootctag!==t.value.rootctag){const{rootctag:n,albums:r}=t.value;if(Mi.instance.rootctag=n,this._handleSharedAlbumChanges){const n=this._albumGUID?r&&r.find((e=>e.albumguid===this._albumGUID)):void 0;if(!this._albumGUID||n)return this._handleSharedAlbumChanges({response:n?{...t.value,albums:[n]}:t.value,manuallyTriggered:e})}}}))}pollForUpdates(){Mi.instance.rootctag&&this.getChanges(!1)}}function Ms(e,t,n){const r=sr.instance.zoneStore.getDatabaseScopeForZoneID(t);if(!r)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database scope found for zone in removeCPLAssetsFromAlbum"})));const i=null===n||void 0===n?void 0:n.albumItemListKey.recordName;return i?function(e){const{databaseScope:t,zoneID:n,cplContainerRelationRecordNames:r}=e,i=function(e,t){return{atomic:!0,operations:t.map((e=>({operationType:"forceDelete",record:{recordName:e}}))),zoneID:e}}(n,r);return ws(t,i).then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const n=function(e){const t=[];if(e.errors&&e.errors.length>0)return d.Result.failure(new u({errorCode:"CloudKitServerError",requestError:e.errors[0]}));const n=e.items;if(n)for(let r=0;r<n.length;r++){const e=n[r],i=ls.safeParse(e);let o;o=i.success?{isOK:!0,model:i.data}:{isOK:!1,rawData:e,schemaError:i.error},t.push(o)}return d.Result.success({items:t})}(t.value);return n.ok?yr.success(e,n.value.items):yr.failure(e,n.error)}))}({databaseScope:r,zoneID:t,cplContainerRelationRecordNames:e.map((e=>`${e.asset.recordName}-IN-${i}`))}).then((e=>e.ok?(function(e,t){const n=sr.instance.zoneStore.getDatabaseScopeForZoneID(t);if(!n)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database scope found for zone in modifyCPLAlbumUserModificationDate"})));const r=sr.instance.albumStore,i={userModificationDate:Date.now()};Os(n,t,r,[e],w.CPLAlbum,i).then((e=>{if(e.ok)for(const t of e.value)if(t.isOK)return d.Result.success(!0);return ce.instance.report("editAlbumUserModificationDateFailed"),d.Result.failure(new u({errorCode:"EditAlbumUserModificationDateFailed",message:"EditAlbumUserModificationDateFailed during add/removeCPLAssetsFromAlbum"}))}))}(null===n||void 0===n?void 0:n.albumItemListKey,t),d.Result.success()):d.Result.failure(new u({errorCode:"MutationFailed",message:"Failed to remove assets from album",wrappedError:e.error instanceof Error?e.error:void 0})))):Promise.resolve(d.Result.failure(new u({errorCode:"MissingAlbum",message:"No album provided to remove from"})))}let Ns;function xs(e){const{assetKey:t,action:n}=e;return as({assetKey:t}).promise.then((r=>{var i;if(!r.ok)return d.Result.failure(new Ae({message:(null===(i=r.error)||void 0===i?void 0:i.message)||"Unable to hydrate assets",errorCode:Se.HydrateAssetError}));const o=r.value;let a;if(n===Ns.Favorite)a=function(e,t,n){const r=sr.instance.zoneStore.getDatabaseScopeForZoneID(t);if(!r)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database scope found for zone in toggleCPLAssetsFavorite"})));let i;i=null!==n&&void 0!==n&&n.overrideNewValue?n.overrideNewValue:1===e.length?!e[0].asset.fields.isFavorite:e.some((e=>!e.asset.fields.isFavorite));const o=sr.instance.assetStore,a=e.map((e=>pr.getKey(e.asset))),s={isFavorite:i?1:0};return ce.instance.report("favoriteToggled",{type:i?"addedFavorite":"removedFavorite"}),Os(r,t,o,a,w.CPLAsset,s).then((e=>{const t=[];if(e.ok){for(const n of e.value)n.isOK&&t.push(n.model);return d.Result.success(t)}return d.Result.failure(new u({errorCode:"MutationFailed",message:"Failed to toggle favorite on assets",wrappedError:e.error instanceof Error?e.error:void 0}))}))}([o],t.zoneID,{overrideNewValue:e.isFavorite});else if(n===Ns.Delete)a=function(e,t){const n=sr.instance.zoneStore.getDatabaseScopeForZoneID(t);if(!n)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingDatabase",message:"No database scope found for zone in deleteCPLAssets"})));const r=sr.instance.assetStore,i=e.map((e=>pr.getKey(e.asset)));return ce.instance.report("itemsDeleted",{count:i.length,type:"media"}),Os(n,t,r,i,w.CPLAsset,{isDeleted:1}).then((e=>{const t=[];if(e.ok){for(const n of e.value)n.isOK&&t.push(n.model);return d.Result.success(t)}return d.Result.failure(new u({errorCode:"MutationFailed",message:"Failed to delete assets",wrappedError:e.error instanceof Error?e.error:void 0}))}))}([o],t.zoneID);else if(n===Ns.DeleteFromSharedAlbum)a=_a({albumKey:{isSharedAlbumKey:!0,guid:e.assetListKey.recordKey.recordName}}).promise.then((n=>{const r=n.ok?n.value.sharedAlbum:void 0;if(!n.ok||!r){const e=n.ok?"No shared album found for the provided album guid":n.error.message;return d.Result.failure(new Ae({message:e,errorCode:Se.HydrateSharedAlbumError}))}return Fi(o.asset,r,n.value.sharingInfo)?function(e,t,n){var r;const i=null===n||void 0===n?void 0:n.albumGUID;if(!i)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumGUID",message:"Missing album guid in deleteSharedAlbumCPLAssets"})));const o=ea(i);if(!o)return Promise.resolve(d.Result.failure(new u({errorCode:"MissingSharedAlbumLocationURL",message:"Missing album location URL in deleteSharedAlbumCPLAssets"})));const a=null===(r=Mi.instance.dbrMetadataStore.get({isSharedAlbumKey:!0,guid:i}))||void 0===r||null===(r=r.fields)||void 0===r?void 0:r.clientOrgKey,s=e.map((e=>e.asset.recordName));return function(e){const{albumGUID:t,assetGUIDs:n,clientOrgKey:r,...i}=e;ys.itemStarted();const o=ra(r,{albumguid:t,assets:n});return he({endpoint:ie.deleteAssets,payload:o,...i}).then((t=>{if(!t.ok)return yr.failure(e,t.error);const n=Go(Es,t.value,ie.getAlbums);return n.ok?yr.success(e,n.value):yr.failure(e,n.error)})).finally((()=>{ys.itemFinished()}))}({albumGUID:i,assetGUIDs:s,clientOrgKey:a,...o}).then((t=>{if(t.ok){let n=new Set(t.value.filter((e=>"1"===e.success)).map((e=>e.assetguid)));if(!n.size)return d.Result.failure(new u({errorCode:"FailedDeleteSharedAlbumAssets",message:"Failed to delete items from shared album"}));n.size<t.value.length&&ce.instance.report("userActionFailed",{action:"DeleteSharedAlbumAssets",partialDelete:"true"});const{listStore:r}=sr.instance,o={isSharedAlbumKey:!0,guid:i};if(r.getListItems(o)){const t=e.filter((e=>n.has(e.asset.recordName))).map((e=>pr.getKey(e.asset)));if(t.length>0){r.removeListItems(o,t);const e=Mi.instance.keyAssetStore.get(o);for(const n of t)if(Un.areRecordKeysEqual(n,e)){Mi.instance.keyAssetStore.delete(o),ba({albums:[{sharedAlbumKey:o,clientOrgKey:a}]});break}Ds.instance.manuallyGetSharedAlbumListChanges()}}return d.Result.success()}return t}))}([o],t.zoneID,{albumGUID:e.assetListKey.recordKey.recordName}).then((e=>e)):d.Result.failure(new Ae({message:"Unowned asset cannot be deleted",errorCode:Se.SharedAlbumAssetDeleteNotAllowed}))}));else{if(n!==Ns.DeleteFromUserAlbum)return d.Result.failure(new Ae({errorCode:Se.UnsupportedAction,message:"Unsupported quick action type: "+n}));a=Ms([o],t.zoneID,{albumItemListKey:{...e.assetListKey.recordKey,isAlbumItemListKey:!0,goldilocksZones:[t.zoneID]}})}return a.then((e=>{var t;return e.ok?d.Result.success(void 0):e.error instanceof Ae?d.Result.failure(e.error):d.Result.failure(new Ae({errorCode:Se.UpdateAssetError,message:(null===(t=e.error)||void 0===t?void 0:t.message)||`Unable to update asset during ${n}`}))}))}))}function Ls(e){return Bo(e)?{delete:{action:Ns.DeleteFromSharedAlbum,handler:t=>xs({action:Ns.DeleteFromSharedAlbum,assetKey:t.assetKey,assetListKey:e})}}:zo(e)?{favorite:{action:Ns.Favorite,handler:e=>xs({action:Ns.Favorite,assetKey:e.assetKey,isFavorite:!e.isFavorite})},delete:{action:Ns.DeleteFromUserAlbum,handler:t=>xs({action:Ns.DeleteFromUserAlbum,assetKey:t.assetKey,assetListKey:e})}}:{favorite:{action:Ns.Favorite,handler:e=>xs({action:Ns.Favorite,assetKey:e.assetKey,isFavorite:!e.isFavorite})},delete:{action:Ns.Delete,handler:e=>xs({action:Ns.Delete,assetKey:e.assetKey})}}}function js(e,t,n,r){const i=[{fieldName:"direction",comparator:xe.EQUALS,fieldValue:{value:Fe.Ascending,type:Le.STRING}}];return void 0!==r&&i.push({fieldName:"startRank",comparator:xe.EQUALS,fieldValue:{value:r,type:Le.INT64}}),{query:{recordType:e.indexID.cplIndex,filterBy:i},zoneID:t,resultsLimit:n}}var Us;function Fs(e){if("string"===typeof e)return d.Result.failure(e);if(e&&"object"===typeof e&&"errorCode"in e&&"CloudKitServerError"===e.errorCode&&e.requestError&&e.requestError instanceof a){const t=e.requestError.serverErrorCode;if(t===i.THROTTLED||t===i.TRY_AGAIN_LATER)return d.Result.failure(Us.RetryableError)}return e instanceof u&&"InvalidNegativeStartRankProvided"===e.errorCode?d.Result.failure(Us.InvalidStartRankArgument):d.Result.failure(Us.HydratorRequestError)}Ds._instance=void 0,function(e){e.Favorite="Favorite",e.Delete="Delete",e.DeleteFromUserAlbum="DeleteFromUserAlbum",e.DeleteFromSharedAlbum="DeleteFromSharedAlbum"}(Ns||(Ns={})),function(e){e.InitializeList="InitializeList",e.HydratorRequestError="HydratorRequestError",e.RetryableError="RetryableError",e.MissingDatabaseError="MissingDatabaseError",e.InvalidArguments="InvalidArguments",e.MissingPrimarySyncZone="MissingPrimarySyncZone",e.InvalidStartRankArgument="InvalidStartRankArgument"}(Us||(Us={}));const zs={},Bs=30;function Ks(e){const t=zs[Un.itemListKeyString(e)];if(t)return t}function Hs(e,t){const n=Un.itemListKeyString(e);let r=zs[n];r||(r=[],zs[n]=r),r.push(t),r.sort(((e,t)=>e.startRank-t.startRank))}function Ws(e,t){const n=Un.itemListKeyString(e),r=zs[n];if(!r)return;const i=r.indexOf(t);i>=0&&r.splice(i,1)}function qs(e){var t;const{key:n,startRank:r,limit:i}=e,o=null===(t=sr.instance.zoneStore.primarySyncZone)||void 0===t?void 0:t.zoneID;if(!o)return Promise.resolve(d.Result.failure(Us.MissingPrimarySyncZone));const a=sr.instance.zoneStore.getDatabaseScopeForZoneID(o);if(!a)return Promise.resolve(d.Result.failure(Us.MissingDatabaseError));const s=function(e){const{databaseScope:t,key:n,limit:r,zoneID:i}=e;let o;return o="startRank"in e?js(n,i,r,e.startRank):js(n,i,r),ze(t,o).then((t=>{if(!t.ok)return yr.failure(e,u.fromCloudKitContainerError(t.error));const n=gr(t.value.items,w.CPLMemory,i);return yr.success(e,n)}))}({startRank:r,limit:i,databaseScope:a,zoneID:o,key:n}).then((e=>e.ok?function(e){const t=[];for(let n of e)n.isOK&&t.push(n.model);return ua(t).then((()=>e))}(e.value).then((t=>(e.value=t,e))):e));return s}var Vs,$s,Gs,Zs;!function(e){e.Touch="TOUCH",e.Mouse="MOUSE"}(Vs||(Vs={})),function(e){e.Regular="REGULAR",e.Compact="COMPACT"}($s||($s={})),function(e){e.Landscape="LANDSCAPE",e.Portrait="PORTRAIT"}(Gs||(Gs={})),function(e){e.Fine="pointer-fine",e.Coarse="pointer-coarse"}(Zs||(Zs={}));let Qs=!1;const Ys="https://www.apple.com/wss/fonts/?families=New+York+Medium,v1:800,900|SF+Pro+Rounded,v1:900|SF+Mono,v1:800";var Js,Xs=n(8),ec=n.n(Xs);class tc{constructor(e){this.rng=void 0,this.rng=ec()(e)}random(){return this.rng()}randomInt(e,t){return Math.floor(this.random()*(t-e+1)+e)}}class nc{get maxPixelSize(){return this._maxPixelSize||3e7}set maxPixelSize(e){const t=this.maxPixelSize;this._maxPixelSize=e,e<t&&this.pruneImageCacheToSize()}constructor(e){this._maxPixelSize=void 0,this.onDerivativeDelete=void 0,this.cache=new Map,this.currentPixelSize=0,this.onDerivativeDelete=e}getImage(e){let t=this.cache.get(e);return t&&(this.cache.delete(e),this.cache.set(e,t)),t}deleteImage(e){const t=this.cache.get(e);t&&(this.currentPixelSize-=ic(t.image)),this.cache.delete(e),this.onDerivativeDelete(e)}addImage(e,t){const n=f();return this.cache.set(n,{image:e,orientation:t}),this.currentPixelSize+=ic(e),this.currentPixelSize>=this.maxPixelSize&&this.pruneImageCacheToSize(n),n}isImageAvailable(e){const t=this.cache.get(e);return Boolean(t&&!rc(t.image))}pruneImageCacheToSize(e){const t=Array.from(this.cache.entries());let n=0;for(;n<t.length&&this.currentPixelSize>this.maxPixelSize;){const[r,i]=t[n];rc(i.image)||r===e||this.deleteImage(r),n+=1}}}function rc(e){return e&&!!e.parentNode}function ic(e){return(e.naturalWidth||e.width)*(e.naturalHeight||e.height)}class oc{static get instance(){return this._instance||(this._instance=new oc),this._instance}setMaxPixelSizes(e,t){this.smallDerivativeCache.maxPixelSize=e,this.largeDerivativeCache.maxPixelSize=t}constructor(){this.thresholdForLargeImage=1e3,this.store={},this.smallDerivativeCache=void 0,this.largeDerivativeCache=void 0,this.smallDerivativeCache=new nc(this.onDerivativeDelete.bind(this)),this.largeDerivativeCache=new nc(this.onDerivativeDelete.bind(this)),this.smallDerivativeCache.maxPixelSize=3e7,this.largeDerivativeCache.maxPixelSize=5e7}getImageWithMSL(e,t){return this.getImageWithPredicate(e,(e=>e.size===t||e.size===t-1||e.size===t+1))}getImageGreaterOrEqualToMSL(e,t){return this.getImageWithPredicate(e,(e=>e.size>=t))}getImageClosestToMSL(e,t){const n=this.getCacheItemsForAssetKey(e);if(!n)return;const{cacheItems:r,availableCacheItems:i}=n;let o=this.getClosestCachedImageData(i,t);return o||(o=this.getClosestCachedImageData(r,t)),this.cleanCacheItem(o),o}getImageWithPredicate(e,t){const n=this.getCacheItemsForAssetKey(e);if(!n)return;const{cacheItems:r,availableCacheItems:i}=n;for(const o of i)if(t(o))return this.cleanCacheItem(this.imageDataFromDerivativePointer(o));for(const o of r)if(t(o))return this.cleanCacheItem(this.imageDataFromDerivativePointer(o))}cleanCacheItem(e){return e&&e.image&&(e.image.removeAttribute("style"),e.image.draggable=!1),e}getCacheItemsForAssetKey(e){const t=Un.recordKeyString(e);if(!this.store[t])return;let n=this.store[t].sort(((e,t)=>e.size-t.size));return{availableCacheItems:n.filter((e=>this.cacheForSize(e.size).isImageAvailable(e.uid))),cacheItems:n}}onDerivativeDelete(e){const t=Object.keys(this.store);for(let n=0;n<t.length;n++){const r=t[n],i=this.store[r];for(let t=i.length-1;t>=0;t--)i[t].uid===e&&i.splice(t,1)}}findSmallestCopyableImage(e){const t=Un.recordKeyString(e),n=this.store[t];if(!n||!n.length)return;const r=n.sort(((e,t)=>e.size-t.size))[0],i=r.uid;return this.cacheForSize(r.size).getImage(i)}getClosestCachedImageData(e,t){let n;for(const i of e){const e=n?Math.abs(n.msl-t):1/0,o=Math.abs(i.size-t);if(o>e)return n;var r;if(e===o)if(null!==(r=n)&&void 0!==r&&r.image)continue;n=this.imageDataFromDerivativePointer(i)}return n}imageDataFromDerivativePointer(e){const t=this.cacheForSize(e.size).isImageAvailable(e.uid)?this.cacheForSize(e.size).getImage(e.uid):{};return{msl:e.size,...t}}addImage(e,t,n){const r=Un.recordKeyString(e),i=zr.getMSL(t);this.store[r]||(this.store[r]=[]);const o=this.cacheForSize(i).addImage(t,n);this.store[r].push({size:i,uid:o})}removeImage(e,t){const n=Un.recordKeyString(e),r=this.store[n];if(r&&r.length)for(let i=0;i<r.length;i++){const e=r[i],n=this.cacheForSize(e.size),o=n.getImage(e.uid);if(o&&o.image===t)return void n.deleteImage(e.uid)}}invalidateAsset(e){const t=Un.recordKeyString(e),n=this.store[t];if(n&&n.length){const e=[...n];for(let t=0;t<e.length;t++){const n=e[t];this.cacheForSize(n.size).deleteImage(n.uid)}}}cacheForSize(e){return e<this.thresholdForLargeImage?this.smallDerivativeCache:this.largeDerivativeCache}}oc._instance=void 0,function(e){e.NetworkError="NetworkError",e.NoSuitableSlot="NoSuitableSlot",e.UnrenderableDerivativeType="UnrenderableDerivativeType",e.ExpiredURL="ExpiredURL"}(Js||(Js={}));class ac{get promise(){return this._promise}get metadata(){return this._metadata}constructor(e){if(this._promise=void 0,this._imageRequest=void 0,this._metadata=void 0,this.derivativeKey=void 0,this.progress=void 0,this.derivativeKey=e.derivativeKey,"error"in e)return this._promise=Promise.resolve(d.Result.failure(e.error)),void(this.progress=new Wr);if("image"in e)return this._promise=Promise.resolve(d.Result.success(e.image)),this.progress=new Wr,void this.progress.update(0,1,1,!0);const{promise:t,resolve:n}=function(){let e;return{promise:new Promise((t=>e=t)),resolve:e}}(),r=new di({...e.imageLoadRequestOptions,onFinish:(t,r,i)=>{this._metadata=i,ce.instance.reportDidBecomeInteractive(),e.imageLoadRequestOptions.onFinish&&e.imageLoadRequestOptions.onFinish(t,r,i),n(d.Result.success(r))},onFail:(t,r)=>{e.imageLoadRequestOptions.onFail&&e.imageLoadRequestOptions.onFail(t,r),r===ci.Gone?n(d.Result.failure(Js.ExpiredURL)):n(d.Result.failure(Js.NetworkError))}});this._imageRequest=r,this.progress=r.progress,this._promise=t.then((e=>(this._releaseImageRequest(),e)))}send(){this._imageRequest&&this._imageRequest.send()}cancel(){this._releaseImageRequest()}_releaseImageRequest(){this._imageRequest&&(this._imageRequest.cleanup(),this._imageRequest=void 0)}}const sc=.25;class cc{get value(){if(!this.activeRequest)return 1;const e=1-this.minPercentage,t=this.activeRequest.percentComplete*e;return this.minPercentage+t}constructor(e){this.onProgressUpdate=void 0,this.activeRequest=null,this.activeListener=null,this.minPercentage=sc,this.onProgressUpdate=e}addRequest(e){var t;if(this.activeRequest){this.activeRequest.removeListener(this.activeListener);const e=1-this.minPercentage;this.minPercentage+=this.activeRequest.percentComplete*e,this.minPercentage>1&&(this.minPercentage=sc)}this.activeRequest=e,this.activeListener=t=>{var n;null===(n=this.onProgressUpdate)||void 0===n||n.call(this,this.value),1===t.percentComplete&&e===this.activeRequest&&this.resetRatchet()},e.addListener(this.activeListener),null===(t=this.onProgressUpdate)||void 0===t||t.call(this,this.value)}removeRequest(e){var t;this.activeRequest===e&&(this.resetRatchet(),null===(t=this.onProgressUpdate)||void 0===t||t.call(this,this.value))}complete(){var e;this.resetRatchet(),null===(e=this.onProgressUpdate)||void 0===e||e.call(this,this.value)}resetRatchet(){this.activeRequest&&this.activeRequest.removeListener(this.activeListener),this.activeRequest=null,this.activeListener=null,this.minPercentage=sc}}var uc,lc,dc;!function(e){e[e.Unknown=0]="Unknown",e[e.Normal=1]="Normal",e[e.FlipHorizontally=2]="FlipHorizontally",e[e.Rotate180=3]="Rotate180",e[e.FlipVertically=4]="FlipVertically",e[e.Transpose=5]="Transpose",e[e.Rotate90=6]="Rotate90",e[e.Transverse=7]="Transverse",e[e.Rotate270=8]="Rotate270"}(uc||(uc={})),function(e){function t(e,t,n,r){switch(e.style.transformOrigin="0 0",r){case void 0:case uc.Unknown:case uc.Normal:return e.style.width=`${t}px`,e.style.height=`${n}px`,!1;case uc.FlipHorizontally:return e.style.transform="scaleX(-1)",e.style.left="100%",e.style.width=`${t}px`,e.style.height=`${n}px`,!0;case uc.Rotate180:return e.style.transform="rotate(180deg)",e.style.left="100%",e.style.top="100%",e.style.width=`${t}px`,e.style.height=`${n}px`,!0;case uc.FlipVertically:return e.style.transform="scaleY(-1)",e.style.top="100%",e.style.width=`${t}px`,e.style.height=`${n}px`,!0;case uc.Transpose:return e.style.transform="scaleX(-1) rotate(90deg)",e.style.width=`${n}px`,e.style.height=`${t}px`,!0;case uc.Rotate90:return e.style.transform="rotate(90deg)",e.style.left="100%",e.style.width=`${n}px`,e.style.height=`${t}px`,!0;case uc.Transverse:return e.style.transform="scaleX(-1) rotate(270deg)",e.style.top="100%",e.style.left="100%",e.style.width=`${n}px`,e.style.height=`${t}px`,!0;case uc.Rotate270:return e.style.transform="rotate(270deg)",e.style.top="100%",e.style.width=`${n}px`,e.style.height=`${t}px`,!0}}e.styleImageToFillContainer=function(e,n,r,i,o){const a=zr.getAspectRatio({asset:n,master:r})||1,s=i,c=s*(a>0?1/a:1);return t(e,s,c,o),{width:s,height:c}},e.applyStylesForOrientation=t,e.removeStylesForOrientation=function(e){e.style.transform="",e.style.top="",e.style.top="",e.style.width="",e.style.height=""}}(lc||(lc={}));class pc{constructor(e){var t,n;this.desiredSize=void 0,this.asset=void 0,this.master=void 0,this.unrenderableRecords={},this.offscreeniness=void 0,this.requestReason=void 0,this.imageProgress=void 0,this.shouldReadMetadata=void 0,this.shouldRemoveChromiumHDR=void 0,this.refetchAssetAndMaster=void 0,this.desiredSize=e.desiredSize,this.asset=e.asset,this.master=e.master,this.offscreeniness=e.offscreeniness,this.requestReason=e.requestReason,this.shouldReadMetadata=null!==(t=e.shouldReadMetadata)&&void 0!==t&&t,this.shouldRemoveChromiumHDR=null!==(n=e.shouldRemoveChromiumHDR)&&void 0!==n&&n,this.imageProgress=new cc(e.onProgressUpdate),this.refetchAssetAndMaster=e.refetchAssetAndMaster}get assetKey(){return{recordName:this.asset.recordName,zoneID:this.asset.zoneID}}static getImage(e){const t=new fc(e);return t.cachedImage?{isCached:!0,assetKey:t.assetKey,metadata:t.metadata,orientation:t.orientation,image:t.cachedImage}:new hc(t)}static getCachedImage(e){return vc(e)}static progressivelyLoadImage(e){return new mc(e)}get progress(){return this.imageProgress.value}createDerivativeRequest(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{url:o,mimeType:a,shouldCheckOrientation:s,isTranscoded:c,derivativeMSL:u}=t,l={url:o,mimeType:a,shouldCheckOrientation:s,offscreeniness:n,reportingData:r,isTranscoderRequest:c,shouldReadMetadata:this.shouldReadMetadata,shouldRemoveChromiumHDR:this.shouldRemoveChromiumHDR,onFinish:(t,n,r)=>{i||oc.instance.addImage(e,n,r.Orientation)}};return new ac({derivativeKey:{...e,msl:u},imageLoadRequestOptions:l})}getPreferredRenderableURLInfoForImageWithReporting(e,t,n,r,i){const o=Br.hasDerivatives(e)?e:t,a=Un.recordKeyString({recordName:o.recordName,zoneID:o.zoneID});if(this.unrenderableRecords[a]&&this.unrenderableRecords[a]===o.recordChangeTag)return;const s=Ci(e,t,n,r,i);return(void 0===s||s.isTranscoded)&&(this.unrenderableRecords[a]&&this.unrenderableRecords[a]===o.recordChangeTag||(ce.instance.report("noRenderableDerivativesOnRecord",{recordType:o.recordType,displayedTranscodedImage:null===s||void 0===s?void 0:s.isTranscoded}),this.unrenderableRecords[a]=o.recordChangeTag)),s}}class fc extends pc{get cachedImage(){return this._cachedImage}get promise(){return this._promise}constructor(e){super(e),this._error=void 0,this._metadata=void 0,this._request=void 0,this._promise=void 0,this._cachedImage=void 0,this.sizeVariant=void 0,this.sizeVariant=e.sizeVariant,this.loadDerivativeFromCacheOrNetwork()}cancel(){this._request&&(this._request.cancel(),this._request=void 0)}get error(){return this._error}get assetKey(){return{recordName:this.asset.recordName,zoneID:this.asset.zoneID}}get metadata(){return this._metadata}get orientation(){var e;return null===(e=this._metadata)||void 0===e?void 0:e.Orientation}loadDerivativeFromCache(){const{master:e,asset:t,desiredSize:n,sizeVariant:r}=this,i=vc({asset:t,master:e,desiredSize:n,sizeVariant:r});if(i){const{image:e,orientation:t}=i;this._cachedImage=e,this._metadata={Orientation:t||uc.Normal},this.desiredSize=i.msl}}loadDerivativeFromCacheOrNetwork(){if(!this.shouldReadMetadata&&(this.loadDerivativeFromCache(),this._cachedImage))return;const e=this.createSingleImageDerivativeRequest();this._request=e,this.imageProgress.addRequest(e.progress),e.send(),this._promise=e.promise.then((t=>{if(t.ok)return this._metadata=e.metadata,Promise.resolve(t);if(t.ok)return Promise.resolve(t);if(this._error=t.error,t.error===Js.ExpiredURL){const e=pr.getKey(this.master);return this.refetchAssetAndMaster(this.assetKey,e).then((e=>{if(e.ok){const t=e.value.asset,n=e.value.master;this.asset=t,this.master=n;const r=this.createSingleImageDerivativeRequest();return this._request=r,this.imageProgress.addRequest(r.progress),r.send(),r.promise}return this._error=Js.NetworkError,Promise.resolve(t)}))}return Promise.resolve(t)}))}createSingleImageDerivativeRequest(){const{offscreeniness:e}=this,t={...this.assetKey,msl:this.desiredSize};if(!zr.isRenderableDerivativeType(this.master))return new ac({derivativeKey:t,error:Js.UnrenderableDerivativeType});const n=this.getPreferredRenderableURLInfoForImageWithReporting(this.asset,this.master,this.desiredSize,this.sizeVariant);if(!n)return new ac({derivativeKey:t,error:Js.NoSuitableSlot});const r=gc(n.record,this.requestReason,n);return this.createDerivativeRequest(this.assetKey,n,e,r)}}class hc{constructor(e){this.loader=void 0,this.isCached=!1,this.loader=e}get error(){return this.loader.error}get assetKey(){return this.loader.assetKey}get metadata(){return this.loader.metadata}get orientation(){return this.loader.orientation}get promise(){return this.loader.promise}cancel(){return this.loader.cancel()}}class mc extends pc{constructor(e){super(e),this.onDerivativeLoad=void 0,this.onError=void 0,this.networkDebounce=void 0,this.allowsAnimatedGIF=void 0,this.timeouts=[],this.mostRecentMSL=-1,this.mostRecentImage=void 0,this.requestForSlot={},this.erroredSlots=[],this.onDerivativeLoad=e.onDerivativeLoad,this.onError=e.onError,this.networkDebounce=e.networkDebounce,this.allowsAnimatedGIF=Boolean(e.allowsAnimatedGIF&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches),this.updateDesiredSize(e.desiredSize)}updateDesiredSize(e){this.desiredSize=e,e>this.mostRecentMSL&&this.progressivelyLoadDerivatives()}assetChanged(e){const t=this.asset;this.asset=e,zr.isContentDifferent(t,e)&&(this.resetLoadState(),this.mostRecentMSL=-1,this.mostRecentImage=void 0,oc.instance.invalidateAsset(pr.getKey(this.asset)),this.progressivelyLoadDerivatives())}cancel(){for(const e of this.timeouts)clearTimeout(e);this.timeouts=[];for(const e of Object.values(this.requestForSlot))e.cancel()}setCurrentDerivative(e,t,n){(arguments.length>3&&void 0!==arguments[3]&&arguments[3]||t>this.mostRecentMSL)&&(this.mostRecentMSL=t,this.mostRecentImage=e,this.onDerivativeLoad(e,n))}sendRequestForSlot(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.requestForSlot[e.slot]){const r=gc(e.record,this.requestReason,e),i=this.createDerivativeRequest(t,e,this.offscreeniness,r,n);if(this.requestForSlot[e.slot]=i,i.promise.then((n=>{if(n.ok&&n.value)this.setCurrentDerivative(n.value,e.derivativeMSL,i.metadata,this.allowsAnimatedGIF&&Dr(e.utType,Tr.ComCompuserveGif));else if(delete this.requestForSlot[e.slot],!n.ok)if(this.erroredSlots.push(e.slot),n.error===Js.ExpiredURL){this.onError(n.error,!1,this),this.cancel();const e={recordName:this.master.recordName,zoneID:this.master.zoneID};this.refetchAssetAndMaster(t,e).then((e=>{e.ok?(this.asset=e.value.asset,this.master=e.value.master,this.resetLoadState(),this.progressivelyLoadDerivatives()):this.onError(Js.NetworkError,!0,this)}))}else{const{isFatal:e,newURLInfo:r}=this.checkForFatalError();this.onError(n.error,e,this),r&&this.sendRequestForSlot(r,t)}})),this.networkDebounce){const e=setTimeout((()=>{this.imageProgress.addRequest(i.progress),i.send()}),this.networkDebounce);this.timeouts.push(e)}else this.imageProgress.addRequest(i.progress),i.send()}}checkForFatalError(){if(void 0!==this.mostRecentImage)return{isFatal:!1};if(0!==Object.keys(this.requestForSlot).length)return{isFatal:!1};const e=this.getPreferredRenderableURLInfoForImageWithReporting(this.asset,this.master,this.desiredSize,pi.EqualOrGreaterMSL,this.erroredSlots);return e?{isFatal:!1,newURLInfo:e}:{isFatal:!0}}progressivelyLoadDerivatives(){const{asset:e,master:t}=this,n={recordName:e.recordName,zoneID:e.zoneID};if(this.allowsAnimatedGIF&&zr.isGIF(t)){const r=function(e,t){return _i(e,t,bi.Image,bt,1)}(e,t);if(r){let i=oc.instance.getImageClosestToMSL(n,this.desiredSize);if(i&&i.image)this.setCurrentDerivative(i.image,i.msl);else{const r=this.getPreferredRenderableURLInfoForImageWithReporting(e,t,this.desiredSize,pi.ThumbLike,[...this.erroredSlots]);r&&this.sendRequestForSlot(r,n)}return void this.sendRequestForSlot(r,n,!0)}}let r;var i;if(this.shouldReadMetadata||(r=oc.instance.getImageGreaterOrEqualToMSL(n,this.desiredSize),null!==(i=r)&&void 0!==i&&i.image||(r=oc.instance.getImageClosestToMSL(n,this.desiredSize))),r&&r.image){if(this.setCurrentDerivative(r.image,r.msl,void 0!==r.orientation?{Orientation:r.orientation}:void 0),zr.isSizeLargeEnough(r.msl,this.desiredSize,e,t,bi.Image)&&this.mostRecentImage)return void this.imageProgress.complete()}else if(r&&r.msl){if(r.msl>this.mostRecentMSL){const i=this.getPreferredRenderableURLInfoForImageWithReporting(e,t,r.msl,pi.EqualOrGreaterMSL);if(i&&(this.sendRequestForSlot(i,n),zr.isSizeLargeEnough(r.msl,this.desiredSize,e,t,bi.Image)))return}}else{const r=this.getPreferredRenderableURLInfoForImageWithReporting(e,t,this.desiredSize,pi.ThumbLike,[...this.erroredSlots]);if(!r)return void this.onError(Js.NoSuitableSlot,!0,this);if(this.sendRequestForSlot(r,n),zr.isSizeLargeEnough(r.derivativeMSL,this.desiredSize,e,t,bi.Image))return}const o=this.getPreferredRenderableURLInfoForImageWithReporting(e,t,this.desiredSize,pi.EqualOrGreaterMSL,[...this.erroredSlots]);if(o)this.sendRequestForSlot(o,n);else{const{isFatal:e}=this.checkForFatalError();this.onError(Js.NoSuitableSlot,e,this)}}resetLoadState(){this.cancel(),this.requestForSlot={},this.erroredSlots=[]}}function gc(e,t,n){const{slot:r}=n;if(function(e){return e in Ot||e===bt}(r)||function(e){return e in wt||e===bt}(r)){const n={derivativeRequestReason:t,derivativeNameNominal:r},{width:i,height:o}=zr.derivativeSizeForSlot(r,e);void 0!==i&&void 0!==o&&(n.derivativeApproxArea=Yr(i*o));const{fileType:a}=zr.fileDataForSlot(r,e);return void 0!==a&&(n.derivativeUTI=a),n}{const i={derivativeRequestReason:t,derivativeNameNominal:r},o=zr.getAspectRatio({record:e});if(o){const e=n.derivativeMSL*o;i.derivativeApproxArea=Yr(e*n.derivativeMSL)}const a=Ct[r],{width:s,height:c}=zr.derivativeSizeForSlot(a,e);void 0!==s&&void 0!==c&&(i.derivativeTranscodeSourceApproxDerivativeArea=Yr(s*c)),i.derivativeTranscodeSourceDerivativeNameNominal=a;const{fileType:u}=zr.fileDataForSlot(a,e);void 0!==u&&(i.derivativeTranscodeSourceUTI=u);const l=zr.byteSizeForSlot(a,e);return l&&(i.derivativeTranscodeSourceApproxByteSize=l),i}}function vc(e){const{master:t,asset:n,desiredSize:r,sizeVariant:i}=e;if(!zr.isRenderableDerivativeType(t))return;let o;if(i===pi.EqualOrGreaterMSL){const e=Math.min(r,zr.getLargestRenderableMSL(n,t,bi.Image)||Number.MAX_SAFE_INTEGER);o=oc.instance.getImageGreaterOrEqualToMSL(n,e)}else{const e=Ci(n,t,r,i);null!==e&&void 0!==e&&e.derivativeMSL&&(o=oc.instance.getImageWithMSL(n,null===e||void 0===e?void 0:e.derivativeMSL))}return o}function yc(e,t){const{promise:n}=as({assetKey:e,masterKey:t,forceNetworkUpdate:!0});return n?n.then((e=>e.ok&&e.value.asset&&e.value.master?d.Result.success({asset:e.value.asset,master:e.value.master}):e.ok?d.Result.failure(new u({errorCode:"FailedToPerformRequest",message:"Unable to refetch asset and master"})):e)):Promise.resolve(d.Result.failure(new u({errorCode:"FailedToPerformRequest",message:"Unable to refetch asset and master"})))}!function(e){e.OneUpMainDisplay="OneUpMainDisplay",e.OneUpMainDisplayZoom="OneUpMainDisplayZoom",e.OneUpMainDisplayPrefetch="OneUpMainDisplayPrefetch",e.OneUpThumbstrip="OneUpThumbstrip",e.OneUpVidComplPrefetch="OneUpVidComplPrefetch",e.OneUpNonHlsVideoPlaybackBegin="OneUpNonHlsVideoPlaybackBegin",e.GridAsset="GridAsset",e.GridAssetPrefetch="GridAssetPrefetch",e.GridVidComplPlayback="GridVidComplPlayback",e.GridContainer="GridContainer",e.GridContainerPrefetch="GridContainerPrefetch",e.GridContainerScrub="GridContainerScrub",e.ContainerListIcon="ContainerListIcon",e.PhotoStack="PhotoStack",e.CmmSharePlacard="CmmSharePlacard",e.CmmGenerateSharePlacardPreview="CmmGenerateSharePlacardPreview",e.InfoPanelMap="InfoPanelMap",e.Slideshow="Slideshow",e.MemoryPlayer="MemoryPlayer",e.MemoryPlayerPrefetch="MemoryPlayerPrefetch"}(dc||(dc={}));const bc=new DOMParser;var wc;function Sc(e,t){switch(t){case 1:return e;case 2:return{x:1-(e.x+e.width),y:e.y,width:e.width,height:e.height};case 3:return{x:1-(e.x+e.width),y:1-(e.y+e.height),width:e.width,height:e.height};case 4:return{x:e.x,y:1-(e.y+e.height),width:e.width,height:e.height};case 5:case 6:return{x:1-(e.y+e.height),y:e.x,width:e.height,height:e.width};case 7:case 8:return{x:e.y,y:1-(e.x+e.width),width:e.height,height:e.width}}}function Cc(e,t){Object.keys(t).forEach((n=>{e.style.setProperty(n,t[n]||null)}))}function _c(e){return void 0===e?0:7===e||8===e?270:3===e||4===e?180:5===e||6===e?90:0}function Oc(e,t,n){return Math.min(t,Math.round(e*n))}function Ec(e,t,n){return Math.min(n,Math.round(1/e*t))}!function(e){function t(e){if("string"!==typeof e)return;let t;try{t=bc.parseFromString(e,"application/xml"),t&&t.firstChild&&!t.getElementsByTagName("parsererror")[0]||(t=void 0)}catch(n){t=void 0}return t}function n(e){if(!e)return;let t=e.firstChild;for(;t&&1!==t.nodeType;)t=t.nextSibling;if(null===t)return;const n=t.firstElementChild;if(null===n)return;const r={};for(let i=n.firstElementChild;null!==i;i=i.nextElementSibling)if("key"===i.nodeName){const e=i.nextElementSibling;e&&null!==i.textContent&&(r[i.textContent]=e.textContent)}return r}e.parseXml=t,e.getHashFromXmlDict=n,e.parsePListStr=function(e){try{if(On.isBPlist(e)){const t=En.byteStream.resetWithString(e);return On.parser(t)}const r=t(e);return r?n(r):void 0}catch(r){return}},e.serializeXMLPListStr=function(e){try{const t=document.implementation.createDocument(null,"plist");t.documentElement.setAttribute("version","1.0");const n=t.createElement("dict");for(const r in e){const i=e[r],o=t.createElement("key");o.innerHTML=r,n.appendChild(o);const a=t.createElement(i.type);a.innerHTML=i.value,n.appendChild(a)}t.documentElement.appendChild(n);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n${(new XMLSerializer).serializeToString(t)}`}catch{return}}}(wc||(wc={}));const Ic=new Set,Ac=new WeakMap;let Tc;const Pc=e=>.5-.5*Math.cos(e*Math.PI),Rc=(e,t)=>e.style.opacity=1===t||isNaN(t)?"":t;function kc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:200,i=arguments.length>4?arguments[4]:void 0;Dc(e);const o={};o.from=t,o.to=n,o.startTime=performance.now(),o.duration=r,o.tween=Pc,o.render=Rc,o.callback=i,Ic.add(e),Ac.set(e,o),o.render(e,t),Tc||(Tc=requestAnimationFrame(Mc))}function Dc(e){Ic.delete(e);const t=Ac.get(e);t&&(Ac.delete(e),t.callback&&t.callback.apply([]))}function Mc(){Tc=void 0;const e=Array.from(Ic.values()),t=performance.now();for(let n,r=0;n=e[r];r++){const e=Ac.get(n);if(e){const i=Math.max(0,Math.min(1,e.tween(Math.max(0,Math.min(1,(t-e.startTime)/e.duration)))));e.render(n,e.from+i*(e.to-e.from)),1===i&&(Dc(n),r--)}}e.length&&(Tc=requestAnimationFrame(Mc))}let Nc,xc,Lc;!function(e){e.Vertical="Vertical",e.Horizontal="Horizontal"}(Nc||(Nc={})),function(e){e[e.Stationary=0]="Stationary",e[e.Slow=1]="Slow",e[e.Fast=2]="Fast"}(xc||(xc={})),function(e){e.Start="Start",e.End="End"}(Lc||(Lc={}));const jc=new Set;class Uc{get isDimmed(){var e,t,n,r,i,o;return(null===(e=this.asset)||void 0===e?void 0:e.fields.isDeleted)&&(null===(t=this.itemState)||void 0===t?void 0:t.dimIfDeleted)||!(null!==(n=this.asset)&&void 0!==n&&n.fields.isDeleted)&&(null===(r=this.itemState)||void 0===r?void 0:r.dimWhileRecovering)||(null===(i=this.asset)||void 0===i?void 0:i.fields.isSparsePrivateRecord)||(null===(o=this.asset)||void 0===o?void 0:o.fields.isExpunged)||(null===this||void 0===this?void 0:this._isMoving)}get masterKey(){return pr.getKey(this._master)||Br.getMasterRefRecordKey(this._asset)}get isFirstRender(){return this._isFirstRender}get asset(){return this._asset}get master(){return this._master}get itemSize(){return this._itemSize}get element(){return this._element||(this._element=document.createElement("div"),this._element.Gestures=[],this._element.className="PhotoItemView"+(this.className?` ${this.className}`:""),this._element.view=this),this._element}get ownElements(){const e=new Set;return this._element&&e.add(this._element),this._imageElement&&e.add(this._imageElement),this._errorElement&&e.add(this._errorElement),e}get imageElement(){return this._imageElement}get isImageElementSolid(){return Boolean(this._imageElement&&!this._isImageElementFading)}get plugins(){return this._itemViewPlugins||[]}set allowsAspectRatioTransition(e){this.element.classList.toggle("has-aspect-ratio-transition",e)}get requiredMSL(){var e;const t=this._itemSize;if(!t)return 700;const n=window.devicePixelRatio||1,r=Math.min(2,n),i=function(e,t,n){const r=t/n,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?e<r:e>r;return{width:i?t:n*e,height:i?t/e:n}}(this.imageAspectRatio||1,Math.floor(t.width*r),Math.floor(t.height*r),null===(e=this.itemState)||void 0===e?void 0:e.isCover);return Math.min(1e4,zr.getMSL(i))}get shouldRenderAsHidden(){const e=this.itemState,t=this._asset,n=null===t||void 0===t?void 0:t.fields.isHidden;return Boolean(n&&!(null!==e&&void 0!==e&&e.renderHiddenAsVisible))}constructor(e){this.id=void 0,this.itemState=void 0,this.contentRect=void 0,this.itemViewPlugins=void 0,this._itemViewPlugins=void 0,this.className=void 0,this._element=void 0,this.fallbackImageElement=void 0,this._latestLoader=void 0,this._imageElement=void 0,this.allowShowingErrorElement=!0,this._errorElement=void 0,this._imageOrientation=void 0,this._isImageElementFading=!1,this._isImageFadeInAllowed=!0,this._prevOuterAspectRatio=0,this._prevRenderAsHidden=!1,this._isFirstRender=!0,this._lastRenderedAssetKey=void 0,this._prevAssetFingerprintString=void 0,this._isMoving=!1,this._asset=void 0,this._master=void 0,this._itemSize=void 0,this._handleAssetChanged=this._handleAssetChanged.bind(this),this._handleMasterChanged=this._handleMasterChanged.bind(this),this.itemViewPlugins=(null===e||void 0===e?void 0:e.itemViewPlugins)||[]}render(e){if(!this.itemState)return;const{itemState:t}=this,n=null===t||void 0===t?void 0:t.assetKey;!this._lastRenderedAssetKey&&!n||Un.areRecordKeysEqual(this._lastRenderedAssetKey,n)||this._handleAssetKeyChanged(),this._updateItemView(e),this._updatePlugins(),this._isFirstRender=!1}_handleAssetKeyChanged(){var e;const t=null===(e=this.itemState)||void 0===e?void 0:e.assetKey;if(this._disposeErrorElement(),this._imageElement!==this.fallbackImageElement&&this.disposeImageElement(),this._lastRenderedAssetKey&&sr.instance.assetStore.removeListener(this._lastRenderedAssetKey,this._handleAssetChanged),this.masterKey&&sr.instance.masterStore.removeListener(this.masterKey,this._handleMasterChanged),this._prevAssetFingerprintString=void 0,this._lastRenderedAssetKey=t,t){sr.instance.assetStore.addListener(t,this._handleAssetChanged),this._asset=sr.instance.assetStore.get(t);const e=Br.getMasterRefRecordKey(this._asset);this._master=e?sr.instance.masterStore.get(e):void 0,this._asset&&(this._prevAssetFingerprintString=Br.computeFingerprintString(this._asset));const n=this.masterKey;n&&sr.instance.masterStore.addListener(n,this._handleMasterChanged)}else this._asset=void 0,this._master=void 0,this._prevAssetFingerprintString=void 0;this._handleAssetChanged({currentValue:this._asset})}_updateItemView(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const{itemSize:t}=e;this._itemSize=t}const{itemState:n}=this,r=null===n||void 0===n?void 0:n.assetKey;null!==n&&void 0!==n&&n.isInvisible&&(this._isImageFadeInAllowed=!1);const{_asset:i,_master:o}=this;!this._imageElement||r&&i&&o||this.fallbackImageElement||this._clearElement(),this._updateOuterAspectRatio(),this.updateClassName();const a=this.fallbackImageElement;if(!r||!i||!o)return void(a?this._replaceImageElement(a):this.isFirstRender&&(this.allowsAspectRatioTransition=!0));if(this.renderAsHidden)return void this._clearElement();if(this._imageElement&&this._imageElement!==this.fallbackImageElement&&!t)return;const s=this.requiredMSL,c=n.imageLoaderSizeVariant||pi.ThumbLike;if(!t){const e=pc.getCachedImage({asset:i,master:o,desiredSize:s,sizeVariant:c});if(e&&e.image)return this._replaceImageElement(e.image,e.orientation),void this._cancelExistingLoadRequest();a&&this._replaceImageElement(a)}if(this._errorElement)return;if(!zr.isRenderableDerivativeType(o))return;if(null!==e&&void 0!==e&&e.scrollSpeed&&(null===e||void 0===e?void 0:e.scrollSpeed)>=xc.Fast)return;const u=this._latestLoader;if(u&&Un.areRecordKeysEqual(u.assetKey,r)&&!t)return;this._cancelExistingLoadRequest();const l=0===(null===e||void 0===e?void 0:e.pageOffset)||void 0===(null===e||void 0===e?void 0:e.pageOffset)?dc.GridAsset:dc.GridAssetPrefetch;this.loadImage({asset:i,master:o,desiredSize:s,offscreeniness:Math.abs((null===e||void 0===e?void 0:e.pageOffset)||0),requestReason:l,refetchAssetAndMaster:yc,sizeVariant:c,shouldRemoveChromiumHDR:!0})}loadImage(e){const t=pc.getImage(e);t.isCached?this._latestLoader=void 0:(this._latestLoader=t,t.promise.then((e=>{!this._latestLoader||"promise"in this._latestLoader&&this._latestLoader.promise!==t.promise||(this._latestLoader=void 0,e.ok?this._handleLoadSuccess(e.value,t.orientation):this._handleLoadFailed(),this._updatePlugins())})))}_handleMasterChanged(e){const t=this.masterKey,n=e.currentValue;t&&n&&!Un.areRecordKeysEqual(t,n)||(this._updateMaster(t),this._updateItemView(void 0,!1),this._updatePlugins())}_handleAssetChanged(e){var t;const n=e.currentValue,r=null===(t=this.itemState)||void 0===t?void 0:t.assetKey;if(n&&r&&!Un.areRecordKeysEqual(n,r))return;const i=this.masterKey,o=this._asset;this._asset=n,this._updateMaster(i);let a=!1;const s=n?Br.computeFingerprintString(n):void 0;n&&o&&this._prevAssetFingerprintString!==s&&(oc.instance.invalidateAsset(n),a=!0),this._prevAssetFingerprintString=s,this._updateItemView(void 0,a),this._updatePlugins()}_updateMaster(e){const t=this.masterKey;!e&&t&&sr.instance.masterStore.addListener(t,this._handleMasterChanged),this._master=t?sr.instance.masterStore.get(t):void 0}_handleLoadSuccess(e,t){this.fallbackImageElement&&this._imageElement===this.fallbackImageElement&&zr.getMSL(this.fallbackImageElement)>=zr.getMSL(e)||this._replaceImageElement(e,t)}_replaceImageElement(e,t){const n=this._imageElement;var r;n!==e&&this._element&&this._itemSize&&(this._clearElement(),this._imageElement=e,this._imageOrientation=t,e&&(this._updateOuterAspectRatio(),this.processImageElement(e,t),e.classList.add("DerivativeImage"),n||this.isFirstRender||!this._isImageFadeInAllowed||(this._isImageElementFading=!0,this.allowsAspectRatioTransition=!1,kc(e,0,1,200,(()=>{this._isImageElementFading=!1,this._updatePlugins()}))),this._element.insertBefore(e,this._element.firstChild),(n||null!==(r=this.itemState)&&void 0!==r&&r.isInvisible)&&e.decode&&e.decode()),this.updateClassName())}processImageElement(e,t){this._rotateImage(e,t)}updateClassName(){const e=this.itemState,t=null===e||void 0===e?void 0:e.isSelected,n=null===e||void 0===e?void 0:e.isDisabled,r=this.isDimmed,i=null===e||void 0===e?void 0:e.isInvisible,o=null===e||void 0===e?void 0:e.isCover,a=null===e||void 0===e?void 0:e.assetKey,s=this.shouldRenderAsHidden,{classList:c}=this.element;c.toggle("is-selected",Boolean(t)),c.toggle("is-disabled",Boolean(n)),c.toggle("has-asset",Boolean(a)),c.toggle("has-derivative",Boolean(this._imageElement)),c.toggle("is-dimmed",Boolean(r)),c.toggle("is-invisible",Boolean(i)),c.toggle("is-cover",Boolean(o)),c.toggle("is-errored",Boolean(this._errorElement)),c.toggle("is-hidden-asset-obfuscated",Boolean(s))}_updatePlugins(e){this._itemViewPlugins||(this._itemViewPlugins=this.itemViewPlugins.map((e=>new e(this))));for(const t of this._itemViewPlugins)t.update(e)}get renderAsHidden(){var e,t;return!(null===(e=this._asset)||void 0===e||!e.fields.isHidden)&&!(null!==(t=this.itemState)&&void 0!==t&&t.renderHiddenAsVisible)}get outerAspectRatio(){var e;return this._itemSize?this.renderAsHidden?1:null!==(e=this.itemState)&&void 0!==e&&e.isCover?this._itemSize.width/this._itemSize.height:this.imageAspectRatio:1}get imageAspectRatio(){const{itemState:e}=this;if(this._imageElement){const e=function(e,t){if(e){const n=e.naturalWidth,r=e.naturalHeight;if(n&&r){const e=_c(t);return 270===e||90===e?r/n:n/r}}}(this._imageElement,this._imageOrientation);if(e)return e}const{_asset:t,_master:n}=this;return e&&t&&n&&zr.getAspectRatio({asset:t,master:n})||1}get imageOrientation(){return this._imageOrientation}_getImageContainerStyleObjectForHiddenPhoto(e,t,n){const r=Math.min(t,e);return{height:Math.round(.75*r)+"px",width:Math.round(.75*r)+"px","margin-inline-start":Math.round((e-.75*r)/2)+"px","margin-top":Math.round((t-.75*r)/2)+"px"}}_updateOuterAspectRatio(){if(!this._itemSize)return;const{outerAspectRatio:e}=this,t=this.renderAsHidden;if(this._prevOuterAspectRatio!==e||this._prevRenderAsHidden!==t){var n,r,i;this._prevOuterAspectRatio=e,this._prevRenderAsHidden=t;const o=!this.renderAsHidden||null!==(n=this.itemState)&&void 0!==n&&n.isCover?function(e,t,n,r){const i={};if(r)return i;const o=Ec(e,t,n),a=Oc(e,t,n),s=Math.round(n/2-o/2);i["margin-top"]=`${s}px`;const c=Math.round(t/2-a/2);return i["margin-inline-start"]=`${c}px`,i.height=`${o}px`,i.width=`${a}px`,i}(e,this._itemSize.width,this._itemSize.height,!(null===(i=this.itemState)||void 0===i||!i.isCover)):this._getImageContainerStyleObjectForHiddenPhoto(this._itemSize.width,this._itemSize.height,null===(r=this.itemState)||void 0===r?void 0:r.isCover);Cc(this.element,o);let a=this.contentRect||(this.contentRect={});a.x=parseFloat(o["margin-inline-start"]||"")||0,a.y=parseFloat(o["margin-top"]||"")||0,a.width=parseFloat(o.width||"")||this._itemSize.width,a.height=parseFloat(o.height||"")||this._itemSize.height}}_rotateImage(e,t){if(!this._itemSize)return;const n=function(e,t,n,r){const i={};if(t&&1!==t){const o=_c(t);if(270===o||90===o){const t=Oc(e,n,r),o=Ec(e,n,r),a=Math.round(t/2-o/2),s=Math.round(o/2-t/2);i["margin-top"]=`${s}px`,i["margin-inline-start"]=`${a}px`,i.width=`${o}px`,i.height=`${t}px`}let a="",s="";o>0&&(a=`rotate(${o}deg)`),2===t||4===t?s=" scaleX(-1)":5!==t&&7!==t||(s=" scaleY(-1)"),i.transform=`${a}${s}`}return i}(this.outerAspectRatio,t,this._itemSize.width,this._itemSize.height);Cc(e,n)}disposeImageElement(){const e=this._imageElement;this._imageElement=void 0,e&&e.parentNode===this._element&&(e.classList.remove("DerivativeImage"),Dc(e),e.removeAttribute("style"),e.remove())}_clearElement(){this._disposeErrorElement(),this.disposeImageElement()}_disposeErrorElement(){this._errorElement&&(this._errorElement.remove(),this._errorElement=void 0)}_cancelExistingLoadRequest(){this._latestLoader&&(this._latestLoader.cancel(),this._latestLoader=void 0)}_handleLoadFailed(){this._element&&void 0===this._errorElement&&(this.fallbackImageElement||(this.disposeImageElement(),this.allowShowingErrorElement&&(this._errorElement=document.createElement("div"),this._errorElement.className="PhotoItemView-icon ErrorTriangle",this._element.appendChild(this._errorElement),this.isFirstRender||(this.allowsAspectRatioTransition=!1,kc(this._errorElement,0,.25,200)),this.updateClassName()),this._sendErrorStat()))}_sendErrorStat(){var e;const t=null===(e=this.itemState)||void 0===e?void 0:e.assetKey,n=t?Un.recordKeyString(t):void 0;n&&!jc.has(n)&&(jc.add(n),ce.instance.report("itemViewErrorShown",{itemViewType:"nativeScrollingGrid"}))}wasRemoved(){this._cancelExistingLoadRequest(),this._clearElement(),this._lastRenderedAssetKey&&sr.instance.assetStore.removeListener(this._lastRenderedAssetKey,this._handleAssetChanged),this.masterKey&&sr.instance.masterStore.removeListener(this.masterKey,this._handleMasterChanged),this._element=void 0,this.itemState=void 0,this._asset=void 0,this._master=void 0,this._lastRenderedAssetKey=void 0}}class Fc extends Uc{constructor(e){super(e),this.itemState=void 0,this._cplMemory=void 0,this._lastRenderedCPLMemoryKey=void 0,this._lastFocalPoint=void 0,this.className="MemoryItemView",this.itemState=void 0,this._handleMemoryInfoChanged=this._handleMemoryInfoChanged.bind(this)}get cplMemory(){return this._cplMemory}_handleMemoryInfoChanged(e){if(e.currentValue){this._cplMemory=e.currentValue,this._updatePlugins();const t=cr.getKeyAssetRecordKey(this._cplMemory);this.itemState&&!Un.areRecordKeysEqual(this._lastRenderedAssetKey,t)&&(this.itemState.assetKey=t,this._handleAssetKeyChanged()),this._updateItemView()}}render(e){const{itemState:t}=this;if(!this.itemState)return;const n=null===t||void 0===t?void 0:t.memoryKey;if(n&&(!this._lastRenderedCPLMemoryKey||!Un.areRecordKeysEqual(this._lastRenderedCPLMemoryKey,n))){this._cplMemory=sr.instance.memoriesStore.get(n),this.fallbackImageElement=void 0,this._lastRenderedCPLMemoryKey&&sr.instance.memoriesStore.removeListener(this._lastRenderedCPLMemoryKey,this._handleMemoryInfoChanged),sr.instance.memoriesStore.addListener(n,this._handleMemoryInfoChanged);const e=cr.getKeyAssetRecordKey(this._cplMemory);e&&this.itemState&&(this.itemState.assetKey=e,this._handleAssetKeyChanged()),this._lastRenderedCPLMemoryKey=n}super.render(e)}_handleLoadSuccess(e,t){super._handleLoadSuccess(e,t),this.asset&&this.master&&pc.getImage({asset:this.asset,master:this.master,desiredSize:400,sizeVariant:pi.ThumbLike,requestReason:dc.MemoryPlayerPrefetch,refetchAssetAndMaster:yc,offscreeniness:2,shouldRemoveChromiumHDR:!0})}updateClassName(){var e,t;super.updateClassName(),this.element.classList.toggle("ignore-border-radius",Boolean(null===(e=this.itemState)||void 0===e?void 0:e.ignoreBorderRadius)),this.element.classList.toggle("is-home-tile",Boolean(null===(t=this.itemState)||void 0===t?void 0:t.isHomeTile)),this._updateSalientFocalPoint()}wasRemoved(){this._lastRenderedCPLMemoryKey&&sr.instance.memoriesStore.removeListener(this._lastRenderedCPLMemoryKey,this._handleMemoryInfoChanged),this._lastRenderedCPLMemoryKey=void 0,this._cplMemory=void 0,super.wasRemoved()}_handleAssetKeyChanged(){this._lastFocalPoint=void 0,super._handleAssetKeyChanged()}_updateSalientFocalPoint(){if(this._lastFocalPoint||!this.imageElement)return;if(!this.master||!this.master.fields.mediaMetaDataEnc_decoded)return;const e=function(e){if(!e)return;const t=e.Orientation||1;let n={imageWidth:-1,imageHeight:-1,focalPoint:null,faces:[]};const r=e["{ExifAux}"];if(r&&r.Regions&&r.Regions.RegionList&&r.Regions.RegionList.length){if(void 0===r.Regions.WidthAppliedTo||void 0===r.Regions.HeightAppliedTo)return;n.imageHeight=t<5?r.Regions.HeightAppliedTo||-1:r.Regions.WidthAppliedTo||-1,n.imageWidth=t<5?r.Regions.WidthAppliedTo||-1:r.Regions.HeightAppliedTo||-1;for(const e of r.Regions.RegionList){if(void 0===e.X||void 0===e.Y)continue;const r=Sc({x:e.X-(e.Width||0)/2,y:e.Y-(e.Height||0)/2,width:e.Width||0,height:e.Height||0},t);n.faces.push(r)}}return n.focalPoint=function(e,t,n){if(0===e.length||t<=0||n<=0)return null;const r=e.map((e=>({x:e.x*t+e.width*t/2,y:e.y*n+e.height*n/2})));let i=0,o=0;for(const l of r)i+=l.x,o+=l.y;const a=i/r.length,s=o/r.length,c=Math.max(0,Math.min(a,t)),u=Math.max(0,Math.min(s,n));return{x:c/t,y:u/n}}(n.faces,n.imageWidth,n.imageHeight),n.focalPoint?n:void 0}(wc.parsePListStr(this.master.fields.mediaMetaDataEnc_decoded));e&&e.focalPoint?this._lastFocalPoint={hasFocalPoint:!0,focalPoint:e.focalPoint}:this._lastFocalPoint={hasFocalPoint:!1},this._lastFocalPoint&&this._lastFocalPoint.hasFocalPoint?this.imageElement.style.objectPosition=`${100*this._lastFocalPoint.focalPoint.x}% ${100*this._lastFocalPoint.focalPoint.y}%`:this.imageElement.style.objectPosition&&(this.imageElement.style.objectPosition="")}}class zc{constructor(e){this.itemView=void 0,this.itemView=e}update(e){}get itemState(){return this.itemView.itemState}}class Bc extends zc{constructor(e){super(e),this.itemView=void 0,this.itemView=e}get itemState(){return this.itemView.itemState}}class Kc extends Bc{constructor(){super(...arguments),this._textContainer=void 0,this._prevTitle=void 0,this._prevSubtitle=void 0}update(e){this._updateTitle()}_updateTitle(){var e,t;const n=(null===(e=this.itemView.cplMemory)||void 0===e?void 0:e.fields.title_decoded)||"",r=(null===(t=this.itemView.cplMemory)||void 0===t?void 0:t.fields.subtitle_decoded)||"";var i,o;n===this._prevTitle&&r===this._prevSubtitle||(this._textContainer&&this._textContainer.remove(),this._textContainer=null===(i=function(e,t,n){const r=document.createElement("div");r.className="MemoryFont";const i=document.createElement("div");i.className="MemoryFont-title "+(null!==n&&void 0!==n?n:""),i.textContent=e;const o=document.createElement("div");return o.className="MemoryFont-subtitle",o.textContent=t,r.appendChild(i),r.appendChild(o),{container:r,titleContainer:i,subtitleContainer:o}}(n,r,cr.getStoryTitleCategory(null===(o=this.itemView.cplMemory)||void 0===o?void 0:o.fields.graphData_decoded)))||void 0===i?void 0:i.container,this._textContainer.classList.add("MemoryTitleOverlayItemViewPlugin"),this.itemView.element.appendChild(this._textContainer),this._prevTitle=n,this._prevSubtitle=r)}}class Hc extends Bc{constructor(){super(...arguments),this._backdrop=void 0}update(e){this._backdrop||(this._backdrop=document.createElement("div"),this._backdrop.className="MemoryBackdropOverlayItemViewPlugin",this._backdrop.appendChild(document.createElement("div")),this.itemView.element.appendChild(this._backdrop))}}const Wc=Pa(Bi.AllMemories),qc='\n.MemoryItemView.PhotoItemView{cursor:pointer;box-shadow:0 8px 20px 0 var(--photos-var-memories-drop-shadow)}.MemoryItemView.PhotoItemView:not(.ignore-border-radius),.MemoryItemView.PhotoItemView:not(.ignore-border-radius)>.DerivativeImage{border-radius:23px}.MemoryItemView.PhotoItemView:not(.ignore-border-radius).navigation-being-pressed::after{border-radius:23px}.MemoryItemView.PhotoItemView.is-home-tile{--memory-font-scale-factor: 0.7}.MemoryItemView.PhotoItemView.is-home-tile .MemoryTitleOverlayItemViewPlugin.MemoryFont{text-align:end;margin-inline-end:10px}[dir=ltr] .MemoryItemView.PhotoItemView.is-home-tile .MemoryTitleOverlayItemViewPlugin.MemoryFont,.MemoryItemView.PhotoItemView.is-home-tile[dir=ltr] .MemoryTitleOverlayItemViewPlugin.MemoryFont{text-align:right;margin-right:10px}[dir=rtl] .MemoryItemView.PhotoItemView.is-home-tile .MemoryTitleOverlayItemViewPlugin.MemoryFont,.MemoryItemView.PhotoItemView.is-home-tile[dir=rtl] .MemoryTitleOverlayItemViewPlugin.MemoryFont{text-align:left;margin-left:10px}.MemoryItemView.PhotoItemView.is-home-tile,.MemoryItemView.PhotoItemView.is-home-tile>.DerivativeImage{dynamic-range-limit:standard}.MemoryItemView.PhotoItemView.navigation-being-pressed::after{content:"";position:absolute;inline-size:100%;block-size:100%;inset-inline-start:0;inset-block-start:0;background:rgba(0,0,0,0.1)}[dir=ltr] .MemoryItemView.PhotoItemView.navigation-being-pressed::after,.MemoryItemView.PhotoItemView.navigation-being-pressed[dir=ltr]::after{width:100%;height:100%;left:0;top:0}[dir=rtl] .MemoryItemView.PhotoItemView.navigation-being-pressed::after,.MemoryItemView.PhotoItemView.navigation-being-pressed[dir=rtl]::after{width:100%;height:100%;right:0;top:0}  .PhotoItemView{background:var(--photos-var-gray-square);block-size:100%;inline-size:100%;box-sizing:border-box;position:absolute;inset-inline-start:0;inset-block-start:0;contain:layout;z-index:0}[dir=ltr] .PhotoItemView,.PhotoItemView[dir=ltr]{height:100%;width:100%;left:0;top:0}[dir=rtl] .PhotoItemView,.PhotoItemView[dir=rtl]{height:100%;width:100%;right:0;top:0}.PhotoItemView.navigation-being-pressed.has-media::after{content:"";position:absolute;inline-size:100%;block-size:100%;inset-inline-start:0;inset-block-start:0;background:rgba(0,0,0,0.2)}[dir=ltr] .PhotoItemView.navigation-being-pressed.has-media::after,.PhotoItemView.navigation-being-pressed.has-media[dir=ltr]::after{width:100%;height:100%;left:0;top:0}[dir=rtl] .PhotoItemView.navigation-being-pressed.has-media::after,.PhotoItemView.navigation-being-pressed.has-media[dir=rtl]::after{width:100%;height:100%;right:0;top:0}.PhotoItemView.is-invisible{visibility:hidden}.PhotoItemView.is-dimmed{opacity:0.35}.PhotoItemView.is-disabled{opacity:0.2;pointer-events:none}.PhotoItemView .DerivativeImage{position:absolute;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;border:0;pointer-events:none}[dir=ltr] .PhotoItemView .DerivativeImage,.PhotoItemView[dir=ltr] .DerivativeImage{left:0;top:0;width:100%;height:100%}[dir=rtl] .PhotoItemView .DerivativeImage,.PhotoItemView[dir=rtl] .DerivativeImage{right:0;top:0;width:100%;height:100%}.PhotoItemView.is-cover .DerivativeImage{-o-object-fit:cover;object-fit:cover}.PhotoItemView .PhotoItemView-icon{position:absolute;inline-size:40%;block-size:40%;inset-inline-start:50%;inset-block-start:50%;transform:translate(-50%, -50%);max-inline-size:105px;max-block-size:91px;background-repeat:no-repeat;background-position:center center;background-size:contain;opacity:0.25}[dir=ltr] .PhotoItemView .PhotoItemView-icon,.PhotoItemView[dir=ltr] .PhotoItemView-icon{width:40%;height:40%;left:50%;top:50%;max-width:105px;max-height:91px}[dir=rtl] .PhotoItemView .PhotoItemView-icon,.PhotoItemView[dir=rtl] .PhotoItemView-icon{width:40%;height:40%;right:50%;top:50%;max-width:105px;max-height:91px}[dir="rtl"] .PhotoItemView .PhotoItemView-icon{transform:translate(50%, -50%)}.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/631a2b189ecbf5877f6aff776087ddcb.png)}@media (min-resolution: 144dpi){.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/88f0647c3b9002a7c253c0c238a1878b.png)}}@media (min-resolution: 216dpi){.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/e15d4bf878367b9b6cdd0df9bdf9202c.png)}}@media (prefers-color-scheme: dark){.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/a498681166c6365fca077910df6ea397.png)}}@media (prefers-color-scheme: dark) and (min-resolution: 144dpi){.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/502c893f875f8135fc305bbadff00a5f.png)}}@media (prefers-color-scheme: dark) and (min-resolution: 216dpi){.PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/8666822ddfbc4ed9a991fd4286ac532b.png)}}[data-appearance="dark"] .PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/a498681166c6365fca077910df6ea397.png)}@media (min-resolution: 144dpi){[data-appearance="dark"] .PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/502c893f875f8135fc305bbadff00a5f.png)}}@media (min-resolution: 216dpi){[data-appearance="dark"] .PhotoItemView .PhotoItemView-icon.ErrorTriangle{background-image:url(./images/8666822ddfbc4ed9a991fd4286ac532b.png)}}.PhotoItemView.has-aspect-ratio-transition{transition:width .25s ease,height .25s ease,margin-left .25s ease,margin-top .25s ease}[dir="rtl"] .PhotoItemView.has-aspect-ratio-transition{transition:width .25s ease,height .25s ease,margin-right .25s ease,margin-top .25s ease}.PhotoItemView.is-hidden-asset-obfuscated:not(.is-cover){border-radius:10px}  @font-face{font-family:"SF Pro ExtraExpandedSemibold";font-style:normal;font-weight:650;src:local("\u263a"),url("/applications/photos3/current/fonts/SFProExtraExpandedSemibold.woff2") format("woff2")}@font-face{font-family:"SF Pro ExtraCompressedBold";font-style:normal;font-weight:760;src:local("\u263a"),url("/applications/photos3/current/fonts/SFProExtraCompressedBold.woff2") format("woff2")}.MemoryFont{--memory-font-scale-factor-internal: var(--memory-font-scale-factor, 1)}.MemoryFont .MemoryFont-title{white-space:pre-line;text-overflow:ellipsis;overflow:hidden}.MemoryFont .MemoryFont-title,.MemoryFont .MemoryFont-title.sleek{font-family:"SF Pro ExtraCompressedBold","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(45px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1.556px*var(--memory-font-scale-factor-internal));font-weight:760;text-transform:uppercase}[apple-system-font-capable] .MemoryFont .MemoryFont-title,[apple-system-font-capable] .MemoryFont .MemoryFont-title.sleek{font-family:"SF Pro ExtraCompressedBold",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.fun{font-family:"SF Pro ExtraExpandedSemibold","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(29px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1.564px*var(--memory-font-scale-factor-internal));font-weight:650;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.fun{font-family:"SF Pro ExtraExpandedSemibold",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.delightful{font-family:"New York Medium","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(28px*var(--memory-font-scale-factor-internal));letter-spacing:calc(2.499px*var(--memory-font-scale-factor-internal));font-weight:900;text-transform:uppercase}[apple-system-font-capable] .MemoryFont .MemoryFont-title.delightful{font-family:"New York Medium",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.round{font-family:"SF Pro Rounded","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(37px*var(--memory-font-scale-factor-internal));letter-spacing:calc(-0.476px*var(--memory-font-scale-factor-internal));font-weight:900;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.round{font-family:"SF Pro Rounded",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.hipster{font-family:"SF Mono","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(32px*var(--memory-font-scale-factor-internal));letter-spacing:calc(0.665px*var(--memory-font-scale-factor-internal));font-weight:800;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.hipster{font-family:"SF Mono",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.traditional{font-family:"New York Medium","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(36px*var(--memory-font-scale-factor-internal));letter-spacing:calc(-0.5px*var(--memory-font-scale-factor-internal));font-weight:800;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.traditional{font-family:"New York Medium",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-subtitle{font-family:"SFUIDisplay", "Helvetica Neue", sans-serif;font-size:calc(16px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1px*var(--memory-font-scale-factor-internal));font-weight:600;text-transform:uppercase;margin-block-start:calc(5px*var(--memory-font-scale-factor-internal));white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[dir=ltr] .MemoryFont .MemoryFont-subtitle,.MemoryFont[dir=ltr] .MemoryFont-subtitle{margin-top:calc(5px*var(--memory-font-scale-factor-internal))}[dir=rtl] .MemoryFont .MemoryFont-subtitle,.MemoryFont[dir=rtl] .MemoryFont-subtitle{margin-top:calc(5px*var(--memory-font-scale-factor-internal))}[apple-system-font-capable] .MemoryFont .MemoryFont-subtitle{font-family:system-ui,"Helvetica Neue",sans-serif}.MemoryTitleOverlayItemViewPlugin.MemoryFont{position:absolute;z-index:3000;color:white;inset-inline-start:10px;inset-inline-end:10px;inset-block-end:calc(34px*var(--memory-font-scale-factor));max-block-size:70%;overflow:hidden;text-align:center}[dir=ltr] .MemoryTitleOverlayItemViewPlugin.MemoryFont,.MemoryTitleOverlayItemViewPlugin.MemoryFont[dir=ltr]{left:10px;right:10px;bottom:calc(34px*var(--memory-font-scale-factor));max-height:70%}[dir=rtl] .MemoryTitleOverlayItemViewPlugin.MemoryFont,.MemoryTitleOverlayItemViewPlugin.MemoryFont[dir=rtl]{right:10px;left:10px;bottom:calc(34px*var(--memory-font-scale-factor));max-height:70%}.MemoryTitleOverlayItemViewPlugin.MemoryFont .MemoryFont-title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@supports (text-wrap: balance){.MemoryTitleOverlayItemViewPlugin.MemoryFont .MemoryFont-title{text-wrap:balance}}.MemoryTitleOverlayItemViewPlugin.MemoryFont .MemoryFont-subtitle{font-weight:700;font-size:calc(18px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1px*var(--memory-font-scale-factor-internal))}  @font-face{font-family:"SF Pro ExtraExpandedSemibold";font-style:normal;font-weight:650;src:local("\u263a"),url("/applications/photos3/current/fonts/SFProExtraExpandedSemibold.woff2") format("woff2")}@font-face{font-family:"SF Pro ExtraCompressedBold";font-style:normal;font-weight:760;src:local("\u263a"),url("/applications/photos3/current/fonts/SFProExtraCompressedBold.woff2") format("woff2")}.MemoryFont{--memory-font-scale-factor-internal: var(--memory-font-scale-factor, 1)}.MemoryFont .MemoryFont-title{white-space:pre-line;text-overflow:ellipsis;overflow:hidden}.MemoryFont .MemoryFont-title,.MemoryFont .MemoryFont-title.sleek{font-family:"SF Pro ExtraCompressedBold","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(45px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1.556px*var(--memory-font-scale-factor-internal));font-weight:760;text-transform:uppercase}[apple-system-font-capable] .MemoryFont .MemoryFont-title,[apple-system-font-capable] .MemoryFont .MemoryFont-title.sleek{font-family:"SF Pro ExtraCompressedBold",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.fun{font-family:"SF Pro ExtraExpandedSemibold","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(29px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1.564px*var(--memory-font-scale-factor-internal));font-weight:650;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.fun{font-family:"SF Pro ExtraExpandedSemibold",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.delightful{font-family:"New York Medium","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(28px*var(--memory-font-scale-factor-internal));letter-spacing:calc(2.499px*var(--memory-font-scale-factor-internal));font-weight:900;text-transform:uppercase}[apple-system-font-capable] .MemoryFont .MemoryFont-title.delightful{font-family:"New York Medium",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.round{font-family:"SF Pro Rounded","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(37px*var(--memory-font-scale-factor-internal));letter-spacing:calc(-0.476px*var(--memory-font-scale-factor-internal));font-weight:900;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.round{font-family:"SF Pro Rounded",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.hipster{font-family:"SF Mono","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(32px*var(--memory-font-scale-factor-internal));letter-spacing:calc(0.665px*var(--memory-font-scale-factor-internal));font-weight:800;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.hipster{font-family:"SF Mono",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-title.traditional{font-family:"New York Medium","SFUIDisplay","Helvetica Neue",sans-serif;font-size:calc(36px*var(--memory-font-scale-factor-internal));letter-spacing:calc(-0.5px*var(--memory-font-scale-factor-internal));font-weight:800;text-transform:none}[apple-system-font-capable] .MemoryFont .MemoryFont-title.traditional{font-family:"New York Medium",system-ui,"Helvetica Neue",sans-serif}.MemoryFont .MemoryFont-subtitle{font-family:"SFUIDisplay", "Helvetica Neue", sans-serif;font-size:calc(16px*var(--memory-font-scale-factor-internal));letter-spacing:calc(1px*var(--memory-font-scale-factor-internal));font-weight:600;text-transform:uppercase;margin-block-start:calc(5px*var(--memory-font-scale-factor-internal));white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[dir=ltr] .MemoryFont .MemoryFont-subtitle,.MemoryFont[dir=ltr] .MemoryFont-subtitle{margin-top:calc(5px*var(--memory-font-scale-factor-internal))}[dir=rtl] .MemoryFont .MemoryFont-subtitle,.MemoryFont[dir=rtl] .MemoryFont-subtitle{margin-top:calc(5px*var(--memory-font-scale-factor-internal))}[apple-system-font-capable] .MemoryFont .MemoryFont-subtitle{font-family:system-ui,"Helvetica Neue",sans-serif}  .MemoryItemView .MemoryBackdropOverlayItemViewPlugin{position:relative;inset-inline-start:0;inset-block-start:0;inset-inline-end:0;inset-block-end:0;background:rgba(0,0,0,0.2);z-index:2990;block-size:100%;content:""}[dir=ltr] .MemoryItemView .MemoryBackdropOverlayItemViewPlugin,.MemoryItemView[dir=ltr] .MemoryBackdropOverlayItemViewPlugin{left:0;top:0;right:0;bottom:0;height:100%}[dir=rtl] .MemoryItemView .MemoryBackdropOverlayItemViewPlugin,.MemoryItemView[dir=rtl] .MemoryBackdropOverlayItemViewPlugin{right:0;top:0;left:0;bottom:0;height:100%}.MemoryItemView:not(.ignore-border-radius) .MemoryBackdropOverlayItemViewPlugin{border-radius:23px}   \n',Vc=24,$c='\n@font-face {\n    font-family: "SF Pro ExtraExpandedSemibold";\n    font-style: normal;\n    font-weight: 650;\n    src: local("\u263a"),\n        url("/applications/photos3/current/fonts/SFProExtraExpandedSemibold.woff2")\n            format("woff2");\n    /* (C) 2019 Apple Inc. All rights reserved. */\n}\n@font-face {\n    font-family: "SF Pro ExtraCompressedBold";\n    font-style: normal;\n    font-weight: 760;\n    src: local("\u263a"),\n        url("/applications/photos3/current/fonts/SFProExtraCompressedBold.woff2")\n            format("woff2");\n    /* (C) 2019 Apple Inc. All rights reserved. */\n}\n',Gc="/applications/photos3/current/",Zc=5;let Qc=!1;function Yc(e){return void 0!==e}function Jc(e){const{tileWidth:t,tileHeight:n,memoryTileIndex:r}=e;if(!Qc&&(Qc=!0,function(){if(Qs)return;Qs=!0,Is(Ys,"stylesheet");const e=["https://www.apple.com/wss/fonts/New-York-Medium/v1/new-york-medium_heavy.woff2","https://www.apple.com/wss/fonts/SF-Mono/v1/sf-mono_heavy.woff","https://www.apple.com/wss/fonts/SF-Pro-Rounded/v1/sf-pro-rounded_black.woff2","https://www.apple.com/wss/fonts/New-York-Medium/v1/new-york-medium_black.woff2"];let t=function(){const e=window._CW_BUILD_INFO;if(!e||!e.jsFiles||!e.jsFiles.length||"string"!==typeof e.jsFiles[0]||!e.buildNumber||"string"!==typeof e.buildNumber)return;const t=e.jsFiles[0].split(e.buildNumber);return 2===t.length?t[0]+e.buildNumber+"/":void 0}();if(t&&"_CW_BUILD_INFO"in window&&window._CW_BUILD_INFO){const n=window._CW_BUILD_INFO;n.buildNumber&&(t=t.replace(n.buildNumber,"current"),e.push(`${t}fonts/SFProExtraExpandedSemibold.woff2`),e.push(`${t}fonts/SFProExtraCompressedBold.woff2`))}for(const n of e)Is(n,"preload","font","anonymous")}(),ei())){const e=document.createElement("style");e.innerText=$c,document.head.append(e)}return function(e,t){if(!Zr){Zr=!0;const n=function(e){return`${e}${$r}?`}(t||"../");new di({url:n,mimeType:Pr[Tr.Jpeg].mimeType[0],shouldCheckOrientation:!0,offscreeniness:0,isTranscoderRequest:!1,onFinish:t=>{const n=t.image;if(n&&(Gr=n.width>=n.height,e)){let t;try{t=window.matchMedia("(dynamic-range:high)").matches?"true":"false"}catch(r){t="unknown"}const n=Vr();e("orientationTestFinished",{shouldRotate:Gr,supportsHDR:t,supportsDynamicRangeLimit:n})}},onFail:()=>{e&&e("orientationTestFailed")}}).send()}}(void 0,Gc),Lo().then((e=>{if(!e.ok)return ke(Ie.tile_getDerivativeUrlsStartupFailed,e.error),e;const i={goldilocksZones:[e.value.primarySync.zone.zoneID],indexID:{cplIndex:y.CPLMemoryNotIsRejectedByCreateDate},direction:Fe.Descending},o=ma({itemListKey:i}).promise.then((e=>{if(!e.ok)return d.Result.failure(e.error.message);const{promise:t,data:n}=function(e){return function(e,t,n,r,i){const{key:o,startRank:a,endRank:s,force:c,skipListStoreUpdate:u=!1}=e,l=sr.instance.listStore.getListItems(o),p=void 0!==e.listLength?e.listLength:sr.instance.listStore.getListCount(o);if(!l||void 0===p)return{isLoading:!1,promise:Promise.resolve(d.Result.failure(Us.InitializeList))};const f=function(e){const{recordKeys:t,startRank:n,endRank:r,retrieveFromStore:i,inProgressHydrationRequests:o,force:a}=e,s=new Array(r-n+1);if(a)return{networkRequestRanks:{startRank:n,endRank:r},localRecords:s,inProgressRequests:[]};let c=n;for(let p=n;p<=r&&p<t.length;p++){const e=t[p];if(e){const t=i(e);if(t){s[p-n]=t,c++;continue}}break}if(c>r)return{records:s};let u=r;for(let p=r;p>=n&&p<t.length;p--){const e=t[p];if(e){const t=i(e);if(t){s[p-n]=t,u--;continue}}break}const l=new Set;if(o){const e=[...o].sort(((e,t)=>e.startRank-t.startRank));for(const t of e)if(t.startRank<=c&&t.endRank>=c){const e=Math.min(t.endRank,u);if(l.add(t),c=e+1,c>u)break}if(c<=u){const e=[...o].sort(((e,t)=>t.endRank-e.endRank));for(const t of e)if(t.endRank>=u&&t.startRank<=u){const e=Math.max(t.startRank,c);l.add(t),u=e-1}}}let d;return c<=u&&(d={startRank:c,endRank:u}),{networkRequestRanks:d,localRecords:s,inProgressRequests:Array.from(l).sort(((e,t)=>e.startRank-t.startRank))}}({recordKeys:l,startRank:a,endRank:s,retrieveFromStore:t,inProgressHydrationRequests:Ks(o),force:c});if("records"in f)return{isLoading:!1,data:f.records,promise:Promise.resolve(d.Result.success(f.records))};const{networkRequestRanks:h,inProgressRequests:m,localRecords:g}=f,v=[...m];if(h){const e=function(e){const{startRank:t,endRank:n,key:r,listLength:i,skipListStoreUpdate:o,addToStore:a,getItemsFromNetwork:s,keyFromItem:c}=e,u=[];let l=t,d=n;do{d=Math.min(n,Bs+l-1);const e={startRank:l,endRank:d,promise:s({key:r,startRank:l,limit:d-l+1,listLength:i})};u.push(e),Hs(r,e),e.promise.then((t=>{if(Ws(r,e),t.ok){const n=t.value.map((e=>e.isOK?e.model:void 0));n.forEach((e=>{e&&a(e)}));const i=n.map((e=>e?c(e):void 0));o||sr.instance.listStore.updateListItemsAtIndex(r,i,e.startRank)}})),l+=Bs}while(d<n);return u}({startRank:h.startRank,endRank:h.endRank,key:o,listLength:p,skipListStoreUpdate:u,keyFromItem:i,addToStore:n,getItemsFromNetwork:r});for(const t of e)v.push(t)}return v.sort(((e,t)=>e.startRank-t.startRank)),{isLoading:!0,promise:Promise.all(v.map((e=>e.promise))).then((e=>{let t=a;for(let n=0;n<e.length;n++){const r=e[n],i=v[n];if(r.ok){const e=r.value.map((e=>e.isOK?e.model:void 0));for(let n=t-i.startRank;n<e.length&&!(t-a>=g.length);n++)e[n]&&(g[t-a]=e[n]),t+=1}else{if(1===e.length)return Fs(r.error);t=i.endRank+1}}return d.Result.success(g)}))}}(e,(e=>sr.instance.memoriesStore.get(e)),(e=>{sr.instance.memoriesStore.set({recordName:e.recordName,zoneID:e.zoneID},e)}),qs,(e=>({zoneID:e.zoneID,recordName:e.recordName})))}({startRank:0,endRank:Math.min(e.value-1,Zc-1),key:i});return n?d.Result.success(n):t.then((e=>e))}));return o.then((e=>{if(!e.ok){const t=new Ae({errorCode:_e.MemoriesLoadFailed,message:e.error});return ke(Ie.tile_getMemoriesFailed,t),d.Result.failure(t)}if(!e.value.length)return d.Result.success(void 0);const i=new Date,o=Math.floor(i.getHours()/Vc);i.setHours(0,0,0,0);const a=function(e,t){if(0===t.length)return;e<0&&(e=0);let n=e%t.length;for(let r=0;r<t.length;r++){const e=t[n];if(e)return e;n=(n+1)%t.length}}(new tc(`${te.instance.dsid}.${i.getTime()}.${o}`).randomInt(0,e.value.length)+r||0,e.value.filter(Yc));if(!a){const e=new Ae({errorCode:_e.MemoriesParsingFailed,message:"Failed to retrieve a valid memory"});return ke(Ie.tile_getMemoriesFailed,e),d.Result.failure(e)}const s=cr.decodeCPLMemory(a),c=pr.getKey(s),u=new Fc({itemViewPlugins:[Kc,Hc]}),l=Vs.Touch;u.itemState={index:0,primaryInteractionMode:l,sizeClass:$s.Regular,memoryKey:c,isCover:!0,imageLoaderSizeVariant:pi.EqualOrGreaterMSL,ignoreBorderRadius:!0,isHomeTile:!0},u.render({itemSize:{width:t,height:n},pageOffset:0,scrollSpeed:0}),u.element.style.height=`${n}px`,u.element.style.width=`${t}px`,u.element.style.position="static";const p=document.createElement("div"),f=p.attachShadow({mode:"closed"}),h=document.createElement("style");h.innerText=qc;const m=document.createElement("link");return m.rel="stylesheet",m.href=Ys,p.style.height=`${n}px`,p.style.width=`${t}px`,f.append(m),f.append(h),f.append(u.element),d.Result.success({element:p,recordName:c.recordName,launchPath:Pa(Bi.AllMemories,c.recordName)})}))}))}function Xc(){return Lo().then((e=>e.ok?ma({itemListKey:{goldilocksZones:[e.value.primarySync.zone.zoneID],indexID:{cplIndex:y.CPLMemoryNotIsRejectedByCreateDate},direction:Fe.Descending}}).promise.then((e=>{if(e.ok)return d.Result.success(e.value);{const t=new Ae({errorCode:_e.MemoriesCountFailed,message:e.error.message});return ke(Ie.tile_getMemoriesCountFailed,t),d.Result.failure(t)}})):(ke(Ie.tile_getMemoriesCountStartupFailed,e.error),e)))}}]))},function(e,t,n){"use strict";e.exports=n(1171)},function(e,t,n){"use strict";var r=t;function i(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(1172),r.BufferWriter=n(1175),r.Reader=n(1176),r.BufferReader=n(1177),r.util=n(1173),r.rpc=n(1178),r.roots=n(1180),r.configure=i,i()},function(e,t,n){"use strict";e.exports=d;var r,i=n(1173),o=i.LongBits,a=i.base64,s=i.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function l(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 c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return i.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function m(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 g(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=p(),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 c(e,t,n),this.len+=t,this},h.prototype=Object.create(c.prototype),h.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 h((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(m,10,o.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=o.from(e);return this._push(m,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},d.prototype.bool=function(e){return this._push(f,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(g,4,t.lo)._push(g,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 v=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(f,1,0);if(i.isString(e)){var n=d.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(v,t,e)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,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 c(u,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,d.create=p(),r._configure()}},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 o(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:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(1057),r.base64=n(1058),r.EventEmitter=n(1059),r.float=n(1060),r.inquire=n(1061),r.utf8=n(1062),r.pool=n(1063),r.LongBits=n(1174),r.isNode=Boolean("undefined"!==typeof e&&e&&e.process&&e.process.versions&&e.process.versions.node),r.global=r.isNode&&e||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},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(t){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=o,r.ProtocolError=o("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(472))},function(e,t,n){"use strict";e.exports=i;var r=n(1173);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;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):o},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===a?o: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(1172);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(1173);function o(){r.call(this)}function a(e,t,n){e.length<40?i.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.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++]}},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(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},function(e,t,n){"use strict";e.exports=c;var r,i=n(1173),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u};function d(){var e=new o(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 p(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 o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|p(this.buf,this.pos+=4)},c.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},c.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},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=i.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.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},c.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},c._configure=function(e){r=e,c.create=l(),r._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.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";e.exports=o;var r=n(1176);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(1173);function o(e){r.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},function(e,t,n){"use strict";t.Service=n(1179)},function(e,t,n){"use strict";e.exports=i;var r=n(1173);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,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return s.emit("error",e,t),a(e);if(null!==n){if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",n,t),a(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){a(c)}),0)}else setTimeout((function(){a(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";n.r(t);var r=n(1182);n.d(t,"parser",(function(){return r.a}));var i=n(1183);n.d(t,"logger",(function(){return i.c})),n.d(t,"setLogger",(function(){return i.h})),n.d(t,"isBPlist",(function(){return i.a})),n.d(t,"loadByteStream",(function(){return i.b})),n.d(t,"parseTrailer",(function(){return i.f})),n.d(t,"parseOffsetTable",(function(){return i.e})),n.d(t,"parsers",(function(){return i.g})),n.d(t,"parseObject",(function(){return i.d}));var o=n(1184);n.d(t,"MAX_OBJECT_SIZE",(function(){return o.d})),n.d(t,"MAX_OBJECT_COUNT",(function(){return o.c})),n.d(t,"BPLIST_MAGIC_HEADER",(function(){return o.a})),n.d(t,"BPLIST_MAGIC_HEADER_BASE64",(function(){return o.b})),n.d(t,"parserMap",(function(){return o.e}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1183);function i(e,t){if(t&&Object(r.h)(t),e.cursor=0,!Object(r.a)(e))return r.c.warn("BPlist: Data is not a binary plist, no magic number."),null;const n=Object(r.f)(e);if(!n)return r.c.warn("BPlist: data is invalid, too short."),null;const i=Object(r.e)(e,n);return Object(r.d)({stream:e,trailer:n,offsets:i},n.topObject)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"e",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"d",(function(){return f}));var r=n(1185),i=n(1184);const o=()=>{},a={warn:o,error:o};function s(e){const{warn:t,error:n}=e;Object.assign(a,{warn:t,error:n})}function c(e){return"string"===typeof e?e.slice(0,i.b.length)===i.b||e.slice(0,i.a.length)===i.a:(e!==r.j&&u(e),r.j.charactersInRange(0,6)===i.a)}function u(e){"string"===typeof e?e.slice(0,i.b.length)===i.b?r.j.resetWithBase64(e):r.j.resetWithString(e):e instanceof DataView?r.j.reset(e):e instanceof ArrayBuffer?r.j.reset(new DataView(e)):e instanceof r.a&&e!==r.j?r.j.reset(e.sliceAsDataView(e.length)):r.j.resetWithString("")}function l(e){const t=e.length;return t<26?null:(e.jumpTo(t-26),{offsetSize:e.uint8,objectRefSize:e.uint8,numObjects:e.uint64,topObject:e.uint64,tableOffset:e.uint64})}function d(e,t){e.jumpTo(t.tableOffset);const n=[];for(let r=0,i=t.numObjects;r<i;r++)switch(t.offsetSize){case 1:n.push(e.uint8);break;case 2:n.push(e.uint16);break;case 4:n.push(e.uint32);break;default:return a.warn(`BPlist: unknown offset size: ${t.offsetSize}`),null}return n}const p={0:(e,t)=>9===t||8!==t&&(0===t||15===t||a.warn(`BPlist: unhandled simple type: 0x${t}`),null),1(e,t){const n=e.stream,r=Math.pow(2,t);if(r>=i.d)return a.warn(`BPlist: Integer length exceeds ${i.d} bytes`),null;if(n.fastForward(1),r>4){let e="";for(let t=0;t<r;t++)e+=n.uint8.toString(16);return parseInt(e,16)}return n.uint(r)},2(e,t){const n=e.stream,r=Math.pow(2,t);return r>=i.d?(a.warn(`BPlist: real number length exceeds ${i.d} bytes`),null):(n.fastForward(1),4===r?n.float32:8===r?n.float64:null)},3(e,t){3!==t&&a.warn(`BPlist: unknown date type: ${t} bytes`);const n=e.stream.fastForward(1).float64;return null!==n?new Date(9783072e5+1e3*n):null},4(e,t){const n=e.stream,r=n.cursor;let o=t,s=1;return 15===t&&([s,o]=m(n.fastForward(1))),o>i.d?(a.error("BPlist: array size is beyond MAX."),null):n.jumpTo(r+s).sliceAsDataView(o)},5:h.bind(null,!1),6:h.bind(null,!0),8(e,t){const n=t+1;return n>=i.d?(a.warn(`BPlist: UID length exceeds ${i.d} bytes`),null):(e.stream.fastForward(1),e.stream.uint(n))},10(e,t){const n=e.stream,r=n.cursor,o=e.trailer.objectRefSize;let s=t,c=1;if(15===t&&([c,s]=m(n.fastForward(1))),s*o>i.d)return a.error("BPlist: array size is beyond MAX."),null;const u=[];for(let i=0;i<s;i++){const t=n.jumpTo(r+c+i*o).uint(o);u[i]=f(e,t)}return u},13(e,t){const n=e.stream,r=n.cursor,o=e.trailer.objectRefSize;let s=t,c=1;if(15===t&&([c,s]=m(n.fastForward(1))),2*s*o>i.d)return a.error("BPlist: dictionary size is beyond MAX."),null;const u={};for(let i=0;i<s;i++){const t=n.jumpTo(r+c+i*o).uint(o),a=n.jumpTo(r+c+s*o+i*o).uint(o),l=f(e,t),d=f(e,a);u[l]=d}return u}};function f(e,t){const n=e.offsets[t],r=e.stream;r.cursor=n;const i=r.first4BitsAt(n),o=r.last4BitsAt(n),s=p[i];return s?s(e,o):(a.warn(`BPlist: unknown type 0x${i.toString(16)}`),null)}function h(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>2?arguments[2]:void 0;const n=(arguments.length>1?arguments[1]:void 0).stream,r=n.cursor;let o=e?2*t:t;if(o>=i.d)return a.warn(`BPlist: String length exceeds ${i.d} bytes`),null;let s=1;15===t&&([s,o]=m(n.fastForward(1))),n.jumpTo(r+s);let c="";for(let i=0;i<o;i++){const t=e?n.uint16:n.uint8;c+=String.fromCodePoint(t)}return c.length?c:null}function m(e){const t=e.uint8,n=(240&t)/16;1!==n&&a.warn(`BPlist: unexpected length-int type! 0x${n.toString(16)}`);const r=15&t,i=Math.pow(2,r);return[2+i,e.uint(i)]}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return s}));const r=1e8,i=32768,o="bplist0",a="YnBsaXN0M",s={0:"simple",1:"integer",2:"real",3:"date",4:"data",5:"plist - utf8",6:"plist - utf16",8:"uid",10:"array",13:"dictionary"}},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"h",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"j",(function(){return f}));const r=DataView.prototype,i=[1,r.getInt8,r.setInt8],o=[1,r.getUint8,r.setUint8],a=[2,r.getInt16,r.setInt16],s=[2,r.getUint16,r.setUint16],c=[4,r.getInt32,r.setInt32],u=[4,r.getUint32,r.setUint32],l=[4,r.getFloat32,r.setFloat32],d=[8,r.getFloat64,r.setFloat64];class p{constructor(){this.offset=0,this.cursor=0,this.le=!1,this._dv=null}reset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(e instanceof DataView))throw Error("ByteStream: Expected DataView!");return this._dv=e,this.le=n,this.offset=t,this.cursor=t,this}resetWithString(e){const t=e.length,n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i<t;i++)r.setUint8(i,e.charCodeAt(i));return this.reset(r)}resetWithBase64(e){if("string"!==typeof e)throw Error("ByteStream: Expected string!");const t=atob(e);return this.resetWithString(t)}slice(e){const t=this.cursor,n=t+e>this.length?this.length:t+e;if(null===this._dv)throw Error("ByteStream: Expected initialized!");return this._dv.buffer.slice(t,n)}sliceAsDataView(e){const t=this.slice(e);return new DataView(t)}uint(e){const t=this.cursor,n=t+e;let r=0;for(let i=t;i<n;i++)r<<=8,r|=255&this.uint8;return r}set uint8(e){this._safeWrite(o,this.cursor++,e)}get uint8(){return this._safeRead(o,this.cursor++)}set int8(e){this._safeWrite(i,this.cursor++,e)}get int8(){return this._safeRead(i,this.cursor++)}set uint16(e){const t=this.cursor+=2;this._safeWrite(s,t-2,e)}get uint16(){const e=this.cursor+=2;return this._safeRead(s,e-2)}set int16(e){const t=this.cursor+=2;this._safeWrite(a,t-2,e)}get int16(){const e=this.cursor+=2;return this._safeRead(a,e-2)}set uint32(e){const t=this.cursor+=4;this._safeWrite(u,t-4,e)}get uint32(){const e=this.cursor+=4;return this._safeRead(u,e-4)}set int32(e){const t=this.cursor+=4;this._safeWrite(c,t-4,e)}get int32(){const e=this.cursor+=4;return this._safeRead(c,e-4)}set float32(e){const t=this.cursor+=4;this._safeWrite(l,t-4,e)}get float32(){const e=this.cursor+=4;return this._safeRead(l,e-4)}get uint64(){return this.fastForward(4).uint32}set float64(e){const t=this.cursor+=8;this._safeWrite(d,t-8,e)}get float64(){const e=this.cursor+=8;return this._safeRead(d,e-8)}get nextChar(){return String.fromCharCode(this.uint8)}first4BitsAt(e){return(240&this._safeRead(o,e))>>4}last4BitsAt(e){return 15&this._safeRead(o,e)}charactersInRange(e,t){const n=this.cursor,r=this.cursor=e<0?0:e,i=t<this.length?t+1-r:this.length-r;let o="";for(let a=0;a<i;a++)o+=this.nextChar;return this.cursor=n,o}get length(){return this._dv?this._dv.byteLength:0}jumpTo(e){const t=this.cursor=this.offset+e;return t<0&&(this.cursor=0),t>=this.length&&(this.cursor=this.length-1),this}rewind(e){return(this.cursor-=e)<0&&(this.cursor=0),this}fastForward(e){const t=this.length;return(this.cursor+=e)>=t&&(this.cursor=t-1),this}_safeRead(e,t){const n="undefined"===typeof t?this.cursor:t;return n+e[0]>this.length?null:e===o||e===i?e[1].call(this._dv,n):e[1].call(this._dv,n,this.le)}_safeWrite(e,t,n){if(null===n)return null;const r="undefined"===typeof t?this.cursor:t;return r+e[0]>this.length?null:e===o||e===i?e[2].call(this._dv,r,n):e[2].call(this._dv,r,n,this.le)}}const f=new p},function(e,t,n){"use strict";n.r(t);var r=n(1185);n.d(t,"INT_8",(function(){return r.f})),n.d(t,"UINT_8",(function(){return r.i})),n.d(t,"INT_16",(function(){return r.d})),n.d(t,"UINT_16",(function(){return r.g})),n.d(t,"INT_32",(function(){return r.e})),n.d(t,"UINT_32",(function(){return r.h})),n.d(t,"FLOAT_32",(function(){return r.b})),n.d(t,"FLOAT_64",(function(){return r.c})),n.d(t,"ByteStream",(function(){return r.a})),n.d(t,"byteStream",(function(){return r.j}))},function(e,t,n){var r=n(1188),i=n(1191),o=n(1192),a=n(1193),s=n(1194),c=n(1195),u=n(1196);u.alea=r,u.xor128=i,u.xorwow=o,u.xorshift7=a,u.xor4096=s,u.tychei=c,e.exports=u},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this,n=function(){var e=4022871197;return function(t){t=String(t);for(var n=0;n<t.length;n++){var r=.02519603282416938*(e+=t.charCodeAt(n));r-=e=r>>>0,e=(r*=e)>>>0,e+=4294967296*(r-=e)}return 2.3283064365386963e-10*(e>>>0)}}();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=n(" "),t.s1=n(" "),t.s2=n(" "),t.s0-=n(e),t.s0<0&&(t.s0+=1),t.s1-=n(e),t.s1<0&&(t.s1+=1),t.s2-=n(e),t.s2<0&&(t.s2+=1),n=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var n=new o(e),r=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.alea=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function s(e,t){var n=new o(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.xor128=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function s(e,t){var n=new o(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.xorwow=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this;t.next=function(){var e,n,r=t.x,i=t.i;return e=r[i],n=(e^=e>>>7)^e<<24,n^=(e=r[i+1&7])^e>>>10,n^=(e=r[i+3&7])^e>>>3,n^=(e=r[i+4&7])^e<<7,e=r[i+7&7],n^=(e^=e<<13)^e<<9,r[i]=n,t.i=i+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function s(e,t){null==e&&(e=+new Date);var n=new o(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&(r.x&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.xorshift7=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this;t.next=function(){var e,n,r=t.w,i=t.X,o=t.i;return t.w=r=r+1640531527|0,n=i[o+34&127],e=i[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=i[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,i,o,a,s=[],c=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,c=Math.max(c,t.length)),i=0,o=-32;o<c;++o)t&&(r^=t.charCodeAt((o+32)%t.length)),0===o&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,o>=0&&(a=a+1640531527|0,i=0==(n=s[127&o]^=r+a)?i+1:0);for(i>=128&&(s[127&(t&&t.length||0)]=-1),i=127,o=512;o>0;--o)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;e.w=a,e.X=s,e.i=i}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function s(e,t){null==e&&(e=+new Date);var n=new o(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&(r.X&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.xor4096=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t,n){(function(e){var r;!function(e,i){function o(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,i=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function a(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function s(e,t){var n=new o(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=s:n(1189)&&n(1190)?void 0===(r=function(){return s}.call(t,n,t,i))||(i.exports=r):this.tychei=s}(0,e,n(1189))}).call(this,n(1130)(e))},function(e,t,n){var r;!function(i,o,a){var s,c=256,u=a.pow(c,6),l=a.pow(2,52),d=2*l,p=255;function f(e,t,n){var r=[],p=v(g((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(c):(e=new Uint8Array(c),(i.crypto||i.msCrypto).getRandomValues(e)),y(e)}catch(r){var t=i.navigator,n=t&&t.plugins;return[+new Date,i,n,i.screen,y(o)]}}():e,3),r),f=new h(r),b=function(){for(var e=f.g(6),t=u,n=0;e<l;)e=(e+n)*c,t*=c,n=f.g(1);for(;e>=d;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|f.g(4)},b.quick=function(){return f.g(4)/4294967296},b.double=b,v(y(f.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&m(r,f),e.state=function(){return m(f,{})}),n?(a.random=e,t):e})(b,p,"global"in t?t.global:this==a,t.state)}function h(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i<c;)a[i]=i++;for(i=0;i<c;i++)a[i]=a[o=p&o+e[i%n]+(t=a[i])],a[o]=t;(r.g=function(e){for(var t,n=0,i=r.i,o=r.j,a=r.S;e--;)t=a[i=p&i+1],n=n*c+a[p&(a[i]=a[o=p&o+t])+(a[o]=t)];return r.i=i,r.j=o,n})(c)}function m(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function g(e,t){var n,r=[],i=typeof e;if(t&&"object"==i)for(n in e)try{r.push(g(e[n],t-1))}catch(o){}return r.length?r:"string"==i?e:e+"\0"}function v(e,t){for(var n,r=e+"",i=0;i<r.length;)t[p&i]=p&(n^=19*t[p&i])+r.charCodeAt(i++);return y(t)}function y(e){return String.fromCharCode.apply(0,e)}if(v(a.random(),o),e.exports){e.exports=f;try{s=n(1197)}catch(b){}}else void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}("undefined"!==typeof self?self:this,[],Math)},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1199);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const t=function(e){if(Intl&&Intl.Locale){const t=new Intl.Locale(e||"en-US");return{baseName:t.baseName||"",language:t.language||""}}return{baseName:e,language:e.split(/[_-]/gi)[0]}}(e).language,n=r.c.languages.indexOf(t)>=0,i=r.c.locales.indexOf(e)>=0;return n||i}},function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c})),function(e){e[e.Decluttered=0]="Decluttered",e[e.Transactions=1]="Transactions",e[e.Updates=2]="Updates",e[e.Promotions=3]="Promotions"}(r||(r={}));const i=["Decluttered","Personal","Transactions","Updates","News","Social","Others","Promotions"],o=i.map((e=>`${e}_HI`)),a=[...i,...o,"Error","UnsupportedLanguage"].map((e=>`INBOX/$category$_${e}`)),s={Decluttered:["INBOX/$category$_Decluttered","INBOX/$category$_Decluttered_HI","INBOX/$category$_Promotions_HI","INBOX/$category$_Transactions_HI","INBOX/$category$_News_HI","INBOX/$category$_Social_HI","INBOX/$category$_Others_HI","INBOX/$category$_Updates_HI","INBOX/$category$_Personal","INBOX/$category$_Personal_HI","INBOX/$category$_Error","INBOX/$category$_UnsupportedLanguage"],Updates:["INBOX/$category$_Updates","INBOX/$category$_Updates_HI","INBOX/$category$_News_HI","INBOX/$category$_Social_HI","INBOX/$category$_Others_HI","INBOX/$category$_News","INBOX/$category$_Social","INBOX/$category$_Others"],Promotions:["INBOX/$category$_Promotions","INBOX/$category$_Promotions_HI"],Transactions:["INBOX/$category$_Transactions","INBOX/$category$_Transactions_HI"]},c={languages:["en","fr","es","pt","it","de"],locales:["zh-CN","zh-SG","zh-MY","zh-Hans"]}},function(e,t,n){"use strict";t.a="../6d8bce7170963651e2ad945ced9a1079.png"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(e){var t=e.children,n=e.interpolations,i=Object.entries(n).sort((function(e,t){var n=e[0];return t[0].length-n.length})).reduce((function(e,n){var r=n[0],i=n[1];if(-1===t.indexOf(r))throw'Unable to interpolate. Match not found for "'+r+'" in string: "'+t+'"';return e.reduce((function(e,t){if("string"===typeof t){var n=t.split(r);n.forEach((function(t,o){""!==t&&e.push(t),o<n.length-1&&e.push({value:i,key:r+"-"+o})}))}else e.push(t);return e}),[])}),[t]);return r.createElement(r.Fragment,null,i.map((function(e){if("string"===typeof e)return e;var t=e.value,n=e.key;return r.isValidElement(t)?r.cloneElement(t,{key:null===t.key?n:t.key}):t})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(903),i=n(2155);const o={webOnly:!0,tablet:!0,tabletWebOnly:!0,phone:!0,phoneWebOnly:!0},a={tablet:!0},s={tablet:!0,phone:!0},c={none:!0},u={contactAppleSupport:"HT201232",iCloudUserGuide:{guidePath:"welcome/icloud",variations:o},upgradeToICloudPlus:"HT201318",webOnlyPlan:"HT204174",lookMeUp:{guidePath:"mmbffe88bb42",variations:a},iCloudPlusPlanPricing:"HT201238",privateRelay:{guidePath:"mm8010d8daf3"},hideMyEmail:{guidePath:"mme38e1602db"},homeKitSecureVideo:{guidePath:"mme054c72692"},customEmailDomains:{guidePath:"mm0e4339d289"},familySharing:"HT201088",iCloudAppsFeatures:{guidePath:"mm203ae070a2"},iCloudMailAddress:{guidePath:"mmdd8d1c5c"},restoreFiles:{guidePath:"mmae56ea1ca5",variations:o},restoreBookmarks:{guidePath:"mmf039e1d085",variations:a},restoreContacts:{guidePath:"mm1d9cfdb498",variations:a},restoreCalendars:{guidePath:"mm7478c562f3",variations:a},findDevices:{guidePath:"mm6b1aa045/icloud"},mail:{guidePath:"mm6b1a17e3",variations:s},photos:{guidePath:"mmbc402b84",variations:s},drive:{guidePath:"mmd0b4a7f5e8",variations:o},notes:{guidePath:"mm6704cac5",variations:o},reminders:{guidePath:"mmc0cd794a",variations:s},calendar:{guidePath:"mmd67283e4",variations:a},pages:{guidePath:"pages-icloud",variations:c},numbers:{guidePath:"numbers-icloud",variations:c},keynote:{guidePath:"keynote-icloud",variations:c},contacts:{guidePath:"mmfba7481b",variations:{webOnly:!0,tablet:!0,tabletWebOnly:!0}},unsupportedSafariVersion:"HT204416",legacyContactSupport:"HT212361",useCustomEmailDomainWithICloudMail:"102540",downgradeICloudPlus:"108318",accountMaintenance:"121298",upgradeMacOS:"108382",upgradeiOSiPadOS:"118575"},l="",d="icloud",p="icloud-web-only",f="icloud-ipad",h="icloud-ipad-web-only",m="icloud-iphone",g="icloud-iphone-web-only",v="https://support.apple.com";function y(e){var t,n,o,a,s;const y=u[e];if(!y)throw new Error(`No support link found for ${e}`);if("string"===typeof y)return`${v}/${y}`;const b=i.h.value,w=null===b||void 0===b?void 0:b.isLITEAccount,S=r.c.sharedInstance.deviceType,C=e=>e===l?`${v}/guide/${y.guidePath}`:`${v}/guide/${e}/${y.guidePath}`;return w&&S===r.a.PHONE&&null!==(t=y.variations)&&void 0!==t&&t.phoneWebOnly?C(g):w&&S===r.a.TABLET&&null!==(n=y.variations)&&void 0!==n&&n.tabletWebOnly?C(h):w&&S===r.a.DESKTOP&&null!==(o=y.variations)&&void 0!==o&&o.webOnly?C(p):!w&&S===r.a.PHONE&&null!==(a=y.variations)&&void 0!==a&&a.phone?C(m):!w&&S===r.a.TABLET&&null!==(s=y.variations)&&void 0!==s&&s.tablet?C(f):y.variations===c?C(l):C(d)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=function(e){return e.VIP="fromVip",e.Flagged="flagged",e.ToMe="toMe",e.CCMe="ccMe",e.HME="hme",e.Unread="unread",e}({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d}));var r=n(901),i=n(903),o=n(900),a=n(971),s=n(1168);const c={...a.a,authBagId:"iclouddrive",applicationName:"iclouddrive",path:"iclouddrive",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.COMPACT}],supportedDomains:[r.e,r.d,r.b,r.c,r.f,r.g],supportedFileExtensions:[],isPCSRequired:!0,pcsKeyIdentifier:Object(s.a)("iclouddrive"),radarComponentId:569448,cloudKitInfo:{containerIdentifier:"com.apple.clouddocs",partition:`https://ckdatabasews.${o.a.sharedInstance.current.servicesDomain}`},configuration:null,applicationWillHandleRouteManagement:!0},u="iclouddrive",l={identifier:u,displayNameLocKey:"ICloudDrive.DisplayName",dataNameLocKey:"ICloudDrive.DataName",dataNameTitleCaseLocKey:"ICloudDrive.DataNameTitleCase",titleNameLocKey:"ICloudDrive.TitleName",generations:[c],applicationInfo:c},d={identifier:u,displayNameLocKey:"ICloudDrive.DisplayName",titleNameLocKey:"ICloudDrive.TitleName",descriptionLocKey:"CloudOS.LandingPage.IClouddrive.Description",learnMoreLinkKey:"drive",nameToBeDisplayedLocKey:"ICloudDrive.TitleName"};c.configuration=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n(901),i=n(903),o=n(900),a=n(971),s=n(1168);const c=o.a.sharedInstance.current.servicesDomain,u={...a.a,authBagId:"notes",applicationName:"notes",path:"notes",generation:1,requiredServices:["mail"],supportedDomains:[r.e,r.d,r.c,r.g],supportedFileExtensions:[],supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT}],pushTopic:{name:"com.apple.icloud-container.com.apple.notes",hash:"c5292888edbd54273cf7c82fe861b81f0d2b87ef"},configuration:null,supportsTile:!1},l={...a.a,authBagId:"notes3",applicationName:"notes3",path:"notes3",generation:3,requiredServices:["ckdatabasews"],supportedDomains:[r.e,r.d,r.b,r.c,r.f,r.g],supportedFileExtensions:[],isPCSRequired:!0,pcsKeyIdentifier:Object(s.a)("notes3"),shouldPreloadCoreTypes:!0,shareAcceptanceInfo:{containerIdentifier:"com.apple.notes",partition:`https://ckdatabasews.${c}`,titleFields:[{name:"TitleEncrypted",type:"EncryptedBytes"}]},pushTopic:{name:"com.apple.icloud-container.com.apple.notes",hash:"c5292888edbd54273cf7c82fe861b81f0d2b87ef"},cloudKitInfo:{containerIdentifier:"com.apple.notes"},configuration:null,applicationWillHandleRouteManagement:!0},d="notes",p={identifier:d,displayNameLocKey:"Notes.DisplayName",titleNameLocKey:"Notes.TitleName",dataNameLocKey:"Notes.DataName",dataNameTitleCaseLocKey:"Notes.DataNameTitleCase",generations:[u,l],applicationInfo:l},f={identifier:d,displayNameLocKey:"Notes.DisplayName",titleNameLocKey:"Notes.TitleName",descriptionLocKey:"CloudOS.LandingPage.Notes.Description",learnMoreLinkKey:"notes",nameToBeDisplayedLocKey:"Notes.DisplayName"};u.configuration=p,l.configuration=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(1168),i=n(903),o=n(971),a=n(1204);const s={...o.a,authBagId:"numbers",applicationName:"numbers",path:"numbers",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT}],supportedDomains:a.b.applicationInfo.supportedDomains,supportedFileExtensions:[],isPCSRequired:!0,pcsKeyIdentifier:Object(r.a)("numbers"),radarComponentId:569448,shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,configuration:null},c="numbers",u={identifier:c,displayNameLocKey:"Numbers.DisplayName",titleNameLocKey:"Numbers.TitleName",dataNameLocKey:"Numbers.DataName",dataNameTitleCaseLocKey:"Numbers.DataNameTitleCase",generations:[s],applicationInfo:s},l={identifier:c,displayNameLocKey:"Numbers.DisplayName",titleNameLocKey:"Numbers.TitleName",descriptionLocKey:"CloudOS.LandingPage.Numbers.Description",learnMoreLinkKey:"numbers",nameToBeDisplayedLocKey:"Numbers.DisplayName"};s.configuration=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(1168),i=n(903),o=n(971),a=n(1204);const s={...o.a,authBagId:"pages",applicationName:"pages",path:"pages",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT}],supportedDomains:a.b.applicationInfo.supportedDomains,supportedFileExtensions:[],isPCSRequired:!0,pcsKeyIdentifier:Object(r.a)("pages"),radarComponentId:569448,shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,configuration:null},c="pages",u={identifier:c,displayNameLocKey:"Pages.DisplayName",titleNameLocKey:"Pages.TitleName",dataNameLocKey:"Pages.DataName",dataNameTitleCaseLocKey:"Pages.DataNameTitleCase",generations:[s],applicationInfo:s},l={identifier:c,displayNameLocKey:"Pages.DisplayName",titleNameLocKey:"Pages.TitleName",descriptionLocKey:"CloudOS.LandingPage.Pages.Description",learnMoreLinkKey:"pages",nameToBeDisplayedLocKey:"Pages.DisplayName"};s.configuration=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(1168),i=n(903),o=n(971),a=n(1204);const s={...o.a,authBagId:"keynote",applicationName:"keynote",path:"keynote",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT}],supportedDomains:a.b.applicationInfo.supportedDomains,supportedFileExtensions:[],isPCSRequired:!0,pcsKeyIdentifier:Object(r.a)("keynote"),radarComponentId:569448,shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,configuration:null},c="keynote",u={identifier:c,dataNameLocKey:"Keynote.DataName",dataNameTitleCaseLocKey:"Keynote.DataNameTitleCase",displayNameLocKey:"Keynote.DisplayName",titleNameLocKey:"Keynote.TitleName",generations:[s],applicationInfo:s},l={identifier:c,displayNameLocKey:"Keynote.DisplayName",titleNameLocKey:"Keynote.TitleName",descriptionLocKey:"CloudOS.LandingPage.Keynote.Description",learnMoreLinkKey:"keynote",nameToBeDisplayedLocKey:"Keynote.DisplayName"};s.configuration=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return m}));var r=n(901),i=n(903),o=n(900),a=n(2241),s=n(971),c=n(1168),u=n(2155);const{servicesDomain:l}=o.a.sharedInstance.current,d={...s.a,authBagId:"reminders",applicationName:"reminders",path:"reminders",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR}],supportedDomains:[r.e,r.d,r.c],supportedFileExtensions:[],radarComponentId:469667,pushTopic:{name:"com.me.reminders",hash:"8a40cb6b1d3fcd0f5c204504eb8fb9aa64b78faf"},configuration:null,supportsTile:!1,applicationWillHandleRouteManagement:!0},p={...s.a,authBagId:"reminders",path:"reminders2",applicationName:"reminders2",generation:2,supportedDomains:[r.e,r.b,r.d,r.c,r.f,r.g],supportedFileExtensions:[],supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.COMPACT}],isPCSRequired:!0,pcsKeyIdentifier:Object(c.a)("reminders"),radarComponentId:469667,pushTopic:{name:"com.apple.icloud-container.com.apple.reminders",hash:void 0},cloudKitInfo:{containerIdentifier:"com.apple.reminders",partition:`https://ckdatabasews.${l}`},configuration:null,skipLoadingAppPreferences:!0,applicationWillHandleRouteManagement:!0},f="reminders",h={identifier:f,displayNameLocKey:"Reminders.DisplayName",titleNameLocKey:"Reminders.TitleName",dataNameLocKey:"Reminders.DataName",dataNameTitleCaseLocKey:"Reminders.DataNameTitleCase",generations:[d,p],applicationInfo:d,setApplicationInfoForConfiguration(e){var t;let{applicationConfiguration:n,applicationInfo:r}=e;const i=a.a.sharedInstance.showApps;if(null===i||void 0===i?void 0:i.find((e=>e.identifier===n.identifier)))return r;const o=null===(t=u.h.value)||void 0===t?void 0:t.details,s=o&&o.tantorMigrated;return void 0===o||s?p:d}},m={identifier:f,displayNameLocKey:"Reminders.DisplayName",titleNameLocKey:"Reminders.TitleName",descriptionLocKey:"CloudOS.LandingPage.Reminders.Description",learnMoreLinkKey:"reminders",nameToBeDisplayedLocKey:"Reminders.DisplayName"};d.configuration=h,p.configuration=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(2175),i=n(901),o=n(903);const a={...n(971).a,authBagId:"hidemyemail",applicationName:"hidemyemail",path:"hidemyemail",generation:1,supportedDevices:[{primaryInteractionMode:o.b.MOUSE,sizeClass:o.e.REGULAR},{primaryInteractionMode:o.b.MOUSE,sizeClass:o.e.COMPACT},{primaryInteractionMode:o.b.TOUCH,sizeClass:o.e.REGULAR},{primaryInteractionMode:o.b.TOUCH,sizeClass:o.e.COMPACT}],supportedDomains:[i.e,i.c,i.b,i.f,i.d,i.g],supportedFileExtensions:[],radarComponentId:578665,configuration:null,unsupportedLocales:r.a.RTL?void 0:["ar-sa","iw-il"]},s="hidemyemail",c={identifier:s,displayNameLocKey:"HideMyEmail.DisplayName",titleNameLocKey:"HideMyEmail.TitleName",generations:[a],applicationInfo:a},u={identifier:s,displayNameLocKey:"HideMyEmail.DisplayName",titleNameLocKey:"HideMyEmail.TitleName"};a.configuration=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(901),i=n(903);const o={...n(971).a,authBagId:"customdomainsettings",applicationName:"customdomainsettings",path:"customdomainsettings",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.COMPACT}],supportedDomains:[r.e,r.c,r.b,r.f,r.g],supportedFileExtensions:[],radarComponentId:578665,configuration:null},a="customdomainsettings",s={identifier:a,displayNameLocKey:"CustomDomainSettings.DisplayName",titleNameLocKey:"CustomDomainSettings.TitleName",generations:[o],applicationInfo:o},c={identifier:a,displayNameLocKey:"CustomDomainSettings.DisplayName",titleNameLocKey:"CustomDomainSettings.TitleName"};o.configuration=s},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1213);const i=()=>"pointer-coarse"===Object(r.b)(),o=()=>i()?"icloud-touch":"icloud-mouse",a=e=>{let{render:t}=e;return t(i(),o())}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c}));var r=n(870),i=n(1214);function o(){a||(a=window.matchMedia("(pointer: coarse)")),s||(s=window.matchMedia("(pointer: none)"));var e=Object(i.a)(a),t=Object(i.a)(s);return Object(r.useContext)(c)||(e?"pointer-coarse":t?"pointer-none":"pointer-fine")}var a,s,c=Object(r.createContext)(void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(870);function i(e){var t=a(e),n=Object(r.useState)((function(){return t.matches})),i=n[0],s=n[1];return o(t,s),i}function o(e,t){var n=a(e),i=Object(r.useRef)(t);Object(r.useLayoutEffect)((function(){i.current=t}),[t]),Object(r.useLayoutEffect)((function(){var e=function(){return i.current(n.matches)},t="addEventListener"in n;return t?n.addEventListener("change",e):n.addListener(e),i.current(n.matches),function(){t?n.removeEventListener("change",e):n.removeListener(e)}}),[n])}function a(e){return Object(r.useMemo)((function(){return"string"===typeof e?window.matchMedia(e):e}),[e])}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=a(t,r));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){!function(){"use strict";var e=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 t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(){if("undefined"!==typeof window){var n=Array.prototype.slice,r=Element.prototype.matches||Element.prototype.msMatchesSelector,i=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),o=function(){function o(e,n){t(this,o),this._inertManager=n,this._rootElement=e,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return e(o,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(null!==this._savedAriaHidden?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach((function(e){this._unmanageNode(e.node)}),this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var t=this;u(e,(function(e){return t._visitNode(e)}));var n=document.activeElement;if(!document.body.contains(e)){for(var r=e,i=void 0;r;){if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){i=r;break}r=r.parentNode}i&&(n=i.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e;t!==this._rootElement&&t.hasAttribute("inert")&&this._adoptInertRoot(t),(r.call(t,i)||t.hasAttribute("tabindex"))&&this._manageNode(t)}}},{key:"_manageNode",value:function(e){var t=this._inertManager.register(e,this);this._managedNodes.add(t)}},{key:"_unmanageNode",value:function(e){var t=this._inertManager.deregister(e,this);t&&this._managedNodes.delete(t)}},{key:"_unmanageSubtree",value:function(e){var t=this;u(e,(function(e){return t._unmanageNode(e)}))}},{key:"_adoptInertRoot",value:function(e){var t=this._inertManager.getInertRoot(e);t||(this._inertManager.setInert(e,!0),t=this._inertManager.getInertRoot(e)),t.managedNodes.forEach((function(e){this._manageNode(e.node)}),this)}},{key:"_onMutation",value:function(e,t){e.forEach((function(e){var t=e.target;if("childList"===e.type)n.call(e.addedNodes).forEach((function(e){this._makeSubtreeUnfocusable(e)}),this),n.call(e.removedNodes).forEach((function(e){this._unmanageSubtree(e)}),this);else if("attributes"===e.type)if("tabindex"===e.attributeName)this._manageNode(t);else if(t!==this._rootElement&&"inert"===e.attributeName&&t.hasAttribute("inert")){this._adoptInertRoot(t);var r=this._inertManager.getInertRoot(t);this._managedNodes.forEach((function(e){t.contains(e.node)&&r._manageNode(e.node)}))}}),this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return null!==this._savedAriaHidden}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),o}(),a=function(){function n(e,r){t(this,n),this._node=e,this._overrodeFocusMethod=!1,this._inertRoots=new Set([r]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return e(n,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var e=this._node;null!==this._savedTabIndex?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var e=this.node;if(r.call(e,i)){if(-1===e.tabIndex&&this.hasSavedTabIndex)return;e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)}else e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),0===this._inertRoots.size&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return null!==this._savedTabIndex}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),n}(),s=function(){function i(e){if(t(this,i),!e)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=e,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),l(e.head||e.body||e.documentElement),"loading"===e.readyState?e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return e(i,[{key:"setInert",value:function(e,t){if(t){if(this._inertRoots.has(e))return;var n=new o(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,n),!this._document.body.contains(e))for(var r=e.parentNode;r;)11===r.nodeType&&l(r),r=r.parentNode}else{if(!this._inertRoots.has(e))return;this._inertRoots.get(e).destructor(),this._inertRoots.delete(e),e.removeAttribute("inert")}}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,t){var n=this._managedNodes.get(e);return void 0!==n?n.addInertRoot(t):n=new a(e,t),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,t){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(t),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){n.call(this._document.querySelectorAll("[inert]")).forEach((function(e){this.setInert(e,!0)}),this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,t){var i=this;e.forEach((function(e){switch(e.type){case"childList":n.call(e.addedNodes).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=n.call(e.querySelectorAll("[inert]"));r.call(e,"[inert]")&&t.unshift(e),t.forEach((function(e){this.setInert(e,!0)}),i)}}),i);break;case"attributes":if("inert"!==e.attributeName)return;var t=e.target,o=t.hasAttribute("inert");i.setInert(t,o)}}),this)}}]),i}();if(!Element.prototype.hasOwnProperty("inert")){var c=new s(document);Object.defineProperty(Element.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(e){c.setInert(this,e)}})}}function u(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var r=e;t&&t(r);var i=r.shadowRoot;if(i)return void u(i,t,i);if("content"==r.localName){for(var o=r,a=o.getDistributedNodes?o.getDistributedNodes():[],s=0;s<a.length;s++)u(a[s],t,n);return}if("slot"==r.localName){for(var c=r,l=c.assignedNodes?c.assignedNodes({flatten:!0}):[],d=0;d<l.length;d++)u(l[d],t,n);return}}for(var p=e.firstChild;null!=p;)u(p,t,n),p=p.nextSibling}function l(e){if(!e.querySelector("style#inert-style, link#inert-style")){var t=document.createElement("style");t.setAttribute("id","inert-style"),t.textContent="\n[inert] {\n  pointer-events: none;\n  cursor: default;\n}\n\n[inert], [inert] * {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n",e.appendChild(t)}}}()}()},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right",e[e.None=4]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1219),i=n(1220);function o(e){return Object(i.a)(e,(e=>Object(r.a)(e)&&"string"!==typeof e&&"UIOverlayActions"===e.type.displayName))}},function(e,t,n){"use strict";function r(e){return null!=e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e&&"type"in e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1219);function i(e,t){let n=!1;return t(e)?n=!0:Object(r.a)(e)&&e.props.children?n=i(e.props.children,t):Array.isArray(e)&&e.forEach((e=>{t(e)?n=!0:Object(r.a)(e)&&e.props.children?n=i(e.props.children,t):Array.isArray(e)&&(n=i(e,t))})),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1222),o=n(2260);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=r.useMemo((()=>o.a.messageTransmitter),[]),[a,s]=r.useState(void 0),c=r.useRef(t);c.current=t;const u=r.useCallback((e=>{var t,n,r,o;const a=c.current;if(e instanceof i.e){const{payload:t}=e;a.onLabelId&&a.onLabelId(t),s(t)}else e instanceof i.d?null===(t=a.onActivationStart)||void 0===t||t.call(a):e instanceof i.c?null===(n=a.onActivationEnd)||void 0===n||n.call(a):e instanceof i.b?null===(r=a.onActivationComplete)||void 0===r||r.call(a):e instanceof i.a&&(null===(o=a.onActivationCancel)||void 0===o||o.call(a))}),[]);return r.useEffect((()=>{if(e)return n.registerComponent(e,u),()=>{n.unregisterComponent(e,u)}}),[e,n,u]),a}},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));class r{constructor(e,t){this.key=e,this.payload=t}}function i(e){return class extends r{constructor(t){super(e,t)}}}class o extends(i("labelId")){}class a extends(i("activationStart")){}class s extends(i("activationEnded")){}class c extends(i("activationCompleted")){}class u extends(i("activationCancelled")){}},function(e,t,n){"use strict";function r(){return Math.random().toString(36).substr(2,5)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1222);class i{constructor(){this.labelToComponentMap=new Map,this.componentToLabelsMap=new Map,this.componentHandlerMap=new Map}connectLabel(e,t){const{labelToComponentMap:n,componentToLabelsMap:r}=this;n.set(e,t),r.has(t)||r.set(t,new Set),r.get(t).add(e)}disconnectLabel(e){const{labelToComponentMap:t,componentToLabelsMap:n}=this,r=t.get(e);o(r)&&(t.delete(e),n.get(r).delete(e))}registerLabel(e,t){this.connectLabel(e,t),this.passMessage(t,new r.e(e))}unregisterLabel(e){const t=this.labelToComponentMap.get(e);this.disconnectLabel(e),o(t)&&this.passMessage(t,new r.e(""))}registerComponent(e,t){if(this.componentHandlerMap.has(e))throw new Error(`A component with id "${e}" was already registered.`);if(this.componentHandlerMap.set(e,t),this.componentToLabelsMap.get(e)){const t=this.componentToLabelsMap.get(e);for(const n of Array.from(t))this.passMessage(e,new r.e(n))}}unregisterComponent(e,t){if(this.componentHandlerMap.has(e)){if(t!==this.componentHandlerMap.get(e))throw new Error(`The original callback is required to unregister "${e}"`);this.componentHandlerMap.delete(e)}}transmitMessage(e,t){if(!this.labelToComponentMap.has(e))throw new Error(`Label with id '${e}' was not registered.`);const n=this.labelToComponentMap.get(e);this.passMessage(n,t)}passMessage(e,t){this.componentHandlerMap.has(e)&&this.componentHandlerMap.get(e)(t)}}function o(e){return"string"===typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1215),i=n.n(r);let o=null,a=null;function s(e){const{active:t,disabled:n,className:r,onActivate:s,onActivationStart:c,onActivationEnd:u,onActivationCancel:l,tabIndex:d,variant:p}=e;return{"aria-disabled":n||void 0,class:i()(p,{active:t},r),tabindex:n?void 0:e.hasOwnProperty("tabIndex")?d:0,ontouchstart:"void(0)",onClick(e){n||s(e)},onKeyDown(e){if(" "===e.key&&e.preventDefault(),!n)switch(e.key){case" ":o!==e.target&&(o=e.target,c&&c());break;case"Enter":e.stopPropagation(),a=e.target}},onKeyUp(e){if(!n)switch(e.key){case" ":o===e.target&&(o=null,s(e),u&&u());break;case"Enter":a===e.target&&(a=null,e.stopPropagation(),s(e))}},onBlur(e){o===e.target&&l&&l(),o=null,a=null}}}},function(e,t,n){"use strict";var r=n(870),i=n.n(r),o=["styles"];function a(){return a=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},a.apply(null,arguments)}t.a=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,o);return i.a.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.731 12.742"},t),i.a.createElement("path",{fill:"inherit",d:"M.287 12.454c.39.383 1.054.375 1.422.008l4.657-4.657 4.652 4.654c.378.378 1.035.38 1.42-.007.385-.39.387-1.037.01-1.417l-4.653-4.66 4.653-4.652c.377-.377.38-1.03-.01-1.414-.39-.39-1.042-.393-1.42-.01L6.366 4.95 1.71.296C1.34-.074.672-.089.287.306-.095.696-.088 1.353.279 1.72l4.658 4.655L.279 11.04c-.367.365-.38 1.03.008 1.414z"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n(877);var r=n(878);const i=Object(r.d)();function o(e,t){return a(e,t)}function a(e,t,n){const o=function(e,t){return 0===t&&e.zero?e.zero:1===t?e.one:2===t?e.two:e.many}(e,t);return o?i(o,{count:new Intl.NumberFormat(Object(r.b)()).format(t),...n}):""}Object(r.e)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(1229);const o=(e,t,n,o)=>{const a=r.useRef(null),[s,c]=n,[u,l]=e,d="compact"===Object(i.d)(),p=r.useCallback((e=>{const n=void 0===e?void 0:{animate:e};d?(s(n),a.current=o):(u(n),a.current=t)}),[d,s,u,o,t,a]),f=r.useCallback((()=>{p()}),[p]),h=r.useCallback((()=>{d?(c(),a.current=o):(l(),a.current=t)}),[d,c,l,o,t,a]);return r.useLayoutEffect((()=>{var e;(null===(e=a.current)||void 0===e?void 0:e.current)&&(o.current&&c({animate:!1}),t.current&&l({animate:!1}),p(!1))}),[p,c,l,o,t,a]),[f,h,a]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d}));var r=n(870),i=n.n(r),o=n(1214),a=667;function s(){var e=p(),t=Object(r.useContext)(l),n=Object(o.a)(e);return t||(n?"compact":"regular")}function c(e){var t=i.a.useRef(e);i.a.useLayoutEffect((function(){t.current=e}),[e]);var n=Object(r.useContext)(l);i.a.useLayoutEffect((function(){n&&t.current(n)}),[n]),Object(o.b)(p(),(function(t){n||e(t?"compact":"regular")}))}var u,l=i.a.createContext(void 0),d=i.a.createContext(a);function p(){var e=Object(r.useContext)(d);return i.a.useMemo((function(){return u&&u[0]===e||(u=[e,window.matchMedia("screen and (max-width: "+e+"px)")]),u[1]}),[e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(e,t,n){let[i,o]=(0,r.useState)(e||t),a=(0,r.useRef)(void 0!==e),s=void 0!==e;(0,r.useEffect)((()=>{a.current,a.current=s}),[s]);let c=s?e:i,u=(0,r.useCallback)(((e,...t)=>{let r=(e,...t)=>{n&&(Object.is(c,e)||n(e,...t)),s||(c=e)};"function"===typeof e?o(((n,...i)=>{let o=e(s?c:n,...i);return r(o,...t),s?n:o})):(s||o(e),r(e,...t))}),[s,c,n]);return[c,u]}},function(e,t,n){"use strict";function r(e){var t;if("undefined"===typeof window||null==window.navigator)return!1;let n=null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands;return Array.isArray(n)&&n.some((t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function i(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 o(e){let t=null;return()=>(null==t&&(t=e()),t)}n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return p}));const a=o((function(){return i(/^Mac/i)})),s=o((function(){return i(/^iPhone/i)})),c=o((function(){return i(/^iPad/i)||a()&&navigator.maxTouchPoints>1})),u=o((function(){return s()||c()})),l=o((function(){return a()||u()})),d=(o((function(){return r(/AppleWebKit/i)&&!d()})),o((function(){return r(/Chrome/i)}))),p=o((function(){return r(/Android/i)}));o((function(){return r(/Firefox/i)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));let r=new Map,i=new Set;function o(){if("undefined"===typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let o=r.get(n.target);if(o&&(o.delete(n.propertyName),0===o.size&&(n.target.removeEventListener("transitioncancel",t),r.delete(n.target)),0===r.size)){for(let e of i)e();i.clear()}};document.body.addEventListener("transitionrun",(n=>{if(!e(n)||!n.target)return;let i=r.get(n.target);i||(i=new Set,r.set(n.target,i),n.target.addEventListener("transitioncancel",t,{once:!0})),i.add(n.propertyName)})),document.body.addEventListener("transitionend",t)}function a(e){requestAnimationFrame((()=>{!function(){for(const[e]of r)"isConnected"in e&&!e.isConnected&&r.delete(e)}(),0===r.size?e():i.add(e)}))}"undefined"!==typeof document&&("loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o))},function(e,t,n){"use strict";function r(...e){return(...t)=>{for(let n of e)"function"===typeof n&&n(...t)}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u}));var r=n(870),i=n.n(r);const o={prefix:String(Math.round(1e10*Math.random())),current:0},a=i.a.createContext(o),s=i.a.createContext(!1);Boolean("undefined"!==typeof window&&window.document&&window.document.createElement);let c=new WeakMap;const u="function"===typeof i.a.useId?function(e){let t=i.a.useId(),[n]=(0,r.useState)(f());return e||`${n?"react-aria":`react-aria${o.prefix}`}-${t}`}:function(e){let t=(0,r.useContext)(a),n=function(e=!1){let t=(0,r.useContext)(a),n=(0,r.useRef)(null);if(null===n.current&&!e){var o,s;let e=null===(s=i.a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===s||null===(o=s.ReactCurrentOwner)||void 0===o?void 0:o.current;if(e){let n=c.get(e);null==n?c.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,c.delete(e))}n.current=++t.current}return n.current}(!!e),o=`react-aria${t.prefix}`;return e||`${o}-${n}`};function l(){return!1}function d(){return!0}function p(e){return()=>{}}function f(){return"function"===typeof i.a.useSyncExternalStore?i.a.useSyncExternalStore(p,l,d):(0,r.useContext)(s)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);const i="undefined"!==typeof document?n.n(r).a.useLayoutEffect:()=>{}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i=n(1235),o=n(870);const a=null!==(r=n.n(o).a.useInsertionEffect)&&void 0!==r?r:i.a;function s(e){const t=(0,o.useRef)(null);return a((()=>{t.current=e}),[e]),(0,o.useCallback)(((...e)=>{const n=t.current;return null===n||void 0===n?void 0:n(...e)}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1235);function i(e,t){(0,r.a)((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}}))}},function(e,t,n){"use strict";function r(e){if(function(){if(null==i){i=!1;try{document.createElement("div").focus({get preventScroll(){return i=!0,!0}})}catch{}}return i}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}n.d(t,"a",(function(){return r}));let i=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1236),i=n(870);function o(e,t,n,o){let a=(0,r.a)(n),s=null==n;(0,i.useEffect)((()=>{if(s||!e.current)return;let n=e.current;return n.addEventListener(t,a,o),()=>{n.removeEventListener(t,a,o)}}),[e,t,o,s,a])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1235),i=n(870);let o=0;const a=new Map;function s(e){let[t,n]=(0,i.useState)();return(0,r.a)((()=>{if(!e)return;let t=a.get(e);if(t)n(t.element.id);else{let r="react-aria-description-"+o++;n(r);let i=document.createElement("div");i.id=r,i.style.display="none",i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},a.set(e,t)}return t.refCount++,()=>{t&&0===--t.refCount&&(t.element.remove(),a.delete(e))}}),[e]),{"aria-describedby":e?t:void 0}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));const r=new Set(["id"]),i=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),o=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),a=new Set(["dir","lang","hidden","inert","translate"]),s=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),c=/^(data-.*)$/;function u(e,t={}){let{labelable:n,isLink:u,global:l,events:d=l,propNames:p}=t,f={};for(const h in e)Object.prototype.hasOwnProperty.call(e,h)&&(r.has(h)||n&&i.has(h)||u&&o.has(h)||l&&a.has(h)||d&&s.has(h)||h.endsWith("Capture")&&s.has(h.slice(0,-7))||(null===p||void 0===p?void 0:p.has(h))||c.test(h))&&(f[h]=e[h]);return f}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2329);function i(e,t){let{id:n,"aria-label":i,"aria-labelledby":o}=e;if(n=(0,r.b)(n),o&&i){let e=new Set([n,...o.trim().split(/\s+/)]);o=[...e].join(" ")}else o&&(o=o.trim().split(/\s+/).join(" "));return i||o||!t||(i=t),{id:n,"aria-label":i,"aria-labelledby":o}}},function(e,t,n){"use strict";function r(e){const t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(2328),i=n(870),o=n.n(i),a=n(2231);const s={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function c(e={}){let{style:t,isFocusable:n}=e,[r,o]=(0,i.useState)(!1),{focusWithinProps:c}=(0,a.f)({isDisabled:!n,onFocusWithinChange:e=>o(e)});return{visuallyHiddenProps:{...c,style:(0,i.useMemo)((()=>r?t:t?{...s,...t}:s),[r])}}}function u(e){let{children:t,elementType:n="div",isFocusable:i,style:a,...s}=e,{visuallyHiddenProps:u}=c(e);return o.a.createElement(n,(0,r.a)(s,u),t)}},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 s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u}));var r=n(2180);let i=function(e){return e.BETA="beta",e.WINDOWS="windows",e.MAIL="mail",e}({});const o=new Map([[i.BETA,1],[i.WINDOWS,1],[i.MAIL,1]]);let a=function(e){return e.DISMISS="Dismiss",e.CLICK_THROUGH="Click through",e.ALL="All",e}({});function s(e){var t;return null!==(t=o.get(e))&&void 0!==t?t:9999}function c(e){var t,n,o;const a=r.b.getAccountPreferences();if(!a||!a.seenBannerVersion)return!1;switch(e){case i.BETA:return(null!==(t=a.seenBannerVersion.beta)&&void 0!==t?t:0)>=s(i.BETA);case i.WINDOWS:return(null!==(n=a.seenBannerVersion.windows)&&void 0!==n?n:0)>=s(i.WINDOWS);case i.MAIL:return(null!==(o=a.seenBannerVersion.mail)&&void 0!==o?o:0)>=s(i.MAIL);default:return!1}}function u(e,t){const n=r.b.getAccountPreferences();n&&(n.seenBannerVersion||(n.seenBannerVersion={}),n.seenBannerVersion[e]=t,r.b.setAccountPreferences(n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i=n(1248),o=n(969),a=n(2248);class s{constructor(){this.delegate=null,this.displayOrderObservers=new Set,this.appConfigurationObservers=new Set,this.displayOrder=[],this.configurations=[]}initialize(){this.addConfigurations(o.a),this.update()}update(){var e,t;this.updateConfigurations(),this.updateDisplayOrder(null!==(e=null===(t=a.c.value)||void 0===t?void 0:t.applications)&&void 0!==e?e:[])}getConfiguration(e){for(const t of this.configurations)if(t.identifier===e)return t;return null}getApplicationInfo(e){for(const t of this.configurations)if(t.identifier===e)return t.applicationInfo;return null}getApplicationConfiguration(e){for(const t of this.configurations)if(t.identifier===e)return t;return null}getApplicationConfigurationByAuthBagId(e){for(const t of this.configurations)if(Object(i.c)(t,e))return t;return null}getApplicationInfoByAuthBagId(e){for(const t of this.configurations){const n=Object(i.c)(t,e);if(n)return n}return null}addConfigurations(e){var t;for(const n of e)this.addConfiguration(n);null===(t=this.delegate)||void 0===t||t.configurationsChanged(this)}addConfiguration(e){if(this.getConfiguration(e.identifier))throw new Error(`A ChildApplicationConfiguration with identifier ${e.identifier} already registered`);this.configurations.push(e)}updateConfigurations(){for(const e of this.configurations)Object(i.f)(e);this.appConfigurationObservers.forEach((e=>e()))}updateDisplayOrder(e){var t;const n=[];for(const r of e){const e=this.getApplicationConfigurationByAuthBagId(r.name);e&&!0!==e.isHidden&&n.push(e)}this.displayOrder=n,null===(t=this.delegate)||void 0===t||t.displayOrderChanged(this),this.displayOrderObservers.forEach((e=>e.displayOrderChanged(n)))}}r=s,s.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return w})),n.d(t,"c",(function(){return S}));var r=n(898),i=n(2241),o=n(1249),a=n(1252),s=n(903),c=n(900),u=n(971),l=n(2155),d=n(965),p=n(884),f=n(2248),h=n(1227);let m=function(e){return e.LOCKED_HSA="LOCKED_HSA",e.LOCKED_WEB_BLOCKED="LOCKED_WEB_BLOCKED",e.LOCKED_PCS_DELETED="LOCKED_PCS_DELETED",e}({}),g=function(e){return e.APPLICATION_INFO_SPECIFIED_IS_HIDDEN="APPLICATION INFO SPECIFIED IS HIDDEN",e.NO_SUPPORTED_APPLICATION_INFO_DOMAIN="NO SUPPORTED APPLICATION INFO DOMAIN",e.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE_TYPE="APPLICATION INFO DOES NOT SUPPORT DEVICE TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_SIZE_CLASS="APPLICATION INFO DOES NOT SUPPORT SIZE CLASS",e.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE="APPLICATION INFO DOES NOT SUPPORT DEVICE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT MAID ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT MAKO ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_BENEFICIARY_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT BENEFICIARY ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT LITE ACCOUNT TYPE",e}({}),v=function(e){return e.APPLICATION_INFO_REQUIRED_SERVICES_NOT_ENABLED="ONE OR MORE APPLICATION INFO REQUIRED SERVICES ARE NOT ENABLED",e}({});function y(e){var t;const n=null!==(t=e.displayName)&&void 0!==t?t:"",r=e.displayNameLocKey;return r?Object(h.a)(r):n}function b(e){var t;const n=null!==(t=e.titleNameNonLocalized)&&void 0!==t?t:"",r=e.titleNameLocKey;return r?Object(h.a)(r):n}function w(e){var t,n,h,y,b;let w=e.applicationInfo,C=!1;const _=null!==(t=null===(n=f.c.value)||void 0===n?void 0:n.applications)&&void 0!==t?t:[];if(_){const t=[];for(const n of _){const r=S(e,n.name);r&&(Object(u.d)(r,n.setupInfo),t.push(r))}if(t.length>1)throw new Error("auth bag returned information for multiple generations");t.length>0&&(w=t[0])}const O=i.a.sharedInstance.applicationIdentifier,E=i.a.sharedInstance.showApps,I=null===E||void 0===E?void 0:E.find((t=>t.identifier===e.identifier));if(I){const t=I.generation;if("number"!==typeof t&&e.generations.length>1)throw new Error(`Invalid showApps query entry, a generation must be specified for '${e.identifier}'`);if("number"===typeof t){const n=(()=>{for(const n of e.generations)if(n.generation===t)return n;return null})();if(!n)throw new Error(`Invalid showApps query entry, '${e.identifier}' does not define generation: ${t}`);w=n}}(O===e.identifier||I)&&(C=!0),e.applicationInfo=null!==(h=null===(y=e.setApplicationInfoForConfiguration)||void 0===y?void 0:y.call(e,{applicationConfiguration:e,applicationInfo:w,user:l.h.value}))&&void 0!==h?h:w;const A=e.applicationInfo,T=null===(b=l.h.value)||void 0===b?void 0:b.details;A.missingRequiredServices=[];for(const r of A.requiredServices)Object(f.e)(r)&&Object(f.g)(r)||A.missingRequiredServices.push(r);!function(e,t,n,i){var u;if(!function(e){const t=r.a.primaryInteractionMode,n=Object(o.a)(),i=Object(a.a)(),c=n===s.e.REGULAR&&i===s.e.REGULAR?s.e.REGULAR:s.e.COMPACT;for(const r of e.supportedDevices)if(r.primaryInteractionMode===t&&r.sizeClass===c)return!0;return!1}(t))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE);const l=r.a.deviceType;if(null===(u=t.supportedDeviceTypes)||void 0===u||!u.includes(l))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE_TYPE);const d=Object(o.a)()===s.e.REGULAR&&Object(a.a)()===s.e.REGULAR?s.e.REGULAR:s.e.COMPACT,h=t.supportedSizeClasses;if(h&&!h.includes(d))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_SIZE_CLASS);if(!c.a.sharedInstance.findAvailableHostname(t.supportedDomains))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.NO_SUPPORTED_APPLICATION_INFO_DOMAIN);if(n){var m,v,y;const r=(null!==(m=null===(v=f.c.value)||void 0===v?void 0:v.applications)&&void 0!==m?m:[]).find((n=>n.name===t.applicationName||n.name===e.identifier));if(Object(p.e)(n)&&!r)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE);if(n.isManagedAppleID&&!r)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE);if(Object(p.c)(n)&&!t.allowsPhoneNumberAsAppleId)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE);if(null!==(y=n.beneficiaryInfo)&&void 0!==y&&y.isBeneficiary&&t.shouldHideForBeneficiaryAccount)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_DOES_NOT_SUPPORT_BENEFICIARY_ACCOUNT_TYPE)}if(i)return e.isHidden=!1,void(e.reasonConfigurationIsHidden=void 0);const b=c.a.sharedInstance.current;if(t.availableFromDomains&&!t.availableFromDomains.includes(b))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=g.APPLICATION_INFO_SPECIFIED_IS_HIDDEN);e.isHidden=t.isHidden,e.reasonConfigurationIsHidden=t.isHidden?g.APPLICATION_INFO_SPECIFIED_IS_HIDDEN:void 0}(e,A,null!==T&&void 0!==T?T:void 0,C);const P=(()=>{const e=A.missingRequiredServices;return!!e&&0===e.length})();T&&!P&&(e.isDisabled=!0,e.reasonConfigurationIsDisabled=v.APPLICATION_INFO_REQUIRED_SERVICES_NOT_ENABLED,e.missingRequiredServices=A.missingRequiredServices),e.lockType=(e=>{if(null!==(e=f.c.value)&&void 0!==e&&e.isPCSKeyDeleted&&A.isPCSRequired)return m.LOCKED_PCS_DELETED;if(null!==T&&void 0!==T&&T.completedAuthenticationStep){const e=Object(d.i)();if(!A.allowsOneFactorAuthenticationMode){if(!Object(p.d)(T))return m.LOCKED_HSA;if(!e)return m.LOCKED_WEB_BLOCKED}}})()}function S(e,t){for(const n of e.generations)if(n.authBagId===t)return n;return null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(870),i=n(1250),o=n(903);const a=window.matchMedia("(max-width: 666px)");function s(){return a.matches?o.e.COMPACT:o.e.REGULAR}function c(){const e=Object(i.a)();return r.useEffect((()=>(a.addEventListener("change",e),()=>a.removeEventListener("change",e))),[e]),s()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(1251);function o(){var e=Object(r.useState)(0)[1],t=Object(i.a)();return Object(r.useCallback)((function(){t()&&e((function(e){return e+1}))}),[t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(){var e=Object(r.useRef)(!1);return Object(r.useLayoutEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),Object(r.useCallback)((function(){return e.current}),[])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n(870);var r=n(903);const i=window.matchMedia("(max-height: 480px)");function o(){return i.matches?r.e.COMPACT:r.e.REGULAR}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(2249),i=n(888);const o=i.z.object({url:i.z.string(),method:i.z.string().optional(),requestPayload:i.z.unknown().optional()});function a(e){const t=function(e){try{const t=r.c(e);return t.searchParams.delete("clientId"),t.searchParams.delete("clientBuildNumber"),t.searchParams.delete("clientMasteringNumber"),t.href}catch{return null}}(e);return t?{url:t}:null}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return i}));class i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isChrome=void 0,this.isFirefox=void 0,this.isEdge=void 0,this.isIE=void 0,this.isEdgeOrIE=void 0,this.isIE9OrLower=void 0,this.isIE8OrLower=void 0,this.isSafari=void 0,this.isSafari12OrLower=void 0,this.majorVersion=void 0,this.minorVersion=void 0,this.isEdgeHTML=void 0,this.isWebKit=void 0,this.isGecko=void 0,this.isTrident=void 0,this.engineMajorVersion=void 0;let t=e&&e.userAgent;t||(t=window.navigator.userAgent),t=t.toLowerCase();const n=/\sedge\//.test(t),r=!n&&/fxios/.test(t),i=!n&&!r&&/chrome|crios/.test(t),o=!n&&!r&&!i&&/safari/.test(t),a=r||!n&&!i&&!o&&/firefox/.test(t),s=!n&&!i&&!o&&!a&&/trident|msie/.test(t),c=n,u=!c&&/applewebkit/.test(t)&&!/edge/.test(t),l=!c&&!u&&/trident/.test(t),d=!c&&!u&&!l&&/gecko/.test(t);let p,f,h,m,g;n?(p=t.match(/(?:edge).(\d+)\.(\d+)/),m=t.match(/(?:edge).(\d+)/)):(p=t.match(/(?:chrome|crios|version|firefox|fxios|msie|rv).(\d+)\.(\d+)/),m=t.match(/(?:applewebkit|gecko|trident).(\d+)/));const v=n||s;p&&(f=parseInt(p[1],10),h=parseInt(p[2],10)),m&&(g=parseInt(m[1])),this.isChrome=i,this.isSafari=o,this.isSafari12OrLower=Boolean(o&&f&&f<13),this.isFirefox=a,this.isEdge=n,this.isIE=s,this.isEdgeOrIE=v,this.isIE9OrLower=Boolean(s&&f&&f<10),this.isIE8OrLower=Boolean(s&&f&&f<9),this.majorVersion=f,this.minorVersion=h,this.isEdgeHTML=c,this.isWebKit=u,this.isGecko=d,this.isTrident=l,this.engineMajorVersion=g}}r=i,i.sharedInstance=new r},function(e,t,n){"use strict";function r(e){try{return e instanceof Error?e.message:JSON.stringify(e)}catch(t){return String(e)}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2248),i=n(1165);const o=e=>{"true"===Object(i.a)("PUSH_DEBUG")&&!Object(r.f)()&&console.debug(e)}},function(e,t,n){"use strict";function r(e){return JSON.parse(JSON.stringify(e))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(901),i=n(903);const o={...n(971).a,authBagId:"contacts",applicationName:"contacts",path:"contacts",generation:1,supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR}],supportedDomains:[r.e,r.d,r.b,r.c,r.g],supportedFileExtensions:[],radarComponentId:421464,pushTopic:{name:"com.me.contacts",hash:"73f7bfc9253abaaa423eba9a48e9f187994b7bd9"},configuration:null,unsupportedLocales:["bn-bd","ml-in","or-in","ar-sa","iw-il"]},a="contacts",s={identifier:a,displayNameLocKey:"Contacts.DisplayName",titleNameLocKey:"Contacts.TitleName",generations:[o],applicationInfo:o},c={identifier:a,displayNameLocKey:"Contacts.DisplayName",titleNameLocKey:"Contacts.TitleName",descriptionLocKey:"CloudOS.LandingPage.Contacts.Description",learnMoreLinkKey:"contacts",nameToBeDisplayedLocKey:"Contacts.DisplayName"};o.configuration=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(901),i=n(903);const o={...n(971).a,applicationName:"find-my-iphone",authBagId:"find",path:"find-my-iphone",generation:2,requiredServices:["findme"],supportedDevices:[{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.MOUSE,sizeClass:i.e.COMPACT},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.REGULAR},{primaryInteractionMode:i.b.TOUCH,sizeClass:i.e.COMPACT}],supportedDomains:[r.e,r.d,r.b,r.c,r.f,r.g],supportedFileExtensions:[],allowsOneFactorAuthenticationMode:!0,radarComponentId:990584,isHidden:!1,allowsUnauthenticatedMode:!1,configuration:null,shouldHideForBeneficiaryAccount:!0,skipLoadingAppPreferences:!0},a="find",s={identifier:a,displayNameLocKey:"FMIP.DisplayName",titleNameLocKey:"FMIP.TitleName",generations:[o],applicationInfo:o},c={identifier:a,displayNameLocKey:"FMIP.DisplayName",titleNameLocKey:"FMIP.TitleName",descriptionLocKey:"CloudOS.LandingPage.Find.Description",learnMoreLinkKey:"findDevices",nameToBeDisplayedLocKey:"CloudOS.LandingPage.Find.DisplayName"};o.configuration=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n.n(r);function o(e){let{originalProps:t,metadata:n}=e;const{metadata:r,layoutMode:o="layoutBox",desiredFontSize:a=0}=t,{svgPath:s,[o]:{viewBox:c,height:u,width:l,translateX:d,translateY:p,baseline:f,capline:h}}=r||n,m=`matrix(1 0 0 1 ${d} ${p})`,g={viewBox:c,version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:t.style||{},className:t.className||""};if(a>0){const e=a/(f-h),t=u*e;g.style.height=`${t}px`;const n=l*e;g.style.width=`${n}px`}for(var v in g.className+="layoutBox"===o?" layout-box":" glyph-box",t)switch(v){case"layoutMode":case"desiredFontSize":case"className":case"style":case"metadata":break;default:g[v]=t[v]}return i.a.createElement("svg",g,i.a.createElement("g",{transform:m},i.a.createElement("path",{d:s})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=n(2134),o=n(912),a=n(919),s=n(2208),c=n(2155);class u{constructor(){this.rootStateListener=void 0,this.loadMeasurementStat=void 0,this.rootStateListener=e=>{const t=!!c.h.value;t&&!["initial-load","springboard","load-child-application","child-application","initial-load-with-early-child"].includes(e.rootState.kind)?this.loadMeasurementStat=void 0:t||["landing-page"].includes(e.rootState.kind)||(this.loadMeasurementStat=void 0)}}beginLoadPerformanceMeasurement(e){var t;if((null===(t=this.loadMeasurementStat)||void 0===t?void 0:t.additionalProperties.source)!==e){if(this.loadMeasurementStat=a.a.withEventAndLabel("load",e).time(),"page"===e){var n;const{performance:e}=window,t=e.now();this.loadMeasurementStat.startTimestamp=(null!==(n=this.loadMeasurementStat.startTimestamp)&&void 0!==n?n:0)-t}this.rootStateListener&&i.a.cloudOSApplication.stateListeners.add(this.rootStateListener)}}endLoadPerformanceMeasurement(e){this.rootStateListener&&i.a.cloudOSApplication.stateListeners.delete(this.rootStateListener);const t=this.loadMeasurementStat;if(this.loadMeasurementStat=void 0,t){t.end();const n=`${t.statName}-to-${e}`,r=t.toJSON();delete r.statName,s.b.sharedInstance.recordStatRaw(n,r,o.b.PERF_STAT)}}}r=u,u.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"f",(function(){return v})),n.d(t,"h",(function(){return y}));var r=n(870),i=n(1215),o=n.n(i),a=n(1263),s=n(1227),c=n(2134),u=n(2241);function l(){return l=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},l.apply(null,arguments)}let d=function(e){return e.home="",e.plan="plan",e.storage="storage",e.recovery="recovery",e.shared="shared",e.restore="restore",e.icloudplus="icloudplus",e.status="status",e.settings="settings",e}({});const p={[d.plan]:"NavLinks.Plan",[d.storage]:"NavLinks.Storage",[d.icloudplus]:"NavLinks.ICloudPlus",[d.recovery]:"NavLinks.DataRecovery",[d.settings]:"NavLinks.Settings"};function f(e){if("settings"===e)return d.icloudplus}function h(e,t,n,i,o){return function(c){const u=Object(s.a)(t),{setAriaLiveText:d}=Object(a.b)(),p=Object(s.a)("VoiceOver.NavLinks.OpeningPage",{name:u}),{search:f="",hash:h=""}={},m=e+f+h;return r.createElement("a",l({},c,{onClick:t=>{t.preventDefault(),i||t.stopPropagation(),d(p),v(e,u,void 0,{search:f,hash:h})},className:"unstyled-link nav-link",href:m}),r.createElement("span",{role:o?"heading":void 0,"aria-level":o},u," ",n))}}function m(e){switch(e){case d.home:return"NavLinks.Home";case d.plan:return"NavLinks.Plan";case d.storage:return"NavLinks.Storage";case d.recovery:return"NavLinks.DataRecovery";case d.shared:return"NavLinks.Shared";case d.restore:return"NavLinks.Restore";case d.icloudplus:return"NavLinks.ICloudPlus";case d.status:return"NavLinks.Status";case d.settings:return"NavLinks.Settings"}}const g=e=>{let{to:t,name:n,children:i,className:c,...u}=e;const{setAriaLiveText:d}=Object(a.b)(),p=Object(s.a)("VoiceOver.NavLinks.OpeningPage",{name:n});return r.createElement("a",l({},u,{onClick:e=>{e.preventDefault(),e.stopPropagation(),d(p),v(t,n)},href:`/${t}`,className:o()(c,"nav-link")}),i)};function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{relativePath:"",hash:"",search:""};u.a.sharedInstance.pushHistoryState({},t,e,r.relativePath,r.hash,r.search),n&&y(e)}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{relativePath:"",hash:"",search:""};c.a.cloudOSApplication.switchToNavLink(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(870);const i=r.createContext(void 0),o=e=>{var t;return r.createElement(i.Provider,{value:null!==(t=e.value)&&void 0!==t?t:{ariaLiveText:"",setAriaLiveText:()=>{}}},e.children)},a=()=>{const e=r.useContext(i);if(void 0===e)throw new Error("useAriaLive must be used within a AriaLiveProvider");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r,i=n(2134),o=n(971),a=n(2244),s=n(1247),c=n(2241),u=n(898),l=n(1248),d=n(1295),p=n(1286),f=n(1227),h=n(2189),m=n(903),g=n(1265),v=n(1298),y=n(922),b=n(2188),w=n(1310),S=n(2212),C=n(2161),_=n(2180),O=n(905),E=n(2192),I=n(2155),A=n(884),T=n(965);class P{constructor(){this.delegate=null,this.__currentChildApplicationInfo=void 0,this._controllersWithRemoteInstances=[],this._applicationControllers=new Map,this._callingApplicationToWindowApplicationMapping=new Map,O.b.subscribe((e=>{e&&"object"===typeof e&&this.updateApplicationHistoryState(e)}))}get currentChildApplicationIdentifier(){const e=this._currentChildApplicationInfo;return null===e||void 0===e?void 0:e.configuration.identifier}setCurrentChildApplicationIdentifier(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{sharedInstance:n}=c.a,r=s.a.sharedInstance;let i,o,a,u;if(e&&(i=r.getApplicationInfo(e),o=this.getChildApplicationController(i),u=o.currentHistoryState,a=o.currentTitleName),e!==n.applicationIdentifier){const r=e;n.setChildApplication(null!==u&&void 0!==u?u:{},a,r,t)}else{var l,d;n.replaceHistoryState(u,a,e,null===(l=u)||void 0===l?void 0:l.applicationRelativePath,null===(d=u)||void 0===d?void 0:d.applicationHash,t?"":void 0)}this.__currentChildApplicationInfo=i}get currentChildApplicationInfo(){return this._currentChildApplicationInfo}get currentChildApplicationConfiguration(){var e;return null===(e=this.currentChildApplicationInfo)||void 0===e?void 0:e.configuration}get currentLoadingChildApplicationInfo(){const e=this._controllersWithRemoteInstances[0];return e&&e.isLoading?this._controllersWithRemoteInstances[0].applicationInfo:null}get lastLaunchedApplicationContext(){var e;return null===(e=this._controllersWithRemoteInstances[0])||void 0===e?void 0:e.applicationContext}get currentLoadingChildApplicationConfiguration(){var e;return null===(e=this.currentLoadingChildApplicationInfo)||void 0===e?void 0:e.configuration}switchToApplication(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{hash:r,queryParameters:o,source:a,route:u,launchItem:d,serializedTileData:p,launchPath:f}=n,h=s.a.sharedInstance.getApplicationInfo(e);if(!h)return;const m=null===h||void 0===h?void 0:h.missingRequiredServices,v=h.configuration,y=c.a.sharedInstance.applicationIdentifier,b=c.a.sharedInstance.shortGuid;if(b&&y===e&&h.shouldRedirectForDocument){const e=this.getChildApplicationController(h);if(!e)throw new Error(`Unable to launch ${h.configuration.identifier}. No ChildApplicationController exists.`);this.delegate.redirectChildApplicationForDocument(e,b,o)}else if(this.canLaunchChildApplication(h)){const e={launchSource:a||{reason:g.b.USER_LAUNCH},relativePath:u,hash:r,serializedTileData:p,launchItem:d,launchPath:f};this.launchChildApplication(h,e,void 0)}else{if(I.e.value){if(i.a.cloudOSApplication.showBlockedHomePage())return;const e=v.applicationInfo.pcsKeyIdentifier;if(null!==e&&!S.a.sharedInstance.hasPCSKey(e))return void this.delegate.showLoadChildApplicationADPBlocked(v,e)}if(Array.isArray(m)&&1===m.length&&m[0]===C.b)this.delegate.showAlertForUnavailableMailService(v);else if(null!==(t=I.h.value)&&void 0!==t&&t.isMailBlocked&&"mail"===e)this.delegate.showAlertForBlockedMailService(v);else{if(v.lockType!==l.b.LOCKED_PCS_DELETED)return v.isHidden||v.isDisabled?(i.a.cloudOSApplication.couldNotLaunchApplication(v),void c.a.sharedInstance.pushHistoryState({},Object(l.d)(v),e,u,r)):void i.a.cloudOSApplication.showHomeLoginViewController();this.delegate.showAlertForLockedApplication(v)}}}setTitle(e,t){const n=e.authBagId,r=this.currentChildApplicationInfo;r&&n===r.authBagId&&(u.a.title=t),this.updateApplicationTitle(n,t)}updateApplicationTitle(e,t){const n=s.a.sharedInstance.getApplicationInfoByAuthBagId(e);if(!n)return;const r=this.getChildApplicationController(n);r&&(r.currentTitleName=t)}pushHistoryState(e,t,n,r,i){const o=e.authBagId,a={applicationAuthBagId:o,applicationHistoryState:t,applicationRelativePath:r,applicationHash:i,applicationTitleName:n},s=this.currentChildApplicationInfo,u=this.currentChildApplicationIdentifier;s&&o===s.authBagId&&c.a.sharedInstance.pushHistoryState(a,n,u,r,i),this.updateApplicationHistoryState(a)}replaceHistoryState(e,t,n,r,i){const o=e.authBagId,a={applicationAuthBagId:o,applicationHistoryState:t,applicationRelativePath:r,applicationHash:i,applicationTitleName:n},s=this.currentChildApplicationInfo,u=this.currentChildApplicationIdentifier;s&&o===s.authBagId&&c.a.sharedInstance.replaceHistoryState(a,n,u,r,i,void 0),this.updateApplicationHistoryState(a)}updateApplicationHistoryState(e){if(!e||!e.applicationAuthBagId)return;const t=s.a.sharedInstance,n=e.applicationAuthBagId;if(!n)return;const r=t.getApplicationInfoByAuthBagId(n);if(!r)return;const i=this.getChildApplicationController(r);if(!i)return;i.currentHistoryState=e;const o=e.applicationTitleName;o&&(i.currentTitleName=o)}get maximumNumberOfRemoteInstances(){const{primaryInteractionMode:e}=m.c.sharedInstance;return e===m.b.TOUCH?3:5}canLaunchChildApplication(e){var t,n;const r=null===(t=I.h.value)||void 0===t?void 0:t.details,i=c.a.sharedInstance.shortGuid,o=c.a.sharedInstance.applicationParameter.isSelfRouteUnauthSupported,a=e.configuration;if(a.isHidden)return!1;if(a.lockType)return!1;if(a.isDisabled)return!1;const s=a.applicationInfo.pcsKeyIdentifier;if(null!==s&&!S.a.sharedInstance.hasPCSKey(s))return!1;if(e.allowsUnauthenticatedMode&&(o||i))return!0;if(!r)return!1;const u=a.identifier;return(null===(n=I.h.value)||void 0===n||!n.isMailBlocked||"mail"!==u)&&(r.completedAuthenticationStep===r.totalAuthenticationSteps||r.completedAuthenticationStep>0&&e.allowsOneFactorAuthenticationMode&&!Object(A.e)(r))}launchChildApplicationInWindow(e,t,n,r){const{sharedInstance:i}=s.a,o=i.getApplicationInfo(e);if(o){var a;const{configuration:i,missingRequiredServices:s}=o;if(o&&this.canLaunchChildApplication(o)){const e=Object(y.a)();t.instanceId=e;const i={launchSource:{reason:g.b.OPEN_DOCUMENT},displayMedium:b.a.WINDOW,windowParameters:n,launchItem:t,instanceId:e};return this.launchChildApplicationInstance(o,i,r),e}Array.isArray(s)&&1===s.length&&s[0]===C.b?this.delegate.showAlertForUnavailableMailService(i):null!==(a=I.h.value)&&void 0!==a&&a.isMailBlocked&&"mail"===e?this.delegate.showAlertForBlockedMailService(i):i.lockType===l.b.LOCKED_PCS_DELETED?this.delegate.showAlertForLockedApplication(i):Object(T.a)()}}launchChildApplicationInstance(e,t,n){if(!this.canLaunchChildApplication(e))throw`Child application ${e.configuration.identifier} does not have permissions to be launched. Use the canLaunchChildApplication API prior to executing this method.`;const r=this.createApplicationController(e,t.instanceId);if(!r)throw`Unable to launch ${e.configuration.identifier}. No ChildApplicationController exists.`;const i=Object(o.c)(e);return t.launchUrl=i,r.launchRemoteApplicationWithContext(t),this.delegate.insertChildApplicationRemoteViewController(r),t.instanceId&&this._callingApplicationToWindowApplicationMapping.set(t.instanceId,n),this._addControllerToRemoteInstancesArray(r),this._pruneControllersWithRemoteInstancesArrayAsNeeded(),r}terminateChildApplicationInstance(e,t){if(!e)throw"ChildApplicationsController: Need to pass an applicationIdentifier";if(!t)throw"ChildApplicationsController: Need to pass an instanceId";const{sharedInstance:n}=s.a,r=n.getApplicationInfo(e);if(r){const e=this.getChildApplicationController(r,t);e&&this.terminateChildApplication(e,!0)}}invokeOnBeforeSendCallback(e,t){const n=this._callingApplicationToWindowApplicationMapping.get(e);return!!n&&n.invokeOnBeforeSendCallback(e,t)}launchChildApplication(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.a.ACTIVE_FOREGROUND,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Object(d.c)(n,d.a.BACKGROUND,d.a.INACTIVE_FOREGROUND,d.a.ACTIVE_FOREGROUND))throw new Error("The target ui state parameter must be an instance of UIState and does not support UIState.NONE");if(!this.canLaunchChildApplication(e))throw new Error(`Child application ${e.configuration.identifier} does not have permissions to be launched. Use the canLaunchChildApplication API prior to executing this method.`);const i=this.getChildApplicationController(e);if(!i)throw new Error(`Unable to launch ${e.configuration.identifier}. No ChildApplicationController exists.`);const{currentHistoryState:a}=i;if(t){const{hash:e,relativePath:n}=t;void 0!==e&&(a.applicationHash=e),void 0!==n&&(a.applicationRelativePath=n)}const s=a.applicationRelativePath,u=a.applicationHash,{shortGuid:l,applicationIdentifier:f}=c.a.sharedInstance,h=Object(o.c)(e);this._cancelCurrentlyLoadingChildApplicationIfExists(e.applicationName);const{sharedInstance:m}=v.b,{currentShareRecord:y}=m;y&&m.clearShare(),t.launchUrl=null!==h&&void 0!==h?h:void 0,t.relativePath=s,t.hash=u,t.shareRecord=null!==y&&void 0!==y?y:void 0,t.targetUIStateWhenLaunched=n,f===e.configuration.identifier&&(t.shortGuid=null!==l&&void 0!==l?l:void 0);const b=i.launchRemoteApplicationWithContext(t);var w;return Object(p.c)(b.remoteInstanceState,p.a.RUNNING)?(this.delegate.showChildApplicationRemoteViewController(i),i.reportPendingDidBecomeInteractive&&i.reportPendingDidBecomeInteractive(),this.setCurrentChildApplicationIdentifier(i.applicationConfiguration.identifier),r||b.launchOptionsDidChange({launchReason:(null===(w=t.launchSource)||void 0===w?void 0:w.reason)||g.b.USER_LAUNCH,launchItem:t.launchItem,launchPath:t.launchPath})):this.delegate.insertChildApplicationRemoteViewController(i),this._addControllerToRemoteInstancesArray(i),this._pruneControllersWithRemoteInstancesArrayAsNeeded(),i}terminateChildApplication(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{_controllersWithRemoteInstances:r}=this;let i=!1;if(r.includes(e)){var o,a;const{applicationInfo:r}=e,c=null!==(o=null===(a=e.remoteApplicationViewController)||void 0===a?void 0:a.remoteInstanceIsReadyToTerminate)&&void 0!==o&&o;if(t||c){var s;const t=null===(s=e.remoteApplicationViewController)||void 0===s?void 0:s.displayMedium;this._removeControllerFromRemoteInstancesArray(e),!n&&R(e)&&this.delegate.redirectToHomeScreen(),i=!0,t===b.a.IFRAME&&this._resetHistoryState(r)}}return i}reloadChildApplications(){const{_controllersWithRemoteInstances:e}=this;this._pruneControllersWithRemoteInstancesArrayAsNeeded(1);for(const t of e){const e=Object(o.c)(t.applicationInfo);t.reloadRemoteApplication(e,!0)}}reloadChildApplication(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;const{_controllersWithRemoteInstances:r}=this;if(r.includes(e)){const r=Object(o.c)(e.applicationInfo);n=e.reloadRemoteApplication(r,t)}return n}getChildApplicationController(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";const{_applicationControllers:n}=this;let r=n.get(e.configuration);if(!r){const i=new a.a(e.configuration,this);r=new Map,r.set(t,i),n.set(e.configuration,r)}const i=r.get(t);if(i)return i;throw"No ChildAppController found for the corresponding instanceId"}createApplicationController(e,t){const n=new a.a(e.configuration,this),{_applicationControllers:r}=this,i=r.get(e.configuration);return i?i.set(t,n):r.set(e.configuration,(new Map).set(t,n)),n}hasChildApplicationWithUnsavedChanges(){const{_controllersWithRemoteInstances:e}=this;for(const t of e)if(!t.applicationIsReadyToTerminate)return t}terminateAllChildApplications(){const{_controllersWithRemoteInstances:e}=this;for(;0<e.length;)this.terminateChildApplication(e[0],!0,!0)}childApplicationIsLoadingSlowly(e){if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");this.delegate.childApplicationIsLoadingSlowly(e)}childApplicationDidFinishLaunching(e){const{remoteApplicationViewController:t}=e;if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");e.isActiveForeground?t.isPresentedViewController?t.transitionRemoteInstanceToActiveForeground():(this.delegate.showChildApplicationRemoteViewController(e),this.setCurrentChildApplicationIdentifier(e.applicationConfiguration.identifier)):t.transitionRemoteInstanceToBackground()}childApplicationIsReadyToTerminateDidChange(e,t){this.delegate.childApplicationIsReadyToTerminateDidChange(e,t)}childApplicationWantsToRemoveViewController(e){this.delegate.removeChildApplicationController(e)}childApplicationDidTerminate(e,t,n){var r,i;if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");if(t===h.a.USER_INITIATED||t===h.a.DISCONNECTED)R(e)&&this.delegate.redirectToHomeScreen();else if(t===h.a.TIMEOUT||t===h.a.LAUNCH_DEPENDENCY_UNAVAILABLE){if(Object(d.c)(e.applicationContext.targetUIStateWhenLaunched,d.a.ACTIVE_FOREGROUND)){var o;let t=null===n||void 0===n?void 0:n.title,r=null!==(o=null===n||void 0===n?void 0:n.subtitle)&&void 0!==o?o:"";const i=e.applicationConfiguration;if(!t){const e=Object(l.e)(i);t=Object(f.a)("Error.AppNotLoading.Title",{appName:e}),r=Object(f.a)("Error.AppNotLoading.Description",{appName:e})}this.delegate.showChildApplicationErrorViewController(e,t,r)}}else if(t===h.a.PCS_REQUIRED){const t=e.applicationInfo.configuration;this.delegate.showChildApplicationErrorViewController(e,Object(f.a)("CloudOS.Error.AppPCSRequired.Title",{applicationName:Object(l.e)(t)}),Object(f.a)("CloudOS.Error.AppPCSRequired.Description"))}else this.delegate.showChildApplicationDidFatalErrorDialog(e,t,n);const a=null===(r=e.remoteApplicationViewController)||void 0===r?void 0:r.displayMedium;this._removeControllerFromRemoteInstancesArray(e);const s=null===(i=e.applicationContext)||void 0===i?void 0:i.instanceId;s&&this._callingApplicationToWindowApplicationMapping.delete(s),a===b.a.IFRAME&&this._resetHistoryState(e.applicationInfo)}childApplicationDidBecomeInteractive(){if(Object(w.c)())return;const e=I.e.value,t="PARTIALLY_AUTHENTICATED"===Object(T.d)();if(e&&!t&&I.h.value){i.a.cloudOSApplication.triggerPrefetchTileData(!1,I.h.value),_.b.initialize(!1),Object(E.c)();const e=Object(_.a)();_.b.initializeAppPreferences(e)}}get _currentChildApplicationInfo(){return this.__currentChildApplicationInfo}_cancelCurrentlyLoadingChildApplicationIfExists(e){if(this._controllersWithRemoteInstances.length){const t=this._controllersWithRemoteInstances[0];t.isLoading&&t.applicationInfo.applicationName!==e&&this._removeControllerFromRemoteInstancesArray(t)}}_addControllerToRemoteInstancesArray(e){const{_controllersWithRemoteInstances:t}=this;t.includes(e)&&this._removeControllerFromRemoteInstancesArray(e,!1),t.unshift(e)}_removeControllerFromRemoteInstancesArray(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{_controllersWithRemoteInstances:n}=this;if(!n.includes(e)){const{applicationConfiguration:{identifier:t}}=e;throw new Error(`Can not remove a controller that is not in the remote instances array (${t})`)}const r=n.indexOf(e);n.splice(r,1),t&&e.clearForReuse()}_pruneControllersWithRemoteInstancesArrayAsNeeded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.maximumNumberOfRemoteInstances;const{_controllersWithRemoteInstances:t}=this;if(t.length>e){const n=t.slice(e);for(const e of n){const t=e.remoteApplicationViewController;if(!t)continue;const{isPresentedViewController:n,remoteInstanceIsReadyToTerminate:r}=t;r&&!n&&this._removeControllerFromRemoteInstancesArray(e)}}}_resetHistoryState(e){this.replaceHistoryState(e,{},void 0,"","")}}function R(e){const{currentChildApplicationIdentifier:t}=P.sharedInstance,{identifier:n}=e.applicationConfiguration;return t===n}r=P,P.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c}));var r,i=n(870),o=n(1247);let a=function(e){return e.USER_LAUNCH="USER_LAUNCH",e.ITEMS_OPENED="ITEMS_OPENED",e.APP_SWITCHER="APP_SWITCHER",e.APP_LIBRARY="APP_LIBRARY",e.NOTIFICATION="NOTIFICATION",e.ACCOUNT_MENU="ACCOUNT_MENU",e.ANNOUNCEMENT="ANNOUNCEMENT",e.CREATE="CREATE",e.OPEN_DOCUMENT="OPEN_DOCUMENT",e.TILE_CLICK="TILE_CLICK",e.PROMOTION_BANNER="PROMOTION_BANNER",e.TILE_HEADER_CLICK="TILE_HEADER_CLICK",e.START_SEARCHING="START_SEARCHING",e}({});class s{constructor(){this.childApplications=new Map,this.badgeListeners=new Set}getBadgeCount(e){var t,n;return null!==(t=null===(n=this.childApplications.get(e))||void 0===n?void 0:n.badgeCount)&&void 0!==t?t:null}setBadgeCount(e,t){const n=this.childApplications.get(e);if(n)n.badgeCount=t;else{const n={badgeCount:t};this.childApplications.set(e,n)}this.badgeListeners.forEach((n=>n(e,t)))}}function c(e){const[t,n]=i.useState((()=>{const t=new Map;for(const n of null!==e&&void 0!==e?e:[]){const e=o.a.sharedInstance.getApplicationInfo(n.applicationIdentifier);null!=e&&t.set(n.applicationIdentifier,s.shared.getBadgeCount(e))}return t}));return i.useEffect((()=>{const e=(e,t)=>{n((n=>new Map(n.set(e.configuration.identifier,t))))};return s.shared.badgeListeners.add(e),()=>{s.shared.badgeListeners.delete(e)}}),[]),t}r=s,s.shared=new r},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r={name:"com.apple.web.tokenaccess",hash:"c6f942949291a6163bee3240dc8de0613e43009a"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1268);function i(e){var t,n;return Object(r.a)().remoteObjectProxy.subscribeToTopicsAndCloudKitContainers(null!==(t=null===e||void 0===e?void 0:e.pushTopics)&&void 0!==t?t:[],null!==(n=null===e||void 0===e?void 0:e.containerIdentifiers)&&void 0!==n?n:[])}function o(e){return Object(r.a)(),r.b.addEventListener("push",e),()=>{r.b.removeEventListener("push",e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(908),i=n(1270),o=n(1269),a=n(1271);const s=new o.a;let c;function u(){return c||(c=new r.a(i.a,{timeout:"indefinite"}),c.exportedObject={async didReceivePush(e){Object(a.a)("PushServiceConnection.didReceivePush: push received"),s.dispatchEvent({type:"push",data:e})},async pushServiceEventFired(e){Object(a.a)(`PushServiceConnection.pushServiceEventFired: dispatching event ${JSON.stringify(e,null,2)}`),s.dispatchEvent(e)}},c.start()),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(){this.listeners=new Map}addEventListener(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}removeEventListener(e,t){const n=this.listeners.get(e);n&&n.delete(t)}dispatchEvent(e){const t=this.listeners.get(e.type);t&&t.forEach((t=>{t(e)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="com.icloud.push"},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1272);let i=!1;function o(e){i=e}const a=e=>{const t="true"===Object(r.a)("iCloud.User.Websocket.Log");(i||t)&&console.debug(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>{try{const t=window.localStorage.getItem(e);return null!==t&&void 0!==t?t:void 0}catch(t){return}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(888),i=n(900),o=n(973);const a=r.z.object({isWebAccessAllowed:r.z.boolean(),isICDRSDisabled:r.z.boolean().optional(),isDeviceConsentedForPCS:r.z.boolean().optional(),deviceConsentForPCSExpiry:r.z.number().optional()});async function s(){const e=`https://setup.${i.a.sharedInstance.current.servicesDomain}/setup/ws/1/requestWebAccessState`;let t;try{t=await o.a.postURL(e)}catch{return{ok:!1}}if(!t||!t.ok)return{ok:!1};const n=await(async()=>{try{const n=await t.json();return e=n,a.safeParse(e).success?n:null}catch{return null}var e})();return n?{ok:!0,data:n}:{ok:!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1275),i=n(1279),o=n(1278),a=n(1276);class s{get isOK(){return this.status===r.a.OK}get isDisconnected(){return this.status===r.a.DISCONNECTED}get isCanceled(){return this.status===r.a.CANCELED}get isTimeout(){return this.status===r.a.TIMEOUT}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=void 0,this.data=void 0,this.error=void 0,this.status=e.status||r.a.NONE,this.data=e.data,this.error=e.error}static createWithOptionalData(e){return new s({status:r.a.OK,data:e})}static createFromError(e){let t=Object(a.a)(e);return t?e instanceof Error||(t.message=JSON.stringify(e),t.stack=(new Error).stack):t={message:"No error specified",stack:(new Error).stack},new s({status:c(e),error:t})}static deserialize(e){if(!e)throw new o.a("[MessagingResponse] no serialized data to deserialize");const t=new s;t.status=e.status;const n=e.data;n&&(t.data=n);const r=e.error;return r&&(t.error=r),u(t),t}serialize(){u(this);const e={status:this.status},t=this.data;t&&(e.data=t);const n=this.error;return n&&(e.error=n),e}}function c(e){let t;return e&&e instanceof Error?(t=e instanceof o.a?r.a.BAD_REQUEST:r.a.ERROR,t):r.a.UNDEFINED_ERROR_TYPE}function u(e){const{status:t,error:n}=e;if(t===r.a.NONE)throw new i.a("[MessagingResponse] status was never set");if(n&&t===r.a.OK)throw new i.a("[MessagingResponse] error can not be set if the status is OK")}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.NONE="NONE",e.OK="OK",e.DISCONNECTED="DISCONNECTED",e.CANCELED="CANCELED",e.BAD_REQUEST="BAD_REQUEST",e.TIMEOUT="TIMEOUT",e.ERROR="ERROR",e.UNDEFINED_ERROR_TYPE="UNDEFINED_ERROR_TYPE"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1277);function i(e){if(!e)return null;const{message:t,type:n}=e;return{message:t,type:n,stack:function(e){if(!e||!Object(r.g)(e.stack))return null;const t=e.stack.trim().split("\n"),n=t.length;if(n>500){const e=n-500;t.splice(400,e,`\u2026 ${e} lines truncated \u2026`)}return t.join("\n")}(e),lineNumber:o(e),context:a(e.context)}}function o(e){if(!e)return null;if(e.lineNumber)return e.lineNumber;if(e.line)return e.line;if(Object(r.g)(e.stack)){const t=e.stack.split("\n")[1];if(Object(r.g)(t)){const e=t.split(":"),n=e[e.length-2],r=parseInt(n,10);if("number"===typeof r&&!Number.isNaN(r))return r}}return null}const a=function(e){let t="";try{const n=e&&e.toJSON&&e.toJSON()||e;t=Object(r.f)(n)?""+n:JSON.stringify(n)}catch(n){const r={};for(const t in e)r[t]=s(e,t);t=JSON.stringify(r)}return t};function s(e,t){const n=e[t];if(Object(r.f)(n))return n;let i="";try{const e=n&&n.toJSON&&n.toJSON()||n;i=Object(r.f)(e)?""+e:JSON.stringify(e)}catch(o){try{i=n+" (could not `JSON.stringify()`)"}catch(a){i="(cannot stringify value)"}}return i}},function(e,t,n){"use strict";function r(e){return"function"===typeof e}function i(e){return"number"===typeof e}function o(e){return Boolean(e&&"function"===typeof e.then)}function a(e){return null!==e&&void 0!==e}function s(e){return"object"===typeof e&&null!==e&&e.constructor===Object}function c(e){return"string"===typeof e}function u(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function l(e){if(!e)return!0;if(function(e){return!!Array.isArray(e)||!!e&&"[object Arguments]"===Object.prototype.toString.call(e)}(e)||c(e))return!e.length;if(e._isCwCollection)return!e.length;for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return i})),n.d(t,"h",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"b",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1279);class i extends r.a{constructor(e){super(e),this.name="MessagingArgumentError"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends Error{constructor(){super(...arguments),this.name="MessagingError",this.isMessagingError=!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1281);class i{constructor(){this._scheduledInvokeLaterMethods=void 0}get scheduledInvokeLaterMethods(){return this._scheduledInvokeLaterMethods||(this._scheduledInvokeLaterMethods=new Map),this._scheduledInvokeLaterMethods}invokeLater(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;t<0&&Object(r.b)(new Error("millisToWaitToInvoke must be a number >= 0")),n&&!n.length&&Object(r.b)(new Error("When provided, optional methodToInvokeIdentifier must be a String with a length > 0"));const{scheduledInvokeLaterMethods:i}=this,o=this._getScheduledInvokeLaterMethodKeyWithValidation(n||e);i.has(o)&&Object(r.b)(new Error(`An invokeLater has already been scheduled for ${o}`));const a=setTimeout((()=>{let t;i.delete(o),t=n?e(n):e(),t&&"function"===typeof t.then&&t.catch((e=>{throw e}))}),t);i.set(o,a)}isInvokeLaterScheduled(e){const t=this._getScheduledInvokeLaterMethodKeyWithValidation(e);return this.scheduledInvokeLaterMethods.has(t)}cancelInvokeLater(e){const t=this._getScheduledInvokeLaterMethodKeyWithValidation(e),{scheduledInvokeLaterMethods:n}=this,i=n.get(t);i||Object(r.b)(new Error("No invokeLater scheduled matching the methodToInvokeOrMethodToInvokeIdentifier")),globalThis.clearTimeout(i),n.delete(t)}cancelInvokeLaterMethods(){const{_scheduledInvokeLaterMethods:e}=this;e&&(e.forEach((e=>globalThis.clearTimeout(e))),e.clear(),this._scheduledInvokeLaterMethods=void 0)}_getScheduledInvokeLaterMethodKeyWithValidation(e){let t;return"function"===typeof e?t=e.toString():e&&e.length>0?t=e:Object(r.b)(new Error("methodToInvokeOrMethodToInvokeIdentifier must be a non-empty String or a Function")),t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));let r=e=>{throw e};class i extends Error{constructor(e,t){super(e),this.message=void 0,this.context=void 0,this.message=e,this.context=t}}function o(e,t){const n=e instanceof Error?e:t?new i(e,t):new Error(e);if(t&&!("context"in n)&&(n.context=t),r)return r(n);throw e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e){this.listeners=[],this.callbackThisArg=void 0,this.callbackThisArg=e}addListener(e){this.listeners.indexOf(e)<0&&this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}dispatch(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let r=0;r<this.listeners.length;r++)this.listeners[r].call(this.callbackThisArg,...t)}toJSON(){return this.toString()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2285),i=n(1286),o=n(1292),a=n(1289),s=n(1281),c=n(1287),u=n(2287),l=n(1291),d=n(1288);class p extends r.a{constructor(){super(...arguments),this.messagingResponseErrorSupport=new u.a(((e,t)=>{this.terminateWithReasonAndInfo(e,t)})),this.processInfo=void 0,this.localProtocol=a.a,this.remoteProtocol=l.a,this._private_processState=i.a.NONE,this._internal_isReadyToTerminate=!1}get isReadyToTerminate(){return this._isReadyToTerminate}get processId(){const{processInfo:e}=this;return e?e.processId:null}get localProtocolTarget(){return this}run(e,t,n){Object(i.b)(this.processState,i.a.LOADED);const{processInfo:r,remoteProxy:o}=this;n.launchReason||Object(s.b)(new Error("Invalid launch options were passed to ChildProcessReference.run")),r.launchOptions=n,this.messagingResponseErrorSupport.sendMessageWithRetryAndTerminateOnError((()=>o.beginLaunching(e,t,r)),"MessagingFromChildProtocol-beginLaunching")}terminateWithReasonAndInfo(e,t){return(this.isConnected?this.disconnect():Promise.resolve()).then((()=>{this.isTerminated||(this._isReadyToTerminate=!0,this.terminate(),this.delegate.childProcessReferenceDidTerminate(this,e,t))}))}isReadyToReceiveMessages(){Object(i.b)(this.processState,i.a.LOADING),this._processState=i.a.LOADED;const{delegate:e}=this,t={launchReason:o.a.USER_LAUNCH};this.invokeLaterSupport.invokeLater((()=>e.childProcessReferenceWillFinishLaunching(this,t)))}didFinishLaunching(e){Object(i.b)(this.processState,i.a.LOADED),this._processState=i.a.RUNNING;const{delegate:t,processInfo:n={}}=this,r=n.launchOptions||{};r.launchData=e,this.invokeLaterSupport.invokeLater((()=>{t.childProcessReferenceDidFinishLaunching(this,r)}))}isReadyToTerminateDidChange(e){this._isReadyToTerminate=e}didEnd(e,t){const n=()=>{this.terminateWithReasonAndInfo(e,Object(c.a)(t))},r="terminateWithReasonAndInfo";e===d.a.UNCAUGHT_EXCEPTION?(this.invokeLaterSupport.isInvokeLaterScheduled(r)&&this.invokeLaterSupport.cancelInvokeLater(r),n()):this.invokeLaterSupport.isInvokeLaterScheduled(r)||this.invokeLaterSupport.invokeLater(n,0,r)}reportNonFatalError(e,t){this.delegate.childProcessReferenceReportNonFatalError(this,e,t)}recordException(e){this.delegate.childProcessReferenceRecordException(this,e)}willUnload(e){this.delegate.childProcessReferenceWillUnload(this,e)}wantsReload(){this._isReadyToTerminate=!0,this.invokeLaterSupport.invokeLater((()=>{this.delegate.childProcessReferenceWantsReload(this)}))}get _processState(){return this._private_processState}set _processState(e){const{delegate:t}=this;this._private_processState=e,t&&t.childProcessReferenceStateDidChange(this,e)}get _isReadyToTerminate(){return this._internal_isReadyToTerminate}set _isReadyToTerminate(e){const{delegate:t}=this;this._internal_isReadyToTerminate!==e&&(this._internal_isReadyToTerminate=e,t&&t.childProcessReferenceIsReadyToTerminateDidChange(this,e))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1278);class i{constructor(e,t){if(this.protocolName=void 0,this.protocolMethodNames=void 0,!e)throw new r.a("ProtocolMetadata: no protocol name");if(!t)throw new r.a("ProtocolMetadata: Invalid list of protocol methods");this.protocolName=e,this.protocolMethodNames=t}isImplementedBy(e){if(!e)return!1;for(const t of this.protocolMethodNames)if("function"!==typeof e[t])return!1;return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(1277),o=n(1281);class a{constructor(){this.contentType="application/json"}encode(e){if(!Object(i.g)(e))try{e=JSON.stringify(e)}catch(t){Object(o.b)(new o.a("Could not encode object to JSON.",{object:e,error:t}))}return e}decode(e){if(Object(i.g)(e))try{e=JSON.parse(e)}catch(t){e=null}return e}}r=a,a.sharedInstance=new r},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a}));var r,i=n(2286);function o(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(i.b)(e,...n)}function a(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(i.a)(e,...n)}!function(e){e.NONE="NONE",e.LOADING="LOADING",e.LOADED="LOADED",e.RUNNING="RUNNING",e.UNLOADING="UNLOADING",e.UNLOADED="UNLOADED",e.TERMINATED="TERMINATED"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(1254);const i="(unknown function)",o="(anonymous function)",a=r.a.sharedInstance;function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=e?{...e}:{},r=c((new Error).stack,t);return n.stack=n.stack||r,n.calleeStack=r,n}function c(e){let t;if(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(a.isChrome||a.isEdge||a.isIE)&&n++;const r=e.split("\n");n<r.length&&(t=r.splice(n).join("\n"))}return t}function u(e,t,n){const r=[];for(let i=t;i<n;i++)r.push(l(e.stack,i));return r}function l(e){const t=c(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);if(t){const e=t.split("\n")[0].trim();if(a.isChrome)return function(e){const t=e.match(/^at\s+(.+)\s+\(/);return Array.isArray(t)&&t[1]||o}(e);if(a.isEdge||a.isIE)return function(e){const t=e.match(/^at\s+(.+)\s+\(/);return Array.isArray(t)&&t[1]||i}(e);if(a.isSafari)return function(e){const t=e.match(/^(.+)@/);return Array.isArray(t)&&t[1]||o}(e);if(a.isFirefox)return function(e){const t=e.match(/^(.+)@/);return Array.isArray(t)&&t[1]||o}(e)}return i}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.USER_INITIATED="USER_INITIATED",e.UNCAUGHT_EXCEPTION="UNCAUGHT_EXCEPTION",e.LAUNCH_DEPENDENCY_UNAVAILABLE="LAUNCH_DEPENDENCY_UNAVAILABLE",e.CANNOT_LOAD_STARTUP_DATA="CANNOT_LOAD_STARTUP_DATA",e.TIMEOUT="TIMEOUT",e.MESSAGING_TIMEOUT="MESSAGING_TIMEOUT",e.DISCONNECTED="DISCONNECTED"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1284),i=n(1290);const o=new r.a("MessagingFromChildProtocol",new Set([...Object(i.a)()(["isReadyToReceiveMessages","didFinishLaunching","isReadyToTerminateDidChange","didEnd","reportNonFatalError","recordException","willUnload","wantsReload"])]))},function(e,t,n){"use strict";function r(){return e=>e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1284),i=n(1290);const o=new r.a("MessagingToChildProtocol",new Set([...Object(i.a)()(["beginLaunching","hostingStateDidChange","openItems"])]))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.USER_LAUNCH="USER_LAUNCH",e.ITEMS_OPENED="ITEMS_OPENED"}(r||(r={}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.MOUSE="MOUSE",e.TOUCH="TOUCH"}(r||(r={}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.PHONE="PHONE",e.TABLET="TABLET",e.DESKTOP="DESKTOP"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a}));var r,i=n(2286);function o(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(i.b)(e,...n)}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Object(i.a)(e,...n)}!function(e){e.NONE="NONE",e.BACKGROUND="BACKGROUND",e.INACTIVE_FOREGROUND="INACTIVE_FOREGROUND",e.ACTIVE_FOREGROUND="ACTIVE_FOREGROUND"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1284),i=n(1290);const o=new r.a("MessagingFromUIChildProtocol",new Set(Object(i.a)()(["isReadyToBeDisplayed"])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1284),i=n(1290);const o=new r.a("MessagingToUIChildProtocol",new Set(Object(i.a)()(["didBecomeActive","willResignActive","willEnterForeground","didEnterBackground","didReceiveSyntheticBrowserEvent"])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return U})),n.d(t,"c",(function(){return F})),n.d(t,"b",(function(){return z}));var r,i=n(888),o=n(465),a=n(902),s=n(890),c=n(911),u=n(970),l=n(1204),d=n(1208),p=n(1205),f=n(1206),h=n(1207),m=n(1167),g=n(1209),v=n(1299),y=n(898),b=n(1307),w=n(1306),S=n(1304),C=n(973),_=n(900),O=n(919),E=n(2208),I=n(924),A=n(2241),T=n(1264),P=n(1247),R=n(2134),k=n(2212),D=n(1244),M=n(925),N=n(1265),x=n(2171),L=n(2248);const j="com.apple.cloudkit";let U=function(e){return e[e.NetworkError=0]="NetworkError",e[e.ResponseError=1]="ResponseError",e[e.SchemaParsingError=2]="SchemaParsingError",e[e.VettingError=3]="VettingError",e}({});function F(e){E.b.sharedInstance.recordStat(new O.a("shareAcceptance.failure",{type:e.type,reason:e.reason,...e.applicationIdentifier&&{applicationIdentifier:e.applicationIdentifier},...e.fileType&&{fileType:e.fileType}}))}class z{constructor(){this.cloudKitJS=new v.a,this.currentShareRecord=null}shouldResolveShortGuidForUnauthenticatedUser(e){var t;return e!==u.d.identifier&&e!==g.b.identifier&&e!==m.b.identifier&&!(null!==(t=P.a.sharedInstance.getApplicationConfiguration(e))&&void 0!==t&&t.applicationInfo.inAppShareAcceptance)}shouldResolveShortGuidForAuthenticatedUser(e){var t;return e!==m.b.identifier&&e!==x.c.identifier&&!(null!==(t=P.a.sharedInstance.getApplicationConfiguration(e))&&void 0!==t&&t.applicationInfo.inAppShareAcceptance)}async resolveShortGuidForUnauthenticatedUser(e,t){if(this.currentShareRecord instanceof S.a&&this.currentShareRecord.shortGuid!==e)throw"[ShareAcceptanceController] - Resolving the previous shared record";if(t===u.d.identifier)return void this.resolveLegacyShare(!1,e,t);const n=`https://ckdatabasews.${_.a.sharedInstance.current.servicesDomain}`,r=await this.cloudKitJS.instanceForContainer(j,n),i=await r.resolveShortGUID(e);var o,s;if(!i||i.hasErrors)return F({type:"resolutionFailed",applicationIdentifier:t,reason:i?`CloudKit resolveShortGUID returned errors: ${null!==(o=null===(s=i.errors)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.reason)&&void 0!==o?o:"unknown error"}`:"CloudKit resolveShortGUID returned no response"}),R.a.cloudOSApplication.showHomeLoginViewController(),void(this.currentShareRecord=null);const c=new S.a(i,e,null!==t&&void 0!==t?t:null,"");if(this.currentShareRecord=c,c.isThirdPartyShare&&c.thirdPartyShareRedirectUrl)return E.b.sharedInstance.recordStat(new O.a("thirdPartyShareOpened")),void a.a(c.thirdPartyShareRedirectUrl.href);if(!i.results[0].share)return F({type:"invalidShare",applicationIdentifier:t,reason:"Resolved item is not a share - missing share field"}),void this.shareWasInvalid();if(c.isPublicShare)return void R.a.cloudOSApplication.showShareAcceptanceViewController(c,!1);R.a.cloudOSApplication.showHomeLoginViewController(c);const{isPublicShare:l}=c;l||(this.currentShareRecord=null)}async resolveShortGuidForAccessPolling(e,t,n){const r=Object(L.j)("ckdatabasews"),i=await this.cloudKitJS.instanceForContainer(j,r),o=await i.resolveShortGUID(t);if(!o||o.hasErrors)return;const a=new S.a(o,t,n,e.dsid);"ACCEPTED"===a.shareeAcceptanceStatus&&this.shareWasAccepted(a)}async resolveShortGuidForAuthenticatedUser(e,t,n){if(this.currentShareRecord instanceof S.a&&this.currentShareRecord.shortGuid!==t)throw"[ShareAcceptanceController] - Resolving the previous shared record";if(n===u.d.identifier||n===g.b.identifier&&!e.tantorMigrated)return void this.resolveLegacyShare(!0,t,n);if((n===l.b.identifier||n===h.b.identifier||n===f.b.identifier||n===d.b.identifier)&&!e.brMigrated)return void R.a.cloudOSApplication.showUpgradeError(Object(M.a)("CloudOS.Sharing.Error.UpgradeToiCloudDrive.Title"),Object(M.a)("CloudOS.Sharing.Error.UpgradeToiCloudDrive.SubTitle"));if(n===p.b.identifier&&!e.notesMigrated)return void R.a.cloudOSApplication.showUpgradeError(Object(M.a)("CloudOS.Sharing.Error.UpgradeToNotes.Title"),Object(M.a)("CloudOS.Sharing.Error.UpgradeToNotes.SubTitle"));const r=Object(L.j)("ckdatabasews"),i=await this.cloudKitJS.instanceForContainer(j,r),o=await i.resolveShortGUID(t);var s,c;if(!o||o.hasErrors||o.results[0].minimallyResolved)return F({type:"resolutionFailed",applicationIdentifier:null!==n&&void 0!==n?n:"unknown",reason:o?o.hasErrors?`CloudKit resolveShortGUID returned errors: ${null!==(s=null===(c=o.errors)||void 0===c||null===(c=c[0])||void 0===c?void 0:c.reason)&&void 0!==s?s:"unknown error"}`:"Share is minimally resolved - user lacks access":"CloudKit resolveShortGUID returned no response"}),this.shareUnavailable(this,null!==n&&void 0!==n?n:void 0,Object(S.b)(n,!1)),void(this.currentShareRecord=null);const m=new S.a(o,t,null!==n&&void 0!==n?n:null,e.dsid);return this.currentShareRecord=m,m.isThirdPartyShare&&m.thirdPartyShareRedirectUrl?(E.b.sharedInstance.recordStat(new O.a("thirdPartyShareOpened")),void a.a(m.thirdPartyShareRedirectUrl.href)):o.results[0].share?void((m.isPublicShare||"INVITED"===m.shareeAcceptanceStatus||m.outOfNetworkParticipantList.length>0)&&"ACCEPTED"!==m.shareeAcceptanceStatus?R.a.cloudOSApplication.showShareAcceptanceViewController(m,!0):"ACCEPTED"===m.shareeAcceptanceStatus&&this.shareWasAccepted(m)):(F({type:"invalidShare",applicationIdentifier:m.applicationIdentifier,reason:"Resolved item is not a share - missing share field"}),void this.shareWasInvalid())}logShareAcceptanceStats(e){const t=e.applicationIdentifier;E.b.sharedInstance.recordStat(new O.a(`${t}.didAcceptShare`)),e instanceof w.a||!e.isFolderSharing||E.b.sharedInstance.recordStat(new O.a(`${t}.didAcceptSharedFolder`,{isPublic:e.isPublicShare}))}async acceptShare(e,t){const n=this.currentShareRecord;if(!n)throw"[ShareAcceptanceController]: No current share record to accept share";if(n instanceof w.a){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=await Object(b.b)(n,e||"");if("success"===t.status)this.logShareAcceptanceStats(n),this.shareWasAccepted(n);else{const e=t.error;switch(e){case b.a.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS:case b.a.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS:case b.a.UNEXPECTED_ERROR:F({type:"legacyAcceptanceFailed",applicationIdentifier:n.applicationIdentifier,fileType:n.fileType,reason:e===b.a.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS?"Legacy share no longer shared by owner":e===b.a.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS?"User already has access to this legacy share":"Unexpected error during legacy share acceptance"}),this.legacyShareUnavailable(n.applicationIdentifier,n.fileType,e);break;default:F({type:"legacyAcceptanceFailed",applicationIdentifier:n.applicationIdentifier,fileType:n.fileType,reason:`Unknown legacy share acceptance error: ${e}`}),this.currentShareRecord=null,this.shareWasInvalid()}}return void(this.currentShareRecord=null)}if(n.isPublicShare&&!e)return void R.a.cloudOSApplication.showHomeLoginViewController(n);const r=Object(L.j)("ckdatabasews"),i=await this.cloudKitJS.instanceForContainer(j,r),o=await i.acceptShortGUID(n.shortGuid);var s,c;return!o||o.hasErrors?(F({type:"acceptanceFailed",applicationIdentifier:n.applicationIdentifier,fileType:n.fileType,reason:o?`CloudKit acceptShortGUID returned errors: ${null!==(s=null===(c=o.errors)||void 0===c||null===(c=c[0])||void 0===c?void 0:c.reason)&&void 0!==s?s:"unknown error"}`:"CloudKit acceptShortGUID returned no response"}),this.shareUnavailable(this,n.applicationIdentifier,n.fileType),this.currentShareRecord=null,o):(t?a.a(t):(this.logShareAcceptanceStats(n),this.shareWasAccepted(n)),o)}declineShare(){const e=this.currentShareRecord;e&&this.shareWasNotAccepted(this,e)}clearShare(){this.currentShareRecord=null}async sendVerificationLink(e,t){const n=Object(L.j)("cksharews","ws/v1/com.apple.cloudkit/production/share/vetting/initiate");try{const r=await C.a.fetchJSON(n,{method:"POST",body:JSON.stringify({shortGUID:e,participantId:t}),validate:{type:"WireRecord",schema:K}});return r.ok&&r.response.ok?r.value.vettingError?o.Result.failure(U.VettingError):o.Result.success(!0):o.Result.failure(U.NetworkError)}catch(r){return o.Result.failure(r instanceof s.a?U.SchemaParsingError:U.ResponseError)}}resolveVettingTokenForUnauthenticatedUser(){R.a.cloudOSApplication.showHomeLoginViewController()}async resolveVettingTokenForAuthenticatedUser(e,t){var n,r;const{vettingToken:i,vettingStatus:o}=t,a=await C.a.fetchJSON(Object(L.j)("cksharews","ws/v1/com.apple.cloudkit/production/share/token/getPermission"),{method:"POST",body:JSON.stringify({vettingToken:i}),validate:{type:"WireRecord",schema:K}});if(!a.ok||!a.response.ok)return F({applicationIdentifier:"vetting",type:"vettingFailed",reason:"Network error or bad response from getPermission endpoint"}),void this.shareUnavailable(this,void 0,Object(S.b)(void 0,!1));const s=a.value;if("updated"===o)return u=s.share,K.safeParse(u).success&&"string"===typeof s.share.shortGUID?void this.resolveShortGuidForAuthenticatedUser(e,s.share.shortGUID):(F({applicationIdentifier:"vetting",type:"vettingFailed",reason:"Invalid share data in vetting response - missing or invalid shortGUID"}),void this.shareUnavailable(this,void 0,Object(S.b)(void 0,!1)));var u;if(!function(e){return B.safeParse(e).success}(s.share))return F({applicationIdentifier:"vetting",type:"vettingFailed",reason:"Invalid phone number data in vetting response"}),void this.shareUnavailable(this,void 0,Object(S.b)(void 0,!1));const l=null===(n=s.share.potentialMatchList[0])||void 0===n?void 0:n.contactInformation.phoneNumber,d=null===(r=L.c.value)||void 0===r?void 0:r.urls,p=l?null===d||void 0===d?void 0:d.vettingUrlForPhone:null===d||void 0===d?void 0:d.vettingUrlForEmail;if(!p)return F({applicationIdentifier:"vetting",type:"vettingFailed",reason:"Missing vetting URL configuration"}),void this.shareUnavailable(this,void 0,Object(S.b)(void 0,!1));c.a(Object(I.a)(p,{key:i,id:e.alternateDSID}),{target:"_self",features:[]})}async resolveLegacyShare(e,t,n){const r=await Object(b.d)(t,n);if("success"===r.status)return this.currentShareRecord=r.legacyAppShare,void R.a.cloudOSApplication.showShareAcceptanceViewController(r.legacyAppShare,e);this.currentShareRecord=null;const i=r.error;switch(i){case b.a.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS:case b.a.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS:case b.a.UNEXPECTED_ERROR:F({type:"legacyResolutionFailed",applicationIdentifier:r.applicationIdentifier,fileType:r.fileType,reason:i===b.a.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS?"Legacy share no longer shared by owner":i===b.a.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS?"User already has access to this legacy share":"Unexpected error during legacy share fetch"}),this.legacyShareUnavailable(r.applicationIdentifier,r.fileType,i);break;default:F({type:"legacyResolutionFailed",applicationIdentifier:r.applicationIdentifier,fileType:r.fileType,reason:`Unknown legacy share fetch error: ${i}`}),this.shareWasInvalid()}}shareWasInvalid(){const e=A.a.sharedInstance.applicationIdentifier;if(!e)return;const t=P.a.sharedInstance.getApplicationConfiguration(e);if(t)if(T.a.sharedInstance.canLaunchChildApplication(t.applicationInfo))T.a.sharedInstance.launchChildApplication(t.applicationInfo,{});else{if(R.a.cloudOSApplication.showBlockedHomePage())return;const e=t.applicationInfo.pcsKeyIdentifier;if(null!==e&&!k.a.sharedInstance.hasPCSKey(e))return void R.a.cloudOSApplication.showLoadChildApplicationADPBlocked(t,e);R.a.cloudOSApplication.couldNotLaunchApplication(t)}}shareUnavailable(e,t,n){const r=!!A.a.sharedInstance.vettingParameters,i=r?Object(M.a)("CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Title"):Object(M.a)("CloudOS.Sharing.Unavailable.Title",{fileType:Object(D.a)(n)}),o=r?Object(M.a)("CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Description"):Object(M.a)("CloudOS.Sharing.Unavailable.Description",{fileType:n});R.a.cloudOSApplication.showShareAcceptanceError(i,o,null!==t&&void 0!==t?t:l.b.identifier)}shareWasAccepted(e){const t=e.applicationIdentifier,n=P.a.sharedInstance.getApplicationConfiguration(t);if(!n)return;if(e instanceof w.a)return void T.a.sharedInstance.switchToApplication(e.applicationIdentifier,{source:{reason:N.b.ITEMS_OPENED}});if(e.outOfNetworkParticipantList.length>0)return void R.a.cloudOSApplication.showCKShareAcceptance(e);const r=T.a.sharedInstance.canLaunchChildApplication(n.applicationInfo),i=t===d.b.identifier||t===f.b.identifier||t===h.b.identifier;if(!r&&!i){if(R.a.cloudOSApplication.showBlockedHomePage())return;const e=n.applicationInfo.pcsKeyIdentifier;return null===e||k.a.sharedInstance.hasPCSKey(e)?void R.a.cloudOSApplication.couldNotLaunchApplication(n):void R.a.cloudOSApplication.showLoadChildApplicationADPBlocked(n,e)}T.a.sharedInstance.switchToApplication(e.applicationIdentifier,{source:{reason:N.b.ITEMS_OPENED},queryParameters:i?{redirectReason:"off"}:void 0})}legacyShareUnavailable(e,t,n){const r=Object(M.a)("CloudOS.Sharing.Unavailable.Title",{fileType:e===g.b.identifier?Object(M.a)("ShareAcceptancePage.User.Description.Reminders.Name"):Object(D.a)(t)}),i=(()=>{switch(n){case b.a.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS:return Object(M.a)("CloudOS.Sharing.Unavailable.NoLongerShared.Description",{fileType:t});case b.a.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS:return Object(M.a)("CloudOS.Sharing.Unavailable.AlreadyAccepted.Description",{fileType:t});case b.a.UNEXPECTED_ERROR:default:return Object(M.a)("CloudOS.Sharing.Unavailable.Description",{fileType:t})}})();R.a.cloudOSApplication.showShareAcceptanceError(r,i,e)}shareWasNotAccepted(e,t){const n=t.applicationIdentifier,r=`${n}.didDeclineShare`;if(E.b.sharedInstance.recordStat(new O.a(r)),t.isFolderSharing){const e=`${n}.didDeclineSharedFolder`;E.b.sharedInstance.recordStat(new O.a(e,{isPublic:!!t.isPublicShare}))}const i=T.a.sharedInstance.currentChildApplicationInfo;i?T.a.sharedInstance.replaceHistoryState(i,{},void 0,"",""):A.a.sharedInstance.replaceHistoryState({},y.a.title,A.a.sharedInstance.applicationIdentifier,A.a.sharedInstance.relativePath,"",void 0),R.a.cloudOSApplication.hideVerifyShareAccessModal(),R.a.cloudOSApplication.switchToSpringboard()}}r=z,z.sharedInstance=new r;const B=i.z.object({potentialMatchList:i.z.object({contactInformation:i.z.object({phoneNumber:i.z.string().optional()})}).array()}),K=i.z.record(i.z.unknown())},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1300),i=n.n(r),o=n(973),a=n(1303);window.CloudKit=i.a;class s{constructor(){this.cloudkitInstances={}}async instanceForContainer(e,t){const n="production",r=`${e}.${t}.${n}`,s=this.cloudkitInstances,c=s[r];if(c)return c;if(!i.a)throw new Error("[CloudKitJS] instanceForContainer: Failed to load CloudKit JS and no cached cloudkit.js instance found");const u=i.a.configure({containers:[{containerIdentifier:e,environment:n,privateDatabasePartition:t,publicDatabasePartition:t,sharedDatabasePartition:t}],services:{Promise:Promise,fetch:async(e,t)=>{e instanceof URL&&(e=String(e));const[n,r]="string"===typeof e?[e,t]:[e.url,{...e,...t}];return await o.a.fetchURL(n,r)},safeFetch:o.a.fetchURL}}),l=new a.a(u,e,t);return s[r]=l,l}}},function(e,t,n){e.exports=n(1301)},function(e,t,n){var r,i;e.exports=(r=n(1302),i=n(1302),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(n(1)),o=r(n(221)),a=r(n(189)),s=r(n(106)),c=r(n(223)),u=r(n(79)),l=r(n(278)),d=r(n(251)),p=r(n(293)),f=r(n(294)),h=r(n(295)),m=r(n(296)),g=r(n(297)),v=r(n(256)),y=r(n(298)),b=r(n(291)),w=null,S={configure:function(e){if(u.default.isNullOrUndefined(e))throw o.default.makeConfigurationError("A configuration object is required");return w=new i.default({config:e})},getDefaultContainer:function(){if(!w)throw o.default.makeConfigurationError("Please configure CloudKit");return w.getDefaultContainer()},getAllContainers:function(){if(!w)throw o.default.makeConfigurationError("Please configure CloudKit");return w.getAllContainers()},getContainer:function(e){if(!w)throw o.default.makeConfigurationError("Please configure CloudKit");return w.getContainer(e)},PRODUCTION_ENVIRONMENT:a.default.PRODUCTION_ENVIRONMENT,DEVELOPMENT_ENVIRONMENT:a.default.DEVELOPMENT_ENVIRONMENT,DatabaseScope:d.default,QueryFilterComparator:p.default,ReferenceAction:f.default,SubscriptionType:h.default,ShareRecordType:m.default,ShareParticipantPermission:g.default,ShareParticipantAcceptanceStatus:y.default,ShareParticipantType:v.default,AppleIDButtonTheme:b.default,BUILD_VERSION:a.default.BUILD_VERSION,VERSION:a.default.VERSION,CKError:o.default,get Promise(){return s.default.Promise},CLOUDKIT_LOADED:a.default.CLOUDKIT_LOADED,fetch:function(e,t){return c.default.fetch(e,t)},WS_API_VERSION:a.default.WS_API_VERSION,logToConsole:!!u.default.getQueryParam("CloudKit.logToConsole"),parseRawNotification:l.default.parseRawNotification};if("undefined"!=typeof window&&"undefined"!=typeof document){var C=window.document,_=C.createEvent("Event");_.initEvent(a.default.CLOUDKIT_LOADED,!0,!0),setTimeout((function(){return C.dispatchEvent(_)}))}e.exports=S},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(2)),o=r(n(40)),a=r(n(74)),s=r(n(75)),c=r(n(79)),u=r(n(188)),l=r(n(247)),d=r(n(221)),p=r(n(224)),f=r(n(223)),h=r(n(106)),m=function(){function e(t){var n=t.config,r=n.containers,s=n.services,m=void 0===s?{}:s,g=n.locale;if((0,a.default)(this,e),!c.default.isArray(r))throw d.default.makeConfigurationError("config.containers must be an array");if(c.default.isNode()&&c.default.isNullOrUndefined(m.fetch))throw d.default.makeConfigurationError("Please provide an implementation of whatwg fetch via services.fetch");p.default.setDelegate(m.logger),h.default.Promise=m.Promise||o.default,f.default.setDelegate(m.fetch);var v=new u.default,y=m.authTokenStore,b=c.default.createUUID();this._containers=r.map((function(e){return(0,i.default)({},e,{locale:g,clientID:e.clientID||b})})).map((function(e){return new l.default({containerConfig:e,authTokenStore:y,apnsManager:v})}))}return(0,s.default)(e,[{key:"getDefaultContainer",value:function(){return this._containers[0]}},{key:"getContainer",value:function(e){return c.default.find(this._containers,(function(t){return t.containerIdentifier===e}))}},{key:"getAllContainers",value:function(){return this._containers}}]),e}();t.default=m},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(3));t.default=r.default||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(e,t,n){e.exports={default:n(4),__esModule:!0}},function(e,t,n){n(5),e.exports=n(8).Object.assign},function(e,t,n){var r=n(6);r(r.S+r.F,"Object",{assign:n(21)})},function(e,t,n){var r=n(7),i=n(8),o=n(9),a=n(11),s="prototype",c=function(e,t,n){var u,l,d,p=e&c.F,f=e&c.G,h=e&c.S,m=e&c.P,g=e&c.B,v=e&c.W,y=f?i:i[t]||(i[t]={}),b=y[s],w=f?r:h?r[t]:(r[t]||{})[s];for(u in f&&(n=t),n)(l=!p&&w&&void 0!==w[u])&&u in y||(d=l?w[u]:n[u],y[u]=f&&"function"!=typeof w[u]?n[u]:g&&l?o(d,r):v&&w[u]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[u]=d,e&c.R&&b&&!b[u]&&a(b,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},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){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(10);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){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(12),i=n(20);e.exports=n(16)?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(13),i=n(15),o=n(19),a=Object.defineProperty;t.f=n(16)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(s){}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(14);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(16)&&!n(17)((function(){return 7!=Object.defineProperty(n(18)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){e.exports=!n(17)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(14),i=n(7).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(14);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,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(22),i=n(37),o=n(38),a=n(39),s=n(26),c=Object.assign;e.exports=!c||n(17)((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=a(e),c=arguments.length,u=1,l=i.f,d=o.f;c>u;)for(var p,f=s(arguments[u++]),h=l?r(f).concat(l(f)):r(f),m=h.length,g=0;m>g;)d.call(f,p=h[g++])&&(n[p]=f[p]);return n}:c},function(e,t,n){var r=n(23),i=n(36);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(24),i=n(25),o=n(29)(!1),a=n(33)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(26),i=n(28);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(27);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){var r=n(25),i=n(30),o=n(32);e.exports=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(31),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},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,n){var r=n(31),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(34)("keys"),i=n(35);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(7),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},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="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(28);e.exports=function(e){return Object(r(e))}},function(e,t,n){e.exports={default:n(41),__esModule:!0}},function(e,t,n){n(42),n(43),n(56),n(60),e.exports=n(8).Promise},function(e,t){},function(e,t,n){"use strict";var r=n(44)(!0);n(45)(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,n){var r=n(31),i=n(28);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(46),i=n(6),o=n(47),a=n(11),s=n(24),c=n(48),u=n(49),l=n(53),d=n(55),p=n(54)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",m="values",g=function(){return this};e.exports=function(e,t,n,v,y,b,w){u(n,t,v);var S,C,_,O=function(e){if(!f&&e in T)return T[e];switch(e){case h:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",I=y==m,A=!1,T=e.prototype,P=T[p]||T["@@iterator"]||y&&T[y],R=P||O(y),k=y?I?O("entries"):R:void 0,D="Array"==t&&T.entries||P;if(D&&(_=d(D.call(new e)))!==Object.prototype&&(l(_,E,!0),r||s(_,p)||a(_,p,g)),I&&P&&P.name!==m&&(A=!0,R=function(){return P.call(this)}),r&&!w||!f&&!A&&T[p]||a(T,p,R),c[t]=R,c[E]=g,y)if(S={values:I?R:O(m),keys:b?R:O(h),entries:k},w)for(C in S)C in T||o(T,C,S[C]);else i(i.P+i.F*(f||A),t,S);return S}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(11)},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(50),i=n(20),o=n(53),a={};n(11)(a,n(54)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(13),i=n(51),o=n(36),a=n(33)("IE_PROTO"),s=function(){},c="prototype",u=function(){var e,t=n(18)("iframe"),r=o.length;for(t.style.display="none",n(52).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u[c][o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[c]=r(e),n=new s,s[c]=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(12),i=n(13),o=n(22);e.exports=n(16)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},function(e,t,n){e.exports=n(7).document&&document.documentElement},function(e,t,n){var r=n(12).f,i=n(24),o=n(54)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(34)("wks"),i=n(35),o=n(7).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(24),i=n(39),o=n(33)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){n(57);for(var r=n(7),i=n(11),o=n(48),a=n(54)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=s[c],l=r[u],d=l&&l.prototype;d&&!d[a]&&i(d,a,u),o[u]=o.Array}},function(e,t,n){"use strict";var r=n(58),i=n(59),o=n(48),a=n(25);e.exports=n(45)(Array,"Array",(function(e,t){this._t=a(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"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r,i,o,a=n(46),s=n(7),c=n(9),u=n(61),l=n(6),d=n(14),p=n(10),f=n(62),h=n(63),m=n(67),g=n(68).set,v=n(70)(),y="Promise",b=s.TypeError,w=s.process,S=s[y],C="process"==u(w=s.process),_=function(){},O=!!function(){try{var e=S.resolve(1),t=(e.constructor={})[n(54)("species")]=function(e){e(_,_)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(_)instanceof t}catch(r){}}(),E=function(e,t){return e===t||e===S&&t===o},I=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},A=function(e){return E(S,e)?new T(e):new i(e)},T=i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw b("Bad Promise constructor");t=e,n=r})),this.resolve=p(t),this.reject=p(n)},P=function(e){try{e()}catch(t){return{error:t}}},R=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,c=t.reject,u=t.domain;try{a?(i||(2==e._h&&M(e),e._h=1),!0===a?n=r:(u&&u.enter(),n=a(r),u&&u.exit()),n===t.promise?c(b("Promise-chain cycle")):(o=I(n))?o.call(n,s,c):s(n)):c(r)}catch(l){c(l)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&k(e)}))}},k=function(e){g.call(s,(function(){var t,n,r,i=e._v;if(D(e)&&(t=P((function(){C?w.emit("unhandledRejection",i,e):(n=s.onunhandledrejection)?n({promise:e,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=C||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if((t=n[r++]).fail||!D(t.promise))return!1;return!0},M=function(e){g.call(s,(function(){var t;C?w.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},x=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=I(e))?v((function(){var r={_w:n,_d:!1};try{t.call(e,c(x,r,1),c(N,r,1))}catch(i){N.call(r,i)}})):(n._v=e,n._s=1,R(n,!1))}catch(r){N.call({_w:n,_d:!1},r)}}};O||(S=function(e){f(this,S,y,"_h"),p(e),r.call(this);try{e(c(x,this,1),c(N,this,1))}catch(t){N.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(71)(S.prototype,{then:function(e,t){var n=A(m(this,S));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),T=function(){var e=new r;this.promise=e,this.resolve=c(x,e,1),this.reject=c(N,e,1)}),l(l.G+l.W+l.F*!O,{Promise:S}),n(53)(S,y),n(72)(y),o=n(8)[y],l(l.S+l.F*!O,y,{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!O),y,{resolve:function(e){if(e instanceof S&&E(e.constructor,this))return e;var t=A(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(O&&n(73)((function(e){S.all(e).catch(_)}))),y,{all:function(e){var t=this,n=A(t),r=n.resolve,i=n.reject,o=P((function(){var n=[],o=0,a=1;h(e,!1,(function(e){var s=o++,c=!1;n.push(void 0),a++,t.resolve(e).then((function(e){c||(c=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o&&i(o.error),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,i=P((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i&&r(i.error),n.promise}})},function(e,t,n){var r=n(27),i=n(54)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},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){var r=n(9),i=n(64),o=n(65),a=n(13),s=n(30),c=n(66),u={},l={};t=e.exports=function(e,t,n,d,p){var f,h,m,g,v=p?function(){return e}:c(e),y=r(n,d,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(f=s(e.length);f>b;b++)if((g=t?y(a(h=e[b])[0],h[1]):y(e[b]))===u||g===l)return g}else for(m=v.call(e);!(h=m.next()).done;)if((g=i(m,y,h.value,t))===u||g===l)return g},t.BREAK=u,t.RETURN=l},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(a){var o=e.return;throw void 0!==o&&r(o.call(e)),a}}},function(e,t,n){var r=n(48),i=n(54)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(61),i=n(54)("iterator"),o=n(48);e.exports=n(8).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(13),i=n(10),o=n(54)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(9),s=n(69),c=n(52),u=n(18),l=n(7),d=l.process,p=l.setImmediate,f=l.clearImmediate,h=l.MessageChannel,m=0,g={},v="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};p&&f||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},f=function(e){delete g[e]},"process"==n(27)(d)?r=function(e){d.nextTick(a(y,e,1))}:h?(o=(i=new h).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):r=v in u("script")?function(e){c.appendChild(u("script"))[v]=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:p,clear:f}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(7),i=n(68).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(27)(a);e.exports=function(){var e,t,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(o){throw e?n():t=void 0,o}}t=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(o){var l=!0,d=document.createTextNode("");new o(u).observe(d,{characterData:!0}),n=function(){d.data=l=!l}}else if(s&&s.resolve){var p=s.resolve();n=function(){p.then(u)}}else n=function(){i.call(r,u)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(11);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(7),i=n(8),o=n(12),a=n(16),s=n(54)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(54)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(s){}return n}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76));t.default=function(){function e(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),(0,r.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(77),__esModule:!0}},function(e,t,n){n(78);var r=n(8).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(6);r(r.S+r.F*!n(16),"Object",{defineProperty:n(12).f})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,y.default)(e)||(0,v.default)(e)}function o(){return"undefined"==typeof window}function a(e,t,n){!function(){try{return navigator.userAgent.indexOf("Trident")>0||navigator.userAgent.indexOf("MSIE")>0}catch(e){}}()?window.open(e,"","width="+t+", height="+n):window.open(window.location.href,"","width="+t+", height="+n).location.href=e}function s(e){var t=(0,h.default)(e);if(t===(0,h.default)({}))return[];var n=s(t);return(0,f.default)(t).forEach((function(e){return n.push(e)})),n}function c(e,t,n){try{return e.apply(void 0,(0,u.default)(t))}catch(r){throw console.error(n),r}}Object.defineProperty(t,"__esModule",{value:!0});var u=r(n(80)),l=r(n(85)),d=r(n(89)),p=r(n(93)),f=r(n(95)),h=r(n(100)),m=r(n(103)),g=r(n(106)),v=r(n(107)),y=r(n(108)),b=r(n(109)),w=r(n(111)),S=r(n(117)),C=r(n(115)),_=r(n(114)),O=r(n(118)),E=r(n(143)),I=r(n(150)),A=r(n(157)),T=r(n(160)),P=(r(n(182)),n(141)),R=(r(P),n(185)),k=(r(R),n(186)),D=r(k),M=o()?e.Buffer:null;t.default={isUndefined:v.default,isNullOrUndefined:i,isInt:function(e){return Number(e)===e&&e%1===0},isArray:w.default,isString:S.default,isStringArray:function(e){return(0,w.default)(e)&&e.every(S.default)},isNumberish:function(e){return!(0,m.default)(Number(e))},isObject:C.default,isBoolean:b.default,isFunction:_.default,has:I.default,pick:E.default,picker:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return(0,E.default)(e,[].concat(t))}},makeObjectHasValuesForKeysPredicate:function(e){return function(t){return(0,d.default)(e).every((function(n){var r=e[n],o=!i(t[n]);return r&&o||!r&&!o}))}},assertArg:function(e,t){if(i(e))throw new Error(t)},assign:A.default,clone:O.default,asArray:function(e){return(0,w.default)(e)?e:[e]},find:T.default,values:function(e){return(0,l.default)(e)},tryInvokeFunction:c,tryInvokeMethod:function(e,t,n,r){if((0,_.default)(e[t]))return c(e[t].bind(e),n,"Error calling "+r+"."+t)},stringifyExposingUndefined:function(e){return(0,p.default)(e,(function(e,t){return(0,v.default)(t)?"<<undefined>>":t}))},instanceToString:function(e,t){var n=s(t);n=n.sort().filter((function(e){return!(0,_.default)(t[e])&&-1===e.indexOf("_")}));var r="";return r+="["+e,n.forEach((function(e){var n=t[e];r+="\n\t",r+=(0,w.default)(n)?e+": ["+n.length+"]":e+": "+n})),r+="\n]"},isNode:o,getAsyncMessageFromPopup:function(e,t,n){var r=g.default.defer(),i=function(e){(0,C.default)(e.data)&&r.resolve(e)};return window.addEventListener("message",i,!1),a(e,t,n),r.promise.then((function(e){return window.removeEventListener("message",i),e}))},prepareForUpload:function(e){return o()?e.toString():e},setCookie:function(e,t){var n=window.location.hostname,r="",i=new Date;i.setTime(i.getTime()+12096e5),null===t&&i.setTime(-1);var o="expires="+i.toUTCString(),a=/\./.test(n)?n:"";r="path="+r,window.document.cookie=e+"="+t+"; "+o+"; "+a+"; "+r},getCookie:function(e){for(var t=e+"=",n=window.document.cookie.split(";"),r=null,i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1);0===o.indexOf(t)&&(r=o.substring(t.length,o.length))}return r},Buffer:M,getQueryParam:function(e){return function(){try{var e=location.search.substr(1),t={};return e.split("&").forEach((function(e){var n=e.split("=");t[n[0]]=decodeURIComponent(n[1])})),t}catch(n){return{}}}()[e]},createUUID:function(){return D.default.v4()}}}).call(t,function(){return this}())},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(81));t.default=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(0,r.default)(e)}},function(e,t,n){e.exports={default:n(82),__esModule:!0}},function(e,t,n){n(43),n(83),e.exports=n(8).Array.from},function(e,t,n){"use strict";var r=n(9),i=n(6),o=n(39),a=n(64),s=n(65),c=n(30),u=n(84),l=n(66);i(i.S+i.F*!n(73)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,p=o(e),f="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(p);if(g&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==y||f==Array&&s(y))for(n=new f(t=c(p.length));t>v;v++)u(n,v,g?m(p[v],v):p[v]);else for(d=y.call(p),n=new f;!(i=d.next()).done;v++)u(n,v,g?a(d,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){"use strict";var r=n(12),i=n(20);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){e.exports={default:n(86),__esModule:!0}},function(e,t,n){n(87),e.exports=n(8).Object.values},function(e,t,n){var r=n(6),i=n(88)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(22),i=n(25),o=n(38).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),c=s.length,u=0,l=[];c>u;)o.call(a,n=s[u++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){e.exports={default:n(90),__esModule:!0}},function(e,t,n){n(91),e.exports=n(8).Object.keys},function(e,t,n){var r=n(39),i=n(22);n(92)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(6),i=n(8),o=n(17);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){e.exports={default:n(94),__esModule:!0}},function(e,t,n){var r=n(8),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,n){e.exports={default:n(96),__esModule:!0}},function(e,t,n){n(97);var r=n(8).Object;e.exports=function(e){return r.getOwnPropertyNames(e)}},function(e,t,n){n(92)("getOwnPropertyNames",(function(){return n(98).f}))},function(e,t,n){var r=n(25),i=n(99).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(t){return a.slice()}}(e):i(r(e))}},function(e,t,n){var r=n(23),i=n(36).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){e.exports={default:n(101),__esModule:!0}},function(e,t,n){n(102),e.exports=n(8).Object.getPrototypeOf},function(e,t,n){var r=n(39),i=n(55);n(92)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){e.exports={default:n(104),__esModule:!0}},function(e,t,n){n(105),e.exports=n(8).Number.isNaN},function(e,t,n){var r=n(6);r(r.S,"Number",{isNaN:function(e){return e!=e}})},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(40)),o=r(n(74)),a=r(n(75)),s=function(){function e(){(0,o.default)(this,e),"undefined"!=typeof i.default&&(this.Promise=i.default)}return(0,a.default)(e,[{key:"wait",value:function(e){return new this.Promise((function(t,n){setTimeout(t,e)}))}},{key:"waitOrFail",value:function(e,t,n){var r=null,i=new this._Promise((function(e,i){var o=setTimeout((function(){return i(n)}),t);r=function(){return clearTimeout(o)}}));return e.then(r,r),this._Promise.race([e,i])}},{key:"defer",value:function(){var e={},t=new this.Promise((function(t,n){e.resolve=t,e.reject=n}));return e.promise=t,e}},{key:"Promise",set:function(e){this._Promise=e},get:function(){return this._Promise}}]),e}(),c=new s;t.default=c},function(e,t){e.exports=function(e){return void 0===e}},function(e,t){e.exports=function(e){return null===e}},function(e,t,n){var r=n(110),i="[object Boolean]",o=Object.prototype.toString;e.exports=function(e){return!0===e||!1===e||r(e)&&o.call(e)==i}},function(e,t){e.exports=function(e){return!!e&&"object"==typeof e}},function(e,t,n){var r=n(112),i=n(116),o=n(110),a=Object.prototype.toString,s=r(Array,"isArray")||function(e){return o(e)&&i(e.length)&&"[object Array]"==a.call(e)};e.exports=s},function(e,t,n){var r=n(113);e.exports=function(e,t){var n=null==e?void 0:e[t];return r(n)?n:void 0}},function(e,t,n){var r=n(114),i=n(110),o=/^\[object .+?Constructor\]$/,a=Object.prototype,s=Function.prototype.toString,c=a.hasOwnProperty,u=RegExp("^"+s.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return null!=e&&(r(e)?u.test(s.call(e)):i(e)&&o.test(e))}},function(e,t,n){var r=n(115),i="[object Function]",o=Object.prototype.toString;e.exports=function(e){return r(e)&&o.call(e)==i}},function(e,t){e.exports=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(110),i="[object String]",o=Object.prototype.toString;e.exports=function(e){return"string"==typeof e||r(e)&&o.call(e)==i}},function(e,t,n){var r=n(119),i=n(140),o=n(142);e.exports=function(e,t,n,a){return t&&"boolean"!=typeof t&&o(e,t,n)?t=!1:"function"==typeof t&&(a=n,n=t,t=!1),"function"==typeof n?r(e,t,i(n,a,3)):r(e,t)}},function(e,t,n){var r=n(120),i=n(121),o=n(122),a=n(132),s=n(136),c=n(137),u=n(139),l=n(111),d=n(115),p="[object Arguments]",f="[object Function]",h="[object Object]",m={};m[p]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object Date]"]=m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Number]"]=m[h]=m["[object RegExp]"]=m["[object String]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m["[object Error]"]=m[f]=m["[object Map]"]=m["[object Set]"]=m["[object WeakMap]"]=!1;var g=Object.prototype.toString;e.exports=function e(t,n,v,y,b,w,S){var C;if(v&&(C=b?v(t,y,b):v(t)),void 0!==C)return C;if(!d(t))return t;var _=l(t);if(_){if(C=s(t),!n)return r(t,C)}else{var O=g.call(t),E=O==f;if(O!=h&&O!=p&&(!E||b))return m[O]?c(t,O,n):b?t:{};if(C=u(E?{}:t),!n)return o(C,t)}w||(w=[]),S||(S=[]);for(var I=w.length;I--;)if(w[I]==t)return S[I];return w.push(t),S.push(C),(_?i:a)(t,(function(r,i){C[i]=e(r,n,v,i,t,w,S)})),C}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(123),i=n(124);e.exports=function(e,t){return null==t?e:r(t,i(t),e)}},function(e,t){e.exports=function(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}},function(e,t,n){var r=n(112),i=n(125),o=n(115),a=n(128),s=r(Object,"keys"),c=s?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&i(e)?a(e):o(e)?s(e):[]}:a;e.exports=c},function(e,t,n){var r=n(126),i=n(116);e.exports=function(e){return null!=e&&i(r(e))}},function(e,t,n){var r=n(127)("length");e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(129),i=n(111),o=n(130),a=n(116),s=n(131),c=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=s(e),n=t.length,u=n&&e.length,l=!!u&&a(u)&&(i(e)||r(e)),d=-1,p=[];++d<n;){var f=t[d];(l&&o(f,u)||c.call(e,f))&&p.push(f)}return p}},function(e,t,n){var r=n(125),i=n(110),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;e.exports=function(e){return i(e)&&r(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},function(e,t){var n=/^\d+$/,r=9007199254740991;e.exports=function(e,t){return e="number"==typeof e||n.test(e)?+e:-1,t=null==t?r:t,e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(129),i=n(111),o=n(130),a=n(116),s=n(115),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return[];s(e)||(e=Object(e));var t=e.length;t=t&&a(t)&&(i(e)||r(e))&&t||0;for(var n=e.constructor,u=-1,l="function"==typeof n&&n.prototype===e,d=Array(t),p=t>0;++u<t;)d[u]=u+"";for(var f in e)p&&o(f,t)||"constructor"==f&&(l||!c.call(e,f))||d.push(f);return d}},function(e,t,n){var r=n(133),i=n(124);e.exports=function(e,t){return r(e,t,i)}},function(e,t,n){var r=n(134)();e.exports=r},function(e,t,n){var r=n(135);e.exports=function(e){return function(t,n,i){for(var o=r(t),a=i(t),s=a.length,c=e?s:-1;e?c--:++c<s;){var u=a[c];if(!1===n(o[u],u,o))break}return t}}},function(e,t,n){var r=n(115);e.exports=function(e){return r(e)?e:Object(e)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(138),i="[object Boolean]",o="[object Date]",a="[object Number]",s="[object RegExp]",c="[object String]",u="[object ArrayBuffer]",l="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",f="[object Int16Array]",h="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",v="[object Uint16Array]",y="[object Uint32Array]",b=/\w*$/;e.exports=function(e,t,n){var w=e.constructor;switch(t){case u:return r(e);case i:case o:return new w(+e);case l:case d:case p:case f:case h:case m:case g:case v:case y:var S=e.buffer;return new w(n?r(S):S,e.byteOffset,e.length);case a:case c:return new w(e);case s:var C=new w(e.source,b.exec(e));C.lastIndex=e.lastIndex}return C}},function(e,t){(function(t){var n=t.ArrayBuffer,r=t.Uint8Array;e.exports=function(e){var t=new n(e.byteLength);return new r(t).set(new r(e)),t}}).call(t,function(){return this}())},function(e,t){e.exports=function(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}},function(e,t,n){var r=n(141);e.exports=function(e,t,n){if("function"!=typeof e)return r;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(125),i=n(130),o=n(115);e.exports=function(e,t,n){if(!o(n))return!1;var a=typeof t;if("number"==a?r(n)&&i(t,n.length):"string"==a&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}},function(e,t,n){var r=n(144),i=n(140),o=n(146),a=n(147),s=n(149)((function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,i(t[0],t[1],3)):o(e,r(t))}));e.exports=s},function(e,t,n){var r=n(145),i=n(129),o=n(111),a=n(125),s=n(110);e.exports=function e(t,n,c,u){u||(u=[]);for(var l=-1,d=t.length;++l<d;){var p=t[l];s(p)&&a(p)&&(c||o(p)||i(p))?n?e(p,n,c,u):r(u,p):c||(u[u.length]=p)}return u}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(135);e.exports=function(e,t){e=r(e);for(var n=-1,i=t.length,o={};++n<i;){var a=t[n];a in e&&(o[a]=e[a])}return o}},function(e,t,n){var r=n(148);e.exports=function(e,t){var n={};return r(e,(function(e,r,i){t(e,r,i)&&(n[r]=e)})),n}},function(e,t,n){var r=n(133),i=n(131);e.exports=function(e,t){return r(e,t,i)}},function(e,t){var n="Expected a function",r=Math.max;e.exports=function(e,t){if("function"!=typeof e)throw new TypeError(n);return t=r(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,i=-1,o=r(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var s=Array(t+1);for(i=-1;++i<t;)s[i]=n[i];return s[t]=a,e.apply(this,s)}}},function(e,t,n){var r=n(151),i=n(152),o=n(129),a=n(111),s=n(130),c=n(153),u=n(116),l=n(154),d=n(155),p=Object.prototype.hasOwnProperty;e.exports=function(e,t){if(null==e)return!1;var n=p.call(e,t);if(!n&&!c(t)){if(null==(e=1==(t=d(t)).length?e:r(e,i(t,0,-1))))return!1;t=l(t),n=p.call(e,t)}return n||u(e.length)&&s(t,e.length)&&(a(e)||o(e))}},function(e,t,n){var r=n(135);e.exports=function(e,t,n){if(null!=e){void 0!==n&&n in r(e)&&(t=[n]);for(var i=0,o=t.length;null!=e&&i<o;)e=e[t[i++]];return i&&i==o?e:void 0}}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;(t=null==t?0:+t||0)<0&&(t=-t>i?0:i+t),(n=void 0===n||n>i?i:+n||0)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},function(e,t,n){var r=n(111),i=n(135),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){var n=typeof e;return!!("string"==n&&a.test(e)||"number"==n)||!r(e)&&(!o.test(e)||null!=t&&e in i(t))}},function(e,t){e.exports=function(e){var t=e?e.length:0;return t?e[t-1]:void 0}},function(e,t,n){var r=n(156),i=n(111),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,a=/\\(\\)?/g;e.exports=function(e){if(i(e))return e;var t=[];return r(e).replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}},function(e,t){e.exports=function(e){return null==e?"":e+""}},function(e,t,n){var r=n(158),i=n(122),o=n(159)((function(e,t,n){return n?r(e,t,n):i(e,t)}));e.exports=o},function(e,t,n){var r=n(124);e.exports=function(e,t,n){for(var i=-1,o=r(t),a=o.length;++i<a;){var s=o[i],c=e[s],u=n(c,t[s],s,e,t);(u===u?u===c:c!==c)&&(void 0!==c||s in e)||(e[s]=u)}return e}},function(e,t,n){var r=n(140),i=n(142),o=n(149);e.exports=function(e){return o((function(t,n){var o=-1,a=null==t?0:n.length,s=a>2?n[a-2]:void 0,c=a>2?n[2]:void 0,u=a>1?n[a-1]:void 0;for("function"==typeof s?(s=r(s,u,5),a-=2):a-=(s="function"==typeof u?u:void 0)?1:0,c&&i(n[0],n[1],c)&&(s=a<3?void 0:s,a=1);++o<a;){var l=n[o];l&&e(t,l,s)}return t}))}},function(e,t,n){var r=n(161),i=n(163)(r);e.exports=i},function(e,t,n){var r=n(132),i=n(162)(r);e.exports=i},function(e,t,n){var r=n(126),i=n(116),o=n(135);e.exports=function(e,t){return function(n,a){var s=n?r(n):0;if(!i(s))return e(n,a);for(var c=t?s:-1,u=o(n);(t?c--:++c<s)&&!1!==a(u[c],c,u););return n}}},function(e,t,n){var r=n(164),i=n(180),o=n(181),a=n(111);e.exports=function(e,t){return function(n,s,c){if(s=r(s,c,3),a(n)){var u=o(n,s,t);return u>-1?n[u]:void 0}return i(n,s,e)}}},function(e,t,n){var r=n(165),i=n(177),o=n(140),a=n(141),s=n(178);e.exports=function(e,t,n){var c=typeof e;return"function"==c?void 0===t?e:o(e,t,n):null==e?a:"object"==c?r(e):void 0===t?s(e):i(e,t)}},function(e,t,n){var r=n(166),i=n(174),o=n(135);e.exports=function(e){var t=i(e);if(1==t.length&&t[0][2]){var n=t[0][0],a=t[0][1];return function(e){return null!=e&&e[n]===a&&(void 0!==a||n in o(e))}}return function(e){return r(e,t)}}},function(e,t,n){var r=n(167),i=n(135);e.exports=function(e,t,n){var o=t.length,a=o,s=!n;if(null==e)return!a;for(e=i(e);o--;){var c=t[o];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var u=(c=t[o])[0],l=e[u],d=c[1];if(s&&c[2]){if(void 0===l&&!(u in e))return!1}else{var p=n?n(l,d,u):void 0;if(!(void 0===p?r(d,l,n,!0):p))return!1}}return!0}},function(e,t,n){var r=n(168),i=n(115),o=n(110);e.exports=function e(t,n,a,s,c,u){return t===n||(null==t||null==n||!i(t)&&!o(n)?t!==t&&n!==n:r(t,n,e,a,s,c,u))}},function(e,t,n){var r=n(169),i=n(171),o=n(172),a=n(111),s=n(173),c="[object Arguments]",u="[object Array]",l="[object Object]",d=Object.prototype,p=d.hasOwnProperty,f=d.toString;e.exports=function(e,t,n,d,h,m,g){var v=a(e),y=a(t),b=u,w=u;v||((b=f.call(e))==c?b=l:b!=l&&(v=s(e))),y||((w=f.call(t))==c?w=l:w!=l&&(y=s(t)));var S=b==l,C=w==l,_=b==w;if(_&&!v&&!S)return i(e,t,b);if(!h){var O=S&&p.call(e,"__wrapped__"),E=C&&p.call(t,"__wrapped__");if(O||E)return n(O?e.value():e,E?t.value():t,d,h,m,g)}if(!_)return!1;m||(m=[]),g||(g=[]);for(var I=m.length;I--;)if(m[I]==e)return g[I]==t;m.push(e),g.push(t);var A=(v?r:o)(e,t,n,d,h,m,g);return m.pop(),g.pop(),A}},function(e,t,n){var r=n(170);e.exports=function(e,t,n,i,o,a,s){var c=-1,u=e.length,l=t.length;if(u!=l&&!(o&&l>u))return!1;for(;++c<u;){var d=e[c],p=t[c],f=i?i(o?p:d,o?d:p,c):void 0;if(void 0!==f){if(f)continue;return!1}if(o){if(!r(t,(function(e){return d===e||n(d,e,i,o,a,s)})))return!1}else if(d!==p&&!n(d,p,i,o,a,s))return!1}return!0}},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){var n="[object Boolean]",r="[object Date]",i="[object Error]",o="[object Number]",a="[object RegExp]",s="[object String]";e.exports=function(e,t,c){switch(c){case n:case r:return+e==+t;case i:return e.name==t.name&&e.message==t.message;case o:return e!=+e?t!=+t:e==+t;case a:case s:return e==t+""}return!1}},function(e,t,n){var r=n(124),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s,c){var u=r(e),l=u.length;if(l!=r(t).length&&!a)return!1;for(var d=l;d--;){var p=u[d];if(!(a?p in t:i.call(t,p)))return!1}for(var f=a;++d<l;){var h=e[p=u[d]],m=t[p],g=o?o(a?m:h,a?h:m,p):void 0;if(!(void 0===g?n(h,m,o,a,s,c):g))return!1;f||(f="constructor"==p)}if(!f){var v=e.constructor,y=t.constructor;if(v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y))return!1}return!0}},function(e,t,n){var r=n(116),i=n(110),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var a=Object.prototype.toString;e.exports=function(e){return i(e)&&r(e.length)&&!!o[a.call(e)]}},function(e,t,n){var r=n(175),i=n(176);e.exports=function(e){for(var t=i(e),n=t.length;n--;)t[n][2]=r(t[n][1]);return t}},function(e,t,n){var r=n(115);e.exports=function(e){return e===e&&!r(e)}},function(e,t,n){var r=n(124),i=n(135);e.exports=function(e){e=i(e);for(var t=-1,n=r(e),o=n.length,a=Array(o);++t<o;){var s=n[t];a[t]=[s,e[s]]}return a}},function(e,t,n){var r=n(151),i=n(167),o=n(152),a=n(111),s=n(153),c=n(175),u=n(154),l=n(135),d=n(155);e.exports=function(e,t){var n=a(e),p=s(e)&&c(t),f=e+"";return e=d(e),function(a){if(null==a)return!1;var s=f;if(a=l(a),(n||!p)&&!(s in a)){if(null==(a=1==e.length?a:r(a,o(e,0,-1))))return!1;s=u(e),a=l(a)}return a[s]===t?void 0!==t||s in a:i(t,a[s],void 0,!0)}}},function(e,t,n){var r=n(127),i=n(179),o=n(153);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(151),i=n(155);e.exports=function(e){var t=e+"";return e=i(e),function(n){return r(n,e,t)}}},function(e,t){e.exports=function(e,t,n,r){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=r?n:e,!1})),i}},function(e,t){e.exports=function(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}},function(e,t,n){var r=n(183),i=n(164),o=n(184),a=n(111),s=n(142);e.exports=function(e,t,n){var c=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=i(t,n,3)),c(e,t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},function(e,t,n){var r=n(161);e.exports=function(e,t){var n=!0;return r(e,(function(e,r,i){return n=!!t(e,r,i)})),n}},function(e,t,n){var r=n(119),i=n(165);e.exports=function(e){return i(r(e,!0))}},function(e,t,n){var r;!function(i){"use strict";function o(e,t){var n=t||0,r=p;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function a(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new d(16):null,e=null);var i=(e=e||{}).random||(e.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var a=0;a<16;a++)t[r+a]=i[a];return t||o(i)}var s,c,u,l;i?function(){var e=i.crypto||i.msCrypto;if(!s&&e&&e.getRandomValues)try{var t=new Uint8Array(16);l=s=function(){return e.getRandomValues(t),t},s()}catch(n){}if(!s){var r=new Array(16);c=s=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}():function(){try{var e=n(187).randomBytes;u=s=e&&function(){return e(16)},s()}catch(t){}}();for(var d="function"==typeof Buffer?Buffer:Array,p=[],f={},h=0;h<256;h++)p[h]=(h+256).toString(16).substr(1),f[p[h]]=h;var m=s(),g=[1|m[0],m[1],m[2],m[3],m[4],m[5]],v=16383&(m[6]<<8|m[7]),y=0,b=0,w=a;w.v1=function(e,t,n){var r=t&&n||0,i=t||[],a=null!=(e=e||{}).clockseq?e.clockseq:v,s=null!=e.msecs?e.msecs:(new Date).getTime(),c=null!=e.nsecs?e.nsecs:b+1,u=s-y+(c-b)/1e4;if(u<0&&null==e.clockseq&&(a=a+1&16383),(u<0||s>y)&&null==e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=s,b=c,v=a;var l=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=255&l;var d=s/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=255&d,i[r++]=d>>>24&15|16,i[r++]=d>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var p=e.node||g,f=0;f<6;f++)i[r+f]=p[f];return t||o(i)},w.v4=a,w.parse=function(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){i<16&&(t[r+i++]=f[e])}));i<16;)t[r+i++]=0;return t},w.unparse=o,w.BufferClass=d,w._rng=s,w._mathRNG=c,w._nodeRNG=u,w._whatwgRNG=l,"undefined"!=typeof e&&e.exports?e.exports=w:void 0===(r=function(){return w}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof window?window:null)},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=r(n(189)),s=r(n(192)),c=r(n(221)),u=r(n(246)),l=function(){function e(){(0,i.default)(this,e),this._prodApnsConnector=new u.default(a.default.PRODUCTION_ENVIRONMENT),this._devApnsConnector=new u.default(a.default.DEVELOPMENT_ENVIRONMENT)}return(0,o.default)(e,[{key:"registerContainerForNotification",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.apnsToken)return this._registerToken(e,t.apnsToken,t.clientID).then((function(){return e}));var n=this._getConnectorForContainer(e);!0===t.refreshToken&&n.clearApnsInfo();var r=n.hasApnsToken?this._registerToken(e,n.apnsToken,t.clientID):this._createToken(e,t.clientID);return t.dontPoll?r:r.then((function(t){var r=t.httpResponse.body;return n.consumeApnsInfo(r),n.addNotificationListener(e),e}))}},{key:"unregisterContainerForNotification",value:function(e){return this._getConnectorForContainer(e).removeNotificationListener(e)}},{key:"isContainerRegisteredForNotifications",value:function(e){return this._getConnectorForContainer(e).hasNotificationListener(e)}},{key:"_getConnectorForContainer",value:function(e){if(e.apnsEnvironment===a.default.PRODUCTION_ENVIRONMENT)return this._prodApnsConnector;if(e.apnsEnvironment===a.default.DEVELOPMENT_ENVIRONMENT)return this._devApnsConnector;throw c.default.makeConfigurationError("No apnsEnvironment configured for container: "+e.containerIdentifier)}},{key:"_createToken",value:function(e,t){return e.sendRequest((new s.default).setApiModuleName("device").setApiEntityName("tokens").setApiActionName("create").setPayload({apnsEnvironment:e.apnsEnvironment,clientId:t}))}},{key:"_registerToken",value:function(e,t,n){return e.sendRequest((new s.default).setApiModuleName("device").setApiEntityName("tokens").setApiActionName("register").setPayload({apnsEnvironment:e.apnsEnvironment,apnsToken:t,clientId:n}))}}]),e}();t.default=l},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(190)),o=r(n(191));t.default={CLOUDKIT_LOADED:"cloudkitloaded",PRODUCTION_ENVIRONMENT:"production",DEVELOPMENT_ENVIRONMENT:"development",BUILD_VERSION:i.default,VERSION:o.default,WS_API_VERSION:1,URL_PREFIX:"https://api.apple-cloudkit.com"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="1954c05c4f41058728b542451db280c466a18f51"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="2.6.4"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(209)),u=r(n(213)),l=r(n(221)),d=r(n(222)),p=r(n(245)),f=r(n(189)),h=r(n(79)),m=r(n(224)),g=r(n(106)),v={parameters:{ckjsBuildVersion:f.default.BUILD_VERSION,ckjsVersion:f.default.VERSION},headers:{"content-type":"text/plain"}},y=function(e){function t(){(0,o.default)(this,t);var e=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,h.default.assign({},v)));return e._wsApiVersion=f.default.WS_API_VERSION,e._host=f.default.URL_PREFIX,e._containerIdentifier=null,e._containerEnvironment=null,e._databaseName=null,e._containerEnvironment=null,e._apiModuleName=null,e._responseClass=d.default,e}return(0,u.default)(t,e),(0,a.default)(t,[{key:"setPayload",value:function(e){return this.setMethod("POST"),this.setBody(e),this}},{key:"getPayload",value:function(){return this._body}},{key:"setContainerIdentifier",value:function(e){return this._containerIdentifier=e,this}},{key:"setContainerEnvironment",value:function(e){return this._containerEnvironment=e,this}},{key:"setDatabaseName",value:function(e){return this._databaseName=e,this}},{key:"setApiModuleName",value:function(e){return this._apiModuleName=e,this}},{key:"setApiEntityName",value:function(e){return this._apiEntityName=e,this}},{key:"setApiActionName",value:function(e){return this._apiAction=e,this}},{key:"setResponseClass",value:function(e){return this._responseClass=e,this}},{key:"setApiToken",value:function(e){return this.setParameter("ckAPIToken",e),this}},{key:"setCKSession",value:function(e){return this.setParameter("ckWebAuthToken",encodeURIComponent(e)),this}},{key:"setISODate",value:function(e){return this.setHeader("X-Apple-CloudKit-Request-ISO8601Date",e),this}},{key:"setSigningKeyID",value:function(e){return this.setHeader("X-Apple-CloudKit-Request-KeyID",e),this}},{key:"setSignatureV1",value:function(e){return this.setHeader("X-Apple-CloudKit-Request-SignatureV1",e),this}},{key:"setClientID",value:function(e){return h.default.isNullOrUndefined(e)||this.setParameter("clientId",e),this}},{key:"getPath",value:function(){return"/"+[this._apiModuleName,this._wsApiVersion,this._containerIdentifier,this._containerEnvironment,this._databaseName,this._apiEntityName,this._apiAction].filter((function(e){return!h.default.isNullOrUndefined(e)})).join("/")}},{key:"send",value:function(){var e=this;return(0,c.default)(t.prototype.__proto__||(0,i.default)(t.prototype),"send",this).call(this).catch((function(e){throw m.default.warn(e,e.stack),l.default.makeNetworkError(e)})).then((function(t){var n=t.status,r=t.headers;return t.text().then((function(e){try{return JSON.parse(e)}catch(t){return 503===n?g.default.Promise.reject(l.default.makeServiceUnavailableError()):g.default.Promise.reject(l.default.makeUnexpectedServerResponse("Could not parse json: "+e))}})).then((function(t){if(n<200||n>=300)throw l.default.fromServerError(t);return new(0,e._responseClass)(e,{status:n,body:t,headers:r})}))}))}}]),t}(p.default);t.default=y},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(194));t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(n(195)),o=r(n(198)),a="function"==typeof o.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default?"symbol":typeof e};t.default="function"==typeof o.default&&"symbol"===a(i.default)?function(e){return"undefined"==typeof e?"undefined":a(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default?"symbol":"undefined"==typeof e?"undefined":a(e)}},function(e,t,n){e.exports={default:n(196),__esModule:!0}},function(e,t,n){n(43),n(56),e.exports=n(197).f("iterator")},function(e,t,n){t.f=n(54)},function(e,t,n){e.exports={default:n(199),__esModule:!0}},function(e,t,n){n(200),n(42),n(207),n(208),e.exports=n(8).Symbol},function(e,t,n){"use strict";var r=n(7),i=n(24),o=n(16),a=n(6),s=n(47),c=n(201).KEY,u=n(17),l=n(34),d=n(53),p=n(35),f=n(54),h=n(197),m=n(202),g=n(203),v=n(204),y=n(205),b=n(13),w=n(25),S=n(19),C=n(20),_=n(50),O=n(98),E=n(206),I=n(12),A=n(22),T=E.f,P=I.f,R=O.f,k=r.Symbol,D=r.JSON,M=D&&D.stringify,N="prototype",x=f("_hidden"),L=f("toPrimitive"),j={}.propertyIsEnumerable,U=l("symbol-registry"),F=l("symbols"),z=l("op-symbols"),B=Object[N],K="function"==typeof k,H=r.QObject,W=!H||!H[N]||!H[N].findChild,q=o&&u((function(){return 7!=_(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=T(B,t);r&&delete B[t],P(e,t,n),r&&e!==B&&P(B,t,r)}:P,V=function(e){var t=F[e]=_(k[N]);return t._k=e,t},$=K&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},G=function(e,t,n){return e===B&&G(z,t,n),b(e),t=S(t,!0),b(n),i(F,t)?(n.enumerable?(i(e,x)&&e[x][t]&&(e[x][t]=!1),n=_(n,{enumerable:C(0,!1)})):(i(e,x)||P(e,x,C(1,{})),e[x][t]=!0),q(e,t,n)):P(e,t,n)},Z=function(e,t){b(e);for(var n,r=v(t=w(t)),i=0,o=r.length;o>i;)G(e,n=r[i++],t[n]);return e},Q=function(e){var t=j.call(this,e=S(e,!0));return!(this===B&&i(F,e)&&!i(z,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,x)&&this[x][e])||t)},Y=function(e,t){if(e=w(e),t=S(t,!0),e!==B||!i(F,t)||i(z,t)){var n=T(e,t);return!n||!i(F,t)||i(e,x)&&e[x][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=R(w(e)),r=[],o=0;n.length>o;)i(F,t=n[o++])||t==x||t==c||r.push(t);return r},X=function(e){for(var t,n=e===B,r=R(n?z:w(e)),o=[],a=0;r.length>a;)!i(F,t=r[a++])||n&&!i(B,t)||o.push(F[t]);return o};K||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(z,n),i(this,x)&&i(this[x],e)&&(this[x][e]=!1),q(this,e,C(1,n))};return o&&W&&q(B,e,{configurable:!0,set:t}),V(e)},s(k[N],"toString",(function(){return this._k})),E.f=Y,I.f=G,n(99).f=O.f=J,n(38).f=Q,n(37).f=X,o&&!n(46)&&s(B,"propertyIsEnumerable",Q,!0),h.f=function(e){return V(f(e))}),a(a.G+a.W+a.F*!K,{Symbol:k});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(ee=A(f.store),te=0;ee.length>te;)m(ee[te++]);a(a.S+a.F*!K,"Symbol",{for:function(e){return i(U,e+="")?U[e]:U[e]=k(e)},keyFor:function(e){if($(e))return g(U,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!K,"Object",{create:function(e,t){return void 0===t?_(e):Z(_(e),t)},defineProperty:G,defineProperties:Z,getOwnPropertyDescriptor:Y,getOwnPropertyNames:J,getOwnPropertySymbols:X}),D&&a(a.S+a.F*(!K||u((function(){var e=k();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!$(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,M.apply(D,r)}}}),k[N][L]||n(11)(k[N],L,k[N].valueOf),d(k,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(35)("meta"),i=n(14),o=n(24),a=n(12).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(17)((function(){return c(Object.preventExtensions({}))})),l=function(e){a(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(!o(e,r)){if(!c(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&c(e)&&!o(e,r)&&l(e),e}}},function(e,t,n){var r=n(7),i=n(8),o=n(46),a=n(197),s=n(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(22),i=n(25);e.exports=function(e,t){for(var n,o=i(e),a=r(o),s=a.length,c=0;s>c;)if(o[n=a[c++]]===t)return n}},function(e,t,n){var r=n(22),i=n(37),o=n(38);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),c=o.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(27);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(38),i=n(20),o=n(25),a=n(19),s=n(24),c=n(15),u=Object.getOwnPropertyDescriptor;t.f=n(16)?u:function(e,t){if(e=o(e),t=a(t,!0),c)try{return u(e,t)}catch(n){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){n(202)("asyncIterator")},function(e,t,n){n(202)("observable")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(n(100)),o=r(n(210));t.default=function e(t,n,r){null===t&&(t=Function.prototype);var a=(0,o.default)(t,n);if(void 0===a){var s=(0,i.default)(t);return null===s?void 0:e(s,n,r)}if("value"in a)return a.value;var c=a.get;return void 0!==c?c.call(r):void 0}},function(e,t,n){e.exports={default:n(211),__esModule:!0}},function(e,t,n){n(212);var r=n(8).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(25),i=n(206).f;n(92)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(n(214)),o=r(n(218)),a=r(n(194));t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,a.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},function(e,t,n){e.exports={default:n(215),__esModule:!0}},function(e,t,n){n(216),e.exports=n(8).Object.setPrototypeOf},function(e,t,n){var r=n(6);r(r.S,"Object",{setPrototypeOf:n(217).set})},function(e,t,n){var r=n(14),i=n(13),o=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(9)(Function.call,n(206).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(219),__esModule:!0}},function(e,t,n){n(220);var r=n(8).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(6);r(r.S,"Object",{create:n(50)})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(214)),o=r(n(218)),a=r(n(100)),s=r(n(74)),c=r(n(75)),u=r(n(193)),l=r(n(213)),d=r(n(79)),p="ACCESS_DENIED",f="ATOMIC_ERROR",h="AUTHENTICATION_FAILED",m="AUTHENTICATION_REQUIRED",g="BAD_REQUEST",v="CONFLICT",y="EXISTS",b="INTERNAL_ERROR",w="NOT_FOUND",S="QUOTA_EXCEEDED",C="THROTTLED",_="TRY_AGAIN_LATER",O="UNIQUE_FIELD_ERROR",E="VALIDATING_REFERENCE_ERROR",I="ZONE_NOT_FOUND",A="ZONE_BUSY",T=[p,f,h,m,g,v,y,b,w,S,C,_,O,E,I,A],P="UNKNOWN_ERROR",R="NETWORK_ERROR",k="SERVICE_UNAVAILABLE",D="INVALID_ARGUMENTS",M="UNEXPECTED_SERVER_RESPONSE",N="CONFIGURATION_ERROR",x="AUTH_PERSIST_ERROR",L="SIGN_IN_FAILED",j="SHARE_UI_TIMEOUT",U=[P,R,k,D,M,N,x,L],F={AUTH_PERSIST_ERROR:"Could not read or write ckSession",SIGN_IN_FAILED:"Error in sign in popup"},z=function(e){function t(e){var n=e.uuid,r=e.serverErrorCode,i=e.extensionErrorCode,o=e.reason,c=e.retryAfter,l=e.subscriptionID,p=e.recordName,f=e.zoneID,h=e.redirectURL,m=e.ckErrorCode;(0,s.default)(this,t);var g=(0,u.default)(this,(t.__proto__||(0,a.default)(t)).call(this));return Error.captureStackTrace&&Error.captureStackTrace(g,g.constructor),d.default.isNullOrUndefined(m)&&(m=t.isKnownServerErrorCode(r)?r:P),g._ckErrorCode=m,g._uuid=n,g._reason=d.default.isNullOrUndefined(o)?m:o,g._serverErrorCode=r,g._extensionErrorCode=i,g._retryAfter=c,g._recordName=p,g._subscriptionID=l,g._zoneID=f,g._redirectURL=h,g.message=g._reason,g}return(0,l.default)(t,e),(0,c.default)(t,[{key:"toString",value:function(){return d.default.instanceToString("CKError",this)}},{key:"toJSON",value:function(){return{uuid:this._uuid,serverErrorCode:this._serverErrorCode,extensionErrorCode:this._extensionErrorCode,reason:this._reason,retryAfter:this._retryAfter,subscriptionID:this._subscriptionID,recordName:this._recordName,zoneID:this._zoneID,redirectURL:this._redirectURL,ckErrorCode:this._ckErrorCode}}},{key:"ckErrorCode",get:function(){return this._ckErrorCode}},{key:"uuid",get:function(){return this._uuid}},{key:"reason",get:function(){return this._reason}},{key:"serverErrorCode",get:function(){return this._serverErrorCode}},{key:"extensionErrorCode",get:function(){return this._extensionErrorCode}},{key:"retryAfter",get:function(){return this._retryAfter}},{key:"subscriptionID",get:function(){return this._subscriptionID}},{key:"recordName",get:function(){return this._recordName}},{key:"zoneID",get:function(){return this._zoneID}},{key:"redirectURL",get:function(){return this._redirectURL}},{key:"isError",get:function(){return!0}},{key:"isCKError",get:function(){return!0}},{key:"isServerError",get:function(){return null!==this.serverErrorCode}},{key:"isServerExtensionError",get:function(){return null!==this.extensionErrorCode}}],[{key:"isErrorObject",value:function(e){var t=e.serverErrorCode,n=e.extensionErrorCode;return!d.default.isNullOrUndefined(t)||!d.default.isNullOrUndefined(n)}},{key:"isKnownServerErrorCode",value:function(e){return T.some((function(t){return t===e}))}},{key:"isKnownCKErrorCode",value:function(e){return U.some((function(t){return t===e}))}},{key:"fromServerError",value:function(e){return d.default.isNullOrUndefined(e.redirectUrl)||(e.redirectURL=e.redirectUrl),d.default.isNullOrUndefined(e.subscriptionId)||(e.subscriptionID=e.subscriptionId),new t(e)}},{key:"fromErrorCode",value:function(e,n){var r=F[e];return d.default.isNullOrUndefined(r)&&(r=e),d.default.isNullOrUndefined(n)||(r+=": "+n),new t({ckErrorCode:e,reason:r})}},{key:"makeNetworkError",value:function(){return t.fromErrorCode(R)}},{key:"makeInvalidArguments",value:function(e){return t.fromErrorCode(D,e)}},{key:"makeUnexpectedServerResponse",value:function(e){return t.fromErrorCode(M,e)}},{key:"makeConfigurationError",value:function(e){return t.fromErrorCode(N,e)}},{key:"makeServiceUnavailableError",value:function(){return t.fromErrorCode(k)}},{key:"makeAuthPersistError",value:function(){return t.fromErrorCode(x)}},{key:"makeSignInFailedError",value:function(e){return t.fromErrorCode(L,e.errorMessage)}},{key:"makeUnknownError",value:function(){return t.fromErrorCode(P)}},{key:"makeShareUITimeout",value:function(){return t.fromErrorCode(j)}},{key:"ACCESS_DENIED",get:function(){return p}},{key:"ATOMIC_ERROR",get:function(){return f}},{key:"AUTHENTICATION_FAILED",get:function(){return h}},{key:"AUTHENTICATION_REQUIRED",get:function(){return m}},{key:"BAD_REQUEST",get:function(){return g}},{key:"CONFLICT",get:function(){return v}},{key:"EXISTS",get:function(){return y}},{key:"INTERNAL_ERROR",get:function(){return b}},{key:"NOT_FOUND",get:function(){return w}},{key:"QUOTA_EXCEEDED",get:function(){return S}},{key:"THROTTLED",get:function(){return C}},{key:"TRY_AGAIN_LATER",get:function(){return _}},{key:"VALIDATING_REFERENCE_ERROR",get:function(){return E}},{key:"UNIQUE_FIELD_ERROR",get:function(){return O}},{key:"ZONE_NOT_FOUND",get:function(){return I}},{key:"UNKNOWN_ERROR",get:function(){return P}},{key:"NETWORK_ERROR",get:function(){return R}},{key:"SERVICE_UNAVAILABLE",get:function(){return k}},{key:"INVALID_ARGUMENTS",get:function(){return D}},{key:"UNEXPECTED_SERVER_RESPONSE",get:function(){return M}},{key:"CONFIGURATION_ERROR",get:function(){return N}},{key:"AUTH_PERSIST_ERROR",get:function(){return x}},{key:"SIGN_IN_FAILED",get:function(){return L}},{key:"SHARE_UI_TIMEOUT",get:function(){return j}},{key:"ZONE_BUSY",get:function(){return A}}]),t}(function(e){function t(){e.apply(this,arguments)}return t.prototype=(0,o.default)(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i.default?(0,i.default)(t,e):t.__proto__=e,t}(Error));t.default=z},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(193)),a=r(n(213)),s=r(n(74)),c=r(n(75)),u=r(n(79)),l=r(n(221)),d=r(n(223)),p=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if((0,s.default)(this,e),u.default.assertArg(t,"request cannot be null"),u.default.assertArg(n,"httpResponse cannot be null"),this._request=t,this._httpResponse=n,null!==r){var i=n.body[r];if(!u.default.isArray(i))throw l.default.makeUnexpectedServerResponse();var o=i.reduce((function(e,t){return l.default.isErrorObject(t)?e.errors.push(l.default.fromServerError(t)):e.results.push(t),e}),{results:[],errors:[]}),a=o.results,c=o.errors;this._errors=c,this._results=a}}return(0,c.default)(e,[{key:"getCKSession",value:function(){var e=null;try{e=d.default.readHeader(this.httpResponse.headers,"x-apple-cloudkit-web-auth-token")}catch(t){}return u.default.isNullOrUndefined(e)&&(e=d.default.readHeader(this.httpResponse.headers,"x-apple-cloudkit-session")),e}},{key:"request",get:function(){return this._request}},{key:"httpResponse",get:function(){return this._httpResponse}},{key:"errors",get:function(){return this._errors}},{key:"hasErrors",get:function(){var e=this.errors;return e&&e.length>0}},{key:"isResponse",get:function(){return!0}}],[{key:"createGenericResponseClass",value:function(t){return function(e){function n(e,r){return(0,s.default)(this,n),(0,o.default)(this,(n.__proto__||(0,i.default)(n)).call(this,e,r,t))}return(0,a.default)(n,e),(0,c.default)(n,[{key:t,get:function(){return this._results}}]),n}(e)}}]),e}();t.default=p},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(3)),o=r(n(74)),a=r(n(75)),s=r(n(79)),c=r(n(224)),u=r(n(225)),l=r(n(106)),d=r(n(226)),p=function(){function e(){(0,o.default)(this,e),s.default.isNode()||this.setDelegate(d.default)}return(0,a.default)(e,[{key:"setDelegate",value:function(e){if(s.default.isNullOrUndefined(e)){if(s.default.isNode())throw new Error("No fetch delegate.");this._delegate=d.default}else this._delegate=e}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u.default.newNetworkStat(e,t);return t=(0,i.default)({Promise:l.default.Promise},t),this.fetchWithoutReporting(e,t).catch((function(e){throw n.networkError(e),e})).then((function(e){return e.status>=500&&e.status<600&&n.error5XX(e),e}))}},{key:"fetchJSON",value:function(e,t){return this.fetch(e,t).then((function(e){return e.json()}))}},{key:"fetchWithoutReporting",value:function(e,t){return this._delegate.apply(null,[e,t,d.default])}},{key:"readHeader",value:function(e,t){try{if(s.default.isNullOrUndefined(e))return null;if(s.default.isFunction(e.get))return e.get(t);if(!s.default.isNullOrUndefined(e[t]))return e[t]}catch(n){c.default.warn("Error reading header: "+t+" "+n+"}")}return null}}]),e}(),f=new p;t.default=f},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(80)),o=r(n(79)),a="CloudKitJS",s=null,c=function(){return o.default.isNullOrUndefined(s)?"undefined"!=typeof CloudKit&&CloudKit.logToConsole?console:void 0:s},u={setDelegate:function(e){s=e},info:function(){var e=c();if(!o.default.isNullOrUndefined(e)&&o.default.isFunction(e.info)){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.info.apply(e,(0,i.default)([a].concat(n)))}},warn:function(){var e=c();if(!o.default.isNullOrUndefined(e)&&o.default.isFunction(e.warn)){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.warn.apply(e,(0,i.default)([a].concat(n)))}},error:function(){var e=c();if(!o.default.isNullOrUndefined(e)&&o.default.isFunction(e.error)){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.error.apply(e,(0,i.default)([a].concat(n)))}}};t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=g.exec(e);return{host:t[10],pathName:t[13]}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(93)),a=r(n(2)),s=r(n(100)),c=r(n(193)),u=r(n(209)),l=r(n(213)),d=r(n(74)),p=r(n(75)),f=r(n(189)),h=r(n(223)),m=r(n(221)),g=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,v=function(){try{return i(window.location.href)}catch(e){return{}}}(),y=function(){function e(t,n,r){(0,d.default)(this,e),this._reporting=t,this._start=(new Date).getTime(),this._statName=n,this._message=r,this._hostname=v.host,this._urlPath=v.pathName}return(0,p.default)(e,[{key:"report",value:function(){this._reporting.reportStat(this)}},{key:"toJSON",value:function(){return{appName:"CKJS",ckjsBuildVersion:f.default.BUILD_VERSION,statName:this._statName,message:this._message,clientTiming:(new Date).getTime()-this._start,hostname:this._hostname,urlPath:this._urlPath}}}]),e}(),b=function(e){function t(e,n,r){(0,d.default)(this,t);var o=(0,c.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e)),a=i(n),u=a.host,l=a.pathName;return o._hostname=u,o._urlPath=l,o._httpMethod=r.method,o}return(0,l.default)(t,e),(0,p.default)(t,[{key:"networkError",value:function(){this._statName="CKJSNetworkError",this.report()}},{key:"error5XX",value:function(e){this._statName="CKJSStatus5XX",this._statusCode=e.status,this._requestUUID=h.default.readHeader(e.headers,"X-Apple-Request-UUID"),this.report()}},{key:"toJSON",value:function(){return(0,a.default)({},(0,u.default)(t.prototype.__proto__||(0,s.default)(t.prototype),"toJSON",this).call(this),{httpMethod:this._httpMethod,requestUUID:this._requestUUID,statusCode:this._statusCode})}}]),t}(y),w=function(e){function t(e){return(0,d.default)(this,t),(0,c.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e))}return(0,l.default)(t,e),(0,p.default)(t,[{key:"didRun",value:function(){this._statName="CKJSSharingFlowDidRun",this.report()}},{key:"didError",value:function(e){m.default.SHARE_UI_TIMEOUT===e.ckErrorCode?this._statName="CKJSSharingFlowTimeout":this._statName="CKJSSharingFlowError",this.report()}}]),t}(y),S=function(){function e(){(0,d.default)(this,e),this._stats=[],this._flushLater()}return(0,p.default)(e,[{key:"reportStat",value:function(e){this._stats.push(e.toJSON())}},{key:"_flushLater",value:function(){var e=this;setTimeout((function(){return e._flush()}),15e3)}},{key:"_flush",value:function(){var e=this;if(this._stats.length>0){var t=this._stats;h.default.fetchWithoutReporting(function(){try{var e=i(window.location.href).host;if(e.endsWith("icloud.com"))return"https://feedbackws.icloud.com/reportStats";if(e.endsWith("icloud.com.cn"))return"https://feedbackws.icloud.com.cn/reportStats"}catch(n){}return"https://feedbackws.apple-cloudkit.com/reportStats"}(),{method:"POST",body:(0,o.default)({stats:t}),credentials:"omit",headers:{"content-type":"text/plain"}}).catch((function(){e._stats=t.concat(e._stats)})),this._stats=[]}this._flushLater()}},{key:"newNetworkStat",value:function(e,t){return new b(this,e,t)}},{key:"newSharingFlowStat",value:function(){return new w(this)}},{key:"reportDeprecatedOptionUsed",value:function(e){new y(this,"CKJSDeprecatedOptions",e).report()}},{key:"reportDeprecatedConfigurationUsed",value:function(e){new y(this,"CKJSDeprecatedConfig",e).report()}},{key:"reportDeprecatedMethodUsed",value:function(e,t){new y(this,"CKJSDeprecatedMethod",e+"->"+t).report()}},{key:"reportUnexpectedAuthError",value:function(){new y(this,"CKJSUnexpectedAuthError").report()}}]),e}(),C=new S;t.default=C},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(100)),o=r(n(193)),a=r(n(213)),s=r(n(40)),c=r(n(227)),u=r(n(230)),l=r(n(95)),d=r(n(241)),p=r(n(74)),f=r(n(75));t.default=function(e,t){return new v(e,t).fetch()};var h=function(){function e(t){var n=this;(0,p.default)(this,e),this._headers=new d.default,t instanceof e?t.forEach((function(e,t){return t.forEach((function(t){return n.append(e,t)}))})):t&&(0,l.default)(t).forEach((function(e){return n.append(e,t[e])}))}return(0,f.default)(e,[{key:"append",value:function(e,t){e=e.toLowerCase(),this.has(e)?this.getAll(e).add(t):this.set(e,t)}},{key:"delete",value:function(e){e=e.toLowerCase(),this._headers.delete(e)}},{key:"get",value:function(e){e=e.toLowerCase();var t=this.getAll(e);return 0===t.size?null:t.values().next().value}},{key:"getAll",value:function(e){return e=e.toLowerCase(),this.has(e)?this._headers.get(e):new u.default}},{key:"has",value:function(e){return e=e.toLowerCase(),this._headers.has(e)}},{key:"set",value:function(e,t){e=e.toLowerCase(),this._headers.set(e,(new u.default).add(t))}},{key:"forEach",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=(0,c.default)(this._headers.keys());!(t=(i=o.next()).done);t=!0){var a=i.value;e(a,this._headers.get(a))}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}}],[{key:"fromXHR",value:function(t){var n=new e;return t.getAllResponseHeaders().trim().split("\n").forEach((function(e){var t=e.trim().split(":"),r=t.shift().trim();t.join(":").trim().split(";").forEach((function(e){n.append(r,e.trim())}))})),n}}]),e}(),m=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,p.default)(this,e),this._payload=t,this.bodyUsed=!1,this._Promise=n.Promise||s.default}return(0,f.default)(e,[{key:"text",value:function(){return this.bodyUsed?this._Promise.reject(new TypeError("Body already used")):(this.bodyUsed=!0,this._Promise.resolve(this._payload))}},{key:"json",value:function(){return this.text().then(JSON.parse)}},{key:"blob",value:function(){return this._Promise.resolve(new Blob([this._payload]))}}]),e}(),g=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,p.default)(this,t);var r=(0,o.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));return r.type="default",r.url=null,r.status=n.status,r.statusText=n.statusText,r.headers=n.headers,r.url=n.url||"",r}return(0,a.default)(t,e),t}(m),v=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,p.default)(this,t);var r=(0,o.default)(this,(t.__proto__||(0,i.default)(t)).call(this,n.body,n));return r.url=e,r.credentials=n.credentials||"omit",r.headers=new h(n.headers),r.method=n.method?n.method.toUpperCase():"GET",r.mode=n.mode||null,r.options=n,r}return(0,a.default)(t,e),(0,f.default)(t,[{key:"fetch",value:function(){var e=this;return new this._Promise((function(t,n){var r=new XMLHttpRequest;"include"===e.credentials&&(r.withCredentials=!0);var i=function i(){r.removeEventListener("load",i),r.removeEventListener("error",o);var a=r.status;if(a<100||a>599)n(new TypeError("Network failure"));else{var s={status:a,statusText:r.statusText,headers:h.fromXHR(r),url:r.responseURL,Promise:e._Promise};t(new g(r.responseText,s))}},o=function e(){r.removeEventListener("load",i),r.removeEventListener("error",e),n(new TypeError("Network failure"))};r.addEventListener("load",i),r.addEventListener("error",o),e.options&&e.options.exposeImplementation&&e.options.exposeImplementation(r),r.open(e.method,e.url,!0),e.headers.forEach((function(e,t){t.forEach((function(t){r.setRequestHeader(e,t)}))})),r.send("undefined"==typeof e._payload?null:e._payload)}))}}]),t}(m)},function(e,t,n){e.exports={default:n(228),__esModule:!0}},function(e,t,n){n(56),n(43),e.exports=n(229)},function(e,t,n){var r=n(13),i=n(66);e.exports=n(8).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){e.exports={default:n(231),__esModule:!0}},function(e,t,n){n(42),n(43),n(56),n(232),n(238),e.exports=n(8).Set},function(e,t,n){"use strict";var r=n(233);e.exports=n(234)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r=n(12).f,i=n(50),o=n(71),a=n(9),s=n(62),c=n(28),u=n(63),l=n(45),d=n(59),p=n(72),f=n(16),h=n(201).fastKey,m=f?"_s":"size",g=function(e,t){var n,r=h(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,l){var d=e((function(e,r){s(e,d,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&u(r,n,e[l],e)}));return o(d.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,n=g(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){s(this,d,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!g(this,e)}}),f&&r(d.prototype,"size",{get:function(){return c(this[m])}}),d},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){l(e,t,(function(e,t){this._t=e,this._k=t,this._l=void 0}),(function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?d(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,d(1))}),n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){"use strict";var r=n(7),i=n(6),o=n(201),a=n(17),s=n(11),c=n(71),u=n(63),l=n(62),d=n(14),p=n(53),f=n(12).f,h=n(235)(0),m=n(16);e.exports=function(e,t,n,g,v,y){var b=r[e],w=b,S=v?"set":"add",C=w&&w.prototype,_={};return m&&"function"==typeof w&&(y||C.forEach&&!a((function(){(new w).entries().next()})))?(w=t((function(t,n){l(t,w,e,"_c"),t._c=new b,void 0!=n&&u(n,v,t[S],t)})),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(e){var t="add"==e||"set"==e;e in C&&(!y||"clear"!=e)&&s(w.prototype,e,(function(n,r){if(l(this,w,e),!t&&y&&!d(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i}))})),"size"in C&&f(w.prototype,"size",{get:function(){return this._c.size}})):(w=g.getConstructor(t,e,v,S),c(w.prototype,n),o.NEED=!0),p(w,e),_[e]=w,i(i.G+i.W+i.F,_),y||g.setStrong(w,e,v),w}},function(e,t,n){var r=n(9),i=n(26),o=n(39),a=n(30),s=n(236);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,l=4==e,d=6==e,p=5==e||d,f=t||s;return function(t,s,h){for(var m,g,v=o(t),y=i(v),b=r(s,h,3),w=a(y.length),S=0,C=n?f(t,w):c?f(t,0):void 0;w>S;S++)if((p||S in y)&&(g=b(m=y[S],S,v),e))if(n)C[S]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:C.push(m)}else if(l)return!1;return d?-1:u||l?l:C}}},function(e,t,n){var r=n(237);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(14),i=n(205),o=n(54)("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[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(6);r(r.P+r.R,"Set",{toJSON:n(239)("Set")})},function(e,t,n){var r=n(61),i=n(240);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(63);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){e.exports={default:n(242),__esModule:!0}},function(e,t,n){n(42),n(43),n(56),n(243),n(244),e.exports=n(8).Map},function(e,t,n){"use strict";var r=n(233);e.exports=n(234)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(6);r(r.P+r.R,"Map",{toJSON:n(239)("Map")})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(89)),o=r(n(93)),a=r(n(74)),s=r(n(75)),c=r(n(223)),u=r(n(79)),l=function(){function e(t){var n=t.host,r=void 0===n?null:n,i=t.parameters,o=void 0===i?{}:i,s=t.headers,c=void 0===s?{}:s,l=t.body,d=void 0===l?null:l;(0,a.default)(this,e),this._host=r,this._path="",this._params=u.default.assign({},o),this._headers=u.default.assign({},c),this._body=u.default.isNullOrUndefined(d)?void 0:d,this._method=u.default.isNullOrUndefined(d)?"GET":"POST"}return(0,s.default)(e,[{key:"setMethod",value:function(e){return this._method=e,this}},{key:"setHost",value:function(e){return this._host=e,this}},{key:"setPath",value:function(e){return this._path=e,this}},{key:"setBody",value:function(e){return this._body=e,this}},{key:"getBody",value:function(){return this._body}},{key:"getBodyStringified",value:function(){return u.default.isString(this._body)||u.default.isNullOrUndefined(this._body)?this._body:(0,o.default)(this._body)}},{key:"setHeader",value:function(e,t){return this._headers[e]=t,this}},{key:"addHeaders",value:function(e){return this._headers=u.default.assign(this._headers,e),this}},{key:"setParameter",value:function(e,t){var n={};return n[e]=t,this.addParams(n),this}},{key:"addParams",value:function(e){return this._params=u.default.assign(this._params,e),this}},{key:"getParameterString",value:function(){var e=this._params;return u.default.isNullOrUndefined(e)?"":(0,i.default)(e).reduce((function(t,n){return t+n+"="+e[n]+"&"}),"?").slice(0,-1)}},{key:"getPath",value:function(){return this._path}},{key:"getPathWithParams",value:function(){return this.getPath()+this.getParameterString()}},{key:"getFullURL",value:function(){return this._host?this._host+this.getPathWithParams():this.getPathWithParams()}},{key:"send",value:function(){var e=this.getFullURL(),t={method:this._method,headers:this._headers,body:this.getBodyStringified(),credentials:"same-origin"};return c.default.fetch(e,t)}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(230)),o=r(n(74)),a=r(n(75)),s=r(n(79)),c=r(n(223)),u=r(n(224)),l=function(){function e(t){(0,o.default)(this,e),this._apnsEnvironment=t,this._apnsToken=null,this._notificationListeners=new i.default,this._isPolling=!1,this._urlPath=null,this._failureBackoff=10}return(0,a.default)(e,[{key:"consumeApnsInfo",value:function(e){var t=e.apnsToken,n=e.webcourierURL;this._apnsToken=t,this._urlPath=n}},{key:"clearApnsInfo",value:function(){this._apnsToken=null,this._urlPath=null}},{key:"_canParkConnection",value:function(){return!this._isPolling&&this.hasApnsToken&&this._notificationListeners.size>0}},{key:"_parkConnection",value:function(){var e=this;this._canParkConnection()&&(this._isPolling=!0,c.default.fetchJSON(this._urlPath).then((function(t){e._isPolling=!1;try{e._handleNotification(t)}catch(n){throw u.default.warn("Error",n),n}e._failureBackoff=10,setTimeout((function(){return e._parkConnection()}),10)})).catch((function(t){e._isPolling=!1,u.default.warn("Error",t),setTimeout((function(){return e._parkConnection()}),e._failureBackoff),e._failureBackoff=Math.min(1e3,10*e._failureBackoff)})))}},{key:"_handleNotification",value:function(e){e&&this._notificationListeners.forEach((function(t){s.default.isFunction(t)?t(e):s.default.isFunction(t.handleNotification)&&t.handleNotification(e)}))}},{key:"addNotificationListener",value:function(e){if(!s.default.isFunction(e)&&!s.default.isFunction(e.handleNotification))throw new Error('notification listener must be either a function or an object with a function called "handleNotification"');return this._notificationListeners.add(e),this._parkConnection(),e}},{key:"removeNotificationListener",value:function(e){return this._notificationListeners.delete(e),e}},{key:"hasNotificationListener",value:function(e){return this._notificationListeners.has(e)}},{key:"apnsToken",get:function(){return this._apnsToken}},{key:"hasApnsToken",get:function(){return!s.default.isNullOrUndefined(this._urlPath)&&!s.default.isNullOrUndefined(this._apnsToken)}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(230)),o=r(n(74)),a=r(n(75)),s=r(n(248)),c=r(n(79)),u=r(n(192)),l=r(n(276)),d=r(n(277)),p=r(n(278)),f=r(n(282)),h=r(n(189)),m=r(n(251)),g=r(n(224)),v=r(n(106)),y=function(){function e(t){var n=t.containerConfig,r=t.apnsManager,a=t.authTokenStore;(0,o.default)(this,e),this._config=n,this._apnsManager=r,this._containerIdentifier=n.containerIdentifier,this._environment=n.environment||h.default.DEVELOPMENT_ENVIRONMENT,this._apnsEnvironment=n.apnsEnvironment||h.default.DEVELOPMENT_ENVIRONMENT,this._publicDatabase=new s.default(this,m.default.PUBLIC,n.publicDatabasePartition),this._privateDatabase=new s.default(this,m.default.PRIVATE,n.privateDatabasePartition),this._sharedDatabase=new s.default(this,m.default.SHARED,void 0!==n.sharedDatabasePartition?n.sharedDatabasePartition:n.privateDatabasePartition),this._notificationListeners=new i.default,this._auth=f.default.createAuth({container:this,containerConfig:n,authTokenStore:a})}return(0,a.default)(e,[{key:"getDatabaseWithDatabaseScope",value:function(e){return e===m.default.PUBLIC?this.publicCloudDatabase:e===m.default.PRIVATE?this.privateCloudDatabase:e===m.default.SHARED?this.sharedCloudDatabase:void 0}},{key:"setUpAuth",value:function(){return this._auth.setup()}},{key:"whenUserSignsIn",value:function(){return this._auth.whenUserSignsIn()}},{key:"whenUserSignsOut",value:function(){return this._auth.whenUserSignsOut()}},{key:"signOut",value:function(){this._auth.signOut()}},{key:"fetchCurrentUserIdentity",value:function(){var e=(new u.default).setApiEntityName("users").setApiActionName("caller");return this.publicCloudDatabase.sendRequest(e).then((function(e){return e.httpResponse.body}))}},{key:"discoverUserIdentities",value:function(e){c.default.assertArg(e,"at least one UserLookupInfo required");var t=c.default.asArray(e),n=(new u.default).setApiEntityName("users").setApiActionName("discover").setPayload({lookupInfos:t}).setResponseClass(l.default);return this.publicCloudDatabase.sendRequest(n)}},{key:"discoverUserIdentityWithEmailAddress",value:function(e){return this.discoverUserIdentities([{emailAddress:e}])}},{key:"discoverUserIdentityWithPhoneNumber",value:function(e){return this.discoverUserIdentities([{phoneNumber:e}])}},{key:"discoverUserIdentityWithUserRecordName",value:function(e){return this.discoverUserIdentities([{userRecordName:e}])}},{key:"discoverAllUserIdentities",value:function(){var e=(new u.default).setApiEntityName("users").setApiActionName("discover").setResponseClass(l.default);return this.publicCloudDatabase.sendRequest(e)}},{key:"addNotificationListener",value:function(e){return this._notificationListeners.add(e),this}},{key:"removeNotificationListener",value:function(e){return this._notificationListeners.delete(e),this}},{key:"handleNotification",value:function(e){g.default.info("Notification",e,"handled by",this),e=p.default.parseRawNotification(e)||e,this._notificationListeners.forEach((function(t){c.default.tryInvokeFunction(t,[e],"Error while invoking "+t+" with "+e)}))}},{key:"registerForNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.clientID=e.clientId||e.clientID||this.getConfig().clientID,this._apnsManager.registerContainerForNotification(this,e)}},{key:"unregisterForNotifications",value:function(){return this._apnsManager.unregisterContainerForNotification(this)}},{key:"fetchRecordInfos",value:function(e){e=c.default.asArray(e).map((function(e){return c.default.isString(e)?{value:e}:e}));var t=(new u.default).setApiEntityName("records").setApiActionName("resolve").setPayload({shortGUIDs:e}).setResponseClass(d.default);return this._publicDatabase.sendRequest(t)}},{key:"acceptShares",value:function(e){e=c.default.asArray(e).map((function(e){return c.default.isString(e)?{value:e}:e}));var t=(new u.default).setApiEntityName("records").setApiActionName("accept").setPayload({shortGUIDs:e}).setResponseClass(d.default);return this._publicDatabase.sendRequest(t)}},{key:"getConfig",value:function(){return c.default.assign({},this._config,this._auth.getConfig())}},{key:"sendRequest",value:function(e){e.setContainerIdentifier(this.containerIdentifier),e.setContainerEnvironment(this.environment),e.setClientID(this._config.clientID);var t=this._auth.requestHandler(),n=this._auth.responseHandler();return v.default.Promise.resolve(e).then(t).then((function(e){return e.send()})).then(n)}},{key:"toString",value:function(){return c.default.instanceToString("Container",this)}},{key:"containerIdentifier",get:function(){return this._containerIdentifier}},{key:"publicCloudDatabase",get:function(){return this._publicDatabase}},{key:"privateCloudDatabase",get:function(){return this._privateDatabase}},{key:"sharedCloudDatabase",get:function(){return this._sharedDatabase}},{key:"apnsEnvironment",get:function(){return this._apnsEnvironment}},{key:"environment",get:function(){return this._environment}},{key:"isRegisteredForNotifications",get:function(){return this._apnsManager.isContainerRegisteredForNotifications(this)}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(74)),a=r(n(75)),s=r(n(249)),c=r(n(224)),u=(r(n(225)),n(79)),l=r(u),d=r(n(250)),p=r(n(251)),f=r(n(252)),h=r(n(254)),m=r(n(257)),g=r(n(253)),v=r(n(258)),y=r(n(259)),b=r(n(260)),w=r(n(261)),S=r(n(262)),C=r(n(263)),_=(r(n(264)),n(265)),O=r(_),E=r(n(266)),I=r(n(192)),A=r(n(221)),T=r(n(255)),P=r(n(267)),R=r(n(273)),k=r(n(274)),D=r(n(275)),M=T.default.forKeys("zoneID","numbersAsStrings","desiredKeys","zoneWide","resultsLimit","continuationMarker"),N=T.default.forKeys("zoneID","desiredKeys","numbersAsStrings","assetPrivacyMaskType"),x=T.default.forKeys("zoneID","numbersAsStrings","desiredKeys","desiredRecordTypes","resultsLimit","syncToken","reverse"),L=T.default.forKeys("zoneID","desiredKeys","pluginFields","includeRecords","excludeRecords","shareName","archiveName"),j=T.default.forKeys("sourceZoneID","targetZoneID","sourceShareName","targetRootName","includeRecords","excludeRecords"),U=T.default.forKeys("jobID"),F=function(e){return{syncToken:e.syncToken}},z=(i={},(0,s.default)(i,p.default.PUBLIC,"public"),(0,s.default)(i,p.default.PRIVATE,"private"),(0,s.default)(i,p.default.SHARED,"shared"),i),B=function(){function e(t,n,r){(0,o.default)(this,e),this._container=t,this._partition=r,this._databaseScope=n}return(0,a.default)(e,[{key:"performQuery",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c.default.info("CloudKit Database#performQuery",e,t),e.isQueryResponse){var n=e;return this.performQuery(n.query,l.default.assign(M(n),t))}var r=l.default.assign({query:e},M(t)),i=(new I.default).setApiEntityName("records").setApiActionName("query").setResponseClass(f.default).setPayload(r);return this.sendRequest(i)}},{key:"fetchRecords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c.default.info("CloudKit Database#fetchRecords",e,t);var n=d.default.normalizeRecords(e).map(l.default.picker("recordName")),r=l.default.assign({records:n},N(t)),i=(new I.default).setApiEntityName("records").setApiActionName("lookup").setResponseClass(g.default).setPayload(r);return this.sendRequest(i)}},{key:"saveRecords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.default.info("CloudKit Database#saveRecords",e,t),this.newRecordsBatch(t).createOrUpdate(e).commit()}},{key:"deleteRecords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.default.info("CloudKit Database#deleteRecords",e,t),this.newRecordsBatch(t).forceDelete(e).commit()}},{key:"newRecordsBatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new h.default(this,e)}},{key:"commitRecordsBatchBuilder",value:function(e){var t=this;return m.default.handleAssetsInBatchBeforeCommit(e).then((function(){var n=(new I.default).setApiEntityName("records").setApiActionName("modify").setResponseClass(g.default).setPayload(e.build());return t.sendRequest(n)}))}},{key:"assetRereference",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;c.default.info("Database#assetRereference");var r={assets:C.default.normalizeAssetRereferenceArray(e),zoneID:d.default.normalizeZone(t).zoneID};n&&(r.targetZoneID=d.default.normalizeZone(n).zoneID);var i=(new I.default).setApiEntityName("assets").setApiActionName("rereference").setResponseClass(S.default).setPayload(r);return this.sendRequest(i)}},{key:"fetchAllRecordZones",value:function(){c.default.info("Database#fetchAllRecordZones");var e=(new I.default).setApiEntityName("zones").setApiActionName("list").setResponseClass(y.default);return this.sendRequest(e)}},{key:"fetchRecordZones",value:function(e){c.default.info("Database#fetchRecordZones",e);var t=d.default.normalizeZones(e).map((function(e){return e.zoneID})),n=(new I.default).setApiEntityName("zones").setApiActionName("lookup").setPayload({zones:t}).setResponseClass(y.default);return this.sendRequest(n)}},{key:"saveRecordZones",value:function(e){return c.default.info("Database#saveRecordZones",e),this.newRecordZonesBatch().create(e).commit()}},{key:"deleteRecordZones",value:function(e){return c.default.info("Database#deleteRecordZones",e),this.newRecordZonesBatch().delete(e).commit()}},{key:"newRecordZonesBatch",value:function(){return new v.default(this)}},{key:"commitRecordZoneBatchBuilder",value:function(e){var t=(new I.default).setApiEntityName("zones").setApiActionName("modify").setPayload(e.build()).setResponseClass(y.default);return this.sendRequest(t)}},{key:"fetchAllSubscriptions",value:function(){c.default.info("Database#fetchAllSubscriptions");var e=(new I.default).setApiEntityName("subscriptions").setApiActionName("list").setResponseClass(E.default);return this.sendRequest(e)}},{key:"fetchSubscriptions",value:function(e){c.default.info("Database#fetchSubscriptions",e),e=l.default.asArray(e).map((function(e){return l.default.isString(e)?{subscriptionID:e}:e}));var t=(new I.default).setApiEntityName("subscriptions").setApiActionName("lookup").setPayload({subscriptions:e}).setResponseClass(E.default);return this.sendRequest(t)}},{key:"deleteSubscriptions",value:function(e){return c.default.info("Database#deleteSubscriptions",e),this.newSubscriptionsBatch().delete(e).commit()}},{key:"saveSubscriptions",value:function(e){return c.default.info("Database#saveSubscriptions",e),this.newSubscriptionsBatch().create(e).commit()}},{key:"newSubscriptionsBatch",value:function(){return new O.default(this)}},{key:"commitSubscriptionsBatchBuilder",value:function(e){var t=(new I.default).setApiEntityName("subscriptions").setApiActionName("modify").setPayload(e.build()).setResponseClass(E.default);return this.sendRequest(t)}},{key:"sendRequest",value:function(e){return l.default.isNullOrUndefined(this._partition)||e.setHost(this._partition),e.setDatabaseName(z[this.databaseScope]),e.setApiModuleName("database"),this._container.sendRequest(e)}},{key:"toString",value:function(){return"[Database (containerIdentifier: "+this.containerIdentifier+", scope: "+this.databaseScope+")]"}},{key:"shareWithUI",value:function(e){var t=this.databaseScope,n=this._container.getConfig();return P.default.run(l.default.assign({},e,{databaseScope:t,containerConfiguration:n}))}},{key:"fetchDatabaseChanges",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=t.isDatabaseChangesResponse?l.default.assign({},F(t),n):F(t);var r=(new I.default).setApiEntityName("changes").setApiActionName("database").setPayload(e).setResponseClass(b.default);return this.sendRequest(r)}},{key:"fetchRecordZoneChanges",value:function(e){var t=l.default.asArray(e).map(x),n=(new I.default).setApiEntityName("changes").setApiActionName("zone").setPayload({zones:t}).setResponseClass(w.default);return this.sendRequest(n)}},{key:"prepareZipDownload",value:function(e){c.default.info("CloudKit Database#prepareZipDownload",e);var t=l.default.assign({},L(e)),n=(new I.default).setApiEntityName("records").setApiActionName("zip/prepare").setResponseClass(R.default).setPayload(t);return this.sendRequest(n)}},{key:"startAssetCopierJob",value:function(e){c.default.info("CloudKit Database#startAssetCopierJob",e);var t=(new I.default).setApiEntityName("records").setApiActionName("copy/start").setResponseClass(k.default).setPayload(j(e));if(e.includeRecords&&e.excludeRecords||!e.includeRecords&&!e.excludeRecords)throw A.default.makeInvalidArguments("Request to StartAssetCopierJob can not simultaneously include or exlude both fields for `includeRecords` and `excludeRecords`");return this.sendRequest(t)}},{key:"checkAssetCopierJobStatus",value:function(e){c.default.info("CloudKit Database#checkAssetCopierJobStatus",e);var t=(new I.default).setApiEntityName("records").setApiActionName("copy/status").setResponseClass(D.default).setPayload(U(e));return this.sendRequest(t)}},{key:"containerIdentifier",get:function(){return this._container.containerIdentifier}},{key:"databaseScope",get:function(){return this._databaseScope}}]),e}();t.default=B},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76));t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(a.default.isNullOrUndefined(e))throw s.default.makeInvalidArguments("not a valid record/recordName: "+a.default.stringifyExposingUndefined(e));return a.default.isString(e)?{recordName:e}:e}function o(e){if(a.default.isNullOrUndefined(e))throw s.default.makeInvalidArguments("not a valid zone/zoneID: "+a.default.stringifyExposingUndefined(e));if(a.default.isString(e))return{zoneID:{zoneName:e}};if(a.default.isString(e.zoneName))return{zoneID:e};if("zoneID"in e&&!a.default.isNullOrUndefined(e.zoneID)&&"zoneName"in e.zoneID)return e;throw s.default.makeInvalidArguments("not a valid zone/zoneID: "+a.default.stringifyExposingUndefined(e))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(79)),s=r(n(221));t.default={normalizeRecords:function(e){return a.default.asArray(e).map(i)},normalizeZones:function(e){return a.default.asArray(e).map(o)},normalizeZone:o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE",SHARED:"SHARED"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(253)),l=r(n(79)),d=function(e){function t(e,n){(0,o.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));return r._continuationMarker=n.body.continuationMarker,r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("QueryResponse",this)}},{key:"continuationMarker",get:function(){return this._continuationMarker}},{key:"moreComing",get:function(){return!l.default.isNullOrUndefined(this.continuationMarker)}},{key:"query",get:function(){return this.request.getPayload().query}},{key:"zoneID",get:function(){return this.request.getPayload().zoneID}},{key:"zoneWide",get:function(){return Boolean(this.request.getPayload().zoneWide)}},{key:"resultsLimit",get:function(){return this.request.getPayload().resultsLimit}},{key:"desiredKeys",get:function(){return this.request.getPayload().desiredKeys}},{key:"isQueryResponse",get:function(){return!0}}]),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"records"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("RecordsResponse",this)}},{key:"records",get:function(){return this._results}},{key:"numbersAsStrings",get:function(){return Boolean(this.request.getPayload().numbersAsStrings)}},{key:"isRecordsResponse",get:function(){return!0}}]),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return function(e){return e===m||e===g}(e)?u.default.assign({},t,{fields:void 0}):t}function o(e){return e.recordType===h.default.NAME&&(u.default.isNullOrUndefined(e.forRecord)||(e.forRecord=u.default.pick(e.forRecord,["recordName","recordChangeTag"]))),e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(93)),s=r(n(74)),c=r(n(75)),u=r(n(79)),l=r(n(224)),d=r(n(250)),p=r(n(221)),f=r(n(255)),h=r(n(256)),m="delete",g="forceDelete",v=f.default.forKeys("zoneID","desiredKeys","numbersAsStrings","atomic","onAssetUploadStart"),y=f.default.forKeys("desiredKeys","numbersAsStrings"),b=u.default.makeObjectHasValuesForKeysPredicate({recordChangeTag:!1,recordType:!0}),w=u.default.makeObjectHasValuesForKeysPredicate({recordChangeTag:!0,recordName:!0}),S=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,e),this._database=t,this._operations=[],this._options=v(n)}return(0,c.default)(e,[{key:"_pushOperations",value:function(e,t){var n=this,r=y(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return d.default.normalizeRecords(t).map((function(t){return i(e,t)})).map(o).map((function(t){return u.default.assign({operationType:e,record:t},r)})).forEach((function(e){return n._operations.push(e)})),this}},{key:"createOrUpdate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#createOrUpdate",e,n),d.default.normalizeRecords(e).forEach((function(e){if(b(e))t.create(e,n);else{if(!w(e))throw p.default.makeInvalidArguments("Cannot create or update record:"+(0,a.default)(e));t.update(e,n)}})),this}},{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#create",e,t),this._pushOperations("create",e,t)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#update",e,t),this._pushOperations("update",e,t)}},{key:"forceUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#forceUpdate",e,t),this._pushOperations("forceUpdate",e,t)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#replace",e,t),this._pushOperations("replace",e,t)}},{key:"forceReplace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#forceReplace",e,t),this._pushOperations("forceReplace",e,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#delete",e,t),this._pushOperations(m,e,t)}},{key:"forceDelete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.info("RecordsBatchBuilder#forceDelete",e,t),this._pushOperations(g,e,t)}},{key:"commit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l.default.info("RecordsBatchBuilder#commit"),this._database.commitRecordsBatchBuilder(this,e)}},{key:"build",value:function(){return u.default.assign({operations:this._operations},this._options)}},{key:"_notifyAssetUploadStart",value:function(e,t){this._options.onAssetUploadStart&&this._options.onAssetUploadStart(e,t)}},{key:"zoneID",get:function(){return this._options.zoneID}},{key:"options",get:function(){return this._options}}]),e}();t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r){return e+" "+n.errorMessage+t+" (in: "+u.default.stringifyExposingUndefined(r)+")"}function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};return t.forEach((function(t){if(!t.shouldIgnore||!t.shouldIgnore(e)){var r=t.key;if(r in e){var o=e[r];if(o=u.default.isFunction(t.normalize)?t.normalize(o,e):o,!t.isValid(o,e))throw l.default.makeInvalidArguments(i(r,o,t,e));n[r]=o}else{var a=t.isRequired;if(u.default.isFunction(a)?a(e):a)throw l.default.makeInvalidArguments(i(r,void 0,t,e))}}})),n}}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){var t=u.default.find(P,(function(t){return t.key===e}));if(!t)throw new Error("Cannot find request option definition for: "+e);return t}));return o.apply(void 0,(0,s.default)(r))}Object.defineProperty(t,"__esModule",{value:!0});var s=r(n(80)),c=r(n(2)),u=r(n(79)),l=r(n(221)),d=r(n(250)),p={key:"zoneID",normalize:function(e){return u.default.isNullOrUndefined(e)?{zoneName:"_defaultZone"}:d.default.normalizeZone(e).zoneID},shouldIgnore:function(e){return e.zoneWide},errorMessage:" should be a valid zoneID but was normalized to: ",mustDifferFromOtherZoneID:void 0,isValid:function(e,t){if(null===e)return!1;var n=this.mustDifferFromOtherZoneID;if(!n||!t[n])return!0;var r=this.normalize(e),i=this.normalize(t[n]);return r.zoneName!==i.zoneName||r.ownerRecordName!==i.ownerRecordName}},f={key:"desiredKeys",isValid:function(e){return u.default.isUndefined(e)||u.default.isStringArray(e)},errorMessage:" should be an array of strings but was: "},h={key:"desiredRecordTypes",isValid:function(e){return u.default.isUndefined(e)||u.default.isStringArray(e)},errorMessage:" should be an array of strings but was: "},m={key:"numbersAsStrings",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isBoolean(e)},errorMessage:" should be a boolean but was: "},g={key:"zoneWide",isValid:function(e){return u.default.isUndefined(e)||u.default.isBoolean(e)},errorMessage:" should be a boolean but was: "},v={key:"resultsLimit",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isNumberish(e)},errorMessage:" should be a number but was: "},y={key:"continuationMarker",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isString(e)},errorMessage:" should be a string but was: "},b={key:"syncToken",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isString(e)},errorMessage:" should be a string but was: "},w={key:"reverse",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isBoolean(e)},errorMessage:" should be a boolean but was: "},S={key:"assetPrivacyMaskType",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isString(e)},errorMessage:" should be a string but was: "},C={key:"includeRecords",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isStringArray(e)},errorMessage:" should be an array of strings but was: "},_={key:"excludeRecords",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isStringArray(e)},errorMessage:" should be an array of strings but was: "},O={key:"shareName",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isString(e)},errorMessage:" should be a string but was "},E={key:"archiveName",isValid:function(e){return u.default.isNullOrUndefined(e)||u.default.isString(e)},errorMessage:" should be a string but was "},I={key:"sourceShareName",isValid:function(e){return u.default.isString(e)},errorMessage:" should be a string but was ",isRequired:function(e){return!("targetRootName"in e)}},A={key:"targetRootName",isValid:function(e){return u.default.isString(e)},errorMessage:" should be a string but was ",isRequired:function(e){return!("sourceShareName"in e)}},T={key:"jobID",isValid:function(e){return u.default.isString(e)},errorMessage:" should be a string but was ",isRequired:!0},P=[p,(0,c.default)({},p,{key:"sourceZoneID",isRequired:!0,shouldIgnore:function(){return!1},mustDifferFromOtherZoneID:"targetZoneID"}),(0,c.default)({},p,{key:"targetZoneID",isRequired:!0,shouldIgnore:function(){return!1},mustDifferFromOtherZoneID:"sourceZoneID"}),{key:"atomic",isValid:u.default.isBoolean,errorMessage:" should be a boolean but was: "},f,h,m,g,v,y,b,w,{key:"onAssetUploadStart",isValid:u.default.isFunction,errorMessage:" should be a function but was: "},S,{key:"pluginFields",isValid:function(e){return void 0!==e},errorMessage:" should be defined but was ",isRequired:!0},C,_,O,E,I,A,T];t.default={forKeys:function(){return a.apply(void 0,arguments)}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={UNKNOWN:"UNKNOWN",PRIVATE_USER:"PRIVATE_USER",PUBLIC_USER:"PUBLIC_USER",OWNER:"OWNER"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return y.default.isNode()?e instanceof y.default.Buffer:e instanceof window.Blob}function o(e){return!y.default.isNullOrUndefined(e)&&!y.default.isNullOrUndefined(e.recordName)&&!y.default.isNullOrUndefined(e.fieldName)}function a(e){var t=[],n=[];return e._operations.forEach((function(e){var r=e.record,a=r.fields;y.default.isNullOrUndefined(a)||(0,c.default)(r.fields).forEach((function(e){var a=r.fields[e];i(a.value)?t.push(new S(r,e,a)):function(e){return y.default.isArray(e)&&e.some(i)}(a.value)?a.value.forEach((function(n,o){i(n)&&t.push(new S(r,e,a,o))})):o(a.value)?n.push(new C(r,e,a)):function(e){return y.default.isArray(e)&&e.some(o)}(a.value)&&a.value.forEach((function(t,i){o(t)&&n.push(new C(r,e,a,i))}))}))})),{uploadInfos:t,rerefInfos:n}}function s(e,t){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={tokens:e.map((function(e){return e.toRequestToken()})),zoneID:n.zoneID},i=(new v.default).setApiEntityName("assets").setApiActionName("upload").setResponseClass(m.default.createGenericResponseClass("tokens")).setPayload(r);return t.sendRequest(i)}(t,e._database,e.options).then((function(n){return g.default.Promise.all(n.tokens.map((function(n,r){var i=t[r];return i.consumeUploadToken(n),function(e,t){var n=e.getAssetValueForUpload(),r=e.getUrlForUpload();return h.default.fetch(r,{method:"POST",body:n,exposeImplementation:function(n){t._notifyAssetUploadStart(n,e.toAssetUploadStartEventPayload())}}).catch((function(){throw b.default.makeNetworkError()})).then((function(e){return e.json()})).catch((function(e){throw b.default.makeUnexpectedServerResponse(e)})).then((function(e){return e.singleFile}))}(i,e)})))})).then((function(e){return e.forEach((function(e,n){return t[n].consumeUploadReceipt(e)}))}))}Object.defineProperty(t,"__esModule",{value:!0});var c=r(n(89)),u=r(n(100)),l=r(n(193)),d=r(n(213)),p=r(n(74)),f=r(n(75)),h=r(n(223)),m=r(n(222)),g=r(n(106)),v=r(n(192)),y=r(n(79)),b=r(n(221)),w=r(n(224)),S=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,p.default)(this,e),this._record=t,this._fieldName=n,this._field=r,this._indexInField=i}return(0,f.default)(e,[{key:"toRequestToken",value:function(){var e={fieldName:this._fieldName};return y.default.isNullOrUndefined(this._record.recordType)||(e.recordType=this._record.recordType),y.default.isNullOrUndefined(this._record.recordName)||(e.recordName=this._record.recordName),e}},{key:"toAssetUploadStartEventPayload",value:function(){return{record:this._record,fieldName:this._fieldName,indexInField:this._indexInField}}},{key:"consumeUploadToken",value:function(e){this._uploadToken=e}},{key:"consumeUploadReceipt",value:function(e){y.default.isNullOrUndefined(this._indexInField)?this._field.value=e:this._field.value[this._indexInField]=e}},{key:"getUrlForUpload",value:function(){return this._uploadToken.url}},{key:"getAssetValueForUpload",value:function(){var e=y.default.isNullOrUndefined(this._indexInField)?this._field.value:this._field.value[this._indexInField];return y.default.prepareForUpload(e)}}]),e}(),C=function(e){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(0,p.default)(this,t),(0,l.default)(this,(t.__proto__||(0,u.default)(t)).call(this,e,n,r,i))}return(0,d.default)(t,e),(0,f.default)(t,[{key:"toRequestToken",value:function(){var e=this._field.value;return y.default.isNullOrUndefined(this._indexInField)?e:e[this._indexInField]}}]),t}(S);t.default={handleAssetsInBatchBeforeCommit:function(e){var t=g.default.Promise.resolve(),n=a(e),r=n.uploadInfos,i=n.rerefInfos;return r.length>0&&(w.default.info("uploading assets",r),t=s(e,r)),i.length>0&&(w.default.info("rereferencing assets",i),t=t.then((function(){return function(e,t){var n=e._database,r={assets:t.map((function(e){return e.toRequestToken()})),zoneID:e.zoneID},i=(new v.default).setApiEntityName("assets").setApiActionName("rereference").setResponseClass(m.default.createGenericResponseClass("assets")).setPayload(r);return n.sendRequest(i).then((function(e){if(e.hasErrors)throw w.default.warn("rereference failed",e.errors),b.default.fromServerError(e.errors[0]);e.assets.forEach((function(e,n){t[n].consumeUploadReceipt(e)}))}))}(e,i)}))),t}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=r(n(250)),s=r(n(79)),c=function(){function e(t){(0,i.default)(this,e),this._database=t,this._operations=[]}return(0,o.default)(e,[{key:"_pushOperations",value:function(e,t){var n=this;return s.default.asArray(t).map(a.default.normalizeZone).map((function(t){return{zone:t,operationType:e}})).forEach((function(e){return n._operations.push(e)})),this}},{key:"create",value:function(e){return this._pushOperations("create",e),this}},{key:"delete",value:function(e){return this._pushOperations("delete",e),this}},{key:"commit",value:function(){return this._database.commitRecordZoneBatchBuilder(this)}},{key:"build",value:function(){return{operations:this._operations}}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"zones"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("RecordZonesResponse",this)}},{key:"zones",get:function(){return this._results}},{key:"isRecordZonesResponse",get:function(){return!0}}]),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=function(e){function t(e,n){(0,o.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"zones"));return r._moreComing=n.body.moreComing,r._syncToken=n.body.syncToken,r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"zones",get:function(){return this._results}},{key:"moreComing",get:function(){return this._moreComing}},{key:"syncToken",get:function(){return this._syncToken}},{key:"resultsLimit",get:function(){return this.request.getPayload().resultsLimit}},{key:"isDatabaseChangesResponse",get:function(){return!0}}]),t}(u.default);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"zones"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"zones",get:function(){return this._results}},{key:"isRecordZoneChangesResponse",get:function(){return!0}}]),t}(r(n(222)).default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"assets"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("AssetRereferenceResponse",this)}},{key:"assets",get:function(){return this._results}},{key:"isAssetReferenceResponse",get:function(){return!0}}]),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(o.default.isNullOrUndefined(e))throw a.default.makeInvalidArguments("not a valid Rereference object: "+o.default.stringifyExposingUndefined(e));if(!o.default.has(e,"recordName")||!o.default.has(e,"fieldName"))throw a.default.makeInvalidArguments("a valid Rereference object requires `recordName` and `fieldName` properties");return e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(79)),a=r(n(221));t.default={normalizeAssetRereference:i,normalizeAssetRereferenceArray:function(e){return o.default.asArray(e).map(i)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(253)),l=function(e){function t(e,n){(0,o.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));return r._moreComing=n.body.moreComing,r._syncToken=n.body.syncToken,r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"moreComing",get:function(){return this._moreComing}},{key:"syncToken",get:function(){return this._syncToken}},{key:"zoneID",get:function(){return this.request.getPayload().zoneID}},{key:"resultsLimit",get:function(){return this.request.getPayload().resultsLimit}},{key:"desiredKeys",get:function(){return this.request.getPayload().desiredKeys}},{key:"desiredRecordTypes",get:function(){return this.request.getPayload().desiredRecordTypes}},{key:"reverse",get:function(){return this.request.getPayload().reverse}},{key:"isChangedRecordsResponse",get:function(){return!0}}]),t}(u.default);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=r(n(79)),s=function(){function e(t){(0,i.default)(this,e),this._database=t,this._operations=[]}return(0,o.default)(e,[{key:"_pushOperation",value:function(e,t){var n=this;return(t=a.default.asArray(t)).forEach((function(t){n._operations.push({operationType:e,subscription:t})})),this}},{key:"create",value:function(e){return this._pushOperation("create",e),this}},{key:"delete",value:function(e){return e=a.default.asArray(e).map((function(e){return a.default.isString(e)?{subscriptionID:e}:e})),this._pushOperation("delete",e),this}},{key:"commit",value:function(){return this._database.commitSubscriptionsBatchBuilder(this)}},{key:"build",value:function(){return{operations:this._operations}}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"subscriptions"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("SubscriptionsResponse",this)}},{key:"subscriptions",get:function(){return this._results}},{key:"isSubscriptionsResponse",get:function(){return!0}}]),t}(u.default);t.default=d},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(268)),o=r(n(225)),a=!1,s={run:function(e){if(a)throw new Error("already running");a=!0;var t=o.default.newSharingFlowStat();return i.default.createAndRun(e).then((function(e){return a=!1,t.didRun(),e}),(function(e){throw a=!1,t.didError(e),e}))}};t.default=s},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(74)),o=r(n(75)),a=r(n(106)),s=r(n(79)),c=r(n(221)),u=r(n(269)),l=r(n(271)),d=r(n(272)),p="https://cdn.apple-cloudkit.com",f=p+"/applications/ck-share-ui/current",h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,e),this._options=t,this._shareSheetURL=f+"/"+(t.containerConfiguration.locale||"en-us")+"/",this._view=null,this._delegate=new l.default(t.delegate||{},this)}return(0,o.default)(e,[{key:"_destroy",value:function(){this._view.hide(),this._channel.disconnect(),this._view.unmount(),this._view=null,this._delegate.componentWasDestroyed()}},{key:"_createView",value:function(){var e=this,t=this._delegate._provideURLForComponent(this._shareSheetURL)||this._shareSheetURL;this._view=u.default.create({url:t,parentElement:this._options.parentElement}),this._view.mount(),this._view.showLoading(),setTimeout((function(){e._delegate.componentWasCreated(e._view.iFrame),e._options.startHidden||e._view.show()}))}},{key:"_connect",value:function(){var e=this;return new a.default.Promise((function(t,n){e._channel=d.default.create({win:window,otherWin:e._view.iFrame.contentWindow,otherWinOrigin:p,methods:{channelDidOpen:function(){setTimeout(t)},applicationIsReady:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,r=t.height;return e._view.hideLoading({width:n,height:r,immediate:e._options.startHidden}),e._delegate.componentDidBecomeReady(),!0}},P:a.default.Promise})}))}},{key:"_run",value:function(){var e=s.default.assign({},this._options,{delegate:"blacklisted",parentElement:"blacklisted"});return this._channel.send("run",e)}},{key:"run",value:function(){var e=this;this._createView();var t=this._connect();return a.default.waitOrFail(t,15e3,c.default.makeShareUITimeout()).then((function(){var t=new a.default.Promise((function(t,n){e._onCancel=function(){return n(new Error("canceled"))}})),n=e._run();return a.default.Promise.race([t,n])})).then((function(t){return e._destroy(),t}),(function(t){e._destroy();try{c.default.isErrorObject(JSON.parse(t.message))&&(t=c.default.fromServerError(JSON.parse(t.message)))}catch(n){}return a.default.Promise.reject(t)}))}},{key:"show",value:function(){this._view.show()}},{key:"hide",value:function(){this._view.hide()}},{key:"cancel",value:function(){this._onCancel&&this._onCancel()}}]),e}();t.default={createAndRun:function(e){return e.__shareSheetOrigin&&(p=e.__shareSheetOrigin,f=p+"/applications/ck-share-ui/current"),new h(e).run()}}},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(74)),o=r(n(75)),a=r(n(270)),s=function(){function e(t){(0,i.default)(this,e),this._options=t,this._parentElement=t.parentElement||a.default.doc().body,this._element=a.default.createElement('<div class="cloudkit-sharing-ui">\n  <iframe \n      class="cloudkit-sharing-ui-iframe" \n      src="" \n      frameborder="0" \n      seamless="seamless" \n      allowtransparency="true"></iframe>\n  <div class="cloudkit-sharing-ui-loading">\n    <div class="cloudkit-sharing-ui-modal-background">\n        <div class="cloudkit-sharing-ui-content-box">\n            <div class="cloudkit-sharing-ui-spinning"></div>\n        </div>\n    </div>\n  </div>\n  <style>\n.cloudkit-sharing-ui {\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 100%;\n  width: 100%;\n  overflow: hidden;\n  /*opacity: 0;*/\n  z-index: 999;\n  display: block;\n}\n\n.cloudkit-sharing-ui-iframe {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    height: 100%;\n    width: 100%;\n    overflow: hidden;\n    /*opacity: 0;*/\n    display: block;\n}\n\n.cloudkit-sharing-ui-loading {\n  position: absolute;\n  left: 0;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  opacity: 1;\n  transition: 250ms ease-in-out;\n}\n\n.cloudkit-sharing-ui-modal-background {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(0, 0, 0, 0.25);\n    \n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-pack: center;\n    -webkit-justify-content: center;\n    -ms-flex-pack: center;\n    justify-content: center;\n    -webkit-box-align: center;\n    -webkit-align-items: center;\n    -ms-flex-align: center;\n    align-items: center;\n}\n\n.cloudkit-sharing-ui-content-box {\n    width: 100px;\n    height: 100px;\n    background-color: white;\n    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.4);\n    border-radius: 8px;\n    transition: 250ms ease-in-out;\n    \n    display: -webkit-flex;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-pack: center;\n    -webkit-justify-content: center;\n    -ms-flex-pack: center;\n    justify-content: center;\n    -webkit-box-align: center;\n    -webkit-align-items: center;\n    -ms-flex-align: center;\n    align-items: center;\n}\n\n.cloudkit-sharing-ui-spinning {\n  width: 32px;\n  height: 32px;\n  -webkit-animation: __ck_share_ui_spin 2s linear infinite;\n  -moz-animation: __ck_share_ui_spin 2s linear infinite;\n  animation: __ck_share_ui_spin 2s linear infinite;\n  background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKICAgICAgICAgICAgIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPgogICAgPHBhdGggZmlsbD0iIzY2NiIKICAgICAgICAgIHN0cm9rZS13aWR0aD0iMSIKICAgICAgICAgIGQ9Ik0zMS4yLDE0LjFjLTAuOS03LjUtNy4zLTEzLjMtMTUtMTMuM0M3LjgsMC44LDEuMSw3LjYsMS4xLDE1LjlzNi44LDE1LjIsMTUuMiwxNS4yYzcuNywwLDE0LjEtNS44LDE1LTEzLjMKICAgICAgICAgICAgSDMyYy0wLjksNy45LTcuNywxNC0xNS44LDE0Yy04LjgsMC0xNS45LTcuMS0xNS45LTE1LjlTNy40LDAsMTYuMiwwYzguMSwwLDE0LjgsNi4xLDE1LjgsMTRIMzEuMnoiLz4KPC9zdmc+Cg==);\n}\n\n@-moz-keyframes __ck_share_ui_spin {\n  100% {\n    -moz-transform: rotate(360deg);\n  }\n}\n\n@-webkit-keyframes __ck_share_ui_spin {\n  100% {\n    -webkit-transform: rotate(360deg);\n  }\n}\n\n@keyframes __ck_share_ui_spin {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}</style>\n</div>')}return(0,o.default)(e,[{key:"mount",value:function(){this._parentElement.appendChild(this._element),this.iFrame.setAttribute("src",this._options.url)}},{key:"unmount",value:function(){this._parentElement.removeChild(this._element)}},{key:"showLoading",value:function(){a.default.assignStyle(".cloudkit-sharing-ui-loading",{visibility:"visible"}),a.default.assignStyle(".cloudkit-sharing-ui-iframe",{opacity:0})}},{key:"hideLoading",value:function(e){var t=e.width,n=e.height,r=e.immediate;t=t||400,n=n||300,void 0!==r&&r?(a.default.assignStyle(".cloudkit-sharing-ui-iframe",{opacity:1}),a.default.assignStyle(".cloudkit-sharing-ui-loading",{visibility:"collapse"})):a.default.animate([{".cloudkit-sharing-ui-content-box":{height:n+"px",width:t+"px"},".cloudkit-sharing-ui-spinning":{visibility:"collapse"}},{".cloudkit-sharing-ui-iframe":{opacity:1},".cloudkit-sharing-ui-modal-background":{display:"none"},".cloudkit-sharing-ui-loading":{opacity:0}},{".cloudkit-sharing-ui-loading":{visibility:"collapse"}}],250)}},{key:"show",value:function(){a.default.assignStyle(".cloudkit-sharing-ui",{opacity:1,display:"block"})}},{key:"hide",value:function(){a.default.assignStyle(".cloudkit-sharing-ui",{opacity:0,display:"none"})}},{key:"iFrame",get:function(){return a.default.querySelector(".cloudkit-sharing-ui-iframe")}}]),e}();t.default={create:function(e){return new s(e)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=l.default.isString(e)?a(e):e;l.default.assign(n.style,t)}function o(e,t){var n=l.default.isString(e)?a(e):e;(0,c.default)(t).forEach((function(e){return n.setAttribute(e,t[e])}))}function a(e){return d().querySelector(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(n(249)),c=r(n(89)),u=r(n(106)),l=r(n(79)),d=function(){return"undefined"==typeof window?null:window.document};t.default={createElement:function(e,t){var n=d().createElement("div");n.innerHTML=e;var r=n.firstChild;if(t&&t.classes)if(r.classList)t.classes.forEach((function(e){return r.classList.add(e)}));else{var a=r.getAttribute("class")||"",s=t.classes.reduce((function(e,t){return e+" "+t}),a);r.setAttribute("class",s.trim())}return t&&t.style&&i(r,t.style),t&&t.attributes&&o(r,t.attributes),t&&t.children&&t.children.forEach((function(e){r.appendChild(e)})),r},assignStyle:i,querySelector:a,animate:function(e,t){return e.reduce((function(e,n){return e.then((function(){return(0,c.default)(n).forEach((function(e){return i(e,n[e])})),u.default.wait(t)}))}),u.default.Promise.resolve())},makeStyleToggle:function(e,t,n){return function(r,o){return i(r,(0,s.default)({},e,o?t:n))}},win:function(){return window},doc:d}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=r(n(79)),s=function(){function e(t,n){(0,i.default)(this,e),this._actual=t,this._component={show:function(){return n.show()},hide:function(){return n.hide()},__cancel:function(){return n.cancel()}}}return(0,o.default)(e,[{key:"componentWasCreated",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!a.default.isNullOrUndefined(this._actual)&&a.default.isFunction(this._actual.componentWasCreated)?a.default.tryInvokeMethod(this._actual,"componentWasCreated",[this._component].concat(t),"shareWithUI.delegate"):a.default.tryInvokeMethod(this._actual,"componentDidCreate",[this._component].concat(t),"shareWithUI.delegate")}},{key:"componentDidBecomeReady",value:function(){return a.default.tryInvokeMethod(this._actual,"componentDidBecomeReady",[this._component],"shareWithUI.delegate")}},{key:"componentWasDestroyed",value:function(){return a.default.tryInvokeMethod(this._actual,"componentWasDestroyed",[this._component],"shareWithUI.delegate")}},{key:"_provideURLForComponent",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.default.tryInvokeMethod(this._actual,"_provideURLForComponent",[this._component].concat(t),"shareWithUI.delegate")}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var r=d.bind(null,e,t),i=[];return{handle:function(n,r){if(r.source===e&&r.origin===t){var o=i[n.id];o&&(delete i[n.id],n.error?o.reject(n.error):o.resolve(n.result))}},send:function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];var s={id:p(),method:e,params:o};if(!u(s))throw new Error("Not a valid json rpc call message: "+(0,c.default)(s));return new n((function(e,t){i[s.id]={resolve:e,reject:t},r(s)}))}}}function o(e,t){return{handle:function(n,r){var i=d.bind(r.source,r.source,r.origin),o=e[n.method];o&&t.resolve(1).then((function(){return o.apply(null,n.params)})).then((function(e){return{id:n.id,result:e}}),(function(e){return{id:n.id,error:e}})).then((function(e){if("id"in n)try{i(e)}catch(t){i({id:n.id,error:t.message||t})}}))}}}function a(e,t,n,r){var i=function(e){if(e.source===t)try{var i=JSON.parse(e.data);u(i)?n.handle(i,e):l(i)&&r.handle(i,e)}catch(o){}};return e.addEventListener("message",i),{disconnect:function(){e.removeEventListener("message",i)}}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(n(40)),c=r(n(93)),u=function(e){return"method"in e},l=function(e){return!u(e)&&"id"in e},d=function(e,t,n){n.jsonrpc="2.0",e.postMessage((0,c.default)(n),t)},p=function(){return"ckjs-jsonrpc-message-id-"+(""+Math.random()).substring(2)};t.default={create:function(e){var t=e.win,n=e.otherWin,r=e.otherWinOrigin,c=e.methods,u=void 0===c?{}:c,l=e.P,d=void 0===l?s.default:l,p=o(u,d),f=i(n,r,d),h=a(t,n,p,f);return{send:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return f.send.apply(f,[e].concat(n))},disconnect:function(){h.disconnect()}}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"downloadURL",get:function(){return this.httpResponse.body.downloadURL}},{key:"isZipDownloadResponse",get:function(){return!0}}]),t}(r(n(222)).default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=function(e){function t(e,n){(0,o.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));return r._jobID=n.body.jobID,r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"jobID",get:function(){return this._jobID}}]),t}(r(n(222)).default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=function(e){function t(e,n){(0,o.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n)),a=n.body;return r._jobID=a.jobID,r._itemsProcessed=a.itemsProcessed,r._itemsTotalEstimate=a.itemsTotalEstimate,r._status=a.status,r._reason=a.reason,r._serverErrorCode=a.serverErrorCode,r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"jobID",get:function(){return this._jobID}},{key:"itemsProcessed",get:function(){return this._itemsProcessed}},{key:"itemsTotalEstimate",get:function(){return this._itemsTotalEstimate}},{key:"status",get:function(){return this._status}},{key:"reason",get:function(){return this._reason}},{key:"serverErrorCode",get:function(){return this._serverErrorCode}}]),t}(r(n(222)).default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"users"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("UserIdentitiesResponse",this)}},{key:"users",get:function(){return this._results}},{key:"isUserIdentitiesResponse",get:function(){return!0}}]),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(222)),l=r(n(79)),d=function(e){function t(e,n){return(0,o.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n,"results"))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("RecordInfosResponse",this)}},{key:"results",get:function(){return this._results}},{key:"isRecordInfosResponse",get:function(){return!0}}]),t}(u.default);t.default=d},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(79)),o=r(n(224)),a=r(n(279)),s=r(n(281));t.default={parseRawNotification:function(e){try{if(!i.default.isNullOrUndefined(e.ck)){if(!i.default.isNullOrUndefined(e.ck.fet))return new s.default(e);if(!i.default.isNullOrUndefined(e.ck.qry))return new a.default(e)}}catch(t){o.default.warn(t)}return null}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(95)),o=r(n(227)),a=r(n(100)),s=r(n(74)),c=r(n(75)),u=r(n(193)),l=r(n(213)),d=r(n(280)),p=r(n(79)),f=function(e){function t(e){(0,s.default)(this,t);var n=(0,u.default)(this,(t.__proto__||(0,a.default)(t)).call(this,e)),r=e.ck.qry;if(n._zoneID={zoneName:r.zid,ownerRecordName:r.zoid},n._subscriptionID=r.sid,n._dbType=r.dbs,n._recordName=r.rid,n._reason=r.fo,!p.default.isNullOrUndefined(r.af)){var c={},l=!0,d=!1,f=void 0;try{for(var h,m=(0,o.default)((0,i.default)(r.af));!(l=(h=m.next()).done);l=!0){var g=h.value;c[g]={value:r.af[g]}}}catch(v){d=!0,f=v}finally{try{!l&&m.return&&m.return()}finally{if(d)throw f}}n._fields=c}return n}return(0,l.default)(t,e),(0,c.default)(t,[{key:"toString",value:function(){return p.default.instanceToString("QueryNotification",this)}},{key:"isQueryNotification",get:function(){return!0}},{key:"notificationType",get:function(){return d.default.NOTIFICATION_TYPE_QUERY}},{key:"queryNotificationReason",get:function(){switch(this._reason){case 1:return d.default.QUERY_NOTIFICATION_REASON_RECORD_CREATED;case 2:return d.default.QUERY_NOTIFICATION_REASON_RECORD_UPDATED;case 3:return d.default.QUERY_NOTIFICATION_REASON_RECORD_DELETED}return null}},{key:"isPublicDatabase",get:function(){return 0===this._dbType}},{key:"recordName",get:function(){return this._recordName}},{key:"recordFields",get:function(){return this._fields}}]),t}(d.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=function(){function e(t){(0,i.default)(this,e),this._notificationID=t.ck.nid,this._containerIdentifier=t.ck.cid;var n=t.aps||{};n.alert=n.alert||{},this._category=n.category,this._alertBody=n.alert.body,this._alertLocKey=n.alert["loc-key"],this._alertLocArgs=n.alert["loc-args"],this._actionLocKey=n.alert["action-loc-key"],this._launchImage=n.alert["launch-image"],this._soundName=n.sound,this._badge=n.badge}return(0,o.default)(e,[{key:"isQueryNotification",get:function(){return!1}},{key:"isRecordZoneNotification",get:function(){return!1}},{key:"category",get:function(){return this._category}},{key:"notificationType",get:function(){return null}},{key:"notificationID",get:function(){return this._notificationID}},{key:"containerIdentifier",get:function(){return this._containerIdentifier}},{key:"alertBody",get:function(){return this._alertBody}},{key:"alertLocalizationKey",get:function(){return this._alertLocKey}},{key:"alertLocalizationArgs",get:function(){return this._alertLocArgs}},{key:"alertActionLocalizationKey",get:function(){return this._actionLocKey}},{key:"alertLaunchImage",get:function(){return this._launchImage}},{key:"soundName",get:function(){return this._soundName}},{key:"badge",get:function(){return this._badge}},{key:"zoneID",get:function(){return this._zoneID}},{key:"subscriptionID",get:function(){return this._subscriptionID}}],[{key:"NOTIFICATION_TYPE_QUERY",get:function(){return"NOTIFICATION_TYPE_QUERY"}},{key:"NOTIFICATION_TYPE_RECORD_ZONE",get:function(){return"NOTIFICATION_TYPE_RECORD_ZONE"}},{key:"QUERY_NOTIFICATION_REASON_RECORD_CREATED",get:function(){return"QUERY_NOTIFICATION_REASON_RECORD_CREATED"}},{key:"QUERY_NOTIFICATION_REASON_RECORD_UPDATED",get:function(){return"QUERY_NOTIFICATION_REASON_RECORD_UPDATED"}},{key:"QUERY_NOTIFICATION_REASON_RECORD_DELETED",get:function(){return"QUERY_NOTIFICATION_REASON_RECORD_DELETED"}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(100)),o=r(n(74)),a=r(n(75)),s=r(n(193)),c=r(n(213)),u=r(n(280)),l=r(n(79)),d=function(e){function t(e){(0,o.default)(this,t);var n=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e)),r=e.ck.fet||{};return n._zoneID={zoneName:r.zid,ownerRecordName:r.zoid},n._subscriptionID=r.sid,n}return(0,c.default)(t,e),(0,a.default)(t,[{key:"toString",value:function(){return l.default.instanceToString("RecordZoneNotification",this)}},{key:"isRecordZoneNotification",get:function(){return!0}},{key:"notificationType",get:function(){return u.default.NOTIFICATION_TYPE_RECORD_ZONE}}]),t}(u.default);t.default=d},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(79)),o=r(n(283)),a=r(n(284)),s=r(n(286)),c="serverToServerKeyAuth",u="apiTokenAuth";t.default={SERVER_TO_SERVER_KEY_AUTH:c,API_TOKEN_AUTH:u,createAuth:function(e){var t=e.container,n=e.containerConfig,r=e.authTokenStore;return i.default.isNullOrUndefined(n[c])?i.default.isNullOrUndefined(n[u])?new o.default({container:t}):new s.default({container:t,config:n[u],locale:n.locale,authTokenStore:r}):new a.default({container:t,config:n[c],locale:n.locale})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(74)),o=r(n(75)),a=r(n(221)),s=function(){function e(t){var n=t.container;(0,i.default)(this,e),this._container=n}return(0,o.default)(e,[{key:"_fetchCurrentUserIdentity",value:function(){return this._container.fetchCurrentUserIdentity()}},{key:"setup",value:function(){return this._fetchCurrentUserIdentity()}},{key:"whenUserSignsIn",value:function(){throw a.default.makeConfigurationError("whenUserSignsIn not implemented by this auth type")}},{key:"whenUserSignsOut",value:function(){throw a.default.makeConfigurationError("whenUserSignsOut not implemented by this auth type")}},{key:"signOut",value:function(){throw a.default.makeConfigurationError("signOut not implemented by this auth type")}},{key:"requestHandler",value:function(){return function(e){return e}}},{key:"responseHandler",value:function(){return function(e){return e}}},{key:"getConfig",value:function(){return{}}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(93)),o=r(n(100)),a=r(n(74)),s=r(n(75)),c=r(n(193)),u=r(n(209)),l=r(n(213)),d=r(n(283)),p=r(n(79)),f=r(n(221)),h=r(n(106)),m=r(n(285)),g=r(n(187)),v="keyID",y="privateKeyFile",b="privateKeyPassPhrase",w="sha256",S="RSA-SHA256",C=function(e){function t(e){var n=e.container,r=e.config;(0,a.default)(this,t);var i=(0,c.default)(this,(t.__proto__||(0,o.default)(t)).call(this,{container:n}));return i._config=r,i._keyID=null,i._key=null,i}return(0,l.default)(t,e),(0,s.default)(t,[{key:"setup",value:function(){if(p.default.isNullOrUndefined(this._config[v]))throw f.default.makeConfigurationError(v+" not set in "+(0,i.default)(this._config));if(p.default.isNullOrUndefined(this._config[y]))throw f.default.makeConfigurationError(y+" not set in "+(0,i.default)(this._config));if(this._keyID=this._config[v],this._key=m.default.readFileSync(this._config[y],"utf8"),p.default.isNullOrUndefined(this._key))throw f.default.makeConfigurationError("Could not read key from "+y+"}");return p.default.isNullOrUndefined(this._config[b])||(this._key={key:this._key,passphrase:this._config[b]}),(0,u.default)(t.prototype.__proto__||(0,o.default)(t.prototype),"setup",this).call(this)}},{key:"requestHandler",value:function(){var e=this;return function(t){var n,r=(new Date).toISOString().replace(/(\.\d\d\d)Z/,"Z"),i=t.getBodyStringified()||"",o=t.getPathWithParams(),a=r+":"+function(e){var t=g.default.createHash(w);return t.update(new p.default.Buffer(e,"utf-8")),t.digest("base64")}(i)+":"+o;return n=p.default.isFunction(e._externalSigner)?e._externalSigner(e._keyID,a):function(e,t){var n=g.default.createSign(S);return n.update(t),n.sign(e,"base64")}(e._key,a),h.default.Promise.resolve(n).then((function(n){return t.setISODate(r),t.setSigningKeyID(e._keyID),t.setSignatureV1(n),t}))}}}]),t}(d.default);t.default=C},function(e,t){e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(249)),o=r(n(100)),a=r(n(74)),s=r(n(75)),c=r(n(193)),u=r(n(213)),l=r(n(79)),d=r(n(106)),p=r(n(224)),f=r(n(221)),h=r(n(283)),m=r(n(225)),g=r(n(287)),v=r(n(282)),y=r(n(292)),b={id:"apple-sign-in-button",theme:"medium"},w={id:"apple-sign-out-button",theme:"medium"},S=function(e){function t(e){var n=e.container,r=e.config,i=e.locale,s=e.authTokenStore;(0,a.default)(this,t);var u=(0,c.default)(this,(t.__proto__||(0,o.default)(t)).call(this,{container:n}));return r.persist&&(u._authTokenStore=y.default.create(s)),u._apiToken=r.apiToken,u._authButtons=g.default.create({locale:i,signInButton:l.default.assign({},b,r.signInButton),signOutButton:l.default.assign({},w,r.signOutButton)}),u._ckSession=null,u._signInURL=null,u._whenUserSignsIn=d.default.defer(),u._whenUserSignsOut=d.default.defer(),l.default.isNullOrUndefined(r.ckWebAuthToken)||u._setSession(r.ckWebAuthToken),u}return(0,u.default)(t,e),(0,s.default)(t,[{key:"setup",value:function(){return this._authButtons.reset(),this._fetchAndHandleCurrentUserIdentity()}},{key:"whenUserSignsIn",value:function(){return this._whenUserSignsIn.promise}},{key:"whenUserSignsOut",value:function(){return this._whenUserSignsOut.promise}},{key:"signOut",value:function(){this._setSession(null),this._whenUserSignsOut.resolve(),this._whenUserSignsOut=d.default.defer()}},{key:"requestHandler",value:function(){var e=this;return function(t){return e._getSessionAsync().then((function(n){return l.default.isNullOrUndefined(n)||t.setCKSession(n),t.setApiToken(e._apiToken),t}))}}},{key:"responseHandler",value:function(){var e=this;return function(t){return l.default.isNullOrUndefined(t.getCKSession())||l.default.isNullOrUndefined(e._ckSession)||e._setSession(t.getCKSession()),t}}},{key:"getConfig",value:function(){return(0,i.default)({},v.default.API_TOKEN_AUTH,{apiToken:this._apiToken,ckWebAuthToken:this._ckSession})}},{key:"_getSessionAsync",value:function(){var e=this,t=d.default.Promise.resolve(this._ckSession);return this._authTokenStore&&(t=d.default.Promise.resolve(this._authTokenStore.getToken(this._container.containerIdentifier)).then((function(t){return e._ckSession=t,e._ckSession}))),t}},{key:"_setSession",value:function(e){this._ckSession=e,this._authTokenStore&&this._authTokenStore.putToken(this._container.containerIdentifier,e)}},{key:"_fetchAndHandleCurrentUserIdentity",value:function(){var e=this;return this._fetchCurrentUserIdentity().then((function(t){return e._handleCurrentUserIdentity(t)})).catch((function(t){if(t.ckErrorCode===f.default.AUTHENTICATION_REQUIRED)return e._handleSignInURL(t.redirectURL),null;throw t}))}},{key:"_handleSignInURL",value:function(e){var t=this;this._signInURL=e,setTimeout((function(){return t._fetchAndHandleCurrentUserIdentity().catch((function(){}))}),84e4),this._authButtons.showSignInButton((function(){l.default.getAsyncMessageFromPopup(t._signInURL,640,525).then((function(e){var n=e.data.ckSession;if(l.default.isNullOrUndefined(n))throw l.default.isNullOrUndefined(e.data.errorMessage)?(p.default.warn("Event of type message has neither a ckSession nor an error message",e),f.default.makeUnknownError()):(p.default.warn("Message event from popup reports error: ",e.data),f.default.makeSignInFailedError(e.data));t._setSession(n)})).then((function(){return t._fetchAndHandleCurrentUserIdentity()})).catch((function(e){m.default.reportUnexpectedAuthError(),p.default.warn("Unexpected error",e),t._whenUserSignsIn.reject(e),t._whenUserSignsIn=d.default.defer(),t.setup()}))}))}},{key:"_handleCurrentUserIdentity",value:function(e){var t=this;return this._whenUserSignsIn.resolve(e),this._whenUserSignsIn=d.default.defer(),this._authButtons.showSignOutButton((function(){t.signOut(),t.setup()})),e}}]),t}(h.default);t.default=S},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(74)),o=r(n(75)),a=r(n(79)),s=r(n(288)),c=function(){function e(t){(0,i.default)(this,e),this._config=t,this._signInButton=s.default.create(a.default.assign({},t.signInButton,{locale:t.locale},{l10nKey:"Auth.SignIn"})),this._signOutButton=s.default.create(a.default.assign({},t.signOutButton,{locale:t.locale},{l10nKey:"Auth.SignOut"}))}return(0,o.default)(e,[{key:"showSignInButton",value:function(e){this._signOutButton.hide(),this._signInButton.show(e)}},{key:"showSignOutButton",value:function(e){this._signInButton.hide(),this._signOutButton.show(e)}},{key:"reset",value:function(){this._signInButton.hide(),this._signOutButton.hide()}}]),e}();t.default={create:function(e){return new c(e)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i,o=r(n(74)),a=r(n(75)),s=r(n(249)),c=r(n(270)),u=r(n(289)),l=r(n(291)),d=(i={},(0,s.default)(i,l.default.WHITE,{outer:"white",inner:"white",text:"black"}),(0,s.default)(i,l.default.WHITE_WITH_OUTLINE,{outer:"black",inner:"white",text:"black"}),(0,s.default)(i,l.default.BLACK,{outer:"black",inner:"black",text:"white"}),i),p=c.default.makeStyleToggle("display","block","none"),f=c.default.makeStyleToggle("opacity",1,.5),h=function(){function e(t){(0,o.default)(this,e),this._config=t}return(0,a.default)(e,[{key:"_append",value:function(){var e=document.querySelector("#"+this._config.id);if(e){var t=function(e){var t=u.default.translations(e.locale)[e.l10nKey],n=e.theme||l.default.WHITE_WITH_OUTLINE,r=d[n]||d[l.default.WHITE_WITH_OUTLINE];return c.default.createElement("<div>",{classes:["apple-auth-button"],style:{height:"40px",width:"218px",cursor:"pointer","border-style":"solid","border-width":"1px","border-radius":"5px","border-color":r.outer,"background-color":r.inner},attributes:{alt:t.string},children:[c.default.createElement(unescape(t.asset),{classes:["apple-auth-button-text"],style:{overflow:"visible",fill:r.text,top:"50%",left:"50%",position:"relative"}})]})}(this._config);return e.appendChild(t),!0}return!1}},{key:"show",value:function(e){var t=this;(this._button||this._append())&&(p(this._button,!0),f(this._button,!0),this._button.onclick=function(){t._button.onclick=null,f(t._button,!1),e()})}},{key:"hide",value:function(){this._button&&p(this._button,!1)}},{key:"_button",get:function(){return document.querySelector("#"+this._config.id+" > .apple-auth-button")}}]),e}();t.default={create:function(e){return new h(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(79)),i=n(290),o="en-us",a={"zh-hk":"zh-tw","nb-no":"no-no","nn-no":"no-no",nb:"no-no",nn:"no-no",he:"iw-il","he-il":"iw-il",pt:"pt-pt","vi-vn":"vi-vi","es-419":"es-mx","es-xl":"es-mx"},s=function(e){return e=function(e){return r.default.isString(e)?(2===(e=e.toLowerCase()).length&&(e=e+"-"+e),a[e]||e):o}(e),i[e]||i[o]};t.default={translations:function(e){return s(e||("undefined"==typeof navigator?o:navigator.language||navigator.browserLanguage))}}},function(e,t){e.exports={"en-us":{"Auth.SignIn":{string:"Sign in with Apple ID",asset:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="177.42" height="21.52"><path d="M-79.53 2.00Q-79.53 3.72-80.73 4.80Q-82.05 5.98-84.41 5.98Q-86.59 5.98-87.91 5.14L-87.41 3.34Q-85.99 4.18-84.29 4.18Q-83.07 4.18-82.39 3.63Q-81.71 3.08-81.71 2.16Q-81.71 1.34-82.27 0.78Q-82.83 0.22-84.13-0.26Q-87.67-1.58-87.67-4.12Q-87.67-5.78-86.42-6.84Q-85.17-7.90-83.11-7.90Q-81.27-7.90-80.05-7.26L-80.59-5.50Q-81.73-6.12-83.17-6.12Q-84.31-6.12-84.95-5.56Q-85.49-5.06-85.49-4.34Q-85.49-3.54-84.87-3.02Q-84.33-2.54-82.91-1.98Q-81.17-1.28-80.35-0.34Q-79.53 0.60-79.53 2.00ZM-74.97-6.84Q-74.97-6.26-75.35-5.90Q-75.73-5.54-76.33-5.54Q-76.87-5.54-77.24-5.91Q-77.61-6.28-77.61-6.84Q-77.61-7.40-77.23-7.76Q-76.85-8.12-76.29-8.12Q-75.73-8.12-75.35-7.76Q-74.97-7.40-74.97-6.84M-75.21 5.78L-77.37 5.78L-77.37-3.94L-75.21-3.94L-75.21 5.78ZM-63.97-3.94Q-64.05-2.76-64.05-1.18L-64.05 4.38Q-64.05 7.52-65.45 8.78Q-66.73 9.94-69.05 9.94Q-71.07 9.94-72.31 9.18L-71.81 7.52Q-70.59 8.26-69.05 8.26Q-66.19 8.26-66.19 5.18L-66.19 4.24L-66.23 4.24Q-67.13 5.72-69.09 5.72Q-70.85 5.72-71.99 4.38Q-73.13 3.04-73.13 0.98Q-73.13-1.36-71.81-2.80Q-70.59-4.14-68.83-4.14Q-66.85-4.14-65.99-2.60L-65.95-2.60L-65.87-3.94L-63.97-3.94M-66.21 1.62L-66.21-0.10Q-66.21-1.08-66.82-1.78Q-67.43-2.48-68.43-2.48Q-69.53-2.48-70.24-1.56Q-70.95-0.64-70.95 0.90Q-70.95 2.30-70.29 3.16Q-69.61 4.10-68.43 4.10Q-67.71 4.10-67.14 3.67Q-66.57 3.24-66.33 2.50Q-66.21 2.14-66.21 1.62ZM-52.89 5.78L-55.05 5.78L-55.05 0.20Q-55.05-2.38-57.01-2.38Q-57.97-2.38-58.57-1.67Q-59.17-0.96-59.17-0.00L-59.17 5.78L-61.33 5.78L-61.33-1.16Q-61.33-2.44-61.41-3.94L-59.51-3.94L-59.41-2.44L-59.35-2.44Q-58.97-3.14-58.23-3.60Q-57.35-4.14-56.27-4.14Q-54.91-4.14-54.01-3.26Q-52.89-2.18-52.89-0.04L-52.89 5.78ZM-43.09-6.84Q-43.09-6.26-43.47-5.90Q-43.85-5.54-44.45-5.54Q-44.99-5.54-45.36-5.91Q-45.73-6.28-45.73-6.84Q-45.73-7.40-45.35-7.76Q-44.97-8.12-44.41-8.12Q-43.85-8.12-43.47-7.76Q-43.09-7.40-43.09-6.84M-43.33 5.78L-45.49 5.78L-45.49-3.94L-43.33-3.94L-43.33 5.78ZM-32.17 5.78L-34.33 5.78L-34.33 0.20Q-34.33-2.38-36.29-2.38Q-37.25-2.38-37.85-1.67Q-38.45-0.96-38.45-0.00L-38.45 5.78L-40.61 5.78L-40.61-1.16Q-40.61-2.44-40.69-3.94L-38.79-3.94L-38.69-2.44L-38.63-2.44Q-38.25-3.14-37.51-3.60Q-36.63-4.14-35.55-4.14Q-34.19-4.14-33.29-3.26Q-32.17-2.18-32.17-0.04L-32.17 5.78ZM-11.75-3.94L-14.79 5.78L-16.77 5.78L-18.03 1.56Q-18.51-0.02-18.81-1.58L-18.85-1.58Q-19.13 0.02-19.63 1.56L-20.97 5.78L-22.97 5.78L-25.83-3.94L-23.61-3.94L-22.51 0.68Q-22.11 2.32-21.85 3.80L-21.81 3.80Q-21.57 2.58-21.01 0.70L-19.63-3.94L-17.87-3.94L-16.55 0.60Q-16.07 2.26-15.77 3.80L-15.71 3.80Q-15.49 2.30-15.05 0.60L-13.87-3.94L-11.75-3.94ZM-7.71-6.84Q-7.71-6.26-8.09-5.90Q-8.47-5.54-9.07-5.54Q-9.61-5.54-9.98-5.91Q-10.35-6.28-10.35-6.84Q-10.35-7.40-9.97-7.76Q-9.59-8.12-9.03-8.12Q-8.47-8.12-8.09-7.76Q-7.71-7.40-7.71-6.84M-7.95 5.78L-10.11 5.78L-10.11-3.94L-7.95-3.94L-7.95 5.78ZM-0.33-2.32L-2.71-2.32L-2.71 2.40Q-2.71 4.20-1.45 4.20Q-0.87 4.20-0.49 4.10L-0.43 5.74Q-1.07 5.98-2.11 5.98Q-3.39 5.98-4.11 5.20Q-4.83 4.42-4.83 2.58L-4.83-2.32L-6.25-2.32L-6.25-3.94L-4.83-3.94L-4.83-5.72L-2.71-6.36L-2.71-3.94L-0.33-3.94L-0.33-2.32ZM9.99 5.78L7.83 5.78L7.83 0.24Q7.83-2.38 5.87-2.38Q4.37-2.38 3.81-0.86Q3.71-0.54 3.71-0.08L3.71 5.78L1.55 5.78L1.55-8.40L3.71-8.40L3.71-2.56L3.75-2.56Q4.77-4.14 6.67-4.14Q8.01-4.14 8.89-3.26Q9.99-2.16 9.99-0.00L9.99 5.78ZM27.85 5.78L25.55 5.78L24.29 1.82L19.91 1.82L18.71 5.78L16.47 5.78L20.81-7.70L23.49-7.70L27.85 5.78M23.91 0.16L22.77-3.36Q22.59-3.90 22.09-5.90L22.05-5.90Q21.85-5.04 21.41-3.36L20.29 0.16L23.91 0.16ZM38.81 0.80Q38.81 3.28 37.47 4.72Q36.27 6.00 34.49 6.00Q32.57 6.00 31.73 4.62L31.69 4.62L31.69 9.74L29.53 9.74L29.53-0.74Q29.53-2.30 29.45-3.94L31.35-3.94L31.47-2.40L31.51-2.40Q32.59-4.14 34.79-4.14Q36.51-4.14 37.66-2.78Q38.81-1.42 38.81 0.80M36.61 0.88Q36.61-0.54 35.97-1.46Q35.27-2.42 34.09-2.42Q33.29-2.42 32.64-1.89Q31.99-1.36 31.79-0.50Q31.69-0.10 31.69 0.16L31.69 1.78Q31.69 2.84 32.34 3.57Q32.99 4.30 34.03 4.30Q35.25 4.30 35.93 3.36Q36.61 2.42 36.61 0.88ZM50.09 0.80Q50.09 3.28 48.75 4.72Q47.55 6.00 45.77 6.00Q43.85 6.00 43.01 4.62L42.97 4.62L42.97 9.74L40.81 9.74L40.81-0.74Q40.81-2.30 40.73-3.94L42.63-3.94L42.75-2.40L42.79-2.40Q43.87-4.14 46.07-4.14Q47.79-4.14 48.94-2.78Q50.09-1.42 50.09 0.80M47.89 0.88Q47.89-0.54 47.25-1.46Q46.55-2.42 45.37-2.42Q44.57-2.42 43.92-1.89Q43.27-1.36 43.07-0.50Q42.97-0.10 42.97 0.16L42.97 1.78Q42.97 2.84 43.62 3.57Q44.27 4.30 45.31 4.30Q46.53 4.30 47.21 3.36Q47.89 2.42 47.89 0.88ZM54.33 5.78L52.17 5.78L52.17-8.40L54.33-8.40L54.33 5.78ZM65.05 0.46Q65.05 1.04 64.97 1.44L58.49 1.44Q58.53 2.88 59.43 3.64Q60.25 4.32 61.55 4.32Q62.99 4.32 64.17 3.86L64.51 5.36Q63.13 5.96 61.25 5.96Q58.99 5.96 57.70 4.63Q56.41 3.30 56.41 1.06Q56.41-1.14 57.61-2.60Q58.87-4.16 61.01-4.16Q63.11-4.16 64.19-2.60Q65.05-1.36 65.05 0.46M62.99-0.10Q63.01-1.06 62.57-1.76Q62.01-2.66 60.85-2.66Q59.79-2.66 59.13-1.78Q58.59-1.08 58.49-0.10L62.99-0.10ZM74.03 5.78L71.87 5.78L71.87-7.70L74.03-7.70L74.03 5.78ZM87.99-1.28Q87.99 2.36 85.81 4.20Q83.79 5.90 80.07 5.90Q78.23 5.90 76.91 5.74L76.91-7.52Q78.63-7.80 80.63-7.80Q84.17-7.80 85.97-6.26Q87.99-4.52 87.99-1.28M85.71-1.22Q85.71-3.58 84.46-4.84Q83.21-6.10 80.81-6.10Q79.79-6.10 79.07-5.96L79.07 4.12Q79.47 4.18 80.53 4.18Q83.01 4.18 84.36 2.80Q85.71 1.42 85.71-1.22Z"/></svg>'},"Auth.SignOut":{string:"Sign out",asset:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="70.61999999999999" height="21.52"><path d="M-26.13 2.00Q-26.13 3.72-27.33 4.80Q-28.65 5.98-31.01 5.98Q-33.19 5.98-34.51 5.14L-34.01 3.34Q-32.59 4.18-30.89 4.18Q-29.67 4.18-28.99 3.63Q-28.31 3.08-28.31 2.16Q-28.31 1.34-28.87 0.78Q-29.43 0.22-30.73-0.26Q-34.27-1.58-34.27-4.12Q-34.27-5.78-33.02-6.84Q-31.77-7.90-29.71-7.90Q-27.87-7.90-26.65-7.26L-27.19-5.50Q-28.33-6.12-29.77-6.12Q-30.91-6.12-31.55-5.56Q-32.09-5.06-32.09-4.34Q-32.09-3.54-31.47-3.02Q-30.93-2.54-29.51-1.98Q-27.77-1.28-26.95-0.34Q-26.13 0.60-26.13 2.00ZM-21.57-6.84Q-21.57-6.26-21.95-5.90Q-22.33-5.54-22.93-5.54Q-23.47-5.54-23.84-5.91Q-24.21-6.28-24.21-6.84Q-24.21-7.40-23.83-7.76Q-23.45-8.12-22.89-8.12Q-22.33-8.12-21.95-7.76Q-21.57-7.40-21.57-6.84M-21.81 5.78L-23.97 5.78L-23.97-3.94L-21.81-3.94L-21.81 5.78ZM-10.57-3.94Q-10.65-2.76-10.65-1.18L-10.65 4.38Q-10.65 7.52-12.05 8.78Q-13.33 9.94-15.65 9.94Q-17.67 9.94-18.91 9.18L-18.41 7.52Q-17.19 8.26-15.65 8.26Q-12.79 8.26-12.79 5.18L-12.79 4.24L-12.83 4.24Q-13.73 5.72-15.69 5.72Q-17.45 5.72-18.59 4.38Q-19.73 3.04-19.73 0.98Q-19.73-1.36-18.41-2.80Q-17.19-4.14-15.43-4.14Q-13.45-4.14-12.59-2.60L-12.55-2.60L-12.47-3.94L-10.57-3.94M-12.81 1.62L-12.81-0.10Q-12.81-1.08-13.42-1.78Q-14.03-2.48-15.03-2.48Q-16.13-2.48-16.84-1.56Q-17.55-0.64-17.55 0.90Q-17.55 2.30-16.89 3.16Q-16.21 4.10-15.03 4.10Q-14.31 4.10-13.74 3.67Q-13.17 3.24-12.93 2.50Q-12.81 2.14-12.81 1.62ZM0.51 5.78L-1.65 5.78L-1.65 0.20Q-1.65-2.38-3.61-2.38Q-4.57-2.38-5.17-1.67Q-5.77-0.96-5.77-0.00L-5.77 5.78L-7.93 5.78L-7.93-1.16Q-7.93-2.44-8.01-3.94L-6.11-3.94L-6.01-2.44L-5.95-2.44Q-5.57-3.14-4.83-3.60Q-3.95-4.14-2.87-4.14Q-1.51-4.14-0.61-3.26Q0.51-2.18 0.51-0.04L0.51 5.78ZM16.79 0.84Q16.79 3.08 15.51 4.52Q14.17 6.00 11.95 6.00Q9.81 6.00 8.54 4.58Q7.27 3.16 7.27 1.00Q7.27-1.26 8.58-2.70Q9.89-4.14 12.11-4.14Q14.25-4.14 15.55-2.72Q16.79-1.34 16.79 0.84M14.55 0.90Q14.55-0.44 13.97-1.40Q13.29-2.56 12.03-2.56Q10.73-2.56 10.05-1.40Q9.47-0.44 9.47 0.94Q9.47 2.28 10.05 3.24Q10.75 4.40 12.01 4.40Q13.25 4.40 13.95 3.22Q14.55 2.24 14.55 0.90ZM27.25 5.78L25.35 5.78L25.23 4.30L25.19 4.30Q24.17 6.00 22.11 6.00Q20.67 6.00 19.81 5.10Q18.79 4.00 18.79 1.78L18.79-3.94L20.95-3.94L20.95 1.42Q20.95 4.22 22.87 4.22Q24.31 4.22 24.87 2.82Q25.01 2.46 25.01 2.00L25.01-3.94L27.17-3.94L27.17 2.98Q27.17 4.36 27.25 5.78ZM34.79-2.32L32.41-2.32L32.41 2.40Q32.41 4.20 33.67 4.20Q34.25 4.20 34.63 4.10L34.69 5.74Q34.05 5.98 33.01 5.98Q31.73 5.98 31.01 5.20Q30.29 4.42 30.29 2.58L30.29-2.32L28.87-2.32L28.87-3.94L30.29-3.94L30.29-5.72L32.41-6.36L32.41-3.94L34.79-3.94L34.79-2.32Z"/></svg>'}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={WHITE:"white",BLACK:"black",WHITE_WITH_OUTLINE:"white-with-outline"}},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(74)),o=r(n(75)),a=r(n(79)),s=(r(n(224)),n(221)),c=r(s),u={putToken:function(e,t){a.default.setCookie(e,t)},getToken:function(e){return a.default.getCookie(e)}},l={},d={putToken:function(e,t){l[e]=t},getToken:function(e){return l[e]}},p=a.default.isNode()?d:u,f=function(){function e(){(0,i.default)(this,e),this.setDelegate()}return(0,o.default)(e,[{key:"setDelegate",value:function(e){a.default.isNullOrUndefined(e)?this._delegate=p:this._delegate=e}},{key:"putToken",value:function(e,t){try{this._delegate.putToken(e,t)}catch(n){this._delegate[e]=t}if(t!==this.getToken(e))throw c.default.makeAuthPersistError()}},{key:"getToken",value:function(e){try{return this._delegate.getToken(e)}catch(t){return this._delegate[e]}}}]),e}();t.default={create:function(e){var t=new f;return t.setDelegate(e),t}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",LESS_THAN:"LESS_THAN",LESS_THAN_OR_EQUALS:"LESS_THAN_OR_EQUALS",GREATER_THAN:"GREATER_THAN",GREATER_THAN_OR_EQUALS:"GREATER_THAN_OR_EQUALS",NEAR:"NEAR",CONTAINS_ALL_TOKENS:"CONTAINS_ALL_TOKENS",IN:"IN",NOT_IN:"NOT_IN",CONTAINS_ANY_TOKENS:"CONTAINS_ANY_TOKENS",LIST_CONTAINS:"LIST_CONTAINS",LIST_CONTAINS_ANY:"LIST_CONTAINS_ANY",NOT_LIST_CONTAINS:"NOT_LIST_CONTAINS",NOT_LIST_CONTAINS_ANY:"NOT_LIST_CONTAINS_ANY",BEGINS_WITH:"BEGINS_WITH",NOT_BEGINS_WITH:"NOT_BEGINS_WITH",LIST_MEMBER_BEGINS_WITH:"LIST_MEMBER_BEGINS_WITH",NOT_LIST_MEMBER_BEGINS_WITH:"NOT_LIST_MEMBER_BEGINS_WITH",LIST_CONTAINS_ALL:"LIST_CONTAINS_ALL",NOT_LIST_CONTAINS_ALL:"NOT_LIST_CONTAINS_ALL"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={NONE:"NONE",DELETE_SELF:"DELETE_SELF",VALIDATE:"VALIDATE"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={QUERY:"query",RECORD_ZONE:"zone",DATABASE:"database"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={NAME:"cloudkit.share",TITLE_FIELD_NAME:"cloudkit.title",THUMBNAIL_IMAGE_DATA_FIELD_NAME:"cloudkit.thumbnailImageData",TYPE_FIELD_NAME:"cloudkit.type"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={UNKNOWN:"UNKNOWN",NONE:"NONE",READ_ONLY:"READ_ONLY",READ_WRITE:"READ_WRITE"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={UNKNOWN:"UNKNOWN",PENDING:"PENDING",ACCEPTED:"ACCEPTED"}}]))},function(e,t){e.exports=void 0},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(919),i=n(2208),o=n(888);function a(e){return o.z.record(o.z.unknown()).safeParse(e).success}class s{constructor(e,t,n){this.instance=e,this.containerIdentifier=t,this.partition=n}async resolveShortGUID(e){const t=this.instance.getDefaultContainer(),n=new r.a("resolveShortGUID").time();try{const r=await t.fetchRecordInfos([e]);if(r.hasErrors)return i.b.sharedInstance.recordStat(n.failure({errorCode:r.errors[0]})),r;const o=r.results[0].containerIdentifier;return n.addAdditionalProperties({containerIdentifier:o}),i.b.sharedInstance.recordStat(n.success()),r}catch(o){const e=a(o)?o.ckErrorCode:void 0;return i.b.sharedInstance.recordStat(n.failure({errorCode:e})),null}}async acceptShortGUID(e){const t=this.instance.getDefaultContainer(),n=new r.a("acceptShortGUID").time();try{const r=await t.acceptShares({value:e});return r.hasErrors?(i.b.sharedInstance.recordStat(n.failure({errorCode:r.errors[0]})),r):(i.b.sharedInstance.recordStat(n.success()),r)}catch(o){const e=a(o)?o.ckErrorCode:void 0;return i.b.sharedInstance.recordStat(n.failure({errorCode:e})),null}}}function c(e){if(!e.hasErrors)return!1;switch(e.errors[0].ckErrorCode){case CloudKit.CKError.SERVICE_UNAVAILABLE:case CloudKit.CKError.NETWORK_ERROR:case CloudKit.CKError.TRY_AGAIN_LATER:case CloudKit.CKError.THROTTLED:return!0;default:return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(2179),i=n(1205),o=n(1207),a=n(1206),s=n(1208),c=n(1204),u=n(1209),l=n(925),d=n(1305),p=n(2208),f=n(919),h=n(888),m=n(2249),g=n(2248);class v{constructor(e,t,n,l){var v,b,w,S,C,_,O,E;if(this.applicationIdentifier=void 0,this.databaseScope=void 0,this.downloadURL="",this.fileType=void 0,this.fileExtension=void 0,this.thumbnailIconURL="",this.isIWorkThumbnailUrl=!1,this.isFolderSharing=!1,this.isPackage=!1,this.isPublicShare=!1,this.isThirdPartyShare=void 0,this.thirdPartyShareRedirectUrl=void 0,this.ownerName="",this.ownerFirstName="",this.ownerLastName="",this.ownerEmail="",this.shareeAcceptanceStatus=void 0,this.shortGuid=void 0,this.title=void 0,this.outOfNetworkParticipantList=[],this.dsid=void 0,this.shortGuid=t,this.dsid=l,this.isThirdPartyShare=!1,n)this.applicationIdentifier=n;else{var I;const n=e.results[0].containerIdentifier,r=null===(I=e.results[0].rootRecord)||void 0===I||null===(I=I.fields)||void 0===I?void 0:I.extension,l=e.results[0].webpageURL;if(l&&t){const e=Object(m.c)(`${l}${t}`);"http:"!==e.protocol&&"https:"!==e.protocol||(this.isThirdPartyShare=!0,this.thirdPartyShareRedirectUrl=e)}const d="string"===typeof(null===r||void 0===r?void 0:r.value)?r.value:void 0;this.applicationIdentifier=function(e,t,n){switch(e){case"com.apple.clouddocs":switch(t){case"pages":return o.b.identifier;case"numbers":return a.b.identifier;case"key":return s.b.identifier;default:return c.b.identifier}case"com.apple.notes":return i.b.identifier;case"com.apple.reminders":return u.b.identifier;default:if(!n)throw`ShareRecord: Unable to find applicationIdentifier for containerId = ${e} and fileExtension = ${t}`;return""}}(n,d,this.isThirdPartyShare)}const A=e.results[0].databaseScope;this.databaseScope=A;const T=null===(v=e.results[0].share)||void 0===v?void 0:v.fields;if(T){const e=T["cloudkit.title"];e&&"string"!==typeof e&&"string"===typeof e.value&&(this.title=e.value)}const P=null===(b=e.results[0].ownerIdentity)||void 0===b?void 0:b.nameComponents;if(P){const{givenName:e,familyName:t}=P,n=Object(d.a)({givenName:e,familyName:t});n&&(this.ownerName=n),this.ownerFirstName=e,this.ownerLastName=t}this.ownerEmail=(null===(w=e.results[0].ownerIdentity)||void 0===w?void 0:w.lookupInfo.emailAddress)||"";const R=null===(S=e.results[0].rootRecord)||void 0===S||null===(S=S.fields)||void 0===S?void 0:S.extension,k="string"===typeof(null===R||void 0===R?void 0:R.value)?R.value:"";if(this.fileExtension=k,k){const e=r.a.sharedInstance.fetchIcon(k,128,window.devicePixelRatio,["web","ios"]);switch(e&&(this.thumbnailIconURL=e.iconURL),k){case"pages":case"numbers":case"key":{const e=function(e,t){var n;const r="iworkthumbnailws";if(!Object(g.e)(r))return void p.b.sharedInstance.recordStat(new f.a("missingWebService",{serviceName:r}));const i=128*(null!==(n=window.devicePixelRatio)&&void 0!==n?n:1);return Object(g.j)(r,"iw/ws/thumbnail")+("?short_token="+e+"&width="+i+"&height="+i+"&dsid="+t)}(this.shortGuid,this.dsid);e&&(this.thumbnailIconURL=e,this.isIWorkThumbnailUrl=!0);break}}}const D=null===(C=e.results[0].rootRecord)||void 0===C?void 0:C.recordName,M=null===(_=e.results[0].rootRecord)||void 0===_?void 0:_.recordType;(D&&D.includes("directory")||"Folder"===M)&&(this.isFolderSharing=!0);const N=this.title+"."+k,x=null===(O=e.results[0].rootRecord)||void 0===O||null===(O=O.fields)||void 0===O||null===(O=O.fileContent)||void 0===O?void 0:O.value,L=(j=x,h.z.record(h.z.unknown()).safeParse(j).success&&"string"===typeof x.downloadURL?x.downloadURL:void 0);var j,U;L?this.downloadURL=L.replace("${f}",N):(null===(U=e.results[0].rootRecord)||void 0===U||null===(U=U.fields)||void 0===U||null===(U=U.pkgManifest)||void 0===U?void 0:U.value)&&(this.isPackage=!0);const F=null===(E=e.results[0].share)||void 0===E?void 0:E.publicPermission;F&&"NONE"!==F&&(this.isPublicShare=!0);const z=e.results[0].participantStatus;this.shareeAcceptanceStatus=z||"UNKNOWN";const B=e.results[0].potentialMatchList;if(B&&B.length>0)for(let r=0;r<B.length;r++)this.outOfNetworkParticipantList.push({id:B[r].participantId,emailAddress:B[r].contactInformation.emailAddress,phoneNumber:B[r].contactInformation.phoneNumber});this.fileType=y(this.applicationIdentifier,this.isFolderSharing)}}function y(e,t){if(t)return Object(l.a)("CloudOS.iclouddrive.folder.FileType");switch(e){case"iclouddrive":return Object(l.a)("CloudOS.iclouddrive.FileType");case"notes":return Object(l.a)("CloudOS.notes.FileType");case"pages":return Object(l.a)("CloudOS.pages.FileType");case"numbers":return Object(l.a)("CloudOS.numbers.FileType");case"keynote":return Object(l.a)("CloudOS.keynote.FileType");case"iclouddrive.folder":return Object(l.a)("CloudOS.iclouddrive.folder.FileType");case"reminders":return Object(l.a)("CloudOS.reminders.FileType");case"calendar":return Object(l.a)("CloudOS.calendar.FileType");default:return""}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1e3),i=n(925);function o(e){let t;const n=e.familyName,o=e.nickname||e.givenName;function a(e){return e&&!/^\s*$/.test(e)?e:""}return o&&n&&(t=Object(r.a)(o)&&Object(r.a)(n)?Object(i.a)("Name.Display.NameIsCJK.FirstAndFamilyNames",{firstName:o,familyName:n}):Object(i.a)("Name.Display.FirstAndFamilyNames",{firstName:o,familyName:n})),a(t)||(t=a(o)||a(n)||a(e.emailAddress)||a(e.phoneNumber)||a(e.companyName)),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1305);class i{constructor(e,t,n,r,i,o,a,s,c,u,l){this.applicationIdentifier=e,this.guid=t,this.pGuid=n,this.shareURL=r,this.inviteToken=i,this.shareTitle=o,this.initiatedByFirstName=a,this.initiatedByLastName=s,this.initiatedByEmail=c,this.fileType=u,this._iconURL=l}get initiatedBy(){const e=this.initiatedByFirstName,t=this.initiatedByLastName;return Object(r.a)({givenName:e,familyName:t})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return g}));var r=n(2248),i=n(1306),o=n(925),a=n(973),s=n(888);let c=function(e){return e.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS="NoLongerShared",e.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS="AlreadyAccepted",e.UNEXPECTED_ERROR="",e}({});function u(e){switch(e){case"calendar":return Object(o.a)("CloudOS.calendar.FileType");case"reminders":return Object(o.a)("CloudOS.reminders.FileType");default:return""}}const l=s.z.object({initiatedByFirstName:s.z.string(),initiatedByLastName:s.z.string(),initiatedByEmail:s.z.string(),inviteToken:s.z.string(),shareTitle:s.z.string(),pGuid:s.z.string(),guid:s.z.string(),shareURL:s.z.string(),iconURL:s.z.string().optional()}),d=e=>403===e?c.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS:406===e?c.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS:c.UNEXPECTED_ERROR,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.UNEXPECTED_ERROR;return{status:"error",applicationIdentifier:e,fileType:u(e),error:t}};async function f(e,t){if(!Object(r.e)("calendar"))return p(t);const n="calendar"===t?"ca":"rd",o=`${n}/sharerequest/REDACTED`;try{var s,c;const f=await a.a.fetchJSON(Object(r.j)("calendar",`${n}/sharerequest/${e}`),{reportingPathname:o,validate:{type:"WireLegacyShareResponse",schema:l}}),h=null!==(s=null===(c=f.response)||void 0===c?void 0:c.status)&&void 0!==s?s:0;if(f.ok&&200===h){const e=f.value;return{status:"success",legacyAppShare:new i.a(t,e.guid,e.pGuid,e.shareURL,e.inviteToken,e.shareTitle,e.initiatedByFirstName,e.initiatedByLastName,e.initiatedByEmail,u(t),e.iconURL)}}return p(t,d(h))}catch{return p(t)}}async function h(e,t){var n,i;const o=e.guid,s=e.applicationIdentifier,u=`${"calendar"===s?"ca":"rd"}/sharereply/oon/${o}?usertz=${encodeURIComponent(t)}}`;let l;try{l=await a.a.fetchURL(Object(r.j)("calendar",u),{method:"POST",body:JSON.stringify({guid:o,status:"ACCEPTED",shareURL:e.shareURL,inviteToken:e.inviteToken,shareTitle:e.shareTitle,emailNotification:"immediately"})})}catch{l=null}const d=null!==(n=null===(i=l)||void 0===i?void 0:i.status)&&void 0!==n?n:0;if(!l||0===d)return{status:"error",error:"Timeout",applicationIdentifier:s};switch(d){case 200:return{status:"success",applicationIdentifier:s};case 404:return{status:"error",applicationIdentifier:s,error:c.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS};case 406:return{status:"error",applicationIdentifier:s,error:c.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS};default:return{status:"error",applicationIdentifier:s,error:c.UNEXPECTED_ERROR}}}const m=s.z.object({badge:s.z.number()});async function g(){try{const e=await a.a.fetchJSON(Object(r.j)("calendar","ca/state"),{method:"GET",validate:{type:"CalendarStateResponse",schema:m}});if(e.ok&&e.response.ok)return{isOK:!0,data:e.value}}catch{}return{isOK:!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=[{dispName:"English (U.S.)",locale:"en-us"},{dispName:"English (Australia)",locale:"en-au"},{dispName:"English (Canada)",locale:"en-ca"},{dispName:"English (New Zealand)",locale:"en-nz"},{dispName:"English (U.K.)",locale:"en-gb"},{dispName:"Fran\xe7ais",locale:"fr-fr"},{dispName:"Fran\xe7ais (Canada)",locale:"fr-ca"},{dispName:"Deutsch",locale:"de-de"},{dispName:"\u7b80\u4f53\u4e2d\u6587",locale:"zh-cn"},{dispName:"\u7e41\u9ad4\u4e2d\u6587\uff08\u9999\u6e2f\uff09",locale:"zh-hk"},{dispName:"\u7e41\u9ad4\u4e2d\u6587\uff08\u53f0\u7063\uff09",locale:"zh-tw"},{dispName:"\u65e5\u672c\u8a9e",locale:"ja-jp"},{dispName:"Espa\xf1ol",locale:"es-es"},{dispName:"Espa\xf1ol (M\xe9xico)",locale:"es-mx"},{dispName:"Italiano",locale:"it-it"},{dispName:"Nederlands",locale:"nl-nl"},{dispName:"\ud55c\uad6d\uc5b4",locale:"ko-kr"},{dispName:"Portugu\xeas (Brasil)",locale:"pt-br"},{dispName:"Portugu\xeas (Portugal)",locale:"pt-pt"},{dispName:"Dansk",locale:"da-dk"},{dispName:"Suomi",locale:"fi-fi"},{dispName:"Norsk bokm\xe5l",locale:"no-no"},{dispName:"Svenska",locale:"sv-se"},{dispName:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",locale:"ru-ru"},{dispName:"Polski",locale:"pl-pl"},{dispName:"T\xfcrk\xe7e",locale:"tr-tr"},{dispName:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",locale:"ar-sa"},{dispName:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",locale:"th-th"},{dispName:"\u010ce\u0161tina",locale:"cs-cz"},{dispName:"Magyar",locale:"hu-hu"},{dispName:"Catal\xe0",locale:"ca-es"},{dispName:"Hrvatski",locale:"hr-hr"},{dispName:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",locale:"el-gr"},{dispName:"\u05e2\u05d1\u05e8\u05d9\u05ea",locale:"iw-il"},{dispName:"Rom\xe2n\u0103",locale:"ro-ro"},{dispName:"Sloven\u010dina",locale:"sk-sk"},{dispName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",locale:"uk-ua"},{dispName:"Bahasa Indonesia",locale:"id-id"},{dispName:"Bahasa Melayu",locale:"ms-my"},{dispName:"Ti\u1ebfng Vi\u1ec7t",locale:"vi-vi"},{dispName:"\u0939\u093f\u0928\u094d\u0926\u0940",locale:"hi-in"},{dispName:"Sloven\u0161\u010dina",locale:"sl-si"},{dispName:"\u09ac\u09be\u0982\u09b2\u09be",locale:"bn-bd"},{dispName:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",locale:"gu-in"},{dispName:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",locale:"kn-in"},{dispName:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",locale:"ml-in"},{dispName:"\u092e\u0930\u093e\u0920\u0940",locale:"mr-in"},{dispName:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",locale:"or-in"},{dispName:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",locale:"pa-in"},{dispName:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",locale:"ta-in"},{dispName:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",locale:"te-in"},{dispName:"\u0627\u0631\u062f\u0648",locale:"ur-pk"}]},function(e,t,n){"use strict";function r(){return window.visualViewport?{offsetLeft:window.visualViewport.offsetLeft,offsetTop:window.visualViewport.offsetTop,pageLeft:window.visualViewport.pageLeft,pageTop:window.visualViewport.pageTop,width:window.visualViewport.width,height:window.visualViewport.height,scale:window.visualViewport.scale}:{offsetLeft:0,offsetTop:0,pageLeft:0,pageTop:0,width:window.innerWidth,height:window.innerHeight,scale:1}}n.d(t,"a",(function(){return r})),n(870)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n(2241),i=n(1259),o=n(965),a=n(2155);function s(){return Object(o.f)()}function c(){var e;return null===(e=a.h.value)||void 0===e||null===(e=e.details)||void 0===e||null===(e=e.beneficiaryInfo)||void 0===e?void 0:e.isBeneficiary}function u(){var e;return!Object(o.i)()||!(!Object(o.f)()||null===(e=a.h.value)||void 0===e||null===(e=e.details)||void 0===e||null===(e=e.beneficiaryInfo)||void 0===e||!e.isBeneficiary)}function l(){return!!r.a.sharedInstance.applicationParameter.mailDropDetail}function d(){return r.a.sharedInstance.applicationIdentifier!==i.b.identifier&&!l()&&u()}function p(){return Object(o.h)()&&!l()}function f(){return u()||Object(o.h)()}},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n(1199).a;const r="RESPONSE_UNKNOWN",i="STATUS_UNKNOWN";var o;!function(e){e.VIP="fromVip",e.Flagged="flagged",e.ToMe="toMe",e.CCMe="ccMe",e.HME="hme",e.Unread="unread"}(o||(o={}));const a="com.icloud.maildata"},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(898),i=n(1299),o=n(888),a=n(1313),s=n(976),c=n(2251),u=n(2212),l=n(2308),d=n(1267),p=n(2248);const f="com.apple.Safari.TopBookmark",h=o.z.object({isCKError:o.z.literal(!0)});function m(e){return h.safeParse(e).success}const g=o.z.object({default:o.z.object({sortValues:o.z.array(o.z.object({sortValue:o.z.number(),deviceIdentifier:o.z.string(),changeID:o.z.number()}))}).optional()});var v=function(e){return e[e.NOT_YET_STARTED=0]="NOT_YET_STARTED",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETE=2]="COMPLETE",e}(v||{});class y{static get shared(){return this._shared||(this._shared=new y),this._shared}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new i.a;this.cloudKitJS=void 0,this.bookmarkRecords={},this.listeners=new Set,this.batchSize=10,this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0,this.changeId=1,this.remoteMinimumSyncAPIVersion=void 0,this.migrationState=void 0,this.ckDatabase=null,this.syncPromise=void 0,this._isLoading=!0,this.handlePush=e=>{var t;(null===(t=e.data.ckInfo)||void 0===t?void 0:t.containerIdentifier)===y.containerIdentifier&&this.syncBookmarks()},this.cloudKitJS=e,this.syncBookmarks()}getBookmarkRecord(e){return this.bookmarkRecords[e]}forEachBookmarkRecord(e){for(const t in this.bookmarkRecords)e(this.bookmarkRecords[t])}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}async getCKDatabase(){if(this.ckDatabase)return this.ckDatabase;const e=y.containerIdentifier;Object(d.b)(this.handlePush),Object(d.a)({containerIdentifiers:[e]});const t=await this.cloudKitJS.instanceForContainer(e,Object(p.j)("ckdatabasews"));return this.ckDatabase=t.instance.getDefaultContainer().privateCloudDatabase,this.ckDatabase}get isClientObsolete(){var e;return(null!==(e=this.remoteMinimumSyncAPIVersion)&&void 0!==e?e:1)>1}get isLoading(){return this._isLoading}set isLoading(e){this._isLoading=e;for(const n of this.listeners){var t;null===(t=n.loadingDidChange)||void 0===t||t.call(n,this,e)}}handleSyncError(e){for(const t of e){if(!m(t))return!1;if("FULL_RESET_NEEDED"===t.serverErrorCode||"FULL_RESET_NEEDED"===t.ckErrorCode)return this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0,this.bookmarkRecords={},!0}return!1}syncBookmarks(){return this.syncPromise||(this.syncPromise=(async()=>{const e=await this.getCKDatabase();await u.a.sharedInstance.getPCSKeyPromise(l.b);let t=!1;for(;;)try{var n;const i=await e.fetchRecordZoneChanges({zoneID:{zoneName:"Bookmarks"},...!!this.syncToken&&{syncToken:this.syncToken}});if(i.hasErrors){if(this.handleSyncError(i.errors))continue;break}const o=null===(n=i.zones)||void 0===n?void 0:n[0];if(!o)break;for(const e of null!==(r=null===o||void 0===o?void 0:o.records)&&void 0!==r?r:[]){var r;t=this.ingestRecord(e)||t}if(!o.moreComing||this.syncToken===o.syncToken)break;this.syncToken=o.syncToken}catch(s){if(this.handleSyncError([s]))continue;break}for(const c in this.bookmarkRecords){var i;const e=this.bookmarkRecords[c];if("BookmarkLeaf"!==e.recordType)continue;let t=null===(i=e.fields.ParentFolder)||void 0===i?void 0:i.value.recordName;for(;t;){var o;"Reading List"===t&&delete this.bookmarkRecords[c];const e=this.bookmarkRecords[t];if(!e)break;t=null===(o=e.fields.ParentFolder)||void 0===o?void 0:o.value.recordName}}this.migrationState=function(e){var t;const n=null===(t=p.c.value)||void 0===t?void 0:t.safariBookmarksHasMigratedToCloudKit;switch(e){case v.COMPLETE:return n||Object(c.b)("https://setup.icloud.com/setup/ws/1/updateAccount",{method:"POST",body:JSON.stringify({SafariBookmarksHasMigratedToCloudKit:!0})}),e;case v.IN_PROGRESS:return e;case v.NOT_YET_STARTED:default:return n?v.COMPLETE:e}}(this.migrationState);const a=function(e){const t={},n=[];for(const u in e){var r,i,o,a,s,c;const l=e[u],d=null===(r=l.fields.IdentityHash)||void 0===r?void 0:r.value;if(!d)continue;const p=null===(i=l.fields.ParentFolder)||void 0===i?void 0:i.value.recordName;if(!p)continue;const f=`${p}/${d}`,h=t[f];if(!h){t[f]=l;continue}const m=null===(o=l.fields.Title)||void 0===o?void 0:o.value,g=null===(a=h.fields.Title)||void 0===a?void 0:a.value,v=l.modified.timestamp,y=h.modified.timestamp;(m?1:0)+(v?1:0)+((null===(s=l.fields.URL)||void 0===s?void 0:s.value)?1:0)>(g?1:0)+(y?1:0)+((null===(c=h.fields.URL)||void 0===c?void 0:c.value)?1:0)?(t[f]=l,n.push(h)):n.push(l)}return n}(this.bookmarkRecords);for(const c of a)delete this.bookmarkRecords[c.recordName];return t&&this.notifyChangeListeners(),this.syncPromise=void 0,this.isLoading=!1,!0})()),this.syncPromise}notifyChangeListeners(){for(const t of this.listeners){var e;null===(e=t.bookmarksDidChange)||void 0===e||e.call(t,this)}}updateRootBookmarkAppendIndex(e){var t,n,r,i;if((null===(t=e.fields.ParentFolder)||void 0===t?void 0:t.value.recordName)!==f)return;const o=null===(n=e.fields.Position)||void 0===n?void 0:n.value;if(!o)return;const a=b(o),s=null===a||void 0===a||null===(r=a.default)||void 0===r?void 0:r.sortValues,c=null===s||void 0===s||null===(i=s[0])||void 0===i?void 0:i.sortValue;if(!c)return;const u=this.rootBookmarkAppendIndex;(void 0===u||c>u)&&(this.rootBookmarkAppendIndex=c)}ingestRecord(e){var t,n;if(e.deleted)return delete this.bookmarkRecords[e.recordName],!0;switch(e.recordType){case"BookmarkList":case"BookmarkLeaf":{const t=e;return this.updateRootBookmarkAppendIndex(t),this.bookmarkRecords[e.recordName]=t,!0}case"MigrationState":return this.migrationState=null===(t=e.fields)||void 0===t||null===(t=t.MigrationState)||void 0===t?void 0:t.value,!0;case"SyncRequirements":return this.remoteMinimumSyncAPIVersion=null===(n=e.fields)||void 0===n?void 0:n.MinimumSyncAPIVersion.value,!0;default:return!1}}async restoreBookmarkRecords(e){if(this.isClientObsolete)return!1;const t=await this.getCKDatabase();let n=!1;const r=function(e,t){const n=new Map,r=[],i=e=>{const t=e.recordName,i=n.get(t);void 0!==i&&(r[i]=null),n.set(t,r.length),r.push(e)};for(const l of e){var o;const e=t[l];if(!e)continue;i(e);let n=null===(o=e.fields.ParentFolder)||void 0===o?void 0:o.value.recordName;for(;n&&n!==f;){var a;const e=t[n];if(!e)break;i(e),n=null===(a=e.fields.ParentFolder)||void 0===a?void 0:a.value.recordName}}const s=[];for(let l=r.length-1;l>=0;--l){var c,u;const e=r[l];if(!e)continue;const n=null===(c=e.fields.ParentFolder)||void 0===c?void 0:c.value.recordName,i=void 0!==n?t[n]:void 0;(null!==(u=e.fields.Deleted)&&void 0!==u&&u.value||!i)&&s.push(e.recordName)}return s}(e,this.bookmarkRecords);for(let o=0;o<r.length;o+=this.batchSize){let e=r.slice(o,this.batchSize);for(let r=0;;++r)try{const i=await this.restoreItemsBatchSendRequest(t,e);if(!i.isRecordsResponse)return!1;for(const e of i.records)n=this.ingestRecord(e)||n;if(!i.hasErrors)break;if(e=await this.handleError(i.errors,r),0===e.length)return n&&this.notifyChangeListeners(),!1}catch(i){if(e=await this.handleError([i],r),0===e.length)return n&&this.notifyChangeListeners(),!1}}return n&&this.notifyChangeListeners(),this.syncBookmarks(),!0}async restoreItemsBatchSendRequest(e,t){const n=[],i="iCloud_"+r.a.clientId;for(const r of t){var o,a,s,c,u;const e=this.bookmarkRecords[r];if(!e)continue;const t={recordName:e.recordName,recordChangeTag:e.recordChangeTag,recordType:e.recordType,fields:{Deleted:{value:0},Deleted_generation:{value:(null!==(o=null===(a=e.fields.Deleted_generation)||void 0===a?void 0:a.value)&&void 0!==o?o:0)+1},Deleted_deviceIdentifier:{value:i}}},m=null===(s=e.fields.ParentFolder)||void 0===s?void 0:s.value.recordName;if((!m||null===(c=this.bookmarkRecords[m])||void 0===c||!c)&&(null===(u=e.fields.ParentFolder)||void 0===u?void 0:u.value.recordName)){var l,d,p,h;t.fields.ParentAndPosition_generation={value:(null!==(l=null===(d=e.fields.ParentAndPosition_generation)||void 0===d?void 0:d.value)&&void 0!==l?l:0)+1},t.fields.ParentAndPosition_deviceIdentifier={value:i},t.fields.ParentFolder={type:"REFERENCE",value:{recordName:f}};const n=this.rootBookmarkAppendIndex,r=void 0===n?0:n+1e3;this.rootBookmarkAppendIndex=r;const o=[{sortValue:r,deviceIdentifier:i,changeID:this.changeId++}],a=null===(p=e.fields.Position)||void 0===p?void 0:p.value,s=a&&null!==(h=b(a))&&void 0!==h?h:{};s.default={sortValues:o},t.fields.Position={value:w(s)}}n.push(t)}return e.saveRecords(n,{zoneID:{zoneName:"Bookmarks"}})}async deleteBookmarkRecords(e){if(this.isClientObsolete)return!1;const t=await this.getCKDatabase();let n=!1;for(let i=0;i<e.length;i+=this.batchSize){let o=e.slice(i,this.batchSize);for(let e=0;;++e)try{const r=await t.deleteRecords(o,{zoneID:{zoneName:"Bookmarks"}});if(!r.isRecordsResponse)return!1;for(const e of r.records)n=this.ingestRecord(e)||n;if(!r.hasErrors)break;if(o=await this.handleError(r.errors,e),0===o.length)return n&&this.notifyChangeListeners(),!1}catch(r){if(o=await this.handleError([r],e),0===o.length)return n&&this.notifyChangeListeners(),!1}}return n&&this.notifyChangeListeners(),this.syncBookmarks(),!0}async handleError(e,t){let n=!1;const r=[];for(const a of e){var i;if(m(a))switch(null!==(i=a.serverErrorCode)&&void 0!==i?i:a.ckErrorCode){case"FULL_RESET_NEEDED":n=!0,this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0;break;case CloudKit.CKError.INTERNAL_ERROR:case CloudKit.CKError.INVALID_ARGUMENTS:case CloudKit.CKError.QUOTA_EXCEEDED:case"PARTIAL_FAILURE":case"UNKNOWN_ITEM":case"BATCH_REQUEST_FAILED":case"LIMIT_EXCEEDED":case"BAD_CONTAINER":case"MISSING_ENTITLEMENT":case"NOT_AUTHENTICATED":case"PERMISSION_FAILURE":case"SERVER_REJECTED_REQUEST":case"INCOMPATIBLE_VERSION":case"CONSTRAINT_VIOLATION":case"BAD_DATABASE":case"OPERATION_CANCELLED":case"RESULTS_TRUNCATED":case"ASSET_FILE_NOT_FOUND":case"ASSET_FILE_MODIFIED":case"TOO_MANY_PARTICIPANTS":case"ALREADY_SHARED":case"REFERENCE_VIOLATION":case"MANAGED_ACCOUNT_RESTRICTED":case"PARTICIPANT_MAY_NEED_VERIFICATION":case CloudKit.CKError.ZONE_NOT_FOUND:case"USER_DELETED_ZONE":case CloudKit.CKError.ACCESS_DENIED:case CloudKit.CKError.ATOMIC_ERROR:case CloudKit.CKError.AUTHENTICATION_FAILED:case CloudKit.CKError.AUTHENTICATION_REQUIRED:case CloudKit.CKError.AUTH_PERSIST_ERROR:case CloudKit.CKError.BAD_REQUEST:case CloudKit.CKError.CONFIGURATION_ERROR:case CloudKit.CKError.EXISTS:case CloudKit.CKError.NOT_FOUND:case CloudKit.CKError.SHARE_UI_TIMEOUT:case CloudKit.CKError.SIGN_IN_FAILED:case CloudKit.CKError.UNEXPECTED_SERVER_RESPONSE:case CloudKit.CKError.UNIQUE_FIELD_ERROR:case CloudKit.CKError.VALIDATING_REFERENCE_ERROR:case CloudKit.CKError.NETWORK_ERROR:case CloudKit.CKError.TRY_AGAIN_LATER:case CloudKit.CKError.THROTTLED:case CloudKit.CKError.SERVICE_UNAVAILABLE:case"NETWORK_UNAVAILABLE":case"NETWORK_FAILURE":case"REQUEST_RATE_LIMITED":case"SERVER_RESPONSE_LOST":break;case"SERVER_RECORD_CHANGED":case"CHANGE_TOKEN_EXPIRED":case"OP_LOCK_FAILURE":case CloudKit.CKError.CONFLICT:case CloudKit.CKError.ZONE_BUSY:case CloudKit.CKError.UNKNOWN_ERROR:default:a.recordName&&r.push(a.recordName)}}const o=[1e3,3e3,5e3,1e4];if((n||r.length>0)&&t<o.length){const e=o[t];return await Object(s.a)(e,`try ${t}`),await this.syncBookmarks(),n?[]:r}return await this.syncBookmarks(),[]}}function b(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;++a)n[a]=t.charCodeAt(a);const r=a.a.inflate(n);let i="";for(let a=0;a<r.length;++a)i+=String.fromCharCode(r[a]);const o=JSON.parse(i);return s=o,g.safeParse(s).success?o:null;var s}function w(e){const t=JSON.stringify(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;++o)n[o]=t.charCodeAt(o);const r=a.a.deflate(n);let i="";for(let o=0;o<r.length;++o)i+=String.fromCharCode(r[o]);return btoa(i)}y.containerIdentifier="com.apple.SafariShared.WBSCloudBookmarksStore",y._shared=void 0},function(e,t,n){"use strict";function r(e){let t=e.length;for(;--t>=0;)e[t]=0}n.d(t,"a",(function(){return pn})),n.d(t,"b",(function(){return dn}));const i=new Uint8Array([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]),o=new Uint8Array([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]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);r(c);const u=new Array(60);r(u);const l=new Array(512);r(l);const d=new Array(256);r(d);const p=new Array(29);r(p);const f=new Array(30);function h(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let m,g,v;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}r(f);const b=e=>e<256?l[e]:l[256+(e>>>7)],w=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},S=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},C=(e,t,n)=>{S(e,n[2*t],n[2*t+1])},_=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},O=(e,t,n)=>{const r=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=_(r[t]++,t))}},E=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},I=e=>{e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},A=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},T=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!A(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},P=(e,t,n)=>{let r,a,s,c,u=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],a=e.pending_buf[e.l_buf+u],u++,0===r?C(e,a,t):(s=d[a],C(e,s+256+1,t),c=i[s],0!==c&&(a-=p[s],S(e,a,c)),r--,s=b(r),C(e,s,n),c=o[s],0!==c&&(r-=f[s],S(e,r,c)))}while(u<e.last_lit);C(e,256,t)},R=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,c,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<o;a++)0!==n[2*a]?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):n[2*a+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[2*c+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)T(e,n,a);c=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*c]=n[2*a]+n[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=c,e.heap[1]=c++,T(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,p,f,h,m=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],p=n[2*n[2*l+1]+1]+1,p>c&&(p=c,m++),n[2*l+1]=p,l>r||(e.bl_count[p]++,f=0,l>=s&&(f=a[l-s]),h=n[2*l],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[2*l+1]+f)));if(0!==m){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(l=e.bl_count[p];0!==l;)d=e.heap[--u],d>r||(n[2*d+1]!==p&&(e.opt_len+=(p-n[2*d+1])*n[2*d],n[2*d+1]=p),l--)}})(e,t),O(n,u,e.bl_count)},k=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))},D=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<u)do{C(e,i,e.bl_tree)}while(0!==--s);else 0!==i?(i!==o&&(C(e,i,e.bl_tree),s--),C(e,16,e.bl_tree),S(e,s-3,2)):s<=10?(C(e,17,e.bl_tree),S(e,s-3,3)):(C(e,18,e.bl_tree),S(e,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}};let M=!1;const N=(e,t,n,r)=>{S(e,0+(r?1:0),3),((e,t,n)=>{I(e),w(e,n),w(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var x={_tr_init:e=>{M||((()=>{let e,t,n,r,s;const y=new Array(16);for(n=0,r=0;r<28;r++)for(p[r]=n,e=0;e<1<<i[r];e++)d[n++]=r;for(d[n-1]=r,s=0,r=0;r<16;r++)for(f[r]=s,e=0;e<1<<o[r];e++)l[s++]=r;for(s>>=7;r<30;r++)for(f[r]=s<<7,e=0;e<1<<o[r]-7;e++)l[256+s++]=r;for(t=0;t<=15;t++)y[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,y[8]++;for(;e<=255;)c[2*e+1]=9,e++,y[9]++;for(;e<=279;)c[2*e+1]=7,e++,y[7]++;for(;e<=287;)c[2*e+1]=8,e++,y[8]++;for(O(c,287,y),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=_(e,5);m=new h(c,i,257,286,15),g=new h(u,o,0,30,15),v=new h(new Array(0),a,0,19,7)})(),M=!0),e.l_desc=new y(e.dyn_ltree,m),e.d_desc=new y(e.dyn_dtree,g),e.bl_desc=new y(e.bl_tree,v),e.bi_buf=0,e.bi_valid=0,E(e)},_tr_stored_block:N,_tr_flush_block:(e,t,n,r)=>{let i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),R(e,e.l_desc),R(e,e.d_desc),a=(e=>{let t;for(k(e,e.dyn_ltree,e.l_desc.max_code),k(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?N(e,t,n,r):4===e.strategy||o===i?(S(e,2+(r?1:0),3),P(e,c,u)):(S(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(S(e,t-257,5),S(e,n-1,5),S(e,r-4,4),i=0;i<r;i++)S(e,e.bl_tree[2*s[i]+1],3);D(e,e.dyn_ltree,t-1),D(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),P(e,e.dyn_ltree,e.dyn_dtree)),E(e),r&&I(e)},_tr_tally:(e,t,n)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(d[n]+256+1)]++,e.dyn_dtree[2*b(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{S(e,2,3),C(e,256,c),(e=>{16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},L=(e,t,n,r)=>{let i=65535&e,o=e>>>16&65535,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const j=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var U=(e,t,n,r)=>{const i=j,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return~e},F={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},z={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:B,_tr_stored_block:K,_tr_flush_block:H,_tr_tally:W,_tr_align:q}=x,{Z_NO_FLUSH:V,Z_PARTIAL_FLUSH:$,Z_FULL_FLUSH:G,Z_FINISH:Z,Z_BLOCK:Q,Z_OK:Y,Z_STREAM_END:J,Z_STREAM_ERROR:X,Z_DATA_ERROR:ee,Z_BUF_ERROR:te,Z_DEFAULT_COMPRESSION:ne,Z_FILTERED:re,Z_HUFFMAN_ONLY:ie,Z_RLE:oe,Z_FIXED:ae,Z_DEFAULT_STRATEGY:se,Z_UNKNOWN:ce,Z_DEFLATED:ue}=z,le=258,de=262,pe=103,fe=113,he=666,me=(e,t)=>(e.msg=F[t],t),ge=e=>(e<<1)-(e>4?9:0),ve=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let ye=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const be=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},we=(e,t)=>{H(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,be(e.strm)},Se=(e,t)=>{e.pending_buf[e.pending++]=t},Ce=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},_e=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=L(e.adler,t,i,n):2===e.state.wrap&&(e.adler=U(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Oe=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-de?e.strstart-(e.w_size-de):0,u=e.window,l=e.w_mask,d=e.prev,p=e.strstart+le;let f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<p);if(r=le-(p-o),o=p-le,r>a){if(e.match_start=t,a=r,r>=s)break;f=u[o+a-1],h=u[o+a]}}}while((t=d[t&l])>c&&0!==--i);return a<=e.lookahead?a:e.lookahead},Ee=e=>{const t=e.w_size;let n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-de)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{i=e.head[--n],e.head[n]=i>=t?i-t:0}while(--r);r=t,n=r;do{i=e.prev[--n],e.prev[n]=i>=t?i-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=_e(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=ye(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=ye(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<de&&0!==e.strm.avail_in)},Ie=(e,t)=>{let n,r;for(;;){if(e.lookahead<de){if(Ee(e),e.lookahead<de&&t===V)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-de&&(e.match_length=Oe(e,n)),e.match_length>=3)if(r=W(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ye(e,e.ins_h,e.window[e.strstart+1]);else r=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Z?(we(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(we(e,!1),0===e.strm.avail_out)?1:2},Ae=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<de){if(Ee(e),e.lookahead<de&&t===V)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-de&&(e.match_length=Oe(e,n),e.match_length<=5&&(e.strategy===re||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=W(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(we(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=W(e,0,e.window[e.strstart-1]),r&&we(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=W(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Z?(we(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(we(e,!1),0===e.strm.avail_out)?1:2};function Te(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Pe=[new Te(0,0,0,0,((e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ee(e),0===e.lookahead&&t===V)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,we(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-de&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(we(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(we(e,!1),e.strm.avail_out),1)})),new Te(4,4,8,4,Ie),new Te(4,5,16,8,Ie),new Te(4,6,32,32,Ie),new Te(4,4,16,16,Ae),new Te(8,16,32,32,Ae),new Te(8,16,128,128,Ae),new Te(8,32,128,256,Ae),new Te(32,128,258,1024,Ae),new Te(32,258,258,4096,Ae)];function Re(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ve(this.dyn_ltree),ve(this.dyn_dtree),ve(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ve(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ve(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ke=e=>{if(!e||!e.state)return me(e,X);e.total_in=e.total_out=0,e.data_type=ce;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:fe,e.adler=2===t.wrap?0:1,t.last_flush=V,B(t),Y},De=e=>{const t=ke(e);var n;return t===Y&&((n=e.state).window_size=2*n.w_size,ve(n.head),n.max_lazy_match=Pe[n.level].max_lazy,n.good_match=Pe[n.level].good_length,n.nice_match=Pe[n.level].nice_length,n.max_chain_length=Pe[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},Me=(e,t,n,r,i,o)=>{if(!e)return X;let a=1;if(t===ne&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>ae)return me(e,X);8===r&&(r=9);const s=new Re;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,De(e)};var Ne=Me,xe=(e,t)=>e&&e.state?2!==e.state.wrap?X:(e.state.gzhead=t,Y):X,Le=(e,t)=>{let n,r;if(!e||!e.state||t>Q||t<0)return e?me(e,X):X;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||i.status===he&&t!==Z)return me(e,0===e.avail_out?te:X);i.strm=e;const o=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,Se(i,31),Se(i,139),Se(i,8),i.gzhead?(Se(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Se(i,255&i.gzhead.time),Se(i,i.gzhead.time>>8&255),Se(i,i.gzhead.time>>16&255),Se(i,i.gzhead.time>>24&255),Se(i,9===i.level?2:i.strategy>=ie||i.level<2?4:0),Se(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Se(i,255&i.gzhead.extra.length),Se(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=U(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(Se(i,0),Se(i,0),Se(i,0),Se(i,0),Se(i,0),Se(i,9===i.level?2:i.strategy>=ie||i.level<2?4:0),Se(i,3),i.status=fe);else{let t=ue+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=ie||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=fe,Ce(i,t),0!==i.strstart&&(Ce(i,e.adler>>>16),Ce(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),be(e),n=i.pending,i.pending!==i.pending_buf_size));)Se(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),be(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Se(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),be(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Se(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=U(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=pe)}else i.status=pe;if(i.status===pe&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&be(e),i.pending+2<=i.pending_buf_size&&(Se(i,255&e.adler),Se(i,e.adler>>8&255),e.adler=0,i.status=fe)):i.status=fe),0!==i.pending){if(be(e),0===e.avail_out)return i.last_flush=-1,Y}else if(0===e.avail_in&&ge(t)<=ge(o)&&t!==Z)return me(e,te);if(i.status===he&&0!==e.avail_in)return me(e,te);if(0!==e.avail_in||0!==i.lookahead||t!==V&&i.status!==he){let n=i.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ee(e),0===e.lookahead)){if(t===V)return 1;break}if(e.match_length=0,n=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(we(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(we(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===oe?((e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=le){if(Ee(e),e.lookahead<=le&&t===V)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+le;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=le-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=W(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(we(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(we(e,!1),0===e.strm.avail_out)?1:2})(i,t):Pe[i.level].func(i,t);if(3!==n&&4!==n||(i.status=he),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),Y;if(2===n&&(t===$?q(i):t!==Q&&(K(i,0,0,!1),t===G&&(ve(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),be(e),0===e.avail_out))return i.last_flush=-1,Y}return t!==Z?Y:i.wrap<=0?J:(2===i.wrap?(Se(i,255&e.adler),Se(i,e.adler>>8&255),Se(i,e.adler>>16&255),Se(i,e.adler>>24&255),Se(i,255&e.total_in),Se(i,e.total_in>>8&255),Se(i,e.total_in>>16&255),Se(i,e.total_in>>24&255)):(Ce(i,e.adler>>>16),Ce(i,65535&e.adler)),be(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?Y:J)},je=e=>{if(!e||!e.state)return X;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==pe&&t!==fe&&t!==he?me(e,X):(e.state=null,t===fe?me(e,ee):Y)},Ue=(e,t)=>{let n=t.length;if(!e||!e.state)return X;const r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return X;if(1===i&&(e.adler=L(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(ve(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ee(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=ye(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ee(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,Y};const Fe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ze=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Fe(n,t)&&(e[t]=n[t])}}return e},Be=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let t=e[r];n.set(t,i),i+=t.length}return n};let Ke=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(fn){Ke=!1}const He=new Uint8Array(256);for(let hn=0;hn<256;hn++)He[hn]=hn>=252?6:hn>=248?5:hn>=240?4:hn>=224?3:hn>=192?2:1;He[254]=He[254]=1;var We=e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},qe=(e,t)=>{const n=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,i;const o=new Array(2*n);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){o[i++]=t;continue}let a=He[t];if(a>4)o[i++]=65533,r+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&r<n;)t=t<<6|63&e[r++],a--;a>1?o[i++]=65533:t<65536?o[i++]=t:(t-=65536,o[i++]=55296|t>>10&1023,o[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ke)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(o,i)},Ve=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+He[e[n]]>t?n:t},$e=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ge=Object.prototype.toString,{Z_NO_FLUSH:Ze,Z_SYNC_FLUSH:Qe,Z_FULL_FLUSH:Ye,Z_FINISH:Je,Z_OK:Xe,Z_STREAM_END:et,Z_DEFAULT_COMPRESSION:tt,Z_DEFAULT_STRATEGY:nt,Z_DEFLATED:rt}=z;function it(e){this.options=ze({level:tt,method:rt,chunkSize:16384,windowBits:15,memLevel:8,strategy:nt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;let n=Ne(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Xe)throw new Error(F[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"===typeof t.dictionary?We(t.dictionary):"[object ArrayBuffer]"===Ge.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Ue(this.strm,e),n!==Xe)throw new Error(F[n]);this._dict_set=!0}}function ot(e,t){const n=new it(t);if(n.push(e,!0),n.err)throw n.msg||F[n.err];return n.result}it.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Je:Ze,"string"===typeof e?n.input=We(e):"[object ArrayBuffer]"===Ge.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Qe||o===Ye)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=Le(n,o),i===et)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=je(this.strm),this.onEnd(i),this.ended=!0,i===Xe;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},it.prototype.onData=function(e){this.chunks.push(e)},it.prototype.onEnd=function(e){e===Xe&&(this.result=Be(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var at={Deflate:it,deflate:ot,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ot(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ot(e,t)},constants:z},st=function(e,t){let n,r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,w,S,C,_,O,E;const I=e.state;n=e.next_in,O=e.input,r=n+(e.avail_in-5),i=e.next_out,E=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=I.dmax,c=I.wsize,u=I.whave,l=I.wnext,d=I.window,p=I.hold,f=I.bits,h=I.lencode,m=I.distcode,g=(1<<I.lenbits)-1,v=(1<<I.distbits)-1;e:do{f<15&&(p+=O[n++]<<f,f+=8,p+=O[n++]<<f,f+=8),y=h[p&g];t:for(;;){if(b=y>>>24,p>>>=b,f-=b,b=y>>>16&255,0===b)E[i++]=65535&y;else{if(!(16&b)){if(0===(64&b)){y=h[(65535&y)+(p&(1<<b)-1)];continue t}if(32&b){I.mode=12;break e}e.msg="invalid literal/length code",I.mode=30;break e}w=65535&y,b&=15,b&&(f<b&&(p+=O[n++]<<f,f+=8),w+=p&(1<<b)-1,p>>>=b,f-=b),f<15&&(p+=O[n++]<<f,f+=8,p+=O[n++]<<f,f+=8),y=m[p&v];n:for(;;){if(b=y>>>24,p>>>=b,f-=b,b=y>>>16&255,!(16&b)){if(0===(64&b)){y=m[(65535&y)+(p&(1<<b)-1)];continue n}e.msg="invalid distance code",I.mode=30;break e}if(S=65535&y,b&=15,f<b&&(p+=O[n++]<<f,f+=8,f<b&&(p+=O[n++]<<f,f+=8)),S+=p&(1<<b)-1,S>s){e.msg="invalid distance too far back",I.mode=30;break e}if(p>>>=b,f-=b,b=i-o,S>b){if(b=S-b,b>u&&I.sane){e.msg="invalid distance too far back",I.mode=30;break e}if(C=0,_=d,0===l){if(C+=c-b,b<w){w-=b;do{E[i++]=d[C++]}while(--b);C=i-S,_=E}}else if(l<b){if(C+=c+l-b,b-=l,b<w){w-=b;do{E[i++]=d[C++]}while(--b);if(C=0,l<w){b=l,w-=b;do{E[i++]=d[C++]}while(--b);C=i-S,_=E}}}else if(C+=l-b,b<w){w-=b;do{E[i++]=d[C++]}while(--b);C=i-S,_=E}for(;w>2;)E[i++]=_[C++],E[i++]=_[C++],E[i++]=_[C++],w-=3;w&&(E[i++]=_[C++],w>1&&(E[i++]=_[C++]))}else{C=i-S;do{E[i++]=E[C++],E[i++]=E[C++],E[i++]=E[C++],w-=3}while(w>2);w&&(E[i++]=E[C++],w>1&&(E[i++]=E[C++]))}break}}break}}while(n<r&&i<a);w=f>>3,n-=w,f-=w<<3,p&=(1<<f)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<a?a-i+257:257-(i-a),I.hold=p,I.bits=f};const ct=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ut=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),lt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var pt=(e,t,n,r,i,o,a,s)=>{const c=s.bits;let u,l,d,p,f,h,m=0,g=0,v=0,y=0,b=0,w=0,S=0,C=0,_=0,O=0,E=null,I=0;const A=new Uint16Array(16),T=new Uint16Array(16);let P,R,k,D=null,M=0;for(m=0;m<=15;m++)A[m]=0;for(g=0;g<r;g++)A[t[n+g]]++;for(b=c,y=15;y>=1&&0===A[y];y--);if(b>y&&(b=y),0===y)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v<y&&0===A[v];v++);for(b<v&&(b=v),C=1,m=1;m<=15;m++)if(C<<=1,C-=A[m],C<0)return-1;if(C>0&&(0===e||1!==y))return-1;for(T[1]=0,m=1;m<15;m++)T[m+1]=T[m]+A[m];for(g=0;g<r;g++)0!==t[n+g]&&(a[T[t[n+g]]++]=g);if(0===e?(E=D=a,h=19):1===e?(E=ct,I-=257,D=ut,M-=257,h=256):(E=lt,D=dt,h=-1),O=0,g=0,m=v,f=o,w=b,S=0,d=-1,_=1<<b,p=_-1,1===e&&_>852||2===e&&_>592)return 1;for(;;){P=m-S,a[g]<h?(R=0,k=a[g]):a[g]>h?(R=D[M+a[g]],k=E[I+a[g]]):(R=96,k=0),u=1<<m-S,l=1<<w,v=l;do{l-=u,i[f+(O>>S)+l]=P<<24|R<<16|k}while(0!==l);for(u=1<<m-1;O&u;)u>>=1;if(0!==u?(O&=u-1,O+=u):O=0,g++,0===--A[m]){if(m===y)break;m=t[n+a[g]]}if(m>b&&(O&p)!==d){for(0===S&&(S=b),f+=v,w=m-S,C=1<<w;w+S<y&&(C-=A[w+S],!(C<=0));)w++,C<<=1;if(_+=1<<w,1===e&&_>852||2===e&&_>592)return 1;d=O&p,i[d]=b<<24|w<<16|f-o}}return 0!==O&&(i[f+O]=m-S<<24|64<<16),s.bits=b,0};const{Z_FINISH:ft,Z_BLOCK:ht,Z_TREES:mt,Z_OK:gt,Z_STREAM_END:vt,Z_NEED_DICT:yt,Z_STREAM_ERROR:bt,Z_DATA_ERROR:wt,Z_MEM_ERROR:St,Z_BUF_ERROR:Ct,Z_DEFLATED:_t}=z,Ot=12,Et=30,It=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function At(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Tt=e=>{if(!e||!e.state)return bt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,gt},Pt=e=>{if(!e||!e.state)return bt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Tt(e)},Rt=(e,t)=>{let n;if(!e||!e.state)return bt;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?bt:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Pt(e))},kt=(e,t)=>{if(!e)return bt;const n=new At;e.state=n,n.window=null;const r=Rt(e,t);return r!==gt&&(e.state=null),r};let Dt,Mt,Nt=!0;const xt=e=>{if(Nt){Dt=new Int32Array(512),Mt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(pt(1,e.lens,0,288,Dt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;pt(2,e.lens,0,32,Mt,0,e.work,{bits:5}),Nt=!1}e.lencode=Dt,e.lenbits=9,e.distcode=Mt,e.distbits=5},Lt=(e,t,n,r)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var jt=Pt,Ut=kt,Ft=(e,t)=>{let n,r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,w,S,C,_,O=0;const E=new Uint8Array(4);let I,A;const T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return bt;n=e.state,n.mode===Ot&&(n.mode=13),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,l=n.bits,d=s,p=c,_=gt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===u){n.check=0,E[0]=255&u,E[1]=u>>>8&255,n.check=U(n.check,E,2,0),u=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=Et;break}if((15&u)!==_t){e.msg="unknown compression method",n.mode=Et;break}if(u>>>=4,l-=4,C=8+(15&u),0===n.wbits)n.wbits=C;else if(C>n.wbits){e.msg="invalid window size",n.mode=Et;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=512&u?10:Ot,u=0,l=0;break;case 2:for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(n.flags=u,(255&n.flags)!==_t){e.msg="unknown compression method",n.mode=Et;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Et;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(E[0]=255&u,E[1]=u>>>8&255,n.check=U(n.check,E,2,0)),u=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.head&&(n.head.time=u),512&n.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,n.check=U(n.check,E,4,0)),u=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(E[0]=255&u,E[1]=u>>>8&255,n.check=U(n.check,E,2,0)),u=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(E[0]=255&u,E[1]=u>>>8&255,n.check=U(n.check,E,2,0)),u=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f=n.length,f>s&&(f=s),f&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),C)),512&n.flags&&(n.check=U(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{C=r[o+f++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C))}while(C&&f<s);if(512&n.flags&&(n.check=U(n.check,r,f,o)),s-=f,o+=f,C)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;f=0;do{C=r[o+f++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C))}while(C&&f<s);if(512&n.flags&&(n.check=U(n.check,r,f,o)),s-=f,o+=f,C)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Et;break}u=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ot;break;case 10:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}e.adler=n.check=It(u),u=0,l=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,yt;e.adler=n.check=1,n.mode=Ot;case Ot:if(t===ht||t===mt)break e;case 13:if(n.last){u>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}switch(n.last=1&u,u>>>=1,l-=1,3&u){case 0:n.mode=14;break;case 1:if(xt(n),n.mode=20,t===mt){u>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=Et}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if((65535&u)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Et;break}if(n.length=65535&u,u=0,l=0,n.mode=15,t===mt)break e;case 15:n.mode=16;case 16:if(f=n.length,f){if(f>s&&(f=s),f>c&&(f=c),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,c-=f,a+=f,n.length-=f;break}n.mode=Ot;break;case 17:for(;l<14;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(n.nlen=257+(31&u),u>>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Et;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.lens[T[n.have++]]=7&u,u>>>=3,l-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,I={bits:n.lenbits},_=pt(0,n.lens,0,19,n.lencode,0,n.work,I),n.lenbits=I.bits,_){e.msg="invalid code lengths set",n.mode=Et;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;O=n.lencode[u&(1<<n.lenbits)-1],g=O>>>24,v=O>>>16&255,y=65535&O,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(y<16)u>>>=g,l-=g,n.lens[n.have++]=y;else{if(16===y){for(A=g+2;l<A;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=Et;break}C=n.lens[n.have-1],f=3+(3&u),u>>>=2,l-=2}else if(17===y){for(A=g+3;l<A;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,C=0,f=3+(7&u),u>>>=3,l-=3}else{for(A=g+7;l<A;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,C=0,f=11+(127&u),u>>>=7,l-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Et;break}for(;f--;)n.lens[n.have++]=C}}if(n.mode===Et)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Et;break}if(n.lenbits=9,I={bits:n.lenbits},_=pt(1,n.lens,0,n.nlen,n.lencode,0,n.work,I),n.lenbits=I.bits,_){e.msg="invalid literal/lengths set",n.mode=Et;break}if(n.distbits=6,n.distcode=n.distdyn,I={bits:n.distbits},_=pt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,I),n.distbits=I.bits,_){e.msg="invalid distances set",n.mode=Et;break}if(n.mode=20,t===mt)break e;case 20:n.mode=21;case 21:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,st(e,p),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,l=n.bits,n.mode===Ot&&(n.back=-1);break}for(n.back=0;O=n.lencode[u&(1<<n.lenbits)-1],g=O>>>24,v=O>>>16&255,y=65535&O,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(v&&0===(240&v)){for(b=g,w=v,S=y;O=n.lencode[S+((u&(1<<b+w)-1)>>b)],g=O>>>24,v=O>>>16&255,y=65535&O,!(b+g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=b,l-=b,n.back+=b}if(u>>>=g,l-=g,n.back+=g,n.length=y,0===v){n.mode=26;break}if(32&v){n.back=-1,n.mode=Ot;break}if(64&v){e.msg="invalid literal/length code",n.mode=Et;break}n.extra=15&v,n.mode=22;case 22:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;O=n.distcode[u&(1<<n.distbits)-1],g=O>>>24,v=O>>>16&255,y=65535&O,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(0===(240&v)){for(b=g,w=v,S=y;O=n.distcode[S+((u&(1<<b+w)-1)>>b)],g=O>>>24,v=O>>>16&255,y=65535&O,!(b+g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=b,l-=b,n.back+=b}if(u>>>=g,l-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=Et;break}n.offset=y,n.extra=15&v,n.mode=24;case 24:if(n.extra){for(A=n.extra;l<A;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Et;break}n.mode=25;case 25:if(0===c)break e;if(f=p-c,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Et;break}f>n.wnext?(f-=n.wnext,h=n.wsize-f):h=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,h=a-n.offset,f=n.length;f>c&&(f=c),c-=f,n.length-=f;do{i[a++]=m[h++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===c)break e;i[a++]=n.length,c--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break e;s--,u|=r[o++]<<l,l+=8}if(p-=c,e.total_out+=p,n.total+=p,p&&(e.adler=n.check=n.flags?U(n.check,i,p,a-p):L(n.check,i,p,a-p)),p=c,(n.flags?u:It(u))!==n.check){e.msg="incorrect data check",n.mode=Et;break}u=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Et;break}u=0,l=0}n.mode=29;case 29:_=vt;break e;case Et:_=wt;break e;case 31:return St;default:return bt}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,(n.wsize||p!==e.avail_out&&n.mode<Et&&(n.mode<27||t!==ft))&&Lt(e,e.output,e.next_out,p-e.avail_out),d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,n.total+=p,n.wrap&&p&&(e.adler=n.check=n.flags?U(n.check,i,p,e.next_out-p):L(n.check,i,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Ot?128:0)+(20===n.mode||15===n.mode?256:0),(0===d&&0===p||t===ft)&&_===gt&&(_=Ct),_},zt=e=>{if(!e||!e.state)return bt;let t=e.state;return t.window&&(t.window=null),e.state=null,gt},Bt=(e,t)=>{if(!e||!e.state)return bt;const n=e.state;return 0===(2&n.wrap)?bt:(n.head=t,t.done=!1,gt)},Kt=(e,t)=>{const n=t.length;let r,i,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?bt:11===r.mode&&(i=1,i=L(i,t,n,0),i!==r.check)?wt:(o=Lt(e,t,n,n),o?(r.mode=31,St):(r.havedict=1,gt))):bt},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Wt=Object.prototype.toString,{Z_NO_FLUSH:qt,Z_FINISH:Vt,Z_OK:$t,Z_STREAM_END:Gt,Z_NEED_DICT:Zt,Z_STREAM_ERROR:Qt,Z_DATA_ERROR:Yt,Z_MEM_ERROR:Jt}=z;function Xt(e){this.options=ze({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;let n=Ut(this.strm,t.windowBits);if(n!==$t)throw new Error(F[n]);if(this.header=new Ht,Bt(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=We(t.dictionary):"[object ArrayBuffer]"===Wt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Kt(this.strm,t.dictionary),n!==$t)))throw new Error(F[n])}function en(e,t){const n=new Xt(t);if(n.push(e),n.err)throw n.msg||F[n.err];return n.result}Xt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Vt:qt,"[object ArrayBuffer]"===Wt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Ft(n,a),o===Zt&&i&&(o=Kt(n,i),o===$t?o=Ft(n,a):o===Yt&&(o=Zt));n.avail_in>0&&o===Gt&&n.state.wrap>0&&0!==e[n.next_in];)jt(n),o=Ft(n,a);switch(o){case Qt:case Yt:case Zt:case Jt:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||o===Gt))if("string"===this.options.to){let e=Ve(n.output,n.next_out),t=n.next_out-e,i=qe(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==$t||0!==s){if(o===Gt)return o=zt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Xt.prototype.onData=function(e){this.chunks.push(e)},Xt.prototype.onEnd=function(e){e===$t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Be(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var tn={Inflate:Xt,inflate:en,inflateRaw:function(e,t){return(t=t||{}).raw=!0,en(e,t)},ungzip:en,constants:z};const{Deflate:nn,deflate:rn,deflateRaw:on,gzip:an}=at,{Inflate:sn,inflate:cn,inflateRaw:un,ungzip:ln}=tn;var dn=cn,pn={Deflate:nn,deflate:rn,deflateRaw:on,gzip:an,Inflate:sn,inflate:cn,inflateRaw:un,ungzip:ln,constants:z}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1227);function i(e,t,n){if(0===e.length)return[];let i=0;e.length>n&&(i=e.length-(n-1),e=e.slice(0,n-1));const o=e.map((e=>t(e)));if(i>0){const e=Object(r.b)({zero:"Truncate.ExtraItems.Zero",one:"Truncate.ExtraItems.One",two:"Truncate.ExtraItems.Two",many:"Truncate.ExtraItems.Many"},i);o.push(e)}return o}},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(870),i=n(1227),o=n(919),a=n(920),s=n(1263);const c=r.createContext({canCustomize:!1,isInCustomizationMode:!1,toggleCustomizationMode:()=>{}});function u(e){var t;const{setAriaLiveText:n}=Object(s.b)(),[u,l]=r.useState(null!==(t=e.isInCustomizationMode)&&void 0!==t&&t),d=r.useRef(null),p=r.useCallback((()=>{const e=u?Object(i.a)("VoiceOver.CustomizeDashboard.ClosingPage"):Object(i.a)("VoiceOver.CustomizeDashboard.OpeningPage");u?d.current&&(d.current.end(),d.current.record()):d.current=o.a.withEventAndLabel("workflow","customize",{statCategory:a.a.USER,__allow_user:!0}).time(),l((e=>!e)),n(e)}),[n,u]),f=r.useMemo((()=>({canCustomize:!0,isInCustomizationMode:u,toggleCustomizationMode:p})),[u,p]);return r.createElement(c.Provider,{value:f},e.children)}function l(){return r.useContext(c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(870),i=n(1318);const o=r.createContext(void 0);function a(e){return r.createElement(o.Provider,{value:e.value},r.createElement(i.a,null,e.children))}function s(){return r.useContext(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(870);const i=r.createContext(void 0);function o(e){const[t,n]=r.useState(!1),o=r.useMemo((()=>({isTileShowingOtherPopover:t,setIsTileShowingOtherPopover:n})),[t]);return r.createElement(i.Provider,{value:o},e.children)}function a(){return r.useContext(i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(870);const i=r.createContext(void 0);function o(e){return r.createElement(i.Provider,{value:e.value},e.children)}function a(){const e=r.useContext(i);if(void 0===e)throw new Error("`useApplicationLauncher` must be used within a ApplicationLaunchProvider");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(870);const i=r.createContext(void 0);function o(e){return r.createElement(i.Provider,{value:e.value},e.children)}function a(){const e=r.useContext(i);return null===e||void 0===e?void 0:e.launchPath}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(870),i=n(898),o=n(2208);const a=r.createContext({scope:[],currentBaseline:[]}),s=e=>{const{scope:t,children:n,baseline:i}=e,s=r.useContext(a);if(void 0===t)throw new Error("TelemetryProvider requires a scope to be provided");if(t.includes("."))throw new Error("A TelemetryProvider scope cannot contain the '.' character.");const c=r.useRef(u(t,s));r.useMemo((()=>{o.b.sharedInstance.mark(c.current)}),[]);const l=r.useRef([...s.scope,t]),d=r.useMemo((()=>({scope:l.current,currentBaseline:i||0===s.currentBaseline.length?l.current:s.currentBaseline})),[i,s.currentBaseline]);return r.createElement(a.Provider,{value:d},n)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"load",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{measureFromBaseline:!1};const i=r.useContext(a),o=r.useRef(!1);if(void 0===i)throw new Error("useTelemetry must be used within a TelemetryProvider");void 0===n.baselineName&&(n.baselineName=l(i));const s=p(e,n.baselineName,n.measureFromBaseline,t,o),c=r.useRef(s(!0)),u=r.useRef(s(!1));return[c.current,u.current]},u=(e,t)=>[...t.scope,e].join("."),l=e=>[...e.currentBaseline].join(".");function d(e){return null===e||void 0===e?void 0:e.replace(/ +/g,"-").toLowerCase()}const p=(e,t,n,r,a)=>{const s=i.a.applicationName,c=r?`${e}_${d(r)}`:e;return r=>(i,u)=>{a.current&&"load"===e||("load"===e&&(a.current=!0),o.b.sharedInstance.mark(c,{baselineName:t,applicationName:s,measureFromBaseline:n,contextLabel:d(i),success:r,additionalProperties:u}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((()=>e.apply(this,i)),n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return I})),n.d(t,"d",(function(){return T}));var r=n(1167),i=n(2161),o=n(1204),a=n(1205),s=n(970),c=n(1206),u=n(1207),l=n(1208),d=n(1209),p=n(2171),f=n(1248),h=n(870),m=n(1247),g=n(1166),v=n(2309),y=n(1324),b=n(914);const w=[r.a,i.a,o.a,a.a,s.a,c.a,u.a,d.a,l.a],S=[p.a];function C(e){const t=m.a.sharedInstance.getApplicationConfiguration(e);return!!t&&!!t.applicationInfo.supportsTile&&(!t.isHidden||!function(e){switch(e){case f.a.APPLICATION_INFO_SPECIFIED_IS_HIDDEN:case f.a.NO_SUPPORTED_APPLICATION_INFO_DOMAIN:case f.a.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE:case f.a.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE:case f.a.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE:case void 0:return!0;default:return!1}}(t.reasonConfigurationIsHidden))}function _(){return w.filter(C)}function O(){return[...w,...S].filter(C)}function E(){const[e,t]=h.useState(_());return h.useEffect((()=>{const e=()=>t(_());return m.a.sharedInstance.appConfigurationObservers.add(e),()=>{m.a.sharedInstance.appConfigurationObservers.delete(e)}}),[]),e}function I(){const[e,t]=h.useState(O());return h.useEffect((()=>{const e=()=>t(O());return m.a.sharedInstance.appConfigurationObservers.add(e),()=>{m.a.sharedInstance.appConfigurationObservers.delete(e)}}),[]),e}function A(e,t){return w.findIndex((t=>t===e))-w.findIndex((e=>e===t))}function T(){const e=h.useRef(new Set),t=h.useRef(new Set),n=h.useRef(new Set),r=h.useRef(_().length),i=Object(v.d)().configurations,o=Object(v.e)(),a=h.useRef([]),s=h.useRef(_());h.useEffect((()=>{i&&r.current>0&&(r.current=0)}),[i]);const c=h.useCallback((()=>{0!==r.current&&(r.current=0);const i=Array.from(n.current).sort(A),a=Array.from(e.current).sort(A),s=Array.from(t.current).sort(A),c=i.concat(a,s).slice(0,4);null===c||void 0===c||c.splice(3,0,g.a),o({type:v.a.SET,configurations:c.map((e=>({identifier:e,uuid:Object(b.a)()})))})}),[o]),u=h.useCallback(((e,n)=>{0!==r.current&&-1!==s.current.indexOf(e)&&-1===a.current.indexOf(e)&&(a.current.push(e),n&&t.current.add(e),r.current--,0===r.current&&c())}),[c,r]),l=h.useCallback(((t,i)=>{0!==r.current&&-1!==s.current.indexOf(t)&&-1===a.current.indexOf(t)&&(a.current.push(t),i&&0!==i.length?n.current.add(t):e.current.add(t),r.current--,0===r.current&&c())}),[c,r]);return h.useEffect((()=>{const i=setTimeout((()=>{0!==r.current&&(s.current.forEach((r=>{n.current.has(r)||e.current.has(r)||t.current.has(r)||e.current.add(r)})),c())}),y.a-100);return()=>{clearTimeout(i)}}),[c]),{onError:u,onSuccess:l}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(870),i=n(1321),o=n(1325),a=n(1165),s=n(2180);const c=1e3,u=2500;function l(){const[e,t]=Object(r.useState)(!1),[n,l]=Object(r.useState)(!1),[d,p]=Object(r.useState)((()=>{var e;return!!Object(a.a)(o.a)||void 0===(null===(e=s.b.getAccountPreferences())||void 0===e?void 0:e.tilesConfigurations)})),[f]=Object(i.b)("load","welcome-page",{measureFromBaseline:!0});return Object(r.useEffect)((()=>{if(!d)return;const e=setTimeout((()=>{l(!0)}),c),n=setTimeout((()=>{t(!0)}),u);return()=>{clearTimeout(e),clearTimeout(n)}}),[d]),Object(r.useEffect)((()=>{e&&n&&d&&(p(!1),f())}),[e,n,d,f]),{showWelcomePage:d,setTilesReady:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="iCloud.User.Tiles.Customization.ForceRun"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1327),o=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 o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(r.useCallback)((function(t){e.forEach((function(e){Object(i.a)(e,t)}))}),o(e))}},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(903),o=n(1249);const a=(e,t,n,a,s,c,u)=>{const l=Object(o.c)()===i.e.COMPACT,d=r.useCallback((()=>{l?(e(),u.current=n):(a(),u.current=c)}),[l,e,a,n,c,u]);return r.useLayoutEffect((()=>{var e;(null===(e=u.current)||void 0===e?void 0:e.current)&&(c.current&&s(),n.current&&t(),d())}),[d,s,t,n,c,u]),d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1330),i=n(884);let o=function(e){return e.MAID="managedAppleID",e.Lite="lite",e.Standard="standard",e.Plus="plus",e}({});function a(){const e=Object(r.a)();if(e){if(Object(i.f)(e))return o.Plus;if(Object(i.e)(e))return o.Lite;if(e.isManagedAppleID)return o.MAID}return o.Standard}function s(){return a()===o.Plus}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(870),i=n(2159),o=n(2155);function a(){var e;return null!==(e=Object(i.useSignal)(o.h))&&void 0!==e?e:null}function s(){return Object(i.useSignal)(o.e)}function c(){var e;const t=a();return null!==(e=null===t||void 0===t?void 0:t.details)&&void 0!==e?e:null}function u(){var e,t;const n=a(),[i,s]=r.useState(null!==(e=null===n||void 0===n||null===(t=n.details)||void 0===t?void 0:t.completedAuthenticationStep)&&void 0!==e?e:null);return r.useEffect((()=>{var e,t;s(null!==(e=null===n||void 0===n||null===(t=n.details)||void 0===t?void 0:t.completedAuthenticationStep)&&void 0!==e?e:null)}),[n]),r.useEffect((()=>{const e={authenticationStepsDidChange(){var e,t;s(null!==(e=null===n||void 0===n||null===(t=n.details)||void 0===t?void 0:t.completedAuthenticationStep)&&void 0!==e?e:null)}};return Object(o.c)().authenticationStepObservers.add(e),()=>{Object(o.c)().authenticationStepObservers.delete(e)}}),[n]),r.useDebugValue(i),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1227);const i=(e,t)=>{const n="-0.12px",i=document.createElement("canvas").getContext("2d"),o=Object(r.a)("Ellipsis");i.font="normal 12px SFUIText";let a=0;if(n.search(/(^-?\d+(\.\d+)?)px$/)>-1&&(a+=parseFloat(n)),i.measureText(e).width+(e.length-1)*a<=t)return e;{const n=t-i.measureText(o).width;let r=0,s="";for(;i.measureText(s+e[r]).width+(r+1)*a<=n;)s+=e[r],r+=1;return s.trimRight()+o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1214);const i=()=>Object(r.a)("(prefers-color-scheme: dark)")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1334);const i=864e5;function o(){const e=new Date,t=e.getTime(),n=6e4*e.getTimezoneOffset(),o=Math.ceil((t-n)/i)*i-(t-n)||i;return Object(r.a)(o+1)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(e){const[t,n]=Object(r.useState)(new Date),i=Object(r.useRef)(null);return Object(r.useEffect)((()=>{if(i.current&&clearTimeout(i.current),e)return i.current=setTimeout((()=>{n(new Date)}),e),()=>{i.current&&clearTimeout(i.current)}}),[e]),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(e){const t=Object(r.useRef)(null);return Object(r.useEffect)((()=>{t.current=e})),t.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=3e4;function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,i=arguments.length>3?arguments[3]:void 0;return new Promise(((r,o)=>{const a=new Image;if(!e&&!t)return void o(new Error("loadImage: missing src or srcset to load"));let s=null;const c=()=>{a.removeEventListener("load",u),a.removeEventListener("error",l)},u=()=>{s&&clearTimeout(s),c(),r(a)},l=()=>{s&&clearTimeout(s),c(),o(new Error("loadImage: image failed to load"))};a.addEventListener("load",u),a.addEventListener("error",l),n&&(s=setTimeout((()=>{c(),o(new Error("loadImage: image loading timeout"))}),n)),e&&(a.src=e),t&&(a.srcset=t),i&&(a.crossOrigin=i)}))}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"ellipsis",svgPath:"M28.418-35.2051C28.418-40.625 24.0234-44.9707 18.5059-44.9707C13.1348-44.9707 8.74023-40.625 8.74023-35.2051C8.74023-29.7852 13.1348-25.4395 18.5059-25.4395C24.0234-25.4395 28.418-29.7852 28.418-35.2051ZM64.5508-35.2051C64.5508-40.625 60.2051-44.9707 54.7852-44.9707C49.4141-44.9707 45.0684-40.625 45.0684-35.2051C45.0684-29.7852 49.4141-25.4395 54.7852-25.4395C60.2051-25.4395 64.5508-29.7852 64.5508-35.2051ZM100.83-35.2051C100.83-40.625 96.4844-44.9707 91.0645-44.9707C85.5469-44.9707 81.2012-40.625 81.2012-35.2051C81.2012-29.7852 85.5469-25.4395 91.0645-25.4395C96.4844-25.4395 100.83-29.7852 100.83-35.2051Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:79.22503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 92.0899658203125 19.5810546875",width:92.0899658203125,height:19.5810546875,translateX:-8.740048828125055,translateY:45.0205078125,baseline:45.0205078125,capline:-25.439453125}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(878);const i=["th-th","hi-in","tr-tr","ca-es","bn-bd","gu-in","kn-in","ml-in","mr-in","or-in","pa-in","ta-in","te-in","ur-pk"],o=()=>{const e=Object(r.b)();return i.includes(e.toLowerCase())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2194);function i(){const[e]=Object(r.b)();return t=>{e({...t})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="icloud-tint"},function(e,t,n){"use strict";function r(e){const t=e.current,n=getComputedStyle(t);let r=parseFloat(n.getPropertyValue("padding-left"))+parseFloat(n.getPropertyValue("padding-right"));const i=t.querySelector(".buttons-measurer");return null===i||void 0===i||i.querySelectorAll("div").forEach((e=>{if(!e.classList.contains("inline-end-buttons")){const t=getComputedStyle(e),n=parseFloat(t.getPropertyValue("margin-left")),i=parseFloat(t.getPropertyValue("margin-right"));r+=n+i,r+=e.offsetWidth}})),r>t.offsetWidth}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1219),o=n(2259);function a(e,t){let n=0,a=[];if(r.Children.forEach(e,(e=>{if(r=e,!Object(i.a)(r)||r.type!==o.a)throw new Error(`${t} must be rendered with only UIButtons for children.`);var r;a.push(e),n++})),n<1)throw new Error(`${t} may not be rendered empty. Please provide at least one UIButton.`);if(n>3)throw new Error(`${t} may not be rendered with more than three buttons.`);return a}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"minus",svgPath:"M17.8711-29.7363L88.6719-29.7363C91.6016-29.7363 94.0918-32.2266 94.0918-35.2051C94.0918-38.1836 91.6016-40.625 88.6719-40.625L17.8711-40.625C15.0391-40.625 12.4512-38.1836 12.4512-35.2051C12.4512-32.2266 15.0391-29.7363 17.8711-29.7363Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27505615234372,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 82.713623046875 10.9873046875",width:82.713623046875,height:10.9873046875,translateX:-11.378203125000027,translateY:40.7236328125,baseline:40.7236328125,capline:-29.736328125}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(870),i=n(1215),o=n.n(i),a=n(1345);const s=e=>{let{className:t,iconSize:n,symbolSize:i,symbolWidth:s,symbolHeight:c,backgroundColor:u,symbol:l,ariaLabel:d,symbolFillColor:p}=e;const f=(n-(s||i))/2,h=(n-(c||i))/2;return r.createElement("svg",{className:o()("squircled-symbol",t),style:{overflow:"visible"},xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-label":d,"aria-hidden":!d},r.createElement("path",{d:a.a,fill:null!==u&&void 0!==u?u:"",transform:`scale(${n/100})`,className:"border","data-testid":"border"}),r.createElement("g",null,r.createElement(l,{layoutMode:"glyphBox",x:f,y:h,width:i,height:i,fill:null!==p&&void 0!==p?p:"#FFF"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="M100,68.7182051 C100,69.9139093 100,71.1074395 99.9913043,72.3009696 C99.9847826,73.3075351 99.973913,74.3141006 99.9478261,75.3184921 C99.920129,77.5191265 99.7268293,79.7145543 99.3695652,81.886169 C98.9978261,84.0601765 98.3043478,86.1646159 97.3108696,88.1320927 C95.2972476,92.0852921 92.0834623,95.2992171 88.1304348,97.3129266 C86.1638623,98.305079 84.0602691,98.9982471 81.8891304,99.3695378 C79.7152174,99.7282491 77.5195652,99.9217357 75.3195652,99.9478238 C74.3139596,99.9737988 73.308105,99.9890177 72.3021739,99.993478 C71.1065217,100 69.9130435,100 68.7195652,100 L31.2804348,100 C30.0869565,100 28.8934783,100 27.6978261,99.993478 C26.6919027,99.9897456 25.6860481,99.9752514 24.6804348,99.9499978 C22.4791037,99.9219121 20.2830235,99.7278754 18.1108696,99.3695378 C15.9391304,98.9999565 13.8347826,98.3042741 11.8695652,97.3129266 C7.91695765,95.2996615 4.70324405,92.0865692 2.68913043,88.1342667 C1.69595654,86.1655631 1.00208487,84.0596773 0.630434783,81.886169 C0.273173217,79.7152845 0.079873167,77.5205795 0.052173913,75.3206661 C0.0260869565,74.3141006 0.0130434783,73.3075351 0.00869565217,72.3009696 C0,71.1052654 0,69.9139093 0,68.7182051 L0,31.2817949 C0,30.0860907 0,28.8903865 0.00869565217,27.6946824 C0.0130434783,26.6902909 0.0260869565,25.6837254 0.052173913,24.6793339 C0.0799060567,22.4794222 0.273205889,20.2847196 0.630434783,18.113831 C1.00217391,15.9398235 1.69565217,13.8353841 2.68913043,11.8657333 C4.7027524,7.91253387 7.91653768,4.69860886 11.8695652,2.68489934 C13.8355813,1.69325138 15.9383812,1.00010324 18.1086957,0.628288186 C20.2826087,0.271750946 22.4782609,0.0782642724 24.6782609,0.050002174 C25.6847826,0.0239140832 26.6913043,0.0108700378 27.6956522,0.0065220227 C28.8913043,0 30.0869565,0 31.2782609,0 L68.7173913,0 C69.9130435,0 71.1086957,0 72.3021739,0.0065220227 C73.3080973,0.0102577353 74.3139519,0.0247519479 75.3195652,0.050002174 C77.5195652,0.0782642724 79.7152174,0.271750946 81.8869565,0.628288186 C84.0608696,1.00004348 86.1630435,1.69355189 88.1304348,2.68489934 C92.0844481,4.69799461 95.2990996,7.91202483 97.3130435,11.8657333 C98.305381,13.8338276 98.9985196,15.9389795 99.3695652,18.111657 C99.7268538,20.2832686 99.9201536,22.4786983 99.9478261,24.6793339 C99.973913,25.6858994 99.9869565,26.6924649 99.9913043,27.6968564 C100,28.8925605 100,30.0860907 100,31.2796209 L100,68.7182051 Z"},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"bookmark",svgPath:"M26.2695 20.6055C29.3457 20.6055 31.4453 19.2383 35.3027 15.4297L53.7109-2.97852C53.9551-3.17383 54.2969-3.17383 54.541-2.97852L72.998 15.4785C76.8555 19.2383 78.8574 20.6055 81.9824 20.6055C86.9141 20.6055 90.1855 17.1387 90.1855 11.7676L90.1855-74.1211C90.1855-84.5215 84.4238-90.2832 74.1211-90.2832L34.1309-90.2832C23.8281-90.2832 18.0664-84.5215 18.0664-74.1211L18.0664 11.7676C18.0664 17.1387 21.2891 20.6055 26.2695 20.6055ZM31.9824 0.0488281C31.3965 0.683594 30.6641 0.439453 30.6641-0.439453L30.6641-72.8027C30.6641-76.2207 32.1777-77.6855 35.5469-77.6855L72.7051-77.6855C76.0742-77.6855 77.5879-76.2207 77.5879-72.8027L77.5879-0.439453C77.5879 0.439453 76.9043 0.683594 76.2695 0.0488281L58.3984-17.2363C55.5176-20.0195 52.7344-20.0195 49.8535-17.2363Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:83.03499755859366,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 78.421142578125 111.6708984375",width:78.421142578125,height:111.6708984375,translateX:-11.764501953125091,translateY:91.0654296875,baseline:91.0654296875,capline:20.60546875}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"arrow.up.left",svgPath:"M12.4512-17.334C12.4512-14.6973 14.502-12.6953 16.8945-12.6953C19.2871-12.6953 21.2891-14.8438 21.2891-17.1387L21.2891-35.2051L20.4102-58.0078L28.4668-48.877L76.9043-0.439453C77.832 0.488281 78.9062 0.878906 79.9805 0.878906C82.4219 0.878906 84.5703-1.31836 84.5703-3.66211C84.5703-4.73633 84.082-5.85938 83.2031-6.73828L34.8145-55.2246L25.7324-63.1836L49.5605-62.4023L66.5527-62.4023C68.8477-62.4023 70.9473-64.4043 70.9473-66.748C70.9473-69.0918 69.0918-71.1914 66.3574-71.1914L17.2363-71.1914C14.3066-71.1914 12.5-69.2383 12.5-66.4551Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 72.127685546875 72.2177734375",width:72.127685546875,height:72.2177734375,translateX:-12.451127929687573,translateY:71.3388671875,baseline:71.3388671875,capline:.87890625}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"arrow.up.right",svgPath:"M84.5703-17.334L84.5215-66.4551C84.5215-69.2383 82.7148-71.1914 79.7852-71.1914L30.6641-71.1914C27.9297-71.1914 26.0742-69.0918 26.0742-66.748C26.0742-64.4043 28.1738-62.4023 30.4688-62.4023L47.4609-62.4023L71.2891-63.1836L62.207-55.2246L13.8184-6.73828C12.9395-5.85938 12.4512-4.73633 12.4512-3.66211C12.4512-1.31836 14.5508 0.878906 16.9922 0.878906C18.1152 0.878906 19.1895 0.488281 20.0684-0.439453L68.5547-48.877L76.6113-58.0078L75.7324-35.2051L75.7324-17.1387C75.7324-14.8438 77.7344-12.6953 80.127-12.6953C82.4707-12.6953 84.5703-14.6973 84.5703-17.334Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 72.127685546875 72.2177734375",width:72.127685546875,height:72.2177734375,translateX:-12.451127929687573,translateY:71.3388671875,baseline:71.3388671875,capline:.87890625}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"lock.rectangle.stack.fill",svgPath:"M31.8359-82.0312L93.457-82.0312C93.1641-86.1816 90.8203-88.3301 86.2793-88.3301L38.9648-88.3301C34.4727-88.3301 32.1289-86.1816 31.8359-82.0312ZM21.7773-68.5059L103.516-68.5059C102.783-72.9492 100.684-75.3906 95.8008-75.3906L29.4922-75.3906C24.6094-75.3906 22.5098-72.9492 21.7773-68.5059ZM27.2949 17.8223L97.9492 17.8223C107.764 17.8223 112.793 12.8418 112.793 3.125L112.793-45.9961C112.793-55.7129 107.764-60.6445 97.9492-60.6445L27.2949-60.6445C17.3828-60.6445 12.4512-55.7129 12.4512-45.9961L12.4512 3.125C12.4512 12.8418 17.3828 17.8223 27.2949 17.8223ZM44.4824-1.51367L44.4824-21.5332C44.4824-25.0977 45.9473-26.8555 48.877-27.0508L48.877-32.959C48.877-42.2363 54.4434-48.4863 62.6465-48.4863C70.8496-48.4863 76.416-42.2363 76.416-32.959L76.416-27.0508C79.3457-26.8555 80.8105-25.0977 80.8105-21.5332L80.8105-1.51367C80.8105 2.24609 79.1504 4.00391 75.6836 4.00391L49.6094 4.00391C46.1426 4.00391 44.4824 2.24609 44.4824-1.51367ZM54.1504-27.0996L71.1426-27.0996L71.1426-33.5449C71.1426-39.4531 67.7246-43.4082 62.6465-43.4082C57.5684-43.4082 54.1504-39.4531 54.1504-33.5449Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:71.38510009765628,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 100.34765625 106.2001953125",width:100.34765625,height:106.2001953125,translateX:-12.451142578124973,translateY:88.330078125,baseline:88.330078125,capline:17.8701171875}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=function(e){return e.PUSH="PUSH",e.ALARM="ALARM",e}({})},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"xmark",svgPath:"M13.7207 2.24609C15.4297 3.90625 18.2617 3.90625 19.9219 2.24609L51.1719-29.0039L82.4219 2.24609C84.082 3.90625 86.9629 3.95508 88.623 2.24609C90.2832 0.537109 90.2832-2.24609 88.623-3.90625L57.373-35.2051L88.623-66.4551C90.2832-68.1152 90.332-70.9473 88.623-72.6074C86.9141-74.3164 84.082-74.3164 82.4219-72.6074L51.1719-41.3574L19.9219-72.6074C18.2617-74.3164 15.3809-74.3652 13.7207-72.6074C12.0605-70.8984 12.0605-68.1152 13.7207-66.4551L44.9707-35.2051L13.7207-3.90625C12.0605-2.24609 12.0117 0.585938 13.7207 2.24609Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:82.83503906250007,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 77.4356689453125 77.479248046875",width:77.4356689453125,height:77.479248046875,translateX:-12.457197265624927,translateY:73.9696044921875,baseline:73.9696044921875,capline:3.5096435546875}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=7e3},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r={name:"com.apple.web.dataaccess",hash:"aa8e84b1f216a86051a7b722b7717825381a1228"}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(2215),i=n(1268),o=n(1272),a=n(1356),s=n(1271);async function c(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{useSharedWorker:c=!0,loggingEnabled:u=!1}=t;if(Object(s.b)(u),c&&window.SharedWorker){const t=new SharedWorker(e,{type:void 0,name:"push-service-sharedworker"});r.a.addNeighboringBrowsingContext(t)}else{const{startPushService:e}=await n.e(14).then(n.bind(null,2152));e()}const l=Object(i.a)(),d=Object(o.a)("iCloud.User.PushEnvironment"),p=Object(a.a)(d)?{...t,pushEnvironment:d}:t;return l.remoteObjectProxy.configurePush(p),l}function u(e,t){return Object(i.a)(),i.b.addEventListener(e,t),()=>{i.b.removeEventListener(e,t)}}}).call(this,n(1355))},function(e,t,n){e.exports=n.p+"f7b734d88b8adcdb55bd-push-service-sharedworker.worker.js"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1009);function i(e){return!(!e||!Object.keys(r.a).includes(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2213),i=n(919),o=n(2208),a=n(1284),s=n(976),c=n(1354);const u=new a.a("LegacyPollingServiceToChildProtocol",new Set(["applicationShouldRefresh"]));class l{constructor(e){this.processReference=e,e.createConnectionOnlyMessagingChannel(u,void 0,e.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}static startMonitoring(){const e=[Object(c.b)("fail",(()=>this.startPolling())),Object(c.b)("recover",(()=>this.stopPolling()))];return()=>{e.forEach((e=>e()))}}static stopPolling(){this.isPolling&&(this.isPolling=!1,o.b.sharedInstance.recordStat(new i.a("legacyAppsPollingStopped")))}static startPolling(){this.isPolling||(this.isPolling=!0,o.b.sharedInstance.recordStat(new i.a("legacyAppsPollingStarted")),(async()=>{for(;;){if(await Object(s.a)(3e4),!this.isPolling)return;const e=r.b.serviceInstancesByIdentifier("com.apple.icloud.cloudos.legacyPollingService");for(const t of e)t instanceof l&&t.notifyApplicationToRefresh()}})())}notifyApplicationToRefresh(){var e;null===(e=this.processReference.remoteProxy)||void 0===e||e.applicationShouldRefresh()}}l.isPolling=!1},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=new(n(1359).QueryClient)({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:12e4}}})},function(e,t,n){"use strict";n.r(t);var r=n(1360);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(1379);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i)},function(e,t,n){"use strict";n.r(t);var r=n(1361);n.d(t,"CancelledError",(function(){return r.a}));var i=n(2293);n.d(t,"QueryCache",(function(){return i.a}));var o=n(1369);n.d(t,"QueryClient",(function(){return o.a}));var a=n(1373);n.d(t,"QueryObserver",(function(){return a.a}));var s=n(1374);n.d(t,"QueriesObserver",(function(){return s.a}));var c=n(1375);n.d(t,"InfiniteQueryObserver",(function(){return c.a}));var u=n(1370);n.d(t,"MutationCache",(function(){return u.a}));var l=n(1376);n.d(t,"MutationObserver",(function(){return l.a}));var d=n(1367);n.d(t,"setLogger",(function(){return d.b}));var p=n(1368);n.d(t,"notifyManager",(function(){return p.a}));var f=n(1364);n.d(t,"focusManager",(function(){return f.a}));var h=n(1366);n.d(t,"onlineManager",(function(){return h.a}));var m=n(1362);n.d(t,"hashQueryKey",(function(){return m.e})),n.d(t,"isError",(function(){return m.g})),n.d(t,"isCancelledError",(function(){return r.d}));var g=n(1377);n.d(t,"dehydrate",(function(){return g.a})),n.d(t,"hydrate",(function(){return g.b}));var v=n(1378);for(var y in v)["default","CancelledError","QueryCache","QueryClient","QueryObserver","QueriesObserver","InfiniteQueryObserver","MutationCache","MutationObserver","setLogger","notifyManager","focusManager","onlineManager","hashQueryKey","isError","isCancelledError","dehydrate","hydrate"].indexOf(y)<0&&function(e){n.d(t,e,(function(){return v[e]}))}(y)},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(1364),i=n(1366),o=n(1362);function a(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"===typeof(null==e?void 0:e.cancel)}var c=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof c}var l=function(e){var t,n,u,l,d=this,p=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){p=!0},this.continueRetry=function(){p=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,l=t}));var f=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},h=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function u(){if(!d.isResolved){var l;try{l=e.fn()}catch(m){l=Promise.reject(m)}t=function(e){if(!d.isResolved&&(h(new c(e)),null==d.abort||d.abort(),s(l)))try{l.cancel()}catch(t){}},d.isTransportCancelable=s(l),Promise.resolve(l).then(f).catch((function(t){var s,c;if(!d.isResolved){var l=null!=(s=e.retry)?s:3,f=null!=(c=e.retryDelay)?c:a,m="function"===typeof f?f(d.failureCount,t):f,g=!0===l||"number"===typeof l&&d.failureCount<l||"function"===typeof l&&l(d.failureCount,t);!p&&g?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),Object(o.v)(m).then((function(){if(!r.a.isFocused()||!i.a.isOnline())return new Promise((function(t){n=t,d.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,d.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){p?h(t):u()}))):h(t)}}))}}()}},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"l",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"r",(function(){return l})),n.d(t,"w",(function(){return d})),n.d(t,"p",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"m",(function(){return h})),n.d(t,"o",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"j",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return b})),n.d(t,"q",(function(){return w})),n.d(t,"s",(function(){return C})),n.d(t,"u",(function(){return _})),n.d(t,"g",(function(){return A})),n.d(t,"v",(function(){return T})),n.d(t,"t",(function(){return P})),n.d(t,"d",(function(){return R}));var r=n(1363),i="undefined"===typeof window;function o(){}function a(e,t){return"function"===typeof e?e(t):e}function s(e){return"number"===typeof e&&e>=0&&e!==1/0}function c(e){return Array.isArray(e)?e:[e]}function u(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function l(e,t,n){var r=e.slice(0);return r[t]=n,r}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function p(e,t,n){return I(e)?"function"===typeof t?Object(r.a)({},n,{queryKey:e,queryFn:t}):Object(r.a)({},t,{queryKey:e}):e}function f(e,t,n){return I(e)?"function"===typeof t?Object(r.a)({},n,{mutationKey:e,mutationFn:t}):Object(r.a)({},t,{mutationKey:e}):"function"===typeof e?Object(r.a)({},t,{mutationFn:e}):Object(r.a)({},e)}function h(e,t,n){return I(e)?[Object(r.a)({},t,{queryKey:e}),n]:[e||{},t]}function m(e,t){return I(e)?Object(r.a)({},t,{mutationKey:e}):e}function g(e,t){var n=e.active,r=e.exact,i=e.fetching,o=e.inactive,a=e.predicate,s=e.queryKey,c=e.stale;if(I(s))if(r){if(t.queryHash!==y(s,t.options))return!1}else if(!w(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,o);if("none"===u)return!1;if("all"!==u){var l=t.isActive();if("active"===u&&!l)return!1;if("inactive"===u&&l)return!1}return("boolean"!==typeof c||t.isStale()===c)&&("boolean"!==typeof i||t.isFetching()===i)&&!(a&&!a(t))}function v(e,t){var n=e.exact,r=e.fetching,i=e.predicate,o=e.mutationKey;if(I(o)){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(o))return!1}else if(!w(t.options.mutationKey,o))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(i&&!i(t))}function y(e,t){return((null==t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){var t;return t=c(e),JSON.stringify(t,(function(e,t){return O(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function w(e,t){return S(c(e),c(t))}function S(e,t){return e===t||typeof e===typeof t&&!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((function(n){return!S(e[n],t[n])}))}function C(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||O(e)&&O(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},s=0,c=0;c<o;c++){var u=n?c:i[c];a[u]=C(e[u],t[u]),a[u]===e[u]&&s++}return r===o&&s===r?e:a}return t}function _(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function O(e){if(!E(e))return!1;var t=e.constructor;if("undefined"===typeof t)return!0;var n=t.prototype;return!!E(n)&&!!n.hasOwnProperty("isPrototypeOf")}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function I(e){return"string"===typeof e||Array.isArray(e)}function A(e){return e instanceof Error}function T(e){return new Promise((function(t){setTimeout(t,e)}))}function P(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function R(){if("function"===typeof AbortController)return new AbortController}},function(e,t,n){"use strict";function r(){return r=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},r.apply(null,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2265),i=n(1365),o=n(1362),a=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.h&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"===typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(i.a))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2265),i=n(1365),o=n(1362),a=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.h&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"===typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine},t}(i.a))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=console;function i(){return r}function o(e){r=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1362),i=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):Object(r.t)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&Object(r.t)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}(),o=new i},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1363),i=n(1362),o=n(2293),a=n(1370),s=n(1364),c=n(1366),u=n(1368),l=n(1372),d=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new o.a,this.mutationCache=e.mutationCache||new a.a,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=s.a.subscribe((function(){s.a.isFocused()&&c.a.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=c.a.subscribe((function(){s.a.isFocused()&&c.a.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=Object(i.m)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll(Object(r.a)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=Object(i.p)(e),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return u.a.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var i=e.queryKey;return[i,r.setQueryData(i,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=Object(i.m)(e,t)[0],r=this.queryCache;u.a.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var o=this,a=Object(i.m)(e,t,n),s=a[0],c=a[1],l=this.queryCache,d=Object(r.a)({},s,{active:!0});return u.a.batch((function(){return l.findAll(s).forEach((function(e){e.reset()})),o.refetchQueries(d,c)}))},t.cancelQueries=function(e,t,n){var r=this,o=Object(i.m)(e,t,n),a=o[0],s=o[1],c=void 0===s?{}:s;"undefined"===typeof c.revert&&(c.revert=!0);var l=u.a.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(i.l).catch(i.l)},t.invalidateQueries=function(e,t,n){var o,a,s,c=this,l=Object(i.m)(e,t,n),d=l[0],p=l[1],f=Object(r.a)({},d,{active:null==(o=null!=(a=d.refetchActive)?a:d.active)||o,inactive:null!=(s=d.refetchInactive)&&s});return u.a.batch((function(){return c.queryCache.findAll(d).forEach((function(e){e.invalidate()})),c.refetchQueries(f,p)}))},t.refetchQueries=function(e,t,n){var o=this,a=Object(i.m)(e,t,n),s=a[0],c=a[1],l=u.a.batch((function(){return o.queryCache.findAll(s).map((function(e){return e.fetch(void 0,Object(r.a)({},c,{meta:{refetchPage:null==s?void 0:s.refetchPage}}))}))})),d=Promise.all(l).then(i.l);return(null==c?void 0:c.throwOnError)||(d=d.catch(i.l)),d},t.fetchQuery=function(e,t,n){var r=Object(i.p)(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);var a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(i.l).catch(i.l)},t.fetchInfiniteQuery=function(e,t,n){var r=Object(i.p)(e,t,n);return r.behavior=Object(l.c)(),this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(i.l).catch(i.l)},t.cancelMutations=function(){var e=this,t=u.a.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(i.l).catch(i.l)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return Object(i.e)(e)===Object(i.e)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return Object(i.q)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return Object(i.e)(e)===Object(i.e)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return Object(i.q)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=Object(r.a)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=Object(i.f)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:Object(r.a)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2265),i=n(1368),o=n(1371),a=n(1362),s=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}Object(r.a)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new o.a({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.a.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((function(t){return Object(a.j)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return Object(a.j)(e,t)}))},n.notify=function(e){var t=this;i.a.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.a.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(a.l)}))}),Promise.resolve())}))},t}(n(1365).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(1363),i=n(1367),o=n(1368),a=n(1361),s=n(1362),c=function(){function e(e){this.options=Object(r.a)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.l).catch(s.l)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),Object(i.a)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new a.b({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return Object(r.a)({},e,{failureCount:e.failureCount+1});case"pause":return Object(r.a)({},e,{isPaused:!0});case"continue":return Object(r.a)({},e,{isPaused:!1});case"loading":return Object(r.a)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return Object(r.a)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return Object(r.a)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return Object(r.a)({},e,t.state);default:return e}}(this.state,e),o.a.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(1361),i=n(1362);function o(){return{onFetch:function(e){e.fetchFn=function(){var t,n,o,c,u,l,d,p=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,f=null==(o=e.fetchOptions)||null==(c=o.meta)?void 0:c.fetchMore,h=null==f?void 0:f.pageParam,m="forward"===(null==f?void 0:f.direction),g="backward"===(null==f?void 0:f.direction),v=(null==(u=e.state.data)?void 0:u.pages)||[],y=(null==(l=e.state.data)?void 0:l.pageParams)||[],b=Object(i.d)(),w=null==b?void 0:b.signal,S=y,C=!1,_=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},O=function(e,t,n,r){return S=r?[t].concat(S):[].concat(S,[t]),r?[n].concat(e):[].concat(e,[n])},E=function(t,n,i,o){if(C)return Promise.reject("Cancelled");if("undefined"===typeof i&&!n&&t.length)return Promise.resolve(t);var a={queryKey:e.queryKey,signal:w,pageParam:i,meta:e.meta},s=_(a),c=Promise.resolve(s).then((function(e){return O(t,i,e,o)}));return Object(r.c)(s)&&(c.cancel=s.cancel),c};if(v.length)if(m){var I="undefined"!==typeof h,A=I?h:a(e.options,v);d=E(v,I,A)}else if(g){var T="undefined"!==typeof h,P=T?h:s(e.options,v);d=E(v,T,P,!0)}else!function(){S=[];var t="undefined"===typeof e.options.getNextPageParam,n=!p||!v[0]||p(v[0],0,v);d=n?E([],t,y[0]):Promise.resolve(O([],y[0],v[0]));for(var r=function(n){d=d.then((function(r){if(!p||!v[n]||p(v[n],n,v)){var i=t?y[n]:a(e.options,r);return E(r,t,i)}return Promise.resolve(O(r,y[n],v[n]))}))},i=1;i<v.length;i++)r(i)}();else d=E([]);var R=d.then((function(e){return{pages:e,pageParams:S}}));return R.cancel=function(){C=!0,null==b||b.abort(),Object(r.c)(d)&&d.cancel()},R}}}}function a(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function s(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function c(e,t){if(e.getNextPageParam&&Array.isArray(t)){var n=a(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}function u(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){var n=s(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1363),i=n(2265),o=n(1362),a=n(1368),s=n(1364),c=n(1365),u=n(1367),l=n(1361),d=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.previousSelectError=null,r.bindMethods(),r.setOptions(n),r}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),p(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnReconnect||!1!==t.refetchOnReconnect&&h(e,t));var e,t},n.shouldFetchOnWindowFocus=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnWindowFocus||!1!==t.refetchOnWindowFocus&&h(e,t));var e,t},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var i=this.hasListeners();i&&f(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!i||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var o=this.computeRefetchInterval();!i||this.currentQuery===r&&this.options.enabled===n.enabled&&o===this.currentRefetchInterval||this.updateRefetchInterval(o)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},i=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return i(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&i("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var i=t.subscribe((function(t){t.isFetching||(i(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch(Object(r.a)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(o.l)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!o.h&&!this.currentResult.isStale&&Object(o.i)(this.options.staleTime)){var t=Object(o.w)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!o.h&&!1!==this.options.enabled&&Object(o.i)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.a.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0},n.clearRefetchInterval=function(){clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0},n.createResult=function(e,t){var n,r=this.currentQuery,i=this.options,a=this.currentResult,s=this.currentResultState,c=this.currentResultOptions,l=e!==r,d=l?e.state:this.currentQueryInitialState,m=l?this.currentResult:this.previousQueryResult,g=e.state,v=g.dataUpdatedAt,y=g.error,b=g.errorUpdatedAt,w=g.isFetching,S=g.status,C=!1,_=!1;if(t.optimisticResults){var O=this.hasListeners(),E=!O&&p(e,t),I=O&&f(e,r,t,i);(E||I)&&(w=!0,v||(S="loading"))}if(t.keepPreviousData&&!g.dataUpdateCount&&(null==m?void 0:m.isSuccess)&&"error"!==S)n=m.data,v=m.dataUpdatedAt,S=m.status,C=!0;else if(t.select&&"undefined"!==typeof g.data){var A;if(a&&g.data===(null==s?void 0:s.data)&&t.select===(null==(A=this.previousSelect)?void 0:A.fn)&&!this.previousSelectError)n=this.previousSelect.result;else try{n=t.select(g.data),!1!==t.structuralSharing&&(n=Object(o.s)(null==a?void 0:a.data,n)),this.previousSelect={fn:t.select,result:n},this.previousSelectError=null}catch(P){Object(u.a)().error(P),y=P,this.previousSelectError=P,b=Date.now(),S="error"}}else n=g.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof n&&("loading"===S||"idle"===S)){var T;if((null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==c?void 0:c.placeholderData))T=a.data;else if(T="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof T)try{T=t.select(T),!1!==t.structuralSharing&&(T=Object(o.s)(null==a?void 0:a.data,T)),this.previousSelectError=null}catch(P){Object(u.a)().error(P),y=P,this.previousSelectError=P,b=Date.now(),S="error"}"undefined"!==typeof T&&(S="success",n=T,_=!0)}return{status:S,isLoading:"loading"===S,isSuccess:"success"===S,isError:"error"===S,isIdle:"idle"===S,data:n,dataUpdatedAt:v,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&"loading"!==S,isLoadingError:"error"===S&&0===g.dataUpdatedAt,isPlaceholderData:_,isPreviousData:C,isRefetchError:"error"===S&&0!==g.dataUpdatedAt,isStale:h(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,i=n.notifyOnChangePropsExclusions;if(!r&&!i)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var o="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,a=e[r]!==t[r],s=null==o?void 0:o.some((function(e){return e===n})),c=null==i?void 0:i.some((function(e){return e===n}));return a&&!c&&(!o||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Object(o.u)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify(Object(r.a)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||Object(l.d)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;a.a.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(c.a);function p(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||function(e,t){return!1!==t.enabled&&e.state.dataUpdatedAt>0&&("always"===t.refetchOnMount||!1!==t.refetchOnMount&&h(e,t))}(e,t)}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return e.isStaleByTime(t.staleTime)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2265),i=n(1362),o=n(1368),a=n(1373),s=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.queries=[],r.result=[],r.observers=[],r.observersMap={},n&&r.setQueries(n),r}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){var e=this;1===this.listeners.length&&this.observers.forEach((function(t){t.subscribe((function(n){e.onUpdate(t,n)}))}))},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.destroy=function(){this.listeners=[],this.observers.forEach((function(e){e.destroy()}))},n.setQueries=function(e,t){this.queries=e,this.updateObservers(t)},n.getCurrentResult=function(){return this.result},n.getOptimisticResult=function(e){return this.findMatchingObservers(e).map((function(e){return e.observer.getOptimisticResult(e.defaultedQueryOptions)}))},n.findMatchingObservers=function(e){var t=this,n=this.observers,r=e.map((function(e){return t.client.defaultQueryObserverOptions(e)})),i=r.flatMap((function(e){var t=n.find((function(t){return t.options.queryHash===e.queryHash}));return null!=t?[{defaultedQueryOptions:e,observer:t}]:[]})),o=i.map((function(e){return e.defaultedQueryOptions.queryHash})),a=r.filter((function(e){return!o.includes(e.queryHash)})),s=n.filter((function(e){return!i.some((function(t){return t.observer===e}))})),c=a.map((function(e,n){if(e.keepPreviousData){var r=s[n];if(void 0!==r)return{defaultedQueryOptions:e,observer:r}}return{defaultedQueryOptions:e,observer:t.getObserver(e)}}));return i.concat(c).sort((function(e,t){return r.indexOf(e.defaultedQueryOptions)-r.indexOf(t.defaultedQueryOptions)}))},n.getObserver=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.observersMap[t.queryHash];return null!=n?n:new a.a(this.client,t)},n.updateObservers=function(e){var t=this;o.a.batch((function(){var n=t.observers,r=t.findMatchingObservers(t.queries);r.forEach((function(t){return t.observer.setOptions(t.defaultedQueryOptions,e)}));var o=r.map((function(e){return e.observer})),a=Object.fromEntries(o.map((function(e){return[e.options.queryHash,e]}))),s=o.map((function(e){return e.getCurrentResult()})),c=o.some((function(e,t){return e!==n[t]}));(n.length!==o.length||c)&&(t.observers=o,t.observersMap=a,t.result=s,t.hasListeners()&&(Object(i.a)(n,o).forEach((function(e){e.destroy()})),Object(i.a)(o,n).forEach((function(e){e.subscribe((function(n){t.onUpdate(e,n)}))})),t.notify()))}))},n.onUpdate=function(e,t){var n=this.observers.indexOf(e);-1!==n&&(this.result=Object(i.r)(this.result,n,t),this.notify())},n.notify=function(){var e=this;o.a.batch((function(){e.listeners.forEach((function(t){t(e.result)}))}))},t}(n(1365).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1363),i=n(2265),o=n(1373),a=n(1372),s=function(e){function t(t,n){return e.call(this,t,n)||this}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){e.prototype.bindMethods.call(this),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)},n.setOptions=function(t,n){e.prototype.setOptions.call(this,Object(r.a)({},t,{behavior:Object(a.c)()}),n)},n.getOptimisticResult=function(t){return t.behavior=Object(a.c)(),e.prototype.getOptimisticResult.call(this,t)},n.fetchNextPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"forward",pageParam:null==e?void 0:e.pageParam}}})},n.fetchPreviousPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"backward",pageParam:null==e?void 0:e.pageParam}}})},n.createResult=function(t,n){var i,o,s,c,u,l,d=t.state,p=e.prototype.createResult.call(this,t,n);return Object(r.a)({},p,{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Object(a.a)(n,null==(i=d.data)?void 0:i.pages),hasPreviousPage:Object(a.b)(n,null==(o=d.data)?void 0:o.pages),isFetchingNextPage:d.isFetching&&"forward"===(null==(s=d.fetchMeta)||null==(c=s.fetchMore)?void 0:c.direction),isFetchingPreviousPage:d.isFetching&&"backward"===(null==(u=d.fetchMeta)||null==(l=u.fetchMore)?void 0:l.direction)})},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1363),i=n(2265),o=n(1371),a=n(1368),s=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Object(r.a)({},this.options,{variables:"undefined"!==typeof e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:Object(o.b)(),t=Object(r.a)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;a.a.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(1365).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1363);function i(e){return e.state.isPaused}function o(e){return"success"===e.state.status}function a(e,t){var n,r,a=[],s=[];if(!1!==(null==(n=t=t||{})?void 0:n.dehydrateMutations)){var c=t.shouldDehydrateMutation||i;e.getMutationCache().getAll().forEach((function(e){c(e)&&a.push(function(e){return{mutationKey:e.options.mutationKey,state:e.state}}(e))}))}if(!1!==(null==(r=t)?void 0:r.dehydrateQueries)){var u=t.shouldDehydrateQuery||o;e.getQueryCache().getAll().forEach((function(e){u(e)&&s.push(function(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}(e))}))}return{mutations:a,queries:s}}function s(e,t,n){if("object"===typeof t&&null!==t){var i=e.getMutationCache(),o=e.getQueryCache(),a=t.mutations||[],s=t.queries||[];a.forEach((function(t){var o;i.build(e,Object(r.a)({},null==n||null==(o=n.defaultOptions)?void 0:o.mutations,{mutationKey:t.mutationKey}),t.state)})),s.forEach((function(t){var i,a=o.get(t.queryHash);a?a.state.dataUpdatedAt<t.state.dataUpdatedAt&&a.setState(t.state):o.build(e,Object(r.a)({},null==n||null==(i=n.defaultOptions)?void 0:i.queries,{queryKey:t.queryKey,queryHash:t.queryHash}),t.state)}))}}},function(e,t){},function(e,t,n){"use strict";n.r(t),n(2294),n(2295);var r=n(1380);n.d(t,"QueryClientProvider",(function(){return r.a})),n.d(t,"useQueryClient",(function(){return r.b}));var i=n(1381);n.d(t,"QueryErrorResetBoundary",(function(){return i.a})),n.d(t,"useQueryErrorResetBoundary",(function(){return i.b}));var o=n(1382);n.d(t,"useIsFetching",(function(){return o.a}));var a=n(1383);n.d(t,"useIsMutating",(function(){return a.a}));var s=n(1384);n.d(t,"useMutation",(function(){return s.a}));var c=n(1386);n.d(t,"useQuery",(function(){return c.a}));var u=n(1388);n.d(t,"useQueries",(function(){return u.a}));var l=n(1389);n.d(t,"useInfiniteQuery",(function(){return l.a}));var d=n(1390);n.d(t,"useHydrate",(function(){return d.b})),n.d(t,"Hydrate",(function(){return d.a}));var p=n(1391);for(var f in p)["default","QueryClientProvider","useQueryClient","QueryErrorResetBoundary","useQueryErrorResetBoundary","useIsFetching","useIsMutating","useMutation","useQuery","useQueries","useInfiniteQuery","useHydrate","Hydrate"].indexOf(f)<0&&function(e){n.d(t,e,(function(){return p[e]}))}(f)},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(870),i=n.n(r),o=i.a.createContext(void 0),a=i.a.createContext(!1);function s(e){return e&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=o),window.ReactQueryClientContext):o}var c=function(){var e=i.a.useContext(s(i.a.useContext(a)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,o=e.children;i.a.useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var c=s(r);return i.a.createElement(a.Provider,{value:r},i.a.createElement(c.Provider,{value:t},o))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(870),i=n.n(r);function o(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var a=i.a.createContext(o()),s=function(){return i.a.useContext(a)},c=function(e){var t=e.children,n=i.a.useMemo((function(){return o()}),[]);return i.a.createElement(a.Provider,{value:n},"function"===typeof t?t(n):t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n.n(r),o=n(1368),a=n(1362),s=n(1380),c=function(e,t,n,r){var i=e.isFetching(t);n!==i&&r(i)};function u(e,t){var n=i.a.useRef(!1),r=Object(s.b)(),u=Object(a.m)(e,t)[0],l=i.a.useState(r.isFetching(u)),d=l[0],p=l[1],f=i.a.useRef(u);f.current=u;var h=i.a.useRef(d);return h.current=d,i.a.useEffect((function(){n.current=!0,c(r,f.current,h.current,p);var e=r.getQueryCache().subscribe(o.a.batchCalls((function(){n.current&&c(r,f.current,h.current,p)})));return function(){n.current=!1,e()}}),[r]),d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(870),i=n.n(r),o=n(1368),a=n(1362),s=n(1380);function c(e,t){var n=i.a.useRef(!1),r=Object(a.o)(e,t),c=Object(s.b)(),u=i.a.useState(c.isMutating(r)),l=u[0],d=u[1],p=i.a.useRef(r);p.current=r;var f=i.a.useRef(l);return f.current=l,i.a.useEffect((function(){n.current=!0;var e=c.getMutationCache().subscribe(o.a.batchCalls((function(){if(n.current){var e=c.isMutating(p.current);f.current!==e&&d(e)}})));return function(){n.current=!1,e()}}),[c]),l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1363),i=n(870),o=n.n(i),a=n(1368),s=n(1362),c=n(1376),u=n(1380),l=n(1385);function d(e,t,n){var i=o.a.useRef(!1),d=o.a.useState(0)[1],p=Object(s.n)(e,t,n),f=Object(u.b)(),h=o.a.useRef();h.current?h.current.setOptions(p):h.current=new c.a(f,p);var m=h.current.getCurrentResult();o.a.useEffect((function(){i.current=!0;var e=h.current.subscribe(a.a.batchCalls((function(){i.current&&d((function(e){return e+1}))})));return function(){i.current=!1,e()}}),[]);var g=o.a.useCallback((function(e,t){h.current.mutate(e,t).catch(s.l)}),[]);if(m.error&&Object(l.a)(void 0,h.current.options.useErrorBoundary,[m.error]))throw m.error;return Object(r.a)({},m,{mutate:g,mutateAsync:m.mutate})}},function(e,t,n){"use strict";function r(e,t,n){return"function"===typeof t?t.apply(void 0,n):"boolean"===typeof t?t:!!e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1373),i=n(1362),o=n(1387);function a(e,t,n){var a=Object(i.p)(e,t,n);return Object(o.a)(a,r.a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n.n(r),o=n(1368),a=n(1381),s=n(1380),c=n(1385);function u(e,t){var n=i.a.useRef(!1),r=i.a.useState(0)[1],u=Object(s.b)(),l=Object(a.b)(),d=u.defaultQueryObserverOptions(e);d.optimisticResults=!0,d.onError&&(d.onError=o.a.batchCalls(d.onError)),d.onSuccess&&(d.onSuccess=o.a.batchCalls(d.onSuccess)),d.onSettled&&(d.onSettled=o.a.batchCalls(d.onSettled)),d.suspense&&("number"!==typeof d.staleTime&&(d.staleTime=1e3),0===d.cacheTime&&(d.cacheTime=1)),(d.suspense||d.useErrorBoundary)&&(l.isReset()||(d.retryOnMount=!1));var p=i.a.useState((function(){return new t(u,d)}))[0],f=p.getOptimisticResult(d);if(i.a.useEffect((function(){n.current=!0,l.clearReset();var e=p.subscribe(o.a.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return p.updateResult(),function(){n.current=!1,e()}}),[l,p]),i.a.useEffect((function(){p.setOptions(d,{listeners:!1})}),[d,p]),d.suspense&&f.isLoading)throw p.fetchOptimistic(d).then((function(e){var t=e.data;null==d.onSuccess||d.onSuccess(t),null==d.onSettled||d.onSettled(t,null)})).catch((function(e){l.clearReset(),null==d.onError||d.onError(e),null==d.onSettled||d.onSettled(void 0,e)}));if(f.isError&&!l.isReset()&&!f.isFetching&&Object(c.a)(d.suspense,d.useErrorBoundary,[f.error,p.getCurrentQuery()]))throw f.error;return"tracked"===d.notifyOnChangeProps&&(f=p.trackResult(f,d)),f}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(870),i=n.n(r),o=n(1368),a=n(1374),s=n(1380);function c(e){var t=i.a.useRef(!1),n=i.a.useState(0)[1],c=Object(s.b)(),u=Object(r.useMemo)((function(){return e.map((function(e){var t=c.defaultQueryObserverOptions(e);return t.optimisticResults=!0,t}))}),[e,c]),l=i.a.useState((function(){return new a.a(c,u)}))[0],d=l.getOptimisticResult(u);return i.a.useEffect((function(){t.current=!0;var e=l.subscribe(o.a.batchCalls((function(){t.current&&n((function(e){return e+1}))})));return function(){t.current=!1,e()}}),[l]),i.a.useEffect((function(){l.setQueries(u,{listeners:!1})}),[u,l]),d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1375),i=n(1362),o=n(1387);function a(e,t,n){var a=Object(i.p)(e,t,n);return Object(o.a)(a,r.a)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(870),i=n.n(r),o=n(1377),a=n(1380);function s(e,t){var n=Object(a.b)(),r=i.a.useRef(t);r.current=t,i.a.useMemo((function(){e&&Object(o.b)(n,e,r.current)}),[n,e])}var c=function(e){var t=e.children,n=e.options;return s(e.state,n),t}},function(e,t){},function(e,t,n){"use strict";function r(e){throw new Error(`Reached unexpected case ${e} in exhaustive check`)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.getFullYear(),r=e.getMonth()+1,i=e.getDate();return[n,String(r).padStart(2,"0"),String(i).padStart(2,"0")].join(t?"-":"")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r={decode:e=>{const t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n));for(let i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(878),i=n(1227);function o(e){const t=new Date(e.getTime());return t.setHours(0,0,0,0),t}const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"short";return function(e,t,n){const r=e.toLocaleTimeString(t,{hour:"numeric",minute:"2-digit"}),a=Object(i.a)("DateTime.Relative.Yesterday");if(function(e){return o(e).getTime()===o(new Date).getTime()}(e))return"short"===n?r:Object(i.a)("DateTime.Relative.TodayTime",{time:r});if(function(e){const t=o(new Date);return t.getTime()>e.getTime()&&t.getTime()-e.getTime()<864e5}(e))return"short"===n?a:Object(i.a)("DateTime.Relative.YesterdayTime",{time:r});if("short"===n)return e.toLocaleDateString(t,{year:"2-digit",month:"numeric",day:"numeric"});{const n=e.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"});return Object(i.a)("DateTime.Relative.DateTime",{date:n,time:r})}}(e,Object(r.b)(),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,i=n(2208),o=n(919),a=n(2134),s=n(965);class c{constructor(){this.currentPromise=null}async performRevalidate(){const e=a.a.cloudOSApplication.currentChildApplicationIdentifier;i.b.sharedInstance.recordStat(new o.a("didPerformRevalidate",{revalidateCalledFrom:e}));const t=this.currentPromise;if(t)return t;const n=(async()=>{try{await Object(s.s)()}finally{this.currentPromise=null}})();return this.currentPromise=n,n}}r=c,c.sharedInstance=new r},function(e,t,n){var r=n(1006),i=n(1008),o=String.fromCharCode(0);function a(e){this.mode=e===Array?"array":"string",this.clear()}a.prototype.clear=function(){this.root={},this.size=0},a.prototype.set=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t,this},a.prototype.update=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t(r[o]),this},a.prototype.get=function(e){var t,n,r=this.root;for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return;if(o in r)return r[o]},a.prototype.delete=function(e){var t,n,r,i,a=this.root,s=null,c=null;for(r=0,i=e.length;r<i;r++){if(t=a,"undefined"===typeof(a=a[n=e[r]]))return!1;null!==s?Object.keys(a).length>1&&(s=null,c=null):Object.keys(a).length<2&&(s=t,c=n)}return o in a&&(this.size--,s?delete s[c]:delete a[o],!0)},a.prototype.has=function(e){for(var t=this.root,n=0,r=e.length;n<r;n++)if("undefined"===typeof(t=t[e[n]]))return!1;return o in t},a.prototype.find=function(e){var t,n,r="string"===typeof e,i=this.root,a=[];for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(i=i[e[t]]))return a;for(var s,c=[i],u=[e];c.length;)for(s in e=u.pop(),i=c.pop())s!==o?(c.push(i[s]),u.push(r?e+s:e.concat(s))):a.push([e,i[o]]);return a},a.prototype.values=function(e){var t,n,r=this.root,a=[];if(e)for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty();return a.push(r),new i((function(){for(var e,t,n=!1;a.length;){for(t in e=a.pop())t!==o?a.push(e[t]):n=!0;if(n)return{done:!1,value:e[o]}}return{done:!0}}))},a.prototype.prefixes=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:t}}return{done:!0}}))},a.prototype.keys=a.prototype.prefixes,a.prototype.entries=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:[t,e[o]]}}return{done:!0}}))},"undefined"!==typeof Symbol&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=function(){for(var e,t=new Array(this.size),n=this.entries(),r=0;!(e=n.next()).done;)t[r++]=e.value;return Object.defineProperty(t,"constructor",{value:a,enumerable:!1}),t},"undefined"!==typeof Symbol&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.prototype.toJSON=function(){return this.root},a.from=function(e){var t=new a;return r(e,(function(e,n){t.set(n,e)})),t},a.SENTINEL=o,e.exports=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1264),i=n(1396),o=n(2245),a=n(2134),s=n(911),c=n(1284),u=n(2219),l=n(965);const d=new c.a("LegacyCloudOSApplicationServiceFromChildProtocol",new Set(["replaceCurrentApp","revalidateUser","setAppBanner","showAccountSettings","setTitle","setRoute","setBadgeCount","completeAuthentication","logoutFromAllBrowsers","performLogout","completeAuthentication","showSpringBoard","switchToApplication","showAccountMenu","showAppSwitcher","showWhatsNew","sendLocalNotification","showLocalNotification","showCreationMenu","showStorageUsageWarning","showADPAnnouncement","showBeneficiaryAnnouncement","didBecomeInteractive"])),p=new c.a("LegacyCloudOSApplicationServiceToChildProtocol",new Set(["adjustLayout","_cloudOSStateChange","userDidRevalidate","secondaryAuthDidSucceed","secondaryAuthDidFail","didReceiveNotification","launchOptionsDidChange","whatsNewDidDisplay"]));class f{constructor(e,t,n,r){this.applicationInfo=void 0,this.applicationConfiguration=void 0,this.historyState=void 0,this.bannerController=void 0,this.appBannerId=null,this.appBannerLinkHref=null,this.processReference=r,this.applicationInfo=e.applicationInfo,this.applicationConfiguration=e,this.historyState=t,this.bannerController=n,r.createMessagingChannel(d,this,p,void 0,r.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}notifySizeClassDidChange(e,t){const n=this.processReference,r=n.remoteProxy;var i;r&&n.isLegacyApplication&&(null===(i=r.adjustLayout)||void 0===i||i.call(r,[{sizeClass:{horizontal:e,vertical:t}}]))}completeAuthentication(){Object(l.c)()}logoutFromAllBrowsers(){return Object(l.q)()}performLogout(){return a.a.cloudOSApplication.unauthenticateUser({trustBrowserConfirmation:{hideCancelButton:!1}})}replaceCurrentApp(e,t){r.a.sharedInstance.switchToApplication(t)}revalidateUser(){this._revalidateUser()}async _revalidateUser(){await i.a.sharedInstance.performRevalidate();const e=this.processReference,t=e.remoteProxy;if(t&&e.isLegacyApplication){const e=o.a.getCloudOSState(this.applicationInfo,this.applicationConfiguration,this.historyState);t._cloudOSStateChange(e),t.userDidRevalidate()}}showLocalNotification(e,t,n,r){return this.sendLocalNotification(e,t,n,r)}sendLocalNotification(e,t,n,r){const i=this.applicationConfiguration;(t.alertTitle||t.alertDescription||t.badgeCount||t.soundPath)&&Object(u.a)({badgeCount:t.badgeCount,notification:{title:t.alertTitle,description:t.alertDescription},sound:t.soundPath,applicationIdentifier:null!==r&&void 0!==r?r:i.identifier,payload:{...n,...t.actionPayload}},t.isDismissable,t.omitWhenActive)}setAppBanner(e,t){const n=this.appBannerId;if(n&&(this.bannerController.removeBanner(n),this.appBannerId=null,this.appBannerLinkHref=null),t){var r,i,o,a;const e=null!==(r=null===(i=t.optionalLink)||void 0===i?void 0:i.text)&&void 0!==r?r:void 0,n=null!==(o=null===(a=t.optionalLink)||void 0===a?void 0:a.url)&&void 0!==o?o:void 0,s=e&&n?"link":"button";this.appBannerId=this.bannerController.setCurrentBannerForApp(this.applicationInfo.applicationName,t.title,t.description,(()=>this.bannerActionDidClick()),void 0!==e?e:void 0,s),this.appBannerLinkHref=null!==n&&void 0!==n?n:null}}setBadgeCount(e,t){const n=r.a.sharedInstance.getChildApplicationController(this.applicationInfo);n&&(n.badgeCount=t)}setRoute(e,t){r.a.sharedInstance.replaceHistoryState(this.applicationInfo,{},void 0,t,"")}setTitle(e,t){r.a.sharedInstance.setTitle(this.applicationInfo,t)}showAccountSettings(){r.a.sharedInstance.switchToApplication("settings")}showAppSwitcher(e,t){a.a.cloudOSApplication.showAppSwitcher(t)}showStorageUsageWarning(e,t){a.a.cloudOSApplication.showStorageUsageWarning(t)}showADPAnnouncement(e,t){a.a.cloudOSApplication.showADPAnnouncement(t)}showBeneficiaryAnnouncement(e,t){a.a.cloudOSApplication.showBeneficiaryAnnouncement(t)}showAccountMenu(e,t){a.a.cloudOSApplication.showAccountMenu(t)}showWhatsNew(e,t,n,r){a.a.cloudOSApplication.showWhatsNew(t,n,r)}showSpringBoard(){a.a.cloudOSApplication.navigateToHomePage()}switchToApplication(e,t){r.a.sharedInstance.switchToApplication(t)}showCreationMenu(e,t){a.a.cloudOSApplication.showCreationMenu(t)}didBecomeInteractive(e,t,n){const i=this.processReference.applicationInfo,o=r.a.sharedInstance.getChildApplicationController(i);o&&o.remoteInstanceDidBecomeInteractive(t,n)}bannerActionDidClick(){const e=this.appBannerLinkHref;e&&Object(s.a)(e.toString(),{target:"_blank",features:[]})}didReceiveNotification(e){this.didReceiveNotification(e)}launchOptionsDidChange(e){this.launchOptionsDidChange(e)}whatsNewDidDisplay(e,t){this.whatsNewDidDisplay(e,t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(1204),o=n(1264);class a{constructor(){this.serializedDriveTileData="",this.switchDriveToAppMode=void 0}getTileData(e){if(e===i.b.identifier)return this.serializedDriveTileData}setTileData(e,t){if(e===i.b.identifier){this.serializedDriveTileData=t;const{sharedInstance:e}=o.a;e.getChildApplicationController(i.b.applicationInfo).tileDataDidUpdate(t)}}}r=a,a.sharedInstance=new r},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"sparkles",svgPath:"M52.3926-70.5566C52.9785-70.5566 53.2715-70.8984 53.418-71.4355C54.8828-79.5898 54.834-79.7852 63.3301-81.3965C63.8672-81.4941 64.2578-81.8359 64.2578-82.4219C64.2578-83.0078 63.8672-83.3496 63.3301-83.4473C54.834-85.1562 55.127-85.3516 53.418-93.4082C53.2715-93.9453 52.9785-94.2871 52.3926-94.2871C51.8066-94.2871 51.4648-93.9453 51.3672-93.4082C49.6582-85.3516 49.9512-85.1562 41.4551-83.4473C40.8691-83.3496 40.5273-83.0078 40.5273-82.4219C40.5273-81.8359 40.8691-81.4941 41.4551-81.3965C49.9512-79.6875 49.8535-79.5898 51.3672-71.4355C51.4648-70.8984 51.8066-70.5566 52.3926-70.5566ZM28.7598-36.9629C29.6875-36.9629 30.3223-37.5488 30.4199-38.4277C32.1777-51.4648 32.6172-51.4648 46.0938-54.0527C46.9238-54.1992 47.5586-54.7852 47.5586-55.7129C47.5586-56.5918 46.9238-57.2266 46.0938-57.373C32.6172-59.2285 32.1289-59.668 30.4199-72.9492C30.3223-73.8281 29.6875-74.4629 28.7598-74.4629C27.8809-74.4629 27.2461-73.8281 27.0996-72.9004C25.5371-59.8145 24.8047-59.8633 11.4258-57.373C10.5957-57.1777 9.96094-56.5918 9.96094-55.7129C9.96094-54.7363 10.5957-54.1992 11.6211-54.0527C24.9023-51.9043 25.5371-51.5625 27.0996-38.5254C27.2461-37.5488 27.8809-36.9629 28.7598-36.9629ZM61.8652 17.0898C63.1348 17.0898 64.0625 16.1621 64.2578 14.8438C67.7246-11.9141 71.5332-15.9668 97.998-18.8965C99.3652-19.043 100.293-20.0684 100.293-21.3379C100.293-22.6074 99.3652-23.584 97.998-23.7793C71.5332-26.709 67.7246-30.7617 64.2578-57.5195C64.0625-58.8379 63.1348-59.7168 61.8652-59.7168C60.5957-59.7168 59.668-58.8379 59.4727-57.5195C55.957-30.7617 52.1973-26.709 25.7324-23.7793C24.3652-23.584 23.4375-22.6074 23.4375-21.3379C23.4375-20.0684 24.3652-19.043 25.7324-18.8965C52.1484-15.4297 55.8105-11.8652 59.4727 14.8438C59.668 16.1621 60.5957 17.0898 61.8652 17.0898Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:78.88510009765628,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 90.3359375 118.1142578125",width:90.3359375,height:118.1142578125,translateX:-9.957001953124973,translateY:94.287109375,baseline:94.287109375,capline:23.8271484375}}})}},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.match=t.foldW=t.matchW=t.isRight=t.isLeft=t.fromOption=t.fromPredicate=t.FromEither=t.MonadThrow=t.throwError=t.ChainRec=t.Extend=t.extend=t.Alt=t.alt=t.altW=t.Bifunctor=t.mapLeft=t.bimap=t.Traversable=t.sequence=t.traverse=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.Applicative=t.Apply=t.ap=t.apW=t.Pointed=t.of=t.asUnit=t.as=t.Functor=t.map=t.getAltValidation=t.getApplicativeValidation=t.getWitherable=t.getFilterable=t.getCompactable=t.getSemigroup=t.getEq=t.getShow=t.URI=t.flatMap=t.right=t.left=void 0,t.either=t.stringifyJSON=t.chainFirstW=t.chainFirst=t.chain=t.chainW=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.let=t.bindTo=t.Do=t.exists=t.toUnion=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.orElse=t.orElseW=t.swap=t.filterOrElseW=t.filterOrElse=t.flatMapOption=t.flatMapNullable=t.liftOption=t.liftNullable=t.chainOptionKW=t.chainOptionK=t.fromOptionK=t.duplicate=t.flatten=t.flattenW=t.tap=t.apSecondW=t.apSecond=t.apFirstW=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=t.fold=void 0,t.getValidationMonoid=t.getValidationSemigroup=t.getApplyMonoid=t.getApplySemigroup=void 0,t.toError=function(e){try{return e instanceof Error?e:new Error(String(e))}catch(t){return new Error}},t.elem=function e(n){return function(r,i){if(void 0===i){var o=e(n);return function(e){return o(r,e)}}return!(0,t.isLeft)(i)&&n.equals(r,i.right)}},t.parseJSON=function(e,n){return(0,t.tryCatch)((function(){return JSON.parse(e)}),n)},t.getValidation=function(e){var n=(0,t.getApplicativeValidation)(e).ap,r=(0,t.getAltValidation)(e).alt;return{URI:t.URI,_E:void 0,map:g,of:t.of,chain:t.flatMap,bimap:C,mapLeft:_,reduce:y,foldMap:b,reduceRight:w,extend:E,traverse:S,sequence:t.sequence,chainRec:I,throwError:t.throwError,ap:n,alt:r}};var a=n(1402),s=n(1403),c=o(n(1407)),u=n(1408),l=n(1409),d=n(1404),p=n(1406),f=o(n(1405)),h=n(1410),m=n(1411);t.left=f.left,t.right=f.right,t.flatMap=(0,d.dual)(2,(function(e,n){return(0,t.isLeft)(e)?e:n(e.right)}));var g=function(e,n){return(0,d.pipe)(e,(0,t.map)(n))},v=function(e,n){return(0,d.pipe)(e,(0,t.ap)(n))},y=function(e,n,r){return(0,d.pipe)(e,(0,t.reduce)(n,r))},b=function(e){return function(n,r){var i=(0,t.foldMap)(e);return(0,d.pipe)(n,i(r))}},w=function(e,n,r){return(0,d.pipe)(e,(0,t.reduceRight)(n,r))},S=function(e){var n=(0,t.traverse)(e);return function(e,t){return(0,d.pipe)(e,n(t))}},C=function(e,n,r){return(0,d.pipe)(e,(0,t.bimap)(n,r))},_=function(e,n){return(0,d.pipe)(e,(0,t.mapLeft)(n))},O=function(e,n){return(0,d.pipe)(e,(0,t.alt)(n))},E=function(e,n){return(0,d.pipe)(e,(0,t.extend)(n))},I=function(e,n){return(0,u.tailRec)(n(e),(function(e){return(0,t.isLeft)(e)?(0,t.right)((0,t.left)(e.left)):(0,t.isLeft)(e.right)?(0,t.left)(n(e.right.left)):(0,t.right)((0,t.right)(e.right.right))}))};t.URI="Either",t.getShow=function(e,n){return{show:function(r){return(0,t.isLeft)(r)?"left(".concat(e.show(r.left),")"):"right(".concat(n.show(r.right),")")}}},t.getEq=function(e,n){return{equals:function(r,i){return r===i||((0,t.isLeft)(r)?(0,t.isLeft)(i)&&e.equals(r.left,i.left):(0,t.isRight)(i)&&n.equals(r.right,i.right))}}},t.getSemigroup=function(e){return{concat:function(n,r){return(0,t.isLeft)(r)?n:(0,t.isLeft)(n)?r:(0,t.right)(e.concat(n.right,r.right))}}},t.getCompactable=function(e){var n=(0,t.left)(e.empty);return{URI:t.URI,_E:void 0,compact:function(e){return(0,t.isLeft)(e)?e:"None"===e.right._tag?n:(0,t.right)(e.right.value)},separate:function(e){return(0,t.isLeft)(e)?(0,h.separated)(e,e):(0,t.isLeft)(e.right)?(0,h.separated)((0,t.right)(e.right.left),n):(0,h.separated)(n,(0,t.right)(e.right.right))}}},t.getFilterable=function(e){var n=(0,t.left)(e.empty),r=(0,t.getCompactable)(e),i=r.compact,o=r.separate;return{URI:t.URI,_E:void 0,map:g,compact:i,separate:o,filter:function(e,r){return(0,t.isLeft)(e)||r(e.right)?e:n},filterMap:function(e,r){if((0,t.isLeft)(e))return e;var i=r(e.right);return"None"===i._tag?n:(0,t.right)(i.value)},partition:function(e,r){return(0,t.isLeft)(e)?(0,h.separated)(e,e):r(e.right)?(0,h.separated)(n,(0,t.right)(e.right)):(0,h.separated)((0,t.right)(e.right),n)},partitionMap:function(e,r){if((0,t.isLeft)(e))return(0,h.separated)(e,e);var i=r(e.right);return(0,t.isLeft)(i)?(0,h.separated)((0,t.right)(i.left),n):(0,h.separated)(n,(0,t.right)(i.right))}}},t.getWitherable=function(e){var n=(0,t.getFilterable)(e),r=(0,t.getCompactable)(e);return{URI:t.URI,_E:void 0,map:g,compact:n.compact,separate:n.separate,filter:n.filter,filterMap:n.filterMap,partition:n.partition,partitionMap:n.partitionMap,traverse:S,sequence:t.sequence,reduce:y,foldMap:b,reduceRight:w,wither:(0,m.witherDefault)(t.Traversable,r),wilt:(0,m.wiltDefault)(t.Traversable,r)}},t.getApplicativeValidation=function(e){return{URI:t.URI,_E:void 0,map:g,ap:function(n,r){return(0,t.isLeft)(n)?(0,t.isLeft)(r)?(0,t.left)(e.concat(n.left,r.left)):n:(0,t.isLeft)(r)?r:(0,t.right)(n.right(r.right))},of:t.of}},t.getAltValidation=function(e){return{URI:t.URI,_E:void 0,map:g,alt:function(n,r){if((0,t.isRight)(n))return n;var i=r();return(0,t.isLeft)(i)?(0,t.left)(e.concat(n.left,i.left)):i}}},t.map=function(e){return function(n){return(0,t.isLeft)(n)?n:(0,t.right)(e(n.right))}},t.Functor={URI:t.URI,map:g},t.as=(0,d.dual)(2,(0,p.as)(t.Functor)),t.asUnit=(0,p.asUnit)(t.Functor),t.of=t.right,t.Pointed={URI:t.URI,of:t.of},t.apW=function(e){return function(n){return(0,t.isLeft)(n)?n:(0,t.isLeft)(e)?e:(0,t.right)(n.right(e.right))}},t.ap=t.apW,t.Apply={URI:t.URI,map:g,ap:v},t.Applicative={URI:t.URI,map:g,ap:v,of:t.of},t.Chain={URI:t.URI,map:g,ap:v,chain:t.flatMap},t.Monad={URI:t.URI,map:g,ap:v,of:t.of,chain:t.flatMap},t.reduce=function(e,n){return function(r){return(0,t.isLeft)(r)?e:n(e,r.right)}},t.foldMap=function(e){return function(n){return function(r){return(0,t.isLeft)(r)?e.empty:n(r.right)}}},t.reduceRight=function(e,n){return function(r){return(0,t.isLeft)(r)?e:n(r.right,e)}},t.Foldable={URI:t.URI,reduce:y,foldMap:b,reduceRight:w},t.traverse=function(e){return function(n){return function(r){return(0,t.isLeft)(r)?e.of((0,t.left)(r.left)):e.map(n(r.right),t.right)}}},t.sequence=function(e){return function(n){return(0,t.isLeft)(n)?e.of((0,t.left)(n.left)):e.map(n.right,t.right)}},t.Traversable={URI:t.URI,map:g,reduce:y,foldMap:b,reduceRight:w,traverse:S,sequence:t.sequence},t.bimap=function(e,n){return function(r){return(0,t.isLeft)(r)?(0,t.left)(e(r.left)):(0,t.right)(n(r.right))}},t.mapLeft=function(e){return function(n){return(0,t.isLeft)(n)?(0,t.left)(e(n.left)):n}},t.Bifunctor={URI:t.URI,bimap:C,mapLeft:_},t.altW=function(e){return function(n){return(0,t.isLeft)(n)?e():n}},t.alt=t.altW,t.Alt={URI:t.URI,map:g,alt:O},t.extend=function(e){return function(n){return(0,t.isLeft)(n)?n:(0,t.right)(e(n))}},t.Extend={URI:t.URI,map:g,extend:E},t.ChainRec={URI:t.URI,map:g,ap:v,chain:t.flatMap,chainRec:I},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:g,ap:v,of:t.of,chain:t.flatMap,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:d.identity},t.fromPredicate=(0,l.fromPredicate)(t.FromEither),t.fromOption=(0,l.fromOption)(t.FromEither),t.isLeft=f.isLeft,t.isRight=f.isRight,t.matchW=function(e,n){return function(r){return(0,t.isLeft)(r)?e(r.left):n(r.right)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(e){return function(n){return(0,t.isLeft)(n)?e(n.left):n.right}},t.getOrElse=t.getOrElseW,t.flap=(0,p.flap)(t.Functor),t.apFirst=(0,s.apFirst)(t.Apply),t.apFirstW=t.apFirst,t.apSecond=(0,s.apSecond)(t.Apply),t.apSecondW=t.apSecond,t.tap=(0,d.dual)(2,c.tap(t.Chain)),t.flattenW=(0,t.flatMap)(d.identity),t.flatten=t.flattenW,t.duplicate=(0,t.extend)(d.identity),t.fromOptionK=(0,l.fromOptionK)(t.FromEither),t.chainOptionK=(0,l.chainOptionK)(t.FromEither,t.Chain),t.chainOptionKW=t.chainOptionK;var A={fromEither:t.FromEither.fromEither};t.liftNullable=f.liftNullable(A),t.liftOption=f.liftOption(A);var T={flatMap:t.flatMap};t.flatMapNullable=f.flatMapNullable(A,T),t.flatMapOption=f.flatMapOption(A,T),t.filterOrElse=(0,l.filterOrElse)(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.swap=function(e){return(0,t.isLeft)(e)?(0,t.right)(e.left):(0,t.left)(e.right)},t.orElseW=function(e){return function(n){return(0,t.isLeft)(n)?e(n.left):n}},t.orElse=t.orElseW,t.fromNullable=function(e){return function(n){return null==n?(0,t.left)(e):(0,t.right)(n)}},t.tryCatch=function(e,n){try{return(0,t.right)(e())}catch(r){return(0,t.left)(n(r))}},t.tryCatchK=function(e,n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return(0,t.tryCatch)((function(){return e.apply(void 0,r)}),n)}},t.fromNullableK=function(e){var n=(0,t.fromNullable)(e);return function(e){return(0,d.flow)(e,n)}},t.chainNullableK=function(e){var n=(0,t.fromNullableK)(e);return function(e){return(0,t.flatMap)(n(e))}},t.toUnion=(0,t.foldW)(d.identity,d.identity),t.exists=function(e){return function(n){return!(0,t.isLeft)(n)&&e(n.right)}},t.Do=(0,t.of)(f.emptyRecord),t.bindTo=(0,p.bindTo)(t.Functor);var P=(0,p.let)(t.Functor);t.let=P,t.bind=c.bind(t.Chain),t.bindW=t.bind,t.apS=(0,s.apS)(t.Apply),t.apSW=t.apS,t.ApT=(0,t.of)(f.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(e){return function(n){var r=e(0,f.head(n));if((0,t.isLeft)(r))return r;for(var i=[r.right],o=1;o<n.length;o++){var a=e(o,n[o]);if((0,t.isLeft)(a))return a;i.push(a.right)}return(0,t.right)(i)}},t.traverseReadonlyArrayWithIndex=function(e){var n=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(e);return function(e){return f.isNonEmpty(e)?n(e):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(e){return(0,t.traverseReadonlyArrayWithIndex)((function(t,n){return e(n)}))},t.sequenceArray=(0,t.traverseArray)(d.identity),t.chainW=t.flatMap,t.chain=t.flatMap,t.chainFirst=t.tap,t.chainFirstW=t.tap,t.stringifyJSON=function(e,n){return(0,t.tryCatch)((function(){var t=JSON.stringify(e);if("string"!==typeof t)throw new Error("Converting unsupported structure to JSON");return t}),n)},t.either={URI:t.URI,map:g,of:t.of,ap:v,chain:t.flatMap,reduce:y,foldMap:b,reduceRight:w,traverse:S,sequence:t.sequence,bimap:C,mapLeft:_,alt:O,extend:E,chainRec:I,throwError:t.throwError},t.getApplySemigroup=(0,s.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,a.getApplicativeMonoid)(t.Applicative),t.getValidationSemigroup=function(e,n){return(0,s.getApplySemigroup)((0,t.getApplicativeValidation)(e))(n)},t.getValidationMonoid=function(e,n){return(0,a.getApplicativeMonoid)((0,t.getApplicativeValidation)(e))(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeMonoid=function(e){var t=(0,r.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}},t.getApplicativeComposition=function(e,t){var n=(0,o.getFunctorComposition)(e,t).map,a=(0,r.ap)(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return(0,i.pipe)(e,a(t))}}};var r=n(1403),i=n(1404),o=n(1406)},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ap=function(e,t){return function(n){return function(r){return e.ap(e.map(r,(function(e){return function(n){return t.ap(e,n)}})),n)}}},t.apFirst=function(e){return function(t){return function(n){return e.ap(e.map(n,(function(e){return function(){return e}})),t)}}},t.apSecond=function(e){return function(t){return function(n){return e.ap(e.map(n,(function(){return function(e){return e}})),t)}}},t.apS=function(e){return function(t,n){return function(r){return e.ap(e.map(r,(function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}})),n)}}},t.getApplySemigroup=function(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,(function(e){return function(n){return t.concat(e,n)}})),r)}}}},t.sequenceT=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=function(e){return s.has.call(u,e)||(u[e]=c(a.tuple,e-1,[])),u[e]}(r),o=e.map(t[0],i),l=1;l<r;l++)o=e.ap(o,t[l]);return o}},t.sequenceS=function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=function(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return c((function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i}),t-1,[])}}(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}};var a=n(1404),s=o(n(1405));function c(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):c(e,t-1,i)}}var u={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,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,o=t.length;i<o;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 i(e){return e}function o(e){return function(){return e}}function a(e,t,n,r,i,o,a,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function s(e){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.dual=t.getEndomorphismMonoid=t.SK=t.hole=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.unsafeCoerce=t.apply=t.getRing=t.getSemiring=t.getMonoid=t.getSemigroup=t.getBooleanAlgebra=void 0,t.identity=i,t.constant=o,t.flip=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length>1?e(t[1],t[0]):function(n){return e(n)(t[0])}}},t.flow=a,t.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},t.increment=function(e){return e+1},t.decrement=function(e){return e-1},t.absurd=s,t.tupled=function(e){return function(t){return e.apply(void 0,t)}},t.untupled=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}},t.pipe=function(e,t,n,r,i,o,a,s,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return s(a(o(i(r(n(t(e)))))));case 9:return c(s(a(o(i(r(n(t(e))))))));default:for(var u=arguments[0],l=1;l<arguments.length;l++)u=arguments[l](u);return u}},t.not=function(e){return function(t){return!e(t)}},t.getBooleanAlgebra=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},t.getSemigroup=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},t.getMonoid=function(e){var n=(0,t.getSemigroup)(e);return function(){return{concat:n().concat,empty:function(){return e.empty}}}},t.getSemiring=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},t.getRing=function(e){var n=(0,t.getSemiring)(e);return{add:n.add,mul:n.mul,one:n.one,zero:n.zero,sub:function(t,n){return function(r){return e.sub(t(r),n(r))}}}},t.apply=function(e){return function(t){return t(e)}},t.unsafeCoerce=i,t.constTrue=o(!0),t.constFalse=o(!1),t.constNull=o(null),t.constUndefined=o(void 0),t.constVoid=t.constUndefined,t.hole=s,t.SK=function(e,t){return t},t.getEndomorphismMonoid=function(){return{concat:function(e,t){return a(e,t)},empty:i}},t.dual=function(e,t){var n="number"===typeof e?function(t){return t.length>=e}:e;return function(){var e=Array.from(arguments);return n(arguments)?t.apply(this,e):function(n){return t.apply(void 0,r([n],e,!1))}}}},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,o=t.length;i<o;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.flatMapReader=t.flatMapTask=t.flatMapIO=t.flatMapEither=t.flatMapOption=t.flatMapNullable=t.liftOption=t.liftNullable=t.fromReadonlyNonEmptyArray=t.has=t.emptyRecord=t.emptyReadonlyArray=t.tail=t.head=t.isNonEmpty=t.singleton=t.right=t.left=t.isRight=t.isLeft=t.some=t.none=t.isSome=t.isNone=void 0;var i=n(1404);t.isNone=function(e){return"None"===e._tag},t.isSome=function(e){return"Some"===e._tag},t.none={_tag:"None"},t.some=function(e){return{_tag:"Some",value:e}},t.isLeft=function(e){return"Left"===e._tag},t.isRight=function(e){return"Right"===e._tag},t.left=function(e){return{_tag:"Left",left:e}},t.right=function(e){return{_tag:"Right",right:e}},t.singleton=function(e){return[e]},t.isNonEmpty=function(e){return e.length>0},t.head=function(e){return e[0]},t.tail=function(e){return e.slice(1)},t.emptyReadonlyArray=[],t.emptyRecord={},t.has=Object.prototype.hasOwnProperty,t.fromReadonlyNonEmptyArray=function(e){return r([e[0]],e.slice(1),!0)},t.liftNullable=function(e){return function(n,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=n.apply(void 0,i);return e.fromEither(null==a?(0,t.left)(r.apply(void 0,i)):(0,t.right)(a))}}},t.liftOption=function(e){return function(n,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=n.apply(void 0,i);return e.fromEither((0,t.isNone)(a)?(0,t.left)(r.apply(void 0,i)):(0,t.right)(a.value))}}},t.flatMapNullable=function(e,n){return(0,i.dual)(3,(function(r,i,o){return n.flatMap(r,(0,t.liftNullable)(e)(i,o))}))},t.flatMapOption=function(e,n){return(0,i.dual)(3,(function(r,i,o){return n.flatMap(r,(0,t.liftOption)(e)(i,o))}))},t.flatMapEither=function(e,t){return(0,i.dual)(2,(function(n,r){return t.flatMap(n,(function(t){return e.fromEither(r(t))}))}))},t.flatMapIO=function(e,t){return(0,i.dual)(2,(function(n,r){return t.flatMap(n,(function(t){return e.fromIO(r(t))}))}))},t.flatMapTask=function(e,t){return(0,i.dual)(2,(function(n,r){return t.flatMap(n,(function(t){return e.fromTask(r(t))}))}))},t.flatMapReader=function(e,t){return(0,i.dual)(2,(function(n,r){return t.flatMap(n,(function(t){return e.fromReader(r(t))}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=i,t.flap=function(e){return function(t){return function(n){return e.map(n,(function(e){return e(t)}))}}},t.bindTo=function(e){return function(t){return function(n){return e.map(n,(function(e){var n;return(n={})[t]=e,n}))}}},t.let=function(e){return function(t,n){return function(r){return e.map(r,(function(e){var r;return Object.assign({},e,((r={})[t]=n(e),r))}))}}},t.getFunctorComposition=function(e,t){var n=i(e,t);return{map:function(e,t){return(0,r.pipe)(e,n(t))}}},t.as=o,t.asUnit=function(e){var t=o(e);return function(e){return t(e,void 0)}};var r=n(1404);function i(e,t){return function(n){return function(r){return e.map(r,(function(e){return t.map(e,n)}))}}}function o(e){return function(t,n){return e.map(t,(function(){return n}))}}},function(e,t,n){"use strict";function r(e){return function(t,n){return e.chain(t,(function(t){return e.map(n(t),(function(){return t}))}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirst=function(e){var t=r(e);return function(e){return function(n){return t(n,e)}}},t.tap=r,t.bind=function(e){return function(t,n){return function(r){return e.chain(r,(function(r){return e.map(n(r),(function(e){var n;return Object.assign({},r,((n={})[t]=e,n))}))}))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tailRec=void 0,t.tailRec=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right}},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromOption=u,t.fromPredicate=function(e){return function(t,n){return function(r){return e.fromEither(t(r)?c.right(r):c.left(n(r)))}}},t.fromOptionK=l,t.chainOptionK=function(e,t){var n=l(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}},t.fromEitherK=d,t.chainEitherK=function(e,t){var n=d(e);return function(e){return function(r){return t.chain(r,n(e))}}},t.chainFirstEitherK=function(e,t){var n=p(e,t);return function(e){return function(t){return n(t,e)}}},t.filterOrElse=function(e,t){return function(n,r){return function(i){return t.chain(i,(function(t){return e.fromEither(n(t)?c.right(t):c.left(r(t)))}))}}},t.tapEither=p;var a=n(1407),s=n(1404),c=o(n(1405));function u(e){return function(t){return function(n){return e.fromEither(c.isNone(n)?c.left(t()):c.right(n.value))}}}function l(e){var t=u(e);return function(e){var n=t(e);return function(e){return(0,s.flow)(e,n)}}}function d(e){return function(t){return(0,s.flow)(t,e.fromEither)}}function p(e,t){var n=d(e),r=(0,a.tap)(t);return function(e,t){return r(e,n(t))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.right=t.left=t.flap=t.Functor=t.Bifunctor=t.URI=t.bimap=t.mapLeft=t.map=t.separated=void 0;var r=n(1404),i=n(1406);t.separated=function(e,t){return{left:e,right:t}},t.map=function(e){return function(n){return(0,t.separated)((0,t.left)(n),e((0,t.right)(n)))}},t.mapLeft=function(e){return function(n){return(0,t.separated)(e((0,t.left)(n)),(0,t.right)(n))}},t.bimap=function(e,n){return function(r){return(0,t.separated)(e((0,t.left)(r)),n((0,t.right)(r)))}},t.URI="Separated",t.Bifunctor={URI:t.URI,mapLeft:function(e,n){return(0,r.pipe)(e,(0,t.mapLeft)(n))},bimap:function(e,n,i){return(0,r.pipe)(e,(0,t.bimap)(n,i))}},t.Functor={URI:t.URI,map:function(e,n){return(0,r.pipe)(e,(0,t.map)(n))}},t.flap=(0,i.flap)(t.Functor),t.left=function(e){return e.left},t.right=function(e){return e.right}},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.wiltDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}},t.witherDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}},t.filterE=function(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,(function(n){return t.map(e(n),(function(e){return e?a.some(n):a.none}))}))}}}};var a=o(n(1405))},function(e,t,n){"use strict";n.d(t,"k",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"g",(function(){return y})),n.d(t,"f",(function(){return w})),n.d(t,"e",(function(){return S}));var r=n(1413),i=n(1414),o=n(2266),a=n(1417),s=n(1416),c=n(1415),u=n(465);const l=e=>!!e&&"object"===typeof e&&"serverErrorCode"in e;async function d(e){const t=await Object(r.d)({url:e.url,validate:e.validate,includeCredentials:!0});if(!t.ok)throw new i.b(t,`server error while fetching recent docs, status: ${t.status}`);const n=await t.json();if(202===t.status&&l(n))throw new i.e(n.retryAfter,"seconds");return n}const p=(e,t)=>{let{webServices:n}=e;return Object(c.a)("fetchRecentDriveDocs",(async()=>{if(null===n||void 0===n||!n.docws)throw new Error("no service url available");return d({url:Object(o.u)(n.docws,t),includeCredentials:!0,validate:{type:"WireRecentDriveDocumentsResponse",schema:s.h}})}))},f=(e,t,n)=>{let{webServices:i}=e;if(null===i||void 0===i||!i.docws)throw new Error("no service url available");const a=Object(o.t)(i.docws,t,n);return Object(r.b)({url:a,includeCredentials:!0,validate:{type:"WireRecentDriveDocumentsChanges",schema:s.g}})},h=async(e,t)=>{let{webServices:n}=e;if(null===n||void 0===n||!n.docws)throw new Error("no service url available");const i={};for(const r of t){const{zone:e,id:t}=r,a=Object(o.k)(n.docws,e).toString();i[a]?i[a].push(t):i[a]=[t]}const c=await Promise.all(Object.entries(i).map((async e=>{let[t,n]=e;return Object(r.a)({url:t,method:"POST",includeCredentials:!0,body:n.map((e=>({item_id:e}))),validate:{type:"WireDriveDownloadFileArray",schema:s.a}}).then((e=>e.map(a.c)))}))),u={};for(const r of c.flat())u[r.id]=r;return u},m=async(e,t)=>{let{webServices:n}=e;if(null===n||void 0===n||!n.docws)throw new Error("no service url available");const i=Object(o.n)(n.docws,t),c=await Object(r.a)({url:i,method:"GET",includeCredentials:!0,validate:{type:"WireDriveLookupByPathResponse",schema:s.d}});return l(c)?null:Object(a.a)(c)},g=async e=>{let{webServices:t}=e;if(null===t||void 0===t||!t.docws)throw new Error("no service url available");const n=[];let r;for(;;){const e=await d({url:Object(o.m)(t.docws,100,r),includeCredentials:!0,validate:{type:"WireDriveFavoritesResponse",schema:s.b}});if(l(e))throw new Error("failed to fetch recent docs");if(n.push(...e.documents.map((e=>Object(a.a)(e)))),r=e.continuationMarker,!r||"MORE_AVAILABLE"!==e.status)break}return n},v=async(e,t)=>{let{webServices:n}=e;if(null===n||void 0===n||!n.docws)throw new Error("no service url available");const o=`v1/item/${t.id}`,a=`${n.docws}/${o}`;return Object(r.c)({url:a,method:"PUT",includeCredentials:!0,body:{info_to_update:{parent_item_id:"trash"}}}).then(i.g)},y=async(e,t)=>{let{webServices:n}=e;if(null===n||void 0===n||!n.docws)throw new Error("no service url available");if(!t)throw new Error("id is required");const i=`${n.docws}/v1/item/${t}`,o=await Object(r.a)({url:i,method:"GET",includeCredentials:!0,validate:{type:"WireFetchDriveItemResponse",schema:s.f}});if(l(o))throw new Error(o.serverErrorCode);return Object(a.b)([o])[0]},b=async(e,t,n,i)=>{let{webServices:o}=e;if(null===o||void 0===o||!o.docws)throw new Error("no service url available");if(!n)throw new Error("parentId is required");const c=`${o.docws}/v1/enumerate/${t}/${n}?limit=${i}`,u=await Object(r.a)({url:c,method:"GET",includeCredentials:!0,validate:{type:"WireEnumerateFoldersFilesResponse",schema:s.e}});if(l(u))throw new Error(u.serverErrorCode);return u.drive_item?Object(a.b)(u.drive_item):[]},w=async(e,t,n)=>{let{webServices:r}=e;return b({webServices:r},"folders",t,null!==n&&void 0!==n?n:50).then(a.e)},S=async(e,t)=>{let{webServices:n}=e;return b({webServices:n},"files",t,6)};let C;C=async()=>u.Result.failure(new Error("compiler flag is false"))},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(1414),i=n(2251);async function o(e){let{url:t,method:n,contentType:r,includeCredentials:o,body:a,validate:s,signal:c,headers:u}=e;return await Object(i.a)(t,{validate:s,method:n,headers:{...u,"Content-Type":null!==r&&void 0!==r?r:"text/plain"},credentials:o?"include":void 0,body:a?JSON.stringify(a):void 0,signal:c})}async function a(e){let{url:t,method:n="GET",contentType:a="text/plain",includeCredentials:s=!1,body:c,validate:u,signal:l,headers:d={},shouldStringifyBody:p=!0,defaultQueryParameters:f}=e;if(u){const e=await o({url:t,method:n,contentType:a,includeCredentials:s,body:c,validate:u,signal:l,headers:d});return e.ok?await e.json():404===e.status?Promise.reject(new r.c(e,u.type)):Promise.reject(new r.b(e,u.type))}{const e={method:n,headers:{...d,"Content-Type":a}};return c&&(e.body=p?JSON.stringify(c):c),s&&(e.credentials="include"),l&&(e.signal=l),await Object(i.a)(t,{...e,defaultQueryParameters:f})}}const s=e=>a(e),c=e=>a(e);async function u(e){try{const t=await o({url:e.url,validate:e.validate,method:"GET",contentType:"text/plain",includeCredentials:!0}),{status:n}=t;return 200!==n?{statusCode:n}:await t.json()}catch(t){return{statusCode:500}}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n(890).a;class r extends Error{}class i extends Error{}class o extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"seconds";super(),this.retryAfter=e,this.timeUnit=t}}class a extends Error{constructor(e,t){super(`${t?`${t}: `:""}${e.status} ${e.statusText}`),this.response=e,this.schemaName=t}}class s extends a{}const c=e=>e instanceof a;function u(e){if(!e.ok)throw new a(e);return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(919),i=n(2208);async function o(e,t){const n=performance.now();try{return await t()}finally{try{var o,a;null===(o=(a=performance).measure)||void 0===o||o.call(a,e,{start:n})}catch(s){i.b.sharedInstance.recordStat(new r.a("measureBlockFailure",{measureName:e,error:`${s}`}))}}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return b})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return T}));var r=n(888);const i=r.z.object({zoneName:r.z.string(),ownerRecordName:r.z.string()}),o=r.z.object({shareName:r.z.string(),recordName:r.z.string(),zoneID:i}),a=r.z.object({firstName:r.z.string(),lastName:r.z.string(),ownerRecordName:r.z.string()}),s=r.z.object({url_download:r.z.string().optional(),url_thumbnail:r.z.string().optional(),url_manifest:r.z.string().optional()}),c=r.z.object({docwsid:r.z.string(),item_id:r.z.string().optional(),drivewsid:r.z.string(),parentId:r.z.string(),zone:r.z.string(),type:r.z.string(),shortGuid:r.z.string().optional(),shortGUID:r.z.string().optional(),unifiedToken:r.z.string().optional(),sharingToken:r.z.string().optional(),name:r.z.string(),etag:r.z.string(),size:r.z.number().optional(),extension:r.z.string().optional(),shareID:o.optional(),share:r.z.string().optional(),owner:a.optional(),lastOpenTime:r.z.string().optional(),urls:s.optional()}),u=r.z.object({dateModified:r.z.string().optional(),dateChanged:r.z.string().optional(),isChainedToParent:r.z.boolean(),size:r.z.number()}).merge(c),l=r.z.object({url:r.z.string()}),d=r.z.object({item_id:r.z.string(),owner_dsid:r.z.number(),data_token:l.optional(),thumbnail_token:l.optional(),package_token:l.optional(),double_etag:r.z.string()}),p=r.z.array(d),f=r.z.object({continuationMarker:r.z.string().optional(),documents:r.z.array(u),status:r.z.union([r.z.literal("CONSISTENT"),r.z.literal("MORE_AVAILABLE")]).optional()}),h=r.z.object({error_code:r.z.string().optional(),reason:r.z.string().optional(),serverErrorCode:r.z.string().optional(),retryAfter:r.z.number().optional()}),m=r.z.union([f,h]),g=r.z.object({continuationMarker:r.z.string().optional(),documents:r.z.array(u),status:r.z.union([r.z.literal("CONSISTENT"),r.z.literal("MORE_AVAILABLE")]).optional()}).nullable(),v=r.z.union([c,h]),y=r.z.object({continuationMarker:r.z.string().optional(),documents:r.z.array(c),status:r.z.union([r.z.literal("CONSISTENT"),r.z.literal("MORE_AVAILABLE")]).optional()}),b=r.z.union([y,h]),w=r.z.object({participant_id:r.z.string(),type:r.z.enum(["OWNER","ADMINISTRATOR","USER","PUBLIC_USER"]),state:r.z.enum(["INVITED","ACCEPTED","REMOVED","UNSUBSCRIBED"]),permission:r.z.enum(["NONE","READ_ONLY","READ_WRITE"]),contact_info:r.z.object({first_name:r.z.string().optional(),last_name:r.z.string().optional(),email_address:r.z.string().optional()}).optional()}),S=r.z.object({state:r.z.enum(["NOT_SHARED","SHARED_DIRECTLY","SHARED_VIA_FOLDER"]),type:r.z.enum(["TO_ME","BY_ME","PRIVATE"]),requester:w,participants:r.z.array(w)}),C=r.z.object({item_id:r.z.string(),item_info:r.z.object({type:r.z.literal("FOLDER"),name:r.z.string().optional(),deleted:r.z.boolean().optional(),modified_at:r.z.string().optional(),parent_item_id:r.z.string().optional(),item_stats:r.z.object({direct_children_count:r.z.string().optional(),file_count:r.z.string().optional()}).optional(),share_info:S.optional()})}),_=r.z.object({item_id:r.z.string(),item_info:r.z.object({type:r.z.literal("FILE"),name:r.z.string().optional(),extension:r.z.string().optional(),modified_at:r.z.string().optional(),urls:s,share_info:S.optional(),utoken:r.z.string().optional(),size:r.z.string().optional()})}),O=r.z.object({item_id:r.z.string(),item_info:r.z.object({type:r.z.literal("APP_CONTAINER"),app_info:r.z.object({app_id:r.z.string()}),name:r.z.string().optional()})}),E=r.z.union([O,_,C]),I=r.z.object({drive_item:r.z.array(E)}),A=r.z.union([I,h]),T=r.z.union([E,h])},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return g}));var r=n(878),i=n(1418),o=n(1395),a=n(1392);function s(e){return!!e&&"object"===typeof e&&"dateModified"in e}function c(e){return"FILE"===e.item_info.type}function u(e){return"FOLDER"===e.item_info.type}function l(e){return e.filter((e=>!(!e.item_info.name||"."===e.item_info.name.charAt(0))&&(!function(e){return"APP_CONTAINER"===e.item_info.type}(e)||"com.apple.CloudDocs"!==e.item_info.app_info.app_id))).map((e=>{var t,n,r,i,a,s,l,d,p,h;if(!function(e){return"APP_CONTAINER"!==e.item_info.type}(e))return{id:e.item_id,isShared:!1,title:null!==(h=e.item_info.name)&&void 0!==h?h:"",isSharedToMe:!1,isSharedByMe:!1,isSharedDirectly:!1,isSharedIndirectly:!1,isSharedDirectlyOrIndirectly:!1,type:f(e),time:""};const g="SHARED_DIRECTLY"===(null===(t=e.item_info.share_info)||void 0===t?void 0:t.state),v="SHARED_VIA_FOLDER"===(null===(n=e.item_info.share_info)||void 0===n?void 0:n.state),{title:y,extension:b}=m(e.item_info.name,c(e)?e.item_info.extension:void 0),w=!v||"READ_WRITE"===(null===(r=e.item_info.share_info)||void 0===r||null===(r=r.requester)||void 0===r?void 0:r.permission);return{id:e.item_id,isShared:!!e.item_info.share_info,title:y,isSharedToMe:"TO_ME"===(null===(i=e.item_info.share_info)||void 0===i?void 0:i.type),isSharedByMe:"BY_ME"===(null===(a=e.item_info.share_info)||void 0===a?void 0:a.type),isSharedDirectly:g,isSharedIndirectly:v,isSharedDirectlyOrIndirectly:g||v,isAllowEdit:w,extension:c(e)?b:void 0,type:f(e),time:Object(o.a)(new Date(Number(e.item_info.modified_at))),lastModifiedTimestamp:new Date(Number(e.item_info.modified_at)).getTime(),urls:c(e)?{downloadUrl:null===(s=e.item_info.urls)||void 0===s?void 0:s.url_download,thumbnailUrl:null===(l=e.item_info.urls)||void 0===l?void 0:l.url_thumbnail}:void 0,itemStats:u(e)&&e.item_info.item_stats?{directChildrenCount:Number(null!==(d=e.item_info.item_stats.direct_children_count)&&void 0!==d?d:0),fileCount:Number(null!==(p=e.item_info.item_stats.file_count)&&void 0!==p?p:0)}:void 0,unifiedToken:c(e)?e.item_info.utoken:void 0,parentItemId:u(e)?e.item_info.parent_item_id:void 0,deleted:u(e)?e.item_info.deleted:void 0,size:c(e)&&e.item_info.size?Number(e.item_info.size):void 0}}))}function d(e,t,n){var r,a,c,u,l;const{item_id:d,share:p,drivewsid:f}=e,h=function(e,t,n,r){{const o=e.split("::")[0],a=n?n.split("::")[0]:null,s="FROM_ME"===t,c=function(e){return"FOLDER::com.apple.CloudDocs::root"===e||"TRASH_ROOT"===e}(e);return o?c?i.a.FOLDER:"APP_LIBRARY"===o?i.a.APP_LIBRARY:"FILE_IN_SHARED_FOLDER"===o?i.a.FILE_IN_SHARED_TO_ME_FOLDER:"FOLDER_IN_SHARED_FOLDER"===o?i.a.FOLDER_IN_SHARED_TO_ME_FOLDER:"SHARED_FILE"===o?i.a.SHARED_TO_ME_FILE:"SHARED_FOLDER"===o?i.a.SHARED_TO_ME_FOLDER:s?"FOLDER"===o?i.a.SHARED_BY_ME_FOLDER:i.a.SHARED_BY_ME_FILE:"FOLDER"===a&&"FROM_ME"===r?"FOLDER"===o?i.a.FOLDER_IN_SHARED_BY_ME_FOLDER:i.a.FILE_IN_SHARED_BY_ME_FOLDER:"FOLDER"===o?i.a.FOLDER:i.a.FILE:i.a.UNKNOWN}}(f,p,t,n),g=function(e){return e===i.a.SHARED_TO_ME_FILE||e===i.a.SHARED_TO_ME_FOLDER||e===i.a.FILE_IN_SHARED_TO_ME_FOLDER||e===i.a.FOLDER_IN_SHARED_TO_ME_FOLDER}(h),v=function(e){return e===i.a.SHARED_BY_ME_FILE||e===i.a.SHARED_BY_ME_FOLDER||e===i.a.FILE_IN_SHARED_BY_ME_FOLDER||e===i.a.FOLDER_IN_SHARED_BY_ME_FOLDER}(h),y=function(e){return e===i.a.SHARED_BY_ME_FILE||e===i.a.SHARED_TO_ME_FILE||e===i.a.SHARED_BY_ME_FOLDER||e===i.a.SHARED_TO_ME_FOLDER}(h),b=(v||g)&&!y,w=v||g,S=null===(r=e.shareID)||void 0===r||null===(r=r.zoneID)||void 0===r?void 0:r.ownerRecordName,{title:C,extension:_}=m(e.name,e.extension);return{id:null!==d&&void 0!==d?d:"",isShared:!!e.share,title:C,time:s(e)&&e.dateModified?Object(o.a)(new Date(e.dateModified)):"",shortGuid:e.shortGuid||void 0,shortGUID:e.shortGUID||void 0,extension:_,unifiedToken:e.unifiedToken||void 0,sharingToken:e.sharingToken||void 0,zone:e.zone,isSharedToMe:g,isSharedByMe:v,isSharedDirectly:y,isSharedIndirectly:b,isSharedDirectlyOrIndirectly:w,isAllowEdit:!0,ownerRecordName:S,drivewsid:f,type:h,lastModifiedTimestamp:s(e)&&e.dateModified?new Date(e.dateModified).getTime():void 0,size:e.size,sharedBy:g&&null!==(a=e.owner)&&void 0!==a&&a.firstName?`${e.owner.firstName} ${null===(c=e.owner)||void 0===c?void 0:c.lastName}`:void 0,etag:e.etag,parentDrivewsid:t,shareID:e.shareID,share:e.share,urls:{downloadUrl:null===(u=e.urls)||void 0===u?void 0:u.url_download,thumbnailUrl:null===(l=e.urls)||void 0===l?void 0:l.url_thumbnail}}}function p(e){var t,n,r,i;return{id:e.item_id,dataUrl:null!==(t=null===(n=e.data_token)||void 0===n?void 0:n.url)&&void 0!==t?t:null===(r=e.package_token)||void 0===r?void 0:r.url,thumbnailUrl:null===(i=e.thumbnail_token)||void 0===i?void 0:i.url}}function f(e){return"APP_CONTAINER"===e.item_info.type?i.a.APP_LIBRARY:e.item_info.share_info?"TO_ME"===e.item_info.share_info.type?"SHARED_DIRECTLY"===e.item_info.share_info.state?"FILE"===e.item_info.type?i.a.SHARED_TO_ME_FILE:i.a.SHARED_TO_ME_FOLDER:"SHARED_VIA_FOLDER"===e.item_info.share_info.state?"FILE"===e.item_info.type?i.a.FILE_IN_SHARED_TO_ME_FOLDER:i.a.FOLDER_IN_SHARED_TO_ME_FOLDER:"FILE"===e.item_info.type?i.a.FILE:i.a.FOLDER:"BY_ME"===e.item_info.share_info.type?"SHARED_DIRECTLY"===e.item_info.share_info.state?"FILE"===e.item_info.type?i.a.SHARED_BY_ME_FILE:i.a.SHARED_BY_ME_FOLDER:"SHARED_VIA_FOLDER"===e.item_info.share_info.state?"FILE"===e.item_info.type?i.a.FILE_IN_SHARED_BY_ME_FOLDER:i.a.FOLDER_IN_SHARED_BY_ME_FOLDER:"FILE"===e.item_info.type?i.a.FILE:i.a.FOLDER:"PRIVATE"===e.item_info.share_info.type?"FILE"===e.item_info.type?i.a.FILE:i.a.FOLDER:void Object(a.a)(e.item_info.share_info.type):"FILE"===e.item_info.type?i.a.FILE:i.a.FOLDER}function h(e){return!!e&&(e===i.a.FILE||e===i.a.FILE_IN_SHARED_BY_ME_FOLDER||e===i.a.FILE_IN_SHARED_TO_ME_FOLDER||e===i.a.SHARED_BY_ME_FILE||e===i.a.SHARED_TO_ME_FILE)}function m(e,t){if(!t&&e.indexOf(".")>0){const n=e.split(".");t=n[n.length-1],e=n.slice(0,n.length-1).join(".")}return t&&e.endsWith("."+t)&&(e=e.slice(0,e.length-t.length-1)),{title:e,extension:t}}const g=e=>{const t=Object(r.b)(),n=new Intl.Collator(t,{numeric:!0,caseFirst:"lower"});return[...e].sort(((e,t)=>n.compare(e.title,t.title)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.APP_LIBRARY=1]="APP_LIBRARY",e[e.FOLDER=2]="FOLDER",e[e.FILE=3]="FILE",e[e.FILE_IN_SHARED_TO_ME_FOLDER=4]="FILE_IN_SHARED_TO_ME_FOLDER",e[e.FOLDER_IN_SHARED_TO_ME_FOLDER=5]="FOLDER_IN_SHARED_TO_ME_FOLDER",e[e.SHARED_TO_ME_FILE=6]="SHARED_TO_ME_FILE",e[e.SHARED_TO_ME_FOLDER=7]="SHARED_TO_ME_FOLDER",e[e.SHARED_BY_ME_FOLDER=8]="SHARED_BY_ME_FOLDER",e[e.SHARED_BY_ME_FILE=9]="SHARED_BY_ME_FILE",e[e.FOLDER_IN_SHARED_BY_ME_FOLDER=10]="FOLDER_IN_SHARED_BY_ME_FOLDER",e[e.FILE_IN_SHARED_BY_ME_FOLDER=11]="FILE_IN_SHARED_BY_ME_FOLDER",e}({})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(888);const i=r.z.object({zoneID:r.z.object({zoneName:r.z.string(),ownerRecordName:r.z.string().optional(),zoneType:r.z.string().optional()})}),o=r.z.object({zones:r.z.array(i)}),a=r.z.object({timestamp:r.z.number(),userRecordName:r.z.string()}),s=r.z.object({created:a.optional(),deleted:r.z.boolean().optional(),modified:a.optional(),recordChangeTag:r.z.string().optional(),recordName:r.z.string(),recordType:r.z.string().optional(),shortGUID:r.z.string().optional(),parent:r.z.object({recordName:r.z.string().optional()}).optional(),share:r.z.object({recordName:r.z.string().optional()}).optional(),reason:r.z.string().optional(),serverErrorCode:r.z.string().optional()}).merge(i.partial())},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2290),i=n(1414);const o=async(e,t,n)=>{let{webServices:o}=e;if(n)throw new i.a("");if(null===o||void 0===o||!o.mail)throw new i.d("");const a=await Object(r.a)().fetchMailboxList(t);if(a.ok)return a.value;throw a.error}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.imapDecode=t.imapEncode=t.decode=t.encodeAll=t.encode=void 0;var r=n(1422);function i(e){for(var t=new Uint8Array(2*e.length),n=0,i=0,o=e.length;n<o;n++){var a=e.charCodeAt(n);t[i++]=a>>8,t[i++]=255&a}return(0,r.encode)(t).replace(/=+$/,"")}function o(e){for(var t=(0,r.decode)(e,r.OUTPUT_TYPED_ARRAY),n="",i=0,o=t.length;i<o;)n+=String.fromCharCode(t[i++]<<8|t[i++]);return n}function a(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var s="A-Za-z0-9"+a("'(),-./:?"),c=a("!\"#$%&*;<=>@[]^_'{|}"),u=a(" \r\n\t");t.encode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.replace(new RegExp("[^"+s+a(t)+"]+","g"),(function(e){return"+"+("+"===e?"":i(e))+"-"}))},t.encodeAll=function(e){return e.replace(new RegExp("[^"+u+s+c+"]+","g"),(function(e){return"+"+("+"===e?"":i(e))+"-"}))},t.decode=function(e){return e.replace(/\+([A-Za-z0-9/]*)-?/gi,(function(e,t){return""===t?"+":o(t)}))},t.imapEncode=function(e){return e.replace(/&/g,"&-").replace(/[^\x20-\x7e]+/g,(function(e){return"&"+("&"===e?"":i(e)).replace(/\//g,",")+"-"}))},t.imapDecode=function(e){return e.replace(/&([^-]*)-/g,(function(e,t){return""===t?"&":o(t.replace(/,/g,"/"))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1423);Object.defineProperty(t,"OUTPUT_STRING",{enumerable:!0,get:function(){return r.OUTPUT_STRING}}),Object.defineProperty(t,"OUTPUT_TYPED_ARRAY",{enumerable:!0,get:function(){return r.OUTPUT_TYPED_ARRAY}});var i=n(1424);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"encode",{enumerable:!0,get:function(){return o(i).default}}),Object.defineProperty(t,"decode",{enumerable:!0,get:function(){return o(r).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.OUTPUT_STRING="OUTPUT_STRING";function i(e){for(var t=0,n=new Uint8Array(Math.ceil(3*e.length/4)),r=0,i=e.length,o=0,a=0;r<i;r++){var s=void 0,c=e.charCodeAt(r);if(c>=65&&c<=90)s=c-65;else if(c>=97&&c<=122)s=c-97+26;else if(c>=48&&c<=57)s=c-48+52;else if(43===c)s=62;else{if(47!==c){if(61===c){o=0;continue}continue}s=63}a=a<<6|s,(o+=6)>=8&&(o-=8,n[t++]=a>>o,2===o?a&=3:4===o&&(a&=15))}return t<n.length?n.subarray(0,t):n}t.OUTPUT_TYPED_ARRAY="OUTPUT_TYPED_ARRAY",t.default=function(e){var t;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:r)===r?(t=i(e),String.fromCharCode.apply(null,t)):i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),i=16383;function o(e,t,n){for(var i,o="",a=t;a<n;a+=3)o+=(i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o}t.default=function(e){return function(e){for(var t=e.length,n=t%3,a="",s=0,c=t-n;s<c;s+=i)a+=o(e,s,s+i>c?c:s+i);if(1===n){var u=e[t-1];a+=r[u>>2],a+=r[u<<4&63],a+="=="}else if(2===n){var l=(e[t-2]<<8)+e[t-1];a+=r[l>>10],a+=r[l>>4&63],a+=r[l<<2&63],a+="="}return a}("string"===typeof e?new Uint8Array(e.split("").map((function(e){return e.charCodeAt(0)}))):e)}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"person",svgPath:"M55.127-34.375C66.748-34.375 76.2207-44.7266 76.2207-57.3242C76.2207-69.8242 66.7969-79.6387 55.127-79.6387C43.5547-79.6387 34.0332-69.6289 34.0332-57.2266C34.082-44.6777 43.5059-34.375 55.127-34.375ZM55.127-41.748C47.998-41.748 41.8945-48.584 41.8945-57.2266C41.8945-65.7227 47.9004-72.2656 55.127-72.2656C62.4023-72.2656 68.3594-65.8203 68.3594-57.3242C68.3594-48.6816 62.3047-41.748 55.127-41.748ZM24.4141 10.791L85.791 10.791C93.8965 10.791 97.7539 8.34961 97.7539 2.97852C97.7539-9.81445 81.5918-28.3203 55.127-28.3203C28.6133-28.3203 12.4512-9.81445 12.4512 2.97852C12.4512 8.34961 16.3086 10.791 24.4141 10.791ZM22.1191 3.41797C20.8496 3.41797 20.3125 3.07617 20.3125 2.05078C20.3125-5.95703 32.7148-20.9473 55.127-20.9473C77.4902-20.9473 89.8926-5.95703 89.8926 2.05078C89.8926 3.07617 89.4043 3.41797 88.1348 3.41797Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:78.90510009765626,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 85.3076171875 92.0419921875",width:85.3076171875,height:92.0419921875,translateX:-12.451162109374991,translateY:81.2509765625,baseline:81.2509765625,capline:10.791015625}}})}},function(e,t,n){!function(t){"use strict";function n(e){function t(){return Oe<Ee}function n(){return Oe}function i(e){Oe=e}function o(){Oe=0,Ee=_e.length}function a(e,t){return{name:e,tokens:t||"",semantic:t||"",children:[]}}function s(e,t){var n;return null===t?null:((n=a(e)).tokens=t.tokens,n.semantic=t.semantic,n.children.push(t),n)}function c(e,t){return null!==t&&(e.tokens+=t.tokens,e.semantic+=t.semantic),e.children.push(t),e}function u(e){var n;return t()&&e(n=_e[Oe])?(Oe+=1,a("token",n)):null}function l(){return null}function d(e){return function(){return s("literal",u((function(t){return t===e})))}}function p(){var e=arguments;return function(){var t,r,o,s;for(s=n(),r=a("and"),t=0;t<e.length;t+=1){if(null===(o=e[t]()))return i(s),null;c(r,o)}return r}}function f(){var e=arguments;return function(){var t,r,o;for(o=n(),t=0;t<e.length;t+=1){if(null!==(r=e[t]()))return r;i(o)}return null}}function h(e){return function(){var t,r;return r=n(),null!==(t=e())?t:(i(r),a("opt"))}}function m(e){return function(){var t=e();return null!==t&&(t.semantic=""),t}}function g(e){return function(){var t=e();return null!==t&&t.semantic.length>0&&(t.semantic=" "),t}}function v(e,t){return function(){var r,o,s,u,l;for(u=n(),r=a("star"),s=0,l=void 0===t?0:t;null!==(o=e());)s+=1,c(r,o);return s>=l?r:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function b(){return s("cr",d("\r")())}function w(){return s("crlf",p(b,_)())}function S(){return s("dquote",d('"')())}function C(){return s("htab",d("\t")())}function _(){return s("lf",d("\n")())}function O(){return s("sp",d(" ")())}function E(){return s("vchar",u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r})))}function I(){return s("wsp",f(O,C)())}function A(){var e=s("quoted-pair",f(p(d("\\"),f(E,I)),ie)());return null===e?null:(e.semantic=e.semantic[1],e)}function T(){return s("fws",f(ae,p(h(p(v(I),m(w))),v(I,1)))())}function P(){return s("ctext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=39||42<=n&&n<=91||93<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),ne)())}function R(){return s("ccontent",f(P,A,k)())}function k(){return s("comment",p(d("("),v(p(h(T),R)),h(T),d(")"))())}function D(){return s("cfws",f(p(v(p(h(T),k),1),h(T)),T)())}function M(){return s("atext",u((function(t){var n="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(n=n||y(t)),n})))}function N(){return s("atom",p(g(h(D)),v(M,1),g(h(D)))())}function x(){var e,t;return null===(e=s("dot-atom-text",v(M,1)()))||null!==(t=v(p(d("."),v(M,1)))())&&c(e,t),e}function L(){return s("dot-atom",p(m(h(D)),x,m(h(D)))())}function j(){return s("qtext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33===n||35<=n&&n<=91||93<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),re)())}function U(){return s("qcontent",f(j,A)())}function F(){return s("quoted-string",p(m(h(D)),m(S),v(p(h(g(T)),U)),h(m(T)),m(S),m(h(D)))())}function z(){return s("word",f(N,F)())}function B(){return s("address",f(K,q)())}function K(){return s("mailbox",f(H,ee)())}function H(){return s("name-addr",p(h(V),W)())}function W(){return s("angle-addr",f(p(m(h(D)),d("<"),ee,d(">"),m(h(D))),se)())}function q(){return s("group",p(V,d(":"),h(Z),d(";"),m(h(D)))())}function V(){return s("display-name",function(){var e=s("phrase",f(oe,v(z,1))());return null!==e&&(e.semantic=e.semantic.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")),e}())}function $(){return s("mailbox-list",f(p(K,v(p(d(","),K))),le)())}function G(){return s("address-list",f(p(B,v(p(d(e.addressListSeparator),B))),de)())}function Z(){return s("group-list",f($,m(D),pe)())}function Q(){return s("local-part",f(fe,L,F)())}function Y(){return s("dtext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=90||94<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),me)())}function J(){return s("domain-literal",p(m(h(D)),d("["),v(p(h(T),Y)),h(T),d("]"),m(h(D)))())}function X(){return s("domain",function(){var t=f(he,L,J)();return e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)}())}function ee(){return s("addr-spec",p(Q,d("@"),X)())}function te(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function ne(){return e.strict?null:s("obs-ctext",te())}function re(){return e.strict?null:s("obs-qtext",te())}function ie(){return e.strict?null:s("obs-qp",p(d("\\"),f(d("\0"),te,_,b))())}function oe(){return e.strict?null:s("obs-phrase",p(z,v(f(z,d("."),e.atInDisplayName?d("@"):l,e.commaInDisplayName?d(","):l,g(D))))())}function ae(){return e.strict?null:s("obs-FWS",v(p(m(h(w)),I),1)())}function se(){return e.strict?null:s("obs-angle-addr",p(m(h(D)),d("<"),ce,ee,d(">"),m(h(D)))())}function ce(){return e.strict?null:s("obs-route",p(ue,d(":"))())}function ue(){return e.strict?null:s("obs-domain-list",p(v(f(m(D),d(","))),d("@"),X,v(p(d(","),m(h(D)),h(p(d("@"),X)))))())}function le(){return e.strict?null:s("obs-mbox-list",p(v(p(m(h(D)),d(","))),K,v(p(d(","),h(p(K,m(D))))))())}function de(){return e.strict?null:s("obs-addr-list",p(v(p(m(h(D)),d(","))),B,v(p(d(","),h(p(B,m(D))))))())}function pe(){return e.strict?null:s("obs-group-list",p(v(p(m(h(D)),d(",")),1),m(h(D)))())}function fe(){return e.strict?null:s("obs-local-part",p(z,v(p(d("."),z)))())}function he(){return e.strict?null:s("obs-domain",p(N,v(p(d("."),N)))())}function me(){return e.strict?null:s("obs-dtext",f(te,A)())}function ge(e,t){var n,r,i;if(null===t||void 0===t)return null;for(r=[t];r.length>0;){if((i=r.pop()).name===e)return i;for(n=i.children.length-1;n>=0;n-=1)r.push(i.children[n])}return null}function ve(e,t){var n,r,i,o,a;if(null===t||void 0===t)return null;for(r=[t],o=[],a={},n=0;n<e.length;n+=1)a[e[n]]=!0;for(;r.length>0;)if((i=r.pop()).name in a)o.push(i);else for(n=i.children.length-1;n>=0;n-=1)r.push(i.children[n]);return o}function ye(t){var n,r,i,o,a;if(null===t)return null;for(n=[],r=ve(["group","mailbox"],t),i=0;i<r.length;i+=1)"group"===(o=r[i]).name?n.push(be(o)):"mailbox"===o.name&&n.push(we(o));return a={ast:t,addresses:n},e.simple&&(a=function(e){var t;if(e&&e.addresses)for(t=0;t<e.addresses.length;t+=1)delete e.addresses[t].node;return e}(a)),e.oneResult?function(t){return t?!e.partial&&t.addresses.length>1?null:t.addresses&&t.addresses[0]:null}(a):e.simple?a&&a.addresses:a}function be(e){var t,n=ge("display-name",e),r=[],i=ve(["mailbox"],e);for(t=0;t<i.length;t+=1)r.push(we(i[t]));return{node:e,parts:{name:n},type:e.name,name:Se(n),addresses:r}}function we(e){var t=ge("display-name",e),n=ge("addr-spec",e),r=function(e,t){var n,r,i,o;if(null===t||void 0===t)return null;for(r=[t],o=[];r.length>0;)for("cfws"===(i=r.pop()).name&&o.push(i),n=i.children.length-1;n>=0;n-=1)r.push(i.children[n]);return o}(0,e),i=ve(["comment"],e),o=ge("local-part",n),a=ge("domain",n);return{node:e,parts:{name:t,address:n,local:o,domain:a,comments:r},type:e.name,name:Se(t),address:Se(n),local:Se(o),domain:Se(a),comments:Ce(i),groupName:Se(e.groupName)}}function Se(e){return null!==e&&void 0!==e?e.semantic:null}function Ce(e){var t="";if(e)for(var n=0;n<e.length;n+=1)t+=Se(e[n]);return t}var _e,Oe,Ee,Ie,Ae;if(null===(e=r(e,{})))return null;if(_e=e.input,Ae={address:B,"address-list":G,"angle-addr":W,from:function(){return s("from",f($,G)())},group:q,mailbox:K,"mailbox-list":$,"reply-to":function(){return s("reply-to",G())},sender:function(){return s("sender",f(K,B)())}}[e.startAt]||G,!e.strict){if(o(),e.strict=!0,Ie=Ae(_e),e.partial||!t())return ye(Ie);e.strict=!1}return o(),Ie=Ae(_e),!e.partial&&t()?null:ye(Ie)}function r(e,t){function n(e){return"[object String]"===Object.prototype.toString.call(e)}function r(e){return null===e||void 0===e}var i,o;if(n(e))e={input:e};else if(!function(e){return e===Object(e)}(e))return null;if(!n(e.input))return null;if(!t)return null;for(o in i={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1,commaInDisplayName:!1,addressListSeparator:","})r(e[o])&&(e[o]=r(t[o])?i[o]:t[o]);return e}n.parseOneAddress=function(e){return n(r(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},n.parseAddressList=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"address-list"}))},n.parseFrom=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"from"}))},n.parseSender=function(e){return n(r(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},n.parseReplyTo=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},"undefined"!==typeof e.exports?e.exports=n:t.emailAddresses=n}(this)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(921),i=n(919),o=n(2208);function a(e){return{recordStat(t,n){o.b.sharedInstance.recordStat(new i.a(`${e}-tile.${t}`,n))},recordPerfStat(t,n){o.b.sharedInstance.recordPerfStat(new r.a(`${e}-tile.${t}`,n))},recordStatOnce(t,n){o.b.sharedInstance.recordStatOnce(new i.a(`${e}-tile.${t}`,n))},recordPerfStatOnce(t,n){o.b.sharedInstance.recordPerfStatOnce(new r.a(`${e}-tile.${t}`,n))}}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(1169);const i=e=>(t,n)=>async()=>{try{const t=await e(null!==n&&void 0!==n?n:{assetListKey:r.PhotosTileAssetListType.Library,library:r.GoldilocksLibrary.Personal});return t.ok?Promise.resolve(t.value):Promise.reject(c(t.error))}catch(t){return Promise.reject(c(t))}},o=i(r.getCountsForTile),a=i(r.getDerivativeUrlsForTile),s=i(r.getPhotosTileLists),c=e=>e instanceof r.PhotosTileError?e:new Error(`Unknown photos-tile error: ${e}`)},function(e){e.exports=JSON.parse('{"locale":"en-US","date":{"ca":["gregory","generic"],"hourNo0":true,"hour12":true,"formats":{"short":"{1}, {0}","medium":"{1}, {0}","full":"{1} \'at\' {0}","long":"{1} \'at\' {0}","availableFormats":{"Bh":"h B","Bhm":"h:mm B","Bhms":"h:mm:ss B","d":"d","E":"ccc","EBhm":"E h:mm B","EBhms":"E h:mm:ss B","Ed":"d E","Ehm":"E h:mm a","EHm":"E HH:mm","Ehms":"E h:mm:ss a","EHms":"E HH:mm:ss","Gy":"y G","GyMMM":"MMM y G","GyMMMd":"MMM d, y G","GyMMMEd":"E, MMM d, y G","h":"h a","H":"HH","hm":"h:mm a","Hm":"HH:mm","hms":"h:mm:ss a","Hms":"HH:mm:ss","hmsv":"h:mm:ss a v","Hmsv":"HH:mm:ss v","hmv":"h:mm a v","Hmv":"HH:mm v","M":"L","Md":"M/d","MEd":"E, M/d","MMM":"LLL","MMMd":"MMM d","MMMEd":"E, MMM d","MMMMd":"MMMM d","MMMMW-count-one":"\'week\' W \'of\' MMMM","MMMMW-count-other":"\'week\' W \'of\' MMMM","ms":"mm:ss","y":"y","yM":"M/y","yMd":"M/d/y","yMEd":"E, M/d/y","yMMM":"MMM y","yMMMd":"MMM d, y","yMMMEd":"E, MMM d, y","yMMMM":"MMMM y","yQQQ":"QQQ y","yQQQQ":"QQQQ y","yw-count-one":"\'week\' w \'of\' Y","yw-count-other":"\'week\' w \'of\' Y"},"dateFormats":{"yMMMMEEEEd":"EEEE, MMMM d, y","yMMMMd":"MMMM d, y","yMMMd":"MMM d, y","yMd":"M/d/yy"},"timeFormats":{"hmmsszzzz":"h:mm:ss a zzzz","hmsz":"h:mm:ss a z","hms":"h:mm:ss a","hm":"h:mm a"}},"calendars":{"generic":{"months":{"narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],"long":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},"days":{"narrow":["S","M","T","W","T","F","S"],"short":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"long":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"eras":{"narrow":["ERA0","ERA1"],"short":["ERA0","ERA1"],"long":["ERA0","ERA1"]},"dayPeriods":{"am":"AM","pm":"PM"}},"gregory":{"months":{"narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"short":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"long":["January","February","March","April","May","June","July","August","September","October","November","December"]},"days":{"narrow":["S","M","T","W","T","F","S"],"short":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"long":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"eras":{"narrow":["B","A","BCE","CE"],"short":["BC","AD","BCE","CE"],"long":["Before Christ","Anno Domini","Before Common Era","Common Era"]},"dayPeriods":{"am":"AM","pm":"PM"}}}},"number":{"nu":["latn"],"patterns":{"decimal":{"positivePattern":"{number}","negativePattern":"{minusSign}{number}"},"currency":{"positivePattern":"{currency}{number}","negativePattern":"{minusSign}{currency}{number}"},"percent":{"positivePattern":"{number}{percentSign}","negativePattern":"{minusSign}{number}{percentSign}"}},"symbols":{"latn":{"decimal":".","group":",","nan":"NaN","plusSign":"+","minusSign":"-","percentSign":"%","infinity":"\u221e"}},"currencies":{"AUD":"A$","BRL":"R$","CAD":"CA$","CNY":"CN\xa5","EUR":"\u20ac","GBP":"\xa3","HKD":"HK$","ILS":"\u20aa","INR":"\u20b9","JPY":"\xa5","KRW":"\u20a9","MXN":"MX$","NZD":"NZ$","TWD":"NT$","USD":"$","VND":"\u20ab","XAF":"FCFA","XCD":"EC$","XOF":"CFA","XPF":"CFPF","XXX":"\xa4"}}}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(1293),i=n(901),o=n(971),a=n(903);const s={...o.a,authBagId:"compose",applicationName:"compose",path:"compose",generation:1,requiredServices:["mail"],unsupportedLocales:["ar-sa","iw-il"],supportedDevices:[{primaryInteractionMode:r.a.MOUSE,sizeClass:a.e.REGULAR},{primaryInteractionMode:r.a.MOUSE,sizeClass:a.e.COMPACT},{primaryInteractionMode:r.a.TOUCH,sizeClass:a.e.REGULAR},{primaryInteractionMode:r.a.TOUCH,sizeClass:a.e.COMPACT}],supportedDomains:[i.e,i.d,i.b,i.c,i.g],supportedFileExtensions:[],allowsPhoneNumberAsAppleId:!1,radarComponentId:437728,configuration:null,supportsTile:!1},c={identifier:"compose",displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName",generations:[s],applicationInfo:s},u={identifier:"compose",displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName"};s.configuration=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="com.icloud.navbar"},function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return C}));var r=n(2262),i=n(1433),o=n(1215),a=n.n(o),s=n(870),c=n(1227),u=n(2246),l=n(2247),d=n(2214),p=n(1447),f=n(1446),h=n(1443),m=(n(1441),n(1450)),g=n(2144),v=n(1448),y=n(1442),b=n(1449);const w=Object(i.a)({resolved:{},chunkName:()=>"RootComponentRoute",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:()=>Object(y.a)((()=>Promise.all([n.e(6),n.e(2)]).then(n.bind(null,1597)))),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return n(t)},resolve:()=>1597});let S=!1;function C(e){switch(Object(h.a)(e.rootState),Object(d.a)(),Object(f.a)(),Object(p.a)(),s.useEffect((()=>{const e=()=>{w.preload(),Object(v.b)()};return"complete"===document.readyState?void e():(window.addEventListener("load",e),()=>window.removeEventListener("load",e))}),[]),s.useEffect((()=>{if(!S)switch(e.rootState.kind){case"initial-load":case"initial-load-with-early-child":break;case"landing-page":S=!0,O();break;default:S=!0,w.load().then(O)}}),[e.rootState.kind]),s.useEffect((()=>{"load-child-application-adp-blocked"===e.rootState.kind||"load-child-application"===e.rootState.kind||"child-application"===e.rootState.kind||"landing-page"===e.rootState.kind?Object(b.a)(e.rootState.applicationIdentifier):Object(b.a)("default")}),[e.rootState]),e.rootState.kind){case"initial-load":return Object(m.a)()?s.createElement(u.a,{action:Object(m.b)()}):s.createElement(_,null);case"landing-page":return s.createElement(_,null,s.createElement(g.a,{className:"fade-in",onSignInPressed:e.rootState.onSignInPressed,isAppHidden:e.rootState.isAppHidden,isAppDisabled:e.rootState.isAppDisabled,applicationIdentifier:e.rootState.applicationIdentifier}));default:return s.createElement(w,e)}}function _(e){return s.createElement("div",{className:a()("root-viewport",e.className),style:e.style},s.createElement(l.a,null),s.createElement("div",{className:"init-spinner-container",suppressHydrationWarning:!0},s.createElement(r.a,{description:Object(c.a)("CloudOS.Spinner.Loading")})),s.createElement("div",{className:"root-component",suppressHydrationWarning:!0},e.children))}function O(){var e,t;null===(e=document.body.querySelector(".init-content"))||void 0===e||e.remove(),null===(t=document.body.querySelector(".init-spinner-container"))||void 0===t||t.remove()}},function(e,t,n){"use strict";var r=n(870),i=n.n(r),o=n(1434),a=n(1363),s=n(1435),c=n(2265),u=n(1436),l=n(1438),d=n.n(l);var p=i.a.createContext(),f={},h="PENDING",m="REJECTED",g=function(e){return e};function v(e){var t=e.defaultResolveComponent,n=void 0===t?g:t,r=e.render,l=e.onLoad;function v(e,t){void 0===t&&(t={});var g=function(e){return"function"===typeof e?{requireAsync:e,resolve:function(){},chunkName:function(){}}:e}(e),v={};function y(e){return t.cacheKey?t.cacheKey(e):g.resolve?g.resolve(e):"static"}function b(e,r,i){var o=t.resolveComponent?t.resolveComponent(e,r):n(e);if(t.resolveComponent&&!Object(u.isValidElementType)(o))throw new Error("resolveComponent returned something that is not a React component!");return d()(i,o,{preload:!0}),o}var w=function(e){var t=y(e),n=v[t];return n&&n.status!==m||((n=g.requireAsync(e)).status=h,v[t]=n,n.then((function(){n.status="RESOLVED"}),(function(t){console.error("loadable-components: failed to asynchronously load component",{fileName:g.resolve(e),chunkName:g.chunkName(e),error:t?t.message:t}),n.status=m}))),n},S=function(e){var t=function(t){return i.a.createElement(p.Consumer,null,(function(n){return i.a.createElement(e,Object.assign({__chunkExtractor:n},t))}))};return e.displayName&&(t.displayName=e.displayName+"WithChunkExtractor"),t}(function(e){function n(n){var r;return(r=e.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:y(n)},function(e,t){if(!e){var n=new Error("loadable: "+t);throw n.framesToPop=1,n.name="Invariant Violation",n}}(!n.__chunkExtractor||g.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===t.ssr||(g.requireAsync(n).catch((function(){return null})),r.loadSync(),n.__chunkExtractor.addChunk(g.chunkName(n))),Object(s.a)(r)):(!1!==t.ssr&&(g.isReady&&g.isReady(n)||g.chunkName&&f[g.chunkName(n)])&&r.loadSync(),r)}Object(c.a)(n,e),n.getDerivedStateFromProps=function(e,t){var n=y(e);return Object(a.a)({},t,{cacheKey:n,loading:t.loading||t.cacheKey!==n})};var i=n.prototype;return i.componentDidMount=function(){this.mounted=!0;var e=this.getCache();e&&e.status===m&&this.setCache(),this.state.loading&&this.loadAsync()},i.componentDidUpdate=function(e,t){t.cacheKey!==this.state.cacheKey&&this.loadAsync()},i.componentWillUnmount=function(){this.mounted=!1},i.safeSetState=function(e,t){this.mounted&&this.setState(e,t)},i.getCacheKey=function(){return y(this.props)},i.getCache=function(){return v[this.getCacheKey()]},i.setCache=function(e){void 0===e&&(e=void 0),v[this.getCacheKey()]=e},i.triggerOnLoad=function(){var e=this;l&&setTimeout((function(){l(e.state.result,e.props)}))},i.loadSync=function(){if(this.state.loading)try{var e=b(g.requireSync(this.props),this.props,C);this.state.result=e,this.state.loading=!1}catch(t){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:g.resolve(this.props),chunkName:g.chunkName(this.props),error:t?t.message:t}),this.state.error=t}},i.loadAsync=function(){var e=this,t=this.resolveAsync();return t.then((function(t){var n=b(t,e.props,C);e.safeSetState({result:n,loading:!1},(function(){return e.triggerOnLoad()}))})).catch((function(t){return e.safeSetState({error:t,loading:!1})})),t},i.resolveAsync=function(){var e=this.props,t=(e.__chunkExtractor,e.forwardedRef,Object(o.a)(e,["__chunkExtractor","forwardedRef"]));return w(t)},i.render=function(){var e=this.props,n=e.forwardedRef,i=e.fallback,s=(e.__chunkExtractor,Object(o.a)(e,["forwardedRef","fallback","__chunkExtractor"])),c=this.state,u=c.error,l=c.loading,d=c.result;if(t.suspense&&(this.getCache()||this.loadAsync()).status===h)throw this.loadAsync();if(u)throw u;var p=i||t.fallback||null;return l?p:r({fallback:p,result:d,options:t,props:Object(a.a)({},s,{ref:n})})},n}(i.a.Component)),C=i.a.forwardRef((function(e,t){return i.a.createElement(S,Object.assign({forwardedRef:t},e))}));return C.displayName="Loadable",C.preload=function(e){C.load(e)},C.load=function(e){return w(e)},C}return{loadable:v,lazy:function(e,t){return v(e,Object(a.a)({},t,{suspense:!0}))}}}var y=v({defaultResolveComponent:function(e){return e.__esModule?e.default:e.default||e},render:function(e){var t=e.result,n=e.props;return i.a.createElement(t,n)}}),b=y.loadable,w=y.lazy,S=v({onLoad:function(e,t){e&&t.forwardedRef&&("function"===typeof t.forwardedRef?t.forwardedRef(e):t.forwardedRef.current=e)},render:function(e){var t=e.result,n=e.props;return n.children?n.children(t):null}}),C=S.loadable,_=S.lazy,O=b;O.lib=C,w.lib=_,t.a=O},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,"a",(function(){return r}))},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";e.exports=n(1437)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=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,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case p:case a:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case v:case g:case u:return e;default:return t}}case o:return t}}}function _(e){return C(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||C(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return C(e)===f},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===o},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===p||e===c||e===s||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===S||e.$$typeof===y)},t.typeOf=C},function(e,t,n){"use strict";var r=n(1439),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var a=l(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<a.length;++g){var v=a[g];if(!o[v]&&(!r||!r[v])&&(!m||!m[v])&&(!s||!s[v])){var y=p(n,v);try{u(t,v,y)}catch(b){}}}}return t}},function(e,t,n){"use strict";e.exports=n(1440)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=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,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case p:case a:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case v:case g:case u:return e;default:return t}}case o:return t}}}function _(e){return C(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||C(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return C(e)===f},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===o},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===p||e===c||e===s||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===S||e.$$typeof===y)},t.typeOf=C},function(e,t,n){},function(e,t,n){"use strict";function r(e){let{retries:t=3,interval:n=100,exponentialBackoff:i=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((o,a)=>{e().then(o).catch((s=>{setTimeout((()=>{0!==t?r(e,{retries:t-1,interval:i?2*n:n}).then(o,a):a(s)}),n)}))}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(2134);function o(e){r.useEffect((()=>{i.a.cloudOSApplication.unsetMetaThemeColor()}),[e.kind])}},function(e){e.exports=JSON.parse('{"c":0,"d":1,"b":2,"a":3}')},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"cloud",svgPath:"M31.6895 2.58789L92.2852 2.58789C108.301 2.58789 120.264-9.57031 120.264-24.6582C120.264-40.1855 107.52-51.5625 90.9668-51.5625C84.8633-63.623 73.5352-71.3867 59.4727-71.3867C41.0645-71.3867 25.9277-57.0312 24.3652-38.8672C15.4785-36.3281 8.74023-28.6133 8.74023-18.3105C8.74023-6.78711 17.1387 2.58789 31.6895 2.58789ZM31.5918-5.27344C21.582-5.27344 16.5527-10.8398 16.5527-18.0664C16.5527-23.9746 19.9707-29.1992 28.2715-31.4453C31.0059-32.1289 31.9824-33.3984 32.1777-36.1816C33.3008-52.0996 45.3125-63.5742 59.4727-63.5742C70.4102-63.5742 79.0527-57.5684 84.3262-46.7285C85.498-44.3848 86.9141-43.5547 89.7949-43.5547C104.248-43.5547 112.402-34.8145 112.402-24.4141C112.402-13.7695 103.906-5.27344 92.7734-5.27344Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:69.50510009765617,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 111.529541015625 75.6357421875",width:111.529541015625,height:75.6357421875,translateX:-8.740200195312582,translateY:73.0478515625,baseline:73.0478515625,capline:2.587890625}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(2208);function o(){r.useEffect((()=>{const e=()=>{"hidden"===document.visibilityState&&i.b.sharedInstance.flushStats()};return window.addEventListener("visibilitychange",e),()=>{window.removeEventListener("visibilitychange",e)}}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(870),i=n(2134),o=n(1398),a=n(1247),s=n(1249),c=n(1252),u=n(2213);function l(){r.useEffect((()=>{const e=()=>{i.a.cloudOSApplication.notifyHostingStateDidChange(),a.a.sharedInstance.update()},t=()=>{const e=u.b.serviceInstancesByIdentifier("com.apple.icloud.cloudos.legacyCloudOSApplicationService");for(const t of e)t instanceof o.a&&t.notifySizeClassDidChange(Object(s.a)(),Object(c.a)())},n=()=>{i.a.cloudOSApplication.notifyHostingStateDidChange()};return t(),s.b.addEventListener("change",e),c.b.addEventListener("change",e),window.addEventListener("resize",t),window.visualViewport&&(window.visualViewport.addEventListener("resize",n),window.visualViewport.addEventListener("scroll",n)),()=>{s.b.removeEventListener("change",e),c.b.removeEventListener("change",e),window.removeEventListener("resize",t),window.visualViewport&&(window.visualViewport.removeEventListener("resize",n),window.visualViewport.removeEventListener("scroll",n))}}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(870),i=n(1215),o=n.n(i),a=n(1332);const s=e=>{const t=o()("wallpaper",e.className),n=Object(a.a)();return r.createElement("div",{className:t},r.createElement("img",{src:`../wallpaper${n?"_dark":""}.svg`,alt:"","aria-hidden":"true"}))},c=()=>{const e=document.createElement("link");e.rel="preload",e.as="image",e.href="../wallpaper.svg",e.type="image/svg+xml";const t=document.createElement("link");t.rel="preload",t.as="image",t.href="../wallpaper_dark.svg",t.type="image/svg+xml",document.head.append(e),document.head.append(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2241);function i(e){if("undefined"===typeof window)return;const t=null!==e&&void 0!==e?e:"default",n=!r.a.sharedInstance.applicationParameter.isSafari&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=window.document.querySelectorAll("link[rel*='icon']");i.forEach((e=>e.remove())),i.forEach((e=>{const r=e;r.href.includes(".ico")||(r.href=`../favicons/${t}-favicon-${n?"dark":"light"}${r.sizes?"-"+r.sizes:""}.png`,window.document.getElementsByTagName("head")[0].appendChild(r))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(2249);function i(){const e=window.location.pathname;return["/ssoRedirect"].includes(e)}function o(){return r.c(window.location.href).searchParams.get("action")||"manage_appleid"}},function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return f}));var r=n(2249),i=(n(2298),n(898)),o=n(2155),a=n(2248);function s(e){var t,n,s,c;const u=i.a.domain,l=r.c(`${u.url.origin}/ssoRedirect`);e&&l.searchParams.append("action",e),l.searchParams.append("env",null!==(t=null===(n=a.c.value)||void 0===n?void 0:n.environment)&&void 0!==t?t:"PROD"),l.searchParams.append("alternateDSID",null!==(s=null===(c=o.h.value)||void 0===c||null===(c=c.details)||void 0===c?void 0:c.alternateDSID)&&void 0!==s?s:""),l.searchParams.append("isNativeTakeOverLogin",o.f.value.toString()),globalThis.window.open(l.toString(),"_blank")}const c="https://appleid-qa1.corp.apple.com",u="https://appleid-ut.corp.apple.com",l="https://appleid.apple.com",d="account/signin/sso";function p(e){const t=e||"PROD",n="ICLOUD3"===t?c:"ICLOUD2"===t||"ICLOUD1"===t?u:l;return r.c(`${n}`)}function f(){var e,t;return p(null!==(e=null===(t=a.c.value)||void 0===t?void 0:t.environment)&&void 0!==e?e:"PROD").toString()}},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 s}));var r=n(870);let i=function(e){return e.INTERNAL_APP="internal-theme",e.LOGIN="login-theme",e.HOMEPAGE="homepage-theme",e}({});const o=r.createContext(void 0),a=e=>r.createElement(o.Provider,{value:e.value||i.INTERNAL_APP},e.children),s=()=>{const e=r.useContext(o);if(void 0===e)throw new Error("useApplicationToolbarTheme must be used within a ApplicationToolbarThemeProvider");return e}},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=(n(1453),n(2322));const o=e=>{const t=e.tiles;return r.createElement("div",{className:"tiles flex-tiles"},r.createElement("div",{className:"row"},r.createElement("div",{className:"column"},t[0]?r.createElement(i.a,{icon:t[0].icon,title:t[0].title,tileId:"tile-A",textContent:t[0].description,className:"flex-tile tall",contentImgSrc:t[0].contentImageSrc1x,contentImgSrcSet:`${t[0].contentImageSrc1x}, ${t[0].contentImageSrc2x} 2x, ${t[0].contentImageSrc3x} 3x`,linkInfo:t[0].linkInfo}):void 0),r.createElement("div",{className:"column"},t[1]?r.createElement(i.a,{icon:t[1].icon,title:t[1].title,tileId:"tile-B",textContent:t[1].description,className:"flex-tile",linkInfo:t[1].linkInfo}):void 0,t[2]?r.createElement(i.a,{icon:t[2].icon,title:t[2].title,tileId:"tile-C",textContent:t[2].description,className:"flex-tile",linkInfo:t[2].linkInfo}):void 0)),r.createElement("div",{className:"row"},r.createElement("div",{className:"column"},t[3]?r.createElement(i.a,{icon:t[3].icon,title:t[3].title,tileId:"tile-D",textContent:t[3].description,className:"flex-tile wide",contentImgSrc:t[3].contentImageSrc1x,linkInfo:t[3].linkInfo}):void 0)),r.createElement("div",{className:"row"},r.createElement("div",{className:"column"},t[4]?r.createElement(i.a,{icon:t[4].icon,title:t[4].title,tileId:"tile-E",textContent:t[4].description,className:"flex-tile full-height",linkInfo:t[4].linkInfo}):void 0),r.createElement("div",{className:"column"},t[5]?r.createElement(i.a,{icon:t[5].icon,title:t[5].title,tileId:"tile-F",textContent:t[5].description,className:"flex-tile full-height",linkInfo:t[5].linkInfo}):void 0)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2155);const i=["au","gb"];function o(){var e,t;const n="unknown"!==(null===(e=r.a.value)||void 0===e?void 0:e.responseKind)&&(null===(t=r.a.value)||void 0===t||null===(t=t.requestInfo)||void 0===t||null===(t=t.country)||void 0===t?void 0:t.toLocaleLowerCase());return function(e){return i.includes(e)}(n)?n:null}},function(e,t,n){"use strict";var r=n(870),i=n(2284),o=n(1164);t.a=e=>{const[t,n]=Object(r.useState)(null),[a,s]=Object(r.useState)(null),c=Object(r.useCallback)((()=>"default"===a||"prompt"===a),[a]);return Object(r.useEffect)((()=>{(async()=>{try{if(!navigator.permissions)throw new Error("navigator.permissions unavailable in this browser version.");{const t=await navigator.permissions.query({name:e});n(t),s(t.state)}}catch{Object(o.a)()?s("default"===Notification.permission?"prompt":Notification.permission):s("prompt")}})()}),[e]),Object(r.useEffect)((()=>{if(!t)return;const e=e=>{var t,r,i;n(null!==(t=e.target)&&void 0!==t?t:null),s(null!==(r=null===(i=e.target)||void 0===i?void 0:i.state)&&void 0!==r?r:null)};return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[t]),{shouldPromptForPermission:c,permissionState:a,setPermissionState:s,notificationsEnabled:i.a}}},function(e,t,n){e.exports=n.p+"e0d6f03d2372a85d8659-push-serviceworker.worker.js"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(870);const i=r.createContext(void 0);function o(e){var t;return r.createElement(i.Provider,{value:null!==(t=e.value)&&void 0!==t?t:{modalToOpen:"",setModalToOpen:()=>{}}},e.children)}function a(){const e=r.useContext(i);if(void 0===e)throw new Error("useOpenModal must be used within a OpenModalProvider");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(1227),i=n(1247);function o(e){const t=i.a.sharedInstance.getApplicationConfiguration(e);if(!t)return Object(r.a)("Default.DataName");const n=t.dataNameLocKey;if(n)return Object(r.a)(n);return t.dataName||Object(r.a)("Default.DataName")}function a(e){const t=i.a.sharedInstance.getApplicationConfiguration(e);if(!t)return Object(r.a)("Default.DataNameTitleCase");const n=t.dataNameTitleCaseLocKey;if(n)return Object(r.a)(n);return t.dataNameTitleCase||Object(r.a)("Default.DataNameTitleCase")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(870),i=n(2212),o=n(1461),a=n(2155);let s=function(e){return e[e.ArmingRequest=0]="ArmingRequest",e[e.FailedToSendAccessRequest=1]="FailedToSendAccessRequest",e[e.AwaitingDeviceConsent=2]="AwaitingDeviceConsent",e[e.FailedToObtainConsent=3]="FailedToObtainConsent",e[e.DeviceConsentDenied=4]="DeviceConsentDenied",e[e.FailedToFetchKeys=5]="FailedToFetchKeys",e[e.FetchingKeys=6]="FetchingKeys",e[e.AccessGranted=7]="AccessGranted",e[e.AppNotSupportedWithArmedDevice=8]="AppNotSupportedWithArmedDevice",e}({});function c(e,t){const n=!Object(a.g)(),[c,u]=Object(o.a)(n?s.FetchingKeys:s.ArmingRequest,2e3),[l,d]=r.useState(1),p=r.useCallback((()=>{const e=!Object(a.g)();u(e?s.FetchingKeys:s.ArmingRequest),d(l+1)}),[u,d,l]);return r.useEffect((()=>{const n={current:!1};return i.a.sharedInstance.armDeviceIfNeededAndFetchPCSKeys(e,t,n,new class{canceledFetchKeys(){}sentRequestToArmDevice(){}failedToSendRequestToArmDevice(){u(s.FailedToSendAccessRequest)}receivedRequestToArmDeviceNotificationSent(){u(s.AwaitingDeviceConsent)}receivedRequestToArmDeviceNotificationGranted(){u(s.FetchingKeys)}receivedRequestToArmDeviceFailure(){u(s.FailedToObtainConsent)}receivedRequestToArmDeviceNotificationDenied(){u(s.DeviceConsentDenied)}sentRequestToFetchPCSKeys(){}receivedRequestToFetchPCSKeysSuccess(){u(s.AccessGranted)}receivedRequestToFetchPCSKeysFailure(){u(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?s.AppNotSupportedWithArmedDevice:s.FailedToFetchKeys)}}),()=>{n.current=!0}}),[e,t,l,u]),[c,p]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(1462);function o(e,t){const n=Object(i.a)(),o=r.useRef(Date.now()),a=r.useRef(),[s,c]=r.useState(e),u=r.useCallback((e=>{const r=Math.max(0,t-(Date.now()-o.current));window.clearTimeout(a.current),a.current=window.setTimeout((()=>{n.current&&(o.current=Date.now(),c(e))}),r)}),[t,n]);return r.useEffect((()=>()=>{window.clearTimeout(a.current)}),[]),[s,u]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);function i(){const e=r.useRef(!1);return r.useEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),e}},function(e,t,n){"use strict";var r=n(870),i=n.n(r),o=["styles"];function a(){return a=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},a.apply(null,arguments)}t.a=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,o);return i.a.createElement("svg",a({width:"46",height:"46",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{fill:"var(--theme-color-labelPrimary)",d:"M20.195 0c-.784 0-1.422.638-1.422 1.422 0 .785.638 1.422 1.422 1.422.784 0 1.422-.637 1.422-1.422C21.617.638 20.98 0 20.195 0m5.312 2.805A1.426 1.426 0 0027.25 1.8c.099-.367.047-.75-.142-1.08A1.417 1.417 0 0025.165.2a1.423 1.423 0 00.342 2.605m-10.09-1.153a1.408 1.408 0 00-1.08-.142 1.413 1.413 0 00-.863.663c-.19.328-.24.712-.142 1.078.099.368.334.674.663.864a1.413 1.413 0 001.08.142 1.423 1.423 0 00.342-2.605m15.232 2.49a1.42 1.42 0 002.084-1.6 1.413 1.413 0 00-.662-.863 1.409 1.409 0 00-1.079-.142 1.416 1.416 0 00-.864.662c-.19.33-.24.713-.142 1.08.099.367.334.674.663.863M9.414 7.089a1.42 1.42 0 001.08-.142 1.423 1.423 0 10-1.944-.52c.19.329.497.564.864.662m26.86.091c.365 0 .73-.139 1.006-.415a1.425 1.425 0 000-2.013 1.425 1.425 0 00-2.011 0 1.422 1.422 0 001.006 2.428M5.758 11.147c.364 0 .729-.139 1.005-.415a1.425 1.425 0 000-2.013 1.425 1.425 0 00-2.01 0 1.422 1.422 0 001.006 2.428m34.527.057a1.413 1.413 0 001.371-1.054c.098-.368.048-.75-.142-1.079a1.413 1.413 0 00-.864-.662c-.368-.1-.75-.049-1.078.141-.33.19-.564.497-.663.864a1.423 1.423 0 001.376 1.79M2.2 15.873a1.424 1.424 0 001.943-.522 1.424 1.424 0 00-1.601-2.084 1.417 1.417 0 00-.863.662 1.41 1.41 0 00-.142 1.08c.099.366.334.674.663.864m39.543-.799a1.425 1.425 0 001.741 1.005 1.423 1.423 0 001.007-1.741 1.425 1.425 0 00-2.606-.344c-.19.33-.24.713-.142 1.08m-40.68 6.424a1.42 1.42 0 10.736-2.747 1.426 1.426 0 00-1.74 1.006c-.1.367-.05.75.14 1.079.19.329.497.564.865.662m42.092-1.303c0 .784.638 1.422 1.422 1.422.785 0 1.422-.638 1.422-1.422 0-.784-.637-1.422-1.422-1.422-.784 0-1.422.638-1.422 1.422m-40.312 5.61c0-.784-.638-1.422-1.422-1.422-.784 0-1.422.638-1.422 1.422 0 .784.638 1.422 1.422 1.422.784 0 1.422-.638 1.422-1.422m42.093-1.303a1.428 1.428 0 00-1.742 1.005 1.425 1.425 0 001.373 1.79 1.425 1.425 0 001.233-2.133 1.415 1.415 0 00-.864-.662m-40.68 6.424a1.413 1.413 0 00-.662-.863 1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.662c-.19.329-.24.713-.142 1.08.097.366.334.673.662.863a1.413 1.413 0 001.08.142 1.41 1.41 0 00.863-.663c.19-.328.24-.712.142-1.079m39.544-.798a1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.663c-.19.328-.24.711-.143 1.079a1.416 1.416 0 001.372 1.054 1.431 1.431 0 001.234-.711c.19-.329.24-.713.142-1.08a1.413 1.413 0 00-.662-.863M6.084 34.845a1.419 1.419 0 00-1.6 2.085 1.423 1.423 0 101.6-2.085m33.152.424a1.412 1.412 0 00-.416 1.005c0 .38.147.738.416 1.006.277.278.641.416 1.006.416a1.418 1.418 0 001.422-1.422c0-.38-.148-.737-.417-1.005-.537-.537-1.474-.54-2.01 0M8.72 39.235a1.413 1.413 0 00-.418 1.006c0 .38.149.738.418 1.006a1.419 1.419 0 002.011-.001 1.424 1.424 0 000-2.01c-.538-.538-1.474-.538-2.011 0m27.865-.325a1.414 1.414 0 00-1.08.142 1.417 1.417 0 00-.519 1.943 1.417 1.417 0 001.943.52 1.425 1.425 0 00.52-1.943 1.415 1.415 0 00-.864-.662m-21.234 2.947a1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.663c-.19.328-.24.711-.143 1.078a1.416 1.416 0 001.372 1.055 1.431 1.431 0 001.234-.711c.19-.33.24-.713.142-1.08a1.413 1.413 0 00-.662-.863m16.653.027a1.408 1.408 0 00-1.078-.142 1.413 1.413 0 00-.864.662c-.19.33-.24.713-.142 1.08.097.367.334.673.662.863a1.413 1.413 0 001.08.142 1.41 1.41 0 00.863-.663c.19-.328.24-.712.142-1.078a1.413 1.413 0 00-.663-.864m-11.512 1.31a1.426 1.426 0 00-1.742 1.005 1.425 1.425 0 001.373 1.79c.628 0 1.205-.419 1.375-1.054a1.424 1.424 0 00-1.006-1.741m5.312-.04c-.784 0-1.422.64-1.422 1.423 0 .784.638 1.422 1.422 1.422.784 0 1.422-.638 1.422-1.422 0-.784-.638-1.422-1.422-1.422m-2.87-37.02c.272 0 .536-.09.754-.261a1.225 1.225 0 00.212-1.728 1.223 1.223 0 00-.82-.463 1.21 1.21 0 00-.907.251c-.26.203-.424.494-.464.82-.04.327.05.649.252.908a1.223 1.223 0 00.972.473m3.527-1.097a1.242 1.242 0 00.686 1.615 1.243 1.243 0 001.607-1.635 1.242 1.242 0 00-2.293.02m-8.22 1.772a1.234 1.234 0 00.992-.494c.2-.264.284-.59.238-.919a1.23 1.23 0 00-.481-.819 1.232 1.232 0 00-.92-.237 1.236 1.236 0 00-1.056 1.402c.087.62.62 1.067 1.228 1.067m13.575-.758a1.237 1.237 0 00-.818.482 1.244 1.244 0 00.988 1.988 1.235 1.235 0 00.994-.495 1.237 1.237 0 00-.244-1.737 1.242 1.242 0 00-.92-.238M13.892 8.65a1.244 1.244 0 001.14-1.726 1.243 1.243 0 00-1.626-.656c-.63.267-.924.997-.658 1.626.2.473.661.756 1.144.756m21.716 2.712a1.227 1.227 0 00.915-.254 1.243 1.243 0 00-.614-2.208 1.225 1.225 0 00-.915.253 1.231 1.231 0 00-.467.827c-.04.33.05.654.254.915.204.26.498.427.827.467m-25.294-2.28a1.22 1.22 0 00-.915.253 1.23 1.23 0 00-.468.827c-.04.329.05.654.254.914a1.23 1.23 0 00.98.477 1.243 1.243 0 00.148-2.472m27.207 5.263a1.24 1.24 0 001.626.658c.63-.269.925-.998.658-1.628-.13-.305-.37-.54-.678-.665a1.229 1.229 0 00-.95.009c-.304.129-.54.369-.665.676-.124.307-.12.645.009.95m2.98 5.108a1.242 1.242 0 001.23-1.413 1.247 1.247 0 00-1.401-1.057h-.001a1.243 1.243 0 00-1.056 1.402c.087.619.62 1.068 1.228 1.068m-34.964.25a1.246 1.246 0 001.15-.778 1.242 1.242 0 00-.685-1.615 1.241 1.241 0 10-.465 2.392m36.781 3.38c.04-.325-.05-.648-.252-.906a1.225 1.225 0 00-.82-.465 1.21 1.21 0 00-.907.251 1.227 1.227 0 00-.212 1.728 1.225 1.225 0 00.971.474 1.226 1.226 0 001.22-1.082m-38.634-.026c-.04.326.05.649.252.907a1.225 1.225 0 00.97.474c.613 0 1.145-.457 1.222-1.08v-.001a1.233 1.233 0 00-1.98-1.12 1.23 1.23 0 00-.464.82m36.419 5.675a1.243 1.243 0 001.607-1.635 1.227 1.227 0 00-.678-.665 1.225 1.225 0 00-.95.009c-.304.129-.54.369-.664.677-.124.307-.121.645.008.95.13.304.37.541.677.664m-34.5.34a1.242 1.242 0 001.23-1.413 1.245 1.245 0 00-1.402-1.058 1.235 1.235 0 00-.818.482 1.243 1.243 0 00.99 1.988m34.18 3.636c.41-.546.3-1.326-.244-1.738a1.244 1.244 0 00-1.739.244c-.2.265-.284.591-.238.92.046.328.218.618.482.817a1.234 1.234 0 00.92.239c.328-.046.618-.217.818-.482m-31.19-.06a1.226 1.226 0 00-.008-.948 1.227 1.227 0 00-.677-.666 1.236 1.236 0 00-1.615.685c-.124.307-.121.644.009.95a1.231 1.231 0 001.141.756c.165 0 .33-.033.484-.1.306-.129.543-.369.667-.676m27.197 4.312a1.227 1.227 0 00.915-.254 1.243 1.243 0 00-.613-2.208 1.243 1.243 0 00-.302 2.462m-25.294-2.28a1.243 1.243 0 00-1.129 1.995 1.23 1.23 0 00.98.476 1.243 1.243 0 00.148-2.472m21.234 2.81c-.63.268-.925.998-.658 1.627a1.242 1.242 0 001.628.658 1.241 1.241 0 00-.97-2.284M14.11 39.999a1.233 1.233 0 00.994-.495c.2-.264.284-.59.238-.918a1.231 1.231 0 00-.482-.818 1.25 1.25 0 00-.92-.239 1.23 1.23 0 00-.817.482c-.2.266-.284.592-.238.92.045.328.217.62.482.819.217.164.476.25.743.25m13.577-.76a1.23 1.23 0 00-.817.483 1.23 1.23 0 00-.239.918c.047.33.217.62.483.819a1.228 1.228 0 00.918.237 1.237 1.237 0 00.575-2.218c-.265-.2-.59-.285-.92-.238M19.641 41a1.243 1.243 0 00-.685-1.616 1.242 1.242 0 10-.467 2.392c.491 0 .958-.294 1.152-.776m3.714-1.128a1.23 1.23 0 10-.301 2.443 1.23 1.23 0 00.301-2.443M6.322 13.335c-.2.264-.284.59-.238.92.046.327.218.617.482.817a1.234 1.234 0 00.92.238c.328-.046.618-.217.818-.482.411-.547.301-1.326-.245-1.737a1.242 1.242 0 00-1.737.244m18.146 3.918c-.445.233-.865.35-1.262.35-.081 0-.16-.007-.234-.02a1.327 1.327 0 01-.037-.316c0-.446.098-.88.294-1.304.195-.422.417-.772.665-1.052a3.881 3.881 0 011.193-.93c.478-.249.933-.383 1.368-.401.025.105.037.223.037.354 0 .447-.086.883-.26 1.308a4.483 4.483 0 01-.661 1.132c-.292.353-.66.646-1.103.88m2.299.581c.264.025.563.09.894.196.332.106.672.276 1.02.512s.667.565.96.988l-.327.237c-.192.14-.41.342-.652.61a3.763 3.763 0 00-.633 1.015c-.18.41-.27.894-.27 1.452 0 .646.115 1.194.344 1.644.23.45.496.812.797 1.085.301.273.571.473.81.6l.377.201c0 .018-.042.148-.126.391a9.928 9.928 0 01-.386.917c-.173.37-.4.76-.68 1.169-.249.353-.506.695-.773 1.024-.266.33-.557.6-.87.81a1.867 1.867 0 01-1.067.317c-.397 0-.722-.06-.978-.177a27.72 27.72 0 00-.786-.349c-.27-.116-.632-.172-1.085-.172-.447 0-.818.058-1.113.176-.295.118-.576.238-.843.36-.267.12-.58.18-.94.18-.546 0-1.026-.217-1.438-.65a14.553 14.553 0 01-1.272-1.565 9.66 9.66 0 01-.917-1.663 11.15 11.15 0 01-.656-2.002 9.442 9.442 0 01-.243-2.118c0-1.125.213-2.072.638-2.84.426-.77.973-1.353 1.643-1.747.672-.395 1.366-.591 2.087-.591.384 0 .746.061 1.085.186.338.124.653.25.945.377.291.127.561.191.81.191.223 0 .49-.066.8-.2.31-.133.657-.267 1.039-.401.381-.133.79-.2 1.224-.2.124 0 .318.013.582.037",fillRule:"evenodd"}))}},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.safeInit=t.init=t.validateConfig=t.buildIFrameUrl=t.getSpinner=t.getSpinnerColor=t.buildIFrameElement=t.WidgetPmrpcConnection=t.destroyIFrame=t.VERSION=t.DARK_MODE_SPINNER_COLOR=t.LIGHT_MODE_SPINNER_COLOR=t.CONFIG_LOAD_TIMEOUT=t.FRAME_LOAD_TIMEOUT=t.THIRTY_SECONDS=t.PATH=t.NAME_SPACE=t.NAME=void 0;const i=r(n(2323)),o=r(n(1465));t.NAME="aid-create-widget",t.NAME_SPACE="AppleID",t.PATH="/widget/account/",t.THIRTY_SECONDS=3e4,t.FRAME_LOAD_TIMEOUT=t.THIRTY_SECONDS,t.CONFIG_LOAD_TIMEOUT=t.THIRTY_SECONDS,t.LIGHT_MODE_SPINNER_COLOR="#737373",t.DARK_MODE_SPINNER_COLOR="#FFFFFF",t.VERSION="0.3.16",t.destroyIFrame=()=>{var e;const n=document.getElementById(`${t.NAME}-iFrame`);"IFRAME"===(null===n||void 0===n?void 0:n.nodeName)&&(null===(e=n.parentNode)||void 0===e||e.removeChild(n))};class a{constructor(e,n){this.widgetHasFailedToLoad=!1,this.configWasSuccessful=!1,this.configHasFailed=!1,this.config=e,this.spinner=n,this.pmrpc=new i.default,this.pmrpc.setNamespace(t.NAME_SPACE),this.registerCallbacks()}addListener(e,t){this.pmrpc.register({publicProcedureName:e,procedure:t,acl:{permittedList:[new URL(this.config.serviceURL).origin],notPermittedList:[]}})}registerCallbacks(){var e;const{completed:n,failed:r,ready:i,exit:o}=this.config.callbacks;this.loadTimeout=setTimeout((()=>{this.widgetHasFailedToLoad||(this.widgetHasFailedToLoad=!0,(0,t.destroyIFrame)(),r({reason:"loadTimeout"}))}),t.FRAME_LOAD_TIMEOUT),this.addListener("getConfig",(()=>(clearTimeout(this.loadTimeout),this.configTimeout=setTimeout((()=>{this.configWasSuccessful||this.configHasFailed||(this.configHasFailed=!0,(0,t.destroyIFrame)(),r({reason:"configTimeout"}))}),t.CONFIG_LOAD_TIMEOUT),this.config))),this.addListener("ready",(()=>{var e,n;this.configWasSuccessful=!0,clearTimeout(this.configTimeout),null===(e=this.spinner)||void 0===e||e.stop();const r=window.document.getElementById(`${t.NAME}-iFrame`);r&&(r.style.visibility="visible","embedded"!==(null===(n=this.config.features)||void 0===n?void 0:n.mode)&&(r.style.height="100%")),null===i||void 0===i||i()})),this.addListener("configFailed",(e=>{this.configHasFailed||(this.configHasFailed=!0,clearTimeout(this.configTimeout),(0,t.destroyIFrame)(),r(e))})),"embedded"===(null===(e=this.config.features)||void 0===e?void 0:e.mode)&&this.addListener("resize",(e=>{const n=(null===e||void 0===e?void 0:e.height)||-1;if(n>=0){const e=window.document.getElementById(`${t.NAME}-iFrame`);e&&(e.style.height=`${n}px`)}})),this.addListener("exit",o),this.addListener("completed",(e=>n(e))),this.addListener("failed",(e=>r(e)));const{formRendered:a,formSubmitSuccess:s,formSubmitFailed:c,formOperationSuccess:u,formOperationFailed:l}=this.config.callbacks;a&&this.addListener("formRendered",(e=>a(e))),s&&this.addListener("formSubmitSuccess",(e=>s(e))),c&&this.addListener("formSubmitFailed",(e=>c(e))),u&&this.addListener("formOperationSuccess",(e=>u(e))),l&&this.addListener("formOperationFailed",(e=>l(e)))}}t.WidgetPmrpcConnection=a,t.buildIFrameElement=(e,n,r="light",i=!1)=>{const o=document.createElement("iframe");return o.src=e.toString(),o.width="100%",o.height="100%",o.id=`${t.NAME}-iFrame`,o.style.overflow="hidden",o.style.border="0",o.style.visibility="hidden",o.style.height="50px",o.style.width="100%",o.style.colorScheme=r,i&&(o.style.backgroundColor="transparent"),o.setAttribute("role","none"),o.title=n,o},t.getSpinnerColor=e=>"auto"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?t.DARK_MODE_SPINNER_COLOR:t.LIGHT_MODE_SPINNER_COLOR:"light"===e?t.LIGHT_MODE_SPINNER_COLOR:t.DARK_MODE_SPINNER_COLOR,t.getSpinner=(e="light")=>new o.default({lines:8,length:26,width:16,radius:25,scale:.25,corners:100,color:(0,t.getSpinnerColor)(e),opacity:.25,rotate:0,direction:1,speed:1.2,trail:60,fps:60,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!0,position:"absolute"}),t.buildIFrameUrl=e=>{const{serviceURL:n,serviceKey:r,locale:i,devAppDomain:o,queryParams:a,widgetVersion:s="3",managedToken:c,environmentSwitch:u,acts:l,appContext:d}=e;let p;try{p=new URL(n+t.PATH)}catch(f){throw new URIError(`Invalid URL, ${n+t.PATH}`)}if(p.searchParams.set("roleType","Agent"),p.searchParams.set("lv",t.VERSION),p.searchParams.set("widgetKey",r),p.searchParams.set("v",s),p.searchParams.set("appContext",d),i&&p.searchParams.set("language",i),o&&p.searchParams.set("widgetDomain",o),c&&p.searchParams.set("managedToken",c),u&&p.searchParams.set("environmentSwitch",u),null===l||void 0===l?void 0:l.length){const e=l.filter((e=>e.widgetKey&&e.domain)).map((e=>[e.widgetKey,e.domain]));e.length&&p.searchParams.set("acts",JSON.stringify({d:e}))}return Object.entries(a||{}).forEach((([e,t])=>{p.searchParams.set(e,t)})),p},t.validateConfig=e=>{const t={},{serviceKey:n,serviceURL:r,containerId:i,callbacks:o}=e;return n||(t.serviceKey="serviceKey missing"),r||(t.serviceURL="serviceURL missing"),i||(t.containerId="containerId missing"),"function"!==typeof o.completed&&(t.completed="callbacks.completed is missing"),"function"!==typeof o.failed&&(t.failed="callbacks.failed is missing"),t},t.init=e=>{var n,r,i;const o=(0,t.validateConfig)(e);if(Object.keys(o).length>0)return void console.error("Could not init create application, the following errors occured:",o);const{containerId:s,waitAnimation:c=!0,frameTitle:u}=e,l=window.document.getElementById(s);if(!l)return void console.error(`Could not find element based on id, ${s}, is your element loaded?`);let d;c&&(d=(0,t.getSpinner)(null===(n=e.features)||void 0===n?void 0:n.colorScheme),d.spin(l));const p=(0,t.buildIFrameUrl)(e),f=(0,t.buildIFrameElement)(p,u,null===(r=e.features)||void 0===r?void 0:r.colorScheme,null===(i=e.features)||void 0===i?void 0:i.transparentBackground);l.appendChild(f),new a(e,d)},t.safeInit=(e,t,n)=>{t.reduce(((e,r,i)=>(e[r]||(e[r]=i===t.length-1?n:{}),e[r])),e)},(0,t.safeInit)(window,["AppleID","service","create","init"],t.init)},function(e,t,n){var r,i,o;o=function(){"use strict";var e,t,n=["webkit","Moz","ms","O"],r={};function i(e,t){var n,r=document.createElement(e||"div");for(n in t)r[n]=t[n];return r}function o(e){for(var t=1,n=arguments.length;t<n;t++)e.appendChild(arguments[t]);return e}function a(n,i,o,a){var s=["opacity",i,~~(100*n),o,a].join("-"),c=.01+o/a*100,u=Math.max(1-(1-n)/i*(100-c),n),l=e.substring(0,e.indexOf("Animation")).toLowerCase(),d=l&&"-"+l+"-"||"";return r[s]||(t.insertRule("@"+d+"keyframes "+s+"{0%{opacity:"+u+"}"+c+"%{opacity:"+n+"}"+(c+.01)+"%{opacity:1}"+(c+i)%100+"%{opacity:"+n+"}100%{opacity:"+u+"}}",t.cssRules.length),r[s]=1),s}function s(e,t){var r,i,o=e.style;if(void 0!==o[t=t.charAt(0).toUpperCase()+t.slice(1)])return t;for(i=0;i<n.length;i++)if(void 0!==o[r=n[i]+t])return r}function c(e,t){for(var n in t)e.style[s(e,n)||n]=t[n];return e}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)void 0===e[r]&&(e[r]=n[r])}return e}function l(e,t){return"string"==typeof e?e:e[t%e.length]}var d={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:1/4,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};function p(e){this.opts=u(e||{},p.defaults,d)}if(p.defaults={},u(p.prototype,{spin:function(t){this.stop();var n=this,r=n.opts,o=n.el=i(null,{className:r.className});if(c(o,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(o,t.firstChild||null),o.setAttribute("role","progressbar"),n.lines(o,n.opts),!e){var a,s=0,u=(r.lines-1)*(1-r.direction)/2,l=r.fps,d=l/r.speed,p=(1-r.opacity)/(d*r.trail/100),f=d/r.lines;!function e(){s++;for(var t=0;t<r.lines;t++)a=Math.max(1-(s+(r.lines-t)*f)%d*p,r.opacity),n.opacity(o,t*r.direction+u,a,r);n.timeout=n.el&&setTimeout(e,~~(1e3/l))}()}return n},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=void 0),this},lines:function(t,n){var r,s=0,u=(n.lines-1)*(1-n.direction)/2;function d(e,t){return c(i(),{position:"absolute",width:n.scale*(n.length+n.width)+"px",height:n.scale*n.width+"px",background:e,boxShadow:t,transformOrigin:"left",transform:"rotate("+~~(360/n.lines*s+n.rotate)+"deg) translate("+n.scale*n.radius+"px,0)",borderRadius:(n.corners*n.scale*n.width>>1)+"px"})}for(;s<n.lines;s++)r=c(i(),{position:"absolute",top:1+~(n.scale*n.width/2)+"px",transform:n.hwaccel?"translate3d(0,0,0)":"",opacity:n.opacity,animation:e&&a(n.opacity,n.trail,u+s*n.direction,n.lines)+" "+1/n.speed+"s linear infinite"}),n.shadow&&o(r,c(d("#000","0 0 4px #000"),{top:"2px"})),o(t,o(r,d(l(n.color,s),"0 0 1px rgba(0,0,0,.1)")));return t},opacity:function(e,t,n){t<e.childNodes.length&&(e.childNodes[t].style.opacity=n)}}),"undefined"!==typeof document){t=function(){var e=i("style",{type:"text/css"});return o(document.getElementsByTagName("head")[0],e),e.sheet||e.styleSheet}();var f=c(i("group"),{behavior:"url(#default#VML)"});!s(f,"transform")&&f.adj?function(){function e(e,t){return i("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}t.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(t,n){var r=n.scale*(n.length+n.width),i=2*n.scale*r;function a(){return c(e("group",{coordsize:i+" "+i,coordorigin:-r+" "+-r}),{width:i,height:i})}var s,u=-(n.width+n.length)*n.scale*2+"px",d=c(a(),{position:"absolute",top:u,left:u});function p(t,i,s){o(d,o(c(a(),{rotation:360/n.lines*t+"deg",left:~~i}),o(c(e("roundrect",{arcsize:n.corners}),{width:r,height:n.scale*n.width,left:n.scale*n.radius,top:-n.scale*n.width>>1,filter:s}),e("fill",{color:l(n.color,t),opacity:n.opacity}),e("stroke",{opacity:0}))))}if(n.shadow)for(s=1;s<=n.lines;s++)p(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=n.lines;s++)p(s);return o(t,d)},p.prototype.opacity=function(e,t,n,r){var i=e.firstChild;r=r.shadow&&r.lines||0,i&&t+r<i.childNodes.length&&(i=(i=(i=i.childNodes[t+r])&&i.firstChild)&&i.firstChild)&&(i.opacity=n)}}():e=s(f,"animation")}return p},e.exports?e.exports=o():void 0===(i="function"===typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(966);let i;function o(){return null!==i&&void 0!==i?i:i=Object(r.a)().getAuthWidgetConfig()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1219),i=n(1220);function o(e){return Object(i.a)(e,(e=>{var t,n;return Object(r.a)(e)&&(null===(n=null===(t=e.props)||void 0===t?void 0:t.className)||void 0===n?void 0:n.includes("icloud-icon-container"))}))}},function(e,t,n){"use strict";function r(e){if(null==e)return"[missing node]";if("string"===typeof e||"boolean"===typeof e||"number"===typeof e)return"[text node]";var t=e;return"function"===typeof t.type?t.type.displayName||t.type.name:"string"===typeof t.type?t.type:"symbol"===typeof t.type&&"Symbol(react.fragment)"===t.type.toString()?"React.Fragment":"[unknown node]"}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){const t=e.changedTouches.item(0);return t?document.elementFromPoint(t.clientX,t.clientY):null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"questionmark.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM57.5195-25.1465C59.9609-25.1465 61.4746-26.709 61.4746-28.6133L61.4746-29.1992C61.4746-31.9336 63.0371-33.6914 66.4551-35.9375C71.1914-39.0625 74.5605-41.8945 74.5605-47.7539C74.5605-55.8594 67.334-60.2539 59.0332-60.2539C50.6348-60.2539 45.1172-56.25 43.7988-51.7578C43.5547-50.9766 43.3594-50.1465 43.3594-49.3652C43.3594-47.168 45.1172-45.9961 46.7285-45.9961C49.5117-45.9961 49.9512-47.4609 51.5137-49.3164C53.125-52.002 55.4688-53.6133 58.7402-53.6133C63.1836-53.6133 66.0645-51.0742 66.0645-47.3633C66.0645-44.043 64.0137-42.4316 59.7656-39.4531C56.25-37.0117 53.6133-34.4238 53.6133-29.6387L53.6133-29.0039C53.6133-26.4648 55.0293-25.1465 57.5195-25.1465ZM57.4219-10.5957C60.2539-10.5957 62.6953-12.8418 62.6953-15.6738C62.6953-18.5059 60.3027-20.752 57.4219-20.752C54.541-20.752 52.1484-18.457 52.1484-15.6738C52.1484-12.8906 54.5898-10.5957 57.4219-10.5957Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"person.crop.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449-18.6523C43.8477-18.6523 32.5684-13.3789 27.5879-7.51953C21.0449-14.8926 17.0898-24.5605 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-24.5605 96.0938-14.8438 89.502-7.51953C84.5703-13.3789 73.2422-18.6523 58.5449-18.6523ZM58.5449-26.9531C67.9688-26.8555 75.293-34.8633 75.293-45.3613C75.293-55.2246 67.9199-63.3789 58.5449-63.3789C49.1699-63.3789 41.748-55.2246 41.7969-45.3613C41.8457-34.8633 49.1699-27.0508 58.5449-26.9531Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"xmark.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM41.8457-14.5996C42.9688-14.5996 43.9453-15.0391 44.6777-15.8203L58.4961-29.6875L72.4121-15.8203C73.1445-15.0879 74.0723-14.5996 75.1953-14.5996C77.3438-14.5996 79.1016-16.3574 79.1016-18.5547C79.1016-19.6777 78.7109-20.5566 77.9297-21.3379L64.0625-35.2051L77.9785-49.1699C78.8086-50 79.1504-50.8301 79.1504-51.9043C79.1504-54.0527 77.3926-55.8105 75.2441-55.8105C74.2188-55.8105 73.3887-55.4199 72.5586-54.5898L58.4961-40.6738L44.5801-54.541C43.8477-55.3223 42.9688-55.7129 41.8457-55.7129C39.6973-55.7129 37.9395-54.0039 37.9395-51.8555C37.9395-50.7812 38.3789-49.8535 39.1113-49.1211L52.9785-35.2051L39.1113-21.2891C38.3789-20.5566 37.9395-19.6289 37.9395-18.5547C37.9395-16.3574 39.6973-14.5996 41.8457-14.5996Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(901),i=n(900),o=n(2249),a=n(1247),s=n(1207),c=n(1248),u=n(1208),l=n(1392),d=n(1206),p=n(2212);async function f(e){var t;const n=m(e);let r;"pages"===e?r=a.a.sharedInstance.getApplicationConfiguration(s.b.identifier):"keynote"===e?r=a.a.sharedInstance.getApplicationConfiguration(u.b.identifier):"numbers"===e?r=a.a.sharedInstance.getApplicationConfiguration(d.b.identifier):Object(l.a)(e);const i=a.a.sharedInstance.getApplicationInfo(e),o=null===i||void 0===i?void 0:i.pcsKeyIdentifier;let f="";o&&!p.a.sharedInstance.hasPCSKey(o)&&(f=`#postLoginRedirectUrl=https://${n}/`),r&&null!==(t=r)&&void 0!==t&&t.isHidden&&r.reasonConfigurationIsHidden===c.a.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE?g(`https://${n}/${f}${e}/`):g(`https://${n}/${f}${e}/create`)}function h(e,t,n){var r;const{extension:i,shortGuid:o,shortGUID:a,isSharedToMe:s,sharingToken:c,title:u,isSharedByMe:l,isSharedDirectlyOrIndirectly:d,isSharedDirectly:p,zone:f,id:h,unifiedToken:v}=t,y=m(e),b=null===i||void 0===i?void 0:i.replace(/-tef$/,""),w=`https://${y}/${"key"===(null===b||void 0===b?void 0:b.toLowerCase())?"keynote":b}`,S=u?"#"+encodeURIComponent(u.replace(/\s/g,"_"))+":nooverride":"#:nooverride",C=!!o||!!a,_=s&&p&&!!c,O=l||!d,E=null===n||void 0===n||null===(r=n.details)||void 0===r?void 0:r.dsid,I=v?`utoken:${v}`:C?o||a:O?`docws:${E}:${f}:${h}`:_?c:null;if(!I)throw new Error("Cannot open the document");g(`${w}/${I}?redirectReason=off${S}`)}function m(e){let t;return e&&(t=i.a.sharedInstance.isDomainCN?r.d.url.hostname:r.e.url.hostname),t}function g(e){if(!o.c(e))throw new Error("Unable to open iWork document");globalThis.window.open(e.toString(),"_blank")}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"icloud",svgPath:"M105.225 3.22266C119.971 3.22266 131.494-7.56836 131.494-20.9961C131.494-31.25 125.586-40.1367 116.064-44.1406C116.162-65.918 100.488-81.6406 80.5176-81.6406C67.2852-81.6406 57.8613-74.5605 52.002-66.0156C39.9902-69.5312 26.9043-60.4004 26.6602-46.7285C15.625-44.9707 8.74023-35.1074 8.74023-23.1934C8.74023-8.83789 21.2891 3.22266 37.9883 3.22266ZM105.225-4.63867L37.9883-4.63867C25.6836-4.63867 16.6016-13.2324 16.6016-23.1934C16.6016-32.959 22.5098-40.7227 32.8613-40.7227C33.5449-40.7227 33.7891-41.0645 33.7891-41.6992C33.7891-56.7383 44.6289-61.1816 54.6387-57.9102C55.2246-57.7148 55.5664-57.8613 55.8594-58.3984C60.5957-66.8457 67.8711-73.7793 80.5176-73.7793C96.5332-73.7793 107.617-61.084 108.447-46.582C108.594-44.3359 108.447-41.6992 108.252-39.4043C108.203-38.7695 108.447-38.4277 109.033-38.2812C117.92-36.3281 123.633-29.834 123.633-20.9961C123.633-11.9141 115.625-4.63867 105.225-4.63867Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 92.8212890625",width:122.758056640625,height:92.8212890625,translateX:-8.735942382812482,translateY:81.640625,baseline:81.640625,capline:11.1806640625}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"externaldrive",svgPath:"M12.4512-15.5273C12.4512-3.125 22.0703 6.49414 35.6445 6.49414L104.541 6.49414C118.115 6.49414 127.734-3.125 127.734-15.5273C127.734-19.1895 126.66-22.4609 125.391-25.5371L108.936-65.0391C105.713-72.8516 99.0723-76.8555 90.332-76.8555L49.8535-76.8555C41.1133-76.8555 34.4727-72.8516 31.25-65.0391L14.7461-25.5371C13.5254-22.5098 12.4512-19.1895 12.4512-15.5273ZM28.2227-36.2793L38.8672-63.0371C40.7227-67.6758 44.7266-70.0195 50.2441-70.0195L89.9414-70.0195C95.459-70.0195 99.5117-67.6758 101.318-63.0371L111.963-36.2793C109.668-37.1094 107.227-37.5488 104.541-37.5488L35.6445-37.5488C32.959-37.5488 30.4688-37.1094 28.2227-36.2793ZM20.3125-15.5273C20.3125-23.584 26.416-29.6875 35.6445-29.6875L104.541-29.6875C113.77-29.6875 119.873-23.584 119.873-15.5273C119.873-6.49414 113.77-1.36719 104.541-1.36719L35.6445-1.36719C26.416-1.36719 20.3125-7.4707 20.3125-15.5273ZM98.3887-15.5273C98.3887-12.1094 101.172-9.42383 104.541-9.47266C107.764-9.47266 110.596-12.1582 110.596-15.5273C110.596-18.7988 107.764-21.582 104.541-21.582C101.172-21.582 98.3887-18.7988 98.3887-15.5273Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.91510009765625,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 115.28759765625 83.4482421875",width:115.28759765625,height:83.4482421875,translateX:-12.451171875,translateY:76.9541015625,baseline:76.9541015625,capline:6.494140625}}})}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"person.icloud",svgPath:"M105.225 3.22266C119.971 3.22266 131.494-7.56836 131.494-20.9961C131.494-31.25 125.586-40.1367 116.064-44.1406C116.162-65.918 100.488-81.6406 80.5176-81.6406C67.2852-81.6406 57.8613-74.5605 52.002-66.0156C39.9902-69.5312 26.9043-60.4004 26.6602-46.7285C15.625-44.9707 8.74023-35.1074 8.74023-23.1934C8.74023-8.83789 21.2891 3.22266 37.9883 3.22266ZM105.225-4.63867L100.977-4.63867C97.5586-12.4023 88.3789-21.3379 73.5352-21.3379C58.7402-21.3379 49.5117-12.4512 46.0938-4.63867L37.9883-4.63867C25.6836-4.63867 16.6016-13.2324 16.6016-23.1934C16.6016-32.959 22.5098-40.7227 32.8613-40.7227C33.5449-40.7227 33.7891-41.0645 33.7891-41.6992C33.7891-56.7383 44.6289-61.1816 54.6387-57.9102C55.2246-57.7148 55.5664-57.8613 55.8594-58.3984C60.5957-66.8457 67.8711-73.7793 80.5176-73.7793C96.5332-73.7793 107.617-61.084 108.447-46.582C108.594-44.3359 108.447-41.6992 108.252-39.4043C108.203-38.7695 108.447-38.4277 109.033-38.2812C117.92-36.3281 123.633-29.834 123.633-20.9961C123.633-11.9141 115.625-4.63867 105.225-4.63867ZM73.5352-27.3926C80.8594-27.3438 86.8164-34.082 86.8164-41.9434C86.8164-49.707 80.8594-56.1035 73.5352-56.1035C66.1621-56.1035 60.2539-49.707 60.2539-41.9434C60.3027-34.082 66.1621-27.4414 73.5352-27.3926Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 92.8212890625",width:122.758056640625,height:92.8212890625,translateX:-8.735942382812482,translateY:81.640625,baseline:81.640625,capline:11.1806640625}}})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(870),i=n(1483),o=n(1396),a=n(980),s=n(2230),c=n(1329),u=n(919),l=n(920);const d=e=>{const t=Object(s.d)(),n=Object(c.c)(),o=Object(i.useCoDEligibleDevicesListForPlanUpgrade)(),{isFetched:a,upsellPlanData:d}=Object(i.useSubscriptionUpsellPlanData)(),p=a&&void 0!==o&&"loading"!==t.type&&"error"!==t.type,f=p&&o.length>0&&null!==d&&(n===c.a.Standard||n===c.a.Plus)&&"family-sharing"!==t.type;return r.useEffect((()=>{if(p){const t=n===c.a.Standard?"free_user":"paid_user",r=f?"plan_selection_flow":"continue_on_device_flow";u.a.withEventAndLabel("workflow",`${e}_upsell_${r}_${t}_displayed`,{statCategory:l.a.SESSION}).recordOnce()}}),[p,f,e,n]),{isPlanUpgradeEligibleDataReady:p,shouldShowPlanUpgrade:f,planUpgradeEligibleDeviceList:o,planUpgradeButtonTextData:d}},p=()=>{const e=Object(s.d)();return()=>{var t;e.refetch(),null===(t=Object(a.b)())||void 0===t||t.fetchStorageQuota(),o.a.sharedInstance.performRevalidate()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(870),i=n(1359),o=n(1479),a=n(975);function s(e){let{endpoint:t,cacheKeys:n=[],fetchProvider:s,dependencies:c=[],enabled:u,...l}=e;const d=Object(o.a)(),p=[t,...n||[]],f=s({webServices:d});let h=void 0===u?[d,...c].every(a.a):u;const m=Object(i.useQuery)(p,f,{...l,enabled:h,retry:!1,notifyOnChangeProps:"tracked"}),{data:g,error:v}=m,{onError:y,onSuccess:b}=l;return r.useEffect((()=>{g&&(null===b||void 0===b||b(g))}),[b,g]),r.useEffect((()=>{v&&(null===y||void 0===y||y(v))}),[y,v]),m}function c(e){let{endpoint:t,cacheKeys:n=[],fetchProvider:s,dependencies:c=[],...u}=e;const l=Object(o.a)(),d=[t,...n||[]],p=s({webServices:l}),f=[l,...c].every(a.a),h=Object(i.useInfiniteQuery)(d,p,{...u,enabled:f,retry:1,notifyOnChangeProps:"tracked"}),{data:m,error:g}=h,{onError:v,onSuccess:y}=u;return r.useEffect((()=>{m&&(null===y||void 0===y||y(m))}),[y,m]),r.useEffect((()=>{g&&(null===v||void 0===v||v(g))}),[v,g]),h}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1480),i=n(870);function o(){const e=Object(r.a)(),t=null===e||void 0===e?void 0:e.webServices;return i.useMemo((()=>{if(!t)return;const e={};return t.forEach(((t,n)=>{"active"===t.status&&(e[n]=t.url)})),e}),[t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2248),i=n(2159);function o(){return Object(i.useSignal)(r.c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(999),i=n(878),o=n(1e3);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const a=Object(r.a)(Object(i.b)(),{givenName:e}),s=Object(r.a)(Object(i.b)(),{givenName:e,familyName:t});return n||s&&Object(o.a)(s)?null!==s&&void 0!==s?s:"":null!==a&&void 0!==a?a:""}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1227);const i="CloudOS.LocalizationFormatter.DecimalSymbol",o=["Utils.BytesToHumanizedFormat.Size.bytes","Utils.BytesToHumanizedFormat.Size.KB","Utils.BytesToHumanizedFormat.Size.MB","Utils.BytesToHumanizedFormat.Size.GB","Utils.BytesToHumanizedFormat.Size.TB","Utils.BytesToHumanizedFormat.Size.PB","Utils.BytesToHumanizedFormat.Size.EB","Utils.BytesToHumanizedFormat.Size.ZB","Utils.BytesToHumanizedFormat.Size.YB"],a=["Utils.BytesToHumanizedFormat.Size.bytes.Compact","Utils.BytesToHumanizedFormat.Size.KB.Compact","Utils.BytesToHumanizedFormat.Size.MB.Compact","Utils.BytesToHumanizedFormat.Size.GB.Compact","Utils.BytesToHumanizedFormat.Size.TB.Compact","Utils.BytesToHumanizedFormat.Size.PB.Compact","Utils.BytesToHumanizedFormat.Size.EB.Compact","Utils.BytesToHumanizedFormat.Size.ZB.Compact","Utils.BytesToHumanizedFormat.Size.YB.Compact"];function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||isNaN(e))return Object(r.a)(n?a[0]:o[0],{value:0});const s=Object(r.a)(i),c=Math.floor(Math.log(e)/Math.log(1024)),u=e/Math.pow(1024,c),l=`${parseFloat(u.toFixed(t))}`.replace(".",s),d=n?a[c]:o[c];return Object(r.a)(d,{value:l})}},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}),i(n(1484),t),i(n(1555),t),i(n(1558),t),i(n(1566),t),i(n(1563),t),i(n(1560),t),i(n(1567),t),i(n(1569),t)},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PlanPageUpgradePlanSection=void 0;const s=n(2139),c=a(n(1215)),u=o(n(870)),l=n(996),d=n(1512),p=a(n(1550)),f=a(n(1551)),h=a(n(1552)),m=n(997);n(1553);const g=n(1554);t.PlanPageUpgradePlanSection=function(e){const{userPlan:t,buttonTextData:n}=e,r=(0,g.useStorageQuota)(),[i,o]=u.useState(!1),[a]=(0,d.usePlanUpgradePane)({entryPoint:l.EntryPoint.PlanPage,refetchPageContent:e.refetchPageContent,continueOnDeviceEligibleDevicesList:e.continueOnDeviceEligibleDevicesList}),v=async()=>{i||(o(!0),await a(),o(!1))},y=n&&(n.userEligibleForOffer?(0,m.loc)("PlanPage.PlanUpgrade.RedeemICloudPlusOffer"):(0,m.loc)("PlanPage.PlanUpgrade.ButtonTextWithStorageAndPrice",{storage:n.planName,pricePerMonth:n.priceForDisplay})),b=null===r||void 0===r?void 0:r.quotaStatus["almost-full"],w=null===r||void 0===r?void 0:r.quotaStatus.overQuota,S=t===l.UserPlan.Standard,C=S?(0,m.loc)("PlanUpgrade.UpgradeCard.FreeUser.Title"):(0,m.loc)("PlanPage.PlanUpgrade.StorageFull.Title"),_=S?(0,m.loc)("PlanUpgrade.UpgradeCard.FreeUser.Body"):n&&(0,m.loc)("PlanPage.PlanUpgrade.StorageFull.Body",{nextTier:n.planName});return u.createElement(u.Fragment,null,u.createElement("section",{className:(0,c.default)("plan-page-upgrade-plan-section",{loading:i,"is-hidden":!y}),onClick:v},S||b||w?u.createElement(u.Fragment,null,S&&u.createElement("div",{className:"upgrade-card-header"},u.createElement(s.UIImage,{className:"","aria-hidden":!0,alt:"",src:p.default,srcSet:`${p.default}, ${f.default} 2x, ${h.default} 3x`})),u.createElement("div",{className:"upgrade-plan-links-container"},u.createElement("h3",null,C),u.createElement("p",null,_),u.createElement(s.UIButton,{className:(0,c.default)("upgrade-button",{loading:i}),"aria-haspopup":"dialog",onActivate:v,disabled:i},i&&u.createElement(s.UIActivityIndicator,{description:(0,m.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),y))):u.createElement("div",{className:"upgrade-plan-links-container"},u.createElement(s.UIButton,{className:(0,c.default)("upgrade-button",{loading:i}),"aria-haspopup":"dialog",onActivate:v,disabled:i},i&&u.createElement(s.UIActivityIndicator,{description:(0,m.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),(0,m.loc)("PlanPage.PlanUpgrade.ButtonText")))))}},function(e,t,n){"use strict";var r=n(2224);n.d(t,"d",(function(){return r.a})),n.d(t,"e",(function(){return r.b})),n.d(t,"f",(function(){return r.c}));var i=n(1217);n.d(t,"a",(function(){return i.a}));var o=n(2196);n.d(t,"b",(function(){return o.a})),n.d(t,"c",(function(){return o.b}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1222),o=n(2260);class a extends r.Component{constructor(){super(...arguments),this.routeInboundMessage=e=>{!function(e,t){for(const[n,r]of t)if(n(e))return r(e)}(e,[[s(i.e),e=>{let{payload:t}=e;return this.onLabelId(t)}],[s(i.d),()=>this.onActivationStart()],[s(i.c),()=>this.onActivationEnd()],[s(i.b),()=>this.onActivationComplete()],[s(i.a),()=>this.onActivationCancel()]])}}static get messageTransmitter(){return o.a.messageTransmitter}componentDidMount(){this.subscribe(this.props.id)}componentDidUpdate(e,t){const{id:n}=e,{id:r}=this.props;n!==r&&(this.unsubscribe(n),this.subscribe(r))}componentWillUnmount(){this.unsubscribe(this.props.id)}get messageTransmitter(){return a.messageTransmitter}subscribe(e){e&&this.messageTransmitter.registerComponent(e,this.routeInboundMessage)}unsubscribe(e){e&&this.messageTransmitter.unregisterComponent(e,this.routeInboundMessage)}onActivationStart(){}onActivationEnd(){}onActivationComplete(){}onActivationCancel(){}}function s(e){return function(t){return t instanceof e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1488),i=n(1490),o=n(1489);async function a(e,t,n){const{length:a}=t,s=[];for(let i=0;i<a;i++){const n=t[i];Object(r.a)(e.props,n)||s.push(n)}return new Promise(((r,a)=>{const c=t.map((e=>e.controlledKey));if(s.length>0){let a,u;e.setState(((e,r)=>{u=Object(o.a)(r,e,t),a=Object.assign({},u,n(u,r));const i=Object.assign({},e);return s.forEach((e=>{let{controlledKey:t}=e;i[t]=a[t]})),i}),(()=>{const e=Object(i.a)(u,a,c);r({state:a,changedKeys:e})}))}else{const{state:a,props:s}=e,u=Object(o.a)(s,a,t),l=Object.assign({},u,n(u,s)),d=Object(i.a)(u,l,c);r({state:l,changedKeys:d})}}))}function s(e,t){const n=t.onStateChange,{state:r,changedKeys:i}=e;n&&i.length>0&&n(r,i)}},function(e,t,n){"use strict";function r(e,t){const{controlledKey:n,uncontrolledKey:r}=t;if(void 0===e[n])return!1;if(void 0===e[r])return!0;throw new TypeError(`You provided conflicting props \`${n}\` and \`${r}\` to the same component. You may only provide one.`)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(1488);function i(e,t,n){const i={};return n.forEach((n=>{if(!Object(r.a)(e,n)){const{controlledKey:r,uncontrolledKey:o}=n,a=e[o];i[r]=void 0!==a?a:t[r]}})),i}function o(e,t,n){const i=Object.assign({},t);return n.forEach((t=>{if(Object(r.a)(e,t)){const{controlledKey:n}=t;i[n]=e[n]}})),i}},function(e,t,n){"use strict";function r(e,t,n){const r=[],{length:i}=n;for(let o=0;o<i;o++){const i=n[o];e[i]!==t[i]&&r.push(i)}return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return void 0!==e?e:t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return l}));var r=n(870),i=n(1215),o=n.n(i),a=n(1487),s=n(1223),c=n(1493);const u=r.createContext(null);function l(e){const{children:t,onStateChange:n,disabled:i,form:l,required:d,id:p,style:f,variant:h,className:m,tabIndex:g,name:v,tooltip:y}=e,[b,w]=r.useState(void 0),[S]=r.useState((()=>Object(s.a)())),C=null!=v?v:S,_=r.useRef(null),O=r.useCallback((e=>{var t;if(i||!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key))return;const n=document.activeElement;if(!n||"ui-radio-button"!==n.tagName.toLowerCase()||!(null===(t=_.current)||void 0===t?void 0:t.contains(n)))return;if(e.preventDefault(),!_.current)return;const r=Array.from(_.current.querySelectorAll("ui-radio-button")).filter((e=>!e.hasAttribute("aria-disabled")));if(0===r.length)return;const o=r.find((e=>e===n)),a=o?r.indexOf(o):-1,s=_.current&&Object(c.a)(_.current);let u;u="previous"==={ArrowDown:"next",ArrowUp:"previous",ArrowLeft:s?"next":"previous",ArrowRight:s?"previous":"next"}[e.key]?a<=0?r.length-1:a-1:a>=r.length-1?0:a+1;const l=r[u];if(l){l.focus();const e=l.querySelector('input[type="radio"]');e&&e.click()}}),[i]);return r.createElement(u.Provider,{value:{form:l,name:C,required:d,disabled:i,checkedRadioButton:b,hasOnStateChangeHandler:!!n,notifyChangeToUIRadioGroup:(t,n)=>{w((()=>(Object(a.b)({state:{value:n},changedKeys:["value"]},e),t)))},initialRadioButtonValue:w}},r.createElement("ui-radio-group",{ref:_,id:p,style:f,"aria-disabled":i,"aria-required":d,class:o()(m,h),tabindex:g,role:"radiogroup",title:y,onKeyDown:O},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"rtl"===getComputedStyle(e).getPropertyValue("direction")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1488);function i(e,t,n){t.forEach((t=>function(e,t,n,i){let o,a;var s;"boolean"===typeof n?(o=n,a=i):a=void 0!==(s=n)&&"function"===typeof s.warn?n:i;const c=a||window.console,u=Object(r.a)(e,t),{controlledKey:l,uncontrolledKey:d,callbackKeys:p}=t,f=p.some((t=>void 0!==e[t]));let h=`You provided a \`${l}\` prop to a component without an associated change handler. This will render a read-only component. If the component should be mutable use \`${d}\`. Otherwise, provide one of the handlers (\`${p.join(", ")}\`)`;void 0!==o&&(h+=", or flag the prop as read-only (see class docs)"),h+=".",!u||f||o||c.warn(h)}(e,t,e.disabled,n)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(870),i=n(1215),o=n.n(i),a=n(1491),s=(n(1496),n(1221)),c=n(1212),u=n(1340),l=n(1497);const d="contains-text";function p(e){const{variant:t="standard",className:n,id:i,ref:p,disabled:f,required:h,validate:m,onBlur:g,onChange:v,onStateChange:y,onSelect:b,onInput:w,ariaLabelledBy:S,defaultValue:C,value:_,defaultSelection:O,selection:E,invalid:I}=e,[A,T]=Object(l.a)(C||"",_),[P,R]=Object(l.a)(O||{selectionEnd:0,selectionStart:0},E),[k,D,M]=Object(l.a)(!1,I),N=r.useRef(null),x=r.useCallback((e=>{N.current=e,p&&("function"===typeof p?p(e):p.current=e)}),[p]),L=r.useCallback((()=>{N.current&&N.current.focus()}),[]),j=Object(s.a)(i,{onActivationComplete:()=>L()});if(void 0!==j&&void 0!==S&&j!==S)throw new Error("A text component (UITextField or UITextArea) was rendered with both an ariaLabelledBy prop and an id prop connected to a UILabel's htmlFor prop.");const U=void 0!==j?j:S,{selectionStart:F,selectionEnd:z}=P;r.useLayoutEffect((()=>{N.current&&null!==N.current.selectionStart&&(N.current.selectionStart===F&&N.current.selectionEnd===z||N.current.setSelectionRange(F,z))}),[F,z]);const B=r.useCallback((e=>{if(y){const t={value:A,selection:P,invalid:k},n={value:Object(a.a)(e.value,A),selection:Object(a.a)(e.selection,P),invalid:Object(a.a)(e.invalid,k)},r=[];for(const e in n){const i=e;n[i]!==t[i]&&r.push(i)}r.length>0&&y(n,r)}}),[y,A,P,k]),K=r.useCallback((e=>{const{value:t}=e.currentTarget;m&&N.current&&N.current.setCustomValidity("");const n={value:t,invalid:!1};A===n.value&&k===n.invalid||(T(n.value),D(n.invalid),B(n),w&&w(n.value))}),[m,A,k,T,D,B,w]),H=r.useCallback((e=>{const t=e.currentTarget.selectionStart,n=e.currentTarget.selectionEnd;if(null!==t&&null!==n&&(P.selectionStart!==t||P.selectionEnd!==n)){const e={selectionStart:t,selectionEnd:n};R(e),B({selection:e}),b&&b(e)}}),[P,R,B,b]),W=r.useCallback((e=>{M||N.current!==document.activeElement||k||(D(!0),B({invalid:!0}))}),[M,k,D,B]),q=[t,n,u.a,Object(c.c)()];A&&A.length>0&&q.push(d);const V=o()(q),$={class:o()(V,k?"invalid":void 0,h?"required":void 0,f?"disabled":void 0),ref:e=>{e&&(e.focus=e=>{N.current&&N.current.focus(e)})}};return{inputProps:{id:i,"aria-labelledby":U,"aria-invalid":k?"true":void 0,disabled:f,required:h,ref:x,value:A,onBlur:t=>{(t=>{M||function(e,t,n){let r;return r=null!=e.validate?!e.validate(t):!(0!==t.length||!e.required)||Object(a.a)(e.invalid,!n.checkValidity()),r}(e,A,t.target)&&(m&&t.target.setCustomValidity("This field is invalid"),D(!0),B({invalid:!0}))})(t),g&&g(t)},onInvalid:W,onInput:K,onSelect:H,onChange:v||(()=>{})},state:{value:A,selection:P,invalid:k},wrapperProps:$}}},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1491);const o=()=>{};function a(e,t,n){const[a,s]=r.useState(e),c=void 0!==t;return[Object(i.a)(t,a),c?n||o:s,c]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(870),i=n(1495),o=n(1499),a=(n(1496),n(1326));const s=Object.assign({name:""},Object(o.detect)()),c=r.forwardRef((function(e,t){const{children:n,inputType:o="text",leadingAccessory:c,accessoryGroupAriaLabel:u,variant:l,className:d,id:p,disabled:f,required:h,validate:m,onBlur:g,onChange:v,onStateChange:y,onSelect:b,onInput:w,defaultValue:S,value:C,defaultSelection:_,selection:O,invalid:E,ariaLabelledBy:I,placeholder:A,...T}=e,P=r.useRef(null),{inputProps:R,wrapperProps:k}=Object(i.a)({variant:l,className:d,id:p,disabled:f,required:h,validate:m,onBlur:g,onChange:v,onStateChange:y,onSelect:b,onInput:w,defaultValue:S,value:C,defaultSelection:_,selection:O,invalid:E,ariaLabelledBy:I,ref:Object(a.a)(t,P)}),D="ie"===s.name||"edge"===s.name;return r.createElement("ui-text-field",Object.assign({},k,{"aria-label":u,onClick:()=>{P.current&&P.current.focus()}}),D?r.createElement("span",{className:"ui-text-field-placeholder"},A):null,c,r.createElement("input",Object.assign({},T,R,{placeholder:A,type:o})),n)}))},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 o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t,n){this.name=e,this.version=t,this.os=n};t.BrowserInfo=i;var o=function(e){this.version=e,this.name="node",this.os=process.platform};t.NodeInfo=o;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};t.BotInfo=a;var s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([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",/Edg\/([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",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],c=[["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/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(e){var t=""!==e&&s.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1);if(!t)return null;var n=t[0],o=t[1];if("searchbot"===n)return new a;var c=o[1]&&o[1].split(/[._]/).slice(0,3);return c?c.length<3&&(c=r(c,function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-c.length))):c=[],new i(n,c.join("."),l(e))}function l(e){for(var t=0,n=c.length;t<n;t++){var r=c[t],i=r[0];if(r[1].test(e))return i}return null}function d(){return"undefined"!==typeof process&&process.version?new o(process.version.slice(1)):null}t.detect=function(e){return e?u(e):"undefined"!==typeof navigator?u(navigator.userAgent):d()},t.parseUserAgent=u,t.detectOS=l,t.getNodeVersion=d},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 o;if(void 0===t)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(o=new Error(t.replace(/%s/g,(function(){return r[a++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},i=c(n(1502));Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=c(n(1507));Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=c(n(1503));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(n(1505));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=function(e){o.enqueueTask(a.create(e))};var r=n(1503),i=n(1505);const o=new r.AsapQueue,a=new i.TaskFactory(o.registerPendingError)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1504);t.AsapQueue=class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=r.makeRequestCall(this.flush),this.requestErrorThrow=r.makeRequestCallFromTimer((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.makeRequestCallFromTimer=i,t.makeRequestCallFromMutationObserver=o,t.makeRequestCall=void 0;const n="undefined"!==typeof e?e:self,r=n.MutationObserver||n.WebKitMutationObserver;function i(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function o(e){let t=1;const n=new r(e),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}const a="function"===typeof r?o:i;t.makeRequestCall=a}).call(this,n(472))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1506);t.TaskFactory=class{create(e){const t=this.freeTasks,n=t.length?t.pop():new r.RawTask(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawTask=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(870),i=n(2221);const o={resize:"none"};function a(e){var t,n;const{onItemSelected:a,onItemSelectedSync:c,onItemHighlighted:u,onChange:l,onFocus:d,onBlur:p,onKeyDown:f,onClick:h,renderMenuItemsForText:m,shouldAutoHighlightFirstHighlightableItem:g=!0,_test_stateReducer:v,autocompleteType:y="Tokenized",onTextSelected:b,invalid:w,validateTextSelection:S,validateItemSelection:C}=e,[_,O]=r.useState(-1),[E,I]=r.useState(null!==w&&void 0!==w&&w),[A,T]=r.useReducer(v||s,{value:null!==(t=e.initialValue)&&void 0!==t?t:"",isOpen:!1}),P=r.useMemo((()=>void 0===e.value?A.value:e.value),[e.value,A.value]),R=r.useMemo((()=>m?m(P,e.existingMenuItemValues||[]):[]),[e.existingMenuItemValues,m,P]),k=r.useMemo((()=>void 0===e.isOpen?A.isOpen&&R.length>0:e.isOpen),[e.isOpen,A.isOpen,R]);let D=r.useRef(null);D=null!==(n=e.inputRef)&&void 0!==n?n:D;const M=r.useRef(null),N=r.useCallback((t=>{if("Tokenized"===y)T({type:"change_input",value:""}),a&&a(t);else{let n="";if("string"===typeof t)n=t;else{if(!e.valueForMenuItem)throw new Error("If using a Simple type, and menu items do notconsist of only strings, you must supply a valueForMenuItem handler.");n=e.valueForMenuItem(t)}let r=!0;C&&(r=C(t),I(!r)),r&&a&&a(t),T({type:"change_input",value:n}),O(-1)}T({type:"close_menu"})}),[a,T,y,e,C]),x=r.useCallback((e=>{var t;O(-1),l&&l(e),I(!1),T({type:"change_input",value:e.target.value}),null===(t=D.current)||void 0===t||t.focus()}),[O,l,T]),L=r.useCallback((e=>{T({type:"focus_input"})}),[T]),j=r.useCallback((e=>{const t=!!M.current&&M.current.contains(e.relatedTarget);T({type:"blur_input",isRelatedTargetMenu:t})}),[T]),U=r.useCallback((e=>{const t=()=>{var e;null===(e=M.current)||void 0===e||e.dispatchEvent(new KeyboardEvent("keydown",{key:n,bubbles:!0}))},{key:n}=e;switch(n){case"Escape":k?(O(-1),T({type:"close_menu"})):T({type:"keydown_input",key:n});break;case"Enter":{e.preventDefault();const n=e.target.value;if(b&&n.length){let e=!0;S&&(e=S(n),I(!e)),e&&b(n)}else if(!k){T({type:"open_menu"});break}t();break}case"ArrowUp":case"ArrowDown":if(e.preventDefault(),!k){T({type:"open_menu"});break}t()}}),[T,k,b,S]),F=r.useCallback((e=>{T({type:"open_menu"})}),[T]),z=r.useCallback((e=>-1!==e?`ui-menu-item-${e}`:void 0),[]),B=g?Object(i.h)(R):-1,K=-1===_?B:_,H=r.useMemo((()=>r.Children.map(R,((e,t)=>Object(i.j)(e)?r.createElement(i.e,Object.assign({},e.props,{id:z(t)})):e))),[R,z]),W=k&&void 0!==K?z(K):void 0,q=r.useCallback((e=>{L(e),d&&d(e),e.stopPropagation()}),[L,d]),V=r.useCallback((e=>{j(e),p&&p(e),e.stopPropagation()}),[j,p]),$=r.useCallback((e=>{U(e),f&&f(e)}),[U,f]),G=r.useCallback((e=>{F(e),h&&h(e)}),[F,h]),Z=r.useCallback(((e,t)=>{O(t),u&&u(e,t)}),[O,u]);return{inputProps:{value:P,ref:D,style:o,"aria-activedescendant":W,onChange:x,onFocus:q,onBlur:V,onKeyDown:$,onClick:G,invalid:E},menuProps:{isOpen:k,highlightedIndex:K,items:H,ref:M,onItemSelected:N,onItemSelectedSync:c,onItemHighlighted:Z},value:P,isOpen:k}}function s(e,t){switch(t.type){case"change_input":return{...e,value:t.value,isOpen:!0};case"focus_input":return{...e};case"close_menu":return{...e,isOpen:!1};case"open_menu":return{...e,isOpen:!0};case"blur_input":return{...e,isOpen:!!t.isRelatedTargetMenu&&e.isOpen};case"keydown_input":return"Escape"===t.key?{...e,value:"",isOpen:!1}:e}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(870),i=n(2142);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}var a=0,s=Object(r.memo)((function(e){var t,n,s=e.children,l=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]:u(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[c]||(o[c]=Object(i.b)(e,t,n,r)),o[c]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["children"])),d=(n=2,function(e){if(Array.isArray(e))return e}(t=l)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,n)||function(e,t){if(e){if("string"===typeof e)return o(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)?o(e,t):void 0}}(t,n)||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.")}()),p=d[0],f=d[1];return r.useEffect((function(){return f&&a++,function(){f&&0===--a&&(u()[c]=null)}}),[]),r.createElement(i.a.Provider,{value:p},s)}));s.displayName="DndProvider";var c=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function u(){return"undefined"!==typeof e?e:window}}).call(this,n(472))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1511),i=n.n(r);function o(e){return new Promise((t=>{const n=new FileReader;n.onload=async e=>{const r=n.result;if(!(r instanceof ArrayBuffer))throw new Error("readAsArrayBuffer did not return ArrayBuffer");{const e=(i.a.readFromBinaryFile(r)||{Orientation:1}).Orientation||1,n=function(e){let t="";const n=new Uint8Array(e),r=n.byteLength;for(let i=0;i<r;i++)t+=String.fromCharCode(n[i]);return"data:image/jpeg;base64,"+window.btoa(t)}(r);if(e>1){const r=new Image;r.src=n,await r.decode();const i=document.createElement("canvas"),o=i.getContext("2d"),a=7===e||8===e?270:3===e||4===e?180:5===e||6===e?90:0,s=r.naturalWidth,c=r.naturalHeight,u=a%180===0?s:c,l=a%180===0?c:s,d=2===e||4===e?-1:1,p=5===e||7===e?-1:1;if(i.width=u,i.height=l,o){for(let e=0;e<a;e+=90)o.translate(e%180?l:u,0),o.rotate(Math.PI/2);o.scale(d,p),o.translate((d-1)/2*s,(p-1)/2*c),o.drawImage(r,0,0)}t(i.toDataURL())}else t(n)}},n.readAsArrayBuffer(e)}))}},function(e,t,r){var i;(function(){var r=function(e){return e instanceof r?e:this instanceof r?void(this.EXIFwrapped=e):new r(e)};e.exports&&(t=e.exports=r),t.EXIF=r;var o=r.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},a=r.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},s=r.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},c=r.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},u=r.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function l(e){return!!e.exifdata}function d(e,t){function n(n){var i=p(n);e.exifdata=i||{};var o=function(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength,i=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n<r;){if(i(t,n)){var o=t.getUint8(n+7);return o%2!==0&&(o+=1),0===o&&(o=4),h(e,n+8+o,t.getUint16(n+6+o))}n++}}(n);if(e.iptcdata=o||{},r.isXmpEnabled){var a=function(e){if("DOMParser"in self){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength,i=new DOMParser;n<r-4;){if("http"==v(t,n,4)){var o=n-1,a=t.getUint16(n-2)-1,s=v(t,o,a),c=s.indexOf("xmpmeta>")+8,u=(s=s.substring(s.indexOf("<x:xmpmeta"),c)).indexOf("x:xmpmeta")+10;return s=s.slice(0,u)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+s.slice(u),w(i.parseFromString(s,"text/xml"))}n++}}}(n);e.xmpdata=a||{}}t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src))n(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0;a<r;a++)o[a]=n.charCodeAt(a);return i}(e.src));else if(/^blob\:/i.test(e.src))(o=new FileReader).onload=function(e){n(e.target.result)},function(e){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="blob",t.onload=function(e){var t;200!=this.status&&0!==this.status||(t=this.response,o.readAsArrayBuffer(t))},t.send()}(e.src);else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(i.response),i=null},i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var o;(o=new FileReader).onload=function(e){n(e.target.result)},o.readAsArrayBuffer(e)}}function p(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return y(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}var f={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function h(e,t,n){for(var r,i,o,a,s=new DataView(e),c={},u=t;u<t+n;)28===s.getUint8(u)&&2===s.getUint8(u+1)&&(a=s.getUint8(u+2))in f&&(o=s.getInt16(u+3),i=f[a],r=v(s,u+5,o),c.hasOwnProperty(i)?c[i]instanceof Array?c[i].push(r):c[i]=[c[i],r]:c[i]=r),u++;return c}function m(e,t,n,r,i){var o,a,s=e.getUint16(n,!i),c={};for(a=0;a<s;a++)o=n+12*a+2,c[r[e.getUint16(o,!i)]]=g(e,o,t,0,i);return c}function g(e,t,n,r,i){var o,a,s,c,u,l,d=e.getUint16(t+2,!i),p=e.getUint32(t+4,!i),f=e.getUint32(t+8,!i)+n;switch(d){case 1:case 7:if(1==p)return e.getUint8(t+8,!i);for(o=p>4?f:t+8,a=[],c=0;c<p;c++)a[c]=e.getUint8(o+c);return a;case 2:return v(e,o=p>4?f:t+8,p-1);case 3:if(1==p)return e.getUint16(t+8,!i);for(o=p>2?f:t+8,a=[],c=0;c<p;c++)a[c]=e.getUint16(o+2*c,!i);return a;case 4:if(1==p)return e.getUint32(t+8,!i);for(a=[],c=0;c<p;c++)a[c]=e.getUint32(f+4*c,!i);return a;case 5:if(1==p)return u=e.getUint32(f,!i),l=e.getUint32(f+4,!i),(s=new Number(u/l)).numerator=u,s.denominator=l,s;for(a=[],c=0;c<p;c++)u=e.getUint32(f+8*c,!i),l=e.getUint32(f+4+8*c,!i),a[c]=new Number(u/l),a[c].numerator=u,a[c].denominator=l;return a;case 9:if(1==p)return e.getInt32(t+8,!i);for(a=[],c=0;c<p;c++)a[c]=e.getInt32(f+4*c,!i);return a;case 10:if(1==p)return e.getInt32(f,!i)/e.getInt32(f+4,!i);for(a=[],c=0;c<p;c++)a[c]=e.getInt32(f+8*c,!i)/e.getInt32(f+4+8*c,!i);return a}}function v(e,t,r){var i="";for(n=t;n<t+r;n++)i+=String.fromCharCode(e.getUint8(n));return i}function y(e,t){if("Exif"!=v(e,t,4))return!1;var n,r,i,l,d,p=t+6;if(18761==e.getUint16(p))n=!1;else{if(19789!=e.getUint16(p))return!1;n=!0}if(42!=e.getUint16(p+2,!n))return!1;var f=e.getUint32(p+4,!n);if(f<8)return!1;if((r=m(e,p,p+f,a,n)).ExifIFDPointer)for(i in l=m(e,p,p+r.ExifIFDPointer,o,n)){switch(i){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":l[i]=u[i][l[i]];break;case"ExifVersion":case"FlashpixVersion":l[i]=String.fromCharCode(l[i][0],l[i][1],l[i][2],l[i][3]);break;case"ComponentsConfiguration":l[i]=u.Components[l[i][0]]+u.Components[l[i][1]]+u.Components[l[i][2]]+u.Components[l[i][3]]}r[i]=l[i]}if(r.GPSInfoIFDPointer)for(i in d=m(e,p,p+r.GPSInfoIFDPointer,s,n))"GPSVersionID"===i&&(d[i]=d[i][0]+"."+d[i][1]+"."+d[i][2]+"."+d[i][3]),r[i]=d[i];return r.thumbnail=function(e,t,n,r){var i=function(e,t,n){var r=e.getUint16(t,!n);return e.getUint32(t+2+12*r,!n)}(e,t+n,r);if(!i)return{};if(i>e.byteLength)return{};var o=m(e,t,t+i,c,r);if(o.Compression)switch(o.Compression){case 6:if(o.JpegIFOffset&&o.JpegIFByteCount){var a=t+o.JpegIFOffset,s=o.JpegIFByteCount;o.blob=new Blob([new Uint8Array(e.buffer,a,s)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",o.Compression)}else 2==o.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return o}(e,p,f,n),r}function b(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var o=e.childNodes.item(i),a=o.nodeName;if(null==t[a])t[a]=b(o);else{if(null==t[a].push){var s=t[a];t[a]=[],t[a].push(s)}t[a].push(b(o))}}return t}function w(e){try{var t={};if(e.children.length>0)for(var n=0;n<e.children.length;n++){var r=e.children.item(n),i=r.attributes;for(var o in i){var a=i[o],s=a.nodeName,c=a.nodeValue;void 0!==s&&(t[s]=c)}var u=r.nodeName;if("undefined"==typeof t[u])t[u]=b(r);else{if("undefined"==typeof t[u].push){var l=t[u];t[u]=[],t[u].push(l)}t[u].push(b(r))}}else t=e.textContent;return t}catch(d){console.log(d.message)}}r.enableXmp=function(){r.isXmpEnabled=!0},r.disableXmp=function(){r.isXmpEnabled=!1},r.getData=function(e,t){return!((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete)&&(l(e)?t&&t.call(e):d(e,t),!0)},r.getTag=function(e,t){if(l(e))return e.exifdata[t]},r.getIptcTag=function(e,t){if(l(e))return e.iptcdata[t]},r.getAllTags=function(e){if(!l(e))return{};var t,n=e.exifdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},r.getAllIptcTags=function(e){if(!l(e))return{};var t,n=e.iptcdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},r.pretty=function(e){if(!l(e))return"";var t,n=e.exifdata,r="";for(t in n)n.hasOwnProperty(t)&&("object"==typeof n[t]?n[t]instanceof Number?r+=t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":r+=t+" : ["+n[t].length+" values]\r\n":r+=t+" : "+n[t]+"\r\n");return r},r.readFromBinaryFile=function(e){return p(e)},void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i)}).call(this)},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.usePlanUpgradePane=void 0;const s=o(n(870)),c=a(n(1215)),u=n(1513),l=n(2139),d=n(1549),p=n(995),f=n(997);t.usePlanUpgradePane=function(e){let{entryPoint:t,refetchPageContent:n,continueOnDeviceEligibleDevicesList:r,displayOptions:i,className:o,unmountWithPresenter:a}=e;const h=s.useRef(!1),[m,g]=s.useState(null),v=s.createElement(s.Fragment,null,m&&s.createElement(u.PlanUpgradePane,{continueOnDeviceEligibleDevicesList:r,upsellScreenData:m,hideUpgradePane:()=>{h.current=!0,C()},refetchPageContent:n,entryPoint:t,displayOptions:i})),y={includeCloseButton:!0,closeButtonProps:{ariaLabel:(0,f.loc)("VoiceOver.Subscription.PlanUpgradeyModal.CloseButtonLabel")},ariaLabelledBy:"plan-upgrade-pane-title-id",className:(0,c.default)("plan-upgrade-pane",o),animates:l.PaneAnimates.IN,initialFocus:"[type=radio]",onClose:()=>{const e=null===m||void 0===m?void 0:m.actions.find((e=>"dismiss"===e.action));!1===h.current&&((0,d.getSubscriptionController)().sendScreenInteration(t,null===e||void 0===e?void 0:e.id),(0,d.getSubscriptionController)().continuePurchaseOnDevice(p.DISMISS_NOTIFICATION_PAYLOAD,t),(0,d.getSubscriptionController)().recordUpsellFlowStat(`${t}_upsell_close_upgrade_screen`))},unmountWithPresenter:a},b=s.useRef(null),w=s.useRef(null),[S,C]=(0,l.useResponsivePane)((0,l.usePopup)(s.createElement("div",{ref:b,className:"content"},v),y),b,(0,l.useCard)(s.createElement("div",{ref:w,className:"content"},v),y),w),[_]=(0,l.useShowAlert)();return[async()=>{(0,d.getSubscriptionController)().recordUpsellFlowStat(`${t}_upsell_launch_upgrade_screen`);const e=await(0,d.getSubscriptionController)().fetchUpsellScreenData(t);if(!e)return _({buttons:[(0,f.loc)("PlanUpgrade.Error.ActionButton.Done")],title:(0,f.loc)("PlanUpgrade.Error.Title"),description:(0,f.loc)("PlanUpgrade.Error.Description")}),void(0,d.getSubscriptionController)().recordUpsellFlowStat(`${t}_upsell_launch_upgrade_screen_failed`);g(e),(0,d.getSubscriptionController)().recordUpsellFlowStat(`${t}_upsell_launch_upgrade_screen_succeeded`),S()},C]}},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PlanUpgradePane=t.QUOTA_PUSH_TOPIC=void 0;const s=a(n(1514)),c=a(n(1515)),u=a(n(1516)),l=a(n(1517)),d=n(2139),p=n(1518),f=a(n(1215)),h=o(n(870)),m=n(997);n(1528);const g=a(n(1529)),v=n(1548),y=n(2160),b=n(1549),w=n(2211);function S(e){return h.createElement(d.UIImage,{src:null!==e&&void 0!==e?e:u.default,ariaHidden:!0,alt:""})}function C(e){var t,n;let{postPurchaseScreenData:r,isLocaleInTallLanguage:i,hideUpgradePane:o,displayOptions:a}=e;const s=(0,y.useHorizontalSizeClass)();return h.createElement(h.Fragment,null,h.createElement("div",{className:"body"},h.createElement("div",{className:"plan-upgrade-pane post-purchase-pane"},r.header&&h.createElement("div",{className:"heading"},h.createElement("div",{className:"title post-purchase-title"},h.createElement("div",{className:"title-image"},S(a.headingIcon)),h.createElement("h2",{className:(0,f.default)("title-text",i?"tall":null)},r.header.title))),h.createElement("div",{className:"plan-feature-list-container"},h.createElement("ul",{className:"feature-list"},null===(t=r.features)||void 0===t?void 0:t.map((e=>h.createElement("li",{key:e.title,className:"feature-item"},h.createElement(d.UIImage,{src:e.iconURL,alt:"",ariaHidden:!0,className:"feature-icon"}),h.createElement("div",{className:"option-cell"},h.createElement("div",{className:"option-cell-left post-purchase-option-cell-left"},h.createElement("div",{className:"option-title"},e.title),h.createElement("div",{className:"option-subtitle"},e.body)))))))))),h.createElement("div",{className:"footer post-purchase-footer"},h.createElement(d.UIOverlayActions,{mode:s},h.createElement(d.UIButton,{variant:"block primary",onActivate:o,className:"plan-upgrade-button"},null!==(n=r.actions)&&void 0!==n&&n.length?r.actions[0].title:(0,m.loc)("PostPurchase.Footer.ActionButton.Done")))))}t.QUOTA_PUSH_TOPIC="a355e2e2bffdec52e0e69b6fa263c49bbddf20b0",t.PlanUpgradePane=function(e){var n,r,i,o;const{upsellScreenData:a,hideUpgradePane:u,refetchPageContent:_,entryPoint:O,displayOptions:E={}}=e,{headingIcon:I,headingTitle:A,headingDescription:T}=E,P=(0,y.useHorizontalSizeClass)(),R="compact"===P,k=(0,w.isTallLanguage)((0,w.getLocale)()),[D,M]=h.useState((()=>a.purchaseOptions.find((e=>e.selected)))),N=a.actions.find((e=>"buy"===e.action)),x=e.continueOnDeviceEligibleDevicesList,L=x.length,j=(()=>{switch(L){case 0:return"";case 1:return(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.OneDevice",{device1:x[0]});case 2:return(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.TwoDevices",{device1:x[0],device2:x[1]});default:return(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.MoreThanTwo",{device1:x[0],restCount:L-2})}})(),[U,F]=h.useState(!1),z=h.useRef(null),B=h.useRef(null),K=h.useRef(null),[H,W]=h.useState(!1),[q,V]=h.useState(!1),[$,G]=h.useState(void 0),Z=h.useRef(void 0);h.useEffect((()=>()=>{var e;null===(e=Z.current)||void 0===e||e.call(Z)}),[]);const[Q]=(0,d.useShowAlert)();return h.createElement(h.Fragment,null,$?h.createElement(C,{postPurchaseScreenData:$,isLocaleInTallLanguage:k,hideUpgradePane:u,displayOptions:E}):h.createElement(h.Fragment,null,h.createElement("div",{className:"body"},h.createElement("div",{className:"plan-upgrade-pane",ref:z,style:z.current&&!R?{height:z.current.offsetHeight}:void 0},h.createElement("div",{className:(0,f.default)("heading",H?"is-hidden":null),ref:K,"aria-hidden":H},h.createElement("div",{className:"title"},h.createElement("div",{className:"title-image"},S(I)),h.createElement("h2",{className:(0,f.default)("title-text",k?"tall":null)},null!==A&&void 0!==A?A:a.header.title)),h.createElement("span",{className:(0,f.default)("subtitle",k?"tall":null)},null!==T&&void 0!==T?T:a.header.message)),h.createElement(h.Fragment,null,h.createElement("div",{className:(0,f.default)("plan-upgrade-confirmation-pane",H?null:"is-hidden"),ref:B,"aria-hidden":!H},h.createElement(p.MeCardPhoto,{size:112}),h.createElement("div",{className:"phone-icon-background"}),h.createElement(c.default,{layoutMode:"glyphBox",className:"phone-icon",desiredFontSize:20}),h.createElement("h2",null,(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.Title")),h.createElement("p",{className:"confirmation-description"},h.createElement(y.InterpolatedString,{interpolations:{"#{deviceList}":h.createElement("span",{className:"device-list"},j)}},(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.Description"))))),h.createElement("div",{className:"plan-upgrade-options-container",style:H?{position:"absolute",top:null!==(n=B.current)&&void 0!==n&&n.clientHeight?B.current.clientHeight:"50%"}:{top:null!==(r=K.current)&&void 0!==r&&r.clientHeight?K.current.clientHeight:"0"}},h.createElement("div",{role:"radiogroup",className:"upgrade-options"},a.purchaseOptions.map(((e,t)=>h.createElement("label",{className:(0,f.default)("upgrade-option",H&&e.planName!==(null===D||void 0===D?void 0:D.planName)?"is-hidden":null),key:e.planName,htmlFor:`upgrade-option-${t}`,"aria-checked":e.planName===(null===D||void 0===D?void 0:D.planName),"aria-hidden":H&&e.planName!==(null===D||void 0===D?void 0:D.planName)},h.createElement("input",{id:`upgrade-option-${t}`,name:"option",className:"upgrade-option-radio hidden",type:"radio",value:e.planName,onChange:e=>{H||M(a.purchaseOptions.find((t=>t.planName===e.currentTarget.value)))},checked:e.planName===(null===D||void 0===D?void 0:D.planName)}),h.createElement("div",{className:(0,f.default)("upgrade-option-content",H&&e.planName!==(null===D||void 0===D?void 0:D.planName)?"is-hidden":null)},e.planName===(null===D||void 0===D?void 0:D.planName)?h.createElement(s.default,{layoutMode:"glyphBox",className:(0,f.default)("radio-icon-check",H?"is-hidden":null),desiredFontSize:12}):h.createElement(l.default,{layoutMode:"glyphBox",className:"radio-icon-uncheck",desiredFontSize:12}),h.createElement("div",{className:"option-cell"},h.createElement("div",{className:"option-cell-left"},h.createElement("div",{className:"option-title"},e.title),R&&h.createElement("div",{className:"option-price"},e.subtitle),h.createElement("div",{className:"option-subtitle"},e.details)),!R&&h.createElement("div",{className:"option-cell-right"},e.subtitle))))))),!R&&h.createElement("div",{className:(0,f.default)("option-detail",k?"tall":null,H?"is-hidden":null)},h.createElement(y.InterpolatedString,{interpolations:{"#{planRenewalInfo}":(0,g.default)(null!==(i=null===D||void 0===D?void 0:D.footer)&&void 0!==i?i:"")}},(0,m.loc)("PlanUpgrade.Footer.Description"))),H&&h.createElement("div",{className:"resend-notification"},h.createElement(y.InterpolatedString,{interpolations:{"#{resend}":h.createElement("button",{className:(0,f.default)("resend-button",U?"loading":null),onClick:async()=>{U||D&&(F(!0),(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_resend_continue_on_device`),(await(0,b.getSubscriptionController)().continuePurchaseOnDevice(D.planName,O)).ok?(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_resend_continue_on_device_succeeded`):(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_resend_continue_on_device_failed`),F(!1))},"aria-disabled":U},(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.Resend"))}},(0,m.loc)("PlanUpgrade.ContinueOnDevice.SuccessDialog.DidNotGetNotification.Description")))))),h.createElement("div",{className:"footer"},R&&!H&&h.createElement("div",{className:(0,f.default)("notification-description",k?"tall":null,H?"is-hidden":null)},h.createElement(y.InterpolatedString,{interpolations:{"#{planRenewalInfo}":(0,g.default)(null!==(o=null===D||void 0===D?void 0:D.footer)&&void 0!==o?o:"")}},(0,m.loc)("PlanUpgrade.Footer.Description"))),!H&&h.createElement(d.UIOverlayActions,{mode:P},h.createElement(d.UIButton,{variant:q?"block secondary":"block primary",onActivate:async()=>{if(!q&&D){if(V(!0),(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_continue_on_device`),(await(0,b.getSubscriptionController)().continuePurchaseOnDevice(D.planName,O)).ok){if(W(!0),Z.current)return;Z.current=(0,v.subscribeToPushNotifications)((async e=>{var n,r;e.data.topic===t.QUOTA_PUSH_TOPIC&&["dismiss","teardown"].includes(null===(n=e.data.payload)||void 0===n?void 0:n.event)&&(await(async()=>{(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_launch_postpurchase_screen`);const e=await(0,b.getSubscriptionController)().fetchPostPurchaseScreenData(O);e.features?(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_launch_postpurchase_screen_succeeded`):(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_launch_postpurchase_screen_failed`),G(e)})(),_(),null===(r=Z.current)||void 0===r||r.call(Z),Z.current=void 0)})),(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_continue_on_device_succeeded`)}else Q({buttons:[(0,m.loc)("PlanUpgrade.Error.ActionButton.Done")],title:(0,m.loc)("PlanUpgrade.Error.Title"),description:(0,m.loc)("PlanUpgrade.Error.Description")}),(0,b.getSubscriptionController)().recordUpsellFlowStat(`${O}_upsell_continue_on_device_failed`);V(!1),N&&(0,b.getSubscriptionController)().sendScreenInteration(O,`${null===N||void 0===N?void 0:N.id}_Web`)}},className:"plan-upgrade-button"},q&&h.createElement(d.UIActivityIndicator,{description:(0,m.loc)("PlanUpgrade.Footer.ActionButton.SendingNotification.Description"),size:14}),q?(0,m.loc)("PlanUpgrade.Footer.ActionButton.SendingNotification"):(null===N||void 0===N?void 0:N.title)||(0,m.loc)("PlanUpgrade.Footer.ActionButton.UpgradePlan"))))))}},function(e,t,n){"use strict";n.r(t);var r=n(870),i=n(1260);t.default=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"checkmark.circle.fill",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM53.0762-11.377C51.416-11.377 50.0488-12.0605 48.7793-13.7695L36.5234-28.8086C35.791-29.7852 35.3516-30.8594 35.3516-31.9824C35.3516-34.1797 37.0605-35.9863 39.2578-35.9863C40.6738-35.9863 41.748-35.5469 42.9688-33.9355L52.8809-21.1426L73.7305-54.6387C74.6582-56.1035 75.9277-56.8848 77.1973-56.8848C79.3457-56.8848 81.3477-55.4199 81.3477-53.125C81.3477-52.0508 80.7129-50.9277 80.127-49.9023L57.1777-13.7695C56.1523-12.1582 54.7363-11.377 53.0762-11.377Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},function(e,t,n){"use strict";n.r(t);var r=n(870),i=n(1260);t.default=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"iphone.gen3",svgPath:"M31.9669 16.3865L68.1353 16.3865C76.0987 16.3865 81.4625 11.3332 81.4625 3.72152L81.4625-74.284C81.4625-81.8958 76.0987-86.9489 68.1353-86.9489L31.9669-86.9489C23.9929-86.9489 18.6914-81.8958 18.6914-74.284L18.6914 3.72152C18.6914 11.3332 23.9929 16.3865 31.9669 16.3865ZM32.9712 8.54355C28.8828 8.54355 26.5449 6.36088 26.5449 2.42769L26.5449-72.9901C26.5449-76.9234 28.8828-79.0955 32.9712-79.0955L67.1309-79.0955C71.2711-79.0955 73.5573-76.9234 73.5573-72.9901L73.5573 2.42769C73.5573 6.36088 71.2711 8.54355 67.1309 8.54355ZM39.7469 4.96254L60.4587 4.96254C61.7546 4.96254 62.7293 4.03952 62.7293 2.68137C62.7293 1.32322 61.7546 0.410754 60.4587 0.410754L39.7469 0.410754C38.3888 0.410754 37.4763 1.32322 37.4763 2.68137C37.4763 4.03952 38.3888 4.96254 39.7469 4.96254ZM44.16-68.7458L55.9939-68.7458C57.8811-68.7458 59.4051-70.2698 59.4051-72.2193C59.4051-74.1066 57.8811-75.6305 55.9939-75.6305L44.16-75.6305C42.221-75.6305 40.697-74.1066 40.697-72.2193C40.697-70.2698 42.221-68.7458 44.16-68.7458Z",layoutBox:{viewBox:"0 0 113.683837890625 122.636962890625",width:113.683837890625,height:122.636962890625,translateX:6.766887207031232,translateY:96.5484619140625,baseline:96.5484619140625,capline:26.0885009765625},glyphBox:{viewBox:"0 0 62.7750244140625 103.437744140625",width:62.7750244140625,height:103.437744140625,translateX:-18.687519531250018,translateY:86.9488525390625,baseline:86.9488525390625,capline:16.4888916015625}}})}},function(e,t,n){"use strict";n.r(t),t.default="../e06663edf36bb000d8a871df20616abb.png"},function(e,t,n){"use strict";n.r(t);var r=n(870),i=n(1260);t.default=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Monogram=t.useMeCardPhoto=t.MeCardPhoto=t.ContactPhoto=void 0;var r=n(1519);Object.defineProperty(t,"ContactPhoto",{enumerable:!0,get:function(){return r.ContactPhoto}});var i=n(1526);Object.defineProperty(t,"MeCardPhoto",{enumerable:!0,get:function(){return i.MeCardPhoto}});var o=n(1527);Object.defineProperty(t,"useMeCardPhoto",{enumerable:!0,get:function(){return o.useMeCardPhoto}});var a=n(1521);Object.defineProperty(t,"Monogram",{enumerable:!0,get:function(){return a.Monogram}})},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContactPhoto=void 0,n(1520);const s=a(n(1215)),c=o(n(870)),u=n(2159),l=n(2139),d=n(1521),p=n(1524);function f(e){let{alt:t,"aria-hidden":n,name:r,photo:i,size:o,initialsOverride:a}=e;const{rectSignal:f,cached:h,cancel:g,didFailSignal:v}=(0,c.useMemo)((()=>({...m(i.url,i.crop),didFailSignal:(0,u.signal)(!1)})),[i]);(0,c.useEffect)((()=>g),[g]);const y=(0,u.useSignal)(f),b=(0,u.useSignal)(v),[,w]=(0,d.useInitialsAndFallbackName)(r),S=(0,p.useLoc)("VoiceOver.UnnamedContact");t=r&&w||t||S;const C=n&&"false"!==n;return c.default.createElement(c.default.Fragment,null,(!h||b)&&c.default.createElement(d.Monogram,{name:r,size:o,initialsOverride:a,"aria-hidden":C||!b}),!b&&c.default.createElement(l.UIImage,{"aria-hidden":C,key:`${o}:${i.url}`,className:(0,s.default)({"fade-in":!h,"no-crop":!i.crop}),style:{width:o,height:o},src:i.url,crop:y,onLoadFailure:()=>{v.value=!0},alt:t}))}t.ContactPhoto=function(e){let{alt:t,className:n,photo:r,name:i,size:o,initialsOverride:a,...u}=e;const l={alt:t,name:i,size:o,initialsOverride:a,...u};return c.default.createElement("div",{...u,className:(0,s.default)("ContactPhoto",n),style:{width:o,height:o}},r?c.default.createElement(f,{...{photo:r,...l}}):c.default.createElement(d.Monogram,{...l}))};const h=new Map;function m(e,t){if(h.has(e))return{rectSignal:(0,u.signal)(g(t,h.get(e))),cached:!0,cancel(){}};const n=(0,u.signal)(void 0),r=new Image;return r.onload=function(){const{width:r,height:i}=this;h.set(e,{width:r,height:i}),n.value=g(t,{width:r,height:i})},r.src=e,{rectSignal:n,cached:!1,cancel(){r.onload=null}}}function g(e,t){if(void 0===e)return;let n=e.x,r=t.height-e.y-e.height;const i=Math.min(e.width,e.height),o=i,a=i;return e.width>e.height?n+=(e.width-e.height)/2:e.height>e.width&&(r+=(e.height-e.width)/2),{top:r,left:n,width:o,height:a}}},function(e,t,n){"use strict";n.r(t)},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Silhouette=t.Monogram=t.useInitialsAndFallbackName=void 0,n(1522);const s=o(n(870)),c=n(2211),u=n(2139),l=n(1523),d=a(n(1215)),p=n(1524);t.useInitialsAndFallbackName=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=(0,c.useLocale)(),n=s.useMemo((()=>(0,c.getFullName)(e,t)),[e,t]);return[s.useMemo((()=>(0,c.getInitials)(e,t)),[e,t]),n]},t.Monogram=function(e){let{alt:n,className:r,name:i,size:o,initialsOverride:a,...l}=e;const[f,h]=(0,t.useInitialsAndFallbackName)(i),m=a||f,g=(0,p.useLoc)("VoiceOver.UnnamedContact");if(n=i&&h||n||g||m,!m)return s.createElement(t.Silhouette,{...{alt:n,className:r,size:o,...l}});const v=(0,c.stringIsCJK)(m)&&"cjk-initials",y=l["aria-hidden"],b=y&&"false"!==y?null:s.createElement(u.UIScreenReaderOnlyContent,null,n);return s.createElement("div",{...l,style:{width:`${o}px`,height:`${o}px`},className:(0,d.default)("monogram-container",v,r)},s.createElement("div",{"aria-hidden":"true",className:"monogram"},s.createElement("div",{className:"monogram-text"},s.createElement("svg",{viewBox:"0 0 28 20"},s.createElement("text",{x:"50%",y:"75%",textAnchor:"middle"},m)))),b)},t.Silhouette=e=>{let{size:t,alt:n,className:r,...i}=e;return s.createElement(l.PersonCropCircle,{className:(0,d.default)("monogram-silhouette",r),"aria-label":n,style:{width:t,height:t},...i})}},function(e,t,n){"use strict";n.r(t)},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PersonCropCircle=void 0;const s=o(n(870)),c=a(n(1215));t.PersonCropCircle=e=>{let{className:t,style:n,...r}=e;return s.createElement("svg",{className:(0,c.default)("person-crop-circle-fill",t),xmlns:"http://www.w3.org/2000/svg",viewBox:"8.723 -5.034 99.598 99.547",style:{borderRadius:"50%",fill:"white",...n},...r},s.createElement("path",{d:"M58.496 87.146c-11.213 0-22.491-4.646-30.008-12.59 5.265-8.3 16.756-13.194 30.008-13.194 13.109 0 24.692 4.843 30.009 13.194-7.517 7.943-18.795 12.59-30.009 12.59Zm0-34.05c-9.396-.104-16.759-7.923-16.759-18.421-.062-9.875 7.394-18.048 16.76-18.048 9.364 0 16.757 8.173 16.757 18.048.001 10.498-7.36 18.524-16.758 18.42Z"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoc=void 0,n(1525);const r=n(2211);t.useLoc=(0,r.makeUseLoc)()},function(e,t,n){"use strict";n.r(t);var r=n(878);Object(r.a)(Object(r.b)(),{"VoiceOver.UnnamedContact":"Unnamed contact","MeCardPhoto.AltText":"Your profile photo"})},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MeCardPhoto=void 0;const a=o(n(870)),s=n(1524),c=n(1527),u=n(1519);t.MeCardPhoto=function(e){const t=(0,c.useMeCardPhoto)(),n=(0,s.useLoc)("MeCardPhoto.AltText");return a.createElement(u.ContactPhoto,{...e,alt:e.alt||n,photo:t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMeCardPhoto=void 0;const r=n(870),i=n(880),o=n(988);let a;function s(){return null!==a&&void 0!==a?a:a=new o.MeCardController}function c(e){return s().addEventListener("change",e),()=>{s().removeEventListener("change",e)}}function u(){return s().photo}t.useMeCardPhoto=function(){const e=(0,i.useSyncExternalStore)(c,u);return(0,r.useDebugValue)(e),e}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t),n.d(t,"domToReact",(function(){return o})),n.d(t,"htmlToDOM",(function(){return a})),n.d(t,"attributesToProps",(function(){return s})),n.d(t,"Element",(function(){return c}));var r=n(1530),i=n.n(r),o=i.a.domToReact,a=i.a.htmlToDOM,s=i.a.attributesToProps,c=i.a.Element;t.default=i.a},function(e,t,n){var r=n(1531),i=n(1532),o=n(1540);o="function"===typeof o.default?o.default:o;var a={lowerCaseAttributeNames:!1};function s(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(o(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=r,s.htmlToDOM=o,s.attributesToProps=i,s.Element=n(1547).Element,e.exports=s,e.exports.default=s},function(e,t,n){var r=n(870),i=n(1532),o=n(1535),a=o.setStyleProp,s=o.canTextBeChildOfNode;function c(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,u,l,d,p,f=(n=n||{}).library||r,h=f.cloneElement,m=f.createElement,g=f.isValidElement,v=[],y="function"===typeof n.replace,b=n.trim,w=0,S=t.length;w<S;w++)if(o=t[w],y&&g(l=n.replace(o)))S>1&&(l=h(l,{key:l.key||w})),v.push(l);else if("text"!==o.type){switch(d=o.attribs,c(o)?a(d.style,d):d&&(d=i(d)),p=null,o.type){case"script":case"style":o.children[0]&&(d.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?d.defaultValue=o.children[0].data:o.children&&o.children.length&&(p=e(o.children,n));break;default:continue}S>1&&(d.key=w),v.push(m(o.name,d,p))}else{if((u=!o.data.trim().length)&&o.parent&&!s(o.parent))continue;if(b&&u)continue;v.push(o.data)}return 1===v.length?v[0]:v}},function(e,t,n){var r=n(1533),i=n(1535);function o(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,a,s,c,u={},l=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(a=e[t],r.isCustomAttribute(t))u[t]=a;else if(s=o(n=t.toLowerCase()))switch(c=r.getPropertyInfo(s),"checked"!==s&&"value"!==s||l||(s=o("default"+n)),u[s]=a,c&&c.type){case r.BOOLEAN:u[s]=!0;break;case r.OVERLOADED_BOOLEAN:""===a&&(u[s]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(u[t]=a);return i.setStyleProp(e.style,u),u}},function(e,t,n){"use strict";function r(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 i(e,t,n,r,i,o,a){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=o,this.removeEmptyString=a}Object.defineProperty(t,"__esModule",{value:!0});var o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){o[e]=new i(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t,n,a=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"===typeof e)return r(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)?r(e,t):void 0}}(t,n)||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.")}()),s=a[0],c=a[1];o[s]=new i(s,1,!1,c,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){o[e]=new i(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){o[e]=new i(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"].forEach((function(e){o[e]=new i(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){o[e]=new i(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){o[e]=new i(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){o[e]=new i(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){o[e]=new i(e,5,!1,e.toLowerCase(),null,!1,!1)}));var a=/[\-\:]([a-z])/g,s=function(e){return e[1].toUpperCase()};["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"].forEach((function(e){var t=e.replace(a,s);o[t]=new i(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(a,s);o[t]=new i(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(a,s);o[t]=new i(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){o[e]=new i(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){o[e]=new i(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=n(1534),u=c.CAMELCASE,l=c.SAME,d=c.possibleStandardNames,p=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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.keys(d).reduce((function(e,t){var n=d[t];return n===l?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=p,t.possibleStandardNames=f},function(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},function(e,t,n){var r=n(870),i=n(1536).default,o={reactCompat:!0},a=r.version.split(".")[0]>=16,s=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!==typeof e)throw new TypeError("First argument must be an object");var n,r,i="function"===typeof t,o={},a={};for(n in e)r=e[n],i&&(o=t(n,r))&&2===o.length?a[o[0]]=o[1]:"string"===typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"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}},setStyleProp:function(e,t){if(null!==e&&void 0!==e)try{t.style=i(e,o)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!s.has(e.name)},elementsWithNoTextChildren:s}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(1537)),o=n(1539);t.default=function(e,t){var n={};return e&&"string"===typeof e?(i.default(e,(function(e,r){e&&r&&(n[o.camelCase(e,t)]=r)})),n):n}},function(e,t,n){var r=n(1538);e.exports=function(e,t){var n,i=null;if(!e||"string"!==typeof e)return i;for(var o,a,s=r(e),c="function"===typeof t,u=0,l=s.length;u<l;u++)o=(n=s[u]).property,a=n.value,c?t(o,a,n):a&&(i||(i={}),i[o]=a);return i}},function(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,l="";function d(e){return e?e.replace(u,l):l}e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var u=1,p=1;function f(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:u,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:u,column:p},this.source=t.source}m.prototype.content=e;var g=[];function v(n){var r=new Error(t.source+":"+u+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=u,r.column=p,r.source=e,!t.silent)throw r;g.push(r)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(i)}function w(e){var t;for(e=e||[];t=S();)!1!==t&&e.push(t);return e}function S(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;l!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,l===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function C(){var e=h(),t=y(o);if(t){if(S(),!y(a))return v("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,l)),value:r?d(r[0].replace(n,l)):l});return y(c),i}}return b(),function(){var e,t=[];for(w(t);e=C();)!1!==e&&(t.push(e),w(t));return t}()}},function(e,t,n){"use strict";t.__esModule=!0,t.camelCase=void 0;var r=/^--[a-zA-Z0-9-]+$/,i=/-([a-z])/g,o=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||r.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(i,s))}},function(e,t,n){"use strict";n.r(t);var r=n(1541),i=n.n(r);t.default=i.a},function(e,t,n){var r=n(1542),i=n(1543).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},function(e,t,n){var r="html",i="head",o="body",a=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,c=/<body.*>/i,u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"===typeof window.DOMParser){var d=new window.DOMParser;u=l=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),d.parseFromString(e,"text/html")}}if(document.implementation){var p=n(1543).isIE,f=document.implementation.createHTMLDocument(p()?"html-dom-parser":void 0);u=function(e,t){return t?(f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f):(f.documentElement.innerHTML=e,f)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,n,d,p,f=e.match(a);switch(f&&f[1]&&(t=f[1].toLowerCase()),t){case r:return n=l(e),s.test(e)||(d=n.getElementsByTagName(i)[0])&&d.parentNode.removeChild(d),c.test(e)||(d=n.getElementsByTagName(o)[0])&&d.parentNode.removeChild(d),n.getElementsByTagName(r);case i:case o:return p=u(e).getElementsByTagName(t),c.test(e)&&s.test(e)?p[0].parentNode.childNodes:p;default:return h?h(e):u(e,o).getElementsByTagName(o)[0].childNodes}}},function(e,t,n){for(var r,i=n(1544),o=n(1545),a=i.CASE_SENSITIVE_TAG_NAMES,s=o.Comment,c=o.Element,u=o.ProcessingInstruction,l=o.Text,d={},p=0,f=a.length;p<f;p++)r=a[p],d[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function m(e){return function(e){return d[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:h,formatDOM:function e(t,n,r){n=n||null;for(var i=[],o=0,a=t.length;o<a;o++){var d,p=t[o];switch(p.nodeType){case 1:(d=new c(m(p.nodeName),h(p.attributes))).children=e(p.childNodes,d);break;case 3:d=new l(p.nodeValue);break;case 8:d=new s(p.nodeValue);break;default:continue}var f=i[o-1]||null;f&&(f.next=d),d.parent=n,d.prev=f,d.next=null,i.push(d)}return r&&((d=new u(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,d.parent=n,i.unshift(d),i[1]&&(i[1].prev=i[0])),i},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,n){"use strict";var r=this&&this.__extends||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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=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},i.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(1546),a=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]]),s=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=a.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),S(this,e)},e}();t.Node=s;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=c;var u=function(e){function t(t){return e.call(this,o.ElementType.Text,t)||this}return r(t,e),t}(c);t.Text=u;var l=function(e){function t(t){return e.call(this,o.ElementType.Comment,t)||this}return r(t,e),t}(c);t.Comment=l;var d=function(e){function t(t,n){var r=e.call(this,o.ElementType.Directive,n)||this;return r.name=t,r}return r(t,e),t}(c);t.ProcessingInstruction=d;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return r(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}(s);t.NodeWithChildren=p;var f=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return r(t,e),t}(p);t.Document=f;var h=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 r(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}(p);function m(e){return(0,o.isTag)(e)}function g(e){return e.type===o.ElementType.CDATA}function v(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function b(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new l(e.data);else if(m(e)){var r=t?C(e.children):[],a=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=a})),null!=e.namespace&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=a}else if(g(e)){r=t?C(e.children):[];var s=new p(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){r=t?C(e.children):[];var c=new f(r);r.forEach((function(e){return e.parent=c})),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),n=c}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var S=new d(e.name,e.data);null!=e["x-name"]&&(S["x-name"]=e["x-name"],S["x-publicId"]=e["x-publicId"],S["x-systemId"]=e["x-systemId"]),n=S}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function C(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=m,t.isCDATA=g,t.isText=v,t.isComment=y,t.isDirective=b,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},function(e,t,n){"use strict";var r;function i(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style}n.r(t),n.d(t,"ElementType",(function(){return r})),n.d(t,"isTag",(function(){return i})),n.d(t,"Root",(function(){return o})),n.d(t,"Text",(function(){return a})),n.d(t,"Directive",(function(){return s})),n.d(t,"Comment",(function(){return c})),n.d(t,"Script",(function(){return u})),n.d(t,"Style",(function(){return l})),n.d(t,"Tag",(function(){return d})),n.d(t,"CDATA",(function(){return p})),n.d(t,"Doctype",(function(){return f})),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||(r={}));const o=r.Root,a=r.Text,s=r.Directive,c=r.Comment,u=r.Script,l=r.Style,d=r.Tag,p=r.CDATA,f=r.Doctype},function(e,t,n){"use strict";var r=this&&this.__extends||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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=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},i.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(1546),a=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]]),s=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=a.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),S(this,e)},e}();t.Node=s;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=c;var u=function(e){function t(t){return e.call(this,o.ElementType.Text,t)||this}return r(t,e),t}(c);t.Text=u;var l=function(e){function t(t){return e.call(this,o.ElementType.Comment,t)||this}return r(t,e),t}(c);t.Comment=l;var d=function(e){function t(t,n){var r=e.call(this,o.ElementType.Directive,n)||this;return r.name=t,r}return r(t,e),t}(c);t.ProcessingInstruction=d;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return r(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}(s);t.NodeWithChildren=p;var f=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return r(t,e),t}(p);t.Document=f;var h=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 r(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}(p);function m(e){return(0,o.isTag)(e)}function g(e){return e.type===o.ElementType.CDATA}function v(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function b(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new l(e.data);else if(m(e)){var r=t?C(e.children):[],a=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=a})),null!=e.namespace&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=a}else if(g(e)){r=t?C(e.children):[];var s=new p(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){r=t?C(e.children):[];var c=new f(r);r.forEach((function(e){return e.parent=c})),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),n=c}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var S=new d(e.name,e.data);null!=e["x-name"]&&(S["x-name"]=e["x-name"],S["x-publicId"]=e["x-publicId"],S["x-systemId"]=e["x-systemId"]),n=S}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function C(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=m,t.isCDATA=g,t.isText=v,t.isComment=y,t.isDirective=b,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},function(e,t,n){"use strict";n.r(t);var r=n(1267);n.d(t,"subscribeToPushNotifications",(function(){return r.b})),n.d(t,"registerPushTopicsAndCloudKitContainers",(function(){return r.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionUpsellController=t.getSubscriptionController=void 0;const r=n(2210),i=n(893),o=n(996);let a;t.getSubscriptionController=function(){return null!==a&&void 0!==a?a:a=new s};class s extends i.EventTarget{constructor(){super(),this.connection=new r.JsonRpcServiceConnection(o.SubscriptionUpsellsServiceName),this.currentUpsellPlanFetch=null,this.__isFetching=!1,this.__upsellPlanData={isFetched:!1,upsellPlanData:null},this.connection.exportedObject=this,this.connection.start(),this.fetchNextLargerPlanData()}get _isFetching(){return this.__isFetching}set _isFetching(e){e!==this.__isFetching&&(this.__isFetching=e,this.dispatchEvent(new i.Event("fetchingchange")))}get isFetching(){return this.__isFetching}set _upsellPlanData(e){this.__upsellPlanData.isFetched&&e===this.__upsellPlanData.upsellPlanData||(this.__upsellPlanData={isFetched:!0,upsellPlanData:e},this.dispatchEvent(new i.Event("change")))}get upsellPlanData(){return this.__upsellPlanData}async upsellPlanDataLoadingStatusDidChange(e){this._isFetching=e}async upsellPlanDataDidChange(e){this._upsellPlanData=e}fetchNextLargerPlanData(){const e=this.currentUpsellPlanFetch;if(e)return e;const t=(async()=>{try{const e=await this.connection.remoteObjectProxy.fetchNextLargerPlanData();return this._upsellPlanData=e,this.upsellPlanData}finally{this.currentUpsellPlanFetch=null}})();return this.currentUpsellPlanFetch=t,t}fetchUpsellScreenData(e){return this.connection.remoteObjectProxy.fetchUpsellScreenData(e)}sendScreenInteration(e,t){return this.connection.remoteObjectProxy.sendScreenInteration(e,t)}continuePurchaseOnDevice(e,t){return this.connection.remoteObjectProxy.continuePurchaseOnDevice(e,t)}fetchPostPurchaseScreenData(e){return this.connection.remoteObjectProxy.fetchPostPurchaseScreenData(e)}getCoDEligibleDevicesList(){return this.connection.remoteObjectProxy.getCoDEligibleDevicesList()}recordUpsellFlowStat(e){return this.connection.remoteObjectProxy.recordUpsellFlowStat(e)}}t.SubscriptionUpsellController=s},function(e,t,n){"use strict";n.r(t),t.default="../90f3bef420bb7cc654efb0dc8455f7ea.png"},function(e,t,n){"use strict";n.r(t),t.default="../f32f2d2708f977ac452202d0b027e1fc.png"},function(e,t,n){"use strict";n.r(t),t.default="../27ffd4b7722c879dab1a3aa36906cc38.png"},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useHasStorageWarning=t.useStorageQuota=void 0;const r=n(880),i=n(981);let o;function a(){return null!==o&&void 0!==o?o:o=new i.QuotaController}function s(e){return a().addEventListener("change",e),()=>{a().removeEventListener("change",e)}}function c(){return a().storageQuota}function u(){return(0,r.useSyncExternalStore)(s,c)}t.useStorageQuota=u,t.useHasStorageWarning=function(){const e=u();return!!e&&(e.quotaStatus["almost-full"]||e.quotaStatus.overQuota)}},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePageUpgradePlanSection=void 0;const s=n(2139),c=a(n(1215)),u=o(n(870)),l=n(996),d=n(1512),p=a(n(1516)),f=n(997);n(1556);const h=n(1554),m=a(n(1557));t.StoragePageUpgradePlanSection=function(e){const{userPlan:t,buttonTextData:n}=e,r=(0,h.useStorageQuota)(),[i,o]=u.useState(!1),[a]=(0,d.usePlanUpgradePane)({entryPoint:l.EntryPoint.StoragePage,refetchPageContent:e.refetchPageContent,continueOnDeviceEligibleDevicesList:e.continueOnDeviceEligibleDevicesList}),g=async()=>{i||(o(!0),await a(),o(!1))},v=null===r||void 0===r?void 0:r.quotaStatus["almost-full"],y=null===r||void 0===r?void 0:r.quotaStatus.overQuota,b=y?(0,f.loc)("StoragePage.UpgradeCard.PlanUpgrade.Full.Title"):v?(0,f.loc)("StoragePage.UpgradeCard.PlanUpgrade.AlmostFull.Title"):(0,f.loc)("PlanUpgrade.UpgradeCard.FreeUser.Title"),w=y||v?(0,f.loc)(`StoragePage.UpgradeCard.PlanUpgrade${t===l.UserPlan.Standard?".FreeUser":".PaidUser"}${y?".Full":".AlmostFull"}.Description`):(0,f.loc)("PlanUpgrade.UpgradeCard.FreeUser.Body"),S=n&&(n.userEligibleForOffer?(0,f.loc)("PlanPage.PlanUpgrade.RedeemICloudPlusOffer"):(0,f.loc)("PlanPage.PlanUpgrade.ButtonTextWithPrice",{pricePerMonth:n.priceForDisplay}));return u.createElement(u.Fragment,null,u.createElement("section",{className:(0,c.default)("storage-page-upgrade-plan-section",{"is-hidden":!w||!S,loading:i}),onClick:g},t===l.UserPlan.Standard||v||y?u.createElement(u.Fragment,null,u.createElement("div",{className:"logo"},v||y?u.createElement(m.default,{layoutMode:"glyphBox",desiredFontSize:18}):u.createElement(s.UIImage,{src:p.default,alt:"",ariaHidden:!0})),u.createElement("div",{className:"upgrade-plan-container"},u.createElement("h3",{className:"title"},b),u.createElement("p",{className:"description"},w),u.createElement(s.UIButton,{className:(0,c.default)("upgrade-button",{loading:i}),"aria-haspopup":"dialog",onActivate:g,disabled:i},i&&u.createElement(s.UIActivityIndicator,{description:(0,f.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),S))):u.createElement("div",{className:"upgrade-plan-container"},u.createElement(s.UIButton,{className:(0,c.default)("upgrade-button",{loading:i}),"aria-haspopup":"dialog",onActivate:g,disabled:i},i&&u.createElement(s.UIActivityIndicator,{description:(0,f.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),(0,f.loc)("PlanPage.PlanUpgrade.ButtonText")))))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t);var r=n(870),i=n(1260);t.default=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"exclamationmark.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM58.4961-26.4648C60.791-26.4648 62.1582-27.7832 62.207-30.3223L62.9395-56.1035C62.9883-58.5938 61.0352-60.4492 58.4473-60.4492C55.8105-60.4492 53.9551-58.6426 54.0039-56.1523L54.6387-30.3223C54.6875-27.832 56.0547-26.4648 58.4961-26.4648ZM58.4961-10.5957C61.2793-10.5957 63.7207-12.8418 63.7207-15.6738C63.7207-18.5059 61.3281-20.752 58.4961-20.752C55.6152-20.752 53.2227-18.457 53.2227-15.6738C53.2227-12.8906 55.6641-10.5957 58.4961-10.5957Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})}},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppUpgradePlanSection=void 0;const s=n(2139),c=o(n(870)),u=n(1554),l=n(997);n(1559);const d=n(1512),p=n(996),f=a(n(1215)),h=n(1560),m=n(1561),g=n(1562),v=a(n(1557)),y=n(1563),b=a(n(1565)),w=n(2211);t.AppUpgradePlanSection=function(e){const{props:{descriptionStorageFull:t,onUserUpgraded:n},entryPoint:r}=e,i=(()=>{if(e.entryPoint===p.EntryPoint.PhotosApp)return{headingIcon:b.default,headingTitle:(0,l.loc)("PhotosUpgrade.Title.Header"),headingDescription:(0,l.loc)("PhotosUpgrade.Description",{photosCount:new Intl.NumberFormat((0,w.getLocale)()).format(e.props.photosLibraryCount)})}})(),o=(0,u.useStorageQuota)(),a=(0,h.useCoDEligibleDevicesListForPlanUpgrade)(),{isFetched:S,upsellPlanData:C}=(0,y.useSubscriptionUpsellPlanData)(),[_,O]=c.useState(!1),[E]=(0,d.usePlanUpgradePane)({entryPoint:r,refetchPageContent:()=>{(0,g.getQuotaController)().fetchStorageQuota(),n()},continueOnDeviceEligibleDevicesList:null!==a&&void 0!==a?a:[],displayOptions:i});if(!S||null===C||!(null!==o&&void 0!==o&&o.quotaStatus["almost-full"]||null!==o&&void 0!==o&&o.quotaStatus.overQuota)||!a||0===a.length)return null;const I=async()=>{_||(O(!0),await E(),O(!1))};return c.createElement(c.Fragment,null,c.createElement("section",{className:(0,f.default)("apps-upgrade-plan-section",{loading:_}),onClick:I},c.createElement("div",{className:"icon"},c.createElement(v.default,{layoutMode:"glyphBox",desiredFontSize:18})),c.createElement("div",{className:"content"},c.createElement("h3",{className:"title"},null!==o&&void 0!==o&&o.quotaStatus.overQuota?(0,l.loc)("AppUpgrade.Title.StorageFull"):(0,l.loc)("AppUpgrade.Title.StorageAlmostFull")),c.createElement("p",{className:"description"},null!==o&&void 0!==o&&o.quotaStatus.overQuota?t:(0,l.loc)("AppUpgrade.AlmostFull.Message",{storage:(0,m.bytesToHumanizedFormat)(o.storageUsageInfo.totalStorageInBytes-o.storageUsageInfo.usedStorageInBytes)})),c.createElement(s.UIButton,{className:(0,f.default)("upgrade-button",{loading:_}),"aria-haspopup":"dialog",onActivate:I,disabled:_},_&&c.createElement(s.UIActivityIndicator,{description:(0,l.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),(0,l.loc)("AppUpgrade.Button.GetMoreStorage")))))}},function(e,t,n){"use strict";n.r(t)},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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useCoDEligibleDevicesListForPlanUpgrade=void 0;const a=o(n(870)),s=n(1549);let c;t.useCoDEligibleDevicesListForPlanUpgrade=function(){const[e,t]=a.useState();return a.useEffect((()=>{void 0===c?(async()=>{const e=await(0,s.getSubscriptionController)().getCoDEligibleDevicesList();e.ok?(t(e.value.ContinueOnDeviceEligibleDeviceInfo),c=e.value.ContinueOnDeviceEligibleDeviceInfo):(t([]),c=[])})():t(c)}),[]),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytesToHumanizedFormat=void 0;const r=n(997),i=["Utils.BytesToHumanizedFormat.Size.bytes","Utils.BytesToHumanizedFormat.Size.KB","Utils.BytesToHumanizedFormat.Size.MB","Utils.BytesToHumanizedFormat.Size.GB","Utils.BytesToHumanizedFormat.Size.TB"];t.bytesToHumanizedFormat=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e<=0||isNaN(e))return(0,r.loc)(i[0],{value:0});const n=(0,r.loc)("LocalizationFormatter.DecimalSymbol"),o=Math.floor(Math.log(e)/Math.log(1024)),a=e/Math.pow(1024,o),s=`${parseFloat(a.toFixed(t))}`.replace(".",n),c=i[o];return(0,r.loc)(c,{value:s})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuotaController=void 0;const r=n(981);let i=null;t.getQuotaController=()=>null!==i&&void 0!==i?i:i=new r.QuotaController},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSubscriptionUpsellPlanData=void 0;const r=n(870),i=n(880),o=n(1549),a=n(1564);function s(e){return(0,o.getSubscriptionController)().addEventListener("change",e),()=>{(0,o.getSubscriptionController)().removeEventListener("change",e)}}function c(){return(0,o.getSubscriptionController)().upsellPlanData}t.useSubscriptionUpsellPlanData=function(){const e=(0,i.useSyncExternalStore)(s,c);return(0,a.useSubscribeToPlanUpgradePushNotification)((()=>{(0,o.getSubscriptionController)().fetchNextLargerPlanData()})),(0,r.useDebugValue)(e),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSubscribeToPlanUpgradePushNotification=void 0;const r=n(870),i=n(1548),o=n(1513);t.useSubscribeToPlanUpgradePushNotification=function(e){(0,r.useEffect)((()=>(0,i.subscribeToPushNotifications)((async t=>{var n;t.data.topic===o.QUOTA_PUSH_TOPIC&&["dismiss","teardown"].includes(null===(n=t.data.payload)||void 0===n?void 0:n.event)&&e()}))),[e])}},function(e,t,n){"use strict";n.r(t),t.default="../6dc2b49789e15ce250ae0ea9c2aab46f.png"},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.__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)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PlanUpgradeButton=void 0;const s=o(n(870)),c=n(2139),u=a(n(1215)),l=n(1512),d=n(997),p=n(1563),f=n(1560);t.PlanUpgradeButton=e=>{const{onPlanUpgradePaneOpen:t,entryPoint:n,buttonTextOverride:r,variant:i="button",refetchPageContent:o,children:a}=e,[h,m]=s.useState(!1),{upsellPlanData:g}=(0,p.useSubscriptionUpsellPlanData)(),v=(0,f.useCoDEligibleDevicesListForPlanUpgrade)(),[y]=(0,l.usePlanUpgradePane)({entryPoint:n,refetchPageContent:o,continueOnDeviceEligibleDevicesList:null!==v&&void 0!==v?v:[],unmountWithPresenter:!1});if(!g||!v||0===v.length)return null;const b=async()=>{h||(m(!0),await y(),m(!1),null===t||void 0===t||t())},w=g.userEligibleForOffer?(0,d.loc)("PlanPage.PlanUpgrade.RedeemICloudPlusOffer"):(0,d.loc)("PlanPage.PlanUpgrade.ButtonTextWithPrice",{pricePerMonth:g.priceForDisplay});return"button"===i?s.createElement(c.UIButton,{onActivate:b,className:(0,u.default)("upgrade-button",{loading:h}),variant:"block primary large",disabled:h,"aria-haspopup":"dialog"},h&&s.createElement(c.UIActivityIndicator,{description:(0,d.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14,className:"launching-upgrade-pane"}),null!==r&&void 0!==r?r:w):s.createElement("a",{"aria-disabled":h,onClick:e=>{e.preventDefault(),e.stopPropagation(),h||b()},href:"/storage",className:(0,u.default)("plan-upgrade-link",{loading:h}),"aria-haspopup":"dialog"},h&&s.createElement(c.UIActivityIndicator,{description:(0,d.loc)("PlanPage.PlanUpgrade.Button.Loading"),size:14}),a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSubscriptionFeaturesData=void 0;const r=n(870),i=n(880),o=n(1568),a=n(1564);let s=!1;function c(e){return s?()=>{}:((0,o.getSubscriptionFeaturesController)().addEventListener("change",e),()=>{(0,o.getSubscriptionFeaturesController)().removeEventListener("change",e)})}function u(){return s?[]:(0,o.getSubscriptionFeaturesController)().featuresData}t.useSubscriptionFeaturesData=function(){let{disable:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&(s=!0);const t=(0,i.useSyncExternalStore)(c,u);return(0,a.useSubscribeToPlanUpgradePushNotification)((()=>{(0,o.getSubscriptionFeaturesController)().fetchFeaturesData()})),(0,r.useDebugValue)(t),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionFeaturesController=t.getSubscriptionFeaturesController=void 0;const r=n(2210),i=n(893),o=n(996);let a;t.getSubscriptionFeaturesController=function(){return null!==a&&void 0!==a?a:a=new s};class s extends i.EventTarget{constructor(){super(),this.connection=new r.JsonRpcServiceConnection(o.SubscriptionFeaturesServiceName),this.currentFeaturesFetch=null,this.__isFetching=!1,this.__featuresData=null,this.connection.exportedObject=this,this.connection.start(),this.fetchFeaturesData()}get _isFetching(){return this.__isFetching}set _isFetching(e){e!==this.__isFetching&&(this.__isFetching=e,this.dispatchEvent(new i.Event("fetchingchange")))}get isFetching(){return this.__isFetching}get _featuresData(){return this.__featuresData}set _featuresData(e){e!==this.__featuresData&&(this.__featuresData=e,this.dispatchEvent(new i.Event("change")))}get featuresData(){return this.__featuresData}async featuresDataLoadingStatusDidChange(e){this._isFetching=e}async featuresDataDidChange(e){this._featuresData=e}fetchFeaturesData(){const e=this.currentFeaturesFetch;if(e)return e;const t=(async()=>{try{const e=await this.connection.remoteObjectProxy.fetchSubscriptionFeaturesData();return e?(this._featuresData=e,e):this.featuresData}finally{this.currentFeaturesFetch=null}})();return this.currentFeaturesFetch=t,t}}t.SubscriptionFeaturesController=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.__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)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.usePlanUpgradePopup=void 0;const a=o(n(870)),s=n(2242),c=n(1512),u=n(1549);t.usePlanUpgradePopup=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const[n,r]=a.useState(!1),[i,o]=a.useState(void 0),[l]=(0,c.usePlanUpgradePane)({entryPoint:e,refetchPageContent:t,continueOnDeviceEligibleDevicesList:null!==i&&void 0!==i?i:[]});return{isLoading:n,openUpgradePane:async()=>{if(n)return;r(!0);const e=await(0,u.getSubscriptionController)().getCoDEligibleDevicesList();e.ok?(o(e.value.ContinueOnDeviceEligibleDeviceInfo),await l()):(0,s.openUrl)("https://support.apple.com/108349",{target:"_blank"}),r(!1)}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(870),i=n(2186);function o(e){const t=Object(i.a)();return r.createElement(t,e)}function a(e){const t=Object(i.a)(!0);return r.createElement(t,e)}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"laptopcomputer.and.iphone",svgPath:"M17.9688 4.54102L138.77 4.54102C145.215 4.54102 149.658 0.341797 149.658-5.85938L149.658-52.3926C149.658-58.5938 145.215-62.793 138.77-62.793L137.061-62.793L137.061-64.5508C137.061-71.3867 133.398-74.9023 126.611-74.9023L39.1113-74.9023C32.666-74.9023 28.6621-71.3867 28.6621-64.5508L28.6621-6.5918L17.9688-6.5918C14.9414-6.5918 12.4512-4.10156 12.4512-1.02539C12.4512 2.05078 14.9414 4.54102 17.9688 4.54102ZM106.641-52.3926L106.641-6.5918L36.5234-6.5918L36.5234-62.3535C36.5234-65.4785 38.0859-67.041 41.2109-67.041L124.512-67.041C127.49-67.041 129.053-65.625 129.199-62.793L117.529-62.793C111.084-62.793 106.641-58.5938 106.641-52.3926ZM113.232-51.3672C113.232-54.3945 115.137-56.2012 118.408-56.2012L118.945-56.2012L118.945-54.248C118.945-52.5391 120.068-51.3184 121.777-51.3184L134.57-51.3184C136.279-51.3184 137.402-52.5391 137.402-54.248L137.402-56.2012L137.939-56.2012C141.162-56.2012 143.066-54.3945 143.066-51.3672L143.066-6.88477C143.066-3.85742 141.162-2.05078 137.939-2.05078L118.408-2.05078C115.137-2.05078 113.232-3.85742 113.232-6.88477ZM120.898-5.17578L135.498-5.17578C136.621-5.17578 137.402-5.9082 137.402-7.03125C137.402-8.25195 136.621-8.98438 135.498-8.98438L120.898-8.98438C119.727-8.98438 118.945-8.25195 118.945-7.03125C118.945-5.9082 119.727-5.17578 120.898-5.17578Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:52.955039062499964,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 137.2076416015625 79.5419921875",width:137.2076416015625,height:79.5419921875,translateX:-12.451210937500036,translateY:75.0009765625,baseline:75.0009765625,capline:4.541015625}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(870),i=n(1250);let o=function(e){return e.SM="SM",e.MD="MD",e.LG="LG",e}({});const a={SM:matchMedia("(max-width: 759px)"),MD:matchMedia("(min-width: 760px)"),LG:matchMedia("(min-width: 1165px)")};function s(){const e=Object(i.a)();return r.useEffect((()=>{const t=Object.keys(a).map((t=>(a[t].addEventListener("change",e),t)));return()=>{t.forEach((t=>{a[t].removeEventListener("change",e)}))}}),[e]),a.SM.matches?o.SM:a.LG.matches?o.LG:o.MD}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return m}));var r=n(870),i=n(1215),o=n.n(i),a=n(878),s=n(1e3),c=n(1574),u=n(1572),l=n(1227),d=n(1202),p=n(2316),f=n(2155);const h=e=>{const t=Object(u.b)(),n=m();if(n){const i=t===u.a.SM?40:48,a=t===u.a.SM?27:32,s=Object(d.a)("legacyContactSupport");return r.createElement(p.a,{className:o()("header",e.className),icon:r.createElement(c.a,{"aria-hidden":!0,width:i,height:a,layoutMode:"glyphBox"}),description:n,url:s,urlLinkText:Object(l.a)("Banner.Beneficiary.OptionalLink.Text")})}return null};function m(){var e;const t=null===(e=f.h.value)||void 0===e?void 0:e.details,n=null===t||void 0===t?void 0:t.firstName,r=null===t||void 0===t?void 0:t.beneficiaryInfo,i=null===r||void 0===r?void 0:r.beneficiaryExpiredTime;if(void 0!==n&&void 0!==i){const e=null===r||void 0===r?void 0:r.isBeneficiaryMultiple,t={firstName:n,date:new Intl.DateTimeFormat(Object(a.b)(),{dateStyle:"long"}).format(new Date(i))},o=Object(s.a)(n);return e?o?Object(l.a)("Banner.Beneficiary.Multiple.Description.NameIsCJK",t):Object(l.a)("Banner.Beneficiary.Multiple.Description",t):o?Object(l.a)("Banner.Beneficiary.Single.Description.NameIsCJK",t):Object(l.a)("Banner.Beneficiary.Single.Description",t)}return null}},function(e,t,n){"use strict";var r=n(870),i=n(1260);t.a=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"person.2.badge.heart",svgPath:"M22.4091 9.94545L60.7139 9.94545C58.3513 8.64005 56.5781 5.69764 56.8972 2.72358L21.1776 2.72358C20.2044 2.72358 19.7451 2.32664 19.7451 1.36496C19.7451-10.7417 33.529-22.0334 49.486-22.0334C55.6536-22.0334 61.1867-20.5753 65.8846-17.8048C67.4392-19.7006 69.2421-21.4411 71.4177-22.9746C65.0923-27.1234 57.5494-29.2553 49.486-29.2553C29.0556-29.2553 12.4609-14.4027 12.4609 1.83075C12.4609 7.26835 15.7907 9.94545 22.4091 9.94545ZM49.5589-34.814C59.6196-34.814 67.8513-43.8451 67.8513-54.965C67.8513-65.7829 59.7221-74.494 49.5589-74.494C39.4992-74.494 31.2358-65.6171 31.2358-54.8615C31.2358-43.7934 39.5087-34.814 49.5589-34.814ZM49.5589-42.0981C43.5601-42.0981 38.5199-47.7824 38.5199-54.8615C38.5199-61.721 43.4988-67.2099 49.5589-67.2099C55.6707-67.2099 60.6189-61.8351 60.6189-54.965C60.6189-47.7824 55.5577-42.0981 49.5589-42.0981ZM117.182 9.94545C116.478 7.59343 116.042 5.08615 115.98 2.55777L72.788 2.55777C71.5223 2.55777 71.0525 2.24424 71.0525 1.22125C71.0525-6.81752 83.4371-21.7842 105.831-21.7842C112.478-21.7842 118.312-20.419 123.114-18.1595C124.72-20.3246 126.534-22.1475 128.616-23.774C122.322-27.1224 114.664-29.1719 105.831-29.1719C79.3244-29.1719 63.1473-10.6397 63.1473 2.15282C63.1473 7.50702 67.0368 9.94545 75.1581 9.94545ZM105.809-35.2521C117.396-35.2521 126.894-45.5294 126.894-58.0516C126.894-70.4472 117.406-80.4562 105.809-80.4562C94.1308-80.4562 84.6836-70.613 84.6836-58.1551C84.6836-45.5811 94.1816-35.2521 105.809-35.2521ZM105.809-42.588C98.5952-42.588 92.5888-49.529 92.5888-58.1551C92.5888-66.6652 98.4927-73.0685 105.809-73.0685C113.044-73.0685 118.989-66.5512 118.989-58.0516C118.989-49.4254 112.92-42.588 105.809-42.588ZM147.46 26.212C160.946 26.212 172.304 14.9167 172.304 1.37852C172.304-12.222 161.06-23.4137 147.46-23.4137C133.88-23.4137 122.678-12.2115 122.678 1.37852C122.678 15.0202 133.88 26.212 147.46 26.212ZM141.043-10.071C143.878-10.071 146.131-8.49227 147.408-5.45089C148.736-8.49227 150.979-10.071 153.814-10.071C158.402-10.071 161.61-6.69698 161.61-1.95328C161.61 5.00575 154.203 11.4528 149.523 14.4942C148.01 15.4478 146.858 15.4478 145.293 14.5047C140.56 11.5161 133.205 5.00575 133.205-1.95328C133.205-6.69698 136.465-10.071 141.043-10.071Z",layoutBox:{viewBox:"0 0 195.7838134765625 124.19921875",width:195.7838134765625,height:124.19921875,translateX:18.81187988281249,translateY:97.32958984375,baseline:97.32958984375,capline:26.86962890625},glyphBox:{viewBox:"0 0 186.4478759765625 122.884033203125",width:186.4478759765625,height:122.884033203125,translateX:14.143911132812491,translateY:96.6719970703125,baseline:96.6719970703125,capline:26.2120361328125}}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(870),i=n(2299);let o=function(e){return e[e.AlmostFull=1]="AlmostFull",e[e.Full=2]="Full",e[e.AlmostFullNoUpgrade=3]="AlmostFullNoUpgrade",e[e.FullNoUpgrade=4]="FullNoUpgrade",e}({});const a=void 0;function s(){const{storageUsage:e}=Object(i.a)();let t;return a?t=a:null==e?t=void 0:e.haveMaxQuotaTier&&(e.overQuota||e.almostFull)?t=e.overQuota?o.FullNoUpgrade:o.AlmostFullNoUpgrade:e.overQuota?t=o.Full:e.almostFull&&(t=o.AlmostFull),Object(r.useDebugValue)(t),t}},,,,,,,,,,,,,,,,,,,,function(e,t,n){},function(e,t,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return ae})),n.d(t,"a",(function(){return se}));var r=n(870),i=n(1215),o=n.n(i),a=n(904),s=n(878),c="../efd89366097a2e1d68e76e8eb647dc4f.png",u="../22ae0e20e25e754a0e316b334fc1bd1f.png",l=n(1336),d=n(1333),p=n(1335);const f=Object.freeze({"ar-sa":["../86402577c05f2f58b9ddddd5ad038be0.png","../a94f70ad2d849c012bd8091f61ea6abf.png"],"ca-es":["../65d456157686c5d9d77b1c95bf96fb87.png","../db127ebd0ae994211d455458b55f0d2d.png"],"cs-cz":["../b2ca2facd6e8a38f2576cc27e2bd96b3.png","../432541c0befd758c340fb5cf8b8803c7.png"],"da-dk":["../8ecb5e3ec6dce08746ac1c8f17e1fc58.png","../c17855a20471523f0d1b455c5d489603.png"],"de-de":["../4f4262e12c89a6bd78b2c623f28aa863.png","../56c42046b04ca03763eac9aebf15dbd7.png"],"el-gr":["../e83fcda1f531dd84bc17a0c5b077cd25.png","../20434f60f2a05ba38e575065684cda9e.png"],"en-au":["../26477be68b68179f58f6945d7ed34fbf.png","../77c0fc0d1c7b56c948b53dc61f35518f.png"],"en-ca":["../26477be68b68179f58f6945d7ed34fbf.png","../77c0fc0d1c7b56c948b53dc61f35518f.png"],"en-gb":["../26477be68b68179f58f6945d7ed34fbf.png","../77c0fc0d1c7b56c948b53dc61f35518f.png"],"en-nz":["../26477be68b68179f58f6945d7ed34fbf.png","../77c0fc0d1c7b56c948b53dc61f35518f.png"],"en-us":["../26477be68b68179f58f6945d7ed34fbf.png","../77c0fc0d1c7b56c948b53dc61f35518f.png"],"es-es":["../9ddb6aa1a6dd6aa3711255c1342798d8.png","../82002d26ce38f549cc3ac9915a1b4a79.png"],"es-mx":["../9ddb6aa1a6dd6aa3711255c1342798d8.png","../82002d26ce38f549cc3ac9915a1b4a79.png"],"fi-fi":["../6e314543990e8fede18720c55f696f8d.png","../cc910bb05e9217a2e50a57c6790b81d1.png"],"fr-ca":["../02e717c3d0c1721288f08d383031a2d2.png","../e24fba9360a9397544fbc632883d8aad.png"],"fr-fr":["../02e717c3d0c1721288f08d383031a2d2.png","../e24fba9360a9397544fbc632883d8aad.png"],"hi-in":["../f75c561417d84bda148859cb2bf63f25.png","../ed8f6fffa9418d323ed20c575e0969dd.png"],"hr-hr":["../72b087dc0193bd13e86036a2c83c156d.png","../2f30bbca8f55f4a72d89c2d3b829ec43.png"],"hu-hu":["../f89de2f9400028cf8455e715990e0929.png","../76bd54830f803ee7e705d596592f6150.png"],"id-id":["../a1987cdb3196fe839e08efd61b3599cf.png","../fcd238637307fe1d60ec845ec253a8c2.png"],"it-it":["../ca4b1b5875ff0135ab5fbf85f13bc418.png","../794eb95ce716273bf71f77e11af1cb3a.png"],"iw-il":["../2e0dfa982cfca41459646027dd98ed36.png","../89d126a6f3a71c461c5800469bfa897c.png"],"ja-jp":["../2064d4fe9bf9b743037ce623271724e5.png","../6c41147102e0258e11bc0651e0747f66.png"],"ko-kr":["../1f7c98c121298b39deee4593c4eb35dd.png","../0caa000901ae4d544d8c521d6c8235f6.png"],"ms-my":["../a1987cdb3196fe839e08efd61b3599cf.png","../fcd238637307fe1d60ec845ec253a8c2.png"],"nl-nl":["../de94721d1b43165384aaa31f9e857126.png","../304662231afadfe9594b0a1b55a4b596.png"],"no-no":["../0efa80414eec412689c5ac70e947a262.png","../2a5ace6f045442284e3ccec5eabc922c.png"],"pl-pl":["../72e6f51fb239fde9f65f3f9b18d168d4.png","../ad49305e99ca8f6c0bb9dce1705993d1.png"],"pt-br":["../ba3bdfa6160a5166a0ecdc79c30e72b0.png","../33125fcd5284342f2ba69a34b25b0460.png"],"pt-pt":["../ba3bdfa6160a5166a0ecdc79c30e72b0.png","../33125fcd5284342f2ba69a34b25b0460.png"],"ro-ro":["../d0004229ffc36e47db3b2bca478fe7aa.png","../36c186d5f4a94ec6d46c682d47b02fa1.png"],"ru-ru":["../59947fff53d27eb64fdea1735ae71416.png","../cabaec2aeb833b1cffbed6664ee6c19f.png"],"sk-sk":["../d1aae02071d926212557d81a2ca7e719.png","../23c56816938d96b9a16171df1e351e72.png"],"sv-se":["../b47e840e369d2f7cd15d36b5653fdb2e.png","../f5df9cb04c1c7e566722de354373357c.png"],"th-th":["../3c4c7b17fe7fb6b55c2060ce7ba071fa.png","../f219b2ec550c3f755b7bdbf8857b54ea.png"],"tr-tr":["../e1ceea8ed8fcb39de303774040f83a10.png","../dea5bba2ad7365f0f4a3bca51e2a483e.png"],"uk-ua":["../8b326167fad26eadb670b0a7047005d0.png","../adc4034163faa97f8dafcba015694a68.png"],"vi-vi":["../2f41304e966b3b709e7a3d6a5c43102b.png","../0c51cab640ab6ad99752e279e9501cfc.png"],"zh-cn":["../25bd1dcba751d789537732abd4cc280f.png","../9d0549f0fb5dc7f319edd6a8ae27788a.png"],"zh-hk":["../25bd1dcba751d789537732abd4cc280f.png","../9d0549f0fb5dc7f319edd6a8ae27788a.png"],"zh-tw":["../25bd1dcba751d789537732abd4cc280f.png","../9d0549f0fb5dc7f319edd6a8ae27788a.png"]});function h(e,t){var n;return null===(n=f[e])||void 0===n?void 0:n[t-1]}const m="SFText Calendar Day Of Week",g="SFDisplay Calendar Day Of Month";function v(e,t){var n;return null!==(n=h(e,t))&&void 0!==n?n:h("en-us",t)}async function y(e,t,n,r,i,o,a,s,c){a.font=`${n} ${i}px ${t}`;let u=a.measureText(e).width,l=i;for(;u>=s&&l>0;)l-=1,a.font=`${n} ${l}px ${t}`,u=a.measureText(e).width;a.textAlign="center",a.fillStyle=r,a.fillText(e,c/2,o)}var b=n(1332);const w=e=>{let{className:t,iconSize:n,testId:i,showBadge:a,badgeCount:f,customDate:h}=e;const w=Object(d.a)(),S=h||w,[C,_]=r.useState(null),O=Object(b.a)(),E=Object(p.a)(O),[I,A]=r.useState(O?u:c),[T,P]=r.useState(void 0),R=window.devicePixelRatio,k=n*R,D=.3*n*R,M=Math.floor(11*n/60)*R,N=Math.floor(36*n/60)*R,x=k-.0833*n*R*2,L=.817*n*R,j=r.useRef(0);return r.useLayoutEffect((()=>{let e=!0;const t=()=>{e&&(A(v("en-us",1)),P(function(e){return`${v(e,1)}, ${v(e,2)} 2x`}("en-us")))},r=Object(s.b)(),i=++j.current,o=function(e,t){return e.toLocaleDateString(t,{weekday:"short"})}(S,r).toUpperCase(),a=function(e){return e.getDate()}(S);if(o===(null===C||void 0===C?void 0:C.weekDay)&&a===(null===C||void 0===C?void 0:C.monthDay)&&E===O)return;const d=document.createElement("canvas");d.style.width=`${n}px`,d.style.height=`${n}px`,d.width=k,d.height=k;const p=d.getContext("2d");if(p)return p.clearRect(0,0,n,n),(async()=>{try{const[,,t]=await Promise.all([document.fonts.load(`500 1em ${m}`),document.fonts.load(`200 1em ${g}`),Object(l.a)(O?u:c,O?`${u}, ../58e7356f1fe95fd68cf9ee0f7eb6ab51.png 2x`:`${c}, ../9eabf57c8365585bfb309bfad058bca1.png 2x`)]);if(j.current!==i)return;p.drawImage(t,0,0,k,k),y(o,m,"500","#FF3B30",M,D,p,x,k),y(String(a),g,"200",O?"#ffffff":"#030303",N,L,p,x,k),e&&(A(d.toDataURL()),P(void 0),_({weekDay:o,monthDay:a}))}catch(n){t()}})(),()=>{e=!1};t()}),[S,C,n,M,D,N,L,k,x,O,E]),r.createElement("div",{className:o()("calendar-icon",t),style:{height:n,width:n},role:"none"},r.createElement("img",{src:I,srcSet:T,style:{width:n,height:n},"aria-hidden":"true",alt:"","data-testid":i}),a&&f&&r.createElement(ae,{appIconSize:n,count:f}))};var S="../99b096536549333a56fe9be5fc33abeb.png",C="../404e7e6cdd3d0cda8ba88bbdd4eeb281.png",_="../17c4781c64e64e58b70a0e4c95a79a02.png",O="../730d82b74514b85b51b89450b833fe71.png",E="../ebeab73c2a29818f9af9f846581e3548.png",I="../be9654001f35549cd25307e573a56878.png",A="../7e9d65d32973291b9c02698411402cbc.png",T="../1b6882a28facca65c8f4bd9043e42e3b.png",P="../e91fd974e55810936702bf7e6f33aef2.png",R="../0e4450ae74f288a79325f3642c71ced8.png",k="../1aa21a6e5cad43de2baf5c2e8947470b.png",D="../b77e6c2aec6afb9120c9bf9e016f9fb0.png",M="../0d5861f25e42d5766a503e074246da3a.png",N="../b06551ef6b5031a02e94bae371cf0ce9.png",x="../34c81837e6653dd0b53c77e1b03e3b04.png",L="../36dccbcb4761f2d314983d3a565276fb.png",j="../197229d0f30a0b31c7c089752788859e.png",U="../9093176df65e4b508971bcf4bfb5599e.png",F="../dd963dca8eaf57df759dbda0c1e72d2a.png",z="../08594cf826f37785eb033f679d396c76.png",B="../8f07873715a73121ce101e3ee4e09b67.png",K="../e353669b941d54cc2081df0bcbe4566c.png",H="../04f77e66dc4c2ba1bca449af45056ce7.png",W="../2230ef7bf55ef7a15427c944ca910316.png",q="../a8ffff29778465b58d4c1f98837b4d3d.png",V="../7d5ab88b4c851c1a0f369d6ed0173500.png",$="../a66757330169f349730c036bc7596781.png",G="../c373aee99ed134ddc981867aa07d0e8e.png",Z="../6d27bd60e0e6c2d182a84db0a738dbcf.png",Q="../84c34fca1aa4c3c5353a6951a6df5730.png",Y="../d9400b590f28fa3c386772f4d13e66a6.png",J="../b6f33740bd350d06497e5257a91ade9b.png",X="../d2ed4541ce20ba6adffcf74e0963bae0.png",ee="../62d86febee91c876f5780a793a29f984.png",te="../d1ce5bf4d89c36623eb9e677a0479bcc.png",ne="../64f8cde3431dd4118990f6ccce86ee90.png",re="../477e749015c87d2b248526f811276fe5.png",ie="../7621833be068bac571a9c7a1076dd60f.png",oe=n(1247);const ae=e=>{const{appIconSize:t,count:n}=e,i=Math.round(Math.max(.37*t,20)),o=Math.max(.20574*t,11),c=-i/4;return r.createElement("div",{"data-testid":n,className:"app-icon-badge",style:{top:`${c}px`,right:Object(a.c)(Object(s.b)())?void 0:`${c}px`,left:Object(a.c)(Object(s.b)())?`${c}px`:void 0,height:i,fontSize:o,borderRadius:i,minWidth:i}},r.createElement("span",{className:"number"},n))},se=e=>{var t,n;const i=o()("app-icon",e.className),{iconSize:a,isBadgeVisible:s}=e,c=e.applicationIdentifier,u=null!==(t=null===(n=oe.a.sharedInstance.getApplicationInfo(c))||void 0===n?void 0:n.applicationName)&&void 0!==t?t:c,l=!(!s||!e.badgeCount),d=Object(b.a)();var p;if("calendar"===u)return r.createElement(w,{className:i,iconSize:a,testId:"calendar-app-icon",showBadge:l,badgeCount:null!==(p=e.badgeCount)&&void 0!==p?p:null});const{icon:f,iconSrcSet:h}=function(e,t){let n,r;switch(e){case"mail":case"mail2":n=t?O:_,r=t?`${O}, ../77ddccbed16f81da0558882db10db32a.png 2x, ../90a3d6eec16937156b28c7a0e4380b44.png 3x`:`${_}, ../db8dbf8664914b03532511dd45f27ca9.png 2x, ../04b166735171fa82621d76b1679cdc40.png 3x`;break;case"contacts":n=t?I:E,r=t?`${I}, ../90ebcde97b1f371ab4dbf3466668395a.png 2x, ../5865e69bc3d1ee1b39c0a9932efe5586.png 3x`:`${E}, ../49246a7541de2abe755a912cb8055ddd.png 2x, ../7eca66214219cbbd5ad4cff56495f7bf.png 3x`;break;case"photos":case"photos3":n=t?T:A,r=t?`${T}, ../5e519146602452303d3d57d4b4255dbf.png 2x, ../a506ff7bf7bdc55c8c637969decd51aa.png 3x`:`${A}, ../f241b442fe6525563157b8f7ed948dfe.png 2x, ../e0663ac27869e6de9663ee3f6c42e248.png 3x`;break;case"iclouddrive":case"plan":case"docs":n=t?C:S,r=t?`${C}, ../7f2578d2e15d5106579f7066f80e1b28.png 2x, ../9f35d69ed0753011bc1e14f8e9346031.png 3x`:`${S}, ../8a1c6eb80b08039cbd8eea7686365a95.png 2x, ../5f6928a56f026915cce8752860132ec5.png 3x`;break;case"notes":case"notes3":n=t?R:P,r=t?`${R}, ../16d9459bd2bb39ecb24c907f6e7d7eaf.png 2x, ../8fe382c8f73b62fced7d385d51052f36.png 3x`:`${P}, ../6bef231c411bf2d977031c58d7dccc64.png 2x, ../a243d2cc85c10183d9967dd5b8db1d14.png 3x`;break;case"reminders":n=t?D:k,r=t?`${D}, ../ba34d28f502d79fbd10075c64ada59c4.png 2x, ../91340a6a1fbc144594df1b2cfb1aa8a5.png 3x`:`${k}, ../7009e1dcc3bb3dd57105ac3f02ef8eae.png 2x, ../eec6ca94e7a79d68e98f01fcdc16cff5.png 3x`;break;case"reminders2":n=t?N:M,r=t?`${N}, ../314c2cd588d50a3ef4e91dcb5b3c7631.png 2x, ../b335e1e574ac4e2794ec98a6f1fe2049.png 3x`:`${M}, ../d16a1494db1b438845d7f834cc64b7c9.png 2x, ../304f91b50bc3932ba5d6148973de8b63.png 3x`;break;case"pages":n=t?L:x,r=t?`${L}, ../4f82ed6220c7f162201e48dc156849bd.png 2x, ../fb97ded30253c38699cbbb641c9509c4.png 3x`:`${x}, ../275dad5bb75568b1e5c6bf6c6770d971.png 2x, ../b27bf0a3031d7105a82487abfc1619de.png 3x`;break;case"numbers":n=t?U:j,r=t?`${U}, ../1657765d1dd7ee02505e09f5f91771b9.png 2x, ../186134741a5b28065daefb2fefa10b31.png 3x`:`${j}, ../63c21531581502804668d091023ad88f.png 2x, ../0a1a5b9cf5f392c5635720dac44158e2.png 3x`;break;case"keynote":n=t?z:F,r=t?`${z}, ../cf19184b6edcc3adb32a58f0db488187.png 2x, ../18cd67c6f20ed86365ea2b7ffe164d43.png 3x`:`${F}, ../9b78c87cf9bbc9c1a62f5333c5b1b565.png 2x, ../4734ef50b041d975b96cb0f7b9dba25d.png 3x`;break;case"newspublisher":n=H,r=`${H}, ../2c261ca566c0cc740e82454c61021a58.png 2x, ../9ce9e459cc259a5412c3338ec052906e.png 3x`;break;case"find":case"find-my-iphone":n=t?K:B,r=t?`${K}, ../b50ff355c13685c10d8e0f49aa6cf08b.png 2x, ../a3614288d977d0bab68dc8af927545ac.png 3x`:`${B}, ../3d8fabc9a48e13a4ca0a6c4802f953d0.png 2x, ../4b1d202db30e761fd0598fd17adc8ed1.png 3x`;break;case"invites":n=t?G:$,r=t?`${G}, ../9d3c97ecf2dd67cb7f3d8a310cebb09f.png 2x, ../82659ab11c2975fe2a108d4a2dcb7151.png 3x`:`${$}, ../ead49be0a4f0509ce63cbf527543f2e3.png 2x, ../a036f50d99421c086c352324b95c4a6b.png 3x`;break;case"messages":n=t?V:q,r=t?`${V}, ../e48deec6f5367be76a2ca2be1833be50.png 2x, ../b94a71bfb691eac627c489a6d4882de6.png 3x`:`${q}, ../931a6db85002eb27db4019317d7e2dc8.png 2x, ../1a2a8b0f56479b3052717c05dd48dbb0.png 3x`;break;case"homekit":n=t?Q:Z,r=t?`${Q}, ../ff85a06c1af119cfd9a3b16ce4d486f8.png 2x, ../e862e4c6efe8a3d80ca729c0984e4904.png 3x`:`${Z}, ../f73ddfcc54a52bc2b5ddcc6e4061e40c.png 2x, ../d8360834b4b203b2c94b02b331093a73.png 3x`;break;case"hidemyemail":n=t?J:Y,r=t?`${J}, ../c19f9189e93c20cc8ee7d2439b5e9fd4.png 2x, ../fbe0187f6c4d17f5085498ebc1a5a23a.png 3x`:`${Y}, ../9d83542c2684a8e082ea147cec01d638.png 2x, ../b68bcb93af108b8782112e78bb649283.png 3x`;break;case"privaterelay":n=t?ie:re,r=t?`${ie}, ../b8cc473f3fe77458ceb48e8bc70bff47.png 2x, ../41ca75aa21912f6f808386cc1d29a98d.png 3x`:`${re}, ../6260675ce3f53f57aead28e2c6f9de51.png 2x, ../1d3a8d4e93752f395ab77ba8ffae61a3.png 3x`;break;case"customdomainsettings":n=t?ee:X,r=t?`${ee}, ../e66ded8055ead4f12fde2cc7339e3fed.png 2x, ../0281cb93b4fef259c2f018dab3fff7a7.png 3x`:`${X}, ../4d98f8f78b2ca13bb0d6c7e18480fa90.png 2x, ../bc9b8654c43d0a1d7942b10a084bd31f.png 3x`;break;case"appLibrary":n=t?ne:te,r=t?`${ne}, ../bc1859d3eab6cd59e0ae61fd2b7b5e95.png 2x, ../aeda5349260dc1d3edb7d5fe7fde4ecf.png 3x`:`${te}, ../9bd034f6b4791b792f6151dd8af1f404.png 2x, ../7ee9a938f1b0505900574dc1e01bf1f6.png 3x`;break;case"backup":n=W,r=`${W}, ../95f9679c8292cdc2efafbdba8404aa9b.png 2x, ../9edd2ed9ffd78032c85d4a55f6dde79d.png 3x`;break;default:throw new Error(`No icon for application name or identifier: ${e}`)}return{icon:n,iconSrcSet:r}}(u,d);return r.createElement("div",{className:i,role:"presentation"},r.createElement("img",{src:f,srcSet:h,key:c,style:{width:a,height:a},"aria-hidden":"true",alt:"","data-testid":`${c}-app-icon`}),l&&r.createElement(ae,{appIconSize:a,count:e.badgeCount,"data-testid":`${e.badgeCount}`}))}},,function(e,t,n){"use strict";function r(e,t){return""!==e.stack&&!function(e){if(o.some((t=>t.test(e.stack))))return!0;if(e.message&&i.some((t=>t.test(e.message))))return!0;const t=e.stack.match(a);return null!==t&&!t.every(c)}(e)&&c(e.filename)}n.d(t,"a",(function(){return Au})),new WeakSet;const i=[/\b__gCrWeb\./,/\bzaloJSV2\b/,/\bIFrameMessageHandler\b/,/\bthis\.nodeType\b/,/\bShopify root\b/],o=[/^@user-script/,/<anonymous>:\d+/,/extension:\/\//,/^global code@/,/^UCWEBAppHandleIFrameElement/,/\bimtgo_WS/],a=/(https:\/\/[a-zA-Z0-9.]+\/)/g,s=[/https:\/\/[\w.-]+\.icloud\.com\//,/https:\/\/[\w.-]+\.icloud\.com\.cn\//,/https:\/\/[\w.-]+\.apple\.com\//,/https:\/\/[\w.-]+\.icloud-sandbox\.com\//,/https:\/\/[\w.-]+\.apple-cloudkit\.com\//,/https:\/\/[\w.-]+\.apple-mapkit\.com\//,/https:\/\/[\w.-]+\.cdn-apple\.com\//];function c(e){return s.some((t=>t.test(e)))}const u=/\/index\.html/;const l=/^(.*:\d+:\d+.*)$/m;function d(e){const t=e.match(l);return t?t[1]:""}const p=/(?:at (?:.+?\()?|@)(?<filename>.+):(?<lineNumber>\d+):(?<columnNumber>\d+)/;function f(e){const t=e.match(p);if(t)return t.groups}function h(e){return r(function(e){let t=e.reason,n="",r="";if(t&&t instanceof Error){"string"===typeof t.stack&&(r=t.stack);let{fileName:e,sourceURL:a}=t;if("string"===typeof a)n=a;else if("string"===typeof e)n=e;else if("string"===typeof r){var i,o;n=null!==(i=null===(o=f(r))||void 0===o?void 0:o.filename)&&void 0!==i?i:d(r)}return{filename:n,stack:r,error:t,message:t.message}}return{filename:n,stack:r,message:void 0}}(e))}var m=n(902),g=n(2249),v=n(911),y=n(2179),b=n(1247),w=n(1264),S=n(898),C=n(2241),_=n(2243),O=n(2209),E=n(1396),I=n(1284),A=n(1277),T=n(965),P=n(2155);const R=new I.a("AuthenticationServiceFromChildProtocol",new Set(["authenticateUser","unauthenticateUser","reauthenticateUser","retrieveSession","revalidateUser","cancelUserAuthenticate","unauthenticate"])),k=new I.a("AuthenticationServiceProtocol_v_0_0_1",new Set(["authenticate","unauthenticate"])),D=new I.a("AuthenticationServiceToChildProtocol",new Set(["retrieveSessionDidComplete","retrieveSessionDidCancel","authenticationStepDidComplete","authenticationDidComplete","authenticationDidCancel"]));class M{constructor(e){this.processReference=e,e.createMessagingChannel(R,this,D,void 0,e.messagingChannelClass),e.createListenerOnlyMessagingChannel(k,this,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}updateAuthenticationState(e){var t;const n=N(e);null===(t=this.processReference.remoteProxy)||void 0===t||t.authenticationStepDidComplete(n)}updateAuthenticationDidComplete(e){var t;const n=N(e);null===(t=this.processReference.remoteProxy)||void 0===t||t.authenticationDidComplete(n)}updateAuthenticationDidCancel(){var e;null===(e=this.processReference.remoteProxy)||void 0===e||e.authenticationDidCancel()}authenticate(){Object(T.a)()}unauthenticate(){Au.cloudOSApplication.unauthenticateUser({trustBrowserConfirmation:{hideCancelButton:!1}})}authenticateUser(){Object(T.a)()}unauthenticateUser(){this.unauthenticate()}reauthenticateUser(e,t,n,r){Object(T.m)(e,t,n,r).then((e=>{var t,n;e?null===(t=this.processReference.remoteProxy)||void 0===t||t.retrieveSessionDidComplete():null===(n=this.processReference.remoteProxy)||void 0===n||n.retrieveSessionDidCancel()}))}revalidateUser(){return E.a.sharedInstance.performRevalidate()}cancelUserAuthenticate(){Object(T.b)()}retrieveSession(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;Object(A.e)(t)||(t=1/0),Object(T.n)(e,t,n,r,i,o).then((e=>{var t,n;e?null===(t=this.processReference.remoteProxy)||void 0===t||t.retrieveSessionDidComplete(e):null===(n=this.processReference.remoteProxy)||void 0===n||n.retrieveSessionDidCancel()}))}}function N(e){const t=Object(T.e)().value;return{dsid:e.dsid,aDsID:e.alternateDSID,ageRestricted:e.ageRestricted,firstName:e.firstName,lastName:e.lastName,fullName:e.fullName,appleId:e.appleId,statusCode:e.statusCode,appleIdEntries:e.appleIdEntries,isManagedAppleID:e.isManagedAppleID,brMigrated:e.brMigrated,brZoneConsolidated:e.brZoneConsolidated,tantorMigrated:e.tantorMigrated,notesMigrated:e.notesMigrated,completedAuthenticationStep:e.completedAuthenticationStep,totalAuthenticationSteps:e.totalAuthenticationSteps,accountType:e.accountType,isWebAccessAllowed:Object(T.i)(),isICDRSDisabled:Object(T.f)(),isDeviceConsentedForPCS:null!==t,...null!==t&&{deviceConsentForPCSExpiry:null!==t&&void 0!==t?t:void 0},ICDRSCapableDeviceList:e.ICDRSCapableDeviceList,ICDRSCapableDeviceCount:e.ICDRSCapableDeviceCount,beneficiaryInfo:e.beneficiaryInfo,isHideMyEmailSubscriptionActive:e.isHideMyEmailSubscriptionActive,isCustomDomainTransferSubscriptionActive:e.isCustomDomainTransferSubscriptionActive,isCustomDomainPurchaseSubscriptionActive:e.isCustomDomainPurchaseSubscriptionActive,isPaidDeveloper:e.isPaidDeveloper,isNativeTakeOverLogin:P.f.value,isTiburonLogin:P.f.value,customEmailDomainServiceEndDate:e.customEmailDomainServiceEndDate,hasUnreleasedOS:e.hasUnreleasedOS,isCustomDomainsFeatureAvailable:e.isCustomDomainsFeatureAvailable,isHideMyEmailFeatureAvailable:e.isHideMyEmailFeatureAvailable,mailFlags:e.mailFlags,analyticsOptInStatus:e.analyticsOptInStatus,SBCapableDeviceCount:e.SBCapableDeviceCount}}const x=new I.a("ComposeServiceFromChildProtocol",new Set(["composeEmail","close","onBeforeSend"])),L=new I.a("ComposeServiceToChildProtocol",new Set(["invokeOnBeforeSendCallback"]));class j{constructor(e){this._instanceIds=[],this.processReference=e,e.createMessagingChannel(x,this,L,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}composeEmail(e){const t=function(e){const t=e%10,n=20+20*t,r=20+20*t+e/10*20;return{left:window.screenX+r,top:window.screenY+n,width:810,height:644}}(this._instanceIds.length);t.width=810,t.height=644;const n=w.a.sharedInstance.launchChildApplicationInWindow("compose",e,{...t,resizable:"yes",scrollbars:"auto",status:"no",menubar:"no",toolbar:"no",location:"no",directories:"no"},this);return n?(this._instanceIds.push(n),n):null}close(e){if(!e)throw"ComposeService: Need to pass instanceId";w.a.sharedInstance.terminateChildApplicationInstance("compose",e),this._instanceIds=this._instanceIds.filter((t=>e!==t))}onBeforeSend(e,t){return w.a.sharedInstance.invokeOnBeforeSendCallback(e,t)}invokeOnBeforeSendCallback(e,t){var n;return null===(n=this.processReference.remoteProxy)||void 0===n?void 0:n.invokeOnBeforeSendCallback(e,t)}}var U=n(919),F=n(2208),z=n(2251);const B=new I.a("URLRequestServiceProtocol",new Set(["didReceiveSpecialResponse","requestReceived","requestSent"]));class K{constructor(e,t,n){this.httpRequestReportingController=void 0,this.applicationInfo=void 0,this.httpRequestReportingController=e,this.applicationInfo=t.applicationInfo,n.createListenerOnlyMessagingChannel(B,this,void 0,n.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}didReceiveSpecialResponse(e,t,n,r){if(Object(z.c)(t),503===t){F.b.sharedInstance.recordStat(new U.a("childApplicationDisabled",{childAppIdentifier:this.applicationInfo.applicationName,serviceName:r.serviceName}));const e="number"===typeof r.retryAfter?r.retryAfter:0;Au.cloudOSApplication.terminateAndDisableCurrentChildApplication(e)}}requestSent(){}requestReceived(e,t,n,r){this.httpRequestReportingController.recordApplicationStat(e,t,n,r)}}var H=n(2248),W=n(465);function q(e){return t=this,n=void 0,i=function(){var t,n,r;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e()];case 1:return t=i.sent(),[3,3];case 2:return n=i.sent(),[2,W.Result.failure({code:"NetworkUnavailable",context:n.message,retryable:!0})];case 3:if(!t.ok)return[2,W.Result.failure({code:"FetchFailed",context:t,retryable:!0})];i.label=4;case 4:return i.trys.push([4,6,,7]),[4,t.json()];case 5:return r=i.sent(),[3,7];case 6:return i.sent(),[2,W.Result.failure({code:"MalformedJSON",retryable:!1})];case 7:return[2,W.Result.success(r)]}}))},new((r=void 0)||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(t){o(t)}}function s(e){try{c(i.throw(e))}catch(t){o(t)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}var V,$=n(1397),G=n.n($),Z=function(){function e(e,t){void 0===t&&(t=void 0),this._data=void 0,this._expires=0,this.search={},this.ttl=e,this.invalidate(),void 0!==t&&this.update(t)}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expires",{get:function(){return this._expires},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ttlRemaining",{get:function(){return Math.max(this.expires-Date.now(),0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExpired",{get:function(){return Date.now()>=this.expires},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){return this._expires=Date.now()-1,this},e.prototype.update=function(e){this._data=e;for(var t=0,n=Object.values(this.search);t<n.length;t++){var r=n[t];r.trie.clear(),r.initialized=!1}return this._expires=Date.now()+this.ttl,this},e.prototype.trie=function(e,t){return this.search[e]={trie:new G.a,builder:t,initialized:!1},this},e.prototype.find=function(e,t){var n=this.search[e];if(!n.initialized){var r=n.trie;if(this.data)for(var i=function(e,t){for(var n=0,i=Array.isArray(e)?e:[e];n<i.length;n++){var o=i[n];r.update(o,(function(e){return(e||[]).concat(t)}))}},o=0,a=n.builder(this.data);o<a.length;o++){var s=a[o];i(s[0],s[1])}n.initialized=!0}return n.trie.find(t)},e.prototype.findValues=function(e,t){var n=this.find(e,t).flatMap((function(e){return e[0],e[1]})).reduce((function(e,t){return e.add(t)}),new Set);return Array.from(n)},e}();!function(e){e[e.undecided=0]="undecided",e[e.none=1]="none",e[e.immediate=2]="immediate",e[e.background=3]="background"}(V||(V={}));var Q=function(){function e(e){if(0===e.length)throw new Error("No policies provided for ReloadAdviser");this.policies=e}return e.prototype.determineAction=function(e,t){var n=this;void 0===t&&(t={}),t=Object.freeze(t);var r=this.policies.length,i=-1,o=function(a){if((i+=1)>=r)return a;var s=Object.freeze({cache:e,flags:t,action:a});return n.policies[i].recommend(s,o)},a=o(V.undecided)||V.undecided;return a!==V.undecided?a:V.none},e}(),Y=function(){function e(e){void 0===e&&(e=.75),this.threshold=e}return e.prototype.recommend=function(e,t){if(e.cache.isExpired||e.action===V.immediate)return t(V.immediate);var n=e.cache,r=n.ttl,i=n.expires;return t(Math.max(i-Date.now(),0)<=r*(1-this.threshold)?V.background:e.action)},e}(),J=function(){function e(t){this.lastReloadRecommendation=-1/0,this.cooldownPeriod=t||e.defaultCooldownPeriod}return e.prototype.onCooldown=function(){return Date.now()<=this.lastReloadRecommendation+this.cooldownPeriod},e.prototype.recommend=function(e,t){if(e.cache.isExpired||e.action===V.immediate)return this.lastReloadRecommendation=-1/0,t(V.immediate);var n=e.flags.modifiedData;return!0!==(void 0!==n&&n)||this.onCooldown()?t(e.action):(this.lastReloadRecommendation=Date.now(),t(V.immediate))},e.defaultCooldownPeriod=1e4,e}(),X=function(){function e(){}return e.prototype.recommend=function(e,t){return!1===e.flags.expectLatest&&!0===e.cache.isExpired?t(V.background):t(e.action)},e}(),ee=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function te(e){return Object.entries(e).map((function(e){var t=e[0],n=e[1];return void 0!==n&&null!==n&&(""!==(n=String(n))?"".concat(t,"=").concat(n):t)})).filter((function(e){return!!e})).join("&")}var ne=function(e){function t(t){var n=e.call(this,t)||this;return n.name="TimeoutError",n}return ee(t,e),t}(Error);function re(e,t){return Promise.race([t,new Promise((function(t,n){setTimeout((function(){n(new ne("Promise timed out"))}),e)}))]).finally((function(){return clearTimeout(void 0)}))}function ie(e){return e.reduce((function(e,t){return!0===t.ok?e.success.push(t):e.failure.push(t),e}),{success:[],failure:[]})}function oe(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function ae(e){return("+"===e.trim()[0]?"+":"")+e.replace(/[^\d]+/g,"")}function se(e,t){return"string"===typeof t[e]?t[e]:""}function ce(e,t){return Array.isArray(t[e])?t[e]:[]}re.PromiseTimeoutError=ne;var ue=function(){return ue=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},ue.apply(this,arguments)},le=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},de=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},pe=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))},fe=function(e){var t=e.firstName,n=e.lastName,r=e.phoneticFirstName,i=e.phoneticLastName;return ue(ue(ue(ue(ue({},t&&{givenName:t}),n&&{familyName:n}),r&&{phoneticGivenName:r}),i&&{phoneticFamilyName:i}),e)},he=function(){function e(e,t){void 0===t&&(t={}),this.endpoint="/co/addressbook",this.loader=void 0,this.cloudOSDelegate=e,this.cache=new Z(t.cacheTTL||3e5),this.reloadAdviser=new Q([new J(5e3),new Y(.75),new X]),this.cache.trie("any",(function(e){return pe(pe([],e.contacts,!0),e.groups,!0).map((function(e){return[ve(e),e]}))})),this.cache.trie("contacts",(function(e){return e.contacts.map((function(e){return[me(e),e]}))})),this.cache.trie("contactsByEmail",(function(e){return e.contacts.map((function(e){return[ye(e),e]}))})),this.cache.trie("contactsByPhone",(function(e){return e.contacts.map((function(e){return[be(e),e]}))}))}return Object.defineProperty(e.prototype,"serviceName",{get:function(){return e.serviceName},enumerable:!1,configurable:!0}),e.prototype.buildWebServiceURL=function(e){void 0===e&&(e={});var t=this.cloudOSDelegate.urlForService,n=new globalThis.URL(t(this.serviceName,""));return n.pathname=this.endpoint,n.search=te(e),n},e.prototype.findAnyMatchingText=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,r;return de(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("any",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingText=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,r;return de(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("contacts",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingEmailAddress=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,r;return de(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingPhoneNumber=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,r;return de(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("contactsByPhone",ae(e.toLowerCase())))]):[2,n]}}))}))},e.prototype.findContactsForGroup=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,r,i;return de(this,(function(o){switch(o.label){case 0:return[4,this.loadData(t)];case 1:return!1===(n=o.sent()).ok?[2,n]:(r=n.value.data.groups,i=(void 0===r?[]:r).find((function(t){return t.groupId===e.groupId})),[2,W.Result.success(void 0!==i&&i.contacts||[])])}}))}))},e.prototype.getAddressBookContacts=function(e){return void 0===e&&(e={}),le(this,void 0,void 0,(function(){var t,n;return de(this,(function(r){switch(r.label){case 0:return[4,this.loadData(e)];case 1:return!0!==(t=r.sent()).ok?[2,t]:(n=t.value.data,[2,W.Result.success(n?n.contacts:[])])}}))}))},e.prototype.preload=function(){return le(this,void 0,void 0,(function(){var e;return de(this,(function(t){switch(t.label){case 0:return[4,this.loadData()];case 1:return!0!==(e=t.sent()).ok?[2,e]:[2,W.Result.success(!0)]}}))}))},e.prototype.loadData=function(e){return void 0===e&&(e={}),le(this,void 0,void 0,(function(){var t,n=this;return de(this,(function(r){return(t=this.reloadAdviser.determineAction(this.cache,e))===V.none?[2,W.Result.success(this.cache)]:(this.loader||(this.loader=new Promise((function(e){n.fetchData().then((function(t){if(!0!==t.ok)e(t);else{var r=t.value,i=r.contacts,o=void 0===i?[]:i,a=r.groups,s=void 0===a?[]:a;s=function(e,t){var n=new Map(t.map((function(e){return[e.contactId,e]})));return e.map((function(e){var t=new Set;if(void 0!==e.contactIds)for(var r=0,i=e.contactIds;r<i.length;r++){var o=i[r],a=n.get(o);void 0!==a&&t.add(a)}return e.contacts=Array.from(t),e}))}(s,o=o.map(fe)),n.cache.update({contacts:o,groups:s}),n.loader=void 0,e(W.Result.success(n.cache))}}))}))),t===V.background?[2,W.Result.success(this.cache)]:[2,this.loader])}))}))},e.prototype.fetchData=function(){return le(this,void 0,void 0,(function(){var e,t,n,r,i,o=this;return de(this,(function(a){switch(a.label){case 0:return[4,this.cloudOSDelegate.getLocale()];case 1:return e=a.sent(),t=Se(e),n=we(e),r={locale:t,order:n,includePhoneNumbers:!0,includePhotos:!0},[4,q((function(){var e=o.buildWebServiceURL(r);return o.cloudOSDelegate.fetchWebServiceURL(e.toString(),{})}))];case 2:return(i=a.sent()).ok?[2,W.Result.success({contacts:i.value.contacts,groups:i.value.groups})]:[2,i]}}))}))},e.serviceName="contacts",e}(),me=function(e){return pe(pe(pe([se("firstName",e),se("lastName",e),se("phoneticFirstName",e),se("phoneticLastName",e),se("companyName",e),se("nickName",e)],ge(e),!0),ye(e),!0),be(e),!0).filter(Boolean).map(oe)},ge=function(e){return[se("firstName",e)&&se("lastName",e)?"".concat(se("firstName",e)," ").concat(se("lastName",e)):"",se("phoneticFirstName",e)&&se("phoneticLastName",e)?"".concat(se("phoneticFirstName",e)," ").concat(se("phoneticLastName",e)):""].filter(Boolean).map(oe)},ve=function(e){return pe([se("name",e)],me(e),!0).filter(Boolean).map(oe)},ye=function(e){return ce("emailAddresses",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(oe)},be=function(e){return ce("phones",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(ae)},we=function(e){return"ja-jp"===e||"ko-kr"===e||"zh-cn"===e||"zh-tw"===e||"hu-hu"===e?"first,last":"last,first"},Se=function(e){return e.replace(/(.*)-(.*)$/,(function(e,t,n){return"".concat(t,"_").concat(n.toUpperCase())}))},Ce=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},_e=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Oe=function(){function e(e,t){void 0===t&&(t={}),this.recentRequestCount=0,this.loader=void 0,this.cloudOSDelegate=e,this.cache=new Z(t.cacheTTL||3e5),this.reloadAdviser=new Q([new J(5e3),new Y(.75),new X]),this.cache.trie("contacts",(function(e){return e.map((function(e){return[Ee(e),e]}))})),this.cache.trie("contactsByEmail",(function(e){return e.map((function(e){return[Ie(e),e]}))}))}return Object.defineProperty(e.prototype,"serviceName",{get:function(){return e.serviceName},enumerable:!1,configurable:!0}),e.prototype.buildEndpoint=function(e){return"/cc/mail/v1/account/".concat(e,"/preference/recents")},e.prototype.buildWebServiceURL=function(e,t){void 0===t&&(t={});var n=this.cloudOSDelegate.urlForService,r=new globalThis.URL(n(this.serviceName,""));return r.pathname=this.buildEndpoint(e),r.search=te(t),r},e.prototype.findAnyMatchingText=function(e,t){return void 0===t&&(t={}),Ce(this,void 0,void 0,(function(){return _e(this,(function(n){return[2,this.findContactsMatchingText(e,t)]}))}))},e.prototype.findContactsMatchingText=function(e,t){return void 0===t&&(t={}),Ce(this,void 0,void 0,(function(){var n,r;return _e(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("contacts",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingEmailAddress=function(e,t){return void 0===t&&(t={}),Ce(this,void 0,void 0,(function(){var n,r;return _e(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,W.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.loadData=function(e){return void 0===e&&(e={}),Ce(this,void 0,void 0,(function(){var t,n=this;return _e(this,(function(r){return(t=this.reloadAdviser.determineAction(this.cache,e))===V.none?[2,W.Result.success(this.cache)]:(this.loader||(this.loader=new Promise((function(e){n.fetchData().then((function(t){if(!0!==t.ok)e(t);else{var r=t.value.recipients;n.cache.update(r),n.loader=void 0,e(W.Result.success(n.cache))}}))}))),t===V.background?[2,W.Result.success(this.cache)]:[2,this.loader])}))}))},e.prototype.fetchData=function(){return Ce(this,void 0,void 0,(function(){var e,t=this;return _e(this,(function(n){switch(n.label){case 0:return[4,this.cloudOSDelegate.getDSID()];case 1:return e=n.sent(),[2,q((function(){var n=t.buildWebServiceURL(e);return t.cloudOSDelegate.fetchWebServiceURL(n.href,{})}))]}}))}))},e.prototype.preload=function(){return Ce(this,void 0,void 0,(function(){var e;return _e(this,(function(t){switch(t.label){case 0:return[4,this.loadData()];case 1:return!0!==(e=t.sent()).ok?[2,e]:[2,W.Result.success(!0)]}}))}))},e.serviceName="mcc",e}(),Ee=function(e){return e.recipients.flatMap((function(e){return[se("recipientName",e),se("recipientEmail",e)].filter(Boolean).map(oe)}))},Ie=function(e){return e.recipients.flatMap((function(e){return[se("recipientEmail",e)].filter(Boolean).map(oe)}))},Ae=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Te=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};function Pe(e,t){return Ae(this,void 0,void 0,(function(){var n;return Te(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,re(e,t)];case 1:return[2,r.sent()];case 2:return(n=r.sent())instanceof re.PromiseTimeoutError?[2,W.Result.success([])]:[2,W.Result.failure({code:"ServiceUnavailable",context:n.message,retryable:!0})];case 3:return[2]}}))}))}var Re=function(){function e(e,t){void 0===t&&(t={}),this.dataProviders=e,this.timeLimit=t.backendTimeLimit||1e3}return e.prototype.preload=function(){return Ae(this,void 0,void 0,(function(){var e,t;return Te(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.dataProviders.map((function(e){return e.preload()})))];case 1:return e=n.sent(),(t=ie(e).failure).length===e.length?[2,W.Result.failure({code:"PreloadFailed",retryable:!0})]:[2,W.Result.success({complete:0===t.length})]}}))}))},e.prototype.findAnyMatchingText=function(e,t){return void 0===t&&(t={}),Ae(this,void 0,void 0,(function(){var n,r,i,o,a,s=this;return Te(this,(function(c){switch(c.label){case 0:return n=this.dataProviders,[4,Promise.all(n.map((function(n){return Pe(s.timeLimit,n.findAnyMatchingText(e,t))})))];case 1:return r=c.sent(),i=ie(r),o=i.success,(a=i.failure).length===r.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))})]}}))}))},e.prototype.findContactsMatchingText=function(e,t){return void 0===t&&(t={}),Ae(this,void 0,void 0,(function(){var n,r,i,o,a,s=this;return Te(this,(function(c){switch(c.label){case 0:return n=this.dataProviders,[4,Promise.all(n.map((function(n){return Pe(s.timeLimit,n.findContactsMatchingText(e,t))})))];case 1:return r=c.sent(),i=ie(r),o=i.success,(a=i.failure).length===r.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))})]}}))}))},e.prototype.findContactsMatchingEmailAddress=function(e,t){return void 0===t&&(t={}),Ae(this,void 0,void 0,(function(){var n,r,i,o,a,s=this;return Te(this,(function(c){switch(c.label){case 0:return n=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsMatchingEmailAddress})),[4,Promise.all(n.map((function(n){return Pe(s.timeLimit,n.findContactsMatchingEmailAddress(e,t))})))];case 1:return r=c.sent(),i=ie(r),o=i.success,(a=i.failure).length===r.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))})]}}))}))},e.prototype.findContactsMatchingPhoneNumber=function(e,t){return void 0===t&&(t={}),Ae(this,void 0,void 0,(function(){var n,r,i,o,a,s=this;return Te(this,(function(c){switch(c.label){case 0:return n=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsMatchingPhoneNumber})),[4,Promise.all(n.map((function(n){return Pe(s.timeLimit,n.findContactsMatchingPhoneNumber(e,t))})))];case 1:return r=c.sent(),i=ie(r),o=i.success,(a=i.failure).length===r.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))})]}}))}))},e.prototype.findContactsForGroup=function(e,t){return void 0===t&&(t={}),Ae(this,void 0,void 0,(function(){var n,r,i,o,a,s=this;return Te(this,(function(c){switch(c.label){case 0:return n=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsForGroup})),[4,Promise.all(n.map((function(n){return Pe(s.timeLimit,n.findContactsForGroup(e,t))})))];case 1:return r=c.sent(),i=ie(r),o=i.success,(a=i.failure).length===r.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))})]}}))}))},e.prototype.getAddressBookContacts=function(e){return void 0===e&&(e={}),Ae(this,void 0,void 0,(function(){var t,n,r,i,o;return Te(this,(function(a){switch(a.label){case 0:return t=this.dataProviders.filter((function(e){return"function"===typeof e.getAddressBookContacts})),[4,Promise.all(t.map((function(t){return t.getAddressBookContacts(e)})))];case 1:return n=a.sent(),r=ie(n),i=r.success,(o=r.failure).length===n.length?[2,W.Result.failure({code:"LookupFailed",retryable:!0})]:[2,W.Result.success({complete:0===o.length,items:i.flatMap((function(e){return e.value}))})]}}))}))},e}(),ke=n(973);const De=new I.a("ContactsLookupServiceProtocol",new Set(["findAnyMatchingText","findContactsMatchingText","findContactsMatchingEmailAddress","findContactsMatchingPhoneNumber","findContactsForGroup","getAddressBookContacts","preload"]));class Me{constructor(e){this.contactsLookup=void 0;const t=[],n=P.h.value;if(null!==n&&void 0!==n&&n.isAuthenticationComplete){const e=null===n||void 0===n?void 0:n.details,r={getLocale:async()=>S.a.locale,async getDSID(){var t;return null!==(t=null===e||void 0===e?void 0:e.dsid)&&void 0!==t?t:"-1"},urlForService:H.j,fetchWebServiceURL:async(e,t,n)=>await ke.a.fetchURLWithRetry(e,t,n)};t.push(new he(r));const i=Oe.serviceName;i&&Object(H.e)(i)&&Object(H.g)(i)&&t.push(new Oe(r))}this.contactsLookup=new Re(t),e.createListenerOnlyMessagingChannel(De,this,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}findAnyMatchingText(e,t){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.findAnyMatchingText(e,t)}findContactsMatchingText(e,t){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.findContactsMatchingText(e,t)}findContactsMatchingEmailAddress(e,t){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.findContactsMatchingEmailAddress(e,t)}findContactsMatchingPhoneNumber(e,t){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.findContactsMatchingPhoneNumber(e,t)}findContactsForGroup(e,t){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.findContactsForGroup(e,t)}getAddressBookContacts(e){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.getAddressBookContacts(e)}preload(){return F.b.sharedInstance.recordStatOnce(new U.a("LegacyContactsLookupService")),this.contactsLookup.preload()}}var Ne=n(987),xe=n(884);const Le=new I.a("MeCardServiceFromChildProtocol",new Set(["fetchMeCard","deleteMeCardPhoto","storeMeCardPhoto"])),je=new I.a("MeCardServiceToChildProtocol",new Set(["didFetchMeCard","didDeleteMeCardPhoto","failedToDeleteMeCardPhoto","didStoreMeCardPhoto","failedToStoreMeCardPhoto"]));class Ue{constructor(e){var t;this.handleChange=()=>{this.sendMeCard()},this._storeMeCardPhoto=async e=>{(async(t,n)=>{const r=((e,t)=>{const n=null!==(e=null===(t=P.h.value)||void 0===t?void 0:t.details)&&void 0!==e?e:null;return Object(xe.a)(n)})();var i;if(!r)return void(null===(i=this.processReference.remoteProxy)||void 0===i||i.failedToStoreMeCardPhoto());const o=await(null===(t=Object(Ne.b)())||void 0===t?void 0:t.storePhoto(r,e));var a;o?null===(n=this.processReference.remoteProxy)||void 0===n||n.didStoreMeCardPhoto(o):null===(a=this.processReference.remoteProxy)||void 0===a||a.failedToStoreMeCardPhoto()})()},this.processReference=e,e.createMessagingChannel(Le,this,je,void 0,e.messagingChannelClass),null===(t=Object(Ne.b)())||void 0===t||t.addEventListener("change",this.handleChange)}serviceWasRegistered(){}serviceWasRemoved(){}sendMeCard(){var e,t;null===(e=this.processReference.remoteProxy)||void 0===e||e.didFetchMeCard(null===(t=Object(Ne.b)())||void 0===t?void 0:t.meCard)}fetchMeCard(){var e,t;(null===(e=Object(Ne.b)())||void 0===e?void 0:e.meCard)?this.sendMeCard():null===(t=Object(Ne.b)())||void 0===t||t.refresh()}deleteMeCardPhoto(){(async e=>{var t,n;await(null===(e=Object(Ne.b)())||void 0===e?void 0:e.deletePhoto())?null===(t=this.processReference.remoteProxy)||void 0===t||t.didDeleteMeCardPhoto():null===(n=this.processReference.remoteProxy)||void 0===n||n.failedToDeleteMeCardPhoto()})()}storeMeCardPhoto(e){this._storeMeCardPhoto(e)}}const Fe=new I.a("LegacyMeCardServiceFromChildProtocol",new Set(["meCardUpdated","requestMeCard","storeMeCardPhoto","deleteMeCardPhoto"])),ze=new I.a("LegacyMeCardServiceToChildProtocol",new Set(["receiveMeCard"]));class Be{constructor(e){this.processReference=e,e.createMessagingChannel(Fe,this,ze,void 0,e.legacyMessagingChannelClass);const t=Object(Ne.b)();null===t||void 0===t||t.addEventListener("change",(()=>{const e=null===t||void 0===t?void 0:t.meCard;e&&this.sendReceiveMeCard(e)}))}serviceWasRegistered(){}serviceWasRemoved(){}sendReceiveMeCard(e){var t;const n=0===e.contacts.length?null:null!==(r=e.contacts[0].photo)&&void 0!==r?r:null;var r;n&&(null===(t=this.processReference.remoteProxy)||void 0===t||t.receiveMeCard([{photoUrl:n.url,photoSignature:n.signature,...n.crop&&{photoCrop:n.crop}}]))}meCardUpdated(){var e;null===(e=Object(Ne.b)())||void 0===e||e.refresh()}requestMeCard(){const e=Object(Ne.b)(),t=null===e||void 0===e?void 0:e.meCard;t?this.sendReceiveMeCard(t):null===e||void 0===e||e.refresh()}deleteMeCardPhoto(){var e;null===(e=Object(Ne.b)())||void 0===e||e.deletePhoto()}storeMeCardPhoto(e,t){var n;const r=((e,t)=>{const n=null!==(e=null===(t=P.h.value)||void 0===t?void 0:t.details)&&void 0!==e?e:null;return Object(xe.a)(n)})();r&&(null===(n=Object(Ne.b)())||void 0===n||n.storePhoto(r,t))}}var Ke=n(981);const He=new I.a("QuotaServiceFromChildProtocol",new Set(["fetchStorageQuota"])),We=new I.a("QuotaServiceToChildProtocol",new Set(["didFetchStorageQuota","failedToFetchStorageQuota"]));class qe{constructor(e){this.quotaController=void 0,this.processReference=e,this.quotaController=new Ke.QuotaController,e.createMessagingChannel(He,this,We,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}fetchStorageQuota(){this._fetchStorageQuota()}async _fetchStorageQuota(){const e=await this.quotaController.fetchStorageQuota();var t,n;e?null===(t=this.processReference.remoteProxy)||void 0===t||t.didFetchStorageQuota(e):null===(n=this.processReference.remoteProxy)||void 0===n||n.failedToFetchStorageQuota()}}const Ve=new I.a("LegacyQuotaServiceFromChildProtocol",new Set(["refreshQuotaData"])),$e=new I.a("LegacyQuotaServiceToChildProtocol",new Set(["_cloudOSStateChange","quotaDataDidChange","quotaDataFailedToLoad"]));class Ge{constructor(e){this.quotaController=void 0,this.processReference=e,this.quotaController=new Ke.QuotaController,e.createMessagingChannel(Ve,this,$e,void 0,e.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}refreshQuotaData(){this._refreshQuotaData()}async _refreshQuotaData(){var e;const t=await(null===(e=this.quotaController)||void 0===e?void 0:e.fetchStorageQuota());var n,r,i;t?(null===(n=this.processReference.remoteProxy)||void 0===n||n._cloudOSStateChange([{quotaData:{overQuota:t.quotaStatus.overQuota,haveMaxQuotaTier:t.quotaStatus.haveMaxQuotaTier,"almost-full":t.quotaStatus["almost-full"],paidQuota:t.quotaStatus.paidQuota,compStorageInBytes:t.storageUsageInfo.compStorageInBytes,usedStorageInBytes:t.storageUsageInfo.usedStorageInBytes,totalStorageInBytes:t.storageUsageInfo.totalStorageInBytes,commerceStorageInBytes:t.storageUsageInfo.commerceStorageInBytes,storageUsageByMedia:t.storageUsageByMedia,familyStorageUsageInfo:t.storageUsageInfo}}]),null===(r=this.processReference.remoteProxy)||void 0===r||r.quotaDataDidChange()):null===(i=this.processReference.remoteProxy)||void 0===i||i.quotaDataFailedToLoad()}}const Ze=new I.a("CoreTypesServiceFromChildProtocol",new Set(["fetchConformingTypes","fetchIcon"])),Qe=new I.a("CoreTypesServiceToChildProtocol",new Set(["didFetchConformingTypes","failedToFetchConformingTypes"]));class Ye{constructor(e,t){this.coreTypesController=void 0,this.processReference=t,this.coreTypesController=e,t.createMessagingChannel(Ze,this,Qe,void 0,t.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}fetchConformingTypes(e){const t=this.coreTypesController.getConformingTypes(e);var n,r;t&&t.length>0?null===(n=this.processReference.remoteProxy)||void 0===n||n.didFetchConformingTypes(t):null===(r=this.processReference.remoteProxy)||void 0===r||r.failedToFetchConformingTypes()}fetchIcon(e,t,n,r){return this.coreTypesController.fetchIcon(e,t,null!==n&&void 0!==n?n:window.devicePixelRatio,r)}}const Je=new I.a("LegacyCoreTypesServiceFromChildProtocol",new Set(["fetchIcon","getConformingTypes"]));class Xe{constructor(e,t){this.coreTypesController=void 0,this.coreTypesController=e,t.createListenerOnlyMessagingChannel(Je,this,void 0,t.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}fetchIcon(e,t,n,r,i){return this.coreTypesController.fetchIcon(t,n,null!==r&&void 0!==r?r:window.devicePixelRatio,i)}getConformingTypes(e,t){return this.coreTypesController.getConformingTypes(t)}}var et=n(1253),tt=n(2180);const nt=new I.a("LegacyStartupInfoServiceFromChildProtocol",new Set(["setStartupInfo","setStartupUrl","startupDataIsLoaded"])),rt=new I.a("LegacyStartupInfoServiceToChildProtocol",new Set(["didFetchStartup"]));class it{constructor(e,t){this.appName=e,this.processReference=t,t.createMessagingChannel(nt,this,rt,void 0,t.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}setStartupUrl(e,t){return this.setStartupInfo(e,Object(et.a)(t))}setStartupInfo(e,t){t?(()=>{const e=tt.b.getStartupInfoForApp(this.appName);return!e||t.url!==e.url||t.method!==e.method||t.requestPayload!==e.requestPayload})()&&tt.b.setStartupInfoForApp(this.appName,t):tt.b.clearStartupInfoForApp(this.appName)}startupDataIsLoaded(){}didFetchStartup(e,t){var n;null===(n=this.processReference.remoteProxy)||void 0===n||n.didFetchStartup(e,t)}}const ot=new I.a("BannerServiceFromChildProtocol",new Set(["setAppBanner"])),at=new I.a("BannerServiceToChildProtocol",new Set(["didSetAppBanner","failedToSetAppBanner"]));class st{constructor(e,t){this.linkHref=null,this.bannerController=void 0,this.processReference=t,this.bannerController=e,t.createMessagingChannel(ot,this,at,void 0,t.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}setAppBanner(e,t,n,r,i){this.linkHref=null!==i&&void 0!==i?i:null;const o=this.bannerController.setCurrentBannerForApp(e,t,n,(()=>this.bannerActionDidClick()),r||void 0,"link");var a,s;return o?null===(a=this.processReference.remoteProxy)||void 0===a||a.didSetAppBanner(o):null===(s=this.processReference.remoteProxy)||void 0===s||s.failedToSetAppBanner(),o}bannerActionDidClick(){const e=this.linkHref;e&&(Object(v.a)(e,{target:"_blank",features:[]}),this.linkHref=null)}}var ct=n(1398);const ut=new I.a("LegacyPreferencesServiceFromChildProtocol",new Set(["refreshAppPreferences","setAccountPreference","setAppPreferences"])),lt=new I.a("LegacyPreferencesServiceToChildProtocol",new Set(["_cloudOSStateChange","appPreferencesDidChange"]));class dt{constructor(e,t,n){this.applicationInfo=void 0,this.localizationController=void 0,this.processReference=n,this.applicationInfo=e.applicationInfo,this.localizationController=t,n.createMessagingChannel(ut,this,lt,void 0,n.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}refreshAppPreferences(e){var t,n;const r=this.applicationInfo.authBagId;null===(t=this.processReference.remoteProxy)||void 0===t||t._cloudOSStateChange([{appPreferences:{[r]:tt.b.getPreferences(r)}}]),null===(n=this.processReference.remoteProxy)||void 0===n||n.appPreferencesDidChange()}setAccountPreference(e,t,n){this._setAccountPreference(t,n)}async _setAccountPreference(e,t){const n=tt.b.getAccountPreferences();if(n){switch(e){case"locale":n.locale=t;break;case"secondaryLocale":n.secondaryLocale=t;break;case"regionFormat":n.regionFormat=t;break;case"timeZone":n.timeZone=t}var r;(await tt.b.setAccountPreferences(n)).isOK&&("locale"===e?this.localizationController.setCurrentLocaleAndRegionFormat(t,null!==(r=n.regionFormat)&&void 0!==r?r:null):"secondaryLocale"===e?this.localizationController.setSecondaryLocale(t):"regionFormat"===e&&this.localizationController.setCurrentLocaleAndRegionFormat(S.a.locale,t))}}setAppPreferences(e,t){this._setAppPreferences(t)}async _setAppPreferences(e){var t,n;const r=this.applicationInfo.authBagId;(await tt.b.setPreferences(r,e)).isOK&&(null===(t=this.processReference.remoteProxy)||void 0===t||t._cloudOSStateChange([{appPreferences:{[r]:tt.b.getPreferences(r)}}]),null===(n=this.processReference.remoteProxy)||void 0===n||n.appPreferencesDidChange())}}var pt=n(912),ft=n(918),ht=n(916),mt=n(903);const gt=new I.a("LegacyTelemetryServiceFromChildProtocol",new Set(["beginStat","endStat","recordApplicationMessage","recordStat","recordPerfStat","didReceiveSpecialResponse","requestSent","requestReceived"]));class vt{constructor(e,t,n,r){this.validateCount=0,this.applicationInfo=void 0,this.telemetryClient=void 0,this.httpRequestReportingController=void 0,this.stats=new Map,this.applicationInfo=e.applicationInfo,this.httpRequestReportingController=n,this.telemetryClient=t,r.createListenerOnlyMessagingChannel(gt,this,void 0,r.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}beginStat(e,t,n){const r=this.applicationInfo.applicationName,i=Object(ft.c)(r,e.masteringNumber,e.buildNumber,ht.a.sharedInstance.identifier,S.a.hostname,S.a.locale,mt.c.sharedInstance.primaryInteractionMode,t,n),o=this.stats.get(r);if(o)o.has(t)||o.set(t,{stat:i,startTime:Date.now()});else{const e=new Map;e.set(t,{stat:i,startTime:Date.now()}),this.stats.set(r,e)}}endStat(e,t,n){const r=this.applicationInfo.applicationName,i=this.stats.get(r);if(!i)return;const o=i.get(t);o&&(this.telemetryClient.recordStat({masteringNumber:e.masteringNumber,buildNumber:e.buildNumber,duration:Date.now()-o.startTime,...o.stat,...n}),i.delete(t))}recordApplicationMessage(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.recordStat(e,t,n)}recordStat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.applicationInfo.applicationName,i=".errorCatcherWasDisplayed"===t&&!1===(null===n||void 0===n?void 0:n.isFatal)?".errorCatcherWasDisplayedNonFatal":t;n.fullStatName=`${r}${i}`;try{const i=Object(ft.c)(r,e.masteringNumber,e.buildNumber,ht.a.sharedInstance.identifier,S.a.hostname,S.a.locale,mt.c.sharedInstance.primaryInteractionMode,t,n);this.telemetryClient.recordStat(i)}catch(o){const i=Object(ft.a)(o,{applicationName:r,masteringBuildNumber:e.masteringNumber,statName:t,parameters:n});this.telemetryClient.recordStat(i)}}recordPerfStat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.applicationInfo.applicationName;n.fullStatName=`${r}${t}`;try{if(t.startsWith(`${r}.`)||(t=`${r}.${t}`),!n||null===n.duration||void 0===n.duration)throw new Error("TelemetryService: _recordStat: No duration specified for a Perf Stat.");const i=Object(ft.b)(r,e.masteringNumber,e.buildNumber,ht.a.sharedInstance.identifier,S.a.hostname,S.a.locale,mt.c.sharedInstance.primaryInteractionMode,t,n);this.telemetryClient.recordPerfStat(i)}catch(i){const o=Object(ft.a)(i,{applicationName:r,masteringBuildNumber:e.masteringNumber,buildNumber:e.buildNumber,statName:t,parameters:n,statType:pt.b.PERF_STAT});this.telemetryClient.recordStat(o)}}didReceiveSpecialResponse(e,t,n,r){switch(t){case 330:if(this.validateCount=this.validateCount?++this.validateCount:1,this.validateCount>3)return void window.setTimeout((()=>{this.validateCount=0}),1e4);Object(T.s)();break;case 403:case 421:case 401:P.h.value&&Au.cloudOSApplication.unauthenticateUser({trustBrowserConfirmation:!1});break;case 503:{F.b.sharedInstance.recordStat(new U.a("childApplicationDisabled",{childAppIdentifier:this.applicationInfo.applicationName,serviceName:r.serviceName}));const e="number"===typeof r.retryAfter?r.retryAfter:0;Au.cloudOSApplication.terminateAndDisableCurrentChildApplication(e);break}}}requestSent(e){}requestReceived(e,t,n,r){this.httpRequestReportingController.recordLegacyApplicationStat({appName:this.applicationInfo.applicationName,masteringNumber:e.masteringNumber,buildNumber:e.buildNumber},t,n,r)}}var yt=n(1357),bt=n(900);const wt=new I.a("LegacyAppUrlServiceFromChildProtocol",new Set([])),St=new I.a("LegacyAppUrlServiceToChildProtocol",new Set([]));class Ct{constructor(e){this.processReference=e,e.createMessagingChannel(wt,this,St,void 0,e.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}fetchAppUrl(e,t,n){let r="";const i=b.a.sharedInstance.getApplicationInfo(n);var o,a;i&&(r=Object(S.b)(S.a.protocol,S.a.hostname,S.a.locale,i.path,null!==(o=C.a.sharedInstance.port)&&void 0!==o?o:void 0,"index.html",bt.a.sharedInstance.current.rootDomain)),r&&(null===(a=this.processReference.remoteProxy)||void 0===a||a.didFetchAppUrl(t,r))}}const _t=new I.a("LegacyCloudKitResolutionServiceFromChildProtocol",new Set(["resolveCKShortGUID"]));class Ot{constructor(e){e.createListenerOnlyMessagingChannel(_t,this,void 0,e.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}resolveCKShortGUID(){console.warn("Unhandled cloudos1 message: resolveCKShortGUID")}}const Et=new I.a("LegacyRegionFormatterServiceFromChildProtocol",new Set(["loadRulesForRegions"]));class It{constructor(e){e.createListenerOnlyMessagingChannel(Et,this,void 0,e.legacyMessagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}loadRulesForRegions(){console.warn("Unhandled cloudos1 message: loadRulesForRegions")}}const At=new I.a("PreferencesServiceFromChildProtocol",new Set(["setPreferences"])),Tt=new I.a("PreferencesServiceToChildProtocol",new Set(["preferencesDidUpdate"]));class Pt{constructor(e){this.processReference=e,e.createMessagingChannel(At,this,Tt,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}setPreferences(e){tt.b.setRawPreferences(e)}preferencesDidUpdate(e){var t;null===(t=this.processReference.remoteProxy)||void 0===t||t.preferencesDidUpdate(e)}}var Rt=n(2213),kt=n(2212);const Dt=new I.a("PCSKeyServiceFromChildProtocol",new Set(["fetchPCSKeys","hasPCSKeys"])),Mt=new I.a("PCSKeyServiceToChildProtocol",new Set(["didHavePCSKeys","didFetchPCSKeys","failedToFetchPCSKeys"]));class Nt{constructor(e){this.processReference=e,e.createMessagingChannel(Dt,this,Mt,void 0,e.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}fetchPCSKeys(e){var t;kt.a.sharedInstance.hasPCSKey(e)?null===(t=this.processReference.remoteProxy)||void 0===t||t.didFetchPCSKeys(e):(async()=>{try{var t,n;await Au.cloudOSApplication.showADPModal(e,e,!1)?null===(t=this.processReference.remoteProxy)||void 0===t||t.didFetchPCSKeys(e):null===(n=this.processReference.remoteProxy)||void 0===n||n.failedToFetchPCSKeys(e)}catch{var r;null===(r=this.processReference.remoteProxy)||void 0===r||r.failedToFetchPCSKeys(e)}})()}hasPCSKeys(e){var t;const n=kt.a.sharedInstance.hasPCSKey(e);null===(t=this.processReference.remoteProxy)||void 0===t||t.didHavePCSKeys(e,n)}}var xt=n(978);let Lt=1;const jt="com.apple.icloud.cloudos.CloudOSApplication";class Ut{constructor(){this.bannersById=new Map,this.bannersByAppName=new Map}displayBanner(e,t,n,r,i){return this._displayBanner(!1,jt,e,t,n,r,i)}displayBannerForApp(e,t,n,r,i,o){return this._displayBanner(!1,e,t,n,r,i,o)}setCurrentBanner(e,t,n,r,i){return this._displayBanner(!0,jt,e,t,n,r,i)}setCurrentBannerForApp(e,t,n,r,i,o){return this._displayBanner(!0,e,t,n,r,i,o)}removeBanner(e){const t=this.bannersById.get(e);if(!t)return;this.bannersById.delete(e);const n=t.appName,r=this.bannersByAppName.get(n);if(r){const t=r.findIndex((t=>t.bannerId===e));-1!==t&&(r.splice(t,1),0===r.length&&this.bannersByAppName.delete(n))}this.showNextBanner(n)}updateBanner(e,t,n){var r;const i=null===(r=this.bannersById.get(e))||void 0===r?void 0:r.bannerData;i&&(i.title=t,i.description=n,Au.cloudOSApplication.showBanner(i))}bannerActionDidClick(e){const t=Object(xt.c)(xt.b);Object(v.a)(t)}_displayBanner(e,t,n,r,i,o,a){const s="bannerId-"+Lt++,c={bannerId:s,appName:t,bannerData:{bannerId:s,title:n,description:r,onClick:i,buttonTitle:o,buttonType:a},isOfHighPriority:e};this.bannersById.set(s,c);const u=this.bannersByAppName.get(t);return u?(u.push(c),u.sort(((e,t)=>!e.isOfHighPriority&&t.isOfHighPriority?-1:e.isOfHighPriority&&!t.isOfHighPriority?1:0))):this.bannersByAppName.set(t,[c]),this.showNextBanner(t),s}showNextBanner(e){const t=(()=>{const t=this.bannersByAppName.get(e);if(t&&t.length>0)return t[t.length-1];const n=this.bannersByAppName.get(jt);return n&&n.length>0?n[n.length-1]:null})();t?Au.cloudOSApplication.showBanner(t.bannerData):Au.cloudOSApplication.removeBanner()}}var Ft=n(1298),zt=n(2190),Bt=n(2191),Kt=n(1308),Ht=n(1306),Wt=n(1310),qt=n(1259),Vt=n(2245),$t=n(925),Gt=n(1248),Zt=n(967),Qt=n(1304),Yt=n(1207),Jt=n(1206),Xt=n(1208);const en=new I.a("TelemetryServiceProtocol",new Set(["recordStat","recordPerfStat"]));class tn{constructor(e,t){this.telemetryClient=void 0,this.telemetryClient=e,t.createListenerOnlyMessagingChannel(en,this,void 0,t.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}recordStat(e,t,n,r,i){const o={hostingAppName:"cloudos2",...i};try{const i=Object(ft.c)(e,t,n,ht.a.sharedInstance.identifier,S.a.hostname,S.a.locale,mt.c.sharedInstance.primaryInteractionMode,r,o);this.telemetryClient.recordStat(i)}catch(a){const i=Object(ft.a)(a,{applicationName:e,masteringBuildNumber:t,buildNumber:n,statName:r,parameters:o});this.telemetryClient.recordStat(i)}}recordPerfStat(e,t,n,r,i){const o={hostingAppName:"cloudos2",...i};try{if(r.startsWith(`${e}.`)||(r=`${e}.${r}`),!o||null===o.duration||void 0===o.duration)throw new Error("TelemetryService: _recordStat: No duration specified for a Perf Stat.");const i=Object(ft.b)(e,t,n,ht.a.sharedInstance.identifier,S.a.hostname,S.a.locale,mt.c.sharedInstance.primaryInteractionMode,r,o);this.telemetryClient.recordPerfStat(i)}catch(a){const i=Object(ft.a)(a,{applicationName:e,masteringBuildNumber:t,buildNumber:n,statName:r,parameters:o,statType:pt.b.PERF_STAT});this.telemetryClient.recordStat(i)}}}var nn=n(1265),rn=n(1249),on=n(1252),an=n(1309),sn=n(920),cn=n(901),un=n(927),ln=n(1262),dn=n(2240);function pn(e){const t=e.detail,{message:n,filename:r,lineno:i,colno:o,error:a}=t;return{error:a&&a.message?a.message:n,url:r,lineNumber:i,columnNumber:o,stack:a?a.stack:"not available"}}function fn(e){const t=function(e){let t=e.filename;const n=e.error;if(!(n instanceof Error))return{filename:t,stack:""};const r="string"===typeof n.stack?n.stack:"";var i,o;return(!t||"undefined"===t||c(t)&&u.test(t))&&(t=null!==(i=null===(o=f(r))||void 0===o?void 0:o.filename)&&void 0!==i?i:d(r)),{filename:t,stack:r,error:n,message:e.message}}(e);let n=t.filename;const i=e.error;if(i instanceof Error){let{sourceURL:e,fileName:t}=i;"string"===typeof e?n=e:"string"===typeof t&&(n=t)}return r({filename:n,stack:t.stack,message:t.message})}function hn(e){const t=Object(dn.b)();t.exceptionHandler(e.detail.error),t.exceptionWasHandled=!0}function mn(e){F.b.sharedInstance.recordStat(new U.a("OnNonFatalError",{...pn(e),isFatal:!1}))}function gn(e){var t,n,r,i;const o=null!==(t=e.detail.nativeEvent.reason)&&void 0!==t?t:{},a=o.stack;if("string"!==typeof a)return{error:"unknown"};const s=o.message;if("string"!==typeof s)return{error:"unknown"};const c=/(https.*(?:icloud|apple)\.com.*\/main\.js):([0-9]+):([0-9]+)/,u=a.split("\n"),l=null!==(n=u[0])&&void 0!==n?n:"",d=null!==(r=u[1])&&void 0!==r?r:"",p=null!==(i=l.match(c))&&void 0!==i?i:d.match(c),f=o.toString(),h=-1!==f.indexOf(s)?f:s,m=a;return p?{error:h,url:p[1],lineNumber:p[2],columnNumber:p[3],stack:m}:{error:h,stack:m}}function vn(e){const t=function(e){var t;const n=null!==(t=e.reason)&&void 0!==t?t:{},r={nativeEvent:e,type:"UNHANDLED_REJECTION",context:e.context},i=n.message;if("string"===typeof i){const e=n.toString(),t=-1!==e.indexOf(i)?e:i;r.message=t}const o=n.stack;return"string"===typeof o&&(r.stack=o),r}(e.detail.nativeEvent),n=Object(dn.b)();n.exceptionHandler(t),n.exceptionWasHandled=!0}function yn(e){F.b.sharedInstance.recordStat(new U.a("OnNonFatalUnhandledRejection",{...gn(e),isFatal:!1}))}var bn=n(1204),wn=n(1399),Sn=n(1169),Cn=n(1358),_n=n(2266),On=n(2220),En=n(1412),In=n(1428),An=n(1427),Tn=n(1420),Pn=n(2269),Rn=n(2188),kn=n(1286),Dn=n(1297),Mn=n(1296),Nn=n(2183),xn=n(1295),Ln=n(1282);class jn{applicationWillFinishLaunching(e,t){}applicationDidFinishLaunching(e,t){}}class Un extends jn{applicationDidBecomeActive(e){}applicationWillResignActive(e){}applicationDidEnterBackground(e){}applicationWillEnterForeground(e){}}var Fn=n(1281);class zn{static every(e,t){return function(e,t){for(const o of e)o.validate();const n=new Map,r=new Map,i=[];if(0===e.length)return Promise.resolve(t(r,n));for(const o of e){const{proxyMethod:e,params:t=[]}=o;i.push(e(...t))}return Promise.allSettled(i).then((i=>(i.forEach(((t,i)=>{t&&t.isOK?r.set(e[i],t):n.set(e[i],t)})),t(r,n))))}(e,t)}validate(){const{processReference:e,proxyMethod:t}=this;e||Object(Fn.b)(new Error("Required process reference value is not set")),t&&Object(A.c)(t)||Object(Fn.b)(new Error("Required process reference proxy method is not set"))}constructor(e){this.processReference=void 0,this.proxyMethod=void 0,this.params=void 0,e.hasOwnProperty("processReference")&&(this.processReference=e.processReference),e.hasOwnProperty("proxyMethod")&&(this.proxyMethod=e.proxyMethod),e.hasOwnProperty("params")&&(this.params=e.params)}}var Bn=n(1291),Kn=n(1283);class Hn extends Nn.Application{constructor(){super(...arguments),this._childProcessReferencesSet=void 0}get childProcessReferences(){let e=this._childProcessReferencesSet;if(e)return e;e=this._childProcessReferencesSet=new Set;const t=e.add,n=e.delete;return e.add=n=>{const r=t.call(e,n);return this.childProcessReferenceWasAdded(n),r},e.delete=t=>{t instanceof Kn.a||Object(Fn.b)(new Error("Can only delete ChildProcessReference instances"));const r=n.call(e,t);return r&&this.childProcessReferenceWasRemoved(t),r},e}childProcessReferenceWasAdded(e){}childProcessReferenceWasRemoved(e){}hostingStateDidChange(e,t){const n=[],{childProcessReferences:r}=this;super.hostingStateDidChange(e,t);for(const i of r){const{processState:r,remoteProxy:o}=i;if(Object(kn.c)(r,kn.a.RUNNING)){const r=new zn({processReference:i,proxyMethod:o?o.hostingStateDidChange:()=>{},params:[e,t]});n.push(r)}}return zn.every(n,((e,t)=>{}))}}class Wn extends Hn{didEnterBackground(){const e=[],{childProcessReferences:t}=this;for(const n of t){const{processState:t,remoteProxy:r}=n;if(Object(kn.c)(t,kn.a.RUNNING)&&Bn.a.isImplementedBy(r)){const t=new zn({processReference:n,proxyMethod:r.didEnterBackground});e.push(t)}}return zn.every(e,((e,t)=>{e.forEach(((e,t)=>{})),t.forEach(((e,t)=>{}))}))}}class qn extends Wn{constructor(){super(...arguments),this.disableTouchScrolling=!1,this.uiStateChanged=new Ln.a(this),this._internalUIState=xn.a.NONE}static main(e){let{applicationClass:t=qn,delegate:n=new Un,isParent:r}=e;return Nn.Application.main({applicationClass:t,delegate:n,isParent:r})}get uiState(){return this.internalUIState}run(){return super.run().then((()=>{this.parentProcessReference||this.invokeLaterSupport.invokeLater((()=>{Object(kn.c)(this.processState,kn.a.NONE,kn.a.TERMINATED)||this._transitionRootApplicationToActiveForeground()}))}))}stop(){return this.internalUIState=xn.a.NONE,super.stop()}beginLaunching(e,t,n){this._waitForWindowLoad().then((()=>{super.beginLaunching(e,t,n)}))}didBecomeActive(){var e;Object(kn.b)(this.processState,kn.a.RUNNING),Object(xn.b)(this.uiState,xn.a.INACTIVE_FOREGROUND),this.internalUIState=xn.a.ACTIVE_FOREGROUND,null===(e=this.delegate)||void 0===e||e.applicationDidBecomeActive(this)}willResignActive(){var e;Object(kn.b)(this.processState,kn.a.RUNNING),Object(xn.b)(this.uiState,xn.a.ACTIVE_FOREGROUND),null===(e=this.delegate)||void 0===e||e.applicationWillResignActive(this),this.internalUIState=xn.a.INACTIVE_FOREGROUND}willEnterForeground(){Object(kn.b)(this.processState,kn.a.RUNNING),Object(xn.b)(this.uiState,xn.a.NONE,xn.a.BACKGROUND),this.invokeLaterSupport.invokeLater((()=>Promise.resolve().then((()=>{var e;return null===(e=this.delegate)||void 0===e?void 0:e.applicationWillEnterForeground(this)})).then((()=>this.internalUIState=xn.a.INACTIVE_FOREGROUND)).then((()=>this._notifyParentThatProcessIsReadyToBeDisplayedIfNeeded()))))}didEnterBackground(){var e;Object(kn.b)(this.processState,kn.a.RUNNING),Object(xn.b)(this.uiState,xn.a.NONE,xn.a.INACTIVE_FOREGROUND),this.internalUIState=xn.a.BACKGROUND,null===(e=this.delegate)||void 0===e||e.applicationDidEnterBackground(this),super.didEnterBackground()}didReceiveSyntheticBrowserEvent(e){}get internalUIState(){return this._internalUIState}set internalUIState(e){this._internalUIState=e,this.uiStateChanged.dispatch(e)}_waitForWindowLoad(){return new Promise((e=>{"complete"===document.readyState?e():window.addEventListener("load",(()=>{e()}))}))}_createParentProcessReference(e){const t=super._createParentProcessReference(e);return t.createMessagingChannel(Dn.a,this,Mn.a),t}_transitionRootApplicationToActiveForeground(){const e=()=>{const{uiState:t}=this;t===xn.a.INACTIVE_FOREGROUND&&(this.uiStateChanged.removeListener(e),this.invokeLaterSupport.invokeLater((()=>this.didBecomeActive())))};this.uiStateChanged.addListener(e),this.willEnterForeground()}_notifyParentThatProcessIsReadyToBeDisplayedIfNeeded(){Object(kn.b)(this.processState,kn.a.RUNNING),Object(xn.b)(this.uiState,xn.a.INACTIVE_FOREGROUND);const{parentProcessReference:e}=this;!this.isParent&&e&&e.isConnected&&this.messagingResponseErrorSupport.sendMessageWithRetryAndTerminateOnError((()=>{var t;return null===(t=e.remoteProxy)||void 0===t?void 0:t.isReadyToBeDisplayed()}),"MessagingFromUIChildProtocol-isReadyToBeDisplayed")}}var Vn=n(922),$n=n(2250);class Gn extends qn{constructor(){super(...arguments),this.processId=Object(Vn.a)(),this.allowedRemoteOrigins=$n.a.sharedInstance.allowedRemoteOrigins}get sessionInfo(){return Au.cloudOSApplication.sessionInfo}set sessionInfo(e){}get hostInfo(){return Au.cloudOSApplication.hostInfo}set hostInfo(e){}launchApplication(){}childProcessReferenceWasAdded(e){Rt.b.attachRegisteredServicesToProcessReference(e,e.applicationConfiguration,e.historyState)}childProcessReferenceWasRemoved(e){Rt.b.removeServicesForProcessReference(e)}}Nn.Application.main({applicationClass:Gn,isParent:!0});var Zn=n(1209),Qn=n(1227),Yn=n(924),Jn=n(889),Xn=n(2169),er=n(878),tr=n(979),nr=n(892),rr=n(1311),ir=n(1198);function or(e,t,n,r,i,o,a,s,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return s(a(o(i(r(n(t(e)))))));case 9:return c(s(a(o(i(r(n(t(e))))))));default:for(var u=arguments[0],l=1;l<arguments.length;l++)u=arguments[l](u);return u}}var ar=function(e,t){var n="number"===typeof e?function(t){return t.length>=e}:e;return function(){var e=Array.from(arguments);return n(arguments)?t.apply(this,e):function(n){return t.apply(void 0,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))}([n],e,!1))}}};function sr(e){return function(t,n){return e.map(t,(function(){return n}))}}Object.prototype.hasOwnProperty;var cr=function(e){return{_tag:"Left",left:e}},ur=function(e){return{_tag:"Right",right:e}},lr=ar(2,(function(e,t){return gr(e)?e:t(e.right)})),dr=function(e,t){return or(e,fr(t))},pr="Either",fr=function(e){return function(t){return gr(t)?t:ur(e(t.right))}},hr={URI:pr,map:dr},mr=(ar(2,sr(hr)),sr(hr),function(e){return function(t){return gr(t)?t:gr(e)?e:ur(t.right(e.right))}}),gr=function(e){return"Left"===e._tag};var vr=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yr=function(){return yr=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},yr.apply(this,arguments)},br=cr,wr=function(e,t,n){return br([{value:e,context:t,message:n}])},Sr=ur,Cr=function(){function e(e,t,n,r){this.name=e,this.is=t,this.validate=n,this.encode=r,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return void 0===n&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,(function(e,n){var i=r.validate(e,n);return gr(i)?i:t.validate(i.right,n)}),this.encode===_r&&t.encode===_r?_r:function(e){return r.encode(t.encode(e))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(e){return this.validate(e,[{key:"",type:this,actual:e}])},e}(),_r=function(e){return e};function Or(e,t,n,r){for(var i=e.length,o=Array(i+1),a=0;a<i;a++)o[a]=e[a];return o[i]={key:t,type:n,actual:r},o}function Er(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var Ir=Object.prototype.hasOwnProperty;function Ar(e){return Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t].name)})).join(", ")}function Tr(e){for(var t=0;t<e.length;t++)if(e[t].encode!==_r)return!1;return!0}function Pr(e){return"{ ".concat(Ar(e)," }")}function Rr(e){return"Partial<".concat(e,">")}function kr(e){var t;if(Fr(e)){var n=e.value;if($r.is(n))return(t={})[n]=null,t}else{if("KeyofType"===e._tag)return e.keys;if(Br(e)){var r=e.types.map((function(e){return kr(e)}));return r.some(Vr.is)?void 0:Object.assign.apply(Object,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))}([{}],r,!1))}}}function Dr(e,t){for(var n=Object.keys(e),r=n.length,i=!1,o={},a=0;a<r;a++){var s=n[a];t.is(s)?o[s]=e[s]:i=!0}return i?o:e}function Mr(e,t){for(var n=!0,r=!0,i=!Yr.is(e),o=0,a=t;o<a.length;o++)(l=a[o])!==e&&(n=!1),Yr.is(l)&&(r=!1);if(n)return e;if(r)return t[t.length-1];for(var s={},c=0,u=t;c<u.length;c++){var l=u[c];for(var d in l)Ir.call(s,d)&&!i&&l[d]===e[d]||(s[d]=l[d])}return s}function Nr(e){switch(e._tag){case"RefinementType":case"ReadonlyType":return Nr(e.type);case"InterfaceType":case"StrictType":case"PartialType":return e.props;case"IntersectionType":return e.types.reduce((function(e,t){return Object.assign(e,Nr(t))}),{})}}function xr(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];Ir.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}var Lr={};function jr(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];-1!==t.indexOf(o)&&n.push(o)}return n}function Ur(e){return"AnyType"===e._tag}function Fr(e){return"LiteralType"===e._tag}function zr(e){return"InterfaceType"===e._tag}function Br(e){return"UnionType"===e._tag}var Kr=[];function Hr(e){if(-1!==Kr.indexOf(e))return Lr;if(zr(e)||function(e){return"StrictType"===e._tag}(e)){var t=Lr;for(var n in e.props){var r=e.props[n];Fr(r)&&(t===Lr&&(t={}),t[n]=[r.value])}return t}if(function(e){return"ExactType"===e._tag}(e)||function(e){return"RefinementType"===e._tag}(e))return Hr(e.type);if(function(e){return"IntersectionType"===e._tag}(e))return e.types.reduce((function(e,t){return function(e,t){if(e===Lr)return t;if(t===Lr)return e;var n=Object.assign({},e);for(var r in t)if(Ir.call(e,r)){var i=jr(e[r],t[r]);if(!(i.length>0)){n=Lr;break}n[r]=i}else n[r]=t[r];return n}(e,Hr(t))}),Lr);if(Br(e))return e.types.slice(1).reduce((function(e,t){return function(e,t){if(e===Lr||t===Lr)return Lr;var n=Lr;for(var r in e)Ir.call(t,r)&&0===jr(e[r],t[r]).length&&(n===Lr&&(n={}),n[r]=e[r].concat(t[r]));return n}(e,Hr(t))}),Hr(e.types[0]));if(function(e){return"RecursiveType"===e._tag}(e)){Kr.push(e);var i=Hr(e.type);return Kr.pop(),i}return Lr}var Wr,qr=new(function(e){function t(){var t=e.call(this,"null",(function(e){return null===e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="NullType",t}return vr(t,e),t}(Cr)),Vr=new(function(e){function t(){var t=e.call(this,"undefined",(function(e){return void 0===e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="UndefinedType",t}return vr(t,e),t}(Cr)),$r=(new(function(e){function t(){var t=e.call(this,"void",Vr.is,Vr.validate,_r)||this;return t._tag="VoidType",t}return vr(t,e),t}(Cr)),new(function(e){function t(){var t=e.call(this,"unknown",(function(e){return!0}),Sr,_r)||this;return t._tag="UnknownType",t}return vr(t,e),t}(Cr)),new(function(e){function t(){var t=e.call(this,"string",(function(e){return"string"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="StringType",t}return vr(t,e),t}(Cr))),Gr=new(function(e){function t(){var t=e.call(this,"number",(function(e){return"number"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="NumberType",t}return vr(t,e),t}(Cr)),Zr=(new(function(e){function t(){var t=e.call(this,"bigint",(function(e){return"bigint"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="BigIntType",t}return vr(t,e),t}(Cr)),new(function(e){function t(){var t=e.call(this,"boolean",(function(e){return"boolean"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="BooleanType",t}return vr(t,e),t}(Cr))),Qr=new(function(e){function t(){var t=e.call(this,"UnknownArray",Array.isArray,(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="AnyArrayType",t}return vr(t,e),t}(Cr)),Yr=new(function(e){function t(){var t=e.call(this,"UnknownRecord",(function(e){return null!==e&&"object"===typeof e&&!Array.isArray(e)}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="AnyDictionaryType",t}return vr(t,e),t}(Cr));vr((function(e,t,n,r,i){var o=Wr.call(this,e,t,n,r)||this;return o.value=i,o._tag="LiteralType",o}),Wr=Cr),function(e){vr((function(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.keys=o,a._tag="KeyofType",a}),e)}(Cr);var Jr=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i)||this;return s.type=o,s.predicate=a,s._tag="RefinementType",s}return vr(t,e),t}(Cr);hi(Gr,(function(e){return Number.isInteger(e)}),"Int");var Xr=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.runDefinition=o,a._tag="RecursiveType",a}return vr(t,e),t}(Cr);Object.defineProperty(Xr.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var ei=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ArrayType",a}return vr(t,e),t}(Cr);function ti(e,t){return void 0===t&&(t="Array<".concat(e.name,">")),new ei(t,(function(t){return Qr.is(t)&&t.every(e.is)}),(function(t,n){var r=Qr.validate(t,n);if(gr(r))return r;for(var i=r.right,o=i.length,a=i,s=[],c=0;c<o;c++){var u=i[c],l=e.validate(u,Or(n,String(c),e,u));if(gr(l))Er(s,l.left);else{var d=l.right;d!==u&&(a===i&&(a=i.slice()),a[c]=d)}}return s.length>0?br(s):Sr(a)}),e.encode===_r?_r:function(t){return t.map(e.encode)},e)}var ni=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="InterfaceType",a}return vr(t,e),t}(Cr);function ri(e,t){void 0===t&&(t=Pr(e));var n=Object.keys(e),r=n.map((function(t){return e[t]})),i=n.length;return new ni(t,(function(e){if(Yr.is(e)){for(var t=0;t<i;t++){var o=n[t],a=e[o];if(void 0===a&&!Ir.call(e,o)||!r[t].is(a))return!1}return!0}return!1}),(function(e,t){var o=Yr.validate(e,t);if(gr(o))return o;for(var a=o.right,s=a,c=[],u=0;u<i;u++){var l=n[u],d=s[l],p=r[u],f=p.validate(d,Or(t,l,p,d));if(gr(f))Er(c,f.left);else{var h=f.right;(h!==d||void 0===h&&!Ir.call(s,l))&&(s===a&&(s=yr({},a)),s[l]=h)}}return c.length>0?br(c):Sr(s)}),Tr(r)?_r:function(e){for(var t=yr({},e),o=0;o<i;o++){var a=n[o],s=r[o].encode;s!==_r&&(t[a]=s(e[a]))}return t},e)}var ii=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="PartialType",a}return vr(t,e),t}(Cr);function oi(e,t){void 0===t&&(t=Rr(Pr(e)));var n=Object.keys(e),r=n.map((function(t){return e[t]})),i=n.length;return new ii(t,(function(t){if(Yr.is(t)){for(var r=0;r<i;r++){var o=n[r],a=t[o];if(void 0!==a&&!e[o].is(a))return!1}return!0}return!1}),(function(t,r){var o=Yr.validate(t,r);if(gr(o))return o;for(var a=o.right,s=a,c=[],u=0;u<i;u++){var l=n[u],d=s[l],p=e[l],f=p.validate(d,Or(r,l,p,d));if(gr(f))void 0!==d&&Er(c,f.left);else{var h=f.right;h!==d&&(s===a&&(s=yr({},a)),s[l]=h)}}return c.length>0?br(c):Sr(s)}),Tr(r)?_r:function(e){for(var t=yr({},e),o=0;o<i;o++){var a=n[o],s=e[a];void 0!==s&&(t[a]=r[o].encode(s))}return t},e)}var ai=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i)||this;return s.domain=o,s.codomain=a,s._tag="DictionaryType",s}return vr(t,e),t}(Cr);function si(e,t,n){var r=kr(e);return r?function(e,t,n,r){void 0===r&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var i=e.length,o={},a=0;a<i;a++)o[e[a]]=n;var s=pi(o,r);return new ai(r,(function(e){return s.is(e)}),s.validate,s.encode,t,n)}(Object.keys(r),e,t,n):function(e,t,n){return void 0===n&&(n="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new ai(n,(function(n){return Yr.is(n)?Object.keys(n).every((function(r){return!e.is(r)||t.is(n[r])})):Ur(t)&&Array.isArray(n)}),(function(n,r){if(Yr.is(n)){for(var i={},o=[],a=Object.keys(n),s=a.length,c=!1,u=0;u<s;u++){var l=a[u],d=n[l],p=e.validate(l,Or(r,l,e,l));if(gr(p))c=!0;else{var f=p.right;c=c||f!==l,l=f;var h=t.validate(d,Or(r,l,t,d));if(gr(h))Er(o,h.left);else{var m=h.right;c=c||m!==d,i[l]=m}}}return o.length>0?br(o):Sr(c?i:n)}return Ur(t)&&Array.isArray(n)?Sr(n):wr(n,r)}),e.encode===_r&&t.encode===_r?function(t){return Dr(t,e)}:function(n){for(var r={},i=Object.keys(Dr(n,e)),o=i.length,a=0;a<o;a++){var s=i[a];r[String(e.encode(s))]=t.encode(n[s])}return r},e,t)}(e,t,n)}var ci=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="UnionType",a}return vr(t,e),t}(Cr);function ui(e,t){void 0===t&&(t=function(e){return"("+e.map((function(e){return e.name})).join(" | ")+")"}(e));var n=function(e){for(var t=Hr(e[0]),n=Object.keys(t),r=e.length,i=function(n){for(var i=t[n].slice(),o=[t[n]],a=1;a<r;a++){var s=Hr(e[a])[n];if(void 0===s)return"continue-keys";if(s.some((function(e){return-1!==i.indexOf(e)})))return"continue-keys";i.push.apply(i,s),o.push(s)}return{value:[n,o]}},o=0,a=n;o<a.length;o++){var s=i(a[o]);if("object"===typeof s)return s.value}}(e);if(void 0!==n&&e.length>0){var r=n[0],i=n[1],o=i.length,a=function(e){for(var t=0;t<o;t++)if(-1!==i[t].indexOf(e))return t};return new mi(t,(function(t){if(Yr.is(t)){var n=a(t[r]);return void 0!==n&&e[n].is(t)}return!1}),(function(t,n){var i=Yr.validate(t,n);if(gr(i))return i;var o=i.right,s=a(o[r]);if(void 0===s)return wr(t,n);var c=e[s];return c.validate(o,Or(n,String(s),c,o))}),Tr(e)?_r:function(n){var i=a(n[r]);if(void 0===i)throw new Error("no codec found to encode value in union codec ".concat(t));return e[i].encode(n)},e,r)}return new ci(t,(function(t){return e.some((function(e){return e.is(t)}))}),(function(t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=o.validate(t,Or(n,String(i),o,t));if(!gr(a))return Sr(a.right);Er(r,a.left)}return br(r)}),Tr(e)?_r:function(n){for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.is(n))return o.encode(n)}throw new Error("no codec found to encode value in union type ".concat(t))},e)}var li=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="IntersectionType",a}return vr(t,e),t}(Cr);function di(e,t){void 0===t&&(t="(".concat(e.map((function(e){return e.name})).join(" & "),")"));var n=e.length;return new li(t,(function(t){return e.every((function(e){return e.is(t)}))}),0===e.length?Sr:function(t,r){for(var i=[],o=[],a=0;a<n;a++){var s=e[a],c=s.validate(t,Or(r,String(a),s,t));gr(c)?Er(o,c.left):i.push(c.right)}return o.length>0?br(o):Sr(Mr(t,i))},0===e.length?_r:function(t){return Mr(t,e.map((function(e){return e.encode(t)})))},e)}!function(e){vr((function(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="TupleType",a}),e)}(Cr),function(e){vr((function(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyType",a}),e)}(Cr),function(e){vr((function(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}),e)}(Cr);var pi=function(e,t){return function(e,t){void 0===t&&(t=function(e){return zr(e)?"{| ".concat(Ar(e.props)," |}"):function(e){return"PartialType"===e._tag}(e)?Rr("{| ".concat(Ar(e.props)," |}")):"Exact<".concat(e.name,">")}(e));var n=Nr(e);return new fi(t,e.is,(function(t,r){var i=Yr.validate(t,r);if(gr(i))return i;var o=e.validate(t,r);return gr(o)?o:ur(xr(o.right,n))}),(function(t){return e.encode(xr(t,n))}),e)}(ri(e),t)},fi=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ExactType",a}return vr(t,e),t}(Cr);function hi(e,t,n){var r;return void 0===n&&(n="(".concat(e.name," | ").concat((r=t).displayName||r.name||"<function".concat(r.length,">"),")")),new Jr(n,(function(n){return e.is(n)&&t(n)}),(function(n,r){var i=e.validate(n,r);if(gr(i))return i;var o=i.right;return t(o)?Sr(o):wr(o,r)}),e.encode,e,t)}new(function(e){function t(){var t=e.call(this,"Function",(function(e){return"function"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="FunctionType",t}return vr(t,e),t}(Cr)),new(function(e){function t(){var t=e.call(this,"never",(function(e){return!1}),(function(e,t){return wr(e,t)}),(function(){throw new Error("cannot encode never")}))||this;return t._tag="NeverType",t}return vr(t,e),t}(Cr)),new(function(e){function t(){var t=e.call(this,"any",(function(e){return!0}),Sr,_r)||this;return t._tag="AnyType",t}return vr(t,e),t}(Cr)),hi(Gr,Number.isInteger,"Integer");var mi=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o)||this;return s.tag=a,s}return vr(t,e),t}(ci);new(function(e){function t(){var t=e.call(this,"object",(function(e){return null!==e&&"object"===typeof e}),(function(e,n){return t.is(e)?Sr(e):wr(e,n)}),_r)||this;return t._tag="ObjectType",t}return vr(t,e),t}(Cr)),function(e){vr((function(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="StrictType",a}),e)}(Cr);const gi=ti(ri({snippet:$r,indices:ti(Gr),type:$r})),vi=di([ri({identifier:$r}),oi({emailMatchTimestamp:Gr,tsMap:si($r,Gr),modseq:Gr,count:Gr,flags:Gr,preview:$r,senders:ti($r),subject:ui([$r,qr]),rfc2047DecodedSubject:$r,rfc2047DecodedSenders:ti($r),notDeletedCountMap:si($r,Gr),smartSnippets:gi})]),yi=di([ri({partId:$r}),oi({contentType:$r,contentId:$r,encoding:$r,size:Gr,disposition:$r,dispositionParams:$r,fileName:$r,isAttach:Zr,lines:Gr,relatedPartId:$r,mailDropHeaderName:$r,mailDropStreamingUrl:$r,expirationDate:Gr})]);function bi(e){return ri({domainObjects:ti(e)})}di([ri({identifier:$r}),oi({uid:Gr,appleThrid:$r,groupingKey:ui([$r,qr]),mboxRefUidMap:si($r,Gr),messageId:$r,appleMsgid:$r,normalizedSubject:$r,stateInternalDate:Gr,rfc822HeaderBytes:$r,rfc822MessageBytes:$r,createdTime:$r,modifiedTime:$r,mboxRef:ri({id:$r,type:$r}),flags:Gr,inReplyTo:$r,references:$r,rfc822Size:Gr,isDeleted:Zr,isExpunged:Zr,modseq:Gr,from:ui([$r,qr]),to:ui([$r,qr]),cc:ui([$r,qr]),bcc:ui([$r,qr]),subject:ui([$r,qr]),imapBodyStructure:$r,hasAttachment:Zr,rfc2047DecodedSubject:$r,parts:ti(yi),previewId:$r})]);const wi=bi(di([ri({name:$r,identifier:$r,uidValidity:Gr}),oi({unseenCount:Gr,seenDeletedCount:Gr,unseenDeletedCount:Gr,messageCount:Gr,flags:Gr})])),Si=di([ri({modseq:Gr,threadmodseq:Gr}),oi({condstore:Gr,qresync:Gr,threadmode:Gr})]),Ci=di([ri({threadId:$r,timestamp:Gr}),oi({senders:ti($r),subject:$r,flags:ti($r),count:Gr,folderMessageCount:Gr,preview:$r,modseq:Gr})]),_i=(ri({threadList:ti(Ci),folderStatus:di([ri({undeletedMessages:Gr,unseenUndeletedMessages:Gr}),oi({undeletedThreads:Gr,unseenUndeletedThreads:Gr})]),sessionHeaders:Si}),ri({threadList:ti(Ci),sessionHeaders:Si}));var Oi=n(1401);const Ei={"\\Recent":1,"\\Answered":2,"\\Flagged":4,"\\Deleted":8,"\\Draft":16,"\\Seen":32,"-Expunged":64,$MailFlagBit0:128,$MailFlagBit1:256,$MailFlagBit2:512,$NotJunk:1024,NotJunk:2048,$Junk:4096,Junk:8192,NonJunk:16384,JunkRecorded:32768,$Forwarded:65536,"\\ToMe":1<<17,"\\CcMe":1<<18,"\\HasAttachment":1<<19,"\\Vip":1<<20,"\\Hme":1<<21,"\\FromHme":1<<22,"-Spam":1<<29,"-Note":1<<30};function Ii(e){let t=0;if(void 0===e)return t;for(let n=0;n<e.length;n++){const r=e[n],i=Ei[r];void 0!==i&&(t|=i)}return t}async function Ai(e,t,n,r){const i=await n.fetchJSON(e,r);if(!i.ok)return W.Result.failure({reason:rr.d,toString:()=>rr.d});const o=t.decode(await i.json());return Object(Oi.isRight)(o)?W.Result.success(o.right):W.Result.failure({reason:rr.c,toString:()=>rr.c})}async function Ti(e){let{query:t,validator:n,geqsIntent:r,provider:i}=e;return Ai(i.urlForServiceName("mccgateway",`mailws2/v1/geqs/query?clientIntent=${r}`),n,i,{method:"POST",body:JSON.stringify(t),credentials:"include",reportingPathname:`mailws2/v1/geqs/query-${r}`})}async function Pi(e,t){let{shouldIncludeCounts:n=!1,isCategorizationEnabled:r=!1,mailboxIds:i,mailboxFullPaths:o,limit:a}=e,{provider:s}=t;const c=[];c.push({type:"eq",expression:{type:"property",property:"isMboxDeleted"},value:!1}),o&&c.push({type:"in",expression:{property:"name"},value:o}),i&&c.push({type:"in",expression:{property:"identifier"},value:i});const u=c[0],l=c.slice(1),d=u&&{...u,...l.length?{and:l}:{}},p=await Ti({query:{domain:"mailbox",includeLabels:r,...d?{predicate:d}:{},properties:["identifier","name","uidValidity",...n?["unseenCount","seenDeletedCount","unseenDeletedCount","messageCount"]:[],...r?["flags"]:[]],...a?{limit:a}:{}},validator:wi,geqsIntent:n?"fetchMailboxCountQuery":"fetchMailboxQuery",provider:s});return p.ok?W.Result.success(p.value.domainObjects):p}var Ri=n(1199);const ki=["identifier","tsMap","senders","preview","subject","count","flags","notDeletedCountMap","rfc2047DecodedSubject","rfc2047DecodedSenders","emailMatchTimestamp"],Di={...Ri.b.reduce(((e,t)=>({...e,[t]:""})),{}),INBOX:"",Draft:"",Junk:"",Archive:""};function Mi(e,t){var n;return(null===(n=e.find((e=>e.name===t)))||void 0===n?void 0:n.identifier)||""}const Ni={expression:{property:"flags",type:"fieldOf",value:"SEEN"},type:"eq",value:!1},xi={expression:{property:"flags",type:"fieldOf",value:"FLAGGED"},type:"eq",value:!0},Li={expression:{property:"flags",value:"TOME",type:"fieldOf"},value:!0,type:"eq"},ji={expression:{property:"flags",value:"CCME",type:"fieldOf"},value:!0,type:"eq"},Ui={expression:{property:"flags",value:"VIP",type:"fieldOf"},value:!0,type:"eq"},Fi={expression:{property:"flags",value:"HME",type:"fieldOf"},value:!0,type:"eq"};function zi(e,t){return{...e,or:[{...t}]}}function Bi(e,t,n){n.length>0&&e.push({expression:{property:"mboxRefUidMap"},type:"mapHasKeyIn",value:n})}async function Ki(e,t,n,r,i){const o="ref"===e.type?Di:await async function(e,t){const n=e||await Pi({shouldIncludeCounts:!1,isCategorizationEnabled:!0},t);return n.ok?{...Ri.b.reduce(((e,t)=>({...e,[t]:Mi(n.value,t)})),{}),INBOX:Mi(n.value,"INBOX"),Draft:Mi(n.value,"Draft"),Junk:Mi(n.value,"Junk"),Archive:Mi(n.value,"Archive")}:Di}(e.mailboxes,i);let a="ref"===e.type?e.value:o.INBOX;const s=[{expression:{property:"flags",value:"DELETED",type:"fieldOf"},type:"eq",value:!1}];if("virtual"===e.type)switch(e.value){case"Inbox":a=o.INBOX;break;case"VIP":a=o.INBOX,s.push({expression:{property:"flags",value:"VIP",type:"fieldOf"},type:"eq",value:!0});break;case"Primary":a=o.INBOX,Bi(s,0,Ri.a.Decluttered.map((e=>o[e])).filter((e=>""!==e)));break;case"Promotions":a=o.INBOX,Bi(s,0,Ri.a.Promotions.map((e=>o[e])).filter((e=>""!==e)));break;case"Transactions":a=o.INBOX,Bi(s,0,Ri.a.Transactions.map((e=>o[e])).filter((e=>""!==e)));break;case"Updates":a=o.INBOX,Bi(s,0,Ri.a.Updates.map((e=>o[e])).filter((e=>""!==e)))}return t.length>0&&s.push(...(e=>{const t=[];return e.includes(rr.b.VIP)&&t.push(Ui),e.includes(rr.b.HME)&&t.push(Fi),e.includes(rr.b.Unread)&&!e.includes(rr.b.Flagged)?t.push(Ni):!e.includes(rr.b.Unread)&&e.includes(rr.b.Flagged)?t.push(xi):e.includes(rr.b.Unread)&&e.includes(rr.b.Flagged)&&t.push(zi(Ni,xi)),e.includes(rr.b.ToMe)&&!e.includes(rr.b.CCMe)?t.push(Li):!e.includes(rr.b.ToMe)&&e.includes(rr.b.CCMe)?t.push(ji):e.includes(rr.b.ToMe)&&e.includes(rr.b.CCMe)&&t.push(zi(Li,ji)),t})(t)),{domain:"email",properties:ki,limit:n,predicate:{expression:{property:"mboxRef"},value:a,type:"eq",and:s},collapseOn:"appleThrid",orderby:{expressions:[{property:"stateInternalDate",type:"property"}],ascending:!1},strictLimit:r}}const Hi="AppBadgePreference",Wi="UNREAD_BADGE_FROM_INBOX";function qi(e,t){var n;return(null===(n=e.find((e=>e.name===t)))||void 0===n?void 0:n.unseenCount)||0}class Vi{constructor(e){var t,n,r,i;this.listener=new nr.a(rr.a),this.clientCount=0,this.dsId=void 0,this.urlForServiceName=void 0,this.fetchFunction=void 0,this.kvsStore=void 0,this.mailPreferencesResponse=void 0,this.closed=!1,this.isThreadingAvailable=void 0,this.isCategorizationBackfilled=void 0,this.isCategorizationSupportedLanguage=void 0,this.refreshAppBadgeCountCallback=void 0,this.isMailBlockedValue=void 0,this.dsId=e.dsId,this.urlForServiceName=e.urlForServiceName,this.fetchFunction=e.fetchFunction;const o=null!==(t=null===(n=e.mailFlags)||void 0===n?void 0:n.rawBits)&&void 0!==t?t:[];this.isThreadingAvailable=null!==(r=null===(i=e.mailFlags)||void 0===i?void 0:i.isThreadingAvailable)&&void 0!==r&&r,this.isCategorizationBackfilled=!!o[11]||!1,this.isCategorizationSupportedLanguage=Object(ir.a)(e.locale),this.isMailBlockedValue=!!(o[2]||o[3]||o[4]&&e.hasMailWebService),this.kvsStore=e.kvsStore,this.mailPreferencesResponse=void 0,this.refreshAppBadgeCountCallback=e.refreshAppBadgeCountCallback?e.refreshAppBadgeCountCallback:()=>{},this.listener.addEventListener("connect",(e=>{e.connection.exportedObject=this,e.connection.start(),this.clientCount++})),this.listener.start()}async isMailBlocked(){return this.isMailBlockedValue}async canShowCategoryViews(){return this.isCategorizationBackfilled&&this.isCategorizationSupportedLanguage}async getAppBadgeCount(){let{cachedMailboxesListResponse:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isMailBlockedValue?0:((void 0===this.mailPreferencesResponse||!1===this.mailPreferencesResponse.ok||Date.now()-this.mailPreferencesResponse.value.time>3e5)&&(this.mailPreferencesResponse=await this.fetchPreferences({clientName:"getAppBadgeCount",clientIntent:"getAppBadgeCount"})),async function(e){var t;let{isCategorizationSupportedLanguage:n,isCategorizationBackfilled:r,cachedMailboxesListResponse:i,mailPreferencesResponse:o,provider:a}=e;const s=r&&n,c=i||await Pi({shouldIncludeCounts:!0,isCategorizationEnabled:s,mailboxFullPaths:["INBOX",...Ri.a.Decluttered]},{provider:a});if(!c.ok)return 0;const u=(l=c.value,{...Ri.b.reduce(((e,t)=>({...e,[t]:qi(l,t)})),{}),INBOX:qi(l,"INBOX"),Draft:qi(l,"Draft"),Junk:qi(l,"Junk"),Archive:qi(l,"Archive")});var l;if(!o.ok)return u.INBOX;const d=!(!1===(null===(t=o.value.response.clientPreference)||void 0===t?void 0:t.hasUserEnabledCategoryView));if(!s||!d)return u.INBOX;if(!a.kvsStore)return u.INBOX;return(e=>{let t,{getPreferences:n,setPreferences:r}=e;return{setAsPrimary:e=>{t=e,r("mail",e?{[Hi]:"UNREAD_BADGE_FROM_PRIMARY"}:{[Hi]:Wi})},isUnreadBadgeFromPrimary:()=>{if(void 0!==t)return t;const e=n("mail");if(e){const n=e[Hi];return t=n!==Wi,t}return!0}}})({...a.kvsStore}).isUnreadBadgeFromPrimary()?Ri.a.Decluttered.reduce(((e,t)=>e+(void 0!==u[t]?u[t]:0)),0):u.INBOX}({isCategorizationBackfilled:this.isCategorizationBackfilled,isCategorizationSupportedLanguage:this.isCategorizationSupportedLanguage,mailPreferencesResponse:this.mailPreferencesResponse,cachedMailboxesListResponse:e,provider:{fetchJSON:this.fetchFunction,urlForServiceName:this.urlForServiceName,kvsStore:this.kvsStore}}))}async refreshAppBadgeCount(){this.refreshAppBadgeCountCallback()}async fetchMailboxList(e){return Pi(e,{provider:{fetchJSON:this.fetchFunction,urlForServiceName:this.urlForServiceName}})}async fetchMailboxThreads(e){return async function(e,t){let{folderToFetch:n,filters:r,limit:i=10,strictLimit:o=!1}=e,{provider:a}=t;if("virtual"===n.type&&void 0===n.mailboxes&&"Inbox"===n.value)return async function(e){let{folder:t="INBOX",provider:n}=e;const r={responseType:"THREAD_DIGEST",includeFolderStatus:!1,maxResults:50,sessionHeaders:{folder:t,modseq:null,threadmodseq:null,condstore:1,qresync:1,threadmode:1}},i=await Ai(n.urlForServiceName("mccgateway","mailws2/v1/thread/search"),_i,n,{method:"POST",body:JSON.stringify(r),credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},reportingPathname:"/mailws2/v1/thread/search/inbox"});if(i.ok){const e=i.value.threadList.map((e=>({preview:e.preview,identifier:e.threadId,subject:e.subject,flags:Ii(e.flags),count:e.count,emailMatchTimestamp:e.timestamp,rfc2047DecodedSenders:e.senders,senders:e.senders,rfc2047DecodedSubject:e.subject})));return W.Result.success(e)}return W.Result.failure({reason:rr.c,toString:()=>rr.c})}({folder:"INBOX",provider:a});const s=await Ti({query:await Ki(n,r,i,o,{provider:a}),validator:bi(vi),geqsIntent:"fetchMailboxThreads",provider:a});return s.ok?W.Result.success(s.value.domainObjects):s}(e,{provider:{fetchJSON:this.fetchFunction,urlForServiceName:this.urlForServiceName}})}async fetchPreferences(e){let{clientName:t,clientIntent:n}=e;const r=this.urlForServiceName("mcc",`cc/mail/v1/account/${this.dsId}/preference/web/all?${function(e,t){return`userEntryPoint=${encodeURIComponent(`/${e}/${t}`)}`}(t,n)}&categoryViewEligible=${this.isCategorizationSupportedLanguage}`);let i;try{i=await this.fetchFunction(r,{credentials:"include"})}catch(s){return W.Result.failure({reason:"OFFLINE",value:null})}if(!i.ok)return W.Result.failure({reason:"BAD STATUS",value:i});const o=await i.json(),a=W.Result.success({response:o,time:Date.now()});return this.mailPreferencesResponse=a,a}close(){if(!this.closed){this.closed=!0,this.clientCount=0,this.listener.close();for(const e of this.listener.connections)e.close()}}}var $i=n(2219);class Gi extends tr.a{constructor(){super(...arguments),this.mailDataService=void 0}init(e){var t,n,r;if(this.isInitialized)return;const i=e||P.h.value;if(null===i||void 0===i||null===(t=i.details)||void 0===t||!t.dsid)throw new Error("no dsid available");this.mailDataService=new Vi({fetchFunction:z.a,urlForServiceName:H.j,dsId:i.details.dsid,mailFlags:i.details.mailFlags,locale:Object(er.b)(),kvsStore:{setPreferences:()=>{},getPreferences:tt.b.getPreferences.bind(tt.b)},refreshAppBadgeCountCallback:$i.b,hasMailWebService:!(null===(n=H.c.value)||void 0===n||null===(n=n.webServices)||void 0===n||!n.has("mail")||"active"!==(null===(r=H.c.value)||void 0===r||null===(r=r.webServices)||void 0===r||null===(r=r.get("mail"))||void 0===r?void 0:r.status))}),this.isInitialized=!0}close(){var e;null===(e=this.mailDataService)||void 0===e||e.close()}}var Zi=n(980),Qi=n(994);class Yi extends tr.a{constructor(){super(...arguments),this.subscriptionService=null,this.subscriptionUpsellFlowLink=null,this.subscriptionFeaturesLink=null}init(){var e;const t=null===(e=P.h.value)||void 0===e||null===(e=e.details)||void 0===e?void 0:e.dsid;if(!t)throw new Error("SubscriptionService should be initilized after auth is succesful");this.subscriptionUpsellFlowLink=new Qi.UpsellFlowLink(bt.a.sharedInstance.isDomainCN,t,z.a,Ji),this.subscriptionFeaturesLink=new Qi.FeaturesLink(bt.a.sharedInstance.isDomainCN,t,z.a),this.subscriptionService=new Qi.SubscriptionService(this.subscriptionUpsellFlowLink,this.subscriptionFeaturesLink)}close(){var e;null===(e=this.subscriptionService)||void 0===e||e.close()}}function Ji(e){U.a.withEventAndLabel("workflow",e,{statCategory:sn.a.SESSION}).record()}var Xi=n(2151),eo=n(2192),to=n(1009),no=n(2228),ro=n(1021),io=n(2176),oo=n(1074),ao=n(1036);const so=Object.freeze({PreKeyExpireDuration:36e5,PreviousPrekeyExpireDuration:42e4,InitialMKMDistributeDuration:6e5,MKMExpireDuration:18e5,MKMRollDuration:12e5,MKMRollWaitDuration:5e3,MKMPreRecoveryInterval:1e4,MKMCacheDefaultSampleSize:32,LetMeInTimeout:864e5,ParticipantAllocateResponseTimeout:3e5,ActiveParticipantsResponseTimeout:1e4,DecryptionTimeout:3e4,DecryptionMKMRecoveryTimeout:1e4,LastParticipantRemainingTimeout:15e3,DecryptionStatCollectionInterval:1e3,DecryptionStatCollectionTimeout:5e3,NewSessionJoiningInterval:12e4,IDSQueryTimeout:2e4,IDSQueryMaxRetryNumber:3,IDSQueryMaxRetryInterval:60,IDSQueryDefaultRetryInterval:30,IDSUsePushForKeyExchange:!0});class co{constructor(){this.PreKeyExpireDuration=so.PreKeyExpireDuration,this.PreviousPrekeyExpireDuration=so.PreviousPrekeyExpireDuration,this.InitialMKMDistributeDuration=so.InitialMKMDistributeDuration,this.MKMExpireDuration=so.MKMExpireDuration,this.MKMRollDuration=so.MKMRollDuration,this.MKMCacheDefaultSampleSize=so.MKMCacheDefaultSampleSize,this.MKMRollWaitDuration=so.MKMRollWaitDuration,this.MKMPreRecoveryInterval=so.MKMPreRecoveryInterval,this.LetMeInTimeout=so.LetMeInTimeout,this.ParticipantAllocateResponseTimeout=so.ParticipantAllocateResponseTimeout,this.ActiveParticipantsResponseTimeout=so.ActiveParticipantsResponseTimeout,this.DecryptionTimeout=so.DecryptionTimeout,this.DecryptionMKMRecoveryTimeout=so.DecryptionMKMRecoveryTimeout,this.DecryptionStatCollectionInterval=so.DecryptionStatCollectionInterval,this.DecryptionStatCollectionTimeout=so.DecryptionStatCollectionTimeout,this.NewSessionJoiningInterval=so.NewSessionJoiningInterval,this.IDSQueryTimeout=so.IDSQueryTimeout,this.IDSQueryMaxRetryNumber=so.IDSQueryMaxRetryNumber,this.IDSQueryMaxRetryInterval=so.IDSQueryMaxRetryInterval,this.IDSQueryDefaultRetryInterval=so.IDSQueryDefaultRetryInterval,this.LastParticipantRemainingTimeout=so.LastParticipantRemainingTimeout,this.IDSUsePushForKeyExchange=!0}getConfigData(){return{PreKeyExpireDuration:this.PreKeyExpireDuration,PreviousPrekeyExpireDuration:this.PreviousPrekeyExpireDuration,InitialMKMDistributeDuration:this.InitialMKMDistributeDuration,MKMExpireDuration:this.MKMExpireDuration,MKMRollDuration:this.MKMRollDuration,MKMCacheDefaultSampleSize:this.MKMCacheDefaultSampleSize,MKMRollWaitDuration:this.MKMRollWaitDuration,MKMPreRecoveryInterval:this.MKMPreRecoveryInterval,LetMeInTimeout:this.LetMeInTimeout,ParticipantAllocateResponseTimeout:this.ParticipantAllocateResponseTimeout,ActiveParticipantsResponseTimeout:this.ActiveParticipantsResponseTimeout,DecryptionTimeout:this.DecryptionTimeout,DecryptionMKMRecoveryTimeout:this.DecryptionMKMRecoveryTimeout,DecryptionStatCollectionInterval:this.DecryptionStatCollectionInterval,DecryptionStatCollectionTimeout:this.DecryptionStatCollectionTimeout,NewSessionJoiningInterval:this.NewSessionJoiningInterval,IDSQueryTimeout:this.IDSQueryTimeout,IDSQueryMaxRetryNumber:this.IDSQueryMaxRetryNumber,IDSQueryMaxRetryInterval:this.IDSQueryMaxRetryInterval,IDSQueryDefaultRetryInterval:this.IDSQueryDefaultRetryInterval,LastParticipantRemainingTimeout:this.LastParticipantRemainingTimeout,IDSUsePushForKeyExchange:!0}}}const uo=Object(ao.a)((()=>new co));var lo=n(1075),po=n(1091);function fo(e){return{type:ho(e),value:e.replace(/^(mailto:|tel:)/,"")}}function ho(e){const{HandleType:t}=po.a.Handle;return e.startsWith("mailto:")?t.EmailAddress:e.startsWith("tel:")?t.PhoneNumber:t.Generic}var mo=n(1093),go=n(1027),vo=n(1076);class yo{constructor(e,t){this.uri=e,this.pushToken=t}}class bo extends yo{get publicSigningKey(){return this.signingKeyPair.publicKey}get publicLegacyIdentity(){return this.legacyIdentity.publicIdentity}get identities(){return[this,...this.previousIdentities]}get preKeyPairs(){return this.identities.map((e=>e.preKeyPair))}get publicPreKeys(){return this.preKeyPairs.map((e=>e.publicKey))}constructor(e,t,n){let{signingKeyPair:r,preKeyPair:i,connectionKeyPair:o,legacyIdentity:a,ktLoggableData:s,previousIdentities:c,extraQueryProps:u,dsid:l}=n;super(e,t),this.signingKeyPair=r,this.preKeyPair=i,this.connectionKeyPair=o,this.legacyIdentity=a,this.ktLoggableData=s,this.previousIdentities=null!==c&&void 0!==c?c:[],this.extraQueryProps=null!==u&&void 0!==u?u:{},this.dsid=l}}class wo extends yo{constructor(e,t,n){let{publicSigningKey:r,publicPreKey:i,publicLegacyIdentity:o,ktLoggableData:a,isDevice:s}=n;super(e,t),this.publicSigningKey=r,this.publicPreKey=i,this.publicLegacyIdentity=o,this.ktLoggableData=a,this.isDevice=s}}var So=n(2227),Co=n(1038),_o=n(1039),Oo=n(1040),Eo=n(1090),Io=n(2253),Ao=n(1016),To=n(1011),Po=n(1041),Ro=n(2166),ko=n(1046),Do=n(1072),Mo=n(1073),No=n(1037);const xo=Object(ao.a)((()=>new Do.a));var Lo=n(1042),jo=n(1035),Uo=n(2217),Fo=n(1029),zo=n.n(Fo);class Bo extends Lo.a{async request(e,t,n){let{method:r,body:i,headers:o={},credentials:a=!0}=n;const s={...o,Authorization:"Basic aGVsbG86d29ybGQ=","Content-Type":"application/x-bplist",accept:"application/x-bplist"},c={"protocol-version":"1","push-token":Object(go.c)(e),...i};return this.fetch.call(globalThis,t,{method:r,body:this.bplist.write(c),credentials:a?"include":"omit",headers:s})}async getHandles(e,t){try{var n;const r=await this.request(e,this.urls.getHandlesURL,{method:"POST",body:{service:t}}),i=await r.arrayBuffer(),o=this.bplist.parse(i);if(o instanceof Error)throw o;const a=o.status instanceof zo.a?zo.a.toNumber(o.status):o.status;return a===ko.b.SUCCESS?o:new Ao.a(To.b`IDS getHandles failed with status ${Object(Uo.c)(o.status).notPII().forCertain()}: ${null!==(n=Object(Uo.c)(ko.b[a]).constant())&&void 0!==n?n:To.b`unknown`}`)}catch(r){return Object(jo.a)(r)}}}function Ko(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(no.a)();return new Bo(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=(e=>"carry"===e?"-carry":"")(e),i="prod"===e?"":`-${e}`,o=null!==n&&void 0!==n?n:"apple";return t?{getHandlesURL:`https://profile${i}.ess.${o}.com/WebObjects/ProfileService.woa/wa/icloudGetHandles`,registerURL:`https://identity${i}.ess.${o}.com/WebObjects/TDIdentityService.woa/wa/icloudRegister`,queryURL:`https://query${i}.ess.${o}.com/WebObjects/QueryService.woa/wa/icloudQuery`}:{getHandlesURL:`https://gatewayws.icloud.com/ids-profile${r}/WebObjects/VCProfileService.woa/wa/icloudGetHandles`,registerURL:`https://gatewayws.icloud.com/ids-identity${r}/WebObjects/TDIdentityService.woa/wa/icloudRegister`,queryURL:`https://gatewayws.icloud.com/ids-query${r}/WebObjects/QueryService.woa/wa/icloudQuery`}}(t,n,r),i,e)}const Ho=Ko(globalThis.fetch),Wo=Object(ao.a)((()=>{throw new Ao.a(To.b`Registered IDS environments cannot be auto-instantiated. An existing instance must be passed to the provider.`)})),qo=Object(ao.a)((()=>Ho)),Vo=Object(ao.a)((e=>{throw new Ao.a(To.b`Authenticated IDS cannot be auto-instantiated. An existing instance must be passed to the provider: ${e}`)}));class $o extends No.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(Array.isArray(e)?e:[Co.a.useInstance(e.logger),_o.a.useInstance(e.metrics),Oo.a.useInstance(e.feedbackWS),Po.a.useInstance(e.environment),Wo.useInstance(e.environment),qo.useInstance(e.environment)]),this.logger=Object(Co.a)(this),this.metrics=Object(_o.a)(this),this.feedbackWS=Object(Oo.a)(this),this.environment=qo(this),this.encryptor=Object(Ro.a)(this),this.controllers=xo(this),this.set(Vo.useInstance(this)),this.set(ko.c.useInstance(this)),this.set(Po.a.useInstance(this.environment)),this.set(Wo.useInstance(this.environment)),this.set(Do.b.useInstance(this.controllers)),this.lifetime=new Mo.a,this.set(Mo.b.useInstance(this.lifetime))}close(){this.lifetime.close()}}class Go{constructor(){this.listeners=new Set}listen(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notifyListeners(){for(const e of this.listeners)e(...arguments)}}var Zo=n(1048),Qo=n(1033),Yo=n(1089);const Jo=new Uint8Array(8),Xo=new DataView(Jo.buffer,Jo.byteOffset,Jo.byteLength);function ea(e,t,n,r,i){for(;i>0;){const o=r>>>3,a=7&r,s=t>>>3,c=7&t,u=a-c,l=Math.min(i,8-a,8-c),d=255<<8-(a+l)&255>>>a,p=255<<8-a,f=e[s],h=u>0?f>>>u:f<<-u;n[o]=n[o]&p|h&d,i-=l,r+=l,t+=l}}class ta{get totalBitLength(){return 8*this.buffer.byteLength}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint8Array(Math.max(32,e));this.bitOffset=0,this.byteOffset=0,this.size=0,this.size=e,this.buffer=t}ensureSpaceFor(e){if(this.bitOffset+e>8*this.buffer.byteLength){const e=new Uint8Array(2*this.buffer.length);e.set(this.buffer),this.buffer=e}}writeBit(e){this.ensureSpaceFor(1);const t=this.bitOffset>>>3,n=e<<7-(7&this.bitOffset),r=~n;this.buffer[t]=this.buffer[t]&r|n,this.bitOffset++,this.size=Math.max(this.bitOffset,this.size)}copyFrom(e,t,n){this.ensureSpaceFor(n),ea(e,t,this.buffer,this.bitOffset,n),this.bitOffset+=n,this.size=Math.max(this.bitOffset,this.size)}writeUInt(e,t){Xo.setUint32(0,t);const n=32-e;this.copyFrom(Jo,n,e)}readUInt(e){return Xo.setUint32(0,0),ea(this.buffer,this.bitOffset,Jo,32-e,e),this.bitOffset+=e,Xo.getUint32(0)}read(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint8Array(Math.ceil(e/8)),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ea(this.buffer,this.bitOffset,t,n,e),t}toString(){return Array.from(this.buffer).slice(0,Math.ceil(this.size/8)).map((e=>`0b${e.toString(2).padStart(8,"0")}`)).join(" ")}}var na=n(1051),ra=n(1071),ia=n(1047);async function oa(e,t){const n=new ta,r=(new TextEncoder).encode("NGMPrekeySignature");n.copyFrom(r,0,8*r.length);const i=await Object(ia.a)(e);if(i instanceof Error)return i;n.copyFrom(i,0,8*i.length);const o=new Float64Array([t]),a=new Uint8Array(o.buffer,o.byteOffset,o.byteLength);return n.copyFrom(a,0,8*a.length),n.buffer.slice(0,Math.ceil(n.size/8))}class aa{constructor(e,t,n){this.dataKey=e,this.signature=t,this.timestamp=n}async isValidlySignedBy(e){const t=await oa(this.dataKey,this.timestamp);if(t instanceof Error)return t;let n;try{n=await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},e,this.signature,t)}catch(r){return Object(jo.a)(r)}return n?!(Date.now()/1e3-this.timestamp>12355200)||new Ao.a(To.b`The encryption prekey is older than the last allowed date.`):new Ao.a(To.b`Signature invalid`)}}var sa=n(1092);var ca=n(1083);class ua extends Error{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:To.b`${e}: ${t}`;super(n.toString()),this.originalError=t,this.isLoggable=!0,this.logString=n,t.stack&&(this.stack=t.stack)}}const la=2<<30,da=536870928;class pa{constructor(e){this.stream=new ta(8*e.length,e)}_readLength(){if(this.stream.bitOffset>=this.stream.size)return null;let e=this.stream.readUInt(8);if(e<128);else if(129===e){if(this.stream.size-this.stream.bitOffset<8)return null;e=this.stream.readUInt(8)}else if(130===e){if(this.stream.size-this.stream.bitOffset<16)return null;e=this.stream.readUInt(16)}else{if(131!==e)return null;if(this.stream.size-this.stream.bitOffset<24)return null;e=this.stream.readUInt(24)}return e}readLength(){const e=this.stream.bitOffset,t=this._readLength();return null===t&&(this.stream.bitOffset=e),t}_readTag(){const e=this.stream.readUInt(8);let t=31&e;if(31===t){const e=127<<25;let n=0;do{if(this.stream.bitOffset>=this.stream.size||t&e)return null;n=this.stream.readUInt(8),t=t<<7|127&n}while(128&n);if(t&e<<4)return null}const n=(224&e)<<24|t,r=this.readLength();if(null===r)return null;if(this.stream.bitOffset+8*r>this.stream.size)return null;const i={tag:n,data:new Uint8Array(this.stream.buffer.buffer,this.stream.buffer.byteOffset+(this.stream.bitOffset/8|0),r)};return this.stream.bitOffset+=8*r,i}readTag(){const e=this.stream.bitOffset,t=this._readTag();return null===t&&(this.stream.bitOffset=e),t}expectTag(e){const t=this.stream.bitOffset,n=this.readTag();return n?n.tag!==e?(this.stream.bitOffset=t,null):n:null}readInteger(){const e=this.expectTag(2);if(null===e)return e;const t=e.data;if(0===e.data.length)return null;const n=`0x${Object(Zo.b)(t)}`;return zo.a.BigInt(n)}}function fa(e){if(null===e)return e;const t=e.data[0]<<8|e.data[1];return t>e.data.length+2?null:e.data.slice(2,t+2)}class ha{constructor(){this.stream=new ta}get size(){return Math.ceil(this.stream.size/8)}writeLength(e){e<128?this.stream.writeUInt(8,e):e<=255?(this.stream.writeUInt(8,129),this.stream.writeUInt(8,e)):e<=65535?(this.stream.writeUInt(8,130),this.stream.writeUInt(16,e)):e<=16777215&&(this.stream.writeUInt(8,131),this.stream.writeUInt(24,e))}writeByte(e){this.stream.writeUInt(8,e)}writeInteger(e){this.writeByte(2),this.writeLength(e.length);for(const t of e)this.writeByte(t)}writeData(e,t){this.writeByte(e),this.writeLength(t.length);for(const n of t)this.writeByte(n)}writeLengthValidatedBuffer(e,t){this.writeByte(e),this.writeLength(t.length+2),this.stream.writeUInt(16,t.length);for(const n of t)this.writeByte(n)}writeDER(e,t){this.writeData(e,t.copy())}copy(){return this.stream.buffer.slice(0,this.size)}}var ma;function ga(e){if(128&e[0]){const t=new Uint8Array(e.length+1);return t[0]=0,t.set(e,1),t}return e}!function(e){e[e.SigningID=1]="SigningID",e[e.EncryptionID=2]="EncryptionID"}(ma||(ma={}));var va=n(1084),ya=n(2282);function ba(e,t){return`${e}#${t}`}var wa=n(1050);class Sa{constructor(e,t,n){let{topic:r,counter:i,sessionToken:o,expires:a,refresh:s}=n;this.ours=e,this.theirs=t,this.counter=i,this.topic=r,this.sessionToken=o,this.expires=a,this.refresh=s}get hasExpired(){return Date.now()>this.expires}get wantsRefresh(){return Date.now()>this.refresh}}class Ca{constructor(e,t,n){this.endpoints=e,this.expires=t,this.refresh=n}get isValid(){return!this.hasExpired}get hasExpired(){return Date.now()>this.expires}get wantsRefresh(){return Date.now()>this.refresh}}let _a,Oa=globalThis.indexedDB;const Ea="ids-data";new Promise((e=>{if(_a)e(_a);else if(Oa)try{const t=1,n=Oa.open("icloud-ids-db",t);n.onsuccess=()=>{_a=n.result,e(_a)},n.onupgradeneeded=e=>{if(e.target)try{const t=e.target.result;t.objectStoreNames.contains(Ea)||t.createObjectStore(Ea,{keyPath:"id"})}catch(t){console.error("Cannot upgrade the store.",t)}},n.onerror=async()=>{Oa=void 0,e(new Error("Unable to get connnection"))}}catch(t){Oa=void 0,e(t)}else e(new Error("No indexedDB"))}));class Ia{constructor(e){this.value=1,this.didIncrement=e}incrementOutgoingCounter(){const e=this.value;return this.value++,this.didIncrement(e),e}}class Aa{constructor(e,t){var n;this.identity=e,this.counterAlignment=10;const r=null!==(n=e.dsid)&&void 0!==n?n:e.uri;this.dbKey=`${r}_counters`,this.outgoingCounters=new Map,this.logger=t.child`IDSOutgoingCounterStore`.id`${r}`(),this.logger.silly`Created new IDSOutgoingCounterStore`,this.loadCounters()}async getOutgoingCounterFor(e){if(this.loadPromise&&await this.loadPromise,this.outgoingCounters.has(e))return this.outgoingCounters.get(e);const t=new Ia((e=>{this.counterDidIncrement(e)}));return this.outgoingCounters.set(e,t),this.logger.silly`Created new counter for ${e}`,this.saveCounters(),t}counterDidIncrement(e){e%this.counterAlignment===1&&this.saveCounters()}async loadCounters(){}async saveCounters(){}}var Ta=n(1034);class Pa extends Error{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:To.b`IDS query failed`,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e,t){return To.b`IDSQueryError${t?To.b`[${Object(Uo.c)(t).notPII().forCertain()}]`:""}${e?To.b`: ${Object(Ta.c)(e)}`:""}`}(t,n);super(r.toString()),this.uri=e,this.underlyingError=t,this.logString=r,this.isLoggable=!0}}const Ra=12500,ka=255;class Da{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[ka];this.upperBufferIndex=e,this.validValuesBuffer=t}processIncomingCounter(e){let t=this.upperBufferIndex-this.validValuesBuffer.length;const n=8*t,r=8*this.upperBufferIndex-1;if(e<n)return!1;if(e>=n&&e<=r){const n=(e/8|0)-t;let r=this.validValuesBuffer[n];const i=e%8;return!!(r>>i&1&ka)&&(r&=~(1<<i)&ka,this.validValuesBuffer[n]=r,!0)}const i=1+(e/8|0),o=i-this.upperBufferIndex;let a=this.validValuesBuffer.length+o;a>Ra&&(a=Ra);let s=0,c=this.validValuesBuffer.length;o<Ra&&(c=Ra-o,c=Math.min(this.validValuesBuffer.length,c),s=this.validValuesBuffer.length-c),this.validValuesBuffer=[...this.validValuesBuffer.slice(s,c+s),...Array(a-c).fill(ka)],this.upperBufferIndex=i,t=this.upperBufferIndex-a;const u=(e/8|0)-t;let l=this.validValuesBuffer[u];return l&=~(1<<e%8),this.validValuesBuffer[u]=l&ka,!0}}class Ma{constructor(e,t,n){this.ours=e,this.theirs=t,this.outgoingCounter=n,this.buffer=new Da}incrementOutgoingCounter(){return this.outgoingCounter.incrementOutgoingCounter()}validateIncomingCounter(e){return this.buffer.processIncomingCounter(e)}}var Na,xa=n(1078),La=n(2173),ja=n(1087);!function(e){e[e.Unknown=0]="Unknown",e[e.Join=1]="Join",e[e.Leave=2]="Leave",e[e.UpdateMember=3]="UpdateMember",e[e.UpdateParticipantData=4]="UpdateParticipantData"}(Na||(Na={}));var Ua=n(2148),Fa=n(1094),za=n(1095);const Ba=new Ua.a;function Ka(e,t,n){return Ba.write({vcSessionParticipantKeyUUID:t.participantUUID,...!n&&{b2n:Object(na.b)(Fa.a,t.avcBlob||{})},vcSessionParticipantKeyCallInfoBlob:Object(na.b)(za.a,{callID:e,clientVersion:1,deviceType:"Web",frameworkVersion:"1",osVersion:"1.0"})})}function Ha(e,t,n){return t.filter((e=>!!e.avcBlob)).map((t=>({identifier:t.participantId,handle:fo(t.uri),avcData:Ka(e,t,n)})))}const Wa={};class qa extends xa.a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.identity;super(e),this.controller=e,this.identity=t,this.encryptor=Object(Ro.a)(this),this.logger=Object(Co.a)(this).child`IDSNiceMessageFactory`()}async withPayload(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:va.b.NiceData;const r=(await Promise.all(t.map((async t=>{const n=this.identity,r=t.counter.incrementOutgoingCounter();this.logger.verbose`Preparing message for endpoint ${Object(Yo.a)(t.theirs.uri)} with counter value ${Object(Uo.c)(r).sessionID()}`;const i=await this.encryptor.encrypt(n,t.theirs,{message:e,counter:r});return i instanceof Error?i:{P:i,sT:Object(go.c)(t.sessionToken),t:Object(go.c)(t.theirs.pushToken),tP:t.theirs.uri}})))).filter((e=>!(e instanceof Error)));return{E:"pair-ec",c:n,v:6,U:Object(La.b)(),i:Object(ja.a)(),sP:this.identity.uri,ua:"Mozilla",dtl:r}}async withUnencryptedPayload(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:va.b.NiceData;const r=t.map((t=>({P:e,sT:Object(go.c)(t.sessionToken),t:Object(go.c)(t.theirs.pushToken),tP:t.theirs.uri})));return{E:"none",c:n,v:6,U:Object(La.b)(),i:Object(ja.a)(),sP:this.identity.uri,ua:"Mozilla",dtl:r}}endpointToDtl(e){return e.map((e=>({sT:Object(go.c)(e.sessionToken),t:Object(go.c)(e.theirs.pushToken),tP:e.theirs.uri})))}qrAlloc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(La.a)();const n=this.endpointToDtl(e),r=new Set(n.map((e=>e.tP))).size,i=Object(La.c)(t);return i instanceof Error?i:{c:va.a.Generic,U:Object(La.b)(),i:Object(ja.a)(),sP:this.identity.uri,dtl:n,qai:vo.a.FaceTimeMulti,qat:3,qgid:t,qids:i,qgmc:r,qr:0,qv:6,...Wa}}qrReAlloc(e,t,n,r,i,o){const a=this.qrAlloc(e,t);return a instanceof Error?a:{...a,qr:4,qpec:n,qpat:r,qpip:i,qpt:o,...Wa}}joinNotification(e,t,n,r,i,o,a,s,c){const u=Ka(e,r,c),l=Object(na.b)(po.a.ConversationParticipantDidJoinContext,{members:this.conversationMembers(i),message:{shouldSuppressInCallUI:!1,activeParticipants:Ha(e,[r,...o],c)},isGondolaCallingAvailable:!0}),d=[...i.keys()],p={};[...a.entries()].forEach((e=>{let[t,n]=e;p[t]=n}));const f={"join-notification-key":Na.Join,"fanout-groupID-key":t,"fanout-groupMembers-key":d,s:n,"is-initiator-key":r.isCallInitiator,"participant-id-key":r.participantId,"participant-data-key":u,"uri-to-participant-id-key":p,"client-context-data-key":l};return s&&(f.rtmpk=s,f.rtmpwm=1),f}leaveNotification(e,t,n,r){return{"join-notification-key":Na.Leave,"fanout-groupID-key":e,"fanout-groupMembers-key":r,s:t,"is-initiator-key":n.isCallInitiator,"participant-id-key":n.participantId}}memberUpdateNotification(e,t,n,r,i,o,a,s,c,u){const l=Ka(e,r,u),d=this.conversationMembers(i,(e=>!c.includes(e))),p=this.conversationMembers(i,(e=>c.includes(e))),f=Object(na.b)(po.a.ConversationParticipantDidJoinContext,{members:d,message:{type:po.a.ConversationMessage.ConversationMessageType.AddMember,shouldSuppressInCallUI:!1,activeParticipants:Ha(e,[r,...o],u),reportData:{conversationID:a,timebase:s},...p.length>0?{addedMembers:p}:{}}}),h=[...i.keys()];return{"join-notification-key":Na.UpdateMember,"fanout-groupID-key":t,"fanout-groupMembers-key":h,s:n,"is-initiator-key":r.isCallInitiator,"participant-id-key":r.participantId,"participant-data-key":l,"client-context-data-key":f}}participantDataUpdateNotification(e,t,n,r,i,o){const a=Ka(e,r,o),s=Object(na.b)(po.a.ConversationParticipantDidJoinContext,{members:this.conversationMembers(i),message:{shouldSuppressInCallUI:!1,activeParticipants:[{identifier:r.participantId,avcData:a}]}}),c=[...i.keys()];return{"join-notification-key":Na.UpdateParticipantData,"fanout-groupID-key":t,"fanout-groupMembers-key":c,s:n,"is-initiator-key":r.isCallInitiator,"participant-id-key":r.participantId,"participant-data-key":a,"client-context-data-key":s}}preKeyDistributionMessage(e,t,n){return{"fanout-groupID-key":e,s:t,rtmpk:n,rtmpwm:1}}mkmDistributionMessage(e,t,n,r,i,o,a,s,c){const u={"fanout-groupID-key":e,s:t};return a||(u.rtmkm=n,u.rtallmkm=[...i],u.rtallmkmuri=[...o]),r&&(u.rtskm={sks:r.sks,ski:r.ski,skm:r.skm,rtmpwm:1,skgc:s,participantID:c}),u}preKeyRecoveryRequest(e,t){return{"fanout-groupID-key":e,s:t,rtpkrreq:!0}}mkmRecoveryRequest(e,t,n){return{"fanout-groupID-key":e,s:t,rtkrreq:!0,rtmpk:n,rtmpwm:1}}conversationMembers(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;return[...e.entries()].filter((e=>{let[n]=e;return t(n)})).map((e=>{let[t,n]=e;return{handle:fo(t),nickname:n}}))}}const Va=Object(ao.a)((e=>new qa(e)));function $a(e,t){return e instanceof Uint8Array?e:t(e)}const Ga=6e4;class Za extends No.a{get logString(){return To.b`[IDSController ${Object(Yo.a)(this.identity.uri)} pushToken=${Object(Uo.c)(this.identity.pushToken).userID(va.d)}]`}constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];super([ko.c.useInstance(e),Qa.use((e=>e)),Co.a.useInstance(e.logger),_o.a.useInstance(e.metrics),Oo.a.useInstance(e.feedbackWS),Po.a.useInstance(e.environment),Ro.a.useInstance(e.encryptor),...n]),this.identity=t,this.isLoggable=!0,this.logger=Object(Co.a)(this),this.metrics=Object(_o.a)(this),this.feedbackWS=Object(Oo.a)(this),this.ids=Object(ko.c)(this),this.environment=Object(Po.a)(this),this.push=Object(ya.a)(this.ids),this.replayCountersByHashKey=new Map,this.queryMetadataByHashKey=new Map,this.endpointMapsByURI=new Map,this.nice=Va(this),this.onQueryRatelimited=new Go,this.outgoingCounterStore=new Aa(this.identity,this.logger),this.queriesMade=0}async replayCounterFor(e){const t=await async function(e,t){const n=t.publicSigningKey,r=t.publicPreKey,i=(await Promise.all([Object(ia.a)(e.signingKeyPair.publicKey),Object(ia.a)(n.key),Object(ia.a)(r.dataKey)])).map((e=>Object(ca.a)(e))),o=Object(wa.a)(i);return Object(Zo.b)(o)}(this.identity,e);if(t instanceof Error)return t;const n=this.replayCountersByHashKey.get(t);if(n)return n;const r=await this.outgoingCounterStore.getOutgoingCounterFor(t),i=new Ma(this.identity,e,r);return this.replayCountersByHashKey.set(t,i),i}existingEndpointSetsByTopicForRemoteURI(e){const t=this.endpointMapsByURI.get(e);if(t)return t;const n=new Map;return this.endpointMapsByURI.set(e,n),n}existingEndpointSetForRemoteURIAndTopic(e,t){const n=this.existingEndpointSetsByTopicForRemoteURI(e).get(t);return null!==n&&void 0!==n?n:null}async validEndpointsFor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.logger;return(await this.endpointsFor(e,t,void 0,n)).filter((e=>!(e instanceof Error)))}async endpointsFor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ga,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.logger;const i=this.logger.activity(r).begin`endpointsFor`();Array.isArray(e)||(e=[e]),i.debug`Topic: ${Object(Uo.c)(t).notPII().forCertain()} (${Object(Uo.c)(e.length).notPII().forCertain()} URIs)`,e=Array.from(new Set(e)),i.verbose`deduped to ${Object(Uo.c)(e).user()}`,i.silly`URIs:`;const o=[],a=[],s=[];for(const c of e){i.silly`- ${Object(Yo.a)(c)}`;const e=this.existingEndpointSetForRemoteURIAndTopic(c,t);null!==e&&void 0!==e&&e.isValid?(i.silly`  has valid existing set of endpoints`,e.wantsRefresh?(i.silly`  ... it wants refresh`,o.push(c),a.push(c)):i.silly`  `,s.push(...e.endpoints)):(i.silly`  no existing valid set of endpoints for uri/topic`,o.push(c)),i.silly``}return o.length>a.length?(i.verbose`query must block: set to query has items not in set to refresh`,this.query(e,t,n)):(a.length>0&&(i.verbose`query can be async: already have results for all URIs`,this.query(a,t,n)),i.silly`returning existing results`,s)}async endpointFor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.logger;const i=this.logger.activity(r).begin`endpointFor`(),o=await this.endpointsFor(e,t,void 0,i);i.info`${Object(Uo.c)(o.length).notPII().forCertain()} possible source endpoints`;const a=o.find((e=>!(e instanceof Error)&&Object(Zo.b)(e.theirs.pushToken)===n));if(!a){const t=To.b`Could not find an endpoint for incoming message`;return this.feedbackWS.reportError({idsEndpointFor:t.toString()}),new Pa(e,i.error(t))}return i.info`Found endpoint.`,a}async queryDidCompleteForURI(e,t,n,r,i){const o=this.logger.activity(i).begin`queryDidCompleteForURI`.id`${Object(Yo.a)(e)}`(),a=ba(e,t),s=r.get(a);if(!s)return o.warn`IDS URI Query completed but no query metadata found. Topic: ${Object(Uo.c)(t).constant()}`,[];o.debug`query complete. waiting for unboxing...`;const c=await n;o.debug`done.`,o.debug``;const u=this.queryMetadataByHashKey.get(a);if(u&&u.ctr>s.ctr)return o.debug`found newer result; skipping this one`,s.resolve(await u.promise),u.promise;const l=c.filter((e=>e instanceof Sa));if(o.debug`found ${Object(Uo.c)(l.length).notPII().forCertain()} non-errors`,l.length){const n=new Ca(l,Math.min(...l.map((e=>e.expires))),Math.min(...l.map((e=>e.refresh))));this.existingEndpointSetsByTopicForRemoteURI(e).set(t,n)}else o.warn`no endpoints found`;return o.debug`resolving...`,s.resolve(c),s.timestamp=-1/0,c}queryResultFor(e,t,n,r){let i;if(zo.a.NE(n,0)){const t=this.logQueryResultError(e,void 0,To.b`Uri ${Object(Yo.a)(e)}`);i=[Promise.resolve(t)]}else i=r.map((async n=>{if(n instanceof Error)return this.logQueryResultError(e,n,To.b`IDS Error`);const r=t=>this.logQueryResultError(e,void 0,To.b`Could not create remote identity: missing ${Object(Uo.c)(t)}`);function i(e,t){return null===e||void 0===e?r(t):e}const o=$a(n["push-token"],go.a);if(o instanceof Error)return this.logQueryResultError(e,o,To.b`Push Token`);const a=$a(n["session-token"],go.a);if(a instanceof Error)return this.logQueryResultError(e,a,To.b`Session Token`);const s=$a(i(n["kt-loggable-data"]||n["client-data"]["ngm-public-identity"],To.b`Signing Key (ktLoggableData)`),go.a);if(s instanceof Error)return this.logQueryResultError(e,s,To.b`Signing Key`);const c=await async function(e){var t,n;const r=Object(na.a)(sa.a,e);if(r instanceof Error)return r;const i=await async function(e){const t=Object(na.a)(ra.a.PublicDeviceIdentity,e);return t instanceof Error?t:await Object(ia.e)(t.signingKey)}(r.ngmPublicIdentity);return i instanceof Error?i:{keyTransparencyVersion:null!==(t=r.ktVersion)&&void 0!==t?t:0,ngmVersion:null!==(n=r.ngmVersion)&&void 0!==n?n:0,key:i}}(s);if(c instanceof Error)return this.logQueryResultError(e,c,To.b`Signing Key`);const u=$a(i(n["client-data"]["public-message-ngm-device-prekey-data-key"],To.b`Pre Key`),go.a);if(u instanceof Error)return this.logQueryResultError(e,u,To.b`Pre Key`);const l=await async function(e){if(!e)return new Ao.a(To.b`NGM signing key is empty`);const t=Object(na.a)(ra.a.PublicDevicePrekey,e);if(t instanceof Error)return t;const n=await Object(ia.d)(t.prekey);if(n instanceof Error)return n;const r=t.timestamp,i=t.prekeySignature;return new aa(n,i,r)}(u);if(l instanceof Error)return this.logQueryResultError(e,l,To.b`Pre Key`);const d=await async function(e){if(e instanceof Error)return e;const t=new pa(e).expectTag(da);if(!t)return new Ao.a(To.b`Not a DER Constructed Sequence`);const n=new pa(t.data),r=fa(n.expectTag(la|ma.SigningID));if(!r)return new Ao.a(To.b`Expected signing id`);const i=fa(n.expectTag(la|ma.EncryptionID)),o=new pa(i).expectTag(da);if(!o)return new Ao.a(To.b`Expected nested Constructed Sequence`);const a=new pa(o.data),s=a.readInteger(),c=a.readInteger();if(!s||!c)return new Ao.a(To.b`Could not parse mod and exponent`);let u=s.toString(16);u.length%2!==0&&(u="0"+u);let l=c.toString(16);l.length%2!==0&&(l="0"+l);const d=Object(ca.a)(Object(Zo.a)(u)),p=Object(ca.a)(Object(Zo.a)(l)),f={alg:"RSA-OAEP-256",e:Object(go.d)(p),ext:!0,key_ops:["encrypt","decrypt"],kty:"RSA",n:Object(go.d)(d)};try{return{signingKey:await crypto.subtle.importKey("raw",r,{name:"ECDSA",namedCurve:"P-256"},!0,[]),dataKey:await crypto.subtle.importKey("jwk",f,{name:"RSA-OAEP",hash:"SHA-256"},!0,[])}}catch(g){return h=To.b`importLegacyIdentity > importKey`,m=Object(jo.a)(g),new ua(h,m)}var h,m}($a(i(n["client-data"]["public-message-identity-key"],To.b`Legacy Identity`),go.a)),p=d instanceof Error?this.logQueryResultError(e,d,To.b`Legacy Identity`):d,f=!0===n["client-data"]["supports-skybridge"],h=new wo(e,o,{publicSigningKey:c,publicPreKey:l,publicLegacyIdentity:p,ktLoggableData:s,isDevice:!f}),m=await this.replayCounterFor(h);if(m instanceof Error)return this.logQueryResultError(e,m,To.b`Counter`);const g=n["session-token-expires-seconds"],v=n["session-token-refresh-seconds"],y=new Sa(this.identity,h,{topic:t,counter:m,sessionToken:a,expires:Date.now()+1e3*(g>0?g:3600),refresh:Date.now()+1e3*(v>0?v:3600)});return this.logger.info`Updating endpoint to a new copy...`,y}));return i}async query(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ga;const r=Date.now()-n,i=[],o=[];for(const s of e){const e=ba(s,t),n=this.queryMetadataByHashKey.get(e);!n||n.timestamp<r?i.push(s):o.push(n.promise)}let a=Promise.resolve([]);if(i.length>0){const e=this.willQuery(i,t),n={"self-uri":this.identity.uri,topic:t,uris:i,...this.identity.extraQueryProps};this.logger.info`IDS<--Web [Query]: ${Object(Uo.c)(JSON.stringify(n,void 0,4)).user()}`;const r=await Object(Qo.d)(this.environment.query(this.identity.pushToken,n),Ga,To.b`IDS Query timeout`);a=this.didQuery(i,t,r,e)}return(await Promise.all([a,...o])).flat()}willQuery(e,t){const n=++this.queriesMade,r=new Map,i=[];for(const o of e){const e=ba(o,t);let a;const s=new Promise((e=>{a=e})),c=Date.now(),u={ctr:n,promise:s,resolve:a,timestamp:c};this.queryMetadataByHashKey.set(e,u),r.set(e,u),i.push(s)}return r}async didQuery(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.logger;i.http`IDS-->Web [Query]: ${n}`,i.verbose`URIs:`;for(const a of e)i.verbose`- ${Object(Yo.a)(a)}`;if(n instanceof Error)return i.warn`Query Error: ${n}`,n instanceof ko.a&&(i.warn`rate limited`,this.onQueryRatelimited.notifyListeners(n)),(await Promise.all(e.map((e=>{const o=To.b`${Object(Yo.a)(e)}`;return this.feedbackWS.reportError({idsDidQuery:o.toString()}),this.queryDidCompleteForURI(e,t,Promise.resolve([new Pa(e,n,o)]),r,i)})).flat())).flat();e.every((e=>{var t,r;return 0===(null!==(t=null===(r=n.results[e])||void 0===r||null===(r=r.identities)||void 0===r?void 0:r.length)&&void 0!==t?t:0)}))&&i.warn`No identities found for a pseudonym url`,i.verbose``,i.verbose`Results:`;const o=[];for(const a of e){const e=n.results[a];if(e){const n=this.queryResultFor(a,t,e.status,e.identities);o.push(...await this.queryDidCompleteForURI(a,t,Promise.all(n),r,i))}else{const e=this.queryResultFor(a,t,zo.a.BigInt(0),[]);o.push(...await this.queryDidCompleteForURI(a,t,Promise.all(e),r,i))}}return o}logQueryResultError(e,t,n){return this.feedbackWS.reportError({idsQueryResultFor:n.toString()}),new Pa(e,t,n)}}const Qa=Object(ao.a)((e=>{throw new Ao.a(To.b`IDSController cannot be auto-instantiated. An existing instance must be passed to the provider: ${e}`)}));class Ya extends Za{constructor(e,t){super(e,t,[Vo.useInstance(e),Ja.use((e=>e)),Wo.useInstance(e.environment)]),this.ids=Vo(this),this.environment=Wo(this),this.push=Object(ya.a)(this.ids)}}const Ja=Object(ao.a)((e=>{throw new Ao.a(To.b`IDSController cannot be auto-instantiated. An existing instance must be passed to the provider: ${e}`)}));async function Xa(e){const{signingKeyPair:t}=e;return async function(e){if(e instanceof Error)return e;const t=await async function(e){const t=await Object(ia.a)(e);return t instanceof Error?t:Object(na.b)(ra.a.PublicDeviceIdentity,{signingKey:t})}(e.key);if(t instanceof Error)return t;const n=e.keyTransparencyVersion,r=e.ngmVersion;return Object(na.b)(sa.a,{ngmPublicIdentity:t,ktVersion:n,ngmVersion:r})}({key:t.publicKey,ngmVersion:12,keyTransparencyVersion:0})}const es=Object(Io.a)({log(){}}),ts=new class{reportStat(){}reportPerf(){}reportError(){}reportPush(){}finishInit(){}didEncounterIssue(){}};class ns extends Error{constructor(){super()}}async function rs(e){let{idsIdentity:t,pushIdentity:n,topics:r,provider:i}=e;Object(Co.a)(i).begin`registerForServices`().info`Registering for services - [${r.join(", ")}]`;const o=Object(lo.c)(i).pushToken,a=await async function(e){let{token:t,topics:n,provider:r}=e;const i=Object(Co.a)(r),o=qo(r);i.info`Fetching handles...`;const a=await o.getHandles(t,n[0]);return a instanceof Error?a:0===a.handles.length?new Ao.a(To.b`No handles, is this account touched?`):a}({token:o,provider:i,topics:r});if(Object(Eo.c)(a))return a;const{handles:s}=a,c=[],u=[];s.forEach((e=>{(ho(e.uri)===po.a.Handle.HandleType.EmailAddress?c:u).push(e)}));const l=[...c,...u],d=await async function(e){var t;let{provider:n,idsIdentity:r,pushIdentity:i,handles:o,topics:a}=e;const s=Object(Co.a)(n);s.info`Export IDS keys for registration`;const c=await async function(e){let{provider:t,identity:n}=e;const r=Object(Co.a)(t),{signingKeyPair:i,preKeyPair:o,legacyIdentity:a}=n,s=await Xa(n);if(s instanceof Error)return r.debug`Failed to export NGM device signing key: ${s}`,s;const c=await async function(e){let t,n;try{t=await crypto.subtle.exportKey("jwk",e.dataKey),n=new Uint8Array(await crypto.subtle.exportKey("raw",e.signingKey))}catch(u){return Object(jo.a)(u)}const r=ga(Object(ca.a)(Object(go.b)(t.n))),i=ga(Object(ca.a)(Object(go.b)(t.e))),o=new ha;o.writeInteger(r),o.writeInteger(i);const a=new ha;a.writeDER(48,o);const s=new ha;s.writeLengthValidatedBuffer(129,n),s.writeLengthValidatedBuffer(130,a.copy());const c=new ha;return c.writeDER(48,s),c.copy()}(a.publicIdentity);if(c instanceof Error)return r.debug`Failed to export legacy identity: ${c}`,c;const u=await async function(e,t){const n=Date.now()/1e3,r=await oa(e,n);if(r instanceof Error)return r;let i;try{i=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},t,r))}catch(a){return Object(jo.a)(a)}const o=await Object(ia.a)(e);return o instanceof Error?o:Object(na.b)(ra.a.PublicDevicePrekey,{prekey:o,prekeySignature:i,timestamp:n})}(o.publicKey,i.privateKey);return u instanceof Error?(r.debug`Failed to export public device prekey`,u):{exportedSigningPublicKey:s,identityKey:c,preKey:u}}({provider:n,identity:r});if(Object(Eo.c)(c))return c;s.info`Generate WebCourier nonce`;const u=await Object(mo.a)(i.connectionKeyPair,zo.a.BigInt(Date.now()),"ids");s.info`Get JWT from WebCourier`;const l=Object(lo.c)(n),d=null!==(t=l.jwt)&&void 0!==t?t:(await l.sendJwtRequest()).jwToken;if(!d)return s.info`Failed to get JWT, aborting registration`,new ns;s.info`Generate registration message`;const p=await function(e){let{dsid:t,token:n,nonce:r,jwt:i,registrationKeys:o,handles:a,topic:s}=e;const{exportedSigningPublicKey:c,identityKey:u,preKey:l}=o,d=new TextEncoder,p=Object(go.c)(d.encode(i));return{"user-id":`D:${t}`,services:[{service:vo.a.Multiplex1,"sub-services":[s],"client-data":{"hardware-version":"browser","supports-gft-errors":!0,"supports-modern-gft":!0,"supports-skybridge":!0,"public-message-ngm-device-prekey-data-key":Object(go.c)(l),"public-message-identity-key":Object(go.c)(u),"public-message-identity-version":2,"public-message-identity-ngm-version":12,"ngm-public-identity":Object(go.c)(c)},uris:a.map((e=>e.uri))}],"push-token":Object(go.c)(n),"web-token-auth":{nonce:Object(go.c)(r.nonce),"public-key":Object(go.c)(r.publicKey),signature:Object(go.c)(r.signature),jwt:p},"protocol-version":"1",hwv:"Browser",language:"en"}}({dsid:r.dsid,token:i.token,nonce:u,jwt:d,registrationKeys:c,handles:o,topic:a[0],provider:n});return p}({topics:r,handles:l,idsIdentity:t,pushIdentity:n,provider:i});if(Object(Eo.c)(d))return d;const p=await async function(e){let{provider:t,token:n,registrationMessage:r}=e;const i=Object(Co.a)(t),o=qo(t);return i.info`Sending register message...`,await o.register(n,r)}({token:o,registrationMessage:d,provider:i});if(Object(Eo.c)(p))return p;const{services:f}=p;return await async function(e){let{provider:t,handles:n,services:r,idsIdentity:i,pushIdentity:o}=e;const a=Object(Co.a)(t),s=xo(t);a.info`Process response...`;const c=n[0].uri,u=r[0].cert,{signingKeyPair:l,preKeyPair:d,legacyIdentity:p}=i,f=await Xa(i);if(f instanceof Error)return f;const{token:h}=o,m=new bo(c,h,{signingKeyPair:l,preKeyPair:d,legacyIdentity:p,ktLoggableData:f,extraQueryProps:{cert:u},dsid:i.dsid}),g=new Ya(t,m);s.controllersByURI.set(c,g);return{identity:{...i,uri:c,cert:u,handles:n.map((e=>e.uri))},listen(){},sendPush(){},queryValidEndpoints(){},internalController:g}}({provider:i,handles:l,services:f,idsIdentity:t,pushIdentity:n})}var is;!function(e){e[e.True=1]="True",e[e.Pending=0]="Pending",e[e.False=-1]="False"}(is||(is={}));var os=n(2159);function as(e,t){if(e.byteLength!==t.byteLength)return!1;const n=e.byteLength,r=new DataView(e),i=new DataView(t);for(let o=0;o<n;o++)if(r.getUint8(o)!==i.getUint8(o))return!1;return!0}function ss(e,t){if(e.byteLength!==t.byteLength)return!1;const n=e.byteLength;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var cs=n(888),us=n(2216);function ls(e){const t=e.indexOf(".");if(-1===t)return W.Result.failure(new Error("Invalid JWT: missing first dot"));const n=e.indexOf(".",t+1);if(-1===n)return W.Result.failure(new Error("Invalid JWT: missing second dot"));const r=e.slice(t+1,n),i=(4-r.length%4)%4,o=(r+"=".repeat(i)).replace(/-/g,"+").replace(/_/g,"/");let a,s;try{a=atob(o)}catch{return W.Result.failure(new Error("Invalid JWT: failed to decode base64"))}try{s=JSON.parse(a)}catch{return W.Result.failure(new Error("Invalid JWT: failed to parse JSON"))}if("object"!==typeof s||null===s)return W.Result.failure(new Error("Invalid JWT: payload is not an object"));const c=s;if("string"!==typeof c.webAuthHmac)return W.Result.failure(new Error("Invalid JWT: missing or invalid webAuthHmac"));const u="string"===typeof c.hsaTrustTokenHmac?c.hsaTrustTokenHmac:null;return W.Result.success({webAuthHmac:c.webAuthHmac,hsaTrustTokenHmac:u})}const ds=new(Object(us.a)((()=>{})))("WireGenerateSessionIdTokenSchema",cs.object({sessionIdToken:cs.string()}));class ps{constructor(e){let{fetchService:t,getServicesDomain:n,lifeCycleTracker:r,logger:i}=e;this.fetchService=void 0,this.getServicesDomain=void 0,this.lifeCycleTracker=void 0,this.logger=void 0,this.lastValidated=void 0,this.cachedToken=void 0,this.tokenFetchedAt=void 0,this.fetchService=t,this.getServicesDomain=n,this.lifeCycleTracker=r,this.logger=i.child`SessionIdTokenManager`()}needsProactiveRefresh(){return void 0===this.lastValidated||this.lastValidated+3e5-3e4<Date.now()}async refresh(e){const t=Date.now();if((null===e||void 0===e||!e.forceRefresh)&&void 0!==this.cachedToken&&void 0!==this.tokenFetchedAt&&t-this.tokenFetchedAt<3e4){const e=t-this.tokenFetchedAt;return this.logger.debug`Returning cached session token (${Object(Uo.c)(e).performance()}ms old)`,W.Result.success(this.cachedToken)}this.logger.info`Fetching new session token from Setup Service`;const n=await this.fetchService.fetchJson(`https://setup.${this.getServicesDomain()}/setup/ws/1/generateSessionIdToken`,{credentials:"include",retry:!0,schema:ds});return n.ok?(this.logger.debug`Session token fetched successfully`,this.cachedToken=n.value.sessionIdToken,this.tokenFetchedAt=t,W.Result.success(n.value.sessionIdToken)):(this.logger.warn`Session token fetch failed: ${Object(Uo.c)(n.error).notPII().forCertain()}`,this.lifeCycleTracker.trackEvent("generateSessionIdToken",{success:!1},!1),W.Result.failure(n.error))}markTokenValidated(){this.logger.info`Session token validated by device`,this.lastValidated=Date.now()}}var fs=n(2140),hs=n(466);function ms(e,t){return new Promise((n=>{const r=e.get(t);r.onerror=()=>{n(W.Result.failure(r.error))},r.onsuccess=()=>{n(W.Result.success(r.result))}}))}function gs(e,t){return new Promise((n=>{const r=e.put(t);r.onerror=()=>{n(W.Result.failure(r.error))},r.onsuccess=()=>{n(W.Result.success())}}))}const vs=new Uint8Array([69,40,33,230,56,208,19,119,190,84,102,207,52,233,12,108,192,172,41,183,201,124,80,221,63,132,213,181,181,71,9,23]);class ys{constructor(e,t){this.dsid=void 0,this.pairedInternal=Object(os.signal)(is.Pending),this.paired=Object(os.computed)((()=>this.pairedInternal.value)),this.unboundPairingKey=null,this.logger=void 0,this.dsid=e,this.logger=t.child`PairingKeyStore`()}async get(){if(null!==this.unboundPairingKey)return this.logger.debug`Returning unbound pairing key from memory`,W.Result.success(this.unboundPairingKey);const e=await this.consumeFromPendingStore();if(e)return this.unboundPairingKey=e,this.logger.debug`Loaded pending pairing key from IndexedDB pending store`,W.Result.success(this.unboundPairingKey);this.logger.debug`Looking up pairing key in IndexedDB`;const t=await Object(fs.a)();if(!t.ok)return t;const n=t.value;try{const e=await new Promise((e=>{const t=n.transaction(hs.g,"readonly").objectStore(hs.g).get(this.dsid);t.onerror=()=>{e(W.Result.failure(t.error))},t.onsuccess=()=>{e(W.Result.success(t.result))}}));if(!e.ok)return e;const t=e.value;return void 0===t?(this.logger.info`No pairing key found in IndexedDB`,W.Result.success(void 0)):t.expires<Date.now()?(this.logger.info`Pairing key expired, deleting from IndexedDB`,n.transaction(hs.g,"readwrite").objectStore(hs.g).delete(this.dsid),W.Result.success(void 0)):(this.logger.debug`Found bound pairing key in IndexedDB`,W.Result.success(t))}catch(r){return r instanceof Error?W.Result.failure(r):W.Result.failure(new Error(String(r)))}finally{n.close()}}async delete(){this.logger.info`Deleting pairing key`,this.unboundPairingKey=null;const e=await Object(fs.a)();if(!e.ok)return e;const t=e.value;try{return await new Promise((e=>{const n=t.transaction(hs.g,"readwrite").objectStore(hs.g).delete(this.dsid);n.onerror=()=>{e(W.Result.failure(n.error))},n.onsuccess=()=>{this.pairedInternal.value=is.False,this.logger.debug`Pairing key deleted successfully`,e(W.Result.success())}}))}catch(n){return n instanceof Error?W.Result.failure(n):W.Result.failure(new Error(String(n)))}finally{t.close()}}async setPairingKey(e){this.logger.info`Setting new pairing key (stored in memory only)`;try{this.unboundPairingKey=await this.decodeAndImportPairingKey(e)}catch(t){return t instanceof Error?W.Result.failure(t):W.Result.failure(new Error(String(t)))}return this.pairedInternal.value=is.Pending,W.Result.success()}async decodeAndImportPairingKey(e){if(!e)throw new Error("Missing pairing key for pending pairing key");const t=Object(go.a)(e);if(t instanceof Error)throw this.logger.warn`Invalid pairing key: ${Object(Uo.c)(t.message).constant()}`,t;if(t.byteLength!==hs.d)throw this.logger.warn`Invalid pairing key: incorrect size`,new Error(`Incorrect pairing key size, byteLength=${t.length}`);return await this.importPairingKey(t)}async setKtLoggableData(e,t,n,r){const i=ls(r);if(!i.ok)return W.Result.failure(i.error);const{webAuthHmac:o,hsaTrustTokenHmac:a}=i.value;if(null!==this.unboundPairingKey){if(this.logger.info`Binding pairing key to device and persisting to IndexedDB`,!as(this.unboundPairingKey.pairingKeyId,e))return this.logger.warn`Stale pairing key during first bind`,W.Result.failure(new Error("Stale pairing key"));const r=await Object(fs.a)();if(!r.ok)return r;const i=r.value;try{return await new Promise((e=>{const r=i.transaction(hs.g,"readwrite").objectStore(hs.g).put({dsid:this.dsid,expires:Date.now()+hs.e,pairingKey:this.unboundPairingKey.pairingKey,pairingKeyId:this.unboundPairingKey.pairingKeyId,ktLoggableData:t,deviceName:n,webAuthHmac:o,hsaTrustTokenHmac:a});r.onerror=()=>{e(W.Result.failure(r.error))},r.onsuccess=()=>{this.unboundPairingKey=null,this.pairedInternal.value=is.True,this.logger.info`Pairing key bound and persisted successfully`,e(W.Result.success())}}))}catch(u){return u instanceof Error?W.Result.failure(u):W.Result.failure(new Error(String(u)))}finally{i.close()}}this.logger.debug`Re-verification: checking ktLoggableData match`;const s=await Object(fs.a)();if(!s.ok)return s;const c=s.value;try{const r=c.transaction(hs.g,"readwrite").objectStore(hs.g),i=await new Promise((e=>{const t=r.get(this.dsid);t.onerror=()=>{e(W.Result.failure(t.error))},t.onsuccess=()=>{e(W.Result.success(t.result))}}));if(!i.ok)return i;const o=i.value;return void 0===o?W.Result.failure(new Error("Must save pairing key before setting ktLoggableData")):as(o.pairingKeyId,e)?ss(o.ktLoggableData,t)?o.deviceName!==n?(this.logger.debug`Re-verification: ktLoggableData matches, updating device name`,await new Promise((e=>{const t=r.put({...o,deviceName:n});t.onerror=()=>{e(W.Result.failure(t.error))},t.onsuccess=()=>{e(W.Result.success())}}))):(this.logger.debug`Re-verification: ktLoggableData matches, device name unchanged`,W.Result.success()):(this.logger.warn`Re-verification failed: cannot switch remote device after pairing`,W.Result.failure(new Error("Cannot switch remote device after pairing"))):W.Result.failure(new Error("Stale pairing key"))}catch(u){return u instanceof Error?W.Result.failure(u):W.Result.failure(new Error(String(u)))}finally{c.close()}}async validateSessionIdentity(e){this.logger.debug`Validating session identity`;const t=ls(e);if(!t.ok)return W.Result.failure(t.error);const{webAuthHmac:n,hsaTrustTokenHmac:r}=t.value,i=await Object(fs.a)();if(!i.ok)return i;const o=i.value;try{const e=o.transaction(hs.g,"readwrite").objectStore(hs.g),t=await ms(e,this.dsid);if(!t.ok)return t;const i=t.value;if(void 0===i)return W.Result.success();const a=null!==i.hsaTrustTokenHmac&&i.hsaTrustTokenHmac===r,s=i.webAuthHmac===n;return a||s?(this.pairedInternal.value=is.True,s?i.hsaTrustTokenHmac!==r?(this.logger.debug`Session validated via web auth, updating HSA trust HMAC`,await gs(e,{...i,hsaTrustTokenHmac:r})):(this.logger.debug`Session validated via ${a?"HSA trust token":"web auth"}`,W.Result.success()):(this.logger.debug`Session validated via HSA trust token, updating web auth HMAC`,await gs(e,{...i,webAuthHmac:n}))):(this.logger.warn`Session identity mismatch, deleting pairing key`,await function(e,t){return new Promise((n=>{const r=e.delete(t);r.onerror=()=>n(),r.onsuccess=()=>n()}))}(e,this.dsid),this.pairedInternal.value=is.False,W.Result.failure(new Error("Session identity mismatch")))}catch(a){return a instanceof Error?W.Result.failure(a):W.Result.failure(new Error(String(a)))}finally{o.close()}}async updateHsaTrustFromRefresh(e){const t=ls(e);if(!t.ok)return W.Result.failure(t.error);const{hsaTrustTokenHmac:n}=t.value,r=await Object(fs.a)();if(!r.ok)return r;const i=r.value;try{const e=i.transaction(hs.g,"readwrite").objectStore(hs.g),t=await ms(e,this.dsid);if(!t.ok)return t;const r=t.value;return void 0===r?W.Result.success():r.hsaTrustTokenHmac!==n?(this.logger.debug`HSA trust token HMAC updated`,await gs(e,{...r,hsaTrustTokenHmac:n})):W.Result.success()}catch(o){return o instanceof Error?W.Result.failure(o):W.Result.failure(new Error(String(o)))}finally{i.close()}}async importPairingKey(e){const t=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"]);return{pairingKey:t,pairingKeyId:await crypto.subtle.sign({name:"HMAC",hash:"SHA-256"},t,vs)}}async consumeFromPendingStore(){const e=await Object(fs.a)();if(!e.ok)return null;const t=e.value;try{return await new Promise((e=>{const n=t.transaction(hs.f,"readwrite").objectStore(hs.f),r=n.get(this.dsid);r.onerror=()=>e(null),r.onsuccess=()=>{const t=r.result;t?(n.delete(this.dsid),e({pairingKey:t.pairingKey,pairingKeyId:t.pairingKeyId})):e(null)}}))}catch{return null}finally{t.close()}}}var bs=n(1086),ws=n(2281),Ss=n(2283),Cs=n(890);const _s=cs.union([cs.object({status:cs.object({version:cs.number().nonnegative()})}),cs.object({ade:cs.boolean()})]),Os=cs.boolean(),Es=cs.object({webSearch:cs.boolean()}),Is=cs.object({version:cs.number().nonnegative(),isWebSearchEnabled:cs.boolean(),deviceDisplayName:cs.string(),deviceType:cs.string().optional(),osVersion:cs.string().optional()}),As=cs.union([cs.object({status:Is}),cs.object({ade:Os}),cs.object({settingUpdated:cs.array(Es)})]),Ts=cs.object({v:cs.number(),t:cs.string()}),Ps=cs.object({r:cs.string(),c:cs.string(),t:cs.string()}),Rs=cs.union([cs.object({s:Ts}),cs.object({rc:Ps})]),ks=cs.object({v:cs.number(),c:cs.string()}),Ds=cs.object({r:cs.string(),s:Is}),Ms=cs.union([cs.object({c:ks}),cs.object({r:cs.union([cs.string(),Ds])})]),Ns=cs.union([cs.object({drive:cs.record(cs.string(),cs.unknown())}),cs.object({kv:Rs}),cs.object({photos:cs.record(cs.string(),cs.unknown())}),cs.object({ping:cs.boolean()}),cs.object({system:_s})]),xs=(cs.object({msgID:cs.string(),body:Ns,token:cs.string().optional()}),cs.enum(["accountSecurityLevelTooLow","cryptoError","dataStoreError","failedToNotifyUser","failedToSave","internalError","invalidRequest","isUnderFirstDataProtectionLock","keyInvalid","keyVerificationRequired","localIdentityUnavailable","photoLibraryUnavailable","scopeLookupFailed","sessionIdTokenNeeded","sessionIdValidationFailed","sessionInvalid","syncNotEnabled","timeoutExceeded","unrecognizedSender","webSearchNotEnabled"]));var Ls;!function(e){e.Fixable="fixable",e.Transient="transient",e.Exceptional="exceptional"}(Ls||(Ls={}));const js=cs.boolean(),Us=cs.union([cs.object({drive:cs.record(cs.string(),cs.unknown())}),cs.object({error:xs}),cs.object({kv:Ms}),cs.object({photos:cs.record(cs.string(),cs.unknown())}),cs.object({ping:js}),cs.object({system:As})]),Fs=cs.object({msgID:cs.string(),body:Us,i:cs.number().optional(),t:cs.number().optional()});class zs{constructor(){this.disposer=new DisposableStack,this._disposed=!1}get disposed(){return this._disposed}[Symbol.dispose](){this._disposed||(this.disposer.dispose(),this._disposed=!0)}}function Bs(){const e=performance.now();return()=>{return t=performance.now()-e,100*Math.ceil(t/100);var t}}n(1096),n(1097);const Ks=new TextEncoder,Hs=new TextDecoder,Ws=vo.a.ICloudWeb;function qs(e,t,n){const r={msgID:e,body:t};return void 0!==(null===n||void 0===n?void 0:n.sessionIdToken)&&(r.token=n.sessionIdToken),r}class Vs extends zs{constructor(e,t,n){super(),this.ids=void 0,this.provider=void 0,this.updateWebSearchEnabledInStatus=void 0,this.pending=new Map,this.respondingInternal=Object(os.signal)(!1),this.responding=Object(os.computed)((()=>this.respondingInternal.value)),this.handlePush=async(e,t)=>{var n;if(this.disposed)return!1;const r=null!==(n=e.payload)&&void 0!==n?n:e.message;if(!r)return!1;if(!(r instanceof ArrayBuffer||r instanceof Uint8Array))return!1;if(t instanceof Error)return!1;if(Object(bs.a)(t.internalController).isBPlist(r))return!1;let i,o;if(function(e){try{let t;return t=e instanceof ArrayBuffer?new Uint8Array(e):e,31===t[0]&&139===t[1]}catch{return!1}}(r)){const e=await async function(e){try{if("undefined"===typeof DecompressionStream)return W.Result.failure();const t=new ReadableStream({start(t){t.enqueue(e),t.close()}}).pipeThrough(new DecompressionStream("gzip")),n=t.getReader(),r=[];let i=0,o=!1;for(;!o;){const{value:e,done:t}=await n.read();o=t,e&&(r.push(e),i+=e.length)}const a=new Uint8Array(i);let s=0;for(const e of r)a.set(e,s),s+=e.length;const c=Hs.decode(a);return W.Result.success(c)}catch(t){return W.Result.failure()}}(r);if(!e.ok)return!1;i=e.value}else i=Hs.decode(r);try{o=Object(Cs.c)(i,Fs,"SkyBridgeResponse")}catch{return!0}Object(Co.a)(this.provider).info`received response id=${Object(Uo.c)(o.msgID).notPII().forCertain()}\nbody: ${Object(Uo.c)(o.body).personal()}`;const a=this.pending.get(o.msgID);return a?(a.handleResponse(W.Result.success({payload:o,raw:e})),!0):(this.handleIncomingMessage(o),!0)},this.ids=e,this.provider=t,this.updateWebSearchEnabledInStatus=n,this.disposer.defer(Object(os.effect)((()=>{const n=e.registration.value;if(void 0===n)return;let r;return n.idsServiceController.value.then((e=>{this.disposed||e instanceof Error||(r=Object(ws.a)(e.internalController.ids).topic(Ws,new Ss.b(t,Ws)).subscribe((t=>this.handlePush(t,e))))})),()=>{var e;this.cancelPendingMessages({type:"disconnected"}),null===(e=r)||void 0===e||e()}})))}[Symbol.dispose](){this.cancelPendingMessages({type:"disposed"}),super[Symbol.dispose]()}sendRequestWithSingleResponse(e,t,n){return new Promise((r=>{this.sendRequest(e,t,((e,t,n)=>{r(e),n()}),n)}))}async sendRequestAckOnly(e,t,n){if(this.disposed)return W.Result.failure({type:"disposed"});const r=await this.ids.ensureRegistered();if(r instanceof Error)return W.Result.failure({type:"disconnected",error:r});const i=this.getNewMessageId();Object(Co.a)(this.provider).info`sendRequestAckOnly id=${Object(Uo.c)(i).notPII().forCertain()}\nrecipients count: ${Object(Uo.c)(e.length).personal()}\nbody: ${Object(Uo.c)(t).personal()}`;const o=qs(i,t,n),a=await r.internalController.nice.withPayload(Ks.encode(JSON.stringify(o)),e);try{return await r.internalController.push.sendPush(Ws,a,"iCloudWeb").ack(),W.Result.success()}catch(s){return W.Result.failure({type:"disconnected",error:s instanceof Error?s:new Error(String(s))})}}sendRequest(e,t,n,r){const i=this.getNewMessageId();Object(Co.a)(this.provider).info`sendRequest id=${Object(Uo.c)(i).notPII().forCertain()}\nrecipients count: ${Object(Uo.c)(e.length).personal()}\nbody: ${Object(Uo.c)(t).personal()}`;const o=Object(Oo.a)(this.provider),a=Bs(),s={ackDuration:null,firstResponseDuration:null,finalResponseDuration:null};let c,u=!1;const l=e=>{u||(u=!0,this.pending.delete(i),clearTimeout(c),o.reportStat("skybridge.sendMessage",{...s,messageType:$s(t),messageId:i,resultType:e}))};c=setTimeout((()=>{this.respondingInternal.value=!1,n(W.Result.failure({type:"timeout"}),!0,(()=>{l("cancelled")})),l("timedOut")}),15e3);let d=-1;const p=[],f=(e,t,r,i)=>{const o=-1!==t&&(0===t||e+1===t);return o&&(s.finalResponseDuration=a()),n(W.Result.success({payload:r,raw:i}),o,(()=>{l("cancelled")})),o&&l("done"),o};return this.pending.set(i,{cleanUp:()=>{l("cancelled")},handleResponse:t=>{if(u)return;if(!t.ok)return n(t,!0,(()=>{})),void l("error");null===s.firstResponseDuration&&(s.firstResponseDuration=a());const{payload:{body:r,i:i,t:o},raw:c}=t.value,{fromEndpoint:h}=c;if(!h)return;if(!e.find((e=>ss(e.theirs.ktLoggableData,h.theirs.ktLoggableData))))return;if(this.respondingInternal.value=!0,void 0===i||void 0===o)return s.finalResponseDuration=a(),n(W.Result.success({payload:r,raw:c}),!0,(()=>{})),void l("done");if(d+1!==i){let e=p.findIndex((e=>{let[t]=e;return t>i}));return-1===e&&(e=p.length),void p.splice(e,0,[i,o,r])}if(f(i,o,r,c))return;d=i;let m=0;for(;m<p.length;m++){const[e,t,n]=p[m];if(d+m+1!==e)break;if(f(e,t,n,c))return}d+=m,p.splice(0,m)}}),(async()=>{if(this.disposed)return;const o=await this.ids.ensureRegistered();if(o instanceof Error)return void n(W.Result.failure({type:"disconnected",error:o}),!0,(()=>{}));const c=qs(i,t,r),u=await o.internalController.nice.withPayload(Ks.encode(JSON.stringify(c)),e);o.internalController.push.sendPush(Ws,u,"iCloudWeb").ack().then((()=>{s.ackDuration=a()}))})(),()=>{l("cancelled")}}handleIncomingMessage(e){if(!("system"in e.body))return W.Result.failure({type:"wrong response type",response:e.body});if(!("settingUpdated"in e.body.system))return W.Result.failure({type:"wrong response type",response:e.body});const t=e.body.system.settingUpdated.find((e=>"webSearch"in e));return t?(this.updateWebSearchEnabledInStatus(t.webSearch),W.Result.success({response:e.body})):W.Result.failure({type:"wrong response type",response:e.body})}getNewMessageId(){return Object(La.a)()}cancelPendingMessages(e){for(const{handleResponse:t,cleanUp:n}of this.pending.values())t(W.Result.failure(e)),n();this.pending.clear()}}function $s(e){const t=Object.keys(e);if(1!==t.length)return"unknown";const n=t[0],r=e[n];if(!r||"object"!==typeof r)return n;const i=Object.keys(r);return 1!==i.length?n:`${n}.${i[0]}`}const Gs=new TextEncoder;class Zs{constructor(e,t,n,r,i){this.messageTransceiver=void 0,this.pairingKeyStore=void 0,this.sessionIdTokenManager=void 0,this.lifeCycleTracker=void 0,this.logger=void 0,this.pendingKeyVerification=Object(os.signal)(void 0),this.isPending=Object(os.computed)((()=>void 0!==this.pendingKeyVerification.value)),this.messageTransceiver=e,this.pairingKeyStore=t,this.sessionIdTokenManager=n,this.lifeCycleTracker=r,this.logger=i.child`KeyVerification`()}async verifyKey(e){this.logger.info`Starting key verification with ${Object(Uo.c)(e.length).personal()} endpoint(s)`;const t=this.pendingKeyVerification.peek();return t?(this.logger.debug`Key verification already in progress, waiting for existing promise`,t):this.pendingKeyVerification.value=(async()=>{try{const t=await this.sessionIdTokenManager.refresh();return t.ok?await this.verifyKeyCriticalSection(e,t.value):(this.logger.warn`Failed to refresh session ID token`,W.Result.failure({type:"failed to refresh session id token",error:t.error}))}finally{this.pendingKeyVerification.value=void 0}})()}async verifyKeyCriticalSection(e,t){const n=await this.pairingKeyStore.get();if(!n.ok)return W.Result.failure({type:"IndexedDB operation failed",error:n.error});const r=n.value;if(void 0===r)return this.logger.warn`Pairing key unavailable`,W.Result.failure({type:"pairing key unavailable"});const{pairingKey:i,pairingKeyId:o,ktLoggableData:a}=r;if(this.logger.debug`Retrieved pairing key, previously bound: ${Object(Uo.c)(void 0!==a).constant()}`,void 0!==a){const e=await this.pairingKeyStore.validateSessionIdentity(t);if(!e.ok)return this.logger.warn`Session identity validation failed`,W.Result.failure({type:"session identity mismatch",error:e.error});this.logger.debug`Session identity validation passed`}let s;const c=Object(os.signal)(!1),u=Bs();this.logger.debug`Initiating handshake with ${Object(Uo.c)(e.length).personal()} endpoint(s)`;try{s=await Promise.any(e.map((e=>this.verifyKeyForOneEndpointOrThrow(e,i,c,t))))}catch(d){return this.logger.warn`Key verification failed`,this.lifeCycleTracker.trackEvent("keyVerificationAttempt",{outcome:Qs(d.errors)?"invalid":"failed",duration:u(),previouslyBound:void 0!==a}),W.Result.failure({type:"aggregate",errors:d.errors})}finally{c.value=!0}const l=await this.pairingKeyStore.setKtLoggableData(o,s.ktLoggableData,s.deviceName,t);return l.ok?(this.logger.info`Key verification succeeded`,this.lifeCycleTracker.trackEvent("keyVerificationAttempt",{outcome:"verified",duration:u(),previouslyBound:void 0!==a}),W.Result.success()):W.Result.failure({type:"IndexedDB operation failed",error:l.error})}async verifyKeyForOneEndpointOrThrow(e,t,n,r){const i=Object(La.a)(),o=e.ours.ktLoggableData,a=e.theirs.ktLoggableData,s=await this.sendCancellableRequest(e,{kv:{s:{v:1,t:i}}},n,r);if(n.peek())throw{type:"verified other endpoint"};if(!s.ok)throw s.error;if(!("kv"in s.value))throw{type:"wrong response type",response:s.value};const c=s.value.kv;if(!("c"in c))throw{type:"wrong response type",response:s.value};if(1!==c.c.v)throw{type:"unsupported protocol version",response:s.value};const u=Object(go.a)(c.c.c);if(u instanceof Error)throw{type:"invalid challenge"};if(32!==u.length)throw{type:"invalid challenge",challenge:u};const l=new Uint8Array(32);do{crypto.getRandomValues(l)}while(ss(l,u));const d=Object(go.c)(l),p=await crypto.subtle.sign("HMAC",t,this.serializePairingRequest(u,l,i,r,o,a));if(n.peek())throw{type:"verified other endpoint"};const f=await this.sendCancellableRequest(e,{kv:{rc:{r:Object(go.c)(new Uint8Array(p)),c:d,t:i}}},n);if(n.peek())throw{type:"verified other endpoint"};if(!f.ok)throw f.error;if("error"in f.value&&("keyInvalid"===f.value.error||"sessionInvalid"===f.value.error))throw{type:"rejected by remote"};if(!("kv"in f.value))throw{type:"wrong response type",response:f.value};const h=f.value.kv;if(!("r"in h))throw{type:"wrong response type",response:f.value};let m,g;"string"===typeof h.r?(m=h.r,g=""):(m=h.r.r,g=h.r.s.deviceDisplayName);const v=Object(go.a)(m);if(v instanceof Error)throw{type:"invalid challenge response"};if(32!==v.byteLength)throw{type:"invalid challenge response",challengeResponse:v};const y=await crypto.subtle.verify("HMAC",t,v,this.serializePairingRequest(u,l,i,r,a,o));if(n.peek())throw{type:"verified other endpoint"};if(!y)throw{type:"incorrect challenge response"};return{ktLoggableData:a,deviceName:g}}async sendCancellableRequest(e,t,n,r){return new Promise((i=>{const o=this.messageTransceiver.sendRequest([e],t,((e,t,n)=>{n(),e.ok?i(W.Result.success(e.value.payload)):i(e)}),{sessionIdToken:r});n.subscribe((e=>{e&&o()}))}))}serializePairingRequest(e,t,n,r,i,o){const a=Gs.encode(r),s=Object(La.c)(n);if(s instanceof Error)throw s;const c=new ArrayBuffer(64+a.byteLength+i.byteLength+o.byteLength+27),u=new DataView(c),l=new Uint8Array(c);let d=0;return u.setUint8(d,1),d+=1,u.setUint16(d,e.byteLength,!0),d+=2,l.set(new Uint8Array(e),d),d+=32,u.setUint16(d,t.byteLength,!0),d+=2,l.set(new Uint8Array(t),d),d+=32,l.set(s,d),d+=16,u.setUint16(d,a.byteLength,!0),d+=2,l.set(new Uint8Array(a),d),d+=a.byteLength,u.setUint16(d,i.byteLength,!0),d+=2,l.set(new Uint8Array(i),d),d+=i.byteLength,u.setUint16(d,o.byteLength,!0),d+=2,l.set(new Uint8Array(o),d),d+=o.byteLength,c}}const Qs=e=>e.every((e=>e&&"object"===typeof e&&"type"in e&&"rejected by remote"===e.type));var Ys=n(2255);const Js=[Ws];class Xs extends Error{}Error;class ec{constructor(e,t){this.provider=void 0,this.lifeCycleTracker=void 0,this.connectionState=Object(os.signal)({state:"disconnected",identity:void 0}),this.connected=Object(os.computed)((()=>{switch(this.connectionState.value.state){case"disconnected":return is.False;case"pending":return is.Pending;case"ready":return is.True}})),this.identity=Object(os.computed)((()=>this.connectionState.value.identity)),this.provider=e,this.lifeCycleTracker=t}async ensureConnected(){const e=this.connectionState.peek();switch(e.state){case"pending":return e.connectionPromise;case"ready":{const t=e.connection;return t.isConnected||(await t.attemptReconnect(),t.isConnected)?t:new Xs}case"disconnected":return this.connect()}}connect(){const e=this._connect();return this.connectionState.value={state:"pending",connectionPromise:e,identity:this.identity.peek()},e}async _connect(){let e=0;const t=Bs();try{const t=await Object(Ys.b)();let n;for(let i=0;i<3&&(e=i,n=await Object(Ys.c)({provider:this.provider,topics:Js,identity:t}),n instanceof Error);i++);const r=n;if(r instanceof Error)throw r;return this.connectionState.value={state:"ready",connection:r.connection,identity:r.identity},r.connection}catch(n){return this.connectionState.value={state:"disconnected",identity:void 0},Object(Co.a)(this.provider).warn`APNSConnection._connect failed: ${n}`,n}finally{this.lifeCycleTracker.trackEvent("connectApns",{success:"ready"===this.connectionState.value.state,duration:t(),attempts:e})}}}const tc=[Ws];class nc{constructor(e,t,n,r,i){this.provider=void 0,this.apns=void 0,this.appleId=void 0,this.lifeCycleTracker=void 0,this.idsIdentity=void 0,this.registration=Object(os.computed)((()=>{const e=this.apns.identity.value;if(void 0!==e)return new rc(this.provider,e,this.idsIdentity,this.lifeCycleTracker)})),this.query=Object(os.computed)((()=>{const e=this.registration.value;if(void 0===e)return;const t=e.idsServiceController.value;return void 0!==t?new ic(this.provider,t,this.appleId,this.lifeCycleTracker):void 0})),this.provider=e,this.apns=t,this.appleId=n,this.lifeCycleTracker=r,this.idsIdentity=async function(e){let{provider:t,extractable:n=!1,dsid:r}=e;Object(Co.a)(t).info`Generating new local IDS Identity`;const i=await Object(ia.c)(n),o=await async function(){const e=await Object(ia.c)(!0),t=await crypto.subtle.generateKey({name:"RSA-OAEP",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])},!0,["encrypt","decrypt"]);return{signingKey:e,dataKey:t,publicIdentity:{signingKey:e.publicKey,dataKey:t.publicKey}}}();return{dsid:r,signingKeyPair:i,preKeyPair:await Object(ia.b)(n),legacyIdentity:o}}({provider:e,dsid:i})}async ensureRegistered(){const e=await this.apns.ensureConnected();if(e instanceof Error)return e;const t=this.registration.peek();return void 0===t?new Xs:t.idsServiceController.peek()}async getEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=await this.ensureRegistered();if(t instanceof Error)return t;const n=this.query.peek();if(void 0===n)return new Xs;let r;if(e)r=await n.refresh();else{const e=await n.endpoints.peek();r=e instanceof Error?await n.refresh():e}return r instanceof Error||this.lifeCycleTracker.trackConnectionComplete(),r}}class rc{constructor(e,t,n,r){this.provider=void 0,this.pushIdentity=void 0,this.idsIdentityPromise=void 0,this.lifeCycleTracker=void 0,this._idsServiceController=void 0,this.idsServiceController=Object(os.computed)((()=>this._idsServiceController.value)),this.provider=e,this.pushIdentity=t,this.idsIdentityPromise=n,this.lifeCycleTracker=r,this._idsServiceController=Object(os.signal)(this.register())}async register(){const e=await this.idsIdentityPromise;let t=0;const n=Bs();let r=await Object(Eo.a)((async n=>{const r=await rs({provider:this.provider,idsIdentity:e,pushIdentity:this.pushIdentity,topics:tc});return r instanceof Error&&Object(Co.a)(this.provider).info`IDSRegistration.register attempt ${Object(Uo.c)(n).constant()} failed: ${Object(Uo.c)(r).notPII().forCertain()}`,t=n,r}),3);const i=n();return this.lifeCycleTracker.trackEvent("fetchApnsToken",{success:!(r instanceof ns),attempts:t,duration:i}),r instanceof Error&&Object(Co.a)(this.provider).warn`IDSRegistration.register failed: ${Object(Uo.c)(r).notPII().forCertain()}`,this.lifeCycleTracker.trackEvent("registerIdsEndpoint",{success:!(r instanceof Error),duration:i,attempts:t}),r}}class ic{constructor(e,t,n,r){this.provider=void 0,this.ids=void 0,this.appleId=void 0,this.lifeCycleTracker=void 0,this._endpoints=void 0,this.endpoints=Object(os.computed)((()=>this._endpoints.value)),this._endpointsSync=Object(os.signal)(void 0),this.endpointsSync=Object(os.computed)((()=>this._endpointsSync.value)),this.provider=e,this.ids=t,this.appleId=n,this.lifeCycleTracker=r,this._endpoints=Object(os.signal)(this.loadEndpoints())}refresh(){return Object(os.batch)((()=>(this._endpointsSync.value=void 0,this._endpoints.value=this.loadEndpoints())))}async loadEndpoints(){await Promise.resolve();const e=this._endpoints.peek();let t=!1;const n=Bs();let r=0,i=0;try{const t=await this.ids;if(t instanceof Error)return t;const a=await t.internalController.validEndpointsFor((o=this.appleId,o.includes("@")?`mailto:${o}`:`tel:${o}`),Ws);i=n();const s=a.filter((e=>!ss(e.ours.pushToken,e.theirs.pushToken)&&e.theirs.isDevice));return e===this._endpoints.peek()&&(this._endpointsSync.value=s),r=s.length,s}catch(a){return t=!0,i=n(),e===this._endpoints.peek()&&(this._endpointsSync.value=a),Object(Co.a)(this.provider).warn`IDSCachedQuery.loadEndpoints failed: ${Object(Uo.c)(a).notPII().forCertain()}`,a}finally{this.lifeCycleTracker.trackEvent("queryIdsEndpoints",{success:!t,duration:i,attempts:1,deviceCountBucket:r})}var o}}class oc{constructor(e){this.reportStatImpl=void 0,this.deviceType=void 0,this.osVersion=void 0,this.reportStatImpl=e}reportStat(e,t,n){this.reportStatInternal(e,t)}reportPerf(e,t,n){this.reportStatInternal(e,t)}reportError(e){this.reportStatInternal("skybridge.error",e)}reportPush(e,t){this.reportStatInternal("skybridge.push",{pushType:e})}didEncounterIssue(e){let{level:t,message:n}=e;this.reportStatInternal("skybridge.didEncounterIssue",{level:t,message:n})}reportStatInternal(e,t){let n={deviceType:this.deviceType,osVersion:this.osVersion,...t};this.reportStatImpl(e,n)}finishInit(){}}class ac{constructor(e,t,n,r,i,o,a){this.idsRegistrationManager=void 0,this.pairingKeyStore=void 0,this.keyVerification=void 0,this.keyVerificationCompleted=void 0,this.sessionIdTokenManager=void 0,this.invalidatePairingKey=void 0,this.logger=void 0,this.idsRegistrationManager=e,this.pairingKeyStore=t,this.keyVerification=n,this.keyVerificationCompleted=r,this.sessionIdTokenManager=i,this.invalidatePairingKey=o,this.logger=a.child`RequestPreparationCoordinator`()}async prepareRecipients(e){this.logger.debug`Preparing recipients for ${Object(Uo.c)(e.verification).constant()} verification`;const t=await this.idsRegistrationManager.getEndpoints();if(t instanceof Error)return W.Result.failure({type:"disconnected",error:t});if("none"===e.verification)return this.logger.debug`Returning all ${Object(Uo.c)(t.length).personal()} endpoints for unverified message`,W.Result.success(t);const n=await this.pairingKeyStore.get();if(!n.ok||void 0===n.value)return this.logger.warn`No pairing key available`,W.Result.failure({type:"pairing key unavailable"});let r=n.value.ktLoggableData;if(!r||!this.keyVerificationCompleted.peek()){var i;const e=this.keyVerificationCompleted.peek();this.logger.debug`Initiating proactive key verification (ktLoggableData=${Object(Uo.c)(!!r).constant()}, completed=${Object(Uo.c)(e).constant()})`;let n=t;if(r){const e=t.find((e=>ss(e.theirs.ktLoggableData,r)));e&&(this.logger.debug`Using single paired endpoint for key verification`,n=[e])}const o=await this.keyVerification.verifyKey(n);if(!o.ok)return r&&"aggregate"===o.error.type&&o.error.errors.every((e=>"rejected by remote"===e.type))?(this.logger.warn`Key verification failed, invalidating pairing key`,this.invalidatePairingKey(),W.Result.failure({type:"verified endpoint not found"})):(this.logger.warn`Key verification failed`,W.Result.failure({type:"key verification failed"}));this.logger.info`Key verification completed, returning verified endpoint`;const a=await this.pairingKeyStore.get();if(!a.ok||void 0===a.value)return W.Result.failure({type:"pairing key unavailable"});if(r=null===(i=a.value)||void 0===i?void 0:i.ktLoggableData,!r)return W.Result.failure({type:"key verification failed"})}const o=t.find((e=>ss(e.theirs.ktLoggableData,r)));return o?W.Result.success([o]):(this.logger.warn`Verified endpoint not found in available endpoints`,W.Result.failure({type:"verified endpoint not found"}))}async prepareSessionToken(e){if(e)return this.logger.debug`Using existing session token`,e;if(this.sessionIdTokenManager.needsProactiveRefresh()){this.logger.debug`Proactively refreshing session token`;const e=await this.sessionIdTokenManager.refresh();if(e.ok)return this.logger.debug`Session token refresh succeeded`,await this.pairingKeyStore.updateHsaTrustFromRefresh(e.value),e.value;this.logger.warn`Session token refresh failed`}}}class sc{constructor(e,t,n,r,i){this.paired=void 0,this.lastStatusResponse=void 0,this.cachedDeviceName=void 0,this.keyVerified=void 0,this.responding=void 0,this.deviceConnectionState=Object(os.computedMemo)((()=>{const e=this.paired.value;if(e!==is.True)return{paired:e};const t=this.lastStatusResponse.value;return void 0===t?{paired:is.True,reachable:is.False,deviceName:this.cachedDeviceName.value}:"pending"===t?{paired:is.True,reachable:is.Pending,deviceName:this.cachedDeviceName.value}:{paired:is.True,reachable:is.True,deviceName:t.deviceDisplayName,enabled:t.isWebSearchEnabled,keyVerified:this.keyVerified.value,responding:this.responding.value}}),cc),this.paired=e,this.lastStatusResponse=t,this.cachedDeviceName=n,this.keyVerified=r,this.responding=i}}function cc(e,t){return e.paired===is.False&&t.paired===is.False||e.paired===is.Pending&&t.paired===is.Pending||e.paired===is.True&&t.paired===is.True&&(e.reachable===is.False&&t.reachable===is.False||e.reachable===is.Pending&&t.reachable===is.Pending?e.deviceName===t.deviceName:e.reachable===is.True&&t.reachable===is.True&&e.deviceName===t.deviceName&&e.enabled===t.enabled&&e.keyVerified===t.keyVerified&&e.responding===t.responding)}class uc extends zs{constructor(e,t){super(),this.reportStat=void 0,this.start=performance.now(),this.readyToSearchLatencySent=!1,this.reportStat=e,this.disposer.defer(t.subscribe((e=>this.onDeviceConnectionStateChanged(e))))}onDeviceConnectionStateChanged(e){if(!this.readyToSearchLatencySent&&(t=e).paired===is.True&&t.reachable===is.True&&t.enabled&&t.keyVerified===is.True){const e=performance.now()-this.start;this.reportStat("skybridge.deviceConnection",{readyToSearchLatency:e}),this.readyToSearchLatencySent=!0}var t}}class lc{constructor(e,t){this.feedbackService=void 0,this.logger=void 0,this.connection={getElapsedTime:void 0,failure:void 0,emitted:!1},this.trigger=void 0,this.feedbackService=e,this.logger=t}trackStart(e){this.logger.info`ConnectionLifeCycle.trackStart: trigger=${Object(Uo.c)(e).constant()}`,this.trigger=e,this.connection={getElapsedTime:Bs(),failure:void 0,emitted:!1},this.logger.info`ConnectionLifeCycle.trackStart: connection timer created`}trackEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"keyVerificationAttempt"!==e&&this.handleConnectionEvent(e,t),n&&this.feedbackService.reportStat(`skybridge.${e}`,t)}trackConnectionComplete(){this.logger.info`ConnectionLifeCycle.trackConnectionComplete: connection.emitted=${Object(Uo.c)(this.connection.emitted).constant()}`,this.connection.emitted||this.emitConnectionAttempt()}trackEnd(){this.logger.info`ConnectionLifeCycle.trackEnd: connection.emitted=${Object(Uo.c)(this.connection.emitted).constant()}`,this.connection.emitted||this.emitConnectionAttempt()}handleConnectionEvent(e,t){this.connection.emitted||void 0!==this.connection.failure||(this.logger.info`ConnectionLifeCycle.handleConnectionEvent event=${Object(Uo.c)(e).constant()} success=${Object(Uo.c)(null===t||void 0===t?void 0:t.success).constant()}`,!1===(null===t||void 0===t?void 0:t.success)&&(this.connection.failure="connectApns"===e?"webSocketConnectionFailed":"fetchApnsToken"===e?"apnsTokenFetchFailed":`${e}Failed`,this.emitConnectionAttempt()))}emitConnectionAttempt(){var e,t,n,r,i,o;if(this.connection.emitted)return;this.connection.emitted=!0;const a=null!==(e=null===(t=(n=this.connection).getElapsedTime)||void 0===t?void 0:t.call(n))&&void 0!==e?e:null;this.logger.info`ConnectionLifeCycle.emitConnectionAttempt: duration=${Object(Uo.c)(a).performance()}, outcome=${Object(Uo.c)(null!==(r=this.connection.failure)&&void 0!==r?r:"success").constant()}`,this.feedbackService.reportStat("skybridge.connectionAttempt",{outcome:null!==(i=this.connection.failure)&&void 0!==i?i:"success",duration:a,trigger:null!==(o=this.trigger)&&void 0!==o?o:null})}}class dc extends zs{static async forUser(e,t,n){return new this(e,t,n)}constructor(e,t,n){let{idsEnv:r=to.a.carry,pushEnv:i=to.a.carry,logger:o,reportStat:a,getServicesDomain:s,fetchService:c}=n;super(),this.lastStatusResponse=Object(os.signal)("pending"),this.verificationOutcome=Object(os.signal)(null),this.keyVerificationCompleted=Object(os.computed)((()=>"success"===this.verificationOutcome.value)),this.keyVerified=Object(os.computed)((()=>this.keyVerification.isPending.value?is.Pending:"success"===this.verificationOutcome.value?is.True:"timeout"===this.verificationOutcome.value||"resetting"===this.verificationOutcome.value?is.Pending:is.False)),this.cachedDeviceName=Object(os.signal)(void 0),this.responding=Object(os.signal)(!1),this.connectionStateComputer=void 0,this.deviceConnectionState=void 0,this.provider=void 0,this.apnsConnection=void 0,this.idsRegistrationManager=void 0,this.messageTransceiver=void 0,this.keyVerification=void 0,this.requestPreparation=void 0,this.respondingSyncCleanup=void 0,this.pairingKeyStore=void 0,this.sessionIdTokenManager=void 0,this.lifeCycleTracker=void 0,this.feedbackService=void 0,this.appleId=void 0,this.dsid=void 0,this.idsEnv=void 0,this.pushEnv=void 0,this.logger=void 0,this.statusSentOnce=!1,this.pendingStatus=void 0,this.appleId=e,this.dsid=t,this.idsEnv=r,this.pushEnv=i,this.logger=null!==o&&void 0!==o?o:Object(Io.a)({log(){}}),this.pairingKeyStore=new ys(t,this.logger);const u=new oc(a||(()=>{}));this.feedbackService=u,this.lifeCycleTracker=new lc(u,this.logger),this.sessionIdTokenManager=new ps({fetchService:c,getServicesDomain:s,lifeCycleTracker:this.lifeCycleTracker,logger:this.logger}),this.initializeConnectionComponents(),this.connectionStateComputer=new sc(this.pairingKeyStore.paired,this.lastStatusResponse,this.cachedDeviceName,this.keyVerified,this.responding),this.deviceConnectionState=this.connectionStateComputer.deviceConnectionState,a&&this.disposer.use(new uc(a,this.deviceConnectionState)),this.pairingKeyStore.get().then((e=>{var t;if(!e.ok)return;const n=null===(t=e.value)||void 0===t?void 0:t.deviceName;void 0!==n&&(this.cachedDeviceName.value=n),void 0!==e.value&&this.initiateConnectionAttempt("reload")})),this.disposer.defer(Object(os.effect)((()=>{const e=this.deviceConnectionState.value;this.logger.info`Device connection state updated:
paired              = ${Object(Uo.c)("paired"in e?e.paired:void 0).constant()}
reachable           = ${Object(Uo.c)("reachable"in e?e.reachable:void 0).constant()}
deviceName          = ${Object(Uo.c)("deviceName"in e?e.deviceName:void 0).personal()}
enabled             = ${Object(Uo.c)("enabled"in e?e.enabled:void 0).constant()}
keyVerified         = ${Object(Uo.c)("keyVerified"in e?e.keyVerified:void 0).constant()}
responding          = ${Object(Uo.c)("responding"in e?e.responding:void 0).constant()}
`})))}initializeConnectionComponents(){var e;null===(e=this.respondingSyncCleanup)||void 0===e||e.call(this),this.provider=function(e){let{env:t,pushEnv:n,useDirect:r,directDomain:i,logger:o=es,feedback:a=ts,idsConfig:s}=e;const c=Object(So.a)(o);return new $o([oo.b.useInstance(oo.a[null!==n&&void 0!==n?n:t]),qo.useInstance(Ko(globalThis.fetch,t,r,i)),uo.useInstance(null!==s&&void 0!==s?s:new co),Co.a.useInstance(o),_o.a.useInstance(c),Oo.a.useInstance(a)])}({env:this.idsEnv,pushEnv:this.pushEnv,logger:this.logger,feedback:this.feedbackService}),this.apnsConnection=new ec(this.provider,this.lifeCycleTracker),this.idsRegistrationManager=new nc(this.provider,this.apnsConnection,this.appleId,this.lifeCycleTracker,this.dsid),this.messageTransceiver=new Vs(this.idsRegistrationManager,this.provider,this.updateWebSearchEnabledInStatus.bind(this)),this.keyVerification=new Zs(this.messageTransceiver,this.pairingKeyStore,this.sessionIdTokenManager,this.lifeCycleTracker,this.logger),this.requestPreparation=new ac(this.idsRegistrationManager,this.pairingKeyStore,this.keyVerification,this.keyVerificationCompleted,this.sessionIdTokenManager,(()=>{this.invalidatePairingKey()}),this.logger),this.respondingSyncCleanup=Object(os.effect)((()=>{this.responding.value=this.messageTransceiver.responding.value}))}async initiateConnectionAttempt(e){this.lifeCycleTracker.trackStart(e);const t=await this.validateBoundKeySession();return t.ok?(this.idsRegistrationManager.ensureRegistered(),await this.status()):t}async validateBoundKeySession(){const e=await this.pairingKeyStore.get();if(!e.ok)return W.Result.failure({type:"IndexedDB operation failed",error:e.error});if(void 0===e.value)return W.Result.failure({type:"pairing key unavailable"});if(void 0===e.value.ktLoggableData)return W.Result.success();const t=await this.sessionIdTokenManager.refresh();return t.ok?(await this.pairingKeyStore.validateSessionIdentity(t.value)).ok?W.Result.success():W.Result.failure({type:"pairing key unavailable"}):W.Result.failure({type:"failed to refresh session id token"})}updateWebSearchEnabledInStatus(e){let t=this.lastStatusResponse.peek();t&&"pending"!==t&&(this.lastStatusResponse.value={...t,isWebSearchEnabled:e},!0===e&&this.feedbackService.reportStat("skybridge.enabledWebSearch"))}async hardRetryConnectionAttempt(){return this.pairingKeyStore.get().then((async e=>e.ok&&void 0!==e.value?(this.initializeConnectionComponents(),this.verificationOutcome.value="resetting",await this.initiateConnectionAttempt("retry")):W.Result.failure({type:"pairing key unavailable"})))}async setPairingKeyAndConnect(e,t){return Object(Co.a)(this.provider).debug`Pairing key retrieved: ${Object(Uo.c)(e).personal()}`,await this.pairingKeyStore.setPairingKey(e),await this.initiateConnectionAttempt(t).then((e=>(this.lifeCycleTracker.trackEnd(),e)))}async ping(){const e=await this.sendRequestWithSingleResponse({ping:!0},{verification:"requireOrInitiate"});return e.ok?"ping"in e.value?W.Result.success(e.value.ping):W.Result.failure({type:"wrong response type",response:e.value}):e}async notifyDeviceOfUpdatedSession(){const[e,t,n]=await Promise.all([this.sessionIdTokenManager.refresh(),this.idsRegistrationManager.getEndpoints(),this.pairingKeyStore.get()]);if(!e.ok)return W.Result.failure({type:"failed to refresh session id token"});if(t instanceof Error)return W.Result.failure({type:"disconnected",error:t});if(!n.ok||void 0===n.value)return W.Result.failure({type:"pairing key unavailable"});const r=n.value.ktLoggableData;if(void 0===r)return W.Result.failure({type:"pairing key unavailable"});const i=t.find((e=>ss(e.theirs.ktLoggableData,r)));return i?(await this.pairingKeyStore.updateHsaTrustFromRefresh(e.value),await this.messageTransceiver.sendRequestAckOnly([i],{ping:!0},{sessionIdToken:e.value})):W.Result.failure({type:"pairing key unavailable"})}async askDeviceToEnableSearch(){const e=await this.sendRequestWithSingleResponse({system:{ade:!0}},{verification:"requireOrInitiate"});return e.ok?"system"in e.value&&"ade"in e.value.system?W.Result.success(e.value.system.ade):W.Result.failure({type:"wrong response type",response:e.value}):e}async status(e){if(Object(Co.a)(this.provider).verbose`SkyBridgeLink.status(${Object(Uo.c)(e).notPII().forCertain()})`,null!==e&&void 0!==e&&e.once&&this.statusSentOnce){const e=this.lastStatusResponse.peek();if(e&&"pending"!==e)return W.Result.success(e);if(this.pendingStatus)return this.pendingStatus}const t=this.sendStatusRequest();return this.statusSentOnce||(this.statusSentOnce=!0,this.pendingStatus=t,t.finally((()=>{this.pendingStatus=void 0}))),t}async sendStatusRequest(){let e,t=!1;try{var n,r;null!==(r=(n=this.lastStatusResponse).value)&&void 0!==r||(n.value="pending");const i=await this.sendRequestWithSingleResponse({system:{status:{version:1}}},{verification:"requireOrInitiate"});if(!i.ok)return t=!0,i;if(!("system"in i.value))return t=!0,W.Result.failure({type:"wrong response type",response:i.value});if(!("status"in i.value.system))return t=!0,W.Result.failure({type:"wrong response type",response:i.value});const{value:{system:{status:o}}}=i;return e=o,W.Result.success(o)}finally{e?(this.lastStatusResponse.value=e,this.feedbackService.deviceType=e.deviceType,this.feedbackService.osVersion=e.osVersion):t&&(this.lastStatusResponse.value=void 0)}}async verifyKey(){const e=await this.idsRegistrationManager.getEndpoints();if(e instanceof Error)return W.Result.failure({type:"disconnected",error:e});const t=await this.pairingKeyStore.get();if(!t.ok||void 0===t.value)return W.Result.failure({type:"pairing key unavailable"});let n,r=t.value.ktLoggableData;if(null!==r){const t=e.find((e=>ss(e.theirs.ktLoggableData,r)));if(!t)return this.pairingKeyStore.delete().then((e=>{e.ok||Object(Co.a)(this.provider).warn`failed to delete pairing key: ${e.error}`})),W.Result.failure({type:"pairing key unavailable"});n=[t]}else n=e;const i=await this.keyVerification.verifyKey(n);if(i.ok)this.verificationOutcome.value="success";else if("aggregate"===i.error.type){const e=i.error.errors.every((e=>"timeout"===e.type));this.verificationOutcome.value=e?"timeout":null,Qs(i.error.errors)&&this.pairingKeyStore.delete().then((e=>{e.ok||Object(Co.a)(this.provider).warn`failed to delete pairing key: ${e.error}`}))}return i}async sendRequestWithSingleResponse(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=pc(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),r=await this.requestPreparation.prepareRecipients(n);if(!r.ok)return r;const i=await this.requestPreparation.prepareSessionToken(null===t||void 0===t?void 0:t.sessionIdToken),o=await this.messageTransceiver.sendRequestWithSingleResponse(r.value,e,{sessionIdToken:i});if(!o.ok)return o;this.updateStatusFromResponse(n,o.value.payload);const a=await this.prepareForRetryIfNeeded(n,o.value.payload);return a.ok?!a.value.shouldRetry||null!==t&&void 0!==t&&t.isRetry?W.Result.success(o.value.payload):this.sendRequestWithSingleResponse(e,{...n,verification:"requireOrFail"},{isRetry:!0,sessionIdToken:a.value.sessionIdToken}):a}sendRequest(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=!1,o=()=>{i=!0};return(async()=>{const a=pc(n),s=await this.requestPreparation.prepareRecipients(a);if(i)return;if(!s.ok)return void t(s,!0,(()=>{}));const c=await this.requestPreparation.prepareSessionToken(null===r||void 0===r?void 0:r.sessionIdToken);o=this.messageTransceiver.sendRequest(s.value,e,((n,i,o)=>{n.ok?(this.updateStatusFromResponse(a,n.value.payload),null!==r&&void 0!==r&&r.isRetry?t(W.Result.success(n.value.payload),i,o):this.prepareForRetryIfNeeded(a,n.value.payload).then((r=>{r.ok?r.value.shouldRetry?this.sendRequest(e,t,{...a,verification:"requireOrFail"},{isRetry:!0,sessionIdToken:r.value.sessionIdToken}):t(W.Result.success(n.value.payload),i,o):t(r,i,o)}))):t(n,i,o)}),{sessionIdToken:c})})(),()=>{o()}}updateStatusFromResponse(e,t){if("none"!==e.verification){if(!("error"in t))return this.verificationOutcome.value="success",void this.sessionIdTokenManager.markTokenValidated();switch(t.error){case"keyVerificationRequired":this.verificationOutcome.value=null;break;case"keyInvalid":case"sessionInvalid":this.invalidatePairingKey()}}}invalidatePairingKey(){this.verificationOutcome.value=null,this.pairingKeyStore.delete().then((e=>{e.ok||Object(Co.a)(this.provider).warn`Failed to delete pairing key: ${e.error}`}))}async prepareForRetryIfNeeded(e,t){if("requireOrInitiate"===e.verification&&"error"in t&&"keyVerificationRequired"===t.error){const e=await this.verifyKey();return e.ok?W.Result.success({shouldRetry:!0}):W.Result.failure({type:"key verification failed",error:e.error})}if("error"in t&&("sessionIdTokenNeeded"===t.error||"sessionIdValidationFailed"===t.error)){const e=await this.sessionIdTokenManager.refresh({forceRefresh:!0});return e.ok?W.Result.success({shouldRetry:!0,sessionIdToken:e.value}):W.Result.failure({type:"failed to refresh session id token",error:e.error})}return W.Result.success({shouldRetry:!1})}}function pc(e){return{verification:"requireOrInitiate",...e}}class fc{constructor(e){this.link=void 0,this.listener=new nr.a("com.icloud.skybridge"),this.link=e,this.listener.addEventListener("connect",(t=>{t.connection.exportedObject=this.makeExports(t.connection),t.connection.start();const n=e.deviceConnectionState.subscribe((e=>{t.connection.remoteObjectProxy.deviceConnectionStateUpdate(e)}));t.connection.addEventListener("connectionstatechange",(()=>{"closed"===t.connection.connectionState&&n()}))})),this.listener.start()}close(){this.listener.close()}makeExports(e){const t=new Map;return{ping:()=>this.link.ping(),verifyKey:()=>this.link.verifyKey(),status:e=>this.link.status(e),cancelRequest:e=>{var n;null===(n=t.get(e))||void 0===n||n(),t.delete(e)},sendRequest:(n,r)=>{t.set(n,this.link.sendRequest(r,((r,i)=>{e.remoteObjectProxy.responseReceived(n,r,i),r.ok&&!i||t.delete(n)})))},sendRequestWithSingleResponse:e=>this.link.sendRequestWithSingleResponse(e),askDeviceToEnableSearch:()=>this.link.askDeviceToEnableSearch(),hardRetryConnectionAttempt:()=>this.link.hardRetryConnectionAttempt()}}}var hc=n(2175);function mc(e){switch(e.message){case"Failed to fetch":case"NetworkError when attempting to fetch resource.":case"Load failed":return!0;default:return!1}}function gc(e){return e instanceof DOMException||!!(e instanceof TypeError&&mc(e))}class vc extends Error{constructor(e,t){super(e),this.statusCode=void 0,this.name="HttpStatusCodeError",this.statusCode=t}}function yc(e){switch(e){case 330:case 401:case 421:case 423:case 503:return!0;default:return!1}}function bc(e){return 200<=e&&e<300}const wc=/^https:\/\/(?:p\d+-)?(\w+)\./;function Sc(e){return 200*2**e}const Cc={maxAttempts:5,getRetryWaitTime:Sc,getShouldRetry:()=>{}};function _c(e,t){return new Request(e.url,{body:t,cache:e.cache,credentials:e.credentials,headers:e.headers,integrity:e.integrity,keepalive:e.keepalive,method:e.method,mode:e.mode,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,signal:e.signal})}const Oc=new class{constructor(e){this.fetchReportingService=void 0,this.serviceNameForUrl=void 0,this.getDsid=void 0,this.getClientId=void 0,this.fetchJson=async(e,t)=>{const{nativeOptions:n,iCloudOptions:r,schema:i,getReportStatParams:o}=this.parseFetchJsonOptions(t);let a;try{a=await this.internalFetchUnsafe(e,n,{retry:null===r||void 0===r?void 0:r.retry,isSuccessResponseStatus:null===r||void 0===r?void 0:r.isSuccessResponseStatus,useExactRequestUrl:null===r||void 0===r?void 0:r.useExactRequestUrl})}catch(c){if(gc(c))return{ok:!1,error:c};throw c}const s=await async function(e,t,n,r,i){var o;const{status:a}=t;if(!(null!==(o=null===i||void 0===i?void 0:i(a))&&void 0!==o?o:bc(a)))return{ok:!1,error:new vc("Request failed",a),response:t};let s;try{const i=performance.now();return s=await t.clone().json(),n+=performance.now()-i,{ok:!0,value:e.as(s,{duration:n,attempts:r}),response:t}}catch(c){return{ok:!1,value:s,error:Cs.a.from(c,e.name),response:t}}}(i,a.response,a.duration,a.attempts,null===r||void 0===r?void 0:r.isSuccessResponseStatus);return this.reportResponse(a,this.reportingOptions(r),null===o||void 0===o?void 0:o(a.request,a.response,s)),s},this.fetchUntyped=async(e,t)=>{var n,r;const{nativeOptions:i,iCloudOptions:o,getReportStatParams:a}=this.parseFetchUntypedOptions(t);let s;try{s=await this.internalFetchUnsafe(e,i,{retry:null===o||void 0===o?void 0:o.retry,isSuccessResponseStatus:null===o||void 0===o?void 0:o.isSuccessResponseStatus,useExactRequestUrl:null===o||void 0===o?void 0:o.useExactRequestUrl})}catch(c){if(gc(c))return W.Result.failure(c);throw c}return this.reportResponse(s,this.reportingOptions(o),null===a||void 0===a?void 0:a(s.request,s.response)),(null!==(n=null===t||void 0===t||null===(r=t.isSuccessResponseStatus)||void 0===r?void 0:r.call(t,s.response.status))&&void 0!==n?n:bc(s.response.status))?W.Result.success(s.response):W.Result.failure(s.response)},this.fetchUnsafe=async(e,t,n)=>{var r;const i=this.finalizeRequestOptions(t&&{...t},n),o=this.finalizeICloudOptions(n&&{...n},t),a=await this.internalFetchUnsafe(e,i,o);return this.reportResponse(a,o,null===n||void 0===n||null===(r=n.getReportStatParams)||void 0===r?void 0:r.call(n,a.request,a.response)),a.response},this.configuration=void 0,this.fetchReportingService=e.fetchReportingService,this.serviceNameForUrl=e.serviceNameForUrl,this.getDsid=e.getDsid,this.getClientId=e.getClientId}parseFetchJsonOptions(e){const{dontReportServerError:t,getReportStatParams:n,isCloudKitErrorResponseStatus:r,isSuccessResponseStatus:i,reportingMethod:o,reportingPathname:a,reportingServiceName:s,retry:c,schema:u,shouldReportDetailedStat:l,useExactRequestUrl:d,...p}=e,f={dontReportServerError:t,isCloudKitErrorResponseStatus:r,isSuccessResponseStatus:i,reportingMethod:o,reportingPathname:a,reportingServiceName:s,retry:c,shouldReportDetailedStat:l,useExactRequestUrl:d};return{nativeOptions:this.finalizeRequestOptions({...p},f),iCloudOptions:this.finalizeICloudOptions(f,p),schema:u,getReportStatParams:n}}parseFetchUntypedOptions(e){const{dontReportServerError:t,getReportStatParams:n,isCloudKitErrorResponseStatus:r,isSuccessResponseStatus:i,reportingMethod:o,reportingPathname:a,reportingServiceName:s,retry:c,shouldReportDetailedStat:u,useExactRequestUrl:l,...d}=e,p={dontReportServerError:t,isCloudKitErrorResponseStatus:r,isSuccessResponseStatus:i,reportingMethod:o,reportingPathname:a,reportingServiceName:s,retry:c,shouldReportDetailedStat:u,useExactRequestUrl:l};return{nativeOptions:this.finalizeRequestOptions({...d},p),iCloudOptions:this.finalizeICloudOptions(p,d),getReportStatParams:n}}async internalFetchUnsafe(e,t,n){let r;const i=null===n||void 0===n?void 0:n.retry;if((!0===i||(null===i||void 0===i?void 0:i.maxAttempts))&&(null===t||void 0===t?void 0:t.body)instanceof ReadableStream)throw new Error("Cannot enable retry with streaming request body");if(e instanceof Request){if(void 0!==(null===n||void 0===n?void 0:n.retry)&&e.body)throw new Error("Cannot enable retry with streaming request body");r=new Request(e,t)}else{const i=g.b(e);r=new Request(!0===(null===n||void 0===n?void 0:n.useExactRequestUrl)?i:this.finalizeRequestUrl(i),t)}const o=null!==n&&void 0!==n&&n.retry?this.makeRetryingFetch(n,null===t||void 0===t?void 0:t.body):async function(){return{response:await fetch(...arguments),attempts:1}},a=performance.now(),{response:s,attempts:c}=await o(r);return{attempts:c,duration:performance.now()-a,request:r,response:s}}configure(e){void 0===this.configuration?this.configuration=e:Object.assign(this.configuration,e)}finalizeRequestUrl(e){var t;return null!==(t=this.configuration)&&void 0!==t&&t.modifyRequestUrl&&(e=this.configuration.modifyRequestUrl(e)),function(e,t){let{clientId:n,dsid:r}=t;__CW_BUILD_INFO&&"object"===typeof __CW_BUILD_INFO&&(e.searchParams.set("clientBuildNumber",__CW_BUILD_INFO.buildNumber),e.searchParams.set("clientMasteringNumber",__CW_BUILD_INFO.masteringNumber)),e.searchParams.set("clientId",n),r&&e.searchParams.set("dsid",r)}(e,{clientId:this.getClientId(),dsid:this.getDsid()}),e}finalizeRequestOptions(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return null!==(e=this.configuration)&&void 0!==e&&e.modifyRequestOptions&&(n=null!==(t=this.configuration.modifyRequestOptions(n,r))&&void 0!==t?t:{}),n}finalizeICloudOptions(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==(t=this.configuration)&&void 0!==t&&t.modifyICloudOptions?this.configuration.modifyICloudOptions(e,n):e}makeRetryingFetch(e,t){var n;return null!==(n=this.configuration)&&void 0!==n&&n.makeRetryingFetch?this.configuration.makeRetryingFetch(e,t):n=>async function(e,t,n,r){const{maxAttempts:i,getRetryWaitTime:o,getShouldRetry:a}={...Cc,...!0===t?{}:t};let s,c;for(s=0;;s++){var u;try{c=W.Result.success(await fetch(e))}catch(l){if(!(l instanceof TypeError&&mc(l)))throw l;c=W.Result.failure(l)}if(s+1>=i)break;let t=a(s,c);if(t instanceof Promise&&(t=await t),void 0!==t&&!t||c.ok&&(null!==(u=null===n||void 0===n?void 0:n(c.value.status))&&void 0!==u?u:bc(c.value.status)))break;let d=r;r instanceof ReadableStream&&([d,r]=r.tee()),e=_c(e,d);let p=o(s,c);p instanceof Promise&&(p=await p);const f=null!==p&&void 0!==p?p:Sc(s);await new Promise((e=>setTimeout(e,f)))}if(c.ok)return{response:c.value,attempts:s+1};throw c.error}(n,e.retry,e.isSuccessResponseStatus,t)}reportResponse(e,t,n){var r;null!==(r=this.configuration)&&void 0!==r&&r.reportResponse?this.configuration.reportResponse(e,t,n):function(e,t,n,r,i,o,a,s,c,u){var l,d,p,f,h,m;const g=String(n),v=null!==(l=null!==(d=null===c||void 0===c?void 0:c.reportingServiceName)&&void 0!==d?d:t(g))&&void 0!==l?l:function(e){var t,n;return null!==(t=null===(n=e.match(wc))||void 0===n?void 0:n[1])&&void 0!==t?t:"unknown"}(g),y=i.status;if(!1!==(null!==(p=null===c||void 0===c||null===(f=c.shouldReportDetailedStat)||void 0===f?void 0:f.call(c,y))&&void 0!==p?p:function(e){return function(e){return 421!==e&&(e<200||e>=400)}(e)||bc(e)||yc(e)}(y))){const{dontReportServerError:t,reportingMethod:i,reportingPathname:l}=null!==c&&void 0!==c?c:{};e.responseReceived({httpMethod:i?`${i} VIA ${r}`:r,statusCode:y,hostname:n.hostname,serviceName:v,clientTiming:a,net_uncompressedResponseSize:o,timedOut:!1,attempts:s,urlPath:null!==l&&void 0!==l?l:n.pathname,...t&&{dontReportServerError:t},...u},y,g)}else e.responseReceived(null!==u&&void 0!==u?u:{},y,g);(null!==(h=null===c||void 0===c||null===(m=c.isCloudKitErrorResponseStatus)||void 0===m?void 0:m.call(c,y,i))&&void 0!==h?h:yc(y))&&(e.didReceiveCloudKitErrorResponse?e.didReceiveCloudKitErrorResponse(y,{serviceName:v,timeTaken:a}):e.didReceiveSpecialResponse(y,{serviceName:v,timeTaken:a}))}(this.fetchReportingService,this.serviceNameForUrl,g.b(e.request.url),e.request.method,e.response,function(e){const t=e.headers.get("content-length");if(null===t)return;const n=parseInt(t);return!isNaN(n)&&isFinite(n)?n:void 0}(e.response),e.duration,e.attempts,t,n)}reportingOptions(e){return{dontReportServerError:null===e||void 0===e?void 0:e.dontReportServerError,isCloudKitErrorResponseStatus:null===e||void 0===e?void 0:e.isCloudKitErrorResponseStatus,reportingMethod:null===e||void 0===e?void 0:e.reportingMethod,reportingPathname:null===e||void 0===e?void 0:e.reportingPathname,reportingServiceName:null===e||void 0===e?void 0:e.reportingServiceName,shouldReportDetailedStat:null===e||void 0===e?void 0:e.shouldReportDetailedStat}}}({fetchReportingService:{didReceiveSpecialResponse(e,t){Object(z.c)(e)},didReceiveCloudKitErrorResponse(e,t){Object(z.c)(e)},responseReceived(e,t,n){_.a.sharedInstance.recordStat({appName:S.a.applicationName,masteringNumber:S.a.masteringNumber,buildNumber:S.a.buildNumber},e,t,n)}},serviceNameForUrl(e){var t;return null!==(t=Object(H.i)(e))&&void 0!==t?t:void 0},getDsid(){var e;return null===(e=P.h.peek())||void 0===e||null===(e=e.details)||void 0===e?void 0:e.dsid},getClientId:()=>ht.a.sharedInstance.identifier}),Ec={PROD:to.a.prod,CARRY:to.a.carry,ICLOUD1:to.a.sandbox,ICLOUD2:to.a.qa1,ICLOUD3:to.a.qa1},Ic={carry:to.a.carry,prod:to.a.prod,sandbox:to.a.sandbox,qa1:to.a.qa1,qa2:to.a.qa2},Ac=class extends tr.a{constructor(){super(...arguments),this.skyBridgeLink=null,this.skyBridgeService=null,this.pendingBase64PairingKey=void 0}init(){var e,t,n,r,i;const o=null!==(e=null===(t=H.c.peek())||void 0===t?void 0:t.environment)&&void 0!==e?e:"PROD";if(null===(n=P.h.value)||void 0===n||null===(n=n.details)||void 0===n||!n.dsid)throw new Error("no dsid available");const a=null!==(r=null!==(i=Ic[hc.a.sbenv])&&void 0!==i?i:Ec[o])&&void 0!==r?r:to.a.carry;this.skyBridgeLink=new dc(P.h.value.details.appleId,P.h.value.details.dsid,{useSaved:!1,idsEnv:a,pushEnv:a,reportStat:(e,t)=>{F.b.sharedInstance.recordStat(new U.a(e,t))},logger:Pc(),getServicesDomain:()=>S.a.domain.servicesDomain,fetchService:Oc}),this.skyBridgeService=new fc(this.skyBridgeLink),void 0!==this.pendingBase64PairingKey&&(this.skyBridgeLink.setPairingKeyAndConnect(this.pendingBase64PairingKey,"firstSignIn"),this.pendingBase64PairingKey=void 0)}setKey(e,t){var n;this.skyBridgeLink?null===(n=this.skyBridgeLink)||void 0===n||n.setPairingKeyAndConnect(e,t?"onDemand2FA":"firstSignIn"):this.pendingBase64PairingKey=e}close(){var e,t;null===(e=this.skyBridgeService)||void 0===e||e.close(),null===(t=this.skyBridgeLink)||void 0===t||t[Symbol.dispose]()}},Tc={off:{level:ro.a.Error,piiPolicy:io.a.none},error:{level:ro.a.Error,piiPolicy:io.a.none},warn:{level:ro.a.Warn,piiPolicy:io.a.none},info:{level:ro.a.Info,piiPolicy:io.a.none},debug:{level:ro.a.Debug,piiPolicy:io.a.preserveAllIDs},all:{level:ro.a.Silly,piiPolicy:io.a.DEBUG_INTERNAL_ALL}};function Pc(){const e=Tc[hc.a.sblog]||Tc.off;return Object(no.a)(e)}var Rc=n(1352),kc=n(891),Dc=n(2193),Mc=n(970),Nc=n(1258),xc=n(2161),Lc=n(2261),jc=n(1205),Uc=n(1167),Fc=n(2171);const zc=[Mc.a,Nc.a,bn.a,Xt.a,qt.a,jc.a,xc.a,Jt.a,Yt.a,Uc.a,Zn.a,Lc.a,Fc.a];var Bc=n(1261),Kc=n(2154),Hc=n(1145),Wc=n(1101),qc=Object.defineProperty,Vc=Object.defineProperties,$c=Object.getOwnPropertyDescriptors,Gc=Object.getOwnPropertySymbols,Zc=Object.prototype.hasOwnProperty,Qc=Object.prototype.propertyIsEnumerable,Yc=(e,t,n)=>t in e?qc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jc=(e,t)=>{for(var n in t||(t={}))Zc.call(t,n)&&Yc(e,n,t[n]);if(Gc)for(var n of Gc(t))Qc.call(t,n)&&Yc(e,n,t[n]);return e},Xc=(e,t)=>Vc(e,$c(t)),eu=Wc.GLOBAL_OBJ,tu=void 0;function nu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(Wc.makePromiseBuffer)(e.bufferSize||30),r={};return{send:function(i){const o=[];if(Object(Wc.forEachEnvelopeItem)(i,((t,n)=>{const i=Object(Wc.envelopeItemTypeToDataCategory)(n);if(Object(Wc.isRateLimited)(r,i)){const r=ru(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return Object(Wc.resolvedSyncPromise)();const a=Object(Wc.createEnvelope)(i[0],o),s=t=>{Object(Wc.forEachEnvelopeItem)(a,((n,r)=>{const i=ru(n,r);e.recordDroppedEvent(t,Object(Wc.envelopeItemTypeToDataCategory)(r),i)}))},c=(e.getRequest||(t=>({body:Object(Wc.serializeEnvelope)(t,e.textEncoder)})))(a);return c?n.add((()=>t(c).then((e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),r=Object(Wc.updateRateLimits)(r,e)}),(e=>{s("network_error")})))).then((e=>e),(e=>{if(e instanceof Wc.SentryError)return s("queue_overflow"),Object(Wc.resolvedSyncPromise)();throw e})):Object(Wc.resolvedSyncPromise)()},flush:e=>n.drain(e)}}function ru(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function iu(e){return e===fu||(console.error(`[SentryKit Versioning Error] ${function(e){return e||(e="unknown"),`Version mismatch between the installed Sentry SDK version (${e}) and supported SDK version (${fu}) by SentryKit. Make sure to use supported version of the Sentry SDK (${fu}).`}(e)} All sent data will be discarded.`),!1)}function ou(e,t,n){const r=(null==n?void 0:n.path)?n.path+".":"",i=i=>{const o=r+i,a=e[i],s=t({obj:e,key:i,value:a,path:o,parentContext:n});if("remove"===s)return s;null!==a&&"object"===typeof a&&ou(a,t,{obj:e,key:i,value:a,path:o,parentContext:n})};if(Array.isArray(e))for(let o=0;o<e.length;o++)"remove"===i(o.toString())&&(e.splice(o,1),o--);else for(const o in e)"remove"===i(o)&&delete e[o]}console.log;var au=(e,t,n)=>("url"!==e.type&&"url-query"!==e.type||"string"===typeof n.obj[n.key])&&("timestamp"!==e.type||"number"===typeof n.obj[n.key])&&(e.matchPath?"function"===typeof e.matchPath?e.matchPath({eventType:t,path:n.path,key:n.key,value:n.value}):e.matchPath.test(n.path):"url"===e.type||"url-query"===e.type?uu(n):"timestamp"!==e.type||lu(n)),su=(e,t,n,r,i)=>"url-query"===e.type&&(!e.matchQueryName||("function"===typeof e.matchQueryName?e.matchQueryName({eventType:t,path:n.path,key:n.key,url:n.value,queryName:r,queryValue:i}):e.matchQueryName.test(r))),cu=[e=>/^spans\.\d+\.data\.url$/.test(e.path)&&"http.client"===e.parentContext.obj.op&&(Object.defineProperty(e.obj,"_url",{enumerable:!1,value:e.value})||!0),e=>/^spans\.\d+\.description$/.test(e.path)&&"http.client"===e.obj.op&&e.obj.data&&e.obj.description===`${e.obj.data.method} ${e.obj.data._url||e.obj.data.url}`,e=>/^breadcrumbs\.\d+\.data\.url$/.test(e.path)&&("fetch"===e.parentContext.obj.category||"xhr"===e.parentContext.obj.category),e=>/^breadcrumbs\.\d+\.data\.from$/.test(e.path)&&"navigation"===e.parentContext.obj.category,e=>/^breadcrumbs\.\d+\.data\.to$/.test(e.path)&&"navigation"===e.parentContext.obj.category,e=>/^request\.url$/.test(e.path),e=>/^request\.headers\.Referer$/.test(e.path)],uu=e=>cu.some((t=>t(e))),lu=e=>"number"===typeof e.value&&e.path.toLowerCase().endsWith("timestamp"),du=(e,t)=>{const n="transaction"===e._itemHeader.type?"transaction":"error";return ou(e,(e=>{const{path:r,key:i,obj:o}=e;for(const[a,s]of t.entries())if(au(s,n,e)&&(!("action"in s)||"keep"!==s.action))if("timestamp"===s.type){const e=o[i],t="function"===typeof s.precision?s.precision({eventType:n,path:r,key:i,timestamp:e}):s.precision;"number"===typeof t?o[i]=t:"seconds"===t?o[i]=Math.round(e):"minutes"===t&&(o[i]=60*Math.round(e/60))}else if("url-query"===s.type){const c=o[i],[u,l=""]=c.split("?"),d=new URLSearchParams(l);[...d.entries()].forEach((o=>{let[u,l]=o;if(su(s,n,e,u,l)){if(t.slice(a+1).some((t=>au(t,n,e)&&su(t,n,e,u,l))))return;if("remove"===s.action)d.delete(u);else if("replace"===s.action){const e="function"===typeof s.replace?s.replace({key:i,path:r,url:c,queryName:u,queryValue:l,eventType:n}):s.replace;d.set(u,e)}}}));const p=d.toString();o[i]=u+(p?`?${p}`:"")}else if("url"===s.type){if(t.slice(a+1).some((t=>au(t,n,e)&&"url"===t.type)))continue;if("remove"===s.action)return"remove";if("replace"===s.action){const e="function"===typeof s.replace?s.replace({key:i,path:r,url:o[i],eventType:n}):s.replace;o[i]=e}}else if("any"===s.type&&"action"in s){if(t.slice(a+1).some((t=>au(t,n,e)&&"any"===t.type)))continue;if("remove"===s.action)return"remove";if("replace"===s.action){const e="function"===typeof s.replace?s.replace({key:i,path:r,value:o[i],eventType:n}):s.replace;o[i]=e}}})),e};function pu(e){return e.getRequest=t=>{if(!function(e){var t;return iu(null==(t=e[0].sdk)?void 0:t.version)}(t))return!1;const n=function(e,t){const[n,r]=e;delete n.dsn;const i={_envelopeHeader:n,project:t.project,v:4};return r.map((e=>{const t=e[0].type;if("event"!==t&&"transaction"!==t)return Xc(Jc({},i),{_itemHeader:e[0],_debugLogs:[`Items of type "${t}" are not supported yet. Dropped the item.`]});const[n,r]=e;return Jc(Xc(Jc({},i),{_itemHeader:n}),r)}))}(t,e.sentryKitConfig).map((t=>du(JSON.parse(JSON.stringify(t)),e.sentryKitConfig.privacyRules))),r="transaction"===n[0]._itemHeader.type?"traces":"error",i=function(e,t){const n=new URL(e);return n.pathname="/report/2/"+t,n.toString()}(e.sentryKitConfig.ingestUrl,e.sentryKitConfig.topic[r]);return{url:i,body:JSON.stringify({events:n}),headers:{"Content-type":"application/json"}}},Object(Wc.supportsFetch)()?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){if(tu)return tu;if(Object(Wc.isNativeFetch)(eu.fetch))return tu=eu.fetch.bind(eu);const e=eu.document;let t=eu.fetch;if(e&&"function"===typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){}return tu=t.bind(eu)}();return nu(e,(function(n){const r=Jc({body:n.body,method:"POST",referrerPolicy:"origin",headers:n.headers,keepalive:n.body.length<=65536},e.fetchOptions);try{return t(n.url,r).then((e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(i){return tu=void 0,Object(Wc.rejectedSyncPromise)(i)}}))}(e):function(e){return nu(e,(function(e){return new Wc.SyncPromise(((t,n)=>{const r=new XMLHttpRequest;r.onerror=n,r.onreadystatechange=()=>{4===r.readyState&&t({statusCode:r.status,headers:{"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")}})},r.open("POST",e.url);for(const i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&r.setRequestHeader(i,e.headers[i]);r.send(e.body)}))}))}(e)}var fu="7.27.0",hu="prod",mu=[{type:"any",matchPath:/tags\..+$/,action:"remove"},{type:"any",matchPath:/tags\.(http\.status_code|visibilitychange|effectiveConnectionType|connectionType|deviceMemory|hardwareConcurrency|lcp\..+)$/,action:"keep"},{type:"any",matchPath:/^extra\.[^.]+$/,action:"remove"},{type:"any",matchPath:/^extra\.arguments$/,action:"keep"},{type:"any",matchPath:/^user\.[^.]+$/,action:"remove"},{type:"url-query",action:"replace",replace:"REMOVED"}];function gu(e){const t=function(e){const t="function"===typeof e.privacyRules?e.privacyRules(mu):!1===e.privacyRules?[]:[...mu,...e.privacyRules||[]];e.privacySettings&&t.push(...function(e){let{allowQueryParams:t,allowExtra:n,allowTags:r,timestampPrecision:i}=e;const o=[];return r&&o.push({type:"any",matchPath:e=>{let{path:t,key:n}=e;return t===`tags.${n}`&&r.includes(n)},action:"keep"}),n&&o.push({type:"any",matchPath:e=>{let{path:t,key:r}=e;return t===`extra.${r}`&&n.includes(r)},action:"keep"}),t&&o.push({type:"url-query",matchQueryName:e=>{let{url:n,queryName:r,path:i}=e;return("function"===typeof t?t(n):t).includes(r)},action:"keep"}),i&&o.push({type:"timestamp",precision:e=>{let{eventType:t,timestamp:n,path:r}=e;return"error"===t?i:n}}),o}(e.privacySettings));const n=Xc(Jc({transport:pu,ingestUrl:"",topic:"xp_amp_web_error_log",environment:"qa",filterHeadless:!0,maxBreadcrumbs:0,release:void 0,redactKeys:void 0,sampleRate:void 0,tracesSampleRate:void 0,tracesSampler:void 0},e),{privacyRules:t,dsn:"https://dsn@bypass/1",autoSessionTracking:!1,sendClientReports:!1,replaysSessionSampleRate:void 0,replaysOnErrorSampleRate:void 0});"string"===typeof n.topic&&(n.topic={error:n.topic,traces:""});const r=n;return r.transportOptions=Xc(Jc({},r.transportOptions),{sentryKitConfig:r}),r.ingestUrl||(r.ingestUrl=r.environment===hu?"https://xp.apple.com":"https://xp-qa.apple.com"),r}(e||{});if(!t.project)throw new Error("[SentryKit Configuration Error]: The required `project` field is not set.");const n=t.tracesSampleRate||t.tracesSampler,r=t.topic.traces;if(n&&!r)throw new Error("[SentryKit Configuration Error]: The `topic.traces` field is not set while trace sampling is configured.");if(r&&!n)throw new Error("[SentryKit Configuration Error]: Trace sampling is configured but `topic.traces` is not set.");return Jc(Jc({},t),function(e){const t=!(Hc.SDK_VERSION===fu)||e.environment===hu&&e.filterHeadless&&(void 0===navigator.userAgent||void 0===navigator.appVersion||void 0===navigator.plugins||void 0===navigator.languages||0===navigator.languages.length||""===navigator.language||navigator.webdriver||0===navigator.plugins.length||/HeadlessChrome/.test(navigator.userAgent)||/headless/i.test(navigator.appVersion));return{beforeSend:(n,r)=>t?null:e.beforeSend?e.beforeSend(n,r):n,beforeSendTransaction:(n,r)=>t?null:e.beforeSendTransaction?e.beforeSendTransaction(n,r):n,beforeBreadcrumb:(t,n)=>"console"===t.category?null:e.beforeBreadcrumb?e.beforeBreadcrumb(t,n):t}}(t))}iu(Hc.SDK_VERSION);var vu=n(1148);class yu{static __initStatic(){this.id="RewriteFrames"}__init(){this.name=yu.id}__init2(){this._prefix="app:///"}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yu.prototype.__init.call(this),yu.prototype.__init2.call(this),yu.prototype.__init3.call(this),e.root&&(this._root=e.root),e.prefix&&(this._prefix=e.prefix),e.iteratee&&(this._iteratee=e.iteratee)}setupOnce(e,t){e((e=>{const n=t().getIntegration(yu);return n?n.process(e):e}))}process(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=this._processExceptionsEvent(t)),t}__init3(){this._iteratee=e=>{if(!e.filename)return e;const t=/^[A-Z]:\\/.test(e.filename),n=/^\//.test(e.filename);if(t||n){const n=t?e.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):e.filename,r=this._root?Object(vu.f)(this._root,n):Object(vu.a)(n);e.filename=`${this._prefix}${r}`}return e}}_processExceptionsEvent(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map((e=>({...e,...e.stacktrace&&{stacktrace:this._processStacktrace(e.stacktrace)}})))}}}catch(t){return e}}_processStacktrace(e){return{...e,frames:e&&e.frames&&e.frames.map((e=>this._iteratee(e)))}}}yu.__initStatic();var bu=n(928),wu=n(2256),Su=n(1164),Cu=n(972);const _u={presentTermsAndConditions:(e,t,n)=>Au.cloudOSApplication.presentTermsAndConditions(e,t,n),redirectUserToCorrectDomainToAuthenticate:e=>Au.cloudOSApplication.redirectUserToCorrectDomainToAuthenticate(e),recordStat:(e,t)=>F.b.sharedInstance.recordStat(new U.a(e,t)),recordPerfStat:(e,t)=>F.b.sharedInstance.recordPerfStat(new U.a(e,t)),fetchFunctions:{fetchJson:ke.a.fetchJSON,fetchUrl:z.a}},Ou={retrieveSessionSignInLabel:Object($t.a)("CloudOS.Authentication.SignIn.AppleIdView.Title"),initializeSentry:(e,t)=>{const n=`${e}_www`;Object(bu.b)(e,t)&&Kc.b(gu({sampleRate:Object(bu.a)(e)?1:.1,project:"wwwicloudcom",debug:!1,ignoreErrors:[/^Can'?t find variable: logMutedMessage$/],beforeSend:t=>Object(bu.d)(e,t),integrations:[new yu({root:"/",iteratee:bu.c})],ingestUrl:Object(bu.a)(e)?"https://xp-qa.apple.com":"https://xp.apple.com",environment:n,release:t}))},showOnDemand2FA:()=>{},setupBrowserNotificationIfSupported:()=>Object(Su.a)()?wu.a.sharedInstance.setupBrowserNotificationData():Promise.resolve(),invalidatePreferencesStore(){tt.b.invalidate()},async displayTermsAndConditionsSuccessConfirmationIfNeeded(e){C.a.sharedInstance.needsTermsFlow&&await Au.cloudOSApplication.displayTermsAndConditionsSuccessConfirmation(e)},async showWaitingForPCSKeys(){Au.cloudOSApplication.showWaitingForPCSKeys()},async initializeAppPreferences(){var e;const t=-1!==zc.indexOf(null!==(e=C.a.sharedInstance.applicationIdentifier)&&void 0!==e?e:"");let n=tt.b.initialize(t);const r=Object(tt.a)();if(t){var i;const e=null===(i=b.a.sharedInstance.displayOrder.find((e=>e.identifier===C.a.sharedInstance.applicationIdentifier&&!e.applicationInfo.skipLoadingAppPreferences)))||void 0===i?void 0:i.applicationInfo.authBagId;e&&tt.b.initializeAppPreferences([e]),tt.b.lazyInitializeAppPreferences(r)}else{const e=await n;if(!e||!e.isOK)throw null===e||void 0===e?void 0:e.error;tt.b.lazyInitializeAppPreferences(r)}},willFetchForAuthenticatedUser:e=>Au.cloudOSApplication.willFetchForAuthenticatedUser(e),invalidateCachedAuthenticationDetails:()=>Au.cloudOSApplication.invalidateCachedAuthenticationDetails(),accountNeedsSetUp:()=>Au.cloudOSApplication.accountNeedsSetUp(),startInAppAuthentication:(e,t)=>Au.cloudOSApplication.startInAppAuthentication(e,t),validationDidSucceed:()=>Au.cloudOSApplication.validationDidSucceed(),validationDidFail:()=>Au.cloudOSApplication.validationDidFail(),authenticationDidCancel:()=>Au.cloudOSApplication.authenticationDidCancel(),authenticationStepDidComplete:(e,t,n)=>Au.cloudOSApplication.authenticationStepDidComplete(e,t,n),authenticationDidComplete:(e,t,n)=>Au.cloudOSApplication.authenticationDidComplete(e,t,n),authenticationDidFail:e=>Au.cloudOSApplication.authenticationDidFail(e),userWillUnauthenticate:()=>Au.cloudOSApplication.userWillUnauthenticate(),userDidUnauthenticate:()=>Au.cloudOSApplication.userDidUnauthenticate(),startSessionRetrieve:e=>Au.cloudOSApplication.startSessionRetrieve(e),sessionRetrieveDidComplete:()=>Au.cloudOSApplication.sessionRetrieveDidComplete(),reauthenticateDidCancel:()=>Au.cloudOSApplication.reauthenticateDidCancel(),continueAuthentication:()=>Au.cloudOSApplication.continueAuthentication(),configurationWasUpdated(){Au.cloudOSApplication.notifyHostingStateDidChange(),b.a.sharedInstance.update()},tryRefreshPushRegistrationTTL:()=>wu.a.sharedInstance.tryRefreshPushRegistrationTTL(),unregisterBrowserNotificationOnLogout:()=>wu.a.sharedInstance.onLogOut(),beginLoadPerformanceMeasurementForLogin:()=>Bc.a.sharedInstance.beginLoadPerformanceMeasurement("login"),setSecondaryLocale(){const e=Object(Cu.a)(S.a.locale),t=O.a.sharedInstance.hasSecondaryLocales.includes(e)?"en-us":null;t&&(S.a.secondaryLocale=t)}};var Eu=n(923);const Iu=Object(Io.a)({log(){}});class Au{constructor(){this.delegate=null,this.rootElement=void 0,this.paneProviderContainer=void 0,this._paneManager=void 0,this.stateListeners=new Set,this.useEarlyChild=document.getElementById("early-child"),this.rootComponentProps={rootState:{kind:this.useEarlyChild?"initial-load-with-early-child":"initial-load"},remoteViewControllers:[]},this.bannerController=new Ut,this.coreTypesController=new y.a(bt.a.sharedInstance.current),this.serviceManager=new tr.b(hc.a.sb?[new Zi.a,new Ne.a,new Yi,new Xi.a,new Ac]:[new Zi.a,new Ne.a,new Yi,new Xi.a]),this.childApplicationRemoteViewControllers=[],this.presentedChildApplicationRemoteViewController=null,this.insertChildApplicationLoadingTimeout=void 0,this.isTileDataPrefetched=!1,this.prefetchTileDataTimeout=null,this.isMetaThemeColorOverridden=!1,this._customizeHomepage=void 0,window.__startFilteringErrors(fn,hn,mn),window.__startFilteringUnhandledRejections(h,vn,yn),Object(H.h)(),Object(Dc.j)(),Object(P.d)(_u,Ou)}setRootComponentProps(e){!function(e,t,n){var r,i,o,a,s,c;const u=null!==(r=null!==(i=e.applicationIdentifier)&&void 0!==i?i:null===(o=e.configuration)||void 0===o?void 0:o.identifier)&&void 0!==r?r:"",l=null!==(a=null!==(s=t.applicationIdentifier)&&void 0!==s?s:null===(c=t.configuration)||void 0===c?void 0:c.identifier)&&void 0!==a?a:"";if(`${e.kind}::${u}`===`${t.kind}::${l}`)return;let d;switch(e.kind){case"load-child-application":case"child-application":if(n){var p;const t=null===(p=b.a.sharedInstance.getApplicationInfo(e.applicationIdentifier))||void 0===p?void 0:p.generation;d=U.a.withEventAndLabel("child-application"===e.kind?"navigate":"load","child-application",{childName:e.applicationIdentifier,appVersion:t})}break;case"springboard":d=U.a.withEventAndLabel("navigate","spring-board");break;case ln.b.plan:d=U.a.withEventAndLabel("navigate","plan-page");break;case ln.b.storage:d=U.a.withEventAndLabel("navigate","storage-page");break;case ln.b.recovery:d=U.a.withEventAndLabel("navigate","recovery-page");break;case ln.b.icloudplus:d=U.a.withEventAndLabel("navigate","icloudplus-page");break;case ln.b.settings:d=U.a.withEventAndLabel("navigate","settings-page");break;case"landing-page":d=U.a.withEventAndLabel("navigate","landing-page",{childName:e.applicationIdentifier,statCategory:sn.a.SESSION,source:C.a.sharedInstance.applicationIdentifier,...C.a.sharedInstance.applicationIdentifier===ln.b.plan&&{hasCid:!!C.a.sharedInstance.applicationParameter.url.searchParams.get("cid")}});break;default:return}d&&(d.addAdditionalProperties({statCategory:sn.a.USER,__allow_user:!0,...d.additionalProperties}),F.b.sharedInstance.recordStat(d))}(e.rootState,this.rootComponentProps.rootState,!!P.h.value),this.rootComponentProps=e,this.stateListeners.forEach((t=>t(e)))}showSpringboard(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"springboard",initiallyInCustomizeMode:e}})}switchToNavLink(e,t){var n,r;const i=null===(n=P.h.value)||void 0===n?void 0:n.details;if(!i)return void this.showLandingPage();const o=i.completedAuthenticationStep;if(0===o)return void this.showLandingPage();const a=i.totalAuthenticationSteps;if(1===o&&2===a)return this.showHomeLoginViewController(),void Object(T.a)();if(this.showBlockedHomePage())return;const s=Object(xe.f)(i);(e!==ln.b.icloudplus||s)&&(!(null===(r=i.beneficiaryInfo)||void 0===r?void 0:r.isBeneficiary)||e!==ln.b.settings&&e!==ln.b.recovery&&e!==ln.b.icloudplus)?this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:e,args:t}}):this.switchToSpringboard()}switchToSpringboard(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];w.a.sharedInstance.setCurrentChildApplicationIdentifier(void 0,t),S.a.title=Object($t.a)("Application.Title");const r=null===(e=P.h.value)||void 0===e?void 0:e.details;if(!r)return void this.showLandingPage();const i=r.completedAuthenticationStep;if(0===i)return void this.showLandingPage();this.hideCurrentApplication();const o=r.totalAuthenticationSteps;if(1===i&&2===o)this.showHomeLoginViewController(),Object(T.a)();else{if(this.showBlockedHomePage())return;this.showSpringboard(n)}}navigateToHomePage(){var e;null===(e=this.delegate)||void 0===e||e.navigateToHomePage()}redirectToHomeScreen(){var e;const t=null===(e=P.h.value)||void 0===e?void 0:e.details;t&&t.completedAuthenticationStep>0?this.switchToSpringboard():Object(m.a)(window.location.origin)}showLandingPage(e){var t;this.terminateCurrentChildApplication();const n=C.a.sharedInstance.redirectedAuthDetails,r=null!==(t=null===n||void 0===n?void 0:n.accountName)&&void 0!==t?t:"",i=!(null===n||void 0===n||!n.accountName);let o=!1;e===qt.b&&(o=!0);const a={appleId:r,ignoreForceCRAuth:i,pauseBetweenSteps:o,configuration:e},s=C.a.sharedInstance.applicationIdentifier,{detectedLocale:c}=C.a.sharedInstance.applicationParameter;Pu(c),this.setRootComponentProps({...this.rootComponentProps,homeLoginProps:a,rootState:{kind:"landing-page",onSignInPressed:()=>{this.showHomeLoginViewController()},isAppHidden:null===e||void 0===e?void 0:e.isHidden,isAppDisabled:null===e||void 0===e?void 0:e.isDisabled,applicationIdentifier:s}}),Object(T.g)()&&window.location.reload()}couldNotLaunchApplication(e){var t;const n=null!==(t=null===e||void 0===e?void 0:e.identifier)&&void 0!==t?t:C.a.sharedInstance.applicationIdentifier;this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"landing-page",isAppHidden:null===e||void 0===e?void 0:e.isHidden,isAppDisabled:null===e||void 0===e?void 0:e.isDisabled,applicationIdentifier:n,onSignInPressed:()=>{Object(ln.f)(ln.b.home,Object(Qn.a)("NavLinks.Home"))}}})}showHomeLoginViewController(e){const t=C.a.sharedInstance.redirectedAuthDetails;let n="",r=!1;t&&(t.accountName&&(n=t.accountName,r=!0),C.a.sharedInstance.redirectedAuthDetails=null,F.b.sharedInstance.recordStat(new U.a("userWasRedirectToCorrectDomainToAuthenticate")));let i=!1;const o=C.a.sharedInstance.applicationIdentifier;o&&!e&&o===qt.b.identifier&&b.a.sharedInstance.getApplicationConfiguration(o)&&(i=!0);const a=o?b.a.sharedInstance.getApplicationConfiguration(o):void 0;e?this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"unauthed-share",onSignInPressed:()=>{this.showHomeLoginViewController()},shareRecord:e}}):this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"home-login"},homeLoginProps:{appleId:n,authStepsToComplete:0,appName:void 0,ignoreForceCRAuth:r,pauseBetweenSteps:i,configuration:null!==a&&void 0!==a?a:void 0}}),this.hideCurrentApplication(),C.a.sharedInstance.isSignupRequested&&this.createAccount()}showShareAcceptanceError(e,t,n){this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"share-acceptance-error",errorTitle:e,errorDescription:t,applicationIdentifier:null!==n&&void 0!==n?n:bn.b.identifier}})}showUpgradeError(e,t,n){var r;null===(r=this.delegate)||void 0===r||r.showErrorDialog(e,t,n)}showShareAcceptanceViewController(e,t){var n;const r=e.applicationIdentifier;F.b.sharedInstance.recordStat(new U.a(`${r}.didShowShareAcceptanceView`));const i=null===(n=P.h.value)||void 0===n?void 0:n.details;var o,a;e instanceof Ht.a?this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"share-acceptance",isAuthenticated:t,shareRecord:e}}):this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"ck-share-acceptance",isAuthenticated:t,fullName:null!==(o=null===i||void 0===i?void 0:i.fullName)&&void 0!==o?o:"",appleId:null!==(a=null===i||void 0===i?void 0:i.appleId)&&void 0!==a?a:"",ckShareRecord:e,onSignInPressed:()=>{this.showHomeLoginViewController()}}})}showCKShareAcceptance(e){var t,n,r;const i=null===(t=P.h.value)||void 0===t?void 0:t.details;this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"ck-share-acceptance",isAuthenticated:!0,fullName:null!==(n=null===i||void 0===i?void 0:i.fullName)&&void 0!==n?n:"",appleId:null!==(r=null===i||void 0===i?void 0:i.appleId)&&void 0!==r?r:"",wasShareAccepted:!0,ckShareRecord:e,onSignInPressed:()=>{this.showHomeLoginViewController()}}})}hideVerifyShareAccessModal(){var e;null===(e=this.delegate)||void 0===e||e.hideVerifyShareAccessModal(),this.switchToSpringboard()}showNotification(e,t){this.setRootComponentProps({...this.rootComponentProps,notificationElement:t})}async removeNotification(e){this.setRootComponentProps({...this.rootComponentProps,notificationElement:void 0})}showBanner(e){this.setRootComponentProps({...this.rootComponentProps,bannerData:e})}removeBanner(){this.setRootComponentProps({...this.rootComponentProps,bannerData:void 0})}installLegacyServices(){const e=new Rt.a("com.apple.icloud.cloudos.telemetry",((e,t,n)=>new tn(F.a,n)));Rt.b.registerServices([e]),function(e,t,n,r,i,o){const a=new Rt.a("com.apple.icloud.cloudos.authenticationService",((e,t,n)=>new M(n))),s=new Rt.a("com.apple.icloud.cloudos.urlRequestService",((e,t,r)=>new K(n,e,r))),c=new Rt.a("com.apple.icloud.cloudos.contactsLookupService",((e,t,n)=>new Me(n))),u=new Rt.a("com.apple.icloud.cloudos.meCardService",((e,t,n)=>new Ue(n))),l=new Rt.a("com.apple.icloud.cloudos.legacyMeCardService",((e,t,n)=>new Be(n)),!0),d=new Rt.a("com.apple.icloud.cloudos.quotaService",((e,t,n)=>new qe(n))),p=new Rt.a("com.apple.icloud.cloudos.legacyQuotaService",((e,t,n)=>new Ge(n)),!0),f=new Rt.a("com.apple.icloud.cloudos.coretypesservice",((e,t,n)=>new Ye(o,n))),h=new Rt.a("com.apple.icloud.cloudos.legacyCoreTypesService",((e,t,n)=>new Xe(o,n)),!0),m=new Rt.a("com.apple.icloud.cloudos.bannerservice",((e,t,n)=>new st(i,n))),g=new Rt.a("com.apple.icloud.cloudos.preferencesService",((e,t,n)=>new Pt(n))),v=new Rt.a("com.apple.icloud.cloudos.composeService",((e,t,n)=>new j(n))),y=new Rt.a("com.apple.icloud.cloudos.pcsKeyService",((e,t,n)=>new Nt(n))),b=new Rt.a("com.apple.icloud.cloudos.legacyAppUrlService",((e,t,n)=>new Ct(n))),w=new Rt.a("com.apple.icloud.cloudos.legacyPreferencesService",((e,t,n)=>new dt(e,r,n)),!0),S=new Rt.a("com.apple.icloud.cloudos.legacyCloudKitResolutionService",((e,t,n)=>new Ot(n)),!0),C=new Rt.a("com.apple.icloud.cloudos.legacyRegionFormatter",((e,t,n)=>new It(n)),!0),_=new Rt.a("com.apple.icloud.cloudos.legacyTelemetryService",((e,r,i)=>new vt(e,t,n,i)),!0),O=new Rt.a("com.apple.icloud.cloudos.legacyCloudOSApplicationService",((e,t,n)=>new ct.a(e,t,i,n)),!0),E=new Rt.a("com.apple.icloud.cloudos.legacyPollingService",((e,t,n)=>new yt.a(n)),!0),I=new Rt.a("com.apple.icloud.cloudos.LegacyStartupInfoService",((e,t,n)=>new it(e.applicationInfo.applicationName,n)),!0);e.registerServices([a,s,c,u,l,d,p,f,h,m,g,v,y,b,S,w,C,_,O,E,I])}(Rt.b,F.a,_.a.sharedInstance,O.a.sharedInstance,this.bannerController,this.coreTypesController)}close(){this.serviceManager.close()}willFetchForAuthenticatedUser(e){this.triggerPrefetchTileData(!!C.a.sharedInstance.applicationIdentifier,e)}async presentTermsAndConditions(e,t,n){var r;return null!==(r=this.delegate)&&void 0!==r&&r.isInAppLogin&&this.delegate.pauseInAppLogin(),new Promise((r=>{this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"terms-and-conditions",pageProps:{termsDetails:e,accountCountry:n,showGcbdPrivacyConsent:t,onAcceptTerms:e=>{var t,n,i,o;e&&(null!==(t=this.delegate)&&void 0!==t&&t.isInAppLogin||null!==(n=this.currentChildApplicationInfo)&&void 0!==n&&n.inAppShareAcceptance?(this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"child-application",applicationIdentifier:null!==(i=this.currentChildApplicationIdentifier)&&void 0!==i?i:""}}),null!==(o=this.delegate)&&void 0!==o&&o.isInAppLogin&&this.delegate.unpauseInAppLogin()):this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"home-login"}})),r(e)}}}})}))}displayTermsAndConditionsSuccessConfirmation(e){return new Promise((t=>{this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"terms-and-conditions-confirmation",wasTermsUpdatePerformed:e,onDismiss:t}})}))}showWaitingForPCSKeys(){this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"waiting-for-pcs-keys"}})}accountNeedsSetUp(){var e;null===(e=this.delegate)||void 0===e||e.showAccountNeedsSetup()}startInAppAuthentication(e,t){var n;F.b.sharedInstance.recordStat(new U.a("attemptToShowAuthWidget"));const r=C.a.sharedInstance.applicationIdentifier===qt.b.identifier;null===(n=this.delegate)||void 0===n||n.showInAppLogin({appleId:e,ignoreForceCRAuth:null!==t&&void 0!==t&&t,pauseBetweenSteps:r,isInAppLogin:!0})}invalidateCachedAuthenticationDetails(){}unauthenticateUser(e){var t;null===(t=this.delegate)||void 0===t||t.unauthenticateUser(e)}async validationDidSucceed(){await this.authenticationDidSucceed(!1,!0)}validationDidFail(){var e;const{applicationParameter:t}=C.a.sharedInstance,{mailDropDetail:n}=t;if(n)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"mail-drop",isAuthenticated:!1,details:n}});const{calendarEventReplyDetails:r}=t;if(r)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"calendar-event-reply",isAuthenticated:!1,details:r}});const i=C.a.sharedInstance.applicationIdentifier,o=i&&null!==(e=b.a.sharedInstance.getApplicationConfiguration(i))&&void 0!==e?e:void 0;if(i&&t.shortGuid&&null!==o&&void 0!==o&&o.applicationInfo.inAppShareAcceptance)return void w.a.sharedInstance.switchToApplication(i);const a=Ft.b.sharedInstance;if(C.a.sharedInstance.vettingParameters)return void a.resolveVettingTokenForUnauthenticatedUser();const s=C.a.sharedInstance.shortGuid;if(i&&s&&a.shouldResolveShortGuidForUnauthenticatedUser(i))return void a.resolveShortGuidForUnauthenticatedUser(s,i);const c=C.a.sharedInstance.longGuid;i&&c&&Tu(i)?this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"ck-reminders-template",remindersTemplatePageProps:{shareInfo:{applicationIdentifier:i,shareTitle:"",longGuid:c}}}}):o&&w.a.sharedInstance.canLaunchChildApplication(o.applicationInfo)?w.a.sharedInstance.launchChildApplication(o.applicationInfo,{}):this.showLandingPage(o)}authenticationDidCancel(){var e;null===(e=this.delegate)||void 0===e||e.hideInAppLogin();const t=Rt.b.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService");for(const n of t)n instanceof M&&n.updateAuthenticationDidCancel()}async authenticationStepDidComplete(e,t,n){if(b.a.sharedInstance.update(),1===t){const e=C.a.sharedInstance.applicationIdentifier;if(e){const r=b.a.sharedInstance.getApplicationConfiguration(e);null!==r&&void 0!==r&&r.applicationInfo.allowsOneFactorAuthenticationMode&&t<n&&!C.a.sharedInstance.relativePath?w.a.sharedInstance.canLaunchChildApplication(r.applicationInfo)?w.a.sharedInstance.launchChildApplication(r.applicationInfo,{}):this.couldNotLaunchApplication(r):t<n&&Object(T.c)()}else t<n&&Object(T.c)()}const r=e.details;if(r){const e=Rt.b.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService");for(const t of e)t instanceof M&&t.updateAuthenticationState(r)}}continueAuthentication(){var e;null===(e=this.delegate)||void 0===e||e.continueAuthentication()}async authenticationDidComplete(e,t,n){if(await this.authenticationDidSucceed(e,!1,t),t){const e=this.serviceManager.getInstance(Ac);null===e||void 0===e||e.setKey(t.key,n)}const r=U.a.withEventAndLabel("workflow","authenticate",{statCategory:sn.a.USER,__allow_user:!0}).success();F.b.sharedInstance.recordStat(r)}async authenticationDidSucceed(e,t,n){const r=P.h.value,i=null===r||void 0===r?void 0:r.details;if(!r||!i)throw new Error("invalid user objects from authentication flow.");if(function(e,t,n){var r;F.b.sharedInstance.recordStat(new U.a("cloudosAuthSuccess",{accountLocale:Object(er.b)(),authenticationType:null===(r=e.details)||void 0===r?void 0:r.accountType,countryCode:e.countryCode,isExtendedLogin:e.isExtendedLogin,isNativeTakeOverLogin:n,userAccountType:e.details?Object(xe.b)(e.details):void 0,validateWasSuccessful:t,isWebAccessEnabled:Object(T.i)(),isUnderMaintenance:Object(T.h)(),maintenanceDuration:Object(T.j)(),isICDRSDisabled:Object(T.f)(),isICDRSDisabledLandedArmed:Object(T.i)()&&Object(T.f)()&&null!==Object(T.e)().value}))}(r,t,e),this.showBlockedHomePage())return;const o=C.a.sharedInstance.redirectedAuthDetails;if(o){if(o.accountName!==i.appleId)return F.b.sharedInstance.recordStat(new U.a("redirectedAuthConflict")),this.unauthenticateUser({trustBrowserConfirmation:!1});C.a.sharedInstance.redirectedAuthDetails=null}const a=await async function(e,t){const n=bt.a.sharedInstance.current;if(n===cn.c&&!e.isCarryUser){const e=cn.c.fallbackDomain;return e&&(S.a.domain=e),!0}if(!C.a.sharedInstance.redirectedFromCarry&&n===cn.e&&e.isCarryUser){if(t&&e.details)try{await function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"/bridge",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5e3;return new Promise((a=>{if(!r.indexedDB)return void a();let s=!1;const c=()=>{s||(s=!0,clearTimeout(u),r.removeEventListener("message",l),d.remove(),a())},u=setTimeout(c,o),l=async r=>{var i;if(r.origin!==n)return;const o=null===(i=r.data)||void 0===i?void 0:i.type;if("ready"===o){var a;const r=await(async(e,t)=>{const n=new ys(e,Iu),{pairingKey:r,pairingKeyId:i}=await n.decodeAndImportPairingKey(t);return{type:"set-pairing-key",payload:{pairingKey:r,pairingKeyId:i,dsid:e}}})(t,e);null===(a=d.contentWindow)||void 0===a||a.postMessage(r,n,[r.payload.pairingKeyId])}else"set-pairing-key-ack"===o&&c()};r.addEventListener("message",l);const d=r.document.createElement("iframe");d.src=`${n}${i}`,d.style.display="none",r.document.body.appendChild(d)}))}(t.key,e.details.dsid,cn.c.url.origin,window)}catch(i){F.b.sharedInstance.recordStat(new U.a("skyBridgePairingKeyTransferFailed",{error:i instanceof Error?i.message:String(i)}))}return S.a.domain=cn.c,!0}const r=C.a.sharedInstance.postLoginRedirectUrl;return!!function(e){if(!e)return!1;const t=(()=>{try{return Object(g.c)(e)}catch{return null}})();if(!t)return!1;if("https:"!==t.protocol)return!1;const n=t.hostname;switch(bt.a.sharedInstance.current){case cn.e:case cn.b:case cn.f:case cn.c:return!!n.match(/^.*\.icloud\.com$/);case cn.d:return!!n.match(/^.*\.icloud\.com\.cn$/);default:throw new Error("Unrecognized services domain")}}(r)&&(await async function(e){const t=(()=>{try{return Object(g.c)(e)}catch{return null}})();if(!t)return;const n=new Zt.a(t).applicationIdentifier;if(!n)return;const r=b.a.sharedInstance.getApplicationInfo(n),i=null===r||void 0===r?void 0:r.pcsKeyIdentifier;i&&!kt.a.sharedInstance.hasPCSKey(i)&&await Au.cloudOSApplication.showADPModal(n,i,!0)}(r),Object(m.a)(r),!0)}(r,n);if(a)return;b.a.sharedInstance.update(),this.serviceManager.init(),Object(eo.c)(!0),Object(zt.b)();const s=Rt.b.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService");for(const m of s)m instanceof M&&m.updateAuthenticationDidComplete(i);if(this.notifyHostingStateDidChange(),!t){var c;null===(c=this.delegate)||void 0===c||c.hideInAppLogin();const e=Object(kc.a)(r),t=Ft.b.sharedInstance,n=t.currentShareRecord;if(n instanceof Qt.a&&n.isPublicShare){const r=n.applicationIdentifier,i=b.a.sharedInstance.getApplicationInfo(r),o=null===i||void 0===i?void 0:i.pcsKeyIdentifier;return o&&!kt.a.sharedInstance.hasPCSKey(o)&&await this.showADPModal(r,o,!1),void t.acceptShare(e)}}const u=C.a.sharedInstance.applicationIdentifier,{applicationParameter:l}=C.a.sharedInstance,{mailDropDetail:d}=l;if(d)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"mail-drop",isAuthenticated:!0,details:d}});const{mailEmail:p}=l;if(p)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"mail-email-view",threadId:p.threadId}});const{calendarEvent:f}=l;if(f)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"calendar-event-view",eventId:f.eventId,collectionId:f.collectionId}});const{calendarEventReplyDetails:h}=l;if(h)return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"calendar-event-reply",isAuthenticated:!0,details:h}});const v=Ft.b.sharedInstance;if(C.a.sharedInstance.vettingParameters)return void this.resolveVettingTokenForAuthenticatedUser(v,i,C.a.sharedInstance.vettingParameters);const y=C.a.sharedInstance.shortGuid;if(u&&y&&v.shouldResolveShortGuidForAuthenticatedUser(u))return void this.resolveShortGuidForAuthenticatedUser(v,i,y,u);const _=C.a.sharedInstance.longGuid;if(u&&_&&Tu(u))return void this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"ck-reminders-template",remindersTemplatePageProps:{shareInfo:{applicationIdentifier:u,shareTitle:"",longGuid:_}}}});const{informationalPageDetails:O,detectedLocale:E}=C.a.sharedInstance.applicationParameter;if(Pu(E),O){const e={relativePath:null===O||void 0===O?void 0:O.relativePath,hash:null===O||void 0===O?void 0:O.hash};return void Object(ln.f)(O.route,O.title,!0,e)}if(!u)return E&&C.a.sharedInstance.replaceHistoryState(),void this.showSpringboard();const I=b.a.sharedInstance.getApplicationConfiguration(u);if(!I)return this.terminateCurrentChildApplication(),void this.couldNotLaunchApplication(null!==I&&void 0!==I?I:void 0);if(!w.a.sharedInstance.canLaunchChildApplication(I.applicationInfo)){const e=I.applicationInfo.pcsKeyIdentifier;return null===e||kt.a.sharedInstance.hasPCSKey(e)?(this.terminateCurrentChildApplication(),void this.couldNotLaunchApplication(I)):void this.showLoadChildApplicationADPBlocked(I,e)}if(performance.measure("cloudOS Time to Child Launch"),w.a.sharedInstance.currentChildApplicationIdentifier!==u){const e={launchSource:{reason:nn.b.USER_LAUNCH}};if(u===bn.a){const t=wn.a.sharedInstance.getTileData(u);e.serializedTileData=t}const{hash:t,isSelfRouteSupported:n}=C.a.sharedInstance.applicationParameter;n&&(e.hash=t),e.timeBeforeLaunch=performance.now(),w.a.sharedInstance.launchChildApplication(I.applicationInfo,e)}}authenticationDidFail(e){var t;"15"===e.info?F.b.sharedInstance.recordStat(new U.a("cloudosAuthFailureSpam",e)):(F.b.sharedInstance.recordStat(new U.a("cloudosAuthFailure",e)),F.b.sharedInstance.recordStat(new U.a(`cloudosAuthFailure.${e.errorType}`))),null===(t=this.delegate)||void 0===t||t.authenticationDidFail(!!P.e.value)}userWillUnauthenticate(){return new Promise((e=>{const t=w.a.sharedInstance.hasChildApplicationWithUnsavedChanges();var n;(null===t||void 0===t?void 0:t.applicationConfiguration)?null===(n=this.delegate)||void 0===n||n.showUnsavedChangesAlert(e):e(!0)}))}userDidUnauthenticate(){C.a.sharedInstance.redirectedAuthDetails||window.location.reload()}startSessionRetrieve(e){var t;let{appleId:n,authStepsToComplete:r,signInLabel:i,accountType:o,offerSecurityUpgrade:a,skipTrustBrowserStep:s,enableFirstPartyOAuth:c}=e;F.b.sharedInstance.recordStat(new U.a("attemptToShowAuthWidget")),null===(t=this.delegate)||void 0===t||t.showLoginForSessionRetrieve({appleId:n,authStepsToComplete:o===Jn.a.SA?1/0:r,ignoreForceCRAuth:1===r,isReauthenticateUser:!0,pauseBetweenSteps:1===r,signInLabel:i,offerSecurityUpgrade:a,skipTrustBrowserStep:s,enableFirstPartyOAuth:c})}sessionRetrieveDidComplete(){this.dismissSessionRetrieveLoginViewController()}reauthenticateDidCancel(){this.dismissSessionRetrieveLoginViewController();const e=this.currentChildApplicationInfo;if(e){const t=w.a.sharedInstance.getChildApplicationController(e);t&&w.a.sharedInstance.terminateChildApplication(t,!0)}this.switchToSpringboard()}createAccount(e){var t;Object(T.b)(),null===(t=this.delegate)||void 0===t||t.createAccount({onCancelled:()=>null===e||void 0===e?void 0:e()})}redirectUserToCorrectDomainToAuthenticate(e){var t;const n=bt.a.sharedInstance.isDomainCN?Object($t.a)("CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com.cn"):Object($t.a)("CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com");null===(t=this.delegate)||void 0===t||t.hideInAppLogin(),this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"redirect-to-domain",pageProps:{destinationDomain:e,onRedirectToDomain:()=>{const t=C.a.sharedInstance.applicationUrl,n=Object(g.c)(t.href);n.protocol="https://",n.hostname=`www.${e.toLowerCase()}`,Object(m.a)(n.href)}}}}),F.b.sharedInstance.recordStat(new U.a("redirectUserToCorrectDomainToAuthenticate",{currentDomain:n,domainToUse:e}))}async resolveShortGuidForAuthenticatedUser(e,t,n,r){const i=b.a.sharedInstance.getApplicationInfo(r),o=null===i||void 0===i?void 0:i.pcsKeyIdentifier;o&&!kt.a.sharedInstance.hasPCSKey(o)&&await this.showADPModal(r,o,!1),e.resolveShortGuidForAuthenticatedUser(t,n,r)}async resolveVettingTokenForAuthenticatedUser(e,t,n){const r=bn.b.applicationInfo.pcsKeyIdentifier;r&&!kt.a.sharedInstance.hasPCSKey(r)&&await this.showADPModal("resolve-vetting-token",r,!0),e.resolveVettingTokenForAuthenticatedUser(t,n)}dismissSessionRetrieveLoginViewController(){var e;null===(e=this.delegate)||void 0===e||e.hideLoginForSessionRetrieve()}get currentChildApplicationIdentifier(){return w.a.sharedInstance.currentChildApplicationIdentifier}get currentChildApplicationInfo(){return w.a.sharedInstance.currentChildApplicationInfo}get currentLoadingChildApplicationInfo(){return w.a.sharedInstance.currentLoadingChildApplicationInfo}get lastLaunchedApplicationContext(){return w.a.sharedInstance.lastLaunchedApplicationContext}get currentChildApplicationConfiguration(){return w.a.sharedInstance.currentChildApplicationConfiguration}get session(){var e;return{user:null===(e=P.h.value)||void 0===e?void 0:e.details,webServices:Object(H.d)()}}get sessionInfo(){var e,t,n,r,i,o,a,s,c;const u={};Object(H.d)().forEach(((e,t)=>{u[t]=e}));const l=(null===(e=P.h.value)||void 0===e?void 0:e.details)&&Object(xe.d)(null===(t=P.h.value)||void 0===t?void 0:t.details),d=Object(T.e)().value,p=l?null===(n=P.h.value)||void 0===n?void 0:n.requestInfo:"partial"===(null===(r=P.a.value)||void 0===r?void 0:r.responseKind)?P.a.value.requestInfo:void 0;return{...(null===(i=P.h.value)||void 0===i?void 0:i.details)&&{dsInfo:{...null===(o=P.h.value)||void 0===o?void 0:o.details,isWebAccessAllowed:Object(T.i)(),isICDRSDisabled:Object(T.f)(),isDeviceConsentedForPCS:null!==d,deviceConsentForPCSExpiry:null!==d&&void 0!==d?d:0,isNativeTakeOverLogin:P.f.value,isTiburonLogin:P.f.value}},isUnderMaintenance:Object(T.h)(),maintenanceDuration:Object(T.j)(),requestInfo:p,isCarryUser:null!==(a=null===(s=P.h.value)||void 0===s?void 0:s.isCarryUser)&&void 0!==a&&a,userPartition:null===(c=P.h.value)||void 0===c?void 0:c.userPartition,webServices:u}}get hostInfo(){const e=(()=>{const{currentLoadingChildApplicationInfo:e}=this,t=this.currentChildApplicationInfo||e,n=w.a.sharedInstance.currentLoadingChildApplicationConfiguration,r=this.currentChildApplicationConfiguration||n;if(r&&t&&P.h.value){const e=w.a.sharedInstance.getChildApplicationController(t);if(e){var i,o;const n=null===(i=e.applicationContext)||void 0===i?void 0:i.launchItem,a=null===(o=e.applicationContext)||void 0===o?void 0:o.launchSource;return Vt.a.getCloudOSState(t,r,e.currentHistoryState,n,null===a||void 0===a?void 0:a.reason)}}})();return{primaryInteractionMode:S.a.primaryInteractionMode,platformType:S.a.platformType,deviceType:S.a.deviceType,regionFormat:{version:O.a.sharedInstance.regionFormatRulesVersion,rules:O.a.sharedInstance.regionFormattingRules,baseUrl:O.a.sharedInstance.regionFormatBaseUrl,localeMap:O.a.sharedInstance.regionFormatterLocaleMap},protocolVersion:S.a.protocolVersion,buildNumber:S.a.buildNumber,sizeClassHorizontal:Object(rn.a)(),sizeClassVertical:Object(on.a)(),visualViewport:Object(an.a)(),theme:S.a.theme,locale:S.a.locale,secondaryLocale:S.a.secondaryLocale,clientId:S.a.clientId,supportedLocales:Kt.a,localesSupportedByAllApplications:Eu.c,limitedExperienceMode:window.hasEnteredLimitedExperienceMode,cloudOSState:e}}showChildApplicationRemoteViewController(e){var t;Bt.a.sharedInstance.removeNotificationForChildApplication(e.applicationConfiguration.identifier);const n=this.presentedChildApplicationRemoteViewController,r=n!==e.remoteApplicationViewController;if((null===(t=e.remoteApplicationViewController)||void 0===t?void 0:t.displayMedium)===Rn.a.IFRAME){if("child-application"===this.rootComponentProps.rootState.kind&&n===e.remoteApplicationViewController)return;n&&r&&(n.isPresentedViewController=!1),e.remoteApplicationViewController.isPresentedViewController=!0,e.remoteApplicationViewController.transitionRemoteInstanceToActiveForeground(),this.presentedChildApplicationRemoteViewController=e.remoteApplicationViewController,this.setRootComponentProps({...this.rootComponentProps,remoteViewControllers:[...this.childApplicationRemoteViewControllers],rootState:{kind:"child-application",applicationIdentifier:e.applicationConfiguration.identifier}})}else e.remoteApplicationViewController.transitionRemoteInstanceToActiveForeground()}childApplicationIsReadyToTerminateDidChange(e,t){const n=!!w.a.sharedInstance.hasChildApplicationWithUnsavedChanges();n!==this.rootComponentProps.hasChildApplicationWithUnsavedChanges&&this.setRootComponentProps({...this.rootComponentProps,hasChildApplicationWithUnsavedChanges:n})}removeChildApplicationController(e){var t;const n=this.childApplicationRemoteViewControllers.indexOf(e.remoteApplicationViewController);this.childApplicationRemoteViewControllers.splice(n,1),(null===(t=e.remoteApplicationViewController)||void 0===t?void 0:t.displayMedium)===Rn.a.IFRAME?setTimeout((()=>{this.setRootComponentProps({...this.rootComponentProps,remoteViewControllers:[...this.childApplicationRemoteViewControllers]})})):e.remoteApplicationViewController.isConnected=!1}insertChildApplicationRemoteViewController(e){if(-1===this.childApplicationRemoteViewControllers.indexOf(e.remoteApplicationViewController))if(this.childApplicationRemoteViewControllers.push(e.remoteApplicationViewController),e.remoteApplicationViewController.displayMedium===Rn.a.IFRAME){this.setRootComponentProps({...this.rootComponentProps,remoteViewControllers:[...this.childApplicationRemoteViewControllers]});const t=this.rootComponentProps.rootState;this.insertChildApplicationLoadingTimeout=setTimeout((()=>{t===this.rootComponentProps.rootState&&this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"load-child-application",applicationIdentifier:e.applicationConfiguration.identifier}})}),300)}else e.remoteApplicationViewController.isConnected=!0}childApplicationIsLoadingSlowly(e){}showChildApplicationErrorViewController(e,t,n){const r=this.rootComponentProps.rootState;if("load-child-application"===r.kind&&r.applicationIdentifier===e.applicationConfiguration.identifier)this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"load-child-application",applicationIdentifier:r.applicationIdentifier,hadError:!0}});else if("initial-load-with-early-child"===r.kind)this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"load-child-application",applicationIdentifier:e.applicationConfiguration.identifier,hadError:!0}});else{var i;this.insertChildApplicationLoadingTimeout&&clearTimeout(this.insertChildApplicationLoadingTimeout),"load-child-application"===r.kind&&r.applicationIdentifier===e.applicationConfiguration.identifier&&this.redirectToHomeScreen(),null===(i=this.delegate)||void 0===i||i.showChildApplicationErrorAlert(e.applicationConfiguration,t,n)}}async showChildApplicationDidFatalErrorDialog(e,t,n){var r;const i=P.h.value,o=Object(kc.a)(i)&&!Object(Wt.c)(),a=e.applicationConfiguration;if(!a)return;const s=a.applicationInfo,c={applicationIdentifier:s.applicationName,applicationName:s.applicationName,localizedApplicationName:Object(Gt.e)(a),radarComponentId:null!==(r=s.radarComponentId)&&void 0!==r?r:0,buildInfo:n};o?(this.switchToSpringboard(!0),un.a.showCrashReporterWithTerminationReasonAndInfo(t,n,c,!1)):un.a.showCrashReporterWithTerminationReasonAndInfo(t,n,c,!0)}redirectChildApplicationForDocument(e,t){var n,r,i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=null===(n=e.applicationConfiguration)||void 0===n?void 0:n.identifier;if(!a)return;const s=null!==(r=null===(i=e.applicationConfiguration)||void 0===i||null===(i=i.applicationInfo)||void 0===i?void 0:i.supportedDomains)&&void 0!==r?r:[];if(0===s.length)return;const c=bt.a.sharedInstance.findAvailableHostname(s),u=Object(Yn.a)(`https://${c}/${a}/${t}`,o);Object(v.a)(u,{target:"_self",features:[]})}showAlertForLockedApplication(e){var t;null===(t=this.delegate)||void 0===t||t.showAlertForLockedApplication(e)}showAlertForUnavailableMailService(e){var t;null===(t=this.delegate)||void 0===t||t.showMailNotEnabledAlert(e)}showAlertForBlockedMailService(e){var t;null===(t=this.delegate)||void 0===t||t.showMailBlockedAlert(e)}terminateAndDisableCurrentChildApplication(e){var t;const n=this.currentChildApplicationConfiguration;n&&(n.isDisabled||(n.isDisabled=!0,e>0&&window.setTimeout((()=>{n.isDisabled=!1}),1e3*e),null===(t=this.delegate)||void 0===t||t.showServiceLockedAlert(e)))}notifyHostingStateDidChange(){const e=Gn.application;e&&Object(kn.c)(e.processState,kn.a.RUNNING)&&e.hostingStateDidChange(this.sessionInfo,this.hostInfo)}async showADPModal(e,t,n){var r,i;return null!==(r=null===(i=this.delegate)||void 0===i?void 0:i.showGrantingAccess(e,t,n))&&void 0!==r&&r}showBlockedHomePage(){return Object(Wt.e)()?(this.showWebAccessBlocked(),!0):!!Object(Wt.d)()&&(this.showAccountMaintenance(),!0)}showLoadChildApplicationADPBlocked(e,t){return new Promise((n=>{this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"load-child-application-adp-blocked",applicationIdentifier:e.identifier,pcsKeyIdentifier:t,onComplete:n}})}))}showWebAccessBlocked(){return new Promise((e=>{this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"web-access-blocked",onComplete:e}})}))}showAccountMaintenance(){F.b.sharedInstance.recordStatOnce(new U.a("accountMaintenanceScreenShown")),this.setRootComponentProps({...this.rootComponentProps,rootState:{kind:"account-maintenance"}})}hideCurrentApplication(){const e=this.presentedChildApplicationRemoteViewController;e&&e.iframe&&(e.isPresentedViewController=!1,e.remoteInstanceState===kn.a.RUNNING&&e.transitionRemoteInstanceToBackground(),this.presentedChildApplicationRemoteViewController=null)}terminateCurrentChildApplication(){const e=this.presentedChildApplicationRemoteViewController;e&&e.iframe&&(e.isPresentedViewController=!1,e.remoteInstanceState===kn.a.RUNNING&&e.terminateRemoteInstance(!0),this.presentedChildApplicationRemoteViewController=null)}showAccountMenu(e){var t;const n=null!==e&&void 0!==e?e:{x:S.a.isRTL?60:window.innerWidth-60,y:1,width:56,height:48};null===(t=this.delegate)||void 0===t||t.showAccountMenu(n)}showOverflowMenu(e,t,n){var r;null===(r=this.delegate)||void 0===r||r.showOverflowMenu(e,t,n)}presentApplicationModal(e,t){var n;null===(n=this.delegate)||void 0===n||n.presentApplicationModal(e,t)}showAppSwitcher(e){var t,n;const r=null!==(t=null===(n=this.presentedChildApplicationRemoteViewController)||void 0===n?void 0:n.remoteInstanceName)&&void 0!==t?t:"";if(e){var i;null===(i=this.delegate)||void 0===i||i.showAppSwitcher(e)}else{var o;const e={x:0,y:0,width:0,height:48},t=[bn.b.generations[0].applicationName,Xt.b.generations[0].applicationName,Jt.b.generations[0].applicationName,Yt.b.generations[0].applicationName];S.a.isRTL&&t.includes(r)?(e.x=60,e.width=56):S.a.isRTL?(e.x=window.innerWidth-354,e.width=500):(e.x=window.innerWidth-116,e.width=56),null===(o=this.delegate)||void 0===o||o.showAppSwitcher(e)}}showCreationMenu(e){var t;const n=null!==e&&void 0!==e?e:{x:S.a.isRTL?95:window.innerWidth-152,y:1,width:56,height:48};null===(t=this.delegate)||void 0===t||t.showCreationMenu(n)}showStorageUsageWarning(e){var t;null===(t=this.delegate)||void 0===t||t.showStorageUsageWarning(e)}showADPAnnouncement(e){var t;null===(t=this.delegate)||void 0===t||t.showADPAnnouncement(e)}showBeneficiaryAnnouncement(e){var t;null===(t=this.delegate)||void 0===t||t.showBeneficiaryAnnouncement(e)}showHelpMenu(e){var t;null===(t=this.delegate)||void 0===t||t.showHelpMenu(e)}showWhatsNew(e,t,n){var r,i;if(n&&n.authBagId){var o;const e=null===(o=this.lastLaunchedApplicationContext)||void 0===o||null===(o=o.launchSource)||void 0===o?void 0:o.reason;n.launchReason=e;const{currentLoadingChildApplicationInfo:t,currentChildApplicationInfo:r}=this,i=t||r;if(i){const e=i.configuration,t=e.identifier,r=t&&-1!==["mail","photos","iclouddrive","calendar"].indexOf(t)?Object(Gt.d)(e):Object(Gt.e)(e);n.appTitle=r}}return null!==(r=null===(i=this.delegate)||void 0===i?void 0:i.showWhatsNew(e,t,n))&&void 0!==r?r:Promise.resolve({wasDisplayed:!1,shouldShowButton:!1})}autoDisplayWhatsNew(){this.showWhatsNew(Object(Xn.c)(),Xn.b,{isAutoDisplaying:!0,color:"rgb(0, 113, 227)",featureLaunchDate:Xn.a})}whatsNewDidDisplay(e,t){const{currentLoadingChildApplicationInfo:n,currentChildApplicationInfo:r}=this,i=n||r;i&&w.a.sharedInstance.getChildApplicationController(i).whatsNewDidDisplay(e,t)}removeEnvironmentInformation(){var e;null===(e=this.delegate)||void 0===e||e.hideEnvironmentInformation()}triggerPrefetchTileData(e,t){if(!Object(T.i)())return;if(Object(T.f)())return;if(Object(T.h)())return;if(t.isMAIDAccount)return;const n=Object(T.k)();if(this.isTileDataPrefetched)return void(this.prefetchTileDataTimeout&&clearTimeout(this.prefetchTileDataTimeout));const r=()=>{var e;if(this.isTileDataPrefetched=!0,null===t||void 0===t||null===(e=t.details)||void 0===e||!e.dsid)return;const r=new Gi;r.init(t),this.serviceManager.addService(r),async function(e,t,n){var r,i,o;const a=Object(H.d)();if(!t)return;const s=null===a||void 0===a||null===(r=a.get("docws"))||void 0===r?void 0:r.url;s&&Cn.a.prefetchQuery("icloud-drive-tile-res",(()=>Object(En.i)({webServices:{docws:s}},6)));const c=null===a||void 0===a||null===(i=a.get("ckdatabasews"))||void 0===i?void 0:i.url;c&&Cn.a.prefetchInfiniteQuery([_n.b.notesRecent],(()=>Object(On.f)({webServices:{ckdatabasews:c}})));const u=null===a||void 0===a||null===(o=a.get("mail"))||void 0===o?void 0:o.url;!n&&u&&(Cn.a.prefetchQuery([_n.b.mailbox],(()=>Object(Tn.a)({webServices:{mail:u}},{shouldIncludeCounts:!0,isCategorizationEnabled:!0},n))),Cn.a.prefetchQuery([_n.b.mailRecentThreads,Pn.a,[]],(()=>Object(Pn.d)({webServices:{mail:u}},{folderToFetch:{type:"virtual",value:"Inbox"},filters:[]},void 0,n)))),Sn.configure({user:{dsid:e},fetch:z.a,urlForServiceName:H.j,telemetry:Object(An.a)("photos")}),Cn.a.prefetchQuery([_n.b.photosLibraryInfo],(()=>Object(In.c)({})())),Cn.a.prefetchQuery([_n.b.photosRecent],(()=>Object(In.b)({})())),Cn.a.prefetchQuery([_n.b.photosTileList],(()=>Object(In.d)({})()))}(t.details.dsid,n,t.isMailBlocked)};e?this.prefetchTileDataTimeout=setTimeout(r,Rc.a):(this.prefetchTileDataTimeout&&clearTimeout(this.prefetchTileDataTimeout),r())}recordHomePageLinkStat(){!function(e,t){const n=e.kind,r={source:n};switch(r.statCategory=t?sn.a.USER:sn.a.SESSION,r.__allow_user=!0,n){case"child-application":case"landing-page":r.childName=e.applicationIdentifier}U.a.withEventAndLabel("click","homepage-link",r).record()}(this.rootComponentProps.rootState,!!P.h.value)}getMetaThemeColor(){var e;return null===(e=this.delegate)||void 0===e?void 0:e.getMetaThemeColor()}setMetaThemeColor(e){var t;this.isMetaThemeColorOverridden=!0,null===(t=this.delegate)||void 0===t||t.setMetaThemeColor(e)}unsetMetaThemeColor(){var e;this.isMetaThemeColorOverridden&&(null===(e=this.delegate)||void 0===e||e.unsetMetaThemeColor(),this.isMetaThemeColorOverridden=!1)}setCustomization(e){this._customizeHomepage=e}}function Tu(e){const{relativePath:t}=C.a.sharedInstance.applicationParameter;return e===Zn.b.identifier&&"template"===t}function Pu(e){if(!e)return;const t=navigator.language.toLowerCase().replace(/_/g,"-"),n=t.split("-")[0],r=e.split("-")[0],i=n===r,o=t===e,a=new U.a("localeDetection",{browserLanguage:navigator.language,detectedLocale:e,browserLangCode:n,detectedLangCode:r,languageMatches:i,exactMatch:o});F.b.sharedInstance.recordStatOnce(a)}Au.cloudOSApplication=void 0},,,function(e,t,n){"use strict";n.r(t),n(869);var r=n(870),i=n.n(r),o=n(873),a=(n(877),n(879),n(2240)),s=n(2134),c=n(2241),u=n(926),l=n(2257),d=n(1359),p=n(1263),f=n(2312);const h=()=>{const[e,t]=r.useState([]),{ariaLiveText:n,setAriaLiveText:i}=Object(p.b)(),o=r.useCallback((()=>{t([])}),[]),a=r.useCallback((()=>{var r;if(!n.length)return;let o=e;(null===(r=o)||void 0===r?void 0:r.length)>0?o.push(n):o=[n],i(""),t(o)}),[n,e,i]);return r.useEffect((()=>{a();const e=window.setTimeout(o,1e4);return()=>{window.clearTimeout(e)}}),[a,n,o,e]),r.createElement(f.a,null,r.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"log"},e.map(((e,t)=>r.createElement("div",{key:t},e)))))};var m=n(1399),g=n(1319),v=n(1458),y=n(1321),b=n(1456),w=n(900),S=n(2256),C=n(1256),_=n(898),O=n(1164),E=n(920),I=n(919),A=n(878),T=n(972),P=n(1255),R=n(2161),k=n(1330),D=n(1457),M=n.n(D),N=n(1204),x=n(1264),L=n(1432),j=n(1358),U=n(2266),F=n(1249),z=n(2194),B=n(2263),K=n(1227),H=n(2221),W=n(2226),q=n(1260),V=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"x.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM43.9941-12.8906C45.5566-12.8906 46.3867-13.4277 47.6562-15.1367L58.2031-30.1758L58.3984-30.1758L68.9453-15.1367C70.166-13.4277 71.0449-12.8906 72.5586-12.8906C74.7559-12.8906 76.416-14.3555 76.416-16.4551C76.416-17.4316 76.123-18.1641 75.4883-18.9941L63.2324-35.7422L75.5859-52.5391C76.2695-53.418 76.5137-54.1992 76.5137-55.127C76.5137-57.0312 74.9023-58.5449 72.8516-58.5449C71.3379-58.5449 70.3613-57.959 69.2871-56.3477L59.082-41.3086L58.8379-41.3086L48.4375-56.3965C47.3145-57.959 46.3867-58.5449 44.7266-58.5449C42.627-58.5449 40.918-56.8848 40.918-54.9316C40.918-53.8574 41.1621-53.1738 41.9434-52.0996L53.6621-35.9863L41.2109-18.7988C40.625-17.9199 40.3809-17.2363 40.3809-16.2598C40.3809-14.3555 41.9434-12.8906 43.9941-12.8906Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},$=n(1471),G=["styles"];function Z(){return Z=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},Z.apply(null,arguments)}var Q=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,G);return i.a.createElement("svg",Z({viewBox:"68.8 67.4 20.5 20.5",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M85.239 77.648a3.834 3.834 0 012.664 1.06 3.7 3.7 0 01.813 1.15c.196.437.294.903.294 1.4 0 .496-.098.962-.294 1.398a3.68 3.68 0 01-.814 1.151 3.825 3.825 0 01-2.663 1.063 3.783 3.783 0 01-1.46-.282 3.846 3.846 0 01-1.202-.78 3.666 3.666 0 01-.815-1.152 3.36 3.36 0 01-.295-1.397c0-.498.098-.964.295-1.4a3.66 3.66 0 01.813-1.15 3.834 3.834 0 012.664-1.06zm0 1a2.77 2.77 0 00-1.93.763 2.6 2.6 0 00-.584.831c-.14.316-.21.654-.21 1.017 0 .36.07.698.21 1.013a2.587 2.587 0 00.6.844l.093-.081.147-.108c.205-.14.45-.251.732-.336.282-.084.597-.126.945-.126s.663.042.946.126c.282.085.525.197.73.336.088.06.168.123.24.187l.01-.01c.25-.24.445-.517.586-.832.141-.315.212-.653.212-1.013 0-.363-.07-.701-.212-1.017a2.61 2.61 0 00-.587-.83 2.775 2.775 0 00-1.928-.764zm-.653-7.462c.715 0 1.252.176 1.61.53.357.353.536.88.536 1.582v3.722a4.975 4.975 0 00-1.046-.218v-3.497l-.002-.054-3.901 3.833.575.568a4.779 4.779 0 00-.765.66l-.528-.523-.444.438a2.52 2.52 0 01-.711.512c-.233.105-.47.157-.711.157-.242 0-.48-.052-.714-.157a2.417 2.417 0 01-.708-.512l-.446-.437-4.087 4.043.104.035c.117.033.25.05.396.05h6.653c.043.363.13.714.257 1.046h-6.87c-.715 0-1.251-.177-1.61-.53-.357-.353-.536-.883-.536-1.59v-7.546c0-.702.17-1.23.51-1.583.34-.353.816-.53 1.432-.53zm.656 8.225c.228 0 .435.058.621.174.186.116.334.27.443.461.11.192.164.401.164.629 0 .238-.054.455-.162.65-.108.195-.255.35-.441.464a1.142 1.142 0 01-.625.17 1.17 1.17 0 01-.626-.171 1.24 1.24 0 01-.44-.463 1.316 1.316 0 01-.162-.65 1.218 1.218 0 01.16-.629c.11-.191.258-.345.444-.46.186-.117.394-.175.624-.175zM72.686 73.23l-.002.068v7.547l.004.116 3.922-3.879-3.924-3.852zm11.94-.999H73.745c-.196 0-.365.03-.508.089l-.021.01 5.157 5.09c.146.141.286.247.42.318.135.07.27.106.407.106a.877.877 0 00.4-.103c.134-.068.277-.175.427-.321l5.144-5.08-.04-.02a1.317 1.317 0 00-.503-.089z",fill:"currentColor"}))},Y=["styles"];function J(){return J=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},J.apply(null,arguments)}var X=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Y);return i.a.createElement("svg",J({viewBox:"67 70 20.5 20.5",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M79 72.45a6.53 6.53 0 014.632 1.918A6.53 6.53 0 0185.55 79v6.148a1.49 1.49 0 01-1.493 1.493H73.943c-.413 0-.786-.167-1.056-.437a1.488 1.488 0 01-.437-1.056V79a6.53 6.53 0 011.918-4.632A6.53 6.53 0 0179 72.45z",stroke:"currentColor",strokeWidth:"1.1"}),i.a.createElement("path",{d:"M79 74.705c1.176 0 2.242.458 3.013 1.2a3.974 3.974 0 011.237 2.87 3.974 3.974 0 01-1.237 2.871 4.331 4.331 0 01-3.013 1.2 4.331 4.331 0 01-3.013-1.2 3.974 3.974 0 01-1.237-2.87c0-1.122.474-2.137 1.237-2.871a4.331 4.331 0 013.013-1.2z",stroke:"currentColor",strokeWidth:"1.1"}),i.a.createElement("path",{d:"M79 80.7c1.105 0 2-.861 2-1.925 0-1.063-.895-1.925-2-1.925s-2 .862-2 1.925c0 1.064.895 1.926 2 1.926z",fill:"currentColor"})))},ee=["styles"];function te(){return te=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},te.apply(null,arguments)}var ne=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,ee);return i.a.createElement("svg",te({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},t),i.a.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M45.714 0c5.453.023 10.546.564 14.178 4.154 3.582 3.625 4.085 8.623 4.108 14.1v27.08c0 5.64-.436 10.798-4.108 14.514-3.716 3.672-8.962 4.153-14.558 4.153H18.667c-5.64 0-10.842-.48-14.558-4.153C.527 56.223.023 51.224 0 45.746v-27.46c.021-5.45.52-10.502 4.11-14.132C7.734.57 12.815.025 18.257 0zM6.297 26.818l-.002 19.479c0 3.191.35 6.907 2.404 8.962 2.055 2.054 5.815 2.448 9.006 2.448h28.59c3.192 0 6.951-.394 9.006-2.448 2.055-2.055 2.404-5.771 2.404-8.962l-.001-18.976c-3.624 3.71-6.602 6.758-9.097 9.257l-.7.699c-8.815 8.785-11.348 10.352-15.66 10.393-5.655-.054-8.25-2.73-25.95-20.852M46.296 6.295H17.749c-3.235 0-6.995.393-9.05 2.448-2.054 2.055-2.404 5.77-2.404 9.006v1.565l7.612 7.673A2.98 2.98 0 0116.14 26c1.72 0 3.046 1.327 3.046 2.998 0 .928-.386 1.741-1.012 2.294l6.437 6.49a2.97 2.97 0 012.635-1.558c1.72 0 3.046 1.326 3.046 2.997 0 .958-.411 1.793-1.072 2.346 1.074.62 2.06.935 3.025.935 1.03 0 2.087-.36 3.248-1.067a3.06 3.06 0 01-.918-2.214 2.977 2.977 0 012.996-2.997c1.079 0 2.002.521 2.541 1.322l4.467-4.503C42.96 32.987 41.69 31.68 41.69 30a2.98 2.98 0 012.999-3c1.719 0 3.046 1.327 3.046 2.998l-.004-.134 2.206-2.224.638-.644.304-.306c-.935-.506-1.561-1.502-1.561-2.684a2.98 2.98 0 012.997-2.997c1.172 0 2.162.617 2.673 1.538l2.717-2.739v-2.104c0-3.191-.349-6.907-2.404-8.962s-5.814-2.448-9.005-2.448M24.95 28.228c1.72 0 3.047 1.327 3.047 2.997 0 1.72-1.327 3.046-3.047 3.046-1.67 0-2.996-1.326-2.996-3.046a2.98 2.98 0 012.996-2.997m9.249-.634c1.72 0 3.047 1.327 3.047 2.997 0 1.72-1.327 3.047-3.047 3.047-1.671 0-2.997-1.327-2.997-3.047a2.98 2.98 0 012.997-2.997m3.727-7.708c1.72 0 3.047 1.327 3.047 2.996 0 1.72-1.327 3.047-3.047 3.047-1.67 0-2.998-1.327-2.998-3.047a2.98 2.98 0 012.998-2.996m-11.667-.205c1.72 0 3.046 1.326 3.046 2.997 0 1.72-1.327 3.046-3.046 3.046-1.67 0-2.997-1.326-2.997-3.046a2.98 2.98 0 012.997-2.997m-13.638-2.863c1.72 0 3.046 1.327 3.046 2.998 0 1.719-1.327 3.046-3.046 3.046-1.67 0-2.998-1.327-2.998-3.046a2.98 2.98 0 012.998-2.998m34.092-1.072c1.72 0 3.046 1.327 3.046 2.997 0 1.72-1.327 3.047-3.046 3.047-1.67 0-2.998-1.327-2.998-3.047a2.98 2.98 0 012.998-2.997M21.2 12.667c1.72 0 3.047 1.327 3.047 2.998 0 1.72-1.327 3.046-3.047 3.046-1.67 0-2.997-1.326-2.997-3.046a2.98 2.98 0 012.997-2.998m10.47 0c1.72 0 3.045 1.327 3.045 2.998 0 1.72-1.326 3.046-3.046 3.046-1.67 0-2.998-1.326-2.998-3.046a2.98 2.98 0 012.998-2.998m8.785-3.24c1.72 0 3.047 1.328 3.047 2.998 0 1.72-1.327 3.046-3.047 3.046-1.67 0-2.996-1.326-2.996-3.046a2.98 2.98 0 012.996-2.997"}))},re=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"network.badge.shield.half.filled",svgPath:"M58.4961 14.5128C64.3352 14.5128 70.1466 13.4345 75.6159 11.4227C76.3188 11.1714 77.0217 10.878 77.6507 10.5635C76.1067 8.95712 74.5732 6.97793 73.4949 5.01984C72.9377 5.28261 72.3488 5.52428 71.6977 5.70265C63.2403-7.36925 59.1428-21.9093 59.1428-36.2756C59.1428-50.7765 63.184-64.684 70.745-76.5345C85.779-72.0696 97.4772-59.4771 100.704-44.027C103.015-44.0155 105.078-43.4452 107.751-42.4609C104.203-66.3743 83.2501-85.0341 58.4443-85.0341C31.2624-85.0341 8.72266-62.4838 8.72266-35.2606C8.72266-8.0375 31.3141 14.5128 58.4961 14.5128ZM58.4961 7.90141C34.9409 7.90141 15.3858-11.7055 15.3858-35.2606C15.3858-58.8158 34.8892-78.4227 58.4443-78.4227C60.534-78.4227 62.6238-78.277 64.6818-77.9233C57.1831-65.3578 53.2454-51.0564 53.2454-36.2756C53.2454-20.6351 57.6077-5.69156 65.7274 7.29846C63.3483 7.70395 61.0104 7.90141 58.4961 7.90141ZM16.5831-55.9724C28.6466-43.114 45.6482-35.6731 63.6995-35.7671C77.9221-35.7987 91.4899-40.5289 102.445-49.2204L99.7413-54.6932C89.6459-46.3228 77.0412-41.7067 63.6889-41.6645C46.3738-41.5906 30.253-49.1044 19.3291-62.0452ZM35.566 5.45951L42.5934 7.09953C39.2676-0.786587 37.5261-9.08674 37.3582-17.615C36.0127-41.8992 46.4387-65.0132 65.0643-80.3205L58.8956-82.775C40.3851-66.3789 30.1786-42.4886 31.482-17.5306C31.6181-9.73943 32.9763-2.00003 35.566 5.45951ZM62.4177-14.467C44.4649-14.9911 26.7699-21.8024 12.7951-34.715L11.3671-28.1112C26.0981-15.4699 44.5378-8.90776 63.1317-8.52839ZM76.7529-40.4194C74.7803-46.0142 73.6482-52.004 73.5437-58.129C73.4699-64.975 74.6642-71.7481 77.0845-78.0323L71.4153-79.6186C68.8291-72.8158 67.5725-65.5865 67.6463-58.0974C67.6991-51.3408 68.9241-44.8335 71.1555-38.6377ZM37.2989-36.3469C41.4703-36.3469 44.9363-39.7611 44.9363-43.9949C44.9363-48.1768 41.4703-51.6322 37.2989-51.6322C33.0547-51.6322 29.6405-48.1768 29.6405-43.9949C29.6405-39.7611 33.0547-36.3469 37.2989-36.3469ZM73.9627-34.0271C78.0402-34.0271 81.4016-37.3991 81.4016-41.5801C81.4016-45.6575 78.0402-49.0295 73.9627-49.0295C69.7818-49.0295 66.4098-45.6575 66.4098-41.5801C66.4098-37.3991 69.7818-34.0271 73.9627-34.0271ZM59.906-4.32433C64.088-4.32433 67.4811-7.71743 67.4811-11.9511C67.4811-16.1437 64.088-19.5368 59.906-19.5368C55.6617-19.5368 52.2169-16.1437 52.2169-11.9511C52.2169-7.71743 55.6617-4.32433 59.906-4.32433ZM117.294-6.52209L117.294-24.3307C117.294-27.0826 116.339-28.7523 113.556-29.9562C110.654-31.1209 101.386-34.2628 99.0118-35.1687C97.2481-35.9153 95.5669-35.9048 94.0113-35.3757C91.192-34.3557 82.0071-31.1209 79.1044-29.9562C76.3218-28.7523 75.3259-27.0826 75.3259-24.3307L75.3259-6.52209C75.3259 2.8176 80.7721 6.1283 94.2806 14.0706C95.6609 14.9007 97.2702 14.7243 98.3907 14.0706C111.889 6.13885 117.294 2.8176 117.294-6.52209ZM96.3251 7.38842C95.89 7.44017 95.4549 7.32611 94.9057 7.04624C84.0988 0.71881 81.7303-0.85036 81.7303-7.39135L81.7303-22.2088C81.7303-23.4961 82.1981-24.2236 83.6924-24.7527C87.4125-26.0832 91.0398-27.4137 94.7389-28.8995C95.2468-29.1171 95.8171-29.1794 96.3251-29.1276Z",layoutBox:{viewBox:"0 0 137.841796875 111.1806640625",width:137.841796875,height:111.1806640625,translateX:10.400932617187436,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625},glyphBox:{viewBox:"0 0 117.537841796875 99.718017578125",width:117.537841796875,height:99.718017578125,translateX:.24395019531243634,translateY:85.0889892578125,baseline:85.0889892578125,capline:14.6290283203125}}})},ie=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"envelope.badge.shield.half.filled",svgPath:"M27.7832 6.88477L89.502 6.88477C87.9395 4.73633 86.9141 2.29492 86.4258-0.585938L27.4902-0.585938C26.123-0.585938 24.9512-0.78125 23.9258-1.2207L53.125-30.0781L56.2988-26.9531C59.7168-23.584 62.9883-22.168 66.4551-22.168C69.873-22.168 73.1934-23.584 76.6113-26.9531L79.7852-30.0781L85.6934-24.2188C85.6934-27.7344 86.1328-30.0781 87.6953-32.373L84.9121-35.1074L112.793-62.5488C112.793-62.4023 112.793-62.2559 112.793-62.1094L112.793-43.5059C115.234-44.1895 117.773-44.1406 120.264-43.457L120.264-62.1582C120.264-72.168 115.137-77.2461 104.932-77.2461L26.3184-77.2461C17.5293-77.2461 12.4512-72.2168 12.4512-62.1582L12.4512-8.25195C12.4512 1.85547 17.5781 6.88477 27.7832 6.88477ZM60.5469-32.7148L23.6816-69.0918C24.7559-69.5312 26.0254-69.7754 27.4902-69.7754L105.225-69.7754C106.738-69.7754 108.057-69.5312 109.131-69.043L72.3633-32.7148C70.2637-30.6152 68.3594-29.6875 66.4551-29.6875C64.502-29.6875 62.5977-30.6641 60.5469-32.7148ZM19.9219-8.25195L19.9219-62.1582C19.9219-62.3535 19.9219-62.5488 19.9219-62.6953L47.998-35.1074L19.9707-7.42188C19.9219-7.66602 19.9219-7.95898 19.9219-8.25195ZM92.3828-6.05469C92.3828 4.05273 98.291 7.76367 112.744 16.2598C114.062 16.9922 116.064 17.1875 117.627 16.2598C132.08 7.76367 138.037 4.05273 138.037-6.05469L138.037-25.1465C138.037-28.1738 136.865-30.2246 133.74-31.543C130.615-32.8613 120.85-36.2793 117.822-37.3535C116.113-37.9395 114.16-37.9883 112.158-37.1582C109.57-36.1816 99.8047-32.8613 96.6797-31.543C93.5547-30.2246 92.3828-28.1738 92.3828-25.1465ZM115.186 8.83789L115.186-30.3711C115.771-30.3711 116.309-30.2734 116.895-30.0293C120.361-28.8086 125.488-26.8555 128.955-25.5859C130.469-25.0488 130.859-24.3164 130.859-22.8516L130.859-6.98242C130.859 0.0488281 127.832 1.70898 116.699 8.44727C116.162 8.69141 115.674 8.83789 115.186 8.83789Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:67.62510009765629,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 143.303955078125 104.22900390625",width:143.303955078125,height:104.22900390625,translateX:5.267006835937536,translateY:87.344482421875,baseline:87.344482421875,capline:16.884521484375}}})},oe=n(1475),ae=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"lifepreserver",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449-61.377C54.0039-61.377 49.7559-60.2051 46.0449-58.1543L34.8145-69.3848C41.5039-74.0723 49.6582-76.7578 58.4961-76.7578C67.3828-76.7578 75.6348-74.0234 82.373-69.2871L71.1914-58.1055C67.4316-60.2051 63.1348-61.377 58.5449-61.377ZM17.0898-35.2539C17.0898-44.043 19.7754-52.1484 24.3164-58.8379L35.5469-47.6562C33.5449-43.9453 32.4219-39.7461 32.4219-35.2539C32.4219-30.6641 33.6426-26.3184 35.6934-22.6074L24.5605-11.4258C19.8242-18.1641 17.0898-26.3672 17.0898-35.2539ZM84.668-35.2539C84.668-39.6973 83.5449-43.8477 81.5918-47.5098L92.8223-58.7402C97.3633-52.0508 100.049-43.9941 100.049-35.2539C100.049-26.416 97.3633-18.2129 92.6758-11.4746L81.4453-22.7051C83.4961-26.416 84.668-30.7129 84.668-35.2539ZM58.5449-17.3828C48.6816-17.3828 40.6738-25.3906 40.6738-35.2539C40.6738-45.1172 48.6816-53.125 58.5449-53.125C68.4082-53.125 76.416-45.1172 76.416-35.2539C76.416-25.3906 68.4082-17.3828 58.5449-17.3828ZM58.5449 6.25C49.8047 6.25 41.748 3.61328 35.1074-0.976562L46.3379-12.207C49.9512-10.2539 54.1504-9.13086 58.5449-9.13086C62.9883-9.13086 67.2363-10.2539 70.8984-12.2559L82.1289-1.02539C75.4395 3.56445 67.334 6.25 58.5449 6.25Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},se=n(1476),ce=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"wand.and.stars",svgPath:"M49.3652-60.9863C49.9512-60.9863 50.2441-61.3281 50.3418-61.8652C52.002-69.6777 51.9043-69.9707 60.1074-71.6309C60.6445-71.7285 61.0352-72.0703 61.0352-72.6074C61.0352-73.1934 60.6445-73.5352 60.1074-73.6328C51.9043-75.293 52.002-75.5859 50.3418-83.3496C50.2441-83.8867 49.9512-84.2773 49.3652-84.2773C48.7793-84.2773 48.4863-83.8867 48.3887-83.3496C46.7285-75.5859 46.8262-75.293 38.623-73.6328C38.0859-73.5352 37.6953-73.1934 37.6953-72.6074C37.6953-72.0703 38.0859-71.7285 38.623-71.6309C46.8262-69.9707 46.7285-69.6777 48.3887-61.8652C48.4863-61.3281 48.7793-60.9863 49.3652-60.9863ZM89.6973-43.75C90.3809-43.75 90.7715-44.1895 90.918-44.8242C92.5781-54.1016 92.627-54.6875 102.441-56.3965C103.125-56.4941 103.564-56.9336 103.564-57.6172C103.564-58.3008 103.125-58.6914 102.441-58.8379C92.627-60.498 92.5781-61.084 90.918-70.3613C90.7715-70.9961 90.3809-71.4844 89.6973-71.4844C89.0137-71.4844 88.623-70.9961 88.4766-70.3613C86.8164-61.084 86.7676-60.498 76.9531-58.8379C76.3184-58.6914 75.8301-58.3008 75.8301-57.6172C75.8301-56.9336 76.3184-56.4941 76.9531-56.3965C86.7676-54.6875 86.8164-54.1016 88.4766-44.8242C88.623-44.1895 89.0137-43.75 89.6973-43.75ZM22.6074-29.7363C23.291-29.7363 23.6816-30.2246 23.8281-30.8594C25.4883-40.1367 25.5371-40.7227 35.3516-42.3828C35.9863-42.5293 36.4746-42.9199 36.4746-43.6035C36.4746-44.2871 35.9863-44.7266 35.3516-44.8242C25.5371-46.5332 25.4883-47.1191 23.8281-56.3965C23.6816-57.0312 23.291-57.4707 22.6074-57.4707C21.9238-57.4707 21.5332-57.0312 21.3867-56.3965C19.7266-47.1191 19.6777-46.5332 9.86328-44.8242C9.22852-44.7266 8.74023-44.2871 8.74023-43.6035C8.74023-42.9199 9.22852-42.5293 9.86328-42.3828C19.6777-40.7227 19.7266-40.1367 21.3867-30.8594C21.5332-30.2246 21.9238-29.7363 22.6074-29.7363ZM106.006 12.0117C108.057 14.1113 111.572 14.1113 113.525 12.0117C115.527 9.86328 115.527 6.54297 113.525 4.49219L67.0898-42.0898C65.0391-44.1406 61.5234-44.1406 59.5703-42.0898C57.5195-39.9414 57.5684-36.5723 59.5703-34.5215ZM77.5879-21.5332L63.2812-35.8887C62.4023-36.7676 62.1094-37.7441 62.9883-38.5742C63.7207-39.3555 64.7461-39.1602 65.6738-38.2324L80.0293-23.877ZM45.8008 12.793C46.6797 12.793 47.3145 12.1582 47.4609 11.2305C49.0234-1.80664 49.6582-2.14844 62.9395-4.29688C63.9648-4.49219 64.5996-4.98047 64.5996-5.95703C64.5996-6.88477 63.9648-7.4707 63.1348-7.61719C49.7559-10.1562 49.0234-10.1074 47.4609-23.1445C47.3145-24.0723 46.6797-24.707 45.8008-24.707C44.873-24.707 44.2383-24.0723 44.1406-23.1934C42.4316-9.96094 41.9922-9.52148 28.4668-7.61719C27.6367-7.51953 27.002-6.88477 27.002-5.95703C27.002-5.0293 27.6367-4.49219 28.4668-4.29688C41.9922-1.70898 42.3828-1.70898 44.1406 11.3281C44.2383 12.1582 44.873 12.793 45.8008 12.793Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:72.1201049804688,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 106.299560546875 98.0947265625",width:106.299560546875,height:98.0947265625,translateX:-8.740185546874955,translateY:84.27734375,baseline:84.27734375,capline:13.8173828125}}})},ue=n(1474),le=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"info.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM58.1055-52.6367C61.6699-52.6367 64.4531-55.4688 64.4531-59.0332C64.4531-62.5977 61.6699-65.4297 58.1055-65.4297C54.5898-65.4297 51.7578-62.5977 51.7578-59.0332C51.7578-55.4688 54.5898-52.6367 58.1055-52.6367ZM50-8.39844L69.873-8.39844C71.875-8.39844 73.4375-9.86328 73.4375-11.8652C73.4375-13.7695 71.875-15.2832 69.873-15.2832L63.8184-15.2832L63.8184-40.1367C63.8184-42.7734 62.5-44.5312 60.0098-44.5312L50.8301-44.5312C48.8281-44.5312 47.2656-43.0176 47.2656-41.1133C47.2656-39.1113 48.8281-37.6465 50.8301-37.6465L56.0547-37.6465L56.0547-15.2832L50-15.2832C47.998-15.2832 46.4355-13.7695 46.4355-11.8652C46.4355-9.86328 47.998-8.39844 50-8.39844Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})};function de(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:ue.a})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.HomePage"))}function pe(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:ie})},Object(K.a)("HideMyEmailTile.Heading"))}function fe(){return r.createElement(W.a,{startIcon:r.createElement(Q,{"aria-hidden":!0,className:"custom-email"})},Object(K.a)("CustomEmailDomainTile.Heading"))}function he(){return r.createElement(W.a,{startIcon:r.createElement(re,{"aria-hidden":!0,className:"private-relay"})},Object(K.a)("PrivateRelayTile.Heading"))}function me(){return r.createElement(W.a,{startIcon:r.createElement(X,{"aria-hidden":!0,className:"homekit-video"})},Object(K.a)("HomeKitSecureVideoTile.Heading"))}function ge(){return r.createElement(W.a,{startIcon:r.createElement(ne,{"aria-hidden":!0,className:"apple-invites"})},Object(K.a)("Invites.TitleName"))}function ve(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:oe.a})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.YourStorage"))}function ye(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:oe.a})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Storage"))}function be(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:se.a})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.YourPlan"))}function we(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:se.a})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Plan"))}function Se(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:ae})},Object(K.a)("NavLinks.DataRecovery"))}function Ce(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:ce})},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Customize"))}function _e(){return r.createElement(W.c,{startIcon:r.createElement(W.f,null)},Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide"))}function Oe(){return r.createElement(W.c,{startIcon:r.createElement(W.e,{symbol:ue.a})},Object(K.a)("CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus"))}function Ee(){return r.createElement(W.c,{startIcon:r.createElement(W.e,{symbol:le})},Object(K.a)("CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan"))}var Ie=n(1392),Ae=n(1310),Te=n(2159),Pe=n(892),Re=n(1431),ke=n(903),De=n(2169),Me=n(2155);const Ne=ke.c.sharedInstance.isiOS||ke.c.sharedInstance.isMac?"applefeedback://new?form_identifier=public.macos&answers%5B%3Aarea%5D=seedx%3Aicloud&answers%5B%3Aicloud_problem_area_req%5D=iCloud.com&answers":"https://feedbackassistant.apple.com/new-form-response",xe=Object(Te.signal)(!1),Le=Object(Te.signal)(!1),je=Object(Te.signal)(!1),Ue=Object(Te.signal)(!1),Fe=Object(Te.signal)(!1),ze=Object(Te.signal)(!1),Be=Object(Te.signal)(!1),Ke=Object(Te.signal)(!1);let He=function(e){return e[e.AppMenu=0]="AppMenu",e[e.CreationMenu=1]="CreationMenu",e[e.AccountMenu=2]="AccountMenu",e[e.HelpMenu=3]="HelpMenu",e[e.OverflowMenu=4]="OverflowMenu",e[e.StorageUsageWarning=5]="StorageUsageWarning",e[e.ADPAnnouncement=6]="ADPAnnouncement",e[e.BeneficiaryAnnouncement=7]="BeneficiaryAnnouncement",e}({});function We(e){r.useEffect((()=>{switch(e){case He.AppMenu:return xe.value=!0,()=>{xe.value=!1};case He.CreationMenu:return Le.value=!0,()=>{Le.value=!1};case He.AccountMenu:return je.value=!0,()=>{je.value=!1};case He.HelpMenu:return Ue.value=!0,()=>{Ue.value=!1};case He.OverflowMenu:return Fe.value=!0,()=>{Fe.value=!1};case He.StorageUsageWarning:return ze.value=!0,()=>{ze.value=!1};case He.ADPAnnouncement:return Be.value=!0,()=>{Be.value=!1};case He.BeneficiaryAnnouncement:return Ke.value=!0,()=>{Ke.value=!1}}}),[e])}class qe{constructor(){this.listener=new Pe.a(Re.a),this.closed=!1,this.exportedObject={showAppMenu:e=>(s.a.cloudOSApplication.showAppSwitcher(e),Promise.resolve()),showCreationMenu:e=>(s.a.cloudOSApplication.showCreationMenu(e),Promise.resolve()),showAccountMenu:e=>(s.a.cloudOSApplication.showAccountMenu(e),Promise.resolve()),showHelpMenu:e=>(s.a.cloudOSApplication.showHelpMenu(e),Promise.resolve()),showWhatsNew:(e,t,n)=>s.a.cloudOSApplication.showWhatsNew(e,t,n),getWhatsNewButtonVisibility:(e,t,n)=>e?Object(De.d)(e,t,n):Object(De.e)(),showOverflowMenu:(e,t,n)=>(s.a.cloudOSApplication.showOverflowMenu(e,t,n),Promise.resolve()),showStorageUsageWarning:e=>(s.a.cloudOSApplication.showStorageUsageWarning(e),Promise.resolve()),showADPAnnouncement:e=>(s.a.cloudOSApplication.showADPAnnouncement(e),Promise.resolve()),showBeneficiaryAnnouncement:e=>(s.a.cloudOSApplication.showBeneficiaryAnnouncement(e),Promise.resolve()),navigateToHomePage:()=>(s.a.cloudOSApplication.recordHomePageLinkStat(),s.a.cloudOSApplication.switchToSpringboard(!0),Promise.resolve())},this.listener.addEventListener("connect",(e=>{e.connection.exportedObject=this.exportedObject;const t=Object(Te.effect)((()=>{var t;const n=Me.e.value;e.connection.remoteObjectProxy.setState({feedbackUrl:Ne,isAuthenticated:n,isADP:Object(Ae.a)(),isBeneficiary:null!==(t=Object(Ae.b)())&&void 0!==t&&t,isAppMenuOpen:xe.value,isCreationMenuOpen:Le.value,isAccountMenuOpen:je.value,isHelpMenuOpen:Ue.value,isOverflowMenuOpen:Fe.value,isStorageUsageWarningOpen:ze.value,isADPAnnouncementOpen:Be.value,isBeneficiaryAnnouncementOpen:Ke.value,isWebAccessBlocked:Object(Ae.c)()})}));e.connection.addEventListener("connectionstatechange",(()=>{"closed"===e.connection.connectionState&&t()})),e.connection.start()}))}start(){this.listener.start()}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close()}}}var Ve=n(965),$e=n(966),Ge=n(2313);function Ze(){const e=Object($e.a)(),t=function(){const[e]=Object(z.b)();return(t,n)=>{const r={className:"trust-browser-confirmation",animates:l.b.IN,title:Object(Ge.a)("AuthService.TrustBrowserConfirmation.Title"),description:Object(Ge.a)("AuthService.TrustBrowserConfirmation.Description"),buttons:t?[Qe,Ye]:[Qe,Ye,Je],defaultAction:"trust_and_signout",cancelAction:"cancel",onActionSelected:e=>{n(e)}};e(r)}}();return async n=>{const r=new Promise((r=>{var i,o;null!==(i=e.userSignal.value)&&void 0!==i&&i.hsaTrustedBrowser&&n.trustBrowserConfirmation?t(n.trustBrowserConfirmation.hideCancelButton,(e=>{r(e)})):r(null!==(o=e.userSignal.value)&&void 0!==o&&o.hsaTrustedBrowser?"trust_and_signout":"signout")})),i=await r;return"cancel"===i?{shouldReload:!1}:{shouldReload:await e.unauthenticate({trustBrowser:"trust_and_signout"===i,allBrowsers:!1})}}}const Qe={title:Object(Ge.a)("AuthService.TrustBrowserConfirmation.Button.TrustAndSignOut"),action:"trust_and_signout"},Ye={title:Object(Ge.a)("AuthService.TrustBrowserConfirmation.Button.SignOut"),action:"signout"},Je={title:Object(Ge.a)("AuthService.TrustBrowserConfirmation.Button.Cancel"),action:"cancel"};let Xe=function(e){return e.Help="link:icloud-guide",e.SignOut="signOut",e.SignIn="signIn",e}({});const et=()=>{},tt=r.forwardRef(((e,t)=>{We(He.HelpMenu);const n=Object(k.b)(),i=Object(k.d)(),o=Object(Ae.c)(),a=Object(K.a)("VoiceOver.ExternalLink.Description"),s=`${Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide")} ${a}`,u=Ze(),l=c.a.sharedInstance.isPhotosSelfRouteUnauthSupported()&&!o?[r.createElement(H.e,{key:"sign-in",className:"blue",value:Xe.SignIn},r.createElement(nt,null))]:[r.createElement(H.f,{key:"guide",value:Xe.Help,href:"https://support.apple.com/guide/icloud/welcome/icloud",target:"_blank",className:"blue",rel:"noreferrer",ariaLabel:s},r.createElement(_e,null))],d=Object(K.a)("AccountMenuPopover.SignOut");return(n&&!i||o)&&(l.push(r.createElement(H.d,{key:"divider"})),l.push(r.createElement(H.e,{className:"red",key:"signout",value:Xe.SignOut},r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:V})},d)))),r.createElement(H.c,{className:"help-menu",variant:"cloudos-menu",onItemSelected:et,onItemSelectedSync:t=>{switch(t){case Xe.SignOut:u({trustBrowserConfirmation:{hideCancelButton:!1}}).then((()=>{window.location.reload()})).catch((()=>{}));break;case Xe.SignIn:Object(Ve.a)();break;case Xe.Help:break;default:Object(Ie.a)(t)}e.onClose()},ref:t},l)}));function nt(){return r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:$.a})},Object(K.a)("CloudOS.Toolbar.HelpMenu.SignIn"))}tt.displayName="HelpMenu";var rt=n(2196),it=n(2224),ot=n(1326);function at(){return at=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},at.apply(null,arguments)}function st(e){let{menuProps:t,paneProps:n,popoverProps:i={},hideOnWindowResize:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[a,s]=r.useState({}),[c,u]=function(e,t){let{menuProps:n,paneProps:i,popoverProps:o}=t;const a=r.useRef(null),s=Object(K.a)("VoiceOver.Menu.Close"),[c,u]=Object(l.i)(r.createElement(rt.b,at({className:"cloudos-menu-popover",arrowless:!0,positioner:Object(it.b)({...it.c,sidePreference:[it.a.bottomRight]})},o),r.createElement(y.a,{scope:"cloud-os-menu"},r.createElement(e,at({},n,{onClose:()=>u(),ref:Object(ot.a)(null===n||void 0===n?void 0:n.ref,a)})))),{ariaClosePaneDescription:s,initialFocus:"ui-menu",...i});return[c,u]}(e,{menuProps:{...t},paneProps:{...n,onClose:()=>{o&&window.removeEventListener("resize",(()=>u()))}},popoverProps:{...i,...a}});return e=>{s({anchorRect:{left:e.x,top:e.y,width:e.width,height:e.height,right:e.width+e.x,bottom:e.height+e.y}}),o&&window.addEventListener("resize",(()=>u())),c()}}var ct=n(999),ut=n(1451),lt=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"gear",svgPath:"M63.7207 12.5488C64.9902 12.5488 66.2109 12.4023 67.5293 12.3047L70.3125 17.6758C70.8496 18.75 71.9238 19.3359 73.291 19.1406C74.5117 18.8965 75.3418 18.0176 75.5371 16.6992L76.3672 10.791C78.8086 10.1562 81.2012 9.22852 83.4961 8.20312L87.8906 12.1582C88.8184 13.0371 89.9902 13.2324 91.2109 12.5488C92.2852 11.9629 92.7246 10.791 92.4805 9.52148L91.2598 3.66211C93.3105 2.24609 95.3125 0.634766 97.1191-1.17188L102.539 1.12305C103.76 1.61133 104.932 1.36719 105.859 0.244141C106.689-0.634766 106.787-1.9043 106.055-2.97852L102.881-8.05664C104.346-10.1074 105.518-12.3047 106.641-14.6484L112.646-14.3555C113.916-14.3066 114.941-14.9902 115.381-16.2109C115.771-17.4316 115.43-18.6035 114.404-19.3848L109.717-23.0957C110.352-25.4395 110.84-27.9785 111.084-30.6152L116.699-32.373C117.969-32.8125 118.701-33.7402 118.701-35.0586C118.701-36.3281 117.969-37.2559 116.699-37.6953L111.084-39.502C110.84-42.1387 110.352-44.5801 109.717-46.9727L114.404-50.7324C115.381-51.4648 115.771-52.5879 115.381-53.8086C114.941-55.0293 113.916-55.7129 112.646-55.6641L106.641-55.4199C105.518-57.7637 104.346-59.9609 102.881-62.0117L106.055-67.0898C106.738-68.1152 106.641-69.3848 105.859-70.2637C104.932-71.3867 103.76-71.6797 102.539-71.1426L97.1191-68.9453C95.3125-70.6543 93.3105-72.3145 91.2598-73.7305L92.4805-79.541C92.7246-80.8594 92.2852-82.0312 91.2109-82.6172C89.9902-83.252 88.8184-83.1543 87.8906-82.1777L83.4961-78.3203C81.2012-79.3457 78.8086-80.1758 76.3672-80.8594L75.5371-86.7676C75.3418-88.0371 74.4629-88.9648 73.2422-89.1602C71.9238-89.3555 70.8496-88.8184 70.3125-87.7441L67.5293-82.373C66.2109-82.4707 64.9902-82.5684 63.7207-82.5684C62.4023-82.5684 61.2305-82.4707 59.9121-82.373L57.0801-87.7441C56.543-88.8184 55.4688-89.3555 54.1504-89.1602C52.9297-88.9648 52.0508-88.0371 51.9043-86.7676L51.0254-80.9082C48.584-80.1758 46.2402-79.3457 43.8965-78.3203L39.502-82.1777C38.5742-83.1543 37.4023-83.252 36.1816-82.6172C35.1074-82.0312 34.668-80.8594 34.9121-79.541L36.1328-73.7305C34.1309-72.3145 32.0801-70.6543 30.2734-68.9453L24.8535-71.1426C23.6328-71.6797 22.5098-71.3867 21.582-70.2637C20.752-69.3848 20.6543-68.1152 21.3379-67.1387L24.5117-62.0117C23.0957-59.9609 21.875-57.7637 20.752-55.4199L14.7949-55.6641C13.5254-55.7129 12.4512-55.0293 12.0117-53.8086C11.6211-52.5879 11.9629-51.4648 12.9883-50.7324L17.6758-46.9727C17.041-44.5801 16.5527-42.1387 16.4062-39.502L10.6934-37.6953C9.42383-37.3047 8.74023-36.377 8.74023-35.0586C8.74023-33.7402 9.42383-32.8125 10.6934-32.373L16.4062-30.5664C16.5527-27.9785 17.041-25.4395 17.6758-23.0957L12.9883-19.3848C12.0117-18.6035 11.6699-17.4316 12.0117-16.2109C12.4512-14.9902 13.5254-14.3066 14.7949-14.3555L20.752-14.6484C21.875-12.3047 23.0957-10.1074 24.5117-8.05664L21.3379-2.97852C20.6543-1.9043 20.752-0.634766 21.582 0.244141C22.5098 1.36719 23.6328 1.61133 24.8535 1.12305L30.2734-1.17188C32.0801 0.634766 34.1309 2.24609 36.1328 3.66211L34.9121 9.52148C34.668 10.791 35.1074 11.9629 36.1816 12.5488C37.4023 13.2324 38.5742 13.0371 39.502 12.1582L43.8965 8.20312C46.2402 9.22852 48.584 10.1562 51.0254 10.791L51.9043 16.6992C52.0508 18.0176 52.9297 18.8965 54.1504 19.1406C55.4688 19.3359 56.543 18.75 57.0801 17.6758L59.9121 12.3047C61.1816 12.4023 62.4023 12.5488 63.7207 12.5488ZM75.9766-38.1348C73.7305-44.2871 69.1895-47.6562 63.623-47.6562C62.7441-47.6562 61.8164-47.5586 60.2051-47.2168L46.1914-71.1426C51.4648-73.7305 57.373-75.1465 63.7207-75.1465C85.0098-75.1465 101.709-58.9844 103.271-38.1348ZM24.0723-35.0098C24.0723-48.584 30.5176-60.5469 40.5762-67.7734L54.7363-43.7012C52.0508-40.9668 50.8301-37.9883 50.8301-34.8145C50.8301-31.7383 52.002-28.9062 54.6875-26.0742L40.2832-2.44141C30.3711-9.7168 24.0723-21.5332 24.0723-35.0098ZM57.7637-34.8633C57.7637-38.1836 60.5469-40.7715 63.7207-40.7715C66.9922-40.7715 69.7266-38.1836 69.7266-34.8633C69.7266-31.5918 66.9922-28.9062 63.7207-28.9062C60.5469-28.9062 57.7637-31.5918 57.7637-34.8633ZM63.7207 5.12695C57.2266 5.12695 51.1719 3.61328 45.8496 0.976562L60.2051-22.5098C61.7188-22.1191 62.7441-22.0215 63.623-22.0215C69.2383-22.0215 73.7793-25.4883 75.9766-31.7871L103.223-31.7871C101.66-11.0352 85.0098 5.12695 63.7207 5.12695Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:70.28510009765614,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 109.969482421875 108.815673828125",width:109.969482421875,height:108.815673828125,translateX:-8.74022949218761,translateY:89.6378173828125,baseline:89.6378173828125,capline:19.1778564453125}}})},dt=n(1472),pt=n(1262),ft=n(945),ht=(n(1328),n(1215)),mt=n.n(ht),gt=n(1338);let vt=function(e){return e.ICloudSettings="iCloudSettings",e.ManageAppleId="mangeAppleId",e.DigitalLegacyPortal="digitalLegacyPortal",e.SignOut="signOut",e}({});const yt=r.forwardRef((function(e,t){var n,i,o;We(He.AccountMenu);const a=Object(k.b)(),c=null!==(n=null===a||void 0===a?void 0:a.primaryEmail)&&void 0!==n?n:"",u=null!==a&&void 0!==a&&a.details&&null!==(i=Object(ct.a)(Object(A.b)(),{givenName:a.details.firstName,familyName:a.details.lastName}))&&void 0!==i?i:"",l=null===a||void 0===a||null===(o=a.details)||void 0===o||null===(o=o.beneficiaryInfo)||void 0===o?void 0:o.isBeneficiary,d=Object(K.a)("CloudOS.Toolbar.AccountMenu.ICloudSettings"),p=Object(K.a)("CloudOS.Toolbar.AccountMenu.DigitalLegacyPortal"),f=Object(ft.a)("digitalLegacyPortal"),h=Object(K.a)("AccountMenuPopover.ManageAppleId"),[m]=Object(y.b)("load","account-menu"),[g]=Object(y.b)("click","account-menu"),[v]=Object(y.b)("link","account-menu");m();const b=Object(Ae.c)(),w=Ze(),S=[];if(!b){var C;const e=null===(C=s.a.cloudOSApplication.currentChildApplicationConfiguration)||void 0===C?void 0:C.applicationInfo.helpButtonConfigs;null===e||void 0===e||e.forEach((e=>{let t=Object(K.a)("CloudOS.Help.Title");e.title&&(t=Object(K.a)(e.title)),S.push(r.createElement(H.f,{className:"blue",href:e.externalURL(),target:"_blank"},r.createElement(W.c,{startIcon:e.symbol?r.createElement("div",{className:"symbol-icon"},e.symbol):r.createElement(W.f,null)},t)))}))}return r.createElement(H.c,{className:"account-menu",variant:"cloudos-menu",onItemSelected:t=>{switch(t){case vt.SignOut:g("sign-out"),w({trustBrowserConfirmation:{hideCancelButton:!1}}).then((e=>{let{shouldReload:t}=e;t&&window.location.reload()}));break;case vt.ICloudSettings:g("settings"),Object(pt.f)(pt.b.settings,Object(K.a)(Object(pt.d)(pt.b.settings)))}e.onClose()},onItemSelectedSync:e=>{switch(e){case vt.ManageAppleId:v("manage-apple-id"),Object(ut.d)();break;case vt.DigitalLegacyPortal:v("digital-legacy-id"),globalThis.window.open(f,"_blank")}},ref:t},r.createElement(H.e,{ariaLabel:Object(K.a)("CloudOS.Toolbar.AccountMenu.Profile.AccessibilityLabel",{name:u,email:c}),className:"header",disabled:!0,value:""},r.createElement(W.a,null,r.createElement("div",{"aria-hidden":!0,className:mt()("name",{tall:Object(gt.a)()})},u),r.createElement("div",{"aria-hidden":!0,className:"email"},c))),!l&&!b&&r.createElement(H.e,{value:vt.ICloudSettings},r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:lt})},d)),r.createElement(H.e,{className:"blue",value:l?vt.DigitalLegacyPortal:vt.ManageAppleId},r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:$.a})},l?p:h,r.createElement(W.d,null))),S,r.createElement(H.d,null),r.createElement(H.e,{className:"red",value:vt.SignOut},r.createElement(W.a,{startIcon:r.createElement(W.e,{symbol:dt.a})},Object(K.a)("AccountMenuPopover.SignOut"))))}));var bt=n(2292),wt=n(2132),St=n(1329),Ct=n(1202),_t=n(1247),Ot=n(971),Et=n(1265),It=n(2171);const At=r.forwardRef((function(e,t){var n;let{onClose:i,onCustomizeClick:o,userPlan:a,canNavigateToHomePage:s}=e;We(He.AppMenu);const c=Object(bt.a)(),u=Object(g.b)(),l=null===(n=Object(k.b)())||void 0===n||null===(n=n.details)||void 0===n||null===(n=n.beneficiaryInfo)||void 0===n?void 0:n.isBeneficiary,d=Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Heading.Apps"),p=Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Heading.ICloudPlus"),f=Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.Heading.More"),h=Object(K.a)("VoiceOver.ExternalLink.Description"),m=`${Object(K.a)("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide")} ${h}`,b=`${Object(K.a)("CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus")} ${h}`,S=Object(Ct.a)("upgradeToICloudPlus"),C=`${Object(K.a)("CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan")} ${h}`,_=Object(Ct.a)("webOnlyPlan"),[O]=Object(y.b)("load","app-switcher"),[A]=Object(y.b)("launch-app","app-switcher"),[T]=Object(y.b)("click","app-switcher"),P=Object(Et.c)(c),{setModalToOpen:R}=Object(v.b)();r.useEffect((()=>{O();const e=I.a.withEventAndLabel("workflow","app-switcher",{statCategory:E.a.USER,__allow_user:!0}).time();return()=>{e.record()}}),[O]);const D=Object(Ve.f)(),{isDomainCN:M}=w.a.sharedInstance;let N=[];return a===St.a.Plus&&!l&&(N=[r.createElement(H.e,{key:"icloud-plus",value:"icloudplus-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},p),r.createElement(H.e,{key:"hide-my-email",value:"action:hide-my-email",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(pe,null)),r.createElement(H.e,{key:"custom-email-domain",value:"action:custom-email-domain",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(fe,null)),r.createElement(H.e,{key:"private-relay",value:"action:private-relay",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(he,null)),r.createElement(H.e,{key:"homekit-secure-video",value:"action:homekit-secure-video",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(me,null))],c.some((e=>e.applicationIdentifier===It.a))&&N.push(r.createElement(H.e,{key:"apple-invites",value:"action:apple-invites",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(ge,null))),M&&N.splice(2,2)),r.createElement(H.c,{className:"app-switcher-menu",variant:"cloudos-menu",scrollMode:H.k.Continuous,onItemSelected:e=>{const[t,n]=e.split(":");switch(t){case"app":A(n),u.launchApp(n,{options:{source:{reason:Et.b.APP_SWITCHER}}});break;case"action":switch(T(n),n){case"home-page":Tt(pt.b.home);break;case"hide-my-email":Tt(pt.b.icloudplus),u.launchApp("hidemyemail",void 0,{presentationStyle:"modal"});break;case"custom-email-domain":Tt(pt.b.icloudplus),u.launchApp("customdomainsettings",void 0,{presentationStyle:"modal"});break;case"private-relay":Tt(pt.b.icloudplus),R("private-relay");break;case"homekit-secure-video":Tt(pt.b.icloudplus),R("homekit-secure-video");break;case"apple-invites":u.launchApp(It.a,{options:{source:{reason:Et.b.APP_SWITCHER}}});break;case"your-storage":Tt(pt.b.storage);break;case"your-plan":Tt(pt.b.plan);break;case"data-recovery":Tt(pt.b.recovery);break;case"customize-home-page":null===o||void 0===o||o()}}i()},ref:t},r.createElement(H.e,{value:"apps-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},d),c.map((e=>{var t,n;const i=_t.a.sharedInstance.getApplicationInfo(e.applicationIdentifier),o=e.applicationIdentifier,a=null!==(t=i?Object(Ot.b)(i):null)&&void 0!==t?t:"",s=null!=_t.a.sharedInstance.getApplicationInfo(o)?null===P||void 0===P?void 0:P.get(e.applicationIdentifier):null;let c="";switch(e.applicationIdentifier){case"mail":c="Mail.";break;case"reminders":c="Reminders.";break;case"calendar":c="Calendar."}const u=null!=s&&0!==s?Object(K.b)({zero:`VoiceOver.AppSwitcher.${c}Notifications.Many`,one:`VoiceOver.AppSwitcher.${c}Notifications.One`,two:`VoiceOver.AppSwitcher.${c}Notifications.Many`,many:`VoiceOver.AppSwitcher.${c}Notifications.Many`},s,{}):"";return r.createElement(H.f,{href:a,preventLinkNavigation:!0,className:"app-switcher-grid-cell",key:e.applicationIdentifier,value:`app:${e.applicationIdentifier}`,ariaLabel:Object(K.a)("VoiceOver.AppSwitcher.Open",{appName:e.displayName})+(""!==u?`, ${u}`:"")},r.createElement(wt.a,{iconSize:54,applicationIdentifier:e.applicationIdentifier,isBadgeVisible:!0,badgeCount:null!==(n=P.get(e.applicationIdentifier))&&void 0!==n?n:void 0}),r.createElement("div",{className:"app-switcher-app-name",role:"presentation"},e.displayName))})),s?[r.createElement(H.e,{key:"home-page",value:"action:home-page",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(de,null))]:[],N,r.createElement(H.e,{value:"more-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},f),r.createElement(H.e,{value:"action:your-storage",className:"app-switcher-wide-item app-switcher-list-item"},l?r.createElement(ye,null):r.createElement(ve,null)),r.createElement(H.e,{value:"action:your-plan",className:"app-switcher-wide-item app-switcher-list-item"},l?r.createElement(we,null):r.createElement(be,null)),!l&&r.createElement(H.e,{value:"action:data-recovery",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(Se,null)),r.createElement(H.f,{value:"link:icloud-guide",href:"https://support.apple.com/guide/icloud/welcome/icloud",target:"_blank",className:"blue app-switcher-wide-item app-switcher-list-item",rel:"noreferrer",ariaLabel:m},r.createElement(_e,null)),a!==St.a.Plus&&a!==St.a.MAID&&!l&&[a===St.a.Standard?r.createElement(H.f,{className:"blue app-switcher-wide-item app-switcher-list-item",key:"upgrade-to-icloud-plus",value:"link:upgrade-to-icloud-plus",href:S,target:"_blank",rel:"noreferrer",ariaLabel:b},r.createElement(Oe,null)):r.createElement(H.f,{value:"link:about-web-only-plan",className:"blue app-switcher-wide-item app-switcher-list-item",key:"about-web-only-plan",href:_,target:"blank",rel:"noreferrer",ariaLabel:C},r.createElement(Ee,null))],!D&&!l&&o&&r.createElement(H.d,null),!D&&!l&&o&&r.createElement(H.e,{key:"customize-home-page",value:"action:customize-home-page",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(Ce,null)))}));function Tt(e){Object(pt.f)(e,Object(K.a)(Object(pt.d)(e)))}At.displayName="AppSwitcherMenu";var Pt=n(1209),Rt=n(1205),kt=n(970),Dt=n(1206),Mt=n(1207),Nt=n(1208),xt=n(1473);const Lt={[R.a]:{locKey:"CreationMenu.Mail",appId:R.a,ariaLabelLocKey:"CreationMenu.Mail.AriaLabel"},[Rt.a]:{locKey:"CreationMenu.Note",appId:Rt.a,ariaLabelLocKey:"CreationMenu.Note.AriaLabel"},[kt.a]:{locKey:"CreationMenu.Event",appId:kt.a,ariaLabelLocKey:"CreationMenu.Event.AriaLabel"},[Pt.a]:{locKey:"CreationMenu.Reminder",appId:Pt.a,ariaLabelLocKey:"CreationMenu.Reminder.AriaLabel"},[It.a]:{locKey:"CreationMenu.Invites",appId:It.a,ariaLabelLocKey:"CreationMenu.Invites.AriaLabel",requiresPlusAccount:!0},[Mt.a]:{locKey:"CreationMenu.Document",appId:Mt.a,ariaLabelLocKey:"CreationMenu.Document.AriaLabel"},[Dt.a]:{locKey:"CreationMenu.Spreadsheet",appId:Dt.a,ariaLabelLocKey:"CreationMenu.Spreadsheet.AriaLabel"},[Nt.a]:{locKey:"CreationMenu.Presentation",appId:Nt.a,ariaLabelLocKey:"CreationMenu.Presentation.AriaLabel"}},jt=()=>{},Ut=r.forwardRef(((e,t)=>{We(He.CreationMenu);const n=Object(bt.a)(),i=r.useMemo((()=>n.filter((e=>{const t=_t.a.sharedInstance.getApplicationConfiguration(e.applicationIdentifier);return!(null!==t&&void 0!==t&&t.applicationInfo.blockNewContentCreation)})).map((e=>Lt[e.applicationIdentifier]))),[n]),o=Object(F.c)()===ke.e.COMPACT,a=o?24:20,s=Object(g.b)(),[c]=Object(y.b)("load","create-menu"),[u]=Object(y.b)("launch-for-create","create-menu");return r.useEffect((()=>{c();const e=I.a.withEventAndLabel("workflow","create-menu",{statCategory:E.a.USER,__allow_user:!0}).time();return()=>{e.record()}}),[c]),r.createElement(H.c,{variant:"cloudos-menu",className:"creation-menu",onItemSelected:jt,onItemSelectedSync:t=>{u(t),"pages"===t||"numbers"===t||"keynote"===t?Object(xt.a)(t):s.launchApp(t,{options:{source:{reason:Et.b.CREATE}}}),e.onClose()},ref:t},r.createElement(H.e,{className:"title",disabled:!0,value:""},Object(K.a)("CreationMenu.CreateNew")),(()=>{const e=[];return i.forEach(((t,n)=>{t&&(e.push(r.createElement(H.e,{value:t.appId,key:t.appId,ariaLabel:Object(K.a)(t.ariaLabelLocKey)},r.createElement(W.a,{startIcon:r.createElement(W.b,{applicationIdentifier:t.appId,iconSize:a})},Object(K.a)(t.locKey)))),o&&n<i.length-1&&e.push(r.createElement(H.d,{key:`divider-${n}`})))})),e})())}));Ut.displayName="CreationMenu";var Ft=n(2262),zt=n(1570),Bt=n(1217);function Kt(e,t,n,r,i,o){if(void 0===e)return{contentRect:void 0,arrowRect:void 0,arrowDirection:Bt.a.None};const a=n.bottom-2,s=(r.width-e.width)/2,c=(n.left+n.right)/2;return{contentRect:{top:a,bottom:a+e.height,left:s,right:s,width:e.width,height:e.height},arrowRect:{height:0,width:0,top:a,bottom:a,left:c,right:c},arrowDirection:Bt.a.Up}}var Ht=n(2314),Wt=n(1483),qt=n(2299),Vt=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"exclamationmark.icloud",svgPath:"M106.25 3.61328C121.387 3.61328 133.35-7.51953 133.35-21.4355C133.35-31.8359 127.441-41.0156 117.773-45.0684C117.822-67.1387 101.953-83.0566 81.4941-83.0566C68.457-83.0566 58.7891-76.2695 52.6367-67.4805C40.2832-70.8008 27.2461-61.5723 26.8066-47.8027C15.625-45.8008 8.74023-35.791 8.74023-23.6328C8.74023-8.78906 21.7285 3.61328 38.7695 3.61328ZM106.25-5.95703L38.7695-5.95703C27.0996-5.95703 18.4082-14.1113 18.4082-23.6328C18.4082-33.3496 24.4141-40.625 34.4238-40.625C35.1074-40.625 35.4492-41.0156 35.4004-41.6992C35.1074-56.2988 45.5566-61.1816 56.0059-57.8613C56.6406-57.666 57.0312-57.8125 57.3242-58.3496C62.1582-66.8457 69.2871-73.4863 81.4453-73.4863C96.875-73.4863 107.812-61.2305 108.545-47.0215C108.691-44.4336 108.545-41.6016 108.301-39.2578C108.252-38.5742 108.496-38.1836 109.131-38.0859C118.018-36.377 123.682-30.0781 123.682-21.4355C123.682-12.8418 116.064-5.95703 106.25-5.95703ZM71.0938-30.7129C73.6328-30.7129 75.0488-32.1289 75.1465-34.8633L75.8789-51.3672C75.9766-54.248 73.877-56.25 71.0449-56.25C68.2129-56.25 66.1621-54.2969 66.3086-51.416L66.9434-34.8633C67.0898-32.1777 68.5059-30.7129 71.0938-30.7129ZM71.0938-15.2344C74.1211-15.2344 76.5625-17.4316 76.5625-20.3613C76.5625-23.3398 74.1699-25.5371 71.0938-25.5371C67.9688-25.5371 65.5762-23.3398 65.5762-20.3613C65.5762-17.4805 67.9688-15.2344 71.0938-15.2344Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89507080078124,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 126.469970703125 95.6533203125",width:126.469970703125,height:95.6533203125,translateX:-6.880014648437509,translateY:83.056640625,baseline:83.056640625,capline:12.5966796875}}})},$t=n(1482),Gt=n(996),Zt=n(925),Qt=n(2184),Yt=n(2315),Jt=n(1477);const Xt=r.forwardRef((function(e,t){var n;let{onClose:i}=e;We(He.StorageUsageWarning);const{storageUsage:o}=Object(qt.a)(),{isPlanUpgradeEligibleDataReady:a,shouldShowPlanUpgrade:s}=Object(Jt.b)(Gt.EntryPoint.StorageAlert),u=Object(St.c)(),l=Object(Jt.a)(),d=(null===(n=c.a.sharedInstance.applicationParameter.informationalPageDetails)||void 0===n?void 0:n.route)!==pt.b.storage;return r.createElement("section",{className:"storage-warning-popover-upgrade-plan-section",ref:t},r.createElement(Vt,{"aria-hidden":!0,className:"cloud",height:50,width:50,layoutMode:"glyphBox"}),o?r.createElement(r.Fragment,null,r.createElement("h2",null,o.overQuota?Object(K.a)("StorageWarning.Full.Title"):Object(K.a)("StorageWarning.AlmostFull.Title")),r.createElement("div",{className:"storage-usage-description"},r.createElement("span",{className:"storage-used"},Object(K.a)("StorageWarning.Usage",{usedStorage:Object($t.a)(o.usedBytes,1),totalStorage:Object($t.a)(o.totalBytes)})),r.createElement("div",{className:"storage-page-link"},r.createElement("a",{className:"storage-page-link",href:`/${pt.b.storage}`,onClick:e=>{Object(pt.f)(pt.b.storage,Object(K.a)(Object(pt.d)(pt.b.storage))),e.preventDefault(),i()}},d&&r.createElement(r.Fragment,null,r.createElement("span",null,Object(K.a)("ShortName.NavLinks.Storage")),r.createElement(zt.b,{"aria-hidden":!0,className:"chevron",height:12,width:12,layoutMode:"glyphBox"}))))),r.createElement("div",{className:mt()("storage-usage-meter",o.overQuota?"storage-full":"storage-almost-full")},r.createElement(r.Fragment,null,r.createElement(Ht.a,{usedBytes:o.usedBytes,totalBytes:o.totalBytes,hideInfo:!0,usageByMedia:[]}),!1)),r.createElement("span",{className:"storage-disclamation"},Object(K.a)(`StorageWarning${o.overQuota?".Full":".AlmostFull"}${u===St.a.Standard?".FreeUser":".PaidUser"}.Message`))):null,a?r.createElement(r.Fragment,null,s?r.createElement("div",{className:"upgrade-plan"},r.createElement(Wt.PlanUpgradeButton,{onPlanUpgradePaneOpen:i,entryPoint:Gt.EntryPoint.StorageAlert,refetchPageContent:l})):r.createElement("div",{className:"upgrade-plan-on-device"},r.createElement(Qt.b,{feature:Yt.a.PLAN_UPGRADE,variant:Qt.a.STORAGE_FULL,buttonOnly:!0}))):r.createElement("div",{className:"upgrade-button-placeholder"},r.createElement(Ft.a,{description:Object(Zt.a)("CloudOS.Spinner.Loading"),size:20})))}));function en(e){const t=Object(F.c)();return{paneProps:{ariaClosePaneDescription:Object(K.a)("VoiceOver.Close"),initialFocus:"section"},popoverProps:{...e?{anchorRef:e}:{},className:"storage-warning-popover",positioner:t===ke.e.REGULAR?Object(it.b)({...it.c,sidePreference:[it.a.bottomRight]}):Kt,remeasureToken:t}}}var tn=n(1349),nn=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"person.2.badge.heart.fill",svgPath:"M21.0826 9.46057L58.1021 9.46057C53.0439 2.09198 59.2442-12.7154 69.7546-20.8507C64.3446-24.499 57.3434-27.16 48.2218-27.16C26.2293-27.16 12.4609-10.8699 12.4609 2.61005C12.4609 7.01259 14.8697 9.46057 21.0826 9.46057ZM48.2429-34.6366C57.3816-34.6366 65.2607-42.8081 65.2607-53.42C65.2607-63.9052 57.35-71.6742 48.2429-71.6742C39.1876-71.6742 31.2146-63.75 31.2358-53.3164C31.2358-42.8081 39.156-34.6366 48.2429-34.6366ZM104.515-27.0143C79.1787-27.0143 63.4061-9.62176 63.4061 2.98388C63.4061 7.2618 66.1369 9.46057 73.8421 9.46057L115.39 9.46057C114.768 7.16785 114.477 4.70931 114.477 2.20958C114.477-7.5396 119.016-16.2814 126.036-22.0727C120.084-25.0271 112.809-27.0143 104.515-27.0143ZM104.442-35.7475C114.951-35.7475 123.982-45.1133 123.982-57.2205C124.014-69.1388 114.919-78.2986 104.442-78.2986C94.0158-78.2986 84.9424-69.3459 84.9424-57.3241C84.9424-45.1133 93.9841-35.7475 104.442-35.7475ZM145.988 27.043C159.464 27.043 170.822 15.7995 170.822 2.20958C170.822-11.3909 159.578-22.5827 145.988-22.5827C132.398-22.5827 121.196-11.3804 121.196 2.20958C121.196 15.8513 132.398 27.043 145.988 27.043ZM139.572-9.23992C142.406-9.23992 144.66-7.66121 145.937-4.61983C147.265-7.66121 149.508-9.23992 152.343-9.23992C156.92-9.23992 160.129-5.86592 160.129-1.12222C160.129 5.83681 152.731 12.2838 148.041 15.377C146.539 16.2789 145.386 16.2789 143.811 15.3358C139.089 12.3471 131.724 5.83681 131.724-1.12222C131.724-5.86592 134.984-9.23992 139.572-9.23992Z",layoutBox:{viewBox:"0 0 190.419921875 125.93212890625",width:190.419921875,height:125.93212890625,translateX:16.21999511718741,translateY:98.196044921875,baseline:98.196044921875,capline:27.736083984375},glyphBox:{viewBox:"0 0 183.6640625 124.5458984375",width:183.6640625,height:124.5458984375,translateX:12.842065429687409,translateY:97.5029296875,baseline:97.5029296875,capline:27.04296875}}})},rn=n(2201),on=n(1572),an=n(1573);const sn=r.forwardRef((function(){We(He.ADPAnnouncement);const e=Object(on.b)(),t=e===on.a.SM?23:29,n=e===on.a.SM?24:31,i=Object(K.a)("Banner.ADP.Title"),o=w.a.sharedInstance.isDomainCN?Object(K.a)("CloudOS.AccountNeedsSetup.Domain.icloud.com.cn"):Object(K.a)("CloudOS.AccountNeedsSetup.Domain.icloud.com"),a=Object(K.a)("Banner.ADP.Description",{currentDomain:o});return r.createElement("div",{"data-testid":"adp-popover",className:"adp announcement-popover-inner"},r.createElement("div",{className:"icon"},r.createElement(tn.a,{"aria-hidden":!0,width:t,height:n,layoutMode:"glyphBox"})),r.createElement("div",{className:"content"},r.createElement("div",{className:"title"},i),r.createElement("div",{className:"description"},a)))})),cn=r.forwardRef((function(){We(He.BeneficiaryAnnouncement);const e=Object(on.b)(),t=Object(an.b)();if(t){const n=e===on.a.SM?40:48,i=e===on.a.SM?27:32,o=Object(Ct.a)("legacyContactSupport");return r.createElement("div",{"data-testid":"beneficiary-popover",className:"beneficiary announcement-popover-inner"},r.createElement("div",{className:"icon"},r.createElement(nn,{"aria-hidden":!0,width:n,height:i,layoutMode:"glyphBox"})),r.createElement("div",{className:"content"},r.createElement("div",{className:"description"},t),r.createElement("div",{className:"description"},r.createElement(rn.a,{href:o},Object(K.a)("Banner.Beneficiary.OptionalLink.Text")))))}return null}));function un(e,t){const n=Object(F.c)();return{paneProps:{ariaClosePaneDescription:Object(K.a)("VoiceOver.Close"),initialFocus:"ui-popover"},popoverProps:{...t?{anchorRef:t}:{},className:e+" announcement-popover",positioner:n===ke.e.REGULAR?Object(it.b)({...it.c,sidePreference:[it.a.bottomRight]}):Kt,remeasureToken:n}}}var ln=n(1339),dn=n(1248),pn=n(2270),fn=n(2297),hn=n(911),mn=n(978);function gn(e){const t=w.a.sharedInstance.isDomainCN?Object(Zt.a)("CloudOS.AccountNeedsSetup.Domain.icloud.com.cn"):Object(Zt.a)("CloudOS.AccountNeedsSetup.Domain.icloud.com");return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.AccountNeedsSetup.Title",{currentDomain:t}),description:Object(Zt.a)("CloudOS.AccountNeedsSetup.Description",{currentDomain:t}),primaryButton:{title:Object(Zt.a)("CloudOS.AccountNeedsSetup.LearnMoreButton.Title"),onActivate:()=>{Object(hn.a)(Object(mn.c)(mn.a))}},alternateButton:{title:Object(Zt.a)("CloudOS.AccountNeedsSetup.CloseButton.Title"),onActivate:()=>{window.location.reload(),e.onRequestClose()}}})}function vn(e){return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.Error.AppPCSDeleted.Title",{applicationName:Object(dn.e)(e.configuration)}),description:Object(Zt.a)("CloudOS.Error.AppPCSDeleted.Description"),primaryButton:{title:Object(Zt.a)("CloudOS.Button.OK.Title"),onActivate:()=>{e.onRequestClose()}}})}var yn=n(2172),bn=n(2244),wn=n(1295),Sn=n(2291);const Cn=["hidemyemail","customdomainsettings"];function _n(e){const t=e.applicationInfo,n=e.applicationContext,i=e.onClose,o=e.hideChildApplicationRef,a=r.useRef(null),s=r.useRef(),u=t.configuration.identifier,l=Cn.indexOf(u)<0,[d,p]=r.useState(!0),f=Object(F.c)(),h=()=>{(async()=>{const e=s.current;if(!e)return;const t=e.remoteApplicationViewController;t&&(t.terminateRemoteInstance(!0),i())})()};o.current=h,r.useEffect((()=>{s.current=new bn.a(t.configuration,{childApplicationIsReadyToTerminateDidChange(e,t){},childApplicationIsLoadingSlowly(e){},childApplicationDidFinishLaunching(e){const t=e.remoteApplicationViewController;if(!t)return;const n=t.iframe;n&&(t.transitionRemoteInstanceToActiveForeground(),n.style.display="block",p(!1))},childApplicationDidTerminate(e,t,n){i()},childApplicationWantsToRemoveViewController(e){},childApplicationDidBecomeInteractive(e){}});const e=s.current,{currentHistoryState:r}=e,o={...n};if(o){const{hash:e,relativePath:t}=n;void 0!==e&&(r.applicationHash=e),void 0!==t&&(r.applicationRelativePath=t)}const u=r.applicationRelativePath,l=r.applicationHash,d=c.a.sharedInstance.shortGuid,f=c.a.sharedInstance.applicationIdentifier,h=Object(Ot.c)(t);o.launchUrl=null!==h&&void 0!==h?h:void 0,o.relativePath=u,o.hash=l,o.shareRecord=void 0,o.targetUIStateWhenLaunched=wn.a.ACTIVE_FOREGROUND,f===t.configuration.identifier&&(o.shortGuid=null!==d&&void 0!==d?d:void 0),e.launchRemoteApplicationWithContext(o);const m=e.remoteApplicationViewController;if(!m)return;const g=m.iframe;if(!g)return;const v=a.current;return v?(g.style.display="none",v.appendChild(g),m.loadRemoteInstance(),()=>{v.removeChild(g)}):void 0}),[t,n,i]);const m=Object(K.a)("VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel"),g=mt()("modal-child-application-modal",d&&"is-loading");return r.createElement("div",{className:mt()("modal-child-application",f===ke.e.COMPACT&&"compact")},r.createElement("div",{className:g},l&&r.createElement("div",{className:"close-button-bar"},r.createElement(Sn.a,{onActivate:h,ariaLabel:m,className:"modal-close-button"})),d?r.createElement("div",{className:"spinner-container"},r.createElement(Ft.a,{description:Object(K.a)("CloudOS.Spinner.Loading")})):null,r.createElement("div",{className:"modal-child-application-content",ref:a})))}var On=n(2208);function En(){return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.Error.AuthDidNotValidateOffline.Title"),description:Object(Zt.a)("CloudOS.Error.AuthDidNotValidateOffline.Description"),primaryButton:{title:Object(Zt.a)("CloudOS.Button.OK.Title"),onActivate:()=>{On.b.sharedInstance.recordStat(new I.a("cloudosAuthFailureReload")),window.location.reload()}}})}function In(e){const t=Ze();return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Title"),description:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Description"),primaryButton:{title:Object(Zt.a)("CloudOS.Button.OK.Title"),onActivate:()=>{On.b.sharedInstance.recordStat(new I.a("cloudosAuthFailureReload")),window.location.reload()}},alternateButton:{title:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Support"),onActivate:()=>{Object(hn.a)(Object(ft.a)("systemStatus"),{target:"_blank",features:[]})}},otherButton:{title:Object(Zt.a)("CloudOS.Authentication.SignOutButton.Title"),onActivate:()=>{t({trustBrowserConfirmation:{hideCancelButton:!0}}),e.onRequestClose()}}})}function An(){return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Title"),description:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Description"),primaryButton:{title:Object(Zt.a)("CloudOS.Button.OK.Title"),onActivate:()=>{On.b.sharedInstance.recordStat(new I.a("cloudosAuthFailureReload")),window.location.reload()}},alternateButton:{title:Object(Zt.a)("CloudOS.Error.AuthDidNotConnect.Support"),onActivate:()=>{Object(hn.a)(Object(ft.a)("systemStatus"),{target:"_blank",features:[]})}}})}function Tn(e){const t=Object(dn.e)(e.configuration),n=e.retryAfter?e.retryAfter<=3600?Object(Zt.a)("CloudOS.Error.ServiceLocked.Description.Hour",{applicationName:t}):Object(Zt.a)("CloudOS.Error.ServiceLocked.Description.HourOrMore",{applicationName:t}):Object(Zt.a)("CloudOS.Error.ServiceLocked.Description.NoETA",{applicationName:t});return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.Error.ServiceLocked.Title",{applicationName:t}),description:n,primaryButton:{title:Object(Zt.a)("CloudOS.Button.OK.Title"),onActivate:()=>{const t=s.a.cloudOSApplication.currentChildApplicationInfo;if(t){const e=x.a.sharedInstance.getChildApplicationController(t);e&&x.a.sharedInstance.terminateChildApplication(e,!0)}s.a.cloudOSApplication.switchToSpringboard(),e.onRequestClose()}}})}function Pn(e){return r.createElement(fn.a,{message:Object(Zt.a)("CloudOS.UnsavedChanges.Alert.Title"),description:Object(Zt.a)("CloudOS.UnsavedChanges.Alert.Description",{applicationName:e.applicationName}),primaryButton:{title:Object(Zt.a)("CloudOS.UnsavedChanges.Alert.SignOutButton"),onActivate:()=>{e.onChoice(!0)}},alternateButton:{title:Object(Zt.a)("CloudOS.UnsavedChanges.Alert.DontSignOutButton"),onActivate:()=>{e.onChoice(!1)}}})}var Rn=n(2273),kn=n(904),Dn=n(1400),Mn=n(1557),Nn=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"lock.rectangle.stack",svgPath:"M32.8125-83.0566L94.4336-83.0566C94.1406-87.207 91.7969-89.3555 87.2559-89.3555L39.9414-89.3555C35.4492-89.3555 33.1055-87.207 32.8125-83.0566ZM22.7539-69.5312L104.492-69.5312C103.76-73.9746 101.66-76.416 96.7773-76.416L30.4688-76.416C25.5859-76.416 23.4863-73.9746 22.7539-69.5312ZM27.7832 18.75L99.4141 18.75C109.57 18.75 114.746 13.6719 114.746 3.61328L114.746-46.5332C114.746-56.5918 109.57-61.6699 99.4141-61.6699L27.7832-61.6699C17.5293-61.6699 12.4512-56.5918 12.4512-46.5332L12.4512 3.61328C12.4512 13.6719 17.5293 18.75 27.7832 18.75ZM27.8809 10.8887C22.998 10.8887 20.3125 8.25195 20.3125 3.17383L20.3125-46.0938C20.3125-51.1719 22.998-53.8086 27.8809-53.8086L99.2676-53.8086C104.102-53.8086 106.885-51.1719 106.885-46.0938L106.885 3.17383C106.885 8.25195 104.102 10.8887 99.2676 10.8887ZM45.9961-2.19727C45.9961 1.46484 47.6074 3.17383 50.9766 3.17383L76.2695 3.17383C79.6387 3.17383 81.25 1.46484 81.25-2.19727L81.25-21.6309C81.25-25.0488 79.834-26.7578 76.9531-26.9531L76.9531-32.7148C76.9531-41.6992 71.582-47.7051 63.623-47.7051C55.6641-47.7051 50.293-41.6992 50.293-32.7148L50.293-26.9531C47.4121-26.7578 45.9961-25.0488 45.9961-21.6309ZM55.3711-27.002L55.3711-33.252C55.3711-39.0137 58.6914-42.7734 63.623-42.7734C68.5547-42.7734 71.875-39.0137 71.875-33.252L71.875-27.002Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:70.41510009765625,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 102.302001953125 108.2509765625",width:102.302001953125,height:108.2509765625,translateX:-12.4439697265625,translateY:89.35546875,baseline:89.35546875,capline:18.8955078125}}})},xn=n(1574),Ln=function(e){return Object(r.createElement)(q.a,{originalProps:e,metadata:{name:"exclamationmark.bubble.fill",svgPath:"M41.4551 18.7012C43.3594 18.7012 44.7754 17.7246 47.0703 15.5762L64.6973-0.537109L97.7051-0.488281C112.256-0.439453 120.068-8.54492 120.068-22.8516L120.068-60.2539C120.068-74.5605 112.256-82.6172 97.7051-82.6172L34.8145-82.6172C20.2637-82.6172 12.4512-74.6094 12.4512-60.2539L12.4512-22.8516C12.4512-8.49609 20.2637-0.537109 34.8145-0.537109L37.1094-0.537109L37.1094 13.6719C37.1094 16.6992 38.6719 18.7012 41.4551 18.7012ZM66.3086-32.5195C63.7695-32.5195 62.3535-33.9355 62.3047-36.5234L61.6699-63.0859C61.6211-65.6738 63.5254-67.5781 66.2598-67.5781C68.9453-67.5781 70.9473-65.625 70.8984-63.0371L70.166-36.5234C70.1172-33.8867 68.7012-32.5195 66.3086-32.5195ZM66.3086-16.1621C63.3789-16.1621 60.8398-18.457 60.8398-21.3867C60.8398-24.2676 63.3301-26.6113 66.3086-26.6113C69.2383-26.6113 71.7285-24.3164 71.7285-21.3867C71.7285-18.4082 69.1895-16.1621 66.3086-16.1621Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:67.75010498046868,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 107.61767578125 107.8623046875",width:107.61767578125,height:107.8623046875,translateX:-12.451127929687573,translateY:89.1611328125,baseline:89.1611328125,capline:18.701171875}}})},jn=n(1575);const Un=()=>{var e;const t=Object(kn.c)(Object(A.b)()),[n,i]=r.useState(null),{storageUsageWarningType:o,showStorageWarningPopoverAtRect:a,showLegacyContactPopoverAtRect:s,showADPPopoverAtRect:c,showWhatsNew:u}={storageUsageWarningType:Object(jn.b)(),showStorageWarningPopoverAtRect:st(Xt,en()),showLegacyContactPopoverAtRect:st(cn,un("beneficiary")),showADPPopoverAtRect:st(sn,un("adp")),showWhatsNew:Object(De.f)()},l=st(Fn,{menuProps:{items:null!==(e=null===n||void 0===n?void 0:n.buttonsToMerge)&&void 0!==e?e:[],anchorRect:null===n||void 0===n?void 0:n.rect,showStorageWarningPopoverAtRect:a,showLegacyContactPopoverAtRect:s,showADPPopoverAtRect:c,storageUsageWarningType:o,showWhatsNew:()=>{var e,t,r;return u(null!==(e=null===n||void 0===n?void 0:n.whatsNewOptions.features)&&void 0!==e?e:[],null!==(t=null===n||void 0===n?void 0:n.whatsNewOptions.version)&&void 0!==t?t:0,{isAutoDisplaying:!1,appTitle:null===n||void 0===n?void 0:n.whatsNewOptions.appTitle,featureLaunchDate:null!==(r=null===n||void 0===n?void 0:n.whatsNewOptions.featureLaunchDate)&&void 0!==r?r:new Date("2025-01-01")})},appTitle:null===n||void 0===n?void 0:n.whatsNewOptions.appTitle,positioner:Object(it.b)({...it.c,sidePreference:[t?it.a.bottomRight:it.a.bottomLeft]})},hideOnWindowResize:!0});return(e,t,n)=>{i({buttonsToMerge:e,whatsNewOptions:t,rect:n}),l(n)}},Fn=r.forwardRef(((e,t)=>{let{items:n,onClose:i,anchorRect:o,showStorageWarningPopoverAtRect:a,showLegacyContactPopoverAtRect:s,showADPPopoverAtRect:c,showWhatsNew:u,storageUsageWarningType:l,appTitle:d}=e;We(He.OverflowMenu);const p=r.useCallback((e=>{switch(e){case"BeneficiaryAnnouncement":return{label:Object(K.a)("CloudOS.Toolbar.OverflowMenu.BeneficiaryAnnouncement.Label"),symbol:r.createElement(xn.a,{width:"20","aria-hidden":!0,layoutMode:"glyphBox"})};case"WhatsNew":return{label:d?Object(K.a)("CloudOS.Toolbar.OverflowMenu.WhatsNew.LabelForApp",{appTitle:d}):Object(K.a)("CloudOS.Toolbar.OverflowMenu.WhatsNew.Label"),symbol:r.createElement(Dn.a,{width:"16","aria-hidden":!0,layoutMode:"glyphBox"})};case"ADPAnnouncement":return{label:Object(K.a)("CloudOS.Toolbar.OverflowMenu.ADPAnnouncement.Label"),symbol:r.createElement(Nn,{width:"16","aria-hidden":!0,layoutMode:"glyphBox"})};case"StorageWarning":return{label:l===jn.a.AlmostFull?Object(K.a)("CloudOS.Toolbar.OverflowMenu.StorageWarningAlmostFull.Label"):Object(K.a)("CloudOS.Toolbar.OverflowMenu.StorageWarningFull.Label"),symbol:r.createElement(Mn.default,{width:"16","aria-hidden":!0,layoutMode:"glyphBox"})};case"Feedback":return{label:Object(K.a)("CloudOS.Toolbar.OverflowMenu.Feedback.Label"),symbol:r.createElement(Ln,{width:"16","aria-hidden":!0,layoutMode:"glyphBox"}),link:ke.c.sharedInstance.isiOS||ke.c.sharedInstance.isMac?"applefeedback://new?form_identifier=public.macos&answers%5B%3Aarea%5D=seedx%3Aicloud&answers%5B%3Aicloud_problem_area_req%5D=iCloud.com&answers":"https://feedbackassistant.apple.com/new-form-response"};default:Object(Ie.a)(e)}}),[l,d]);return r.createElement(H.c,{className:"overflow-menu",onItemSelected:()=>{},onItemSelectedSync:e=>{o&&("StorageWarning"===e?a(o):"BeneficiaryAnnouncement"===e?s(o):"ADPAnnouncement"===e?c(o):"WhatsNew"===e&&u()),i()},ref:t},n.map((e=>{const t=p(e),n=r.createElement(r.Fragment,null,r.createElement("div",{className:"icloud-icon-container"},t.symbol),t.label);return t.link?r.createElement(H.f,{key:e,href:t.link,target:"_blank",rel:"noreferrer"},n):r.createElement(H.e,{key:e,value:e},n)})))}));Fn.displayName="OverflowMenu";var zn=n(2225),Bn=n(902);function Kn(e){return r.createElement(Hn,{showGrantingAccess:Object(Rn.a)(),showCreateAccount:Object(zn.a)(),showAccountNeedsSetupAlert:Object(pn.a)(),showChildApplicationErrorAlert:Object(z.b)(),showServicesLockedAlert:Object(pn.a)(),showApplicationLockedAlert:Object(pn.a)(),showMailNotEnabledAlert:Object(ln.a)(),showMailBlockedAlert:Object(ln.a)(),showUnsavedChangesAlert:Object(pn.a)(),showOfflineAuthenticationDidFailAlert:Object(pn.a)(),showOnlineAuthenticationDidFailAlert:Object(pn.a)(),showOnlineAndAuthenticatedAuthenticationDidFailAlert:Object(pn.a)(),showAccountMenu:st(yt,{hideOnWindowResize:!0}),showCompactAccountMenu:Object(B.a)(yt,{cardProps:{className:"account-menu-compact"}})[0],showCreationMenu:st(Ut,{hideOnWindowResize:!0}),showCompactCreationMenu:Object(B.a)(Ut,{cardProps:{className:"creation-menu-compact"}})[0],showWhatsNew:Object(De.f)(),setShowSash:e.setShowSash,showChildApplicationModal:Object(pn.a)(),hideChildApplicationRef:e.hideChildApplicationRef,showAppSwitcher:st(At,{menuProps:{userPlan:Object(St.c)(),canNavigateToHomePage:!s.a.cloudOSApplication._customizeHomepage,onCustomizeClick:s.a.cloudOSApplication._customizeHomepage},popoverProps:{className:"app-switcher-popover"},hideOnWindowResize:!0}),showCompactAppSwitcher:Object(B.a)(At,{menuProps:{userPlan:Object(St.c)(),canNavigateToHomePage:!s.a.cloudOSApplication._customizeHomepage,onCustomizeClick:s.a.cloudOSApplication._customizeHomepage},cardProps:{closeAriaLabel:Object(K.a)("VoiceOver.AppSwitcher.Close"),className:"app-switcher-menu-compact"}})[0],showStorageUsageWarning:st(Xt,en()),showADPAnnouncement:st(sn,un("adp")),showBeneficiaryAnnouncement:st(cn,un("beneficiary")),showOverflowMenu:Un(),showHelpMenu:st(tt),showTermsAndConditions:Object(pn.a)(),showInAppLogin:Object(pn.a)(),showLoginForSessionRetrieve:Object(pn.a)(),showErrorDialog:Object(z.b)(),unauthenticateUser:Ze(),sizeClass:e.sizeClass})}class Hn extends r.Component{constructor(){super(...arguments),this.state={hideVerifyShareAccessModalCallback:void 0,hideInAppLoginCallback:void 0,hideLoginForSessionRetrieveCallback:void 0}}componentDidMount(){s.a.cloudOSApplication.delegate=this}componentWillUnmount(){s.a.cloudOSApplication.delegate=null}render(){return null}showGrantingAccess(e,t,n){return new Promise((r=>{this.props.showGrantingAccess(e,t,n,(e=>{r(e)}))}))}createAccount(e){(0,this.props.showCreateAccount)(e)}showAccountNeedsSetup(){const[e,t]=this.props.showAccountNeedsSetupAlert;e(r.createElement(gn,{onRequestClose:t}))}showChildApplicationErrorAlert(e,t,n){const[r]=this.props.showChildApplicationErrorAlert;r({title:t,description:n,buttons:[Object(K.a)("CloudOS.Button.OK.Title")]})}showServiceLockedAlert(e){const t=s.a.cloudOSApplication.currentChildApplicationConfiguration;if(!t)return;const[n,i]=this.props.showServicesLockedAlert;n(r.createElement(Tn,{configuration:t,retryAfter:e,onRequestClose:i}))}showAlertForLockedApplication(e){const[t,n]=this.props.showApplicationLockedAlert;t(r.createElement(vn,{configuration:e,onRequestClose:n}))}showMailNotEnabledAlert(e){this.props.showMailNotEnabledAlert({title:Object(K.a)("CloudOS.Error.MailNotEnabled.Title"),description:Object(K.a)("CloudOS.Error.MailNotEnabled.Description",{applicationName:Object(dn.e)(e)}),buttons:[{title:Object(K.a)("CloudOS.Button.OK.Title"),action:"ok"}],onActionSelected:()=>{}})}showMailBlockedAlert(e){this.props.showMailBlockedAlert({title:Object(K.a)("CloudOS.Error.MailBlocked.Title"),description:Object(K.a)("CloudOS.Error.MailBlocked.Description",{applicationName:Object(dn.e)(e)}),buttons:[{title:Object(K.a)("CloudOS.Button.OK.Title"),action:"ok"}],onActionSelected:()=>{}})}showUnsavedChangesAlert(e){const t=x.a.sharedInstance.hasChildApplicationWithUnsavedChanges(),n=null===t||void 0===t?void 0:t.applicationConfiguration;if(!n)return void e(!0);const i=Object(dn.e)(n),[o,a]=this.props.showUnsavedChangesAlert;o(r.createElement(Pn,{applicationName:i,onChoice:t=>{e(t),a()}}))}authenticationDidFail(e){if(window.navigator.onLine)if(e){const[e,t]=this.props.showOnlineAndAuthenticatedAuthenticationDidFailAlert;e(r.createElement(In,{onRequestClose:t}))}else{const[e]=this.props.showOnlineAuthenticationDidFailAlert;e(r.createElement(An,null))}else{const[e]=this.props.showOfflineAuthenticationDidFailAlert;e(r.createElement(En,null))}}showAccountMenu(e){this.props.sizeClass===ke.e.COMPACT?this.props.showCompactAccountMenu():this.props.showAccountMenu(e)}showCreationMenu(e){this.props.sizeClass===ke.e.COMPACT?this.props.showCompactCreationMenu():this.props.showCreationMenu(e)}showStorageUsageWarning(e){this.props.showStorageUsageWarning(e)}showADPAnnouncement(e){this.props.showADPAnnouncement(e)}showBeneficiaryAnnouncement(e){this.props.showBeneficiaryAnnouncement(e)}showHelpMenu(e){this.props.showHelpMenu(e)}showWhatsNew(e,t,n){return this.props.showWhatsNew(e,t,n)}showOverflowMenu(e,t,n){this.props.showOverflowMenu(e,t,n)}hideEnvironmentInformation(){this.props.setShowSash(!1)}presentApplicationModal(e,t){if(this.props.hideChildApplicationRef.current)return;const n=_t.a.sharedInstance.getApplicationInfo(e);if(!n)return;if(!x.a.sharedInstance.canLaunchChildApplication(n))return;const i=(null===t||void 0===t?void 0:t.options)||{},{hash:o,source:a,route:s,launchItem:c,launchPath:u}=i,d={launchSource:a,relativePath:s,hash:o,launchItem:c,launchPath:u},[p,f]=this.props.showChildApplicationModal;p(r.createElement(_n,{applicationInfo:n,applicationContext:d,onClose:()=>{f(),this.props.hideChildApplicationRef.current=void 0},hideChildApplicationRef:this.props.hideChildApplicationRef}),{animates:l.b.NONE})}showAppSwitcher(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,width:0,height:0};this.props.sizeClass===ke.e.COMPACT?this.props.showCompactAppSwitcher():this.props.showAppSwitcher(e)}unauthenticateUser(e){this.props.unauthenticateUser(e)}hideVerifyShareAccessModal(){var e,t;null===(e=(t=this.state).hideVerifyShareAccessModalCallback)||void 0===e||e.call(t),this.setState({hideVerifyShareAccessModalCallback:void 0})}continueAuthentication(){Object($e.a)().continueAuthentication()}get isInAppLogin(){return!!this.state.hideInAppLoginCallback}showInAppLogin(e){if(this.state.hideInAppLoginCallback)return;const[t,n]=this.props.showInAppLogin;this.setState({hideInAppLoginCallback:n}),t(r.createElement(yn.a,e))}pauseInAppLogin(){document.querySelectorAll("ui-pane, ui-pane-backdrop").forEach((e=>{e.classList.add("hide")}))}unpauseInAppLogin(){document.querySelectorAll("ui-pane, ui-pane-backdrop").forEach((e=>{e.classList.remove("hide")}))}hideInAppLogin(){var e,t;null===(e=(t=this.state).hideInAppLoginCallback)||void 0===e||e.call(t),this.setState({hideInAppLoginCallback:void 0})}showLoginForSessionRetrieve(e){if(this.state.hideLoginForSessionRetrieveCallback)return;const[t,n]=this.props.showLoginForSessionRetrieve;this.setState({hideLoginForSessionRetrieveCallback:n}),t(r.createElement(yn.a,e))}hideLoginForSessionRetrieve(){var e,t;null===(e=(t=this.state).hideLoginForSessionRetrieveCallback)||void 0===e||e.call(t),this.setState({hideLoginForSessionRetrieveCallback:void 0})}showErrorDialog(e,t){const[n]=this.props.showErrorDialog;n({title:e,description:t,buttons:[{title:Object(K.a)("CloudOS.Sharing.Unavailable.OkButton.Title"),action:"cancel"}],cancelAction:"cancel",onActionSelected:()=>{Object(Bn.a)(window.location.origin)}})}navigateToHomePage(){s.a.cloudOSApplication.recordHomePageLinkStat(),Object(pt.f)(pt.b.home,Object(K.a)("NavLinks.Home"))}getMetaThemeColor(){var e;const t=document.head.querySelector("meta[name='theme-color']");return null!==(e=null===t||void 0===t?void 0:t.getAttribute("content"))&&void 0!==e?e:void 0}setMetaThemeColor(e){const t=document.head.querySelectorAll("meta[name='theme-color']");let n=!1;if(t.forEach((t=>{t.hasAttribute("media")||(n=!0,t.setAttribute("content",e))})),!n){const t=document.createElement("meta");t.setAttribute("name","theme-color"),t.setAttribute("content",e),document.head.prepend(t)}}unsetMetaThemeColor(){const e=document.head.querySelectorAll("meta[name='theme-color']");e&&e.forEach((e=>{e.hasAttribute("media")||document.head.removeChild(e)}))}}var Wn=n(2259),qn=n(1480),Vn=n(2248);function $n(e){const t=Object(qn.a)(),n=Object(k.c)(),i=!Object(Vn.f)()&&c.a.sharedInstance.showEnvironmentInfo&&(null===n||0===n);return r.createElement(r.Fragment,null,i&&r.createElement(Wn.a,{variant:"environment-sash",onActivate:e.onActivate,className:"environment-sash"},null===t||void 0===t?void 0:t.environment," -"," ",_.a.masteringNumber))}function Gn(){return Gn=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},Gn.apply(null,arguments)}function Zn(){const[e,t]=r.useState(""),[n,i]=r.useState(""),o=Object(u.d)(),a=Object(u.b)();r.useEffect((()=>{const e=window.document.documentElement;e.setAttribute("lang",o),e.setAttribute("dir",a)}),[a,o]),(()=>{const e=Object(k.b)(),t=!Object(R.e)(e),n="pushNotification.renewSubscriptionFailure",i="UNKNOWN",{notificationsEnabled:o}=Object(b.a)("notifications"),[a,s]=Object(r.useState)(null),c=Object(r.useCallback)((()=>{if(null!==a&&void 0!==a&&a.active){var e,t;const n=crypto.randomUUID(),r=Object(A.b)();a.active.postMessage({type:"onload",payload:{servicesDomain:w.a.sharedInstance.current.servicesDomain,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,regionFormat:Object(T.b)(r),locale:r,sessionID:n,masteringNumber:null!==(e=_.a.masteringNumber)&&void 0!==e?e:i,buildNumber:null!==(t=_.a.buildNumber)&&void 0!==t?t:i}})}}),[a]),u=Object(O.a)(),l=Object(r.useCallback)((async()=>{try{const e=await S.a.sharedInstance.getBrowserSubscription(),t=S.a.sharedInstance.notificationSettings.devices.find((e=>e.id===S.a.sharedInstance.browserID));if(t&&null===e){const e=await S.a.sharedInstance.createNotificationSubscription();if(e.ok){const{value:n}=e,r=t.apps,i=Object.values(S.c).reduce(((e,t)=>{const n=r.find((e=>e.name===t));return null!==n&&void 0!==n&&n.enabled&&e.add(t),e}),new Set);if(!(await S.a.sharedInstance.updateAccountPreferences(n,i)).success)return}else{if(!(await S.a.sharedInstance.updateAccountPreferences(null,new Set)).success)return;new I.a(n,{statCategory:E.a.SESSION,success:!1,error:Object(P.a)(e.error)}).record()}}}catch(e){return void new I.a(n,{statCategory:E.a.SESSION,success:!1,error:Object(P.a)(e)}).record()}}),[]);Object(r.useEffect)((()=>{o()&&navigator.serviceWorker.register(M.a,{scope:"/"}).then((e=>{s(e),c(),Object(C.a)("CloudOS Push Service Worker Registered"),(async()=>{await l()})()})).catch((e=>{new I.a("pushNotification.serviceWorkerRegistrationFailure",{statCategory:E.a.SESSION,success:!1,error:Object(P.a)(e)}).record()}))}),[o,u,c,l,t])})();const[c,f]=r.useState(s.a.cloudOSApplication.rootComponentProps);r.useEffect((()=>{const e=e=>{f(e)};return s.a.cloudOSApplication.stateListeners.add(e),f(s.a.cloudOSApplication.rootComponentProps),()=>{s.a.cloudOSApplication.stateListeners.delete(e)}}),[]);const D=r.useRef(),z=Object(F.c)(),[B,K]=r.useState(!0);return r.createElement(y.a,{scope:"app"},r.createElement(g.a,{value:{launchApp:(e,t,n)=>{var r;(e=>{var t,n;e===N.b.identifier&&(null===(t=(n=m.a.sharedInstance).switchDriveToAppMode)||void 0===t||t.call(n))})(e),"modal"===(null===n||void 0===n?void 0:n.presentationStyle)?s.a.cloudOSApplication.presentApplicationModal(e,t):(x.a.sharedInstance.switchToApplication(e,null!==(r=null===t||void 0===t?void 0:t.options)&&void 0!==r?r:{}),setTimeout((()=>{j.a.removeQueries(U.b.remindersRecent),j.a.removeQueries(U.b.remindersList)}),500))}}},r.createElement(p.a,{value:{ariaLiveText:e,setAriaLiveText:t}},r.createElement(v.a,{value:{modalToOpen:n,setModalToOpen:i}},r.createElement(d.QueryClientProvider,{client:j.a},r.createElement(l.f,null,r.createElement(h,null),r.createElement(Kn,{setShowSash:K,hideChildApplicationRef:D,sizeClass:z}),B&&r.createElement($n,{onActivate:()=>K(!1)}),r.createElement(L.a,Gn({},c,{hideChildApplicationRef:D}))))))))}var Qn,Yn=n(2209),Jn=n(921);class Xn{constructor(){this.shouldIncludeRedirectData=!0,this.shoulIncludeConnectionData=!0,this.shouldIncludeRequestData=!0,this.shouldIncludeDOMData=!0}createWith(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=Xn.sharedInstance;i.shouldIncludeRedirectData=e,i.shoulIncludeConnectionData=t,i.shouldIncludeRequestData=n,i.shouldIncludeDOMData=r}get statsHash(){const e=this._getPerformanceData(),t={};return e?(e.forEach(((e,n)=>{t[n]=e})),t):t}_getPerformanceData(){const e=new Map;if(window&&window.performance&&window.performance.timing){const{navigationStart:t,domainLookupStart:n,domainLookupEnd:r,connectStart:i,connectEnd:o,secureConnectionStart:a,fetchStart:s,requestStart:c,responseStart:u,responseEnd:l,loadEventStart:d,loadEventEnd:p,domLoading:f,domInteractive:h,domContentLoadedEventStart:m,domContentLoadedEventEnd:g}=window.performance.timing,{shouldIncludeRedirectData:v,shoulIncludeConnectionData:y,shouldIncludeDOMData:b,shouldIncludeRequestData:w}=this;v&&(e.set("redirectTime",s-t),e.set("appCacheTime",s-t)),y&&(e.set("dnsLookupTime",r-n),e.set("tcpTime",o-i),e.set("secureConnectionStart",a>0?o-a:0)),b&&(e.set("processingTime",d-f),e.set("timeToLoadDOMContent",g-m),e.set("timeBeforeUserCanInteract",h-f)),w&&(e.set("fetchTime",l-s),e.set("requestTime",u-o),e.set("totalDocumentRequestTime",l-c),e.set("documentDownloadTime",l-u),e.set("timeToFirstByteOfDocument",u-c)),e.set("totalPageLoadTime",p-t)}return e}}function er(e){return{AFTER_PAINT:`chunk-${e}-after-paint`,EXEC_START:`chunk-${e}-exec-start`,EXEC_SYNC_END:`chunk-${e}-exec-sync-end`,RAF:`chunk-${e}-raf`,START_DOM_CREATION:`chunk-${e}-dom-creation`}}Qn=Xn,Xn.sharedInstance=new Qn;var tr=function(e){return e.REGULAR="REGULAR",e.SHARE="SHARE",e}(tr||{}),nr=function(e){return e.REGULAR="REGULAR",e.VETTING="VETTING",e}(nr||{});function rr(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches,t=new I.a("didLaunch").timeFromProcessStart().end(),n=function(){try{const e=function(){const e=window.performance.getEntries()||[],t=er("(.*)"),n=new RegExp(t.EXEC_START),r=[];for(const o of e){const e=o.name.match(n);e&&r.push(e[1])}const i=r.filter((e=>{const t=er(e);try{return performance.measure(`${e}-dom-creation`,t.START_DOM_CREATION,t.EXEC_SYNC_END),performance.measure(`${e}-eval-exec`,t.EXEC_START,t.RAF),performance.measure(`${e}-raf-paint`,t.RAF,t.AFTER_PAINT),performance.measure(`${e}-process-time`,t.EXEC_START,t.AFTER_PAINT),Object.values(t).forEach((e=>performance.clearMarks(e))),!0}catch(n){return!1}})).map((t=>{const{startTime:n=0,responseEnd:r=0,domainLookupStart:i=0,domainLookupEnd:o=0,connectStart:a=0,connectEnd:s=0}=function(e,t){const n=new RegExp(`(^|/)${t}.js`);return e.find((e=>e.name.match(n)))||{startTime:void 0,responseEnd:void 0,connectStart:void 0,connectEnd:void 0,domainLookupStart:void 0,domainLookupEnd:void 0}}(e,t),c=r-n,u=o-i,l=s-a,{startTime:d=0,duration:p=0}=performance.getEntriesByName(`${t}-process-time`)[0]||{},{startTime:f=0,duration:h=0}=performance.getEntriesByName(`${t}-eval-exec`)[0]||{},{startTime:m=0,duration:g=0}=performance.getEntriesByName(`${t}-dom-creation`)[0]||{},{startTime:v=0,duration:y=0}=performance.getEntriesByName(`${t}-raf-paint`)[0]||{};return{[`${t}FetchStart`]:Math.round(n),[`${t}FetchDuration`]:Math.round(c),[`${t}DomainLookupDuration`]:Math.round(u),[`${t}ConnectDuration`]:Math.round(l),[`${t}ExecStart`]:Math.round(f),[`${t}ExecDuration`]:Math.round(h),[`${t}ProcessStart`]:Math.round(d),[`${t}ProcessDuration`]:Math.round(p),[`${t}ProcessDelay`]:Math.round(d-r),[`${t}DomCreationStart`]:Math.round(m),[`${t}DomCreationDuration`]:Math.round(g),[`${t}PaintStart`]:Math.round(v),[`${t}PaintDuration`]:Math.round(y),[`${t}PaintEndTime`]:Math.round(d+p)}}));return Object.assign({},...i)}();return Object.entries(e).filter((e=>{let[t,n]=e;return!!n})).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})}catch(e){return{}}}()||{},r=Xn.sharedInstance.statsHash||{};let i=tr.REGULAR,o=null;c.a.sharedInstance.vettingParameters?(i=tr.SHARE,o=nr.VETTING):(c.a.sharedInstance.shortGuid||c.a.sharedInstance.applicationParameter.mailDropDetail)&&(i=tr.SHARE,o=nr.REGULAR);const a=c.a.sharedInstance.applicationIdentifier,s={...r,...n,darkMode:e,launchPath:i};o&&(s.sharePath=o),a&&(s.applicationIdentifier=a),t.addAdditionalProperties(s),On.b.sharedInstance.recordStat(t);const u=n.mainProcessDuration;isNaN(u)||On.b.sharedInstance.recordPerfStat(new Jn.a("didLaunch.mainProcessDuration",{duration:u}));const l=n.mainFetchDuration+n.mainProcessDelay;isNaN(l)||On.b.sharedInstance.recordPerfStat(new Jn.a("didLaunch.timeTillExecution",{duration:l}));const d=r.tcpTime+r.timeToFirstByteOfDocument;isNaN(d)||On.b.sharedInstance.recordPerfStat(new Jn.a("didLaunch.timeTillFetch",{duration:d})),On.b.sharedInstance.recordPerfStat(new Jn.a("didLaunch.totalPageLoadTime",{duration:s.totalPageLoadTime,isUsedForLoadBucketing:!0,loadedAppName:_.a.applicationName}))}var ir=n(2175),or=n(1261);let ar,sr,cr,ur,lr=!1;const dr={logger:console.log.bind(console),logLevel:"ERROR"};function pr(){if("DEBUG"===dr.logLevel){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("[Focusyn]:"),dr.logger.apply(dr.logger,t)}}function fr(e,t){return!(!ur||ur!==e)||hr(t)}function hr(e){return!!lr||(vr(cr)!==e||!gr(e))&&(!ar||!gr(e))}function mr(e,t){const{types:n,roles:r,dataAttributes:i}=e,o=t.getAttribute("role"),a=t.getAttribute("type");return!(!o||!r.has(o))||!!n.find((e=>{let[n,r]=e;if(t instanceof n)return!r||a&&r.has(a)}))||t instanceof HTMLElement&&!!i.find((e=>{let[n,r]=e;return t.dataset[n]===r}))}function gr(e){return pr("isFocusBlockedElement",e),!(!(e&&e instanceof Element)||mr(br,e))&&(!!mr(yr,e)||gr(e.parentElement))}function vr(e){return e instanceof HTMLLabelElement&&e.htmlFor&&document.getElementById(e.htmlFor)}const yr={types:[[HTMLButtonElement],[HTMLLabelElement],[HTMLInputElement,new Set(["checkbox","radio","range","submit","reset","file","color"])]],roles:new Set(["button","checkbox","radio","switch"]),dataAttributes:[["focusyn","block"]]},br={types:[],roles:new Set([]),dataAttributes:[["focusyn","allow"]]};var wr;pr("start",wr=window.document.body),wr.addEventListener("mousedown",(function(e){if(pr("mousedownHandler",e.target,ar),ar=e.target,!fr(document.activeElement,ar)&&(e.preventDefault(),ar instanceof HTMLInputElement&&"range"===ar.getAttribute("type"))){const{x:e,width:t}=ar.getBoundingClientRect(),n=ar;sr=r=>{const{clientX:i}=r,o=Math.min(Math.max(i,e),t+e)-e,a=parseInt(n.min)||0,s=((parseInt(n.max)||100)-a)/t,c=Math.round(o*s);n.value=`${c}`},window.addEventListener("mousemove",sr)}}),!0),wr.addEventListener("mouseup",(function(e){if(pr("mouseupHandler",e.target,ar),!fr(document.activeElement,ar)){e.preventDefault();const t=vr(ar);t&&!hr(t)&&t instanceof HTMLInputElement&&(t.disabled=!0,setTimeout((()=>{t.disabled=!1;const e=new MouseEvent("click");t.dispatchEvent(e)}),0))}sr&&window.removeEventListener("mousemove",sr),sr=null,ar=null,cr=e.target}),!0),wr.addEventListener("focus",(function(e){if(pr("focusHandler",e.target,e.relatedTarget),!hr(e.target))return e.preventDefault(),e.stopPropagation(),void(document.activeElement===ar&&(ur=document.activeElement,ur.blur()));pr("focus",e.target,e.relatedTarget)}),!0),wr.addEventListener("blur",(function(e){pr("blurHandler",e.target,e.relatedTarget,ar,cr),fr(e.target,e.relatedTarget||ar)?pr("blur",e.target):(e.preventDefault(),e.stopPropagation(),ur=null)}),!0),wr.addEventListener("keydown",(function(e){lr=!0}),!0),wr.addEventListener("keyup",(function(e){lr=!1}),!0),Object(a.a)(),function(){!function(){const e=()=>{document.body.classList.add("clicking")};window.addEventListener("pointerdown",e),window.addEventListener("mousedown",e),window.addEventListener("keyup",(e=>{switch(e.key){case"Tab":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":document.body.classList.remove("clicking")}}))}(),function(){const e=document.createElement("meta");e.setAttribute("name","theme-color"),e.setAttribute("content","rgb(242, 242, 247)"),e.setAttribute("media","(prefers-color-scheme: light)"),document.head.appendChild(e);const t=document.createElement("meta");t.setAttribute("name","theme-color"),t.setAttribute("content","rgb(50, 50, 54)"),t.setAttribute("media","(prefers-color-scheme: dark)"),document.head.appendChild(t)}();const e=c.a.sharedInstance.applicationParameter.redirectUrlPath;e&&window.location.replace(e);const t=new s.a;s.a.cloudOSApplication=t,t.installLegacyServices();const{locale:n}=ir.a;On.b.sharedInstance=new On.b(_.a.applicationName,_.a.masteringNumber,_.a.buildNumber,_.a.hostname,n),function(e){const t=t=>{for(const n of t.getEntries()){const t=n.name?`${n.entryType}.${n.name}`:n.entryType,r=n.toJSON();r.duration=r.startTime,r.startTime=0,e.recordPerfStat(new Jn.a(t,r))}};try{new PerformanceObserver(t).observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(t).observe({type:"paint",buffered:!0})}catch{}}(On.b.sharedInstance),or.a.sharedInstance.beginLoadPerformanceMeasurement("page"),x.a.sharedInstance.delegate=t,(new qe).start(),Yn.a.sharedInstance.setCurrentLocaleAndRegionFormat(n);const i=window.document.documentElement;i.setAttribute("data-primary-interaction-mode",ke.c.sharedInstance.primaryInteractionMode.toLowerCase()),i.setAttribute("data-device-type-class",ke.c.sharedInstance.deviceType.toLowerCase()),function(){const e=c.a.sharedInstance.applicationParameter.isMac,t=c.a.sharedInstance.applicationParameter.isIOS;if(!e&&!t)return;const n=c.a.sharedInstance.applicationParameter.osMajorVersion,r=c.a.sharedInstance.applicationParameter.osMinorVersion;e&&(n<10||10===n&&r<14)||t&&n<12||document.body.setAttribute("apple-system-font-capable","true")}();const a=document.querySelector('meta[name="viewport"]'),u=a||document.createElement("meta");u.content="width=device-width, initial-scale=1, viewport-fit=cover",a||(u.name="viewport",document.head.appendChild(u)),document.getElementById("early-child")?L.b.load().then((()=>{o.hydrate(r.createElement(Zn,null),document.getElementById("root"))})):o.hydrate(r.createElement(Zn,null),document.getElementById("root")),window.setTimeout((()=>{"complete"===document.readyState?rr():window.addEventListener("load",(()=>{setTimeout((()=>{rr()}),0)}))}),1e3),_t.a.sharedInstance.initialize(),function(){const e=window.location.pathname;return["/ssoRedirect"].includes(e)}()||Object(Ve.s)()}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Replay",(function(){return Nt}));var r=n(930);const i=n(935).a,o="sentryReplaySession",a="replay_event",s="Unable to send Replay",c=3e5,u=c,l=36e5;var d=n(954),p=n(931),f=n(929),h=n(960),m="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{},g=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,b=/^0o[0-7]+$/i,w=parseInt,S="object"==typeof m&&m&&m.Object===Object&&m,C="object"==typeof self&&self&&self.Object===Object&&self,_=S||C,O=Object.prototype.toString,E=Math.max,I=Math.min,A=function(){return _.Date.now()};function T(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function P(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==O.call(e)}(e))return NaN;if(T(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=T(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(g,"");var n=y.test(e);return n||b.test(e)?w(e.slice(2),n?2:8):v.test(e)?NaN:+e}var R=n(942);function k(e){return{timestamp:(new Date).getTime()/1e3,type:"default",...e}}var D,M=function(){return M=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},M.apply(this,arguments)};function N(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 x(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function L(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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 j(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function U(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,i=e.value,o=e.maskInputFn,a=i||"";return(t[n.toLowerCase()]||t[r])&&(a=o?o(a):"*".repeat(a.length)),a}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(D||(D={}));var F,z,B="__rrweb_original__",K=1,H=new RegExp("[^a-z0-9-_:]");function W(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(q).join(""):null}catch(n){return null}}function q(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=W(e.styleSheet)||t}catch(n){}return t}var V=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,$=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,G=/^(data:)([^,]*),(.*)/i;function Z(e,t){return(e||"").replace(V,(function(e,n,r,i,o,a){var s,c=r||o||a,u=n||i||"";if(!c)return e;if(!$.test(c))return"url("+u+c+u+")";if(G.test(c))return"url("+u+c+u+")";if("/"===c[0])return"url("+u+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)+u+")";var l=t.split("/"),d=c.split("/");l.pop();for(var p=0,f=d;p<f.length;p++){var h=f[p];"."!==h&&(".."===h?l.pop():l.push(h))}return"url("+u+l.join("/")+u+")"}))}var Q=/^[^ \t\n\r\u000c]+/,Y=/^[, \t\n\r\u000c]+/;function J(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function X(){var e=document.createElement("a");return e.href="",e.href}function ee(e,t,n,r){return"src"===n||"href"===n&&r||"xlink:href"===n&&r&&"#"!==r[0]?J(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(Y),!(n>=t.length);){var o=r(Q);if(","===o.slice(-1))o=J(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=J(e,o);for(var s=!1;;){var c=t.charAt(n);if(""===c){i.push((o+a).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,i.push((o+a).trim());break}"("===c&&(s=!0)}a+=c,n+=1}}}return i.join(", ")}(e,r):"style"===n&&r?Z(r,X()):"object"===t&&"data"===n&&r?J(e,r):r:J(e,r)}function te(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var i=e.classList[r];if(t.test(i))return!0}return!(!n||!e.matches(n))||te(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,te(e.parentNode,t,n)}function ne(e){return void 0===e?"":e.toLowerCase()}function re(e,t){var n,r=t.doc,i=t.map,o=t.blockClass,a=t.blockSelector,s=t.maskTextClass,c=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,d=t.inlineStylesheet,p=void 0===d||d,f=t.maskInputOptions,h=void 0===f?{}:f,m=t.maskTextFn,g=t.maskInputFn,v=t.slimDOMOptions,y=t.dataURLOptions,b=void 0===y?{}:y,w=t.inlineImages,S=void 0!==w&&w,C=t.recordCanvas,_=void 0!==C&&C,O=t.onSerialize,E=t.onIframeLoad,I=t.iframeLoadTimeout,A=void 0===I?5e3:I,T=t.keepIframeSrcFn,P=void 0===T?function(){return!1}:T,R=t.preserveWhiteSpace,k=void 0===R||R,M=function(e,t){var n,r,i,o,a=t.doc,s=t.blockClass,c=t.blockSelector,u=t.maskTextClass,l=t.maskTextSelector,d=t.inlineStylesheet,p=t.maskInputOptions,f=void 0===p?{}:p,h=t.maskTextFn,m=t.maskInputFn,g=t.dataURLOptions,v=void 0===g?{}:g,y=t.inlineImages,b=t.recordCanvas,w=t.keepIframeSrcFn;if(a.__sn){var S=a.__sn.id;r=1===S?void 0:S}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:D.Document,childNodes:[],compatMode:e.compatMode,rootId:r}:{type:D.Document,childNodes:[],rootId:r};case e.DOCUMENT_TYPE_NODE:return{type:D.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:r};case e.ELEMENT_NODE:for(var C=function(e,t,n){if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var i=e.classList[r];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,s,c),_=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return H.test(t)?"div":t}(e),O={},E=0,I=Array.from(e.attributes);E<I.length;E++){var A=I[E],T=A.name,P=A.value;O[T]=ee(a,_,T,P)}if("link"===_&&d){var R=Array.from(a.styleSheets).find((function(t){return t.href===e.href})),k=null;R&&(k=W(R)),k&&(delete O.rel,delete O.href,O._cssText=Z(k,R.href))}if("style"===_&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(k=W(e.sheet))&&(O._cssText=Z(k,X())),"input"!==_&&"textarea"!==_&&"select"!==_||(P=e.value,"radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&P?O.value=U({type:O.type,tagName:_,value:P,maskInputOptions:f,maskInputFn:m}):e.checked&&(O.checked=e.checked)),"option"===_&&(e.selected&&!f.select?O.selected=!0:delete O.selected),"canvas"===_&&b)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=B in i?i[B]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(O.rr_dataURL=e.toDataURL(v.type,v.quality));else if(!("__context"in e)){var M=e.toDataURL(v.type,v.quality),N=document.createElement("canvas");N.width=e.width,N.height=e.height,M!==N.toDataURL(v.type,v.quality)&&(O.rr_dataURL=M)}if("img"===_&&y){F||(F=a.createElement("canvas"),z=F.getContext("2d"));var x=e,L=x.crossOrigin;x.crossOrigin="anonymous";var j=function(){try{F.width=x.naturalWidth,F.height=x.naturalHeight,z.drawImage(x,0,0),O.rr_dataURL=F.toDataURL(v.type,v.quality)}catch(e){console.warn("Cannot inline img src="+x.currentSrc+"! Error: "+e)}L?O.crossOrigin=L:delete O.crossOrigin};x.complete&&0!==x.naturalWidth?j():x.onload=j}if("audio"!==_&&"video"!==_||(O.rr_mediaState=e.paused?"paused":"played",O.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(O.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(O.rr_scrollTop=e.scrollTop),C){var K=e.getBoundingClientRect(),q=K.width,V=K.height;O={class:O.class,rr_width:q+"px",rr_height:V+"px"}}return"iframe"!==_||w(O.src)||(e.contentDocument||(O.rr_src=O.src),delete O.src),{type:D.Element,tagName:_,attributes:O,childNodes:[],isSVG:(o=e,Boolean("svg"===o.tagName||o.ownerSVGElement)||void 0),needBlock:C,rootId:r};case e.TEXT_NODE:var $=e.parentNode&&e.parentNode.tagName,G=e.textContent,Q="STYLE"===$||void 0,Y="SCRIPT"===$||void 0;if(Q&&G){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(G=(i=e.parentNode.sheet).cssRules?Array.from(i.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(J){console.warn("Cannot get CSS styles from text's parentNode. Error: "+J,e)}G=Z(G,X())}return Y&&(G="SCRIPT_PLACEHOLDER"),!Q&&!Y&&te(e,u,l)&&G&&(G=h?h(G):G.replace(/[\S]/g,"*")),{type:D.Text,textContent:G||"",isStyle:Q,rootId:r};case e.CDATA_SECTION_NODE:return{type:D.CDATA,textContent:"",rootId:r};case e.COMMENT_NODE:return{type:D.Comment,textContent:e.textContent||"",rootId:r};default:return!1}}(e,{doc:r,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:p,maskInputOptions:h,maskTextFn:m,maskInputFn:g,dataURLOptions:b,inlineImages:S,recordCanvas:_,keepIframeSrcFn:P});if(!M)return console.warn(e,"not serialized"),null;n="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===D.Comment)return!0;if(e.type===D.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(e.attributes.name)||"icon"===ne(e.attributes.rel)||"apple-touch-icon"===ne(e.attributes.rel)||"shortcut icon"===ne(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ne(e.attributes.name)||"googlebot"===ne(e.attributes.name)||"bingbot"===ne(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ne(e.attributes.name)||"generator"===ne(e.attributes.name)||"framework"===ne(e.attributes.name)||"publisher"===ne(e.attributes.name)||"progid"===ne(e.attributes.name)||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ne(e.attributes.name)||"yandex-verification"===ne(e.attributes.name)||"csrf-token"===ne(e.attributes.name)||"p:domain_verify"===ne(e.attributes.name)||"verify-v1"===ne(e.attributes.name)||"verification"===ne(e.attributes.name)||"shopify-checkout-api-token"===ne(e.attributes.name)))return!0}}return!1}(M,v)&&(k||M.type!==D.Text||M.isStyle||M.textContent.replace(/^\s+|\s+$/gm,"").length)?K++:-2;var N=Object.assign(M,{id:n});if(e.__sn=N,-2===n)return null;i[n]=e,O&&O(e);var x=!l;if(N.type===D.Element&&(x=x&&!N.needBlock,delete N.needBlock,e.shadowRoot&&(N.isShadowHost=!0)),(N.type===D.Document||N.type===D.Element)&&x){v.headWhitespace&&M.type===D.Element&&"head"===M.tagName&&(k=!1);for(var L={doc:r,map:i,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:p,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:_,preserveWhiteSpace:k,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:A,keepIframeSrcFn:P},q=0,V=Array.from(e.childNodes);q<V.length;q++)(Q=re(V[q],L))&&N.childNodes.push(Q);if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var $=0,G=Array.from(e.shadowRoot.childNodes);$<G.length;$++){var Q;(Q=re(G[$],L))&&(Q.isShadow=!0,N.childNodes.push(Q))}}return e.parentNode&&j(e.parentNode)&&(N.isShadow=!0),N.type===D.Element&&"iframe"===N.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(c){return}if("complete"===i){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&E){var n=re(t,{doc:t,map:i,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:_,preserveWhiteSpace:k,onSerialize:O,onIframeLoad:E,iframeLoadTimeout:A,keepIframeSrcFn:P});n&&E(e,n)}}),A),N}var ie,oe,ae,se,ce,ue;function le(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}new RegExp(/([^\\]):hover/.source,"g"),function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(ie||(ie={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(oe||(oe={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(ae||(ae={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(se||(se={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(ce||(ce={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(ue||(ue={}));var de="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",pe={map:{},getId:function(){return console.error(de),-1},getNode:function(){return console.error(de),null},removeNodeFromMap:function(){console.error(de)},has:function(){return console.error(de),!1},reset:function(){console.error(de)}};function fe(e,t,n){void 0===n&&(n={});var r=null,i=0;return function(o){var a=Date.now();i||!1!==n.leading||(i=a);var s=t-(a-i),c=this,u=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),i=a,e.apply(c,u)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(c,u)}),s))}}function he(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return he(e,t,o||{},!0)}}function me(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}function ge(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ve(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ye(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;if("string"===typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);n=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(n=!0)}));return n||ye(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,ye(e.parentNode,t)}function be(e){return"__sn"in e&&-2===e.__sn.id}function we(e,t){if(j(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||we(e.parentNode,t))}function Se(e){return Boolean(e.changedTouches)}function Ce(e){return"__sn"in e&&e.__sn.type===D.Element&&"iframe"===e.__sn.tagName}function _e(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function Oe(e){return"__ln"in e}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(pe=new Proxy(pe,{get:function(e,t,n){return"map"===t&&console.error(de),Reflect.get(e,t,n)}})),function(){function e(){this.reset()}e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null===r||void 0===r||r.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],n.indexes.delete(e.id))}};i?r?(delete i.parent,delete r.children[i.id],this.indexes.delete(e.id),a(i)):(delete this.tree[i.id],this.indexes.delete(i.id),a(i)):(this.removeNodeMutations.push(e),o(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,r,i=this,o=this,a=o.tree,s=o.removeNodeMutations,c=o.textMutations,u=o.attributeMutations,l={source:oe.Mutation,removes:s,texts:c,attributes:u,adds:[]},d=function(e,t){t&&i.removeIdSet.add(e.id),l.texts=l.texts.concat(t?[]:e.texts).filter((function(e){return!i.removeIdSet.has(e.id)})),l.attributes=l.attributes.concat(t?[]:e.attributes).filter((function(e){return!i.removeIdSet.has(e.id)})),i.removeIdSet.has(e.id)||i.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return d(e,!0)})):(l.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return d(e,!1)})))};Object.values(a).forEach((function(e){return d(e,!1)}));try{for(var p=N(this.scrollMap.keys()),f=p.next();!f.done;f=p.next()){var h=f.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(b){e={error:b}}finally{try{f&&!f.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}try{for(var m=N(this.inputMap.keys()),g=m.next();!g.done;g=m.next())h=g.value,this.removeIdSet.has(h)&&this.inputMap.delete(h)}catch(w){n={error:w}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var v=new Map(this.scrollMap),y=new Map(this.inputMap);return this.reset(),{mutationData:l,scrollMap:v,inputMap:y}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)}}();var Ee=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Oe(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else e.nextSibling&&Oe(e.nextSibling)&&e.nextSibling.__ln.previous?(n=e.nextSibling.__ln.previous,t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)):(this.head&&(this.head.previous=t),t.next=this.head,this.head=t);this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),Ie=function(e,t){return"".concat(e,"@").concat(t)};function Ae(e){return"__sn"in e}var Te=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,r,i;if(!e.frozen&&!e.locked){for(var o=[],a=new Ee,s=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},c=function(t){for(var n,r,i,c,u,l=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,d=l;null===(i=null===(r=null===d||void 0===d?void 0:d.getRootNode)||void 0===r?void 0:r.call(d))||void 0===i?void 0:i.host;)d=(null===(u=null===(c=null===d||void 0===d?void 0:d.getRootNode)||void 0===c?void 0:c.call(d))||void 0===u?void 0:u.host)||null;var p=!e.doc.contains(t)&&(null===d||!e.doc.contains(d));if(t.parentNode&&!p){var f=j(t.parentNode)?e.mirror.getId(l):e.mirror.getId(t.parentNode),h=s(t);if(-1===f||-1===h)return a.addNode(t);var m=re(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(n){Ce(n)&&e.iframeManager.addIframe(n),_e(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)}});m&&o.push({parentId:f,nextId:h,node:m})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var u=N(e.movedSet),l=u.next();!l.done;l=u.next()){var d=l.value;Re(e.removes,d,e.mirror)&&!e.movedSet.has(d.parentNode)||c(d)}}catch(S){t={error:S}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var p=N(e.addedSet),f=p.next();!f.done;f=p.next())d=f.value,ke(e.droppedSet,d)||Re(e.removes,d,e.mirror)?ke(e.movedSet,d)?c(d):e.droppedSet.add(d):c(d)}catch(C){r={error:C}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}for(var h=null;a.length;){var m=null;if(h){var g=e.mirror.getId(h.value.parentNode),v=s(h.value);-1!==g&&-1!==v&&(m=h)}if(!m)for(var y=a.length-1;y>=0;y--){var b=a.get(y);if(b&&(g=e.mirror.getId(b.value.parentNode),v=s(b.value),-1!==g&&-1!==v)){m=b;break}}if(!m){for(;a.head;)a.removeNode(a.head.value);break}h=m.previous,a.removeNode(m.value),c(m.value)}var w={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:o};(w.texts.length||w.attributes.length||w.removes.length||w.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(w))}},this.processMutation=function(t){var n,r,i,o;if(!be(t.target))switch(t.type){case"characterData":var a=t.target.textContent;ye(t.target,e.blockClass)||a===t.oldValue||e.texts.push({value:te(t.target,e.maskTextClass,e.maskTextSelector)&&a?e.maskTextFn?e.maskTextFn(a):a.replace(/[\S]/g,"*"):a,node:t.target});break;case"attributes":var s=t.target;if(a=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(a=U({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:a,maskInputFn:e.maskInputFn})),ye(t.target,e.blockClass)||a===t.oldValue)return;var c=e.attributes.find((function(e){return e.node===t.target}));if(c||(c={node:t.target,attributes:{}},e.attributes.push(c)),"style"===t.attributeName){var u=e.doc.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue),void 0!==c.attributes.style&&null!==c.attributes.style||(c.attributes.style={});var l=c.attributes.style;try{for(var d=N(Array.from(s.style)),p=d.next();!p.done;p=d.next()){var f=p.value,h=s.style.getPropertyValue(f),m=s.style.getPropertyPriority(f);h===u.style.getPropertyValue(f)&&m===u.style.getPropertyPriority(f)||(l[f]=""===m?h:[h,m])}}catch(y){n={error:y}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}try{for(var g=N(Array.from(u.style)),v=g.next();!v.done;v=g.next())f=v.value,""===s.style.getPropertyValue(f)&&(l[f]=!1)}catch(b){i={error:b}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}else c.attributes[t.attributeName]=ee(e.doc,t.target.tagName,t.attributeName,a);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),i=j(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);ye(t.target,e.blockClass)||be(n)||(e.addedSet.has(n)?(Pe(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||we(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[Ie(r,i)]?Pe(e.movedSet,n):e.removes.push({parentId:i,id:r,isShadow:!!j(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!ye(n,e.blockClass)){if(Ae(t)){if(be(t))return;e.movedSet.add(t);var r=null;n&&Ae(n)&&(r=n.__sn.id),r&&(e.movedMap[Ie(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);ye(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function Pe(e,t){e.delete(t),t.childNodes.forEach((function(t){return Pe(e,t)}))}function Re(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||Re(e,r,n)}function ke(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||ke(e,n))}var De=[],Me="undefined"!==typeof CSSGroupingRule,Ne="undefined"!==typeof CSSMediaRule,xe="undefined"!==typeof CSSSupportsRule,Le="undefined"!==typeof CSSConditionRule;function je(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function Ue(e,t){var n,r,i=new Te;De.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(i.processMutations.bind(i));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Fe(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass;return le("scroll",fe((function(e){var o=je(e);if(o&&!ye(o,i)){var a=r.getId(o);if(o===n){var s=n.scrollingElement||n.documentElement;t({id:a,x:s.scrollLeft,y:s.scrollTop})}else t({id:a,x:o.scrollLeft,y:o.scrollTop})}}),e.sampling.scroll||100),n)}function ze(e,t){var n=M({},e);return t||delete n.userTriggered,n}var Be=["INPUT","TEXTAREA","SELECT"],Ke=new WeakMap;function He(e){return function(e,t){if(Me&&e.parentRule instanceof CSSGroupingRule||Ne&&e.parentRule instanceof CSSMediaRule||xe&&e.parentRule instanceof CSSSupportsRule||Le&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n);return t}(e,[])}function We(e,t){var n,r;void 0===t&&(t={});var i=e.doc.defaultView;if(!i)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,L([],x(e),!1)),n.apply(void 0,L([],x(e),!1))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,L([],x(e),!1)),r.apply(void 0,L([],x(e),!1))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,L([],x(e),!1)),i.apply(void 0,L([],x(e),!1))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,L([],x(e),!1)),o.apply(void 0,L([],x(e),!1))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,L([],x(e),!1)),a.apply(void 0,L([],x(e),!1))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,L([],x(e),!1)),s.apply(void 0,L([],x(e),!1))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,L([],x(e),!1)),c.apply(void 0,L([],x(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,L([],x(e),!1)),u.apply(void 0,L([],x(e),!1))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,L([],x(e),!1)),l.apply(void 0,L([],x(e),!1))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,L([],x(e),!1)),d.apply(void 0,L([],x(e),!1))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,L([],x(e),!1)),p.apply(void 0,L([],x(e),!1))}}(e,t);var o=Ue(e,e.doc),a=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=fe((function(e){var n=Date.now()-o;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],o=null}),s),l=fe((function(e){var t=je(e),n=Se(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=Date.now()),c.push({x:r,y:a,id:i.getId(t),timeOffset:Date.now()-o}),u("undefined"!==typeof DragEvent&&e instanceof DragEvent?oe.Drag:e instanceof MouseEvent?oe.MouseMove:oe.TouchMove)}),a,{trailing:!1}),d=[le("mousemove",l,r),le("touchmove",l,r),le("drag",l,r)];return function(){d.forEach((function(e){return e()}))}}(e),s=function(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.sampling;if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,s=[];return Object.keys(ae).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(e){var o=e.toLowerCase(),a=function(e){return function(n){var o=je(n);if(!ye(o,i)){var a=Se(n)?n.changedTouches[0]:n;if(a){var s=r.getId(o),c=a.clientX,u=a.clientY;t({type:ae[e],id:s,x:c,y:u})}}}}(e);s.push(le(o,a,n))})),function(){s.forEach((function(e){return e()}))}}(e),c=Fe(e),u=function(e){var t=e.viewportResizeCb,n=-1,r=-1;return le("resize",fe((function(){var e=ge(),i=ve();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200),window)}(e),l=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.ignoreClass,a=e.maskInputOptions,s=e.maskInputFn,c=e.sampling,u=e.userTriggeredOnInput;function l(e){var t=je(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Be.indexOf(t.tagName)<0)&&!ye(t,i)){var c=t.type;if(!t.classList.contains(o)){var l=t.value,p=!1;"radio"===c||"checkbox"===c?p=t.checked:(a[t.tagName.toLowerCase()]||a[c])&&(l=U({maskInputOptions:a,tagName:t.tagName,type:c,value:l,maskInputFn:s})),d(t,ze({text:l,isChecked:p,userTriggered:r},u));var f=t.name;"radio"===c&&f&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(f,'"]')).forEach((function(e){e!==t&&d(e,ze({text:e.value,isChecked:!p,userTriggered:!1},u))}))}}}function d(e,n){var i=Ke.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){Ke.set(e,n);var o=r.getId(e);t(M(M({},n),{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((function(e){return le(e,l,n)})),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),h=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return f&&f.set&&p.push.apply(p,L([],x(h.map((function(e){return he(e[0],e[1],{set:function(){l({target:this})}})}))),!1)),function(){p.forEach((function(e){return e()}))}}(e),d=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.mirror,i=e.sampling,o=function(e){return fe((function(i){var o=je(i);if(o&&!ye(o,n)){var a=o,s=a.currentTime,c=a.volume,u=a.muted;t({type:e,id:r.getId(o),currentTime:s,volume:c,muted:u})}}),i.media||500)},a=[le("play",o(0)),le("pause",o(1)),le("seeked",o(2)),le("volumechange",o(3))];return function(){a.forEach((function(e){return e()}))}}(e),p=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=t.win,o=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(e,t){var i=r.getId(this.ownerNode);return-1!==i&&n({id:i,adds:[{rule:e,index:t}]}),o.apply(this,arguments)};var a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(e){var t=r.getId(this.ownerNode);return-1!==t&&n({id:t,removes:[{index:e}]}),a.apply(this,arguments)};var s={};Me?s.CSSGroupingRule=i.CSSGroupingRule:(Ne&&(s.CSSMediaRule=i.CSSMediaRule),Le&&(s.CSSConditionRule=i.CSSConditionRule),xe&&(s.CSSSupportsRule=i.CSSSupportsRule));var c={};return Object.entries(s).forEach((function(e){var t=x(e,2),i=t[0],o=t[1];c[i]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(e,t){var o=r.getId(this.parentStyleSheet.ownerNode);return-1!==o&&n({id:o,adds:[{rule:e,index:L(L([],x(He(this)),!1),[t||0],!1)}]}),c[i].insertRule.apply(this,arguments)},o.prototype.deleteRule=function(e){var t=r.getId(this.parentStyleSheet.ownerNode);return-1!==t&&n({id:t,removes:[{index:L(L([],x(He(this)),!1),[e],!1)}]}),c[i].deleteRule.apply(this,arguments)}})),function(){i.CSSStyleSheet.prototype.insertRule=o,i.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=x(e,2),n=t[0],r=t[1];r.prototype.insertRule=c[n].insertRule,r.prototype.deleteRule=c[n].deleteRule}))}}(e,{win:i}),f=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=t.win,o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(e,t,i){var a,s,c=r.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==c&&n({id:c,set:{property:e,value:t,priority:i},index:He(this.parentRule)}),o.apply(this,arguments)};var a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,i,o=r.getId(null===(i=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==o&&n({id:o,remove:{property:e},index:He(this.parentRule)}),a.apply(this,arguments)},function(){i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a}}(e,{win:i}),h=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=me(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),function(){i.forEach((function(e){return e()}))}}(e):function(){},m=[];try{for(var g=N(e.plugins),v=g.next();!v.done;v=g.next()){var y=v.value;m.push(y.observer(y.callback,i,y.options))}}catch(b){n={error:b}}finally{try{v&&!v.done&&(r=g.return)&&r.call(g)}finally{if(n)throw n.error}}return function(){De.forEach((function(e){return e.reset()})),o.disconnect(),a(),s(),c(),u(),l(),d(),p(),f(),h(),m.forEach((function(e){return e()}))}}for(var qe=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),Ve=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(me(HTMLElement.prototype,"attachShadow",(function(e){return function(){var n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}return e.prototype.addShadowRoot=function(e,t){Ue(M(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Fe(M(M({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(me(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){var r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}(),$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Ze=0;Ze<64;Ze++)Ge[$e.charCodeAt(Ze)]=Ze;var Qe=new Map,Ye=function(e,t,n){if(e&&(Xe(e,t)||"object"===typeof e)){var r=function(e,t){var n=Qe.get(e);return n||(n=new Map,Qe.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function Je(e,t,n){if(e instanceof Array)return e.map((function(e){return Je(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var r=e.constructor.name,i=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=$e[n[t]>>2],i+=$e[(3&n[t])<<4|n[t+1]>>4],i+=$e[(15&n[t+1])<<2|n[t+2]>>6],i+=$e[63&n[t+2]];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i}(e);return{rr_type:r,base64:i}}return e instanceof DataView?{rr_type:e.constructor.name,args:[Je(e.buffer,t,n),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[Je(e.data,t,n),e.width,e.height]}:Xe(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:Ye(e,t,n)}:e}var Xe=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function et(e,t,n,r,i,o){var a,s,c=[],u=Object.getOwnPropertyNames(e),l=function(a){try{if("function"!==typeof e[a])return"continue";var s=me(e,a,(function(s){return function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var l=s.apply(this,c);if(Ye(l,o,e),!ye(this.canvas,r)){i.getId(this.canvas);var d=function(e,t,n){return L([],x(e),!1).map((function(e){return Je(e,t,n)}))}(L([],x(c),!1),o,e),p={type:t,property:a,args:d};n(this.canvas,p)}return l}}));c.push(s)}catch(l){var u=he(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});c.push(u)}};try{for(var d=N(u),p=d.next();!p.done;p=d.next())l(p.value)}catch(f){a={error:f}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}return c}var tt,nt,rt=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=function(e,t){var n=[];try{var r=me(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return ye(this,t)||"__context"in this||(this.__context=n),e.apply(this,L([n],x(r),!1))}}));n.push(r)}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach((function(e){return e()}))}}(e,t),r=function(e,t,n){var r,i,o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(r){try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var i=me(t.CanvasRenderingContext2D.prototype,r,(function(t){return function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return ye(this.canvas,n)||setTimeout((function(){var t=L([],x(o),!1);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],a=n.getContext("2d"),s=null===a||void 0===a?void 0:a.getImageData(0,0,n.width,n.height),c=null===s||void 0===s?void 0:s.data;t[0]=JSON.stringify(c)}e(i.canvas,{type:se["2D"],property:r,args:t})}),0),t.apply(this,o)}}));o.push(i)}catch(s){var a=he(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:se["2D"],property:r,args:[t],setter:!0})}});o.push(a)}};try{for(var c=N(a),u=c.next();!u.done;u=c.next())s(u.value)}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),i=function(e,t,n,r){var i=[];return i.push.apply(i,L([],x(et(t.WebGLRenderingContext.prototype,se.WebGL,e,n,r,t)),!1)),"undefined"!==typeof t.WebGL2RenderingContext&&i.push.apply(i,L([],x(et(t.WebGL2RenderingContext.prototype,se.WebGL2,e,n,r,t)),!1)),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){n(),r(),i()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){e.type;var t=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}(e,["type"]);return t})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function it(e){return M(M({},e),{timestamp:Date.now()})}var ot={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function at(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,a=e.blockSelector,s=void 0===a?null:a,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,l=e.maskTextClass,d=void 0===l?"rr-mask":l,p=e.maskTextSelector,f=void 0===p?null:p,h=e.inlineStylesheet,m=void 0===h||h,g=e.maskAllInputs,v=e.maskInputOptions,y=e.slimDOMOptions,b=e.maskInputFn,w=e.maskTextFn,S=e.hooks,C=e.packFn,_=e.sampling,O=void 0===_?{}:_,E=e.mousemoveWait,I=e.recordCanvas,A=void 0!==I&&I,T=e.userTriggeredOnInput,P=void 0!==T&&T,R=e.collectFonts,k=void 0!==R&&R,D=e.inlineImages,L=void 0!==D&&D,j=e.plugins,U=e.keepIframeSrcFn,F=void 0===U?function(){return!1}:U;if(!t)throw new Error("emit function is required");void 0!==E&&void 0===O.mousemove&&(O.mousemove=E);var z,B,K=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==v?v:{password:!0},H=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};void 0===z&&(z=window),"NodeList"in z&&!z.NodeList.prototype.forEach&&(z.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in z&&!z.DOMTokenList.prototype.forEach&&(z.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var W=0;tt=function(e,i){var o;if(!(null===(o=De[0])||void 0===o?void 0:o.isFrozen())||e.type===ie.FullSnapshot||e.type===ie.IncrementalSnapshot&&e.data.source===oe.Mutation||De.forEach((function(e){return e.unfreeze()})),t(function(e){var t,n;try{for(var r=N(j||[]),i=r.next();!i.done;i=r.next()){var o=i.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return C&&(e=C(e)),e}(e),i),e.type===ie.FullSnapshot)B=e,W=0;else if(e.type===ie.IncrementalSnapshot){if(e.data.source===oe.Mutation&&e.data.isAttachIframe)return;W++;var a=r&&W>=r,s=n&&e.timestamp-B.timestamp>n;(a||s)&&nt(!0)}};var q=function(e){tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.Mutation},e)}))},V=function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.Scroll},e)}))},$=function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.CanvasMutation},e)}))},G=new qe({mutationCb:q}),Z=new rt({recordCanvas:A,mutationCb:$,win:window,blockClass:o,mirror:ot}),Q=new Ve({mutationCb:q,scrollCb:V,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:d,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:K,maskTextFn:w,maskInputFn:b,recordCanvas:A,inlineImages:L,sampling:O,slimDOMOptions:H,iframeManager:G,canvasManager:Z},mirror:ot});nt=function(e){var t,n,r,i;void 0===e&&(e=!1),tt(it({type:ie.Meta,data:{href:window.location.href,width:ve(),height:ge()}}),e),De.forEach((function(e){return e.lock()}));var a=x(function(e,t){var n=t||{},r=n.blockClass,i=n.blockSelector,o=n.maskTextClass,a=n.maskTextSelector,s=n.inlineStylesheet,c=n.inlineImages,u=n.recordCanvas,l=n.maskAllInputs,d=void 0!==l&&l,p=n.slimDOM,f=void 0!==p&&p,h=n.keepIframeSrcFn,m={};return[re(e,{doc:e,map:m,blockClass:void 0===r?"rr-block":r,blockSelector:void 0===i?null:i,maskTextClass:void 0===o?"rr-mask":o,maskTextSelector:void 0===a?null:a,skipChild:!1,inlineStylesheet:void 0===s||s,maskInputOptions:!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===d?{password:!0}:d,maskTextFn:n.maskTextFn,maskInputFn:n.maskInputFn,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:n.dataURLOptions,inlineImages:void 0!==c&&c,recordCanvas:void 0!==u&&u,preserveWhiteSpace:n.preserveWhiteSpace,onSerialize:n.onSerialize,onIframeLoad:n.onIframeLoad,iframeLoadTimeout:n.iframeLoadTimeout,keepIframeSrcFn:void 0===h?function(){return!1}:h}),m]}(document,{blockClass:o,blockSelector:s,maskTextClass:d,maskTextSelector:f,inlineStylesheet:m,maskAllInputs:K,maskTextFn:w,slimDOM:H,recordCanvas:A,inlineImages:L,onSerialize:function(e){Ce(e)&&G.addIframe(e),_e(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){G.attachIframe(e,t),Q.observeAttachShadow(e)},keepIframeSrcFn:F}),2),c=a[0],u=a[1];if(!c)return console.warn("Failed to snapshot the document");ot.map=u,tt(it({type:ie.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(i=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===i?void 0:i.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),De.forEach((function(e){return e.unlock()}))};try{var Y=[];Y.push(le("DOMContentLoaded",(function(){tt(it({type:ie.DomContentLoaded,data:{}}))})));var J=function(e){var t;return We({mutationCb:q,mousemoveCb:function(e,t){return tt(it({type:ie.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.MouseInteraction},e)}))},scrollCb:V,viewportResizeCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.ViewportResize},e)}))},inputCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.Input},e)}))},mediaInteractionCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.StyleDeclaration},e)}))},canvasMutationCb:$,fontCb:function(e){return tt(it({type:ie.IncrementalSnapshot,data:M({source:oe.Font},e)}))},blockClass:o,ignoreClass:u,maskTextClass:d,maskTextSelector:f,maskInputOptions:K,inlineStylesheet:m,sampling:O,recordCanvas:A,inlineImages:L,userTriggeredOnInput:P,collectFonts:k,doc:e,maskInputFn:b,maskTextFn:w,blockSelector:s,slimDOMOptions:H,mirror:ot,iframeManager:G,shadowDomManager:Q,canvasManager:Z,plugins:(null===(t=null===j||void 0===j?void 0:j.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return tt(it({type:ie.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},S)};G.addLoadListener((function(e){try{Y.push(J(e.contentDocument))}catch(t){console.warn("error in rrweb iframe observer",t)}}));var X=function(){nt(),Y.push(J(document))};return"interactive"===document.readyState||"complete"===document.readyState?X():Y.push(le("load",(function(){tt(it({type:ie.Load,data:{}})),X()}),window)),function(){Y.forEach((function(e){return e()}))}}catch(ee){console.warn(ee)}}at.addCustomEvent=function(e,t){if(!tt)throw new Error("please add custom event after start recording");tt(it({type:ie.Custom,data:{tag:e,payload:t}}))},at.freezePage=function(){De.forEach((function(e){return e.freeze()}))},at.takeFullSnapshot=function(e){if(!nt)throw new Error("please take full snapshot after start recording");nt(e)},at.mirror=ot;let st=null;function ct(e,t){return"scope"===e?function(e){const t=e.getLastBreadcrumb();return st!==t&&t?(st=t,t.category&&(["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:k(t)):null}(t):function(e){let t,n;try{n=function(e){return e.event.target?e.event.target:e.event}(e),t=Object(R.c)(n)}catch(r){t="<unknown>"}return 0===t.length?null:k({category:`ui.${e.name}`,message:t,data:{...n?{nodeId:at.mirror.getId(n)}:{}}})}(t)}function ut(e,t,n){if(!e.eventBuffer)return;if(e.isPaused())return;const r=t.timestamp>9999999999?t.timestamp:1e3*t.timestamp;if(r+c<(new Date).getTime())return;const i=e.getContext().earliestEvent;0===Object(d.a)([e,"access",e=>e.session,"optionalAccess",e=>e.segmentId])&&(!i||r<i)&&(e.getContext().earliestEvent=r),e.eventBuffer.addEvent(t,n)}function lt(e,t){t.map((t=>{let{type:n,start:r,end:i,name:o,data:a}=t;return ut(e,{type:ie.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:a}}})}))}function dt(e,t){return!function(e){const t=Object(d.a)([r.b,"call",e=>e(),"access",e=>e.getClient,"call",e=>e(),"optionalAccess",e=>e.getDsn,"call",e=>e()]);return!!t&&e.includes(t.host)}(t)}const pt=["name","type","startTime","transferSize","duration"];function ft(e){return function(t){return pt.every((n=>e[n]===t[n]))}}var ht=n(933);const mt={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,encodedBodySize:a,transferSize:s}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:vt(o),end:vt(i),name:r,data:{size:s,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=vt(i);return{type:n,name:r,start:o,end:o+t}},navigation:function(e){const{entryType:t,name:n,duration:r,domComplete:i,startTime:o,transferSize:a,type:s}=e;return 0===r?null:{type:`${t}.${s}`,start:vt(o),end:vt(i),name:n,data:{size:a,duration:r}}},"largest-contentful-paint":function(e){const{duration:t,entryType:n,startTime:r,size:i}=e,o=vt(r);return{type:n,name:n,start:o,end:o+t,data:{duration:t,size:i,nodeId:at.mirror.getId(e.element)}}}};function gt(e){return void 0===mt[e.entryType]?null:mt[e.entryType](e)}function vt(e){return((ht.b||i.performance.timeOrigin)+e)/1e3}class yt{constructor(){this._events=[]}destroy(){this._events=[]}get length(){return this._events.length}addEvent(e,t){t?this._events=[e]:this._events.push(e)}finish(){return new Promise((e=>{const t=this._events;this._events=[],e(JSON.stringify(t))}))}}class bt{__init(){this._eventBufferItemLength=0}__init2(){this._id=0}constructor(e){bt.prototype.__init.call(this),bt.prototype.__init2.call(this),this._worker=e}destroy(){Object(d.a)([this,"access",e=>e._worker,"optionalAccess",e=>e.terminate,"call",e=>e()]),this._worker=null}get length(){return this._eventBufferItemLength}async addEvent(e,t){return t&&await this._postMessage({id:this._getAndIncrementId(),method:"init",args:[]}),this._sendEventToWorker(e)}finish(){return this._finishRequest(this._getAndIncrementId())}_postMessage(e){let{id:t,method:n,args:r}=e;return new Promise(((e,i)=>{const o=r=>{let{data:a}=r;a.method===n&&a.id===t&&(Object(d.a)([this,"access",e=>e._worker,"optionalAccess",e=>e.removeEventListener,"call",e=>e("message",o)]),a.success?e(a.response):i(new Error("Error in compression worker")))};let a;try{a=JSON.stringify(r)}catch(s){a="[]"}Object(d.a)([this,"access",e=>e._worker,"optionalAccess",e=>e.addEventListener,"call",e=>e("message",o)]),Object(d.a)([this,"access",e=>e._worker,"optionalAccess",e=>e.postMessage,"call",e=>e({id:t,method:n,args:a})])}))}_sendEventToWorker(e){const t=this._postMessage({id:this._getAndIncrementId(),method:"addEvent",args:[e]});return this._eventBufferItemLength++,t}async _finishRequest(e){const t=this._postMessage({id:e,method:"finish",args:[]});return this._eventBufferItemLength=0,t}_getAndIncrementId(){return this._id++}}function wt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date;return null===e||void 0===t||t<0||0!==t&&e+t<=n}function St(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date;return wt(e.started,l,n)||wt(Object(d.a)([e,"optionalAccess",e=>e.lastActivity]),t,n)}function Ct(e){if("sessionStorage"in i)try{i.sessionStorage.setItem(o,JSON.stringify(e))}catch(t){}}var _t=n(938);function Ot(e){return void 0!==e&&Math.random()<e}function Et(e){const t=(new Date).getTime();return{id:e.id||Object(_t.h)(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled}}function It(e){let{sessionSampleRate:t,errorSampleRate:n,stickySession:r=!1}=e;const i=function(e,t){return Ot(e)?"session":!!Ot(t)&&"error"}(t,n),o=Et({sampled:i});return r&&Ct(o),o}var At=n(950);let Tt;class Pt{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this._performanceObserver=null}__init5(){this._retryCount=0}__init6(){this._retryInterval=5e3}__init7(){this._flushLock=null}__init8(){this._lastActivity=(new Date).getTime()}__init9(){this._isEnabled=!1}__init10(){this._isPaused=!1}__init11(){this._hasInitializedCoreListeners=!1}__init12(){this._stopRecording=null}__init13(){this._context={errorIds:new Set,traceIds:new Set,urls:[],earliestEvent:null,initialTimestamp:(new Date).getTime(),initialUrl:""}}constructor(e){let{options:t,recordingOptions:n}=e;Pt.prototype.__init.call(this),Pt.prototype.__init2.call(this),Pt.prototype.__init3.call(this),Pt.prototype.__init4.call(this),Pt.prototype.__init5.call(this),Pt.prototype.__init6.call(this),Pt.prototype.__init7.call(this),Pt.prototype.__init8.call(this),Pt.prototype.__init9.call(this),Pt.prototype.__init10.call(this),Pt.prototype.__init11.call(this),Pt.prototype.__init12.call(this),Pt.prototype.__init13.call(this),Pt.prototype.__init14.call(this),Pt.prototype.__init15.call(this),Pt.prototype.__init16.call(this),Pt.prototype.__init17.call(this),Pt.prototype.__init18.call(this),Pt.prototype.__init19.call(this),this._recordingOptions=n,this._options=t,this._debouncedFlush=function(e,t,n){var r,i,o,a,s,c,u=0,l=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function h(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-u>=o}function m(){var e=A();if(h(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-c);return d?I(n,o-(e-u)):n}(e))}function g(e){return s=void 0,p&&r?f(e):(r=i=void 0,a)}function v(){var e=A(),n=h(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(m,t),l?f(e):a}(c);if(d)return s=setTimeout(m,t),f(c)}return void 0===s&&(s=setTimeout(m,t)),a}return t=P(t)||0,T(n)&&(l=!!n.leading,o=(d="maxWait"in n)?E(P(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},v.flush=function(){return void 0===s?a:g(A())},v}((()=>this.flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay})}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}start(){this.setInitialState(),this.loadSession({expiry:c}),this.session?this.session.sampled&&("error"===this.session.sampled&&(this.recordingMode="error"),this.updateSessionActivity(),this.eventBuffer=function(e){let{useCompression:t}=e;if(t&&window.Worker){const e=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},S=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let U=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var O=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);S(t,t.dyn_ltree,e-1),S(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},T={_tr_init:t=>{U||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),U=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:O,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var N=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const F=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var L=(t,e,a,i)=>{const n=F,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=T,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:J,Z_OK:W,Z_STREAM_END:q,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=N(t.adler,e,n,a):2===t.state.wrap&&(t.adler=L(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),W},Zt=t=>{const e=Rt(t);var a;return e===W&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},St=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var Ut={deflateInit:(t,e)=>St(t,e,ot,15,8,st),deflateInit2:St,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,W),deflate:(t,e)=>{if(Et(t)||e>J||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,W}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,W}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=L(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,W;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=L(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,W;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=L(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=L(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,W;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=L(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=L(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,W;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=L(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,W;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,W}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),W;if(2===i&&(e===Y?K(a):e!==J&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,W}return e!==X?W:a.wrap<=0?q:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?W:q)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):W},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=N(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,W},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Ot=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Tt=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Nt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Nt=!1}const Ft=new Uint8Array(256);for(let t=0;t<256;t++)Ft[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ft[254]=Ft[254]=1;var Lt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Ft[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Nt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ft[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Jt,Z_DEFLATED:Wt}=B;function qt(t){this.options=Ot({level:Xt,method:Wt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Jt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ut.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&Ut.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Lt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Ut.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new qt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}qt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Lt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Ut.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Ut.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},qt.prototype.onData=function(t){this.chunks.push(t)},qt.prototype.onEnd=function(t){t===Yt&&(this.result=Tt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:qt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,S,U,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(S=0,U=r[m]):r[m]>=u?(S=D[r[m]-u],U=A[r[m]-u]):(S=96,U=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|S<<16|U|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Se={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=L(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=L(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=L(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=L(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=L(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=L(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=L(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=L(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?L(a.check,n,f,r-f):N(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?L(a.check,n,f,t.next_out-f):N(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=N(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Ue=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Oe,Z_FINISH:Te,Z_OK:Ne,Z_STREAM_END:Fe,Z_NEED_DICT:Le,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Ot({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Se.inflateInit2(this.strm,e.windowBits);if(a!==Ne)throw new Error(I[a]);if(this.header=new Ue,Se.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Lt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Se.inflateSetDictionary(this.strm,e.dictionary),a!==Ne)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Te:Oe,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Se.inflate(a,r),s===Le&&n&&(s=Se.inflateSetDictionary(a,n),s===Ne?s=Se.inflate(a,r):s===Be&&(s=Le));a.avail_in>0&&s===Fe&&a.state.wrap>0&&0!==t[a.next_in];)Se.inflateReset(a),s=Se.inflate(a,r);switch(s){case Ie:case Be:case Le:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Fe))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Ne||0!==o){if(s===Fe)return s=Se.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Ne&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Tt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=B;const Xe=new class{constructor(){this.added=0,this.init()}init(){this.added=0,this.deflate=new Ye,this.deflate.push("[",Ge.Z_NO_FLUSH)}addEvent(t){if(!t)return;const e=this.added>0?",":"";this.deflate.push(e+JSON.stringify(t),Ge.Z_NO_FLUSH),this.added++}finish(){if(this.deflate.push("]",Ge.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this.init(),t}},Je={init:()=>(Xe.init(),""),addEvent:t=>(Xe.addEvent(t),""),finish:()=>Xe.finish()};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,[i]=t.data.args?JSON.parse(t.data.args):[];if(e in Je&&"function"==typeof Je[e])try{const t=Je[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t}),console.error(t)}}));']),t=URL.createObjectURL(e);try{const e=new Worker(t);if(e)return new bt(e);Object(f.c)(new Error("Unable to create compression worker"))}catch(n){}}return new yt}({useCompression:Boolean(this._options.useCompression)}),this.addListeners(),this._isEnabled=!0,this.startRecording()):this.handleException(new Error("No session found"))}startRecording(){try{this._stopRecording=at({...this._recordingOptions,..."error"===this.recordingMode&&{checkoutEveryNth:6e4},emit:this.handleRecordingEmit})}catch(e){this.handleException(e)}}stopRecording(){return!!this._stopRecording&&(this._stopRecording(),!0)}stop(){try{this._isEnabled=!1,this.removeListeners(),Object(d.a)([this,"access",e=>e._stopRecording,"optionalCall",e=>e()]),Object(d.a)([this,"access",e=>e.eventBuffer,"optionalAccess",e=>e.destroy,"call",e=>e()]),this.eventBuffer=null}catch(e){this.handleException(e)}}pause(){this._isPaused=!0;try{this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0)}catch(e){this.handleException(e)}}resume(){this._isPaused=!1,this.startRecording()}handleException(e){}clearSession(){try{!function(){if("sessionStorage"in i)try{i.sessionStorage.removeItem(o)}catch(e){}}(),this.session=void 0}catch(e){this.handleException(e)}}loadSession(e){let{expiry:t}=e;const{type:n,session:r}=function(e){let{expiry:t,currentSession:n,stickySession:r,sessionSampleRate:a,errorSampleRate:s}=e;const c=n||r&&function(){if(!("sessionStorage"in i))return null;try{const e=i.sessionStorage.getItem(o);return e?Et(JSON.parse(e)):null}catch(e){return null}}();return c&&!St(c,t)?{type:"saved",session:c}:{type:"new",session:It({stickySession:r,sessionSampleRate:a,errorSampleRate:s})}}({expiry:t,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,errorSampleRate:this._options.errorSampleRate});"new"===n&&this.setInitialState(),r.id!==Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.id])&&(r.previousSessionId=Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.id])),this.session=r}setInitialState(){const e=`${i.location.pathname}${i.location.hash}${i.location.search}`,t=`${i.location.origin}${e}`;this.performanceEvents=[],this.clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=(new Date).getTime(),this._context.urls.push(t)}addListeners(){try{if(i.document.addEventListener("visibilitychange",this.handleVisibilityChange),i.addEventListener("blur",this.handleWindowBlur),i.addEventListener("focus",this.handleWindowFocus),function(e){const t=Object(r.b)().getClient();if(!t)return;const n=t.recordDroppedEvent.bind(t);t.recordDroppedEvent=(t,r,i)=>(i&&i.event_id&&e.delete(i.event_id),n(t,r,i)),Tt=n}(this._context.errorIds),!this._hasInitializedCoreListeners){const t=Object(r.b)().getScope();Object(d.a)([t,"optionalAccess",e=>e.addScopeListener,"call",e=>e(this.handleCoreBreadcrumbListener("scope"))]),Object(h.a)("dom",this.handleCoreBreadcrumbListener("dom")),Object(h.a)("fetch",(e=this,t=>{if(!e.isEnabled())return;const n=function(e){if(!e.endTimestamp)return null;const{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:r.url,data:{method:r.method,statusCode:i.status}}}(t);null!==n&&(dt(0,n.name)||e.addUpdate((()=>(lt(e,[n]),!0))))})),Object(h.a)("xhr",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){if(e.xhr.__sentry_own_request__)return null;if(e.startTimestamp&&(e.xhr.__sentry_xhr__=e.xhr.__sentry_xhr__||{},e.xhr.__sentry_xhr__.startTimestamp=e.startTimestamp),!e.endTimestamp)return null;const{method:t,url:n,status_code:r}=e.xhr.__sentry_xhr__||{};return void 0===n?null:{type:"resource.xhr",name:n,start:(Object(d.a)([e,"access",e=>e.xhr,"access",e=>e.__sentry_xhr__,"optionalAccess",e=>e.startTimestamp])||0)/1e3||e.endTimestamp/1e3,end:e.endTimestamp/1e3,data:{method:t,statusCode:r}}}(t);null!==n&&(dt(0,n.name)||e.addUpdate((()=>(lt(e,[n]),!0))))}}(this)),Object(h.a)("history",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=(new Date).getTime()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(lt(e,[n]),!1))))}}(this)),Object(p.b)(function(e){return t=>t.type===a?(delete t.breadcrumbs,t):function(e){return!(e.type||!Object(d.a)([e,"access",e=>e.exception,"optionalAccess",e=>e.values,"optionalAccess",e=>e.length]))&&e.exception.values.some((e=>!!Object(d.a)([e,"access",e=>e.stacktrace,"optionalAccess",e=>e.frames,"optionalAccess",e=>e.length])&&e.stacktrace.frames.some((e=>Object(d.a)([e,"access",e=>e.filename,"optionalAccess",e=>e.includes,"call",e=>e("/rrweb/src/")])))))}(t)&&!Object(d.a)([e,"access",e=>e.getOptions,"call",e=>e(),"access",e=>e._experiments,"optionalAccess",e=>e.captureExceptions])?null:("transaction"===t.type&&"session"!==e.recordingMode||(t.tags={...t.tags,replayId:Object(d.a)([e,"access",e=>e.session,"optionalAccess",e=>e.id])}),"transaction"===t.type&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id?(e.getContext().traceIds.add(t.contexts.trace.trace_id),t):(t.type||e.getContext().errorIds.add(t.event_id),Object(d.a)([t,"access",e=>e.exception,"optionalAccess",e=>e.values,"optionalAccess",e=>e[0]]),"error"===e.recordingMode&&t.exception&&t.message!==s&&setTimeout((async()=>{await e.flushImmediate(),e.stopRecording()&&(e.recordingMode="session",e.startRecording())})),t))}(this)),this._hasInitializedCoreListeners=!0}}catch(t){this.handleException(t)}var e;"_performanceObserver"in i&&(this._performanceObserver=function(e){const t=new PerformanceObserver((t=>{const n=function(e,t){const[n,r,i]=e.reduce(((e,t)=>("navigation"===t.entryType?e[0].push(t):"largest-contentful-paint"===t.entryType?e[1].push(t):e[2].push(t),e)),[[],[],[]]),o=[],a=[];let s=r.length?r[r.length-1]:void 0;return t.forEach((e=>{if("largest-contentful-paint"!==e.entryType)if("navigation"!==e.entryType)o.push(e);else{const t=e;e.duration>0&&!n.find(ft(t))&&!a.find(ft(t))&&a.push(t)}else(!s||s.startTime<e.startTime)&&(s=e)})),[...s?[s]:[],...n,...i,...o,...a].sort(((e,t)=>e.startTime-t.startTime))}(e.performanceEvents,t.getEntries());e.performanceEvents=n}));return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach((e=>{try{t.observe({type:e,buffered:!0})}catch(n){}})),t}(this))}removeListeners(){try{i.document.removeEventListener("visibilitychange",this.handleVisibilityChange),i.removeEventListener("blur",this.handleWindowBlur),i.removeEventListener("focus",this.handleWindowFocus),function(){const e=Object(r.b)().getClient();e&&Tt&&(e.recordDroppedEvent=Tt)}(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(e){this.handleException(e)}}addUpdate(e){const t=Object(d.a)([e,"optionalCall",e=>e()]);"error"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}__init14(){this.handleRecordingEmit=(e,t)=>{this.checkAndHandleExpiredSession()&&this.addUpdate((()=>("error"===this.recordingMode&&2===e.type&&this.setInitialState(),ut(this,e,t),2===e.type&&(Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.previousSessionId])||("error"===this.recordingMode&&this.session&&this._context.earliestEvent&&(this.session.started=this._context.earliestEvent,this._maybeSaveSession()),"session"===this.recordingMode&&this.flushImmediate()),!0))))}}__init15(){this.handleVisibilityChange=()=>{"visible"===i.document.visibilityState?this.doChangeToForegroundTasks():this.doChangeToBackgroundTasks()}}__init16(){this.handleWindowBlur=()=>{const e=k({category:"ui.blur"});this.doChangeToBackgroundTasks(e)}}__init17(){this.handleWindowFocus=()=>{const e=k({category:"ui.focus"});this.doChangeToForegroundTasks(e)}}__init18(){this.handleCoreBreadcrumbListener=e=>t=>{if(!this._isEnabled)return;const n=ct(e,t);null!==n&&"sentry.transaction"!==n.category&&("ui.click"===n.category?this.triggerUserActivity():this.checkAndHandleExpiredSession(),this.addUpdate((()=>(ut(this,{type:ie.Custom,timestamp:1e3*(n.timestamp||0),data:{tag:"breadcrumb",payload:n}}),"console"===n.category))))}}doChangeToBackgroundTasks(e){if(!this.session)return;const t=St(this.session,u);e&&!t&&this.createCustomBreadcrumb(e),this.conditionalFlush()}doChangeToForegroundTasks(e){this.session&&this.checkAndHandleExpiredSession({expiry:u})&&e&&this.createCustomBreadcrumb(e)}triggerFullSnapshot(){at.takeFullSnapshot(!0)}updateUserActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime();this._lastActivity=e}updateSessionActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime();this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}triggerUserActivity(){if(this.updateUserActivity(),!this._stopRecording)return this.loadSession({expiry:c}),void this.resume();this.checkAndHandleExpiredSession(),this.updateSessionActivity()}createCustomBreadcrumb(e){this.addUpdate((()=>{ut(this,{type:ie.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}addPerformanceEntries(){const e=[...this.performanceEvents];this.performanceEvents=[],lt(this,function(e){return e.map(gt).filter(Boolean)}(e))}checkAndHandleExpiredSession(){let{expiry:e=c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.id]);if(!this._lastActivity||!wt(this._lastActivity,l))return this.loadSession({expiry:e}),t===Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.id])||(this.triggerFullSnapshot(),!1);this.pause()}conditionalFlush(){"error"!==this.recordingMode&&this.flushImmediate()}clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[],this._context.earliestEvent=null}popEventContext(){this._context.earliestEvent&&this._context.earliestEvent<this._context.initialTimestamp&&(this._context.initialTimestamp=this._context.earliestEvent);const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds).filter(Boolean),traceIds:Array.from(this._context.traceIds).filter(Boolean),urls:this._context.urls};return this.clearContext(),e}async runFlush(){if(this.session&&(await this.addPerformanceEntries(),Object(d.a)([this,"access",e=>e.eventBuffer,"optionalAccess",e=>e.length]))){await function(e){try{lt(e,[createMemoryEntry(i.performance.memory)])}catch(t){}}(this);try{const e=await this.eventBuffer.finish(),t=this.session.id,n=this.popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await this.sendReplay({replayId:t,events:e,segmentId:r,includeReplayStartTimestamp:0===r,eventContext:n})}catch(e){this.handleException(e)}}}__init19(){this.flush=async()=>{if(this._isEnabled&&this.checkAndHandleExpiredSession()&&Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.id])){if(Object(d.a)([this,"access",e=>e._debouncedFlush,"optionalAccess",e=>e.cancel,"call",e=>e()]),!this._flushLock)return this._flushLock=this.runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(e){}finally{this._debouncedFlush()}}}}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}async sendReplayRequest(e){let{events:t,replayId:n,segmentId:i,includeReplayStartTimestamp:o,eventContext:c}=e;const u=function(e){let t,{events:n,headers:r}=e;const i=`${JSON.stringify(r)}\n`;if("string"===typeof n)t=`${i}${n}`;else{const e=(new TextEncoder).encode(i);t=new Uint8Array(e.length+n.length),t.set(e),t.set(n,e.length)}return t}({events:t,headers:{segment_id:i}}),{urls:l,errorIds:p,traceIds:f,initialTimestamp:h}=c,m=(new Date).getTime(),g=Object(r.b)(),v=g.getClient(),y=g.getScope(),b=v&&v.getTransport(),w=Object(d.a)([v,"optionalAccess",e=>e.getDsn,"call",e=>e()]);if(!v||!y||!b||!w)return;const S={type:a,...o?{replay_start_timestamp:h/1e3}:{},timestamp:m/1e3,error_ids:p,trace_ids:f,urls:l,replay_id:n,segment_id:i},C=await async function(e){let{client:t,scope:n,replayId:r,event:i}=e;const o=await t._prepareEvent(i,{event_id:r},n),a=t.getOptions()&&t.getOptions()._metadata,{name:s}=a&&a.sdk||{};return o.sdk={...o.sdk,version:"7.27.0",name:s},o}({scope:y,client:v,replayId:n,event:S});C.tags={...C.tags,sessionSampleRate:this._options.sessionSampleRate,errorSampleRate:this._options.errorSampleRate,replayType:Object(d.a)([this,"access",e=>e.session,"optionalAccess",e=>e.sampled])};const _=function(e,t,n,r){return Object(At.c)(Object(At.d)(e,Object(At.g)(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:t.length},t]])}(C,u,w,v.getOptions().tunnel);try{return b.send(_)}catch(O){throw new Error(s)}}resetRetries(){this._retryCount=0,this._retryInterval=5e3}async sendReplay(e){let{replayId:t,events:n,segmentId:r,includeReplayStartTimestamp:i,eventContext:o}=e;if(n.length)try{return await this.sendReplayRequest({events:n,replayId:t,segmentId:r,includeReplayStartTimestamp:i,eventContext:o}),this.resetRetries(),!0}catch(a){if(Object(f.f)("Replays",{_retryCount:this._retryCount}),this.handleException(a),this._retryCount>=3)throw new Error(`${s} - max retries exceeded`);return this._retryCount=this._retryCount+1,this._retryInterval=this._retryCount*this._retryInterval,await new Promise(((e,s)=>{setTimeout((async()=>{try{await this.sendReplay({replayId:t,events:n,segmentId:r,includeReplayStartTimestamp:i,eventContext:o}),e(!0)}catch(a){s(a)}}),this._retryInterval)}))}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ct(this.session)}}var Rt=n(936);function kt(){return"undefined"!==typeof window&&!Object(Rt.b)()}const Dt="img,image,svg,path,rect,area,video,object,picture,embed,map,audio";let Mt=!1;class Nt{static __initStatic(){this.id="Replay"}__init(){this.name=Nt.id}get _isInitialized(){return Mt}set _isInitialized(e){Mt=e}constructor(){let{flushMinDelay:e=5e3,flushMaxDelay:t=15e3,initialFlushDelay:n=5e3,stickySession:r=!0,useCompression:i=!0,sessionSampleRate:o,errorSampleRate:a,maskAllText:s=!0,maskAllInputs:c=!0,blockAllMedia:u=!0,_experiments:l={},blockClass:d="sentry-block",ignoreClass:p="sentry-ignore",maskTextClass:f="sentry-mask",blockSelector:h="[data-sentry-block]",...m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Nt.prototype.__init.call(this),this.recordingOptions={maskAllInputs:c,blockClass:d,ignoreClass:p,maskTextClass:f,blockSelector:h,...m},this.options={flushMinDelay:e,flushMaxDelay:t,stickySession:r,initialFlushDelay:n,sessionSampleRate:.1,errorSampleRate:1,useCompression:i,maskAllText:s,blockAllMedia:u,_experiments:l},"number"===typeof o&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${o} })`),this.options.sessionSampleRate=o),"number"===typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this.options.errorSampleRate=a),this.options.maskAllText&&(this.recordingOptions.maskTextSelector="body *:not(style,script)"),this.options.blockAllMedia&&(this.recordingOptions.blockSelector=this.recordingOptions.blockSelector?`${this.recordingOptions.blockSelector},${Dt}`:Dt),kt()&&this._isInitialized)throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}setupOnce(){kt()&&(this._setup(),setTimeout((()=>this.start())))}start(){this._replay&&this._replay.start()}stop(){this._replay&&this._replay.stop()}_setup(){this._loadReplayOptionsFromClient(),this._replay=new Pt({options:this.options,recordingOptions:this.recordingOptions})}_loadReplayOptionsFromClient(){const e=Object(r.b)().getClient(),t=e&&e.getOptions();t&&"number"===typeof t.replaysSessionSampleRate&&(this.options.sessionSampleRate=t.replaysSessionSampleRate),t&&"number"===typeof t.replaysOnErrorSampleRate&&(this.options.errorSampleRate=t.replaysOnErrorSampleRate)}}Nt.__initStatic()},function(e,t,n){"use strict";n.r(t),n.d(t,"RequestedHow",(function(){return r.e})),n.d(t,"PaneAnimates",(function(){return r.b})),n.d(t,"UIPaneContainer",(function(){return r.f})),n.d(t,"PaneProvider",(function(){return r.c})),n.d(t,"useShowBasePane",(function(){return r.l})),n.d(t,"useShowPane",(function(){return r.o})),n.d(t,"useShowDismissiblePane",(function(){return r.m})),n.d(t,"useShowModalPane",(function(){return r.n})),n.d(t,"useBasePane",(function(){return r.h})),n.d(t,"usePane",(function(){return r.k})),n.d(t,"useDismissiblePane",(function(){return r.i})),n.d(t,"useModalPane",(function(){return r.j})),n.d(t,"_PaneDispatcherContext",(function(){return r.g})),n.d(t,"LayerContext",(function(){return r.a})),n.d(t,"PaneType",(function(){return r.d})),n.d(t,"UITransitionContainer",(function(){return u})),n.d(t,"UIActivityIndicator",(function(){return m.a})),n.d(t,"UIOverlayActions",(function(){return g.a})),n.d(t,"UIButton",(function(){return v.a})),n.d(t,"UICheckbox",(function(){return y.a})),n.d(t,"UIColorWell",(function(){return I})),n.d(t,"UIFileButton",(function(){return M})),n.d(t,"UIImage",(function(){return N.b})),n.d(t,"ImageLoadErrorType",(function(){return N.a})),n.d(t,"UILabel",(function(){return x.a})),n.d(t,"LabelIdMessage",(function(){return L.e})),n.d(t,"ActivationStartedMessage",(function(){return L.d})),n.d(t,"ActivationEndedMessage",(function(){return L.c})),n.d(t,"ActivationCompletedMessage",(function(){return L.b})),n.d(t,"ActivationCancelledMessage",(function(){return L.a})),n.d(t,"UILabelMessageTransmitter",(function(){return j.a})),n.d(t,"SCROLLER_HEIGHT",(function(){return U.a})),n.d(t,"SCROLLER_HEIGHT_WITH_PADDING",(function(){return U.b})),n.d(t,"scrollMode",(function(){return U.k})),n.d(t,"UIMenuItem",(function(){return U.e})),n.d(t,"UIMenuLinkItem",(function(){return U.f})),n.d(t,"UIMenuDivider",(function(){return U.d})),n.d(t,"UIMenuScroller",(function(){return U.g})),n.d(t,"UIMenu",(function(){return U.c})),n.d(t,"isUIMenuItem",(function(){return U.j})),n.d(t,"isUIMenuDivider",(function(){return U.i})),n.d(t,"getFirstHighlightableChildIndex",(function(){return U.h})),n.d(t,"positionerDefaults",(function(){return F.f})),n.d(t,"makeUIPopoverPositioner",(function(){return F.e})),n.d(t,"UIPopoverPositioner",(function(){return F.d})),n.d(t,"ArrowDirection",(function(){return F.a})),n.d(t,"UIPopover",(function(){return F.c})),n.d(t,"PinPosition",(function(){return F.b})),n.d(t,"UIRadioButton",(function(){return z.a})),n.d(t,"UIRadioGroupContext",(function(){return B.b})),n.d(t,"UIRadioGroup",(function(){return B.a})),n.d(t,"UIScreenReaderOnlyContent",(function(){return K})),n.d(t,"UISegmentedControl",(function(){return q})),n.d(t,"UISegment",(function(){return V})),n.d(t,"UISlider",(function(){return G.a})),n.d(t,"UISplitContainer",(function(){return X})),n.d(t,"UISwitch",(function(){return te.a})),n.d(t,"UITextArea",(function(){return ne.a})),n.d(t,"browser",(function(){return re.b})),n.d(t,"UITextField",(function(){return re.a})),n.d(t,"_withDndProvider",(function(){return rt})),n.d(t,"UIAutocompleteTokenField",(function(){return ot})),n.d(t,"UIAutocompleteTokenFieldNoDndProviderComponent",(function(){return at})),n.d(t,"UIAutocompleteTokenFieldNoDndProvider",(function(){return st})),n.d(t,"_withLegacyMenuRendering",(function(){return ct})),n.d(t,"UIAutocompleteTokenFieldLegacyMenuComponent",(function(){return ut})),n.d(t,"UIAutocompleteTokenFieldLegacyMenu",(function(){return lt})),n.d(t,"isUIToken",(function(){return ft})),n.d(t,"UIToken",(function(){return Qe})),n.d(t,"useAutocompleteTextComponent",(function(){return Je.b})),n.d(t,"autocompleteReducer",(function(){return Je.a})),n.d(t,"UIToggleButton",(function(){return vt.a})),n.d(t,"UISelectButton",(function(){return yt.a})),n.d(t,"UISelectGroup",(function(){return yt.b})),n.d(t,"UISelectItem",(function(){return yt.c})),n.d(t,"useShowAlert",(function(){return bt.b})),n.d(t,"useAlert",(function(){return bt.a})),n.d(t,"useCard",(function(){return _.a})),n.d(t,"useShowCard",(function(){return _.b})),n.d(t,"usePopup",(function(){return wt.a})),n.d(t,"useShowPopup",(function(){return wt.b})),n.d(t,"UIComboBox",(function(){return St.a})),n.d(t,"filterItems",(function(){return St.b})),n.d(t,"useIsTouch",(function(){return D.b})),n.d(t,"useIsTouchClassName",(function(){return D.c})),n.d(t,"TouchClassNameWrapper",(function(){return D.a})),n.d(t,"readFileAsDataURL",(function(){return Ct.a})),n.d(t,"useResponsivePane",(function(){return _t.a})),n.d(t,"useLabel",(function(){return S.a}));var r=n(2257),i=n(870),o=n(1215),a=n.n(o),s=n(1250),c=n(1326);const u=Object.assign(i.forwardRef((function(e,t){const n=Object(s.a)();let r;void 0!==e.contentKey?r=e.contentKey:"object"===typeof e.children&&null!==e.children&&(r=e.children.key);const o=i.useCallback((()=>{var e;const t=g.current.incoming,r=g.current.transition;if(!t||!r)throw new Error("UITransitionContainer bad state: incoming frame transition finished, but no incoming frame or transition!");g.current={transition:r,incoming:void 0,atRest:t,outgoing:g.current.outgoing},void 0===g.current.outgoing&&(null===(e=u.current)||void 0===e||e.call(u)),n()}),[n]),a=i.useCallback((()=>{var e;if(!g.current.outgoing)throw new Error("UITransitionContainer bad state: outgoing frame finished, but no outgoing frame!");g.current.outgoing=void 0,void 0===g.current.incoming&&(null===(e=u.current)||void 0===e||e.call(u)),n()}),[n]),u=i.useRef(e.onTransitionEnd);i.useEffect((()=>{u.current=e.onTransitionEnd}),[e.onTransitionEnd]);const l=i.useMemo((()=>window.matchMedia("(prefers-reduced-motion)")),[]).matches,m=e.reducedMotionTransition||h,g=i.useRef({incoming:void 0,atRest:void 0===r?void 0:{key:r,children:e.children},outgoing:void 0,transition:l&&e.transition?m:e.transition}),v=g.current;let y,b,w,S,C=!1;v.incoming||v.atRest||void 0!==r?v.atRest&&r===v.atRest.key?(b={...v.atRest,children:e.children},S=v.transition,w=v.outgoing):v.incoming&&r===v.incoming.key?(y={key:r,children:e.children},S=v.transition,w=v.outgoing):v.incoming||v.outgoing?(y=v.incoming,b=v.atRest,S=v.transition,w=v.outgoing):(C=!0,S=l&&e.transition?m:e.transition,void 0!==r&&((null===S||void 0===S?void 0:S.incoming)?y={key:r,children:e.children}:b={key:r,children:e.children}),void 0!==v.atRest&&void 0!==(null===S||void 0===S?void 0:S.outgoing)&&(w={key:v.atRest.key,initialContent:i.createElement(f,{key:v.atRest.key,inert:d(S.inert),transitionProps:S.outgoing.from},v.atRest.children),destinationContent:i.createElement(f,{key:v.atRest.key,inert:d(S.inert),transitionProps:S.outgoing.to,onTransitionEnd:a},v.atRest.children)})):(b=void 0,y=void 0,w=v.outgoing),i.useLayoutEffect((()=>{g.current=y?{incoming:y,atRest:void 0,outgoing:w,transition:S}:b?{incoming:void 0,atRest:b,outgoing:w,transition:S}:{incoming:void 0,atRest:void 0,outgoing:w,transition:S}}),[y,b,w,S]),i.useEffect((()=>{C&&I.current&&(I.current.offsetHeight,n())}),[C,n]);let _=null;y?_=C?i.createElement(f,{key:y.key,inert:p(null===S||void 0===S?void 0:S.inert),transitionProps:S.incoming.from},y.children):i.createElement(f,{key:y.key,inert:p(null===S||void 0===S?void 0:S.inert),transitionProps:S.incoming.to,onTransitionEnd:o},y.children):b&&(_=i.createElement(f,{key:b.key,transitionProps:null===S||void 0===S?void 0:S.atRest},b.children));let O=null;w&&(O=C?w.initialContent:w.destinationContent);const E="new content in front"===((null===S||void 0===S?void 0:S.zOrder)||"new content in front"),I=i.useRef(null),A=Object(c.a)(t,I);return i.createElement("ui-transition-container",{style:e.style,class:e.className,ref:A},E?O:null,_,E?null:O)})),{helpers:{cssTransition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{initialState:t="initial-state",incomingTransition:n="incoming-transition",restState:r="rest-state",outgoingTransition:i="outgoing-transition",finalState:o="final-state",inert:s,zOrder:c}=e;return{incoming:{from:{className:t},to:{className:a()(n,r)}},atRest:{className:r},outgoing:{from:{className:a()(i,r)},to:{className:a()(i,o)}},inert:s,zOrder:c,[l]:!0}},styleTransition(e){let{initialState:t,incomingTransition:n,restState:r,outgoingTransition:i,finalState:o,inert:a,zOrder:s}=e;return n="string"===typeof n?{transition:n}:n,i="string"===typeof i?{transition:i}:i,{incoming:{from:{style:t},to:{style:{...r,...n}}},atRest:{style:r},outgoing:{from:{style:{...r,...i}},to:{style:{...o,...i}}},inert:a,zOrder:s,[l]:!0}},cssAnimation(e){let{incoming:t,atRest:n,outgoing:r,inert:i,zOrder:o}=e;return{incoming:{from:{className:t},to:{className:t}},atRest:n?{className:n}:void 0,outgoing:{from:{className:r},to:{className:r}},inert:i,zOrder:o,[l]:!0}}}}),l=Symbol("private UITransitionContainer symbol used to ensure the transition type, which is easy to misuse, and may change, stays internal.");function d(e){switch(e){case"incoming":case"neither":return!1;case"outgoing":case"incoming and outgoing":case void 0:return!0}}function p(e){switch(e){case"outgoing":case"neither":case void 0:return!1;case"incoming":case"incoming and outgoing":return!0}}function f(e){let{children:t,transitionProps:n,inert:r,onTransitionEnd:o}=e;const a=i.useRef(null),s=i.useCallback((e=>{o&&e.target===a.current&&o()}),[o]),c=null===n||void 0===n?void 0:n.className,u=null===n||void 0===n?void 0:n.style,l=r?"true":void 0;return i.createElement("ui-content",{ref:a,class:c,style:u,inert:l,onTransitionEnd:s,onAnimationEnd:s},t)}const h=u.helpers.styleTransition({initialState:{opacity:0},incomingTransition:"opacity 0.2s ease-in-out",restState:{opacity:1},outgoingTransition:"opacity 0.2s ease-in-out",finalState:{opacity:0}});var m=n(2262),g=n(2268),v=n(2259),y=n(2222),b=n(1229);function w(e,t,n,r){return void 0===r&&(r=1),{r:e,g:t,b:n,a:r}}var S=n(1221),C=n(1225),_=n(2258),O=n(1469),E=n(2196);const I=i.forwardRef((function(e,t){let{variant:n,id:o,className:a,style:s,disabled:u,color:l,initialColor:d,onColorChange:p,onColorPickerClose:f,ariaLabel:h,colorPickerTitle:m,colorPickerDoneButtonTitle:g,ariaClosePaneDescription:y,accessibilityDescriptionForColor:O,tooltip:I}=e;var T;const[P,k]=i.useState(null!==(T=null!==d&&void 0!==d?d:l)&&void 0!==T?T:w(0,0,0));l=null!==l&&void 0!==l?l:P;const D=e=>{p(e),k(e)},M=i.useRef(null),N="color-picker-title",[x,L]=Object(_.a)(i.createElement(i.Fragment,null,i.createElement("header",null,i.createElement("h1",{id:N},m),i.createElement(v.a,{className:"done-button",onActivate:()=>L()},g)),i.createElement(A,{color:l,onColorChange:D,_temp_onComplete:()=>L(),accessibilityDescriptionForColor:O})),{className:"color-well-pane",paneType:r.d.Dismissible,ariaClosePaneDescription:y,ariaLabelledBy:N,initialFocus:"ui-color-grid",onClose:()=>{f&&f()}}),[j,U]=Object(r.i)(i.createElement(E.b,{className:"color-well-pane",anchorRef:M},i.createElement(A,{color:l,onColorChange:D,_temp_onComplete:()=>U(),accessibilityDescriptionForColor:O,ariaLabel:m})),{initialFocus:"ui-color-grid",onClose:()=>{f&&f()}}),F="compact"===Object(b.d)()?"card":"popover",[z,B]=i.useState(!1),K=()=>{!0!==u&&B(!0)},H=()=>{!0!==u&&B(!1)},W=()=>{if(!0!==u)return"card"===F?x():j()},q=()=>{!0!==u&&B(!1)},V=Object(S.a)(o,{onActivationStart:K,onActivationEnd:H,onActivationComplete:W,onActivationCancel:q}),$=Object(C.a)({active:z,disabled:u,className:a,onActivate:W,onActivationStart:K,onActivationEnd:H,onActivationCancel:q,variant:n||"standard"}),G=null!==l&&void 0!==l?l:w(0,0,0);return i.createElement("ui-color-well",Object.assign({},$,{role:"button","aria-label":`${O(G)}, ${h}`,"aria-labelledby":h?void 0:V,"aria-haspopup":"listbox",style:s,id:o,ref:Object(c.a)(t,M),title:I}),i.createElement("svg",Object.assign({},{width:"28px",height:"28px",viewBox:"0 0 28 28"},{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"}),i.createElement("defs",null,i.createElement("clipPath",{id:"ring"},i.createElement("path",{d:"M14,0 C21.7319865,0 28,6.2680135 28,14 C28,21.7319865 21.7319865,28 14,28 C6.2680135,28 0,21.7319865 0,14 C0,6.2680135 6.2680135,0 14,0 Z M14,2.91557529 C7.87824127,2.91557529 2.91557529,7.87824127 2.91557529,14 C2.91557529,20.1217587 7.87824127,25.0844247 14,25.0844247 C20.1217587,25.0844247 25.0844247,20.1217587 25.0844247,14 C25.0844247,7.87824127 20.1217587,2.91557529 14,2.91557529 Z"}))),i.createElement("image",{clipPath:"url(#ring)",xlinkHref:"data:image/png;base64, ",width:"28",height:"28",x:"0",y:"0"}),i.createElement("circle",{cx:"14",cy:"14",r:"9",fill:R(G)})))})),A=i.forwardRef((function(e,t){let{variant:n,id:r,className:o,ariaLabel:s,ariaDescribedBy:c,style:u,color:l,initialColor:d,onColorChange:p,_temp_onComplete:f,accessibilityDescriptionForColor:h}=e;const[m,g]=i.useState(d);function v(e){p&&p(e),g(e)}function y(e,t){return!!t&&e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}l=null!==l&&void 0!==l?l:m;let b=0,w=0;P.forEach(((e,t)=>{e.forEach(((e,n)=>{y(e,l)&&(b=t,w=n)}))}));const[S]=i.useState((()=>r||"uicolorgrid"+T++));function C(e){const{r:t,g:n,b:r,a:i}=e;return`${S}-${t}-${r}-${n}-${i}`}function _(e){if("UI-COLOR-GRID-CELL"!==e.tagName)return null;const t=Number(e.getAttribute("data-row-index")),n=Number(e.getAttribute("data-column-index"));return P[t][n]}const E=i.useRef(!1);function I(e){e.preventDefault(),e.stopPropagation(),E.current=!0;const t=_(e.target);t&&v(t)}function A(e){e.preventDefault(),e.stopPropagation(),E.current=!1}return i.createElement("ui-color-grid",{id:r,style:u,class:a()(n||"standard",o),"aria-label":s,"aria-describedby":c,ref:t,role:"listbox","aria-activedescendant":l?C(l):void 0,tabindex:"0",onKeyDown:e=>{const{key:t,metaKey:n,ctrlKey:r}=e,i=/mac/i.test(navigator.platform)?n:r;if(" "===t||"Enter"===t)return e.preventDefault(),e.stopPropagation(),void(f&&f());let o;switch(t){case"ArrowLeft":o=i?"beginning":"left";break;case"ArrowRight":o=i?"end":"right";break;case"ArrowUp":o=i?"top":"up";break;case"ArrowDown":o=i?"bottom":"down";break;case"Home":o=i?"very beginning":"beginning";break;case"End":o=i?"very end":"end";break;default:return}let a=b,s=w;switch(o){case"top":a=0;break;case"bottom":a=P.length-1;break;case"up":a-=1;break;case"down":a+=1;break;case"beginning":s=0;break;case"end":s=P[0].length-1;break;case"left":s-=1;break;case"right":s+=1;break;case"very beginning":a=0,s=0;break;case"very end":a=P.length-1,s=P[0].length-1}const c=P[a];if(c){const e=c[s];e&&v(e)}e.preventDefault(),e.stopPropagation()},onMouseDown:I,onTouchStart:I,onMouseMove:function(e){if(E.current){e.preventDefault(),e.stopPropagation();const t=_(e.target);t&&v(t)}},onTouchMove:function(e){if(E.current){e.preventDefault(),e.stopPropagation();const t=Object(O.a)(e);if(t){const e=_(t);e&&v(e)}}},onMouseUp:A,onTouchEnd:A},P.map(((e,t)=>i.createElement("div",{className:"color-grid-row",key:`matrix-row-${t}`},e.map(((e,n)=>i.createElement("ui-color-grid-cell",{key:`color-${k(e)}`,role:"option",id:C(e),"aria-label":h(e),"aria-selected":y(e,l)?"true":void 0,"data-row-index":t,"data-column-index":n,style:{backgroundColor:R(e)},onChange:()=>{}})))))))}));let T=0;const P=[[w(255,255,255),w(235,235,235),w(214,214,214),w(194,194,194),w(173,173,173),w(153,153,153),w(133,133,133),w(112,112,112),w(92,92,92),w(71,71,71),w(51,51,51),w(0,0,0)],[w(0,55,74),w(1,29,87),w(17,5,59),w(46,6,61),w(60,7,27),w(92,7,1),w(90,28,0),w(88,51,0),w(86,61,0),w(102,97,0),w(79,85,4),w(38,62,15)],[w(0,77,101),w(1,47,123),w(26,10,82),w(69,13,89),w(85,16,41),w(131,17,0),w(123,41,0),w(122,74,0),w(120,88,0),w(141,134,2),w(111,118,10),w(56,87,26)],[w(1,110,143),w(0,66,169),w(44,9,119),w(97,24,124),w(121,26,61),w(181,26,0),w(173,62,0),w(169,104,0),w(166,123,1),w(196,188,0),w(155,165,14),w(78,122,39)],[w(0,140,180),w(0,86,214),w(55,26,148),w(122,33,158),w(153,36,79),w(226,36,0),w(218,81,0),w(211,131,1),w(209,157,1),w(245,236,0),w(195,209,23),w(102,157,52)],[w(0,161,216),w(0,97,254),w(77,34,178),w(152,42,188),w(185,45,93),w(255,64,21),w(255,106,0),w(255,171,1),w(253,199,0),w(254,251,65),w(217,236,55),w(118,187,64)],[w(1,199,252),w(58,135,254),w(94,48,235),w(190,56,243),w(230,59,122),w(255,98,80),w(255,134,72),w(254,180,63),w(254,203,62),w(255,247,107),w(228,239,101),w(150,211,95)],[w(82,214,252),w(116,167,255),w(134,79,254),w(211,87,254),w(238,113,158),w(255,140,130),w(255,165,125),w(255,199,119),w(255,217,119),w(255,249,148),w(234,242,143),w(177,221,139)],[w(147,227,253),w(167,198,255),w(177,140,254),w(226,146,254),w(244,164,192),w(255,181,175),w(255,197,171),w(255,217,168),w(254,228,168),w(255,251,185),w(242,247,183),w(205,232,181)],[w(203,240,255),w(211,226,255),w(217,201,254),w(239,202,255),w(249,211,224),w(255,219,216),w(255,226,214),w(255,236,212),w(255,242,213),w(254,252,221),w(247,250,219),w(223,238,212)]];function R(e){const{r:t,g:n,b:r,a:i}=e;return 1!==i?`rgba(${t}, ${n}, ${r}, ${i})`:`rgb(${t}, ${n}, ${r})`}function k(e){const{r:t,g:n,b:r}=e;return"#"+[t,n,r].map((e=>`0${e.toString(16)}`.slice(-2))).join("").toUpperCase()}var D=n(1212);const M=i.forwardRef((function(e,t){let{children:n,variant:r,id:o,className:s,ariaLabel:c,style:u,form:l,name:d,disabled:p,onChange:f,accept:h,capture:m,multiple:g,tooltip:v}=e;const[y,b]=i.useState(!1),w=i.useRef(null),_=()=>{!0!==p&&b(!0)},O=()=>{!0!==p&&b(!1)},E=()=>{!0!==p&&w.current.click()},I=()=>{!0!==p&&b(!1)},A=Object(S.a)(o,{onActivationStart:_,onActivationEnd:O,onActivationComplete:E,onActivationCancel:I}),T=Object(C.a)({active:y,disabled:p,name:d,className:a()(s,Object(D.c)()),onActivate:E,onActivationStart:_,onActivationEnd:O,onActivationCancel:I,variant:r||"push primary"});return i.createElement("ui-file-button",Object.assign({},T,{role:"button","aria-label":c,"aria-labelledby":c?void 0:A,style:u,id:o,ref:t,title:v}),i.createElement("input",{type:"file",ref:w,disabled:p,tabIndex:-1,name:d,form:l,accept:h,capture:m,multiple:g,onChange:f}),n)}));var N=n(2271),x=n(2260),L=n(1222),j=n(1224),U=n(2221),F=n(1485),z=n(2223),B=n(1492);const K=e=>{let{children:t,hidden:n}=e;return i.createElement("ui-screen-reader-only-content",{role:"presentation",hidden:!!n||void 0},t)};K.displayName="UIScreenReaderOnlyContent";var H=n(1219),W=n(1493);const q=i.forwardRef((function(e,t){const{id:n,style:r,className:o,variant:s,value:u,initialValue:l,disabled:d,ariaLabel:p,ariaDescribedBy:f,onValueChanged:h}=e;void 0!==u&&void 0===h&&console.warn("You provided a `value` prop to a component without an associated change handler. This will render a read-only component. Either provide `onValueChanged` to respond to and update `value`, or switch to `initialValue`."),void 0!==u&&void 0!==l&&console.warn("Cannot render UISegmentedControl with both a `value` and an `initialValue`.");const m=i.Children.toArray(e.children);!function(e){if(!Array.isArray(e))throw new Error("UISegmentedControl children must be an array");const t=new Set;i.Children.forEach(e,(e=>{if(n=e,!Object(H.a)(n)||n.type!==V)throw new Error("UISegmentedControl must have children of type UISegment");var n;if(t.has(e.props.value))throw new Error(`UISegmentedControl must have children, each having a unique value property. Found duplicate:${e.props.value}`);t.add(e.props.value)}))}(m);const g=i.useRef(null),[v,y]=i.useState(l),b=void 0!==u?u:v,w=[];function C(e){if(!g.current)return;const t=Array.from(g.current.children),n=t.find((e=>"true"===e.getAttribute("aria-checked")&&!e.hasAttribute("aria-disabled")));if(n&&n instanceof HTMLElement)return void n.focus(e);const r=t.find((e=>!e.hasAttribute("aria-disabled")));r&&r instanceof HTMLElement&&r.focus(e)}const _=i.useRef(!1);i.useLayoutEffect((()=>{_.current&&(C(),_.current=!1)}),[b]),i.useLayoutEffect((()=>{g.current.focus=e=>C(e)}),[]);const O=e=>{void 0!==e&&(_.current=null!==g.current&&g.current.contains(document.activeElement),h&&h(e),y(e))},E=Object(S.a)(n,{onActivationComplete(){C()}}),I=Object(D.c)();return i.createElement($.Provider,{value:{onItemActivated:O,currentValue:b,disabled:d}},i.createElement("ui-segmented-control",{id:n,style:r,class:a()(s||"standard",o,I),"aria-disabled":d?"true":void 0,"aria-labelledby":p?void 0:E,"aria-label":p,"aria-describedby":f,role:"radiogroup",ref:Object(c.a)(t,g),onKeyDown:e=>{if(d||!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key))return;e.preventDefault();const t=!!g.current&&Object(W.a)(g.current),n={ArrowDown:"next",ArrowUp:"previous",ArrowLeft:t?"next":"previous",ArrowRight:t?"previous":"next"}[e.key],r=w.length-1;if("previous"===n)if(void 0===b)r>0&&O(w[r]);else{const e=w.indexOf(b);O(0===e?w[r]:w[e-1])}else if("next"===n)if(void 0===b)r>0&&O(w[1]);else{const e=w.indexOf(b);O(e===r?w[0]:w[e+1])}}},(()=>{const t=m.find((e=>e.props.value===b)),n=null===t||void 0===t?void 0:t.props.disabled;let r;const o=e.hasOwnProperty("tabIndex")?e.tabIndex:0;return i.Children.map(m,(a=>{const s=e.disabled||a.props.disabled;if(!s){const e=a.props.value;w.push(e),r||(r=a)}let c=!1;return a!==t||s?t&&n&&a===r?c=!0:t||a!==r||(c=!0):c=!0,i.cloneElement(a,{tabIndex:c?o:void 0,disabled:s})}))})()))})),V=i.forwardRef((function(e,t){let{children:n,disabled:r,className:o,id:a,tabIndex:s,ariaLabel:c,style:u,tooltip:l,value:d}=e;const p=i.useContext($);if(void 0===p)throw new Error("UISegment must be rendered inside a UISegmentedControl.");const{onItemActivated:f,currentValue:h,disabled:m}=p,g=h===d,v=Object(C.a)({disabled:r,className:o,...s&&0===s?{tabIndex:s}:{},onActivate:()=>f(d)});return i.createElement("ui-segment",Object.assign({},v,{role:"radio","data-focusyn":"block",id:a,"aria-checked":g?"true":"false","aria-disabled":r||m?"true":void 0,"aria-label":c,ref:t,style:u,tabindex:s,title:l}),i.createElement("div",{className:"content-wrapper"},n))})),$=i.createContext(void 0);var G=n(2274),Z=n(1491),Q=n(873);function Y(e,t){if(null==t)return null;let n=null;for(let r=0;r<e.changedTouches.length;r++)if(e.changedTouches[r].identifier===t){n=e.changedTouches[r];break}return n}const J=132;function X(e){if(Array.isArray(e.children)&&(e.children.length<1||e.children.length>2))throw new Error("UISplitContainer needs either one child or two children.");const t=Object(Z.a)(e.primaryMinSize,0),n=Object(Z.a)(e.collapsible,!0)&&t>0;let[r,o]=i.useState(Object(Z.a)(e.primarySize,Object(Z.a)(e.initialPrimarySize,Object(Z.a)(e.primaryMinSize,Math.min(J,Object(Z.a)(e.primaryMaxSize,1/0))))));const[s,c]=i.useState(!1),u=i.useRef(0),l=i.useRef(0),d=null==e.resizable||e.resizable,p=function(e){const t=Object(i.useRef)(e);t.current=e;const n=Object(i.useRef)(null),r=Object(i.useCallback)((e=>{e.preventDefault();const n={pageX:0,pageY:0};let r;if("touchstart"===e.type){const t=e.changedTouches[0];r=t.identifier,n.pageX=t.pageX,n.pageY=t.pageY}else n.pageX=e.pageX,n.pageY=e.pageY;Object(Q.unstable_batchedUpdates)((()=>{null!=t.current.pointerDown&&t.current.pointerDown(n)}));const i=e=>{const n={pageX:0,pageY:0};if("touchmove"===e.type){const t=Y(e,r);if(null==t)return;n.pageX=t.pageX,n.pageY=t.pageY}else n.pageX=e.pageX,n.pageY=e.pageY;e.preventDefault(),Object(Q.unstable_batchedUpdates)((()=>{null!=t.current.pointerMove&&t.current.pointerMove(n)}))},o=e=>{const n={pageX:0,pageY:0};if("touchmove"===e.type){const t=Y(e,r);if(null==t)return;n.pageX=t.pageX,n.pageY=t.pageY}else n.pageX=e.pageX,n.pageY=e.pageY;e.preventDefault(),Object(Q.unstable_batchedUpdates)((()=>{null!=t.current.pointerUp&&t.current.pointerUp(n)})),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",o),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",o)};window.addEventListener("touchmove",i,{passive:!1}),window.addEventListener("touchend",o),window.addEventListener("mousemove",i),window.addEventListener("mouseup",o)}),[]);return Object(i.useCallback)((e=>{if(e===n.current)return;null!=e&&(e.addEventListener("touchstart",r,{passive:!1}),e.addEventListener("mousedown",r));const t=n.current;null!=t&&(t.removeEventListener("touchstart",r),t.removeEventListener("mousedown",r)),n.current=e}),[r])}({pointerDown:t=>{null!=e.onDividerDragStart&&(null!=e.primarySize?e.onDividerDragStart(e.primarySize):e.onDividerDragStart(r)),u.current=e.vertical?t.pageY:t.pageX,l.current=r,c(!0)},pointerMove:r=>{const i=e.vertical?r.pageY:r.pageX;if(null!=e.onDividerDrag&&null!=e.primarySize){const r=i-u.current,o=ee(e.primarySize,t,e.primaryMaxSize,n);e.onDividerDrag(o.value,r)}else{const r=i-u.current,a=ee(l.current+r,t,e.primaryMaxSize,n);null!=e.onDividerDrag&&e.onDividerDrag(a.value,r),o(a.value)}},pointerUp:t=>{e.onDividerDragStop&&(null!=e.primarySize?e.onDividerDragStop(e.primarySize):e.onDividerDragStop(r)),c(!1)}});let f=!1;if(null!=e.primarySize){const i=ee(e.primarySize,t,e.primaryMaxSize,n);r=i.value,f=i.collapsed}else f=n&&r<t/2;const h=a()(e.className,Object(Z.a)(e.variant,"standard"));let m,g;s&&(m=null!=e.splitDividerState?"min"===e.splitDividerState?"ui-component-dragging-min":"max"===e.splitDividerState?"ui-component-dragging-max":"ui-component-dragging":n||r!==t?r===e.primaryMaxSize?"ui-component-dragging-max":"ui-component-dragging":"ui-component-dragging-min"),d||(g="ui-component-not-resizable");let v,y="ui-component-hover";null!=e.splitDividerState?"min"===e.splitDividerState?y="ui-component-hover-min":"max"===e.splitDividerState&&(y="ui-component-hover-max"):n||r!==t?r===e.primaryMaxSize&&(y="ui-component-hover-max"):y="ui-component-hover-min",Array.isArray(e.children)&&e.children.length>1&&e.children[1]&&(v=i.createElement(i.Fragment,null,!f&&i.createElement("ui-split-divider",{ref:d?p:void 0,class:y,role:"separator",style:{[e.vertical?"top":"left"]:r},"aria-disabled":!d}),i.createElement("ui-split",null,e.children[1])));const b=Array.isArray(e.children)?e.children[0]:e.children;return i.createElement("ui-split-container",{class:a()(h,m,g),style:e.style,"aria-orientation":e.vertical?"vertical":"horizontal"},!f&&i.createElement("ui-split",{style:{[e.vertical?"height":"width"]:r}},b),v)}function ee(e,t,n,r){if(r&&void 0!==t&&e<t/2)return{value:0,collapsed:!0};const i=function(e,t,n){return void 0!==n&&(e=Math.min(e,n)),void 0!==t?Math.max(e,t):Math.max(e,0)}(e,t,n);return{value:i,collapsed:0===i}}var te=n(2275),ne=n(2276),re=n(1498),ie=n(1500),oe="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;function ae(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 o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<o.length;c++){var u=o[c];if(!s(u))return!1;var l=e[u],d=t[u];if(!1===(i=n?n.call(r,l,d,u):void 0)||void 0===i&&l!==d)return!1}return!0}function se(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 ce(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 ue(e,t,n){var r,o,a=function(e,t,n){var r,o,a=(r=Object(i.useState)((function(){return t(e)})),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(r,o)||function(e,t){if(e){if("string"===typeof e)return se(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)?se(e,t):void 0}}(r,o)||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.")}()),s=a[0],c=a[1],u=Object(i.useCallback)((function(){var r=t(e);ae(s,r)||(c(r),n&&n())}),[s,e,n]);return oe(u,[]),[s,u]}(e,t,n),s=(o=2,function(e){if(Array.isArray(e))return e}(r=a)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(r,o)||function(e,t){if(e){if("string"===typeof e)return ce(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)?ce(e,t):void 0}}(r,o)||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.")}()),c=s[0],u=s[1];return oe((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(u,{handlerIds:[t]})}),[e,u]),c}var le=n(2142);function de(){var e=Object(i.useContext)(le.a).dragDropManager;return Object(ie.a)(null!=e,"Expected drag drop context"),e}function pe(e,t){"function"===typeof e?e(t):e.current=t}function fe(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=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(i.isValidElement)(t)){var r=t;return e(r,n),r}var o=t;!function(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.")}}(o);var a=n?function(t){return e(t,n)}:e;return function(e,t){var n=e.ref;return Object(ie.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(i.cloneElement)(e,{ref:function(e){pe(n,e),pe(t,e)}}):Object(i.cloneElement)(e,{ref:t})}(o,a)}}(r);t[n]=function(){return o}}})),t}function he(e){return he="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},he(e)}function me(e){return null!==e&&"object"===he(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function ge(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 ve=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=fe({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,me(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;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!ae(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}}])&&ge(t.prototype,n),e}();function ye(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 be=!1,we=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;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(ie.a)(!be,"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 be=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{be=!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()}}])&&ye(t.prototype,n),e}();function Se(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 Ce(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 _e(e){var t=Object(i.useRef)(e);t.current=e,Object(ie.a)(null!=e.accept,"accept must be defined");var n,r,o=(n=function(){var e=de();return[Object(i.useMemo)((function(){return new we(e)}),[e]),Object(i.useMemo)((function(){return new ve(e.getBackend())}),[e])]}(),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(n,r)||function(e,t){if(e){if("string"===typeof e)return Ce(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)?Ce(e,t):void 0}}(n,r)||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.")}()),a=o[0],s=o[1];!function(e,t,n){var r=de(),o=Object(i.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]);oe((function(){var i=function(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}(e.current.accept,o,r),a=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,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"===typeof e)return Se(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)?Se(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.")}()}(i,2),s=a[0],c=a[1];return t.receiveHandlerId(s),n.receiveHandlerId(s),c}),[t,n])}(t,a,s);var c=ue(a,t.current.collect||function(){return{}},(function(){return s.reconnect()})),u=Object(i.useMemo)((function(){return s.hooks.dropTarget()}),[s]);return oe((function(){s.dropTargetOptions=e.options||null,s.reconnect()}),[e.options]),[c,u]}function Oe(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 Ee=!1,Ie=!1,Ae=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;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Object(ie.a)(!Ee,"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 Ee=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ee=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Object(ie.a)(!Ie,"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 Ie=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ie=!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()}}])&&Oe(t.prototype,n),e}();function Te(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=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=fe({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,me(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,me(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;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!ae(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ae(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}}])&&Te(t.prototype,n),e}();function Re(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 ke(e){return ke="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},ke(e)}function De(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 Me(e){var t=Object(i.useRef)(e);t.current=e,Object(ie.a)(null!=e.item,"item must be defined"),Object(ie.a)(null!=e.item.type,"item type must be defined");var n,r,o=(n=function(){var e=de();return[Object(i.useMemo)((function(){return new Ae(e)}),[e]),Object(i.useMemo)((function(){return new Pe(e.getBackend())}),[e])]}(),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(n,r)||function(e,t){if(e){if("string"===typeof e)return De(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)?De(e,t):void 0}}(n,r)||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.")}()),a=o[0],s=o[1];!function(e,t,n){var r=de(),o=Object(i.useMemo)((function(){return{beginDrag:function(){var n=e.current,r=n.begin,i=n.item;if(r){var o=r(t);return Object(ie.a)(null==o||"object"===ke(o),"dragSpec.begin() must either return an object, undefined, or null"),o||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()}}}),[]);oe((function(){var i=function(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}(e.current.item.type,o,r),a=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,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"===typeof e)return Re(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)?Re(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.")}()}(i,2),s=a[0],c=a[1];return t.receiveHandlerId(s),n.receiveHandlerId(s),c}),[])}(t,a,s);var c=ue(a,t.current.collect||function(){return{}},(function(){return s.reconnect()})),u=Object(i.useMemo)((function(){return s.hooks.dragSource()}),[s]),l=Object(i.useMemo)((function(){return s.hooks.dragPreview()}),[s]);return oe((function(){s.dragSourceOptions=t.current.options||null,s.reconnect()}),[s]),oe((function(){s.dragPreviewOptions=t.current.previewOptions||null,s.reconnect()}),[s]),[c,u,l]}var Ne,xe=n(1509),Le=n(1468);!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(Ne||(Ne={}));function je(e){return void 0===e.button||0===e.button}function Ue(e){return!!e.targetTouches}function Fe(e,t){return Ue(e)?function(e,t){return 1===e.targetTouches.length?Fe(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?Fe(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var ze=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(t){}return e}();function Be(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 Ke,He=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.enableTouchEvents=!0,this.enableMouseEvents=!1,this.enableKeyboardEvents=!1,this.ignoreContextMenu=!1,this.enableHoverOutsideTarget=!1,this.touchSlop=0,this.scrollAngleRanges=void 0,this.context=n,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach((function(e){null!=t[e]&&(r[e]=t[e])}))}var t,n;return t=e,(n=[{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!==typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&Be(t.prototype,n),e}();function We(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 qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=(qe(Ke={},Ne.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),qe(Ke,Ne.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),qe(Ke,Ne.keyboard,{keydown:"keydown"}),Ke),$e=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getSourceClientOffset=function(e){var t=i.sourceNodes.get(e);return t&&function(e){var t=1===e.nodeType?e:e.parentElement;if(t){var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}}(t)},this.handleTopMoveStartCapture=function(e){je(e)&&(i.moveStartSourceIds=[])},this.handleMoveStart=function(e){Array.isArray(i.moveStartSourceIds)&&i.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=function(e){if(je(e)){var t=Fe(e);t&&(Ue(e)&&(i.lastTargetTouchFallback=e.targetTouches[0]),i._mouseClientOffset=t),i.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(e){if(je(e)){var t=e.type===Ve.touch.start?i.options.delayTouchStart:i.options.delayMouseStart;i.timeout=setTimeout(i.handleTopMoveStart.bind(i,e),t),i.waitingForDelay=!0}},this.handleTopMoveCapture=function(){i.dragOverTargetIds=[]},this.handleMove=function(e,t){i.dragOverTargetIds&&i.dragOverTargetIds.unshift(t)},this.handleTopMove=function(e){if(i.timeout&&clearTimeout(i.timeout),i.document&&!i.waitingForDelay){var t,n,r,o,a=i.moveStartSourceIds,s=i.dragOverTargetIds,c=i.options.enableHoverOutsideTarget,u=Fe(e,i.lastTargetTouchFallback);if(u)if(i._isScrolling||!i.monitor.isDragging()&&function(e,t,n,r,i){if(!i)return!1;for(var o=180*Math.atan2(r-t,n-e)/Math.PI+180,a=0;a<i.length;++a)if((null==i[a].start||o>=i[a].start)&&(null==i[a].end||o<=i[a].end))return!0;return!1}(i._mouseClientOffset.x||0,i._mouseClientOffset.y||0,u.x,u.y,i.options.scrollAngleRanges))i._isScrolling=!0;else if(!i.monitor.isDragging()&&i._mouseClientOffset.hasOwnProperty("x")&&a&&(t=i._mouseClientOffset.x||0,n=i._mouseClientOffset.y||0,r=u.x,o=u.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(o-n),2))>(i.options.touchSlop?i.options.touchSlop:0))&&(i.moveStartSourceIds=void 0,i.actions.beginDrag(a,{clientOffset:i._mouseClientOffset,getSourceClientOffset:i.getSourceClientOffset,publishSource:!1})),i.monitor.isDragging()){var l=i.sourceNodes.get(i.monitor.getSourceId());i.installSourceNodeRemovalObserver(l),i.actions.publishDragSource(),e.cancelable&&e.preventDefault();var d=(s||[]).map((function(e){return i.targetNodes.get(e)})).filter((function(e){return!!e})),p=i.options.getDropTargetElementsAtPoint?i.options.getDropTargetElementsAtPoint(u.x,u.y,d):i.document.elementsFromPoint(u.x,u.y),f=[];for(var h in p)if(p.hasOwnProperty(h)){var m=p[h];for(f.push(m);m;)(m=m.parentElement)&&-1===f.indexOf(m)&&f.push(m)}var g=f.filter((function(e){return d.indexOf(e)>-1})).map((function(e){return i._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var v in i.targetNodes){var y=i.targetNodes.get(v);if(l&&y&&y.contains(l)&&-1===g.indexOf(v)){g.unshift(v);break}}g.reverse(),i.actions.hover(g,{clientOffset:u})}}},this._getDropTargetId=function(e){for(var t=i.targetNodes.keys(),n=t.next();!1===n.done;){var r=n.value;if(e===i.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=function(e){i._isScrolling=!1,i.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0===(1&e.buttons)}(e)&&(i.monitor.isDragging()&&!i.monitor.didDrop()?(e.cancelable&&e.preventDefault(),i._mouseClientOffset={},i.uninstallSourceNodeRemovalObserver(),i.actions.drop(),i.actions.endDrag()):i.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&i.monitor.isDragging()&&(i._mouseClientOffset={},i.uninstallSourceNodeRemovalObserver(),i.actions.endDrag())},this.options=new He(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Ne.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Ne.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Ne.keyboard)}var t,n;return t=e,(n=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"setup",value:function(){this.window&&(Object(ie.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.window,"start",this.getTopMoveStartHandler()),this.addEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.window,"move",this.handleTopMove),this.addEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.window,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.window&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.window,"start",this.handleTopMoveStart),this.removeEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.window,"move",this.handleTopMove),this.removeEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.window,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var i=ze?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var o=Ve[r][t];o&&e.addEventListener(o,n,i)}))}},{key:"removeEventListener",value:function(e,t,n,r){var i=ze?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var o=Ve[r][t];o&&e.removeEventListener(o,n,i)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",r),function(){n.sourceNodes.delete(e),n.removeEventListener(t,"start",r)}}},{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:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){};var r=function(r){if(n.document&&n.monitor.isDragging()){var i;switch(r.type){case Ve.mouse.move:i={x:r.clientX,y:r.clientY};break;case Ve.touch.move:i={x:r.touches[0].clientX,y:r.touches[0].clientY}}var o=null!=i?n.document.elementFromPoint(i.x,i.y):void 0,a=o&&t.contains(o);return o===t||a?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),function(){n.document&&(n.targetNodes.delete(e),n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&We(t.prototype,n),e}(),Ge=function(e){return new $e(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})},Ze=n(1340);const Qe=i.forwardRef((function(e,t){const{index:n,variant:r="standard",id:o,className:s,style:c={},isSelected:u,editingTokenLeft:l,editingTokenRight:d,selectionIndicatorDragBegin:p,selectionIndicatorDragEnd:f,selectionIndicatorLeft:h,selectionIndicatorRight:m,children:g,...v}=e,y=()=>{p&&n&&p(n)},b=()=>{f&&f()},[,w]=Me({item:{type:"ui-token-drag-indicator"},begin:y,end:b}),[,S]=Me({item:{type:"ui-token-drag-indicator"},begin:y,end:b}),C=i.useRef(null),_={ref:C,style:{position:"absolute",top:"-10000px",left:"-10000px"},type:"text",tabIndex:-1},O=Object(D.c)();return i.createElement("ui-token",Object.assign({tabindex:-1,ref:t,class:a()(O,Ze.a,r,s,u&&"selected",l&&"has-cursor-before",d&&"has-cursor-after"),id:o,style:{position:"relative",display:"flex",...c},role:"listitem",onFocus:e=>{var t;null===(t=C.current)||void 0===t||t.focus({preventScroll:!0}),e.stopPropagation()}},v),h&&i.createElement("ui-token-selection-expansion-indicator",{ref:w,class:"expansion-indicator-before"}),i.createElement("ui-token-content",{class:a()(h&&"has-expansion-indicator-before",m&&"has-expansion-indicator-after")},g,i.createElement("span",{"aria-label":u?"selected":"unselected"})),m&&i.createElement("ui-token-selection-expansion-indicator",{ref:S,class:"expansion-indicator-after"}),i.createElement("input",Object.assign({className:"hidden-token-input","aria-hidden":!0},_)))}));var Ye=n(1497),Je=n(1508),Xe=n(2224);const et=function(e){const{inputProps:t,menuProps:n,value:o}=Object(Je.b)({value:e.value,onBlur:e.onBlur,onFocus:e.onFocus,onKeyDown:e.onKeyDown,onChange:e.onChange,onItemSelected:e.onItemSelected,onItemSelectedSync:e.onItemSelectedSync,onItemHighlighted:e.onItemHighlighted,renderMenuItemsForText:e.renderMenuItemsForText,existingMenuItemValues:e.existingTokens,shouldAutoHighlightFirstHighlightableItem:!1!==e.autoFocusMenu}),s=n.isOpen,{_useLegacyMenuRendering:c,menuClassName:u,menuControlFunctionRefs:l}=e,d=i.useRef(null),p=i.useMemo((()=>e.shouldPositionMenuUnderTextField?{current:e.fieldContainerElement}:d),[e.shouldPositionMenuUnderTextField,e.fieldContainerElement,d]),[f,h]=i.useState({top:0,left:0}),m=0===n.items.length&&n.isOpen;i.useEffect((()=>{var t;if(!c)return;const n=null===p||void 0===p?void 0:p.current;if(!n)return;const r=n.getBoundingClientRect(),i={top:r.top+r.height+2,left:r.left};h({...i,...null!==(t=e.menuDimensions)&&void 0!==t?t:{}})}),[e.menuDimensions,e.existingTokens,e.shouldPositionMenuUnderTextField,c,p]);const[g,v]=i.useState(null);i.useLayoutEffect((()=>{if(!c)return;const{current:e}=n.ref;e&&(e.style.zIndex="1",g?!s||m?(e.style.position="absolute",e.style.inlineSize="1px",e.style.blockSize="1px",e.style.padding="0",e.style.margin="-1px",e.style.overflow="hidden",e.style.clip="rect(0, 0, 0, 0)",e.style.whiteSpace="nowrap",e.style.border="0",e.style.minInlineSize="0"):(e.style.position=g.position,e.style.inlineSize=g.inlineSize,e.style.blockSize=g.blockSize,e.style.padding=g.padding,e.style.margin=g.margin,e.style.overflow=g.overflow,e.style.clip=g.clip,e.style.whiteSpace=g.whiteSpace,e.style.border=g.border,e.style.minInlineSize=g.minInlineSize):v({position:e.style.position,inlineSize:e.style.inlineSize,blockSize:e.style.blockSize,padding:e.style.padding,margin:e.style.margin,overflow:e.style.overflow,clip:e.style.clip,whiteSpace:e.style.whiteSpace,border:e.style.border,minInlineSize:e.style.minInlineSize}))}),[g,m,s,n.ref,c]);const y=i.useMemo((()=>i.createElement(U.c,Object.assign({},n,{scrollMode:U.k.Continuous,dontManageFocus:!0,frame:c?f:void 0,role:"listbox",className:a()(u,c?s?"open":"closed":void 0,m&&"has-null-list")}),n.items)),[c,u,m,f,s,n]),[b,w]=i.useState(0),S=i.useRef(e.value),C=i.useRef(0);i.useLayoutEffect((()=>{b===n.items.length&&S.current===e.value||(C.current+=1,w(n.items.length))}),[e.value,n.items,b]);const _=Object(Xe.b)({...Xe.c,sidePreference:[Xe.a.bottomInlineStart]}),[O,I]=Object(r.h)(i.createElement(E.b,{positioner:_,anchorRef:p,arrowless:!0,remeasureToken:C.current},y),{animates:r.b.NONE});i.useLayoutEffect((()=>{if(l){if(c)throw new Error("menuControlFunctionRefs is not a usable parameter with legacy menu rendering");l[0].current=O,l[1].current=I}}),[l,c,O,I]),i.useEffect((()=>{c||(n.isOpen?O():I())}),[n.isOpen,c,I,O]),i.useLayoutEffect((()=>{const{current:e}=t.ref;e&&(e.style.border="0",e.style.boxShadow="none",e.style.overflow="hidden")}),[t.ref]),i.useImperativeHandle(e.tokenRef,(()=>({focus(){t.ref.current.focus()},blur(){t.ref.current.blur()}}))),i.useLayoutEffect((()=>{if(null===t.ref.current)return;if(e.inputWidth)return void(t.ref.current.style.width=`${e.inputWidth}px`);t.ref.current.style.padding="0px";const n=e.fieldContainerElement;let r=!1;if(n){const e=Array.from(n.children).filter((e=>"UI-TOKEN"===e.tagName));if(e.length){const i=e[e.length-1],o=i.getBoundingClientRect(),a=n.getBoundingClientRect(),s=(null===o||void 0===o?void 0:o.x)+(null===o||void 0===o?void 0:o.width),c=a.x+a.width-s-parseFloat(getComputedStyle(i).getPropertyValue("margin-right"))-parseFloat(getComputedStyle(n).getPropertyValue("padding-right"))-5;if(""!==t.value){const{width:e}=function(e){const t=tt||(tt=document.createElement("canvas").getContext("2d")),n=window.getComputedStyle(e,null);return t.font=function(e){return e.font?e.font:[e.fontStyle,e.fontVariant,e.fontWeight,e.fontSize,e.fontFamily].filter(Boolean).join(" ")}(n),t.measureText(e.value)}(t.ref.current);e+10>c&&(t.ref.current.style.width=`${e+10}px`,r=!0)}!r&&c>50&&(t.ref.current.style.width=`${c}px`,r=!0)}}r||(t.ref.current.style.width="100%")}),[e.inputWidth,t.ref,t.value,e.fieldContainerElement]);const A=e.onFocusForInput,T=i.useCallback((e=>{var n,r;t.onFocus(e),A?A(e):null===(n=t.ref.current)||void 0===n||n.setSelectionRange(0,(null===(r=t.value)||void 0===r?void 0:r.length)||0)}),[t,A]),{invalid:P,...R}=t;return i.createElement("ui-editing-token",{ref:d,class:a()(o&&"has-value",e.variant||"standard")},i.createElement("textarea",Object.assign({},R,{placeholder:0===e.existingTokens.length&&e.placeholder?e.placeholder:void 0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",id:e.id,"aria-labelledby":e.ariaLabelledBy,className:"editing-token",onFocus:T,onCompositionStart:e.onCompositionStart,onCompositionEnd:e.onCompositionEnd,onChange:t.onChange,rows:1})),e._useLegacyMenuRendering&&y)};let tt;const nt=i.forwardRef(((e,t)=>{const[n,r]=Object(Ye.a)(e.initialTokens||[],e.tokens,(t=>{e.onTokensChanged&&t!==e.tokens&&e.onTokensChanged(t)})),[o,s]=i.useState(""),[u,l]=i.useState(!1),[d,p]=i.useState(-1),f=e.disabled?-1:d,[h,m]=i.useState([-1,-1]);let[g,v]=h;v<g&&(g=v,v=g);const[y,w]=i.useState([-1,-1]),[C,_]=i.useState(!1),[O,E]=i.useState(!1),[I,A]=i.useState(!1),T=i.useRef({tokens:n,editingTextValue:o}),P=i.useRef(e.initialTokens?[e.initialTokens]:[[]]),[R,k]=i.useState(null),M=Object(D.b)(),N="compact"===Object(b.d)(),x=!(!R||"rtl"!==window.getComputedStyle(R).direction),{serializingDelimiterKey:L}=e,j=L||",",{additionalDelimiterKeys:U=[";","\n"]}=e,[F,z]=i.useState(!0),B=i.useRef(null);i.useLayoutEffect((()=>{f>=0?(z(!1),B.current&&B.current.focus()):(z(!0),B.current&&B.current.blur())}),[f,B]),i.useLayoutEffect((()=>{const t={tokens:n,editingTextValue:o},r=t.tokens!==T.current.tokens||e.tokens&&t.tokens!==e.tokens;t.editingTextValue!==T.current.editingTextValue&&e.onTextChanged&&e.onTextChanged(o),r&&e.onTokensChanged&&e.onTokensChanged(t.tokens),r&&P.current.push(t.tokens),T.current=t,P.current.length>100&&P.current.splice(0,1)})),i.useMemo((()=>{e.clearTokensFunctionRef&&(e.clearTokensFunctionRef.current=()=>{r([]),s("")})}),[e.clearTokensFunctionRef,r]);let K=e.placeholder&&0===n.length&&-1===f&&""===o;const H=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;var o;const a=t.trim();if(a===j||""===a)return void s("");let c=(t=>{const n=[j,...U],r=new RegExp(n.join("|"));return t.split(r).filter(Boolean).map((t=>e.tokenForText(t.trim())))})(t).filter(Boolean);if(0===c.length)s(t),E(!0);else{-1===i&&(c=c.reverse());const e=[...n];let t;const a=c[c.length-1];"string"===typeof a.freeTextValue&&""!==a.freeTextValue&&(t=c.pop()),e.splice(f,0,...c);const u=1===i?f+c.length:f;s(null!==(o=null===t||void 0===t?void 0:t.freeTextValue)&&void 0!==o?o:""),p(u),m([-1,-1]),r(e)}},W=i.useCallback((e=>{let[t,i]=e;const o=[...n],a=i-t+1;o.splice(t,a),p(t),m([-1,-1]),r(o)}),[n,r]),q=()=>{const e=[...n];if(-1===v&&-1===g)return[];const t=v-g+1;return e.splice(g,t)},[{isHovering:V},$]=_e({accept:"ui-token",collect:e=>({isHovering:e.isOver()}),drop:e=>{const t=e.tokens;if(0===t.filter(Boolean).length)return;w([-1,-1]);const[i,o]=y,a=[...n];if(a.splice(f,0,...t),m([-1,-1]),-1!==i){let e=i;f<i&&(e+=t.length);const n=o-i+1;a.splice(e,n),r(a)}else r(a),p(f+t.length)},hover:()=>{if(null!==R&&null!==Z){const e=mt(Z,R,!1,x);p(e)}}}),G=!e.disallowDragDrop;let[{pointerPosition:Z,isDragging:Q,didDrop:Y},J]=Me({item:{type:"ui-token",tokens:q()},canDrag:()=>G&&""===o,collect:e=>({pointerPosition:e.getClientOffset(),isDragging:e.isDragging(),didDrop:e.didDrop()}),begin:()=>{re(),w([g,v])},end:()=>{if(ie(),!Y)return;const e=[...n],[t,i]=y;if(-1!==t){const n=i-t+1;e.splice(t,n),r(e),m([-1,-1]),w([-1,-1]),p(t)}}});G||(Z=null,Q=!1,Y=!1);const[X,ee]=i.useState(-1),te=i.useRef([]);i.useEffect((()=>{if(G&&-1!==X&&null!==R&&null!==Z){const e=mt(Z,R,!1,x);if(e<0)return;const t=e-1;t===X&&(te.current=[]),te.current.push(t);const n=e=>e>=t+1,r=e=>e<=t,i=te.current.filter(t>=X?r:n),o=Array.from(new Set([X,...i])),a=Math.min(...o),s=Math.max(...o);m([a,s])}else te.current.length&&(te.current=[])}),[X,x,Z,G,R]);const ne=i.useRef(null);i.useEffect((()=>{const e=document.createElement("div");return e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.right="0px",e.style.pointerEvents="none",e.style.width="100%",e.style.display="flex",e.style.opacity="0.4",e.style.zIndex="1",ne.current=e,null===R||void 0===R||R.appendChild(e),()=>{ne.current=null,null===R||void 0===R||R.removeChild(e)}}),[R]);const re=()=>{const e=[...ge.current];if(-1===v&&-1===g)return;const t=v-g+1,n=e.splice(g,t).reduce(((e,t)=>t?[...e,t.cloneNode(!0)]:e),[]);null!==ne.current&&n.forEach((e=>{var t;return null===(t=ne.current)||void 0===t?void 0:t.appendChild(e)}))},ie=()=>{if(null!==ne.current){const{children:e}=ne.current;Array.from(e).forEach((e=>{var t;null===(t=ne.current)||void 0===t||t.removeChild(e)}))}};i.useLayoutEffect((()=>{let e;const t=()=>{if(G&&!0===Q&&null!==ne.current&&null!==Z){const n=Z.y-((null===R||void 0===R?void 0:R.offsetTop)||0),r=Z.x-((null===R||void 0===R?void 0:R.offsetLeft)||0);ne.current.style.transform=`translate(${r+10}px, ${n+10}px)`,e=requestAnimationFrame(t)}};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)}),[Q,ne,Z,G,R]);const oe=e=>{if(null===R)return;R===e.target&&e.preventDefault();const{clientX:t,clientY:n}=e,r=mt({x:t,y:n},R,!0,x);-1!==r&&(p(r),m([-1,-1]))},ae={onFocus:e=>{p(n.length),l(!0)},onClick:oe,onPointerDown:oe,onBlur:e=>{l(!1)}},se=t=>{const n=t.map(e.textForToken).join(j),r=document.createElement("input");r.id="hidden-input-field",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.tabIndex=-1,document.body.appendChild(r),r.value=n,r.select(),document.execCommand("copy"),document.body.removeChild(r)},[ce,ue]=i.useState(!1),le=i.useRef(!1),de=R&&R.getBoundingClientRect(),pe=N&&de?{height:void 0,width:de.width,left:de.left,top:de.bottom}:void 0,fe=Object(S.a)(e.id,{onActivationComplete:()=>{p(n.length)}}),he={onChange:e=>{const t=e.target.value;O?E(!1):t!==j&&-1===U.indexOf(t)&&(C?(console.log("onChangeInput shouldCommit"),H(t)):s(t),_(!1))},onItemSelectedSync:()=>{le.current=!0},onItemHighlighted:()=>{le.current=!0},onItemSelected:t=>{const i="function"===typeof e.tokensForMenuItem?e.tokensForMenuItem(t):[t];((e,t)=>{const i=[...n];i.splice(t,0,...e);const o=t+e.length;p(o),m([-1,-1]),r(i)})(i,f),p(f+i.length),s("")},inputWidth:M&&V&&(0!==n.length||0!==f)?50:void 0,menuDimensions:pe,value:o,onFocus:t=>{var n;l(!0),null===(n=e.onFocus)||void 0===n||n.call(e,t)},onBlur:t=>{""!==o&&H(o),p(-1),l(!1),e.onBlur&&e.onBlur(t)},onCompositionStart:()=>ue(!0),onCompositionEnd:()=>ue(!1),onKeyDown:t=>{if(ce)return;const i=t.target;if("ArrowLeft"===t.key){if(0!==i.value.length&&0===i.selectionStart&&i.selectionEnd===i.value.length)i.setSelectionRange(0,0);else if(i.selectionStart===(x?i.value.length:0)&&f>0)if(t.shiftKey){const e=-1===g?f-1:g-1;m([e,-1===v?f-1:v]),p(-1);const t=ge.current[e];t&&t.focus()}else""!==o?H(i.value,-1):p(f-1)}else if("ArrowRight"===t.key){if(0!==i.value.length&&0===i.selectionStart&&i.selectionEnd===i.value.length){const e=i.value.length-1;i.setSelectionRange(e,e)}else if(i.selectionEnd===(x?0:i.value.length)&&f!==n.length)if(t.shiftKey){const e=-1===v?f:v+1;m([-1===g?f:g,e]);const t=ge.current[e];t&&t.focus()}else""!==i.value?H(i.value):p(f+1)}else if("ArrowUp"===t.key&&e.renderMenuItemsForText)!1===le.current?""!==o?H(o):p(0):le.current=!1;else if("ArrowDown"===t.key&&e.renderMenuItemsForText)if(!1===le.current){let e;""!==o?(H(o),e=n.length+1):e=n.length,p(e)}else le.current=!1;else if("Backspace"===t.key){if(!i.value.length&&0!==f){const e=f-1;m([e,e]),p(-1);const t=ge.current[e];t&&t.focus()}}else if("a"===t.key){if(t.metaKey){if(t.preventDefault(),i.setSelectionRange(0,i.value.length),!n.length)return;const e=n.length-1;m([0,e]),p(-1);const r=ge.current[e];r&&r.focus()}}else if("x"===t.key){if(t.metaKey&&(i.selectionEnd||0)-(i.selectionStart||0)===0){t.preventDefault();const e=q();if(!e.length)return;se(e),W(h)}}else if("c"===t.key){if(t.metaKey&&(i.selectionEnd||0)-(i.selectionStart||0)===0){t.preventDefault();const e=q();if(!e.length)return;se(e)}}else if("v"===t.key)t.metaKey&&!1!==e.tokenizeOnPaste&&_(!0);else if("z"===t.key){if(t.metaKey&&!i.value.length){t.preventDefault();const e=P.current,n=e[e.length-2]||e[0];if(n){const e=[...n];r(e),p(e.length),T.current.tokens=e}const i=[...e];i.pop(),P.current=i}}else"Enter"===t.key?!1===le.current?""!==o&&H(o):le.current=!1:t.key===j&&""!==o&&H(o);-1!==U.indexOf(t.key)&&""!==o&&H(o)},renderMenuItemsForText:e.renderMenuItemsForText,ariaLabelledBy:fe,shouldPositionMenuUnderTextField:e.shouldPositionMenuUnderTextField,onFocusForInput:e.onFocusForInput,autoFocusMenu:e.autoFocusMenu,_useLegacyMenuRendering:e._useLegacyMenuRendering,menuClassName:e.menuClassName,menuControlFunctionRefs:e.menuControlFunctionRefs};i.useEffect((()=>{I&&(W(h),A(!1))}),[W,h,I]);const me=i.useRef(null),ge=i.useRef([]);let ve=!1;const ye=n.map(((t,i)=>{const o=()=>(t=>{const i=[...n],o=i.splice(t,1).pop();if(!o)return;const a=e.textForToken(o);s(a),p(t),r(i)})(i),a=i>=g&&i<=v;a&&(ve=!0);const c=g<i,u=v>i;return{ref:e=>ge.current[i]=e,isSelected:a,selectionLeft:c,selectionRight:u,selectionIndicatorLeft:M&&a&&!c,selectionIndicatorRight:M&&a&&!u,editingTokenLeft:i===f,editingTokenRight:i+1===f,onBlur:e=>{const{currentTarget:t,relatedTarget:n}=e;t&&n&&(t===n||t.contains(n)||"UI-TOKEN"===n.nodeName)||m([-1,-1])},onKeyDown:t=>{if("ArrowLeft"===t.key)if(t.shiftKey&&v>=0){const e=Math.max(0,g-1);m([e,v])}else{const e=Math.max(0,g);p(e),m([-1,-1])}else if("ArrowRight"===t.key){const e=Math.min(n.length,v+1);t.shiftKey&&v<=n.length?m([g,e]):(p(e),m([-1,-1]))}else if("ArrowUp"===t.key)p(0),m([-1,-1]);else if("ArrowDown"===t.key)p(n.length),m([-1,-1]);else if("Backspace"===t.key)W(h);else if("Enter"===t.key)t.preventDefault(),o();else if("x"===t.key){if(t.metaKey){t.preventDefault();const e=q();se(e),A(!0)}}else if("c"===t.key){if(t.metaKey){t.preventDefault();const e=q();se(e)}}else if("a"===t.key)t.metaKey&&(m([0,n.length-1]),t.preventDefault());else if("v"===t.key)t.metaKey&&!1!==e.tokenizeOnPaste&&(_(!0),W(h),p(v));else if("z"===t.key&&t.metaKey){t.preventDefault();const e=P.current,n=e[e.length-2]||e[0];if(m([-1,-1]),n){const e=[...n];r(e),p(e.length),T.current.tokens=e}const i=[...e];i.pop(),P.current=i}},onPointerDown:e=>{let t,n;if(e.shiftKey?(t=i>=v?g:i,n=i<=g?v:i):t=n=i,v>g&&(t>g||n<v))return;m([t,n]),p(-1);const r=ge.current[i];r&&r.focus(),null===e||void 0===e||e.stopPropagation()},onPointerUp:e=>{let{shiftKey:t}=e;-1===X&&!t&&v>g&&(m([i,i]),p(-1))},onClick:()=>{me.current?(clearTimeout(me.current),me.current=null,o()):me.current=globalThis.setTimeout((()=>{me.current=null}),300)},onDoubleClick:o,selectionIndicatorDragBegin:e=>{ee(e)},selectionIndicatorDragEnd:()=>{ee(-1)},deleteToken:()=>W([i,i]),editToken:o}})),be=Object(c.a)(G?$:null,G?J:null,k,t,(e=>{null!==e&&(e.focus=e=>{p(n.length)},e.blur=e=>{p(-1)})})),we=[...n];f>=0?we.splice(f,0,dt):""!==o&&we.push(dt);let Se=0;const Ce=Object(D.c)();return i.createElement(i.Fragment,null,i.createElement("ui-autocomplete-token-field",Object.assign({class:a()(Ze.a,Ce,ve?"has-selected":void 0,e.variant||"standard",e.disabled?"disabled":void 0,e.className,u?"has-focus":void 0,f>=0&&""!==o?"has-value":void 0),style:{...e.style||{}},id:e.id,tabindex:!1===F||e.disabled?void 0:0,role:"list","aria-labelledby":fe,ref:be},ae),e.leadingAccessory,we.map(((t,r)=>{if(t===dt)return i.createElement(et,Object.assign({existingTokens:n.slice(0),key:"editing-token",tokenRef:B},he,{placeholder:e.placeholder,fieldContainerElement:R}));const{isSelected:o,selectionLeft:a,selectionRight:s,editingTokenLeft:c,editingTokenRight:u,deleteToken:l,editToken:d,...p}=ye[Se]||{};Se++;const f=e.renderToken(t,{isSelected:o,selectionLeft:a,selectionRight:s,editingTokenLeft:c,editingTokenRight:u,deleteToken:l,editToken:d});if(!ft(f))throw new Error(`Unexpected child of UIAutocompleteTokenField. Got ${Object(Le.a)(f)}, expected UIToken.`);const h={index:r,isSelected:o,editingTokenLeft:c,editingTokenRight:u,...p};return i.createElement(Qe,Object.assign({key:f.key||r},f.props,h))})),K&&e.placeholder?i.createElement(pt,{placeholder:e.placeholder,textFieldHasCursor:-1!==f}):null))}));function rt(e){const t=i.forwardRef(((t,n)=>i.createElement(xe.a,{backend:Ge,options:{enableTouchEvents:!0,enableMouseEvents:!0,enableHoverOutsideTarget:!0,ignoreContextMenu:!0}},i.createElement(e,Object.assign({},t,{ref:null!==n&&void 0!==n?n:null})))));return t.displayName="UIAutocompleteTokenField",t}const it=rt(nt);it.displayName="UIAutocompleteTokenField";const ot=it,at=nt;at.displayName="UIAutocompleteTokenFieldNoDndProvider";const st=at;function ct(e){const t=i.forwardRef(((t,n)=>i.createElement(e,Object.assign({},t,{ref:null!==n&&void 0!==n?n:null,_useLegacyMenuRendering:!0}))));return t.displayName="UIAutocompleteTokenFieldLegacyMenu",t}const ut=rt(ct(nt));ut.displayName="UIAutocompleteTokenFieldLegacyMenu";const lt=ut,dt=Symbol("EDITING_TOKEN_SYMBOL");function pt(e){let{placeholder:t,textFieldHasCursor:n}=e;return i.createElement("ui-placeholder-text-token",null,t)}const ft=e=>Object(H.a)(e)&&e.type===Qe;function ht(e,t,n){[e[t],e[n]]=[e[n],e[t]]}function mt(e,t,n){let{x:r,y:i}=e,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const a=t.getBoundingClientRect(),{left:s,right:c}=a,u=document.elementFromPoint(r,i);if(n&&u!==t)return-1;if(!gt(r,i,a))return-1;const l=Array.from(t.children).filter((e=>"UI-TOKEN"===e.tagName)).map((e=>e.getBoundingClientRect()));let d=0;const p=[],f=l.length+1;for(;d<=f;d++)if(0===d){const e=l[d];if(!e)continue;const{left:t,right:r,top:i,bottom:a,width:u}=e,f=o?r:t,h={left:o?c:s,right:n?f:f+u/2,top:i,bottom:a,index:d};o&&ht(h,"left","right"),p.push(h)}else if(d===f){const e=l[d-1];if(!e)continue;const{left:t,right:r,top:i,bottom:a,width:u}=e,f=o?r:t,h={left:n?f:f-u/2,right:o?s:c,top:i,bottom:a,index:d};o&&ht(h,"left","right"),p.push(h)}else{const e=l[d];if(!e)continue;const t=l[d-1];if(!t)continue;const{left:r,right:i,top:a,bottom:u,width:f}=t,{left:h,right:m,top:g,bottom:v,width:y}=e;if(Math.round(g)===Math.round(u)){const e=o?r:i,t={left:n?e:e-f/2,right:o?s:c,top:a,bottom:u,index:d};o&&ht(t,"left","right"),p.push(t);const l=o?m:h,b={left:o?c:s,right:n?l:l+y/2,top:g,bottom:v,index:d};o&&ht(b,"left","right"),p.push(b)}else{const e=o?m:h,t=o?r:i,a={left:n?t:t-f/2,right:n?e:e+y/2,top:g,bottom:v,index:d};o&&ht(a,"left","right"),p.push(a)}}let h=l.length;for(const m of p)m&&gt(r,i,m)&&(h=m.index);return h}function gt(e,t,n){let{left:r,right:i,top:o,bottom:a}=n;return e>=r&&e<=i&&t>=o&&t<=a}var vt=n(2277),yt=n(2195),bt=n(2194),wt=n(2264),St=n(2278),Ct=n(1510),_t=n(1228)},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ue}));var r=n(465);const i="An attempt was made to open a database using a lower version than the existing version.",o=(e,t)=>{Object.defineProperty(e,"code",{value:t,writable:!1,enumerable:!0,configurable:!1})};class a extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"A request was aborted, for example through a call to IDBTransaction.abort.","AbortError")}}class s extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"A mutation operation in the transaction failed because a constraint was not satisfied. For example, an object such as an object store or index already exists and a request attempted to create a new one.","ConstraintError")}}DOMException;class c extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Data provided to an operation does not meet requirements.","DataError"),o(this,0)}}class u extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"An invalid operation was performed on an object. For example transaction creation attempt was made, but an empty scope was provided.","InvalidAccessError")}}class l extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"An operation was called on an object on which it is not allowed or at a time when it is not allowed. Also occurs if a request is made on a source object that has been deleted or removed. Use TransactionInactiveError or ReadOnlyError when possible, as they are more specific variations of InvalidStateError.","InvalidStateError"),o(this,11)}}class d extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.","NotFoundError")}}class p extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:'The mutating operation was attempted in a "readonly" transaction.',"ReadOnlyError")}}class f extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,"SyntaxError"),o(this,12)}}class h extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"A request was placed against a transaction which is currently not active, or which is finished.","TransactionInactiveError"),o(this,0)}}class m extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,"VersionError")}}function g(e){return"undefined"!==typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer}const v=Symbol("INVALID_TYPE"),y=Symbol("INVALID_VALUE"),b=(e,t)=>{if("number"===typeof e)return isNaN(e)?y:e;if("[object Date]"===Object.prototype.toString.call(e)){const t=e.valueOf();return isNaN(t)?y:new Date(t)}if("string"===typeof e)return e;if(e instanceof ArrayBuffer||g(e)||"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e)){if("detached"in e?e.detached:0===e.byteLength)return y;let t,n=0,r=0;return e instanceof ArrayBuffer||g(e)?(t=e,r=e.byteLength):(t=e.buffer,n=e.byteOffset,r=e.byteLength),t.slice(n,n+r)}if(Array.isArray(e)){if(void 0===t)t=new Set;else if(t.has(e))return y;t.add(e);let n=!1;const r=Array.from({length:e.length},((r,i)=>{if(n)return;if(!Object.hasOwn(e,i))return void(n=!0);const o=e[i],a=b(o,t);if(a!==y&&a!==v)return a;n=!0}));return n?y:r}return v};var w=b,S=(e,t)=>{const n=w(e,t);if(n===y||n===v)throw new c;return n};const C=e=>{if("number"===typeof e)return"Number";if("[object Date]"===Object.prototype.toString.call(e))return"Date";if(Array.isArray(e))return"Array";if("string"===typeof e)return"String";if(e instanceof ArrayBuffer)return"Binary";throw new c},_=(e,t)=>{if(void 0===t)throw new TypeError;e=S(e),t=S(t);const n=C(e),r=C(t);if(n!==r)return"Array"===n?1:("Binary"!==n||"String"!==r&&"Date"!==r&&"Number"!==r)&&("String"!==n||"Date"!==r&&"Number"!==r)?"Date"===n&&"Number"===r?1:-1:1;if("Binary"===n&&(e=new Uint8Array(e),t=new Uint8Array(t)),"Array"===n||"Binary"===n){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=_(e[r],t[r]);if(0!==n)return n}return e.length>t.length?1:e.length<t.length?-1:0}if("Date"===n){if(e.getTime()===t.getTime())return 0}else if(e===t)return 0;return e>t?1:-1};var O=_;class E{static only(e){if(0===arguments.length)throw new TypeError;return e=S(e),new E(e,e,!1,!1)}static lowerBound(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===arguments.length)throw new TypeError;return e=S(e),new E(e,void 0,t,!0)}static upperBound(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===arguments.length)throw new TypeError;return e=S(e),new E(void 0,e,!0,t)}static bound(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(arguments.length<2)throw new TypeError;const i=O(e,t);if(1===i||0===i&&(n||r))throw new c;return e=S(e),t=S(t),new E(e,t,n,r)}constructor(e,t,n,r){this.lower=e,this.upper=t,this.lowerOpen=n,this.upperOpen=r}includes(e){if(0===arguments.length)throw new TypeError;if(e=S(e),void 0!==this.lower){const t=O(this.lower,e);if(1===t||0===t&&this.lowerOpen)return!1}if(void 0!==this.upper){const t=O(this.upper,e);if(-1===t||0===t&&this.upperOpen)return!1}return!0}get[Symbol.toStringTag](){return"IDBKeyRange"}}var I=E;const A=(e,t)=>{if(Array.isArray(e)){const n=[];for(let r of e){void 0!==r&&null!==r&&"string"!==typeof r&&r.toString&&(r=r.toString());const e=A(r,t).key;n.push(S(e))}return{type:"found",key:n}}if(""===e)return{type:"found",key:t};let n=e,r=t;for(;null!==n;){let e;const t=n.indexOf(".");if(t>=0?(e=n.slice(0,t),n=n.slice(t+1)):(e=n,n=null),!("length"===e&&("string"===typeof r||Array.isArray(r))||("size"===e||"type"===e)&&"undefined"!==typeof Blob&&r instanceof Blob||("name"===e||"lastModified"===e)&&"undefined"!==typeof File&&r instanceof File)&&("object"!==typeof r||null===r||!Object.hasOwn(r,e)))return{type:"notFound"};r=r[e]}return{type:"found",key:r}};var T=A;function P(e,t){if("active"!==t._state)throw new Error("Assert: transaction state is active");t._state="inactive";try{return structuredClone(e)}finally{t._state="active"}}const R=e=>e.source instanceof ue?e.source:e.source.objectStore,k=(e,t,n)=>{let r=void 0!==e?e.lower:void 0,i=void 0!==e?e.upper:void 0;for(const o of t)void 0!==o&&(void 0!==r&&1!==O(r,o)||(r=o));for(const o of n)void 0!==o&&(void 0!==i&&-1!==O(i,o)||(i=o));return void 0!==r&&void 0!==i?I.bound(r,i):void 0!==r?I.lowerBound(r):void 0!==i?I.upperBound(i):void 0};class D{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"next",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this._gotValue=!1,this._position=void 0,this._objectStorePosition=void 0,this._keyOnly=!1,this._key=void 0,this._primaryKey=void 0,this._range=t,this._source=e,this._direction=n,this._request=r,this._keyOnly=i}get source(){return this._source}set source(e){}get request(){return this._request}set request(e){}get direction(){return this._direction}set direction(e){}get key(){return this._key}set key(e){}get primaryKey(){return this._primaryKey}set primaryKey(e){}_iterate(e,t){const n=this.source instanceof ue,r=this.source instanceof ue?this.source._rawObjectStore.records:this.source._rawIndex.records;let i,o;if("next"===this.direction){const o=k(this._range,[e,this._position],[]);for(const a of r.values(o)){const r=void 0!==e?O(a.key,e):void 0,o=void 0!==this._position?O(a.key,this._position):void 0;if(void 0===e||-1!==r){if(void 0!==t){if(-1===r)continue;const e=O(a.value,t);if(0===r&&-1===e)continue}if(void 0===this._position||!n||1===o){if(void 0!==this._position&&!n){if(-1===o)continue;if(0===o&&1!==O(a.value,this._objectStorePosition))continue}if(void 0===this._range||this._range.includes(a.key)){i=a;break}}}}}else if("nextunique"===this.direction){const t=k(this._range,[e,this._position],[]);for(const n of r.values(t))if((void 0===e||-1!==O(n.key,e))&&(void 0===this._position||1===O(n.key,this._position))&&(void 0===this._range||this._range.includes(n.key))){i=n;break}}else if("prev"===this.direction){const o=k(this._range,[],[e,this._position]);for(const a of r.values(o,"prev")){const r=void 0!==e?O(a.key,e):void 0,o=void 0!==this._position?O(a.key,this._position):void 0;if(void 0===e||1!==r){if(void 0!==t){if(1===r)continue;const e=O(a.value,t);if(0===r&&1===e)continue}if(void 0===this._position||!n||-1===o){if(void 0!==this._position&&!n){if(1===o)continue;if(0===o&&-1!==O(a.value,this._objectStorePosition))continue}if(void 0===this._range||this._range.includes(a.key)){i=a;break}}}}}else if("prevunique"===this.direction){let t;const n=k(this._range,[],[e,this._position]);for(const i of r.values(n,"prev"))if((void 0===e||1!==O(i.key,e))&&(void 0===this._position||-1===O(i.key,this._position))&&(void 0===this._range||this._range.includes(i.key))){t=i;break}t&&(i=r.get(t.key))}if(i){if(this._position=i.key,n||(this._objectStorePosition=i.value),this._key=i.key,n)this._primaryKey=structuredClone(i.key),this._keyOnly||"[object IDBCursorWithValue]"!==this.toString()||(this.value=structuredClone(i.value));else if(this._primaryKey=structuredClone(i.value),!this._keyOnly&&"[object IDBCursorWithValue]"===this.toString()){if(this.source instanceof ue)throw new Error("This should never happen");const e=this.source.objectStore._rawObjectStore.getValue(i.value);this.value=structuredClone(e)}this._gotValue=!0,o=this}else this._key=void 0,n||(this._objectStorePosition=void 0),this._keyOnly||"[object IDBCursorWithValue]"!==this.toString()||(this.value=void 0),o=null;return o}update(e){if(void 0===e)throw new TypeError;const t=R(this),n=Object.hasOwn(this.source,"_rawIndex")?this.primaryKey:this._position,r=t.transaction;if("active"!==r._state)throw new h;if("readonly"===r.mode)throw new p;if(t._rawObjectStore.deleted)throw new l;if(!(this.source instanceof ue)&&this.source._rawIndex.deleted)throw new l;if(!this._gotValue||!Object.hasOwn(this,"value"))throw new l;const i=P(e,r);if(null!==t.keyPath){let e;try{e=T(t.keyPath,i).key}catch(a){}if(0!==O(e,n))throw new c}const o={key:n,value:i};return r._execRequestAsync({operation:t._rawObjectStore.storeRecord.bind(t._rawObjectStore,o,!1,r._rollbackLog),source:this})}advance(e){if(!Number.isInteger(e)||e<=0)throw new TypeError;const t=R(this),n=t.transaction;if("active"!==n._state)throw new h;if(t._rawObjectStore.deleted)throw new l;if(!(this.source instanceof ue)&&this.source._rawIndex.deleted)throw new l;if(!this._gotValue)throw new l;this._request&&(this._request.readyState="pending"),n._execRequestAsync({operation:()=>{let t;for(let n=0;n<e&&(t=this._iterate(),t);n++);return t},request:this._request,source:this.source}),this._gotValue=!1}continue(e){const t=R(this),n=t.transaction;if("active"!==n._state)throw new h;if(t._rawObjectStore.deleted)throw new l;if(!(this.source instanceof ue)&&this.source._rawIndex.deleted)throw new l;if(!this._gotValue)throw new l;if(void 0!==e){e=S(e);const t=O(e,this._position);if(t<=0&&("next"===this.direction||"nextunique"===this.direction)||t>=0&&("prev"===this.direction||"prevunique"===this.direction))throw new c}this._request&&(this._request.readyState="pending"),n._execRequestAsync({operation:this._iterate.bind(this,e),request:this._request,source:this.source}),this._gotValue=!1}continuePrimaryKey(e,t){const n=R(this),r=n.transaction;if("active"!==r._state)throw new h;if(n._rawObjectStore.deleted)throw new l;if(!(this.source instanceof ue)&&this.source._rawIndex.deleted)throw new l;if(this.source instanceof ue||"next"!==this.direction&&"prev"!==this.direction)throw new u;if(!this._gotValue)throw new l;if(void 0===e||void 0===t)throw new c;e=S(e);const i=O(e,this._position);if(-1===i&&"next"===this.direction||1===i&&"prev"===this.direction)throw new c;const o=O(t,this._objectStorePosition);if(0===i&&(o<=0&&"next"===this.direction||o>=0&&"prev"===this.direction))throw new c;this._request&&(this._request.readyState="pending"),r._execRequestAsync({operation:this._iterate.bind(this,e,t),request:this._request,source:this.source}),this._gotValue=!1}delete(){const e=R(this),t=Object.hasOwn(this.source,"_rawIndex")?this.primaryKey:this._position,n=e.transaction;if("active"!==n._state)throw new h;if("readonly"===n.mode)throw new p;if(e._rawObjectStore.deleted)throw new l;if(!(this.source instanceof ue)&&this.source._rawIndex.deleted)throw new l;if(!this._gotValue||!Object.hasOwn(this,"value"))throw new l;return n._execRequestAsync({operation:e._rawObjectStore.deleteRecord.bind(e._rawObjectStore,t,n._rollbackLog),source:this})}get[Symbol.toStringTag](){return"IDBCursor"}}var M=D;class N extends M{constructor(e,t,n,r){super(e,t,n,r),this.value=void 0}get[Symbol.toStringTag](){return"IDBCursorWithValue"}}var x=N;const L=(e,t)=>e.immediatePropagationStopped||e.eventPhase===e.CAPTURING_PHASE&&!1===t.capture||e.eventPhase===e.BUBBLING_PHASE&&!0===t.capture,j=(e,t)=>{e.currentTarget=t;const n=[],r=t=>{try{("function"===typeof t?t:t.handleEvent).call(e.currentTarget,e)}catch(r){n.push(r)}};for(const a of t.listeners.slice())e.type!==a.type||L(e,a)||r(a.callback);const i={abort:"onabort",blocked:"onblocked",close:"onclose",complete:"oncomplete",error:"onerror",success:"onsuccess",upgradeneeded:"onupgradeneeded",versionchange:"onversionchange"}[e.type];if(void 0===i)throw new Error(`Unknown event type: "${e.type}"`);const o=e.currentTarget[i];if(o){const t={callback:o,capture:!1,type:e.type};L(e,t)||r(t.callback)}if(n.length)throw new AggregateError(n)};var U=class{constructor(){this.listeners=[]}addEventListener(e,t,n){const r=!!("object"===typeof n&&n?n.capture:n);this.listeners.push({callback:t,capture:r,type:e})}removeEventListener(e,t,n){const r=!!("object"===typeof n&&n?n.capture:n),i=this.listeners.findIndex((n=>n.type===e&&n.callback===t&&n.capture===r));this.listeners.splice(i,1)}dispatchEvent(e){if(e.dispatched||!e.initialized)throw new l("The object is in an invalid state.");e.isTrusted=!1,e.dispatched=!0,e.target=this,e.eventPhase=e.CAPTURING_PHASE;for(const t of e.eventPath)e.propagationStopped||j(e,t);if(e.eventPhase=e.AT_TARGET,e.propagationStopped||j(e,e.target),e.bubbles){e.eventPath.reverse(),e.eventPhase=e.BUBBLING_PHASE;for(const t of e.eventPath)e.propagationStopped||j(e,t)}return e.dispatched=!1,e.eventPhase=e.NONE,e.currentTarget=null,!e.canceled}};class F extends U{constructor(){super(...arguments),this._result=null,this._error=null,this.source=null,this.transaction=null,this.readyState="pending",this.onsuccess=null,this.onerror=null}get error(){if("pending"===this.readyState)throw new l;return this._error}set error(e){this._error=e}get result(){if("pending"===this.readyState)throw new l;return this._result}set result(e){this._result=e}get[Symbol.toStringTag](){return"IDBRequest"}}var z=F;class B{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._values=t;for(let r=0;r<t.length;r++)this[r]=t[r]}contains(e){return this._values.includes(e)}item(e){return e<0||e>=this._values.length?null:this._values[e]}get length(){return this._values.length}[Symbol.iterator](){return this._values[Symbol.iterator]()}_push(){for(let e=0;e<arguments.length;e++)this[this._values.length+e]=e<0||arguments.length<=e?void 0:arguments[e];this._values.push(...arguments)}_sort(){this._values.sort(...arguments);for(let e=0;e<this._values.length;e++)this[e]=this._values[e];return this}}var K=B,H=function(e){if(e instanceof I)return e;if(null===e||void 0===e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])throw new c;return new I(void 0,void 0,!1,!1)}const t=S(e);return I.only(t)};const W=e=>"object"===typeof e&&e?e+"":e;function q(e){return Array.isArray(e)?e.map(W):W(e)}var V=(e,t)=>{const n="unsigned long"===t?4294967295:9007199254740991;if(isNaN(e)||e<0||e>n)throw new TypeError;if(e>=0)return Math.floor(e)},$=(e,t,n)=>{let r,i;if(void 0===e||null===e||((o=e)instanceof I||w(o)!==v))r=e,n>1&&void 0!==t&&(t=V(t,"unsigned long"));else{const n=e;void 0!==n.query&&(r=n.query),void 0!==n.count&&(t=V(n.count,"unsigned long")),void 0!==n.direction&&(i=n.direction)}var o;return{query:r,count:t,direction:i}};const G=e=>{if(e._rawIndex.deleted||e.objectStore._rawObjectStore.deleted)throw new l;if("active"!==e.objectStore.transaction._state)throw new h};class Z{constructor(e,t){this._rawIndex=t,this._name=t.name,this.objectStore=e,this.keyPath=q(t.keyPath),this.multiEntry=t.multiEntry,this.unique=t.unique}get name(){return this._name}set name(e){const t=this.objectStore.transaction;if(!t.db._runningVersionchangeTransaction)throw"active"===t._state?new l:new h;if("active"!==t._state)throw new h;if(this._rawIndex.deleted||this.objectStore._rawObjectStore.deleted)throw new l;if((e=String(e))===this._name)return;if(this.objectStore.indexNames.contains(e))throw new s;const n=this._name,r=[...this.objectStore.indexNames];this._name=e,this._rawIndex.name=e,this.objectStore._indexesCache.delete(n),this.objectStore._indexesCache.set(e,this),this.objectStore._rawObjectStore.rawIndexes.delete(n),this.objectStore._rawObjectStore.rawIndexes.set(e,this._rawIndex),this.objectStore.indexNames=new K(...Array.from(this.objectStore._rawObjectStore.rawIndexes.keys()).filter((e=>{const t=this.objectStore._rawObjectStore.rawIndexes.get(e);return t&&!t.deleted})).sort()),this.objectStore.transaction._createdIndexes.has(this._rawIndex)||t._rollbackLog.push((()=>{this._name=n,this._rawIndex.name=n,this.objectStore._indexesCache.delete(e),this.objectStore._indexesCache.set(n,this),this.objectStore._rawObjectStore.rawIndexes.delete(e),this.objectStore._rawObjectStore.rawIndexes.set(n,this._rawIndex),this.objectStore.indexNames=new K(...r)}))}openCursor(e,t){G(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e)));const n=new z;n.source=this,n.transaction=this.objectStore.transaction;const r=new x(this,e,t,n);return this.objectStore.transaction._execRequestAsync({operation:r._iterate.bind(r),request:n,source:this})}openKeyCursor(e,t){G(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e)));const n=new z;n.source=this,n.transaction=this.objectStore.transaction;const r=new M(this,e,t,n,!0);return this.objectStore.transaction._execRequestAsync({operation:r._iterate.bind(r),request:n,source:this})}get(e){return G(this),e instanceof I||(e=S(e)),this.objectStore.transaction._execRequestAsync({operation:this._rawIndex.getValue.bind(this._rawIndex,e),source:this})}getAll(e,t){const n=$(e,t,arguments.length);G(this);const r=H(n.query);return this.objectStore.transaction._execRequestAsync({operation:this._rawIndex.getAllValues.bind(this._rawIndex,r,n.count,n.direction),source:this})}getKey(e){return G(this),e instanceof I||(e=S(e)),this.objectStore.transaction._execRequestAsync({operation:this._rawIndex.getKey.bind(this._rawIndex,e),source:this})}getAllKeys(e,t){const n=$(e,t,arguments.length);G(this);const r=H(n.query);return this.objectStore.transaction._execRequestAsync({operation:this._rawIndex.getAllKeys.bind(this._rawIndex,r,n.count,n.direction),source:this})}getAllRecords(e){let t,n,r;void 0!==e&&(void 0!==e.query&&(t=e.query),void 0!==e.count&&(n=V(e.count,"unsigned long")),void 0!==e.direction&&(r=e.direction)),G(this);const i=H(t);return this.objectStore.transaction._execRequestAsync({operation:this._rawIndex.getAllRecords.bind(this._rawIndex,i,n,r),source:this})}count(e){return G(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e))),this.objectStore.transaction._execRequestAsync({operation:()=>this._rawIndex.count(e),source:this})}get[Symbol.toStringTag](){return"IDBIndex"}}var Q=Z;class Y{constructor(e,t,n){this._key=e,this._primaryKey=t,this._value=n}get key(){return this._key}set key(e){}get primaryKey(){return this._primaryKey}set primaryKey(e){}get value(){return this._value}set value(e){}get[Symbol.toStringTag](){return"IDBRecord"}}var J=Y;const X=2/3,ee=new I(void 0,void 0,!1,!1);class te{constructor(e){this._numTombstones=0,this._numNodes=0,this._keysAreUnique=!!e}size(){return this._numNodes-this._numTombstones}get(e){return this._getByComparator(this._root,(t=>this._compare(e,t)))}contains(e){return!!this.get(e)}_compare(e,t){const n=O(e.key,t.key);return 0!==n?n:this._keysAreUnique?0:O(e.value,t.value)}_getByComparator(e,t){let n=e;for(;n;){const e=t(n.record);if(e<0)n=n.left;else{if(!(e>0))return n.record;n=n.right}}}put(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._root?this._put(this._root,e,t):(this._root={record:e,left:void 0,right:void 0,parent:void 0,deleted:!1,red:!1},void this._numNodes++)}_put(e,t,n){const r=this._compare(t,e.record);if(r<0){if(e.left)return this._put(e.left,t,n);e.left={record:t,left:void 0,right:void 0,parent:e,deleted:!1,red:!0},this._onNewNodeInserted(e.left)}else if(r>0){if(e.right)return this._put(e.right,t,n);e.right={record:t,left:void 0,right:void 0,parent:e,deleted:!1,red:!0},this._onNewNodeInserted(e.right)}else{if(!e.deleted){if(n)throw new s;{const n=e.record;return e.record=t,n}}e.deleted=!1,e.record=t,this._numTombstones--}}delete(e){if(this._root&&(this._delete(this._root,e),this._numTombstones>this._numNodes*X)){const e=[...this.getAllRecords()];this._root=this._rebuild(e,void 0,!1),this._numNodes=e.length,this._numTombstones=0}}_delete(e,t){if(!e)return;const n=this._compare(t,e.record);n<0?this._delete(e.left,t):n>0?this._delete(e.right,t):e.deleted||(this._numTombstones++,e.deleted=!0)}getAllRecords(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function*(){yield*e.getRecords(ee,t)}()}getRecords(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function*(){yield*t._getRecordsForNode(t._root,e,n)}()}_getRecordsForNode(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function*(){e&&(yield*n._findRecords(e,t,r))}()}_findRecords(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function*(){const{lower:i,upper:o,lowerOpen:a,upperOpen:s}=t,{record:{key:c}}=e,u=void 0===i?-1:O(i,c),l=void 0===o?1:O(o,c),d=n._keysAreUnique?u<0:u<=0,p=n._keysAreUnique?l>0:l>=0,f=r?d:p,h=r?"right":"left",m=r?"left":"right",g=a?u<0:u<=0,v=s?l>0:l>=0;(r?p:d)&&e[h]&&(yield*n._findRecords(e[h],t,r)),g&&v&&!e.deleted&&(yield e.record),f&&e[m]&&(yield*n._findRecords(e[m],t,r))}()}_onNewNodeInserted(e){this._numNodes++,this._rebalanceTree(e)}_rebalanceTree(e){let t=e.parent;do{if(!t.red)return;const n=t.parent;if(!n)return void(t.red=!1);const r=t===n.right,i=r?n.left:n.right;if(!i||!i.red)return e===(r?t.left:t.right)&&(this._rotateSubtree(t,r),e=t,t=r?n.right:n.left),this._rotateSubtree(n,!r),t.red=!1,void(n.red=!0);t.red=!1,i.red=!1,n.red=!0,e=n}while(e.parent&&(t=e.parent))}_rotateSubtree(e,t){const n=e.parent,r=t?e.left:e.right,i=t?r.right:r.left;return e[t?"left":"right"]=i,i&&(i.parent=e),r[t?"right":"left"]=e,r.parent=n,e.parent=r,n?n[e===n.right?"right":"left"]=r:this._root=r,r}_rebuild(e,t,n){const{length:r}=e;if(!r)return;const i=r>>>1,o={record:e[i],left:void 0,right:void 0,parent:t,deleted:!1,red:n},a=this._rebuild(e.slice(0,i),o,!n),s=this._rebuild(e.slice(i+1),o,!n);return o.left=a,o.right=s,o}}var ne=class{constructor(e){this.keysAreUnique=e,this.records=new te(this.keysAreUnique)}get(e){const t=e instanceof I?e:I.only(e);return this.records.getRecords(t).next().value}put(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.records.put(e,t)}delete(e){const t=e instanceof I?e:I.only(e),n=[...this.records.getRecords(t)];for(const r of n)this.records.delete(r);return n}deleteByValue(e){const t=e instanceof I?e:I.only(e),n=[];for(const r of this.records.getAllRecords())t.includes(r.value)&&(this.records.delete(r),n.push(r));return n}clear(){const e=[...this.records.getAllRecords()];return this.records=new te(this.keysAreUnique),e}values(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"next";const n="prev"===t||"prevunique"===t,r=e?this.records.getRecords(e,n):this.records.getAllRecords(n);return{[Symbol.iterator]:()=>{const e=()=>r.next();if("next"===t||"prev"===t)return{next:e};if("nextunique"===t){let t;return{next:()=>{let n=e();for(;!n.done&&void 0!==t&&0===O(t.key,n.value.key);)n=e();return t=n.value,n}}}let n=e(),i=e();return{next:()=>{for(;!i.done&&0===O(n.value.key,i.value.key);)n=i,i=e();const t=n;return n=i,i=e(),t}}}}}size(){return this.records.size()}},re=class{constructor(e,t,n,r,i){this.deleted=!1,this.initialized=!1,this.rawObjectStore=e,this.name=t,this.keyPath=n,this.multiEntry=r,this.unique=i,this.records=new ne(i)}getKey(e){const t=this.records.get(e);return void 0!==t?t.value:void 0}getAllKeys(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(structuredClone(i.value)),r.length>=t)break;return r}getValue(e){const t=this.records.get(e);return void 0!==t?this.rawObjectStore.getValue(t.value):void 0}getAllValues(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(this.rawObjectStore.getValue(i.value)),r.length>=t)break;return r}getAllRecords(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(new J(structuredClone(i.key),structuredClone(this.rawObjectStore.getKey(i.value)),this.rawObjectStore.getValue(i.value))),r.length>=t)break;return r}storeRecord(e){let t;try{t=T(this.keyPath,e.value).key}catch(n){if("DataError"===n.name)return;throw n}if(this.multiEntry&&Array.isArray(t)){const e=[];for(const r of t)if(e.indexOf(r)<0)try{e.push(S(r))}catch(n){}t=e}else try{S(t)}catch(r){return}if(this.multiEntry&&Array.isArray(t)){if(this.unique)for(const i of t)if(this.records.get(i))throw new s}else if(this.unique&&this.records.get(t))throw new s;if(this.multiEntry&&Array.isArray(t))for(const i of t)this.records.put({key:i,value:e.key});else this.records.put({key:t,value:e.key})}initialize(e){if(this.initialized)throw new Error("Index already initialized");e._execRequestAsync({operation:()=>{try{for(const e of this.rawObjectStore.records.values())this.storeRecord(e);this.initialized=!0}catch(t){e._abort(t.name)}},source:null})}count(e){let t=0;for(const n of this.records.values(e))t+=1;return t}};const ie=(e,t)=>{if(void 0===e||null===e||"string"===typeof e||!e.toString||"array"!==t&&Array.isArray(e)||(e=e.toString()),"string"===typeof e){if(""===e&&"string"!==t)return;try{const t=/^(?:[$A-Z_a-z\xAA\xB5\xBA\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\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\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\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-\uAB5F\uAB64\uAB65\uABC0-\uABE2\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])(?:[$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])*$/;if(e.length>=1&&t.test(e))return}catch(n){throw new f(n.message)}if(e.indexOf(" ")>=0)throw new f("The keypath argument contains an invalid key path (no spaces allowed).")}if(Array.isArray(e)&&e.length>0){if(t)throw new f("The keypath argument contains an invalid key path (nested arrays).");for(const t of e)ie(t,"array")}else{if(!("string"===typeof e&&e.indexOf(".")>=0))throw new f;e=e.split(".");for(const t of e)ie(t,"string")}};var oe=ie;const ae=e=>{if(e._rawObjectStore.deleted)throw new l;if("active"!==e.transaction._state)throw new h},se=(e,t,n)=>{if(ae(e),"readonly"===e.transaction.mode)throw new p;if(null!==e.keyPath&&void 0!==n)throw new c;const r=P(t,e.transaction);if(null!==e.keyPath){const t=T(e.keyPath,r);if("found"===t.type)S(t.key);else{if(!e._rawObjectStore.keyGenerator)throw new c;if(!((e,t)=>{if(Array.isArray(e))throw new Error("The key paths used in this section are always strings and never sequences, since it is not possible to create a object store which has a key generator and also has a key path that is a sequence.");const n=e.split(".");if(0===n.length)throw new Error("Assert: identifiers is not empty");n.pop();for(const r of n){if("object"!==typeof t&&!Array.isArray(t))return!1;if(!Object.hasOwn(t,r))return!0;t=t[r]}return"object"===typeof t||Array.isArray(t)})(e.keyPath,r))throw new c}}if(null===e.keyPath&&null===e._rawObjectStore.keyGenerator&&void 0===n)throw new c;return void 0!==n&&(n=S(n)),{key:n,value:r}};class ce{constructor(e,t){this._indexesCache=new Map,this._rawObjectStore=t,this._name=t.name,this.keyPath=q(t.keyPath),this.autoIncrement=t.autoIncrement,this.transaction=e,this.indexNames=new K(...Array.from(t.rawIndexes.keys()).sort())}get name(){return this._name}set name(e){const t=this.transaction;if(!t.db._runningVersionchangeTransaction)throw"active"===t._state?new l:new h;if(ae(this),(e=String(e))===this._name)return;if(this._rawObjectStore.rawDatabase.rawObjectStores.has(e))throw new s;const n=this._name,r=[...t.db.objectStoreNames];this._name=e,this._rawObjectStore.name=e,this.transaction._objectStoresCache.delete(n),this.transaction._objectStoresCache.set(e,this),this._rawObjectStore.rawDatabase.rawObjectStores.delete(n),this._rawObjectStore.rawDatabase.rawObjectStores.set(e,this._rawObjectStore),t.db.objectStoreNames=new K(...Array.from(this._rawObjectStore.rawDatabase.rawObjectStores.keys()).filter((e=>{const t=this._rawObjectStore.rawDatabase.rawObjectStores.get(e);return t&&!t.deleted})).sort());const i=new Set(t._scope),o=[...t.objectStoreNames];this.transaction._scope.delete(n),t._scope.add(e),t.objectStoreNames=new K(...Array.from(t._scope).sort()),this.transaction._createdObjectStores.has(this._rawObjectStore)||t._rollbackLog.push((()=>{this._name=n,this._rawObjectStore.name=n,this.transaction._objectStoresCache.delete(e),this.transaction._objectStoresCache.set(n,this),this._rawObjectStore.rawDatabase.rawObjectStores.delete(e),this._rawObjectStore.rawDatabase.rawObjectStores.set(n,this._rawObjectStore),t.db.objectStoreNames=new K(...r),t._scope=i,t.objectStoreNames=new K(...o)}))}put(e,t){if(0===arguments.length)throw new TypeError;const n=se(this,e,t);return this.transaction._execRequestAsync({operation:this._rawObjectStore.storeRecord.bind(this._rawObjectStore,n,!1,this.transaction._rollbackLog),source:this})}add(e,t){if(0===arguments.length)throw new TypeError;const n=se(this,e,t);return this.transaction._execRequestAsync({operation:this._rawObjectStore.storeRecord.bind(this._rawObjectStore,n,!0,this.transaction._rollbackLog),source:this})}delete(e){if(0===arguments.length)throw new TypeError;if(ae(this),"readonly"===this.transaction.mode)throw new p;return e instanceof I||(e=S(e)),this.transaction._execRequestAsync({operation:this._rawObjectStore.deleteRecord.bind(this._rawObjectStore,e,this.transaction._rollbackLog),source:this})}get(e){if(0===arguments.length)throw new TypeError;return ae(this),e instanceof I||(e=S(e)),this.transaction._execRequestAsync({operation:this._rawObjectStore.getValue.bind(this._rawObjectStore,e),source:this})}getAll(e,t){const n=$(e,t,arguments.length);ae(this);const r=H(n.query);return this.transaction._execRequestAsync({operation:this._rawObjectStore.getAllValues.bind(this._rawObjectStore,r,n.count,n.direction),source:this})}getKey(e){if(0===arguments.length)throw new TypeError;return ae(this),e instanceof I||(e=S(e)),this.transaction._execRequestAsync({operation:this._rawObjectStore.getKey.bind(this._rawObjectStore,e),source:this})}getAllKeys(e,t){const n=$(e,t,arguments.length);ae(this);const r=H(n.query);return this.transaction._execRequestAsync({operation:this._rawObjectStore.getAllKeys.bind(this._rawObjectStore,r,n.count,n.direction),source:this})}getAllRecords(e){let t,n,r;void 0!==e&&(void 0!==e.query&&(t=e.query),void 0!==e.count&&(n=V(e.count,"unsigned long")),void 0!==e.direction&&(r=e.direction)),ae(this);const i=H(t);return this.transaction._execRequestAsync({operation:this._rawObjectStore.getAllRecords.bind(this._rawObjectStore,i,n,r),source:this})}clear(){if(ae(this),"readonly"===this.transaction.mode)throw new p;return this.transaction._execRequestAsync({operation:this._rawObjectStore.clear.bind(this._rawObjectStore,this.transaction._rollbackLog),source:this})}openCursor(e,t){ae(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e)));const n=new z;n.source=this,n.transaction=this.transaction;const r=new x(this,e,t,n);return this.transaction._execRequestAsync({operation:r._iterate.bind(r),request:n,source:this})}openKeyCursor(e,t){ae(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e)));const n=new z;n.source=this,n.transaction=this.transaction;const r=new M(this,e,t,n,!0);return this.transaction._execRequestAsync({operation:r._iterate.bind(r),request:n,source:this})}createIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(arguments.length<2)throw new TypeError;const r=void 0!==n.multiEntry&&n.multiEntry,i=void 0!==n.unique&&n.unique;if("versionchange"!==this.transaction.mode)throw new l;if(ae(this),this.indexNames.contains(e))throw new s;if(oe(t),Array.isArray(t)&&r)throw new u;const o=[...this.indexNames],a=new re(this._rawObjectStore,e,t,r,i);return this.indexNames._push(e),this.indexNames._sort(),this.transaction._createdIndexes.add(a),this._rawObjectStore.rawIndexes.set(e,a),a.initialize(this.transaction),this.transaction._rollbackLog.push((()=>{a.deleted=!0,this.indexNames=new K(...o),this._rawObjectStore.rawIndexes.delete(a.name)})),new Q(this,a)}index(e){if(0===arguments.length)throw new TypeError;if(this._rawObjectStore.deleted||"finished"===this.transaction._state)throw new l;const t=this._indexesCache.get(e);if(void 0!==t)return t;const n=this._rawObjectStore.rawIndexes.get(e);if(!this.indexNames.contains(e)||void 0===n)throw new d;const r=new Q(this,n);return this._indexesCache.set(e,r),r}deleteIndex(e){if(0===arguments.length)throw new TypeError;if("versionchange"!==this.transaction.mode)throw new l;ae(this);const t=this._rawObjectStore.rawIndexes.get(e);if(void 0===t)throw new d;this.transaction._rollbackLog.push((()=>{t.deleted=!1,this._rawObjectStore.rawIndexes.set(t.name,t),this.indexNames._push(t.name),this.indexNames._sort()})),this.indexNames=new K(...Array.from(this.indexNames).filter((t=>t!==e))),t.deleted=!0,this.transaction._execRequestAsync({operation:()=>{const n=this._rawObjectStore.rawIndexes.get(e);t===n&&this._rawObjectStore.rawIndexes.delete(e)},source:this})}count(e){return ae(this),null===e&&(e=void 0),void 0===e||e instanceof I||(e=I.only(S(e))),this.transaction._execRequestAsync({operation:()=>this._rawObjectStore.count(e),source:this})}get[Symbol.toStringTag](){return"IDBObjectStore"}}var ue=ce,le=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventPath=[],this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.canceled=!1,this.initialized=!0,this.dispatched=!1,this.target=null,this.currentTarget=null,this.eventPhase=0,this.defaultPrevented=!1,this.isTrusted=!1,this.timeStamp=Date.now(),this.type=e,this.bubbles=void 0!==t.bubbles&&t.bubbles,this.cancelable=void 0!==t.cancelable&&t.cancelable}preventDefault(){this.cancelable&&(this.canceled=!0)}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.propagationStopped=!0,this.immediatePropagationStopped=!0}};const de="undefined"!==typeof scheduler&&(e=>scheduler.postTask(e)),pe=e=>setTimeout(e,0),fe=e=>{(globalThis.setImmediate||function(){if("undefined"!==typeof navigator&&/jsdom/.test(navigator.userAgent))return new(0,Node.constructor)("return setImmediate")()}()||de||pe)(e)},he=["error","abort","complete"];class me extends U{constructor(e,t,n,r){super(),this._state="active",this._started=!1,this._rollbackLog=[],this._objectStoresCache=new Map,this._openRequest=null,this.error=null,this.onabort=null,this.oncomplete=null,this.onerror=null,this._prioritizedListeners=new Map,this._requests=[],this._createdIndexes=new Set,this._createdObjectStores=new Set,this._scope=new Set(e),this.mode=t,this.durability=n,this.db=r,this.objectStoreNames=new K(...Array.from(this._scope).sort());for(const i of he)this.addEventListener(i,(()=>{var e;null===(e=this._prioritizedListeners.get(i))||void 0===e||e()}))}_abort(e){for(const t of this._rollbackLog.reverse())t();if(null!==e){const t=new DOMException(void 0,e);this.error=t}for(const{request:t}of this._requests)"done"!==t.readyState&&(t.readyState="done",t.source&&fe((()=>{t.result=void 0,t.error=new a;const e=new le("error",{bubbles:!0,cancelable:!0});e.eventPath=[this.db,this];try{t.dispatchEvent(e)}catch(n){"active"===this._state&&this._abort("AbortError")}})));fe((()=>{const e="versionchange"===this.mode;e&&(this.db._rawDatabase.connections=this.db._rawDatabase.connections.filter((e=>!e._rawDatabase.transactions.includes(this))));const t=new le("abort",{bubbles:!0,cancelable:!1});if(t.eventPath=[this.db],this.dispatchEvent(t),e){const e=this._openRequest;e.transaction=null,e.result=void 0}})),this._state="finished"}abort(){if("committing"===this._state||"finished"===this._state)throw new l;this._state="active",this._abort(null)}objectStore(e){if("active"!==this._state)throw new l;const t=this._objectStoresCache.get(e);if(void 0!==t)return t;const n=this.db._rawDatabase.rawObjectStores.get(e);if(!this._scope.has(e)||void 0===n)throw new d;const r=new ue(this,n);return this._objectStoresCache.set(e,r),r}_execRequestAsync(e){const t=e.source,n=e.operation;let r=Object.hasOwn(e,"request")?e.request:null;if("active"!==this._state)throw new h;return r||(t?(r=new z,r.source=t,r.transaction=t.transaction):r=new z),this._requests.push({operation:n,request:r}),r}_start(){let e,t;for(this._started=!0;this._requests.length>0;){const n=this._requests.shift();if(n&&"done"!==n.request.readyState){t=n.request,e=n.operation;break}}if(t&&e){if(t.source){let i,o;try{const n=e();t.readyState="done",t.result=n,t.error=void 0,"inactive"===this._state&&(this._state="active"),o=new le("success",{bubbles:!1,cancelable:!1})}catch(n){t.readyState="done",t.result=void 0,t.error=n,"inactive"===this._state&&(this._state="active"),o=new le("error",{bubbles:!0,cancelable:!0}),i=this._abort.bind(this,n.name)}try{o.eventPath=[this.db,this],t.dispatchEvent(o)}catch(r){"active"===this._state&&(this._abort("AbortError"),i=void 0)}o.canceled||i&&i()}else e();fe(this._start.bind(this))}else if("finished"!==this._state&&(this._state="finished",!this.error)){const e=new le("complete");this.dispatchEvent(e)}}commit(){if("active"!==this._state)throw new l;this._state="committing"}get[Symbol.toStringTag](){return"IDBTransaction"}}var ge=me;const ve=9007199254740992;var ye=class{constructor(){this.num=0}next(){if(this.num>=ve)throw new s;return this.num+=1,this.num}setIfLarger(e){const t=Math.floor(Math.min(e,ve))-1;t>=this.num&&(this.num=t+1)}},be=class{constructor(e,t,n,r){this.deleted=!1,this.records=new ne(!0),this.rawIndexes=new Map,this.rawDatabase=e,this.keyGenerator=!0===r?new ye:null,this.deleted=!1,this.name=t,this.keyPath=n,this.autoIncrement=r}getKey(e){const t=this.records.get(e);return void 0!==t?structuredClone(t.key):void 0}getAllKeys(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(structuredClone(i.key)),r.length>=t)break;return r}getValue(e){const t=this.records.get(e);return void 0!==t?structuredClone(t.value):void 0}getAllValues(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(structuredClone(i.value)),r.length>=t)break;return r}getAllRecords(e,t,n){void 0!==t&&0!==t||(t=1/0);const r=[];for(const i of this.records.values(e,n))if(r.push(new J(structuredClone(i.key),structuredClone(i.key),structuredClone(i.value))),r.length>=t)break;return r}storeRecord(e,t,n){if(null!==this.keyPath){const t=T(this.keyPath,e.value).key;void 0!==t&&(e.key=t)}const r=[];if(null!==this.keyGenerator&&void 0===e.key){let t=!1;const i=this.keyGenerator.num,o=()=>{t||(t=!0,this.keyGenerator&&(this.keyGenerator.num=i))};if(r.push(o),n&&n.push(o),e.key=this.keyGenerator.next(),null!==this.keyPath){if(Array.isArray(this.keyPath))throw new Error("Cannot have an array key path in an object store with a key generator");let t,n=this.keyPath,r=e.value,i=0;for(;i>=0;){if("object"!==typeof r)throw new c;i=n.indexOf("."),i>=0&&(t=n.slice(0,i),n=n.slice(i+1),Object.hasOwn(r,t)||Object.defineProperty(r,t,{configurable:!0,enumerable:!0,writable:!0,value:{}}),r=r[t])}t=n,Object.defineProperty(r,t,{configurable:!0,enumerable:!0,writable:!0,value:e.key})}}else null!==this.keyGenerator&&"number"===typeof e.key&&this.keyGenerator.setIfLarger(e.key);const i=this.records.put(e,t);let o=!1;const a=()=>{o||(o=!0,i?this.storeRecord(i,!1):this.deleteRecord(e.key))};if(r.push(a),n&&n.push(a),i)for(const c of this.rawIndexes.values())c.records.deleteByValue(e.key);try{for(const t of this.rawIndexes.values())t.initialized&&t.storeRecord(e)}catch(s){if("ConstraintError"===s.name)for(const e of r)e();throw s}return e.key}deleteRecord(e,t){const n=this.records.delete(e);if(t)for(const r of n)t.push((()=>{this.storeRecord(r,!0)}));for(const r of this.rawIndexes.values())r.records.deleteByValue(e)}clear(e){const t=this.records.clear();if(e)for(const n of t)e.push((()=>{this.storeRecord(n,!0)}));for(const n of this.rawIndexes.values())n.records.clear()}count(e){if(void 0===e||void 0===e.lower&&void 0===e.upper)return this.records.size();let t=0;for(const n of this.records.values(e))t+=1;return t}};const we=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e._closePending=!0,e._rawDatabase.transactions.every((e=>"finished"===e._state))){if(e._closed=!0,e._rawDatabase.connections=e._rawDatabase.connections.filter((t=>e!==t)),t){const t=new le("close",{bubbles:!1,cancelable:!1});t.eventPath=[],e.dispatchEvent(t)}}else fe((()=>{we(e,t)}))};var Se=we;const Ce=e=>{let t;if(e._runningVersionchangeTransaction&&(t=e._rawDatabase.transactions.findLast((e=>"versionchange"===e.mode))),!t)throw new l;if("active"!==t._state)throw new h;return t};class _e extends U{constructor(e){super(),this._closePending=!1,this._closed=!1,this._runningVersionchangeTransaction=!1,this._rawDatabase=e,this._rawDatabase.connections.push(this),this.name=e.name,this.version=e.version,this.objectStoreNames=new K(...Array.from(e.rawObjectStores.keys()).sort())}createObjectStore(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e)throw new TypeError;const n=Ce(this),r=null!==t&&void 0!==t.keyPath?t.keyPath:null,i=null!==t&&void 0!==t.autoIncrement&&t.autoIncrement;if(null!==r&&oe(r),this._rawDatabase.rawObjectStores.has(e))throw new s;if(i&&(""===r||Array.isArray(r)))throw new u;const o=[...this.objectStoreNames],a=[...n.objectStoreNames],c=new be(this._rawDatabase,e,r,i);return this.objectStoreNames._push(e),this.objectStoreNames._sort(),n._scope.add(e),n._createdObjectStores.add(c),this._rawDatabase.rawObjectStores.set(e,c),n.objectStoreNames=new K(...this.objectStoreNames),n._rollbackLog.push((()=>{c.deleted=!0,this.objectStoreNames=new K(...o),n.objectStoreNames=new K(...a),n._scope.delete(c.name),this._rawDatabase.rawObjectStores.delete(c.name)})),n.objectStore(e)}deleteObjectStore(e){if(void 0===e)throw new TypeError;const t=Ce(this),n=this._rawDatabase.rawObjectStores.get(e);if(void 0===n)throw new d;this.objectStoreNames=new K(...Array.from(this.objectStoreNames).filter((t=>t!==e))),t.objectStoreNames=new K(...this.objectStoreNames);const r=t._objectStoresCache.get(e);let i;r&&(i=[...r.indexNames],r.indexNames=new K),t._rollbackLog.push((()=>{n.deleted=!1,this._rawDatabase.rawObjectStores.set(n.name,n),this.objectStoreNames._push(n.name),t.objectStoreNames._push(n.name),this.objectStoreNames._sort(),r&&i&&(r.indexNames=new K(...i))})),n.deleted=!0,this._rawDatabase.rawObjectStores.delete(e),t._objectStoresCache.delete(e)}transaction(e,t,n){var r;if("readonly"!==(t=void 0!==t?t:"readonly")&&"readwrite"!==t&&"versionchange"!==t)throw new TypeError("Invalid mode: "+t);if(this._rawDatabase.transactions.some((e=>"active"===e._state&&"versionchange"===e.mode&&e.db===this)))throw new l;if(this._closePending)throw new l;if(Array.isArray(e)||(e=[e]),0===e.length&&"versionchange"!==t)throw new u;for(const a of e)if(!this.objectStoreNames.contains(a))throw new d("No objectStore named "+a+" in this database");const i=null!==(r=null===n||void 0===n?void 0:n.durability)&&void 0!==r?r:"default";if("default"!==i&&"strict"!==i&&"relaxed"!==i)throw new TypeError(`'${i}' (value of 'durability' member of IDBTransactionOptions) is not a valid value for enumeration IDBTransactionDurability`);const o=new ge(e,t,i,this);return this._rawDatabase.transactions.push(o),this._rawDatabase.processTransactions(),o}close(){Se(this)}get[Symbol.toStringTag](){return"IDBDatabase"}}var Oe=_e;class Ee extends z{constructor(){super(...arguments),this.onupgradeneeded=null,this.onblocked=null}get[Symbol.toStringTag](){return"IDBOpenDBRequest"}}var Ie=Ee;class Ae extends le{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.newVersion=void 0!==t.newVersion?t.newVersion:null,this.oldVersion=void 0!==t.oldVersion?t.oldVersion:0}get[Symbol.toStringTag](){return"IDBVersionChangeEvent"}}var Te=Ae;function Pe(e,t){return"intersection"in e?e.intersection(t):new Set([...e].filter((e=>t.has(e))))}var Re=class{constructor(e,t){this.transactions=[],this.rawObjectStores=new Map,this.connections=[],this.name=e,this.version=t,this.processTransactions=this.processTransactions.bind(this)}processTransactions(){fe((()=>{const e=this.transactions.filter((e=>e._started&&"finished"!==e._state)),t=this.transactions.filter((e=>!e._started&&"finished"!==e._state)),n=t.find(((n,r)=>!e.some((e=>!("readonly"===n.mode&&"readonly"===e.mode)&&Pe(e._scope,n._scope).size>0))&&!t.slice(0,r).some((e=>Pe(e._scope,n._scope).size>0))));n&&(n.addEventListener("complete",this.processTransactions),n.addEventListener("abort",this.processTransactions),n._start())}))}};function ke(e,t,n){if(e<t)throw new TypeError(`${n}: At least ${t} ${1===t?"argument":"arguments"} required, but only ${arguments.length} passed`)}const De=(e,t,n)=>{var r;const i=null!==(r=e.get(t))&&void 0!==r?r:Promise.resolve();e.set(t,i.then(n))},Me=(e,t,n,r)=>{n.some((e=>!e._closed&&!e._closePending))?fe((()=>Me(e,t,n,r))):(e.delete(t),r(null))};class Ne{constructor(){this._databases=new Map,this._connectionQueues=new Map}cmp(e,t){return ke(arguments.length,2,"IDBFactory.cmp"),O(e,t)}deleteDatabase(e){ke(arguments.length,1,"IDBFactory.deleteDatabase");const t=new Ie;return t.source=null,fe((()=>{((e,t,n,r,i)=>{De(t,n,(()=>new Promise((t=>{const o=e.get(n),a=void 0!==o?o.version:0,s=e=>{try{e?i(e):i(null,a)}finally{t()}};try{const t=e.get(n);if(void 0===t)return void s(null);const i=t.connections.filter((e=>!e._closed));for(const e of i)e._closePending||fe((()=>{const n=new Te("versionchange",{newVersion:null,oldVersion:t.version});e.dispatchEvent(n)}));fe((()=>{i.some((e=>!e._closed&&!e._closePending))&&fe((()=>{const e=new Te("blocked",{newVersion:null,oldVersion:t.version});r.dispatchEvent(e)})),Me(e,n,i,s)}))}catch(c){s(c)}}))))})(this._databases,this._connectionQueues,e,t,((e,n)=>{if(e){t.error=new DOMException(e.message,e.name),t.readyState="done";const n=new le("error",{bubbles:!0,cancelable:!0});return n.eventPath=[],void t.dispatchEvent(n)}t.result=void 0,t.readyState="done";const r=new Te("success",{newVersion:null,oldVersion:n});t.dispatchEvent(r)}))})),t}open(e,t){if(ke(arguments.length,1,"IDBFactory.open"),arguments.length>1&&void 0!==t&&(t=V(t,"MAX_SAFE_INTEGER")),0===t)throw new TypeError("Database version cannot be 0");const n=new Ie;return n.source=null,fe((()=>{((e,t,n,r,i,o)=>{De(t,n,(()=>new Promise((t=>{const s=e=>{try{e?o(e):o(null,u)}finally{t()}};let c=e.get(n);if(void 0===c&&(c=new Re(n,0),e.set(n,c)),void 0===r&&(r=0!==c.version?c.version:1),c.version>r)return s(new m);const u=new Oe(c);c.version<r?((e,t,n,r)=>{e._runningVersionchangeTransaction=!0;const i=e._oldVersion=e.version,o=e._rawDatabase.connections.filter((t=>e!==t));for(const a of o)a._closed||a._closePending||fe((()=>{const e=new Te("versionchange",{newVersion:t,oldVersion:i});a.dispatchEvent(e)}));fe((()=>{o.some((e=>!e._closed&&!e._closePending))&&fe((()=>{const e=new Te("blocked",{newVersion:t,oldVersion:i});n.dispatchEvent(e)}));const s=()=>{if(o.some((e=>!e._closed&&!e._closePending)))return void fe(s);e._rawDatabase.version=t,e.version=t;const c=e.transaction(Array.from(e.objectStoreNames),"versionchange");c._openRequest=n,n.result=e,n.readyState="done",n.transaction=c,c._rollbackLog.push((()=>{e._rawDatabase.version=i,e.version=i})),c._state="active";const u=new Te("upgradeneeded",{newVersion:t,oldVersion:i});let l=!1;try{n.dispatchEvent(u)}catch(p){l=!0}const d=()=>{"active"===c._state&&(c._state="inactive",l&&c._abort("AbortError"))};l?d():fe(d),c._prioritizedListeners.set("error",(()=>{e._runningVersionchangeTransaction=!1,e._oldVersion=void 0})),c._prioritizedListeners.set("abort",(()=>{e._runningVersionchangeTransaction=!1,e._oldVersion=void 0,fe((()=>{n.transaction=null,r(new a)}))})),c._prioritizedListeners.set("complete",(()=>{e._runningVersionchangeTransaction=!1,e._oldVersion=void 0,fe((()=>{n.transaction=null,e._closePending?r(new a):r(null)}))}))};s()}))})(u,r,i,(e=>{s(e)})):s(null)}))))})(this._databases,this._connectionQueues,e,t,n,((e,t)=>{if(e){n.result=void 0,n.readyState="done",n.error=new DOMException(e.message,e.name);const t=new le("error",{bubbles:!0,cancelable:!0});return t.eventPath=[],void n.dispatchEvent(t)}n.result=t,n.readyState="done";const r=new le("success");r.eventPath=[],n.dispatchEvent(r)}))})),n}databases(){return Promise.resolve(Array.from(this._databases.entries(),(e=>{let[t,n]=e;const r=n.connections.find((e=>e._runningVersionchangeTransaction));return{name:t,version:r?r._oldVersion:n.version}})).filter((e=>{let{version:t}=e;return t>0})))}get[Symbol.toStringTag](){return"IDBFactory"}}var xe=new Ne;let Le;var je=n(466);const Ue=()=>new Promise((e=>{const t=function(e,t,n){if(void 0!==Le)return null===n||void 0===n||n("safeOpenIndexedDB.failure",{error:Le}),{value:xe.open(e,t),persistent:!1};try{const r=indexedDB.open(e,t);return null===n||void 0===n||n("safeOpenIndexedDB.success"),{value:r,persistent:!0}}catch(r){if(r instanceof TypeError)throw r;const i=r instanceof Error?r.message:"caught non-error: "+typeof r;!function(e){Le=e}(i);const o=xe.open(e,t);return null===n||void 0===n||n("safeOpenIndexedDB.failure",{error:i}),{value:o,persistent:!1}}}(je.a,je.b).value;t.onerror=()=>{e(r.Result.failure(t.error))},t.onblocked=()=>{e(r.Result.failure(new Error("Device pairing DB blocked")))},t.onsuccess=()=>{e(r.Result.success(t.result))},t.onupgradeneeded=n=>{const i=t.result;if(0===n.oldVersion)try{i.createObjectStore(je.g,{keyPath:je.c})}catch(o){return void e(r.Result.failure(o))}if(1===n.oldVersion){const e=t.transaction.objectStore(je.g).openCursor();e.onsuccess=()=>{const t=e.result;if(t){const e=t.value;null!==e.ktLoggableData&&"webAuthHmac"in e||t.delete(),t.continue()}}}n.oldVersion<3&&i.createObjectStore(je.f,{keyPath:je.c})}}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return me})),n.d(t,"b",(function(){return ge}));var r=n(870);function i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"===typeof Symbol&&Symbol.observable||"@@observable",a=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function c(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(i(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(i(1));return n(c)(e,t)}if("function"!==typeof e)throw new Error(i(2));var a=e,u=t,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function h(){if(p)throw new Error(i(3));return u}function m(e){if("function"!==typeof e)throw new Error(i(4));if(p)throw new Error(i(5));var t=!0;return f(),d.push(e),function(){if(t){if(p)throw new Error(i(6));t=!1,f();var n=d.indexOf(e);d.splice(n,1),l=null}}}function g(e){if(!function(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}(e))throw new Error(i(7));if("undefined"===typeof e.type)throw new Error(i(8));if(p)throw new Error(i(9));try{p=!0,u=a(u,e)}finally{p=!1}for(var t=l=d,n=0;n<t.length;n++)(0,t[n])();return e}return g({type:s.INIT}),(r={dispatch:g,subscribe:m,getState:h,replaceReducer:function(e){if("function"!==typeof e)throw new Error(i(10));a=e,g({type:s.REPLACE})}})[o]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(i(11));function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[o]=function(){return this},e},r}var u="dnd-core/INIT_COORDS",l="dnd-core/BEGIN_DRAG",d="dnd-core/PUBLISH_DRAG_SOURCE",p="dnd-core/HOVER",f="dnd-core/DROP",h="dnd-core/END_DRAG",m=function(e,t){return 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){y(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 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 b={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function w(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,r=arguments.length>1?arguments[1]:void 0,i=r.payload;switch(r.type){case u:case l:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case p:return e=n.clientOffset,t=i.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?n:v(v({},n),{},{clientOffset:i.clientOffset});case h:case f:return b;default:return n}}var S="dnd-core/ADD_SOURCE",C="dnd-core/ADD_TARGET",_="dnd-core/REMOVE_SOURCE",O="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(e)}function I(e){return"object"===E(e)}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 T(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){P(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 P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function k(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,r=arguments.length>1?arguments[1]:void 0,i=r.payload;switch(r.type){case l:return T(T({},n),{},{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case d:return T(T({},n),{},{isSourcePublic:!0});case p:return T(T({},n),{},{targetIds:i.targetIds});case O:return-1===n.targetIds.indexOf(i.targetId)?n:T(T({},n),{},{targetIds:(e=n.targetIds,t=i.targetId,e.filter((function(e){return e!==t})))});case f:return T(T({},n),{},{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case h:return T(T({},n),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return n}}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case S:case C:return e+1;case _:case O:return e-1;default:return e}}var M=[],N=[];function x(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case p:break;case S:case C:case O:case _:return M;default:return N}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,i=t.prevTargetIds,o=void 0===i?[]:i,a=function(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}(r,o),s=a.length>0||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;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}(r,o);if(!s)return M;var c=o[o.length-1],u=r[r.length-1];return c!==u&&(c&&a.push(c),u&&a.push(u)),a}function L(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function j(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?j(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(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,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:x(n.dirtyHandlerIds,{type:r.type,payload:U(U({},r.payload),{},{prevTargetIds:(e=n,t=[],"dragOperation.targetIds".split(".").reduce((function(e,n){return e&&e[n]?e[n]:t||null}),e))})}),dragOffset:w(n.dragOffset,r),refCount:D(n.refCount,r),dragOperation:k(n.dragOperation,r),stateId:L(n.stateId)}}M.__IS_NONE__=!0,N.__IS_ALL__=!0;var B=n(1500);function K(e,t){return{type:u,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var H={type:u,payload:{clientOffset:null,sourceClientOffset:null}};function W(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,o=n.clientOffset,a=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(K(o)),function(e,t,n){Object(B.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(B.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}(t,s,c);var u=function(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,s);if(null!==u){var d=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){Object(B.a)("function"===typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),d=a(u)}e.dispatch(K(o,d));var p=c.getSource(u).beginDrag(s,u);!function(e){Object(B.a)(I(e),"Item must be an object.")}(p),c.pinSource(u);var f=c.getSourceType(u);return{type:l,payload:{itemType:f,item:p,sourceId:u,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}e.dispatch(H)}}function q(e){return function(){if(e.getMonitor().isDragging())return{type:d}}}function V(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function $(e){return function(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){Object(B.a)(Array.isArray(e),"Expected targetIds to be an array.")}(t);var r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){Object(B.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(B.a)(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r<e.length;r++){var i=e[r];Object(B.a)(e.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);Object(B.a)(o,"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];V(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}(r,i,o),{type:p,payload:{targetIds:r,clientOffset:n||null}}}}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 Z(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){Q(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 Q(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){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();!function(e){Object(B.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(B.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);var i=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);i.forEach((function(i,o){var a=function(e,t,n,r){var i=n.getTarget(e),o=i?i.drop(r,e):void 0;return function(e){Object(B.a)("undefined"===typeof e||I(e),"Drop result must either be an object or undefined.")}(o),"undefined"===typeof o&&(o=0===t?{}:r.getDropResult()),o}(i,o,r,n),s={type:f,payload:{dropResult:Z(Z({},t),a)}};e.dispatch(s)}))}}function J(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(B.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:h}}}function X(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ee(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 te,ne=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;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}).handlerIds;Object(B.a)("function"===typeof e,"listener must be a function."),Object(B.a)("undefined"===typeof n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var r=this.store.getState().stateId;return this.store.subscribe((function(){var i=t.store.getState(),o=i.stateId;try{var a=o===r||o===r+1&&!function(e,t){return e!==M&&(e===N||"undefined"===typeof t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}(i.dirtyHandlerIds,n);a||e()}finally{r=o}}))}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(B.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(B.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(B.a)(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&V(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(B.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){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();if(r&&!V(n,r))return!1;var i=this.getTargetIds();if(!i.length)return!1;var o=i.indexOf(e);return t?o===i.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 function(e){var t,n,r=e.clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset;return r&&i&&o?X((n=o,{x:(t=r).x+n.x,y:t.y+n.y}),i):null}(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return function(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?X(t,n):null}(this.store.getState().dragOffset)}}],n&&ee(t.prototype,n),e}(),re=0;function ie(e){return ie="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},ie(e)}function oe(e,t){t&&Array.isArray(e)?e.forEach((function(e){return oe(e,!1)})):Object(B.a)("string"===typeof e||"symbol"===ie(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"}(te||(te={}));var ae=n(1501);function se(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 ce(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 ue(e){switch(e[0]){case"S":return te.SOURCE;case"T":return te.TARGET;default:Object(B.a)(!1,"Cannot parse handler ID: ".concat(e))}}function le(e,t){var n,r,i=e.entries(),o=!1;do{var a=i.next(),s=a.done;if((n=a.value,r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(n,r)||function(e,t){if(e){if("string"===typeof e)return ce(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)?ce(e,t):void 0}}(n,r)||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.")}())[1]===t)return!0;o=!!s}while(!o);return!1}var de=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;return t=e,n=[{key:"addSource",value:function(e,t){oe(e),function(e){Object(B.a)("function"===typeof e.canDrag,"Expected canDrag to be a function."),Object(B.a)("function"===typeof e.beginDrag,"Expected beginDrag to be a function."),Object(B.a)("function"===typeof e.endDrag,"Expected endDrag to be a function.")}(t);var n=this.addHandler(te.SOURCE,e,t);return this.store.dispatch(function(e){return{type:S,payload:{sourceId:e}}}(n)),n}},{key:"addTarget",value:function(e,t){oe(e,!0),function(e){Object(B.a)("function"===typeof e.canDrop,"Expected canDrop to be a function."),Object(B.a)("function"===typeof e.hover,"Expected hover to be a function."),Object(B.a)("function"===typeof e.drop,"Expected beginDrag to be a function.")}(t);var n=this.addHandler(te.TARGET,e,t);return this.store.dispatch(function(e){return{type:C,payload:{targetId:e}}}(n)),n}},{key:"containsHandler",value:function(e){return le(this.dragSources,e)||le(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(B.a)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return Object(B.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return Object(B.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(B.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return ue(e)===te.SOURCE}},{key:"isTargetId",value:function(e){return ue(e)===te.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(B.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:_,payload:{sourceId:e}}}(e)),Object(ae.asap)((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(B.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:O,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(B.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(B.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=function(e){var t=(re++).toString();switch(e){case te.SOURCE:return"S".concat(t);case te.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(r,t),e===te.SOURCE?this.dragSources.set(r,n):e===te.TARGET&&this.dropTargets.set(r,n),r}}],n&&se(t.prototype,n),e}();function pe(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 fe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(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=function(e){var t="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return c(z,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n);this.store=r,this.monitor=new ne(r,new de(r)),r.subscribe(this.handleRefCountChange)}var t,n;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:W(e),publishDragSource:q(e),hover:$(e),drop:Y(e),endDrag:J(e)}}(this);return Object.keys(n).reduce((function(r,i){var o,a=n[i];return r[i]=(o=a,function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=o.apply(e,r);"undefined"!==typeof a&&t(a)}),r}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],n&&pe(t.prototype,n),e}();function he(e,t,n,r){var i=new fe(r),o=e(i,t,n);return i.receiveBackend(o),i}var me=r.createContext({dragDropManager:void 0});function ge(e,t,n,r){return{dragDropManager:he(e,t,n,r)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Me}));var r=n(870),i=n(1215),o=n.n(i),a=n(2159),s=(n(465),n(908)),c=n(1431);class u{constructor(){this.connection=new s.a(c.a),this.stateInternal=Object(a.signal)(void 0),this.state=Object(a.computed)((()=>this.stateInternal.value)),this.showWhatsNewButtonInternal=Object(a.signal)(!1),this.showWhatsNewButton=Object(a.computed)((()=>this.showWhatsNewButtonInternal.value)),this.showAppMenu=e=>{this.connection.remoteObjectProxy.showAppMenu(e)},this.showCreationMenu=e=>{this.connection.remoteObjectProxy.showCreationMenu(e)},this.showAccountMenu=e=>{this.connection.remoteObjectProxy.showAccountMenu(e)},this.showHelpMenu=e=>{this.connection.remoteObjectProxy.showHelpMenu(e)},this.showWhatsNew=(e,t,n)=>this.connection.remoteObjectProxy.showWhatsNew(e,t,n).then((e=>(this.showWhatsNewButtonInternal.value=e.shouldShowButton,e))),this.getWhatsNewButtonVisibility=(e,t,n)=>this.connection.remoteObjectProxy.getWhatsNewButtonVisibility(e,t,n).then((e=>(this.showWhatsNewButtonInternal.value=e,e))),this.showOverflowMenu=(e,t,n)=>{this.connection.remoteObjectProxy.showOverflowMenu(e,t,n)},this.showStorageUsageWarning=e=>{this.connection.remoteObjectProxy.showStorageUsageWarning(e)},this.showADPAnnouncement=e=>{this.connection.remoteObjectProxy.showADPAnnouncement(e)},this.showBeneficiaryAnnouncement=e=>{this.connection.remoteObjectProxy.showBeneficiaryAnnouncement(e)},this.navigateToHomePage=()=>{this.connection.remoteObjectProxy.navigateToHomePage()},this.connection.exportedObject={setState:e=>{queueMicrotask((()=>{this.stateInternal.value=e}))}},this.connection.start()}close(){this.connection.close()}}let l;function d(){return null!==l&&void 0!==l?l:l=new u}var p=n(1229),f=n(1250),h=n(2259),m=n(911),g=n(878);Object(g.a)(Object(g.b)(),{"CloudOS.Authentication.SignInButton.Title":"Sign In","Name.Display.FirstAndFamilyNames":"%{firstName} %{familyName}","Name.Display.NameIsCJK.FirstAndFamilyNames":"%{familyName}%{firstName}","VoiceOver.CloudOSToolbar.ICloudLogo.Link.Label":"Navigate to icloud.com home page","VoiceOver.CloudOSToolbar.ICloudLogo.Logo.Label":"iCloud logo","CloudOSToolbar.ActionButtons.Feedback.Label":"Submit feedback","CloudOSToolbar.ActionButtons.AppMenu.Label":"Quick Access","CloudOSToolbar.ActionButtons.CreationMenu.Label":"Create","CloudOSToolbar.ActionButtons.AccountMenu.Label":"Account","CloudOSToolbar.ActionButtons.HelpMenu.Label":"Help","CloudOSToolbar.ActionButtons.ProfilePhoto.AltText":"Your profile photo","CloudOSToolbar.ActionButtons.AlertButton.Label.One":"1 Alert","CloudOSToolbar.ActionButtons.ADPButton.Label":"Advanced Data Protection","CloudOSToolbar.ActionButtons.BeneficiaryButton.Label":"Legacy Contact","CloudOSToolbar.ActionButtons.WhatsNew.Label":"NEW","VoiceOver.CloudOSToolbar.ActionsButtons.OverFlowMenu.Label":"More options"});var v=n(926);const y=Object(g.d)(),b=Object(v.a)();var w=n(2271);const S=e=>r.createElement("svg",{className:"square-grid",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M2.54982858,9.5141143 L7.18154287,9.5141143 C8.96725716,9.5141143 9.60897144,8.87234287 9.60897144,7.11457144 L9.60897144,2.48285715 C9.60897144,0.697142858 8.96725716,0.0554285715 7.18154287,0.0554285715 L2.54982858,0.0554285715 C0.792000001,0.0554285715 0.150285715,0.697142858 0.150285715,2.48285715 L0.150285715,7.11457144 C0.150285715,8.87234287 0.792000001,9.5141143 2.54982858,9.5141143 Z M19.2350857,9.5141143 L23.8668,9.5141143 C25.6245715,9.5141143 26.2663429,8.87234287 26.2663429,7.11457144 L26.2663429,2.48285715 C26.2663429,0.697142858 25.6245715,0.0554285715 23.8668,0.0554285715 L19.2350857,0.0554285715 C17.4493715,0.0554285715 16.8076572,0.697142858 16.8076572,2.48285715 L16.8076572,7.11457144 C16.8076572,8.87234287 17.4493715,9.5141143 19.2350857,9.5141143 Z M35.8924572,9.5141143 L40.5241715,9.5141143 C42.2819429,9.5141143 42.9237144,8.87234287 42.9237144,7.11457144 L42.9237144,2.48285715 C42.9237144,0.697142858 42.2819429,0.0554285715 40.5241715,0.0554285715 L35.8924572,0.0554285715 C34.1346286,0.0554285715 33.4929143,0.697142858 33.4929143,2.48285715 L33.4929143,7.11457144 C33.4929143,8.87234287 34.1346286,9.5141143 35.8924572,9.5141143 Z M52.5496001,9.5141143 L57.1816001,9.5141143 C58.9673144,9.5141143 59.6090287,8.87234287 59.6090287,7.11457144 L59.6090287,2.48285715 C59.6090287,0.697142858 58.9673144,0.0554285715 57.1816001,0.0554285715 L52.5496001,0.0554285715 C50.7918858,0.0554285715 50.1502858,0.697142858 50.1502858,2.48285715 L50.1502858,7.11457144 C50.1502858,8.87234287 50.7918858,9.5141143 52.5496001,9.5141143 Z M2.68931429,26.1714858 L7.32102858,26.1714858 C9.10674287,26.1714858 9.74845716,25.5297143 9.74845716,23.7719429 L9.74845716,19.1402286 C9.74845716,17.3824 9.10674287,16.7406857 7.32102858,16.7406857 L2.68931429,16.7406857 C0.931542859,16.7406857 0.289771429,17.3824 0.289771429,19.1402286 L0.289771429,23.7719429 C0.289771429,25.5297143 0.931542859,26.1714858 2.68931429,26.1714858 Z M19.3746286,26.1714858 L24.0062858,26.1714858 C25.7641143,26.1714858 26.4058286,25.5297143 26.4058286,23.7719429 L26.4058286,19.1402286 C26.4058286,17.3824 25.7641143,16.7406857 24.0062858,16.7406857 L19.3746286,16.7406857 C17.5889143,16.7406857 16.9471429,17.3824 16.9471429,19.1402286 L16.9471429,23.7719429 C16.9471429,25.5297143 17.5889143,26.1714858 19.3746286,26.1714858 Z M36.0319429,26.1714858 L40.6636572,26.1714858 C42.4214858,26.1714858 43.0632001,25.5297143 43.0632001,23.7719429 L43.0632001,19.1402286 C43.0632001,17.3824 42.4214858,16.7406857 40.6636572,16.7406857 L36.0319429,16.7406857 C34.2741715,16.7406857 33.6324001,17.3824 33.6324001,19.1402286 L33.6324001,23.7719429 C33.6324001,25.5297143 34.2741715,26.1714858 36.0319429,26.1714858 Z M52.7170287,26.1714858 L57.3210287,26.1714858 C59.106743,26.1714858 59.7484572,25.5297143 59.7484572,23.7719429 L59.7484572,19.1402286 C59.7484572,17.3824 59.106743,16.7406857 57.3210287,16.7406857 L52.7170287,16.7406857 C50.9313144,16.7406857 50.2896001,17.3824 50.2896001,19.1402286 L50.2896001,23.7719429 C50.2896001,25.5297143 50.9313144,26.1714858 52.7170287,26.1714858 Z M2.68931429,42.8567372 L7.32102858,42.8567372 C9.10674287,42.8567372 9.74845716,42.2150001 9.74845716,40.4292858 L9.74845716,35.8254858 C9.74845716,34.0397715 9.10674287,33.3980572 7.32102858,33.3980572 L2.68931429,33.3980572 C0.931542859,33.3980572 0.289771429,34.0397715 0.289771429,35.8254858 L0.289771429,40.4292858 C0.289771429,42.2150001 0.931542859,42.8567372 2.68931429,42.8567372 Z M19.3746286,42.8567372 L24.0062858,42.8567372 C25.7641143,42.8567372 26.4058286,42.2150001 26.4058286,40.4292858 L26.4058286,35.8254858 C26.4058286,34.0397715 25.7641143,33.3980572 24.0062858,33.3980572 L19.3746286,33.3980572 C17.5889143,33.3980572 16.9471429,34.0397715 16.9471429,35.8254858 L16.9471429,40.4292858 C16.9471429,42.2150001 17.5889143,42.8567372 19.3746286,42.8567372 Z M36.0319429,42.8567372 L40.6636572,42.8567372 C42.4214858,42.8567372 43.0632001,42.2150001 43.0632001,40.4292858 L43.0632001,35.8254858 C43.0632001,34.0397715 42.4214858,33.3980572 40.6636572,33.3980572 L36.0319429,33.3980572 C34.2741715,33.3980572 33.6324001,34.0397715 33.6324001,35.8254858 L33.6324001,40.4292858 C33.6324001,42.2150001 34.2741715,42.8567372 36.0319429,42.8567372 Z M52.7170287,42.8567372 L57.3210287,42.8567372 C59.106743,42.8567372 59.7484572,42.2150001 59.7484572,40.4292858 L59.7484572,35.8254858 C59.7484572,34.0397715 59.106743,33.3980572 57.3210287,33.3980572 L52.7170287,33.3980572 C50.9313144,33.3980572 50.2896001,34.0397715 50.2896001,35.8254858 L50.2896001,40.4292858 C50.2896001,42.2150001 50.9313144,42.8567372 52.7170287,42.8567372 Z",transform:"translate(2 10.571)"})),C=e=>r.createElement("svg",{className:"plus-circle",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M29.9475268,59.5867724 C46.1333288,59.5867724 59.534715,46.15661 59.534715,29.9998218 C59.534715,13.8140198 46.1043387,0.412871288 29.9185367,0.412871288 C13.7617248,0.412871288 0.36059406,13.8140198 0.36059406,29.9998218 C0.36059406,46.15661 13.7907743,59.5867724 29.9475268,59.5867724 Z M29.9475268,54.6556041 C16.256299,54.6556041 5.32073466,43.6910496 5.32073466,29.9998218 C5.32073466,16.3085941 16.2273089,5.34403961 29.9185367,5.34403961 C43.6097644,5.34403961 54.5743189,16.3085941 54.6035429,29.9998218 C54.6325367,43.6910496 43.6387545,54.6556041 29.9475268,54.6556041 Z M17.1265367,30.0288119 C17.1265367,31.4501585 18.1417842,32.4073664 19.6211109,32.4073664 L27.4819426,32.4073664 L27.4819426,40.3262377 C27.4819426,41.7765743 28.4682,42.7628318 29.8895466,42.7628318 C31.3398832,42.7628318 32.3551307,41.7765743 32.3551307,40.3262377 L32.3551307,32.4073664 L40.2449525,32.4073664 C41.6952892,32.4073664 42.7105367,31.4501585 42.7105367,30.0288119 C42.7105367,28.5784753 41.6952892,27.5632278 40.2449525,27.5632278 L32.3551307,27.5632278 L32.3551307,19.7023961 C32.3551307,18.1940198 31.3398832,17.2078218 29.8895466,17.2078218 C28.4682,17.2078218 27.4819426,18.2230693 27.4819426,19.7023961 L27.4819426,27.5632278 L19.6211109,27.5632278 C18.1417842,27.5632278 17.1265367,28.5784753 17.1265367,30.0288119 Z",transform:"translate(2 2)"})),_=e=>r.createElement("svg",{className:"person-crop-circle",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M29.9475268,59.5867724 C46.1333288,59.5867724 59.534715,46.15661 59.534715,29.9998218 C59.534715,13.8140198 46.1043387,0.412871288 29.9185367,0.412871288 C13.7617248,0.412871288 0.36059406,13.8140198 0.36059406,29.9998218 C0.36059406,46.15661 13.7907743,59.5867724 29.9475268,59.5867724 Z M29.9475268,39.8621585 C21.2165169,39.8621585 14.5159426,42.9948714 11.5572297,46.4756852 C7.67029902,42.0956436 5.32073466,36.3523367 5.32073466,29.9998218 C5.32073466,16.3085941 16.2273089,5.34403961 29.9185367,5.34403961 C43.6097644,5.34403961 54.5743189,16.3085941 54.6039513,29.9998218 C54.6325367,36.3523367 52.253804,42.1246337 48.3378832,46.4756852 C45.4081605,42.9948714 38.6785961,39.8621585 29.9475268,39.8621585 Z M29.9475268,34.9309902 C35.5458832,34.9889704 39.8968931,30.2318614 39.8968931,23.9954258 C39.8968931,18.1360396 35.5168337,13.291901 29.9475268,13.291901 C24.3782198,13.291901 19.9691703,18.1360396 19.9979358,23.9954258 C20.0272099,30.2318614 24.3782198,34.8729506 29.9475268,34.9309902 Z",transform:"translate(2 2)"})),O=e=>r.createElement("svg",{className:"sparkles ",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M35.644 61.814c.661 0 1.178-.467 1.294-1.167 1.851-14.32 3.88-16.519 18.043-18.098.733-.06 1.25-.605 1.25-1.283 0-.705-.517-1.216-1.25-1.305-14.163-1.579-16.192-3.75-18.043-18.076-.116-.722-.633-1.189-1.294-1.189-.69 0-1.206.467-1.295 1.19C32.47 36.21 30.442 38.381 16.28 39.96c-.733.089-1.222.6-1.222 1.305 0 .678.489 1.222 1.222 1.283 14.124 1.864 16.096 3.784 18.07 18.098.089.7.606 1.167 1.295 1.167Zm-17.73-28.919c.472 0 .8-.322.861-.793.947-6.988 1.173-6.97 8.4-8.378.444-.06.799-.383.799-.86 0-.505-.355-.822-.8-.883-7.226-1.025-7.48-1.251-8.399-8.35-.061-.504-.389-.826-.86-.826-.5 0-.828.322-.889.854-.863 6.982-1.24 6.942-8.399 8.322-.444.09-.8.378-.8.883s.356.8.91.86c7.105 1.158 7.426 1.34 8.29 8.322.06.527.388.85.888.85Zm12.619-17.994c.344 0 .533-.216.594-.505.773-4.244.717-4.44 5.252-5.252.322-.061.534-.256.534-.595 0-.338-.212-.533-.534-.594-4.535-.811-4.48-1.008-5.252-5.252-.06-.316-.25-.533-.594-.533-.317 0-.5.217-.561.533-.8 4.244-.717 4.44-5.258 5.252-.316.061-.527.256-.527.594 0 .34.21.534.527.595 4.54.811 4.458 1.008 5.258 5.252.06.289.244.505.56.505Z"})),E=e=>r.createElement("svg",{className:"ellipsis",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M12.9321097,6.8055484 C12.9321097,3.30883872 10.0968839,0.505161291 6.53720646,0.505161291 C3.07198065,0.505161291 0.236774194,3.30883872 0.236774194,6.8055484 C0.236774194,10.3022581 3.07198065,13.1059355 6.53720646,13.1059355 C10.0968839,13.1059355 12.9321097,10.3022581 12.9321097,6.8055484 Z M36.2435936,6.8055484 C36.2435936,3.30883872 33.4399162,0.505161291 29.9432065,0.505161291 C26.4779807,0.505161291 23.6743033,3.30883872 23.6743033,6.8055484 C23.6743033,10.3022581 26.4779807,13.1059355 29.9432065,13.1059355 C33.4399162,13.1059355 36.2435936,10.3022581 36.2435936,6.8055484 Z M59.6495291,6.8055484 C59.6495291,3.30883872 56.8459162,0.505161291 53.3492065,0.505161291 C49.7894646,0.505161291 46.9857872,3.30883872 46.9857872,6.8055484 C46.9857872,10.3022581 49.7894646,13.1059355 53.3492065,13.1059355 C56.8459162,13.1059355 59.6495291,10.3022581 59.6495291,6.8055484 Z",transform:"translate(2 25.226)"})),I=e=>r.createElement("svg",{className:"exclamation-bubble",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M16.2979266,55.8464588 C17.3461652,55.8464588 18.1256147,55.3088808 19.3888624,54.1262753 L29.0917982,45.2565639 L47.2612294,45.2834417 C55.2708992,45.3103195 59.5710827,40.8485946 59.5710827,32.9733579 L59.5710827,12.3849358 C59.5710827,4.50974313 55.2708992,0.0748623854 47.2612294,0.0748623854 L12.6425505,0.0748623854 C4.63293579,0.0748623854 0.332477065,4.4828257 0.332477065,12.3849358 L0.332477065,32.9733579 C0.332477065,40.8754735 4.63293579,45.2565639 12.6425505,45.2565639 L13.9057982,45.2565639 L13.9057982,53.0780368 C13.9057982,54.7444405 14.7658899,55.8464588 16.2979266,55.8464588 Z M29.9787523,27.651578 C28.5810826,27.651578 27.8016331,26.8721285 27.7747707,25.4475964 L27.4253395,10.8260367 C27.3984771,9.4015046 28.4467156,8.35326607 29.95189,8.35326607 C31.4301468,8.35326607 32.5321652,9.42836699 32.5052478,10.8528991 L32.1020918,25.4475964 C32.0752294,26.8989909 31.2957799,27.651578 29.9787523,27.651578 Z M29.9787523,36.6556514 C28.3660734,36.6556514 26.9684037,35.3924037 26.9684037,33.7797248 C26.9684037,32.1939083 28.3392111,30.9037982 29.9787523,30.9037982 C31.5914312,30.9037982 32.9621835,32.1670459 32.9621835,33.7797248 C32.9621835,35.4192661 31.5645689,36.6556514 29.9787523,36.6556514 Z",transform:"translate(2 3.927)"})),A=e=>r.createElement("svg",{viewBox:"0 0 99.61 99.657",xmlns:"http://www.w3.org/2000/svg",...e},r.createElement("path",{fill:"currentColor",d:"M49.805 99.61c27.246 0 49.805-22.608 49.805-49.805C99.61 22.559 77.002 0 49.756 0 22.56 0 0 22.559 0 49.805c0 27.197 22.608 49.804 49.805 49.804Z"}),r.createElement("path",{fill:"#fff",d:"M49.805 58.887c-2.54 0-3.955-1.416-4.004-4.004l-.635-26.612c-.049-2.587 1.856-4.443 4.59-4.443 2.686 0 4.688 1.904 4.639 4.492l-.684 26.563c-.049 2.636-1.465 4.004-3.906 4.004ZM49.805 75.244c-2.93 0-5.469-2.344-5.469-5.225 0-2.88 2.49-5.273 5.469-5.273 2.978 0 5.469 2.344 5.469 5.273 0 2.93-2.54 5.225-5.47 5.225Z"})),T=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"19","aria-hidden":"true",className:"lock-rectangle-stack-fill",...e},r.createElement("path",{d:"M3.323 1.282h10.364C13.616.445 13.126 0 12.25 0H4.76c-.885 0-1.375.445-1.437 1.282ZM1.646 3.825h13.708c-.125-.88-.573-1.388-1.562-1.388H3.219c-.99 0-1.438.509-1.573 1.388ZM2.74 19h11.52c1.782 0 2.74-.964 2.74-2.766V7.916c0-1.791-.958-2.755-2.74-2.755H2.74C.948 5.16 0 6.125 0 7.916v8.318C0 18.036.948 19 2.74 19Zm2.718-3.582v-3.306c0-.572.22-.88.657-.943v-.9c0-1.633.968-2.735 2.385-2.735 1.417 0 2.385 1.102 2.385 2.734v.901c.438.064.657.37.657.943v3.306c0 .668-.292.975-.896.975H6.354c-.604 0-.896-.307-.896-.975Zm1.823-4.28h2.427v-.965c0-.89-.479-1.484-1.208-1.484-.74 0-1.219.594-1.219 1.484v.964Z"})),P=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"18","aria-hidden":"true",className:"person-two-badge-heart",...e},r.createElement("path",{d:"M15.763 7.628c1.962 0 3.562-1.73 3.562-3.847 0-2.092-1.6-3.781-3.562-3.781-1.97 0-3.561 1.656-3.561 3.765 0 2.125 1.607 3.863 3.561 3.863Zm-9.497.075c1.698 0 3.091-1.525 3.091-3.395 0-1.828-1.377-3.303-3.091-3.303-1.699 0-3.092 1.5-3.092 3.32 0 1.862 1.393 3.378 3.092 3.378Zm9.497-1.319c-1.212 0-2.234-1.161-2.234-2.62 0-1.44 1.006-2.52 2.234-2.52s2.234 1.104 2.234 2.537c0 1.458-1.022 2.603-2.234 2.603Zm-9.497.091c-1.006 0-1.864-.964-1.864-2.15 0-1.162.85-2.093 1.864-2.093 1.038 0 1.871.915 1.871 2.076 0 1.203-.857 2.167-1.871 2.167Zm-4.584 8.782h6.472c-.396-.223-.701-.717-.643-1.22H1.476c-.165 0-.248-.065-.248-.23 0-2.043 2.334-3.946 5.03-3.946 1.038 0 1.97.247 2.77.717.263-.33.56-.618.931-.882-1.063-.692-2.341-1.054-3.702-1.054C2.803 8.642 0 11.146 0 13.88c0 .923.56 1.376 1.682 1.376Zm16.01 0a4.51 4.51 0 0 1-.198-1.244h-7.296c-.214 0-.305-.058-.305-.23 0-1.36 2.094-3.88 5.878-3.88 1.13 0 2.11.23 2.919.609.272-.363.585-.676.931-.948-1.063-.56-2.357-.906-3.85-.906-4.476 0-7.205 3.122-7.205 5.28 0 .907.651 1.319 2.028 1.319h7.098ZM22.812 18C25.079 18 27 16.097 27 13.815c0-2.298-1.896-4.185-4.188-4.185-2.3 0-4.188 1.887-4.188 4.185 0 2.299 1.888 4.185 4.188 4.185Zm-1.088-6.12c.47 0 .857.263 1.08.782.222-.52.602-.783 1.071-.783.775 0 1.328.569 1.328 1.368 0 1.178-1.253 2.265-2.045 2.784-.255.157-.453.157-.717-.008-.8-.503-2.036-1.598-2.036-2.776 0-.8.544-1.368 1.319-1.368Z"})),R=e=>r.createElement("svg",{viewBox:"0 0 82 31",height:31,xmlns:"http://www.w3.org/2000/svg",className:"apple-icloud-logo dark","aria-hidden":"true",...e},r.createElement("g",{fillRule:"nonzero"},r.createElement("path",{d:"M16.907 16.5h2.55V5.423h-2.55V16.5Zm1.28-12.832c.412 0 .763-.144 1.05-.43a1.41 1.41 0 0 0 .432-1.033c0-.407-.144-.753-.432-1.038a1.445 1.445 0 0 0-1.05-.426c-.407 0-.756.142-1.046.426-.291.285-.437.63-.437 1.038 0 .401.146.745.437 1.032.29.287.64.43 1.046.43v.001Zm9.915 13.156c1.14 0 2.157-.21 3.052-.631.864-.395 1.616-1 2.188-1.758.563-.752.908-1.624 1.037-2.619l.007-.091h-2.594l-.021.076a3.58 3.58 0 0 1-.713 1.465 3.35 3.35 0 0 1-1.258.943c-.5.219-1.065.328-1.695.328-.847 0-1.582-.22-2.204-.663-.623-.442-1.103-1.07-1.441-1.884-.338-.813-.507-1.776-.507-2.886v-.016c0-1.115.17-2.076.507-2.886.338-.81.817-1.434 1.439-1.875.62-.44 1.354-.66 2.199-.66.634 0 1.201.117 1.702.351.501.235.92.565 1.257.99.338.425.572.926.705 1.505l.026.105h2.59l-.004-.093c-.118-1.006-.46-1.895-1.028-2.668a5.886 5.886 0 0 0-2.204-1.819c-.901-.439-1.916-.658-3.044-.658-1.405 0-2.619.311-3.642.935-1.022.624-1.812 1.511-2.368 2.663-.556 1.152-.834 2.523-.834 4.113v.016c0 1.588.278 2.958.834 4.11.555 1.154 1.346 2.043 2.372 2.669 1.026.625 2.24.938 3.642.938Zm8.034-.324h2.55V1.24h-2.55V16.5Zm9.534.222c1.1 0 2.049-.231 2.846-.693.797-.461 1.413-1.122 1.846-1.982.434-.86.65-1.886.65-3.08v-.02c0-1.191-.218-2.216-.655-3.074a4.68 4.68 0 0 0-1.852-1.98c-.798-.46-1.744-.691-2.838-.691-1.086 0-2.03.23-2.829.694a4.69 4.69 0 0 0-1.855 1.981c-.438.859-.656 1.882-.656 3.07v.02c0 1.191.216 2.217.65 3.078.434.86 1.05 1.522 1.85 1.984.8.462 1.747.693 2.843.693Zm.004-2.066c-.572 0-1.063-.146-1.472-.436-.408-.291-.722-.711-.941-1.261-.219-.55-.329-1.213-.329-1.99v-.02c0-.776.11-1.438.33-1.985.22-.548.535-.967.944-1.259.408-.291.896-.437 1.461-.437.571 0 1.06.145 1.469.436.408.29.721.71.941 1.258.22.549.33 1.21.33 1.987v.02c0 .776-.11 1.438-.328 1.988-.218.55-.53.97-.936 1.262-.406.29-.896.437-1.469.437Zm10.596 2.066c.497.008.991-.071 1.46-.233.43-.156.798-.378 1.106-.668.309-.29.557-.639.73-1.026h.13V16.5h2.55V5.423h-2.55v6.444c0 .41-.055.782-.165 1.114a2.33 2.33 0 0 1-.485.853 2.153 2.153 0 0 1-.783.546 2.744 2.744 0 0 1-1.054.191c-.754 0-1.307-.216-1.657-.647-.35-.431-.526-1.063-.526-1.894V5.423h-2.55v7.166c0 .867.144 1.61.433 2.228.289.618.716 1.09 1.281 1.416.566.326 1.259.489 2.08.489Zm12.084-.024c.525 0 1.005-.08 1.441-.24a3.453 3.453 0 0 0 1.955-1.747h.13V16.5h2.55V1.24h-2.55v5.997h-.13a3.292 3.292 0 0 0-.802-1.073c-.338-.3-.727-.53-1.167-.694a4.093 4.093 0 0 0-1.433-.244c-.932 0-1.739.23-2.42.693-.681.463-1.207 1.122-1.579 1.978-.371.855-.557 1.873-.557 3.055v.016c0 1.175.186 2.19.559 3.049.372.858.9 1.52 1.585 1.984.684.464 1.49.697 2.418.697Zm.783-2.15c-.566 0-1.054-.145-1.466-.432-.412-.287-.728-.699-.95-1.235-.22-.536-.33-1.174-.33-1.913v-.016c0-.742.11-1.38.331-1.912.222-.533.539-.944.95-1.232.412-.288.9-.432 1.465-.432.56 0 1.046.146 1.46.436.413.29.735.703.964 1.237.228.534.343 1.169.343 1.906v.016c0 .732-.114 1.366-.34 1.902-.227.536-.548.95-.963 1.24-.415.29-.903.434-1.464.434v.001ZM8.856 3.158C9.35 2.56 9.7 1.745 9.7.92c0-.114-.01-.227-.03-.32-.805.03-1.774.536-2.351 1.217-.454.516-.877 1.341-.877 2.167 0 .123.02.247.031.288.052.01.134.021.217.021.721 0 1.629-.485 2.165-1.135h.001Zm.567 1.31c-1.207 0-2.186.733-2.815.733-.67 0-1.546-.691-2.598-.691C2.02 4.51 0 6.16 0 9.265c0 1.94.742 3.982 1.67 5.303.794 1.114 1.485 2.032 2.485 2.032.99 0 1.422-.66 2.65-.66 1.247 0 1.525.64 2.618.64 1.082 0 1.804-.991 2.484-1.971.763-1.124 1.083-2.218 1.093-2.27-.062-.02-2.134-.866-2.134-3.239 0-2.053 1.629-2.97 1.722-3.043-1.073-1.547-2.712-1.589-3.165-1.589Z",transform:"translate(2.5 6.5)"}))),k=e=>r.createElement("svg",{viewBox:"0 0 56 30",xmlns:"http://www.w3.org/2000/svg",className:"apple-icloud-logo dark",height:30,...e},r.createElement("g",{fillRule:"nonzero"},r.createElement("path",{d:"M1.396 18h2.308V7.891H1.396V18Zm1.16-11.783c.378 0 .7-.132.967-.397.266-.265.4-.583.4-.954 0-.377-.134-.697-.4-.96a1.327 1.327 0 0 0-.968-.394c-.372 0-.693.131-.962.394a1.29 1.29 0 0 0-.404.96c0 .37.134.689.404.954s.59.397.962.397ZM11.666 18.324c1.032 0 1.952-.188 2.76-.564a5.142 5.142 0 0 0 1.971-1.57c.507-.672.82-1.454.936-2.347l.004-.076H14.99l-.018.06a3.035 3.035 0 0 1-.628 1.29 3.037 3.037 0 0 1-1.139.842 3.821 3.821 0 0 1-1.537.296c-.763 0-1.422-.201-1.979-.603-.556-.402-.985-.972-1.286-1.712-.302-.74-.452-1.616-.452-2.627v-.018c0-1.015.15-1.891.452-2.629.3-.737.73-1.306 1.286-1.707.556-.4 1.213-.6 1.97-.6.568 0 1.08.107 1.535.324.455.217.837.52 1.146.912.308.39.52.85.634 1.379l.013.057h2.341l.002-.081a4.96 4.96 0 0 0-.926-2.415 5.317 5.317 0 0 0-1.994-1.649c-.816-.398-1.733-.597-2.75-.597-1.267 0-2.36.284-3.278.85-.919.568-1.627 1.375-2.126 2.422-.498 1.046-.747 2.292-.747 3.737v.018c0 1.441.249 2.685.747 3.732.498 1.047 1.208 1.855 2.13 2.423.922.568 2.015.853 3.28.853ZM19.122 18h2.308V3.996h-2.308zM27.983 18.202c1.01 0 1.879-.21 2.605-.632a4.213 4.213 0 0 0 1.677-1.809c.392-.784.588-1.72.588-2.81v-.018c0-1.087-.198-2.022-.593-2.805A4.24 4.24 0 0 0 30.58 8.32c-.727-.421-1.592-.632-2.597-.632-.998 0-1.861.211-2.59.633a4.251 4.251 0 0 0-1.686 1.809c-.395.783-.593 1.717-.593 2.802v.019c0 1.088.196 2.024.589 2.809a4.215 4.215 0 0 0 1.681 1.81c.729.42 1.595.631 2.6.631Zm0-1.87c-.53 0-.982-.133-1.356-.4-.373-.267-.659-.653-.856-1.156-.198-.504-.297-1.111-.297-1.822v-.018c0-.711.1-1.318.298-1.82.199-.502.485-.888.858-1.156.374-.268.824-.402 1.352-.402.53 0 .982.134 1.355.402.372.268.658.653.857 1.156.198.502.297 1.109.297 1.82v.018c0 .709-.098 1.315-.296 1.82-.197.503-.482.889-.854 1.157s-.825.402-1.357.402ZM37.808 18.202c.734 0 1.352-.155 1.856-.465a2.77 2.77 0 0 0 1.111-1.28h.15V18h2.308V7.891h-2.308v5.891c0 .5-.087.936-.262 1.308a1.942 1.942 0 0 1-.773.862c-.34.203-.756.304-1.248.304-.695 0-1.198-.197-1.51-.593-.312-.395-.468-.981-.468-1.759V7.891h-2.307v6.54c0 .797.13 1.478.389 2.042.26.564.646.993 1.16 1.287.513.295 1.147.442 1.902.442ZM48.98 18.17c.715 0 1.337-.155 1.867-.466a3.06 3.06 0 0 0 1.211-1.299h.15V18h2.308V3.996h-2.308V9.51h-.15a2.995 2.995 0 0 0-1.215-1.308c-.546-.32-1.167-.481-1.863-.481-.854 0-1.591.21-2.212.633-.62.421-1.1 1.022-1.437 1.801-.337.78-.505 1.707-.505 2.781v.018c0 1.067.17 1.991.51 2.773.339.781.82 1.384 1.444 1.808.623.423 1.357.635 2.2.635Zm.719-1.946c-.521 0-.97-.13-1.348-.393-.378-.262-.668-.638-.87-1.127-.204-.49-.305-1.073-.305-1.75v-.018c0-.679.101-1.262.304-1.75.203-.487.494-.862.872-1.125s.827-.394 1.347-.394.969.132 1.349.396c.38.265.672.64.88 1.128.206.488.31 1.07.31 1.748v.018c0 .672-.103 1.253-.31 1.742-.205.49-.497.867-.877 1.13-.38.264-.831.395-1.352.395Z"}),r.createElement("g",null,r.createElement("path",{d:"M6.206 22.303H3.861v-1.036h-.742v1.036H.774V27.7h.728v-.406h3.976v.406h.728v-5.397Zm-4.704 4.284v-1.554h1.617v1.554H1.502Zm2.359 0v-1.554h1.617v1.554H3.861Zm-2.359-2.226v-1.365h1.617v1.365H1.502Zm2.359-1.365h1.617v1.365H3.861v-1.365ZM7.865 21.589v.707h5.04v-.707h-5.04Zm-.679 1.925v.728h2.226c-.672 1.351-1.218 2.177-1.638 2.485a.853.853 0 0 1-.175.077l.189.742a68.23 68.23 0 0 0 4.557-.469c.126.238.238.469.343.707l.658-.462c-.35-.693-.84-1.512-1.47-2.45l-.588.364c.252.399.483.791.7 1.176a47.161 47.161 0 0 1-3.304.35c.448-.518.959-1.358 1.54-2.52h3.311v-.728H7.186ZM16.503 21.253v5.523h-2.429v.714h6.293v-.714h-3.108v-2.737h2.59v-.707h-2.59v-2.079zM20.927 23.507v.616h6.286v-.616h-2.779v-.294h2.037v-1.526h-2.037v-.413h-.728v.413h-2.023v1.526h2.023v.294h-2.779Zm4.844-.854h-1.337v-.406h1.337v.406Zm-2.065 0h-1.323v-.406h1.323v.406Zm2.695 1.743h-4.592v2.191h.707v-1.561h3.171v1.477h.714v-2.107Zm-2.611.875c-.049.637-.238 1.085-.56 1.337-.364.266-1.127.42-2.275.462l.294.665c1.386-.105 2.247-.336 2.597-.693.336-.273.56-.84.658-1.701l-.714-.07Zm.854 1.127-.371.553c.868.203 1.708.483 2.52.847l.392-.616a17.271 17.271 0 0 0-2.541-.784ZM28.298 22.947a8.19 8.19 0 0 1-.511 2.016l.658.224a9.797 9.797 0 0 0 .476-2.072l-.623-.168Zm2.877-1.435v5.985h.7v-3.906c.21.427.399.91.574 1.449l.588-.301c-.21-.623-.455-1.19-.735-1.708l-.427.196v-1.715h-.7Zm1.932-.224v6.447h.693v-6.447h-.693Zm-2.751 1.806-.455.203v-1.953h-.693v2.163c-.014 1.722-.399 2.975-1.155 3.759l.546.483c.84-.882 1.274-2.268 1.302-4.158.224.448.427.959.609 1.526l.588-.301a11.478 11.478 0 0 0-.742-1.722ZM35.27 21.302l-.511.483c.504.406.889.784 1.162 1.134l.525-.518a9.032 9.032 0 0 0-1.176-1.099Zm3.983 6.314h1.603l.182-.721c-.196.014-.469.028-.826.042-.364 0-.714.007-1.064.007-.532 0-1.001-.007-1.4-.014-.406-.014-.707-.07-.91-.175a1.812 1.812 0 0 1-.476-.413l-.07-.07v-2.667h-1.603v.672h.924v1.918c-.28.154-.588.511-.938 1.071l.539.504c.35-.63.588-.945.721-.945.084 0 .168.056.259.175.203.238.441.399.721.483.294.07.658.112 1.106.119.441.007.854.014 1.232.014Zm-2.121-6.041v.672h3.304v-.672h-3.304Zm-.448 1.575v.693h1.393c-.518 1.218-.917 1.869-1.197 1.953l.182.637c1.211-.126 2.191-.287 2.947-.483.07.189.133.385.203.595l.651-.161a12.805 12.805 0 0 0-.966-2.198l-.595.196c.161.301.315.616.455.945-.518.133-1.141.245-1.876.343.308-.448.616-1.057.924-1.827h2.142v-.693h-4.263ZM42.823 23.78v1.533h3.696V23.78h-3.696Zm3.024.994h-2.352v-.448h2.352v.448Zm1.323.868h-4.977v2.093h.714v-.259h3.556v.259h.707v-2.093Zm-4.263 1.218v-.616h3.556v.616h-3.556Zm-1.295-5.194v.637h1.491v.336h.728v-.336h1.638v.336h.728v-.336h1.491v-.637h-1.491v-.406h-.728v.406h-1.638v-.406h-.728v.406h-1.491Zm5.957 1.155h-5.838v1.47h.7v-.854h4.438v.819h.7v-1.435Z"})))),D=e=>r.createElement("svg",{className:"chevron-forward-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",...e},r.createElement("path",{d:"M3.03658696,55.4997197 C3.84723914,55.4997197 4.54982609,55.1684284 5.09054349,54.600861 L30.3121305,29.9684348 C30.9003261,29.3464566 31.2385435,28.6370218 31.2385435,27.8325653 C31.2385435,27.0280435 30.8934783,26.2441957 30.3052174,25.6897827 L5.08363044,1.01667391 C4.54297827,0.482869566 3.84723914,0.158478261 3.03658696,0.158478261 C1.37452174,0.158478261 0.104347826,1.4355 0.104347826,3.09065218 C0.104347826,3.86073914 0.44876087,4.61080436 0.948847828,5.17839131 L25.8417392,29.5089783 L25.8417392,26.1085435 L0.948847828,50.4866877 C0.44876087,51.0473694 0.104347826,51.7637023 0.104347826,52.5675327 C0.104347826,54.2227044 1.37452174,55.4997197 3.03658696,55.4997197 Z M31.4799783,55.4997197 C32.2906957,55.4997197 32.9932827,55.1684284 33.5340001,54.600861 L58.7557175,29.9684348 C59.3439784,29.3464566 59.6818044,28.6370218 59.6818044,27.8325653 C59.6818044,27.0280435 59.3368044,26.2441957 58.7485436,25.6897827 L33.527087,1.01667391 C32.9864348,0.482869566 32.2906957,0.158478261 31.4799783,0.158478261 C29.8179783,0.158478261 28.5478044,1.4355 28.5478044,3.09065218 C28.5478044,3.86073914 28.8922174,4.61080436 29.3923044,5.17839131 L54.2851957,29.5089783 L54.2851957,26.1085435 L29.3923044,50.4866877 C28.8922174,51.0473694 28.5478044,51.7637023 28.5478044,52.5675327 C28.5478044,54.2227044 29.8179783,55.4997197 31.4799783,55.4997197 Z",transform:"translate(2 3.957)"}));var M=n(880),N=n(988);let x;function L(){return null!==x&&void 0!==x?x:x=new N.MeCardController}function j(e){return L().addEventListener("change",e),()=>{L().removeEventListener("change",e)}}function U(){return L().photo}function F(e){return L().addEventListener("fetchingchange",e),()=>{L().removeEventListener("fetchingchange",e)}}function z(){return L().isFetching}let B=!1;const K=28;function H(){var e,t;const n=d().state,i=null!==(e=function(e){const t=Object(M.useSyncExternalStore)(j,U),n=Object(M.useSyncExternalStore)(F,z);return Object(r.useEffect)((()=>{!e||n||null!==t||B||(B=!0,L().refresh())}),[e,n,t]),Object(r.useDebugValue)(t),t}(Object(a.useComputed)((()=>{var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.isAuthenticated)&&void 0!==e&&e}),[n])))&&void 0!==e?e:void 0,o=function(e){const[t,n]=r.useState(void 0);return r.useEffect((()=>{if(e){const t=new Image;return t.onload=function(){n({width:this.width,height:this.height})},t.src=e,()=>{t.onload=null}}n(void 0)}),[e]),t}(null!==(t=null===i||void 0===i?void 0:i.url)&&void 0!==t?t:""),s=r.useRef(null===i||void 0===i?void 0:i.url),[c,u]=r.useState(!1);r.useEffect((()=>{(null===i||void 0===i?void 0:i.url)!==s.current&&(s.current=null===i||void 0===i?void 0:i.url,u(!1))}),[null===i||void 0===i?void 0:i.url]);const l=(null===i||void 0===i?void 0:i.crop)&&(null===i||void 0===i?void 0:i.crop.height)>0&&(null===i||void 0===i?void 0:i.crop.width)>0&&o?function(e,t){let n=e.x,r=t.height-e.y-e.height;const i=Math.min(e.width,e.height),o=i,a=i;return e.width>e.height?n+=(e.width-e.height)/2:e.height>e.width&&(r+=(e.height-e.width)/2),{top:r,left:n,width:o,height:a}}(i.crop,o):void 0;return r.createElement("div",{className:"profile-photo",style:{width:K,height:K}},!c&&null!==i&&void 0!==i&&i.url?r.createElement(w.b,{className:l?void 0:"no-crop",style:{width:K,height:K},src:null===i||void 0===i?void 0:i.url,crop:l,onLoadFailure:()=>{u(!0)},alt:y("CloudOSToolbar.ActionButtons.ProfilePhoto.AltText")}):r.createElement(_,{width:K,height:K}))}var W=n(1326);const q=r.forwardRef((function(e,t){let{label:n,children:i,className:a,isOpenKey:s,navbarState:c,onActivate:u}=e;const[l,d]=function(){const e=Object(r.useRef)(null);return[e,Object(r.useCallback)((()=>{const t=e.current;if(t)return{width:t.offsetWidth,height:t.offsetHeight,x:t.offsetLeft,y:t.offsetTop}}),[])]}(),[p,f]=function(e,t){const[n,i]=Object(r.useState)(!1);Object(r.useEffect)((()=>{e[t]&&n&&i(!1)}),[e,t,n]);const o=t in e;return[e[t]||n,Object(r.useCallback)((()=>{o&&i(!0)}),[o])]}(c,s);return r.createElement(h.a,{className:o()(p&&"open",a),onActivate:r.useCallback((()=>{const e=d();e&&(u(e),f())}),[d,f,u]),ariaHasPopup:"menu",ariaLabel:n,tooltip:n,ref:Object(W.a)(t,l)},i)}));function V(e){let{navbarState:t}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.AccountMenu.Label"),isOpenKey:"isAccountMenuOpen",navbarState:t,onActivate:$},r.createElement(H,null))}function $(e){d().showAccountMenu(e)}function G(e){let{navbarState:t}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.ADPButton.Label"),isOpenKey:"isADPAnnouncementOpen",navbarState:t,onActivate:Z},r.createElement(T,{height:19,width:17}))}function Z(e){d().showADPAnnouncement(e)}const Q=r.forwardRef((function(e,t){let{navbarState:n}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.AppMenu.Label"),isOpenKey:"isAppMenuOpen",navbarState:n,onActivate:Y,ref:t},r.createElement(S,{height:22,width:22,"aria-hidden":!0}))}));function Y(e){d().showAppMenu(e)}function J(e){let{navbarState:t}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.BeneficiaryButton.Label"),isOpenKey:"isBeneficiaryAnnouncementOpen",navbarState:t,onActivate:X},r.createElement(P,{height:18,width:27}))}function X(e){d().showBeneficiaryAnnouncement(e)}function ee(e){let{navbarState:t}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.CreationMenu.Label"),isOpenKey:"isCreationMenuOpen",navbarState:t,onActivate:te},r.createElement(C,{height:18,width:18,"aria-hidden":!0}))}function te(e){d().showCreationMenu(e)}function ne(e){let{navbarState:t}=e;return r.createElement(q,{label:b("CloudOSToolbar.ActionButtons.HelpMenu.Label"),className:"help-menu-button",isOpenKey:"isHelpMenuOpen",navbarState:t,onActivate:re},r.createElement(E,{height:22,width:22,"aria-hidden":!0}))}function re(e){d().showHelpMenu(e)}function ie(e){let{buttonsToMerge:t,navbarState:n,whatsNewOptions:i}=e;return r.createElement(q,{label:b("VoiceOver.CloudOSToolbar.ActionsButtons.OverFlowMenu.Label"),isOpenKey:"isOverflowMenuOpen",navbarState:n,onActivate:e=>d().showOverflowMenu(t,i,e)},r.createElement(D,{width:"18","aria-hidden":!0}))}var oe=n(981);let ae;function se(){return null!==ae&&void 0!==ae?ae:ae=new oe.QuotaController}function ce(e){return se().addEventListener("change",e),()=>{se().removeEventListener("change",e)}}function ue(){return se().storageQuota}function le(){const e=Object(M.useSyncExternalStore)(ce,ue);return Object(r.useDebugValue)(e),e}function de(){const e=le();return!!e&&(e.quotaStatus["almost-full"]||e.quotaStatus.overQuota)}function pe(e){let{navbarState:t}=e;const n=function(){const e=le();return null===e||void 0===e?void 0:e.quotaStatus}();return r.createElement(r.Fragment,null,n&&r.createElement(q,{label:y("CloudOSToolbar.ActionButtons.AlertButton.Label.One"),isOpenKey:"isStorageUsageWarningOpen",navbarState:t,onActivate:fe},r.createElement(A,{className:o()("exclamation-mark-circle",n.overQuota?"full":"almost-full"),height:20,width:20,"aria-hidden":!0})))}function fe(e){d().showStorageUsageWarning(e)}const he=window.location.hostname.endsWith(".cn"),me=["Create"],ge=["Feedback","BeneficiaryAnnouncement","ADPAnnouncement","StorageWarning","WhatsNew"];function ve(e){return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}function ye(e,t){return e()-t()-30}function be(e){return r.createElement("div",{className:"action-buttons"},e.navbarState.isAuthenticated?e.navbarState.isWebAccessBlocked?r.createElement(V,{navbarState:e.navbarState}):r.createElement(we,{...e}):r.createElement(ne,{navbarState:e.navbarState}))}function we(e){var t,n,i;let{navbarState:a,appTitle:s="",whatsNewButton:c,appAccentColor:u="",onFeedbackPress:l,appSwitcherButtonRef:g}=e;const v="compact"===Object(p.d)(),b=a.isAuthenticated&&null!==(t=null===c||void 0===c?void 0:c.newFeatures)&&void 0!==t?t:[],w=Object(f.a)();function S(){var e,t;return null!==(e=null===(t=document.getElementsByClassName("cloudos-toolbar"))||void 0===t||null===(t=t[0])||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==e?e:0}function C(){var e,t;const n=document.querySelector(".cloudos-toolbar > .icloud-logo"),r=null!==(e=null===n||void 0===n?void 0:n.getBoundingClientRect().width)&&void 0!==e?e:0,i=document.querySelector(".cloudos-toolbar > svg.app-name");return r+(null!==(t=null===i||void 0===i?void 0:i.getBBox().width)&&void 0!==t?t:0)}r.useEffect((()=>ve(w)),[w]);const _=ye(S,C);r.useEffect((()=>{if(_<=0){const e=()=>{const e=ye(S,C)>0;return e&&w(),e};e()||requestAnimationFrame((()=>{e()}))}}),[]);const E={Account:44,QuickSwitch:44,StorageWarning:de()?44:0,BeneficiaryAnnouncement:a.isBeneficiary?44:0,ADPAnnouncement:a.isADP?44:0,Feedback:/^(carry|beta|future|sprinkles)\.icloud\.com$/.test(window.location.hostname)?44:0,Create:44,WhatsNew:b.length?44:0},{buttonsToRender:A,buttonsToMerge:T}=function(e,t){const n=new Set(Object.entries(e).filter((e=>e[1])).map((e=>e[0]))),r=[];let i=Object.values(e).reduce(((e,t)=>e+t),0),o=0;for(;i>t&&o<me.length;){const t=me[o],r=e[t];r&&(i-=r,n.delete(t)),o++}if(i<=t)return{buttonsToRender:n,buttonsToMerge:[]};const a=ge.filter((t=>!!e[t]));if(0===a.length||1===a.length)return{buttonsToRender:n,buttonsToMerge:[]};for(i+=44,n.add("Overflow"),o=0;i>t&&o<a.length;){const t=a[o],s=e[t];s&&(i-=s,n.delete(t),r.push(t)),o++}return{buttonsToRender:n,buttonsToMerge:r}}(E,_);return r.createElement(r.Fragment,null,A.has("WhatsNew")&&r.createElement("div",{className:o()("new-features-wrapper","notes3"===(null===c||void 0===c?void 0:c.authBagId)&&"notes-tint")},r.createElement(h.a,{onActivate:()=>{var e;if(!c)return;const{version:t,authBagId:n}=c;d().showWhatsNew(b,t,{appTitle:s,color:null!==(e=c.color)&&void 0!==e?e:u,isAutoDisplaying:!1,authBagId:n,featureLaunchDate:c.featureLaunchDate})},className:"new-features",ariaLabel:y("CloudOSToolbar.ActionButtons.WhatsNew.Label"),ariaHasPopup:"dialog",variant:v?"push primary":"block primary"},v?r.createElement(O,{height:22,width:22}):y("CloudOSToolbar.ActionButtons.WhatsNew.Label"))),A.has("StorageWarning")&&r.createElement(pe,{navbarState:a}),A.has("Feedback")&&r.createElement(h.a,{onActivate:null!==l&&void 0!==l?l:()=>{m.a(a.feedbackUrl,{target:"_none"})},ariaLabel:y("CloudOSToolbar.ActionButtons.Feedback.Label")},r.createElement(I,{height:20,width:20,"aria-hidden":!0})),A.has("ADPAnnouncement")&&r.createElement(G,{navbarState:a}),A.has("BeneficiaryAnnouncement")&&r.createElement(J,{navbarState:a}),A.has("Create")&&r.createElement(ee,{navbarState:a}),A.has("Overflow")&&r.createElement(ie,{buttonsToMerge:T,navbarState:a,whatsNewOptions:{appTitle:s,features:b,version:null!==(n=null===c||void 0===c?void 0:c.version)&&void 0!==n?n:0,featureLaunchDate:null!==(i=null===c||void 0===c?void 0:c.featureLaunchDate)&&void 0!==i?i:new Date("2025-01-01T00:00:00+0000")}}),A.has("QuickSwitch")&&r.createElement(Q,{navbarState:a,ref:g}),A.has("Account")&&r.createElement(V,{navbarState:a}))}const Se="#0071EB";function Ce(e){let{appTitle:t,appAccentColor:n=Se}=e;const i=Object(g.b)(),o=_e(t||"",i),a=r.useRef(null),[s,c]=r.useState(void 0),u=r.useCallback((()=>{var e,t;const n=null===(e=a.current)||void 0===e||null===(t=e.getBBox)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.width;null!=n&&c(n)}),[c]);return r.useEffect((()=>ve(u)),[u]),r.useLayoutEffect((()=>{var e;return requestAnimationFrame(u),null===(e=document.fonts)||void 0===e||e.addEventListener("loadingdone",u),()=>{var e;null===(e=document.fonts)||void 0===e||e.removeEventListener("loadingdone",u)}}),[u]),r.createElement("svg",{ref:a,"aria-label":t,role:"presentation",height:"43",width:s,className:`app-name ${o&&"kern-safe"}`},r.createElement("text",{fill:n,x:"0",y:"29","data-testid":"app-name"},t))}const _e=function(){const e=new Set("ca cs da de en es fi fr hr hu id is it ms nb nl nn pl pt ro sk sv tr".split(" ")),t=/^[a-zA-Z0-9\s-\u2013\u2014:;.,?!\xbf/\\\u2026\u203d\u201c\u201d\u2018\u2019'"()[\]\xab\xbb]*$/;return function(n,r){if("string"!==typeof n)return!1;if("string"===typeof r){const t=(r=r.toLowerCase()).indexOf("-"),n=-1===t?r:r.substring(0,t);if(e.has(n))return!0}return t.test(n)}}();function Oe(e){return he?r.createElement(k,{...e}):r.createElement(R,{...e})}function Ee(e){let{onClickLogo:t}=e;return r.createElement("div",{className:"icloud-logo"},t?r.createElement("a",{href:"/","aria-label":y("VoiceOver.CloudOSToolbar.ICloudLogo.Link.Label"),onClick:e=>{e.preventDefault(),e.stopPropagation(),t()}},r.createElement(Oe,null)):r.createElement(Oe,{"aria-label":y("VoiceOver.CloudOSToolbar.ICloudLogo.Logo.Label")}))}let Ie,Ae,Te=!1,Pe=async function(){const[e,t]=await Promise.all([new Promise((e=>{Ie=t=>{e(t),Ie=void 0}})),new Promise((e=>{Ae=t=>{e(t),Ae=void 0}}))]);if(t){var n,r,i,o;const t=await d().showWhatsNew(e.whatsNew.newFeatures,e.whatsNew.version,{appTitle:null!==(n=e.appTitle)&&void 0!==n?n:"",color:null!==(r=null!==(i=e.whatsNew.color)&&void 0!==i?i:e.appAccentColor)&&void 0!==r?r:"",isAutoDisplaying:!0,authBagId:e.whatsNew.authBagId,featureLaunchDate:e.whatsNew.featureLaunchDate});return null===(o=e.onResolve)||void 0===o||o.call(e,t),t}return{wasDisplayed:!1,shouldShowButton:await d().getWhatsNewButtonVisibility(e.whatsNew.authBagId,e.whatsNew.version,e.whatsNew.featureLaunchDate)}}();function Re(e){let{appAccentColor:t,appSwitcherButtonRef:n,appTitle:i,className:s,type:c,whatsNew:u,canAutoDisplayWhatsNew:l,onWhatsNewResolve:p,onICloudLogoPress:f,onFeedbackPress:h}=e;const m=d(),g=Object(a.useSignal)(m.state),v=Object(a.useSignal)(m.showWhatsNewButton);return r.useEffect((()=>{if(!Te){var e;if(void 0===u)return;Te=!0,null===(e=Ie)||void 0===e||e({appTitle:i,appAccentColor:t,whatsNew:u,onResolve:p}),void 0!==l&&void 0!==Ae&&void 0!==Pe&&(Ae(l),Pe=void 0)}}),[t,i,p,u,m,l]),r.createElement("header",{className:o()("cloudos-toolbar",c,he&&"cn",s)},r.createElement(Ee,{onClickLogo:null!==f&&void 0!==f?f:m.navigateToHomePage}),i&&r.createElement(Ce,{appTitle:i,appAccentColor:t}),void 0!==g&&r.createElement(r.Fragment,null,r.createElement(be,{navbarState:g,appTitle:i,whatsNewButton:v?u:void 0,appAccentColor:t,appSwitcherButtonRef:n,onFeedbackPress:h})))}var ke=n(1452),De=n(2169);const Me=e=>{let t,{canTriggerAutoWhatsNew:n=!1,appSwitcherButtonRef:i,setShowOnboardingToolTip:o}=e;switch(Object(ke.c)()){case ke.a.INTERNAL_APP:t="page";break;case ke.a.HOMEPAGE:t="homepage";break;case ke.a.LOGIN:t="login";break;default:t="homepage"}const a="overlay";return n?r.createElement(Re,{className:a,type:t,canAutoDisplayWhatsNew:!0,whatsNew:{newFeatures:Object(De.c)(),version:De.b,authBagId:"",featureLaunchDate:De.a},appSwitcherButtonRef:i,onWhatsNewResolve:()=>null===o||void 0===o?void 0:o(!0)}):r.createElement(Re,{className:a,type:t})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ge}));var r=n(2250),i=n(1215),o=n.n(i),a=n(870),s=n(2143),c=n(1452),u=n(1227),l=n(900),d=n(920),p=n(919),f=n(1261),h=n(970),m=n(2171),g=n(1258),v=n(1211),y=n(1204),b=n(1259),w=n(1210),S=n(1208),C=n(2161),_=n(1430),O=n(2261),E=n(1205),I=n(1206),A=n(1207),T=n(1167),P=n(1209),R=n(1202),k=n(925),D=n(1201),M="../06b68855764eb0e23f269ed4ef7935f0.png",N="../5f2eb96708c817d4da8f26e75916a38f.png",x="../838fde19420156df2fddc1a2610a5e85.png",L=n(1332);function j(){const e=Object(L.a)(),t=e?N:M,n=e?`${N}, ../280e33fda0d0505625152f9e87733777.png 2x, ../9c91386892315dbf9d0f17916676b74b.png 3x`:`${M}, ../6f76469895c1f17823748f7583dc02d1.png 2x, ../1a2ed4c6de5a4af914a51bdb22e4afbb.png 3x`;return a.createElement("img",{src:t,srcSet:n,alt:""})}const U={identifier:"plan",displayNameLocKey:"CloudOS.LandingPage.Plan.DisplayName",standardTiles:[{title:Object(k.a)("CloudOS.LandingPage.Plan.Tile.A.Title"),description:a.createElement(D.a,{interpolations:{"#{iCloudPlusPlansLink}":a.createElement("a",{target:"_blank",rel:"noreferrer",href:Object(R.a)("iCloudPlusPlanPricing"),className:"unstyled-link","aria-label":`${Object(k.a)("CloudOS.LandingPage.Plan.Tile.LinkText")} ${Object(k.a)("VoiceOver.ExternalLink.Description")}`},Object(k.a)("CloudOS.LandingPage.Plan.Tile.LinkText"))}},Object(k.a)("CloudOS.LandingPage.Plan.Tile.A.Description")),iconComponent:a.createElement(j,null)},{title:Object(k.a)("CloudOS.LandingPage.Plan.Tile.B.Title"),description:Object(k.a)("CloudOS.LandingPage.Plan.Tile.B.Description"),iconSrc:x,iconSrcSet:`${x}, ../86e73a9efbc86abcc3f8ca23b684dbe1.png 2x, ../87832d073c0cf28f3eed129eca7dcff4.png 3x`,iconDescription:""}],faqs:[{title:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.A.Question"),content:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.A.Answer")},{title:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.B.Question"),content:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.B.Answer")},{title:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.C.Question"),content:Object(k.a)("CloudOS.LandingPage.Plan.FAQ.C.Answer")}],signinButtonTextLocKey:"CloudOS.LandingPage.Plan.SigninButtonText",learnMoreTextLocKey:"CloudOS.LandingPage.Plan.Subdescription",descriptionLocKey:"CloudOS.LandingPage.Plan.Description",nameToBeDisplayedLocKey:"CloudOS.LandingPage.Plan.DisplayName"},F=[h.e,g.c,y.c,b.c,S.c,C.g,O.c,E.c,I.c,A.c,T.c,P.c,_.b,v.c,w.c,U,m.d];var z=n(2259),B=n(2132),K=n(1330),H=n(903),W=n(1247),q=n(1248),V=n(965),$=n(1338),G=n(2310),Z=n(2311);const Q=e=>{var t,n,r;let{applicationIdentifier:i,applicationNameToBeDisplayed:s,onSignInPressed:c}=e;const d=Object(K.b)(),p=null!==(t=null===d||void 0===d?void 0:d.isMAKOAccount)&&void 0!==t&&t,f=null!==(n=null===d||void 0===d?void 0:d.isMAIDAccount)&&void 0!==n&&n,h=null!==(r=null===d||void 0===d?void 0:d.isLITEAccount)&&void 0!==r&&r,m=Object(K.d)(),g=H.c.sharedInstance.deviceType,v=g===H.a.PHONE,y=g===H.a.TABLET,b=W.a.sharedInstance.getApplicationConfiguration(i),w=(null===b||void 0===b?void 0:b.reasonConfigurationIsHidden)===q.a.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE,S=h&&!w,C=p||f?"":S?Object(u.a)("CloudOS.LandingPage.Unsupported.LiteAccount.Description",{applicationNameToBeDisplayed:s}):v?Object(u.a)("CloudOS.LandingPage.Unsupported.Phone.Description",{applicationNameToBeDisplayed:s}):y?Object(u.a)("CloudOS.LandingPage.Unsupported.Tablet.Description",{applicationNameToBeDisplayed:s}):"",_=(()=>{return p||f?Object(u.a)("CloudOS.LandingPage.Unsupported.Subdescription",{applicationNameToBeDisplayed:s}):S?Object(u.a)("CloudOS.LandingPage.Unsupported.LiteAccount.Subdescription",{applicationNameToBeDisplayed:s,appleId:null!==d&&void 0!==d&&null!==(e=d.details)&&void 0!==e&&e.appleId?`\u201c${d.details.appleId}\u201d`:""}):m?"":v?Object(u.a)("CloudOS.LandingPage.Unsupported.Phone.Subdescription"):y?Object(u.a)("CloudOS.LandingPage.Unsupported.Tablet.Subdescription"):"";var e})();return a.createElement("div",{className:o()("landing-page","unsupported-content",p||f||S?"unsupported-account":"")},a.createElement("div",{className:"chiclet-hero"},a.createElement(B.a,{applicationIdentifier:i,iconSize:v?70:100})),a.createElement("h1",{className:o()("application-title",{tall:Object($.a)()})},s),l.a.sharedInstance.isDomainCN?a.createElement(G.a,null):null,a.createElement("div",{className:o()("landing-page-content","application-content","unsupported-content")},C&&a.createElement("div",{className:"unsupported-description"},C),_&&a.createElement("div",{className:"unsupported-subdescription"},_),a.createElement("div",{className:o()("button-container",S?"lite-account":void 0)},S&&a.createElement(z.a,{className:"sign-out-button secondary",variant:"pill",onActivate:()=>{Object(V.q)()}},Object(u.a)("CloudOS.LandingPage.Unsupported.LiteAccount.SignOut")),a.createElement(Z.a,{className:o()("redirect",m?"authenticated":""),title:m?Object(u.a)("CloudOS.AccountNeedsSetup.HomePageButton.Title"):Object(u.a)("CloudOS.AccountNeedsSetup.Domain.icloud.com"),onSignInPressed:c}))))};var Y=n(926);const J=e=>{const t=o()("landing-page-tile",e.className);return a.createElement("div",{className:t},a.createElement("div",{className:o()("tile-icon")},e.iconComponent?e.iconComponent:a.createElement("img",{src:e.iconSrc,alt:e.iconDescription,srcSet:e.iconSrcSet})),a.createElement("h2",{className:o()("tile-title",{tall:Object($.a)()})},e.title),a.createElement("p",{className:"tile-description"},e.description))};var X=n(2289),ee=n(1294),te="../564be320e7a67acee204043935e41647.png";const ne={video1x:"../fpo@1x.mp4",video2x:"../fpo@2x.mp4",video3x:"../fpo@3x.mp4",cn_video1x:"../fpo-3@1x.mp4",cn_video2x:"../fpo-3@2x.mp4",cn_video3x:"../fpo-3@3x.mp4",video1x_dark:"../fpo-dark@1x.mp4",video2x_dark:"../fpo-dark@2x.mp4",video3x_dark:"../fpo-dark@3x.mp4",cn_video1x_dark:"../fpo-dark-3@1x.mp4",cn_video2x_dark:"../fpo-dark-3@2x.mp4",cn_video3x_dark:"../fpo-dark-3@3x.mp4"},re=()=>{const e=window.devicePixelRatio,t=X.a.sharedInstance.deviceType,{isDomainCN:n}=l.a.sharedInstance,r=n?"cn_video":"video",i=Object(L.a)(),o=e<2?ne[`${r}1x${i?"_dark":""}`]:2===e||t===ee.a.PHONE?ne[`${r}2x${i?"_dark":""}`]:ne[`${r}3x${i?"_dark":""}`];return a.createElement("div",{className:"hero-wrapper"},a.createElement("div",{className:"icloud-animated-hero"},a.createElement("video",{src:o,width:430,height:388,autoPlay:!0,playsInline:!0,loop:!0,muted:!0,"x-webkit-airplay":"deny",title:Object(u.a)("CloudOS.LandingPage.Animation.Description")})),a.createElement(ie,null))};function ie(){return a.createElement("div",{className:"landing-page-icloud-hero"},a.createElement("div",{className:"clouds"},a.createElement("img",{src:te,srcSet:`../0e4e931e06552e87f2fdff2832e11bb9.png, ${te} 2x, ../1b4e0713f30bf5c7d9067834d145de5e.png 3x`,width:430,height:388,alt:"","aria-hidden":!0})),a.createElement("h1",null,Object(u.a)("Application.Title")))}const oe=e=>{let{onSignInPressed:t}=e,n="rtl"===Object(Y.b)()?"../549c575ead7c79d8fe23a22e054a0c3c.png":"../7cb9ecdad2b384754de394732519f658.png";l.a.sharedInstance.isDomainCN&&(n="../d15263c7c03c15ee6ef94a852fe6566a.png");const r=Object(L.a)();return a.createElement("div",{className:"landing-page"},a.createElement(re,null),l.a.sharedInstance.isDomainCN?a.createElement(G.a,null):null,a.createElement("div",{className:"landing-page-content"},a.createElement(Z.a,{title:Object(u.a)("CloudOS.Authentication.SignIn.Button"),onSignInPressed:t}),a.createElement("h2",{className:o()("description",{tall:Object($.a)()})},l.a.sharedInstance.isDomainCN?Object(u.a)("CloudOS.LandingPage.description.gcbd"):Object(u.a)("CloudOS.LandingPage.description")),a.createElement("div",{className:"tiles"},a.createElement(J,{title:Object(u.a)("CloudOS.LandingPage.iCloudWeb.Title"),description:Object(u.a)("CloudOS.LandingPage.iCloudWeb.Description"),iconSrc:r?N:M,iconDescription:Object(u.a)("CloudOS.LandingPage.iCloudWeb.Image.Description")}),a.createElement(J,{title:Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Title"),description:a.createElement(D.a,{interpolations:{"#{icloudPlusLink}":a.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://apple.com/icloud",className:"unstyled-link","aria-label":`${Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Description.LinkLabel")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`},Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Description.LinkLabel"))}},l.a.sharedInstance.isDomainCN?Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Description.gcbd"):Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Description")),iconSrc:n,iconDescription:Object(u.a)("CloudOS.LandingPage.iCloudPlusTile.Image.Description")}))))};var ae=n(2201),se=n(1454),ce=(n(1453),n(2322));const ue=e=>{const t=e.tiles;return a.createElement("div",{className:"tiles flex-tiles"},a.createElement("div",{className:"row"},a.createElement("div",{className:"column"},t[0]?a.createElement(ce.a,{icon:t[0].icon,title:t[0].title,tileId:"tile-A",textContent:t[0].description,className:"flex-tile tall",contentImgSrc:t[0].contentImageSrc1x,contentImgSrcSet:`${t[0].contentImageSrc1x}, ${t[0].contentImageSrc2x} 2x, ${t[0].contentImageSrc3x} 3x`,linkInfo:t[0].linkInfo}):void 0),a.createElement("div",{className:"column"},t[1]?a.createElement(ce.a,{icon:t[1].icon,title:t[1].title,tileId:"tile-B",textContent:t[1].description,className:"flex-tile",linkInfo:t[1].linkInfo}):void 0,t[2]?a.createElement(ce.a,{icon:t[2].icon,title:t[2].title,tileId:"tile-C",textContent:t[2].description,className:"flex-tile",linkInfo:t[2].linkInfo}):void 0)),a.createElement("div",{className:"row"},a.createElement("div",{className:"column"},t[3]?a.createElement(ce.a,{icon:t[3].icon,title:t[3].title,tileId:"tile-D",textContent:t[3].description,className:"flex-tile wide full-text-width",linkInfo:t[3].linkInfo}):void 0)),a.createElement("div",{className:"row"},a.createElement("div",{className:"column"},t[4]?a.createElement(ce.a,{icon:t[4].icon,title:t[4].title,tileId:"tile-E",textContent:t[4].description,className:"flex-tile wide",contentImgSrc:t[4].contentImageSrc1x,linkInfo:t[4].linkInfo}):void 0)),a.createElement("div",{className:"column"},a.createElement("div",{className:"row"},t[5]?a.createElement(ce.a,{icon:t[5].icon,title:t[5].title,tileId:"tile-F",textContent:t[5].description,className:"flex-tile",linkInfo:t[5].linkInfo}):void 0,t[6]?a.createElement(ce.a,{icon:t[6].icon,title:t[6].title,tileId:"tile-G",textContent:t[6].description,className:"flex-tile",linkInfo:t[6].linkInfo}):void 0)))};function le(){return le=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},le.apply(null,arguments)}const de=e=>{let{id:t="accordion",className:n="accordion",items:r}=e;return a.createElement("ul",{className:n},r.map(((e,n)=>a.createElement(pe,le({id:`${t}-item-${n}`,key:`${t}-item-${n}`},e)))))},pe=e=>{const{id:t,title:n,content:r,expanded:i}=e,s=Object(a.useRef)(null),c=Object(a.useRef)(null),u=Object(a.useRef)(null),l=Object(a.useRef)(null),d=Object(a.useRef)(),[p,f]=Object(a.useState)(i),[h,m]=Object(a.useState)({height:i?"auto":0,transitionDuration:"400ms"}),[g,v]=Object(a.useState)(i?"expanded":"collapsed");return a.createElement("li",{ref:s,className:o()("accordion-item",g)},a.createElement("h3",{className:"accordion-title"},a.createElement("button",{className:"accordion-button","aria-controls":`${t}-tray`,id:`${t}-button`,onClick:()=>function(e){if(!c.current||!u.current||!l.current)return;f(e.expanded);const t=c.current.offsetHeight,n=Math.min(Math.max(t/3*2,400),800),r={height:t,transitionDuration:n+"ms"};var i,o,a,s;m(r),v("animating"),e.expanded?null===(i=(o=l.current).beginElement)||void 0===i||i.call(o):(null===(a=(s=u.current).beginElement)||void 0===a||a.call(s),requestAnimationFrame((()=>m({...r,height:0})))),clearTimeout(d.current),d.current=window.setTimeout((()=>{m({...r,height:e.expanded?"auto":0}),v(e.expanded?"expanded":"collapsed")}),n)}({expanded:!p}),"aria-expanded":p?"true":"false"},a.createElement("span",{className:"accordion-title-text"},n),a.createElement("span",{className:"accordion-icon"},a.createElement("svg",{className:"accordion-icon-svg",viewBox:"0 0 17 8.85","aria-hidden":"true"},a.createElement("polyline",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",fillRule:"evenodd",points:"15 1.13 8.5 7.72 2 1.13"},a.createElement("animate",{ref:l,attributeName:"points",values:"15 1.13 8.5 7.72 2 1.13; 15.85 4.42 8.5 4.42 1.15 4.42; 15 7.72 8.5 1.13 2 7.72",dur:"320ms",begin:"indefinite",fill:"freeze",keyTimes:"0; 0.5; 1",calcMode:"spline",keySplines:"0.12, 0, 0.38, 0; 0.2, 1, 0.68, 1"}),a.createElement("animate",{ref:u,attributeName:"points",values:"15 7.72 8.5 1.13 2 7.72; 15.85 4.42 8.5 4.42 1.15 4.42; 15 1.13 8.5 7.72 2 1.13",dur:"320ms",begin:"indefinite",fill:"freeze",keyTimes:"0; 0.5; 1",calcMode:"spline",keySplines:"0.2, 0, 0.68, 0; 0.2, 1, 0.68, 1"})))))),a.createElement("div",{id:`${t}-tray`,"aria-labelledby":`${t}-button`,className:"accordion-tray",style:h},a.createElement("div",{ref:c,className:"accordion-content"},a.createElement("div",{className:"accordion-content-paragraph"},r))))},fe=e=>{var t;let{applicationIdentifier:n,applicationNameToBeDisplayed:r,onSignInPressed:i,description:s,landingPageConfiguration:c,isDomainCN:l}=e;const d=H.c.sharedInstance.deviceType===H.a.PHONE,p=c.learnMoreLinkTextLocKey?Object(u.a)(c.learnMoreLinkTextLocKey):Object(u.a)("CloudOS.LandingPage.LearnMoreLink.Text",{applicationNameToBeDisplayed:r}),f=null!==c&&void 0!==c&&c.learnMoreLinkKey?Object(R.a)(c.learnMoreLinkKey):null!==(t=null===c||void 0===c?void 0:c.learnMoreLinkHref)&&void 0!==t?t:"";return a.createElement("div",{className:"landing-page"},a.createElement("div",{className:"chiclet-hero"},a.createElement(B.a,{applicationIdentifier:n,iconSize:d?70:100})),a.createElement("h1",{className:o()("application-title",{tall:Object($.a)()})},r),a.createElement("h2",{className:o()("application-description",{tall:Object($.a)()})},s),a.createElement(a.Fragment,null,l?a.createElement(G.a,null):null),a.createElement("div",{className:o()("landing-page-content",c?c.mixedTiles||c.standardTiles?"landing-page-tiles-content":"application-content":"")},a.createElement(Z.a,{title:Object(u.a)("CloudOS.Authentication.SignIn.Button"),onSignInPressed:i}),c&&(c.learnMoreTextLocKey?a.createElement("h3",{className:"subdescription"},Object(u.a)(c.learnMoreTextLocKey)):a.createElement(ae.a,{href:f},p)),(null===c||void 0===c?void 0:c.standardTiles)&&a.createElement("div",{className:"tiles"},c.standardTiles.map((e=>{let{title:t,description:n,iconSrc:r,iconSrcSet:i,iconDescription:o,iconComponent:s}=e;return a.createElement(J,{key:t,title:t,description:n,iconSrc:r,iconSrcSet:i,iconComponent:s,iconDescription:o})}))),(null===c||void 0===c?void 0:c.mixedTiles)&&(n===C.f.identifier?a.createElement(ue,{tiles:c.mixedTiles}):a.createElement(se.a,{tiles:c.mixedTiles}))),(null===c||void 0===c?void 0:c.faqs)&&a.createElement("div",{className:"faq"},a.createElement("div",{className:"section"},a.createElement("h2",null,Object(u.a)("CloudOS.LandingPage.FAQ.Title")),a.createElement(de,{items:c.faqs}))))},he=e=>{const t=function(e){if(e)for(const t of F)if(t.identifier===e)return t}(e.applicationIdentifier),n=null===t||void 0===t?void 0:t.identifier,r=Object(K.d)();if(a.useEffect((()=>{if(!r){if(n){const e={source:"landing-page",childName:n,statCategory:d.a.SESSION,__allow_user:!0};p.a.withEventAndLabel("load","deeplink",e).record()}f.a.sharedInstance.endLoadPerformanceMeasurement(`${null!==n&&void 0!==n?n:"home"}-landing`)}}),[n,r]),!t||!n)return a.createElement(oe,{onSignInPressed:e.onSignInPressed});const i=t.descriptionLocKey?Object(u.a)(t.descriptionLocKey):e.description,o=function(e){return e.titleNameNonLocalized&&e.displayName?e.displayName:e.nameToBeDisplayedLocKey?Object(u.a)(e.nameToBeDisplayedLocKey):""}(t);return e.isAppHidden||e.isAppDisabled?a.createElement(Q,{applicationIdentifier:n,applicationNameToBeDisplayed:o,onSignInPressed:e.onSignInPressed}):a.createElement(fe,{applicationIdentifier:n,applicationNameToBeDisplayed:o,onSignInPressed:e.onSignInPressed,description:null!==i&&void 0!==i?i:"",landingPageConfiguration:t,isDomainCN:l.a.sharedInstance.isDomainCN})};var me=n(2272);function ge(e){return a.createElement(ve,{className:o()("landing-page-route",e.className)},a.createElement(c.b,{value:c.a.LOGIN},a.createElement(s.a,null)),a.createElement("main",null,a.createElement(he,{onSignInPressed:e.onSignInPressed,isAppHidden:e.isAppHidden,isAppDisabled:e.isAppDisabled,applicationIdentifier:e.applicationIdentifier,description:r.a.sharedInstance.isDomainCN?Object(u.a)("CloudOS.LandingPage.description.gcbd"):Object(u.a)("CloudOS.LandingPage.description")})),a.createElement("footer",null,a.createElement(me.a,null)))}function ve(e){return a.createElement("div",{className:o()("page-viewport",e.className),style:e.style},a.createElement("div",{className:o()("page-content","landing-page-flex-content")},e.children))}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return z}));var r,i=[],o="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(r||(r={}));var a,s=function(e){return Object.freeze(e)},c=function(e,t){this.inlineSize=e,this.blockSize=t,s(this)},u=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,s(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),l=function(e){return e instanceof SVGElement&&"getBBox"in e},d=function(e){if(l(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},p=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null===e||void 0===e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},f="undefined"!==typeof window?window:{},h=new WeakMap,m=/auto|scroll/,g=/^tb|vertical/,v=/msie|trident/i.test(f.navigator&&f.navigator.userAgent),y=function(e){return parseFloat(e||"0")},b=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new c((n?t:e)||0,(n?e:t)||0)},w=s({devicePixelContentBoxSize:b(),borderBoxSize:b(),contentBoxSize:b(),contentRect:new u(0,0,0,0)}),S=function(e,t){if(void 0===t&&(t=!1),h.has(e)&&!t)return h.get(e);if(d(e))return h.set(e,w),w;var n=getComputedStyle(e),r=l(e)&&e.ownerSVGElement&&e.getBBox(),i=!v&&"border-box"===n.boxSizing,o=g.test(n.writingMode||""),a=!r&&m.test(n.overflowY||""),c=!r&&m.test(n.overflowX||""),p=r?0:y(n.paddingTop),f=r?0:y(n.paddingRight),S=r?0:y(n.paddingBottom),C=r?0:y(n.paddingLeft),_=r?0:y(n.borderTopWidth),O=r?0:y(n.borderRightWidth),E=r?0:y(n.borderBottomWidth),I=C+f,A=p+S,T=(r?0:y(n.borderLeftWidth))+O,P=_+E,R=c?e.offsetHeight-P-e.clientHeight:0,k=a?e.offsetWidth-T-e.clientWidth:0,D=i?I+T:0,M=i?A+P:0,N=r?r.width:y(n.width)-D-k,x=r?r.height:y(n.height)-M-R,L=N+I+k+T,j=x+A+R+P,U=s({devicePixelContentBoxSize:b(Math.round(N*devicePixelRatio),Math.round(x*devicePixelRatio),o),borderBoxSize:b(L,j,o),contentBoxSize:b(N,x,o),contentRect:new u(C,p,N,x)});return h.set(e,U),U},C=function(e,t,n){var i=S(e,n),o=i.borderBoxSize,a=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return s;case r.BORDER_BOX:return o;default:return a}},_=function(e){var t=S(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=s([t.borderBoxSize]),this.contentBoxSize=s([t.contentBoxSize]),this.devicePixelContentBoxSize=s([t.devicePixelContentBoxSize])},O=function(e){if(d(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},E=function(){var e=1/0,t=[];i.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new _(t.target),i=O(t.target);r.push(n),t.lastReportedSize=C(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++)(0,r[n])();return e},I=function(e){i.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(O(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},A=[],T=0,P={attributes:!0,characterData:!0,childList:!0,subtree:!0},R=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],k=function(e){return void 0===e&&(e=0),Date.now()+e},D=!1,M=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!D){D=!0;var n,r=k(e);n=function(){var n=!1;try{n=function(){var e=0;for(I(e);i.some((function(e){return e.activeTargets.length>0}));)e=E(),I(e);return i.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"===typeof ErrorEvent?e=new ErrorEvent("error",{message:o}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=o),window.dispatchEvent(e)}(),e>0}()}finally{if(D=!1,e=r-k(),!T)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!a){var t=0,n=document.createTextNode("");new MutationObserver((function(){return A.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),a=function(){n.textContent="".concat(t?t--:t++)}}A.push(e),a()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,P)};document.body?t():f.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),R.forEach((function(t){return f.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),R.forEach((function(t){return f.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),N=function(e){!T&&e>0&&M.start(),!(T+=e)&&M.stop()},x=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=C(this.target,this.observedBox,!0);return e=this.target,l(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),L=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},j=new WeakMap,U=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},F=function(){function e(){}return e.connect=function(e,t){var n=new L(e,t);j.set(e,n)},e.observe=function(e,t,n){var r=j.get(e),o=0===r.observationTargets.length;U(r.observationTargets,t)<0&&(o&&i.push(r),r.observationTargets.push(new x(t,n&&n.box)),N(1),M.schedule())},e.unobserve=function(e,t){var n=j.get(e),r=U(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&i.splice(i.indexOf(n),1),n.observationTargets.splice(r,1),N(-1))},e.disconnect=function(e){var t=this,n=j.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),z=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!==typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");F.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");F.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");F.unobserve(this,e)},e.prototype.disconnect=function(){F.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return U}));var r=n(1043),i=n(2228),o=n(1011),a=n(1016);function s(e){const t="string"===typeof e?new a.a(e):e;try{throw t}catch(n){return n}}const c={};function u(e,t,n,r){const i=e.objectsByID[r];if(i===c)return new a.a(o.b`Recursive object: ${r}`);if(void 0!==i)return i;e.objectsByID[r]=c,t.push(),t.byteOffset=e.entries[r];const s=n.read(e,t);return t.pop(),e.objectsByID[r]=s,e.idsByObject.set(s,r),e.parsersByObject.set(s,n),s}function l(e,t,n){const r=e.idsByObject.get(n);if(void 0!==r)return r;const i=e.objectsByID.length;return e.idsByObject.set(n,i),e.objectsByID[i]=n,e.objectsByID.length=i+1,e.parsersByObject.set(n,t),t.register(e,n),i}var d=n(2217),p=n(1029),f=n.n(p);function h(e){if(f.a.LT(e,0))return 8;if(f.a.LT(e,256))return 1;if(f.a.LT(e,65536))return 2;if(f.a.LT(e,2**32))return 4;if(f.a.LT(e,2**64))return 8;throw s(o.b`invalid number: ${e}`)}const m={handlesMarker:e=>16===(240&e),read:(e,t)=>function(e){const t=e.readUInt(8);if(t instanceof Error)return t;if(16!==(240&t))return s(o.b`BPlist: tried to read integer, but wrong type 0b${Object(d.c)(t.toString(2)).notPII().forCertain()}`);const n=1<<(15&t);if(1!==n&&2!==n&&4!==n&&8!==n&&16!==n)return s(o.b`BPlist: tried to read integer, but invalid byte count ${Object(d.c)(n).notPII().forCertain()}`);let r;return 16===n?(e.readBigInt64(),r=e.readBigInt64()):r=8===n?e.readBigInt64():e.readUInt(8*n),r instanceof Error||r instanceof f.a&&f.a.LT(r,0)&&(r=f.a.toNumber(r),o.b`BPlist: converting negative int to number -- value ${r}`),r}(t),write(e,t,n){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h(t);const r=Math.log2(n),i=16|Math.round(r);switch(e.writeUInt(8,i),n){case 1:case 2:case 4:e.writeUInt(8*n,f.a.toNumber(f.a.BigInt(t)));break;case 8:e.writeBigInt64(f.a.BigInt(t))}}(t,n)},register(e,t){return l(e,this,t)}};function g(e){return"bplist0"===e.readASCII(7)}function v(e,t){const n=t.readUInt(8);if(n instanceof Error)return n;if(15===(15&n)){const n=m.read(e,t);return f.a.toNumber(f.a.BigInt(n))}return 15&n}function y(e,t,n,r){r<15?t.writeUInt(8,n|r):(t.writeUInt(8,15|n),m.write(e,t,f.a.BigInt(r)))}function b(e,t,n,r){return{handlesMarker:t=>(240&t)===e,register(e,r){const i=n(r);for(const n of i)t.register(e,n);return l(e,this,r)},read(e,n){const i=v(e,n);if(i instanceof Error)return i;const o=[];for(let r=0;r<i;r++){const a=n.readUInt(8*e.objectRefSize);if(a instanceof Error)return a.message=`[${r}/${i}]: ${a.message}`,a;const s=u(e,n,t,a);if(s instanceof Error)return s.message=`[${r}/${i}]: #${a} (${e.objectRefSize}) ${s.message}`,s;o.push(s)}return r(o)},write(r,i,o){const a=n(o),s=a.length;y(r,i,e,s);for(const e of a)i.writeUInt(8*r.objectRefSize,l(r,t,e))}}}function w(e){return b(160,e,(e=>e),(e=>e))}function S(e){return b(192,e,(e=>Array.from(e)),(e=>new Set(e)))}const C={handlesMarker:e=>8===(254&e),read(e,t){const n=t.readUInt(8);if(n instanceof Error)return n;if(8===n)return!1;if(9===n)return!0;throw s(o.b`Invalid boolean`)},write(e,t,n){t.writeUInt(8,n?9:8)},register(e,t){return l(e,this,t)}};function _(){return{handlesMarker:e=>64===(240&e),read(e,t){const n=v(e,t);return n instanceof Error?n:t.readBytes(n)},write(e,t,n){y(e,t,64,n.length),t.writeBytes(n)},register(e,t){return l(e,this,t)}}}const O=Date.UTC(2001,0,1),E={handlesMarker:e=>51===(255&e),read(e,t){t.readUInt(8);const n=t.readFloat64();return new Date(O+1e3*Number(n))},write(e,t,n){t.writeUInt(8,51),t.writeFloat64((n.getTime()-O)/1e3)},register(e,t){return l(e,this,t)}},I=new TextEncoder;var A;!function(e){e[e.ASCII=80]="ASCII",e[e.UTF8=112]="UTF8",e[e.UTF16=96]="UTF16"}(A||(A={}));const T={handlesMarker(e){const t=240&e;return t===A.ASCII||t===A.UTF8||t===A.UTF16},read(e,t){const n=t.peek();if(n instanceof Error)return n;const r=240&n,i=v(e,t);if(i instanceof Error)return i;const o=r===A.UTF16?2*i:i;return r===A.ASCII?t.readASCII(o):r===A.UTF16?t.readUTF16BE(o):t.readUTF8(o)},register(e,t){return l(e,this,t)},write(e,t,n){const r=I.encode(n);y(e,t,r.every((e=>e<=127))?A.ASCII:A.UTF8,r.length),t.writeBytes(r)}};function P(e){return{handlesMarker:e=>208===(240&e),register(t,n){for(const i in n){var r;(null!==(r=e[i])&&void 0!==r?r:x).register(t,n[i])}return l(t,this,n)},read(t,n){const r=v(t,n);if(r instanceof Error)return r;const i=[];for(let e=0;e<r;e++){const o=n.readUInt(8*t.objectRefSize);if(o instanceof Error)return o.message=`.(${e+1}/${r}): ${o.message}`,o;const a=u(t,n,T,o);if(a instanceof Error)return a.message=`.(${e+1}/${r}): ${a.message}`,a;i.push(a)}const o={};for(let s=0;s<r;s++){var a;const c=String(i[s]),l=n.readUInt(8*t.objectRefSize);if(l instanceof Error)return l.message=`.${c}(${s+1}/${r}): ${l.message}`,l;const d=u(t,n,null!==(a=e[i[s]])&&void 0!==a?a:x,l);if(d instanceof Error)return d.message=`.${c}(${s+1}/${r}): #${l} (${t.objectRefSize}) ${d.message}`,d;o[c]=d}return o},write(t,n,r){const i=Object.keys(r);y(t,n,208,i.length);for(const e of i)n.writeUInt(8*t.objectRefSize,l(t,T,e));for(const a of i){var o;n.writeUInt(8*t.objectRefSize,l(t,null!==(o=e[a])&&void 0!==o?o:x,r[a]))}}}}const R={handlesMarker:e=>34===e||35===e,read:(e,t)=>34===t.readUInt(8)?t.readFloat32():t.readFloat64(),write(e,t,n){t.writeUInt(8,35),t.writeFloat64(n)},register(e,t){return l(e,this,t)}},k={handlesMarker:e=>0===e,read(e,t){const n=t.readUInt(8);return n instanceof Error?n:0!==n?s(o.b`Expected null`):null},register(e,t){return l(e,this,t)},write(e,t){t.writeUInt(8,0)}},D=new DataView(new ArrayBuffer(100)),M={handlesMarker:e=>128===(240&e),read:(e,t)=>function(e){const t=e.readUInt(8);if(t instanceof Error)return t;if(128!==(240&t))return s(o.b`BPlist: tried to read uid, but wrong type 0b${Object(d.c)(t.toString(2)).notPII().forCertain()}`);const n=1+(15&t);if(1!==n&&2!==n&&4!==n&&8!==n)return s(o.b`BPlist: tried to read uid, but invalid byte count ${Object(d.c)(n).notPII().forCertain()}`);if(8===n)return e.readBigUint64();const r=e.readUInt(8*n);return r instanceof Error?r:f.a.BigInt(r)}(t),write(e,t,n){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h(t);const r=128|n-1;1===n?D.setUint8(0,f.a.toNumber(f.a.BigInt(t))):2===n?D.setUint16(0,f.a.toNumber(f.a.BigInt(t))):4===n?D.setUint32(0,f.a.toNumber(f.a.BigInt(t))):8===n&&f.a.DataViewSetBigUint64(D,0,f.a.BigInt(t)),e.writeUInt(8,r);for(let i=0;i<n;i++)e.writeByte(D.getUint8(i))}(t,n)},register(e,t){return l(e,this,t)}};let N;const x={handlesMarker:e=>N.handlesMarker(e),read:(e,t)=>N.read(e,t),register:(e,t)=>L(t).register(e,t),write(e,t,n){L(n).write(e,t,n)}};function L(e){if("string"===typeof e)return T;if("number"===typeof e)return Math.abs(e-Math.round(e))<Number.EPSILON?m:R;if(e instanceof f.a)return m;if(null===e)return k;if(e instanceof Date)return E;if(e instanceof Uint8Array)return _();if(Array.isArray(e))return w(x);if(e instanceof Set)return S(x);if("boolean"===typeof e)return C;if("object"===typeof e)return P({});throw s(o.b`unknown type: ${typeof e}`)}N=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.findIndex((e=>e.handlesMarker(128))),i=t.findIndex((e=>e.handlesMarker(16))),a=r>=0&&(i<0||r<i);return{handles:e=>t.some((t=>t.handlesMarker(e))),read(e,n){const r=n.peek();if(r instanceof Error)return r;const i=t.find((e=>e.handlesMarker(r)));if(!i)throw s(o.b`BPlist oneOf: no reader was able to read`);return i.read(e,n)},register(e,t){return this.typeForValue(t).register(e,t)},typeForValue(e){const t=L(e);return t.handlesMarker(16)&&a?M:t},write(e,t,n){const r=L(n);r.handlesMarker(16)&&a?M.write(e,t,f.a.BigInt(n)):r.write(e,t,n)}}}(w(x),S(x),b(176,x,(e=>Array.from(new Set(e))),(e=>Array.from(new Set(e)))),C,_(),E,P({}),R,m,k,T,M);class j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(i.a)();this.logger=e}parseFromByteStream(e,t){const n=function(e,t){if(!g(t))return s(o.b`Data is not a binary plist`);const n=function(e){const t=e.size;if(t<26)return s(o.b`BPlist: data is invalid; too short!`);e.byteOffset=t-26;const n={offsetSize:e.readUInt(8),objectRefSize:e.readUInt(8),numObjects:e.readUInt(64),topObject:e.readUInt(64),tableOffset:e.readUInt(64)};for(const r in n)if(n[r]instanceof Error)return n[r];return n}(t);if(n instanceof Error)return n;const r=function(e,t){e.byteOffset=t.tableOffset;const n=t.offsetSize;if(1!==n&&2!==n&&4!==n)throw s(o.b`offset size must be 1, 2, or 4 bytes`);const r=[],i=[];for(let o=0,a=t.numObjects;o<a;o++){let n=0;if(n=e.readUInt(8*t.offsetSize),n instanceof Error)return n;r.push(n),i.push(void 0)}return{entries:r,objectsByID:i,objectRefSize:t.objectRefSize,idsByObject:new Map,parsersByObject:new Map}}(t,n);return r instanceof Error?r:u(r,t,e,n.topObject)}(e,t);return n instanceof Error&&this.logger.error`${n.name}: ${n.message}\n${n.stack}`,n}writeToByteStream(e,t,n){!function(e,t,n){const r={objectsByID:[],idsByObject:new Map,parsersByObject:new Map},i=l(r,e,n),a={...r,objectRefSize:h(r.objectsByID.length),entries:[]};t.writeASCII("bplist00");for(const u of a.objectsByID){const e=a.parsersByObject.get(u);if(!e)throw s(o.b`found entry in bplist objectsByID without a parser`);const n=t.byteOffset;a.entries.push(n),e.write(a,t,u)}const c=function(e,t){const n=e.byteOffset,r=h(n),i=t.entries.length;for(const o of t.entries)e.writeUInt(8*r,o);return{tableOffset:n,numObjects:i,offsetSize:r}}(t,a);!function(e,t){e.writeUInt(8,0),e.writeUInt(8,0),e.writeUInt(8,0),e.writeUInt(8,0),e.writeUInt(8,0),e.writeUInt(8,0),e.writeUInt(8,t.offsetSize),e.writeUInt(8,t.objectRefSize),e.writeUInt(64,t.numObjects),e.writeUInt(64,t.topObject),e.writeUInt(64,t.tableOffset)}(t,{offsetSize:c.offsetSize,objectRefSize:a.objectRefSize,numObjects:a.entries.length,topObject:i,tableOffset:c.tableOffset})}(e,t,n)}parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x;if(e instanceof Error)return e;const n=new r.a(e);return this.parseFromByteStream(t,n)}write(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x;const n=new r.a;return this.writeToByteStream(t,n,e),n.bytes}isBPlist(e){return g(new r.a(e))}}const U=g},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return te})),n.d(t,"a",(function(){return ne}));var r=n(908);const i="AddressBook",o="ManagedAppleID";var a,s,c;!function(e){e.PERSON="PERSON",e.CLASS="CLASS",e.GROUP="GROUP"}(a||(a={})),function(e){e.SUMMARY="SUMMARY",e.ALL="ALL"}(s||(s={})),function(e){e.GROUP_WITH_EMAIL_ONLY="GROUP_WITH_EMAIL_ONLY",e.ALL="ALL"}(c||(c={}));const u="com.icloud.ContactsLookup";class l{constructor(e){this.isMaidEnabled=void 0,this.connection=new r.a(u),this.isMaidEnabled=e,this.connection.start()}close(){this.connection.close()}preload(){return this.connection.remoteObjectProxy.preload(this.isMaidEnabled)}findAnyMatchingText(e,t){return this.connection.remoteObjectProxy.findAnyMatchingText(e,t,this.isMaidEnabled)}findContactsMatchingText(e,t){return this.connection.remoteObjectProxy.findContactsMatchingText(e,t,this.isMaidEnabled)}findContactsMatchingEmailAddress(e,t){return this.connection.remoteObjectProxy.findContactsMatchingEmailAddress(e,t,this.isMaidEnabled)}findContactsMatchingPhoneNumber(e,t){return this.connection.remoteObjectProxy.findContactsMatchingPhoneNumber(e,t,this.isMaidEnabled)}findContactsForGroup(e,t){return this.connection.remoteObjectProxy.findContactsForGroup(e,t,this.isMaidEnabled)}getAddressBookContacts(e){return this.connection.remoteObjectProxy.getAddressBookContacts(e,this.isMaidEnabled)}}var d=n(892),p=n(465);async function f(e){let t,n;try{t=await e()}catch(r){return p.Result.failure({code:"NetworkUnavailable",context:r.message,retryable:!0})}if(!t.ok)return p.Result.failure({code:"FetchFailed",context:t,retryable:!0});try{n=await t.json()}catch(r){return p.Result.failure({code:"MalformedJSON",retryable:!1})}return p.Result.success(n)}var h,m=n(1005),g=n.n(m);class v{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;this.ttl=void 0,this._data=void 0,this._expires=0,this.search={},this.ttl=e,this.invalidate(),void 0!==t&&this.update(t)}get data(){return this._data}get expires(){return this._expires}get ttlRemaining(){return Math.max(this.expires-Date.now(),0)}get isExpired(){return Date.now()>=this.expires}invalidate(){return this._expires=Date.now()-1,this}update(e){this._data=e;for(let n of Object.values(this.search))n.trie.clear(),n.initialized=!1;const t=Date.now();return this._expires=t+this.ttl,this}trie(e,t){return this.search[e]={trie:new g.a,builder:t,initialized:!1},this}find(e,t){const n=this.search[e];if(!n.initialized){const e=n.trie;if(this.data){const t=n.builder(this.data);for(let[n,r]of t)for(let t of Array.isArray(n)?n:[n])e.update(t,(e=>(e||[]).concat(r)))}n.initialized=!0}return n.trie.find(t)}findValues(e,t){const n=this.find(e,t).flatMap((e=>{let[t,n]=e;return n})).reduce(((e,t)=>e.add(t)),new Set);return Array.from(n)}}!function(e){e[e.undecided=0]="undecided",e[e.none=1]="none",e[e.immediate=2]="immediate",e[e.background=3]="background"}(h||(h={}));class y{constructor(e){if(this.policies=void 0,0===e.length)throw new Error("No policies provided for ReloadAdviser");this.policies=e}determineAction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object.freeze(t);const{policies:n}=this,r=n.length;let i=-1;const o=n=>{if(i+=1,i>=r)return n;const a=Object.freeze({cache:e,flags:t,action:n});return this.policies[i].recommend(a,o)},a=o(h.undecided)||h.undecided;return a!==h.undecided?a:h.none}}class b{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.75;this.threshold=void 0,this.threshold=e}recommend(e,t){if(e.cache.isExpired||e.action===h.immediate)return t(h.immediate);const{ttl:n,expires:r}=e.cache;return t(Math.max(r-Date.now(),0)<=n*(1-this.threshold)?h.background:e.action)}}class w{constructor(e){this.lastReloadRecommendation=-1/0,this.cooldownPeriod=void 0,this.cooldownPeriod=e||w.defaultCooldownPeriod}onCooldown(){return Date.now()<=this.lastReloadRecommendation+this.cooldownPeriod}recommend(e,t){if(e.cache.isExpired||e.action===h.immediate)return this.lastReloadRecommendation=-1/0,t(h.immediate);const{modifiedData:n=!1}=e.flags;return!0!==n||this.onCooldown()?t(e.action):(this.lastReloadRecommendation=Date.now(),t(h.immediate))}}w.defaultCooldownPeriod=1e4;class S{recommend(e,t){return!1===e.flags.expectLatest&&!0===e.cache.isExpired?t(h.background):t(e.action)}}function C(e){return Object.entries(e).map((e=>{let[t,n]=e;return void 0!==n&&null!==n&&(n=String(n),""!==n?`${t}=${n}`:t)})).filter((e=>!!e)).join("&")}class _ extends Error{constructor(e){super(e),this.name="TimeoutError"}}function O(e,t){return Promise.race([t,new Promise((function(t,n){setTimeout((function(){n(new _("Promise timed out"))}),e)}))]).finally((()=>clearTimeout(void 0)))}function E(e){return e.reduce(((e,t)=>(!0===t.ok?e.success.push(t):e.failure.push(t),e)),{success:[],failure:[]})}function I(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function A(e){return("+"===e.trim()[0]?"+":"")+e.replace(/[^\d]+/g,"")}function T(e,t){return"string"===typeof t[e]?t[e]:""}function P(e,t){return Array.isArray(t[e])?t[e]:[]}O.PromiseTimeoutError=_;var R=n(2249);const k=e=>{const{firstName:t,lastName:n,phoneticFirstName:r,phoneticLastName:i}=e;return{...t&&{givenName:t},...n&&{familyName:n},...r&&{phoneticGivenName:r},...i&&{phoneticFamilyName:i},...e}};class D{get serviceName(){return D.serviceName}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.name=i,this.cloudOSDelegate=void 0,this.endpoint="/co/addressbook",this.cache=void 0,this.reloadAdviser=void 0,this.loader=void 0,this.cloudOSDelegate=e,this.cache=new v(t.cacheTTL||3e5),this.reloadAdviser=new y([new w(5e3),new b(.75),new S]),this.cache.trie("any",(e=>[...e.contacts,...e.groups].map((e=>[x(e),e])))),this.cache.trie("contacts",(e=>e.contacts.map((e=>[M(e),e])))),this.cache.trie("contactsByEmail",(e=>e.contacts.map((e=>[L(e),e])))),this.cache.trie("contactsByPhone",(e=>e.contacts.map((e=>[j(e),e]))))}buildWebServiceURL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{urlForServiceName:t}=this.cloudOSDelegate,n=Object(R.c)(t(this.serviceName,""));return n.pathname=this.endpoint,n.search=C(e),n}async findAnyMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("any",e.toLowerCase()))}async findContactsMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contacts",e.toLowerCase()))}async findContactsMatchingEmailAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))}async findContactsMatchingPhoneNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contactsByPhone",A(e.toLowerCase())))}async findContactsForGroup(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!1===n.ok)return n;const{groups:r=[]}=n.value.data,i=r.find((t=>t.groupId===e.groupId));return p.Result.success(void 0!==i&&i.contacts||[])}async getAddressBookContacts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=await this.loadData(e);if(!t.ok)return t;const n=t.value.data;return p.Result.success(n?n.contacts:[])}async preload(){const e=await this.loadData();return e.ok?p.Result.success(!0):e}async loadData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.reloadAdviser.determineAction(this.cache,e);return t===h.none?p.Result.success(this.cache):(this.loader||(this.loader=new Promise((e=>{this.fetchData().then((t=>{if(t.ok){let{contacts:n=[],groups:r=[]}=t.value;n=n.map(k),r=function(e,t){const n=new Map(t.map((e=>[e.contactId,e])));return e.map((e=>{const t=new Set;if(void 0!==e.contactIds)for(const r of e.contactIds){const e=n.get(r);void 0!==e&&t.add(e)}return e.contacts=Array.from(t),e}))}(r,n),this.cache.update({contacts:n,groups:r}),this.loader=void 0,e(p.Result.success(this.cache))}else e(t)}))}))),t===h.background?p.Result.success(this.cache):this.loader)}async fetchData(){const e=await this.cloudOSDelegate.getLocale(),t={locale:F(e),order:U(e),includePhoneNumbers:!0,includePhotos:!0},n=await f((()=>{const e=this.buildWebServiceURL(t);return this.cloudOSDelegate.fetchWebServiceURL(e.toString(),{})}));return n.ok?p.Result.success({contacts:n.value.contacts,groups:n.value.groups}):n}}D.serviceName="contacts";const M=e=>[T("firstName",e),T("lastName",e),T("phoneticFirstName",e),T("phoneticLastName",e),T("companyName",e),T("nickName",e),...N(e),...L(e),...j(e)].filter(Boolean).map(I),N=e=>[T("firstName",e)&&T("lastName",e)?`${T("firstName",e)} ${T("lastName",e)}`:"",T("phoneticFirstName",e)&&T("phoneticLastName",e)?`${T("phoneticFirstName",e)} ${T("phoneticLastName",e)}`:""].filter(Boolean).map(I),x=e=>[T("name",e),...M(e)].filter(Boolean).map(I),L=e=>P("emailAddresses",e).flatMap((e=>"field"in e&&e.field?[e.field]:[])).map(I),j=e=>P("phones",e).flatMap((e=>"field"in e&&e.field?[e.field]:[])).map(A),U=e=>"ja-jp"===e||"ko-kr"===e||"zh-cn"===e||"zh-tw"===e||"hu-hu"===e?"first,last":"last,first",F=e=>e.replace(/(.*)-(.*)$/,((e,t,n)=>`${t}_${n.toUpperCase()}`));class z{get serviceName(){return z.serviceName}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.name="MailRecents",this.recentRequestCount=0,this.cloudOSDelegate=void 0,this.cache=void 0,this.reloadAdviser=void 0,this.loader=void 0,this.cloudOSDelegate=e,this.cache=new v(t.cacheTTL||3e5),this.reloadAdviser=new y([new w(5e3),new b(.75),new S]),this.cache.trie("contacts",(e=>e.map((e=>[B(e),e])))),this.cache.trie("contactsByEmail",(e=>e.map((e=>[K(e),e]))))}buildEndpoint(e){return`/cc/mail/v1/account/${e}/preference/recents`}buildWebServiceURL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{urlForServiceName:n}=this.cloudOSDelegate,r=Object(R.c)(n(this.serviceName,""));return r.pathname=this.buildEndpoint(e),r.search=C(t),r}async findAnyMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.findContactsMatchingText(e,t)}async findContactsMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contacts",e.toLowerCase()))}async findContactsMatchingEmailAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))}async loadData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.reloadAdviser.determineAction(this.cache,e);return t===h.none?p.Result.success(this.cache):(this.loader||(this.loader=new Promise((e=>{this.fetchData().then((t=>{if(t.ok){const{recipients:n}=t.value;this.cache.update(n),this.loader=void 0,e(p.Result.success(this.cache))}else e(t)}))}))),t===h.background?p.Result.success(this.cache):this.loader)}async fetchData(){const e=await this.cloudOSDelegate.getDSID();return f((()=>{const t=this.buildWebServiceURL(e);return this.cloudOSDelegate.fetchWebServiceURL(t.href,{})}))}async preload(){const e=await this.loadData();return e.ok?p.Result.success(!0):e}}z.serviceName="mcc";const B=e=>e.recipients.flatMap((e=>[T("recipientName",e),T("recipientEmail",e)].filter(Boolean).map(I))),K=e=>e.recipients.flatMap((e=>[T("recipientEmail",e)].filter(Boolean).map(I)));async function H(e,t){try{return await O(e,t)}catch(n){return n instanceof O.PromiseTimeoutError?p.Result.success([]):p.Result.failure({code:"ServiceUnavailable",context:n.message,retryable:!0})}}class W{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.dataProviders=void 0,this.timeLimit=void 0,this.dataProviders=e,this.timeLimit=t.backendTimeLimit||1e3}async preload(e){const t=e?this.dataProviders:this.dataProviders.filter((e=>e.name!==o)),n=await Promise.all(t.map((e=>e.preload()))),{failure:r}=E(n);return r.length===n.length?p.Result.failure({code:"PreloadFailed",retryable:!0}):p.Result.success({complete:0===r.length})}async findAnyMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=this.filterOutUnwantedDataProviders(t.dataProviders,n),i=await Promise.all(r.map((n=>H(this.timeLimit,n.findAnyMatchingText(e,t))))),{success:o,failure:a}=E(i);return a.length===i.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}async findContactsMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=this.filterOutUnwantedDataProviders(t.dataProviders,n),i=await Promise.all(r.map((n=>H(this.timeLimit,n.findContactsMatchingText(e,t))))),{success:o,failure:a}=E(i);return a.length===i.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}async findContactsMatchingEmailAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=this.filterOutUnwantedDataProviders(t.dataProviders,n).filter((e=>"function"===typeof e.findContactsMatchingEmailAddress)),i=await Promise.all(r.map((n=>H(this.timeLimit,n.findContactsMatchingEmailAddress(e,t))))),{success:o,failure:a}=E(i);return a.length===i.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}async findContactsMatchingPhoneNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=this.filterOutUnwantedDataProviders(t.dataProviders,n).filter((e=>"function"===typeof e.findContactsMatchingPhoneNumber)),i=await Promise.all(r.map((n=>H(this.timeLimit,n.findContactsMatchingPhoneNumber(e,t))))),{success:o,failure:a}=E(i);return a.length===i.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}async findContactsForGroup(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=this.filterOutUnwantedDataProviders(t.dataProviders,n).filter((e=>"function"===typeof e.findContactsForGroup)),i=await Promise.all(r.map((n=>H(this.timeLimit,n.findContactsForGroup(e,t))))),{success:o,failure:a}=E(i);return a.length===i.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}async getAddressBookContacts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=this.filterOutUnwantedDataProviders(e.dataProviders,t).filter((e=>"function"===typeof e.getAddressBookContacts&&e.name===i)),r=await Promise.all(n.map((t=>t.getAddressBookContacts(e)))),{success:o,failure:a}=E(r);return a.length===r.length?p.Result.failure({code:"LookupFailed",retryable:!0}):p.Result.success({complete:0===a.length,items:o.flatMap((e=>e.value))})}filterOutUnwantedDataProviders(e,t){let n=[];return n=e?this.dataProviders.filter((t=>e.includes(t.name))):this.dataProviders,t?n:n.filter((e=>e.name!==o))}}class q{constructor(e,t){this.ttl=void 0,this.mappedTries=void 0,this.builders=void 0,this.ttl=e,this.builders=t,this.mappedTries=new Map}createNewTrie(e){if(1!==e.length)return;const t=new v(this.ttl);return this.builders.forEach(((e,n)=>{t.trie(n,e)})),this.mappedTries.set(e,t),t}getTrie(e){if(e&&!(e.length<1))return this.mappedTries.get(e[0])}update(e,t){const n=this.mappedTries.get(e);return null===n||void 0===n||n.update(t),n}hasCache(e){const t=e[0];return this.mappedTries.has(t)}getCache(e){return this.getTrie(e)}add(e,t){if(!e||e.length<1)return;const n=e[0];return this.hasCache(n)?this.update(n,t):null===(r=this.createNewTrie(n))||void 0===r?void 0:r.update(t);var r}}class V{get serviceName(){return V.serviceName}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.name=o,this.serviceUrl="",this.cloudOSDelegate=void 0,this.caches=void 0,this.reloadAdviser=void 0,this.loader=void 0,this.getAllKeysForLookup=e=>[T("firstName",e),T("middleName",e),T("lastName",e),T("email",e),T("name",e),T("displayName",e),T("email",e)].filter(Boolean).map(I),this.getPersonKeysForLookup=e=>[T("firstName",e),T("middleName",e),T("lastName",e),T("email",e)].filter(Boolean).map(I),this.getEmailsForLookup=e=>[T("email",e)].filter(Boolean).map(I),this.cloudOSDelegate=e,this.serviceUrl=this.cloudOSDelegate.urlForServiceName(this.serviceName,"");const n=new Map;n.set("any",(e=>[...e.personList,...e.classList,...e.groupList].map((e=>[this.getAllKeysForLookup(e),e])))),n.set("contacts",(e=>e.personList.map((e=>[this.getPersonKeysForLookup(e),e])))),n.set("contactsByEmail",(e=>[...e.personList,...e.groupList].map((e=>[this.getEmailsForLookup(e),e])))),this.caches=new q(t.cacheTTL||3e5,n),this.reloadAdviser=new y([new w(5e3),new b(.75),new S])}async findAnyMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(e,t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("any",e.toLowerCase()))}async findContactsMatchingText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(e,t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contacts",e.toLowerCase()))}async findContactsMatchingEmailAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.loadData(e,t);if(!n.ok)return n;const{value:r}=n;return p.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))}async preload(){return p.Result.success(!0)}async loadData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.caches.getCache(e);if(n){const e=this.reloadAdviser.determineAction(n,t);if(e===h.none||e===h.background)return p.Result.success(n)}return this.loader||(this.loader=(async()=>{const t=await this.fetchSearchData(e);if(t.ok){let n=t.value.flatMap((e=>{var t;const n=null!==(t=e.personList)&&void 0!==t?t:[],r=e.classList&&e.classList.length>0?"EDUCATION":e.groupList&&e.groupList.length>0?"BUSINESS":void 0;return n.map((e=>({...e,contextType:r})))})),r=t.value.flatMap((e=>{var t;return null!==(t=e.classList)&&void 0!==t?t:[]})),i=t.value.flatMap((e=>{var t;return null!==(t=e.groupList)&&void 0!==t?t:[]}));r=await Promise.all(r.map((async e=>{const t=await this.expandGroupsMemberList(e.id,a.CLASS);return{...e,members:t.value.memberList.map((e=>({...e,contextType:"EDUCATION"})))}}))),i=await Promise.all(i.map((async e=>{const t=await this.expandGroupsMemberList(e.id,a.GROUP);return{...e,members:t.value.memberList.map((e=>({...e,contextType:"BUSINESS"})))}})));const o=this.caches.add(e,{personList:n,classList:r,groupList:i});return this.loader=void 0,o?p.Result.success(o):p.Result.failure({code:"FetchFailed",retryable:!0})}return t})()),this.loader}async fetchSearchData(e){const t=[{entityType:a.PERSON,text:e,viewType:s.ALL,searchContext:c.ALL},{entityType:a.CLASS,text:e,viewType:s.ALL,searchContext:c.ALL},{entityType:a.GROUP,text:e,viewType:s.ALL,searchContext:c.ALL}];return f((()=>this.cloudOSDelegate.fetchWebServiceURL(`${this.serviceUrl}maid/v1/web/directory/search`,{method:"POST",credentials:"include",body:JSON.stringify(t)})))}async expandGroupsMemberList(e,t){let n,r=!0,i=[];for(;r;){const l=await H(1e3,this.fetchMembers(e,t,n));var o,a,s,c,u;l.ok?(r=null!==(o=null===l||void 0===l||null===(a=l.value)||void 0===a?void 0:a.hasMore)&&void 0!==o&&o,n=null===l||void 0===l||null===(s=l.value)||void 0===s?void 0:s.cursor,i=[...i,...null!==(c=null===l||void 0===l||null===(u=l.value)||void 0===u?void 0:u.memberList)&&void 0!==c?c:[]]):r=!1}return p.Result.success({memberList:i})}async fetchMembers(e,t,n){const r={id:e,entityType:t,...n&&{cursor:n}};return f((()=>this.cloudOSDelegate.fetchWebServiceURL(`${this.serviceUrl}maid/v1/web/members/fetch/v2`,{method:"POST",credentials:"include",body:JSON.stringify(r)})))}}V.serviceName="maidautocompletews";class ${constructor(e){this.listener=new d.a(u),this.closed=!1,this.contactsLookup=void 0,this.listener.addEventListener("connect",(e=>{e.connection.exportedObject=this,e.connection.start()}));const t=[];if(e){var n;const r=t=>t&&e.hasWebService(t)&&e.isWebServiceActive(t);r(D.serviceName)&&t.push(new D(e)),r(z.serviceName)&&t.push(new z(e));const i=V.serviceName;(null===(n=e.isMaidEnabled)||void 0===n?void 0:n.call(e))&&e.isManagedAppleID()&&r(i)&&t.push(new V(e))}const r=e.isManagedAppleID()?{backendTimeLimit:3e3}:{};this.contactsLookup=new W(t,r),this.listener.start()}findAnyMatchingText(e,t,n){return this.contactsLookup.findAnyMatchingText(e,t,n)}findContactsMatchingText(e,t,n){return this.contactsLookup.findContactsMatchingText(e,t,n)}findContactsMatchingEmailAddress(e,t,n){return this.contactsLookup.findContactsMatchingEmailAddress(e,t,n)}findContactsMatchingPhoneNumber(e,t,n){return this.contactsLookup.findContactsMatchingPhoneNumber(e,t,n)}findContactsForGroup(e,t,n){return this.contactsLookup.findContactsForGroup(e,t,n)}getAddressBookContacts(e,t){return this.contactsLookup.getAddressBookContacts(e,t)}preload(e){return this.contactsLookup.preload(e)}close(){if(!this.closed){this.closed=!0,this.listener.close();for(const e of this.listener.connections)e.close()}}}var G=n(898),Z=n(973),Q=n(2155),Y=n(884),J=n(2248),X=n(979);let ee=null;const te=()=>null!==ee&&void 0!==ee?ee:ee=new l;class ne extends X.a{constructor(){super(...arguments),this.contactsLookupService=null}init(){if(Q.e.value){var e;const t=null===(e=Q.h.value)||void 0===e?void 0:e.details;this.contactsLookupService=new $({getDSID:async()=>t&&Object(Y.d)(t)?t.dsid:"-1",getLocale:async()=>G.a.locale,urlForServiceName:J.j,fetchWebServiceURL:async(e,t,n)=>await Z.a.fetchURLWithRetry(e,t,n),hasWebService:J.e,isWebServiceActive:J.g,isManagedAppleID:()=>{var e;return null!==(e=null===t||void 0===t?void 0:t.isManagedAppleID)&&void 0!==e&&e},isProduction:J.f,isMaidEnabled:()=>!0})}}close(){var e;null===(e=this.contactsLookupService)||void 0===e||e.close()}}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return Pe})),n.d(t,"b",(function(){return Te}));var r=n(2181),i=n(949),o=n(955),a=n(930),s=n(946),c=n(953),u=n(961),l=n(943),d=n(960),p=n(954),f=n(2306),h=n(959),m=n(964),g=n(947),v=n(950),y=n(940),b=n(941),w=n(951),S=n(938);function C(e,t){const n=O(e,t),r={type:t&&t.name,value:I(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function _(e,t){return{exception:{values:[C(e,t)]}}}function O(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(E.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(i){}return[]}const E=/Minified React error #\d+;/i;function I(e){const t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function A(e,t,n,r,i){let o;if(Object(y.e)(t)&&t.error)return _(e,t.error);if(Object(y.a)(t)||Object(y.b)(t)){const i=t;if("stack"in t)o=_(e,t);else{const t=i.name||(Object(y.a)(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=T(e,a,n,r),Object(S.c)(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Object(y.d)(t)?_(e,t):Object(y.i)(t)||Object(y.f)(t)?(o=function(e,t,n,r){const i=Object(a.b)().getClient(),o=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Object(y.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Object(b.d)(t)}`}]},extra:{__serialized__:Object(w.b)(t,o)}};if(n){const t=O(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}(e,t,n,i),Object(S.b)(o,{synthetic:!0}),o):(o=T(e,t,n,r),Object(S.c)(o,`${t}`,void 0),Object(S.b)(o,{synthetic:!0}),o)}function T(e,t,n,r){const i={message:t};if(r&&n){const r=O(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}var P=n(929);const R=n(935).a;let k=0;function D(){return k>0}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Object(b.f)(e))return e}catch(i){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);const i=r.map((e=>M(e,t)));return e.apply(this,i)}catch(i){throw k++,setTimeout((()=>{k--})),Object(P.m)((e=>{e.addEventProcessor((e=>(t.mechanism&&(Object(S.c)(e,void 0,void 0),Object(S.b)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Object(P.c)(i)})),i}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(o){}Object(b.g)(r,e),Object(b.a)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(o){}return r}var N=n(942),x=n(962),L=n(939),j=n(963);const U="Breadcrumbs";class F{static __initStatic(){this.id=U}__init(){this.name=F.id}constructor(e){F.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){var e;this.options.console&&Object(d.a)("console",z),this.options.dom&&Object(d.a)("dom",(e=this.options.dom,function(t){let n,r="object"===typeof e?e.serializeAttribute:void 0,i="object"===typeof e&&"number"===typeof e.maxStringLength?e.maxStringLength:void 0;i&&i>1024&&(i=1024),"string"===typeof r&&(r=[r]);try{n=t.event.target?Object(N.c)(t.event.target,{keyAttrs:r,maxStringLength:i}):Object(N.c)(t.event,{keyAttrs:r,maxStringLength:i})}catch(o){n="<unknown>"}0!==n.length&&Object(a.b)().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})})),this.options.xhr&&Object(d.a)("xhr",B),this.options.fetch&&Object(d.a)("fetch",K),this.options.history&&Object(d.a)("history",H)}addSentryBreadcrumb(e){this.options.sentry&&Object(a.b)().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Object(S.f)(e)},{event:e})}}function z(e){for(let n=0;n<e.args.length;n++)if("ref=Ref<"===e.args[n]){e.args[n+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:Object(x.b)(e.level),message:Object(L.c)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Object(L.c)(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Object(a.b)().addBreadcrumb(t,{input:e.args,level:e.level})}function B(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};Object(a.b)().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function K(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Object(a.b)().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Object(a.b)().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function H(e){let t=e.from,n=e.to;const r=Object(j.b)(R.location.href);let i=Object(j.b)(t);const o=Object(j.b)(n);i.path||(i=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),Object(a.b)().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}F.__initStatic();class W extends f.a{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:h.a}],version:h.a},super(e),e.sendClientReports&&R.document&&R.document.addEventListener("visibilitychange",(()=>{"hidden"===R.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=A(e,t,n&&n.syntheticException||void 0,r);return Object(S.b)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Object(l.c)(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const o=T(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Object(l.c)(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(U);Object(p.a)([n,"optionalAccess",e=>e.addSentryBreadcrumb,"optionalCall",t=>t(e)]),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return;if(!this._dsn)return;const t=Object(s.a)(this._dsn,this._options),n=Object(m.a)(e,this._options.tunnel&&Object(g.b)(this._dsn));try{"[object Navigator]"===Object.prototype.toString.call(R&&R.navigator)&&"function"===typeof R.navigator.sendBeacon&&!this._options.transportOptions?R.navigator.sendBeacon.bind(R.navigator)(t,Object(v.h)(n)):this._sendEnvelope(n)}catch(r){}}}const q="?";function V(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const $=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,G=/\((\S*)(?::(\d+))(?::(\d+))\)/,Z=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Q=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Y=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,J=[[30,e=>{const t=$.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=G.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=ee(t[1]||q,t[2]);return V(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=Z.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Q.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||q;return[n,e]=ee(n,e),V(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=Y.exec(e);return t?V(t[2],t[1]||q,+t[3],t[4]?+t[4]:void 0):void 0}]],X=Object(c.a)(...J),ee=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:q,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},te=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ne{static __initStatic(){this.id="TryCatch"}__init(){this.name=ne.id}constructor(e){ne.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Object(b.e)(R,"setTimeout",re),this._options.setInterval&&Object(b.e)(R,"setInterval",re),this._options.requestAnimationFrame&&Object(b.e)(R,"requestAnimationFrame",ie),this._options.XMLHttpRequest&&"XMLHttpRequest"in R&&Object(b.e)(XMLHttpRequest.prototype,"send",oe);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:te).forEach(ae)}}function re(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n[0];return n[0]=M(i,{mechanism:{data:{function:Object(c.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function ie(e){return function(t){return e.apply(this,[M(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(c.b)(e)},handled:!0,type:"instrument"}})])}}function oe(e){return function(){const t=this;["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in t&&"function"===typeof t[e]&&Object(b.e)(t,e,(function(t){const n={mechanism:{data:{function:e,handler:Object(c.b)(t)},handled:!0,type:"instrument"}},r=Object(b.f)(t);return r&&(n.mechanism.data.handler=Object(c.b)(r)),M(t,n)}))}));for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(this,r)}}function ae(e){const t=R,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(b.e)(n,"addEventListener",(function(t){return function(n,r,i){try{"function"===typeof r.handleEvent&&(r.handleEvent=M(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(c.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(o){}return t.apply(this,[n,M(r,{mechanism:{data:{function:"addEventListener",handler:Object(c.b)(r),target:e},handled:!0,type:"instrument"}}),i])}})),Object(b.e)(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(o){}return e.call(this,t,i,r)}})))}ne.__initStatic();class se{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=se.id}__init2(){this._installFunc={onerror:ce,onunhandledrejection:ue}}constructor(e){se.prototype.__init.call(this),se.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const t in e){const n=this._installFunc[t];n&&e[t]&&(n(),this._installFunc[t]=void 0)}}}function ce(){Object(d.a)("error",(e=>{const[t,n,r]=pe();if(!t.getIntegration(se))return;const{msg:i,url:o,line:a,column:s,error:c}=e;if(D()||c&&c.__sentry_own_request__)return;const u=void 0===c&&Object(y.l)(i)?function(e,t,n,r){let i=Object(y.e)(e)?e.message:e,o="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);a&&(o=a[1],i=a[2]);return le({exception:{values:[{type:o,value:i}]}},t,n,r)}(i,o,a,s):le(A(n,c||i,void 0,r,!1),o,a,s);u.level="error",de(t,c,u,"onerror")}))}function ue(){Object(d.a)("unhandledrejection",(e=>{const[t,n,r]=pe();if(!t.getIntegration(se))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(a){}if(D()||i&&i.__sentry_own_request__)return!0;const o=Object(y.j)(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:A(n,i,void 0,r,!0);o.level="error",de(t,i,o,"onunhandledrejection")}))}function le(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=Object(y.l)(t)&&t.length>0?t:Object(N.b)();return 0===c.length&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function de(e,t,n,r){Object(S.b)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function pe(){const e=Object(a.b)(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}se.__initStatic();var fe=n(931);class he{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=he.id}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};he.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=Object(a.b)().getClient();e&&Object(fe.b)(((t,n)=>{const r=Object(a.b)().getIntegration(he);return r?function(e,t,n,r,i){if(!r.exception||!r.exception.values||!i||!Object(y.g)(i.originalException,Error))return r;const o=me(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t}))}}function me(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Object(y.g)(n[r],Error)||i.length+1>=t)return i;const o=C(e,n[r]);return me(e,t,n[r],r,[o,...i])}he.__initStatic();class ge{constructor(){ge.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=ge.id}setupOnce(e,t){const n=e=>{const n=t().getIntegration(ge);if(n){try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!ye(e,t)&&!!ve(e,t))))}(e,t)||!!function(e,t){const n=be(t),r=be(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!ye(e,t)&&!!ve(e,t)))}(e,t))}(e,n._previousEvent))return null}catch(r){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function ve(e,t){let n=we(e),r=we(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function ye(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function be(e){return e.exception&&e.exception.values&&e.exception.values[0]}function we(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}ge.__initStatic();class Se{constructor(){Se.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Se.id}setupOnce(){Object(fe.b)((e=>{if(Object(a.b)().getIntegration(Se)){if(!R.navigator&&!R.location&&!R.document)return e;const t=e.request&&e.request.url||R.location&&R.location.href,{referrer:n}=R.document||{},{userAgent:r}=R.navigator||{},i={...t&&{url:t},headers:{...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}}};return{...e,request:i}}return e}))}}Se.__initStatic();var Ce=n(956);let _e;function Oe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){if(_e)return _e;if(Object(u.a)(R.fetch))return _e=R.fetch.bind(R);const e=R.document;let t=R.fetch;if(e&&"function"===typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){}return _e=t.bind(R)}();return Object(Ce.a)(e,(function(n){const r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};try{return t(e.url,r).then((e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(i){return _e=void 0,Object(l.b)(i)}}))}const Ee=4;function Ie(e){return Object(Ce.a)(e,(function(t){return new l.a(((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{i.readyState===Ee&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)}))}))}const Ae=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new ne,new F,new se,new he,new ge,new Se];function Te(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0===e.defaultIntegrations&&(e.defaultIntegrations=Ae),void 0===e.release&&("string"===typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),R.SENTRY_RELEASE&&R.SENTRY_RELEASE.id&&(e.release=R.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:Object(c.d)(e.stackParser||X),integrations:Object(i.a)(e),transport:e.transport||(Object(u.e)()?Oe:Ie)};Object(o.a)(W,t),e.autoSessionTracking&&function(){if("undefined"===typeof R.document)return;const e=Object(a.b)();e.captureSession&&(Re(e),Object(d.a)("history",(e=>{let{from:t,to:n}=e;void 0!==t&&t!==n&&Re(Object(a.b)())})))}()}function Pe(e){const t=Object(a.b)().getClient();return t?t.flush(e):Object(l.c)(!1)}function Re(e){e.startSession({ignoreDuration:!0}),e.captureSession()}},function(e,t,n){"use strict";n.d(t,"g",(function(){return Y})),n.d(t,"d",(function(){return oe})),n.d(t,"h",(function(){return ae})),n.d(t,"e",(function(){return se})),n.d(t,"b",(function(){return ue})),n.d(t,"f",(function(){return pe})),n.d(t,"a",(function(){return he})),n.d(t,"c",(function(){return ye}));var r=n(882),i=n.n(r),o=n(2159),a=n(878);__CW_BUILD_INFO.masteringNumber;const s=__CW_BUILD_INFO.buildNumber;let c;var u=n(889),l=n(883),d=n(897),p=n(888),f=n(890),h=n(2249),m=n(887);const g=p.z.object({dsid:p.z.string(),ageRestricted:p.z.boolean().optional(),aDsID:p.z.string(),firstName:p.z.string(),lastName:p.z.string(),fullName:p.z.string(),locale:p.z.string(),languageCode:p.z.string(),countryCode:p.z.string().optional(),appleId:p.z.string(),brMigrated:p.z.boolean(),brZoneConsolidated:p.z.boolean(),tantorMigrated:p.z.boolean(),notesMigrated:p.z.boolean(),statusCode:p.z.number(),appleIdEntries:p.z.object({isPrimary:p.z.boolean().optional(),type:p.z.string()}).array(),isManagedAppleID:p.z.boolean(),locked:p.z.boolean(),isWebAccessAllowed:p.z.boolean().optional(),isICDRSDisabled:p.z.boolean().optional(),isDeviceConsentedForPCS:p.z.boolean().optional(),deviceConsentForPCSExpiry:p.z.number().optional(),ICDRSCapableDeviceList:p.z.string().optional(),ICDRSCapableDeviceCount:p.z.number().optional(),SBCapableDeviceCount:p.z.number().optional(),beneficiaryInfo:p.z.object({isBeneficiary:p.z.boolean(),isBeneficiaryMultiple:p.z.boolean().optional(),beneficiaryExpiredTime:p.z.number().optional()}).optional(),isHideMyEmailSubscriptionActive:p.z.boolean().optional(),isCustomDomainTransferSubscriptionActive:p.z.boolean().optional(),isCustomDomainPurchaseSubscriptionActive:p.z.boolean().optional(),isPaidDeveloper:p.z.boolean().optional(),customEmailDomainServiceEndDate:p.z.string().optional(),hasUnreleasedOS:p.z.boolean().optional(),isCustomDomainsFeatureAvailable:p.z.boolean().optional(),isHideMyEmailFeatureAvailable:p.z.boolean().optional(),mailFlags:p.z.object({isCKMail:p.z.boolean(),isSearchV2Provisioned:p.z.boolean(),isThreadingAvailable:p.z.boolean(),rawBits:p.z.number().array().optional(),isMppSupportedInCurrentCountry:p.z.boolean().optional()}),analyticsOptInStatus:p.z.boolean(),hsaEnabled:p.z.boolean().optional(),hsaVersion:p.z.number().optional(),primaryEmail:p.z.string().optional(),isAppleOrgManagedID:p.z.boolean().optional()}),v=p.z.object({requiredServices:p.z.string().array().optional(),supportedFileExtensions:p.z.string().array().optional(),isHidden:p.z.boolean().optional(),isPCSRequired:p.z.boolean().optional(),pushTopic:p.z.string().optional(),supportedLocales:p.z.string().array().optional(),additionalSupportedLocales:p.z.string().array().optional(),radarComponentId:p.z.number().optional(),requiresAuth:p.z.boolean().optional(),isWWW:p.z.boolean().optional(),isBeta:p.z.boolean().optional(),isFuture:p.z.boolean().optional(),isCarry:p.z.boolean().optional(),shareInfo:p.z.object({containerIdentifier:p.z.string(),partition:p.z.string(),titleFields:p.z.object({name:p.z.string(),type:p.z.string()}).array()}).optional(),isQualifiedForBeta:p.z.boolean().optional(),preloadCoreTypes:p.z.boolean().optional(),supportsLite:p.z.boolean().optional(),hasPreferences:p.z.boolean().optional(),showsPushNotifications:p.z.boolean().optional(),awakesInBackgroundFromPush:p.z.boolean().optional(),supportsMAID:p.z.boolean().optional(),supportsPhoneNumberBasedAppleId:p.z.boolean().optional(),canLaunchWithOneFactor:p.z.boolean().optional(),deviceNotSupported:p.z.boolean().optional()}),y=p.z.object({url:p.z.string().optional(),status:p.z.string().optional(),iCloudEnv:p.z.object({shortId:p.z.string(),vipSuffix:p.z.string()}).optional(),pcsRequired:p.z.boolean().optional()}),b=p.z.object({accountCreateUI:p.z.string(),accountVerifyUI:p.z.string(),accountLoginUI:p.z.string(),accountLogin:p.z.string(),accountRepairUI:p.z.string(),downloadICloudTerms:p.z.string(),repairDone:p.z.string(),vettingUrlForEmail:p.z.string(),vettingUrlForPhone:p.z.string(),accountCreate:p.z.string(),getICloudTerms:p.z.string(),accountAuthorizeUI:p.z.string(),eventGatewayV1:p.z.string()});function w(e){return{responseKind:"unknown",isOK:!1,isError:!0,error:e}}const S=p.z.object({country:p.z.string().optional(),isAppleInternal:p.z.boolean().optional(),region:p.z.string().optional(),timeZone:p.z.string().optional()}),C=p.z.union([p.z.array(S.optional()),S]);p.z.object({appsOrder:p.z.string().array(),apps:p.z.record(p.z.object({isQualifiedForBeta:p.z.boolean().optional(),canLaunchWithOneFactor:p.z.boolean().optional(),isHidden:p.z.boolean().optional(),deviceNotSupported:p.z.boolean().optional()})),dsInfo:g,requestInfo:C,domainToUse:p.z.string().optional(),hsaTrustedBrowser:p.z.boolean(),trustTokens:p.z.string().array().optional(),configBag:p.z.object({urls:b,accountCreateEnabled:p.z.union([p.z.boolean(),p.z.string()])}),isUnderMaintenance:p.z.boolean().optional(),maintenanceDuration:p.z.number().optional(),hsaChallengeRequired:p.z.boolean(),webservices:p.z.record(y),isCarryUser:p.z.boolean().optional(),isExtendedLogin:p.z.boolean(),pcsServiceIdentitiesIncluded:p.z.boolean().optional(),primaryEmail:p.z.string().optional(),pcsDeleted:p.z.boolean(),termsUpdateNeeded:p.z.boolean().optional(),showGcbdPrivacyNotice:p.z.boolean().optional(),environment:p.z.string(),isEP:p.z.boolean().optional(),success:p.z.boolean().optional(),error:p.z.number().optional()});const _=p.z.union([p.z.literal("ICLOUD1"),p.z.literal("ICLOUD2"),p.z.literal("ICLOUD3"),p.z.literal("PROD")]),O=p.z.object({configBag:p.z.object({urls:b,accountCreateEnabled:p.z.union([p.z.boolean(),p.z.string()]),isEPR:p.z.boolean().optional()}).optional(),environment:_.optional(),error:p.z.string().or(p.z.number()).optional(),requestInfo:C.optional(),success:p.z.boolean().optional(),trustTokens:p.z.string().array().optional(),termsUpdateNeeded:p.z.boolean().optional(),showGcbdPrivacyNotice:p.z.boolean().optional(),hsaTrustedBrowser:p.z.boolean().optional(),pcsDeleted:p.z.boolean().optional()});function E(e){return O.safeParse(e).success}const I=p.z.object({dsInfo:g,hasMinimumDeviceForPhotosWeb:p.z.boolean(),iCDPEnabled:p.z.boolean(),webservices:p.z.record(y),pcsEnabled:p.z.boolean().optional(),isEP:p.z.boolean().optional(),configBag:p.z.object({urls:b,accountCreateEnabled:p.z.union([p.z.boolean(),p.z.string()]),isEPR:p.z.boolean().optional()}),environment:_.optional(),hsaTrustedBrowser:p.z.boolean().optional(),appsOrder:p.z.array(p.z.string()),version:p.z.number(),isExtendedLogin:p.z.boolean(),pcsServiceIdentitiesIncluded:p.z.boolean().optional(),hsaChallengeRequired:p.z.boolean().optional(),requestInfo:C,pcsDeleted:p.z.boolean(),iCloudInfo:p.z.object({SafariBookmarksHasMigratedToCloudKit:p.z.boolean(),canShare:p.z.boolean().optional(),allowDataAnalytics:p.z.boolean().optional()}),apps:p.z.record(p.z.object({isQualifiedForBeta:p.z.boolean().optional(),canLaunchWithOneFactor:p.z.boolean().optional(),isHidden:p.z.boolean().optional(),deviceNotSupported:p.z.boolean().optional()})),isUnderMaintenance:p.z.boolean().optional(),maintenanceDuration:p.z.number().optional(),trustTokens:p.z.string().array().optional(),termsUpdateNeeded:p.z.boolean().optional(),showGcbdPrivacyNotice:p.z.boolean().optional(),isCarryUser:p.z.boolean().optional(),userPartition:p.z.number().nonnegative().int().optional()}),A=p.z.object({domainToUse:p.z.string()}),T=p.z.object({error:p.z.string()}),P=p.z.union([I,A,T]);function R(e){return I.safeParse(e).success}function k(e,t,n,r){const{configBag:i,requestInfo:o,trustTokens:a,hsaTrustedBrowser:s,pcsDeleted:c,termsUpdateNeeded:l,showGcbdPrivacyNotice:d,environment:p}=e;if(!i)throw null===r||void 0===r||r("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag"}),new Error("[AuthenticationDataResponse] no configBag found");if(!i.urls)throw null===r||void 0===r||r("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag.urls"}),new Error("[AuthenticationDataResponse] no configBag.urls found");const f="true"===i.accountCreateEnabled||!0===i.accountCreateEnabled;return{responseKind:"partial",isOK:!0,isError:!1,urls:i.urls,configBag:i,requestInfo:Array.isArray(o)?o[0]:o,trustTokens:null!==a&&void 0!==a?a:[],isPCSKeyDeleted:null!==c&&void 0!==c&&c,pcsServiceIdentitiesIncluded:!1,hsaTrustedBrowser:null!==s&&void 0!==s&&s,termsUpdateNeeded:null!==l&&void 0!==l&&l,showGcbdPrivacyNotice:null!==d&&void 0!==d&&d,environment:null!==p&&void 0!==p?p:"PROD",httpStatusCode:n,rawResponse:t,primaryEmail:null,applications:[],webServices:null,accountCreateEnabled:f,isCarryUser:!1,authenticatedUserDetails:null,isAuthenticated:!1,isExtendedLogin:!1,totalAuthenticationSteps:0,completedAuthenticationStep:0,accountType:u.a.UNKNOWN}}function D(e,t,n){var r,i;const o=e.configBag,a=e.requestInfo,s=e.trustTokens,c=e.hsaTrustedBrowser,l=e.pcsDeleted,d=e.termsUpdateNeeded,p=e.showGcbdPrivacyNotice,f=e.environment,h=e.isEP;if(!o)throw null===n||void 0===n||n("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag"}),new Error("[AuthenticationDataResponse] no configBag found");if(!o.urls)throw null===n||void 0===n||n("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag.urls"}),new Error("[AuthenticationDataResponse] no configBag.urls found");const m=e.dsInfo,g=m.hsaEnabled?2:1,y=m.hsaEnabled?e.hsaChallengeRequired?1:2:1,b=!m.hsaEnabled||!e.hsaChallengeRequired,w=m.hsaEnabled?2===m.hsaVersion?u.a.HSA2:1===m.hsaVersion?u.a.HSA1:0===m.hsaVersion&&m.isManagedAppleID?u.a.MANAGED:null:m.isManagedAppleID?u.a.MANAGED:u.a.SA;if(null===w)throw new Error(`[AuthenticationDataResponse] fromSuccessResponse: Unknown hsaVersion ${m.hsaVersion} from dsInfo`);const S="true"===o.accountCreateEnabled||!0===o.accountCreateEnabled,C=e.configBag.urls;if(!e.webservices)throw new Error("[AuthenticationDataResponse] fromSuccessResponse: No services found");const _=new Map;for(const u in e.webservices){const t=e.webservices[u];t.url&&_.set(u,{url:t.url,...t.status&&{status:t.status},...t.iCloudEnv&&{iCloudEnv:t.iCloudEnv},...t.pcsRequired&&{pcsRequired:t.pcsRequired}})}const O=e.apps,E=e.appsOrder;if(null!==(r=e.dsInfo.beneficiaryInfo)&&void 0!==r&&r.isBeneficiary){delete O.find,delete O.settings;const e=E.indexOf("find");e>=0&&E.splice(e,1);const t=E.indexOf("settings");t>=0&&E.splice(t,1)}const I=function(e,t){const n=[];for(const i of e){const e=t[i];r=e,v.safeParse(r).success&&n.push({name:i,setupInfo:e})}var r;return n}(e.appsOrder,e.apps),A=function(e){var t,n;return{dsid:e.dsid,ageRestricted:null!==(t=e.ageRestricted)&&void 0!==t&&t,aDsID:e.aDsID,firstName:e.firstName,lastName:e.lastName,fullName:e.fullName,locale:e.locale,languageCode:e.languageCode,appleId:e.appleId,isManagedAppleID:e.isManagedAppleID,locked:e.locked,statusCode:e.statusCode,appleIdEntries:e.appleIdEntries,brMigrated:e.brMigrated,brZoneConsolidated:e.brZoneConsolidated,tantorMigrated:e.tantorMigrated,notesMigrated:e.notesMigrated,isWebAccessAllowed:null===(n=e.isWebAccessAllowed)||void 0===n||n,...void 0!==e.countryCode&&{countryCode:e.countryCode},...void 0!==e.isICDRSDisabled&&{isICDRSDisabled:e.isICDRSDisabled},...void 0!==e.isDeviceConsentedForPCS&&{isDeviceConsentedForPCS:e.isDeviceConsentedForPCS},...void 0!==e.deviceConsentForPCSExpiry&&{deviceConsentForPCSExpiry:e.deviceConsentForPCSExpiry},...void 0!==e.ICDRSCapableDeviceList&&{ICDRSCapableDeviceList:e.ICDRSCapableDeviceList},...void 0!==e.ICDRSCapableDeviceCount&&{ICDRSCapableDeviceCount:e.ICDRSCapableDeviceCount},...void 0!==e.SBCapableDeviceCount&&{SBCapableDeviceCount:e.SBCapableDeviceCount},...void 0!==e.beneficiaryInfo&&{beneficiaryInfo:e.beneficiaryInfo},...void 0!==e.isHideMyEmailSubscriptionActive&&{isHideMyEmailSubscriptionActive:e.isHideMyEmailSubscriptionActive},...void 0!==e.isCustomDomainTransferSubscriptionActive&&{isCustomDomainTransferSubscriptionActive:e.isCustomDomainTransferSubscriptionActive},...void 0!==e.isCustomDomainPurchaseSubscriptionActive&&{isCustomDomainPurchaseSubscriptionActive:e.isCustomDomainPurchaseSubscriptionActive},...void 0!==e.isPaidDeveloper&&{isPaidDeveloper:e.isPaidDeveloper},...void 0!==e.customEmailDomainServiceEndDate&&{customEmailDomainServiceEndDate:e.customEmailDomainServiceEndDate},...void 0!==e.hasUnreleasedOS&&{hasUnreleasedOS:e.hasUnreleasedOS},...void 0!==e.isCustomDomainsFeatureAvailable&&{isCustomDomainsFeatureAvailable:e.isCustomDomainsFeatureAvailable},...void 0!==e.isHideMyEmailFeatureAvailable&&{isHideMyEmailFeatureAvailable:e.isHideMyEmailFeatureAvailable},analyticsOptInStatus:e.analyticsOptInStatus,...void 0!==e.mailFlags&&{mailFlags:e.mailFlags},...void 0!==e.isAppleOrgManagedID&&{isAppleOrgManagedID:e.isAppleOrgManagedID}}}(m),T=e.isCarryUser,P=e.isExtendedLogin,R=e.dsInfo.primaryEmail,k=e.userPartition,D=e.isUnderMaintenance,M=e.maintenanceDuration;return{responseKind:"success",isOK:!0,isError:!1,accountCreateEnabled:S,urls:C,completedAuthenticationStep:y,primaryEmail:null!==R&&void 0!==R?R:"",totalAuthenticationSteps:g,isAuthenticated:b,accountType:w,isCarryUser:null!==T&&void 0!==T&&T,trustTokens:null!==s&&void 0!==s?s:[],authenticatedUserDetails:A,applications:I,isEP:h,configBag:o,hsaTrustedBrowser:null!==c&&void 0!==c&&c,termsUpdateNeeded:null!==d&&void 0!==d&&d,showGcbdPrivacyNotice:null!==p&&void 0!==p&&p,requestInfo:Array.isArray(a)?a[0]:a,webServices:_,rawResponse:e,httpStatusCode:t,environment:null!==f&&void 0!==f?f:"PROD",isExtendedLogin:P,pcsServiceIdentitiesIncluded:null===(i=e.pcsServiceIdentitiesIncluded)||void 0===i||i,isPCSKeyDeleted:l,userPartition:null!==k&&void 0!==k?k:void 0,isUnderMaintenance:D,maintenanceDuration:M,safariBookmarksHasMigratedToCloudKit:e.iCloudInfo.SafariBookmarksHasMigratedToCloudKit}}let M="";function N(){return M}async function x(e){const{servicesDomain:t}=m.a;M=crypto.randomUUID();try{const n=await e(z(`https://setup.${t}/setup/ws/1/validate`),{method:"POST",credentials:"include"}),r=n.status;if(0===r)return w("Timed out or no response");if(n.ok){const e=await n.json();if(R(e))return D(e,r)}else if(401===r||421===r||403===r){const e=await n.json();if(E(e))return k(e,e,r)}return w(`Invalid authentication response code ${r}`)}catch(n){return w(n instanceof f.a?"Failed to validate JSON response":"Timed out or no response")}}async function L(e,t,n,r,i,o){var a,s;const c={...n};let l;n.dsWebAuthToken&&(c.accountCountryCode=r,c.extended_login=i,o&&(c.trustToken=o)),M=crypto.randomUUID();try{const n=await e(z(t),{method:"POST",body:JSON.stringify(c),validate:{type:"WireAuthenticatedUserResponse",schema:P},credentials:"include"});l=n.ok?n.response:null}catch{l=null}const d=null!==(a=null===(s=l)||void 0===s?void 0:s.status)&&void 0!==a?a:0;if(!l||0===d)return w("Timed out or no response");try{const e=await l.json();return 200===d?D(e,d):function(e,t){var n,r;return{responseKind:"error",isOK:null!==(n=e.success)&&void 0!==n&&n,isError:!0,httpStatusCode:t,rawResponse:e,error:null!==(r=e.error)&&void 0!==r?r:t,environment:e.environment,applications:[],webServices:null,urls:null,accountCreateEnabled:!1,trustTokens:[],isPCSKeyDeleted:!1,pcsServiceIdentitiesIncluded:!1,primaryEmail:null,isAppleInternal:!1,hsaTrustedBrowser:!1,termsUpdateNeeded:!1,showGcbdPrivacyNotice:!1,isCarryUser:!1,authenticatedUserDetails:null,isAuthenticated:!1,isExtendedLogin:!1,totalAuthenticationSteps:0,completedAuthenticationStep:0,accountType:u.a.UNKNOWN,domainToUse:e.domainToUse,requestInfo:Array.isArray(e.requestInfo)?e.requestInfo[0]:e.requestInfo}}(e,d)}catch{}return w("Failed to validate JSON response")}const j=p.z.object({onDemand2FAToken:p.z.string(),success:p.z.literal(!0)}),U=p.z.object({environment:p.z.string().optional(),success:p.z.literal(!1),error:p.z.string().optional()}),F=p.z.discriminatedUnion("success",[j,U]);function z(e){const t=h.b(e),{searchParams:n}=t;return n.set("requestId",M),t.toString()}const B=p.z.object({country:p.z.string(),downloadICloudTerms:p.z.string(),locale:p.z.string(),iCloudTerms:p.z.object({summary:p.z.string(),type:p.z.string(),title:p.z.string(),version:p.z.number(),content:p.z.string()}),gcbdPrivacyNoticeTitle:p.z.string().optional(),gcbdPrivacyNoticeMessage:p.z.string().optional(),confirmAndAgreeButtonText:p.z.string().optional(),disagreeButtonText:p.z.string().optional()}),K=p.z.object({success:p.z.boolean()});function H(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var W,q=n(2193),V=n(891),$=n(2248);function G(e,t){return new Promise((n=>globalThis.setTimeout((()=>{n(t)}),e)))}class Z{constructor(){this.startTimestamp=void 0,this.endTimestamp=void 0}start(){this.startTimestamp=Date.now()}duration(){var e;return this.endTimestamp=Date.now(),this.endTimestamp-(null!==(e=this.startTimestamp)&&void 0!==e?e:this.endTimestamp)}}!function(e){e.COULD_NOT_VALIDATE="Validate error",e.COULD_NOT_LOG_IN_STEP="Could not log in while processing authentication step",e.COULD_NOT_LOG_IN="Could not log in to account",e.COULD_NOT_LOG_IN_REAUTH="Could not log in to reauthenticate the user",e.TERMS_ACCEPTANCE_REQUIRED="Terms need to be accepted",e.RETRIEVING_TERMS_FAILURE="Could not get terms and conditions",e.ACCEPTING_TERMS_FAILURE="Terms could not be accepted",e.KVS_ERROR="Key value store error",e.MISSING_GCBD_TERMS="Missing GCBD terms",e.MISSING_PCS_KEYS="Missing PCS Keys"}(W||(W={}));class Q{constructor(e,t){var n;this.appProxy=void 0,this.cloudOSProxy=void 0,this.authenticationStepObservers=new Set,this.cloudOSFetchFunctions=void 0,this.accountLoginDidFail=!1,this.previousDsidCookie=null,this.previousValidated=null,this.validateCallCount=0,this.loginTiming=new Z,this.pendingUserAuthPromise=null,this.pendingUserAuthResolve=null,this.pendingUserValidatePromise=null,this.pendingUserValidateResolve=null,this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null,this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null,this._unauthenticatePromise=void 0,this.isRedirectedToCorrectDomain=!1,this._isWebAccessAllowed=!0,this._isICDRSDisabled=!1,this._pcsServiceIdentitiesIncluded=!0,this.isUnderMaintenance=!1,this.maintenanceDuration=0,this.deviceConsentForPCSExpirySignal=Object(o.signal)(null),this.deviceConsentForPCSExpiryListeners=new Set,this.pollingIntervalId=null,this.lastPollTime=0,this.visibilityChangeHandler=null,this.cookieVisibilityChangeHandler=null,this.appProxy=e,this.cloudOSProxy=t,this.writeDsidCookie(),this.startPollingForCookieChange(),this.cloudOSFetchFunctions="Schema"in(n=e.fetchFunctions)?{fetchJson:async(e,t)=>{const r=new n.Schema(t.validate.type,t.validate.schema),i=await n.fetchJson(e,{...t,schema:r,isSuccessResponseStatus:e=>200<=e&&e<300||302===e});if(i.ok){const e=i.response.clone();return{...i,response:Object.assign(i.response,{validated:!0,unvalidatedJson:()=>e.json()})}}return i},fetchUrl:async(e,t)=>{const r=await n.fetchUntyped(e,t);if(r.ok)return r.value;if(r.error instanceof DOMException||r.error instanceof TypeError)throw r.error;return r.error}}:n}async validateUser(){var e,t;const n=await this._validateUser();switch(fe.value=n.response,n.result){case"validation-error":ce.value="UNKNOWN",this.processAuthenticationFailure(n.errorInfo);break;case"validation-failed":ce.value="UNAUTHENTICATED",null===(e=this.cloudOSProxy)||void 0===e||e.validationDidFail(),this.previousValidated=!1;break;case"validation-succeeded":if(ce.value="AUTHENTICATED",ae.value=Object(l.a)(n.response),!await this.waitForPCSKeysEPNativeTakeover())return;if(this.startAuthenticationPolling(),!ae.value.details)throw new Error("missing authentication details");null===(t=this.cloudOSProxy)||void 0===t||t.validationDidSucceed(),this.previousValidated=!0,await this.writeDsidCookie()}}async processAuthenticationStep(e,t,n,r,i,o){var a,s,c;if(this.accountLoginDidFail)return;if(r>i)throw new Error(`[AuthenticationController] processAuthenticationStep: invalid authentication steps ${r} of ${i}`);if(r>2||i>2)throw new Error(`[AuthenticationController] invalid authenticationStep, totalAuthenticationStep: ${r}, ${i}`);if(o&&1===r)return;const u=null===(a=$.c.value)||void 0===a?void 0:a.urls.accountLogin;if(!u)throw new Error("[AuthenticationController] processAuthenticationStep: No accountLoginUrl found");if(1!==r){if(!this.isRedirectedToCorrectDomain){var d;const e=ae.value;if(!e)throw new Error("No cloudOSUser processing step 2 of authentication");const t=null===e||void 0===e?void 0:e.details;if(!t)throw new Error("No authenticatedUser processing step 2 of authentication");t.completedAuthenticationStep=r,t.totalAuthenticationSteps=i,null===(d=this.cloudOSProxy)||void 0===d||d.authenticationStepDidComplete(e,r,i),this.authenticationStepObservers.forEach((e=>e.authenticationStepsDidChange()))}return}this.loginTiming.start();const p=await L(this.cloudOSFetchFunctions.fetchJson,u,e,n,t);fe.value=p;const f=await(async()=>{if(p.isOK&&!p.isError){var e;const i=Object(l.a)(p);var t,n,r;return p.authenticatedUserDetails&&(this.isWebAccessAllowed=p.authenticatedUserDetails.isWebAccessAllowed,this.isICDRSDisabled=null!==(t=p.authenticatedUserDetails.isICDRSDisabled)&&void 0!==t&&t,this.pcsServiceIdentitiesIncluded=p.pcsServiceIdentitiesIncluded,this.deviceConsentForPCSExpirySignal.value=p.authenticatedUserDetails.isDeviceConsentedForPCS&&"number"===typeof p.authenticatedUserDetails.deviceConsentForPCSExpiry?p.authenticatedUserDetails.deviceConsentForPCSExpiry:null,this.isUnderMaintenance=null!==(n=p.isUnderMaintenance)&&void 0!==n&&n,this.maintenanceDuration=null!==(r=p.maintenanceDuration)&&void 0!==r?r:0),ee(p,"processAuthenticationStep",{recordStat:this.appProxy.recordStat,configurationWasUpdated:null===(e=this.cloudOSProxy)||void 0===e?void 0:e.configurationWasUpdated}),i}var i,o;return this.accountLoginDidFail=!0,403===p.httpStatusCode&&2===p.error?(null===(i=this.cloudOSProxy)||void 0===i||i.accountNeedsSetUp(),null):302===p.httpStatusCode&&p.domainToUse?(this.isRedirectedToCorrectDomain=!0,null===(o=this.appProxy)||void 0===o||o.redirectUserToCorrectDomainToAuthenticate(p.domainToUse),null):(this.processAuthenticationFailure(X(W.COULD_NOT_LOG_IN_STEP,p.error)),this.appProxy.recordStat("accountLoginDidFail",{httpStatusCode:p.httpStatusCode,error:W.COULD_NOT_LOG_IN_STEP,info:p.error,requestId:N()}),null)})();if(!f)return;ae.value=f;const h=await this.showTermsIfNeeded(f.termsUpdateNeeded,f.showGcbdPrivacyNotice,null!==(s=f.countryCode)&&void 0!==s?s:void 0);"skipped"===h||"accepted"===h?(ce.value="PARTIALLY_AUTHENTICATED",null===(c=this.cloudOSProxy)||void 0===c||c.authenticationStepDidComplete(f,r,i)):this.processAuthenticationFailure(h)}async processAuthenticationFinish(e,t,n,r,i,o,a,s,c){var d,p;const f=ae.value,h=(t=>{if(this.isRedirectedToCorrectDomain)return!0;if(this.accountLoginDidFail)return!0;if(!f)return!1;const r=f.details;if(!r)throw new Error("[AuthenticationController] processAuthenticationFinish: cloudOSUser.details is undefined");if("number"===typeof a&&a!==r.totalAuthenticationSteps&&this.appProxy.recordStat("mismatchTotalAuthSteps",{accountTypeFromIdms:e,accountTypeFromSetupService:r.accountType,totalAuthStepsFromIdms:a,totalAuthStepsFromSetupService:r.totalAuthenticationSteps,completedAuthenticationStep:r.completedAuthenticationStep}),r.completedAuthenticationStep!==a&&r.completedAuthenticationStep!==r.totalAuthenticationSteps)throw new Error("[AuthenticationController] processAuthenticationFinish: completedAuthenticationStep should equal totalAuthenticationSteps");return null===(t=this.cloudOSProxy)||void 0===t||t.beginLoadPerformanceMeasurementForLogin(),Object(V.a)(f)&&n&&!f.termsUpdateNeeded})();de.value=t.dsMethod===u.c.NATIVE_TAKE_OVER_LOGIN,i=!!de.value||i;const m=await(async e=>{if(h)return f;const n=null===(e=$.c.value)||void 0===e?void 0:e.urls.accountLogin;if(!n)throw new Error("[AuthenticationController] processAuthenticationFinish: No accountLoginUrl found");this.loginTiming.startTimestamp||this.loginTiming.start();const a=await L(this.cloudOSFetchFunctions.fetchJson,n,t,r,i,o);if(fe.value=a,a.isOK&&!a.isError){var s,c;const e=Object(l.a)(a);var u,d,p;return a.authenticatedUserDetails&&(this.isWebAccessAllowed=a.authenticatedUserDetails.isWebAccessAllowed,this.isICDRSDisabled=null!==(u=a.authenticatedUserDetails.isICDRSDisabled)&&void 0!==u&&u,this.pcsServiceIdentitiesIncluded=a.pcsServiceIdentitiesIncluded,this.deviceConsentForPCSExpirySignal.value=a.authenticatedUserDetails.isDeviceConsentedForPCS&&"number"===typeof a.authenticatedUserDetails.deviceConsentForPCSExpiry?a.authenticatedUserDetails.deviceConsentForPCSExpiry:null,this.isUnderMaintenance=null!==(d=a.isUnderMaintenance)&&void 0!==d&&d,this.maintenanceDuration=null!==(p=a.maintenanceDuration)&&void 0!==p?p:0),null===(s=this.cloudOSProxy)||void 0===s||s.invalidateCachedAuthenticationDetails(),ee(a,"processAuthenticationFinish",{recordStat:this.appProxy.recordStat,configurationWasUpdated:null===(c=this.cloudOSProxy)||void 0===c?void 0:c.configurationWasUpdated}),e}var m;return 302===a.httpStatusCode&&a.domainToUse?(null===(m=this.appProxy)||void 0===m||m.redirectUserToCorrectDomainToAuthenticate(a.domainToUse),null):(this.appProxy.recordStat("accountLoginDidFail",{httpStatusCode:a.httpStatusCode,error:W.COULD_NOT_LOG_IN,info:a.error,requestId:N()}),this.processAuthenticationFailure(X(W.COULD_NOT_LOG_IN,a.error)),null)})();if(!m||!Object(V.a)(m))return;var g;ce.value="AUTHENTICATED",this.pendingUserAuthPromise&&(null===(g=this.pendingUserAuthResolve)||void 0===g||g.call(this,!0),this.pendingUserAuthPromise=null,this.pendingUserAuthResolve=null),ae.value=m;const v=await this.showTermsIfNeeded(m.termsUpdateNeeded,m.showGcbdPrivacyNotice,null!==(d=m.countryCode)&&void 0!==d?d:void 0);if("skipped"!==v&&"accepted"!==v)return void this.processAuthenticationFailure(v);if("accepted"===v){var y;const e=null===(y=$.c.value)||void 0===y?void 0:y.urls.accountLogin;if(!e)throw new Error("accountLoginURL is null");const n=await L(this.cloudOSFetchFunctions.fetchJson,e,t,r,i,void 0);if(fe.value=n,(!n.isOK||n.isError)&&302!==n.httpStatusCode)return this.appProxy.recordStat("accountLoginDidFail",{httpStatusCode:n.httpStatusCode,error:W.ACCEPTING_TERMS_FAILURE,info:n.error,requestId:N()}),void this.processAuthenticationFailure(X(W.ACCEPTING_TERMS_FAILURE))}const b=await this.fetchForAuthenticatedUser(m);if(b.success){if(await this.waitForPCSKeysEPNativeTakeover()){if(null===(p=this.cloudOSProxy)||void 0===p||p.setupBrowserNotificationIfSupported(),this.startAuthenticationPolling(),!m.details)throw new Error("missing authentication details");this.processAuthenticationCompletion(t.dsMethod===u.c.NATIVE_TAKE_OVER_LOGIN,s,c),await this.writeDsidCookie(i?14:void 0)}}else this.processAuthenticationFailure(X(W.KVS_ERROR,b.error))}async fetchOnDemandToken(){return async function(e){const{servicesDomain:t}=m.a;try{const n=await e(`https://setup.${t}/setup/ws/1/fetchOnDemandWsToken`,{method:"POST",credentials:"include",validate:{type:"OnDemandTokenResponse",schema:F}});return n.ok?n.value:null}catch(n){return null}}(this.cloudOSFetchFunctions.fetchJson)}processAuthenticationError(e,t){ce.value="UNAUTHENTICATED",this.pendingUserAuthResolve&&(this.pendingUserAuthResolve(!1),this.pendingUserAuthPromise=null),this.processAuthenticationFailure(X(e,t))}authenticateUser(e,t){var n;"UNAUTHENTICATED"===ce.value||"UNKNOWN"===ce.value?(ce.value="AUTHENTICATING",this.pendingUserAuthPromise=new Promise((e=>{this.pendingUserAuthResolve=e})),null===(n=this.cloudOSProxy)||void 0===n||n.startInAppAuthentication(e,t)):this.continueAuthentication()}continueAuthentication(){var e;return("PARTIALLY_AUTHENTICATED"===ce.value||"AUTHENTICATING"===ce.value)&&(ce.value="AUTHENTICATING",null===(e=this.cloudOSProxy)||void 0===e||e.continueAuthentication(),!0)}async cancelUserAuthenticate(){var e;if("AUTHENTICATING"===ce.value)if(this.updateAuthenticationState(),this.pendingSessionRetrieveResolve)null===(e=this.cloudOSProxy)||void 0===e||e.sessionRetrieveDidComplete(),this.pendingSessionRetrieveResolve(null),this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null;else if(this.pendingReauthenticateResolve){var t;this.pendingReauthenticateResolve(!0),null===(t=this.cloudOSProxy)||void 0===t||t.reauthenticateDidCancel(),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null}else{var n;this.pendingUserAuthResolve&&(this.pendingUserAuthResolve(!1),this.pendingUserAuthResolve=null,this.pendingUserAuthPromise=null),ce.value="UNAUTHENTICATED",null===(n=this.cloudOSProxy)||void 0===n||n.authenticationDidCancel()}else console.warn(`[AuthenticationController] Cannot cancel authentication; unexpected AuthenticationState ${ce.value}`)}async unauthenticateUser(e){return this._unauthenticatePromise||(this._unauthenticatePromise=this._unauthenticateUser(e).finally((()=>{this._unauthenticatePromise=void 0}))),this._unauthenticatePromise}async _unauthenticateUser(e){var t,n;let{trustBrowser:r,allBrowsers:i}=e;var o;if(!ae.value)return await this.invalidateCachedAuthenticationDetails(),null===(o=this.cloudOSProxy)||void 0===o||o.userDidUnauthenticate(),!1;if(!await(null===(t=this.cloudOSProxy)||void 0===t?void 0:t.userWillUnauthenticate()))return!0;let a;return await Promise.race([Object(q.i)(),new Promise((e=>{a=setTimeout(e,2e3)}))]).then((()=>{clearTimeout(a)})),await async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=m.a.servicesDomain;let i,o=0;try{var a,s;i=await e(`https://setup.${r}/setup/ws/1/logout`,{method:"POST",body:JSON.stringify({trustBrowser:t,allBrowsers:n}),credentials:"include"}),o=null!==(a=null===(s=i)||void 0===s?void 0:s.status)&&void 0!==a?a:0}catch{}return 200===o}(this.cloudOSFetchFunctions.fetchUrl,r,i),await this.invalidateCachedAuthenticationDetails(),null===(n=this.cloudOSProxy)||void 0===n||n.userDidUnauthenticate(),!0}reauthenticateUser(e,t,n,r){var i,o,a,s,c;const u=null!==(i=this.pendingUserAuthPromise)&&void 0!==i?i:this.pendingReauthenticatePromise;if(u)return u;const l=ce.value;if("PARTIALLY_AUTHENTICATED"!==l&&"AUTHENTICATED"!==l){if("UNAUTHENTICATED"!==l)throw new Error(`[AuthenticationController] Cannot reauthenticate the current user; unexpected AuthenticationState ${ce.value}`);var d;null===(d=this.cloudOSProxy)||void 0===d||d.userDidUnauthenticate()}const p=ae.value;ce.value="AUTHENTICATING";const f=null===p||void 0===p||null===(o=p.details)||void 0===o?void 0:o.appleId;if(!f)throw new Error("appleId not available fo reauthenticateUser");null===(a=this.cloudOSProxy)||void 0===a||a.startSessionRetrieve({appleId:f,authStepsToComplete:null!==t&&void 0!==t?t:null===p||void 0===p||null===(s=p.details)||void 0===s?void 0:s.completedAuthenticationStep,signInLabel:e,accountType:null===p||void 0===p||null===(c=p.details)||void 0===c?void 0:c.accountType,offerSecurityUpgrade:n,enableFirstPartyOAuth:r});const h=new Promise((e=>{this.pendingReauthenticateResolve=e}));return this.pendingReauthenticatePromise=h,h}retrieveSession(e,t,n,r,i,o){const a=ce.value;if(this.pendingSessionRetrievePromise)return this.pendingSessionRetrievePromise;if("PARTIALLY_AUTHENTICATED"===a||"AUTHENTICATED"===a){var s;ce.value="AUTHENTICATING",null===(s=this.cloudOSProxy)||void 0===s||s.startSessionRetrieve({appleId:e,authStepsToComplete:t,signInLabel:n,offerSecurityUpgrade:r,skipTrustBrowserStep:i,enableFirstPartyOAuth:o});const a=new Promise((e=>{this.pendingSessionRetrieveResolve=e}));return this.pendingSessionRetrievePromise=a,a}throw new Error(`[AuthenticationController] Cannot authenticate for the given Apple ID; unexpected AuthenticationState ${ce.value}`)}async processSessionRetrieveFinish(e,t,n,r){var i;if("AUTHENTICATED"===ce.value)return;if("AUTHENTICATING"!==ce.value)throw new Error(`[AuthenticationController] Cannot unexpected AuthenticationState ${ce.value} in processSessionRetrieveFinish`);this.updateAuthenticationState(),null===(i=this.cloudOSProxy)||void 0===i||i.sessionRetrieveDidComplete();const o=this.pendingSessionRetrievePromise,a=this.pendingReauthenticatePromise;if(o&&a)throw new Error("[AuthenticationController] Both pending session retrieve and reauthenticate promise exist in processSessionRetrieveFinish");if(!o&&!a)throw new Error("[AuthenticationController] No pending session retrieve or reauthenticate promise in processSessionRetrieveFinish");var s;if(o&&(null===(s=this.pendingSessionRetrieveResolve)||void 0===s||s.call(this,e),this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null),a){var c;const i=null===(c=$.c.value)||void 0===c?void 0:c.urls.accountLogin;if(!i)throw new Error("accountLoginURL is null");const o=await L(this.cloudOSFetchFunctions.fetchJson,i,e,t,n,r);var u,l;fe.value=o,o.isOK?(null===(u=this.pendingReauthenticateResolve)||void 0===u||u.call(this,!0),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null):(null===(l=this.pendingReauthenticateResolve)||void 0===l||l.call(this,!1),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null,302!==o.httpStatusCode&&(this.appProxy.recordStat("accountLoginDidFail",{httpStatusCode:o.httpStatusCode,error:W.COULD_NOT_LOG_IN_REAUTH,info:o.error,requestId:N()}),this.processAuthenticationFailure(X(W.COULD_NOT_LOG_IN_REAUTH,o.error))))}}async createAccountCompleted(e){var t;this.appProxy.recordStat("createAccountSuccess");const n=null===(t=$.c.value)||void 0===t?void 0:t.urls.accountCreate;if(!n)throw new Error("accountCreateURL is not defined");try{const t=Object(a.b)(),r=await J(this.cloudOSFetchFunctions.fetchJson,t,e);if(!r.success)return void this.appProxy.recordStat("missingPrivacyTermsInAccountCreation",{error:W.RETRIEVING_TERMS_FAILURE});let i=!1;"CHN"===r.termsDetails.country&&(r.termsDetails.gcbdPrivacyNoticeTitle&&r.termsDetails.gcbdPrivacyNoticeMessage?i=!0:this.appProxy.recordStat("missingGCBDPrivacyTermsInAccountCreation",{gcbdPrivacyNoticeTitle:r.termsDetails.gcbdPrivacyNoticeTitle,gcbdPrivacyNoticeMessage:r.termsDetails.gcbdPrivacyNoticeMessage}));const o=r.termsDetails;if(!await this.appProxy.presentTermsAndConditions(o,i,o.country))return;const s=o.iCloudTerms.version;if(!s)return;await this.cloudOSFetchFunctions.fetchUrl(n,{method:"POST",body:JSON.stringify({createPayload:e,acceptedICloudTerms:s.toString(),...i&&{gcbdPrivacyNoticeAccepted:!0}}),credentials:"include"}),await this.validateUser()}catch(r){this.createAccountFailed(String(r))}}processAuthenticationFailure(e){var t;this.recordLoginTiming(!1),null===(t=this.cloudOSProxy)||void 0===t||t.authenticationDidFail(e)}processAuthenticationCompletion(e,t,n){var r;this.recordLoginTiming(!0),null===(r=this.cloudOSProxy)||void 0===r||r.authenticationDidComplete(e,t,n)}createAccountFailed(e){this.appProxy.recordStat("createAccountError",{message:e})}processRepairDidStart(){"UNAUTHENTICATED"===ce.value&&(ce.value="AUTHENTICATING")}async invalidateCachedAuthenticationDetails(){var e,t,n;return null===(e=this.cloudOSProxy)||void 0===e||e.invalidateCachedAuthenticationDetails(),ce.value="UNAUTHENTICATED",this.isRedirectedToCorrectDomain=!1,i.a.remove("X-APPLE-WEB-ID",{domain:m.a.cookiesDomain}),this.previousDsidCookie=null,this.stopAuthenticationPolling(),null===(t=this.cloudOSProxy)||void 0===t||t.invalidatePreferencesStore(),$.c.value=null,null===(n=this.cloudOSProxy)||void 0===n||n.configurationWasUpdated(),Promise.resolve()}recordLoginTiming(e){var t,n;const r=this.loginTiming.duration(),i=`${null!==(t="success"===(null===(n=he.value)||void 0===n?void 0:n.responseKind)&&he.value.isEP)&&void 0!==t&&t?"ep_":""}${de.value?"siwa":"nonSiwa"}LoginTime${e?".success":".failure"}`;this.appProxy.recordPerfStat(i,{duration:r,validateCallCount:this.validateCallCount}),this.loginTiming=new Z,this.validateCallCount=0}async showTermsIfNeeded(e,t,n){var r;const i=e&&t;if("CHN"===n&&e&&!t&&this.appProxy.recordStat("missingGCBDPrivacyNotice",{termsUpdateNeeded:e,showGcbdPrivacyNotice:t}),e){var o;const e=Object(a.b)(),t=await J(this.cloudOSFetchFunctions.fetchJson,e);if(!t.success)return this.appProxy.recordStat("missingPrivacyTerms",{error:W.RETRIEVING_TERMS_FAILURE}),X(W.RETRIEVING_TERMS_FAILURE,t.error);if(i&&(!t.termsDetails.gcbdPrivacyNoticeTitle||!t.termsDetails.gcbdPrivacyNoticeMessage))return this.appProxy.recordStat("missingGCBDPrivacyTerms",{gcbdPrivacyNoticeTitle:t.termsDetails.gcbdPrivacyNoticeTitle,gcbdPrivacyNoticeMessage:t.termsDetails.gcbdPrivacyNoticeMessage}),X(W.MISSING_GCBD_TERMS);const r=t.termsDetails;await this.appProxy.presentTermsAndConditions(r,i,n);const s=null===(o=$.c.value)||void 0===o?void 0:o.urls.repairDone;if(!s)return X(W.ACCEPTING_TERMS_FAILURE);const c=await async function(e,t,n,r){const i=await e(t,{method:"POST",body:JSON.stringify({acceptedICloudTerms:n,...r&&{gcbdPrivacyNoticeAccepted:!0}}),validate:{type:"WireAcceptTermsResponse",schema:K},credentials:"include"});return!!i.ok&&i.value.success}(this.cloudOSFetchFunctions.fetchJson,s,r.iCloudTerms.version,i);return c?"accepted":(this.appProxy.recordStat("acceptTermsDidFail",{error:W.ACCEPTING_TERMS_FAILURE}),X(W.ACCEPTING_TERMS_FAILURE))}return null===(r=this.cloudOSProxy)||void 0===r||r.displayTermsAndConditionsSuccessConfirmationIfNeeded(e),"skipped"}updateAuthenticationState(){var e;const t=null===(e=ae.value)||void 0===e?void 0:e.details;if(!t)return ce.value="UNAUTHENTICATED",void(ae.value=void 0);const n=t.completedAuthenticationStep,r=t.totalAuthenticationSteps;ce.value=0===n?"UNAUTHENTICATED":n<r?"PARTIALLY_AUTHENTICATED":"AUTHENTICATED"}async writeDsidCookie(e){var t,n;const r=ce.value,o=null===(t=ae.value)||void 0===t||null===(t=t.details)||void 0===t?void 0:t.dsid,a=null===(n=ae.value)||void 0===n||null===(n=n.details)||void 0===n?void 0:n.accountType;if(!o||!a||"UNKNOWN"===r||"UNAUTHENTICATED"===r)return;const s=(()=>{switch(r){case"PARTIALLY_AUTHENTICATED":case"AUTHENTICATING":return a===u.a.HSA1||a===u.a.HSA2?1:a===u.a.MANAGED?3:0;case"AUTHENTICATED":return 2}})(),c=(new TextEncoder).encode(`${o}${s}`),l=await crypto.subtle.digest("SHA-1",c),d=Array.from(new Uint8Array(l)).map((e=>e.toString(16).padStart(2,"0"))).join("").toUpperCase();i.a.set("X-APPLE-WEB-ID",d,{domain:m.a.cookiesDomain,...void 0!==e&&{expires:e}}),this.previousDsidCookie=d}startPollingForCookieChange(){this.previousDsidCookie=te(),this.previousValidated=!!ne();const e=async()=>{const e=te(),t=!!ne();var n;if((e!==this.previousDsidCookie||t!==this.previousValidated)&&(this.previousValidated&&"AUTHENTICATED"===ce.value&&(this.invalidateCachedAuthenticationDetails(),null===(n=this.cloudOSProxy)||void 0===n||n.userDidUnauthenticate()),this.previousValidated=t,this.previousDsidCookie=e,t&&e&&"UNAUTHENTICATED"===ce.value))try{await this.validateUser()}catch{}};setInterval(e,1e3),this.cookieVisibilityChangeHandler=()=>{document.hidden||e()},document.addEventListener("visibilitychange",this.cookieVisibilityChangeHandler)}get isWebAccessAllowed(){return this._isWebAccessAllowed}set isWebAccessAllowed(e){this._isWebAccessAllowed=e}get isICDRSDisabled(){return this._isICDRSDisabled}set isICDRSDisabled(e){this._isICDRSDisabled=e}get pcsServiceIdentitiesIncluded(){return this._pcsServiceIdentitiesIncluded}set pcsServiceIdentitiesIncluded(e){this._pcsServiceIdentitiesIncluded=e}addDeviceConsentForPCSExpiryListener(e){this.deviceConsentForPCSExpiryListeners.add(e)}removeDeviceConsentForPCSExpiryListener(e){this.deviceConsentForPCSExpiryListeners.delete(e)}async fetchForAuthenticatedUser(e){var t,n;if(e&&!ge()&&(null===(t=this.cloudOSProxy)||void 0===t||t.willFetchForAuthenticatedUser(e)),null===(n=this.cloudOSProxy)||void 0===n||n.setSecondaryLocale(),me())return{success:!0};try{var r;null===(r=this.cloudOSProxy)||void 0===r||r.initializeAppPreferences()}catch(i){return{success:!1,error:i}}return{success:!0}}async waitForPCSKeysEPNativeTakeover(){if(ge()&&!me()){var e;null===(e=this.cloudOSProxy)||void 0===e||e.showWaitingForPCSKeys();const t=3e3,n=3;let r=this.pcsServiceIdentitiesIncluded;for(;this.validateCallCount<n&&!r;){await G(t);const e=await x(this.cloudOSFetchFunctions.fetchUrl);r="success"===e.responseKind&&e.pcsServiceIdentitiesIncluded,this.validateCallCount++}if(this.pcsServiceIdentitiesIncluded=r,!this.pcsServiceIdentitiesIncluded)return this.processAuthenticationFailure(X(W.MISSING_PCS_KEYS)),!1}return!0}startAuthenticationPolling(){if(ie)return;ie=!0,this.lastPollTime=Date.now();const e=84e4,t=this.pcsServiceIdentitiesIncluded||!this.isWebAccessAllowed||this.isICDRSDisabled||ve()||this.isUnderMaintenance?e:1e3,n=async()=>{if(!ie)return;this.lastPollTime=Date.now();const e=await x(this.cloudOSFetchFunctions.fetchUrl),t=ae.value;var n,r;e.isOK&&null!==t&&(null===(n=this.cloudOSProxy)||void 0===n||n.tryRefreshPushRegistrationTTL()),e.isOK&&e.termsUpdateNeeded&&(this.appProxy.recordStat("AuthenticationPolling.termsUpdateNeeded"),this.unauthenticateUser({trustBrowser:!(null===(r=ae.value)||void 0===r||!r.hsaTrustedBrowser),allBrowsers:!1}))};G(t).then((()=>{n().then((()=>{1e3===t&&this.appProxy.recordStat("MissingPCSCookiesRetry",{pcsServiceIdentitiesIncluded:this.pcsServiceIdentitiesIncluded}),this.pollingIntervalId=setInterval(n,e)}))})),this.visibilityChangeHandler=()=>{if(!document.hidden&&ie){const t=Date.now()-this.lastPollTime;t>e&&(this.appProxy.recordStat("AuthenticationPolling.missedPollWhileInactive",{timeSinceLastPoll:t}),n())}},document.addEventListener("visibilitychange",this.visibilityChangeHandler)}stopAuthenticationPolling(){null!==this.pollingIntervalId&&(clearInterval(this.pollingIntervalId),this.pollingIntervalId=null),null!==this.visibilityChangeHandler&&(document.removeEventListener("visibilitychange",this.visibilityChangeHandler),this.visibilityChangeHandler=null),ie=!1}async _validateUser(){var e,t,n,r,i;this.pendingUserValidatePromise=new Promise((e=>{this.pendingUserValidateResolve=e}));const o=await(async()=>{const e=c||globalThis.__earlyValidationPromise;if(e){const n=e;c&&(c=void 0),globalThis.__earlyValidationPromise&&delete globalThis.__earlyValidationPromise;const r=await n;if(r){var t;const e=r[0],n=r[1];return e&&200===e.status?R(n)?D(n,e.status,this.appProxy.recordStat):w("Failed to validate JSON response"):e&&401===e.status||421===e.status||403===e.status?E(n)?k(n,n,e.status,this.appProxy.recordStat):w("Failed to validate JSON response"):w(`Invalid authentication response code ${null!==(t=null===e||void 0===e?void 0:e.status)&&void 0!==t?t:null}`)}}return await x(this.cloudOSFetchFunctions.fetchUrl)})();var a;if(this.pendingUserValidateResolve&&(this.pendingUserValidateResolve(!0),this.pendingUserValidateResolve=null,this.pendingUserValidatePromise=null),!o.isOK)return this.appProxy.recordStat("validationDidFail",{httpStatusCode:o.httpStatusCode,error:W.COULD_NOT_VALIDATE,info:o.error,requestId:null!==(a=globalThis.__earlyRequestId)&&void 0!==a?a:N()}),{result:"validation-error",errorInfo:X(W.COULD_NOT_VALIDATE,o.error),response:o};const u=null!==(e=o.environment)&&void 0!==e?e:"PROD";var d;if(null===(t=this.cloudOSProxy)||void 0===t||t.initializeSentry(u,s),ee(o,"validateUser",{recordStat:this.appProxy.recordStat,configurationWasUpdated:null===(n=this.cloudOSProxy)||void 0===n?void 0:n.configurationWasUpdated}),"success"!==o.responseKind||!(d=o).isAuthenticated||0===d.completedAuthenticationStep||d.completedAuthenticationStep!==d.totalAuthenticationSteps)return{result:"validation-failed",response:o};const p=await this.showTermsIfNeeded(o.termsUpdateNeeded,o.showGcbdPrivacyNotice,null!==(r=null===(i=o.authenticatedUserDetails)||void 0===i?void 0:i.countryCode)&&void 0!==r?r:void 0);if("skipped"!==p&&"accepted"!==p)return{result:"validation-error",errorInfo:p,response:o};var f,h,m;o.authenticatedUserDetails&&(this.isWebAccessAllowed=o.authenticatedUserDetails.isWebAccessAllowed,this.isICDRSDisabled=null!==(f=o.authenticatedUserDetails.isICDRSDisabled)&&void 0!==f&&f,this.pcsServiceIdentitiesIncluded=o.pcsServiceIdentitiesIncluded,this.deviceConsentForPCSExpirySignal.value=o.authenticatedUserDetails.isDeviceConsentedForPCS&&"number"===typeof o.authenticatedUserDetails.deviceConsentForPCSExpiry?o.authenticatedUserDetails.deviceConsentForPCSExpiry:null,this.isUnderMaintenance=null!==(h=o.isUnderMaintenance)&&void 0!==h&&h,this.maintenanceDuration=null!==(m=o.maintenanceDuration)&&void 0!==m?m:0);const g=await this.fetchForAuthenticatedUser(Object(l.a)(o));return g.success?{result:"validation-succeeded",response:o}:{result:"validation-error",errorInfo:X(W.KVS_ERROR,g.error),response:o}}showOnDemand2FA(){var e;null===(e=this.cloudOSProxy)||void 0===e||e.showOnDemand2FA()}}function Y(){const e=ye().deviceConsentForPCSExpirySignal.value;return null===e||Date.now()>e}async function J(e,t,n){var r;const i=null===(r=$.c.value)||void 0===r?void 0:r.urls.getICloudTerms;if(!i)return{success:!1,error:null};const o=await async function(e,t,n,r){const i={locale:n,...r&&{createPayload:r}},o=await e(t,{method:"POST",body:JSON.stringify(i),validate:{type:"WireTermsDetails",schema:B},credentials:"include"});return o.ok?{success:!0,termsDetails:(a=o.value,{country:a.country,downloadICloudTerms:a.downloadICloudTerms,locale:a.locale,confirmAndAgreeButtonText:a.confirmAndAgreeButtonText,disagreeButtonText:a.disagreeButtonText,iCloudTerms:{summary:H(a.iCloudTerms.summary),type:a.iCloudTerms.type,title:H(a.iCloudTerms.title),version:a.iCloudTerms.version,content:H(a.iCloudTerms.content)},...!!a.gcbdPrivacyNoticeTitle&&{gcbdPrivacyNoticeTitle:a.gcbdPrivacyNoticeTitle},...!!a.gcbdPrivacyNoticeMessage&&{gcbdPrivacyNoticeMessage:a.gcbdPrivacyNoticeMessage}})}:{success:!1,error:o.error.message};var a}(e,i,t,n);return o.success?{success:!0,termsDetails:o.termsDetails}:{success:!1,error:o.error}}function X(e,t){return{errorType:(()=>{switch(e){case W.COULD_NOT_VALIDATE:return"COULD_NOT_VALIDATE";case W.COULD_NOT_LOG_IN_STEP:return"COULD_NOT_LOG_IN_STEP";case W.COULD_NOT_LOG_IN:return"COULD_NOT_LOG_IN";case W.COULD_NOT_LOG_IN_REAUTH:return"COULD_NOT_LOG_IN_REAUTH";case W.TERMS_ACCEPTANCE_REQUIRED:return"TERMS_ACCEPTANCE_REQUIRED";case W.MISSING_GCBD_TERMS:return"MISSING_GCBD_TERMS";case W.RETRIEVING_TERMS_FAILURE:return"RETRIEVING_TERMS_FAILURE";case W.ACCEPTING_TERMS_FAILURE:return"ACCEPTING_TERMS_FAILURE";case W.KVS_ERROR:return"KVS_ERROR";case W.MISSING_PCS_KEYS:return"PCS_KEYS_MISSING";case u.b.TIMEOUT:return"TIMEOUT";case u.b.INVALID_DATA:return"INVALID_DATA";case u.b.UNABLE_TO_CONTINUE_AUTHENTICATION:return"UNABLE_TO_CONTINUE_AUTHENTICATION";case u.b.NATIVE_TAKE_OVER_LOGIN_FAILURE:return"NATIVE_TAKE_OVER_LOGIN_FAILURE";case u.b.WIDGET_FAILURE:return"WIDGET_FAILURE";case u.b.TIMEOUT_LOADING_AUTH_WIDGET_JS:return"TIMEOUT_LOADING_AUTH_WIDGET_JS"}})(),message:e,...void 0!==t&&{info:t}}}function ee(e,t,n){var r;n.recordStat("updateConfiguration",{httpStatusCode:e.httpStatusCode,updateSource:t}),$.c.value=Object(d.a)(e),null===(r=n.configurationWasUpdated)||void 0===r||r.call(n)}function te(){try{var e;return null!==(e=i.a.get("X-APPLE-WEB-ID"))&&void 0!==e?e:null}catch{return null}}function ne(){try{var e;return null!==(e=i.a.get("X-APPLE-WEBAUTH-VALIDATE"))&&void 0!==e?e:null}catch{return null}}let re,ie=!1;function oe(e,t){re||(re=new Q(e,t))}const ae=Object(o.signal)(void 0),se=Object(o.computed)((()=>Object(V.a)(ae.value))),ce=Object(o.signal)("UNKNOWN"),ue=Object(o.computed)((()=>ce.value));Object(o.computed)((()=>"UNKNOWN"!==ce.value));let le=!1;const de=Object(o.signal)(!1);Object(o.effect)((()=>{ae.value||(de.value=!1)}));const pe=Object(o.computed)((()=>de.value));Object(o.effect)((()=>{le=de.value}));const fe=Object(o.signal)(void 0),he=Object(o.computed)((()=>fe.value));function me(){var e;const t=ye();return!t.isWebAccessAllowed||!(!t.isICDRSDisabled||null===(e=ae.value)||void 0===e||null===(e=e.details)||void 0===e||null===(e=e.beneficiaryInfo)||void 0===e||!e.isBeneficiary)||!!t.isUnderMaintenance}function ge(){const e=ye();return ve()&&!e.pcsServiceIdentitiesIncluded}function ve(){const e=he.value;return"success"===(null===e||void 0===e?void 0:e.responseKind)&&e.isEP&&de.value}function ye(){if(!re)throw new Error("Must call initAuthenticationController first");return re}},,,,function(e,t,n){"use strict";function r(){throw new Error("Cycle detected")}n.r(t),n.d(t,"makeReactiveMap",(function(){return x})),n.d(t,"makeReadOnlyReactiveMap",(function(){return L})),n.d(t,"makeOptimisticStore",(function(){return K})),n.d(t,"makePubSub",(function(){return Z})),n.d(t,"makeDavesPubSub",(function(){return Q})),n.d(t,"batch",(function(){return l})),n.d(t,"computed",(function(){return _})),n.d(t,"computedMemo",(function(){return P})),n.d(t,"effect",(function(){return T})),n.d(t,"signal",(function(){return y})),n.d(t,"useComputed",(function(){return N})),n.d(t,"useSignal",(function(){return M})),n.d(t,"Signal",(function(){return v}));var i=Symbol.for("preact-signals"),o=2,a=4,s=8,c=32;function u(){if(f>1)f--;else{for(var e,t=!1;void 0!==p;){var n=p;for(p=void 0,h++;void 0!==n;){var r=n._nextBatchedEffect;if(n._nextBatchedEffect=void 0,n._flags&=~o,!(n._flags&s)&&b(n))try{n._callback()}catch(i){t||(e=i,t=!0)}n=r}}if(h=0,f--,t)throw e}}function l(e){if(f>0)return e();f++;try{return e()}finally{u()}}var d=void 0,p=void 0,f=0,h=0,m=0;function g(e){if(void 0!==d){var t=e._node;return void 0===t||t._target!==d?(t={_version:0,_source:e,_prevSource:d._sources,_nextSource:void 0,_target:d,_prevTarget:void 0,_nextTarget:void 0,_rollbackNode:t},void 0!==d._sources&&(d._sources._nextSource=t),d._sources=t,e._node=t,d._flags&c&&e._subscribe(t),t):-1===t._version?(t._version=0,void 0!==t._nextSource&&(t._nextSource._prevSource=t._prevSource,void 0!==t._prevSource&&(t._prevSource._nextSource=t._nextSource),t._prevSource=d._sources,t._nextSource=void 0,d._sources._nextSource=t,d._sources=t),t):void 0}}function v(e,t){this._value=e,this._version=0,this._node=void 0,this._targets=void 0,this._subscriptionDelegate=t}function y(e,t){return new v(e,t)}function b(e){for(var t=e._sources;void 0!==t;t=t._nextSource)if(t._source._version!==t._version||!t._source._refresh()||t._source._version!==t._version)return!0;return!1}function w(e){for(var t=e._sources;void 0!==t;t=t._nextSource){var n=t._source._node;if(void 0!==n&&(t._rollbackNode=n),t._source._node=t,t._version=-1,void 0===t._nextSource){e._sources=t;break}}}function S(e){for(var t=e._sources,n=void 0;void 0!==t;){var r=t._prevSource;-1===t._version?(t._source._unsubscribe(t),void 0!==r&&(r._nextSource=t._nextSource),void 0!==t._nextSource&&(t._nextSource._prevSource=r)):n=t,t._source._node=t._rollbackNode,void 0!==t._rollbackNode&&(t._rollbackNode=void 0),t=r}e._sources=n}function C(e){v.call(this,void 0),this._compute=e,this._sources=void 0,this._globalVersion=m-1,this._flags=a}function _(e){return new C(e)}function O(e){var t=e._cleanup;if(e._cleanup=void 0,"function"===typeof t){f++;var n=d;d=void 0;try{t()}catch(r){throw e._flags&=-2,e._flags|=s,E(e),r}finally{d=n,u()}}}function E(e){for(var t=e._sources;void 0!==t;t=t._nextSource)t._source._unsubscribe(t);e._compute=void 0,e._sources=void 0,O(e)}function I(e){if(d!==this)throw new Error("Out-of-order effect");S(this),d=e,this._flags&=-2,this._flags&s&&E(this),u()}function A(e){this._compute=e,this._cleanup=void 0,this._sources=void 0,this._nextBatchedEffect=void 0,this._flags=c}function T(e){var t=new A(e);try{t._callback()}catch(n){throw t._dispose(),n}return t._dispose.bind(t)}function P(e,t){var n=[];return _((function(){var r=e();return 1===n.length&&t(n[0],r)?n[0]:n[0]=r}))}v.prototype.brand=i,v.prototype._refresh=function(){return!0},v.prototype._subscribe=function(e){var t;this._targets!==e&&void 0===e._prevTarget&&(this._targets||null===(t=this._subscriptionDelegate)||void 0===t||t.becameSubscribed(this),e._nextTarget=this._targets,void 0!==this._targets&&(this._targets._prevTarget=e),this._targets=e)},v.prototype._unsubscribe=function(e){var t;if(void 0!==this._targets){var n=e._prevTarget,r=e._nextTarget;void 0!==n&&(n._nextTarget=r,e._prevTarget=void 0),void 0!==r&&(r._prevTarget=n,e._nextTarget=void 0),e===this._targets&&(this._targets=r),this._targets||null===(t=this._subscriptionDelegate)||void 0===t||t.becameUnsubscribed(this)}},v.prototype.subscribe=function(e){var t=this;return T((function(){var n=t.value,r=this._flags&c;this._flags&=~c;try{e(n)}finally{this._flags|=r}}))},v.prototype.valueOf=function(){return this.value},v.prototype.toString=function(){return this.value+""},v.prototype.toJSON=function(){return this.value},v.prototype.peek=function(){return this._value},Object.defineProperty(v.prototype,"value",{get:function(){var e,t=g(this);return void 0!==t&&(t._version=this._version),this._targets||null===(e=this._subscriptionDelegate)||void 0===e||e.wasReadWithNoSubscribers(this),this._value},set:function(e){var t;if(d instanceof C&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this._value){h>100&&r(),this._value=e,this._version++,m++,f++;try{for(var n=this._targets;void 0!==n;n=n._nextTarget)n._target._notify()}finally{u()}}this._targets||null===(t=this._subscriptionDelegate)||void 0===t||t.wasWrittenWithNoSubscribers(this)}}),C.prototype=new v,C.prototype._refresh=function(){if(this._flags&=~o,1&this._flags)return!1;if((this._flags&(a|c))===c)return!0;if(this._flags&=~a,this._globalVersion===m)return!0;if(this._globalVersion=m,this._flags|=1,this._version>0&&!b(this))return this._flags&=-2,!0;var e=d;try{w(this),d=this;var t=this._compute();(16&this._flags||this._value!==t||0===this._version)&&(this._value=t,this._flags&=-17,this._version++)}catch(n){this._value=n,this._flags|=16,this._version++}return d=e,S(this),this._flags&=-2,!0},C.prototype._subscribe=function(e){if(void 0===this._targets){this._flags|=a|c;for(var t=this._sources;void 0!==t;t=t._nextSource)t._source._subscribe(t)}v.prototype._subscribe.call(this,e)},C.prototype._unsubscribe=function(e){if(void 0!==this._targets&&(v.prototype._unsubscribe.call(this,e),void 0===this._targets)){this._flags&=~c;for(var t=this._sources;void 0!==t;t=t._nextSource)t._source._unsubscribe(t)}},C.prototype._notify=function(){if(!(this._flags&o)){this._flags|=a|o;for(var e=this._targets;void 0!==e;e=e._nextTarget)e._target._notify()}},C.prototype.peek=function(){if(this._refresh()||r(),16&this._flags)throw this._value;return this._value},Object.defineProperty(C.prototype,"value",{get:function(){1&this._flags&&r();var e=g(this);if(this._refresh(),void 0!==e&&(e._version=this._version),16&this._flags)throw this._value;return this._value}}),A.prototype._callback=function(){var e=this._start();try{if(this._flags&s)return;if(void 0===this._compute)return;var t=this._compute();"function"===typeof t&&(this._cleanup=t)}finally{e()}},A.prototype._start=function(){1&this._flags&&r(),this._flags|=1,this._flags&=~s,O(this),w(this),f++;var e=d;return d=this,I.bind(this,e)},A.prototype._notify=function(){this._flags&o||(this._flags|=o,this._nextBatchedEffect=p,p=this)},A.prototype._dispose=function(){this._flags|=s,1&this._flags||E(this)};var R=n(870),k=n(880),D=new WeakMap;function M(e){return k.useSyncExternalStore.apply(void 0,function(e){if(D.has(e))return D.get(e);var t=[e.subscribe.bind(e),e.peek.bind(e)];return D.set(e,t),t}(e))}function N(e,t){return M(Object(R.useMemo)((function(){return _(e)}),t))}function x(){var e=new Map;function t(t){var n;if(null===(n=e.get(t))||void 0===n?void 0:n.value)return e.get(t).value;var r=e.get(t)||{},i=y(j);return r.value=i,e.set(t,r),i}return{get:function(e){var n=t(e).value;return n===j?void 0:n},set:function(e,n){t(e).value=n},has:function(n){return function(n){var r;if(null===(r=e.get(n))||void 0===r?void 0:r.has)return e.get(n).has;t(n);var i=e.get(n),o=i.value;return i.has=_((function(){return o.value!==j})),i.has}(n).value},delete:function(t){var n,r=e.get(t);return!!(null===(n=null===r||void 0===r?void 0:r.has)||void 0===n?void 0:n.value)&&(r.value.value=j,!0)},peek:{get:function(t){var n,r=null===(n=e.get(t))||void 0===n?void 0:n.value;if(r){var i=r.peek();if(i!==j)return i}},has:function(t){var n=e.get(t);return!!(null===n||void 0===n?void 0:n.value)&&n.value.peek()!==j}}}}function L(e){return{get:e.get,has:e.has,peek:e.peek}}var j=Symbol("ReactiveMap: No value"),U=Symbol("OptimisticValueNode: NO_VALUE"),F=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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 z(e,t){var n,r=(void 0===t?{}:t).defaultCreate;function i(t,r,i){if(i!==U&&t===a.peek()){var o=s.peek();r.length===o.length&&(n={upstreamValue:t?t.value:e.valueSignal.peek(),updaters:o,result:i})}}var o,a=y(void 0),s=y([]),c=_((function(){return void 0!==a.value||s.value.length>0})),u=_((function(){return e.hasSignal.value||c.value})),d=_((function(){var t=a.value;if(t&&e.hasSignal.value)throw new Error("OptimisticValueNode: A value appeared upstream of a node being created.");var r=t?t.value:e.valueSignal.value,i=s.value;if(0===i.length)return r;var o=n;if(o){if(o.upstreamValue===r&&o.updaters===i)return o.result;n=void 0}return i.reduce((function(e,t){return t(e)}),r)}));function p(){o||(o=T((function(){var t=e.hasSignal.value,n=!!a.peek();if(t&&n)throw new Error("OptimisticValueNode: A value was added upstream of a node being created.")})))}function f(e,t){var n=s.peek();l((function(){var r,i=n.length===t.length;s.value=i?[]:n.filter((function(e){return!t.includes(e)})),e!==U&&(a.value=void 0),i&&"automatic"===(null===(r=a.peek())||void 0===r?void 0:r.type)&&(a.value=void 0)})),c.peek()||(null===o||void 0===o||o(),o=void 0)}function h(e,t){if(e!==U){var n=a.peek();if(!Object.is(e,null===n||void 0===n?void 0:n.value))throw new Error("OptimisticValueNode: Attempted to ".concat(t," a create value from a node which does not currently have it."));return n}}function m(e,t){var n=s.peek();e!==n&&e.forEach((function(e){if(!n.includes(e))throw new Error("OptimisticValueNode: Attempted to ".concat(t," an update from a node which does not currently have it."))}))}function g(e,t){var n=a.peek(),r=s.peek();return function(){if(n&&!e)return!1;if(t===r)return!0;if(t.length!==r.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==r[i])return!1;return!0}()?d.peek():U}function v(t,n,o){if(t||n.length){if(t){if(e.hasSignal.peek())throw new Error("OptimisticValueNode: `create` called for a node with an upstream value. Update existing items with `update`.");if(u.peek())throw new Error("OptimisticValueNode: `create` called for a node currently being created. Update existing items with `update`.")}else if(n.length&&!u.peek()&&!r)throw new Error("OptimisticValueNode: `update` called for node that does not yet have a value. Create a new item with `create`, or provide `defaultCreate`.");l((function(){if(p(),t&&(a.value=t),t||u.peek()||!n.length||(a.value={type:"automatic",value:r()}),n.length){var e=s.peek();s.value=F(F([],e,!0),n,!0)}i(t,n,o)}))}}return{createSignal:a,updatersSignal:s,hasChangesSignal:c,hasSignal:u,valueSignal:d,create:function(e){v({type:"manual",value:e},[],U)},update:function(e){v(void 0,[e],U)},replaceCreate:function(t,n){var r=a.peek();if(!r)throw e.hasSignal.peek()?new Error("OptimisticValueNode: attempted to replace a create for a node which already exists upstream."):new Error("OptimisticValueNode: attempted to replace a create for a node not currently being created.");if(r.value!==t)throw new Error("OptimisticValueNode: attempted to replace a mismatched create value.");a.value={value:n,type:"manual"}},replaceUpdate:function(e,t){var n=s.peek();if(!n.includes(e))throw new Error("OptimisticValueNode: Attempted to replace an updater not currently at the node.");s.value=n.map((function(n){return n!==e?n:t}))},remove:function(e,t){if(t.length||e!==U){if(e!==U){var n=a.peek();if(!n)throw new Error("OptimisticValueNode: Attempted to remove a create from a node not currently creating.");if("automatic"===n.type)throw new Error("OptimisticValueNode: Attempted to manually remove a create value from a node being auto-created (see defaultCreate).");if(!Object.is(e,n.value))throw new Error("OptimisticValueNode: attempted to remove a mismatched create value.")}var r=s.peek();t.forEach((function(e){if(!r.includes(e))throw new Error("OptimisticValueNode: Attempted to discard an update not currently at the node.")}));var i=r.length===t.length;if(e!==U&&!i)throw new Error("OptimisticValueNode: Attempted to remove a `create` call out from under subsequent update calls.");f(e,t)}},commit:function(t,n){var r=h(t,"commit");if(!r&&n.length){var i=a.peek();"automatic"===(null===i||void 0===i?void 0:i.type)&&(r=i)}if(r||n.length){if(!r&&a.peek()&&n.length)throw new Error("OptimisticValueNode: Attempted to commit an update upstream without its create call.");m(n,"commit");var o=g(r,n);l((function(){f(r?r.value:U,n),e.push(r,n,o)}))}},revertTo:function(e,t,n){var r=h(t,"revert"),i=s.peek();if(!r&&n.length===i.length){var o=a.peek();"automatic"===(null===o||void 0===o?void 0:o.type)&&(r=o)}if(m(n,"revert"),r||n.length){if(r&&n.length<i.length)throw new Error("OptimisticValueNode: Attempted to revert a create call back to a downstream node, without sending all upstream updaters with it.");var c=g(r,n);l((function(){f(r?r.value:U,n),e.unshift(r,n,c)}))}},push:v,unshift:function(t,n,r){if(t||n.length){if(t&&e.hasSignal.peek())throw new Error("OptimisticValueNode: Attempted to unshift a create call while upstream node has value.");if(!t&&!e.hasSignal.peek())throw new Error("OptimisticValueNode: Attempted to unshift updaters with no create call and no upstream value.");l((function(){p(),t&&(a.value=t),n.length&&(s.value=F(F([],n,!0),s.peek(),!0)),i(t,n,r)}))}}}}var B=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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 K(e){void 0===e&&(e={});var t=e.defaultCreate,n=e.evictionDelegate,r=null===e||void 0===e?void 0:e._finalizeServerState,i=new Map,o=new Map,a=new Map,s=new Map;function c(e){if(o.has(e))return o.get(e);var n=z(u(e),{defaultCreate:t?function(){return t(e)}:void 0});return o.set(e,n),i.has(e)||i.set(e,B(B([],i.get(e)||[],!0),[e],!1)),n}function u(e){if(a.has(e))return a.get(e);var t=z(d(e));return a.set(e,t),i.has(e)||i.set(e,B(B([],i.get(e)||[],!0),[e],!1)),t}function d(e){if(s.has(e))return s.get(e);var t=n?{wasReadWithNoSubscribers:function(){return n.wasReadWithNoSubscribers(e)},wasWrittenWithNoSubscribers:function(){return n.wasWrittenWithNoSubscribers(e)},becameSubscribed:function(){return n.becameSubscribed(e)},becameUnsubscribed:function(){return n.becameUnsubscribed(e)},wasAdded:function(){var t;return null===(t=n.wasAdded)||void 0===t?void 0:t.call(n,e)}}:void 0,o=function(e){var t=void 0===e?{}:e,n=t.finalizer,r=t.subscriptionDelegate,i=y(U,r?{wasReadWithNoSubscribers:function(e){e.peek()!==U&&r.wasReadWithNoSubscribers()},wasWrittenWithNoSubscribers:function(e){e.peek()!==U&&r.wasWrittenWithNoSubscribers()},becameSubscribed:function(e){e.peek()!==U&&r.becameSubscribed()},becameUnsubscribed:function(e){e.peek()!==U&&r.becameUnsubscribed()}}:void 0),o=_((function(){return i.value===U?void 0:i.value})),a=_((function(){return i.value!==U}));function s(e){var t,a=o.peek(),s=n?n(e,a):e;if(!Object.is(a,s)){var c=i.peek()===U;i.value=s,c&&r&&(null===(t=r.wasAdded)||void 0===t||t.call(r),i._targets&&r.becameSubscribed())}}return{valueSignal:o,hasSignal:a,write:s,push:function(e,t,n){if(n===U){if(e||0!==t.length){var r,o=i.peek();if(e){if(o!==U)throw new Error("OptimisticValueRootNode: Attempted to push a create value to a node that already has a value.");r=e.value}else{if(o===U)throw new Error("OptimisticValueRootNode: Attempted to push updaters and no create value to an empty node.");r=o}s(t.reduce((function(e,t){return t(e)}),r))}}else s(n)},hasSubscribers:function(){return void 0!==i._targets},clear:function(){if(i._targets)throw new Error("OptimisticValueRootNode: Attempted to clear an in-use node");i.value=U}}}({finalizer:r?function(t,n){return r(e,t,n)}:void 0,subscriptionDelegate:t});return s.set(e,o),i.has(e)||i.set(e,B(B([],i.get(e)||[],!0),[e],!1)),o}var p=new Map;function f(e){return p.has(e)||p.set(e,new Map),p.get(e)}var h=G(o),m=h[0],g=h[1],v=G(a),b=v[0],w=v[1];function S(e,t,n,r){var d=c(e),p=u(e),f=function(e){return t?H(t,e,"local"):U},h=function(e){return n.map((function(t){return W(t,e,"local")}))},m=function(){t&&(t.current=U),n.forEach((function(e){return e.current=void 0}))};function v(){return l((function(){g(e),p.revertTo(d,f("didFail"),h("didFail"))})),{discard:S,willSend:b}}function y(t){var n=void 0===t?{}:t,c=n.id,d=n.finalize;l((function(){c&&e!==c&&function(e){var t=e.fromId,n=e.toId;if(o.has(n))throw new Error("OptimisticStore: Attempted to update ID to one already in use.");var r=i.get(t),c=B(B([],r,!0),[n],!1);r.forEach((function(e){return i.set(e,c)})),o.set(n,o.get(t)),a.set(n,a.get(t)),s.set(n,s.get(t))}({fromId:e,toId:c}),r();var t=function(e,t){return t?(u(e).update(t),[t]):[]}(e,d),n=f("didSucceed"),l=h("didSucceed");m(),p.commit(n,B(B([],l,!0),t,!0))}))}function b(){if(u(e).hasChangesSignal.peek())throw new Error("OptimisticStore: tried to send an ID that already had in-flight changes (see hasInFlightChanges).");return l((function(){w(e),d.commit(f("willSend"),h("willSend"))})),{didFail:v,didSucceed:y}}function S(){r();var e=f("discard"),t=h("discard");m(),d.remove(e,t)}return{willSend:b,didSucceed:y,didFail:v,discard:S}}var C={create:function(e,t){var n=c(e),r=f(e),i=q(n,(function(){return g(e)}),t,"local"),o=i.replaceCreate,a=i.createOp,s=S(e,a,[],(function(){return r.delete(p)})),u=s.discard,l=s.didSucceed;function d(){return s.didFail(),{willSend:p,replace:h,discard:u}}function p(){return s.willSend(),{didFail:d,didSucceed:l}}function h(e){return o(e),{willSend:p,replace:h,discard:u}}return r.set(p,a),{willSend:p,replace:h,discard:u}},update:function(e,t){var n=c(e),r=f(e),i=V(n,(function(){return g(e)}),t,"local"),o=i.replaceUpdate,a=i.updateOp,s=S(e,void 0,[a],(function(){return r.delete(p)})),u=s.discard,l=s.didSucceed;function d(){return s.didFail(),{willSend:p,replace:h,discard:u}}function p(){return s.willSend(),{didFail:d,didSucceed:l}}function h(e){return o(e),{willSend:p,replace:h,discard:u}}return r.set(p,a),{willSend:p,replace:h,discard:u}},discardLocalChanges:function(e){var t=o.get(e);if(!(null===t||void 0===t?void 0:t.hasChangesSignal.peek()))throw new Error("OptimisticStore: `discard` called for item with no local changes. See `hasLocalChanges`.");var n=t;l((function(){var e=n.createSignal.peek();n.remove(e?e.value:U,n.updatersSignal.peek())}))},willSend:function(e,t){var n=c(e),r=f(e);if(!n.hasChangesSignal.peek())throw new Error("OptimisticStore: tried to send changes for an ID with no changes (see hasLocalChanges).");var i=t||new Set(r.keys()),o=$({actions:i,actionsMap:r,node:n,missingActionErrorText:"OptimisticStore: Attempted to call store.willSend with an unrecognized willSend function."});return(0,S(e,o[0],o[1],(function(){Array.from(i).forEach((function(e){return r.delete(e)}))})).willSend)()},read:function(e){return c(e).valueSignal.value},_readInFlight:function(e){return u(e).valueSignal.value},has:function(e){return c(e).hasSignal.value},hasLocalChanges:function(e){return c(e).hasChangesSignal.value},hasInFlightChanges:function(e){return u(e).hasChangesSignal.value},hasAnyLocalChanges:function(){return m.value},hasAnyInFlightChanges:function(){return b.value},peek:{read:function(e){return c(e).valueSignal.peek()},_readInFlight:function(e){return u(e).valueSignal.peek()},has:function(e){return c(e).hasSignal.peek()},hasLocalChanges:function(e){return c(e).hasChangesSignal.peek()},hasInFlightChanges:function(e){return u(e).hasChangesSignal.peek()},hasAnyLocalChanges:function(){return m.peek()},hasAnyInFlightChanges:function(){return b.peek()}},serverState:{read:function(e){return d(e).valueSignal.value},write:function(e,t){return d(e).write(t)},has:function(e){return d(e).hasSignal.value},peek:{read:function(e){return d(e).valueSignal.peek()},has:function(e){return d(e).hasSignal.peek()}}},__spi_makeDraftStore:function(){var e=new Map;function n(n){if(e.has(n))return e.get(n);var r=z(c(n),{defaultCreate:t?function(){return t(n)}:void 0});return e.set(n,r),i.has(n)||i.set(n,B(B([],i.get(n)||[],!0),[n],!1)),r}var r=G(e),o=r[0],a=r[1],s=new Map;function u(e){return s.has(e)||s.set(e,new Map),s.get(e)}return{read:function(e){return n(e).valueSignal.value},has:function(e){return n(e).hasSignal.value},hasDraftChanges:function(e){return n(e).hasChangesSignal.value},hasAnyDraftChanges:function(){return o.value},peek:{read:function(e){return n(e).valueSignal.peek()},has:function(e){return n(e).hasSignal.peek()},hasDraftChanges:function(e){return n(e).hasChangesSignal.peek()},hasAnyDraftChanges:function(){return o.peek()}},create:function(e,t){var r=n(e),i=u(e),o=q(r,(function(){return a(e)}),t,"draft"),s=o.replaceCreate,c=o.createOp;function d(){var e=H(c,"discard","draft");c.current=U,i.delete(p),r.remove(e,[])}function p(){var t=H(c,"commit","draft");return c.current=U,i.delete(p),l((function(){return r.remove(t,[]),C.create(e,t)}))}return i.set(p,c),{replace:function e(t){return s(t),{replace:e,discard:d,commit:p}},discard:d,commit:p}},update:function(e,t){var r=n(e),i=u(e),o=V(r,(function(){return a(e)}),t,"draft"),s=o.replaceUpdate,c=o.updateOp;function d(){var e=W(c,"discard","draft");c.current=void 0,i.delete(p),r.remove(U,[e])}function p(){var t=W(c,"commit","draft");return c.current=void 0,i.delete(p),l((function(){return r.remove(U,[t]),C.update(e,t)}))}return i.set(p,c),{replace:function e(t){return s(t),{replace:e,discard:d,commit:p}},discard:d,commit:p}},commit:function(e,t){var r=n(e),i=u(e);if(!r.hasChangesSignal.peek())throw new Error("OptimisticStore: tried to commit changes for an ID with no draft changes (see draftStore.hasChanges).");var o=t||new Set(i.keys()),a=$({actions:o,actionsMap:i,node:r,missingActionErrorText:"OptimisticStore: Attempted to call store.willSend with an unrecognized willSend function."}),s=a[0],c=a[1];return l((function(){var t=s?s.current:U,n=c.map((function(e){return W(e,"commit","draft")})),a=l((function(){return r.remove(t,n),[t===U?void 0:C.create(e,t),n.map((function(t){return C.update(e,t)}))]})),u=a[0],d=a[1];return Array.from(o).forEach((function(e){return i.delete(e)})),{discard:function(){l((function(){B([],d,!0).reverse().forEach((function(e){return(0,e.discard)()})),null===u||void 0===u||u.discard()}))},willSend:function(){var t=new Set(B(B([],u?[u.willSend]:[],!0),d.map((function(e){return e.willSend})),!0));return C.willSend(e,t)}}}))}}}};return n&&(C.evict=function(e){var t=s.get(e);if(t){if(t.hasSubscribers()){if(n.attemptedEvictionOfSubscribedItem)return void n.attemptedEvictionOfSubscribedItem(e);throw new Error("OptimisticStore Eviction SPI: Attempted to evict an in-use ID.")}t.write(U),i.get(e).forEach((function(e){o.delete(e),a.delete(e),s.delete(e)}))}}),C}function H(e,t,n){if(e.current!==U)return e.current;throw new Error("OptimisticStore: Attempted to call ".concat(t," for a create value that's no longer in the ").concat(n," store."))}function W(e,t,n){if(e.current)return e.current;throw new Error("OptimisticStore: Attempted to call ".concat(t," for an update that's no longer in the ").concat(n," store."))}function q(e,t,n,r){l((function(){t(),e.create(n)}));var i={type:"create",current:n};return{createOp:i,replaceCreate:function(t){var n=H(i,"replace",r);i.current=t,e.replaceCreate(n,t)}}}function V(e,t,n,r){l((function(){t(),e.update(n)}));var i={type:"update",current:n};return{updateOp:i,replaceUpdate:function(t){var n=W(i,"replace",r);i.current=t,e.replaceUpdate(n,t)}}}function $(e){var t=e.actions,n=e.actionsMap,r=e.node,i=e.missingActionErrorText,o=Array.from(t).reduce((function(e,t){var r=n.get(t);if(!r)throw new Error(i);if("create"===r.type){if(e[0])throw new Error("Internal OptimisticStore error: Attempted to commit two creates.");e[0]=r}else"update"===r.type&&e[1].push(r);return e}),[void 0,[]]),a=o[0],s=o[1],c=r.updatersSignal.peek().reduce((function(e,t){var n=s.find((function(e){return e.current===t}));return n&&e.push(n),e}),[]),u=a?t.size-1:t.size;if(c.length!==u)throw new Error("OptimisticStore: Attempted to send an update that's no longer in the store.");return[a,c]}function G(e){var t=y(new Set),n=y(!1);return T((function(){var r=Array.from(t.value),i=r.reduce((function(t,n){return e.get(n).hasChangesSignal.value?t[0]=!0:t[1].push(n),t}),[!1,[]]),o=i[0],a=i[1];l((function(){o!==n.peek()&&(n.value=o),a.length&&(t.value=new Set(r.filter((function(e){return!a.includes(e)}))))}))})),[n,function(e){t.peek().has(e)||(t.value=new Set(t.peek()).add(e))}]}function Z(){var e=new Map;function t(t,n){var r=e.get(t);null===r||void 0===r||r.delete(n),0===(null===r||void 0===r?void 0:r.size)&&e.delete(t)}var n={has:function(t){return e.has(t)},add:function(r,i){if("string"!==typeof r){var o=r.map((function(e){return n.add(e,i)}));return function(){return o.forEach((function(e){return e()}))}}var a=r;return e.get(a)||e.set(a,new Set),e.get(a).add(i),function(){return t(a,i)}},remove:function(e,r){if("string"!==typeof e)return e.forEach((function(e){return n.remove(e,r)}));t(e,r)},publish:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var i=0,o=Array.from(e.get(t)||[]);i<o.length;i++)o[i].apply(void 0,n)}};return n}var Q=Z},function(e,t,n){"use strict";n.r(t),n.d(t,"InterpolatedString",(function(){return o.a})),n.d(t,"FontBaseline",(function(){return r})),n.d(t,"getFontMetrics",(function(){return p})),n.d(t,"getFontValues",(function(){return a})),n.d(t,"isReactElement",(function(){return f.a})),n.d(t,"reactNodeNameForLogging",(function(){return h.a})),n.d(t,"updateRef",(function(){return m.a})),n.d(t,"useDependencyTracer",(function(){return y})),n.d(t,"useFontMetrics",(function(){return b})),n.d(t,"useFontValues",(function(){return w})),n.d(t,"HORIZONTAL_SIZE_CLASS_THRESHOLD",(function(){return S.a})),n.d(t,"useHorizontalSizeClass",(function(){return S.d})),n.d(t,"useHorizontalSizeClassCallback",(function(){return S.e})),n.d(t,"HorizontalSizeClassOverrideContext",(function(){return S.b})),n.d(t,"HorizontalSizeClassThresholdContext",(function(){return S.c})),n.d(t,"useMediaQuery",(function(){return C.a})),n.d(t,"useMediaQueryCallback",(function(){return C.b})),n.d(t,"useIsMounted",(function(){return _.a})),n.d(t,"useOnReady",(function(){return O})),n.d(t,"usePointerPrecision",(function(){return E.b})),n.d(t,"PointerPrecisionOverrideContext",(function(){return E.a})),n.d(t,"useHasHover",(function(){return I})),n.d(t,"HasHoverOverrideContext",(function(){return T})),n.d(t,"useReducedMotion",(function(){return P})),n.d(t,"ReducedMotionOverrideContext",(function(){return R})),n.d(t,"useRerender",(function(){return k.a})),n.d(t,"useSuperRef",(function(){return D.a})),n.d(t,"VERTICAL_SIZE_CLASS_THRESHOLD",(function(){return M})),n.d(t,"useVerticalSizeClass",(function(){return N})),n.d(t,"VerticalSizeClassOverrideContext",(function(){return x})),n.d(t,"VerticalSizeClassThresholdContext",(function(){return L})),n.d(t,"useIsOnline",(function(){return j})),n.d(t,"assertContext",(function(){return U}));var r,i,o=n(1201);function a(e){var t=window.getComputedStyle(e),n={font:t.getPropertyValue("font"),lineHeight:parseFloat(t.getPropertyValue("line-height")),fontFamily:t.getPropertyValue("font-family"),fontSize:parseFloat(t.getPropertyValue("font-size")),fontStretch:t.getPropertyValue("font-stretch"),fontStyle:t.getPropertyValue("font-style"),fontVariant:t.getPropertyValue("font-variant"),fontWeight:parseInt(t.getPropertyValue("font-weight"))};if(!n.font){var r=[n.fontStyle,n.fontVariant,n.fontWeight,"100%"===n.fontStretch?"normal":n.fontStretch,n.fontSize+"px / "+n.lineHeight+"px",n.fontFamily];n.font=""+r.join(" ")}return n}!function(e){e.TOP="top",e.HANGING="hanging",e.MIDDLE="middle",e.ALPHABETIC="alphabetic",e.IDEOGRAPHIC="ideographic",e.BOTTOM="bottom"}(r||(r={}));var s=new Map,c=new(function(){function e(){this.font=""}return e.prototype._buildKey=function(e){return this.font+"-"+e},e.prototype.get=function(e){return s.get(this._buildKey(e))},e.prototype.set=function(e,t){s.set(this._buildKey(e),t)},e.prototype.has=function(e){return s.has(this._buildKey(e))},e}());function u(e,t){for(var n=e.length,r=n,i=0;i<n;i+=4)if(255!==e[i]){r=i/4/t;break}return r}function l(e,t){for(var n=0,r=e.length-4;r>=0;r-=4)if(255!==e[r]){n=r/4/t;break}return n}function d(e,t,n,o){void 0===o&&(o=r.ALPHABETIC);var a=i.height,s=i.width;return e.clearRect(0,0,s,a),e.fillStyle="white",e.fillRect(-1,-1,s+2,a+2),e.fillStyle="black",e.font=t,e.textBaseline=o,e.fillText(n,s/2,a/2,s),e.getImageData(0,0,s,a).data}function p(e,t){i||(i=document.createElement("canvas"));var n=a(t),o=n.font,s=n.lineHeight;if(c.font=o,c.has(e))return c.get(e);var p=i.getContext("2d");i.width=s,i.height=2*s;var f=c.get(r.ALPHABETIC);if(f||(f=function(e,t,n){var r,i,o;i=u(r=d(e,t,"N"),n);var a=l(r,n)-i;i=u(r=d(e,t,"x"),n);var s=(o=l(r,n))-i,c=n/2+a/2;return{capline:c-a,meanline:c-s,baseline:c,capHeight:a,xHeight:s,renderedBaseline:o}}(p,o,s),c.set(r.ALPHABETIC,f)),e===r.ALPHABETIC)return f;var h=l(d(p,o,"N",e),s),m=h-f.renderedBaseline,g={capline:f.capline+m,meanline:f.meanline+m,baseline:f.baseline+m,capHeight:f.capHeight,xHeight:f.xHeight,renderedBaseline:h};return c.set(e,g),g}var f=n(1219),h=n(1468),m=n(1327),g=n(870),v=n.n(g);function y(e,t,n){void 0===n&&(n=console.error);for(var r=v.a.useRef(t),i=[],o=0,a=Object.entries(t);o<a.length;o++){var s=a[o],c=s[0],u=s[1];Object.is(u,r.current[c])||i.push(c)}r.current=t,i.length>0&&n("change "+e+" triggered by: "+i.join(", "))}function b(e){void 0===e&&(e=r.ALPHABETIC);var t=Object(g.useState)({capline:0,meanline:0,baseline:0,capHeight:0,xHeight:0,renderedBaseline:0}),n=t[0],i=t[1];return[Object(g.useCallback)((function(t){t&&i(p(e,t))}),[e]),n]}function w(){var e=Object(g.useState)({font:"",lineHeight:0,fontFamily:"",fontSize:0,fontStretch:"",fontStyle:"",fontVariant:"",fontWeight:0}),t=e[0],n=e[1];return[Object(g.useCallback)((function(e){e&&n(a(e))}),[]),t]}var S=n(1229),C=n(1214),_=n(1251);function O(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Object(g.useRef)(e);r.current=e;var i=Object(g.useState)((function(){return t.map((function(e){var t,n={name:e,status:"pending",callback:function(){n.status="called",t()},promise:new Promise((function(e){return t=e}))};return n}))}))[0],o=Object(_.a)();return Object(g.useEffect)((function(){Promise.all(i.map((function(e){return e.promise}))).then((function(){o()&&r.current()}))}),[i,o]),i.reduce((function(e,t){var n=t.name,r=t.callback;return e[n]=r,e}),{})}var E=n(1213);function I(){A||(A=window.matchMedia("(hover: hover)"));var e=Object(g.useContext)(T),t=Object(C.a)(A);return void 0!==e?e:t}var A,T=Object(g.createContext)(void 0);function P(){var e=Object(C.a)("(prefers-reduced-motion)"),t=Object(g.useContext)(R);return void 0!==t?t:e}var R=v.a.createContext(void 0),k=n(1250),D=n(1326),M=480;function N(){var e=Object(g.useContext)(x),t=Object(g.useContext)(L),n=Object(C.a)("screen and (max-height: "+t+"px)");return e||(n?"compact":"regular")}var x=v.a.createContext(void 0),L=v.a.createContext(M);function j(){var e=Object(g.useState)((function(){return window.navigator.onLine})),t=e[0],n=e[1];return Object(g.useEffect)((function(){var e=function(){return n(window.navigator.onLine)};return window.addEventListener("online",e),window.addEventListener("offline",e),function(){window.removeEventListener("online",e),window.removeEventListener("offline",e)}}),[]),t}function U(e,t,n){if(void 0===e)throw new Error("Tried to use "+t+" outside of "+(n?"<"+n+">":"its provider")+". Please ensure that "+(n?"<"+n+">":"its provider")+" exists above this component in the React tree.\n\n(If this component is being presented by usePane() or useModalPane(), make sure that "+(n?"<"+n+">":"the "+t+" provider")+" also wraps <UIPaneContainer>.)\n\nTo learn more about using React contexts, check out https://reactjs.org/docs/context.html and https://kentcdodds.com/blog/how-to-use-react-context-effectively.")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return U})),n.d(t,"d",(function(){return F})),n.d(t,"b",(function(){return z})),n.d(t,"e",(function(){return B})),n.d(t,"a",(function(){return H})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return q}));var r=n(870),i=n.n(r),o=n(901),a=n(903),s=n(971),c=n(1200),u=["styles"];function l(){return l=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},l.apply(null,arguments)}var d=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,u);return i.a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"37",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"1f0e1f993f996dce4ad1b901ddf8e1d4a",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#1f0e1f993f996dce4ad1b901ddf8e1d4a)",d:"M14.8 15.328c3.78 0 7.032-3.375 7.032-7.77 0-4.341-3.27-7.558-7.031-7.558C11.039 0 7.77 3.287 7.77 7.594c0 4.36 3.27 7.734 7.03 7.734zM3.007 31.605h16.066a10.09 10.09 0 01-.088-1.3v-6.276c0-1.986 1.055-3.27 2.655-4.166-1.934-.843-4.254-1.388-6.838-1.388C5.678 18.475 0 24.732 0 29.268c0 1.459 1.125 2.337 3.006 2.337zm18.914-1.248c0 3.375 1.986 4.606 6.767 7.4.422.264 1.09.317 1.635 0 4.782-2.812 6.768-4.025 6.768-7.4V24.03c0-1.02-.387-1.687-1.424-2.127-1.037-.422-4.289-1.582-5.291-1.933a2.683 2.683 0 00-1.88.07c-.862.316-4.114 1.441-5.134 1.863-1.037.44-1.441 1.108-1.441 2.127v6.328zm6.521 3.375c-.28 0-.65-.123-.878-.386l-2.971-3.252c-.211-.229-.281-.545-.281-.809 0-.615.474-1.107 1.09-1.107.369 0 .65.176.843.386l2.162 2.338 4.29-5.941c.193-.299.527-.492.913-.492.598 0 1.108.474 1.108 1.09 0 .193-.07.439-.229.65l-5.115 7.102c-.193.246-.545.421-.932.421z",transform:"translate(0 11)"}))},p=["styles"];function f(){return f=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},f.apply(null,arguments)}var h=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,p);return i.a.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:"30",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"e98697a98cb37907a8ff4f1c7bb9cfc2a",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#e98697a98cb37907a8ff4f1c7bb9cfc2a)",d:"M19.283 5.555c1.072-1.301 1.828-3.076 1.828-4.87 0-.246-.017-.492-.052-.685-1.758.07-3.868 1.16-5.116 2.637-1.002 1.125-1.916 2.918-1.916 4.71 0 .282.053.546.07.633.106.018.282.053.475.053 1.565 0 3.533-1.054 4.711-2.478zm1.23 2.847c-2.618 0-4.763 1.6-6.134 1.6-1.46 0-3.358-1.494-5.643-1.494C4.395 8.508 0 12.094 0 18.844c0 4.218 1.617 8.666 3.639 11.531 1.722 2.426 3.234 4.412 5.414 4.412 2.144 0 3.093-1.424 5.765-1.424 2.707 0 3.323 1.389 5.696 1.389 2.355 0 3.92-2.162 5.414-4.29 1.652-2.442 2.355-4.816 2.373-4.939-.14-.035-4.64-1.88-4.64-7.03 0-4.466 3.532-6.47 3.743-6.628-2.338-3.357-5.906-3.463-6.89-3.463z",transform:"translate(.127 9.957)"}))},m=["styles"];function g(){return g=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},g.apply(null,arguments)}var v=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,m);return i.a.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",width:"50",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"b8269a3378fac38b40a14870926a9bc2a",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#b8269a3378fac38b40a14870926a9bc2a)",d:"M20.215 16.19c.539 0 1.06-.223 1.564-.669L38.426.826C37.546.276 36.439 0 35.104 0H5.344C4.008 0 2.9.275 2.02.826l16.647 14.695c.504.446 1.02.668 1.547.668zM.439 26.12L12.762 13.8.404 2.9c-.093.188-.184.49-.272.906A7.278 7.278 0 000 5.29v18.352c0 .539.041 1.004.123 1.397.082.393.188.753.316 1.081zm40.008-11.127V5.291c0-.574-.044-1.07-.132-1.485-.087-.416-.178-.718-.272-.906L27.686 13.8l4.763 4.746A10.862 10.862 0 0136 15.952a10.478 10.478 0 014.447-.958zm-9.527 5.783L25.7 15.54l-2.356 2.092a5.695 5.695 0 01-1.52.984 4.058 4.058 0 01-1.61.334c-.538 0-1.068-.111-1.59-.334a5.965 5.965 0 01-1.538-.984l-2.338-2.092L2.074 28.213c.328.21.73.384 1.204.518a5.963 5.963 0 001.626.203h25.207a9.437 9.437 0 01-.369-1.52 10.222 10.222 0 01-.123-1.592c0-.926.114-1.813.343-2.663.228-.85.548-1.643.958-2.382zm9.527 13.553a8.098 8.098 0 003.261-.668 8.715 8.715 0 002.716-1.846 8.842 8.842 0 001.854-2.715 8.05 8.05 0 00.677-3.279c0-1.558-.384-2.982-1.151-4.271a8.719 8.719 0 00-3.094-3.085c-1.295-.768-2.716-1.152-4.263-1.152-1.558 0-2.98.384-4.262 1.152A8.838 8.838 0 0033.1 21.55c-.774 1.289-1.16 2.713-1.16 4.271 0 1.16.222 2.256.667 3.287a8.761 8.761 0 001.837 2.725 8.462 8.462 0 002.716 1.837c1.031.44 2.127.66 3.287.66zm.018-2.057c-1.219 0-2.268-.257-3.147-.773s-1.447-1.06-1.705-1.635v-.088c.176-.34.48-.676.914-1.01.434-.334.985-.613 1.653-.835.668-.223 1.43-.334 2.285-.334.855 0 1.611.111 2.267.334.657.222 1.202.5 1.635.835.434.334.738.676.914 1.028v.07c-.258.586-.826 1.134-1.705 1.644-.879.51-1.916.764-3.111.764zm-.018-6.029c-.761 0-1.4-.278-1.916-.835-.515-.556-.773-1.263-.773-2.118 0-.762.26-1.424.782-1.986.522-.563 1.157-.844 1.907-.844s1.386.281 1.907.844c.522.562.783 1.224.783 1.986 0 .855-.258 1.562-.774 2.118a2.507 2.507 0 01-1.916.835z",transform:"translate(0 13)"}))},y=["styles"];function b(){return b=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},b.apply(null,arguments)}var w=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,y);return i.a.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:"45",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"e47c66d69717f0fb9f04e912f0618d8aa",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#e47c66d69717f0fb9f04e912f0618d8aa)",d:"M19.441 17.174c.721 0 1.39-.334 2.163-1.108L36.896.932C36.246.299 35.033 0 33.293 0h-28.3C3.515 0 2.478.281 1.897.861L17.28 16.066c.756.756 1.424 1.108 2.162 1.108zM.44 27.457L12.867 15.17.404 2.883C.141 3.375 0 4.219 0 5.432v19.406c0 1.248.14 2.127.44 2.619zm28.916-13.201c1.23-.51 4.747-1.705 5.625-2.057a5.516 5.516 0 013.446-.193l.386.158V5.432c0-1.178-.14-2.022-.404-2.514L26.016 15.17l1.02 1.02c.491-.844 1.265-1.495 2.32-1.934zm-.58 11.373c0 3.656 2.127 4.975 7.33 8.033.58.334 1.301.264 1.758 0 5.203-3.04 7.348-4.377 7.348-8.033v-6.856c0-1.107-.422-1.828-1.547-2.32-1.125-.457-4.64-1.652-5.572-2.021-.72-.282-1.424-.282-2.04-.07-1.107.386-4.605 1.634-5.73 2.091-1.125.492-1.547 1.213-1.547 2.32v6.856zm2.584-.334V19.6c0-.528.141-.791.686-1.002 1.248-.457 3.094-1.16 4.342-1.6a1.58 1.58 0 01.597-.123V30.99c-.175 0-.334-.035-.527-.14-4.008-2.426-5.098-3.024-5.098-5.555zm-4.992-6.275l-2.144-2.127-1.16 1.177c-1.213 1.16-2.356 1.688-3.622 1.688-1.283 0-2.425-.528-3.62-1.688l-1.178-1.177-12.64 12.515c.669.598 1.829.88 3.517.88h22.218c-.914-1.284-1.37-2.743-1.37-4.66V19.02z",transform:"translate(0 13)"}))},S=["styles"];function C(){return C=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},C.apply(null,arguments)}var _=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,S);return i.a.createElement("svg",C({xmlns:"http://www.w3.org/2000/svg",width:"38",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"26f25c4fd1cc0b37f002fc972b07a9a3a",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#26f25c4fd1cc0b37f002fc972b07a9a3a)",d:"M10.257 22.807v-11.27c0-.382.137-.705.41-.97.274-.266.6-.399.98-.399.377 0 .698.133.963.399.266.265.399.588.399.97v7.059c.14-.094.29-.189.447-.285.158-.096.327-.177.506-.245V7.776c0-.376.136-.695.409-.954.273-.26.591-.39.955-.39.365 0 .683.13.956.39.273.26.41.578.41.954v9.426c.165-.027.333-.05.504-.07.172-.02.34-.037.505-.05V6.771c0-.366.133-.686.4-.959a1.3 1.3 0 01.966-.409c.376 0 .695.136.954.41.26.272.39.592.39.958v10.436c.18.04.348.084.507.132.158.048.32.093.483.135V8.49c0-.378.13-.7.39-.967s.58-.4.959-.4c.363 0 .678.133.945.4.266.267.4.589.4.967v12.56c0 .19.033.327.101.409a.35.35 0 00.285.122.366.366 0 00.247-.112c.081-.074.156-.2.225-.378l1.69-3.563c.26-.551.525-.952.796-1.203.271-.25.61-.371 1.014-.362.36.01.651.125.875.344.224.22.33.505.321.855-.008.295-.105.728-.29 1.299-.184.57-.357 1.128-.519 1.674-.245.782-.494 1.553-.746 2.313a38.23 38.23 0 01-.797 2.186c-.28.697-.589 1.348-.927 1.95-.841 1.65-1.895 2.85-3.162 3.597-1.268.747-2.797 1.121-4.59 1.121-1.63 0-3.073-.344-4.329-1.033a7.454 7.454 0 01-2.957-2.937c-.716-1.27-1.075-2.779-1.075-4.525zM35.284 2.454A7.223 7.223 0 0031.55.44C30.111.147 28.495 0 26.7 0H10.96C9.19 0 7.586.15 6.147.45c-1.44.3-2.678.969-3.714 2.004A7.162 7.162 0 00.44 6.156C.147 7.588 0 9.188 0 10.957v15.725c0 1.808.143 3.428.43 4.86a7.02 7.02 0 002.004 3.7 7.116 7.116 0 003.724 2.014c1.446.294 3.066.441 4.86.441H26.7c1.794 0 3.41-.147 4.85-.44a7.206 7.206 0 003.733-2.016 7.102 7.102 0 001.984-3.7c.287-1.432.431-3.051.431-4.86V10.997c0-1.795-.144-3.409-.431-4.84a7.102 7.102 0 00-1.984-3.702z",transform:"translate(0 11)"}))},O=["styles"];function E(){return E=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.apply(null,arguments)}var I=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,O);return i.a.createElement("svg",E({xmlns:"http://www.w3.org/2000/svg",width:"28",height:"60"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"5bdd70485e5eabc421a3cde46fcbe87ba",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},i.a.createElement("stop",{offset:"0%",stopColor:"#549EFF"}),i.a.createElement("stop",{offset:"100%",stopColor:"#228EFF"}))),i.a.createElement("path",{fill:"url(#5bdd70485e5eabc421a3cde46fcbe87ba)",d:"M0 19.744c0 1.512.225 2.83.674 3.957.45 1.127 1.173 2.177 2.171 3.151.998.975 2.315 1.975 3.949 3.002 1.634 1.027 3.636 2.203 6.007 3.526.212.117.42.203.624.258.204.055.38.083.528.083.136 0 .306-.028.51-.083.204-.055.412-.14.624-.258 2.381-1.313 4.389-2.483 6.023-3.51 1.634-1.027 2.948-2.027 3.94-3.002.994-.974 1.715-2.027 2.165-3.159.45-1.131.675-2.453.675-3.965V7.1c0-.939-.191-1.617-.574-2.033-.382-.416-.957-.79-1.724-1.122a87.173 87.173 0 00-2.09-.805c-.917-.343-1.9-.703-2.951-1.081-1.051-.378-2.036-.729-2.955-1.052a139.28 139.28 0 00-2.087-.722A4.608 4.608 0 0013.953 0c-.27 0-.54.03-.81.092-.269.062-.523.126-.762.192a41.19 41.19 0 00-2.08.681c-.915.32-1.9.673-2.956 1.06-1.056.388-2.042.756-2.958 1.105-.916.35-1.613.62-2.09.814C1.54 4.265.968 4.637.58 5.058.194 5.48 0 6.16 0 7.1v12.645zm14.256 10.648V2.962c.066.01.135.027.207.049.072.021.156.049.25.082a148.306 148.306 0 003.704 1.394c.72.261 1.443.52 2.168.78a741.1 741.1 0 012.073.742c.658.237 1.24.444 1.748.62.236.082.39.196.463.34.073.144.11.36.11.648v11.509c0 1.247-.169 2.31-.506 3.188-.338.878-.893 1.688-1.666 2.43-.773.743-1.804 1.526-3.091 2.351a242.805 242.805 0 01-4.78 2.968 3.596 3.596 0 01-.366.205 2.436 2.436 0 01-.314.124z",transform:"translate(0 13)"}))},A=["styles"];function T(){return T=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},T.apply(null,arguments)}var P=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,A);return i.a.createElement("svg",T({width:"60",height:"60",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"dfa1075f556555fe76a47abf6d83c088b"},i.a.createElement("stop",{stopColor:"#549EFF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#228EFF",offset:"100%"})),i.a.createElement("path",{d:"M0 0h60v60H0V0z",id:"dfa1075f556555fe76a47abf6d83c088a"})),i.a.createElement("path",{d:"M35.329 31.244a.473.473 0 01-.351-.14.74.74 0 01-.19-.37l-.125-.673c-.152-.84-.305-1.415-.459-1.73-.153-.313-.423-.544-.806-.69-.384-.146-1.098-.299-2.143-.458a.614.614 0 01-.376-.177.527.527 0 01-.127-.369.55.55 0 01.475-.546c1.044-.168 1.763-.328 2.156-.48.394-.15.668-.383.821-.697.154-.314.307-.886.46-1.715l.124-.674a.696.696 0 01.19-.362.487.487 0 01.35-.132c.142 0 .261.046.359.14a.622.622 0 01.182.354l.125.674c.152.83.302 1.4.452 1.715.149.314.42.547.814.698.393.151 1.117.31 2.17.48a.551.551 0 010 1.091c-1.053.16-1.777.312-2.17.458-.394.146-.668.379-.822.698-.154.319-.307.902-.458 1.75l-.11.69a.562.562 0 01-.541.465zm7.896-3.547a.67.67 0 01-.469-.166.702.702 0 01-.219-.447c-.333-2.23-.709-3.83-1.126-4.801a4.028 4.028 0 00-2.07-2.127c-.964-.448-2.549-.82-4.757-1.115a.727.727 0 01-.463-.225.667.667 0 01-.171-.468c0-.177.06-.328.178-.453.12-.125.271-.2.456-.225 2.208-.296 3.779-.667 4.713-1.115a4.008 4.008 0 002.013-2.09c.408-.947.817-2.564 1.227-4.853a.75.75 0 01.241-.446.658.658 0 01.447-.166.66.66 0 01.46.173.717.717 0 01.227.453c.324 2.212.697 3.803 1.12 4.773a4.119 4.119 0 002.077 2.142c.963.457 2.549.833 4.756 1.13.185.024.337.099.456.224a.634.634 0 01.179.453.668.668 0 01-.171.468.728.728 0 01-.464.225c-2.198.296-3.764.667-4.698 1.115a4.012 4.012 0 00-2.013 2.083c-.408.942-.822 2.562-1.242 4.86a.758.758 0 01-.233.432.65.65 0 01-.454.166zM12.81 51c-1.76 0-3.085-.445-3.975-1.334-.89-.89-1.336-2.213-1.336-3.97v-9.69c0-.494.03-.911.092-1.252.06-.34.155-.648.282-.925.127-.276.308-.58.543-.91l6.311-8.537c.628-.866 1.187-1.51 1.677-1.934a4.357 4.357 0 011.656-.902c.615-.178 1.42-.268 2.419-.268h12c-.017.294-.115.522-.291.685-.177.163-.452.358-.825.584l-.4.263a3.37 3.37 0 00-.391.298 1.925 1.925 0 00-.32.361H20.28c-.676 0-1.268.12-1.776.36s-.963.631-1.365 1.172l-6.708 9.185c-.132.187-.163.365-.092.535.07.17.225.254.463.254H22.31c.415 0 .735.135.962.402.226.268.34.597.34.987v.077c0 .777.185 1.516.557 2.216.372.701.895 1.268 1.569 1.701.674.433 1.439.65 2.294.65s1.62-.217 2.293-.65c.675-.433 1.198-1 1.57-1.7.37-.701.557-1.44.557-2.217v-.077c0-.39.113-.719.34-.987.226-.267.547-.402.961-.402h11.502c.161 0 .284-.04.37-.121a.404.404 0 00.127-.306.623.623 0 00-.125-.362l-3.154-4.354c.332.058.64.082.924.071.284-.01.56-.061.829-.154a2.18 2.18 0 00.75-.454l2.67 3.624c.235.33.416.634.543.91.127.277.221.585.283.925.06.34.091.758.091 1.251v9.691c0 1.762-.443 3.086-1.328 3.973-.886.887-2.213 1.331-3.983 1.331H12.811z",fill:"url(#dfa1075f556555fe76a47abf6d83c088b)",xlinkHref:"#dfa1075f556555fe76a47abf6d83c088a"}))},R=n(884),k=n(2248),D=n(925),M=n(1201),N=n(1202),x=n(1198),L=n(878),j=n(2175);const U="e850b097b840ef10ce5a7ed95b171058c42cc435",F="com.me.mail",z="mccgateway",B=e=>{var t,n;if(!e)return!0;const r=null===e||void 0===e?void 0:e.details,i=e.isLITEAccount,o=!!r&&Object(R.c)(r),a=null!==(t=null===r||void 0===r?void 0:r.isManagedAppleID)&&void 0!==t&&t,s=null!==(n=null===e||void 0===e?void 0:e.isMailBlocked)&&void 0!==n&&n;return i||o||a||!Object(k.e)("mccgateway")||!Object(k.e)("mail")||s},K={...s.a,authBagId:"mail",applicationName:"mail2",path:"mail2",generation:2,requiredServices:[z],unsupportedLocales:j.a.RTL?void 0:["ar-sa","iw-il"],supportedDevices:[{primaryInteractionMode:a.b.MOUSE,sizeClass:a.e.REGULAR},{primaryInteractionMode:a.b.MOUSE,sizeClass:a.e.COMPACT},{primaryInteractionMode:a.b.TOUCH,sizeClass:a.e.REGULAR},{primaryInteractionMode:a.b.TOUCH,sizeClass:a.e.COMPACT}],supportedDomains:[o.e,o.d,o.b,o.c,o.f,o.g],supportedFileExtensions:[],pushTopic:{hash:U,name:F},shouldShowPushNotifications:!0,shouldAwakeInBackgroundFromPush:!0,allowsPhoneNumberAsAppleId:!1,radarComponentId:437728,configuration:null,isPushDisabled:B},H="mail",W={identifier:H,displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName",generations:[K],applicationInfo:K},q={identifier:H,displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName",mixedTiles:[{title:Object(x.a)(Object(L.b)())?Object(D.a)("CloudOS.LandingPage.Mail.Tile.A.CategorizationSupported.Title"):Object(D.a)("CloudOS.LandingPage.Mail.Tile.A.Title"),description:Object(x.a)(Object(L.b)())?Object(D.a)("CloudOS.LandingPage.Mail.Tile.A.CategorizationSupported.Description"):Object(D.a)("CloudOS.LandingPage.Mail.Tile.A.Description"),contentImageSrc1x:"../b34fdb90e43e1480837726bbf6c5ceb4.png",contentImageSrc2x:"../45d3d8ae2e62f66132aade3884b3e5d2.png",contentImageSrc3x:"../f6c12dc7717ff174da421db437f4f97e.png",icon:r.createElement(h,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.B.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.B.Description"),icon:r.createElement(d,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.Cleanup.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.Cleanup.Description"),icon:r.createElement(P,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.C.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.C.Description"),icon:r.createElement(_,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.D.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.D.Description"),contentImageSrc1x:c.a,icon:r.createElement(w,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.E.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.E.Description"),icon:r.createElement(v,{width:60,height:60,"aria-hidden":!0})},{title:Object(D.a)("CloudOS.LandingPage.Mail.Tile.F.Title"),description:Object(D.a)("CloudOS.LandingPage.Mail.Tile.F.Description"),icon:r.createElement(I,{width:60,height:60,"aria-hidden":!0})}],faqs:[{title:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.A.Question"),content:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.A.Answer")},{title:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.B.Question"),content:r.createElement(M.a,{interpolations:{"#{customDomainLink}":r.createElement("a",{target:"_blank",rel:"noreferrer",href:Object(N.a)("useCustomEmailDomainWithICloudMail"),className:"unstyled-link","aria-label":`${Object(D.a)("CloudOS.LandingPage.Mail.FAQ.B.Answer.CustomDomainLinkText")} ${Object(D.a)("VoiceOver.ExternalLink.Description")}`},Object(D.a)("CloudOS.LandingPage.Mail.FAQ.B.Answer.CustomDomainLinkText"))}},Object(D.a)("CloudOS.LandingPage.Mail.FAQ.B.Answer"))},{title:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.C.Question"),content:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.C.Answer")},{title:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.D.Question"),content:Object(D.a)("CloudOS.LandingPage.Mail.FAQ.D.Answer")}],learnMoreTextLocKey:"CloudOS.LandingPage.Mail.Subdescription",descriptionLocKey:"CloudOS.LandingPage.Mail.Description",learnMoreLinkKey:"mail",nameToBeDisplayedLocKey:"Mail.TitleName"};K.configuration=W},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1278),i=n(1274),o=n(1275),a=n(1277);function s(e,t){const n=Object.assign({},e);for(const o of t){const t=e[o];if(!Object(a.c)(t))throw new r.a(`Protocol method name ${o} is not a Function`);n[o]=function(){try{const t=e[o](...arguments);return t?Object(a.h)(t)?t.then((e=>i.a.createWithOptionalData(e).serialize())).catch((e=>{if(e&&!e.isMessagingError)throw e;return i.a.createFromError(e).serialize()})):Promise.resolve(i.a.createWithOptionalData(t).serialize()):Promise.resolve(i.a.createWithOptionalData().serialize())}catch(t){if(t&&"object"===typeof t&&!t.isMessagingError)throw t;return Promise.resolve(i.a.createFromError(t).serialize())}}}return n}var c,u,l=n(1281);!function(e){e[e.PARSE_ERROR=-32700]="PARSE_ERROR",e[e.INVALID_REQUEST=-32600]="INVALID_REQUEST",e[e.METHOD_NOT_FOUND=-32601]="METHOD_NOT_FOUND",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.INTERNAL_ERROR=-32603]="INTERNAL_ERROR"}(c||(c={}));class d extends Error{constructor(e,t,n){super(e),this.code=void 0,this.name=void 0,this.data=void 0,this.code=t,this.name=n}toJSON(){return`[${this.code}] ${this.name}: ${this.message}`}}class p extends d{constructor(e){super(e,c.METHOD_NOT_FOUND,"Method not found")}}class f extends d{constructor(e){super(e,c.INVALID_PARAMS,"Invalid params")}}class h extends d{constructor(e){super(e,c.INTERNAL_ERROR,"Internal error")}}class m{constructor(){this.jsonRpcVersion="2.0"}generateCallMessageFor(e){const t={jsonrpc:this.jsonRpcVersion,id:"JsonRpcMessageFormatterV2:"+ ++g,method: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 r.length>0&&(t.params=r),t}generateNotificationMessageFor(e){const t={jsonrpc:this.jsonRpcVersion,method: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 r.length>0&&(t.params=r),t}generateErrorMessageFor(e,t){let n;n=t instanceof d?t.code:c.INTERNAL_ERROR;const r=t.message,i=t.data,o={jsonrpc:this.jsonRpcVersion,id:e,error:{code:n,message:r}};return Object(a.d)(i)&&(o.error.data=i),o}generateResultMessageFor(e,t){return{jsonrpc:this.jsonRpcVersion,id:e,result:t}}toJSON(){return""+this}}u=m,m.sharedInstance=new u;let g=0;var v=n(1285);class y{constructor(e){this.channel=void 0,this.messageFormatter=m.sharedInstance,this.serializer=v.a.sharedInstance,this.channel=e,this.incomingMessageListener=this.incomingMessageListener.bind(this)}addChannelListeners(){this.channel.incomingMessage.addListener(this.incomingMessageListener)}removeChannelListeners(){this.channel.incomingMessage.removeListener(this.incomingMessageListener)}incomingMessageListener(e){const t=this.serializer.decode(e.context);Object(a.a)(t)&&this.shouldHandleMessage(t)&&this.handleMessage(t)}toJSON(){return""+this}destroy(){this.removeChannelListeners()}}class b extends y{constructor(){super(...arguments),this.isDestroyed=!1}hasHandlerForProcedure(e){return Object(a.a)(S(e,this))}registerProcedure(e,t,n){!function(e,t,n,r){const{channel:i}=r;let o=w.get(i);o||(o=new Map,w.set(i,o));const a=o.get(e);a&&Object(l.b)(new Error(`A handler for '${e}' was already registered on this channel`),{procedureName:e,registration:a}),o.set(e,{listener:r,target:t,handlerMethodName:n})}(e,t,n=n||e,this)}registerProcedures(e,t){const n=e.length;let r=0;for(;r<n;r++){const n=e[r];Array.isArray(n)?this.registerProcedure(n[0],t,n[1]):this.registerProcedure(n,t)}}unregisterProcedure(e){const{channel:t}=this,n=w.get(t);if(n){const r=n.get(e);(null===r||void 0===r?void 0:r.listener)===this&&(n.delete(e),0===n.size&&w.delete(t))}}unregisterProcedures(e){e.forEach((e=>{this.unregisterProcedure(e)}))}unregisterAllProcedures(){const e=w.get(this.channel);if(e){const t=e.entries();let n;for(;n=t.next().value;){const t=n[0];n[1].listener===this&&e.delete(t)}}}shouldHandleMessage(e){return(Array.isArray(e)?e:[e]).filter((e=>e&&Object(a.a)(e.jsonrpc)&&e.jsonrpc===this.messageFormatter.jsonRpcVersion&&Object(a.a)(e.method))).length>0}handleMessage(e){const t=Array.isArray(e),n=t?e:[e],r=(i=(e,t)=>this.isDestroyed?O:function(e,t){const{method:n,params:r=[]}=e;if(t.channel.isDisconnected)return O;if(Object(a.a)(r)&&!Array.isArray(r)){const t=new f("JSON-RPC calls in JavaScript cannot support `params` as an Object, only as an Array");throw t.data={message:e},t}const i=S(n,t);if(!i){if(function(e,t){const n=w.get(t);return!!n&&!!n.get(e)}(n,t.channel))return O;const r=new p(`A JSON-RPC registration was not found for method \`${n}\`.`);throw r.data={message:e,listener:t},r}const o=i.target;if(!o){const n=new p("The JSON-RPC target was not found");throw n.data={message:e,listener:t},n}const s=o[i.handlerMethodName];if(!s){const n=new p("The JSON-RPC method was not found");throw n.data={message:e,listener:t},n}return s.call(o,...r)}(e,t),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise(((e,n)=>{setTimeout((()=>{try{const n=i.apply(this,t);e(n)}catch(r){n(r)}}),0)}))});var i;const o=this.messageFormatter,s=[],c={};return n.forEach((e=>{const{id:t}=e,n=r(e,this).then((e=>{c[t]=e!==O?function(e,t,n){return Object(a.a)(t)?e.generateResultMessageFor(t,n):{}}(o,t,e):O})).catch((e=>{if(c[t]=C(o,t,e),!(e instanceof d))throw e}));s.push(n)})),Promise.all(s).then((()=>{this.channel.isDisconnected||_(this,n,c,t)}),(e=>{throw this.channel.isDisconnected||_(this,n,c,t),e}))}destroy(){this.isDestroyed=!0,this.unregisterAllProcedures(),super.destroy()}}const w=new Map;function S(e,t){const n=w.get(t.channel);if(n){const r=n.get(e);if(r&&r.listener===t)return r}return null}function C(e,t,n){return Object(a.a)(t)?e.generateErrorMessageFor(t,n):{}}function _(e,t,n,r){const i=e.messageFormatter,o=[];if(t.forEach((e=>{const t=e.id;if(Object(a.a)(t)){let e=n[t];if(e)e!==O&&o.push(e);else{const n=new h("The JSON-RPC call was part of a batch which failed due to a fatal error thrown by another call.");e=C(i,t,n)}}})),o.length>0){const t=r?o:o[0];e.channel.send(e.serializer.encode(t))}}const O=Symbol("Do not reply");class E{get[Symbol.toStringTag](){return"Deferred"}get resolve(){return this._resolve}get reject(){return this._reject}constructor(){this._resolve=void 0,this._reject=void 0,this.then=void 0,this.catch=void 0,this.finally=void 0;const e=new Promise(((e,t)=>{this._reject=t,this._resolve=e}));this.then=e.then.bind(e),this.catch=e.catch.bind(e),this.finally=e.finally.bind(e)}}class I extends y{callRemoteProcedure(e){const{channel:t}=this;T(t,e);const n=new E;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];const a=this.messageFormatter.generateCallMessageFor(e,...i);return function(e,t,n){A[t]&&A[t][1]===n&&Object(l.b)(new Error("A handler was already registered for response for message id"),{messageId:t,handler:n}),A[t]=[e,n]}(n,a.id,this),t.send(this.serializer.encode(a)),n}sendNotification(e){const{channel:t}=this;T(t,e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const o=this.messageFormatter.generateNotificationMessageFor(e,...r);t.send(this.serializer.encode(o))}shouldHandleMessage(e){return!!e&&Object(a.a)(e.jsonrpc)&&e.jsonrpc===this.messageFormatter.jsonRpcVersion&&(Object(a.a)(e.result)||Object(a.a)(e.error))}handleMessage(e){const t=function(e,t){const n=A[e];if(n&&n[1]===t)return delete A[e],n[0]}(e.id,this);if(t){if(Object(a.a)(e.result))return function(e,t){t.resolve(e.result)}(e,t),t;if(Object(a.a)(e.error))return function(e,t){t.reject(e.error)}(e,t),t}}}const A={};function T(e,t){e&&!e.isDisconnected||Object(l.b)(new Error(`Attempted to call "${t}" without a connected channel.`),{methodName:t,sender:this})}var P=n(1284);class R{constructor(e,t){if(this.protocolMetadata=void 0,this.protocolTarget=void 0,!t)throw new r.a("ProtocolTarget: no protocol target specified");this.protocolMetadata=e,this.protocolTarget=t}}class k{constructor(e,t){this.channel=void 0,this.connectionTimeout=void 0,this._listenerProtocolTarget=void 0,this._listener=void 0,this._connectionProtocolTarget=void 0,this._connection=void 0,this._connectionPendingPromises=void 0,this.channel=e,this.connectionTimeout=t||3e4}setListener(e,t,n){if(!function(e,t){if("object"!==typeof e)return!1;if(!t)return!1;for(const n of t)if(!Object(a.c)(e[n]))return!1;return!0}(n,t))throw new r.a("MessagingChannel: The specified protocol class target does not implement specified protocol methods");this._listenerProtocolTarget=new R(new P.a(e,t),n)}setConnection(e,t,n){this._connectionProtocolTarget=new R(new P.a(e,t),n)}start(){const e=this._listenerProtocolTarget,t=this._connectionProtocolTarget;if(!e&&!t)throw new r.a("Messaging channel has not been configured");const{channel:n,connectionTimeout:i}=this;e&&this._configureListener(n,e),t&&this._configureConnection(n,i,t)}stop(){const{connection:e,_connectionProtocolTarget:t,_connectionPendingPromises:n,listener:r,_listenerProtocolTarget:a}=this;if(r&&(a||Object(l.b)(new Error("MessagingChannel listener exists without a corresponding protocol metadata")),this._unregisterListenerMethods(r,a),this.listener=void 0,this._listenerProtocolTarget=void 0),e&&(t||Object(l.b)(new Error("MessagingChannel connection exists without a corresponding protocol metadata")),this.connection=void 0,this._connectionProtocolTarget=void 0,this._connectionPendingPromises=void 0,null!==n&&void 0!==n&&n.size)){const e=Array.from(n),t=new i.a({status:o.a.DISCONNECTED});return e.forEach((e=>e.resolve(t))),Promise.allSettled(e).then((e=>e&&e.length||0))}return Promise.resolve(0)}_constructRPCMethodName(e,t){if(!e)throw new r.a("MessagingUtils - no class name specified");if(!t)throw new r.a("MessagingUtils - no method name specified");return`${e}-${t}`}_createJsonRpcListener(e){return new b(e)}_createJsonRpcCaller(e){return new I(e)}get listener(){return this._listener}set listener(e){e!==this._listener&&(this._listener&&this._listener.destroy(),this._listener=e,e&&e.addChannelListeners())}get connection(){return this._connection}set connection(e){this._connection&&this._connection.removeChannelListeners(),this._connection=e,e&&e.addChannelListeners()}_configureListener(e,t){this.listener=this._setupJsonRpcListener(e,t)}_configureConnection(e,t,n){this.connection=this._setupJsonRpcCaller(e,t,n)}_setupJsonRpcCaller(e,t,n){var r=this;this._connectionPendingPromises||(this._connectionPendingPromises=new Set);const{_connectionPendingPromises:a}=this,{protocolMetadata:{protocolName:s,protocolMethodNames:c},protocolTarget:u}=n,d=u.constructor.name,p=this._createJsonRpcCaller(e);this.connection=p;for(const f of c){const e=this._constructRPCMethodName(s,f);u[f]=function(){r.connection||Object(l.b)(new Error(`[${d} => OUTBOUND] MessagingChannel has no connection --\x3e '${s}.${f}'`));const n=new E;a.add(n);for(var c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];p.callRemoteProcedure(e,...u).then((e=>{n.resolve(i.a.deserialize(e))})).catch((e=>{n.resolve(i.a.createFromError(e))}));const m=setTimeout((()=>{n.resolve(new i.a({status:o.a.TIMEOUT}))}),t);return n.finally((()=>{globalThis.clearTimeout(m),a.delete(n)})),n}}return p}_setupJsonRpcListener(e,t){const{protocolMetadata:{protocolName:n,protocolMethodNames:i},protocolTarget:o}=t,c=this._createJsonRpcListener(e);this.listener=c;const u=s(o,i);for(const s of i){const e=this._constructRPCMethodName(n,s),t=u[s];if(!Object(a.c)(t))throw new r.a(`Protocol method name ${s} is not a Function`);c.registerProcedure(e,u,s)}return c}_unregisterListenerMethods(e,t){const{protocolMetadata:{protocolName:n,protocolMethodNames:r},protocolTarget:i}=t,o=s(i,r);for(const s of r){const t=this._constructRPCMethodName(n,s),r=o[s];Object(a.c)(r)||Object(l.b)(new Error(`Protocol method name ${s} is not a Function`)),e.unregisterProcedure(t)}}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(1036),i=n(1038),o=n(2228),a=n(1016),s=n(1011);class c{constructor(){this.activeContainedState="",this.stack=[],this.log=[]}begin(e){const t=this.stack.length;return this.log.push(`${this.activeState} / Begin ${e}`),this.stack.push(e),this.activeContainedState="",t}end(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stack.length-1;if(e<0)throw new a.a(s.b`Unbalanced DebugStateLog#begin/end calls`);for(this.activeContainedState="";this.stack.length>e;){const e=this.stack.pop();this.activeContainedState=`End ${e}`,this.log.push(this.activeState)}}isWithin(){const e=this.activeStates.slice(0);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n){const t=e.indexOf(i);if(t<0)return!1;e.splice(0,t+1)}return!0}state(e){this.activeContainedState=e,this.log.push(this.activeState)}get activeStates(){return[...this.stack,...this.activeContainedState?[this.activeContainedState]:[]]}get activeState(){return this.activeStates.join(" / ")}}var u=n(1035),l=n(1071),d=n(1051),p=n(1047);const f=(new TextEncoder).encode("LastPawn-MessageKeys");async function h(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new c;const i=r.begin("ngmExistingEphemeralKeyExchange");try{r.state("destKey");const i=t.publicSigningKey;if(i instanceof Error)return i;r.state("destPreKey");const o=t.publicPreKey;if(o instanceof Error)return o;r.state("signature check");const a=await o.isValidlySignedBy(i.key);if(a instanceof Error)return r.state("invalid signature"),a;r.begin("Secret"),r.state("derive");const s=await crypto.subtle.deriveBits({name:"ECDH",public:n},e.preKeyPair.privateKey,256);r.state("import");const c=await crypto.subtle.importKey("raw",s,{name:"HKDF",hash:"SHA-256"},!1,["deriveBits"]);r.state("secret");const u=await crypto.subtle.deriveBits({name:"HKDF",hash:"SHA-256",salt:f,info:new Uint8Array(0)},c,384);return{dhOutput:new Uint8Array(s),secret:new Uint8Array(u)}}catch(o){return Object(u.a)(o)}finally{r.end(i)}}function m(e,t){let{dhOutput:n,publicRecipientPreKey:r,publicSenderEphemeralKey:i,publicRecipientSigningKey:o}=t;const a=[n,r,i,o,e],s=a.reduce(((e,t)=>e+t.length),0),c=new Uint8Array(s);let u=0;for(const l of a)c.set(l,u),u+=l.length;return c}var g=n(1050);function v(e,t){return e instanceof Error?e:t(e)}const y=new Uint8Array([1]),b=6+y.length;class w{constructor(e){this.logger=e}async createKeyValidatorForKeys(e,t,n){const r=await Promise.all([Object(p.a)(e),Object(p.a)(t),Object(p.a)(n)]);if(r.some((e=>e instanceof Error)))return r.filter((e=>e instanceof Error));const[i,o,a]=r,s=Object(g.a)([i.slice(0,2),o.slice(0,2),a.slice(0,2),y]);return s instanceof Error?(this.logger.error`Failed to create validator array. One of the input keys is an error.\n${s.message}\n\n${s.stack}\n\nInput Keys:\n${[e,t,n].map((e=>`    ${e}`)).join("\n")}`,s):s.length!==b?[this.logger.error`Failed to create validator array. Created validator had ${s.length} bytes. Expected ${b}`]:s}async createKeyValidator(e,t){const n=await this.createKeyValidatorForKeys(e.signingKeyPair.publicKey,v(t.publicSigningKey,(e=>e.key)),v(t.publicPreKey,(e=>e.dataKey)));return n instanceof Uint8Array?n:this.logger.error`Failed to create key validator. Ran into the following issues:\n\n${n.map((e=>`${e.message}\n${e.stack}\n\n`))}`}async validateKeyValidator(e,t,n){const r=n.publicPreKeys;for(const i of r){const r=await this.createKeyValidatorForKeys(v(t.publicSigningKey,(e=>e.key)),n.signingKeyPair.publicKey,i);if(r instanceof Uint8Array&&S(r,e))return!0}this.logger.error`Validator did not match any expected value. Actual validator:\n`,this.logger.error`    ${C(e)}\n`,this.logger.error`Actual Keys & Validators:\n`,this.logger.error`    Sender Signing Key: ${C(await Object(p.a)(v(t.publicSigningKey,(e=>e.key))))}`,this.logger.error`    Receiver Signing Key: ${C(await Object(p.a)(n.signingKeyPair.publicKey))}`,this.logger.error``,this.logger.error``;for(const i of r)this.logger.error`    PreKey: ${C(await Object(p.a)(i))}`,this.logger.error`    Expected Validator: ${C(await this.createKeyValidatorForKeys(v(t.publicSigningKey,(e=>e.key)),n.signingKeyPair.publicKey,i))}`,this.logger.error``,this.logger.error``;return this.logger.error`Validator array did not match expected value for any prekey`}}function S(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function C(e){var t;return e instanceof Error?e.message:e instanceof Uint8Array?Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join(" "):null===(t=e[0])||void 0===t?void 0:t.message}const _={firstThreshold:196,maxCap:16};class O{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(o.a)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new w(e);this.logger=e,this.validator=t}async encrypt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new c;const i=r.begin("Encrypt");try{return await this._encrypt(e,t,n,r)}finally{r.end(i)}}async _encrypt(e,t,n,r){r.begin("KeyExchange"),r.state("Reading recipientPreKey");const i=t.publicPreKey;if(i instanceof Error)return i;r.state("Reading recipientPreKey");const o=t.publicSigningKey;if(o instanceof Error)return o;r.state("Ephemeral ECDH");const h=await async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new c;const r=n.begin("ngmNewEphemeralKeyExchange");try{n.state("signature check");const r=await t.isValidlySignedBy(e.key);if(r instanceof Error)return n.state("invalid signature"),r;n.state("generate ephemeral key");const i=t.dataKey,o=await Object(p.b)();n.begin("Secret"),n.state("derive");const a=await crypto.subtle.deriveBits({name:"ECDH",public:i},o.privateKey,256);n.state("import");const s=await crypto.subtle.importKey("raw",a,{name:"HKDF",hash:"SHA-256"},!1,["deriveBits"]);n.state("secret");const c=await crypto.subtle.deriveBits({name:"HKDF",hash:"SHA-256",salt:f,info:new Uint8Array(0)},s,384);return{ephemeralKey:o,dhOutput:new Uint8Array(a),secret:new Uint8Array(c)}}catch(i){return Object(u.a)(i)}finally{n.end(r)}}(o,i,r);if(h instanceof Error)return h;r.end(),r.begin("Derive AES Params");const{ephemeralKey:g,secret:v,dhOutput:y}=h;r.state("aesKeyData");const b=v.slice(0,32);r.state("ivData");const w=v.slice(32,48);r.state("aesKey");const S=await crypto.subtle.importKey("raw",b,"AES-CTR",!1,["encrypt","decrypt"]);r.end(),r.begin("Plaintext preparation"),r.state("encoding");const C=Object(d.b)(l.a.InnerMessage,{message:n.message,counter:n.counter,...n.gossipData?{ktGossipData:n.gossipData}:{},...n.debugInfo?{debugInfo:n.debugInfo}:{}});r.state("padding");const O=function(e,t){let{firstThreshold:n,maxCap:r}=t;const i=e.length,o=i<=n?n:(c=i,l=r,u=2**Math.ceil(Math.log2(l)),Math.ceil(c/u)*u);var c,u,l;if(o<i)throw new a.a(s.b`padMessage produced invalid amount of padding`);const d=o-i,p=new Uint8Array(o+4);p.set(e,0);const f=crypto.getRandomValues(new Uint8Array(d));return p.set(f,e.length),new Uint32Array(p.buffer,p.byteOffset+p.byteLength-4,1)[0]=d,p}(C,_);let E;r.end();try{r.state("encrypt"),E=new Uint8Array(await crypto.subtle.encrypt({name:"AES-CTR",counter:w,length:64},S,O))}catch(D){return Object(u.a)(D)}r.begin("Export keys"),r.state("recipientPreKey");const I=await Object(p.a)(i.dataKey);if(I instanceof Error)return I;r.state("ephemeralKey");const A=await Object(p.a)(g.publicKey);if(A instanceof Error)return A;r.state("recipientSigningKey");const T=await Object(p.a)(o.key);if(T instanceof Error)return T;r.end(),r.begin("Sign"),r.state("signatureData");const P=m(new Uint8Array(E),{dhOutput:y,publicSenderEphemeralKey:A,publicRecipientPreKey:I,publicRecipientSigningKey:T});let R;r.state("sign");try{R=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},e.signingKeyPair.privateKey,P)}catch(D){return Object(u.a)(D)}r.state("create debug validator");const k=await this.validator.createKeyValidator(e,t);return k instanceof Error?k:(r.end(),r.state("build OuterMessage"),Object(d.b)(l.a.OuterMessage,{encryptedPayload:E,ephemeralPubKey:A,signature:new Uint8Array(R),keyValidator:k}))}async decrypt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new c;const i=r.begin("Decrypt");try{return await this._decrypt(e,t,n,r)}finally{r.end(i)}}async _decrypt(e,t,n,r){r.state("decoding OuterMessage");const i=Object(d.a)(l.a.OuterMessage,n);if(i instanceof Error)return i;r.state("reading encryptedPayload");const o=i.encryptedPayload;if(e.publicSigningKey instanceof Error)return e.publicSigningKey;r.state("recipientSigningKey");const c=t.publicSigningKey;if(c instanceof Error)return c;const f=await Object(p.a)(c);if(f instanceof Error)return f;r.state("senderEphemeralKey");const g=i.ephemeralPubKey,v=await Object(p.d)(g);if(v instanceof Error)return v;r.begin("PreKey");let y=0;const b=t.identities,w=[];for(const l of b){r.begin(`Identity #${y}`),y++,r.state("encodedRecipientPreKey");const t=l.preKeyPair.publicKey,n=await Object(p.a)(t);if(n instanceof Error){r.state("Failed"),w.push({identity:l,error:n}),r.end();continue}r.state("keyExchangeResult");const c=await h(l,e,v);if(c instanceof Error){r.state("Failed"),w.push({identity:l,error:c}),r.end();continue}r.state("signature data");const d=m(new Uint8Array(o),{dhOutput:c.dhOutput,publicSenderEphemeralKey:g,publicRecipientPreKey:n,publicRecipientSigningKey:f});let b;try{r.state("isValid"),b=await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},e.publicSigningKey.key,i.signature,d)}catch(C){return r.state("encountered error"),r.end(),Object(u.a)(C)}if(b)return r.end(),await this.decryptWithSpecificIdentity(o,c);r.state("Invalid signature"),w.push({identity:l,error:new a.a(s.b`Invalid signature`)}),r.end()}r.end(),r.state("no valid prekey"),r.state("using validator...");const S=await this.validator.validateKeyValidator(i.keyValidator,e,t);return S instanceof Error?(r.state("validator agrees data is bad"),S):(r.state("validator thinks data is good, but decrypt still failed"),new a.a(s.b`Decrypt failed.`))}async decryptWithSpecificIdentity(e,t){const{secret:n}=t,r=n.slice(0,32),i=n.slice(32,48),o=await crypto.subtle.importKey("raw",r,"AES-CTR",!0,["encrypt","decrypt"]);let a;try{a=new Uint8Array(await crypto.subtle.decrypt({name:"AES-CTR",counter:i,length:64},o,e))}catch(p){return Object(u.a)(p)}const s=function(e){const t=new Uint32Array(e.buffer,e.byteOffset+e.byteLength-4,1)[0];return e.slice(0,e.length-4-t)}(a),c=Object(d.a)(l.a.InnerMessage,s);return c instanceof Error?c:{counter:c.counter,message:c.message,gossipData:c.ktGossipData,debugInfo:c.debugInfo}}}const E=Object(r.a)((e=>new w(e.get(i.a)))),I=Object(r.a)((e=>new O(e.get(i.a),e.get(E))))},function(e,t,n){"use strict";n.r(t),n.d(t,"jpegParser",(function(){return S})),n.d(t,"TiffTags",(function(){return o})),n.d(t,"ExifTags",(function(){return a})),n.d(t,"GPSTags",(function(){return s})),n.d(t,"AppleMakerNotesTags",(function(){return c})),n.d(t,"OtherTags",(function(){return u})),n.d(t,"MarkerSegments",(function(){return l})),n.d(t,"TagTypes",(function(){return d})),n.d(t,"SegmentDecoders",(function(){return w})),n.d(t,"JPEGInterface",(function(){return _})),n.d(t,"isJpeg",(function(){return f})),n.d(t,"isLittleEndian",(function(){return h})),n.d(t,"hasExifData",(function(){return m})),n.d(t,"readTags",(function(){return g})),n.d(t,"tagValue",(function(){return v})),n.d(t,"rawProp",(function(){return y})),n.d(t,"numberProp",(function(){return b})),n.d(t,"SOI_LENGTH",(function(){return r})),n.d(t,"IFD_TAG_LENGTH",(function(){return i})),n.d(t,"Reader",(function(){return I}));const r=2,i=12,o={ExifOffset:34665,GPSOffset:34853,InteroperabilityOffset:40965,Orientation:274,Make:271,Model:272,Software:305,ImageWidth:256,ImageLength:257,ImageDescription:270},a={PixelXDimension:40962,PixelYDimension:40963,ICCProfile:34675,ColorSpace:40961,WhiteBalance:41987,FNumber:33437,MeteringMode:37383,FocalLength:37386,ISOSpeedRatings:34855,ShutterSpeed:37377,ExposureTime:33434,ExposureBiasValue:37380,MakerNote:37500,LensModel:42036},s={GPSLatitudeRef:1,GPSLatitude:2,GPSLongitudeRef:3,GPSLongitude:4,GPSAltitudeRef:5,GPSAltitude:6},c={HDRImageType:10,BurstUUID:11,LivePhotosUUID:17,StillImageCaptureType:20,SemanticStyle:64},u={VerticalLines:NaN,HorizontalLines:NaN,DateStamp:NaN,TimeStamp:NaN,GPSDateStamp:NaN,GPSTimeStamp:NaN,DateTimeOriginal:NaN},l={SOI:65496,APP0:65504,APP1:65505,APP2:65506,DQT:65499,DHT:65476,DRI:65501,SOF:65472,SOS:65498,EOI:65497};var d;!function(e){e[e.BYTE=1]="BYTE",e[e.ASCII=2]="ASCII",e[e.SHORT=3]="SHORT",e[e.LONG=4]="LONG",e[e.RATIONAL=5]="RATIONAL",e[e.UNDEFINED=7]="UNDEFINED",e[e.SLONG=9]="SLONG",e[e.SRATIONAL=10]="SRATIONAL"}(d||(d={}));var p=n(1185);function f(e){const t=l.SOI;if(e instanceof p.a)return e.jumpTo(0).uint16===t;if(e instanceof DataView&&e.byteLength>1)return e.getUint16(0)===t;if(e instanceof ArrayBuffer){const n=new DataView(e);return n.byteLength>1&&n.getUint16(0)===t}return!1}function h(e){return 1229531648===e||1296891946!==e&&null}function m(e){return 1165519206===e}function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r={},o=e.uint16;if(null===o)return r;const a=e.cursor;for(let s=0;s<o;s++){e.cursor=a+s*i;const o=e.uint16;if(null===o)continue;const c=Object.entries(t).find((e=>{let[t,n]=e;return n===o}));if(c){const t=c[0],i=v(e,n&&"Orientation"===t);void 0!==i&&null!==i&&(Array.isArray(i)?r[t]=i.length>1?i:i[0]:r[t]=i)}}return r}function v(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.uint16,r=e.uint32;let i=e.uint32;if(null!==n&&null!==r&&null!==i)switch(n){case d.BYTE:case d.UNDEFINED:{r<5?e.rewind(4):e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=e.uint8,t&&(e.rewind(1),e.uint8=0);return n}case d.ASCII:{r<5?e.rewind(4):e.jumpTo(i);let t="";for(let n=0,i=r-1;n<i;n++)t+=e.nextChar;return t}case d.SHORT:{r<3?e.rewind(4):e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=e.uint16,t&&(e.rewind(2),e.uint16=0);return n}case d.LONG:{1===r?e.rewind(4):e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=e.uint32,t&&(e.rewind(4),e.uint32=0);return n}case d.RATIONAL:{e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=[e.uint32,e.uint32],t&&(e.rewind(8),e.uint32=0,e.uint32=1);return n}case d.SLONG:{1===r?e.rewind(4):e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=e.int32,t&&(e.rewind(4),e.int32=0);return n}case d.SRATIONAL:{e.jumpTo(i);const n=[];for(let i=0;i<r;i++)n[i]=[e.int32,e.int32],t&&(e.rewind(8),e.int32=0,e.int32=1);return n}}}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e[t]||e[r+t]||n}function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=e[t];return"undefined"===typeof r?n:Array.isArray(r)?r[0]/r[1]:r}const w={app1(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.cursor+10;if(!m(e.fastForward(4).uint32))return t;e.jumpTo(r);const i=h(e.uint32);if(null===i)return t;e.le=i,e.offset=r;const c=e.jumpTo(4).uint32,u=g(e.jumpTo(c),o,n);if(Object.assign(t,u),t.ExifOffset){const r=g(e.jumpTo(Number(t.ExifOffset)),a,n);Object.assign(t,r)}if(t.GPSOffset){const r=g(e.jumpTo(Number(t.GPSOffset)),s,n);Object.assign(t,r)}return t},sof:(e,t)=>(e.fastForward(5),t.VerticalLines=e.uint16,t.HorizontalLines=e.uint16,t)};function S(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.length,i={},o={};for(e.jumpTo(r);e.cursor<n;){const t=e.cursor,n=e.uint16,r=e.uint16;if(null===n||null===r)break;if(o.hasOwnProperty(n)||(o[n]=t),n===l.SOS)break;e.jumpTo(t+2+r)}for(const r in o){if(!o.hasOwnProperty(r))continue;const n=o[r];switch(Number(r)){case l.APP1:w.app1(e.jumpTo(n),i,t);break;case l.SOF:w.sof(e.jumpTo(n),i)}}return i}class C{constructor(e){this.raw=void 0,this.dataHash=void 0,this.raw=function(e){const t={};for(const r of Object.keys(e)){const i=e[r];"object"!==typeof(n=i)||null===n||n.constructor!==Object||n.isClass?t[r]=i:Object.assign(t,i)}var n;return t}(e),this.dataHash=e}}class _ extends C{get Make(){return y(this.raw,"Make")}get Model(){return y(this.raw,"Make")}get Software(){return y(this.raw,"Software")}get Height(){const e=this.raw;return e.hasOwnProperty("PixelYDimension")?e.PixelYDimension:e.hasOwnProperty("ImageHeight")?e.ImageHeight:e.hasOwnProperty("VerticalLines")?e.VerticalLines:null}get Width(){const e=this.raw;return e.hasOwnProperty("PixelXDimension")?e.PixelXDimension:e.hasOwnProperty("ImageLength")?e.ImageLength:e.hasOwnProperty("HorizontalLines")?e.HorizontalLines:null}get Orientation(){return y(this.raw,"Orientation",1)}get WhiteBalance(){return this.raw.hasOwnProperty("WhiteBalance")&&["Auto","Manual"][this.raw.WhiteBalance]||null}get MeteringMode(){if(!this.raw.hasOwnProperty("MeteringMode"))return null;const e=this.raw.MeteringMode;return 255===e?"other":["unknown","Average","CenterWeightedAverage","Spot","Multispot","Pattern","Partial"][e]||null}get FocalLength(){return b(this.raw,"FocalLength")}get FNumber(){return b(this.raw,"FNumber")}get ColorSpace(){if("undefined"===typeof this.raw.ColorSpace)return null;switch(this.raw.ColorSpace){case 1:return"sRGB";case 2:return"Adobe RGB";case 65535:return"Uncalibrated";case 65534:return"ICC Profile";case 65533:return"Wide Gamut RGB";default:return null}}get ISOSpeedRatings(){return b(this.raw,"ISOSpeedRatings")}get ExposureTime(){return b(this.raw,"ExposureTime")}get ExposureBiasValue(){return b(this.raw,"ExposureBiasValue")}get MakerNote(){const e=this.raw.MakerNote;if("undefined"!==typeof e)return 0===e.length?{}:function(e){const t=new ArrayBuffer(e.length),n=new DataView(t);e.forEach(((e,t)=>n.setUint8(t,e))),p.j.reset(n);let r="";for(let o=0;o<9;o++)r+=p.j.nextChar;if("Apple iOS"!==r)return null;p.j.fastForward(3);const i=p.j.nextChar+p.j.nextChar;return p.j.le="II"===i,g(p.j,c)}(e);const t={};for(const[n,r]of Object.entries(c))this.raw[r]&&(t[n]=this.raw[r]);return t}get MakerApple(){const e=this.dataHash["{MakerApple}"];if(!e)return;const t={};for(const[n,r]of Object.entries(c))e[r]&&(t[n]=e[r]);return t}get Latitude(){if(this.raw.Latitude)return this.raw.Latitude;const e=this.raw.GPSLatitude;return"undefined"===typeof e?null:("S"===this.raw.GPSLatitudeRef?-1:1)*(e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600)}get Longitude(){if(this.raw.Longitude)return this.raw.Longitude;const e=this.raw.GPSLongitude;return"undefined"===typeof e?null:("W"===this.raw.GPSLongitudeRef?-1:1)*(e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600)}get LivePhotosUUID(){return this.MakerNote&&this.MakerNote.LivePhotosUUID||null}get LensModel(){return y(this.raw,"LensModel")}get DateStamp(){return y(this.raw,"DateStamp",null,"GPS")}get TimeStamp(){return y(this.raw,"TimeStamp",null,"GPS")}get DateTimeOriginal(){return y(this.raw,"DateTimeOriginal")}}var O=n(1183),E=n(1182);class I{static read(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"===typeof e&&n&&(console.warn("Cannot zero Exif Orientation in a data stream provided as a string."),n=!1),Object(O.b)(e),0===p.j.length?null:f(p.j)?(t=S(p.j,n),new _(t)):Object(O.a)(p.j)?(t=Object(E.a)(p.j),new _(t)):null}static readAndZeroOrientation(e){return I.read(e,!0)}}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return L})),n.d(t,"f",(function(){return B})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return q})),n.d(t,"c",(function(){return $}));var r=n(1229),i=n(1400),o=n(870),a=n(1260),s=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"icloud.and.arrow.up",svgPath:"M84.7168-13.5742L84.7168-5.71289L107.52-5.71289C122.51-5.71289 131.494-14.7461 131.494-26.5625C131.494-36.4258 125.586-44.5312 116.064-48.3887C116.162-70.166 100.488-85.8887 80.5176-85.8887C67.2852-85.8887 57.8613-78.8086 52.002-70.2637C40.918-73.2422 26.9043-64.6484 26.6602-50.9277C15.625-49.2188 8.74023-40.1855 8.74023-28.6621C8.74023-15.9668 18.2617-5.71289 34.2773-5.71289L55.957-5.71289L55.957-13.5742L34.2285-13.5742C22.6562-13.5742 16.6016-20.2637 16.6016-28.6621C16.6016-37.9883 22.5098-44.9219 32.8613-44.9219C33.5449-44.9219 33.7891-45.3125 33.7891-45.9473C33.7891-60.9375 44.5801-65.0879 54.6387-62.1582C55.2246-61.9629 55.5664-62.0605 55.8594-62.5977C60.5957-71.0449 67.8711-78.0273 80.5176-78.0273C96.5332-78.0273 107.617-65.332 108.447-50.7812C108.594-48.584 108.447-45.9473 108.252-43.6523C108.203-43.0176 108.447-42.627 109.033-42.5293C117.92-40.5762 123.633-35.0098 123.633-26.5625C123.633-19.043 118.164-13.5742 107.471-13.5742ZM70.3613 19.2871C72.4609 19.2871 74.2188 17.5781 74.2188 15.5273L74.2188-30.2734L73.9258-39.3066L77.1973-35.8398L84.6191-28.4668C85.3516-27.7344 86.3281-27.2949 87.2559-27.2949C89.2578-27.2949 90.8203-28.7109 90.8203-30.7129C90.8203-31.7383 90.4297-32.6172 89.6484-33.3008L73.1445-48.7305C72.1191-49.6582 71.3379-50 70.3613-50C69.3359-50 68.5547-49.6582 67.5293-48.7305L51.0254-33.3008C50.2441-32.6172 49.8535-31.7383 49.8535-30.7129C49.8535-28.7109 51.3184-27.2949 53.3691-27.2949C54.2969-27.2949 55.3223-27.7344 56.0547-28.4668L63.4766-35.8398L66.748-39.3066L66.4551-30.2734L66.4551 15.5273C66.4551 17.5781 68.2617 19.2871 70.3613 19.2871Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 109.0341796875",width:122.758056640625,height:109.0341796875,translateX:-8.735942382812482,translateY:89.7470703125,baseline:89.7470703125,capline:19.287109375}}})},c=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"play",svgPath:"M18.3105 6.15234C20.2637 6.15234 21.9238 5.37109 23.877 4.24805L80.8105-28.6621C84.8633-31.0547 86.2793-32.6172 86.2793-35.2051C86.2793-37.793 84.8633-39.3555 80.8105-41.6992L23.877-74.6582C21.9238-75.7812 20.2637-76.5137 18.3105-76.5137C14.6973-76.5137 12.4512-73.7793 12.4512-69.5312L12.4512-0.878906C12.4512 3.36914 14.6973 6.15234 18.3105 6.15234ZM20.8008-3.17383C20.5078-3.17383 20.3125-3.36914 20.3125-3.75977L20.3125-66.6504C20.3125-67.041 20.5078-67.2363 20.8008-67.2363C20.9961-67.2363 21.1914-67.1387 21.3867-66.9922L75.4395-35.7422C75.6836-35.5957 75.8789-35.4492 75.8789-35.2051C75.8789-34.9609 75.6836-34.7656 75.4395-34.668L21.3867-3.36914C21.1914-3.27148 20.9961-3.17383 20.8008-3.17383Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:90.1151000976563,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 84.7685546875 82.7646484375",width:84.7685546875,height:82.7646484375,translateX:-1.5106933593749545,translateY:76.6123046875,baseline:76.6123046875,capline:6.15234375}}})},u=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"magnifyingglass",svgPath:"M11.2305-44.4336C11.2305-22.9492 28.7109-5.46875 50.1953-5.46875C58.6914-5.46875 66.4551-8.20312 72.8516-12.793L96.875 11.2793C97.998 12.4023 99.4629 12.9395 101.025 12.9395C104.346 12.9395 106.641 10.4492 106.641 7.17773C106.641 5.61523 106.055 4.19922 105.029 3.17383L81.1523-20.8496C86.1816-27.3926 89.1602-35.5469 89.1602-44.4336C89.1602-65.918 71.6797-83.3984 50.1953-83.3984C28.7109-83.3984 11.2305-65.918 11.2305-44.4336ZM19.5801-44.4336C19.5801-61.3281 33.3008-75.0488 50.1953-75.0488C67.0898-75.0488 80.8105-61.3281 80.8105-44.4336C80.8105-27.5391 67.0898-13.8184 50.1953-13.8184C33.3008-13.8184 19.5801-27.5391 19.5801-44.4336Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.07503906250008,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 95.4119873046875 96.3388671875",width:95.4119873046875,height:96.3388671875,translateX:-11.229038085937418,translateY:83.3994140625,baseline:83.3994140625,capline:12.939453125}}})},l=n(2259),d=n(2264),p=n(2268),f=n(1215),h=n.n(f),m=n(1227),g=n(2134),v=n(900),y=n(2180),b=n(919),w=n(920);let S=function(e){return e.BUTTON="Button",e.AUTO_DISPLAY="Auto display",e.APP_SWITHCER="App switcher",e.LEARN_MORE="Learn More",e}({});const C={whatsNew:"opened-whats-new",learnMore:"opened-learn-more-link"};function _(e,t,n,r,i){var o;const a={openedMethod:t,whatsNewVersion:null!==n&&void 0!==n?n:x};a.openedFrom=r||"cloudos",i&&(a.openedFeatureId=i);const s=null!==(o=C[e])&&void 0!==o?o:C.whatsNew;b.a.withEventAndLabel("workflow",s,{statCategory:w.a.SESSION,...a}).record(),"whatsNew"===e&&b.a.withEventAndLabel("workflow",C.whatsNew,{statCategory:w.a.USER,__allow_user:!0,...a}).record()}var O=n(2267),E=n(1265),I=n(1247),A=n(1165),T=n(2171),P=n(2155),R=n(884);const k=async()=>{var e,t;const n=T.a;if("true"===Object(A.a)(M))return!0;if(!D[n])return!1;if(null===(e=P.h.value)||void 0===e||!e.details||!Object(R.f)(P.h.value.details))return!1;if(-1===I.a.sharedInstance.displayOrder.map((e=>e.identifier)).indexOf(n))return!1;await y.b.isReady;const r=y.b.getAccountPreferences();if(null!==r&&void 0!==r&&null!==(t=r.seenSplashScreenVersion)&&void 0!==t&&t[n]){var i,o;const e=null!==(i=D[n])&&void 0!==i?i:0;return(null!==(o=null===r||void 0===r?void 0:r.seenSplashScreenVersion[n])&&void 0!==o?o:0)>e}return!0},D={[T.a]:1},M="showSplashScreen";var N=n(911);const x=2,L=new Date("2025-01-01"),j=7776e6,U=[],F=[];let z=!1;const B=()=>{const[e,t]=Object(d.b)();return async function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isAutoDisplaying:!1,color:"rgb(0, 113, 227)",featureLaunchDate:new Date(1970,0,1)};const{authBagId:a,isAutoDisplaying:s,onWhatsNewModalClosed:c,launchReason:u,featureLaunchDate:l}=i;let d="";if(!n||!n.length)return{wasDisplayed:!1,shouldShowButton:!1};if(a){const e=I.a.sharedInstance.getApplicationInfoByAuthBagId(a);e&&(d=e.configuration.identifier)}const p=!1,f=!!a&&await W(a,r,l),h=!f;if(s){if(z||"true"===Object(A.a)("preventAutoDisplaying")||u===E.b.CREATE||u===E.b.ITEMS_OPENED)return a?(g.a.cloudOSApplication.whatsNewDidDisplay(!1,f),{wasDisplayed:!1,shouldShowButton:f}):(null===c||void 0===c||c(),{wasDisplayed:!1,shouldShowButton:p});if(a&&h)return g.a.cloudOSApplication.whatsNewDidDisplay(!1,f),{wasDisplayed:!1,shouldShowButton:f};if(!a)return null===c||void 0===c||c(),{wasDisplayed:!1,shouldShowButton:p};z=!0}return r<=0?a?(g.a.cloudOSApplication.whatsNewDidDisplay(!1,f),{wasDisplayed:!1,shouldShowButton:!1}):Promise.resolve({wasDisplayed:!1,shouldShowButton:!1}):(_("whatsNew",s?S.AUTO_DISPLAY:S.BUTTON,r,d),new Promise((s=>{e(o.createElement(K,{props:{features:n,version:r,options:i,hidePopup:t,showReleaseNotesBlock:p,applicationName:d}}),{variant:"standard new-features",onClose:()=>{if(a){const e=y.b.getPreferences(a);if(e){const t=H(e,r);y.b.setPreferences(a,{...t})}g.a.cloudOSApplication.whatsNewDidDisplay(!0,!1)}else{const e=y.b.getAccountPreferences();if(e){const t=H(e,r);y.b.setAccountPreferences(t)}null===c||void 0===c||c()}s({wasDisplayed:!0,shouldShowButton:!1})}})})))}},K=e=>{let{props:t}=e;const{features:n,version:a,options:d,hidePopup:f,applicationName:g}=t,{appTitle:v,authBagId:y}=d,b=Object(r.d)(),w=o.useRef(null),C=Object(O.a)({scrollContainerRef:w});return o.useLayoutEffect(C,[C,n]),o.createElement("div",{className:h()("whats-new","calendar"===y?"calendar-tint":"","notes3"===y?"notes-tint":"")},o.createElement("div",{className:"feature-content",ref:w},o.createElement("h2",null,v?Object(m.a)("WhatsNew.Modal.Title.InApp",{appTitle:v}):Object(m.a)("WhatsNew.Modal.Title")),o.createElement("div",{className:"feature-list"},n.map(((e,t)=>{let n=function(e){switch(e){case"icloud.and.arrow.up":return s;case"play":return c;case"magnifyingglass":return u;default:return i.a}}(e.symbolName);return o.createElement("article",{className:"feature-block",key:t},o.createElement("div",{className:"feature-symbol"},o.createElement(n,{desiredFontSize:20})),o.createElement("div",{className:"feature-info"},o.createElement("h3",null,e.title),o.createElement("p",null,e.description),e.learnMore&&o.createElement(l.a,{className:"more-info",variant:"push",onActivate:()=>{var t;const n=null===(t=e.learnMore)||void 0===t?void 0:t.url;n&&(_("learnMore",S.LEARN_MORE,a,g,e.featureId),Object(N.a)(n))},ariaHasPopup:!1,ariaLabel:e.learnMore.urlAriaLabel||e.learnMore.urlText},e.learnMore.urlText)))})))),o.createElement(p.a,{mode:b},o.createElement(l.a,{className:"dismiss",variant:"block primary large",onActivate:f},Object(m.a)("WhatsNew.Modal.OK"))))};function H(e,t){const n=v.a.sharedInstance.current.rootDomain;return e.seenWhatsNewVersion||(e.seenWhatsNewVersion={}),"true"===Object(A.a)("resetWhatsNewValuesOnClose")?(e.seenWhatsNewVersion={},{...e}):(e.seenWhatsNewVersion[n]=t,{...e})}async function W(e,t,n){if("true"===Object(A.a)("showAppWhatsNew"))return!0;await y.b.isAppPreferencesReady(e);const r=y.b.getPreferences(e);return!!r&&!!V(r,t)&&(!n||function(e,t){const n=e.getTime();if(!n||isNaN(n))return!0;return(new Date).getTime()<=n+t}(n,j))}async function q(e){if("true"===Object(A.a)("showCloudOSWhatsNew"))return!0;if(await k())return!1;if(e)return V(e,x);{await y.b.isReady;const e=y.b.getAccountPreferences();if(e)return V(e,x)}return!1}function V(e,t){if(t<=0)return!1;if(e.seenWhatsNewVersion){const n=v.a.sharedInstance.current.rootDomain,r=e.seenWhatsNewVersion[n];return!r||r<t}return!0}function $(){return v.a.sharedInstance.isDomainCN?F:U}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return w}));var r=n(915),i=n(913),o=(n(877),n(878)),a=n(926);const s=Object(o.d)();Object(a.a)();class c{static render(e,t){const n=document.createElement("span");e.appendChild(n);const r=document.createElement("span");e.appendChild(r);const i=()=>{this.isDetailsCollapsed?r.textContent=s("CrashReporter.Details.Collapsed"):r.textContent=s("CrashReporter.Details.Open")};i(),e.addEventListener("click",(()=>{this.isDetailsCollapsed=!this.isDetailsCollapsed,i(),t(this.isDetailsCollapsed)}))}}c.isDetailsCollapsed=!0;var u=n(945);function l(e){const t=[];let n,r,i,o,a,s,c,u,l;for(n in e)if(r=e[n],r){for(i="",s=!0,o=0,a=n.length;o<a;o++)c=n.charAt(o),u=c.toUpperCase(),c===u?((0===o||l)&&(s=!1),s&&(i+=" "),l=!0):l=!1,i+=u;t.push(i),t.push(`${r}\n`)}return t.join("\n")}class d{static appendDetailsBase(e){const t=document.createElement("div");t.classList.add("main-content"),e.appendChild(t);const n=document.createElement("div");return n.classList.add("crash-details"),e.appendChild(n),[t,n]}static appendMainContent(e){const t=document.createElement("div");t.classList.add("icon"),e.appendChild(t);const n=document.createElement("div");return n.classList.add("text-container"),e.appendChild(n),n}static appendPrivacyPolicy(e){const t=document.createElement("div");t.classList.add("privacy-info"),t.textContent=s("CrashReporter.Privacy"),e.appendChild(t);const n=document.createElement("a");n.classList.add("privacy-policy"),n.setAttribute("href",Object(u.a)("privacyPolicy")),n.setAttribute("referrerpolicy","noreferrer"),n.setAttribute("target","_blank"),n.textContent=Object(u.a)("privacyPolicy"),e.appendChild(n)}static appendErrorText(e){const t=document.createElement("div");t.classList.add("scrolling-container"),e.appendChild(t);const n=document.createElement("div");n.classList.add("crash-details-message"),n.textContent=l(this.errorReport||{}),t.appendChild(n)}static appendCrashDetails(e){const t=document.createElement("button");t.classList.add("crash-details-toggle");const n=document.createElement("div");n.classList.add("crash-details-message-scroll-view"),n.style.display="none",this.appendErrorText(n);const r=document.createElement("div");r.classList.add("apple-privacy"),c.render(t,(e=>{n.style.display=e?"none":"inherit",e?r.classList.remove("hide"):r.classList.add("hide")})),this.appendPrivacyPolicy(r),e.appendChild(t),e.appendChild(n),e.appendChild(r)}static render(e,t){this.errorReport=t;const[n,r]=this.appendDetailsBase(e),o=this.appendMainContent(n);this.appendCrashDetails(r);const a=document.createElement("div");a.classList.add("message"),a.textContent=s("CrashReporter.Heading",{appName:i.a.localizedAppName}),o.appendChild(a);const c=document.createElement("div");c.classList.add("description"),c.textContent=s("CrashReporter.Title",{appName:i.a.localizedAppName}),o.appendChild(c)}}d.errorReport=void 0;var p=n(2279),f=n(911),h=n(927),m=n(2154);class g{static onSendToApple(){p.a.recordErrorReportWithUserConsent(this.errorReport).finally((()=>{this.close()}))}static onCreateRadar(){const e=i.a.radarComponentID,t=encodeURIComponent(i.a.radarComponentName||"iCloud.com"),n=encodeURIComponent(i.a.radarComponentVersion||"New Bugs"),o=encodeURIComponent(i.a.radarTitle),a=encodeURIComponent(function(e){let t=l(e);return e&&e.requestUUID&&(t+=`\n\n\nSplunk:\nhttps://splunk-qa.icloud.apple.com/en-US/app/search/search?q=search%20index%3Dfeedbackws%20web_appName%3D%22${i.a.appName}%22%20web_request_uuid%3D${e.requestUUID}`),t}(this.errorReport)),s=encodeURIComponent("Serious Bug"),c=encodeURIComponent("I Didn't Try");let u;u=this.primaryInteractionMode===r.a.TOUCH?`tap-to-radar://new?ComponentID=${e}&ComponentName=${t}&ComponentVersion=${n}&Title=${o}&Description=${a}&Classification=${s}&Reproducibility=${c}&AutoDiagnostics=-1`:`rdar://new/problem/componentId=${e}&title=${o}&description=${a}&classification=${s}`,Object(f.a)(u,{target:"_blank",features:[]}),this.close()}static async close(){void 0!==this.root&&(this.root.remove(),this.root=void 0),this.errorReport=void 0,this.shouldReloadOnClose&&(await m.a(400),window.location.reload())}static appendModalBase(e){const t=document.createElement("div");t.classList.add("crash-modal-background");const n=document.createElement("div");n.classList.add("crash-modal-view",e===r.a.TOUCH?"primary-interaction-mode-touch":"primary-interaction-mode-mouse");const i=document.createElement("div");i.classList.add("main-container"),n.appendChild(i);const o=document.createElement("div");return o.classList.add("button-container"),n.appendChild(o),t.appendChild(n),document.body.appendChild(t),[t,i,o]}static appendControls(e){if(i.a.isAppleInternal){const t=document.createElement("button");t.classList.add("other"),t.textContent=s("CrashReporter.CreateRadar"),t.addEventListener("click",(()=>{this.onCreateRadar()})),e.appendChild(t)}const t=document.createElement("div");t.classList.add("spacer"),e.appendChild(t);const n=document.createElement("button");n.classList.add("alternate"),n.textContent=s("CrashReporter.Close"),n.addEventListener("click",(()=>{this.close()})),e.appendChild(n);const r=document.createElement("div");r.classList.add("divider"),e.appendChild(r);const o=document.createElement("button");o.classList.add("primary"),o.textContent=s("CrashReporter.SendToApple"),o.addEventListener("click",(()=>{h.a.sendExceptionToSentry(this.errorReport,!0),this.onSendToApple()})),e.appendChild(o)}static showOnce(e){if(this.errorReport)return;this.errorReport=p.a.createErrorReport(e.error),this.primaryInteractionMode=e.primaryInteractionMode;const[t,n,r]=this.appendModalBase(e.primaryInteractionMode);this.root=t,this.shouldReloadOnClose=e.shouldReloadOnClose,this.appendControls(r),d.render(n,this.errorReport),p.a.recordErrorCatcherWasDisplayed(e.error)}}g.errorReport=void 0,g.root=void 0,g.shouldReloadOnClose=!1,g.primaryInteractionMode=void 0;var v=n(912);const y={configure(e){Object.assign(i.a,e);const{appName:t,environmentInfo:n,buildInfo:r,isSendingStatsEnabled:o,flushInterval:a,serviceUrl:s,sessionID:c,userDSID:u,userAppleId:l}=i.a;p.a.configure({appName:t,environmentInfo:n,hostingAppName:e.hostingAppName,buildInfo:r,flushInterval:a,serviceUrl:s,sessionID:c,userDSID:u,userAppleId:l,location:window.location,userAgent:window.navigator.userAgent,stringifyExceptionContext:w}),o&&v.a.scheduleFlush()},handleError(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.showOnce({error:e,primaryInteractionMode:t,shouldReloadOnClose:n})},InteractionMode:r.a};function b(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function w(e){let t="";try{const n=e&&e.toJSON&&e.toJSON()||e;t=b(n)?""+n:JSON.stringify(n)}catch(n){const r={};for(const t in e)r[t]=S(e,t);t=JSON.stringify(r)}return t}function S(e,t){const n=e[t];if(b(n))return n;let r="";try{const e=n&&n.toJSON&&n.toJSON()||n;r=b(e)?""+e:JSON.stringify(e)}catch(i){try{r=n+" (could not `JSON.stringify()`)"}catch(o){r="(cannot stringify value)"}}return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return _}));var r=n(870),i=n.n(r),o=n(925),a=n(901),s=n(971),c=n(884),u=n(1168),l=["styles"];function d(){return d=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},d.apply(null,arguments)}var p=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,l);return i.a.createElement("svg",d({width:"53",height:"37",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"de8f6b7a3b5f953d184d939fa43a54b8a"},i.a.createElement("stop",{stopColor:"#F6D13D",offset:"0%"}),i.a.createElement("stop",{stopColor:"#FFB030",offset:"100%"}))),i.a.createElement("path",{d:"M41.029 36.434c1.557 0 3.01-.265 4.357-.797a11.197 11.197 0 003.543-2.209 10.269 10.269 0 002.376-3.27c.57-1.241.854-2.576.854-4.006a10.458 10.458 0 00-3.02-7.419c-.964-.98-2.117-1.75-3.458-2.312.011-2.29-.363-4.392-1.122-6.303-.76-1.91-1.82-3.572-3.18-4.985a14.304 14.304 0 00-4.766-3.276c-1.817-.77-3.776-1.156-5.877-1.156-1.819 0-3.475.29-4.97.874a14.101 14.101 0 00-3.988 2.34 16.126 16.126 0 00-2.979 3.28c-1.278-.36-2.541-.412-3.79-.153a8.577 8.577 0 00-3.405 1.526 8.726 8.726 0 00-2.477 2.863c-.63 1.15-.964 2.444-1.004 3.88-1.542.26-2.87.859-3.986 1.798-1.116.939-1.979 2.111-2.59 3.517-.61 1.406-.916 2.948-.916 4.628 0 1.517.313 2.95.938 4.296a11.363 11.363 0 002.608 3.57c1.113 1.033 2.42 1.84 3.923 2.422 1.503.582 3.13.873 4.885.873l28.044.02z",fill:"url(#de8f6b7a3b5f953d184d939fa43a54b8a)",fillRule:"nonzero"}))},f=["styles"];function h(){return h=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},h.apply(null,arguments)}var m=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,f);return i.a.createElement("svg",h({width:"45",height:"44",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"a38f8ea5ef0081171960487a3c34bf52a"},i.a.createElement("stop",{stopColor:"#F6D13D",offset:"0%"}),i.a.createElement("stop",{stopColor:"#FFB030",offset:"100%"}))),i.a.createElement("path",{d:"M16.268 4.133A1.94 1.94 0 0018.2 2.199c0-1.054-.879-1.916-1.933-1.916-1.09 0-1.934.862-1.934 1.916 0 1.072.844 1.934 1.934 1.934zm10.863 3.04a3.29 3.29 0 003.305-3.304c0-1.863-1.46-3.305-3.305-3.305-1.846 0-3.305 1.442-3.305 3.305a3.29 3.29 0 003.305 3.305zm14.344-2.038c.843 0 1.529-.686 1.529-1.547 0-.861-.686-1.565-1.53-1.565-.86 0-1.546.704-1.546 1.565s.685 1.547 1.547 1.547zm-5.08 1.142l-3.288 3.287c-.474.475-.457 1.248 0 1.723.493.475 1.266.492 1.74 0l3.288-3.27c.474-.474.457-1.265 0-1.74-.475-.457-1.266-.474-1.74 0zM28.52 33.26c2.197-.914 2.373-3.13 1.511-5.608 2.32-.052 4.64.141 6.944.58.668.141 1.23-.51 1.248-1.177.017-.686-.545-1.108-1.178-1.23-2.725-.51-5.397-.704-8.104-.563a25.668 25.668 0 00-3.375-4.694l6.03-6.029c.44-.457.457-1.248 0-1.723-.457-.474-1.266-.439-1.723 0l-6.03 6.03c-1.388-1.248-3.04-2.461-4.693-3.358.141-2.69-.052-5.379-.562-8.068-.123-.65-.545-1.195-1.23-1.195-.651.017-1.319.562-1.178 1.265.44 2.285.633 4.606.58 6.944-2.39-.809-4.5-.598-5.467 1.529L.781 39.27c-1.16 2.584 1.248 5.063 3.85 3.973L28.52 33.26zM23.79 12.71c.861 0 1.547-.702 1.547-1.564A1.55 1.55 0 0023.79 9.6c-.844 0-1.564.703-1.564 1.546 0 .862.72 1.565 1.564 1.565zm11.725 8.913c1.564 0 2.812-1.213 2.812-2.777a2.795 2.795 0 00-2.812-2.795c-1.547 0-2.76 1.248-2.76 2.795 0 1.564 1.213 2.777 2.76 2.777zM18.43 26.088c-4.22-4.201-5.924-8.227-4.746-9.387.51-.527 1.564-.474 2.953.088a42.19 42.19 0 01-.457 3.287c-.159.686.527 1.213 1.16 1.23.668 0 1.107-.527 1.23-1.177.14-.703.246-1.406.334-2.092 1.02.65 2.092 1.494 3.2 2.531l-1.196 1.196c-.474.457-.457 1.265 0 1.74.475.457 1.283.475 1.74 0l1.196-1.213a25.478 25.478 0 012.584 3.2 87.57 87.57 0 00-2.11.333c-.632.14-1.177.58-1.16 1.23 0 .651.528 1.337 1.23 1.196 1.09-.21 2.198-.37 3.288-.457.615 1.441.685 2.549.158 3.059-1.178 1.195-5.186-.528-9.404-4.764zm24.644-5.186a1.932 1.932 0 001.934-1.95 1.924 1.924 0 00-1.934-1.917c-1.09 0-1.933.861-1.933 1.916 0 1.09.843 1.951 1.933 1.951zm-.668 9a1.917 1.917 0 001.934-1.933 1.928 1.928 0 00-1.934-1.934 1.928 1.928 0 00-1.933 1.934c0 1.09.861 1.933 1.933 1.933z",fill:"url(#a38f8ea5ef0081171960487a3c34bf52a)",fillRule:"nonzero"}))},g=["styles"];function v(){return v=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},v.apply(null,arguments)}var y=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,g);return i.a.createElement("svg",v({width:"68",height:"33",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"5db735defd54470fd00ca594b78d50b9a"},i.a.createElement("stop",{stopColor:"#F6D13D",offset:"0%"}),i.a.createElement("stop",{stopColor:"#FFB030",offset:"100%"}))),i.a.createElement("path",{d:"M23.334 32.78h21.41c1.64 0 2.775-.267 3.402-.8.626-.534.94-1.257.94-2.171 0-1.114-.355-2.286-1.064-3.516-.709-1.23-1.722-2.382-3.04-3.454-1.319-1.072-2.9-1.943-4.747-2.61-1.845-.668-3.91-1.002-6.196-1.002-2.273 0-4.333.334-6.179 1.002-1.845.667-3.43 1.538-4.755 2.61-1.324 1.072-2.337 2.224-3.04 3.454-.704 1.23-1.055 2.402-1.055 3.516 0 .914.313 1.637.94 2.17.627.534 1.755.8 3.384.8zm10.705-16.594c1.348 0 2.572-.355 3.674-1.064 1.101-.709 1.977-1.661 2.628-2.856.65-1.196.975-2.537.975-4.026 0-1.406-.325-2.7-.975-3.885a7.684 7.684 0 00-2.628-2.83C36.61.822 35.387.471 34.039.471a6.67 6.67 0 00-3.647 1.054 7.73 7.73 0 00-2.646 2.83c-.656 1.184-.978 2.49-.967 3.92 0 1.465.325 2.795.976 3.99.65 1.196 1.523 2.148 2.619 2.857 1.096.71 2.317 1.064 3.665 1.064zM4.104 32.796h12.638c-.504-.702-.788-1.531-.852-2.486-.065-.956.076-1.972.422-3.05.345-1.078.887-2.145 1.625-3.2.739-1.054 1.665-2.039 2.778-2.953-.926-.55-2.004-1.007-3.235-1.37-1.23-.364-2.566-.546-4.007-.546-1.91 0-3.662.311-5.256.932-1.594.621-2.977 1.436-4.149 2.443-1.172 1.008-2.077 2.101-2.715 3.279-.64 1.177-.958 2.329-.958 3.454 0 1.09.27 1.945.808 2.566.54.621 1.506.932 2.9.932zm9.369-16.224c1.183 0 2.253-.307 3.208-.923.955-.615 1.716-1.444 2.285-2.487.568-1.043.852-2.209.852-3.498 0-1.242-.287-2.376-.861-3.401a6.909 6.909 0 00-2.303-2.47 5.74 5.74 0 00-3.181-.932c-1.16 0-2.221.31-3.182.932a6.814 6.814 0 00-2.294 2.478c-.568 1.032-.852 2.168-.852 3.41.011 1.278.298 2.438.86 3.481a6.66 6.66 0 002.277 2.487 5.768 5.768 0 003.19.923zm50.466 16.225c1.395 0 2.362-.31 2.9-.932.54-.62.81-1.476.81-2.566 0-1.125-.32-2.277-.959-3.454-.638-1.178-1.544-2.27-2.715-3.279-1.172-1.007-2.555-1.822-4.149-2.443-1.594-.621-3.346-.932-5.256-.932-1.43 0-2.762.182-3.999.545-1.236.364-2.317.82-3.243 1.371 1.113.914 2.042 1.899 2.786 2.954.744 1.054 1.286 2.12 1.626 3.199.34 1.078.478 2.094.413 3.05-.064.955-.354 1.784-.87 2.487H63.94zM54.57 16.572a5.768 5.768 0 003.19-.923 6.66 6.66 0 002.277-2.487c.563-1.043.85-2.203.861-3.48 0-1.243-.284-2.38-.852-3.41a6.788 6.788 0 00-2.303-2.479 5.754 5.754 0 00-3.173-.932c-1.16 0-2.223.31-3.19.932a6.808 6.808 0 00-2.303 2.47c-.568 1.025-.852 2.159-.852 3.401 0 1.29.284 2.455.852 3.498a6.704 6.704 0 002.294 2.487 5.81 5.81 0 003.2.923z",fill:"url(#5db735defd54470fd00ca594b78d50b9a)",fillRule:"nonzero"}))};const b="invites",w="com.apple.icloud.events",S={...s.a,authBagId:b,applicationName:b,path:b,generation:1,requiredServices:["ckdatabasews"],supportedDomains:[a.e,a.d,a.c,a.f,a.b],supportedFileExtensions:[],allowsUnauthenticatedMode:!0,isPCSRequired:!0,pcsKeyIdentifier:Object(u.a)(b),radarComponentId:1556310,helpUsesAppleSupportSite:!0,pushTopic:{name:`com.apple.icloud-container.${w}`,hash:void 0},cloudKitInfo:{containerIdentifier:w},configuration:null,supportsTile:!1,inAppShareAcceptance:!0,skipLoadingAppPreferences:!0,applicationWillHandleRouteManagement:!0,adpMinimumOSListLocKey:"ADP.SupportedOS.Invites"},C={identifier:b,dataNameLocKey:"Invites.DataName",dataNameTitleCaseLocKey:"Invites.DataNameTitleCase",displayNameLocKey:"Invites.DisplayName",titleNameLocKey:"Invites.TitleName",generations:[S],applicationInfo:S,setApplicationInfoForConfiguration(e){let{user:t}=e;const n={...S};return n.supportsTile=Boolean((null===t||void 0===t?void 0:t.details)&&Object(c.f)(t.details)),n.blockNewContentCreation=!n.supportsTile||(null===t||void 0===t?void 0:t.ageRestricted),n}},_={identifier:b,displayNameLocKey:"Invites.DisplayName",titleNameLocKey:"Invites.TitleName",nameToBeDisplayedLocKey:"Invites.TitleName",mixedTiles:[{title:Object(o.a)("CloudOS.LandingPage.Invites.Tile.A.Title"),description:Object(o.a)("CloudOS.LandingPage.Invites.Tile.A.Description"),contentImageSrc1x:"../ed3ef257cba618f58a99b66e5888dd5f.png",contentImageSrc2x:"../6987f7e3497a0d00e088c5fe44eb901b.png",contentImageSrc3x:"../66b6e29d25acc80fda97e33c56943e63.png",icon:r.createElement(m,{width:60,height:60,"aria-hidden":!0})},{title:Object(o.a)("CloudOS.LandingPage.Invites.Tile.B.Title"),description:Object(o.a)("CloudOS.LandingPage.Invites.Tile.B.Description"),icon:r.createElement(y,{width:75,height:60,"aria-hidden":!0})},{title:Object(o.a)("CloudOS.LandingPage.Invites.Tile.C.Title"),description:Object(o.a)("CloudOS.LandingPage.Invites.Tile.C.Description"),icon:r.createElement(p,{width:60,height:60,"aria-hidden":!0})}],faqs:[{title:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.A.Title"),content:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.A.Content")},{title:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.B.Title"),content:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.B.Content")},{title:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.C.Title"),content:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.C.Content")},{title:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.D.Title"),content:Object(o.a)("CloudOS.LandingPage.Invites.FAQ.D.Content")}],descriptionLocKey:"CloudOS.LandingPage.Invites.Description",learnMoreLinkHref:"https://support.apple.com/guide/apple-invites/1.0/ios/1.0"};S.configuration=C},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(1215),i=n.n(r),o=n(870),a=n.n(o),s=n(2198),c=n(2259),u=n(2262),l=n(922),d=n(925),p=n(889),f=n(2208),h=n(919),m=n(1330),g=n(921),v=["styles"];function y(){return y=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},y.apply(null,arguments)}var b=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,v);return a.a.createElement("svg",y({viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),a.a.createElement("defs",null,a.a.createElement("linearGradient",{x1:"100%",y1:"100%",x2:"50%",y2:"50%",id:"f2f15fa97739d6b8762a5540d983611bb"},a.a.createElement("stop",{stopColor:"#8700FF",offset:"0%"}),a.a.createElement("stop",{stopColor:"#EE00E1",stopOpacity:"0",offset:"100%"})),a.a.createElement("linearGradient",{x1:"0%",y1:"100%",x2:"50%",y2:"50%",id:"f2f15fa97739d6b8762a5540d983611bc"},a.a.createElement("stop",{stopColor:"#E00",offset:"0%"}),a.a.createElement("stop",{stopColor:"#EE00E1",stopOpacity:"0",offset:"100%"})),a.a.createElement("linearGradient",{x1:"100%",y1:"0%",x2:"50%",y2:"50%",id:"f2f15fa97739d6b8762a5540d983611bd"},a.a.createElement("stop",{stopColor:"#00B1EE",offset:"0%"}),a.a.createElement("stop",{stopColor:"#00B1EE",stopOpacity:"0",offset:"100%"})),a.a.createElement("linearGradient",{x1:"-17.876%",y1:"21.021%",x2:"48.935%",y2:"50%",id:"f2f15fa97739d6b8762a5540d983611be"},a.a.createElement("stop",{stopColor:"#FFA456",offset:"0%"}),a.a.createElement("stop",{stopColor:"#FFA456",stopOpacity:"0",offset:"100%"})),a.a.createElement("path",{d:"M89.905 152.381a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.619zm-23.737 2.79a3.81 3.81 0 117.36 1.973 3.81 3.81 0 01-7.36-1.972zm46.799-5.126a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zm-60.58-2.409a3.81 3.81 0 11-3.81 6.598 3.81 3.81 0 013.81-6.598zm28.777-4.373a3.302 3.302 0 11-.804 6.554 3.302 3.302 0 01.804-6.554zm-16.684-1.899a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm36.901 2.383a3.338 3.338 0 11-6.61.93 3.338 3.338 0 016.61-.93zm28.591-4.621a3.81 3.81 0 11-6.598 3.81 3.81 3.81 0 016.598-3.81zm-94.15-.941a3.81 3.81 0 11-5.387 5.387 3.81 3.81 0 015.388-5.387zm52.547-.486a3.023 3.023 0 110 6.047 3.023 3.023 0 010-6.047zm-15.136.077a3.023 3.023 0 11-1.565 5.841 3.023 3.023 0 011.565-5.84zm-24.278-2.592a3.338 3.338 0 11-4.017 5.331 3.338 3.338 0 014.017-5.331zm68.381.883a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm-10.664-.222a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-48.079-1.912a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm22.334-3.47a2.62 2.62 0 11-.639 5.201 2.62 2.62 0 01.639-5.202zm-13.241-1.507a2.65 2.65 0 11-1.985 4.912 2.65 2.65 0 011.985-4.912zm29.286 1.891a2.65 2.65 0 11-5.246.737 2.65 2.65 0 015.246-.737zm23.196-3.668a3.023 3.023 0 11-5.236 3.024 3.023 3.023 0 015.236-3.024zm-74.721-.747a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm98.125-2.255a3.81 3.81 0 11-5.387 5.388 3.81 3.81 0 015.387-5.388zM35.56 125.196a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-13.29-.428a3.81 3.81 0 11-6.599 3.81 3.81 3.81 0 016.599-3.81zm108.491-.249a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-75.396-.468a2.65 2.65 0 11-3.188 4.231 2.65 2.65 0 013.188-4.231zm54.271.7a2.65 2.65 0 11-4.877 2.071 2.65 2.65 0 014.877-2.07zm21.327-9.436a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm-86.23.808a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm-10.043-.339a3.023 3.023 0 11-5.236 3.024 3.023 3.023 0 015.236-3.024zm85.6-.197a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm-95.085-3.507a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm115.534-2.19a3.338 3.338 0 11-4.018 5.332 3.338 3.338 0 014.018-5.331zm12.102-3.672a3.81 3.81 0 11-3.81 6.599 3.81 3.81 0 013.81-6.599zM12.65 108.301a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zm23.865-2.586a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm91.693-1.738a2.65 2.65 0 11-3.188 4.231 2.65 2.65 0 013.188-4.231zm10.11-2.915a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm-111.262 1.653a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-8.458-5.983a3.338 3.338 0 11-6.611.93 3.338 3.338 0 016.61-.93zm127.992-3.554a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm-115.319.356a2.65 2.65 0 11-5.246.737 2.65 2.65 0 015.246-.737zm101.581-2.821a2.65 2.65 0 11-1.984 4.912 2.65 2.65 0 011.984-4.912zm19.627-1.547a3.81 3.81 0 117.36 1.972 3.81 3.81 0 01-7.36-1.972zM3.81 86.096a3.81 3.81 0 110 7.618 3.81 3.81 0 010-7.619zm137.923-.705a3.023 3.023 0 11-1.565 5.84 3.023 3.023 0 011.565-5.84zm-121.694-.3a3.023 3.023 0 110 6.047 3.023 3.023 0 010-6.047zm-6.938-8.368a3.302 3.302 0 11-.805 6.554 3.302 3.302 0 01.805-6.554zm13.807.93a2.62 2.62 0 11-.638 5.202 2.62 2.62 0 01.638-5.202zm120.796-1.946a3.302 3.302 0 11-.805 6.554 3.302 3.302 0 01.805-6.554zm-13.968 1.14a2.62 2.62 0 11-.638 5.201 2.62 2.62 0 01.638-5.201zm7.24-7.477a3.023 3.023 0 110 6.046 3.023 3.023 0 010-6.046zm-120.128-.094a3.023 3.023 0 11-1.565 5.841 3.023 3.023 0 011.565-5.84zm135.342-2.99a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.62zM.162 68.862a3.81 3.81 0 117.36 1.972 3.81 3.81 0 01-7.36-1.972zm29.28-5.072a2.65 2.65 0 11-1.984 4.913 2.65 2.65 0 011.985-4.913zm104.844 1.355a2.65 2.65 0 11-5.247.737 2.65 2.65 0 015.247-.737zm-117.992-5.89a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm132.102 1.708a3.338 3.338 0 11-6.61.929 3.338 3.338 0 016.61-.93zm-8.594-4.735a3.023 3.023 0 11-5.84 1.565 3.023 3.023 0 015.84-1.565zm-114.08-2.019a3.023 3.023 0 11-3.024 5.237 3.023 3.023 0 013.024-5.237zm9.569-3.001a2.65 2.65 0 11-3.189 4.23 2.65 2.65 0 013.189-4.23zm93.381.423a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm26.039-1.904a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zM10.969 47.183a3.81 3.81 0 11-3.809 6.599 3.81 3.81 0 013.81-6.599zm12.693-3.781a3.338 3.338 0 11-4.017 5.331 3.338 3.338 0 014.017-5.331zm117.661.533a3.338 3.338 0 11-6.145 2.608 3.338 3.338 0 016.145-2.608zm-9.76-2.235a3.023 3.023 0 11-5.237 3.024 3.023 3.023 0 015.237-3.024zm-97.233-.783a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm9.866-.35a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm75.556-.537a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm24.578-8.608a3.81 3.81 0 11-6.599 3.81 3.81 3.81 0 016.599-3.81zm-122.515-.987a3.81 3.81 0 11-5.387 5.388 3.81 3.81 0 015.387-5.388zm33.736 2.159a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm52.583-1.46a2.65 2.65 0 11-3.189 4.231 2.65 2.65 0 013.189-4.231zm-73.251-1.14a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm84.962-.194a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm-73.76.505a3.023 3.023 0 11-5.238 3.024 3.023 3.023 0 015.237-3.024zm83.999-.987a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-61.5-1.487a2.65 2.65 0 11-5.247.738 2.65 2.65 0 015.247-.738zm26.024-2.284a2.65 2.65 0 11-1.984 4.913 2.65 2.65 0 011.984-4.913zm-14.487-1.912a2.62 2.62 0 11-.639 5.201 2.62 2.62 0 01.639-5.201zm25.325-2.297a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm-45.261 1.76a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-10.994-3.15a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm66.254-1.84a3.338 3.338 0 11-4.018 5.332 3.338 3.338 0 014.018-5.331zm14.12-1.68a3.81 3.81 0 11-5.388 5.387 3.81 3.81 0 015.388-5.387zm-40.217.463a3.023 3.023 0 11-1.565 5.84 3.023 3.023 0 011.565-5.84zm-16.701-.13a3.023 3.023 0 110 6.048 3.023 3.023 0 010-6.047zm-36.02.304a3.81 3.81 0 11-6.6 3.81 3.81 3.81 0 016.6-3.81zm28.985-3.118a3.338 3.338 0 11-6.611.93 3.338 3.338 0 016.61-.93zm32.79-2.877a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zM80.149 8.66a3.302 3.302 0 11-.804 6.553 3.302 3.302 0 01.804-6.553zm31.274-2.894a3.81 3.81 0 11-3.81 6.598 3.81 3.81 0 013.81-6.598zm-57.03 2.217a3.81 3.81 0 11-7.359 1.972 3.81 3.81 0 017.36-1.972zM91.139.163a3.81 3.81 0 11-1.972 7.359 3.81 3.81 0 011.972-7.36zM70.095 0a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.619z",id:"f2f15fa97739d6b8762a5540d983611ba"})),a.a.createElement("use",{fill:"#FFF",xlinkHref:"#f2f15fa97739d6b8762a5540d983611ba"}),a.a.createElement("use",{fill:"url(#f2f15fa97739d6b8762a5540d983611bb)",xlinkHref:"#f2f15fa97739d6b8762a5540d983611ba"}),a.a.createElement("use",{fill:"url(#f2f15fa97739d6b8762a5540d983611bc)",xlinkHref:"#f2f15fa97739d6b8762a5540d983611ba"}),a.a.createElement("use",{fill:"url(#f2f15fa97739d6b8762a5540d983611bd)",xlinkHref:"#f2f15fa97739d6b8762a5540d983611ba"}),a.a.createElement("use",{fill:"url(#f2f15fa97739d6b8762a5540d983611be)",xlinkHref:"#f2f15fa97739d6b8762a5540d983611ba"}),a.a.createElement("path",{fill:"var(--theme-color-systemBlack)",d:"M80.38 68.181c1.66 0 3.75-1.091 4.999-2.565 1.137-1.346 1.94-3.183 1.94-5.039 0-.255-.02-.51-.057-.71-1.865.073-4.103 1.201-5.427 2.73-1.063 1.164-2.033 3.02-2.033 4.875 0 .29.056.564.075.655.112.018.298.054.503.054zm-5.724 27.713c2.248 0 3.243-1.474 6.044-1.474 2.838 0 3.483 1.438 5.97 1.438 2.47 0 4.11-2.239 5.677-4.44 1.732-2.53 2.469-4.987 2.487-5.115-.147-.036-4.865-1.947-4.865-7.28 0-4.622 3.704-6.697 3.926-6.86-2.451-3.477-6.192-3.586-7.224-3.586-2.746 0-4.994 1.656-6.431 1.656-1.53 0-3.52-1.547-5.916-1.547-4.551 0-9.158 3.713-9.158 10.701 0 4.368 1.695 8.973 3.814 11.94 1.806 2.51 3.39 4.567 5.676 4.567z"}))},w=n(2134),S=n(2155),C=n(965),_=n(2248),O=n(2159),E=n(885),I=n(2249),A=n(966),T=n(1466),P=n(2313);const R="data:image/svg+xml;base64, ",k="data:image/svg+xml;base64, ";let D,M;function N(e){var t;const{appName:n,accountName:r,authUIMode:a,enableFirstPartyOAuth:s=!0,pauseBetweenSteps:c=!1,offerSecurityUpgrade:u=!0,skipTrustBrowserStep:l=!1,rememberMe:d=!0,createLink:f=!0,onClickCreateLink:h,onDemand2FAToken:m,onDemand2FAOnError:g="error",onNativeTakeOverDidStart:v,onNativeTakeOverDidCancel:y,onAuthReady:b,onAuthSuccess:w,onAuthFailure:C,onAuthCancel:_,onAuthWidgetDidChangeFlow:N,quickAccessEl:x,colorScheme:L,authWidgetStrings:j,forceCRAuth:U,authStepsToComplete:F,frameClassName:z,hideLogoAndSignInLabel:B=!1}=e,K=o.useRef(`idms-auth-${crypto.randomUUID()}`).current,H=e.containerId||K,{signInLabel:W=Object(P.a)("AuthService.AuthWidget.SignInLabel"),signInLabelDescription:q}=j||{},V=o.useRef(!1),$=o.useRef(void 0),[G,Z]=o.useState(!1),Q=Object(O.useSignal)(Object(A.a)().userSignal),[Y,J]=o.useState(void 0),X=Y===p.e.HSA2&&!(null!==Q&&void 0!==Q&&Q.isLITEAccount)&&!(null!==Q&&void 0!==Q&&null!==(t=Q.details)&&void 0!==t&&null!==(t=t.beneficiaryInfo)&&void 0!==t&&t.isBeneficiary),ee=o.useRef(!1),te=o.useRef(void 0);return o.useEffect((()=>{ee.current||G||(ee.current=!0,Object(T.a)().then((e=>Object(E.a)(e.appleIdIDMSJsUrl,(()=>{var e;return!(null===(e=window.AppleID)||void 0===e||!e.service.auth)}),3,4e4))).then((e=>{e.ok?Z(!0):(Object(S.c)().processAuthenticationError(p.b.TIMEOUT_LOADING_AUTH_WIDGET_JS,{}),null===C||void 0===C||C("script-load-failure"),Z(!1))})).catch((()=>{Object(S.c)().processAuthenticationError(p.b.TIMEOUT_LOADING_AUTH_WIDGET_JS,{}),null===C||void 0===C||C("script-load-failure"),Z(!1)})))}),[C,G]),o.useEffect((()=>()=>{D=new Promise((e=>{M=()=>e(void 0)})),(async e=>{$.current&&await $.current,Object(A.a)().onAuthTeardown(H),null===(e=window.AppleID)||void 0===e||null===(e=e.service.auth)||void 0===e||e.teardown(H)})()}),[H]),o.useEffect((()=>{$.current=(async()=>{if(!G||V.current)return;const{appleIdUrl:e,locale:t,trustTokens:i}=await Object(T.a)(),o=I.b(e),S=o.searchParams.get("widgetKey")||o.searchParams.get("client_id"),O="dark"===L||!L&&window.matchMedia("(prefers-color-scheme: dark)").matches?p.f.DARK_STANDARD:p.f.DARK,E={signInVersion:"2",iframeId:n?`${n}-`+crypto.randomUUID():crypto.randomUUID(),features:{rememberMe:d,createLink:f,iForgotLink:!0,pause2FA:c,skipTrustBrowserStep:l,enableFirstPartyOAuth:s,enableOIDCGrantCode:!0,offerSecurityUpgrade:u,enableSwpAuth:!0},...S&&{serviceKey:S},defaultAccountNameAutoFillDomain:"",trustTokens:i,rememberMeLabel:p.d.KEEP_ME_SIGNED_IN,theme:{autoThemeAdjust:!L,defaultTheme:O,transparentRepairBackground:!0},waitAnimation:"false",waitAnimationOnAuthComplete:!1,containerId:H,serviceURL:o.origin+"/appleauth",locale:t,authUIMode:a,skVersion:"7",...m&&{onDemand2FAToken:m,onDemand2FAOnError:g},...!B&&{signInLabel:W,signInLabelOption:{style:"label",headerTag:"h2"},signInLabelDescription:q,logo:{src:"light"===L?R:k,width:"160px"}},callbacks:{onNativeTakeOverDidStart:()=>{Object(A.a)().onNativeTakeOverDidStart(),null===v||void 0===v||v()},onNativeTakeOverDidComplete:()=>{Object(A.a)().onNativeTakeOverDidComplete()},onNativeTakeOverError:e=>{Object(A.a)().onNativeTakeOverError(e)},onNativeTakeOverDidCancel:()=>{Object(A.a)().onNativeTakeOverDidCancel(),null===y||void 0===y||y()},onAuthReady:()=>{te.current&&(clearTimeout(te.current),te.current=void 0),Object(A.a)().onAuthReady(),null===b||void 0===b||b()},onAuthSuccess:e=>{Object(A.a)().onAuthSuccess(e),null===w||void 0===w||w(e)},onAuthFailure:(e,t)=>{te.current&&(clearTimeout(te.current),te.current=void 0),Object(A.a)().onAuthFailure(e,t),null===C||void 0===C||C("auth-failure")},onPasswordAuthDone:(e,t)=>{Object(A.a)().onPasswordAuthDone(e,t)},onRepairStart:()=>{Object(A.a)().onRepairStart()},onAuthTeardown:()=>{var e;null===(e=M)||void 0===e||e()},onAuthCancel:()=>{Object(A.a)().onAuthCancel(),null===_||void 0===_||_()},onAuthWidgetWillChangeFlow:e=>{Object(A.a)().onAuthWidgetWillChangeFlow(e)},onAuthWidgetDidChangeFlow:e=>{J(e.to),Object(A.a)().onAuthWidgetDidChangeFlow(e),null===N||void 0===N||N(e)},...!!h&&{onClickCreateLink:h}},...!!r&&{accountName:r},...!!U&&{forceCRAuth:U}};D&&await D,D=void 0,await Object(A.a)().initAuthWidget(H,{pauseBetweenSteps:c,authStepsToComplete:F,isOnDemand2FA:void 0!==m}),te.current=setTimeout((()=>{null===C||void 0===C||C("init-timeout"),te.current=void 0}),45e3),window.AppleID.service.auth.init(E),V.current=!0})()}),[n,r,u,c,l,v,y,b,a,s,G,Q,L,w,C,_,d,W,q,f,h,N,H,U,F,B,m,g]),G?o.createElement("div",{className:"auth-widget-parent-container"},o.createElement("div",{id:H,className:i()("auth-widget-container",z)}),X&&x?o.createElement("div",{className:"quick-access"},x):null):null}function x(e){const{appleId:t,authStepsToComplete:n,ignoreForceCRAuth:r,pauseBetweenSteps:a,appName:v,isInAppLogin:y,isReauthenticateUser:O,signInLabel:E,offerSecurityUpgrade:I,skipTrustBrowserStep:T,enableFirstPartyOAuth:P=!0,isLoginViewActive:R=!0}=e,k=!(!t||r),[D,M]=o.useState(!1),x=Object(m.b)(),L=Object(m.d)(),[j,U]=o.useState(!0),[F,z]=o.useState(!1),B=!!(null===(K=_.c.value)||void 0===K?void 0:K.accountCreateEnabled)&&!O&&(!x||!L);var K;const H=v||E||Object(d.a)("CloudOS.Authentication.SignIn.AppleIdView.Title"),[W,q]=o.useState(!0),[V,$]=o.useState(!1),[G,Z]=o.useState(!1),[Q,Y]=o.useState(!1),[J,X]=o.useState(!1),[ee,te]=o.useState(!0),ne=o.useRef(`idms-auth-${Object(l.a)()}`).current,[re,ie]=o.useState("apple-id-frame-value"),[oe,ae]=o.useState(!0),se=o.useRef(),ce=o.useRef();function ue(){var e;null===(e=se.current)||void 0===e||e.forEach((e=>clearTimeout(e))),se.current=[],ce.current=void 0}o.useEffect((()=>()=>{ue()}),[]),R&&(Object(A.a)().currentAuthContainerId=ne),o.useEffect((()=>(Object(A.a)().registerAppleIdControllerDelegate(ne,{appleIdWillStart:(e,t)=>{t&&(y?(te(!0),X(!1),$(!0)):(te(!1),X(!0)))},appleIdModeWillChange:(e,t)=>{O&&(ue(),$(!1)),t!==p.e.SIGNIN&&(U(!1),q(!1),t===p.e.SA?ie("sa-no-sign-in-label"):ie("no-sign-in-label")),t===p.e.INTERSTITIAL&&ae(!1),t===p.e.FEDERATED&&(ae(!0),q(!0))},appleIdStepDidComplete:(e,t,n,r,i,o,s)=>{1===o&&(2===s&&(q(!1),ie("no-sign-in-label"),$(!0),n!==p.a.HSA2||a||(se.current=[],ce.current=new h.a("cloudOSAuth.2FAScreenSpinner.finished").time(),se.current.push(window.setTimeout((()=>{se.current&&f.b.sharedInstance.recordStat(new h.a("cloudOSAuth.2FAScreenSpinner.5secondsPassed",{authWidgetFrameId:_.b}))}),5e3)),se.current.push(window.setTimeout((()=>{se.current&&f.b.sharedInstance.recordStat(new h.a("cloudOSAuth.2FAScreenSpinner.error",{authWidgetFrameId:_.b}))}),1e4)))),"SA"===n&&Y(!0)),o>=2&&($(!0),Y(!0),Z(!0))},appleIdDidFinish:(e,t,n,r,i,o,a,s,c)=>{ue(),r.dsMethod!==p.c.NATIVE_TAKE_OVER_LOGIN&&$(!0),z(!0)},appleIdModeDidChange:(e,t)=>{var n,r,i;ce.current&&(ce.current.end(),f.b.sharedInstance.recordPerfStat(new g.a(ce.current.statName,{duration:ce.current.duration,authWidgetFrameId:_.b}))),ue(),$(!1);const o=null===(n=S.h.value)||void 0===n?void 0:n.isLITEAccount,a=null!==(r=null===(i=S.h.value)||void 0===i||null===(i=i.details)||void 0===i||null===(i=i.beneficiaryInfo)||void 0===i?void 0:i.isBeneficiary)&&void 0!==r&&r;t!==p.e.HSA2||o||a||y||O?M(!1):M(!0)},appleIdRepairDidStart:e=>{ie("repair-id-frame"),ae(!1),M(!1)},appleIdDidCancel:(e,t,n,r)=>{ue(),ie("apple-id-frame"),t===p.e.REPAIR&&window.location.reload(),n&&(te(!0),$(!1),r&&f.b.sharedInstance.recordStat(new h.a("onNativeTakeOverError",r))),$(!1),X(!1)},appleIdError:e=>{}}),()=>{Object(A.a)().unregisterAppleIdControllerDelegate(ne)})),[y,O,a,ne]);const[le,de]=o.useState(p.e.SIGNIN),pe=o.useCallback((e=>{null!==e&&void 0!==e&&e.to&&de(e.to)}),[]),fe=o.useMemo((()=>!t),[t]),he=o.useCallback((()=>{w.a.cloudOSApplication.createAccount((()=>te(!0))),te(!1)}),[]);return o.createElement("div",{className:i()("home-login-component",{"has-visible-quick-access":D&&!y,"in-app-login":y})},o.createElement("div",{className:i()("parent-container",{"has-visible-quick-access":!J&&D&&!y,"is-visible":!J&&ee,"is-icon-not-visible":!J&&!oe})},y&&!Q||O?o.createElement("div",{className:"header-view"},o.createElement(c.a,{onActivate:()=>{le!==p.e.REPAIR&&le!==p.e.HSA2||window.location.reload(),Object(C.b)()},className:"cancel-button"},Object(d.a)("CloudOS.Button.Cancel.Title"))):null,J&&o.createElement(u.a,{description:Object(d.a)("CloudOS.Spinner.Loading")}),V&&o.createElement("div",{className:"authwidget-spinner"},o.createElement(u.a,{description:Object(d.a)("CloudOS.Spinner.Loading")})),!F&&o.createElement("div",{className:"body-view",style:{visibility:V?"hidden":"visible",height:G?"0px":"auto"}},ee&&oe&&o.createElement("div",{className:"widget-icon-text"},o.createElement(b,{className:"icon",draggable:"false","aria-hidden":!0}),W&&o.createElement("div",{className:"sign-in-label"},H)),o.createElement("div",{className:i()("auth-widget",{"initial-auth-state":j})},o.createElement(N,{containerId:ne,frameClassName:re,accountName:t,pauseBetweenSteps:a,offerSecurityUpgrade:I,enableFirstPartyOAuth:P,skipTrustBrowserStep:T,createLink:B,onClickCreateLink:he,hideLogoAndSignInLabel:!0,forceCRAuth:k,rememberMe:fe,authStepsToComplete:n,onAuthWidgetDidChangeFlow:pe})),!y&&D&&o.createElement("div",{className:"quick-access-container"},o.createElement(s.a,null)))),e.legalFooter&&o.createElement(e.legalFooter,null))}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return v}));var i=new Uint8Array(16);function o(){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)}for(var a=/^(?:[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,s=function(e){return"string"===typeof e&&a.test(e)},c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));var l=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();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 function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(r)},d=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n},p=n(1035);const f=[];for(let y=0;y<256;++y)f.push((y+256).toString(16).substr(1));function h(){return l().toUpperCase()}function m(){return l(void 0,new Uint8Array(16))}function g(e){try{return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toUpperCase()}(e)}catch(t){return Object(p.a)(t)}}function v(e){try{return d(e)}catch(t){return Object(p.a)(t)}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(878),i=function(){function e(e,t,n,r,i){this.name=e,this.spec=t,this.raw=n,this.getEnv=r,this.fallbackFor=i,this.nullValue=t.type()}return Object.defineProperty(e.prototype,"configurable",{get:function(){var e=this.spec.configurable;return"object"===typeof e&&(e=e[this.getEnv()]),null!==e&&void 0!==e&&e},enumerable:!1,configurable:!0}),e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return String(this.value)},Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype.sanityCheck=function(e){var t,n,r=this.spec,i=r.oneOf,o=r.matches,a=r.type;if(n=a===Boolean?"false"!==e&&"0"!==e&&!!e:a(e),i){if(!0===e)return null!==(t=i[1])&&void 0!==t?t:i[0];if(i.includes(n))return n}else if(("number"!==typeof n||isFinite(n))&&(!o||o.test(n+"")))return n},e.prototype.getValue=function(){var e,t=this.raw;if(this.configurable&&void 0!==t){var n=this.sanityCheck(t);if(void 0!==n)return n}var r=null===(e=this.fallbackFor)||void 0===e?void 0:e.call(this,this.name);return void 0!==r&&(r=this.sanityCheck(r)),null!==r&&void 0!==r?r:this.defaultValue},Object.defineProperty(e.prototype,"defaultValue",{get:function(){var e=this.spec.value;"object"===typeof e&&(e=e[this.getEnv()]);var t=this.nullValue;if(typeof e===typeof t)return e;var n=this.spec.oneOf;return n?n[0]:t},enumerable:!1,configurable:!0}),e}();function o(e){void 0===e&&(e=null!==top&&void 0!==top?top:window);var t=function(e){try{return e.location.search}catch(t){return""}}(e),n=function(e){try{return e.location.hash.replace(/^#/,"")}catch(t){return""}}(e);return n?t+"&"+n:t}function a(e){var t=e.indexOf("=");return-1===t?[decodeURIComponent(e),!0]:[decodeURIComponent(e.slice(0,t)),decodeURIComponent(e.slice(1+t))]}function s(e){return void 0===e&&(e=o()),Object.fromEntries((void 0===(t=e)&&(t=o()),(t?t.replace(/^[?&]+/,"").split("&"):[]).map(a)));var t}var c=function(){return c=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},c.apply(this,arguments)},u=function(){function e(e,t,n,r,a){var c=this;void 0===t&&(t=o),void 0===a&&(a=s),this.specs=e,this.getInput=t,this.parseInput=a;var u=a(this._lastInput=t()),l=Object.entries(e).map((function(e){var t=e[0],o=e[1];return[t,new i(t,o,u[t],n,r)]})),d=this.flags=Object.fromEntries(l);this.values=Object.defineProperties({},Object.fromEntries(l.map((function(e){var t=e[0];return[t,{enumerable:!0,get:function(){return c.updateFlags(),d[t].getValue()}}]}))))}return Object.defineProperty(e.prototype,"lastInput",{get:function(){return this._lastInput},enumerable:!1,configurable:!0}),e.prototype.updateFlags=function(e){if(void 0===e&&(e=this.getInput()),e===this.lastInput)return!1;var t=this.parseInput(this._lastInput=e);for(var n in this.flags)this.flags[n].raw=t[n];return!0},e.prototype.computeFlags=function(e){var t=this;return void 0===e&&(e=Object.keys(this.flags)),e.reduce((function(e,n){var r;return c(c({},e),((r={})[n]=t.values[n],r))}),{})},e.prototype.isOverridden=function(e){return this.values[e]!==this.flags[e].defaultValue},e}(),l=n(923);const d=[[/beta\.icloud\./i,"beta"],[/carry\.icloud\./i,"carry"],[/future\.icloud\./i,"future"],[/sprinkles\.icloud\./i,"sprinkles"]];function p(){return function(e,t){const[,n]=t.find((t=>{let[n]=t;return n.test(e)}))||[void 0,"prod"];return n}(location.hostname,d)}var f=n(2250),h=n(901);const m=u,g=/sprin/.test(window.location.hostname),v=/future/.test(window.location.hostname),y=new m({env:{configurable:!0,type:String,oneOf:["prod","beta","carry","future","sprinkles"],value:p()},flags:{configurable:!1,type:Boolean},failRequests:{configurable:g,type:String,value:void 0},failSchemas:{configurable:g,type:String,value:void 0},locale:{configurable:!0,type:String,oneOf:l.b,value:Object(r.b)()},...f.a.sharedInstance.current===h.g&&{RTL:{configurable:!0,type:Boolean}},logResponses:{configurable:g,type:String,value:void 0},logTimeouts:{configurable:!1,type:Boolean,value:!1},measureBlock:{configurable:!1,type:String,value:!1},websocket:{configurable:!0,type:Boolean,value:!0},sharedWorker:{configurable:!0,type:Boolean,value:!0},logPush:{configurable:!0,type:Boolean,value:!1},pushEnv:{configurable:!0,type:String,oneOf:[void 0,"prod","carry","sandbox","qa2"],value:void 0},sb:{configurable:!0,type:Boolean,value:!0},sbenv:{configurable:!0,type:String},sblog:{configurable:v,type:String,oneOf:["off","error","warn","info","debug","all"],value:"off"}},o,p),b=y.values;y.isOverridden.bind(y)},function(e,t,n){"use strict";n.d(t,"a",(function(){return K}));var r=function(e,t){this.group=e,this.id=t},i=Symbol(),o=n(1012),a=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=Symbol("<Device>"),c=function(){},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.applyDeviceInfoPolicy=function(e){return s},t}(c),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.applyDeviceInfoPolicy=function(e){return e._unsafeValue},t}(c),d=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a(t,e),t.prototype.applyDeviceInfoPolicy=function(e){return e.piiClass===o.a.UserAgent||e.piiClass===o.a.Performance?e._unsafeValue:s}}(c),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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),p=Symbol("<ID>"),f=Symbol("<Info>"),h=Symbol("<AnonID>"),m=function(){},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.applyIDPolicy=function(e){return e.piiClass===o.a.AnonymizedID?h:e.piiClass===o.a.SessionInfo||e.piiClass===o.a.UserInfo?f:p},t}(m),v=function(e){function t(t){var n=e.call(this)||this;return n.preserveGroups=new Set(t),n}return d(t,e),t.prototype.applyIDPolicy=function(e,t){return e.piiClass===o.a.AnonymizedID||this.preserveGroups.has(e.piiGroup)?e._unsafeValue:e.piiClass===o.a.SessionInfo||e.piiClass===o.a.UserInfo?f:new r(e.piiGroup,e.piiGroup.idFor(t(e._unsafeValue)))},t}(m),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.applyIDPolicy=function(e){return e._unsafeValue},t}(m),b=n(1017),w=n(2217),S=n(1014),C=Object(w.c)("    ").constant(),_=Object(w.c)("{").constant(),O=Object(w.c)("}").constant(),E=Object(w.c)("[").constant(),I=Object(w.c)("]").constant(),A=Object(w.c)(",").constant(),T=Object(w.c)("\n").constant(),P=Object(w.c)(": ").constant(),R=Object(w.c)("... more ...").constant(),k=Object(w.c)(null).constant(),D=Object(w.c)(void 0).constant(),M=Object(w.c)(null);function N(e,t,n,r,i){var o,a;if(void 0===n&&(n=M),void 0===r&&(r=0),void 0===i&&(i=5),r>=i&&e.push(R),"string"===typeof t)e.push(n.withValue(t));else if(null===t)e.push(k);else if(void 0===t)e.push(D);else if(Object(b.a)(t))for(var s=0,c=t.logString.fragments;s<c.length;s++){var u=c[s];N(e,u._unsafeValue,u,r)}else if(Object(w.b)(t))N(e,t._unsafeValue,t,r);else if(t&&"object"===typeof t)if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)for(var l=function(e,t,n){void 0===t&&(t="    "),void 0===n&&(n=4096);for(var r=new Uint8Array(e instanceof ArrayBuffer?e:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)),i=Math.min(n,r.length),o="",a=0;a<i;a++){a%32===0&&i>8?o+="\n"+t:a%8===0&&i>0?o+=" ":0!==a&&(o+=":");var s=r[a],c=15&s;o+=L[(240&s)>>4]+L[c]}return i<r.length&&(o+="\n"+t+"... and "+(r.length-i)+" more"),o}(t,"".padEnd(4*(r+1)," ")).split("\n"),d=0,p=0,f=l;p<f.length;p++){var h=f[p];d>0&&e.push(T),e.push(n.withValue(h)),d++}else if(Array.isArray(t))if(1===t.length)e.push(E),N(e,t[0],n,r),e.push(I);else{for(e.push(E),e.push(T),d=0;d<t.length;d++){var m=t[d];x(e,r+1),N(e,m,n,r+1),d<t.length-1&&(e.push(A),e.push(T))}e.push(T),x(e,r),e.push(I)}else{var g=null!==(o=t[S.a])&&void 0!==o?o:{},v=Object.entries(t);if(0===v.length)e.push(_),e.push(O);else{for(e.push(_),e.push(T),d=0;d<v.length;d++){var y=v[d],C=y[0],j=y[1];x(e,r+1),N(e,null!==(a=g[C])&&void 0!==a?a:C,n,r+1),e.push(P),N(e,j,n,r+1),d<v.length-1&&(e.push(A),e.push(T))}e.push(T),x(e,r),e.push(O)}}else e.push(n.withValue(t))}function x(e,t){for(var n=0;n<t;n++)e.push(C)}var L="0123456789ABCDEF".split(""),j=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=Symbol("<Private>"),F=function(){},z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyOtherPolicy=function(e){return U},t}(F),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyOtherPolicy=function(e){return e._unsafeValue},t}(F),K=function(){function e(e,t,n,r,i){void 0===r&&(r=H),void 0===i&&(i=N),this.idPolicy=e,this.deviceInfoPolicy=t,this.otherPolicy=n,this.stringifier=r,this.logifier=i}return e.preserveIDs=function(t){return new e(new v(t),new l,new z)},e.prototype.apply=function(e){switch(e.piiClass){case o.a.NotPII:case o.a.Const:return e._unsafeValue;case o.a.AnonymizedID:case o.a.UserID:case o.a.UserInfo:case o.a.SessionID:case o.a.SessionInfo:return this.idPolicy.applyIDPolicy(e,this.stringifier);case o.a.DeviceInfo:case o.a.UserAgent:case o.a.Performance:return this.deviceInfoPolicy.applyDeviceInfoPolicy(e,this.stringifier);case o.a.Personal:case o.a.Sensitive:default:return this.otherPolicy.applyOtherPolicy(e,this.stringifier)}},e.prototype.unbox=function(e){var t=this.apply(e);return"symbol"===typeof t||t instanceof r?i:e._unsafeValue},e.prototype.stringifyShallow=function(e){var t,n=this.apply(e);return"symbol"===typeof n?null!==(t=n.description)&&void 0!==t?t:"<Private>":n instanceof r?n.group.groupLabel+"-"+n.id:this.stringifier(n)},e.prototype.stringify=function(e){var t=this,n=[];return this.logifier(n,e),n.map((function(e){return t.stringifyShallow(e)})).join("")},e.none=new e(new g,new u,new z),e.replaceIDs=new e(new v([]),new u,new z),e.replaceIDsAndPreserveDeviceInfo=new e(new v([]),new l,new z),e.preserveAllIDs=new e(new y,new l,new z),e.DEBUG_INTERNAL_ALL=new e(new y,new l,new B),e}();function H(e){var t=typeof e;return"bigint"===t||"number"===t||"string"===t||"boolean"===t||"symbol"===t||"undefined"===t?""+e:JSON.stringify(e,(function(e,t){return"bigint"===typeof t?""+t:t}))}w.a.defaultPolicy=K.none},function(e,t,n){"use strict";n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return D})),n.d(t,"c",(function(){return M}));var r=n(870),i=n(1212),o=n(2257),a=n(2196),s=n(2224),c=n(2258),u=n(1228),l=n(1227),d=n(2328),p=n(1242),f=n(2329),h=n(2319),m=n(2231),g=n(1243);function v(e){let{description:t,errorMessage:n,validationState:r}=e,{labelProps:i,fieldProps:o}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=(0,f.b)(t);let a=(0,f.b)(),s={};return n?(r=r?`${r} ${a}`:a,s={id:a,htmlFor:"label"===o?t:void 0}):r||i||console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility"),{labelProps:s,fieldProps:(0,g.a)({id:t,"aria-label":i,"aria-labelledby":r})}}(e),a=(0,f.c)([Boolean(t),Boolean(n),r]),s=(0,f.c)([Boolean(t),Boolean(n),r]);return o=(0,d.a)(o,{"aria-describedby":[a,s,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:o,descriptionProps:{id:a},errorMessageProps:{id:s}}}var y=n(2178);const b=new WeakMap,w=new WeakMap,S=new WeakMap;var C=n(1245),_=n(1230);let O=Math.round(1e10*Math.random()),E=0;var I=n(1244);function A(){return A=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},A.apply(null,arguments)}const T=r.createContext(void 0);function P(e){const{children:t}=e,n=function(e){let t=(0,r.useMemo)((()=>e.name||`radio-group-${O}-${++E}`),[e.name]),[n,i]=(0,_.a)(e.value,e.defaultValue,e.onChange),[o,a]=(0,r.useState)(null);return{name:t,selectedValue:n,setSelectedValue:t=>{e.isReadOnly||e.isDisabled||i(t)},lastFocusedValue:o,setLastFocusedValue:a,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||null}}(e),{radioGroupProps:i}=function(e,t){let{name:n,validationState:r,isReadOnly:i,isRequired:o,isDisabled:a,orientation:s="vertical"}=e,{direction:c}=(0,y.b)(),{labelProps:u,fieldProps:l,descriptionProps:g,errorMessageProps:C}=v({...e,labelElementType:"span"});w.set(t,g.id),S.set(t,C.id);let _=(0,p.a)(e,{labelable:!0}),{focusWithinProps:O}=(0,m.f)({onBlurWithin(){t.selectedValue||t.setLastFocusedValue(null)}}),E=(0,f.b)(n);return b.set(t,E),{radioGroupProps:(0,d.a)(_,{role:"radiogroup",onKeyDown:e=>{let n;switch(e.key){case"ArrowRight":n="rtl"===c&&"vertical"!==s?"prev":"next";break;case"ArrowLeft":n="rtl"===c&&"vertical"!==s?"next":"prev";break;case"ArrowDown":n="next";break;case"ArrowUp":n="prev";break;default:return}e.preventDefault();let r,i=(0,h.c)(e.currentTarget,{from:e.target});"next"===n?(r=i.nextNode(),r||(i.currentNode=e.currentTarget,r=i.firstChild())):(r=i.previousNode(),r||(i.currentNode=e.currentTarget,r=i.lastChild())),r&&(r.focus(),t.setSelectedValue(r.value))},"aria-invalid":"invalid"===r||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":i||void 0,"aria-required":o||void 0,"aria-disabled":a||void 0,"aria-orientation":s,...l,...O}),labelProps:u,descriptionProps:g,errorMessageProps:C}}({...e,orientation:"horizontal"},n);return r.createElement("div",A({},i,{className:"background-color-picker"}),r.createElement("div",{className:"buttons-container"},r.createElement(T.Provider,{value:n},t)))}function R(e){const t=(()=>{const e=r.useContext(T);if(void 0===e)throw new Error("useColorPickerState must be used within a ColorPickerContext.Provider");return e})(),n=r.useRef(null),{inputProps:i}=function(e,t,n){let{value:r,children:i,"aria-label":o,"aria-labelledby":a}=e;const s=e.isDisabled||t.isDisabled;null!=i||null!=o||null!=a||console.warn("If you do not provide children, you must specify an aria-label for accessibility");let c=t.selectedValue===r,{pressProps:u,isPressed:l}=(0,m.l)({isDisabled:s}),{focusableProps:f}=(0,h.f)((0,d.a)(e,{onFocus:()=>t.setLastFocusedValue(r)}),n),g=(0,d.a)(u,f),v=(0,p.a)(e,{labelable:!0}),y=t.lastFocusedValue===r||null==t.lastFocusedValue?0:-1;return s&&(y=void 0),{inputProps:(0,d.a)(v,{...g,type:"radio",name:b.get(t),tabIndex:y,disabled:s,checked:c,value:r,onChange:e=>{e.stopPropagation(),t.setSelectedValue(r)},"aria-describedby":["invalid"===t.validationState?S.get(t):null,w.get(t)].filter(Boolean).join(" ")||void 0}),isDisabled:s,isSelected:c,isPressed:l}}(e,t,n),{focusProps:o,isFocusVisible:a}=Object(h.e)(),s=crypto.randomUUID();let c="";return a?c="focused":t.selectedValue===e.value&&(c="selected"),r.createElement("label",{className:`select-color ${c}`,htmlFor:s},r.createElement("div",{className:"color-picker-dot",style:{backgroundColor:`var(--theme-color-system${Object(I.a)(D[e.value])})`}}),r.createElement(C.a,null,r.createElement("input",A({id:s},Object(d.a)(i,o),{ref:n}))))}const k=["default","purple","green","red","orange","yellow"],D={default:"blue",yellow:"yellow",purple:"purple",green:"green",red:"red",orange:"orange"};function M(e){let{buttonRef:t,onClose:n,selectedBackgroundColor:d,changeBackgroundColor:p}=e;const f=r.useRef(null),h=r.useRef(null),m=Object(i.c)(),g=r.useRef(!1);function v(e){(function(e){return-1!==Object.keys(D).indexOf(e)})(e)&&p(e)}const[y,b]=Object(o.i)(r.createElement(a.b,{className:`background-color-picker-popover ${m}`,ref:f,positioner:Object(s.b)({...s.c,sidePreference:[s.a.bottom,s.a.bottomLeft,s.a.bottomRight]}),anchorRef:t},r.createElement(N,{selectedBackgroundColor:d,onChange:v})),{onClose:()=>{g.current?g.current=!1:n()},initialFocus:"[type=radio]:checked"}),w=r.useCallback((()=>{g.current=!0,b()}),[b]),[S,C]=Object(c.a)(r.createElement("div",{ref:h},r.createElement(N,{selectedBackgroundColor:d,onChange:v})),{title:Object(l.a)("BackgroundColorPicker.Title"),includeCloseButton:!0,paneType:o.d.Dismissible,onClose:()=>{g.current?g.current=!1:n()},className:"background-color-picker-compact"}),_=r.useCallback((()=>{g.current=!0,C()}),[C]),[O]=Object(u.a)([y,w],f,[S,_],h);return O}const N=e=>{let{selectedBackgroundColor:t,onChange:n}=e;const i=k.map((e=>r.createElement(R,{key:e,value:e,"aria-label":Object(l.a)("BackgroundColorPicker.VoiceOver.Button.Label",{colorName:Object(l.a)(`BackgroundColorPicker.Color.Name.${e}`)})})));return r.createElement(P,{"aria-label":Object(l.a)("BackgroundColorPicker.Title"),value:t,onChange:n},i)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return C})),n.d(t,"a",(function(){return O}));var r=n(870),i=n.n(r),o=n(1234);class a{getStringForLocale(e,t){let n=this.strings[t];n||(n=function(e,t,n="en-US"){if(t[e])return t[e];let r=function(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}(t,this.strings,this.defaultLocale),this.strings[t]=n);let r=n[e];if(!r)throw new Error(`Could not find intl message ${e} in ${t} locale`);return r}constructor(e,t="en-US"){this.strings={...e},this.defaultLocale=t}}const s=new Map,c=new Map;class u{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"===typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"===typeof r?r():r;let i=this.locale+":"+n,o=s.get(i);return o||(o=new Intl.PluralRules(this.locale,{type:n}),s.set(i,o)),r=t[o.select(e)]||t.other,"function"===typeof r?r():r}number(e){let t=c.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),c.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"===typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}n(1241),new Map,new Map;new Map,new Map;let l=!1;try{l="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch(E){}let d=!1;try{d="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch(I){}new RegExp("^.*\\(.*\\).*$"),new Map,new Set(["decimal","fraction","integer","minusSign","plusSign","group"]);const p=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),f=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function h(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize().script;return p.has(t)}let t=e.split("-")[0];return f.has(t)}function m(){let e="undefined"!==typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:h(e)?"rtl":"ltr"}}let g=m(),v=new Set;function y(){g=m();for(let e of v)e(g)}const b=i.a.createContext(null);function w(){let e=function(){let e=(0,o.a)(),[t,n]=(0,r.useState)(g);return(0,r.useEffect)((()=>(0===v.size&&window.addEventListener("languagechange",y),v.add(n),()=>{v.delete(n),0===v.size&&window.removeEventListener("languagechange",y)})),[]),e?{locale:"en-US",direction:"ltr"}:t}();return(0,r.useContext)(b)||e}const S=new WeakMap;function C(e){let{locale:t}=w(),n=(0,r.useMemo)((()=>function(e){let t=S.get(e);return t||(t=new a(e),S.set(e,t)),t}(e)),[e]);return(0,r.useMemo)((()=>new u(t,n)),[t,n])}let _=new Map;function O(e){let{locale:t}=w(),n=t+(e?Object.entries(e).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(_.has(n))return _.get(n);let r=new Intl.Collator(t,e);return _.set(n,r),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));class r{constructor(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];this.claimProcessed=!1,this.zoneName=e,this.applicationName=t,this.creationDate=n,this.supportedExtensions=r,this.supportedTypes=i,this.icons=o}get iconMap(){const e={sizes:[],urls:[]},t={sizes:[],urls:[]},n=this.icons;n.sort(((e,t)=>e.size-t.size));for(const r of n)switch(r.type){case"OSX":e.sizes.push(r.size),e.urls.push(r.url);break;case"IOS":t.sizes.push(r.size),t.urls.push(r.url)}return{...e.sizes.length>0&&{OSX:e},...t.sizes.length>0&&{IOS:t}}}}class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.uniformTypeIdentifier=e,this.iconPlatforms=t,this.supportedExtensions=n,this.parentNodes=r,this.isAppleType=i,this.importedDeclarations=o}}const o={"com.adobe.pdf":{supportedExtensions:["pdf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["ios","mac"]},"com.adobe.edn":{supportedExtensions:["edn"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.etd":{supportedExtensions:["etd"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.xfdf":{supportedExtensions:["xfdf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.adobe.fdf":{supportedExtensions:["fdf"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.postscript":{supportedExtensions:["ps"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.adobe.encapsulated-postscript":{supportedExtensions:["eps"],parentUTIs:["com.adobe.postscript"],iconPlatforms:["mac"]},"com.compuserve.gif":{supportedExtensions:["gif"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.microsoft.bmp":{supportedExtensions:["bmp"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.microsoft.ico":{supportedExtensions:["ico"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.adobe.raw-image":{supportedExtensions:["dng"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.crw-raw-image":{supportedExtensions:["crw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.cr2-raw-image":{supportedExtensions:["cr2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.tif-raw-image":{parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.epson.raw-image":{supportedExtensions:["erf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.fuji.raw-image":{supportedExtensions:["raf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.hasselblad.fff-raw-image":{supportedExtensions:["fff"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.hasselblad.3fr-raw-image":{supportedExtensions:["3fr"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.kodak.raw-image":{supportedExtensions:["dcr"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.konicaminolta.raw-image":{supportedExtensions:["mrw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leafamerica.raw-image":{supportedExtensions:["mos"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.pwl-raw-image":{supportedExtensions:["pwl"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.nikon.raw-image":{supportedExtensions:["nef"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.nikon.nrw-raw-image":{supportedExtensions:["nrw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.olympus.raw-image":{supportedExtensions:["orf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.panasonic.raw-image":{supportedExtensions:["raw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.panasonic.rw2-raw-image":{supportedExtensions:["rw2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.raw-image":{supportedExtensions:["raw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.rwl-raw-image":{supportedExtensions:["rwl"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.pentax.raw-image":{supportedExtensions:["pef"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.raw-image":{supportedExtensions:["srf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.arw-raw-image":{supportedExtensions:["arw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.sr2-raw-image":{supportedExtensions:["sr2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.olympus.sr-raw-image":{supportedExtensions:["orf"],parentUTIs:["com.olympus.raw-image"],iconPlatforms:["mac"]},"com.olympus.or-raw-image":{supportedExtensions:["orf"],parentUTIs:["com.olympus.raw-image"],iconPlatforms:["mac"]},"com.samsung.raw-image":{supportedExtensions:["srw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"org.openoffice.text":{supportedExtensions:["sxw","sdw"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.openoffice.text-template":{supportedExtensions:["stw"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text":{supportedExtensions:["odt"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-template":{supportedExtensions:["ott"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.openoffice.graphics":{supportedExtensions:["sxd","sda"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.openoffice.graphics-template":{supportedExtensions:["std"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.graphics":{supportedExtensions:["odg"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.graphics-template":{supportedExtensions:["otg"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.openoffice.presentation":{supportedExtensions:["sxi","sdd","sdp"],parentUTIs:["public.data","public.content","public.presentation"],iconPlatforms:["mac"]},"org.openoffice.presentation-template":{supportedExtensions:["sti"],parentUTIs:["public.data","public.content","public.presentation"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.presentation":{supportedExtensions:["odp"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.presentation"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.presentation-template":{supportedExtensions:["otp"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.presentation"],iconPlatforms:["mac"]},"org.openoffice.spreadsheet":{supportedExtensions:["sxc","sdc"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"org.openoffice.spreadsheet-template":{supportedExtensions:["stc"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.spreadsheet":{supportedExtensions:["ods"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.spreadsheet-template":{supportedExtensions:["ots"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.chart":{supportedExtensions:["odc"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.chart-template":{supportedExtensions:["otc"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.image":{supportedExtensions:["odi"],parentUTIs:["org.oasis-open.opendocument","public.image"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.image-template":{supportedExtensions:["oti"],parentUTIs:["org.oasis-open.opendocument","public.image"],iconPlatforms:["mac"]},"org.openoffice.formula":{supportedExtensions:["sxm","smf"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.formula":{supportedExtensions:["odf"],parentUTIs:["org.oasis-open.opendocument","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.formula-template":{supportedExtensions:["otf"],parentUTIs:["org.oasis-open.opendocument","public.content"],iconPlatforms:["mac"]},"org.openoffice.text-master":{supportedExtensions:["sxg"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-master":{supportedExtensions:["odm"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-web":{supportedExtensions:["oth"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.database":{supportedExtensions:["odb"],parentUTIs:["public.data","public.content","public.database"],iconPlatforms:["mac"]},"com.microsoft.word.wordml":{supportedExtensions:["xml"],parentUTIs:["public.xml","public.composite-content"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.document":{supportedExtensions:["docx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content"],iconPlatforms:["mac","web"]},"org.openxmlformats.wordprocessingml.document.macroenabled":{supportedExtensions:["docm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.template":{supportedExtensions:["dotx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.template.macroenabled":{supportedExtensions:["dotm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.sheet":{supportedExtensions:["xlsx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet"],iconPlatforms:["mac","web"]},"org.openxmlformats.spreadsheetml.sheet.macroenabled":{supportedExtensions:["xlsm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"com.microsoft.excel.sheet.binary.macroenabled":{supportedExtensions:["xlsb"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.template":{supportedExtensions:["xltx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.template.macroenabled":{supportedExtensions:["xltm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.presentation":{supportedExtensions:["pptx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac","web"]},"org.openxmlformats.presentationml.presentation.macroenabled":{supportedExtensions:["pptm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.slideshow":{supportedExtensions:["ppsx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.slideshow.macroenabled":{supportedExtensions:["ppsm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.template":{supportedExtensions:["potx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.template.macroenabled":{supportedExtensions:["potm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"com.microsoft.word.doc":{supportedExtensions:["doc"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["web","ios","mac"]},"com.microsoft.word.dot":{supportedExtensions:["dot"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.microsoft.excel.xls":{supportedExtensions:["xls"],parentUTIs:["public.data","public.composite-content","public.spreadsheet"],iconPlatforms:["web","ios","mac"]},"com.microsoft.excel.xlt":{supportedExtensions:["xlt"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"com.microsoft.excel.xlw":{supportedExtensions:["xlw"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"com.microsoft.excel.xla":{supportedExtensions:["xla"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.microsoft.powerpoint.ppt":{supportedExtensions:["ppt"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["web","ios","mac"]},"com.microsoft.powerpoint.pot":{supportedExtensions:["pot"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["mac"]},"com.microsoft.powerpoint.pps":{supportedExtensions:["pps"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["mac"]},"com.apple.keynote.key":{parentUTIs:["com.apple.package","public.presentation"],iconPlatforms:["mac"]},"com.apple.keynote.kth":{parentUTIs:["com.apple.package","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.key":{supportedExtensions:["key"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.key"],iconPlatforms:["mac","web"]},"com.apple.iWork.Keynote.key-tef":{supportedExtensions:["key-tef"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.key"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.sffkey":{supportedExtensions:["key"],parentUTIs:["public.zip-archive","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.kth":{supportedExtensions:["kth"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.kth"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.sffkth":{supportedExtensions:["kth"],parentUTIs:["public.zip-archive","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.pages":{supportedExtensions:["pages"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac","web"]},"com.apple.iWork.Pages.pages-tef":{supportedExtensions:["pages-tef"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.sffpages":{supportedExtensions:["pages"],parentUTIs:["public.zip-archive","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.template":{supportedExtensions:["template"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.sfftemplate":{supportedExtensions:["template"],parentUTIs:["public.zip-archive","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.numbers":{supportedExtensions:["numbers"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac","web"]},"com.apple.iWork.Numbers.numbers-tef":{supportedExtensions:["numbers-tef"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.sffnumbers":{supportedExtensions:["numbers"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.template":{supportedExtensions:["nmbtemplate"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.sfftemplate":{supportedExtensions:["nmbtemplate"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.garageband.project":{supportedExtensions:["band","gbProj"],parentUTIs:["com.apple.package","public.audiovisual-content"],iconPlatforms:["mac"]},"com.adobe.photoshop-image":{supportedExtensions:["psd"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.adobe.illustrator.ai-image":{supportedExtensions:["ai"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.truevision.tga-image":{supportedExtensions:["tga"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.sgi.sgi-image":{supportedExtensions:["sgi"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.ilm.openexr-image":{supportedExtensions:["exr"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.kodak.flashpix-image":{supportedExtensions:["fpx"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.j2.jfx-fax":{supportedExtensions:["jfx"],parentUTIs:["public.fax"],iconPlatforms:["mac"]},"com.j2.efx-fax":{supportedExtensions:["efx"],parentUTIs:["public.fax"],iconPlatforms:["mac"]},"com.digidesign.sd2-audio":{supportedExtensions:["sd2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.microsoft.waveform-audio":{supportedExtensions:["wav","wave","bwf"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.microsoft.advanced-systems-format":{supportedExtensions:["asf"],parentUTIs:["public.audiovisual-content"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wm":{supportedExtensions:["wm"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmv":{supportedExtensions:["wmv"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmp":{supportedExtensions:["wmp"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wma":{supportedExtensions:["wma"],parentUTIs:["public.audio","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.advanced-stream-redirector":{supportedExtensions:["asx"],parentUTIs:["public.audiovisual-content","public.xml"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmx":{supportedExtensions:["wmx"],parentUTIs:["public.movie","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wvx":{supportedExtensions:["wvx"],parentUTIs:["public.movie","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wax":{supportedExtensions:["wax"],parentUTIs:["public.audio","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.real.realmedia":{supportedExtensions:["rm"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.real.realmedia-vbr":{supportedExtensions:["rmvb"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.real.realaudio":{supportedExtensions:["ram","ra"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.real.smil":{supportedExtensions:["smil","smi","sml"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.soundblaster.soundfont":{supportedExtensions:["sf2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.avid.open-media-framework":{supportedExtensions:["omf"],parentUTIs:["public.audiovisual-content"],iconPlatforms:["mac"]},"com.allume.stuffit-archive":{parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sitx":{supportedExtensions:["sitx"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sidx":{supportedExtensions:["sidx"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sit":{supportedExtensions:["sit","sea"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.adobe.flash.video":{supportedExtensions:["flv","f4v","f4p","f4a","f4b"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"org.khronos.collada.digital-asset-exchange":{supportedExtensions:["dae"],parentUTIs:["public.xml","public.audiovisual-content","public.3d-content"],iconPlatforms:["mac"]},"com.apple.iMovieLibrary":{supportedExtensions:["imovielibrary"],parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"com.apple.iMovieTheater":{supportedExtensions:["theater"],parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"public.item":{iconPlatforms:["mac","web"]},"public.data":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.directory":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.content":{iconPlatforms:["mac"]},"public.composite-content":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"public.executable":{iconPlatforms:["mac"]},"public.unix-executable":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.application":{parentUTIs:["public.executable"],iconPlatforms:["mac"]},"public.archive":{iconPlatforms:["mac"]},"public.bookmark":{iconPlatforms:["mac"]},"public.database":{iconPlatforms:["mac"]},"public.presentation":{parentUTIs:["public.composite-content"],iconPlatforms:["mac"]},"public.spreadsheet":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"com.apple.iCloud":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.3d-content":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"public.alembic":{supportedExtensions:["abc"],parentUTIs:["public.3d-content","public.data"],iconPlatforms:["mac"]},"public.message":{iconPlatforms:["mac"]},"public.email-message":{parentUTIs:["public.message"],iconPlatforms:["mac"]},"public.to-do-item":{iconPlatforms:["mac"]},"public.calendar-event":{iconPlatforms:["mac"]},"com.apple.ical.vcs":{supportedExtensions:["vcs","vcal"],parentUTIs:["public.text","public.item","public.calendar-event"],iconPlatforms:["mac"]},"com.apple.ical.ics":{supportedExtensions:["ics"],parentUTIs:["public.text","public.item","public.calendar-event"],iconPlatforms:["web","ios","mac"]},"public.contact":{iconPlatforms:["mac"]},"public.vcard":{supportedExtensions:["vcf","vcard"],parentUTIs:["public.text","public.contact"],iconPlatforms:["web","ios","mac"]},"public.text":{parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"public.plain-text":{supportedExtensions:["txt","text"],parentUTIs:["public.text"],iconPlatforms:["web","ios","mac"]},"public.utf8-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.utf16-external-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.utf16-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"com.apple.traditional-mac-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.case-insensitive-text":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.shutdownStall":{supportedExtensions:["shutdownStall"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.gpuRestart":{supportedExtensions:["gpuRestart"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.crashreport":{supportedExtensions:["crash"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.hangreport":{supportedExtensions:["hang"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.spinreport":{supportedExtensions:["spin"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.panicreport":{supportedExtensions:["panic"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"public.filename-extension":{parentUTIs:["public.case-insensitive-text"],iconPlatforms:["mac"]},"public.mime-type":{parentUTIs:["public.case-insensitive-text"],iconPlatforms:["mac"]},"com.apple.ostype":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.nspboard-type":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.device-model-code":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.pasteboard.promised-file-url":{iconPlatforms:["mac"]},"com.apple.pasteboard.promised-file-content-type":{iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.color":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.sound":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.character-formatting":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.paragraph-formatting":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.multiple-text-selection":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.find-panel-search-options":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.resolvable":{iconPlatforms:["mac"]},"public.symlink":{parentUTIs:["public.item","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.mount-point":{parentUTIs:["public.item","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.bookmark":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.alias-file":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.alias-record":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.icloud-file-fault":{supportedExtensions:["icloud"],parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.finder.clipping":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.finder.textclipping":{supportedExtensions:["textclipping"],parentUTIs:["com.apple.finder.clipping"],iconPlatforms:["mac"]},"com.apple.finder.pictclipping":{supportedExtensions:["pictclipping"],parentUTIs:["com.apple.finder.clipping","public.image"],iconPlatforms:["mac"]},"com.apple.finder.burn-folder":{supportedExtensions:["fpbf"],parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.iconset":{supportedExtensions:["iconset"],parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.finder.smart-folder":{supportedExtensions:["savedSearch"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.object-code":{supportedExtensions:["o"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.mach-o-binary":{parentUTIs:["public.unix-executable"],iconPlatforms:["mac"]},"com.apple.mach-o-object":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-executable":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.x11-mach-o-executable":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-core":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-dylib":{supportedExtensions:["dylib"],parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-bundle":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.pef-binary":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"public.elf-binary":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.microsoft.windows-executable":{supportedExtensions:["exe"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.microsoft.windows-dynamic-link-library":{supportedExtensions:["dll"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.sun.java-class":{supportedExtensions:["class"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.sun.java-archive":{supportedExtensions:["jar"],parentUTIs:["public.zip-archive","public.executable"],iconPlatforms:["mac"]},"com.sun.web-application-archive":{supportedExtensions:["war"],parentUTIs:["com.sun.java-archive"],iconPlatforms:["mac"]},"com.apple.quartz-composer-composition":{supportedExtensions:["qtz"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.bom-archive":{parentUTIs:["public.archive"],iconPlatforms:["mac"]},"public.disk-image":{parentUTIs:["public.archive"],iconPlatforms:["mac"]},"org.gnu.gnu-tar-archive":{supportedExtensions:["gtar"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.tar-archive":{supportedExtensions:["tar"],parentUTIs:["org.gnu.gnu-tar-archive"],iconPlatforms:["mac"]},"org.gnu.gnu-zip-archive":{supportedExtensions:["gz","gzip"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"org.gnu.gnu-zip-tar-archive":{supportedExtensions:["tgz"],parentUTIs:["org.gnu.gnu-zip-archive"],iconPlatforms:["mac"]},"public.bzip2-archive":{supportedExtensions:["bz2","bz"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.tar-bzip2-archive":{supportedExtensions:["tbz2","tbz"],parentUTIs:["public.bzip2-archive"],iconPlatforms:["mac"]},"com.apple.binhex-archive":{supportedExtensions:["hqx"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.macbinary-archive":{supportedExtensions:["bin"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.applesingle-archive":{supportedExtensions:["as"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.uuencoded-archive":{supportedExtensions:["uu"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.z-archive":{supportedExtensions:["z"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.bom-compressed-cpio":{supportedExtensions:["cpgz"],parentUTIs:["public.data","com.apple.bom-archive"],iconPlatforms:["mac"]},"public.cpio-archive":{supportedExtensions:["cpio","pax"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.pkware.zip-archive":{parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.zip-archive":{supportedExtensions:["zip"],parentUTIs:["com.pkware.zip-archive"],iconPlatforms:["ios","mac"]},"com.apple.xar-archive":{supportedExtensions:["xar"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.xip-archive":{supportedExtensions:["xip"],parentUTIs:["com.apple.xar-archive"],iconPlatforms:["mac"]},"com.apple.installer-package-archive":{supportedExtensions:["pkg","mpkg"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.url":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.file-url":{parentUTIs:["public.url"],iconPlatforms:["mac"]},"public.url-name":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.internet-location":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.web-internet-location":{supportedExtensions:["webloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.mail-internet-location":{supportedExtensions:["mailloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.afp-internet-location":{supportedExtensions:["afploc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.file-internet-location":{supportedExtensions:["fileloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.ftp-internet-location":{supportedExtensions:["ftploc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.news-internet-location":{supportedExtensions:["newsloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.generic-internet-location":{supportedExtensions:["inetloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.microsoft.internet-shortcut":{supportedExtensions:["url"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.itunes.store-url":{supportedExtensions:["itms"],parentUTIs:["public.url"],iconPlatforms:["mac"]},"public.delimited-values-text":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"public.comma-separated-values-text":{supportedExtensions:["csv"],parentUTIs:["public.delimited-values-text"],iconPlatforms:["web","ios","mac"]},"public.tab-separated-values-text":{supportedExtensions:["tsv"],parentUTIs:["public.delimited-values-text"],iconPlatforms:["mac"]},"public.utf8-tab-separated-values-text":{parentUTIs:["public.tab-separated-values-text","public.utf8-plain-text"],iconPlatforms:["mac"]},"public.rtf":{supportedExtensions:["rtf"],parentUTIs:["public.text"],iconPlatforms:["web","ios","mac"]},"public.html":{supportedExtensions:["html","htm","shtml","shtm"],parentUTIs:["public.text"],iconPlatforms:["ios","mac"]},"public.xml":{supportedExtensions:["xml"],parentUTIs:["public.text"],iconPlatforms:["mac"]},"public.xhtml":{supportedExtensions:["xhtml","xhtm","xht"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.rss":{supportedExtensions:["rss"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.xfd":{supportedExtensions:["xfd"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.patch-file":{supportedExtensions:["patch","diff"],parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.json":{supportedExtensions:["json"],parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.property-list":{supportedExtensions:["plist"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.xml-property-list":{supportedExtensions:["plist"],parentUTIs:["public.xml","com.apple.property-list"],iconPlatforms:["mac"]},"com.apple.binary-property-list":{supportedExtensions:["plist"],parentUTIs:["com.apple.property-list"],iconPlatforms:["mac"]},"com.apple.ascii-property-list":{supportedExtensions:["plist"],parentUTIs:["public.text","com.apple.property-list"],iconPlatforms:["mac"]},"public.source-code":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.source-code.preprocessed":{parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-source":{supportedExtensions:["c"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-source.preprocessed":{supportedExtensions:["i"],parentUTIs:["public.c-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.objective-c-source":{supportedExtensions:["m"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.objective-c-source.preprocessed":{supportedExtensions:["mi"],parentUTIs:["public.objective-c-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.c-plus-plus-source":{supportedExtensions:["cp","cpp","c++","cc","cxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-source.preprocessed":{supportedExtensions:["ii"],parentUTIs:["public.c-plus-plus-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.objective-c-plus-plus-source":{supportedExtensions:["mm"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.objective-c-plus-plus-source.preprocessed":{supportedExtensions:["mii"],parentUTIs:["public.objective-c-plus-plus-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.c-header":{supportedExtensions:["h"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.precompiled-c-header":{supportedExtensions:["pch"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-header":{supportedExtensions:["hh","hp","hpp","hxx","h++"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-inline-header":{supportedExtensions:["inl"],parentUTIs:["public.c-plus-plus-header"],iconPlatforms:["mac"]},"public.precompiled-c-plus-plus-header":{supportedExtensions:["pch++"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.sun.java-source":{supportedExtensions:["java","jav"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.script":{parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.assembly-source":{supportedExtensions:["s"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.apple.rez-source":{supportedExtensions:["r"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.lex-source":{supportedExtensions:["l","lm","lmm","lpp","lxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.yacc-source":{supportedExtensions:["y","ym","ymm","ypp","yxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.mig-source":{supportedExtensions:["defs","mig"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.apple.symbol-export":{supportedExtensions:["exp"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.fortran-source":{supportedExtensions:["f","for"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.fortran-77-source":{supportedExtensions:["f77"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.fortran-90-source":{supportedExtensions:["f90"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.fortran-95-source":{supportedExtensions:["f95"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.pascal-source":{supportedExtensions:["pas"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.ada-source":{supportedExtensions:["ada","adb","ads"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.dylan-source":{supportedExtensions:["dlyan","lid"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.netscape.javascript-source":{supportedExtensions:["js","jscript","javascript"],parentUTIs:["public.script","public.executable"],iconPlatforms:["mac"]},"public.shell-script":{supportedExtensions:["sh"],parentUTIs:["public.script"],iconPlatforms:["mac"]},"public.bash-script":{supportedExtensions:["bash"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.csh-script":{supportedExtensions:["csh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.ksh-script":{supportedExtensions:["ksh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.tcsh-script":{supportedExtensions:["tcsh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.zsh-script":{supportedExtensions:["zsh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.perl-script":{supportedExtensions:["pl","pm"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.python-script":{supportedExtensions:["py"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.ruby-script":{supportedExtensions:["rb","rbw"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.php-script":{supportedExtensions:["php","php3","php4","ph3","ph4","phtml"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"com.sun.java-web-start":{supportedExtensions:["jnlp"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.image":{parentUTIs:["public.data","public.content"],iconPlatforms:["web","ios","mac"]},"public.fax":{parentUTIs:["public.image","public.message"],iconPlatforms:["mac"]},"public.camera-raw-image":{parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.jpeg":{supportedExtensions:["jpeg","jpg","jpe"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.jpeg-2000":{supportedExtensions:["jp2","jpf","jpx","j2k","j2c"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.tiff":{supportedExtensions:["tiff","tif"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.pict":{supportedExtensions:["pict","pct","pic"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.macpaint-image":{supportedExtensions:["pntg"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.png":{supportedExtensions:["png"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.svg-image":{supportedExtensions:["svg","svgz"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.quicktime-image":{supportedExtensions:["qtif","qti"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.icns":{supportedExtensions:["icns"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.xbitmap-image":{supportedExtensions:["xbm"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.mpo-image":{supportedExtensions:["mpo"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"ca.mcgill.mni.bic.mnc":{supportedExtensions:["mnc","minc"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"org.nema.dicom":{supportedExtensions:["dcm"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"gov.nih.nifti-1":{supportedExtensions:["nii"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.audiovisual-content":{parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"public.movie":{parentUTIs:["public.audiovisual-content"],iconPlatforms:["web","ios","mac"]},"public.video":{parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.audio":{parentUTIs:["public.audiovisual-content"],iconPlatforms:["web","ios","mac"]},"com.apple.quicktime-movie":{supportedExtensions:["mov","qt"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg":{supportedExtensions:["mpg","mpeg","mpe","m75","m15"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg-2-video":{supportedExtensions:["m2v"],parentUTIs:["public.video"],iconPlatforms:["mac"]},"public.mpeg-4":{supportedExtensions:["mp4","mpg4"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.apple.m4v-video":{supportedExtensions:["m4v"],parentUTIs:["public.mpeg-4"],iconPlatforms:["mac"]},"com.apple.protected-mpeg-4-video":{parentUTIs:["com.apple.m4v-video"],iconPlatforms:["mac"]},"public.dv-movie":{supportedExtensions:["dv","dif"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.avi":{supportedExtensions:["avi","vfw"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.3gpp":{supportedExtensions:["3gp","3gpp","sdv"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.3gpp2":{supportedExtensions:["3g2","3gp2"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.flc-animation":{supportedExtensions:["flc","fli","cel"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg-2-transport-stream":{supportedExtensions:["ts"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.audiovisual-content-collection":{iconPlatforms:["mac"]},"public.avchd-collection":{supportedExtensions:["avchd"],parentUTIs:["com.apple.package","public.audiovisual-content-collection"],iconPlatforms:["mac"]},"com.apple.audio-unit-preset":{supportedExtensions:["aupreset"],parentUTIs:["com.apple.xml-property-list"],iconPlatforms:["mac"]},"public.mp2":{supportedExtensions:["mp2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.mp3":{supportedExtensions:["mp3","mpga"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.playlist":{iconPlatforms:["mac"]},"public.m3u-playlist":{supportedExtensions:["m3u","m3u8"],parentUTIs:["public.plain-text","public.playlist"],iconPlatforms:["mac"]},"public.pls-playlist":{supportedExtensions:["pls"],parentUTIs:["public.text","public.playlist"],iconPlatforms:["mac"]},"public.mpeg-4-audio":{supportedExtensions:["mp4","mpg4"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.m4a-audio":{supportedExtensions:["m4a"],parentUTIs:["public.mpeg-4-audio"],iconPlatforms:["mac"]},"com.apple.mpeg-4-ringtone":{supportedExtensions:["m4r"],parentUTIs:["public.mpeg-4-audio"],iconPlatforms:["mac"]},"com.apple.protected-mpeg-4-audio":{supportedExtensions:["m4p","m4b"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.ulaw-audio":{supportedExtensions:["ul","ulw","ulaw"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.au-audio":{supportedExtensions:["au","snd"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aifc-audio":{supportedExtensions:["aifc","aiff","aif","cdda"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aiff-audio":{supportedExtensions:["aiff","aif"],parentUTIs:["public.aifc-audio"],iconPlatforms:["mac"]},"public.midi-audio":{supportedExtensions:["midi","mid","smf","kar"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.downloadable-sound":{supportedExtensions:["dls"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.coreaudio-format":{supportedExtensions:["caf"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.ac3-audio":{supportedExtensions:["ac3"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"org.3gpp.adaptive-multi-rate-audio":{supportedExtensions:["amr"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aac-audio":{supportedExtensions:["aac","adts"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.audible.aa-audio":{parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.itunes.audible":{supportedExtensions:["aa","aax"],parentUTIs:["com.audible.aa-audio"],iconPlatforms:["mac"]},"public.font":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.truetype-font":{parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.adobe.postscript-font":{parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.apple.truetype-datafork-suitcase-font":{supportedExtensions:["dfont"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"public.opentype-font":{supportedExtensions:["otf"],parentUTIs:["public.font"],iconPlatforms:["mac"]},"public.opentype-collection-font":{supportedExtensions:["otc"],parentUTIs:["public.opentype-font"],iconPlatforms:["mac"]},"public.truetype-ttf-font":{supportedExtensions:["ttf"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"public.truetype-collection-font":{supportedExtensions:["ttc"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"com.apple.font-suitcase":{supportedExtensions:["suit"],parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.adobe.postscript-lwfn-font":{parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.adobe.postscript-pfb-font":{supportedExtensions:["pfb"],parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.adobe.postscript-pfa-font":{supportedExtensions:["pfa"],parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.apple.applescript.text":{supportedExtensions:["applescript"],parentUTIs:["public.script"],iconPlatforms:["mac"]},"com.apple.applescript.script":{supportedExtensions:["scpt"],parentUTIs:["public.data","public.script"],iconPlatforms:["mac"]},"com.apple.applescript.script-bundle":{supportedExtensions:["scptd"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"public.folder":{parentUTIs:["public.directory"],iconPlatforms:["mac","web"]},"com.apple.drop-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.applications-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.server-applications-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.library-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.servers-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"public.volume":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"public.file-sharepoint":{iconPlatforms:["mac"]},"com.apple.network-neighborhood":{iconPlatforms:["mac"]},"com.apple.dot-mac":{iconPlatforms:["mac"]},"com.apple.package":{parentUTIs:["public.directory"],iconPlatforms:["mac"]},"com.apple.bundle":{parentUTIs:["public.directory"],iconPlatforms:["mac"]},"com.apple.generic-bundle":{supportedExtensions:["bundle"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.systempreference.prefpane":{supportedExtensions:["prefPane"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.systempreference.screen-saver":{supportedExtensions:["saver"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.systempreference.screen-slide-saver":{supportedExtensions:["slideSaver"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.menu-extra":{supportedExtensions:["menu"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.localizable-name-bundle":{parentUTIs:["com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.framework":{supportedExtensions:["framework"],parentUTIs:["com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.application-bundle":{supportedExtensions:["app"],parentUTIs:["com.apple.application","com.apple.localizable-name-bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.application-file":{supportedExtensions:["app"],parentUTIs:["com.apple.application","public.data"],iconPlatforms:["mac"]},"com.apple.deprecated-application-file":{parentUTIs:["com.apple.application-file"],iconPlatforms:["mac"]},"com.apple.flat-rtfd":{parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.installer-package":{supportedExtensions:["pkg"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.installer-distribution-package":{supportedExtensions:["dist","distz"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.installer-meta-package":{supportedExtensions:["mpkg"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.rtfd":{supportedExtensions:["rtfd"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.plugin":{supportedExtensions:["plugin"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.xpc-service":{supportedExtensions:["xpc"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.application-and-system-extension":{supportedExtensions:["appex"],parentUTIs:["com.apple.xpc-service"],iconPlatforms:["mac"]},"com.apple.pluginkit":{supportedExtensions:["pluginkit"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.webkit-plugin":{supportedExtensions:["webplugin"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.metadata-importer":{supportedExtensions:["mdimporter"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.quicklook-generator":{supportedExtensions:["qlgenerator"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.dashboard-widget":{supportedExtensions:["wdgt"],parentUTIs:["com.apple.localizable-name-bundle","com.apple.package"],iconPlatforms:["mac"]},"public.dvd-video-disc":{parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"public.bd-video-disc":{parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"org.openxmlformats.openxml":{parentUTIs:["public.zip-archive"],iconPlatforms:["mac"]},"org.oasis-open.opendocument":{parentUTIs:["public.zip-archive"],iconPlatforms:["mac"]},"com.rsa.pkcs-12":{supportedExtensions:["p12","pfx"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.x509-certificate":{supportedExtensions:["cer","der","crt","pem"],parentUTIs:["public.data"],iconPlatforms:["web","ios","mac"]},"com.apple.webarchive":{supportedExtensions:["webarchive"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"org.idpf.epub-container":{supportedExtensions:["epub"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.localized-pdf-bundle":{supportedExtensions:["lpdf"],parentUTIs:["com.apple.localizable-name-bundle","com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"org.aafassociation.advanced-authoring-format":{supportedExtensions:["aaf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.txn.text-multimedia-data":{parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.colorsync-profile":{supportedExtensions:["icc","icm","pf"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.ink.inktext":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.mobileconfig":{supportedExtensions:["mobileconfig","mobile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.provisionprofile":{supportedExtensions:["provisionprofile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.configprofile":{supportedExtensions:["configprofile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.user":{iconPlatforms:["mac"]},"com.apple.user-group":{iconPlatforms:["mac"]},"com.apple.user-unknown":{iconPlatforms:["mac"]},"com.apple.airdrop":{iconPlatforms:["mac"]},"com.apple.bonjour":{iconPlatforms:["mac"]},"com.apple.notifications":{iconPlatforms:["mac"]},"com.apple.SetupAssistant.internet-signup":{supportedExtensions:["inss"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.mobileprovision":{supportedExtensions:["mobileprovision"],parentUTIs:["public.data"],iconPlatforms:["web","ios","mac"]},"com.apple.pkpass":{supportedExtensions:["pkpass"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.pkpass-data":{supportedExtensions:["pkpass"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.device":{iconPlatforms:["mac"]},"public.display":{iconPlatforms:["mac"]},"public.computer":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"public.generic-pc":{parentUTIs:["public.computer"],iconPlatforms:["mac"]},"com.apple.mac":{parentUTIs:["public.computer"],iconPlatforms:["mac"]},"com.apple.mac.laptop":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.mac.tower":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.powerbook":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-titanium":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-12":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-15":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-17":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.ibook-g4":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.powermac":{parentUTIs:["com.apple.mac.tower"],iconPlatforms:["mac"]},"com.apple.powermac-g4-quicksilver":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.powermac-g4-mirrored-drive-doors":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.powermac-g5":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.xserve":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.xserve-g4":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.xserve-g5":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.xserve-xeon":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.macmini":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.macmini-g4":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-core-duo":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-unibody":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-unibody-no-optical":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.emac":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.imac":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.imac-g4-15":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g4-17":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g4-20":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g5":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g5-isight":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-core-duo":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-core-2-duo":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-iSight-24":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-aluminum-20":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-aluminum-24":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-21":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-21-no-optical":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-27-no-optical":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-15-1":{parentUTIs:["com.apple.imac-unibody-27-no-optical"],iconPlatforms:["mac"]},"com.apple.macbook":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbook-white":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-black":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-unibody":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-unibody-plastic":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbookpro-13-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-13-retina-display":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbookpro-15":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-15-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-15-retina-display":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-17-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-17":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookair":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbookair-11-unibody":{parentUTIs:["com.apple.macbookair"],iconPlatforms:["mac"]},"com.apple.macbookair-13-unibody":{parentUTIs:["com.apple.macbookair"],iconPlatforms:["mac"]},"com.apple.macpro":{parentUTIs:["com.apple.mac.tower"],iconPlatforms:["mac"]},"com.apple.macpro-cylinder":{parentUTIs:["com.apple.macpro"],iconPlatforms:["mac"]},"com.apple.apple-tv":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.iphone":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.iphone-3g":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.iphone-3gs":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.iphone-4":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.ipod":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.ipod-touch":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-2":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-3":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-4":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipad":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.watch":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport-express":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.time-capsule":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport-extreme-tower":{parentUTIs:["com.apple.airport"],iconPlatforms:["mac"]},"com.apple.airport-time-capsule-tower":{parentUTIs:["com.apple.time-capsule"],iconPlatforms:["mac"]},"com.apple.cinema-display":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"com.apple.led-cinema-display-24":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"com.apple.led-cinema-display-27":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"public.storage":{iconPlatforms:["mac"]},"com.apple.storage-external":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"com.apple.storage-internal":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"com.apple.storage-removable":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"public.optical-storage-media":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"public.cd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.cd-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.cd-r-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.cd-rw-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.dvd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.dvd-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-r-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-rw-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-ram-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-plus-r-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-plus-rw-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.hd-dvd-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-r-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-rw-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-ram-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.app-category":{iconPlatforms:["mac"]},"public.app-category.business":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.developer-tools":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.education":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.entertainment":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.finance":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.games":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.action-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.adventure-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.arcade-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.board-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.card-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.casino-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.dice-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.educational-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.family-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.kids-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.music-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.puzzle-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.racing-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.role-playing-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.simulation-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.sports-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.strategy-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.trivia-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.word-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.graphics-design":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.healthcare-fitness":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.lifestyle":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.medical":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.music":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.news":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.photography":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.productivity":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.reference":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.social-networking":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.sports":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.travel":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.utilities":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.video":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.weather":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"com.apple.structured-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"com.apple.structured-text.date":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.address":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.telephone-number":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.transit-information":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.active-webpage":{iconPlatforms:["mac"]},"com.apple.mail.email":{iconPlatforms:["mac"]},"com.apple.disk-image-udif":{iconPlatforms:["mac"]}},a=["public.folder","public.directory"];class s{constructor(){this.bindingTable={},this.claimRecords=[];const e=this.bindingTable;for(const s in o){var t;const r=o[s],a=s.startsWith("com.apple."),c=new i(s,r.iconPlatforms,null!==(t=r.supportedExtensions)&&void 0!==t?t:[],[],a,{});e[s]=c;for(const t of null!==(n=r.supportedExtensions)&&void 0!==n?n:[]){var n;e[t]||(e[t]=e[s])}}for(const i in o){var r,a;const t=o[i];e[i].parentNodes=null!==(r=null===(a=t.parentUTIs)||void 0===a?void 0:a.map((t=>e[t])))&&void 0!==r?r:[]}}getUTINode(e){var t;return null!==(t=this.bindingTable[e])&&void 0!==t?t:null}getPublicItemUTINode(){return this.bindingTable["public.item"]}createClaim(e){this.claimRecords.push(e)}processClaims(){for(const t of this.claimRecords)t.supportedTypes=t.supportedTypes.filter((e=>{var t;return!(null!==(t=this.bindingTable[e])&&void 0!==t&&t.isAppleType)})),t.supportedExtensions=t.supportedExtensions.filter((e=>{var t;return!(null!==(t=this.bindingTable[e])&&void 0!==t&&t.isAppleType)}));for(const t of this.claimRecords)t.supportedTypes=t.supportedTypes.filter((e=>!a.includes(e)));this.claimRecords.sort(((e,t)=>e.creationDate.valueOf()-t.creationDate.valueOf()));const e=this.claimRecords;for(const t of e){const e=t.supportedTypes;for(const o of e){const e=this.bindingTable[o];e?e.importedDeclarations[o]||(e.importedDeclarations[o]=t):this.bindingTable[o]=new i(o,[],[],[this.bindingTable["public.item"]],!1,{"*":t})}const n=[],r=t.supportedExtensions;for(const i of r){const e=this.bindingTable[i];e?e.importedDeclarations[i]||(e.importedDeclarations[i]=t):n.push(i)}if(n.length>0){const e=`__PROXY__.${t.zoneName}`,r=new i(e,[],n,[this.bindingTable["public.item"]],!1,{"*":t});this.bindingTable[e]=r;for(const t of n)this.bindingTable[t]=r}}}}var c=n(900),u=n(2252),l=n(973),d=n(888),p=n(2248);class f{static createSharedInstance(){return new f(c.a.sharedInstance.current)}static get sharedInstance(){let{_internalSharedInstance:e}=this;return e||(e=this._internalSharedInstance=this.createSharedInstance()),e}constructor(e){this.utiRegistry=new s,this.cookieManager=void 0,this.domainProperty=e,this.cookieManager=new u.a(this.domainProperty.cookiesDomain)}get iconUrlPrefix(){return`https://${this.domainProperty.url.hostname}/coretypes/`}async setupThirdPartyAppIcons(){const e=await async function(){const e=await l.a.fetchJSON(Object(p.j)("drivews","retrieveAppLibraries"),{validate:{type:"WireAppLibrariesResponse",schema:m}});return e.ok?e.value:null}();if(e){for(const o of e.items){var t,n,i;o.zone.startsWith("com.apple.")||this.utiRegistry.createClaim(new r(o.zone,o.applicationName,new Date(null!==(t=o.dateCreated)&&void 0!==t?t:0),null!==(n=o.supportedExtensions)&&void 0!==n?n:[],null!==(i=o.supportedTypes)&&void 0!==i?i:[],o.icons))}this.utiRegistry.processClaims()}}fetchIcon(e,t,n){var r;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=null!==(r=this.utiRegistry.getUTINode(e))&&void 0!==r?r:this.utiRegistry.getPublicItemUTINode();if(Array.isArray(i)&&i.length>1){const e=this.getClaimRecordForPlatforms(o,i);if(e)return this.constructThirdPartyIconResponseWithPriority(e,t,n,i);{const e=this.getNodeWithIconForPlatforms(o,i);return this.constructIconResponseWithPriority(e,t,n,i)}}const a=Array.isArray(i)?i[0]:i,s=o.importedDeclarations[e];if(s){const e=(()=>{switch(a){case"ios":return"IOS";case"mac":return"OSX";case"web":return"web";default:return null}})(),r=s.iconMap;if(!e||e in r)return this.constructThirdPartyIconResponse(s,t,n,a);const i=this.getNodeWithIconForPlatforms(o,a?[a]:[]);return this.constructIconResponse(i,t,n,a)}const c=o.importedDeclarations["*"];if(c)return this.constructThirdPartyIconResponse(c,t,n,a);const u=this.getNodeWithIconForPlatforms(o,a?[a]:[]);return this.constructIconResponse(u,t,n,a)}getConformingTypes(e){let t=this.utiRegistry.getUTINode(e);if(!t)return[];const n=[];for(;t.parentNodes[0];)t=t.parentNodes[0],n.push(t.uniformTypeIdentifier);return n}getNodeWithIconForPlatforms(e,t){if(0===t.length)for(;;){if(e.iconPlatforms.length>0)return e;if(0===e.parentNodes.length)return e;e=e.parentNodes[0]}for(;;){for(const n of t)if(e.iconPlatforms.includes(n))return e;if(0===e.parentNodes.length)return this.utiRegistry.getPublicItemUTINode();e=e.parentNodes[0]}}constructIconResponse(e,t,n,r){const i=(()=>{if(r&&e.iconPlatforms.includes(r))return r;if(r)return null;if(1===e.iconPlatforms.length)return e.iconPlatforms[0];const t=["web","ios","mac"];for(const n of t)if(e.iconPlatforms.includes(n))return n;return null})();if(!i)return null;const o=n>=2?2:1,a=h(t,[32,128,256]);return{iconURL:`${this.iconUrlPrefix}${i}/${e.uniformTypeIdentifier}_${a}@${o}x.png`,iconSize:Math.round(a*o/o),isAppIcon:!1,isDefaultIcon:"public.item"===e.uniformTypeIdentifier}}constructIconResponseWithPriority(e,t,n,r){for(const i of r)if(-1!==e.iconPlatforms.indexOf(i))return this.constructIconResponse(e,t,n,i);return null}constructThirdPartyIconResponse(e,t,n,r){const i=(()=>{switch(r){case"ios":return"IOS";case"mac":return"OSX";default:return null}})(),o=e.iconMap,a=i&&o[i]?i:r?null:o.IOS?"IOS":o.OSX?"OSX":null;if(!a)return null;const s=o[a];if(!s)return null;const c=s.sizes,u=h(t*n,c),l=c.indexOf(u);let d=s.urls[l];return d+="&validateToken="+this.getValidateToken(),{iconURL:d,iconSize:Math.round(u/n),isAppIcon:!0,isDefaultIcon:!1}}constructThirdPartyIconResponseWithPriority(e,t,n,r){const i=[];for(const o of e.icons)switch(o.type){case"OSX":i.push("mac");break;case"IOS":i.push("ios")}for(const o of r){if(!i.includes(o))continue;const r=(()=>{switch(o){case"ios":return"IOS";case"mac":return"OSX";default:return null}})();if(!r)continue;const a=e.iconMap[r];if(!a)continue;const s=a.sizes,c=h(t*n,s),u=s.indexOf(c);return{iconURL:a.urls[u]+"&validateToken="+this.getValidateToken(),iconSize:Math.ceil(c/n),isAppIcon:!0,isDefaultIcon:!1}}return null}getClaimRecordForPlatforms(e,t){for(const n in e.importedDeclarations){const r=e.importedDeclarations[n],i=[];for(const e of r.icons)switch(e.type){case"OSX":i.push("mac");break;case"IOS":i.push("ios")}for(const e of t)if(i.includes(e))return r}return null}getValidateToken(){const e=this.cookieManager.readCookieValue("X-APPLE-WEBAUTH-VALIDATE");return e.substring(1,e.length-1)}}function h(e,t){if(0===t.length)return e;if(t.includes(e))return e;for(const n of t)if(n>e)return n;return t[t.length-1]}f._internalSharedInstance=void 0;const m=d.z.object({items:d.z.object({zone:d.z.string(),applicationName:d.z.string().optional(),dateCreated:d.z.custom((e=>"string"===typeof e&&/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ$/.test(e)),"Not an ISO date string").optional(),supportedExtensions:d.z.string().array().optional(),supportedTypes:d.z.string().array().optional(),icons:d.z.object({size:d.z.number(),type:d.z.union([d.z.literal("OSX"),d.z.literal("IOS")]),url:d.z.string()}).array().optional()}).array()})},function(e,t,n){"use strict";n.d(t,"a",(function(){return N})),n.d(t,"b",(function(){return x}));var r=n(888),i=n(2249),o=n(1253),a=n(900),s=n(977),c=n(973),u=n(2248),l=n(976),d=n(919),p=n(2208),f=function(e){return e[e.REG_ALL=1]="REG_ALL",e[e.REG_PARTIAL=2]="REG_PARTIAL",e[e.REG_ERR_SERVER=3]="REG_ERR_SERVER",e[e.REG_ERR_APP_UNKNOWN=4]="REG_ERR_APP_UNKNOWN",e[e.REG_ERR_APP_BLACKLIST=5]="REG_ERR_APP_BLACKLIST",e}(f||{}),h=function(e){return e[e.UPDATE_OK=0]="UPDATE_OK",e[e.UPDATE_VER_MISMATCH=1]="UPDATE_VER_MISMATCH",e[e.UPDATE_QUOTA_EXCEEDED=2]="UPDATE_QUOTA_EXCEEDED",e[e.UPDATE_READ_ONLY=3]="UPDATE_READ_ONLY",e[e.UPDATE_RESUBMIT=4]="UPDATE_RESUBMIT",e}(h||{});let m=function(e){return e.KEY_VALUE_SERVICE_HTTP_ERROR="KEY_VALUE_SERVICE_HTTP_ERROR",e.KEY_VALUE_SERVICE_ERROR="KEY_VALUE_SERVICE_ERROR",e.KEY_REGISTRY_ERROR="KEY_REGISTRY_ERROR",e.KEY_VALUE_SERVICE_NO_RESPONSE="KEY_VALUE_SERVICE_NO_RESPONSE",e.KEY_VALUE_SERVICE_EMPTY_RESPONSE="KEY_VALUE_SERVICE_EMPTY_RESPONSE",e.KEY_VALUE_SERVICE_KEY_NOT_FOUND="KEY_VALUE_SERVICE_KEY_NOT_FOUND",e.KEY_VALUE_SERVICE_UPDATE_FAILED="KEY_VALUE_SERVICE_UPDATE_FAILED",e}({});const g=r.z.object({"app-id":r.z.string(),"registry-version":r.z.string(),"registry-status":r.z.number(),keys:r.z.object({name:r.z.string(),data:r.z.unknown()}).array()}),v=r.z.object({"app-id":r.z.string(),"registry-version":r.z.string(),"registry-status":r.z.number(),keys:r.z.object({name:r.z.string(),data:r.z.unknown(),"update-status":r.z.number().optional()}).array()}),y=r.z.object({status:r.z.number(),timestamp:r.z.number(),apps:g.array()}),b=r.z.object({status:r.z.number(),apps:v.array().optional()});async function w(e){const t=new Set(e),n=[];let r=2;for(;;){var i;const e=[];let h,g;t.forEach((t=>e.push({"app-id":t,"registry-version":""})));try{h=await c.a.fetchURL(Object(u.j)("keyvalue","json/sync"),{method:"POST",body:JSON.stringify({"service-id":"appleprefs",apps:e}),validate:{type:"WireKeyValueServiceFetchResponse",schema:y}})}catch{h=null}if(null!==(i=h)&&void 0!==i&&i.ok){try{g=await h.json()}catch{if(0===r)return await S(h);r-=1;continue}if(0!==g.status)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_ERROR,errorInfo:g.status}};for(const e of g.apps){const n=e["registry-status"];if(n!==f.REG_ALL)return{isOK:!1,error:{error:m.KEY_REGISTRY_ERROR,errorInfo:n}};const r=e["app-id"];if(!t.has(r))return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_KEY_NOT_FOUND,errorInfo:r}}}for(const e of g.apps){const r=e["app-id"];t.delete(r),n.push(e)}if(0===t.size)return{isOK:!0,data:n}}else{var o;const e=null===(o=h)||void 0===o?void 0:o.status;if(0===r)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_HTTP_ERROR,errorInfo:e}};var a;if(503===e&&null!==(a=h)&&void 0!==a&&null!==(a=a.headers)&&void 0!==a&&a.get("retry-after")){var s;const t=null!==(s=Number(h.headers.get("retry-after")))&&void 0!==s?s:0;if(t>5)return p.b.sharedInstance.recordStat(new d.a("KVSThrottleError",{retryAfter:t})),{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_HTTP_ERROR,errorInfo:e}};const n=document.body.querySelector(".init-spinner-container");n&&t>1&&setTimeout((()=>{n.className="init-spinner-container showing"}),1e3),await Object(l.a)(1e3*t),r=0}else r-=1}}}async function S(e){let t=m.KEY_VALUE_SERVICE_EMPTY_RESPONSE;try{await e.unvalidatedJson()||(t=m.KEY_VALUE_SERVICE_NO_RESPONSE)}catch{}return{isOK:!1,error:{error:t}}}var C=n(1166);const _=r.z.object({name:r.z.union([r.z.literal("mail"),r.z.literal("calendar")]),topics:r.z.array(r.z.string()),enabled:r.z.boolean()}),O=r.z.object({id:r.z.string(),apps:r.z.array(_),subscription:r.z.string()}),E=r.z.object({devices:r.z.array(O),version:r.z.number()}),I=r.z.object({sprinkles:r.z.number().optional(),www:r.z.number().optional(),beta:r.z.number().optional(),future:r.z.number().optional()});var A=n(1246);const T=r.z.record(r.z.nativeEnum(A.a),r.z.number());var P=n(1247),R=n(1248),k=n(2177);const D=r.z.object({locale:r.z.string().optional(),secondaryLocale:r.z.string().nullable().optional(),regionFormat:r.z.string().optional(),startupUrls:r.z.record(r.z.string().nullable()).optional(),timeZone:r.z.string().optional(),HMEandCEDPromotionBannerDismissed:r.z.boolean().optional(),tilesConfigurations:C.c.optional(),backgroundColor:r.z.enum(k.b).optional(),seenWhatsNewVersion:I.optional(),seenBannerVersion:T.optional(),notificationSettings:E.optional(),seenSplashScreenVersion:r.z.record(C.b,r.z.number()).optional()}),M="account",N=()=>P.a.sharedInstance.displayOrder.filter((e=>!e.applicationInfo.skipLoadingAppPreferences)).map((e=>e.applicationInfo.authBagId)),x=new class{constructor(){this.preferencesStore={},this.registry=[],this.registryVersions={},this.observers=new Set,this.isReady=void 0,this.isReadyResolve=void 0,this.isInitialized=!1,this.currentAppPreferencesFetchingPromiseMap=new Map,this.appPreferencesInitializedKeys=new Set,this.appPreferencesFailedInitializationKeys=new Set,this.isReady=new Promise((e=>{this.isReadyResolve=e}))}isAppPreferenceFailedToInitilize(e){return this.appPreferencesFailedInitializationKeys.has(e)}async initialize(){const e=async()=>{var e;if(this.isInitialized)return this.isReady;this.isInitialized=!0;const t=await w([M]);return t.isOK&&this.preferencesDidUpdate(t.data),null===(e=this.isReadyResolve)||void 0===e||e.call(this,t),t};return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?(setTimeout((async()=>await e()),5e3),null):await e()}async lazyInitializeAppPreferences(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];setTimeout((async()=>{this.initializeAppPreferences(e)}),5e3)}async initializeAppPreferences(){let e=arguments.length>1?arguments[1]:void 0;const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter((t=>e?!this.appPreferencesInitializedKeys.has(t)&&!this.currentAppPreferencesFetchingPromiseMap.has(t):!this.appPreferencesFailedInitializationKeys.has(t)&&!this.appPreferencesInitializedKeys.has(t)&&!this.currentAppPreferencesFetchingPromiseMap.has(t)));if(0===t.length)return Promise.resolve({isOK:!0});e&&t.forEach((e=>{this.appPreferencesFailedInitializationKeys.has(e)&&this.appPreferencesFailedInitializationKeys.delete(e)}));const n=w([...t]).then((e=>(e.isOK?(this.appPreferencesInitializedKeys=new Set([...this.appPreferencesInitializedKeys,...t]),this.preferencesDidUpdate(e.data)):this.appPreferencesFailedInitializationKeys=new Set([...this.appPreferencesFailedInitializationKeys,...t]),t.forEach((e=>this.currentAppPreferencesFetchingPromiseMap.delete(e))),e)));return t.forEach((e=>{this.currentAppPreferencesFetchingPromiseMap.set(e,n)})),n}async isAppPreferencesReady(e){const t=P.a.sharedInstance.displayOrder.find((t=>!!Object(R.c)(t,e)));return null!==t&&void 0!==t&&t.applicationInfo.skipLoadingAppPreferences?Promise.resolve({isOK:!0}):this.appPreferencesFailedInitializationKeys.has(e)?Promise.resolve({isOK:!1}):this.appPreferencesInitializedKeys.has(e)?Promise.resolve({isOK:!0}):this.currentAppPreferencesFetchingPromiseMap.has(e)?this.currentAppPreferencesFetchingPromiseMap.get(e):this.initializeAppPreferences([e])}getPreferences(e){var t,n;return null!==(t=null===(n=this.preferencesStore)||void 0===n?void 0:n[e])&&void 0!==t?t:null}setPreferences(e,t){const n=[],r=[];for(const i in t)r.push({name:i,data:t[i]});return n.push({"app-id":e,"registry-version":this.registryVersions[e],keys:r}),this.setRawPreferences(n)}preferencesDidUpdate(e){this.updateDataInPlace(e),this.observers.forEach((e=>e()))}updateDataInPlace(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(const n of e){let e=!1;for(const t of this.registry)if(n["app-id"]===t["app-id"]){t["registry-version"]=n["registry-version"],t.keys=n.keys,e=!0;break}e||this.registry.push(n),this.registryVersions[n["app-id"]]=n["registry-version"]}const t={};for(const n of e){const e={};for(const t of n.keys)e[t.name]=t.data;t[n["app-id"]]=e}for(const n in t)this.preferencesStore[n]=t[n]}getAccountPreferences(){const e=this.getPreferences(M);return t=e,D.safeParse(t).success?(e.timeZone||(e.timeZone="US/Pacific"),e.regionFormat||(e.regionFormat="en-us"),e):null;var t}setAccountPreferences(e){return this.setPreferences(M,{...e})}getStartupInfoForApp(e){const t=this.getAccountPreferences();if(!t)return null;const n=t.startupUrls;if(!n)return null;const r=n[e];if(!r)return null;const c=Object(s.c)(r,o.b,"StartupInfo");if(c.ok){const t=c.value;return a.a.sharedInstance.isUrlCurrentDomain(t.url)?t:(this.clearStartupInfoForApp(e),null)}try{const e=i.c(r);return Object(o.a)(e)}catch{return null}}setStartupInfoForApp(e,t){var n,r;const i=null!==(n=this.getAccountPreferences())&&void 0!==n?n:{},o=null!==(r=i.startupUrls)&&void 0!==r?r:{};return o[e]=t?JSON.stringify({url:t.url,method:t.method,requestPayload:t.requestPayload}):null,i.startupUrls=o,this.setAccountPreferences(i)}clearStartupInfoForApp(e){return this.setStartupInfoForApp(e,null)}invalidate(){this.registry=[],this.registryVersions={},this.preferencesStore={},this.appPreferencesInitializedKeys=new Set,this.appPreferencesFailedInitializationKeys=new Set,this.currentAppPreferencesFetchingPromiseMap=new Map,this.preferencesDidUpdate([])}async setRawPreferences(e){const t=await async function(e){const t=[];let n=2;const r=t=>{for(const n of e)if(t===n["app-id"])return n;return null};for(;;){var i;const o=JSON.stringify({"service-id":"appleprefs",apps:e});let a,s;try{a=await c.a.fetchURL(Object(u.j)("keyvalue","json/sync"),{method:"POST",body:o,validate:{type:"WireKeyValueServiceUpdateResponse",schema:b}})}catch{a=null}if(null===(i=a)||void 0===i||!i.ok)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_HTTP_ERROR,errorInfo:status}};try{s=await a.json()}catch{return await S(a)}if(0!==s.status)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_ERROR,errorInfo:s.status}};if(!s.apps||s.apps.length<1)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_UPDATE_FAILED,errorInfo:{appsCount:0}}};for(const e of s.apps){const t=e.keys,n=e["registry-status"];if(n!==f.REG_PARTIAL&&n!==f.REG_ALL)return{isOK:!1,error:{error:m.KEY_REGISTRY_ERROR,errorInfo:n}};const i=e["app-id"];if(!r(i))return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_KEY_NOT_FOUND,errorInfo:i}};for(const e of t){const t=e["update-status"];switch(t){case h.UPDATE_QUOTA_EXCEEDED:case h.UPDATE_READ_ONLY:return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_UPDATE_FAILED,errorInfo:t}}}}}const l=[];for(const e of s.apps){const n=(()=>{for(const t of e.keys)switch(t["update-status"]){case h.UPDATE_VER_MISMATCH:case h.UPDATE_RESUBMIT:return!0}return!1})(),i=r(e["app-id"]);n?i&&(i["registry-version"]=e["registry-version"],l.push(i)):i&&t.push({keys:i.keys.slice(),"app-id":e["app-id"],"registry-version":e["registry-version"]})}if(0===l.length)return{isOK:!0,data:t};if(0===n)return{isOK:!1,error:{error:m.KEY_VALUE_SERVICE_UPDATE_FAILED}};e=[...l],l.length=0,n--}}(e);return t.isOK&&this.preferencesDidUpdate(t.data),t}}},function(e,t,n){"use strict";n.r(t),n.d(t,"addBreadcrumb",(function(){return i.a})),n.d(t,"captureEvent",(function(){return i.b})),n.d(t,"captureException",(function(){return i.c})),n.d(t,"captureMessage",(function(){return i.d})),n.d(t,"configureScope",(function(){return i.e})),n.d(t,"setContext",(function(){return i.f})),n.d(t,"setExtra",(function(){return i.g})),n.d(t,"setExtras",(function(){return i.h})),n.d(t,"setTag",(function(){return i.i})),n.d(t,"setTags",(function(){return i.j})),n.d(t,"setUser",(function(){return i.k})),n.d(t,"startTransaction",(function(){return i.l})),n.d(t,"withScope",(function(){return i.m})),n.d(t,"Hub",(function(){return o.a})),n.d(t,"getCurrentHub",(function(){return o.b})),n.d(t,"getHubFromCarrier",(function(){return o.c})),n.d(t,"getMainCarrier",(function(){return o.d})),n.d(t,"makeMain",(function(){return o.e})),n.d(t,"setHubOnCarrier",(function(){return o.f})),n.d(t,"closeSession",(function(){return a.a})),n.d(t,"makeSession",(function(){return a.b})),n.d(t,"updateSession",(function(){return a.c})),n.d(t,"SessionFlusher",(function(){return c})),n.d(t,"Scope",(function(){return u.a})),n.d(t,"addGlobalEventProcessor",(function(){return u.b})),n.d(t,"getEnvelopeEndpointWithUrlEncodedAuth",(function(){return l.a})),n.d(t,"getReportDialogEndpoint",(function(){return l.b})),n.d(t,"BaseClient",(function(){return d.a})),n.d(t,"initAndBind",(function(){return p.a})),n.d(t,"createTransport",(function(){return f.a})),n.d(t,"SDK_VERSION",(function(){return h.a})),n.d(t,"getIntegrationsToSetup",(function(){return m.a})),n.d(t,"Integrations",(function(){return r})),n.d(t,"FunctionToString",(function(){return v})),n.d(t,"InboundFilters",(function(){return w}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return v})),n.d(r,"InboundFilters",(function(){return w}));var i=n(929),o=n(930),a=n(932),s=n(941);class c{__init(){this.flushTimeout=60}__init2(){this._pendingAggregates={}}__init3(){this._isEnabled=!0}constructor(e,t){c.prototype.__init.call(this),c.prototype.__init2.call(this),c.prototype.__init3.call(this),this._client=e,this._intervalId=setInterval((()=>this.flush()),1e3*this.flushTimeout),this._sessionAttrs=t}flush(){const e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates={},this._client.sendSession(e))}getSessionAggregates(){const e=Object.keys(this._pendingAggregates).map((e=>this._pendingAggregates[parseInt(e)])),t={attrs:this._sessionAttrs,aggregates:e};return Object(s.c)(t)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;const e=Object(o.b)().getScope(),t=e&&e.getRequestSession();t&&t.status&&(this._incrementSessionStatusCount(t.status,new Date),e&&e.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){const n=new Date(t).setSeconds(0,0);this._pendingAggregates[n]=this._pendingAggregates[n]||{};const r=this._pendingAggregates[n];switch(r.started||(r.started=new Date(n).toISOString()),e){case"errored":return r.errored=(r.errored||0)+1,r.errored;case"ok":return r.exited=(r.exited||0)+1,r.exited;default:return r.crashed=(r.crashed||0)+1,r.crashed}}}var u=n(931),l=n(946),d=n(2306),p=n(955),f=n(956),h=n(959),m=n(949);let g;class v{constructor(){v.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=v.id}setupOnce(){g=Function.prototype.toString,Function.prototype.toString=function(){const e=Object(s.f)(this)||this;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g.apply(e,n)}}}v.__initStatic();var y=n(939);const b=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class w{static __initStatic(){this.id="InboundFilters"}__init(){this.name=w.id}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=e,w.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(w);if(t){const r=n.getClient(),i=r?r.getOptions():{},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...b],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,i);return function(e,t){return!(!t.ignoreInternal||!function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(e))||(!!function(e,t){return!(!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch(t){return[]}return[]}(e).some((e=>Object(y.e)(e,t)))}(e,t.ignoreErrors)||(!!function(e,t){if(!t||!t.length)return!1;const n=S(e);return!!n&&Object(y.e)(n,t)}(e,t.denyUrls)||!function(e,t){if(!t||!t.length)return!0;const n=S(e);return!n||Object(y.e)(n,t)}(e,t.allowUrls)))}(e,o)?null:e}}return e};n.id=this.name,e(n)}}function S(e){try{let n;try{n=e.exception.values[0].stacktrace.frames}catch(t){}return n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return null}}w.__initStatic()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return v}));var r=n(2228),i=n(1079),o=n(1036),a=n(1038),s=n(2217),c=n(1016),u=n(1011);class l{get isOpen(){return this._isOpen}constructor(e,t,n){this.transform=e,this.didOpen=t,this.didClose=n,this.isChannel=!0,this.isChannelListenable=!0,this._isOpen=!1,this.listeners=[]}open(){if(!this._isOpen){this._isOpen=!0,this.didOpen&&this.didOpen();for(const e of this.listeners)e.open()}}async close(e){if(this._isOpen=!1,this.didClose){const t=await this.didClose(e);for(const e of this.listeners)await e.close(t)}else for(const t of this.listeners)await t.close(e)}async message(e){if(!this.isOpen)throw new c.a(u.b`.message called, but channel is not currently open`);const t=await this.transform(e),n=this.listeners.map((e=>e.message(t)));await Promise.all(n)}pipe(e){return this.listeners.push(e),this.isOpen&&e.open(),e}unpipe(e){const t=this.listeners.indexOf(e);if(t<0)throw new c.a(u.b`.unpipe called, but channels are not piped`);this.listeners.splice(t,1)}}class d extends l{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:async e=>e;super((e=>e),e,t),this.didOpen=e,this.didClose=t}}function p(e){return e&&e.isChannelListenable}function f(e){return e&&e.isDuplex}const h=1e3;var m;!function(e){e[e.MESSAGE_STATUS_MESSAGE_QUEUED=1e3]="MESSAGE_STATUS_MESSAGE_QUEUED",e[e.BROWSER_NETWORK_UNAVAILABLE=1006]="BROWSER_NETWORK_UNAVAILABLE",e[e.INTERNAL_SERVER_ERROR=1011]="INTERNAL_SERVER_ERROR",e[e.MALFORMED_BINARY_DATA=4e3]="MALFORMED_BINARY_DATA",e[e.PRESENCE_CONFLICT=4001]="PRESENCE_CONFLICT",e[e.EXPIRED_TOKEN=4002]="EXPIRED_TOKEN",e[e.UNRECOGNIZED_FRAME_TYPE=4003]="UNRECOGNIZED_FRAME_TYPE",e[e.SERVICE_SHUTDOWN=4004]="SERVICE_SHUTDOWN",e[e.MESSAGE_NOT_HANDLED=4005]="MESSAGE_NOT_HANDLED",e[e.IDS_REQUEST_FAILURE=4006]="IDS_REQUEST_FAILURE",e[e.INVALID_NONCE_SIGNATURE=4007]="INVALID_NONCE_SIGNATURE",e[e.INVALID_CONNECT_REQUEST=4008]="INVALID_CONNECT_REQUEST"}(m||(m={}));class g{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(r.a)(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>new WebSocket(e,t);this.address=e,this.unwrappedLogger=t,this.cleanupFunctions=[],this.down=new d,this.up={isChannel:!0,open:()=>{},message:e=>this.sendMessage(e),close:async()=>this.close()},this.isDuplexListenable=!0,this.isDuplex=!0,this.logger=this.unwrappedLogger.child`WSDuplex`().package`Messaging`.subsystem`push`;let o=!1;const a=performance.now(),{promise:c,resolve:u}=Object(i.a)();this.timeToFirstMessage=c,this.socket=n(e),this.socket.binaryType="arraybuffer",this.on("message",(e=>{if(!o){const e=performance.now()-a;u(e),this.logger.info`Time to first message: ${Object(s.c)(e).device()}`}o=!0,this.didReceiveMessage(e.data)})),this.on("close",(e=>{this.didClose(e)})),this.on("open",(()=>{this.didOpen()}))}pipe(e){return f(e)?(p(e.up)&&e.up.pipe(this.up),this.down.pipe(e.down)):this.down.pipe(e),e}unpipe(e){f(e)?(p(e.up)&&e.up.unpipe(this.up),this.down.unpipe(e.down)):this.down.unpipe(e)}on(e,t){this.socket.addEventListener(e,t),this.cleanupFunctions.push((()=>{this.socket.removeEventListener(e,t)}))}didOpen(){this.logger.info`Did open...`,this.down.open(),this.up.open()}didReceiveMessage(e){this.down.message(e)}didClose(e){this.down.close(e),this.up.close();for(const t of this.cleanupFunctions)t()}dbg_didClose(e){this.didClose(e)}async sendMessage(e){this.socket.send(e)}close(){this.socket.close()}}const v=Object(o.a)((e=>{const t=Object(a.a)(e);return e=>new g(e,t)}))},function(e,t,n){"use strict";n.r(t),n.d(t,"Application",(function(){return E}));var r=n(1278),i=n(1286),o=n(1280),a=n(2287),s=n(1281),c=n(1277),u=n(2285),l=n(1291),d=n(1289);class p extends u.a{constructor(){super(...arguments),this.localProtocol=l.a,this.remoteProtocol=d.a}get localProtocolTarget(){return this.delegate}notifyChildApplicationIsReady(){return Object(i.b)(this.processState,i.a.LOADING,i.a.LOADED),this._processState=i.a.LOADED,this.remoteProxy.isReadyToReceiveMessages().then((e=>(e.isOK&&(Object(i.b)(this.processState,i.a.LOADED),this._processState=i.a.RUNNING),e)))}}var f=n(1282);class h{constructor(){this.messagingResponseErrorSupport=new a.a(((e,t)=>{this.terminateWithReasonAndInfo(e,t)})),this.invokeLaterSupport=new o.a,this.parentProcessReferenceClass=p,this.parentProcessReferenceDelegate=this,this.parentProcessReference=void 0,this.processStateChanged=new f.a(this),this.channel=void 0,this.sessionInfoChanged=new f.a(this),this._sessionInfo={},this.hostInfoChanged=new f.a(this),this._hostInfo={},this.processInfo={},this.processId=void 0,this.parentProcessId=void 0,this._internalProcessState=i.a.NONE,this._launchData={}}get processState(){return this.internalProcessState}get isStarted(){return Object(i.c)(this.processState,i.a.LOADING,i.a.LOADED,i.a.RUNNING)}get isTerminated(){return Object(i.c)(this.processState,i.a.TERMINATED)}get sessionInfo(){return this._sessionInfo}set sessionInfo(e){this._sessionInfo=e,this.sessionInfoChanged.dispatch(e)}get hostInfo(){return this._hostInfo}set hostInfo(e){this._hostInfo=e,this.hostInfoChanged.dispatch(e)}start(){Object(i.b)(this.processState,i.a.NONE),this.internalProcessState=i.a.LOADING;const{parentProcessReferenceClass:e,channel:t}=this;if(e){const e=this._createParentProcessReference(t);e.connect(),this.messagingResponseErrorSupport.sendMessageWithRetryAndTerminateOnError((()=>e.notifyChildApplicationIsReady()),"MessagingFromChildProtocol-isReadyToReceiveMessages").then((e=>{e.isOK&&(this.internalProcessState=i.a.LOADED)}))}else this.internalProcessState=i.a.LOADED}stop(){Object(i.b)(this.processState,i.a.LOADING,i.a.LOADED,i.a.RUNNING),this.internalProcessState=i.a.UNLOADING,this.invokeLaterSupport.cancelInvokeLaterMethods();const{parentProcessReference:e}=this;let t=Promise.resolve();return e&&(this.parentProcessReference=void 0,e.isConnected&&(t=t.then((()=>e.disconnect()))),t=t.then((()=>e.isTerminated||e.terminate()))),t.then((()=>this.internalProcessState=i.a.UNLOADED))}terminate(){Object(i.b)(this.processState,i.a.UNLOADED),this.internalProcessState=i.a.TERMINATED,this.channel&&!this.channel.isDisconnected&&this.channel.disconnect(),this.processId=void 0,this.parentProcessId=void 0,this.hostInfo=void 0,this.sessionInfo=void 0,this.processInfo=void 0,this.channel=void 0}terminateWithReasonAndInfo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&!Object(c.d)(t)?Object(s.b)(new Error("terminateWithReasonAndInfo optional info argument should be a hash")):t.buildInfo||(t.buildInfo=globalThis.__CW_BUILD_INFO);const{parentProcessReference:n}=this;var r;return n&&n.isConnected&&(null===(r=n.remoteProxy)||void 0===r||r.didEnd(e,t)),(this.isStarted?this.stop():Promise.resolve()).then((()=>this.isTerminated||this.terminate()))}beginLaunching(e,t,n){if(Object(i.b)(this.processState,i.a.LOADED),this._updateHostingAndSessionInfo(e,t),!n.launchOptions)throw new r.a("Invalid launchOptions");if(!n.launchOptions.launchReason)throw new r.a("Missing launchOptions.launchReason");n.launchOptions=Object.freeze(n.launchOptions),this.processInfo=Object.freeze(n),this.parentProcessId=n.parentProcessId,this.processId=n.processId,this.parentProcessReference&&(this.parentProcessReference.processId=n.parentProcessId),this.invokeLaterSupport.invokeLater((()=>Promise.resolve().then((()=>this.run())).then((()=>this.internalProcessState=i.a.RUNNING)).then((()=>this._notifyParentThatProcessDidFinishLaunchingIfNeeded()))))}openItems(e){}hostingStateDidChange(e,t){Object(i.b)(this.processState,i.a.RUNNING),this._updateHostingAndSessionInfo(e,t)}get internalProcessState(){return this._internalProcessState}set internalProcessState(e){this._internalProcessState=e,this.processStateChanged.dispatch(e)}_createParentProcessReference(e){const{parentProcessReferenceClass:t,parentProcessReferenceDelegate:n,parentProcessId:r}=this;t&&n||Object(s.b)(new Error("A parentProcessReferenceClass and a parentProcessReferenceDelegate are required to create a ParentProcessReference."));const i=new t;return i.processId=r,i.delegate=n,i.channel=e,this.parentProcessReference=i,i}_updateHostingAndSessionInfo(e,t){Object(i.b)(this.processState,i.a.LOADED,i.a.RUNNING),this.sessionInfo=Object.freeze(e),this.hostInfo=Object.freeze(t)}_notifyParentThatProcessDidFinishLaunchingIfNeeded(){Object(i.b)(this.processState,i.a.RUNNING);const{parentProcessReference:e,_launchData:t}=this;e&&e.isConnected&&this.messagingResponseErrorSupport.sendMessageWithRetryAndTerminateOnError((()=>e.remoteProxy.didFinishLaunching(t)),"MessagingFromChildProtocol-didFinishLaunching")}}var m=n(2307);function g(){return window!==window.parent}function v(){if(window.opener)try{return!!window.opener.document.location.href}catch(e){return!1}return!1}var y=n(1292),b=n(2288);class w extends b.a{get outgoingWindow(){const{parent:e,opener:t}=window;return e||t?{actualOutgoingWindow:window!==e&&e||t,postMessage(e,t){const{actualOutgoingWindow:n}=this;if(n.postMessage)return n.postMessage(e,t)}}:null}}var S=n(2289),C=n(1293),_=n(2229),O=n(1288);class E extends h{static main(e){const t=new(e.applicationClass||E)({isParent:e.isParent});return t.delegate=e.delegate,t.setup(),t}constructor(e){if(super(),this.allowedRemoteOrigins=[],this.remoteOrigin=function(){if(g()){let e=null;return e=window.location!==window.parent.location?document.referrer:document.location.href,new m.a(e).origin}if(v())try{const e=window.opener.document.location.href;return new m.a(e).origin}catch(e){throw"Opener window cannot be accessed"}return null}(),this.isParent=void 0,this.delegate=void 0,this._primaryInteractionMode=void 0,this._platformType=void 0,this._deviceType=void 0,this._parentChannelProtocolClass=w,E.application)throw new Error("Only one application may be instantiated per JS context.");E.application=this,this.isParent=void 0!==(null===e||void 0===e?void 0:e.isParent)&&e.isParent}get applicationName(){const{processInfo:e}=this;return e?e.processName:void 0}get primaryInteractionMode(){return this._primaryInteractionMode}get platformType(){return this._platformType}get deviceType(){return this._deviceType}setup(){if(Object(i.b)(this.processState,i.a.NONE),this.isParent||!g()&&!v()){this.parentProcessReferenceClass=void 0,this.start();const e={},{primaryInteractionMode:t,platformType:n,deviceType:r}=S.a.sharedInstance,i={primaryInteractionMode:t,platformType:n,deviceType:r},o={processId:Object(_.a)(),launchOptions:{launchReason:y.a.USER_LAUNCH}};this.beginLaunching(e,i,o)}else{const{allowedRemoteOrigins:e,remoteOrigin:t}=this;if(null==t)throw new Error("Could not determine remote origin");this.channel=new this._parentChannelProtocolClass({allowedRemoteOrigins:e,remoteOrigin:t}),this.start(),v()&&window.addEventListener("beforeunload",(()=>{this.terminateWithReasonAndInfo(O.a.USER_INITIATED,{})}))}}async run(){const{delegate:e}=this,{processInfo:t}=this,n=null===t||void 0===t?void 0:t.launchOptions;await Promise.resolve(),await this.configureApplication(),e&&await e.applicationWillFinishLaunching(this,n),await this.launchApplication(n),e&&await e.applicationDidFinishLaunching(this,n)}launchApplication(e){console.log(e)}async configureApplication(){Object(i.b)(this.processState,i.a.LOADED);const{hostInfo:e}=this,t=null===e||void 0===e?void 0:e.primaryInteractionMode,n=null===e||void 0===e?void 0:e.platformType,o=null===e||void 0===e?void 0:e.deviceType;if(!t||!Object.keys(C.a).includes(t))throw new r.a("hostInfo must include a valid primary interaction mode");this._primaryInteractionMode=t,this._platformType=n,this._deviceType=o}createMessagingChannel(e,t,n){const{parentProcessReference:r}=this;return r&&r.channel||Object(s.b)(new Error("Unable to connect to parent. Can not create MessagingChannel")),r.createMessagingChannel(e,t,n),r.remoteProxy}}E.application=void 0},function(e,t,n){"use strict";n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A}));var r=n(870),i=n(1215),o=n.n(i),a=n(1201),s=n(2259),c=n(2262),u=n(1571),l=n(2266),d=n(1413),p=n(888);const f=p.z.object({ContinueOnDeviceEligibleDeviceInfo:p.z.array(p.z.string())});var h=n(2249),m=n(1478);var g=n(2315),v=n(1330),y=n(1339),b=n(1227),w=n(1481),S=n(1321),C=n(2241),_=n(2186),O=n(2230),E=n(2132);let I=function(e){return e.PLAN_UPGRADE="iCloudPlanUpgrade",e.PRIVATE_RELAY="setupPrivateRelay",e.HOMEKIT_SECURE_VIDEO="homeKitSecureVideo",e.FAMILY_SHARING_ORGANIZER_NO_FAMILY="iCloudPlusFamilySharing.OrganizerNoFamily",e.FAMILY_SHARING_MEMBER="iCloudPlusFamilySharing.Member",e.FAMILY_SHARING_ORGANIZER="iCloudPlusFamilySharing.Organizer",e.STORAGE_MANAGE="iCloudStorageManage",e.STORAGE_FULL="iCloudStorageManage.StorageFull",e}({});const A=e=>{var t,n,i,p;const{feature:I,variant:A,buttonOnly:T=!1}=e,P=o()("continue-section",e.className,I),R=Object(v.b)(),k=null!==(t=null===R||void 0===R||null===(n=R.details)||void 0===n?void 0:n.firstName)&&void 0!==t?t:"",D=null!==(i=null===R||void 0===R||null===(p=R.details)||void 0===p?void 0:p.lastName)&&void 0!==i?i:"",M=Object(w.a)(k,D,!0);let N=[],x=0;const{data:L}=Object(m.a)({endpoint:l.b.getCoDEligibleDevicesList,fetchProvider:()=>()=>function(){const e=h.c(`${l.c}/getCoDEligibleDevicesList`);return Object(d.a)({url:e,includeCredentials:!0,validate:{type:"ContinueOnDeviceEligibleDeviceInfo",schema:f}})}()}),j=null===L||void 0===L?void 0:L.ContinueOnDeviceEligibleDeviceInfo;j&&(N=j,x=N.length);const[U,F]=Object(S.b)("link","continue-on-device"),z=Object(y.a)(),B=()=>{z({title:Object(b.a)("ContinueOnDevice.FailedDialog.Title"),description:Object(b.a)("ContinueOnDevice.FailedDialog.Description"),buttons:[Object(b.a)("Alert.OkButton")]})},[K,H]=r.useState(!1),W=Object(b.a)("ContinueOnDevice.NoDevice.IOS.Description"),q=Object(b.a)("ContinueOnDevice.NoDevice.Mac.Description"),V=Object(b.a)("ContinueOnDevice.homeKitSecureVideo.NoDevice.Notice"),$=Object(b.a)("ContinueOnDevice.setupPrivateRelay.NoDevice.Notice"),G=Object(_.a)(),Z=I===g.a.HOMEKIT_SECURE_VIDEO,Q=I===g.a.PRIVATE_RELAY,Y=x>0,J=Object(O.d)(),X=Y&&!(I===g.a.PLAN_UPGRADE&&"family-sharing"===J.type),ee=X?"":".NoDevice";let te=Object(b.a)(`ContinueOnDevice.${A}${ee}.Title`),ne=Object(b.a)(`ContinueOnDevice.${A}${ee}.Description`,{fullName:M}),re=Object(b.a)(`ContinueOnDevice.${A}.NoDevice.Description2`);const ie=Object(b.a)("ContinueOnDevice.ContinueButton.Title"),oe=Object(b.a)("ContinueOnDevice.ContinueButton.Title.Sending"),ae=o()("standard-button",{sending:K});return X?r.createElement("section",{className:P},!T&&r.createElement("h3",{className:"continue-section-heading"},te),Z?r.createElement("p",{className:"continue-section-body"},r.createElement(a.a,{interpolations:{"#{chevron}":r.createElement(G,{layoutMode:"glyphBox",desiredFontSize:7})}},ne)):r.createElement(r.Fragment,null,!T&&r.createElement("p",{className:"continue-section-body"},ne),r.createElement(s.a,{className:ae,onActivate:()=>{H(!0),(async()=>{const e={variant:A},t=C.a.sharedInstance.applicationParameter.url.searchParams.get("cid");I===g.a.PLAN_UPGRADE&&(e.hasCid=!!t);try{(await Object(g.b)(I,t)).success?(U(I,e),(()=>{const e=(()=>{switch(x){case 0:return"";case 1:return Object(b.a)("ContinueOnDevice.SuccessDialog.Description.LineOne.OneDevice",{device1:N[0]});case 2:return Object(b.a)("ContinueOnDevice.SuccessDialog.Description.LineOne.TwoDevices",{device1:N[0],device2:N[1]});case 3:return Object(b.a)("ContinueOnDevice.SuccessDialog.Description.LineOne.ThreeDevices",{device1:N[0],device2:N[1],device3:N[2]});default:return Object(b.a)("ContinueOnDevice.SuccessDialog.Description.LineOne.MoreThanThree",{device1:N[0],device2:N[1],device3:N[2],restCount:x-3})}})();z({title:Object(b.a)("ContinueOnDevice.SuccessDialog.Title"),description:e,accessory:r.createElement("p",{className:"description"},Object(b.a)("ContinueOnDevice.SuccessDialog.Description.LineTwo")),buttons:[Object(b.a)("Alert.OkButton")],icon:r.createElement(E.a,{iconSize:36,applicationIdentifier:"plan"})})})()):(F(I,e),B()),H(!1)}catch(n){F(I,e),B(),H(!1)}})()},variant:T?"block primary large":void 0},K?r.createElement(r.Fragment,null,r.createElement(c.a,{description:""})," ",r.createElement("span",{className:"sending"},oe)):r.createElement(r.Fragment,null,r.createElement(u.a,{"aria-hidden":!0,desiredFontSize:14,layoutMode:"glyphBox"})," ",ie)))):!X&&T?null:r.createElement("section",{className:P},r.createElement("h3",{className:"continue-section-heading"},te),Z?r.createElement(r.Fragment,null,r.createElement("p",{className:"continue-section-body"},r.createElement(a.a,{interpolations:{"#{chevron}":r.createElement(G,{layoutMode:"glyphBox",desiredFontSize:7})}},ne)),r.createElement("p",{className:"continue-section-body"},V)):r.createElement(r.Fragment,null,r.createElement("p",{className:"continue-section-body"},r.createElement("span",null,W),r.createElement("br",null),r.createElement(a.a,{interpolations:{"#{chevron}":r.createElement(G,{layoutMode:"glyphBox",desiredFontSize:7})}},ne),r.createElement("br",null),r.createElement("span",null,q),r.createElement("br",null),r.createElement(a.a,{interpolations:{"#{chevron}":r.createElement(G,{layoutMode:"glyphBox",desiredFontSize:7})}},re)),Q&&r.createElement("p",{className:"continue-section-body"},$)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(1030),i=n(1031);const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=[];for(let i=e;i<=t;i+=n)r.push(i);return r};var a,s;o(0,200,5),o(210,250,10),o(0,200,25),function(e){e[e.PerSession=1]="PerSession",e[e.PerSegment=74]="PerSegment",e[e.PerCall=75]="PerCall"}(a||(a={}));class c{constructor(e){this.webcourier=e,this.type=r.RTCReportingAgentEventTypes.RealTimeEvent}encode(){return{webcourier_reconnect_duration:Math.floor(this.webcourier.duration)}}}!function(e){e[e.VideoOK=0]="VideoOK",e[e.H264VideoCodecNotSupported=1]="H264VideoCodecNotSupported"}(s||(s={}));class u{constructor(e,t,n){this.endReason=e,this.providerEndReason=t,this.error=n,this.dedupe=!0}encode(){const e={endReason:this.endReason};this.providerEndReason&&(e.providerEndReason=this.providerEndReason);const t=this.error;if(t){const n=Object(i.b)(t),r=e;for(const e in n){const t=r[e];t&&null!=t||(r[e]=n[e])}}return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(904),i=n(878),o=n(870),a=n(1260),s=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"chevron.left",svgPath:"M6.25-35.2539C6.25-34.0332 6.68945-32.959 7.61719-32.0312L46.3379 5.81055C47.168 6.68945 48.2422 7.12891 49.5117 7.12891C52.0508 7.12891 54.0039 5.22461 54.0039 2.68555C54.0039 1.41602 53.4668 0.341797 52.6855-0.488281L17.1387-35.2539L52.6855-70.0195C53.4668-70.8496 54.0039-71.9727 54.0039-73.1934C54.0039-75.7324 52.0508-77.6367 49.5117-77.6367C48.2422-77.6367 47.168-77.1973 46.3379-76.3672L7.61719-38.4766C6.68945-37.5977 6.25-36.4746 6.25-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.68503906249998,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.1500244140625 84.8134765625",width:60.1500244140625,height:84.8134765625,translateX:-6.250019531250018,translateY:77.63671875,baseline:77.63671875,capline:7.1767578125}}})},c=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"chevron.right",svgPath:"M66.4551-35.2539C66.4551-36.4746 65.9668-37.5977 65.0391-38.4766L26.3672-76.3672C25.4883-77.1973 24.4141-77.6367 23.1445-77.6367C20.6543-77.6367 18.7012-75.7324 18.7012-73.1934C18.7012-71.9727 19.1895-70.8496 19.9707-70.0195L55.5176-35.2539L19.9707-0.488281C19.1895 0.341797 18.7012 1.41602 18.7012 2.68555C18.7012 5.22461 20.6543 7.12891 23.1445 7.12891C24.4141 7.12891 25.4883 6.68945 26.3672 5.81055L65.0391-32.0312C65.9668-32.959 66.4551-34.0332 66.4551-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.68503906249998,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.2601318359375 84.8134765625",width:60.2601318359375,height:84.8134765625,translateX:-6.194965820312518,translateY:77.63671875,baseline:77.63671875,capline:7.1767578125}}})},u=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"chevron.right",svgPath:"M70.166-35.2539C70.166-37.2559 69.4336-38.916 67.8711-40.4785L30.2734-77.2461C29.0039-78.5156 27.4902-79.1016 25.6836-79.1016C22.0215-79.1016 19.043-76.2207 19.043-72.5586C19.043-70.752 19.8242-69.0918 21.1426-67.7734L54.541-35.3027L21.1426-2.73438C19.8242-1.41602 19.043 0.195312 19.043 2.05078C19.043 5.71289 22.0215 8.64258 25.6836 8.64258C27.4902 8.64258 29.0039 8.00781 30.2734 6.73828L67.8711-30.0293C69.4824-31.5918 70.166-33.252 70.166-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.34328125000002,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 66.9984130859375 87.7451171875",width:66.9984130859375,height:87.7451171875,translateX:-3.167583007812482,translateY:79.1025390625,baseline:79.1025390625,capline:8.642578125}}})},l=function(e){return Object(o.createElement)(a.a,{originalProps:e,metadata:{name:"chevron.left",svgPath:"M5.85938-35.2539C5.85938-33.252 6.5918-31.5918 8.20312-30.0293L45.8008 6.73828C47.0215 8.00781 48.584 8.64258 50.3906 8.64258C54.0527 8.64258 56.9824 5.71289 56.9824 2.05078C56.9824 0.195312 56.25-1.41602 54.9316-2.73438L21.5332-35.3027L54.9316-67.7734C56.25-69.0918 56.9824-70.752 56.9824-72.5586C56.9824-76.2207 54.0527-79.1016 50.3906-79.1016C48.5352-79.1016 47.0215-78.5156 45.8008-77.2461L8.20312-40.4785C6.5918-38.916 5.9082-37.2559 5.85938-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:98.07570312500002,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.1500244140625 87.7451171875",width:60.1500244140625,height:87.7451171875,translateX:-5.859355468749982,translateY:79.1025390625,baseline:79.1025390625,capline:8.642578125}}})};const d=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r.c)(Object(i.b)())?e?l:s:e?u:c}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return T}));var r=n(2249);class i{constructor(e){this.remoteInstanceName=void 0,this.remoteInstanceTitle=void 0,this.src=void 0,this._window=void 0,this.remoteInstanceName=e.remoteInstanceName,this.remoteInstanceTitle=e.remoteInstanceTitle,this.src=e.src}get window(){return this._window}set window(e){this._window=e}open(e){let t;e&&(t=JSON.stringify(e).slice(1,-1).replaceAll('"',"").replaceAll(":","="));const n=Object(r.c)(this.src);this.window=globalThis.window.open(n.toString(),"_blank",t)}close(){const{window:e}=this;e&&e.close()}}var o=n(1274),a=n(1275),s=n(1281),c=n(1286),u=n(1288),l=n(1280),d=n(1283),p=n(1287),f=n(1277),h=n(1282),m=n(2229);const g="REMOTE_INSTANCE_LOAD_TIMEOUT_IDENTIFIER";class v{constructor(){this.invokeLaterSupport=new l.a,this.remoteInstanceStateChanged=new h.a(this),this.remoteInstanceLoadTimeout=3e4,this.delegate=void 0,this.childProcessReferenceClass=d.a,this._channel=void 0,this._childProcessReference=void 0,this._reloadPromise=void 0,this._remoteInstanceState=c.a.NONE,this._remoteInstanceIsReadyToTerminate=!1,this._remoteInstanceTimeoutMethodIdentifers=[g]}get remoteInstanceState(){return this._remoteInstanceState}set remoteInstanceState(e){this._remoteInstanceState=e,this.remoteInstanceStateChanged.dispatch(e)}get remoteInstanceIsReadyToTerminate(){return this._remoteInstanceIsReadyToTerminate}get messagingResponseErrorTerminationMethod(){return this.remoteInstanceDidFatalError}remoteInstanceWillConnect(){}remoteInstanceWillDisconnect(){}loadRemoteInstance(e){var t;Object(c.b)(this.remoteInstanceState,c.a.NONE);const{remoteInstanceLoadTimeout:n,_scheduledTimeoutWasInvokedMethod:r}=this;null===(t=this.delegate)||void 0===t||t.remoteInstanceWillBeginLaunching(this),this._createChildProcessReference(e),this.invokeLaterSupport.invokeLater(r,n,g)}runRemoteInstance(e){Object(c.b)(this.remoteInstanceState,c.a.LOADED);const{_childProcessReference:t,_hostInfo:n,_sessionInfo:r}=this;t.run(r,n,e)}terminateRemoteInstance(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(c.b)(this.remoteInstanceState,c.a.LOADING,c.a.LOADED,c.a.RUNNING,c.a.TERMINATED);const{_channel:t}=this;return this.invokeLaterSupport.cancelInvokeLaterMethods(),this._terminateChildProcessReference(e).then((()=>{t&&!t.isDisconnected&&t.disconnect(),this._channel=void 0}))}reloadRemoteInstance(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this._reloadPromise||Promise.resolve();return this._reloadPromise=t.then((()=>this.terminateRemoteInstance(e))).then((()=>this.loadRemoteInstance()))}remoteInstanceDidFatalError(e,t){return Object(c.b)(this.remoteInstanceState,c.a.LOADING,c.a.LOADED,c.a.RUNNING),t&&!Object(f.d)(t)&&Object(s.b)(new Error("remoteInstanceDidFatalError optional info argument should be a hash")),this._childProcessReference.terminateWithReasonAndInfo(e,t&&t.calleeStack?t:Object(p.a)(t,2))}createMessagingChannel(e,t,n){const{_childProcessReference:r}=this;return r&&r.channel||Object(s.b)(new Error("Unable to connect to child. Can not create MessagingChannel")),r.createMessagingChannel(e,t,n),r.remoteProxy}childProcessReferenceWillFinishLaunching(e,t){var n;null===(n=this.delegate)||void 0===n||n.remoteInstanceWillFinishLaunching(this,t)}childProcessReferenceDidFinishLaunching(e,t){var n;this.invokeLaterSupport.cancelInvokeLater(g),null===(n=this.delegate)||void 0===n||n.remoteInstanceDidFinishLaunching(this,t)}childProcessReferenceDidTerminate(e,t,n){var r;this._cancelAllScheduledTimeoutMethods(),null===(r=this.delegate)||void 0===r||r.remoteInstanceDidTerminate(this,t,n)}childProcessReferenceWantsReload(e){this.reloadRemoteInstance()}childProcessReferenceWillUnload(e,t){}childProcessReferenceReportNonFatalError(e,t,n){}childProcessReferenceRecordException(e,t){}childProcessReferenceIsReadyToTerminateDidChange(e,t){this._remoteInstanceIsReadyToTerminate=t}childProcessReferenceStateDidChange(e,t){this.remoteInstanceState=t}get _childProcessReferences(){return y().childProcessReferences}get _parentProcessId(){return y().processId}get _sessionInfo(){return y().sessionInfo}get _hostInfo(){return y().hostInfo}get _scheduledTimeoutWasInvokedMethod(){return e=>this._scheduledTimeoutWasInvoked(e)}_scheduledTimeoutWasInvoked(e){e===g?this._terminateDueToTimeoutError("Remote instance failed to complete loading before timeout was triggered."):Object(s.b)(new Error(`_scheduledTimeoutWasInvoked called with unknown methodToInvokeIdentifier ${e}`))}_terminateDueToTimeoutError(e){this.remoteInstanceDidFatalError(u.a.TIMEOUT,{errorMessage:e,terminatedProcessState:this.remoteInstanceState})}_pendingTimeoutMethodsAreScheduled(){const{_remoteInstanceTimeoutMethodIdentifers:e}=this;for(const t of e)if(this.invokeLaterSupport.isInvokeLaterScheduled(t))return!0;return!1}_cancelAllScheduledTimeoutMethods(){const{_remoteInstanceTimeoutMethodIdentifers:e}=this;for(const t of e)this.invokeLaterSupport.isInvokeLaterScheduled(t)&&this.invokeLaterSupport.cancelInvokeLater(t)}_createChildProcessReference(e){const{_channel:t,_childProcessReferences:n,_parentProcessId:r,childProcessReferenceClass:i}=this,o=this._childProcessReference=new i;return o.delegate=this,o.processInfo={parentProcessId:r,processId:Object(m.a)(),processName:e},o.channel=t,this.remoteInstanceWillConnect(),o.connect(),n.add(o),o}_terminateChildProcessReference(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this._childProcessReference,r=this._childProcessReferences;return t||!1!==n.isReadyToTerminate||Object(s.b)(new Error("Aborting termination of the ChildProcessReference. It's isReadyToTerminate flag is false")),r.delete(n),n.isConnected?(this.remoteInstanceWillDisconnect(),e=n.disconnect()):e=Promise.resolve(),e.then((()=>{n.isTerminated||n.terminate(),this._childProcessReference=void 0,this.remoteInstanceState=c.a.NONE}))}}function y(){const{Application:e}=n(2183);return e.application}var b=n(1295),w=n(1296),S=n(1297),C=n(2288);class _ extends C.a{constructor(e){super({allowedRemoteOrigins:e.allowedRemoteOrigins,autoconnect:e.autoconnect,remoteOrigin:e.remoteOrigin,outgoingWindow:e.outgoingWindow}),this.onIframeReady=void 0,this._iframe=void 0,this._lastReturnedOutgoingWindowValue=void 0,this._lastOutgoingWindowReturnValueDependencyValue=void 0,this._iframeDidLoad=void 0,this._iframeIsLoaded=new h.a,this.onIframeReady=e.onIframeReady||function(){},this._iframeIsLoaded.addListener(this.outgoingWindowDidChange.bind(this)),this.iframe=e.iframe}set iframe(e){const t=this._iframe;if(e===t)return;this._iframe=e;const n=this._iframeDidLoad;if(t&&e!==t&&(n&&t.removeEventListener("load",n),this._iframeDidLoad=void 0),e){const{outgoingWindow:t}=this;if(t)this.onIframeReady(e);else{const t=this._iframeDidLoad=()=>{this._iframeDidLoad&&e.removeEventListener("load",this._iframeDidLoad),this._iframeDidLoad=void 0,this._iframeIsLoaded.dispatch(),this.onIframeReady(e)};e.addEventListener("load",t)}}this.outgoingWindowDidChange()}get iframe(){return this._iframe}get outgoingWindow(){var e;const t=null===(e=this.iframe)||void 0===e?void 0:e.contentWindow;return this._lastOutgoingWindowReturnValueDependencyValue===(this._lastOutgoingWindowReturnValueDependencyValue=t)?this._lastReturnedOutgoingWindowValue:this._lastReturnedOutgoingWindowValue=t?{actualOutgoingWindow:t,postMessage(e,t){const{actualOutgoingWindow:n}=this;if(n.postMessage)return n.postMessage(e,t)}}:null}}class O extends C.a{constructor(e){super({allowedRemoteOrigins:e.allowedRemoteOrigins,autoconnect:e.autoconnect,remoteOrigin:e.remoteOrigin,outgoingWindow:e.outgoingWindow}),this._lastReturnedOutgoingWindowValue=void 0,this._lastOutgoingWindowReturnValueDependencyValue=void 0,this._remoteWindowDidLoad=void 0,this._remoteWindow=void 0,this.remoteWindow=e.remoteWindow}set remoteWindow(e){const t=this._remoteWindow;if(window===t)return;this._remoteWindow=e;const n=this._remoteWindowDidLoad;if(t&&e!==t&&n&&t.removeEventListener("load",n),e){const{outgoingWindow:e}=this;if(!e){const e=this._remoteWindowDidLoad=()=>{this._remoteWindowDidLoad&&window.removeEventListener("load",this._remoteWindowDidLoad),this._remoteWindowDidLoad=void 0};window.addEventListener("load",e)}}this.outgoingWindowDidChange()}get remoteWindow(){return this._remoteWindow}get outgoingWindow(){const e=this._remoteWindow;return this._lastOutgoingWindowReturnValueDependencyValue===(this._lastOutgoingWindowReturnValueDependencyValue=e)?this._lastReturnedOutgoingWindowValue:this._lastReturnedOutgoingWindowValue=e?{actualOutgoingWindow:e,postMessage(e,t){const{actualOutgoingWindow:n}=this;if(n.postMessage)return n.postMessage(e,t)}}:null}}const E="IS_READY_TO_BE_DISPLAYED_TIMEOUT_IDENTIFIER";class I{cancel(){const{operationResolve:e}=this;e(new o.a({status:a.a.CANCELED}))}constructor(e){this.targetUIStateWhenFinished=void 0,this.operationPromise=void 0,this.operationResolve=void 0,this.targetUIStateWhenFinished=e.targetUIStateWhenFinished,this.operationPromise=e.operationPromise,this.operationResolve=e.operationResolve}}let A=function(e){return e[e.IFRAME=0]="IFRAME",e[e.WINDOW=1]="WINDOW",e}({});class T extends v{constructor(e){super(),this.delegate=void 0,this.allowedRemoteOrigins=void 0,this.remoteOrigin=void 0,this.url=void 0,this.remoteInstanceName=void 0,this.remoteInstanceTitle=void 0,this.remoteInstanceIsReadyToBeDisplayedTimeout=2e4,this.enableSpinnerViewForRemoteInstance=!0,this.displayMedium=A.IFRAME,this.windowParameters=void 0,this.launchRoute=void 0,this._isConnected=!1,this.iframe=void 0,this.applicationWindow=void 0,this._remoteUIState=b.a.NONE,this._willEnterForegroundPromise=void 0,this._willEnterForegroundResolve=void 0,this._inProgressUIStateTransitionsOperation=void 0,this._pendingUIStateTransitionsOperation=void 0,this.allowedRemoteOrigins=e.allowedRemoteOrigins,this.url=e.url,this.remoteInstanceName=e.remoteInstanceName,this.remoteInstanceTitle=e.remoteInstanceTitle,this.remoteOrigin=Object(r.c)(e.url).origin,this.launchRoute=e.launchRoute,this._remoteInstanceTimeoutMethodIdentifers=[...this._remoteInstanceTimeoutMethodIdentifers,E]}get remoteUIState(){return this._remoteUIState}set remoteUIState(e){this._remoteUIState=e}get isConnected(){return this._isConnected}set isConnected(e){!this.isConnected&&e?(this._isConnected=!0,this.connectedCallback()):this.isConnected&&!e&&(this._isConnected=!1,this.disconnectedCallback())}connectedCallback(){this.loadRemoteInstance()}disconnectedCallback(){this.terminateRemoteInstance(!0)}remoteInstanceWillConnect(){this.createMessagingChannel(w.a,this,S.a)}loadRemoteInstance(){const{url:e,remoteInstanceName:t,remoteInstanceTitle:n,allowedRemoteOrigins:o,windowParameters:a}=this,s=Object(r.c)(e).origin;if(this.displayMedium===A.IFRAME&&this.iframe){const r=this.iframe;null===r||void 0===r||r.setAttribute("data-name",null!==t&&void 0!==t?t:""),null===r||void 0===r||r.setAttribute("data-title",null!==n&&void 0!==n?n:""),this._channel=new _({allowedRemoteOrigins:o,iframe:r,remoteOrigin:s}),r.src.split("#",1)[0]!==e.split("#",1)[0]&&(r.src=`${e}#launchRoute=${encodeURIComponent(this.launchRoute||window.location.href)}`,"early-child"===r.id&&"__data"in r)&&(r.__data.onHydrate(),delete r.__data)}else{const r=new i({remoteInstanceName:t,remoteInstanceTitle:n,src:e});r.open(a),this.applicationWindow=r;const c=r.window;c&&(this._channel=new O({allowedRemoteOrigins:o,remoteWindow:c,remoteOrigin:s}))}super.loadRemoteInstance(t)}terminateRemoteInstance(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._willEnterForegroundResolve&&(this._willEnterForegroundResolve(new o.a({status:a.a.DISCONNECTED})),this._willEnterForegroundPromise=void 0,this._willEnterForegroundResolve=void 0),this._inProgressUIStateTransitionsOperation&&(this._inProgressUIStateTransitionsOperation.cancel(),this._inProgressUIStateTransitionsOperation=void 0),this._pendingUIStateTransitionsOperation&&(this._pendingUIStateTransitionsOperation.cancel(),this._pendingUIStateTransitionsOperation=void 0),this._channel&&!this._channel.isDisconnected&&this._channel.disconnect();const{iframe:t,applicationWindow:n}=this;return n?n.close():t&&(this.iframe=document.createElement("iframe")),this.remoteUIState=b.a.NONE,super.terminateRemoteInstance(e)}transitionRemoteInstanceToActiveForeground(){var e;let t;Object(c.b)(this.remoteInstanceState,c.a.RUNNING);const n=new Promise((e=>{t=e})),r=new I({targetUIStateWhenFinished:b.a.ACTIVE_FOREGROUND,operationPromise:n,operationResolve:t});return null===(e=this.iframe)||void 0===e||null===(e=e.contentWindow)||void 0===e||e.focus(),this._performUIStateTransitionsOperation(r),r.operationPromise}transitionRemoteInstanceToInactiveForeground(){let e;Object(c.b)(this.remoteInstanceState,c.a.RUNNING);const t=new Promise((t=>{e=t})),n=new I({targetUIStateWhenFinished:b.a.INACTIVE_FOREGROUND,operationPromise:t,operationResolve:e});return this._performUIStateTransitionsOperation(n),n.operationPromise}transitionRemoteInstanceToBackground(){let e;Object(c.b)(this.remoteInstanceState,c.a.RUNNING);const t=new Promise((t=>{e=t})),n=new I({targetUIStateWhenFinished:b.a.BACKGROUND,operationPromise:t,operationResolve:e});return this._performUIStateTransitionsOperation(n),n.operationPromise}isReadyToBeDisplayed(){Object(c.b)(this.remoteInstanceState,c.a.RUNNING);const{_willEnterForegroundResolve:e}=this;if(!e)throw new Error("isReadyToBeDisplayed missing willEnterForegroundPromise instance");this._willEnterForegroundPromise=void 0,this._willEnterForegroundResolve=void 0,this._cancelAllScheduledTimeoutMethods(),e(new o.a({status:a.a.OK}))}_performUIStateTransitionsOperation(e){Object(c.b)(this.remoteInstanceState,c.a.RUNNING);const{remoteUIState:t}=this,{targetUIStateWhenFinished:n,operationResolve:r}=e;if(this._inProgressUIStateTransitionsOperation)this._pendingUIStateTransitionsOperation&&this._pendingUIStateTransitionsOperation.cancel(),this._pendingUIStateTransitionsOperation=e;else if(Object(b.c)(t,n))console.warn(`_performUIStateTransitionsOperation: remote instance is already in target UIState ${n}`),r(new o.a({status:a.a.OK}));else{this._inProgressUIStateTransitionsOperation=e;const t=this._getUIStateTransitionsFor(n);this._performUIStateTransitions(t,r).then((e=>{const t=this._pendingUIStateTransitionsOperation;this._inProgressUIStateTransitionsOperation=void 0,this._pendingUIStateTransitionsOperation=void 0,e.isOK&&t&&this.invokeLaterSupport.invokeLater((()=>this._performUIStateTransitionsOperation(t)))}))}}_performUIStateTransitions(e,t){Object(c.b)(this.remoteInstanceState,c.a.RUNNING);let n=Promise.resolve(new o.a({status:a.a.OK}));for(const r of e)n=n.then((e=>e.isOK?this._performUIStateTransition(r):e));return n.then((e=>(t(e),e)))}childProcessReferenceIsReadyToTerminateDidChange(e,t){var n;super.childProcessReferenceIsReadyToTerminateDidChange(e,t),null===(n=this.delegate)||void 0===n||n.remoteInstanceIsReadyToTerminateDidChange(this,t)}childProcessReferenceDidFinishLaunching(e,t){this.invokeLaterSupport.isInvokeLaterScheduled(g)||(this.remoteUIState=b.a.NONE,this.invokeLaterSupport.invokeLater((()=>{}),3e4,g)),super.childProcessReferenceDidFinishLaunching(e,t)}_performUIStateTransition(e){const{_childProcessReference:t}=this,{remoteMethodName:n,targetUIState:r,setUIStateBeforeMethodCall:i}=e,o=()=>{var o;i&&(this.remoteUIState=r);const a=null===t||void 0===t||null===(o=t.remoteProxy)||void 0===o?void 0:o[n];if(e===R){const{remoteInstanceIsReadyToBeDisplayedTimeout:e,_scheduledTimeoutWasInvokedMethod:t}=this;return this.invokeLaterSupport.invokeLater(t,e,E),a().then((e=>e.isOK?(this._willEnterForegroundPromise=new Promise((e=>{this._willEnterForegroundResolve=e})),this._willEnterForegroundPromise):e))}return e===k?a().then((e=>(this._pendingTimeoutMethodsAreScheduled()&&e.isOK&&this._cancelAllScheduledTimeoutMethods(),e))):a()};return Promise.resolve().then((()=>this._animateViewToTargetRemoteUIState(r))).then((()=>o())).then((e=>(e.isOK&&!i&&(this.remoteUIState=r),e)))}_getUIStateTransitionsFor(e){const{remoteUIState:t}=this,n=[];if(Object(b.c)(e,b.a.BACKGROUND))Object(b.c)(t,b.a.ACTIVE_FOREGROUND)&&n.push(M),n.push(k);else if(Object(b.c)(e,b.a.INACTIVE_FOREGROUND))Object(b.c)(t,b.a.NONE,b.a.BACKGROUND)?n.push(R):Object(b.c)(t,b.a.ACTIVE_FOREGROUND)&&n.push(M);else{if(!Object(b.c)(e,b.a.ACTIVE_FOREGROUND))throw new Error(`Invalid => no support for transitioning to ${e}`);Object(b.c)(t,b.a.NONE,b.a.BACKGROUND)&&n.push(R),n.push(D)}return n}_scheduledTimeoutWasInvoked(e){e===E?this._terminateDueToTimeoutError("Remote instance failed to send the isReadyToBeDisplayed message before timeout was triggered."):super._scheduledTimeoutWasInvoked(e)}_animateViewToTargetRemoteUIState(e){}}class P{constructor(e){var t;this.remoteMethodName=void 0,this.targetUIState=void 0,this.setUIStateBeforeMethodCall=void 0,this.remoteMethodName=e.remoteMethodName,this.targetUIState=e.targetUIState,this.setUIStateBeforeMethodCall=null!==(t=e.setUIStateBeforeMethodCall)&&void 0!==t&&t}}const R=new P({remoteMethodName:"willEnterForeground",targetUIState:b.a.INACTIVE_FOREGROUND}),k=new P({remoteMethodName:"didEnterBackground",targetUIState:b.a.BACKGROUND,setUIStateBeforeMethodCall:!0}),D=new P({remoteMethodName:"didBecomeActive",targetUIState:b.a.ACTIVE_FOREGROUND,setUIStateBeforeMethodCall:!0}),M=new P({remoteMethodName:"willResignActive",targetUIState:b.a.INACTIVE_FOREGROUND})},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O}));var r=n(1284),i=n(1274),o=n(1275),a=n(1283),s=n(1286),c=n(1288),u=n(1276),l=n(1287);let d=function(e){return e[e.EXIT_NON_FATAL=0]="EXIT_NON_FATAL",e[e.EXIT_FATAL_ERROR=1]="EXIT_FATAL_ERROR",e[e.EXIT_STARTUP_ERROR=2]="EXIT_STARTUP_ERROR",e[e.EXIT_PCS_MISSING=3]="EXIT_PCS_MISSING",e[e.EXIT_PCS_INVALID=4]="EXIT_PCS_INVALID",e}({});var p=n(2245),f=n(2164),h=n(1285);class m extends f.a{_constructRPCMethodName(e,t){return t}_createJsonRpcListener(e){const t=super._createJsonRpcListener(e);return t.serializer=new g,t}_createJsonRpcCaller(e){const t=super._createJsonRpcCaller(e);return t.serializer=new g,t}}class g extends h.a{constructor(){super(...arguments),this.isWindowApplicationMessage=!1}encode(e){if("string"===typeof e)return e;try{const{method:t,params:n,result:r}=e;let i;if(t)i={methodName:t,args:n||[],id:e.id,isCloudOSMessage:!0},this.isWindowApplicationMessage&&(i.isWindowApplicationMessage=!0);else if(r){const{data:t}=r,n=[e.id];Array.isArray(t)?n.push(...t):t&&n.push(t),i={methodName:"RPC_RESPONSE",args:n,id:e.id,isCloudOSMessage:!0}}e=JSON.stringify(i)}catch(t){throw new Error("[LegacyCloudOSJsonSerializer] Could not encode object to JSON.")}return e}decode(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){e=null}if(e&&e.isCloudOSMessage){const{args:t,buildNumber:n,id:r,masteringNumber:i,methodName:o}=e,a=t?Array.from(t):[],s={buildNumber:n,masteringNumber:i};a.unshift(s),e={method:o,id:r,params:a,jsonrpc:"2.0"}}return e}}let v=function(e){return e[e.LOAD_REASON_USER_CLICK=1]="LOAD_REASON_USER_CLICK",e[e.LOAD_REASON_LOCATION_HASH=2]="LOAD_REASON_LOCATION_HASH",e[e.LOAD_REASON_APP_SWITCH=3]="LOAD_REASON_APP_SWITCH",e[e.LOAD_REASON_NOTIFICATION=4]="LOAD_REASON_NOTIFICATION",e[e.LOAD_REASON_RELOAD=5]="LOAD_REASON_RELOAD",e[e.LOAD_REASON_SHARE_ACCEPTED=6]="LOAD_REASON_SHARE_ACCEPTED",e[e.LOAD_REASON_APP_REPLACED=7]="LOAD_REASON_APP_REPLACED",e}({});var y=n(2213);let b=function(e){return e.USER_INITIATED="USER_INITIATED",e.UNCAUGHT_EXCEPTION="UNCAUGHT_EXCEPTION",e.LAUNCH_DEPENDENCY_UNAVAILABLE="LAUNCH_DEPENDENCY_UNAVAILABLE",e.CANNOT_LOAD_STARTUP_DATA="CANNOT_LOAD_STARTUP_DATA",e.TIMEOUT="TIMEOUT",e.MESSAGING_TIMEOUT="MESSAGING_TIMEOUT",e.DISCONNECTED="DISCONNECTED",e.BROWSER_UNSUPPORTED="BROWSER_UNSUPPORTED",e.PCS_REQUIRED="PCS_REQUIRED",e}({});const w=new r.a("MessagingFromLegacyCloudOSApplicationProtocol",new Set(["applicationIsReady","appWillUnload","exit","handleApplicationCrash","isReadyToTerminateDidChange","relayKeyboardShortcut","relayMouseMove","reload","reloadWhenCanTerminate"])),S=new r.a("MessagingToLegacyCloudOSApplicationProtocol",new Set(["_applicationShouldInvokeMain","_clearUserState","_cloudOSStateChange","_hasReceivedFocus","_mouseMove","_mouseUp","_sleep","_wake","applicationWillBecomeActive","applicationDidBecomeActive","applicationWillSuspend","applicationDidSuspend","routeDidChange"])),C=new i.a({status:o.a.OK});function _(){return Promise.resolve(C)}class O extends a.a{constructor(){super(...arguments),this.legacyMessagingChannelClass=m,this.applicationInfo=void 0,this.applicationConfiguration=void 0,this.historyState=void 0,this.messagingFromUIChildDelegate=void 0,this.iframe=void 0,this.applicationWindow=void 0,this.remoteOrigin=void 0,this.connectionTimeout=3e4,this.isLegacyApplication=!1,this._legacyMessagingChannel=null,this.legacyChannelLocalProtocol=w,this.legacyChannelRemoteProtocol=S}createLegacyMessagingChannel(){const{legacyChannelLocalProtocol:e,legacyChannelLocalProtocolTarget:t,legacyChannelRemoteProtocol:n,connectionTimeout:r,legacyMessagingChannelClass:i}=this;return this._legacyMessagingChannel=this.createMessagingChannel(e,t,n,r,i),this._isReadyToTerminate=!0,this._legacyMessagingChannel}get legacyChannelLocalProtocolTarget(){return this}sendInvokeMainMessage(e){var t,n;const{applicationInfo:r,applicationConfiguration:i,historyState:o,remoteProxy:a,_legacyMessagingChannel:s}=this,c=p.a.getCloudOSActions(),u=null===(t=e.applicationContext)||void 0===t?void 0:t.launchSource,l=null===(n=e.applicationContext)||void 0===n?void 0:n.launchItem,d=(null===u||void 0===u?void 0:u.reason)||v.LOAD_REASON_USER_CLICK,f=p.a.getCloudOSState(r,i,o,l,d);s&&(null===a||void 0===a||a._applicationShouldInvokeMain(c,f,d))}beginLaunching(){if(this.isLegacyApplication)return _();throw new Error('unimplemented: ChildProcessReferenceWithMultipleChannels.beginLaunching for "non-legacy" applications')}hostingStateDidChange(e,t){if(this.isLegacyApplication){const{applicationInfo:e,applicationConfiguration:t,historyState:n,remoteProxy:r}=this,i=p.a.getCloudOSState(e,t,n);return null===r||void 0===r||r._cloudOSStateChange(i),null===r||void 0===r||r.routeDidChange(i.route,i.routeHash),_()}throw new Error('unimplemented: ChildProcessReferenceWithMultipleChannels.hostingStateDidChange for "non-legacy" applications')}openItems(e){if(this.isLegacyApplication)return _();throw new Error('unimplemented: ChildProcessReferenceWithMultipleChannels.openItems for "non-legacy" applications')}applicationIsReady(e,t){this.isLegacyApplication=!0,Object(s.c)(this.processState,s.a.LOADED,s.a.RUNNING)?console.warn("ChildProcessReferenceWithMultipleChannels did receive redundant `applicationIsReady` message"):(this.isReadyToReceiveMessages(),this.invokeLaterSupport.invokeLater((()=>{this.didFinishLaunching(t)})),this._mapProcessKitLifeCycleMethods(),this.primaryMessagingChannel.stop())}appWillUnload(e,t){this.willUnload(t)}handleApplicationCrash(e,t,n){var r,i,o,a,s,u;this.terminateWithReasonAndInfo(c.a.UNCAUGHT_EXCEPTION,{buildInfo:{buildNumber:null!==(r=null===t||void 0===t?void 0:t.buildNumber)&&void 0!==r?r:"MISSING",masteringNumber:null!==(i=null===t||void 0===t?void 0:t.masteringNumber)&&void 0!==i?i:"MISSING",locale:null!==(o=null===t||void 0===t?void 0:t.locale)&&void 0!==o?o:"MISSING"},stack:null!==(a=null===t||void 0===t?void 0:t.stack)&&void 0!==a?a:"MISSING",context:n,lineNumber:null!==(s=null===t||void 0===t?void 0:t.line)&&void 0!==s?s:"MISSING",message:null!==(u=null===t||void 0===t?void 0:t.error)&&void 0!==u?u:"MISSING",type:c.a.UNCAUGHT_EXCEPTION})}isReadyToTerminateDidChange(){this.isLegacyApplication?super.isReadyToTerminateDidChange(arguments.length<=1?void 0:arguments[1]):super.isReadyToTerminateDidChange(arguments.length<=0?void 0:arguments[0])}exit(e,t,n){let r;switch(t){case d.EXIT_NON_FATAL:r=b.USER_INITIATED;break;case d.EXIT_STARTUP_ERROR:r=b.CANNOT_LOAD_STARTUP_DATA;break;case d.EXIT_PCS_MISSING:case d.EXIT_PCS_INVALID:r=b.PCS_REQUIRED;break;case d.EXIT_FATAL_ERROR:default:r=b.UNCAUGHT_EXCEPTION}const i=new Error,o=Object(u.b)(i),a={stack:Object(l.b)(i.stack,0),context:n,message:r,lineNumber:o,buildInfo:e};this.terminateWithReasonAndInfo(r,a)}reload(e){this.wantsReload()}relayKeyboardShortcut(){}relayMouseMove(){}reloadWhenCanTerminate(){}isReadyToReceiveMessages(){Object(s.c)(this.processState,s.a.LOADED,s.a.RUNNING,s.a.TERMINATED)||(super.isReadyToReceiveMessages(),this._legacyMessagingChannel&&!this.isLegacyApplication&&(this._legacyMessagingChannel.stop(),this._legacyMessagingChannel=null,y.b.setupAdditionalServices(this,this.applicationConfiguration,this.historyState)))}didBecomeActive(){const{remoteProxy:e}=this;return null===e||void 0===e||e.applicationWillBecomeActive(),null===e||void 0===e||e.applicationDidBecomeActive(),_()}willResignActive(){const{remoteProxy:e}=this;return null===e||void 0===e||e.applicationWillSuspend(),null===e||void 0===e||e.applicationDidSuspend(),_()}willEnterForeground(){return this.invokeLaterSupport.invokeLater((()=>{const{messagingFromUIChildDelegate:e}=this;if(!e)throw new Error("ChildProcessReferenceWithMultipleChannels: missing messagingFromUIChildDelegate");e.isReadyToBeDisplayed()})),_()}didEnterBackground(){return _()}didReceiveSyntheticBrowserEvent(){return _()}_mapProcessKitLifeCycleMethods(){const{remoteProxy:e}=this;e.beginLaunching=this.beginLaunching.bind(this),e.hostingStateDidChange=this.hostingStateDidChange.bind(this),e.openItems=this.openItems.bind(this),e.didBecomeActive=this.didBecomeActive.bind(this),e.willResignActive=this.willResignActive.bind(this),e.willEnterForeground=this.willEnterForeground.bind(this),e.didEnterBackground=this.didEnterBackground.bind(this),e.didReceiveSyntheticBrowserEvent=this.didReceiveSyntheticBrowserEvent.bind(this)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return _}));var r=n(970),i=n(1209),o=n(898),a=n(924),s=n(973);function c(e){const t=e[1],n=e[2]-1,r=e[3],i=e[4],o=e[5],a=new Date;return a.setFullYear(t),a.setMonth(n,r),a.setHours(i),a.setMinutes(o),a.setSeconds(0),a.setMilliseconds(0),a}function u(e){const t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return`${t.toString()}-${n<10?`0${n}`:`${n}`}-${r<10?`0${r}`:`${r}`}`}var l=n(888);const d=l.z.object({allDay:l.z.boolean().optional(),duration:l.z.number().optional(),guid:l.z.string(),localStartDate:l.z.number().array().optional(),localEndDate:l.z.number().array().optional(),endDate:l.z.number().array().optional(),startDate:l.z.number().array(),location:l.z.string().optional(),messageType:l.z.string(),pGuid:l.z.string(),startDateIsAllDay:l.z.boolean().optional(),tz:l.z.string().nullable(),triggerDate:l.z.number().array(),title:l.z.string()}),p=l.z.object({AlarmTrigger:d.array().optional()});async function f(e,t,n,r){try{return(await s.a.fetchURL(Object(a.a)(e,{lang:r,usertz:n}),{method:"POST",body:JSON.stringify({guid:t.guid,pGuid:t.pGuid})})).ok}catch{return!1}}async function h(e,t,n,r,i,o){const l=await s.a.fetchJSON(Object(a.a)(e,{startDate:u(t),endDate:u(n),lang:i,usertz:r}),{validate:{type:"WireAlarmTriggersResponse",schema:p}});if(!l.ok)return null;const{AlarmTrigger:d=[]}=l.value;return d.map((e=>function(e,t){var n,r,i,o,a,s,u;return{applicationIdentifier:t,allDay:null!==(n=e.allDay)&&void 0!==n&&n,duration:null!==(r=e.duration)&&void 0!==r?r:0,guid:e.guid,localStartDate:c(null!==(i=e.localStartDate)&&void 0!==i?i:e.startDate),localEndDate:c(null!==(o=null!==(a=e.localEndDate)&&void 0!==a?a:e.localStartDate)&&void 0!==o?o:e.startDate),startDate:c(e.startDate),location:null!==(s=e.location)&&void 0!==s?s:"",messageType:e.messageType,pGuid:e.pGuid,startDateIsAllDay:!!e.startDateIsAllDay,timeZone:null!==(u=e.tz)&&void 0!==u?u:void 0,triggerDate:c(e.triggerDate),title:e.title}}(e,o)))}var m,g=n(1247),v=n(2191),y=n(1350),b=n(2248);function w(){const e=[];for(const t of g.a.sharedInstance.displayOrder)e.push(t.identifier);_.sharedInstance.scheduleAlarms(e)}function S(){const e="US/Pacific";try{var t;return null!==(t=(new Intl.DateTimeFormat).resolvedOptions().timeZone)&&void 0!==t?t:e}catch(n){return e}}function C(){return o.a.locale}class _{constructor(){this.fetchCalendarAlarmsPromise=null,this.fetchCalendarAlarmsResolve=null,this.fetchRemindersAlarmsPromise=null,this.fetchRemindersAlarmsResolve=null,this.firedAlarms=[],this.scheduledCalendarAlarms=new Map,this.scheduledReminderAlarms=new Map}async scheduleAlarms(e){const t=(async t=>{const n=r.d.identifier;if(!e.includes(n))return!1;if(!Object(b.g)("calendar"))return!1;null===(t=this.fetchCalendarAlarmsResolve)||void 0===t||t.call(this,null),this.fetchCalendarAlarmsPromise=null,this.scheduledCalendarAlarms.forEach((e=>window.clearTimeout(e))),this.scheduledCalendarAlarms.clear(),this.fetchCalendarAlarmsPromise=function(){const e=new Date,t=new Date;return t.setHours(e.getHours()+24),h(Object(b.j)("calendar","ca/alarmtriggers/"),e,t,S(),C(),r.d.identifier)}();const i=await this.fetchCalendarAlarmsPromise;return!!i&&(this.scheduleTimeouts(i,this.scheduledCalendarAlarms),!0)})(),n=(async t=>{const n=i.b.identifier;if(!e.includes(n))return!1;if(!Object(b.g)("reminders"))return!1;null===(t=this.fetchRemindersAlarmsResolve)||void 0===t||t.call(this,null),this.fetchRemindersAlarmsPromise=null,this.scheduledReminderAlarms.forEach((e=>window.clearTimeout(e))),this.scheduledReminderAlarms.clear(),this.fetchRemindersAlarmsPromise=function(){const e=new Date,t=new Date;return t.setHours(e.getHours()+24),h(Object(b.j)("reminders","rd/alarmtriggers/"),e,t,S(),C(),i.b.identifier)}();const r=await this.fetchRemindersAlarmsPromise;return!!r&&(this.scheduleTimeouts(r,this.scheduledReminderAlarms),!0)})(),[o,a]=await Promise.all([t,n]);return o&&a}async acknowledgeAlarm(e){switch(e.applicationIdentifier){case r.d.identifier:return f(Object(b.j)("calendar","ca/acknowledgealarm/"),e,S(),C());case i.b.identifier:{const t=Object(b.j)("reminders","rd/acknowledgealarm/"),n=await f(t,e,S(),C());return this.scheduleAlarms([i.b.identifier]),n}default:return!1}}async snoozeAlarm(e){const t=(()=>{switch(e.applicationIdentifier){case r.d.identifier:return Object(b.j)("calendar","ca/snoozealarm/");case i.b.identifier:return Object(b.j)("reminders","rd/snoozealarm/");default:return null}})();return null!==t&&f(t,e,S(),C())}scheduleTimeouts(e,t){const n=Date.now(),r=this.firedAlarms;for(const a of e){let e=!1;for(const t of r)if((i=a)===(o=t)||i.applicationIdentifier===o.applicationIdentifier&&i.allDay===o.allDay&&i.duration===o.duration&&i.guid===o.guid&&i.location===o.location&&i.messageType===o.messageType&&i.pGuid===o.pGuid&&i.startDateIsAllDay===o.startDateIsAllDay&&i.timeZone===o.timeZone&&i.title===o.title&&i.localStartDate.getTime()===o.localStartDate.getTime()&&i.localEndDate.getTime()===o.localEndDate.getTime()){e=!0;break}if(e)continue;const{triggerDate:s,localEndDate:c,startDate:u}=a,l=c||u,d=3e4;if(!l||l.getTime()+d<n)continue;const p=s.getTime()-n;if(p>0&&p<=2147483647){const e=window.setTimeout((()=>{const e=g.a.sharedInstance.getApplicationConfiguration(a.applicationIdentifier);e&&(v.a.sharedInstance.enqueue({notificationType:y.a.ALARM,applicationInfo:e.applicationInfo,applicationConfiguration:e,alarmTrigger:a,isDismissable:!1,omitWhenActive:!1}),t.delete(a),this.firedAlarms.push(a))}),p);t.set(a,e)}}var i,o}}m=_,_.sharedInstance=new m},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(870),i=n(2241),o=n(1350),a=n(2259),s=n(925),c=n(898),u=n(1215),l=n.n(u),d=n(2132);function p(e){var t;const n=e.notification,i=n.applicationInfo,o=r.createElement(d.a,{applicationIdentifier:i.configuration.identifier,iconSize:44}),u=function(e){const t=c.a.locale,n=e.localStartDate,r=(t=>{const n=(null!==(t=e.title)&&void 0!==t?t:"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return n.length>40?n.substring(0,40)+"\u2026":n})();if(!n)return r;const i=new Date,o=i.getDate(),a=i.getMonth()+1,u=i.getFullYear(),l=new Date(u,a-1,o,0,0,0,0),d=l.getTime();l.setHours(l.getHours()+24);const p=l.getTime();l.setHours(l.getHours()+24);const f=l.getTime(),h=n,m=h.getTime(),g=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"numeric"}).format(h);if(m>=d&&m<p)return Object(s.a)("Notification.Alarm.Today.Message",{eventTitle:r,time:g});if(m>=p&&m<f)return Object(s.a)("Notification.Alarm.Tomorrow.Message",{eventTitle:r,time:g});if(m>=f){const e=new Intl.DateTimeFormat(t,{month:"numeric",day:"numeric",year:"numeric"}).format(h);return Object(s.a)("Notification.Alarm.Future.Message",{eventTitle:r,date:e,time:g})}return console.warn(`This alarm with guid [${e.guid}] is for a past alarm and it should not have been returned in the fetch call.`),r}(n.alarmTrigger),p=n.alarmTrigger.location;return r.createElement("div",{"aria-hidden":null!==(t=e.ariaHidden)&&void 0!==t&&t,className:l()("notification-component",e.className)},r.createElement("div",{className:"notification-component-inner"},r.createElement(a.a,{variant:"notification-activate-button",onActivate:()=>{e.onClick()}},r.createElement("div",{className:"notification-icon"},o),r.createElement("div",{className:"notification-info"},r.createElement("span",{className:"title"},u),r.createElement("span",{className:"description"},p))),r.createElement(a.a,{variant:"alarm-actions",onActivate:()=>{e.onSnooze()}},Object(s.a)("Notification.Alarm.Snooze.Title")),r.createElement(a.a,{variant:"alarm-actions",onActivate:()=>{e.onDismiss()}},Object(s.a)("Notification.Alarm.Dismiss.Title"))))}var f=n(1248),h=n(1351);function m(e){var t,n,i,o,c;const u=e.notification,p=u.applicationConfiguration,m=p.identifier,g=null!==(t=null===(n=u.pushNotification.notification)||void 0===n?void 0:n.title)&&void 0!==t?t:Object(f.e)(p),v=null!==(i=null===(o=u.pushNotification.notification)||void 0===o?void 0:o.description)&&void 0!==i?i:"mail"===m?Object(s.a)("Notification.PlaceholderDescription.mail"):"",y=Object(s.a)("Notification.Push.AccessibilityLabel",{applicationName:g});return r.createElement("div",{role:"region","aria-hidden":null!==(c=e.ariaHidden)&&void 0!==c&&c,className:l()("notification-component",e.className),"aria-label":Object(s.a)("VoiceOver.Notification.Push.Heading"),"aria-live":"polite"},r.createElement("div",{className:"notification-component-inner"},r.createElement(a.a,{variant:"notification-activate-button",ariaLabel:y,onActivate:e.onClick},r.createElement("div",{className:"notification-icon"},r.createElement(d.a,{iconSize:44,applicationIdentifier:p.identifier})),r.createElement("div",{className:"notification-info"},r.createElement("span",{className:"title"},g),r.createElement("span",{className:"description"},v))),r.createElement(a.a,{variant:"notification-close-button",ariaLabel:Object(s.a)("Notification.Alarm.Dismiss.Title"),onActivate:e.onClose},r.createElement(h.a,{"aria-hidden":!0,desiredFontSize:14}))))}var g,v=n(2161),y=n(2190),b=n(1264),w=n(1265),S=n(2134);class C{constructor(){this.notificationQueue=[],this.notification=null,this.timeout=void 0}enqueue(e){const t=this.notificationQueue;t.push(e),1===t.length&&this.displayNotification()}removeNotificationForChildApplication(e){const t=this.notification;t&&t.applicationConfiguration.identifier===e&&this.removeNotification(t)}displayNotification(){const e=this.notificationQueue,t=i.a.sharedInstance.applicationIdentifier,n=(()=>{if(!t)return e.length>0?e[0]:null;for(const n of e)if(n.applicationConfiguration.identifier!==t||!n.omitWhenActive)return n;return null})();if(!n)return;if(n.notificationType===o.a.ALARM){const e=r.createElement(p,{notification:n,onClick:()=>{const e=n.applicationConfiguration;this.notificationDidClick(this,e.identifier,n)},onDismiss:()=>{this.removeNotification(n),y.a.sharedInstance.acknowledgeAlarm(n.alarmTrigger)},onSnooze:()=>{this.removeNotification(n),y.a.sharedInstance.snoozeAlarm(n.alarmTrigger)}});return void S.a.cloudOSApplication.showNotification(this,e)}const a=r.createElement(m,{notification:n,onClick:()=>{window.clearTimeout(this.timeout);const e=n.applicationConfiguration;this.notificationDidClick(this,e.identifier,n),this.removeNotification(n)},onClose:()=>{window.clearTimeout(this.timeout),this.removeNotification(n)}});S.a.cloudOSApplication.showNotification(this,a),this.timeout=window.setTimeout((()=>{this.removeNotification(n)}),8e3)}async removeNotification(e){await S.a.cloudOSApplication.removeNotification(this),this.notification=null;const t=this.notificationQueue,n=t.indexOf(e);t.splice(n,1),t.length>0&&this.displayNotification()}notificationDidClick(e,t,n){const r=this.launchItemFromNotification(n);b.a.sharedInstance.switchToApplication(t,{source:{reason:w.b.NOTIFICATION},launchItem:r})}launchItemFromNotification(e){if(!e)return e;if(e.notificationType===o.a.PUSH){const{pushNotification:r}=e;var t;if("calendar"===r.applicationIdentifier)return{id:r.payload.pGuid,calendarId:r.payload.collectionGuid,title:null===(t=r.notification)||void 0===t?void 0:t.title,allDay:!1,eventState:0};if(r.topic===v.c){var n;const e=null===r||void 0===r||null===(n=r.payload)||void 0===n?void 0:n.mail;if(e)return{folder:null===e||void 0===e?void 0:e.folder,threadId:null===e||void 0===e?void 0:e.threadId,totalMessages:null===e||void 0===e?void 0:e.totalMessages,uid:null===e||void 0===e?void 0:e.uid}}}else if(e.notificationType===o.a.ALARM)return}}g=C,C.sharedInstance=new g},function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return C})),n.d(t,"c",(function(){return E}));var r=n(1247),i=n(1266),o=n(1353),a=n(1352),s=n(1267),c=n(2155);const u={name:"com.icloud.quota",hash:"a355e2e2bffdec52e0e69b6fa263c49bbddf20b0"};var l=n(965),d=n(2175),p=n(2219),f=n(1354),h=n(1357),m=n(919),g=n(2208);const v=e=>{g.b.sharedInstance.recordStat(new m.a("pushConnectionTerminated",{error:e.error,pushConnectAttempt:e.attemptNumber,connectionType:e.connectionType,willRetry:e.willRetry}))},y=e=>g.b.sharedInstance.recordStat(new m.a("pushConnectionSuccess",{pushTokenTTL:e.pushTokenTTL,pushConnectAttempt:e.attemptNumber,connectionType:e.connectionType,successfulConnectionCount:e.successfulConnectionCount})),b=e=>g.b.sharedInstance.recordStat(new m.a("pushConnectionTerminated",{success:!0,connectionType:e.connectionType})),w=()=>{const e=[Object(f.b)("error",v),Object(f.b)("success",y),Object(f.b)("connection-closed",b)];return()=>{e.forEach((e=>e()))}},S=2e3,C=500;let _=!1,O=[];async function E(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_)return O.length&&(O=function(e){const t=[],n=[],i=[];for(const s of e){const e=r.a.sharedInstance.getApplicationInfo(s);var o,a;if(e&&e.pushTopic)if(null!==(o=e.isPushDisabled)&&void 0!==o&&o.call(e,null!==(a=c.h.peek())&&void 0!==a?a:null))i.push(s);else{var u;const{pushTopic:r}=e;r&&t.push(r);const i=null===(u=e.cloudKitInfo)||void 0===u?void 0:u.containerIdentifier;i&&n.push(i)}}return(t.length||n.length)&&Object(s.a)({pushTopics:t,containerIdentifiers:n}),i}(O)),()=>{};if(e&&(await new Promise((e=>window.setTimeout(e,a.a))),_))return()=>{};if(!c.e.value||"UNAUTHENTICATED"===Object(l.d)())return()=>{};const t=[o.a,i.a,u],n=[];if(Object(l.i)())for(const i of r.a.sharedInstance.displayOrder){var m,g,v,y;if(i.isDisabled)continue;if(null!==(m=(g=i.applicationInfo).isPushDisabled)&&void 0!==m&&m.call(g,null!==(v=c.h.value)&&void 0!==v?v:null)){O.push(i.identifier);continue}const e=i.applicationInfo.pushTopic;e&&t.push(e);const r=null===(y=i.applicationInfo.cloudKitInfo)||void 0===y?void 0:y.containerIdentifier;r&&n.push(r)}await Object(f.a)({enableWebSocket:d.a.websocket,useSharedWorker:d.a.sharedWorker,loggingEnabled:d.a.logPush,pushEnvironment:d.a.pushEnv}),await Object(s.a)({pushTopics:t,containerIdentifiers:n});const b=Object(s.b)((e=>Object(p.a)(e.data)));Object(p.c)();const S=h.a.startMonitoring(),C=w();return _=!0,()=>{C(),S(),b()}}},function(e,t,n){"use strict";n.d(t,"i",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return w})),n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return C})),n.d(t,"c",(function(){return _})),n.d(t,"j",(function(){return O}));var r,i=n(2159),o=n(878),a=n(892),s=n(896),c=n(2155),u=n(2248),l=n(889);!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.CLEARED="CLEARED",e.RUNNING="RUNNING",e.COMPLETE="COMPLETE"}(r||(r={}));class d{constructor(){this.queue=[],this.pendingMessages=new Map,this.pendingProcessQueueItemTimer=void 0,this.logUnprocessedMessagesInQueue=p((()=>{if(this.queue.length>0&&this.queue.some((e=>"appleIdModeDidChange"===e.message.delegateMethodName&&!e.message.precedesMessage))){const e=this.queue.length,t=this.queue.map((e=>e.message.delegateMethodName));console.info(`authenticationMessageProcessor.error numberOfUnprocessedMessages: ${e} unprocessedMessagesNames: ${t}`)}}),3e3)}enqueue(e){this.logUnprocessedMessagesInQueue();const t=e.precedesMessage;if(t){this.cancelPendingMessageTimer(t);const n=this.insertMessageBefore(e,t);return this.processNextItemInQueue(),n}if(e.precedingMessageExpiry)return this.queuePendingMessage(e);const n=e.clearsMessage;if(n){const t=this.queueMessage(e);return this.cancelPendingMessageTimer(n),this.setPendingMessageState(n,r.CLEARED),this.processNextItemInQueue(),t}return"appleIdModeDidChange"===e.delegateMethodName&&0===this.queue.length&&void 0===this.pendingProcessQueueItemTimer&&console.info("cloudOSAuth.unprocessedAuthenticationMessage.appleIdModeDidChange"),this.processNextItemInQueue(),this.queueMessage(e)}processNextItemInQueue(){this.pendingProcessQueueItemTimer||(this.pendingProcessQueueItemTimer=globalThis.setTimeout((()=>{this.pendingProcessQueueItemTimer=void 0;const e=this.queue;if(this.queue.length>0){var t,n;const i=this.queue[0],o=i.message,a=null!==(t=null===(n=this.pendingMessages.get(o.delegateMethodName))||void 0===n?void 0:n.state)&&void 0!==t?t:null;(!a||a===r.CLEARED||a===r.COMPLETE)&&(this.processMessageAction(o,i.resolve),e.length>0&&this.processNextItemInQueue())}})))}processMessageAction(e,t){const{delegateMethodTarget:n,delegateMethodName:i,delegateMethodArguments:o,delegateMethodIsAsync:a,precedingMessageExpiry:s}=e;s&&this.setPendingMessageState(i,r.RUNNING);const c=n[i].apply(n,o);a&&c?c.then((()=>{t(),s&&(this.cancelPendingMessageTimer(i),this.pendingMessages.delete(i)),this.queue.shift(),this.processNextItemInQueue()})):(t(),s&&(this.cancelPendingMessageTimer(i),this.pendingMessages.delete(i)),this.queue.shift())}cancelPendingMessageTimer(e){const t=this.pendingMessages.get(e);if(t){const e=t.timer;t.timer&&(clearTimeout(e),t.timer=void 0)}}insertMessageBefore(e,t){const n=this.queue;let r=0,i=0;for(let o=0,a=n.length;o<a;o++,++i)if(n[o].message.delegateMethodName===t){r=o;break}return i===n.length?this.queueMessage(e):this.insertMessageAtIndex(e,r)}queuePendingMessage(e){var t,n;const{precedingMessageExpiry:i,delegateMethodName:o}=e,a=null!==(t=null===(n=this.pendingMessages.get(o))||void 0===n?void 0:n.state)&&void 0!==t?t:null;if(!a||a!==r.CLEARED&&a!==r.PENDING){const t=i.getTime()-Date.now(),n=globalThis.setTimeout((()=>{this.cancelPendingMessageTimer(o),this.pendingMessages.get(o).state=r.COMPLETE,this.processNextItemInQueue()}),t);this.pendingMessages.set(o,{message:e,timer:n,state:r.PENDING})}else this.processNextItemInQueue();return this.queueMessage(e)}queueMessage(e){let t=()=>{};const n={message:e,promise:new Promise((e=>{t=e})),resolve(){t()}};return this.queue.push(n),n.promise}insertMessageAtIndex(e,t){let n=()=>{};const r={message:e,promise:new Promise((e=>{n=e})),resolve(){n()}};return this.queue.splice(t,0,r),r.promise}setPendingMessageState(e,t){const n=this.pendingMessages.get(e);n?n.state=t:this.pendingMessages.set(e,{message:void 0,state:t,timer:void 0})}}const p=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((()=>e.apply(this,i)),n)}};class f{stopTimer(){globalThis.clearTimeout(this.timer),this.timer=void 0}constructor(e,t,n,r){var i;this.authContainerId=void 0,this.authenticationController=void 0,this.authServiceClient=void 0,this.timer=globalThis.setTimeout((()=>this.onAuthFailure()),45e3),this.authMethod=l.c.DEFAULT,this.isClosed=!1,this.authenticatingAppleIdAccountType=void 0,this.completedAuthenticationStep=0,this.totalNumberOfAuthenticationSteps=void 0,this.isAuthComplete=!1,this.rememberMe=!1,this.appleIdUIMode=l.e.SIGNIN,this.messageProcessor=new d,this.retrieveSessionAtStep=null,this.pauseBetweenSteps=!1,this.customHandlers={appleIdWillStart:(e,t)=>{g(e,t)},appleIdStepDidComplete:(e,t,n,r,i,o,a)=>{const s=this.rememberMe;return v(e,t,n,r,i,o,a),this.retrieveSessionAtStep?this.retrieveSessionAtStep===o&&o<a?(this.authenticationController.processSessionRetrieveFinish(r,i),Promise.resolve()):(this.authenticationController.continueAuthentication()&&this.continueAuthentication(),Promise.resolve()):this.authenticationController.processAuthenticationStep(r,s,i,o,a,this.isOnDemand2FA)},continueAuthentication:()=>{this.continueAuthentication()},appleIdModeWillChange:(e,t)=>{b(e,t)},appleIdModeDidChange:(e,t)=>{y(e,t)},appleIdRepairDidStart:e=>{w(e),this.authenticationController.processRepairDidStart()},appleIdDidFinish:(e,t,n,r,i,o,a,s,c)=>{const u=this.isAuthComplete;S(e,t,n,r,i,o,a,s,c),this.retrieveSessionAtStep?this.authenticationController.processSessionRetrieveFinish(r,i):this.authenticationController.processAuthenticationFinish(n,r,u,i,o,a,c,s,this.isOnDemand2FA)},appleIdDidCancel:(e,t,n,r)=>{C(e,t,n,r)},appleIdError:(e,t,n)=>{_(e,t,n),this.authenticationController.processAuthenticationError(t,n)}},this.isOnDemand2FA=void 0,this.authContainerId=e,this.authenticationController=t,this.authServiceClient=r,this.isOnDemand2FA=null!==(i=n.isOnDemand2FA)&&void 0!==i&&i,"number"===typeof n.authStepsToComplete&&(this.retrieveSessionAtStep=n.authStepsToComplete),this.pauseBetweenSteps=n.pauseBetweenSteps}stop(){this.stopTimer(),this.isClosed=!0}onNativeTakeOverDidStart(){this.stopTimer(),g(this.authContainerId,!0)}onNativeTakeOverDidComplete(){this.authMethod=l.c.NATIVE_TAKE_OVER_LOGIN}onNativeTakeOverError(e){C(this.authContainerId,this.appleIdUIMode,!0,e)}onNativeTakeOverDidCancel(){C(this.authContainerId,this.appleIdUIMode,!0)}continueAuthentication(){this.pauseBetweenSteps&&this.authServiceClient.resume2FA()}onAuthReady(){g(this.authContainerId,!1),this.stopTimer()}onAuthFailure(e,t){null!==t&&void 0!==t&&t.iframeId?this.customHandlers.appleIdError(this.authContainerId,l.b.WIDGET_FAILURE,{iframeId:t.iframeId}):this.customHandlers.appleIdError(this.authContainerId,l.b.TIMEOUT,{}),this.stopTimer()}onAuthSuccess(e){var t;if(!e.session&&!e.grantCode)return void this.customHandlers.appleIdError(this.authContainerId,l.b.INVALID_DATA,{});if((null!==(t=this.totalNumberOfAuthenticationSteps)&&void 0!==t?t:0)>1&&this.completedAuthenticationStep<=1){this.completedAuthenticationStep++;const t={delegateMethodTarget:this.customHandlers,delegateMethodName:"appleIdStepDidComplete",delegateMethodIsAsync:!0,delegateMethodArguments:[this.authContainerId,e.accountName,this.authenticatingAppleIdAccountType,{dsWebAuthToken:e.session},e.accountCountry,this.completedAuthenticationStep,this.totalNumberOfAuthenticationSteps]};1===this.completedAuthenticationStep&&(t.precedingMessageExpiry=new Date(Date.now()+l.g)),this.messageProcessor.enqueue(t)}const n=e.grantCode&&!e.session?{dsGrantCode:e.grantCode,dsMethod:this.authMethod}:{dsWebAuthToken:e.session};this.messageProcessor.enqueue({delegateMethodTarget:this.customHandlers,delegateMethodName:"appleIdDidFinish",clearsMessage:"appleIdStepDidComplete",delegateMethodArguments:[this.authContainerId,e.accountName,this.authenticatingAppleIdAccountType,n,e.accountCountry,e.rememberMe,e.trustToken,e.bridge]})}onPasswordAuthDone(e,t){var n,r;if(this.authenticatingAppleIdAccountType=t.accountType,this.isAuthComplete=null!==(n=t.isAuthComplete)&&void 0!==n&&n,this.rememberMe=null!==(r=t.rememberMe)&&void 0!==r&&r,!e)return;const i=Object(l.h)(t.accountType);this.totalNumberOfAuthenticationSteps=i,(t.accountType!==l.a.SA&&t.accountType!==l.a.NONSA||t.session)&&t.accountType!==l.a.RESTRICTED&&(this.completedAuthenticationStep=1,this.messageProcessor.enqueue({precedingMessageExpiry:new Date(Date.now()+l.g),delegateMethodTarget:this.customHandlers,delegateMethodName:"appleIdStepDidComplete",delegateMethodIsAsync:!0,delegateMethodArguments:[this.authContainerId,t.accountName,t.accountType,{dsWebAuthToken:t.session},t.accountCountry,1,i]}))}onRepairStart(){this.messageProcessor.enqueue({precedesMessage:"appleIdStepDidComplete",delegateMethodTarget:this.customHandlers,delegateMethodName:"appleIdRepairDidStart",delegateMethodArguments:[this.authContainerId]})}onAuthTeardown(){}onAuthCancel(){C(this.authContainerId,this.appleIdUIMode,!1)}onAuthWidgetWillChangeFlow(e){var t;const n=null!==(t=e.to)&&void 0!==t?t:l.e.UNKNOWN,r=n===l.e.HSA1||n===l.e.HSA2||n===l.e.MANAGED||n===l.e.INTERSTITIAL||n===l.e.FEDERATED;n!==l.e.REPAIR||this.authenticatingAppleIdAccountType!==l.a.SA&&this.authenticatingAppleIdAccountType!==l.a.NONSA||(this.totalNumberOfAuthenticationSteps=2),this.messageProcessor.enqueue({precedesMessage:n===l.e.REPAIR||n===l.e.RESTRICTED?"appleIdStepDidComplete":void 0,clearsMessage:r?"appleIdStepDidComplete":void 0,delegateMethodTarget:this.customHandlers,delegateMethodName:n===l.e.RESTRICTED?"appleIdRepairDidStart":"appleIdModeWillChange",delegateMethodArguments:[this.authContainerId,n]})}onAuthWidgetDidChangeFlow(e){var t;const n=null!==(t=e.to)&&void 0!==t?t:l.e.UNKNOWN;this.appleIdUIMode=n,this.messageProcessor.enqueue({precedesMessage:n===l.e.REPAIR?"appleIdStepDidComplete":void 0,delegateMethodTarget:this.customHandlers,delegateMethodName:"appleIdModeDidChange",delegateMethodArguments:[this.authContainerId,n]})}}let h;function m(){if(h)return h.broadcastProxy.userWillUnauthenticate()}function g(){if(h)return h.broadcastProxy.appleIdWillStart(...arguments)}function v(){if(h)return h.broadcastProxy.appleIdStepDidComplete(...arguments)}function y(){if(h)return h.broadcastProxy.appleIdModeDidChange(...arguments)}function b(){if(h)return h.broadcastProxy.appleIdModeWillChange(...arguments)}function w(){if(h)return h.broadcastProxy.appleIdRepairDidStart(...arguments)}function S(){if(h)return h.broadcastProxy.appleIdDidFinish(...arguments)}function C(){if(h)return h.broadcastProxy.appleIdDidCancel(...arguments)}function _(){if(h)return h.broadcastProxy.appleIdError(...arguments)}function O(){h=new a.a(s.a),h.addEventListener("connect",(e=>{e.connection.exportedObject=function(e){const t=new Map;function n(e){return function(n){const r=t.get(n);if(!r)return Promise.reject(new Error(`Auth widget with id '${n}' must be initialized`));if(r.isClosed)return Promise.resolve();for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return e(r,...o),Promise.resolve()}}return{initAuthWidget:(n,r)=>{if(t.get(n))return Promise.reject(new Error(`Auth widget with ${n} re-initialized`));const i=new f(n,Object(c.c)(),r,e);return t.set(n,i),Promise.resolve()},disposeAuthWidget:e=>{const n=t.get(e);return n&&(n.stop(),t.delete(e)),Promise.resolve()},getAuthWidgetConfig:()=>{const e=u.c.value;if(!e||!e.urls)return Promise.reject(new Error("Configurations not available."));const t=e.environment,n="PROD"===t?"https://appleid.cdn-apple.com/appleauth/static/jsapi/authService.latest.min.js":"ICLOUD3"===t?"https://idmsauth-stable.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js":"https://idmsauth-uat.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js",r=e.urls.accountVerifyUI,i=e.urls.accountCreateUI,a=u.a.value;if(!a)return Promise.reject(new Error("appleIdUrl cannot be empty"));const s=function(e){return e.substring(0,2).toLowerCase()+"_"+e.substring(3,8).toUpperCase()}(Object(o.b)()),c=e.trustTokens;return Promise.resolve({appleIdIDMSJsUrl:n,appleIdUrl:a,locale:s,trustTokens:c,iCloudEnvironment:t,accountVerifyUrl:r,accountCreateUrl:i})},async showOnDemand2FA(){Object(c.c)().showOnDemand2FA()},fetchOnDemand2FAToken:()=>Object(c.c)().fetchOnDemandToken(),onNativeTakeOverDidStart:n((e=>e.onNativeTakeOverDidStart())),onNativeTakeOverDidComplete:n((e=>e.onNativeTakeOverDidComplete())),onNativeTakeOverError:n(((e,t)=>e.onNativeTakeOverError(t))),onNativeTakeOverDidCancel:n((e=>e.onNativeTakeOverDidCancel())),onAuthReady:n((e=>e.onAuthReady())),onAuthSuccess:n(((e,t)=>e.onAuthSuccess(t))),onAuthFailure:n(((e,t,n)=>e.onAuthFailure(t,n))),onPasswordAuthDone:n(((e,t,n)=>e.onPasswordAuthDone(t,n))),onRepairStart:n((e=>e.onRepairStart())),onAuthTeardown:e=>{const n=t.get(e);return n?(n.isClosed||n.stop(),Promise.resolve()):Promise.resolve()},onAuthCancel:n((e=>e.onAuthCancel())),onAuthWidgetWillChangeFlow:n(((e,t)=>e.onAuthWidgetWillChangeFlow(t))),onAuthWidgetDidChangeFlow:n(((e,t)=>e.onAuthWidgetDidChangeFlow(t))),onCreateAccountCompleted:e=>(Object(c.c)().createAccountCompleted(e.accountData),Promise.resolve()),onCreateAccountFailed:e=>(Object(c.c)().createAccountFailed(e),Promise.resolve()),unauthenticate:e=>Object(c.c)().unauthenticateUser(e),continueAuthentication:n((e=>e.continueAuthentication()))}}(e.connection.remoteObjectProxy),e.connection.start(),e.connection.remoteObjectProxy.updateAuthenticationResult(c.a.value),e.connection.remoteObjectProxy.updateIsNativeTakeOver(c.f.value)})),h.start();const e=[Object(i.effect)((()=>{var e;null===(e=h)||void 0===e||e.broadcastProxy.updateAuthenticationResult(c.a.value)})),Object(i.effect)((()=>{var e;null===(e=h)||void 0===e||e.broadcastProxy.updateIsNativeTakeOver(c.f.value)}))];h.addEventListener("close",(()=>{for(const t of e)t()}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=n(1229),c=n(2146),u=n(2259),l=n(2264),d=n(1342),p=["styles"];function f(){return f=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},f.apply(null,arguments)}var h=function(e){e.styles;var t=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,p);return i.a.createElement("svg",f({width:"43",height:"30",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M33.553 29.737c1.274 0 2.462-.218 3.565-.653a9.162 9.162 0 002.899-1.807 8.4 8.4 0 001.943-2.676c.466-1.015.7-2.107.7-3.277s-.215-2.273-.644-3.31a8.545 8.545 0 00-1.827-2.76 8.582 8.582 0 00-2.83-1.892c.01-1.874-.297-3.593-.918-5.157-.622-1.563-1.489-2.923-2.602-4.078a11.72 11.72 0 00-3.899-2.68C28.454.816 26.85.5 25.131.5c-1.487 0-2.843.238-4.066.715a11.533 11.533 0 00-3.262 1.915 13.2 13.2 0 00-2.438 2.684 6.437 6.437 0 00-3.1-.125 7.018 7.018 0 00-2.787 1.248 7.138 7.138 0 00-2.027 2.342c-.515.942-.788 2-.82 3.175-1.263.212-2.35.702-3.263 1.47-.912.769-1.619 1.728-2.118 2.878-.5 1.15-.75 2.413-.75 3.787 0 1.241.256 2.413.768 3.515a9.297 9.297 0 002.133 2.92 9.944 9.944 0 003.21 1.983c1.23.476 2.562.714 3.997.714l22.945.016zm-.014-2.985l-22.928-.015c-1.357 0-2.572-.282-3.646-.847-1.073-.564-1.916-1.314-2.528-2.25a5.465 5.465 0 01-.918-3.05c0-1.11.217-2.11.653-2.997a5.125 5.125 0 011.874-2.11c.815-.52 1.803-.78 2.966-.78.22 0 .328-.114.325-.345-.019-1.673.319-2.98 1.012-3.918.693-.94 1.581-1.534 2.664-1.784 1.083-.25 2.206-.187 3.369.19.203.058.348.004.433-.164a13.124 13.124 0 011.943-2.625 8.397 8.397 0 012.693-1.876c1.044-.465 2.267-.697 3.668-.697 1.783 0 3.36.422 4.734 1.267a9.518 9.518 0 013.277 3.344 9.914 9.914 0 011.351 4.53c.025.405.027.83.006 1.276-.02.445-.049.87-.086 1.274-.014.217.077.343.274.377 1.51.319 2.716.99 3.616 2.013.9 1.023 1.35 2.276 1.35 3.759a4.884 4.884 0 01-.804 2.732c-.536.82-1.266 1.473-2.19 1.963-.922.489-1.959.733-3.108.733z",fill:"inherit"}))},m=n(1341),g=n(2262);function v(){const[e,t]=Object(l.b)();return[r.useCallback((n=>{const{jsx:r,popupOptions:i}=b(n,_(),t);return e(r,i)}),[t,e]),t]}function y(e){const[t]=r.useState((()=>_())),{jsx:n,popupOptions:i}=b(e,t,(()=>a())),[o,a]=Object(l.a)(n,i);return[o,a]}function b(e,t,n){var i,o;const{buttons:s,defaultAction:c,cancelAction:u}=e,l=`${t}-label`,d=`${t}-description`;let p,f,h;if(S(s))p=void 0,f=void 0,h=void 0;else{const e=s[0];void 0===u?(f=e.action,h=e.title):(f=u,h=null===(i=s.find((e=>e.action===f)))||void 0===i?void 0:i.title),p=void 0===c?e.destructive?f:e.action:c}function m(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var i;null!==t&&(void 0!==t&&(null===(i=e.onActionSelected)||void 0===i||i.call(e,t)),r&&n())}return{jsx:r.createElement(w,{options:e,hidePane:n,ariaLabelledById:l,ariaDescribedById:d,_defaultAction:p,_cancelAction:f}),popupOptions:{ariaClosePaneDescription:h,...e,layer:e.layer||"alerts",onKeyDown:t=>{var n;if(null===(n=e.loadingOptions)||void 0===n?void 0:n.loading)return;let r=!0;switch(e.buttons.forEach((e=>{if("string"!==typeof e){const t=e;p&&t.action===p&&!1===t.shouldCloseOnClick&&(r=!1)}})),t.key){case"Enter":m(p,r);break;case"Escape":m(f)}},ariaRole:e.ariaRole||"alertdialog",variant:e.variant||"standard",className:a()("for-ui-alert",{"has-tertiary-button":s.length>2,"has-loading":null===(o=e.loadingOptions)||void 0===o?void 0:o.loading},e.className),ariaLabelledBy:l,ariaDescribedBy:d}}}function w(e){const{title:t,buttons:n,description:i,icon:o,accessory:l,loadingOptions:p,onActionSelected:f}=e.options,v=Object(s.d)();let y,b;if(S(n)){const t=n[0];y=[r.createElement(u.a,{key:"0",onActivate:()=>e.hidePane(),variant:"block large primary"},t)]}else{let t=n;if("compact"===v){const r=n.find((t=>t.action===e._cancelAction&&t.action!==e._defaultAction));r&&(t=[...n.filter((e=>e!==r)),r])}y=t.map(((t,n)=>{var i;const o=e._defaultAction===t.action,a=null===(i=t.shouldCloseOnClick)||void 0===i||i;return r.createElement(u.a,{key:n,onActivate:()=>{null===f||void 0===f||f(t.action),a&&e.hidePane()},destructive:t.destructive,ariaLabel:t.ariaLabel,variant:"block large "+(o?"primary":"secondary")},t.title)}))}b=null===o?null:o||r.createElement(h,null);const w=r.useRef(null),[C,_]=r.useState(!1);r.useLayoutEffect((()=>{_(Object(m.a)(w))}),[w]);const O=r.useRef(null);r.useLayoutEffect((()=>{var e;(null===p||void 0===p?void 0:p.loading)&&(null===(e=O.current)||void 0===e||e.focus())}),[null===p||void 0===p?void 0:p.loading,O]);const E=r.useRef(null),[I,A]=r.useState(!1),[T,P]=r.useState(0),R=r.useCallback((()=>{const e=E.current;if(e){const t=e.scrollHeight>e.clientHeight+1,n=Math.abs(e.scrollHeight-T-e.clientHeight)<1;t&&!n?A(!0):n&&A(!1)}}),[E,T]);return r.useEffect((()=>{const e=E.current;e&&(e.addEventListener("scroll",(()=>{E.current&&P(E.current.scrollTop)})),new c.a((()=>{R()})).observe(e))}),[R]),r.useLayoutEffect((()=>{R()}),[R]),r.createElement("ui-alert-container",{ref:E,class:a()({"show-fade":I})},r.createElement("ui-alert-icon",null,b),r.createElement("ui-alert-content",null,r.createElement("h1",{id:e.ariaLabelledById,className:"title"},t),r.createElement("p",{id:e.ariaDescribedById,className:"description"},i),l),r.createElement("ui-alert-footer",null,function(e,t,n,i){const o=Object(d.a)(e,"useShowAlert"),s=o[0],c=o.length>1?o[1]:null,u=o.length>2,l=u?o[2]:null;let p,f;return"compact"===t||u||i?(p=r.createElement(r.Fragment,null,s,c,l),f=r.createElement(r.Fragment,null,r.createElement("div",null,s.props.children),c&&r.createElement("div",null,null===c||void 0===c?void 0:c.props.children),l&&r.createElement("div",null,null===l||void 0===l?void 0:l.props.children))):(p=r.createElement(r.Fragment,null,l,c,s),f=r.createElement(r.Fragment,null,l&&r.createElement("div",null,null===l||void 0===l?void 0:l.props.children),c&&r.createElement("div",null,null===c||void 0===c?void 0:c.props.children),r.createElement("div",null,s.props.children))),r.createElement("ui-alert-actions",{class:a()("standard",t,{"should-stack":i||u,"single-button":1===o.length}),ref:n},p,r.createElement("div",{className:"buttons-measurer","aria-hidden":"true"},f))}(y,v,w,C),(null===p||void 0===p?void 0:p.loading)&&r.createElement("ui-alert-loading-message",null,r.createElement(g.a,{ref:O,description:p.ariaLabel,size:p.indicatorSize||17,tabIndex:-1}),r.createElement("p",{className:"description"},p.description))))}function S(e){return 1===e.length&&"string"===typeof e[0]}let C=0;function _(){return"ui-alert-"+C++}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return L}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=n(1250),c=n(1219),u=n(1468),l=n(2221),d=n(2257),p=n(1221),f=n(1499);let h=null;var m=["styles"];function g(){return g=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},g.apply(null,arguments)}var v=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,m);return i.a.createElement("svg",g({className:n.icon||"icon",viewBox:"0 0 18 28"},r),i.a.createElement("path",{d:"M9.004 26.979c.537-.007.958-.202 1.4-.637l6.126-6.273c.32-.32.47-.689.47-1.141 0-.923-.753-1.679-1.657-1.679a1.67 1.67 0 00-1.228.546l-5.388 5.597h.578l-5.414-5.597c-.35-.35-.773-.546-1.234-.546-.91 0-1.657.756-1.657 1.679 0 .445.157.814.463 1.142l6.139 6.272c.446.448.87.637 1.402.637zM1.463 7.937A1.587 1.587 0 001 9.081c0 .916.747 1.677 1.657 1.677.46 0 .886-.193 1.234-.546l5.414-5.596h-.578l5.388 5.596c.344.359.775.546 1.228.546.904 0 1.657-.761 1.657-1.677 0-.455-.15-.832-.47-1.144l-6.125-6.27c-.443-.442-.864-.633-1.4-.646-.534 0-.958.198-1.403.645L1.463 7.937z"}))},y=n(1493),b=n(1340),w=n(2224);function S(e){var t;t=e.children,r.Children.forEach(t,(e=>{if(e){if(!Object(c.a)(e)||e.type!==L&&e.type!==x)throw new Error(M(e));e.type===x&&r.Children.forEach(e.props.children,(t=>{if(!Object(c.a)(t)||t.type!==L)throw new Error(M(e))}))}}));const n=(Array.isArray(e.children)?e.children:[e.children]).filter(Boolean),i=r.useRef(null),o=r.useRef(null),[s,u]=r.useState(null),l={},m=new Map,g=r.Children.map(n,((e,t)=>function(e,t,n,i){if(N(n))return T(e,t,n,R(i));{const o=r.Children.map(n.props.children,((n,r)=>T(e,t,n,R(i,r))));return r.createElement("optgroup",{key:n.key||i,label:n.props.name},o)}}(l,m,e,t))),y=function(e,t){const n=t=>null==e||null!=e&&t.props.value===e;for(let r=0;r<t.length;r++){const e=t[r];if(e.type===x){const t=e.props.children;if(null!=t)if(Array.isArray(t))for(let e=0;e<t.length;e++){const r=t[e];if(n(r))return r}else if(n(t))return t}else if(n(e))return e}return null}(null!=e.value?e.value:null!=s?s:e.defaultValue,n),w=null!=y?y.props.value:null,S=null===w?void 0:m.get(w),_=r.useMemo((()=>null!=e.shouldUseNativeSelect?(console.warn("UISelectButton's prop shouldUseNativeSelect has been deprecated. Please replace with shouldUseNativeControl."),e.shouldUseNativeSelect):null!=e.shouldUseNativeControl?e.shouldUseNativeControl:function(){if(null!=h)return h;const e=Object(f.detect)();return"Mac OS"===(null===e||void 0===e?void 0:e.os)&&"safari"===(null===e||void 0===e?void 0:e.name)?window.navigator.maxTouchPoints>0:(h=null!=e&&("iOS"===e.os||"Android OS"===e.os||"BlackBerry OS"===e.os||"Windows Mobile"===e.os||"Amazon OS"===e.os),h)}()),[e.shouldUseNativeControl,e.shouldUseNativeSelect]),{onStateChange:O}=e,E=r.useCallback((e=>{const t=O;if(t){const n=[];e!==w&&n.push("value"),t({value:e},n)}}),[O,w]),{ariaLabel:I,tooltip:A}=e,P=r.createElement("select",{ref:o,style:{fontSize:16},tabIndex:e.tabIndex||0,disabled:e.disabled,"aria-hidden":_?void 0:"true",onChange:e=>{const t=e.target.value;if(null==t)return;const n=l[t];null!=n&&(u(n),E(n))},value:S,required:e.required,autoComplete:e.autoComplete,form:e.form,name:e.name},g),k=r.useRef(null),[D,j]=r.useState(null),U=function(e){let{buttonRef:t,nativeSelectRef:n,menuRef:i,currentValue:o,onItemSelected:a,childrenProp:s,minWidth:c,initialHighlightType:u}=e;const l=r.useRef(void 0),p=r.useRef(!1),f=r.useRef(null),[h,m]=Object(d.i)(r.createElement(C,{buttonRef:t,menuRef:i,shouldMouseUpRef:p,currentValue:o,onItemSelected:e=>{l.current=e,v()},initiallySelectedMenuItemRef:f,minWidth:c,initialHighlightType:u},s),{animates:d.b.NONE,__spi__hasMenuBehavior:!0,initialFocus:()=>f.current,onClose:()=>{g.current=!1,void 0!==l.current&&a(l.current)},onRequestClose:e=>{e===d.e.ESCAPE?v({animate:!1}):e===d.e.MOUSE_UP&&p.current&&v()}}),g=r.useRef(!1),v=e=>{g.current=!0,m(e)};return()=>{g.current||(p.current=!1,l.current=void 0,h())}}({menuRef:k,nativeSelectRef:o,buttonRef:i,currentValue:w,onItemSelected:e=>{u(e),E(e)},childrenProp:n,minWidth:e.minMenuWidth||275,initialHighlightType:D}),F=Object(p.a)(e.id,{onActivationComplete:()=>{i.current&&i.current.focus()}});return r.useEffect((()=>{i.current&&(i.current.focus=e=>{o.current&&o.current.focus(e)})}),[]),r.createElement("ui-select-button",{id:e.id||void 0,class:a()(b.a,e.className,e.variant||"standard"),role:"button","aria-haspopup":"menu","aria-disabled":e.disabled||void 0,"aria-label":I,"aria-labelledby":I?void 0:F,"data-focusyn":"allow",ref:i,style:e.style,title:A,onMouseDown:t=>{j("mouse"),_||e.disabled||0!==t.button||(t.preventDefault(),U())},onKeyDown:t=>{if(j("keyboard"),!_&&!e.disabled)switch(t.key){case"Enter":case" ":case"ArrowUp":case"ArrowDown":t.preventDefault(),U()}},onFocus:e=>{null!=k.current&&(e.preventDefault(),k.current.focus())}},r.createElement("ui-select-button-title",null,function(){if(null!=y){const{displayForValue:t}=e;if(t){const e=t(w);if(e)return e}return r.createElement("span",null,y.props.children)}return null}()),e.chevronAsset||r.createElement(v,null),P)}function C(e){let{buttonRef:t,children:n,menuRef:i,shouldMouseUpRef:o,currentValue:c,onItemSelected:u,initiallySelectedMenuItemRef:d,minWidth:p,initialHighlightType:f}=e;const h=function(e,t){const n=[];return r.Children.forEach(e,((e,i)=>{N(e)?n.push(P(t,e,R(i))):(i>0&&n.push(r.createElement(l.d,{key:"divider-"+i})),null!=e.props.name&&n.push(r.createElement(l.e,{key:"item-"+i,value:"item-"+i,disabled:!0},e.props.name)),r.Children.forEach(e.props.children,((e,r)=>n.push(P(t,e,R(i,r))))))})),n}(n,c),m=!!t.current&&Object(y.a)(t.current);r.useEffect((()=>{var e,t;const n=i.current.querySelector("ui-menu-scroll-container");if(!n)throw new Error("UISelectButton: Attempted to measure menu without a scroll container.");const r=Array.from(n.children),o=r.some(_),a=r.filter((e=>"true"!==e.getAttribute("aria-hidden")));if(d.current=null!==(t=null!==(e=a.find(_))&&void 0!==e?e:a[0])&&void 0!==t?t:null,!d.current||!o)throw new Error("Could not find the selected item.")}),[i,d]);const[g,v]=r.useState((()=>({width:window.innerWidth,height:window.innerHeight})));r.useEffect((()=>{function e(){v({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const b=Object(s.a)(),S=r.useMemo((()=>({left:10,top:10,width:g.width-20,height:g.height-20})),[g]),C=i.current,A=t.current,[T,M]=r.useMemo((()=>{const e=(()=>{var e;const t=null===C||void 0===C?void 0:C.querySelector("ui-menu-scroll-container"),n=null!==(e=null===t||void 0===t?void 0:t.children)&&void 0!==e?e:[],r=()=>{for(let e=0;e<n.length;e++){const t=n[e],r="true"===t.getAttribute("aria-hidden");if(D(t)&&!r)return{element:t,index:e,hidden:r}}return null};for(let i=0;i<n.length;i++){const e=n[i];if(D(e)&&"true"===e.getAttribute("aria-checked"))return"true"===e.getAttribute("aria-hidden")?r():{element:e,index:i,hidden:!1}}return null})();if(null!=C&&null!=e&&null!=A&&n.length>0){let t=null,n=null;if(A.childNodes.length>0){const e=A.childNodes[0];if(e.childNodes.length>0){const n=e.childNodes[0];if(n.nodeType===Node.TEXT_NODE){const e=document.createRange();e.selectNode(n),t=e.getBoundingClientRect()}else n instanceof HTMLElement&&null!==n.offsetParent&&(t=n.getBoundingClientRect())}}n=A.getBoundingClientRect();const{element:r,index:i,hidden:o}=e,[a,s]=function(e,t,n,r,i,o,a,s,c,u){const d=r.querySelector("ui-menu-scroll-container");if(!d)throw new Error("UISelectButton: Attempted to measure menu without a scroll container.");const p=d.children,f=r.getBoundingClientRect(),h=o.getBoundingClientRect(),m=h.top-f.top;let g=s?t.bottom+w.c.anchorMargin:t.top+t.height/2-h.height/2-m,v=0,y=0;for(let l=a-1;l>=0&&v<2;l--){const t=p[l];if(D(t)&&!k(t)){if(y+=t.offsetHeight,g+m-y<e.top)break;v++}}let b=0;if(v<2)for(let l=a+1;l<p.length&&v+b<2;l++){const t=p[l];if(D(t)&&!k(t)){if(y+=t.offsetHeight,g+h.height+m+y>e.top+e.height)break;b++}}let S=!0,C=!1;const A=b+v;i.length>1&&A<2&&(i.length<=3&&0!==A||(S=!1,C=a<3));let T=Math.max(u,f.width);const P=c?"right":"left";let R=(n||t)[P];const M=_(o)?1:0,N=o.childNodes[M];if(!N)throw new Error("Internal Error: UIMenuItem did not have the expected children");{let e=h[P];if(N.nodeType===Node.TEXT_NODE){const t=document.createRange();t.selectNode(N),e=t.getBoundingClientRect()[P]}else N instanceof HTMLElement&&null!==N.offsetParent&&(e=N.getBoundingClientRect()[P]);const n=Math.abs(e-h[P]);if(c?R+=n:R-=n,T<t.width){const e=Math.abs(t[P]-R);T=Math.max(u,t.width+e+13)}}const x=O(R,T,e,c);R=function(e,t,n,r,i){return(i?E:I)(e,t,n,r)}(R,T,x,e.left,c),x<T&&(T=O(R,T,e,c));const L=function(e,t,n){return n?-window.innerWidth+e-t:e}(R,T,c),j=Math.max(g,e.top),U=e.top+e.height;let F=Math.min(j+f.height,U)-j,z=0;if(S){const t=g+f.height>e.top+e.height;if(g<e.top){const t=e.top;if(0===a)z=0;else if(a===p.length-1)z=f.height-F;else{z=-g+t;const e=l.b-l.a;z>e?z-=e:z=0}g=t}else if(t){const t=Math.max(e.top,U-f.height);F=U-t,z=-g+t,g=t}}else C?t.top-f.height>=e.top?(g=t.top-f.height,F=f.height):(g=e.top,z=m,F=t.top-g):t.top+t.height+f.height<=e.top+e.height?(g=t.top+t.height,F=f.height):(g=t.top+t.height,F=e.height-g,z=m-F);return T=Math.ceil(T),[{left:L,top:g,width:T,height:F},z,o]}(S,n,t,C,h,r,i,o,m,p);return[a,s]}return[{top:-9999,left:-9999},void 0]}),[C,A,n.length,S,h,m,p]);return r.useEffect((()=>{const e=e=>{o.current||e.stopPropagation()},t=i.current;return t.addEventListener("mouseup",e,{capture:!0}),setTimeout((()=>{o.current=!0}),200),b(),()=>{t.removeEventListener("mouseup",e,{capture:!0})}}),[i,b,o]),r.createElement(l.c,{ref:i,className:a()(null==i.current?"is-measuring":void 0,"ui-select-button-menu"),onItemSelected:r.useCallback((e=>{o.current&&(o.current=!1,u(e))}),[u,o]),frame:null!=T?T:void 0,initialScrollOffset:M,initialHighlightType:f},h)}function _(e){return D(e)&&"true"===e.getAttribute("aria-checked")}function O(e,t,n,r){return Math.abs(Math.min(r?e-t:e+t,n.left+n.width)-e)}function E(e,t,n,r){return e-t<r?r+t:e+n-t}function I(e,t,n,r){return Math.max(e+n-t,r)}let A=!1;function T(e,t,n,i){const o=null!=n.key?n.key:i,{nativeValue:a,value:s}=n.props,c=null!=a?a:"string"===typeof s||"number"===typeof s?s:o;t.has(s)||t.set(s,c),void 0===e[c]&&(e[c]=s);const u=n.props.hasOwnProperty("nativeText")?n.props.nativeText:n.props.children;return r.Children.forEach(u,(e=>{null!==e&&void 0!==e&&(A||"string"===typeof e||"number"===typeof e||(A=!0,console.warn("UISelectItem should either have string or number as a child node or provide nativeText prop.")))})),r.createElement("option",{key:o,value:c,disabled:n.props.disabled,hidden:n.props.hidden},u)}function P(e,t,n){var i;const o=null!=e&&t.props.value===e,{hidden:a,...s}=t.props;return r.createElement(l.e,Object.assign({},s,{key:t.key||n,exclusiveCheckable:!0,checked:o,hidden:a,initialHighlighted:o&&!t.props.disabled&&!a,typeAheadTextValue:null!==(i=t.props.typeAheadTextValue)&&void 0!==i?i:t.props.nativeText}),t.props.children)}function R(e,t){return null==t?e:e+"-"+t}function k(e){return"true"===e.getAttribute("aria-disabled")}function D(e){return"UI-MENU-ITEM"===e.tagName}function M(e){return`UIComponent error: Unsupported child component found.\nGot: '${Object(u.a)(e)}'\nWanted: 'UISelectItem' or 'UISelectGroup'`}function N(e){return e.type===L}function x(e){return null}function L(e){return null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return v}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=n(2224),c=n(1217),u=["styles"];function l(){return l=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},l.apply(null,arguments)}var d=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,u);return i.a.createElement("svg",l({className:n.icon||"icon",width:"16",height:"10",viewBox:"0 0 40 20",fill:"inherit",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{d:"M3.878-1.415l13.01 16.111a4 4 0 006.224 0L36.159-1.46",stroke:"var(--theme-color-gray3)",strokeWidth:".2",fillRule:"evenodd"}))},p=["styles"];function f(){return f=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},f.apply(null,arguments)}var h=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,p);return i.a.createElement("svg",f({className:n.icon||"icon",width:"16",height:"10",viewBox:"0 0 40 20",fill:"inherit",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{d:"M3.878-1.415l13.01 16.111a4 4 0 006.224 0L36.159-1.46",stroke:"var(--theme-color-gray3)",strokeWidth:".2",fillRule:"evenodd"}))},m=n(1218);const g=r.forwardRef(((e,t)=>{var n,i,o;const s=e.arrowAsset||r.createElement(d,null),u=e.cornerArrowAsset||r.createElement(h,null),l=r.useRef(null),[p,f]=r.useState(),[g,_]=r.useState(),{remeasureToken:O}=e,E=r.useRef(O),I=O!==E.current?void 0:p;r.useLayoutEffect((()=>{E.current=O;const e=l.current,{width:t,height:n}=e.getBoundingClientRect(),{direction:r}=getComputedStyle(e);f({width:t,height:n}),_(r)}),[O]);const A=1.5,[T,P]=r.useState();r.useLayoutEffect((()=>{const e=getComputedStyle(l.current),t=parseFloat(e.getPropertyValue("border-bottom-left-radius"));isNaN(t)||t<A||P(t)}),[]);const R=r.useRef(null),[k,D]=r.useState();r.useLayoutEffect((()=>{const{width:e,height:t}=R.current.getBoundingClientRect();D({width:e,height:t})}),[]);const M=e.anchorRef;let N;e.anchorRect?N=e.anchorRect:M&&null!=M.current&&(N=M.current.getBoundingClientRect());const x=function(e){const[t,n]=r.useState({width:e.documentElement.clientWidth,height:e.documentElement.clientHeight});return r.useEffect((()=>{const t=()=>{n({width:e.documentElement.clientWidth,height:e.documentElement.clientHeight})},r=e.defaultView;if(r)return r.addEventListener("resize",t),()=>{r.removeEventListener("resize",t)}}),[e]),t}(null!==(i=null===(n=null===M||void 0===M?void 0:M.current)||void 0===n?void 0:n.ownerDocument)&&void 0!==i?i:window.document),L={width:x.width,height:x.height,top:0,left:0,bottom:0,right:0};let j,U,F,z;if(void 0===I||void 0===N)j=b,F=c.a.None;else{let t;t=e.positioner?e.positioner:y;const n=t(I,k,N,L,null!==(o=e.arrowless)&&void 0!==o&&o,g);j=n.contentRect||b,U=n.arrowRect,F=n.arrowDirection,z=n.transformOrigin}let B,K,H,W,q,V=j,$={top:0,left:0},G={top:0,left:0},Z=s;if(null!=j&&w(j)){const t=j,n=F===c.a.Up,r=F===c.a.Down,i=F===c.a.Left,o=F===c.a.Right,a=F===c.a.None;o?B="arrow-direction-right":i?B="arrow-direction-left":r?B="arrow-direction-down":n?B="arrow-direction-up":a&&(B="arrow-hidden"),V={width:n||r||a?t.width:t.width+(null!=U?U.height:0),height:i||o||a?t.height:t.height+(null!=U?U.height:0)},$={width:t.width,height:t.height};const s=e.pinPosition||v.TopLeft;if(a)s===v.TopLeft||s===v.TopRight?V.top=t.top:s!==v.BottomLeft&&s!==v.BottomRight||(V.bottom=t.bottom),s===v.TopLeft||s===v.BottomLeft?V.left=t.left:s!==v.TopRight&&s!==v.BottomRight||(V.right=t.right),z&&(H=C(z[0],z[1]));else if(null!=U){G={width:U.width,height:U.height},s===v.TopLeft||s===v.TopRight?(V.top=Math.min(U.top,t.top),G.top=U.top-V.top,$.top=t.top-V.top):s!==v.BottomLeft&&s!==v.BottomRight||(V.bottom=Math.min(U.bottom,t.bottom),G.bottom=U.bottom-V.bottom,$.bottom=t.bottom-V.bottom),s===v.TopLeft||s===v.BottomLeft?(V.left=Math.min(U.left,t.left),G.left=U.left-V.left,$.left=t.left-V.left):s!==v.TopRight&&s!==v.BottomRight||(V.right=Math.min(U.right,t.right),G.right=U.right-V.right,$.right=t.right-V.right);let e=0;null!=G.left?n||r?e=G.left+U.width/2:i?e=G.left:o&&(e=G.left+U.height):null!=G.right&&null!=V.width&&(n||r?e=V.width-G.right-U.width/2:i?e=V.width-G.right-U.height:o&&(e=V.width-G.right));let a=0;null!=G.top?i||o?a=G.top+U.width/2:n?a=G.top:r&&(a=G.top+U.height):null!=G.bottom&&null!=V.height&&(i||o?a=V.height-(G.bottom+U.width/2):n?a=V.height-G.bottom-U.height:r&&(a=V.height-G.bottom)),H=C(e,a);const c=void 0!==T?T-A:0;let l,d,p,f;if(n||r?(l=U.left,d=U.width,p=t.left,f=t.width):(i||o)&&(l=U.top,d=U.width,p=t.top,f=t.height),void 0!==l&&void 0!==d&&void 0!==p&&void 0!==f){const e=l-p,t=p+f-(l+d);e<c?W=Math.max(0,e)+A:t<c&&(W=Math.max(0,t)+A),(e<c||t<c)&&(n&&e<c||i&&e<c?(q="borderTopLeftRadius",K="arrow-position-top-left"):r&&e<c||i&&t<c?(q="borderBottomLeftRadius",K="arrow-position-bottom-left"):r&&t<c||o&&t<c?(q="borderBottomRightRadius",K="arrow-position-bottom-right"):(n&&t<c||o&&e<c)&&(q="borderTopRightRadius",K="arrow-position-top-right"),Z=u)}}}let Q=e.style?e.style:{};Q={...Q,...S($),boxSizing:"border-box"},q&&(Q={...Q,[q]:W});const[Y,J]=r.useState(!1),[X,ee]=r.useState(0),te=Object(m.a)(e.children);return r.useEffect((()=>{const e=l.current;e&&e.addEventListener("scroll",(()=>{l.current&&ee(l.current.scrollTop)}))}),[]),r.useLayoutEffect((()=>{const e=l.current;if(e){const t=e.scrollHeight>e.clientHeight;Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<1?J(!1):t&&te&&J(!0)}}),[l,e.children,X,te]),r.createElement("ui-popover",{ref:t,class:a()(e.variant||"standard",B,K,e.className,{"is-measuring":!w(j)}),style:{maxWidth:L.width,transformOrigin:H,...S(V),...e.outerWrapperStyle||{},position:"fixed"}},r.createElement("ui-popover-content",{ref:l,style:Q,class:a()({"ui-overlay-actions-separator":Y,"contains-ui-overlay-actions":te})},e.children),r.createElement("ui-popover-arrow",{ref:R,style:S(G)},Z))}));var v;g.displayName="UIPopover",function(e){e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomRight=2]="BottomRight",e[e.BottomLeft=3]="BottomLeft"}(v||(v={}));const y=Object(s.b)(s.c),b={top:-9999,left:-9999};function w(e){return"width"in e&&"height"in e}function S(e){const t={...e};return void 0!==t.left&&(t.left=Math.round(t.left)),void 0!==t.top&&(t.top=Math.round(t.top)),void 0!==t.right&&(t.right=Math.round(t.right)),void 0!==t.bottom&&(t.bottom=Math.round(t.bottom)),t}function C(e,t){return`${Math.round(e)}px ${Math.round(t)}px`}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"a",(function(){return h})),n.d(t,"d",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return v})),n.d(t,"h",(function(){return y}));var r=n(1421),i=n(2269),o=n(1227),a=n(1425),s=n(870),c=n(1260),u=n(1392);const l=["Drafts","Junk","Archive","Sent Messages","Deleted Messages","trashFolder:Deleted Messages"],d=["INBOX/$category$_Decluttered","INBOX/$category$_Transactions","INBOX/$category$_Updates","INBOX/$category$_Promotions"],p={"INBOX/$category$_Decluttered":["INBOX/$category$_Decluttered","INBOX/$category$_Decluttered_HI","INBOX/$category$_Promotions_HI","INBOX/$category$_Transactions_HI","INBOX/$category$_News_HI","INBOX/$category$_Social_HI","INBOX/$category$_Others_HI","INBOX/$category$_Updates_HI","INBOX/$category$_Personal","INBOX/$category$_Personal_HI","INBOX/$category$_Error","INBOX/$category$_UnsupportedLanguage"],"INBOX/$category$_Transactions":["INBOX/$category$_Transactions","INBOX/$category$_Transactions_HI"],"INBOX/$category$_Updates":["INBOX/$category$_Updates_HI","INBOX/$category$_News_HI","INBOX/$category$_Social_HI","INBOX/$category$_Others_HI","INBOX/$category$_Updates","INBOX/$category$_News","INBOX/$category$_Social","INBOX/$category$_Others"],"INBOX/$category$_Promotions":["INBOX/$category$_Promotions","INBOX/$category$_Promotions_HI"]};function f(e){return g(e)}const h={"INBOX/$category$_Decluttered":{icon:a.a,name:Object(o.a)("MailHomeTile.TilePicker.Category.Primary.Label")},"INBOX/$category$_Transactions":{icon:function(e){return Object(s.createElement)(c.a,{originalProps:e,metadata:{name:"cart",svgPath:"M49.6582-7.51953L106.641-7.51953C108.545-7.51953 110.205-9.08203 110.205-11.1816C110.205-13.2812 108.545-14.8438 106.641-14.8438L50.4883-14.8438C47.7051-14.8438 45.9961-16.7969 45.5566-19.7754L44.7754-24.9023L106.738-24.9023C113.867-24.9023 117.529-29.2969 118.555-36.2793L122.461-62.1094C122.559-62.7441 122.656-63.5254 122.656-63.9648C122.656-66.3086 120.898-67.9199 118.213-67.9199L38.4766-67.9199L37.5488-74.1211C37.0605-77.8809 35.6934-79.7852 30.7129-79.7852L13.5742-79.7852C11.6211-79.7852 9.96094-78.0762 9.96094-76.123C9.96094-74.1211 11.6211-72.4121 13.5742-72.4121L30.0781-72.4121L37.8906-18.7988C38.916-11.8652 42.5781-7.51953 49.6582-7.51953ZM114.355-60.5469L110.889-37.1582C110.498-34.1309 108.887-32.2754 106.006-32.2754L43.7012-32.2266L39.5508-60.5469ZM53.5156 16.2109C57.9102 16.2109 61.4258 12.7441 61.4258 8.30078C61.4258 3.90625 57.9102 0.390625 53.5156 0.390625C49.0723 0.390625 45.5566 3.90625 45.5566 8.30078C45.5566 12.7441 49.0723 16.2109 53.5156 16.2109ZM99.1699 16.2109C103.613 16.2109 107.129 12.7441 107.129 8.30078C107.129 3.90625 103.613 0.390625 99.1699 0.390625C94.7754 0.390625 91.2109 3.90625 91.2109 8.30078C91.2109 12.7441 94.7754 16.2109 99.1699 16.2109Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:66.45503906249996,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 115.1881103515625 102.8818359375",width:115.1881103515625,height:102.8818359375,translateX:-9.960976562500036,translateY:86.6708984375,baseline:86.6708984375,capline:16.2109375}}})},name:Object(o.a)("MailHomeTile.TilePicker.Category.Transactions.Label")},"INBOX/$category$_Promotions":{icon:function(e){return Object(s.createElement)(c.a,{originalProps:e,metadata:{name:"megaphone",svgPath:"M12.4512-35.7422C12.4512-23.877 18.3594-16.8945 29.4922-15.5762L40.6738 9.13086C43.4082 15.1855 47.1191 18.1152 52.7832 18.1152C59.8633 18.1152 64.9414 13.0371 63.3301 4.6875L59.7168-14.0625C73.8281-11.5234 88.1348-6.54297 100.928 0.927734C102.295 6.34766 106.787 9.76562 112.939 9.76562C120.41 9.76562 125.391 4.78516 125.391-2.63672L125.391-76.5625C125.391-84.0332 120.41-89.0137 112.939-89.0137C106.592-89.0137 102.051-85.4004 100.83-79.7363C85.8398-70.8496 66.6992-65.1855 51.5137-63.5742L33.5938-63.5742C19.7754-63.5742 12.4512-56.4453 12.4512-43.1641ZM108.398-2.63672L108.398-76.5625C108.398-79.3457 110.205-81.1523 112.939-81.1523C115.674-81.1523 117.529-79.3457 117.529-76.5625L117.529-2.63672C117.529 0.0976562 115.674 1.9043 112.939 1.9043C110.205 1.9043 108.398 0.0976562 108.398-2.63672ZM52.3926-23.0469L52.3926-55.9082C69.7754-57.9102 86.3281-62.793 100.537-70.9473L100.537-7.95898C85.9863-16.3086 69.5801-21.0449 52.3926-23.0469ZM33.5938-23.1934C24.2188-23.1934 20.3125-26.9043 20.3125-35.7422L20.3125-43.1641C20.3125-52.002 24.2188-55.7129 33.5938-55.7129L44.5312-55.7129L44.5312-23.1934ZM47.998 6.98242L37.5488-15.332L51.2207-15.332C51.5137-15.332 51.8066-15.2832 52.0996-15.2344L56.2988 5.81055C56.8848 8.83789 55.1758 10.7422 52.6367 10.7422C50.3418 10.7422 49.2188 9.57031 47.998 6.98242Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:65.08503906250007,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 112.9476318359375 107.5673828125",width:112.9476318359375,height:107.5673828125,translateX:-12.451215820312427,translateY:89.013671875,baseline:89.013671875,capline:18.5537109375}}})},name:Object(o.a)("MailHomeTile.TilePicker.Category.Promotions.Label")},"INBOX/$category$_Updates":{icon:function(e){return Object(s.createElement)(c.a,{originalProps:e,metadata:{name:"text.bubble",svgPath:"M42.4805 18.4082C44.873 18.4082 46.5332 17.1387 49.5117 14.502L66.3574-0.488281L97.7051-0.488281C112.256-0.488281 120.068-8.54492 120.068-22.8516L120.068-60.2539C120.068-74.5605 112.256-82.6172 97.7051-82.6172L34.8145-82.6172C20.2637-82.6172 12.4512-74.6094 12.4512-60.2539L12.4512-22.8516C12.4512-8.49609 20.2637-0.488281 34.8145-0.488281L37.1582-0.488281L37.1582 12.207C37.1582 15.9668 39.0625 18.4082 42.4805 18.4082ZM44.4824 9.47266L44.4824-4.6875C44.4824-7.32422 43.457-8.34961 40.8203-8.34961L34.8145-8.34961C24.9512-8.34961 20.3125-13.3789 20.3125-22.9004L20.3125-60.2539C20.3125-69.7754 24.9512-74.7559 34.8145-74.7559L97.7051-74.7559C107.52-74.7559 112.207-69.7754 112.207-60.2539L112.207-22.9004C112.207-13.3789 107.52-8.34961 97.7051-8.34961L66.0645-8.34961C63.3301-8.34961 61.9629-7.95898 60.1074-6.05469ZM41.1133-55.0293L90.8203-55.0293C92.3828-55.0293 93.6035-56.25 93.6035-57.8613C93.6035-59.375 92.3828-60.6445 90.8203-60.6445L41.1133-60.6445C39.5508-60.6445 38.2812-59.375 38.2812-57.8613C38.2812-56.25 39.5508-55.0293 41.1133-55.0293ZM41.1133-39.1113L90.8203-39.1113C92.3828-39.1113 93.6035-40.3809 93.6035-41.9922C93.6035-43.5059 92.3828-44.7754 90.8203-44.7754L41.1133-44.7754C39.5508-44.7754 38.2812-43.5059 38.2812-41.9922C38.2812-40.3809 39.5508-39.1113 41.1133-39.1113ZM41.1133-23.2422L73.4375-23.2422C75-23.2422 76.2207-24.4629 76.2207-26.0254C76.2207-27.6367 75-28.9062 73.4375-28.9062L41.1133-28.9062C39.5508-28.9062 38.2812-27.6367 38.2812-26.0254C38.2812-24.4629 39.5508-23.2422 41.1133-23.2422Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:67.75010498046868,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 107.61767578125 107.2763671875",width:107.61767578125,height:107.2763671875,translateX:-12.451127929687573,translateY:88.8681640625,baseline:88.8681640625,capline:18.408203125}}})},name:Object(o.a)("MailHomeTile.TilePicker.Category.Updates.Label")}},m="INBOX/$category$_Decluttered",g=e=>!!e.match(/\$category\$_.+/),v=e=>{switch(e){case"INBOX/$category$_Decluttered":return"Primary";case"INBOX/$category$_Promotions":return"Promotions";case"INBOX/$category$_Transactions":return"Transactions";case"INBOX/$category$_Updates":return"Updates";default:Object(u.a)(e)}},y=e=>e.filter((e=>{let{name:t}=e;return-1===l.indexOf(t)&&!t.startsWith("Trash/")})).map((e=>function(e){var t;let{identifier:n,name:o,unseenCount:a,messageCount:s,unseenDeletedCount:c,flags:u}=e;const l=Object(r.imapDecode)(o);let d=l.split("/").pop();return 4===u&&null!==(t=h[o])&&void 0!==t&&t.name&&(d=h[o].name),{id:n,name:o===i.a?Object(i.g)():d,data:{path:o,displayPath:l,unseen:void 0!==s&&void 0!==a&&void 0!==c?a-c:void 0,folderLevel:l.split("/").length,flag:u}}}(e)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(870),i=n(925),o=n(2259),a=n(1264),s=n(2208),c=n(919),u=n(1451),l=n(1260),d=function(e){return Object(r.createElement)(l.a,{originalProps:e,metadata:{name:"ipad.and.iphone",svgPath:"M27.7789 9.76808L92.6089 9.76808C91.4587 8.13106 90.6086 6.17297 90.2453 3.95612C90.1724 3.29287 90.0996 2.62962 90.0785 1.86286L27.9035 1.86286C23.0272 1.86286 20.3144-0.694633 20.3144-5.77797L20.3144-64.5976C20.3144-69.6292 23.0272-72.2384 27.9035-72.2384L112.108-72.2384C116.942-72.2384 119.697-69.6292 119.697-64.5976L119.697-62.8481C122.518-62.8481 125.045-62.8481 127.551-62.8375L127.551-64.981C127.551-75.0367 122.465-80.1437 112.233-80.1437L27.7789-80.1437C17.5986-80.1437 12.4609-75.0578 12.4609-64.981L12.4609-5.3946C12.4609 4.6822 17.5986 9.76808 27.7789 9.76808ZM51.1572-1.87542L89.8474-1.87542C89.8474-3.34762 89.8474-4.89269 89.8474-6.37545L51.1572-6.37545C49.8508-6.37545 48.8761-5.50418 48.8761-4.09428C48.8761-2.73613 49.8508-1.87542 51.1572-1.87542ZM105.09 9.76808L127.288 9.76808C133.371 9.76808 136.847 6.40563 136.847 0.622849L136.847-47.9874C136.847-53.8219 133.36-57.1431 127.288-57.1431L105.09-57.1431C99.0077-57.1431 95.5417-53.8219 95.5417-47.9874L95.5417 0.622849C95.5417 6.40563 98.9971 9.76808 105.09 9.76808ZM105.205 3.36372C103.059 3.36372 101.946 2.19903 101.946-0.0393971L101.946-47.3663C101.946-49.6153 103.059-50.7388 105.205-50.7388L109.608-50.7388C109.784-50.7388 109.898-50.6247 109.898-50.4378L109.898-50.0228C109.898-48.3215 111.019-47.1703 112.731-47.1703L119.648-47.1703C121.36-47.1703 122.491-48.3215 122.491-50.0228L122.491-50.4378C122.491-50.6247 122.594-50.7388 122.749-50.7388L127.174-50.7388C129.361-50.7388 130.443-49.6153 130.443-47.3663L130.443-0.0393971C130.443 2.19903 129.361 3.36372 127.174 3.36372ZM109.532 0.871532L122.743 0.871532C123.749 0.871532 124.517 0.16608 124.517-0.840344C124.517-1.77391 123.739-2.50047 122.743-2.50047L109.532-2.50047C108.536-2.50047 107.872-1.77391 107.872-0.840344C107.872 0.217834 108.474 0.871532 109.532 0.871532Z",layoutBox:{viewBox:"0 0 145.67578125 111.1806640625",width:145.67578125,height:111.1806640625,translateX:-1.8170800781249454,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625},glyphBox:{viewBox:"0 0 124.38818359375 89.99609375",width:124.38818359375,height:89.99609375,translateX:-12.460878906249945,translateY:80.22802734375,baseline:80.22802734375,capline:9.76806640625}}})},p=function(e){return Object(r.createElement)(l.a,{originalProps:e,metadata:{name:"findmy",svgPath:"M8.72266-35.2606C8.72266-7.47784 31.3516 15.1511 59.1344 15.1511C86.9606 15.1511 109.59-7.47784 109.59-35.2606C109.59-50.7642 102.467-64.6827 91.3977-73.9726L87.465-67.3934C96.3507-59.5491 102.026-48.0686 102.026-35.2606C102.026-11.5985 82.7966 7.63087 59.1344 7.63087C35.5156 7.63087 16.2863-11.5985 16.2863-35.2606C16.2863-48.0686 21.9181-59.5491 30.8038-67.3934L26.9146-73.9726C15.8451-64.6827 8.72266-50.7642 8.72266-35.2606ZM25.0223-35.2606C25.0223-16.4104 40.3276-1.10512 59.1344-1.10512C77.9846-1.10512 93.2899-16.4104 93.2899-35.2606C93.2899-44.9063 89.2816-53.5323 82.864-59.7789L78.7988-52.9359C83.0601-48.2867 85.6766-42.0758 85.6766-35.2606C85.6766-20.6122 73.7828-8.71848 59.1344-8.71848C44.486-8.71848 32.5922-20.6122 32.5922-35.2606C32.5922-42.0758 35.2086-48.2867 39.5134-52.9359L35.4047-59.7789C29.0306-53.5323 25.0223-44.9063 25.0223-35.2606ZM41.1755-35.2709C41.1755-25.3573 49.2208-17.312 59.1344-17.312C69.048-17.312 77.1367-25.3573 77.1367-35.2709C77.1367-40.3835 74.9749-44.9589 71.5659-48.2212L88.1519-75.7173C88.3491-76.0494 88.2885-76.3695 87.9564-76.6204C79.8818-82.4204 69.3532-85.6724 59.1344-85.6724C48.9505-85.6724 38.387-82.4204 30.3558-76.6204C30.0237-76.3695 29.9631-76.0494 30.1603-75.7173L46.7463-48.2212C43.3373-44.9589 41.1755-40.3835 41.1755-35.2709ZM39.974-73.5699C45.726-76.4747 52.2276-78.1522 59.1344-78.1522C66.0412-78.1522 72.5428-76.4747 78.3382-73.5699L73.8098-66.0611C69.3474-68.2477 64.3481-69.4162 59.1344-69.4162C53.9207-69.4162 48.9214-68.2477 44.5024-66.0611ZM48.4728-59.5151C51.7005-61.0046 55.356-61.8028 59.1344-61.8028C62.9562-61.8028 66.6117-61.0046 69.8394-59.5151L65.3345-52.1213C63.414-52.8262 61.3356-53.2298 59.1344-53.2298C56.9766-53.2298 54.8983-52.8262 52.9343-52.1213ZM48.0558-35.2709C48.0558-41.4246 52.9807-46.3929 59.1344-46.3929C65.3315-46.3929 70.2564-41.4246 70.2564-35.2709C70.2564-29.1275 65.3213-24.1489 59.1344-24.1489C52.9909-24.1489 48.0558-29.1275 48.0558-35.2709ZM51.641-35.2709C51.641-31.1141 54.9879-27.7775 59.1344-27.7775C63.2912-27.7775 66.6278-31.1244 66.6278-35.2709C66.6278-39.4277 63.2809-42.7643 59.1344-42.7643C54.9776-42.7643 51.641-39.4175 51.641-35.2709Z",layoutBox:{viewBox:"0 0 113.683837890625 111.1806640625",width:113.683837890625,height:111.1806640625,translateX:-1.683129882812409,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625},glyphBox:{viewBox:"0 0 102.1298828125 100.884765625",width:102.1298828125,height:100.884765625,translateX:-7.460107421874909,translateY:85.67236328125,baseline:85.67236328125,capline:15.21240234375}}})},f=n(2226),h=n(965);function m(e){var t;const n=null!==(t=e.manageDevicesHidden)&&void 0!==t&&t,l=r.createElement(o.a,{onActivate:()=>{Object(h.r)(),a.a.sharedInstance.switchToApplication("find",{hash:"",route:void 0}),s.b.sharedInstance.recordStat(new c.a("onQuickAccessFMIPSelect"))}},r.createElement(p,{width:37}),r.createElement("div",{className:"title"},Object(i.a)("CloudOS.Authentication.QuickAccess.FMIP.Title"))),m=r.createElement(o.a,{onActivate:()=>{Object(u.d)("manage_applepay"),s.b.sharedInstance.recordStat(new c.a("onQuickAccessManageDevicesSelect"))}},r.createElement(d,{width:47}),r.createElement("div",{className:"title"},Object(i.a)("CloudOS.Authentication.QuickAccess.ManageDevices.Title"),r.createElement(f.d,null)));return r.createElement("div",{className:"quick-access"},r.createElement("div",{className:"quick-access-label"},n?Object(i.a)("CloudOS.Authentication.WebAccessBlockedQuickAccess.Title"):Object(i.a)("CloudOS.Authentication.QuickAccess.Title")),r.createElement("div",{className:"quick-access-buttons"},r.createElement("div",{className:"quick-access-button"},l),!n&&r.createElement("div",{className:"quick-access-button"},m)))}},function(e,t,n){"use strict";n.r(t),n.d(t,"getDomElement",(function(){return r.a})),n.d(t,"getLocationHref",(function(){return r.b})),n.d(t,"htmlTreeAsString",(function(){return r.c})),n.d(t,"dsnFromString",(function(){return i.a})),n.d(t,"dsnToString",(function(){return i.b})),n.d(t,"makeDsn",(function(){return i.c})),n.d(t,"SentryError",(function(){return o.a})),n.d(t,"GLOBAL_OBJ",(function(){return a.a})),n.d(t,"getGlobalObject",(function(){return a.b})),n.d(t,"getGlobalSingleton",(function(){return a.c})),n.d(t,"addInstrumentationHandler",(function(){return s.a})),n.d(t,"isDOMError",(function(){return c.a})),n.d(t,"isDOMException",(function(){return c.b})),n.d(t,"isElement",(function(){return c.c})),n.d(t,"isError",(function(){return c.d})),n.d(t,"isErrorEvent",(function(){return c.e})),n.d(t,"isEvent",(function(){return c.f})),n.d(t,"isInstanceOf",(function(){return c.g})),n.d(t,"isNaN",(function(){return c.h})),n.d(t,"isPlainObject",(function(){return c.i})),n.d(t,"isPrimitive",(function(){return c.j})),n.d(t,"isRegExp",(function(){return c.k})),n.d(t,"isString",(function(){return c.l})),n.d(t,"isSyntheticEvent",(function(){return c.m})),n.d(t,"isThenable",(function(){return c.n})),n.d(t,"CONSOLE_LEVELS",(function(){return u.a})),n.d(t,"consoleSandbox",(function(){return u.b})),n.d(t,"logger",(function(){return u.c})),n.d(t,"memoBuilder",(function(){return l.a})),n.d(t,"addContextToFrame",(function(){return d.a})),n.d(t,"addExceptionMechanism",(function(){return d.b})),n.d(t,"addExceptionTypeValue",(function(){return d.c})),n.d(t,"arrayify",(function(){return d.d})),n.d(t,"checkOrSetAlreadyCaught",(function(){return d.e})),n.d(t,"getEventDescription",(function(){return d.f})),n.d(t,"parseSemver",(function(){return d.g})),n.d(t,"uuid4",(function(){return d.h})),n.d(t,"dynamicRequire",(function(){return p.a})),n.d(t,"isNodeEnv",(function(){return p.b})),n.d(t,"loadModule",(function(){return p.c})),n.d(t,"normalize",(function(){return f.a})),n.d(t,"normalizeToSize",(function(){return f.b})),n.d(t,"walk",(function(){return f.c})),n.d(t,"addNonEnumerableProperty",(function(){return h.a})),n.d(t,"convertToPlainObject",(function(){return h.b})),n.d(t,"dropUndefinedKeys",(function(){return h.c})),n.d(t,"extractExceptionKeysForMessage",(function(){return h.d})),n.d(t,"fill",(function(){return h.e})),n.d(t,"getOriginalFunction",(function(){return h.f})),n.d(t,"markFunctionWrapped",(function(){return h.g})),n.d(t,"objectify",(function(){return h.h})),n.d(t,"urlEncode",(function(){return h.i})),n.d(t,"basename",(function(){return m.a})),n.d(t,"dirname",(function(){return m.b})),n.d(t,"isAbsolute",(function(){return m.c})),n.d(t,"join",(function(){return m.d})),n.d(t,"normalizePath",(function(){return m.e})),n.d(t,"relative",(function(){return m.f})),n.d(t,"resolve",(function(){return m.g})),n.d(t,"makePromiseBuffer",(function(){return g.a})),n.d(t,"addRequestDataToEvent",(function(){return E})),n.d(t,"addRequestDataToTransaction",(function(){return C})),n.d(t,"extractPathForTransaction",(function(){return _})),n.d(t,"extractRequestData",(function(){return O})),n.d(t,"severityFromString",(function(){return A.a})),n.d(t,"severityLevelFromString",(function(){return A.b})),n.d(t,"validSeverityLevels",(function(){return A.c})),n.d(t,"createStackParser",(function(){return T.a})),n.d(t,"getFunctionName",(function(){return T.b})),n.d(t,"nodeStackLineParser",(function(){return T.c})),n.d(t,"stackParserFromStackParserOptions",(function(){return T.d})),n.d(t,"stripSentryFramesAndReverse",(function(){return T.e})),n.d(t,"escapeStringForRegex",(function(){return P.a})),n.d(t,"isMatchingPattern",(function(){return P.b})),n.d(t,"safeJoin",(function(){return P.c})),n.d(t,"snipLine",(function(){return P.d})),n.d(t,"stringMatchesSomePattern",(function(){return P.e})),n.d(t,"truncate",(function(){return P.f})),n.d(t,"isNativeFetch",(function(){return R.a})),n.d(t,"supportsDOMError",(function(){return R.b})),n.d(t,"supportsDOMException",(function(){return R.c})),n.d(t,"supportsErrorEvent",(function(){return R.d})),n.d(t,"supportsFetch",(function(){return R.e})),n.d(t,"supportsHistory",(function(){return R.f})),n.d(t,"supportsNativeFetch",(function(){return R.g})),n.d(t,"supportsReferrerPolicy",(function(){return R.h})),n.d(t,"supportsReportingObserver",(function(){return R.i})),n.d(t,"SyncPromise",(function(){return k.a})),n.d(t,"rejectedSyncPromise",(function(){return k.b})),n.d(t,"resolvedSyncPromise",(function(){return k.c})),n.d(t,"_browserPerformanceTimeOriginMode",(function(){return D.a})),n.d(t,"browserPerformanceTimeOrigin",(function(){return D.b})),n.d(t,"dateTimestampInSeconds",(function(){return D.c})),n.d(t,"timestampInSeconds",(function(){return D.d})),n.d(t,"timestampWithMs",(function(){return D.e})),n.d(t,"usingPerformanceAPI",(function(){return D.f})),n.d(t,"TRACEPARENT_REGEXP",(function(){return M})),n.d(t,"extractTraceparentData",(function(){return N})),n.d(t,"isBrowserBundle",(function(){return x.a})),n.d(t,"addItemToEnvelope",(function(){return L.a})),n.d(t,"createAttachmentEnvelopeItem",(function(){return L.b})),n.d(t,"createEnvelope",(function(){return L.c})),n.d(t,"createEventEnvelopeHeaders",(function(){return L.d})),n.d(t,"envelopeItemTypeToDataCategory",(function(){return L.e})),n.d(t,"forEachEnvelopeItem",(function(){return L.f})),n.d(t,"getSdkMetadataForEnvelopeHeader",(function(){return L.g})),n.d(t,"serializeEnvelope",(function(){return L.h})),n.d(t,"createClientReportEnvelope",(function(){return j.a})),n.d(t,"DEFAULT_RETRY_AFTER",(function(){return U.a})),n.d(t,"disabledUntil",(function(){return U.b})),n.d(t,"isRateLimited",(function(){return U.c})),n.d(t,"parseRetryAfterHeader",(function(){return U.d})),n.d(t,"updateRateLimits",(function(){return U.e})),n.d(t,"BAGGAGE_HEADER_NAME",(function(){return F})),n.d(t,"MAX_BAGGAGE_STRING_LENGTH",(function(){return K})),n.d(t,"SENTRY_BAGGAGE_KEY_PREFIX",(function(){return z})),n.d(t,"SENTRY_BAGGAGE_KEY_PREFIX_REGEX",(function(){return B})),n.d(t,"baggageHeaderToDynamicSamplingContext",(function(){return H})),n.d(t,"dynamicSamplingContextToSentryBaggageHeader",(function(){return W})),n.d(t,"getNumberOfUrlSegments",(function(){return y.a})),n.d(t,"parseUrl",(function(){return y.b})),n.d(t,"stripUrlQueryAndFragment",(function(){return y.c}));var r=n(942),i=n(947),o=n(948),a=n(935),s=n(960),c=n(940),u=n(944),l=n(952),d=n(938),p=n(936),f=n(951),h=n(941),m=n(1148),g=n(957),v=n(954),y=n(963);const b={ip:!1,request:!0,transaction:!0,user:!0},w=["cookies","data","headers","method","query_string","url"],S=["id","username","email"];function C(e,t,n){e&&(e.metadata.source&&"url"!==e.metadata.source||e.setName(..._(t,{path:!0,method:!0})),e.setData("url",t.originalUrl||t.url),t.baseUrl&&e.setData("baseUrl",t.baseUrl),e.setData("query",I(t,n)))}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.method&&e.method.toUpperCase();let r="",i="url";t.customRoute||e.route?(r=t.customRoute||`${e.baseUrl||""}${e.route&&e.route.path}`,i="route"):(e.originalUrl||e.url)&&(r=Object(y.c)(e.originalUrl||e.url||""));let o="";return t.method&&n&&(o+=n),t.method&&t.path&&(o+=" "),t.path&&r&&(o+=r),[o,i]}function O(e,t){const{include:n=w,deps:r}=t||{},i={},o=e.headers||{},a=e.method,s=e.hostname||e.host||o.host||"<no host>",u=`${"https"===e.protocol||e.socket&&e.socket.encrypted?"https":"http"}://${s}${e.originalUrl||e.url||""}`;return n.forEach((t=>{switch(t){case"headers":i.headers=o;break;case"method":i.method=a;break;case"url":i.url=u;break;case"cookies":i.cookies=e.cookies||o.cookie&&r&&r.cookie&&r.cookie.parse(o.cookie)||{};break;case"query_string":i.query_string=I(e,r);break;case"data":if("GET"===a||"HEAD"===a)break;void 0!==e.body&&(i.data=Object(c.l)(e.body)?e.body:JSON.stringify(Object(f.a)(e.body)));break;default:({}).hasOwnProperty.call(e,t)&&(i[t]=e[t])}})),i}function E(e,t,n){const r={...b,...Object(v.a)([n,"optionalAccess",e=>e.include])};if(r.request){const i=Array.isArray(r.request)?O(t,{include:r.request,deps:Object(v.a)([n,"optionalAccess",e=>e.deps])}):O(t,{deps:Object(v.a)([n,"optionalAccess",e=>e.deps])});e.request={...e.request,...i}}if(r.user){const n=t.user&&Object(c.i)(t.user)?function(e,t){const n={};return(Array.isArray(t)?t:S).forEach((t=>{e&&t in e&&(n[t]=e[t])})),n}(t.user,r.user):{};Object.keys(n).length&&(e.user={...e.user,...n})}if(r.ip){const n=t.ip||t.socket&&t.socket.remoteAddress;n&&(e.user={...e.user,ip_address:n})}return r.transaction&&!e.transaction&&(e.transaction=function(e,t){switch(t){case"path":return _(e,{path:!0})[0];case"handler":return e.route&&e.route.stack&&e.route.stack[0]&&e.route.stack[0].name||"<anonymous>";default:return _(e,{path:!0,method:!0})[0]}}(t,r.transaction)),e}function I(e,t){let n=e.originalUrl||e.url||"";if(n)return n.startsWith("/")&&(n=`http://dogs.are.great${n}`),e.query||void 0!==typeof URL&&new URL(n).search.replace("?","")||t&&t.url&&t.url.parse(n).query||void 0}var A=n(962),T=n(953),P=n(939),R=n(961),k=n(943),D=n(933);const M=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function N(e){const t=e.match(M);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}var x=n(937),L=n(950),j=n(964),U=n(958);const F="baggage",z="sentry-",B=/^sentry-/,K=8192;function H(e){if(!Object(c.l)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...q(t)})),{});else{if(!e)return;t=q(e)}const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return n.match(B)&&(e[n.slice(z.length)]=r),e}),{});return Object.keys(n).length>0?n:void 0}function W(e){return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce(((e,t,n)=>{let[r,i]=t;const o=`${encodeURIComponent(r)}=${encodeURIComponent(i)}`,a=0===n?o:`${e},${o}`;return a.length>K?e:a}),"")}(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return r&&(e[`${z}${n}`]=r),e}),{}))}function q(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})}},function(e,t,n){"use strict";n.d(t,"d",(function(){return x})),n.d(t,"c",(function(){return L})),n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return B}));var r=n(870),i=n(1215),o=n.n(i),a=n(2320),s=n(1343),c=(n(1315),n(1319)),u=n(1263),l=n(1316),d=n(1227),p=n(1265),f=n(2232),h=n(1321),m=n(2309),g=n(2224),v=n(1228),y=n(2257),b=n(2196),w=n(2262),S=n(2258),C=n(2259),_=n(1339),O=n(2146);function E(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}window.ResizeObserver||(window.ResizeObserver=O.a);var I=function(e){void 0===e&&(e={});var t=e.onResize,n=Object(r.useRef)(void 0);n.current=t;var i=e.round||Math.round,o=Object(r.useRef)(),a=Object(r.useState)({width:void 0,height:void 0}),s=a[0],c=a[1],u=Object(r.useRef)(!1);Object(r.useEffect)((function(){return u.current=!1,function(){u.current=!0}}),[]);var l=Object(r.useRef)({width:void 0,height:void 0}),d=function(e,t){var n=Object(r.useRef)(null),i=Object(r.useRef)(null);i.current=t;var o=Object(r.useRef)(null);Object(r.useEffect)((function(){a()}));var a=Object(r.useCallback)((function(){var t=o.current,r=i.current,a=t||(r?r instanceof Element?r:r.current:null);n.current&&n.current.element===a&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:a,subscriber:e,cleanup:a?e(a):void 0})}),[e]);return Object(r.useEffect)((function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}}),[]),Object(r.useCallback)((function(e){o.current=e,a()}),[a])}(Object(r.useCallback)((function(t){return o.current&&o.current.box===e.box&&o.current.round===i||(o.current={box:e.box,round:i,instance:new ResizeObserver((function(t){var r=t[0],o="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",a=E(r,o,"inlineSize"),s=E(r,o,"blockSize"),d=a?i(a):void 0,p=s?i(s):void 0;if(l.current.width!==d||l.current.height!==p){var f={width:d,height:p};l.current.width=d,l.current.height=p,n.current?n.current(f):u.current||c(f)}}))}),o.current.instance.observe(t,{box:e.box}),function(){o.current&&o.current.instance.unobserve(t)}}),[e.box,i]),e.ref);return Object(r.useMemo)((function(){return{ref:d,width:s.width,height:s.height}}),[d,s.width,s.height])},A=n(1338),T=n(1337),P=n(1317),R=n(1320),k=n(1318),D=n(2231),M=n(2291),N=n(1247);const x=r.createContext(null);let L=function(e){return e.Small="small",e.Large="large",e}({});const j=e=>{var t,n;const{icon:i,appId:s,url:m,tileIndex:_,children:O,isLoading:E,description:I,heading:A,ariaLabel:L,ariaLevel:j=2,primaryAction:U,tileSize:z,onTileClick:K,error:H}=e,{isInCustomizationMode:W}=Object(l.b)(),{onTilePickerClose:q,tilePickerContent:V,isTilePickerLoading:$,remeasureToken:G,tileFooterBottomRightContent:Z}=null!==(t=Object(P.b)())&&void 0!==t?t:{},{isTileShowingOtherPopover:Q}=null!==(n=Object(k.b)())&&void 0!==n?n:{},Y=o()("banner",{"banner-with-primary-action":!(null===U||void 0===U||!U.description)||W}),J=Object(d.a)("VoiceOver.HomeTile.LoadingComplete"),X=r.useRef(null),{setAriaLiveText:ee}=Object(u.b)();r.useEffect((()=>{I&&document.activeElement===X.current&&ee(J+" "+I)}),[I,J,ee]);const te=Object(c.b)(),ne=Object(R.b)(),[re]=Object(h.b)("launch-app",`${s}-tile`),[ie]=Object(h.b)("launch-for-create",`${s}-tile`),[oe,ae]=(e=>{const t=Object(r.useRef)();return[(n,r,i,o,a,s)=>{if(t.current)return t.current(n,r,i,o,a,s);const c=new Array(e.length);for(let p=0;p<e.length;p++){const u=e[p],l=u(n,r,i,o,a,s);if(c[p]=l,void 0!==l.contentRect&&(!a&&void 0!==l.arrowRect||a)&&n&&n.width===l.contentRect.width&&n.height===l.contentRect.height)return t.current=u,l}let u=c[0],l=e[0],d=u.contentRect?u.contentRect.width*u.contentRect.height:0;for(let t=1;t<c.length;t++){const n=c[t],r=n.contentRect?n.contentRect.width*n.contentRect.height:0;r>d&&(d=r,u=n,l=e[t])}return t.current=l,u},Object(r.useCallback)((()=>{t.current=void 0}),[])]})([g.a.bottomInlineStart,g.a.inlineStartBottom,g.a.inlineEndTop]),se=r.createElement(F,{heading:A,description:I,icon:i,ariaLevel:j,isLoading:E}),ce=r.useRef(null),ue=r.useRef(),le=r.useRef(null),de=r.useRef(null),pe=Object(d.a)("HomePage.TilePicker.Title"),{isFocusVisible:fe}=Object(D.d)(),he=r.useMemo((()=>{var e;return!!s&&(null===(e=N.a.sharedInstance.getApplicationConfiguration(s))||void 0===e?void 0:e.applicationInfo.blockNewContentCreation)}),[s]),[me,ge]=r.useState(!1),ve=me||Q,[ye,be]=Object(v.a)(Object(y.i)(r.createElement(b.b,{className:"tile-picker-popover",anchorRef:ce,positioner:oe,remeasureToken:G},r.createElement("div",{className:o()("container",$?"is-loading":"")},r.createElement("h3",{className:"tile-picker-title"},pe),$?r.createElement(w.a,{description:Object(d.a)("CloudOS.Spinner.Loading")}):V)),{initialFocus:fe?"ui-popover [role=grid]":void 0,paneType:y.d.Dismissible,className:"tile-customization-picker-pane",onClose:()=>{ge(!1),be(),null===q||void 0===q||q(),ae()}}),le,Object(S.a)(r.createElement("div",{ref:de,className:"tile-picker-popover card-compact"},r.createElement("div",{className:"card-content-container",style:ue.current?{height:`${ue.current}px`}:{}},r.createElement("div",{className:"card-compact-header"},r.createElement(M.a,{onActivate:()=>be(),className:"close-button"})),r.createElement("div",{className:o()("container",$?"is-loading":"")},$?r.createElement(w.a,{description:Object(d.a)("CloudOS.Spinner.Loading")}):V))),{className:"tile-card-compact",initialFocus:"ui-popover [role=grid]",paneType:y.d.Dismissible,onClose:()=>{ge(!1),be(),null===q||void 0===q||q()}}),de),we=r.createElement(r.Fragment,null,r.createElement("div",{className:Y},m&&!W?r.createElement("a",{href:m,className:"link header-content unstyled-link",onClick:e=>{s&&!K&&(e.preventDefault(),e.stopPropagation(),re(),te.launchApp(s,{options:{launchPath:ne,source:{reason:p.b.TILE_HEADER_CLICK}}},{presentationStyle:"fullscreen"}))},ref:X},se):r.createElement("div",{className:o()("header-content",W&&"customization")},se)),!W&&U&&s&&r.createElement(a.a,{ariaLabel:U.description,className:"primary-action",icon:U.icon,disabled:he,action:()=>{U.callback?U.callback():(ie(),te.launchApp(s,{options:{launchPath:ne,source:{reason:p.b.CREATE}}}))}}),W&&r.createElement(f.a,{applicationIdentifier:s||"",heading:A,index:_}),r.createElement("div",{className:"content","aria-hidden":W},O,V&&r.createElement("div",{className:"footer"},r.createElement(C.a,{className:o()("tile-picker-popover-button",me?"showing-tile-picker":"",`${s}-tile-customization`,W?"customization":""),onActivate:function(){ce.current&&(ue.current=window.innerHeight-ce.current.getBoundingClientRect().bottom-30),ye(),ge(!0)},ref:ce,ariaLabel:Object(d.a)("VoiceOver.HomePage.TilePicker.Button.AriaLabel",{heading:A}),variant:"push primary",ariaHasPopup:"dialog"},r.createElement(T.a,{height:16,width:16,layoutMode:"glyphBox"})),Z?r.createElement("div",{className:"bottom-right-container"},Z):null)));return r.createElement("div",{className:o()("tile-container",{customize:W,error:H})},r.createElement("article",{"aria-label":null!==L&&void 0!==L?L:A,style:{userSelect:"none"},className:"tile-article"},r.createElement("div",{draggable:W,className:o()(e.className,"tile",z,{customize:W,"should-animate-tile":ve,error:H})},r.createElement(x.Provider,{value:z},!W&&K&&!H&&r.createElement("button",{className:"unstyled-button tile-button","aria-haspopup":"dialog","aria-label":`Show more options for ${null!==L&&void 0!==L?L:A}`,onClick:K}),we),r.createElement("div",{className:"tile-border"})),r.createElement(B,{heading:A,tileIndex:_})))};function U(e){return e?"string"===typeof e?e:null!==(t=e.textContent)&&void 0!==t?t:"":"";var t}function F(e){let{heading:t,description:n,icon:i,ariaLevel:a,isLoading:s}=e;const c=I(),u=I(),[d,p]=void 0!==c.width&&void 0!==u.width&&void 0!==u.height?[c.width>u.width,u.height>25]:[!1,!1],[f,h]=r.useState(!1),{isInCustomizationMode:m}=Object(l.b)();return r.useEffect((()=>{m?!f&&u.height&&u.height>=80&&h(!0):f&&u.height&&u.height<80&&h(!1)}),[u,f,m]),r.createElement(r.Fragment,null,r.createElement("div",{className:"icon-wrapper"},i),r.createElement("div",{className:"text",title:p?U(n):void 0,role:"presentation"},r.createElement("div",{className:o()("heading",d?f?"extra-shrink":"shrink":""),role:"heading","aria-level":a,ref:u.ref},t),r.createElement("div",{className:"heading offscreen-measure","aria-hidden":!0,ref:c.ref},t),r.createElement("div",{className:o()("description",p&&"hidden",{tall:Object(A.a)()}),title:U(n),role:"presentation"},r.createElement("span",{className:o()("description-content","string"!==typeof n?"rendered-react-node-content":"")},"string"===typeof n?n:null===n||void 0===n?void 0:n.rendered),s&&r.createElement(z,null))))}function z(){const e=Object(d.a)("HomeTile.Loading");return r.createElement("div",{className:"ellipsis","aria-label":e},r.createElement("div",{className:"dots"}))}function B(e){var t,n;let{heading:i,tileIndex:a}=e;const{isInCustomizationMode:c}=Object(l.b)(),u=Object(_.a)(),p=Object(m.e)(),f=r.useCallback((()=>{u({className:"remove-tile-confirmation-alert",animates:y.b.IN,title:Object(d.a)("RemoveTileAlert.Title",{tileName:i}),description:Object(d.a)("RemoveTileAlert.Description",{tileName:i}),buttons:[{title:Object(d.a)("RemoveTileAlert.Remove"),destructive:!0,action:"remove"},{title:Object(d.a)("RemoveTileAlert.Cancel"),action:"cancel"}],defaultAction:"cancel",cancelAction:"cancel",onActionSelected:e=>{"remove"===e&&p({type:m.a.DELETE,index:a})}})}),[u,p,i,a]),h=(null!==(t=null===(n=Object(m.d)().configurations)||void 0===n?void 0:n.length)&&void 0!==t?t:0)>1,g=Object(d.a)("VoiceOver.Tile.RemoveAriaLabel",{tileName:i}),[v,b]=r.useState(!1);return r.useLayoutEffect((()=>{b(c)}),[c]),c?r.createElement(C.a,{onActivate:f,className:o()("remove-button",v&&h?"show":"hide"),ariaLabel:g,disabled:!h,variant:"push primary destructive"},r.createElement(s.a,{layoutMode:"glyphBox"})):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(870),i=n(1215),o=n.n(i),a=n(1348),s=n(1347),c=n(1260),u=function(e){return Object(r.createElement)(c.a,{originalProps:e,metadata:{name:"arrow.up.right",svgPath:"M87.207-17.1387L87.1582-66.1133C87.1582-69.9219 84.6191-72.5098 80.7617-72.5098L31.7383-72.5098C28.125-72.5098 25.4883-69.7754 25.4883-66.5039C25.4883-63.2812 28.2715-60.6445 31.6406-60.6445L49.3652-60.6445L68.2617-61.3281L59.5215-53.5645L14.4531-8.44727C13.1836-7.17773 12.4512-5.56641 12.4512-4.00391C12.4512-0.830078 15.3809 2.19727 18.6523 2.19727C20.2637 2.19727 21.7773 1.51367 23.0957 0.195312L68.2129-44.873L76.0254-53.6133L75.2441-35.4492L75.2441-17.041C75.2441-13.623 77.8809-10.8398 81.1523-10.8398C84.4238-10.8398 87.207-13.5742 87.207-17.1387Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.4951147460938,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 77.384033203125 74.8544921875",width:77.384033203125,height:74.8544921875,translateX:-9.822939453124945,translateY:72.6572265625,baseline:72.6572265625,capline:2.197265625}}})},l=function(e){return Object(r.createElement)(c.a,{originalProps:e,metadata:{name:"arrow.up.left",svgPath:"M12.4512-17.1387C12.4512-13.5742 15.2344-10.8398 18.5059-10.8398C21.7773-10.8398 24.4141-13.623 24.4141-17.041L24.4141-35.4492L23.6328-53.6133L31.4453-44.873L76.5625 0.195312C77.8809 1.51367 79.3945 2.19727 81.0059 2.19727C84.2773 2.19727 87.207-0.830078 87.207-4.00391C87.207-5.56641 86.4746-7.17773 85.2051-8.44727L40.1367-53.5645L31.3965-61.3281L50.293-60.6445L68.0176-60.6445C71.3867-60.6445 74.1699-63.2812 74.1699-66.5039C74.1699-69.7754 71.5332-72.5098 67.9199-72.5098L18.8965-72.5098C15.0391-72.5098 12.5-69.9219 12.5-66.1133Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.4951147460938,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 77.384033203125 74.8544921875",width:77.384033203125,height:74.8544921875,translateX:-9.822939453124945,translateY:72.6572265625,baseline:72.6572265625,capline:2.197265625}}})},d=n(1227),p=n(926),f=n(2208),h=n(919),m=n(2155);function g(){return g=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},g.apply(null,arguments)}const v=e=>{const{children:t,hideArrow:n,className:i,useSemiboldArrow:c,statName:v,onClick:y,...b}=e,w=Object(d.a)("VoiceOver.ExternalLink.Description"),S=c?l:s.a,C=c?u:a.a,_="rtl"===Object(p.b)()?r.createElement(S,{"aria-label":w,desiredFontSize:10,layoutMode:"glyphBox"}):r.createElement(C,{"aria-label":w,desiredFontSize:10,layoutMode:"glyphBox"});return r.createElement("span",{className:o()("external-link",i)},r.createElement("a",g({target:"_blank",rel:"noreferrer"},b,{href:e.href,"data-testid":"anchor",onClick:function(e){if(v){var t,n;const e=null!==(t=m.a.value)&&void 0!==t&&t.isError?"unknown":null===(n=m.a.value)||void 0===n||null===(n=n.requestInfo)||void 0===n?void 0:n.country;f.b.sharedInstance.recordStat(h.a.withEventAndLabel("click",v,{country:null!==e&&void 0!==e?e:"unknown"}))}y&&(e.preventDefault(),y(e))}}),t,!n&&r.createElement("span",{className:"nobreak"},"\xa0",_)))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(903),i=n(2248),o=n(2279);const a={shouldSendStatsWhileInDevelopmentMode:!1,flushInterval:6e4};var s=n(912),c=n(918),u=n(916),l=n(919),d=n(921),p=n(920);const f={};function h(e,t,n){const{statName:r}=e;if(!f[r])return f[r]=!0,t(e)}var m=n(2155),g=n(2159);const v=new class{constructor(){let{shouldSendStatsWhileInDevelopmentMode:e,flushInterval:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;o.a.configure({isSendingStatsEnabled:!0,flushInterval:t})}updateServiceUrl(e){o.a.updateServiceUrl(e)}recordStat(e){o.a.handleStat(e)}recordPerfStat(e){o.a.handlePerfStat(e)}flush(){o.a.flush()}}({shouldSendStatsWhileInDevelopmentMode:!1,flushInterval:8e3});class y{get isSessionAuthenticated(){return!!m.h.value}constructor(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:v;this.applicationName=void 0,this.telemetryClient=void 0,this.masteringNumber=void 0,this.buildNumber=void 0,this.hostname=void 0,this.telemetrySession=void 0,this.browserLocale=void 0,this.markTimestampBuckets={},this.measureDictionary={},this.applicationName=e,this.masteringNumber=t,this.buildNumber=n,this.hostname=r,this.browserLocale=i,this.telemetrySession=u.a.sharedInstance,this.telemetryClient=o,this.updateServiceUrl(),this.registerPerformanceObserver()}recordStat(e){e.markRecorded();const t=e.toJSON();this.recordStatRaw(t.statName,t)}recordStatNoPersistLog(e){e.addAdditionalProperties({persistLog:!1}),this.recordStat(e)}recordPerfStat(e){const t=e.toJSON();this.recordStatRaw(t.statName,t,s.b.PERF_STAT)}recordStatOnce(e){h(e,this.recordStat.bind(this))}recordPerfStatOnce(e){h(e,this.recordPerfStat.bind(this))}recordStatRaw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.b.STAT;const{applicationName:i,masteringNumber:o,buildNumber:a,hostname:u,browserLocale:l,telemetrySession:d,telemetryClient:p}=this;t.isSessionAuthenticated=this.isSessionAuthenticated,t.sessionDuration=d.duration||0;const f=Object(c.c)(i,o,a,d.identifier||"",u,l,r.c.sharedInstance.primaryInteractionMode,e,t);if(n===s.b.PERF_STAT)p.recordPerfStat(f);else{if(n!==s.b.STAT)throw"Unknown stat type used to report a stat";p.recordStat(f)}}recordApplicationStat(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{masteringNumber:a,buildNumber:s,browserLocale:u,hostname:l,telemetryClient:d,telemetrySession:p}=this;o.isSessionAuthenticated=this.isSessionAuthenticated,o.sessionDuration=p.duration||0;const f=Object(c.c)(e,t,n,p.identifier,l,u,r.c.sharedInstance.primaryInteractionMode,i,o);f.cloudOSMasteringNumber=a,f.cloudOSBuildNumber=s,d.recordStat(f)}flushStats(){this.telemetryClient.flush()}updateServiceUrl(){Object(g.effect)((()=>{const e=Object(i.j)("feedbackws","");this.telemetryClient.updateServiceUrl(e)}))}mark(e,t){return window.performance.clearMarks(e),window.performance.mark(e,{detail:t})}measure(e,t,n,r){try{return window.performance.clearMeasures(e),window.performance.measure(e,{detail:r,start:t,end:n})}catch{return}}registerPerformanceObserver(){try{return new PerformanceObserver((e=>{const t=e.getEntries(),n={};t.forEach((e=>{var t;const{detail:r}=e;if(!r)return;try{if(void 0===r.baselineName||void 0===r.measureFromBaseline||void 0===r.applicationName)return}catch{return}const i=r.contextLabel?`${e.name}.${r.contextLabel}`:e.name,o=null!==(t=this.markTimestampBuckets[i])&&void 0!==t?t:new Set;this.markTimestampBuckets[i]=o;const a=parseInt(String(e.startTime/1e3));!1===o.has(a)&&!1===o.has(a-1)&&(o.add(a),n[i]=e)}));for(const r of Object.keys(n)){const e=n[r],t=new l.a(r,{statCategory:p.a.USER,__allow_user:!0,...e.detail.additionalProperties});e.detail.success?t.success():t.failure(),this.recordStat(t)}Object.values(n).forEach((e=>{const{detail:t}=e;if(!0===t.success){const n=t.contextLabel?`${e.name}.${t.contextLabel}`:e.name,r=this.measureDictionary[n],i=this.measure(n,t.measureFromBaseline?t.baselineName:0,e.name,t);if(!i)return;if(!r||r.startTime<i.startTime){this.measureDictionary[n]=i;const e=void 0===r?`${n}_0`:n,o=new d.a(e,{baselineName:t.baselineName,duration:i.duration,statCategory:p.a.USER,__allow_user:!0,...t.additionalProperties});this.recordPerfStat(o)}window.performance.clearMeasures(i.name)}}))})).observe({type:"mark",buffered:!0})}catch{}}}y.sharedInstance=void 0},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,i,o=n(2249),a=n(2251),s=n(972),c=n(1429),u=n.t(c,2),l=n(898),d=n(968);const p=null!==(r=document.currentScript)&&void 0!==r&&r.src?"https://www.icloud.com/system/icloud.com/current/en-us/main.js":"",f=new URL(p).pathname.replace(/\/[^/]+\/?$/,"");class h{constructor(e){this.publicPath=void 0,this.rootContentPath=void 0;const t=Object(d.a)(e);this.publicPath=t.join("/"),this.rootContentPath=t.slice(0,t.length-1).join("/")}}i=h,h.sharedInstance=new i(f);var m,g=n(878),v=n(973),y=n(888);const b=y.z.record(y.z.string());class w{get regionFormattingRules(){return this.cachedFormattingRules}constructor(e,t){this.regionFormatRulesVersion=5,this.regionFormatBaseUrl=void 0,this.regionFormatterLocaleMap={no:"nb","no-NO":"nb-NO","iw-IL":"he-IL","vi-VI":"vi","zh-CN":"zh-Hans-CN","zh-TW":"zh-Hant-TW","zh-Hant-CN":"zh-Hant"},this.hasSecondaryLocales=["ar-SA","he-IL","iw-IL"],this.regionFormat=null,this.cachedFormattingRules=null,this.locale=t;const n=e?`https://www.${e}`:window.location.origin;this.regionFormatBaseUrl=`${n}/locales/`}setSecondaryLocale(e){l.a.secondaryLocale=e}async setCurrentLocaleAndRegionFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(s.b)(e);const n=[];this.locale!==e&&(n.push(this.fetchStringsJson(e)),this.locale=e),this.regionFormat!==t&&null!==t&&(n.push(this.loadRegionFormattingRules(t)),this.regionFormat=t),await Promise.all(n)}async fetchStringsJson(e){const{protocol:t,hostname:n}=l.a,{rootContentPath:r}=h.sharedInstance,i=await v.a.fetchJSON(`${t}//${n}/${r}/${e}/strings.json`,{validate:{type:"WireStringRecord",schema:b}}),{ok:o}=i;return o&&(Object(g.a)(e,i.value),Object(g.g)(e)),o}async loadRegionFormattingRules(e){const t=`${this.regionFormatBaseUrl}${this.regionFormatRulesVersion}`,n=await async function(e,t,n){let r=3;for(;;){const i=n,c=(()=>{switch(i){case"no":return"nb";case"no-no":return"nb-no";default:return i}})(),l=o.b(e),d="en-us",p=l.pathname;"/"!==p.charAt(p.length-1)&&(l.pathname=p+"/");const f=Object(s.a)(c);l.pathname=l.pathname+f+".json";const h=await(async()=>{try{return await Object(a.b)(l.href,{...t,maxAttempts:3})}catch{return null}})();if(null!==h&&void 0!==h&&h.ok){const e=await(async()=>{try{return await h.json()}catch{return null}})();if(e)return{regionFormat:c,formattingRules:e}}const m=c.split("-"),g=404===(null===h||void 0===h?void 0:h.status)&&c!==d&&m.length>1?(m.pop(),m.join("-")):d;if(0===r)return{regionFormat:c,formattingRules:u};g===d&&(r-=1),n=g}}(t,{credentials:"same-origin"},e),r=n.formattingRules;return!!r&&(this.cachedFormattingRules=r,!0)}}m=w,w.sharedInstance=new m("",Object(g.b)())},function(e,t,n){"use strict";n.r(t),n.d(t,"MessagePortConnection",(function(){return r.a})),n.d(t,"MessagePortServiceConnection",(function(){return o})),n.d(t,"MessagePortServiceListener",(function(){return c})),n.d(t,"MessagePortServiceListenerConnectEvent",(function(){return s})),n.d(t,"JsonRpcConnection",(function(){return u.a})),n.d(t,"JsonRpcServiceListener",(function(){return l.a})),n.d(t,"JsonRpcServiceListenerConnectEvent",(function(){return l.b})),n.d(t,"JsonRpcServiceConnection",(function(){return d.a})),n.d(t,"serviceNode",(function(){return i.a}));var r=n(895),i=n(2215);class o extends r.a{constructor(e,t){super(void 0,t),this.serviceName=e;const n=i.a.connectToService(e,{serviceZone:null===t||void 0===t?void 0:t.serviceZone,serviceOrigin:null===t||void 0===t?void 0:t.serviceOrigin,connectionTimeout:null===t||void 0===t?void 0:t.connectionTimeout});(()=>{var e,t,r,i;e=this,t=void 0,i=function*(){const e=yield n;e?this.usePort(e):this.close()},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(t){o(t)}}function s(e){try{c(i.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))})()}}var a=n(893);class s extends a.Event{constructor(e,t){super("connect"),this.connection=e,this.source=t}}class c extends a.EventTarget{broadcastMessage(e){for(const t of this.connections)t.postMessage(e)}constructor(e,t){super(),this.bufferedConnects=[],this.unregisterService=null,this.started=!1,this.closed=!1,this.connections=new Set,this.handleConnection=(e,t)=>{this.closed||(this.started?this.createConnection(e,t):this.bufferedConnects.push([e,t]))},this.handleConnectionStateChange=e=>{const t=e.target;t instanceof r.a&&"closed"===t.connectionState&&(t.removeEventListener("connectionstatechange",this.handleConnectionStateChange),this.connections.delete(t))},this._onconnect=null,this.__onconnect=null,this._onclose=null,this.__onclose=null,this.serviceName=e,this.options=t?Object.assign({},t):t,this.unregisterService=i.a.registerService(e,this.handleConnection,{serviceZone:null===t||void 0===t?void 0:t.serviceZone,connectionOrigin:null===t||void 0===t?void 0:t.connectionOrigin})}start(){if(!this.closed&&!this.started){this.started=!0;for(const e of this.bufferedConnects)this.createConnection(e[0],e[1]);this.bufferedConnects.length=0}}close(){var e;this.closed||(this.closed=!0,null===(e=this.unregisterService)||void 0===e||e.call(this),this.bufferedConnects.length=0,this.dispatchEvent(new a.Event("close")))}createConnection(e,t){var n,i,o;const a=new r.a(e,{keepaliveTime:null===(n=this.options)||void 0===n?void 0:n.defaultConnectionKeepaliveTime,keepaliveInterval:null===(i=this.options)||void 0===i?void 0:i.defaultConnectionKeepaliveInterval,keepaliveRetry:null===(o=this.options)||void 0===o?void 0:o.defaultConnectionKeepaliveRetry});this.connections.add(a),a.addEventListener("connectionstatechange",this.handleConnectionStateChange);const c=new s(a,t);this.dispatchEvent(c),c.defaultPrevented&&a.close()}get onconnect(){return this._onconnect}set onconnect(e){if(this._onconnect!==e&&(this.__onconnect&&this.removeEventListener("connect",this.__onconnect),this._onconnect=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onconnect=t,this.addEventListener("connect",t)}}get onclose(){return this._onclose}set onclose(e){if(this._onclose!==e&&(this.__onclose&&this.removeEventListener("close",this.__onclose),this._onclose=e,null!==e)){const t=t=>null===e||void 0===e?void 0:e(t);this.__onclose=t,this.addEventListener("close",t)}}}var u=n(894),l=n(892),d=n(908)},function(e,t,n){"use strict";n.r(t),n.d(t,"isRTL",(function(){return r.c})),n.d(t,"Dir",(function(){return r.a})),n.d(t,"getDir",(function(){return r.b})),n.d(t,"getLocale",(function(){return i.b})),n.d(t,"setLocale",(function(){return i.g})),n.d(t,"addLocalizedValuesFor",(function(){return i.a})),n.d(t,"hasLocalizedValuesFor",(function(){return i.c})),n.d(t,"onLocaleChange",(function(){return i.f})),n.d(t,"makeLoc",(function(){return i.d})),n.d(t,"makeLocForLocale",(function(){return i.e})),n.d(t,"useLocale",(function(){return o.d})),n.d(t,"makeUseLoc",(function(){return o.a})),n.d(t,"useIsRTL",(function(){return o.c})),n.d(t,"useDir",(function(){return o.b})),n.d(t,"personName",(function(){return a.a})),n.d(t,"stringIsCJK",(function(){return s.a})),n.d(t,"countryFromLocale",(function(){return c.e})),n.d(t,"getCompleteName",(function(){return u.a})),n.d(t,"getFullName",(function(){return u.b})),n.d(t,"getInitials",(function(){return u.c})),n.d(t,"getShortName",(function(){return u.d})),n.d(t,"getSingleInitial",(function(){return u.e})),n.d(t,"getWordInitials",(function(){return u.f})),n.d(t,"isFirstLastCountry",(function(){return u.g})),n.d(t,"isNameCJK",(function(){return u.h})),n.d(t,"isTallLanguage",(function(){return d}));var r=n(904),i=n(878),o=n(926),a=n(999),s=n(1e3),c=n(1001),u=n(2280),l=["th-th","hi-in","tr-tr","ca-es"],d=function(e){return l.includes(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(888),i=n(900),o=n(973);const a=r.z.object({status:r.z.string(),message:r.z.string(),isWebAccessAllowed:r.z.boolean(),isICDRSDisabled:r.z.boolean(),isDeviceConsentedForPCS:r.z.boolean(),deviceConsentForPCSExpiry:r.z.number(),deviceNotSupported:r.z.boolean().optional()});async function s(e,t){const n=`https://setup.${i.a.sharedInstance.current.servicesDomain}/setup/ws/1/requestPCS`;let r;try{r=await o.a.postURL(n,{body:JSON.stringify({appName:e,derivedFromUserAction:t})})}catch{return{ok:!1}}if(!r||!r.ok)return{ok:!1};const s=await(async()=>{try{return await r.json()}catch{return null}})();return s?(c=s,a.safeParse(c).success?{ok:!0,data:s}:{ok:!1}):{ok:!1};var c}var c=n(1168),u=n(919),l=n(2208);const d=r.z.object({isDeviceConsentNotificationSent:r.z.boolean(),isWebAccessAllowed:r.z.boolean(),isICDRSDisabled:r.z.boolean(),isDeviceConsentedForPCS:r.z.boolean(),deviceConsentForPCSExpiry:r.z.number()});var p,f=n(1273),h=n(1267),m=n(965),g=n(2155),v=n(1266),y=function(e){return e.PCS_KEY_MANAGER="PCSKeyManager",e}(y||{}),b=function(e){return e.PCS_KEY_UNARMED="fetchPCSKeys with unarmed device",e.PCS_KEY_EXPIRED="fetchPCSKeys with expired device",e.PCS_KEY_ARMED="fetchPCSKeys with armed device",e}(b||{}),w=function(e){return e.NO_DEVICE="User has no iCDRS supported device.",e.NO_KEY="Not able to fetch PCS keys.",e.NOTIFICATION_NOT_SENT_ARM_DEVICE="Device consent notification not sent.",e.USER_DECLINED='User chose "Don\'t allow" from device.',e}(w||{});class S{constructor(e,t,n,r,i){this.stat=void 0,this.source=t,this.reason=n,this.context=r,this.pcsKeyIdentifier=i,this.stat=new u.a(e).time()}reportSuccess(e){this.stat.end(),l.b.sharedInstance.recordStat(this.stat.success({requestSource:this.source,requestReason:this.reason,requestApplication:this.context,requestPCSKey:this.pcsKeyIdentifier,requestCount:1,notificationsSentToDeviceCount:e}))}reportFailure(e,t,n){this.stat.end(),l.b.sharedInstance.recordStat(this.stat.failure({requestSource:this.source,requestReason:this.reason,requestApplication:this.context,requestPCSKey:this.pcsKeyIdentifier,requestCount:1,notificationsSentToDeviceCount:n,failureReason:e,failureDescription:t}))}}const C=r.z.object({apsTopic:r.z.string(),clientId:r.z.string(),newDeviceArmed:r.z.boolean().optional(),newPCSKeyAvailable:r.z.string().optional()});class _{addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}addAvailablePCSKey(e){var t;if(!this.availablePCSKeys.has(e)){this.availablePCSKeys.add(e);for(const t of this.listeners)null===t||void 0===t||t(this,e);null===(t=this.pcsKeyResolves.get(e))||void 0===t||t(),this.pcsKeyResolves.delete(e)}}constructor(){this.listeners=new Set,this.pcsKeyPromises=new Map,this.pcsKeyResolves=new Map,this.newDeviceArmedListeners=[],this.newPCSKeyAvailableListeners=new Map,this.availablePCSKeys=new Set,this.handlePush=e=>{if(e.data.topic!==v.a.hash)return;const t=e.data.payload;if(n=t,C.safeParse(n).success){var n;if("string"===typeof t.newPCSKeyAvailable){const e=Object(c.a)(t.newPCSKeyAvailable),n=this.newPCSKeyAvailableListeners.get(e);if(!n)return;for(const t of n)t();this.newPCSKeyAvailableListeners.delete(e)}if("boolean"===typeof t.newDeviceArmed){for(const e of this.newDeviceArmedListeners)e(t.newDeviceArmed);this.newDeviceArmedListeners=[]}}},Object(h.b)(this.handlePush)}getPCSKeyPromise(e){const t=this.pcsKeyPromises.get(e);if(t)return t;const n=new Promise((t=>{this.hasPCSKey(e)?t():this.pcsKeyResolves.set(e,t)}));return this.pcsKeyPromises.set(e,n),n}hasPCSKey(e){return!Object(m.f)()||this.availablePCSKeys.has(e)}async armDeviceIfNeededAndFetchPCSKeys(e,t,n,r){var i,o,a;if(!Object(m.f)())return!0;if(this.hasPCSKey(t))return!0;if((null!==(i=null===(o=g.h.value)||void 0===o||null===(o=o.details)||void 0===o?void 0:o.ICDRSCapableDeviceCount)&&void 0!==i?i:0)<1)return null===r||void 0===r||null===(a=r.failedToSendRequestToArmDevice)||void 0===a||a.call(r),!1;if(!Object(g.g)())return this.fetchPCSKeys(e,t,n,r);const s=await Object(f.a)();var c;return null!==n&&void 0!==n&&n.current?(null===r||void 0===r||null===(c=r.canceledFetchKeys)||void 0===c||c.call(r),!1):(s.ok&&s.data.isDeviceConsentedForPCS&&E(s.data),Object(g.g)()?!!await this.enableDeviceConsentForPCS(e,t,n,r)&&this.fetchPCSKeys(e,t,n,r):this.fetchPCSKeys(e,t,n,r))}async enableDeviceConsentForPCS(e,t,n,r){var a,s;let c=0;null===r||void 0===r||null===(a=r.sentRequestToArmDevice)||void 0===a||a.call(r);const u=null===Object(m.e)().value?b.PCS_KEY_UNARMED:b.PCS_KEY_EXPIRED,l=new S("armDevice",y.PCS_KEY_MANAGER,u,e,t),p=await async function(){const e=`https://setup.${i.a.sharedInstance.current.servicesDomain}/setup/ws/1/enableDeviceConsentForPCS`;let t;try{t=await o.a.postURL(e)}catch{return{ok:!1}}if(!t||!t.ok)return{ok:!1};const n=await(async()=>{try{return await t.json()}catch{return null}})();return n?(r=n,d.safeParse(r).success?{ok:!0,data:n}:{ok:!1}):{ok:!1};var r}();var h,g,v,C;if(null!==n&&void 0!==n&&n.current)return null===r||void 0===r||null===(h=r.canceledFetchKeys)||void 0===h||h.call(r),!1;if(!p.ok)return null===r||void 0===r||null===(g=r.failedToSendRequestToArmDevice)||void 0===g||g.call(r),l.reportFailure("Error","enableDeviceConsentForPCS failed",c),!1;if(Object(m.p)(p.data.isWebAccessAllowed),Object(m.o)(p.data.isICDRSDisabled),Object(m.e)().value=p.data.isDeviceConsentedForPCS?p.data.deviceConsentForPCSExpiry:null,p.data.isDeviceConsentedForPCS)return l.reportSuccess(c),null===r||void 0===r||null===(v=r.receivedRequestToArmDeviceNotificationGranted)||void 0===v||v.call(r),!0;if(!p.data.isDeviceConsentNotificationSent)return null===r||void 0===r||null===(C=r.receivedRequestToArmDeviceFailure)||void 0===C||C.call(r),l.reportFailure("Error",w.NOTIFICATION_NOT_SENT_ARM_DEVICE,c),!1;null===r||void 0===r||null===(s=r.receivedRequestToArmDeviceNotificationSent)||void 0===s||s.call(r),++c;let _=!1;const O=await Promise.race([new Promise((e=>{this.newDeviceArmedListeners.push((t=>{_=!0,e(t)}))})),new Promise((e=>{(async()=>{const t=Date.now()+12e4;for(;Date.now()<t;){if(await new Promise((e=>window.setTimeout((()=>e()),1e4))),_||null!==n&&void 0!==n&&n.current)return;const t=await Object(f.a)();if(_||null!==n&&void 0!==n&&n.current)return;t.ok&&t.data.isDeviceConsentedForPCS&&(E(t.data),e("AlreadyHasDeviceConsentForPCSExpiry"))}e("Timeout")})()}))]);var I,A,T,P;if(null!==n&&void 0!==n&&n.current)return null===r||void 0===r||null===(I=r.canceledFetchKeys)||void 0===I||I.call(r),!1;if("Timeout"===O)return l.reportFailure("Timeout","",c),null===r||void 0===r||null===(A=r.receivedRequestToArmDeviceFailure)||void 0===A||A.call(r),!1;if("AlreadyHasDeviceConsentForPCSExpiry"===O)return null===r||void 0===r||null===(T=r.receivedRequestToArmDeviceNotificationGranted)||void 0===T||T.call(r),l.reportSuccess(c),!0;if(!O)return null===r||void 0===r||null===(P=r.receivedRequestToArmDeviceNotificationDenied)||void 0===P||P.call(r),l.reportFailure("Error",w.USER_DECLINED,c),!1;const R=await Object(f.a)();var k,D,M;return null!==n&&void 0!==n&&n.current?(null===r||void 0===r||null===(k=r.canceledFetchKeys)||void 0===k||k.call(r),!1):R.ok&&R.data.isDeviceConsentedForPCS?(E(R.data),l.reportSuccess(c),null===r||void 0===r||null===(D=r.receivedRequestToArmDeviceNotificationGranted)||void 0===D||D.call(r),!0):(null===r||void 0===r||null===(M=r.receivedRequestToArmDeviceNotificationDenied)||void 0===M||M.call(r),l.reportFailure("Error",w.USER_DECLINED,c),!1)}async fetchPCSKeys(e,t,n,r){var i,o;let a=0;const c=new S("requestPCSKey",y.PCS_KEY_MANAGER,b.PCS_KEY_ARMED,e,t);null===r||void 0===r||null===(i=r.sentRequestToFetchPCSKeys)||void 0===i||i.call(r);const u=await s(t,!0);var l,d,p,f;if(null!==n&&void 0!==n&&n.current)return null===r||void 0===r||null===(l=r.canceledFetchKeys)||void 0===l||l.call(r),!1;if(!u.ok)return c.reportFailure("Error","First request network error",a),null===r||void 0===r||null===(d=r.receivedRequestToFetchPCSKeysFailure)||void 0===d||d.call(r),!1;if(O(u))return c.reportFailure("Error","Device not supported",a),null===r||void 0===r||null===(p=r.receivedRequestToFetchPCSKeysFailure)||void 0===p||p.call(r,!0),!1;if("success"===u.data.status)return this.addAvailablePCSKey(t),c.reportSuccess(a),null===r||void 0===r||null===(f=r.receivedRequestToFetchPCSKeysSuccess)||void 0===f||f.call(r),!0;++a;let h=!1;const m=await Promise.race([new Promise((e=>{const n=()=>{h=!0,e()},r=this.newPCSKeyAvailableListeners.get(t);r?r.push(n):this.newPCSKeyAvailableListeners.set(t,[n])})),new Promise((e=>{(async()=>{const r=Date.now()+3e4;for(;Date.now()<r;){if(await new Promise((e=>window.setTimeout((()=>e()),8e3))),h||null!==n&&void 0!==n&&n.current)return;const r=await s(t,!1);if(h||null!==n&&void 0!==n&&n.current)return;O(r)&&e("ArmedDeviceNotSupported"),r.ok&&"success"===r.data.status&&e("AlreadyHasPCSKey")}e("Timeout")})()}))]);var g,v,w,C;if(null!==n&&void 0!==n&&n.current)return null===r||void 0===r||null===(g=r.canceledFetchKeys)||void 0===g||g.call(r),!1;if("Timeout"===m)return c.reportFailure("Timeout",u.data.message,a),null===r||void 0===r||null===(v=r.receivedRequestToFetchPCSKeysFailure)||void 0===v||v.call(r),!1;if("ArmedDeviceNotSupported"===m)return c.reportFailure("Error","Device not supported",a),null===r||void 0===r||null===(w=r.receivedRequestToFetchPCSKeysFailure)||void 0===w||w.call(r,!0),!1;if("AlreadyHasPCSKey"===m)return this.addAvailablePCSKey(t),c.reportSuccess(a),null===r||void 0===r||null===(C=r.receivedRequestToFetchPCSKeysSuccess)||void 0===C||C.call(r),!0;const _=await s(t,!1);var E,I,A,T;return null!==n&&void 0!==n&&n.current?(null===r||void 0===r||null===(E=r.canceledFetchKeys)||void 0===E||E.call(r),!1):_.ok?O(_)?(c.reportFailure("Error","Device not supported",a),null===r||void 0===r||null===(A=r.receivedRequestToFetchPCSKeysFailure)||void 0===A||A.call(r,!0),!1):"success"===_.data.status?(this.addAvailablePCSKey(t),c.reportSuccess(a),null===r||void 0===r||null===(T=r.receivedRequestToFetchPCSKeysSuccess)||void 0===T||T.call(r),!0):(c.reportFailure("Error",u.data.message,a),null===r||void 0===r||null===(o=r.receivedRequestToFetchPCSKeysFailure)||void 0===o||o.call(r),!1):(c.reportFailure("Error","Second request network error",a),null===r||void 0===r||null===(I=r.receivedRequestToFetchPCSKeysFailure)||void 0===I||I.call(r),!1)}}function O(e){return e.ok&&!0===e.data.deviceNotSupported}function E(e){Object(m.p)(e.isWebAccessAllowed),void 0!==e.isICDRSDisabled&&Object(m.o)(e.isICDRSDisabled),void 0!==e.isDeviceConsentedForPCS&&void 0!==e.deviceConsentForPCSExpiry&&(Object(m.e)().value=e.isDeviceConsentedForPCS?e.deviceConsentForPCSExpiry:null)}p=_,_.sharedInstance=new p},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return b}));var r=n(1253),i=n(2180),o=n(1284);const a=new o.a("StartupInfoServiceFromChildProtocol",new Set(["setStartupInfo","setStartupUrl"])),s=new o.a("StartupInfoServiceToChildProtocol",new Set(["didFetchStartup"]));class c{constructor(e,t){this.appName=e,this.processReference=t,t.createMessagingChannel(a,this,s,void 0,t.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}setStartupUrl(e,t){return this.setStartupInfo(e,Object(r.a)(t))}async setStartupInfo(e,t){t?await(async()=>{await i.b.isReady;const e=i.b.getStartupInfoForApp(this.appName);return!e||t.url!==e.url||t.method!==e.method||t.requestPayload!==e.requestPayload})()&&i.b.setStartupInfoForApp(this.appName,t):i.b.clearStartupInfoForApp(this.appName)}didFetchStartup(e,t){var n;null===(n=this.processReference.remoteProxy)||void 0===n||n.didFetchStartup(e,t)}}var u=n(2219),l=n(2134),d=n(1264),p=n(925),f=n(1262);const h=new o.a("HostApplicationServiceFromChildProtocol",new Set(["minimizeApplication","switchToApplication","showAccountSettings","showAccountMenu","showWhatsNew","setTitle","updateRoute","updateShareGUID","removeEnvironmentInformation","didReceiveRemoteNotification","didBecomeInteractive","showCreationMenu","navigateToHomePage","showStorageUsageWarning","showADPAnnouncement","showBeneficiaryAnnouncement","showHelpMenu","getMetaThemeColor","setMetaThemeColor","unsetMetaThemeColor","showOverflowMenu","showLocalNotification"])),m=new o.a("HostApplicationServiceToChildProtocol",new Set(["didReceiveRemoteNotification","launchOptionsDidChange","tileDataDidUpdate","whatsNewDidDisplay"]));class g{constructor(e,t){this.applicationInfo=void 0,this.processReference=t,this.applicationInfo=e,t.createMessagingChannel(h,this,m,void 0,t.messagingChannelClass)}serviceWasRegistered(){}serviceWasRemoved(){}minimizeApplication(e){l.a.cloudOSApplication.showAppSwitcher(e)}showWhatsNew(e,t,n){l.a.cloudOSApplication.showWhatsNew(e,t,n)}switchToApplication(e,t,n){const r=Object(f.e)(e);if(r){const e=Object(f.d)(r);Object(f.f)(r,Object(p.a)(e),!0,{relativePath:t,hash:n})}else d.a.sharedInstance.switchToApplication(e,{route:t,hash:n})}showAccountSettings(){Object(f.h)(f.b.settings)}showAccountMenu(e){l.a.cloudOSApplication.showAccountMenu(e)}setTitle(e){d.a.sharedInstance.setTitle(this.applicationInfo,e)}updateRoute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";d.a.sharedInstance.replaceHistoryState(this.processReference.applicationInfo,{},void 0,e,t)}updateShareGUID(e){this.updateRoute("",e?`#${e}`:"")}removeEnvironmentInformation(){l.a.cloudOSApplication.removeEnvironmentInformation()}didReceiveRemoteNotification(e){var t;null===(t=this.processReference.remoteProxy)||void 0===t||t.didReceiveRemoteNotification(e)}didBecomeInteractive(e,t){const n=this.processReference.applicationInfo,r=d.a.sharedInstance.getChildApplicationController(n);r&&r.remoteInstanceDidBecomeInteractive(e,t)}showCreationMenu(e){l.a.cloudOSApplication.showCreationMenu(e)}navigateToHomePage(){l.a.cloudOSApplication.navigateToHomePage()}showStorageUsageWarning(e){l.a.cloudOSApplication.showStorageUsageWarning(e)}showADPAnnouncement(e){l.a.cloudOSApplication.showADPAnnouncement(e)}showBeneficiaryAnnouncement(e){l.a.cloudOSApplication.showBeneficiaryAnnouncement(e)}showHelpMenu(e){l.a.cloudOSApplication.showHelpMenu(e)}showOverflowMenu(e,t,n){l.a.cloudOSApplication.showOverflowMenu(e,t,n)}launchOptionsDidChange(e){var t;null===(t=this.processReference.remoteProxy)||void 0===t||t.launchOptionsDidChange(e)}whatsNewDidDisplay(e,t){var n;null===(n=this.processReference.remoteProxy)||void 0===n||n.whatsNewDidDisplay(e,t)}getMetaThemeColor(){return l.a.cloudOSApplication.getMetaThemeColor()}setMetaThemeColor(e){l.a.cloudOSApplication.setMetaThemeColor(e)}unsetMetaThemeColor(){l.a.cloudOSApplication.unsetMetaThemeColor()}showLocalNotification(e,t,n,r){(t.alertTitle||t.alertDescription||t.badgeCount||t.soundPath)&&Object(u.a)({badgeCount:t.badgeCount,notification:{title:t.alertTitle,description:t.alertDescription},sound:t.soundPath,applicationIdentifier:null!==r&&void 0!==r?r:this.applicationInfo.configuration.identifier,payload:{...n,...t.actionPayload}},t.isDismissable,t.omitWhenActive)}}class v{constructor(e,t,n){this.identifier=e,this.factory=t,this.isLegacyService=n}}class y{constructor(e,t){this.identifier=e,this.instance=t}}const b=new class{constructor(){this.registeredServices=[],this.servicesByProcessReference=new Map}registerServices(e){for(const t of e)this.registeredServices.push(t)}serviceInstancesByProcessReference(e){var t,n;return null!==(t=null===(n=this.servicesByProcessReference.get(e))||void 0===n?void 0:n.map((e=>e.instance)))&&void 0!==t?t:[]}serviceInstancesByIdentifier(e){const t=[];return this.servicesByProcessReference.forEach((n=>{for(const r of n)r.identifier===e&&t.push(r.instance)})),t}attachRegisteredServicesToProcessReference(e,t,n){return this.attachServicesToProcessReference(e,t,n,this.registeredServices)}attachServicesToProcessReference(e,t,n,r){for(const i of r){const r=i.factory(t,n,e);this.ensureServicesForProcessReference(e).push(new y(i.identifier,r)),r.serviceWasRegistered()}}removeServicesForProcessReference(e){const t=this.servicesByProcessReference.get(e);t&&t.forEach((e=>{e.instance.serviceWasRemoved()})),this.servicesByProcessReference.delete(e)}ensureServicesForProcessReference(e){const t=this.servicesByProcessReference.get(e);if(t)return t;const n=[];return this.servicesByProcessReference.set(e,n),n}setupRegisteredServices(e,t,n){this.attachRegisteredServicesToProcessReference(e,t,n)}setupAdditionalServices(e,t,n){const r=new v("com.apple.icloud.cloudos.StartupInfoService",((e,t,n)=>new c(e.applicationInfo.applicationName,n))),i=new v("com.apple.icloud.cloudos.hostApplicationService",((e,t,n)=>new g(e.applicationInfo,n)));this.attachServicesToProcessReference(e,t,n,[i,r])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(870),i=n(2297),o=n(925),a=n(900);function s(e){const t=a.a.sharedInstance.isDomainCN?Object(o.a)("AutoUpdate.Domain.icloud.com.cn"):Object(o.a)("AutoUpdate.Domain.icloud.com");return r.createElement(i.a,{message:Object(o.a)("AutoUpdate.Title",{currentDomain:t}),description:Object(o.a)("AutoUpdate.Description"),primaryButton:{title:Object(o.a)("AutoUpdate.Reload"),onActivate:()=>e.onAutoUpdateReload()},alternateButton:{title:Object(o.a)("AutoUpdate.Later"),onActivate:()=>e.onAutoUpdateIgnore()}})}var c=n(973),u=n(888),l=n(976),d=n(1444),p=n(1165);const f=u.z.object({buildNumber:u.z.string(),autoUpdate:u.z.number()}),h=9e5,m=18e5;var g=n(2270);function v(){const e=r.useRef(!1),t=r.useRef(!1),[n,i]=Object(g.a)();e.current||(async function(e){for(;;){await Object(l.a)(h);const t=`https://${window.location.hostname}/system/icloud.com/current/build.json`;let n;try{const e=await c.a.fetchJSON(t,{validate:{type:"WireCloudOSVersionResponse",schema:f}});if(!e.ok)continue;n=e.value}catch{continue}const r=n.buildNumber;if(__CW_BUILD_INFO.buildNumber!==r&&(()=>{try{return Object(p.a)("didReloadToBuild")}catch{return null}})()!==r)switch(n.autoUpdate){case d.d:e(r);break;case d.b:try{Object(p.b)("didReloadToBuild",r)}catch{}window.location.reload();break;case d.a:await Object(l.a)(Math.random()*m);try{Object(p.b)("didReloadToBuild",r)}catch{}window.location.reload();case d.c:}}}((e=>{t.current||(t.current=!0,n(r.createElement(s,{onAutoUpdateIgnore:()=>{t.current=!1,i()},onAutoUpdateReload:()=>{try{Object(p.b)("didReloadToBuild",e)}catch{}window.location.reload(),t.current=!1,i()}})))})),e.current=!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(895);function i(e){switch(e){case"opener":case"top":case"window":case"parent":case"this":return!0;default:return!1}}function o(e){return null!==(t=e)&&"object"===typeof t&&"type"in e&&"string"===typeof e.type&&"__serviceNode"in e&&"1.0"===e.__serviceNode;var t}function a(e,t,n,r){return{__serviceNode:"1.0",type:"connect",serviceName:e,serviceZone:n,serviceOrigin:r,port:t}}function s(e){return"connect"===e.type&&"port"in e&&e.port instanceof MessagePort&&"serviceZone"in e&&"string"===typeof e.serviceZone&&i(e.serviceZone)&&"serviceOrigin"in e&&"string"===typeof e.serviceOrigin}var c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const u="navigator"in globalThis&&navigator.userAgent.includes("jsdom"),l="SharedWorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.SharedWorkerGlobalScope,d="SharedWorker"in globalThis,p="DedicatedWorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.DedicatedWorkerGlobalScope,f="Window"in globalThis&&globalThis instanceof Window,h=new class{constructor(){var e,t,n;if(this.serviceNameToUpstreamListeners=new Map,this.sharedWorkerUpstreamPostMessages=[],this.serviceNameToOnConnect=new Map,this.serviceNameToListenerConnection=new Map,this.serviceNameToBufferedConnectMessages=new Map,this.messageEventSourceToNeighboringBrowsingContext=new WeakMap,this.pendingConnections=new Set,this.upstreamRegistrations=new Set,this.parentOrigin={ready:!0},this.topOrigin={ready:!0},this.openerOrigin={ready:!0},this.handleMessage=e=>{var t,n;e instanceof MessageEvent&&e.isTrusted&&(e.origin===globalThis.origin||(null===(t=this.allowedRemoteOrigins)||void 0===t?void 0:t.includes(e.origin))||e.currentTarget&&d&&this.messageEventSourceToNeighboringBrowsingContext.get(e.currentTarget)instanceof globalThis.SharedWorker)&&o(e.data)&&(s(e.data)?this.handleConnectMessage(e.data,e.source):"register"===(n=e.data).type&&"port"in n&&n.port instanceof MessagePort&&"serviceZone"in n&&"string"===typeof n.serviceZone&&i(n.serviceZone)&&"connectionOrigin"in n&&"string"===typeof n.connectionOrigin?this.handleRegisterMessage(e.data):function(e){return"ping"===e.type}(e.data)?this.handlePingMessage(e):function(e){return"pong"===e.type}(e.data)&&this.handlePongMessage(e))},this.handleSharedWorkerConnect=e=>{const t=(t,n)=>{e.source instanceof MessagePort&&e.source.postMessage(t,n)};this.sharedWorkerUpstreamPostMessages.push(t);for(const n of this.upstreamRegistrations)this.sendRegisterMessage(t,n);for(const n of this.pendingConnections)this.sendConnectMessage(t,n)},f){globalThis.addEventListener("message",this.handleMessage);const i=globalThis.__SK_INIT;if(i){i.earlyListener&&globalThis.removeEventListener("message",i.earlyListener);for(const t of null!==(e=i.earlyNeighboringContexts)&&void 0!==e?e:[])this.addNeighboringBrowsingContext(t);if(null===(t=i.allowedRemoteOrigins)||void 0===t?void 0:t.length){if(this.allowedRemoteOrigins=i.allowedRemoteOrigins,window.parent!==window)try{this.parentOrigin={ready:!0,value:window.parent.origin}}catch(r){this.parentOrigin={ready:!1,onReady:[]},window.parent.postMessage({__serviceNode:"1.0",type:"ping"},"*")}if(window.top&&window.top!==window)try{this.topOrigin={ready:!0,value:window.top.origin}}catch(a){this.topOrigin={ready:!1,onReady:[]},window.top!==window.parent&&window.top.postMessage({__serviceNode:"1.0",type:"ping"},"*")}if(window.opener&&window.opener instanceof Window&&window.opener!==window)try{this.openerOrigin={ready:!0,value:window.opener.origin}}catch(c){this.openerOrigin={ready:!1,onReady:[]},window.opener!==window.parent&&window.opener!==window.top&&window.opener.postMessage({__serviceNode:"1.0",type:"ping"},"*")}}for(const e of null!==(n=i.earlyMessages)&&void 0!==n?n:[])this.handleMessage(e);delete globalThis.__SK_INIT}}l&&globalThis.addEventListener("connect",this.handleSharedWorkerConnect)}addNeighboringBrowsingContext(e){if(e instanceof HTMLIFrameElement){const t=e.contentWindow;if(!t)return;this.messageEventSourceToNeighboringBrowsingContext.set(t,e)}else e instanceof Worker?(this.messageEventSourceToNeighboringBrowsingContext.set(e,e),e.addEventListener("message",this.handleMessage)):d&&e instanceof globalThis.SharedWorker?(this.messageEventSourceToNeighboringBrowsingContext.set(e.port,e),e.port.addEventListener("message",this.handleMessage),e.port.start()):e instanceof Window&&this.messageEventSourceToNeighboringBrowsingContext.set(e,e)}removeNeighboringBrowsingContext(e){if(e instanceof HTMLIFrameElement){const t=e.contentWindow;if(!t)return;this.messageEventSourceToNeighboringBrowsingContext.delete(t)}else e instanceof Worker?(e.removeEventListener("message",this.handleMessage),this.messageEventSourceToNeighboringBrowsingContext.delete(e)):d&&e instanceof globalThis.SharedWorker?(e.port.removeEventListener("message",this.handleMessage),e.port.close(),this.messageEventSourceToNeighboringBrowsingContext.delete(e.port)):e instanceof Window&&this.messageEventSourceToNeighboringBrowsingContext.delete(e)}connectToService(e,t){var n,r,i;return c(this,void 0,void 0,(function*(){const o=null!==(n=null===t||void 0===t?void 0:t.serviceZone)&&void 0!==n?n:"top",s=null!==(r=null===t||void 0===t?void 0:t.serviceOrigin)&&void 0!==r?r:globalThis.origin,c=null!==(i=null===t||void 0===t?void 0:t.connectionTimeout)&&void 0!==i?i:1e4,u=null===t||void 0===t?void 0:t.abortSignal;if(null===u||void 0===u?void 0:u.aborted)return null;let l;const d=new Promise((e=>{l=()=>e(null)}));let p;null===u||void 0===u||u.addEventListener("abort",l);const f=new Promise((e=>{p=e})),[h,m]=this.getInitialServiceZone(o);if(!m){const t=this.serviceNameToOnConnect.get(e);if(t){const e=new MessageChannel;return t(e.port2,null),e.port1}}const g={serviceName:e,serviceZone:h,serviceOrigin:s,resolved:!1,resolve:p,promise:f,attempts:new Set};if(this.pendingConnections.add(g),m)for(const e of m)this.sendConnectMessage(e,g);else{const t=this.makeConnectionAttempt(g),n=a(e,t,o,s),r=this.serviceNameToListenerConnection.get(e);r?r.postMessage(n,[t]):this.ensureBufferedConnectMessages(e).push([n,null])}const v="indefinite"===c?null:new Promise((e=>{globalThis.setTimeout((()=>e(null)),c)}));try{return yield Promise.race(v?[g.promise,v,d]:[g.promise,d])}finally{null===u||void 0===u||u.removeEventListener("abort",l),this.pendingConnections.delete(g);for(const e of Array.from(g.attempts))e.close()}}))}registerService(e,t,n){var r,i;const o=null!==(r=null===n||void 0===n?void 0:n.serviceZone)&&void 0!==r?r:"top",a=null!==(i=null===n||void 0===n?void 0:n.connectionOrigin)&&void 0!==i?i:globalThis.origin,[s,c]=this.getInitialServiceZone(o);if(c){if(this.serviceNameToUpstreamListeners.has(e))return null;const n={serviceName:e,serviceZone:s,connectionOrigin:a,onConnect:t};this.upstreamRegistrations.add(n);for(const e of c)this.sendRegisterMessage(e,n);return()=>{var t;this.upstreamRegistrations.delete(n);const r=Array.from(null!==(t=this.serviceNameToUpstreamListeners.get(e))&&void 0!==t?t:[]);for(const e of r)e.close()}}if(this.serviceNameToListenerConnection.has(e)||this.serviceNameToOnConnect.has(e))return null;this.serviceNameToOnConnect.set(e,t);const u=this.serviceNameToBufferedConnectMessages.get(e);this.serviceNameToBufferedConnectMessages.delete(e);for(const[l,d]of null!==u&&void 0!==u?u:[])this.handleConnectMessageToLocalService(t,l,d);return()=>{this.serviceNameToOnConnect.has(e)&&(this.serviceNameToOnConnect.delete(e),this.serviceNameToBufferedConnectMessages.delete(e))}}makeConnectionAttempt(e){const t=new MessageChannel,n=new r.a(t.port1),i=t=>{if(o(t.data))if("connected"!==t.data.type);else{if(!e.resolved){e.resolved=!0;const r=new MessageChannel;n.postMessage({__serviceNode:"1.0",type:"connectedAck",serviceName:t.data.serviceName,port:r.port2},[r.port2]),e.resolve(r.port1)}n.close()}},a=()=>{if("closed"===n.connectionState)return e.attempts.delete(n),n.removeEventListener("message",i),void n.removeEventListener("connectionstatechange",a)};return e.attempts.add(n),n.addEventListener("message",i),n.addEventListener("connectionstatechange",a),n.start(),t.port2}addUpstreamListener(e,t){const n=this.serviceNameToUpstreamListeners.get(e);if(n)return void n.add(t);const r=new Set;this.serviceNameToUpstreamListeners.set(e,r),r.add(t)}removeUpstreamListener(e,t){const n=this.serviceNameToUpstreamListeners.get(e);n&&(n.delete(t),0===n.size&&this.serviceNameToUpstreamListeners.delete(e))}ensureBufferedConnectMessages(e){const t=this.serviceNameToBufferedConnectMessages.get(e);if(t)return t;const n=[];return this.serviceNameToBufferedConnectMessages.set(e,n),n}handleConnectMessage(e,t){const[n,r]=this.getForwardingServiceZone(e.serviceZone);if(r)return void r(Object.assign(Object.assign({},e),{serviceZone:n}),[e.port]);const i=e.serviceName,o=this.serviceNameToOnConnect.get(i);if(o)return void this.handleConnectMessageToLocalService(o,e,t);const a=this.serviceNameToListenerConnection.get(i);a?a.postMessage(e,[e.port]):this.ensureBufferedConnectMessages(i).push([e,t])}handleConnectMessageToLocalService(e,t,n){const i=new r.a(t.port),a=t=>{var r;if(o(t.data)&&"connectedAck"===(r=t.data).type&&"port"in r&&r.port instanceof MessagePort){const r=n?this.messageEventSourceToNeighboringBrowsingContext.get(n):void 0;return e(t.data.port,null!==r&&void 0!==r?r:null),void i.close()}},s=()=>{"closed"===i.connectionState&&(i.removeEventListener("message",a),i.removeEventListener("connectionstatechange",s))};i.addEventListener("message",a),i.addEventListener("connectionstatechange",s),i.postMessage({__serviceNode:"1.0",type:"connected",serviceName:t.serviceName}),i.start()}handleRegisterMessage(e){const[t,n]=this.getForwardingServiceZone(e.serviceZone);if(n)return void n(Object.assign(Object.assign({},e),{serviceZone:t}),[e.port]);const i=e.serviceName,o=new r.a(e.port);if(this.serviceNameToListenerConnection.has(i)||this.serviceNameToOnConnect.has(i))return void o.close();this.serviceNameToListenerConnection.set(i,o);const a=()=>{"closed"===o.connectionState&&(this.serviceNameToListenerConnection.delete(i),this.serviceNameToBufferedConnectMessages.delete(i),o.removeEventListener("connectionstatechange",a))};o.addEventListener("connectionstatechange",a);const s=this.serviceNameToBufferedConnectMessages.get(i);this.serviceNameToBufferedConnectMessages.delete(i);for(const[r]of null!==s&&void 0!==s?s:[])o.postMessage(r,[r.port]);o.start()}handlePingMessage(e){var t;null===(t=e.source)||void 0===t||t.postMessage({__serviceNode:"1.0",type:"pong"},{targetOrigin:e.origin})}handlePongMessage(e){if(window.parent!==window&&e.source===parent&&!this.parentOrigin.ready){for(const t of this.parentOrigin.onReady)t(e.origin);this.parentOrigin={ready:!0,value:e.origin}}if(window.top&&window.top!==window&&e.source===top&&!this.topOrigin.ready){for(const t of this.topOrigin.onReady)t(e.origin);this.topOrigin={ready:!0,value:e.origin}}if(window.opener&&window.opener!==window&&e.source===opener&&!this.openerOrigin.ready){for(const t of this.openerOrigin.onReady)t(e.origin);this.openerOrigin={ready:!0,value:e.origin}}}getInitialServiceZone(e){if(l)switch(e){case"this":return["this",null];case"parent":return["this",[...this.sharedWorkerUpstreamPostMessages]];default:return[e,[...this.sharedWorkerUpstreamPostMessages]]}const[t,n]=this.getForwardingServiceZone(e);return n?[t,[n]]:[t,null]}getForwardingServiceZone(e){if(p)switch(e){case"this":return["this",null];case"parent":return["this",(e,t)=>{globalThis.postMessage(e,t)}];default:return[e,(e,t)=>{globalThis.postMessage(e,t)}]}if(f)switch(e){case"opener":{const e=window.opener;return e?["this",(t,n)=>{var r;this.openerOrigin.ready?e.postMessage(t,null!==(r=this.openerOrigin.value)&&void 0!==r?r:window.origin,n):this.openerOrigin.onReady.push((r=>{e.postMessage(t,r,n)}))}]:["this",null]}case"top":{const e=null!==window.top&&window!==window.top?window.top:null;return e?["this",(t,n)=>{var r;this.topOrigin.ready?e.postMessage(t,null!==(r=this.topOrigin.value)&&void 0!==r?r:window.origin,n):this.topOrigin.onReady.push((r=>{e.postMessage(t,r,n)}))}]:["this",null]}case"parent":{const e=window!==window.parent?window.parent:null;return e?["this",(t,n)=>{var r;this.parentOrigin.ready?e.postMessage(t,null!==(r=this.parentOrigin.value)&&void 0!==r?r:window.origin,n):this.parentOrigin.onReady.push((r=>{e.postMessage(t,r,n)}))}]:["this",null]}default:return["this",null]}if(u)return["this",null];throw new Error("Unrecognized JavaScript environment")}sendConnectMessage(e,t){return c(this,void 0,void 0,(function*(){const n=this.makeConnectionAttempt(t),r=a(t.serviceName,n,t.serviceZone,t.serviceOrigin);e(r,[n])}))}sendRegisterMessage(e,t){const n=new MessageChannel,i=t.serviceName,a=new r.a(n.port1),c=e=>{o(e.data)&&s(e.data)&&this.handleConnectMessageToLocalService(t.onConnect,e.data,null)},u=()=>{"closed"===a.connectionState&&(a.removeEventListener("message",c),a.removeEventListener("connectionstatechange",u),this.removeUpstreamListener(i,a))};a.addEventListener("message",c),a.addEventListener("connectionstatechange",u),this.addUpstreamListener(i,a),a.start();const l=function(e,t,n,r){return{__serviceNode:"1.0",type:"register",serviceName:e,serviceZone:n,connectionOrigin:r,port:t}}(i,n.port2,t.serviceZone,t.connectionOrigin);e(l,[n.port2])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r,i=n(465);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6048e5;return{start:a(),duration(){const t=Math.min(0,Math.max(e,a()-this.start));return(this.duration=()=>t)()}}},a=(null===(r=globalThis.performance)||void 0===r?void 0:r.now.bind(globalThis.performance))||Date.now.bind(Date);var s=n(890);function c(e,t){const n=e instanceof Error?e:"SchemaFailure: non-Error thrown";return s.a.from(n,t)}function u(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const s=o(),u=t.safeParse(e);if(u.success)return i.Result.success(u.data);const l=s.duration(),d=c(u.error,n),{duration:p=0,...f}=a;return r("schemaFailure",{...f,schemaName:n,message:d.message,duration:Math.round(p+l)}),i.Result.failure(d)}const l=e=>class{constructor(t,n){this.name=t,this._zod=n,this.is=e=>this._zod.safeParse(e).success,this.as=(t,n)=>function(e,t,n,r,i){const o=u(e,t,n,r,i);if(!o.ok)throw o.error;return o.value}(t,this._zod,this.name,e,{...n,methodName:"as"}),this.tryAs=(t,n)=>u(t,this._zod,this.name,e,{...n,methodName:"tryAs"}),this.parseJson=(t,n)=>function(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const u=typeof e;if("string"!==u){const t=null===e?e:u;throw s.a.from(`Bad JSON root type: ${t}`,n)}let l=o();try{const n=JSON.parse(e),r=t.parse(n);return i.Result.success(r)}catch(d){const e=l.duration(),{duration:t=0,...o}=a,s=c(d,n);return r("schemaFailure",{...o,schemaName:n,message:s.message,duration:Math.round(t+e)}),i.Result.failure(s)}}(t,this._zod,this.name,e,{...n,methodName:"parseJson"})}},d=e=>{if(e.bound)return e.bound;const{name:t}=e;return e.bound={[`is${t}`]:e.is,[`as${t}`]:e.as,[`tryAs${t}`]:e.tryAs,[`jsonParse${t}`]:e.parseJson,[`schemaFor${t}`]:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h}));var r=[],i={};function o(e){var t=i[e];if(void 0!==t)return t;var n=r.length;return i[e]=n,r[n]=e,n}var a=o("<none>"),s=n(1012),c=n(1013);var u,l=n(1014),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},d.apply(this,arguments)},p=function(){function e(e,t,n,r){void 0===t&&(t=s.a.Personal),void 0===n&&(n=c.c),void 0===r&&(r=a),this._unsafeValue=e,this.piiClass=t,this.piiGroup=n,this.dataType=r,this.isPIIValue=!0}return e.fromJSON=function(t){if("object"!==typeof t||null===t)return h(t).constant();var n=t;return new e(n.v,n.c,n.g?c.a.fromJSON(n.g):c.c,n.d?o(n.d):a)},e.prototype.unbox=function(e){return e.unbox(this)},e.prototype.withClass=function(t,n){return void 0===n&&(n=c.c),new e(this._unsafeValue,t,n,this.dataType)},e.prototype.withValue=function(t){return new e(t,this.piiClass,this.piiGroup,this.dataType)},e.prototype.withDataType=function(t){return new e(this._unsafeValue,this.piiClass,this.piiGroup,t)},e.prototype.personal=function(){return this.withClass(s.a.Personal)},e.prototype.sensitive=function(){return this.withClass(s.a.Sensitive)},e.prototype.userID=function(e){return void 0===e&&(e=c.c),this.withClass(s.a.UserID,e)},e.prototype.user=function(){return this.withClass(s.a.UserInfo)},e.prototype.sessionID=function(e){return void 0===e&&(e=c.c),this.withClass(s.a.SessionID,e)},e.prototype.session=function(){return this.withClass(s.a.SessionInfo)},e.prototype.anonymizedID=function(){return this.withClass(s.a.AnonymizedID)},e.prototype.device=function(){return this.withClass(s.a.DeviceInfo)},e.prototype.userAgent=function(){return this.withClass(s.a.UserAgent)},e.prototype.performance=function(){return this.withClass(s.a.Performance)},e.prototype.constant=function(){return this.withClass(s.a.Const)},e.prototype.notPII=function(){var e=this;return{forCertain:function(){return e.withClass(s.a.NotPII)}}},e.prototype.toString=function(t){if(void 0===t&&(t=e.defaultPolicy),!t)throw new Error("No PIIPolicy set");return t.stringify(this)},e.prototype.toJSON=function(e){if(!e)throw new Error("No PIIPolicy set");var t,n=this,i=n.piiClass,o=n.piiGroup,u=n._unsafeValue;return n.dataType,this.dataType!==a||this.piiClass!==s.a.Const||"object"===typeof this._unsafeValue&&null!==this._unsafeValue?d(d(d({c:i},o===c.c?{}:{g:o.toJSON()}),{v:e.unbox(this)===u?u:this.toString(e)}),this.dataType===a?{}:{d:(t=this.dataType,r[t])}):this._unsafeValue},e.defaultPolicy=null,e}();function f(e){return e instanceof p}function h(e){return f(e)?e:new p(e)}(u=h||(h={})).personal=function(){return function(e){return u(e).personal()}},u.sensitive=function(){return function(e){return u(e).sensitive()}},u.userID=function(e){return void 0===e&&(e=c.c),function(t){return u(t).userID(e)}},u.user=function(){return function(e){return u(e).user()}},u.sessionID=function(e){return void 0===e&&(e=c.c),function(t){return u(t).sessionID(e)}},u.session=function(){return function(e){return u(e).session()}},u.anonymizedID=function(){return function(e){return u(e).anonymizedID()}},u.device=function(){return function(e){return u(e).device()}},u.userAgent=function(){return function(e){return u(e).userAgent()}},u.performance=function(){return function(e){return u(e).performance()}},u.array=function(e){return function(t){return null===t||void 0===t?t:t.map((function(t){return e(t)}))}},u.object=l.b},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return y}));var r=n(1053),i=n(1048);(globalThis.document?Array.from(document.scripts).map((e=>e.src)):[globalThis.location.toString()]).find((e=>e.match(/\/[^/]+Carry/)));const o=r.Reader,a=r.Writer,s=r.util,c=r.roots.default||(r.roots.default={}),u=(c.UserPushToken=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.userId="",e.prototype.userAuth=null,e.prototype.pushToken="",e.prototype.pushTokenAuth=null,e.encode=function(e,t){return t||(t=a.create()),t.uint32(10).string(e.userId),null!=e.userAuth&&Object.hasOwnProperty.call(e,"userAuth")&&c.UserAuth.encode(e.userAuth,t.uint32(18).fork()).ldelim(),t.uint32(26).string(e.pushToken),null!=e.pushTokenAuth&&Object.hasOwnProperty.call(e,"pushTokenAuth")&&c.PushTokenAuth.encode(e.pushTokenAuth,t.uint32(34).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));let n=void 0===t?e.len:e.pos+t,r=new c.UserPushToken;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.userId=e.string();break;case 2:r.userAuth=c.UserAuth.decode(e,e.uint32());break;case 3:r.pushToken=e.string();break;case 4:r.pushTokenAuth=c.PushTokenAuth.decode(e,e.uint32());break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("userId"))throw s.ProtocolError("missing required 'userId'",{instance:r});if(!r.hasOwnProperty("pushToken"))throw s.ProtocolError("missing required 'pushToken'",{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(!s.isString(e.userId))return"userId: string expected";if(null!=e.userAuth&&e.hasOwnProperty("userAuth")){let t=c.UserAuth.verify(e.userAuth);if(t)return"userAuth."+t}if(!s.isString(e.pushToken))return"pushToken: string expected";if(null!=e.pushTokenAuth&&e.hasOwnProperty("pushTokenAuth")){let t=c.PushTokenAuth.verify(e.pushTokenAuth);if(t)return"pushTokenAuth."+t}return null},e.fromObject=function(e){if(e instanceof c.UserPushToken)return e;let t=new c.UserPushToken;if(null!=e.userId&&(t.userId=String(e.userId)),null!=e.userAuth){if("object"!==typeof e.userAuth)throw TypeError(".UserPushToken.userAuth: object expected");t.userAuth=c.UserAuth.fromObject(e.userAuth)}if(null!=e.pushToken&&(t.pushToken=String(e.pushToken)),null!=e.pushTokenAuth){if("object"!==typeof e.pushTokenAuth)throw TypeError(".UserPushToken.pushTokenAuth: object expected");t.pushTokenAuth=c.PushTokenAuth.fromObject(e.pushTokenAuth)}return t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.userId="",n.userAuth=null,n.pushToken="",n.pushTokenAuth=null),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.userAuth&&e.hasOwnProperty("userAuth")&&(n.userAuth=c.UserAuth.toObject(e.userAuth,t)),null!=e.pushToken&&e.hasOwnProperty("pushToken")&&(n.pushToken=e.pushToken),null!=e.pushTokenAuth&&e.hasOwnProperty("pushTokenAuth")&&(n.pushTokenAuth=c.PushTokenAuth.toObject(e.pushTokenAuth,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/UserPushToken"},e})(),c.UserAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.gsAuthToken=null,e.prototype.icloudAuth=null,Object.defineProperty(e.prototype,"userauthOneof",{get:s.oneOfGetter(t=["gsAuthToken","icloudAuth"]),set:s.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=a.create()),null!=e.gsAuthToken&&Object.hasOwnProperty.call(e,"gsAuthToken")&&c.GSTokenAuth.encode(e.gsAuthToken,t.uint32(10).fork()).ldelim(),null!=e.icloudAuth&&Object.hasOwnProperty.call(e,"icloudAuth")&&c.ICloudAuth.encode(e.icloudAuth,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));let n=void 0===t?e.len:e.pos+t,r=new c.UserAuth;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.gsAuthToken=c.GSTokenAuth.decode(e,e.uint32());break;case 2:r.icloudAuth=c.ICloudAuth.decode(e,e.uint32());break;default:e.skipType(7&t)}}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";let t={};if(null!=e.gsAuthToken&&e.hasOwnProperty("gsAuthToken")){t.userauthOneof=1;{let t=c.GSTokenAuth.verify(e.gsAuthToken);if(t)return"gsAuthToken."+t}}if(null!=e.icloudAuth&&e.hasOwnProperty("icloudAuth")){if(1===t.userauthOneof)return"userauthOneof: multiple values";t.userauthOneof=1;{let t=c.ICloudAuth.verify(e.icloudAuth);if(t)return"icloudAuth."+t}}return null},e.fromObject=function(e){if(e instanceof c.UserAuth)return e;let t=new c.UserAuth;if(null!=e.gsAuthToken){if("object"!==typeof e.gsAuthToken)throw TypeError(".UserAuth.gsAuthToken: object expected");t.gsAuthToken=c.GSTokenAuth.fromObject(e.gsAuthToken)}if(null!=e.icloudAuth){if("object"!==typeof e.icloudAuth)throw TypeError(".UserAuth.icloudAuth: object expected");t.icloudAuth=c.ICloudAuth.fromObject(e.icloudAuth)}return t},e.toObject=function(e,t){t||(t={});let n={};return null!=e.gsAuthToken&&e.hasOwnProperty("gsAuthToken")&&(n.gsAuthToken=c.GSTokenAuth.toObject(e.gsAuthToken,t),t.oneofs&&(n.userauthOneof="gsAuthToken")),null!=e.icloudAuth&&e.hasOwnProperty("icloudAuth")&&(n.icloudAuth=c.ICloudAuth.toObject(e.icloudAuth,t),t.oneofs&&(n.userauthOneof="icloudAuth")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/UserAuth"},e})(),c.GSTokenAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.gsAuthToken="",e.encode=function(e,t){return t||(t=a.create()),t.uint32(10).string(e.gsAuthToken),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));let n=void 0===t?e.len:e.pos+t,r=new c.GSTokenAuth;for(;e.pos<n;){let t=e.uint32();t>>>3===1?r.gsAuthToken=e.string():e.skipType(7&t)}if(!r.hasOwnProperty("gsAuthToken"))throw s.ProtocolError("missing required 'gsAuthToken'",{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":s.isString(e.gsAuthToken)?null:"gsAuthToken: string expected"},e.fromObject=function(e){if(e instanceof c.GSTokenAuth)return e;let t=new c.GSTokenAuth;return null!=e.gsAuthToken&&(t.gsAuthToken=String(e.gsAuthToken)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.gsAuthToken=""),null!=e.gsAuthToken&&e.hasOwnProperty("gsAuthToken")&&(n.gsAuthToken=e.gsAuthToken),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GSTokenAuth"},e})(),c.ICloudAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.encode=function(e,t){return t||(t=a.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));let n=void 0===t?e.len:e.pos+t,r=new c.ICloudAuth;for(;e.pos<n;){let t=e.uint32();e.skipType(7&t)}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.ICloudAuth?e:new c.ICloudAuth},e.toObject=function(){return{}},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ICloudAuth"},e})(),c.PushTokenAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let t;return e.prototype.webTokenAuth=null,e.prototype.pushCertAuth=null,Object.defineProperty(e.prototype,"pushtokenauthOneof",{get:s.oneOfGetter(t=["webTokenAuth","pushCertAuth"]),set:s.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=a.create()),null!=e.webTokenAuth&&Object.hasOwnProperty.call(e,"webTokenAuth")&&c.WebTokenAuth.encode(e.webTokenAuth,t.uint32(10).fork()).ldelim(),null!=e.pushCertAuth&&Object.hasOwnProperty.call(e,"pushCertAuth")&&c.PushCertAuth.encode(e.pushCertAuth,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));let n=void 0===t?e.len:e.pos+t,r=new c.PushTokenAuth;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.webTokenAuth=c.WebTokenAuth.decode(e,e.uint32());break;case 2:r.pushCertAuth=c.PushCertAuth.decode(e,e.uint32());break;default:e.skipType(7&t)}}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";let t={};if(null!=e.webTokenAuth&&e.hasOwnProperty("webTokenAuth")){t.pushtokenauthOneof=1;{let t=c.WebTokenAuth.verify(e.webTokenAuth);if(t)return"webTokenAuth."+t}}if(null!=e.pushCertAuth&&e.hasOwnProperty("pushCertAuth")){if(1===t.pushtokenauthOneof)return"pushtokenauthOneof: multiple values";t.pushtokenauthOneof=1;{let t=c.PushCertAuth.verify(e.pushCertAuth);if(t)return"pushCertAuth."+t}}return null},e.fromObject=function(e){if(e instanceof c.PushTokenAuth)return e;let t=new c.PushTokenAuth;if(null!=e.webTokenAuth){if("object"!==typeof e.webTokenAuth)throw TypeError(".PushTokenAuth.webTokenAuth: object expected");t.webTokenAuth=c.WebTokenAuth.fromObject(e.webTokenAuth)}if(null!=e.pushCertAuth){if("object"!==typeof e.pushCertAuth)throw TypeError(".PushTokenAuth.pushCertAuth: object expected");t.pushCertAuth=c.PushCertAuth.fromObject(e.pushCertAuth)}return t},e.toObject=function(e,t){t||(t={});let n={};return null!=e.webTokenAuth&&e.hasOwnProperty("webTokenAuth")&&(n.webTokenAuth=c.WebTokenAuth.toObject(e.webTokenAuth,t),t.oneofs&&(n.pushtokenauthOneof="webTokenAuth")),null!=e.pushCertAuth&&e.hasOwnProperty("pushCertAuth")&&(n.pushCertAuth=c.PushCertAuth.toObject(e.pushCertAuth,t),t.oneofs&&(n.pushtokenauthOneof="pushCertAuth")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PushTokenAuth"},e})(),c.PushCertAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.encode=function(e,t){return t||(t=a.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));let n=void 0===t?e.len:e.pos+t,r=new c.PushCertAuth;for(;e.pos<n;){let t=e.uint32();e.skipType(7&t)}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.PushCertAuth?e:new c.PushCertAuth},e.toObject=function(){return{}},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PushCertAuth"},e})(),c.WebTokenAuth=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.nonce=s.newBuffer([]),e.prototype.publicKey=s.newBuffer([]),e.prototype.signature=s.newBuffer([]),e.prototype.jwt=s.newBuffer([]),e.encode=function(e,t){return t||(t=a.create()),t.uint32(10).bytes(e.nonce),t.uint32(18).bytes(e.publicKey),t.uint32(26).bytes(e.signature),t.uint32(34).bytes(e.jwt),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));let n=void 0===t?e.len:e.pos+t,r=new c.WebTokenAuth;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.nonce=e.bytes();break;case 2:r.publicKey=e.bytes();break;case 3:r.signature=e.bytes();break;case 4:r.jwt=e.bytes();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("nonce"))throw s.ProtocolError("missing required 'nonce'",{instance:r});if(!r.hasOwnProperty("publicKey"))throw s.ProtocolError("missing required 'publicKey'",{instance:r});if(!r.hasOwnProperty("signature"))throw s.ProtocolError("missing required 'signature'",{instance:r});if(!r.hasOwnProperty("jwt"))throw s.ProtocolError("missing required 'jwt'",{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":e.nonce&&"number"===typeof e.nonce.length||s.isString(e.nonce)?e.publicKey&&"number"===typeof e.publicKey.length||s.isString(e.publicKey)?e.signature&&"number"===typeof e.signature.length||s.isString(e.signature)?e.jwt&&"number"===typeof e.jwt.length||s.isString(e.jwt)?null:"jwt: buffer expected":"signature: buffer expected":"publicKey: buffer expected":"nonce: buffer expected"},e.fromObject=function(e){if(e instanceof c.WebTokenAuth)return e;let t=new c.WebTokenAuth;return null!=e.nonce&&("string"===typeof e.nonce?s.base64.decode(e.nonce,t.nonce=s.newBuffer(s.base64.length(e.nonce)),0):e.nonce.length>=0&&(t.nonce=e.nonce)),null!=e.publicKey&&("string"===typeof e.publicKey?s.base64.decode(e.publicKey,t.publicKey=s.newBuffer(s.base64.length(e.publicKey)),0):e.publicKey.length>=0&&(t.publicKey=e.publicKey)),null!=e.signature&&("string"===typeof e.signature?s.base64.decode(e.signature,t.signature=s.newBuffer(s.base64.length(e.signature)),0):e.signature.length>=0&&(t.signature=e.signature)),null!=e.jwt&&("string"===typeof e.jwt?s.base64.decode(e.jwt,t.jwt=s.newBuffer(s.base64.length(e.jwt)),0):e.jwt.length>=0&&(t.jwt=e.jwt)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.nonce="":(n.nonce=[],t.bytes!==Array&&(n.nonce=s.newBuffer(n.nonce))),t.bytes===String?n.publicKey="":(n.publicKey=[],t.bytes!==Array&&(n.publicKey=s.newBuffer(n.publicKey))),t.bytes===String?n.signature="":(n.signature=[],t.bytes!==Array&&(n.signature=s.newBuffer(n.signature))),t.bytes===String?n.jwt="":(n.jwt=[],t.bytes!==Array&&(n.jwt=s.newBuffer(n.jwt)))),null!=e.nonce&&e.hasOwnProperty("nonce")&&(n.nonce=t.bytes===String?s.base64.encode(e.nonce,0,e.nonce.length):t.bytes===Array?Array.prototype.slice.call(e.nonce):e.nonce),null!=e.publicKey&&e.hasOwnProperty("publicKey")&&(n.publicKey=t.bytes===String?s.base64.encode(e.publicKey,0,e.publicKey.length):t.bytes===Array?Array.prototype.slice.call(e.publicKey):e.publicKey),null!=e.signature&&e.hasOwnProperty("signature")&&(n.signature=t.bytes===String?s.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature),null!=e.jwt&&e.hasOwnProperty("jwt")&&(n.jwt=t.bytes===String?s.base64.encode(e.jwt,0,e.jwt.length):t.bytes===Array?Array.prototype.slice.call(e.jwt):e.jwt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/WebTokenAuth"},e})(),c.MapEntry=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.key="",e.prototype.value="",e.encode=function(e,t){return t||(t=a.create()),t.uint32(10).string(e.key),t.uint32(18).string(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));let n=void 0===t?e.len:e.pos+t,r=new c.MapEntry;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.key=e.string();break;case 2:r.value=e.string();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("key"))throw s.ProtocolError("missing required 'key'",{instance:r});if(!r.hasOwnProperty("value"))throw s.ProtocolError("missing required 'value'",{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":s.isString(e.key)?s.isString(e.value)?null:"value: string expected":"key: string expected"},e.fromObject=function(e){if(e instanceof c.MapEntry)return e;let t=new c.MapEntry;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.key="",n.value=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MapEntry"},e})(),c.BatchRegisterReq=(()=>{function e(e){if(this.userPushTokenRegRequests=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.userPushTokenRegRequests=s.emptyArray,e.prototype.requestTtl=s.Long?s.Long.fromBits(0,0,!1):0,e.encode=function(e,t){if(t||(t=a.create()),null!=e.userPushTokenRegRequests&&e.userPushTokenRegRequests.length)for(let n=0;n<e.userPushTokenRegRequests.length;++n)c.BatchRegisterReq.UserPushTokenRegRequest.encode(e.userPushTokenRegRequests[n],t.uint32(10).fork()).ldelim();return null!=e.requestTtl&&Object.hasOwnProperty.call(e,"requestTtl")&&t.uint32(16).int64(e.requestTtl),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));let n=void 0===t?e.len:e.pos+t,r=new c.BatchRegisterReq;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.userPushTokenRegRequests&&r.userPushTokenRegRequests.length||(r.userPushTokenRegRequests=[]),r.userPushTokenRegRequests.push(c.BatchRegisterReq.UserPushTokenRegRequest.decode(e,e.uint32()));break;case 2:r.requestTtl=e.int64();break;default:e.skipType(7&t)}}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.userPushTokenRegRequests&&e.hasOwnProperty("userPushTokenRegRequests")){if(!Array.isArray(e.userPushTokenRegRequests))return"userPushTokenRegRequests: array expected";for(let t=0;t<e.userPushTokenRegRequests.length;++t){let n=c.BatchRegisterReq.UserPushTokenRegRequest.verify(e.userPushTokenRegRequests[t]);if(n)return"userPushTokenRegRequests."+n}}return null==e.requestTtl||!e.hasOwnProperty("requestTtl")||s.isInteger(e.requestTtl)||e.requestTtl&&s.isInteger(e.requestTtl.low)&&s.isInteger(e.requestTtl.high)?null:"requestTtl: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.BatchRegisterReq)return e;let t=new c.BatchRegisterReq;if(e.userPushTokenRegRequests){if(!Array.isArray(e.userPushTokenRegRequests))throw TypeError(".BatchRegisterReq.userPushTokenRegRequests: array expected");t.userPushTokenRegRequests=[];for(let n=0;n<e.userPushTokenRegRequests.length;++n){if("object"!==typeof e.userPushTokenRegRequests[n])throw TypeError(".BatchRegisterReq.userPushTokenRegRequests: object expected");t.userPushTokenRegRequests[n]=c.BatchRegisterReq.UserPushTokenRegRequest.fromObject(e.userPushTokenRegRequests[n])}}return null!=e.requestTtl&&(s.Long?(t.requestTtl=s.Long.fromValue(e.requestTtl)).unsigned=!1:"string"===typeof e.requestTtl?t.requestTtl=parseInt(e.requestTtl,10):"number"===typeof e.requestTtl?t.requestTtl=e.requestTtl:"object"===typeof e.requestTtl&&(t.requestTtl=new s.LongBits(e.requestTtl.low>>>0,e.requestTtl.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.userPushTokenRegRequests=[]),t.defaults)if(s.Long){let e=new s.Long(0,0,!1);n.requestTtl=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.requestTtl=t.longs===String?"0":0;if(e.userPushTokenRegRequests&&e.userPushTokenRegRequests.length){n.userPushTokenRegRequests=[];for(let r=0;r<e.userPushTokenRegRequests.length;++r)n.userPushTokenRegRequests[r]=c.BatchRegisterReq.UserPushTokenRegRequest.toObject(e.userPushTokenRegRequests[r],t)}return null!=e.requestTtl&&e.hasOwnProperty("requestTtl")&&("number"===typeof e.requestTtl?n.requestTtl=t.longs===String?String(e.requestTtl):e.requestTtl:n.requestTtl=t.longs===String?s.Long.prototype.toString.call(e.requestTtl):t.longs===Number?new s.LongBits(e.requestTtl.low>>>0,e.requestTtl.high>>>0).toNumber():e.requestTtl),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BatchRegisterReq"},e.UserPushTokenRegRequest=function(){function e(e){if(this.deviceInfo=[],this.topic=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.userPushToken=null,e.prototype.deviceInfo=s.emptyArray,e.prototype.ttl=s.Long?s.Long.fromBits(0,0,!1):0,e.prototype.topic=s.emptyArray,e.encode=function(e,t){if(t||(t=a.create()),c.UserPushToken.encode(e.userPushToken,t.uint32(10).fork()).ldelim(),null!=e.deviceInfo&&e.deviceInfo.length)for(let n=0;n<e.deviceInfo.length;++n)c.MapEntry.encode(e.deviceInfo[n],t.uint32(18).fork()).ldelim();if(null!=e.ttl&&Object.hasOwnProperty.call(e,"ttl")&&t.uint32(24).int64(e.ttl),null!=e.topic&&e.topic.length)for(let n=0;n<e.topic.length;++n)c.BatchRegisterReq.Topic.encode(e.topic[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));let n=void 0===t?e.len:e.pos+t,r=new c.BatchRegisterReq.UserPushTokenRegRequest;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.userPushToken=c.UserPushToken.decode(e,e.uint32());break;case 2:r.deviceInfo&&r.deviceInfo.length||(r.deviceInfo=[]),r.deviceInfo.push(c.MapEntry.decode(e,e.uint32()));break;case 3:r.ttl=e.int64();break;case 4:r.topic&&r.topic.length||(r.topic=[]),r.topic.push(c.BatchRegisterReq.Topic.decode(e,e.uint32()));break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("userPushToken"))throw s.ProtocolError("missing required 'userPushToken'",{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";{let t=c.UserPushToken.verify(e.userPushToken);if(t)return"userPushToken."+t}if(null!=e.deviceInfo&&e.hasOwnProperty("deviceInfo")){if(!Array.isArray(e.deviceInfo))return"deviceInfo: array expected";for(let t=0;t<e.deviceInfo.length;++t){let n=c.MapEntry.verify(e.deviceInfo[t]);if(n)return"deviceInfo."+n}}if(null!=e.ttl&&e.hasOwnProperty("ttl")&&!s.isInteger(e.ttl)&&!(e.ttl&&s.isInteger(e.ttl.low)&&s.isInteger(e.ttl.high)))return"ttl: integer|Long expected";if(null!=e.topic&&e.hasOwnProperty("topic")){if(!Array.isArray(e.topic))return"topic: array expected";for(let t=0;t<e.topic.length;++t){let n=c.BatchRegisterReq.Topic.verify(e.topic[t]);if(n)return"topic."+n}}return null},e.fromObject=function(e){if(e instanceof c.BatchRegisterReq.UserPushTokenRegRequest)return e;let t=new c.BatchRegisterReq.UserPushTokenRegRequest;if(null!=e.userPushToken){if("object"!==typeof e.userPushToken)throw TypeError(".BatchRegisterReq.UserPushTokenRegRequest.userPushToken: object expected");t.userPushToken=c.UserPushToken.fromObject(e.userPushToken)}if(e.deviceInfo){if(!Array.isArray(e.deviceInfo))throw TypeError(".BatchRegisterReq.UserPushTokenRegRequest.deviceInfo: array expected");t.deviceInfo=[];for(let n=0;n<e.deviceInfo.length;++n){if("object"!==typeof e.deviceInfo[n])throw TypeError(".BatchRegisterReq.UserPushTokenRegRequest.deviceInfo: object expected");t.deviceInfo[n]=c.MapEntry.fromObject(e.deviceInfo[n])}}if(null!=e.ttl&&(s.Long?(t.ttl=s.Long.fromValue(e.ttl)).unsigned=!1:"string"===typeof e.ttl?t.ttl=parseInt(e.ttl,10):"number"===typeof e.ttl?t.ttl=e.ttl:"object"===typeof e.ttl&&(t.ttl=new s.LongBits(e.ttl.low>>>0,e.ttl.high>>>0).toNumber())),e.topic){if(!Array.isArray(e.topic))throw TypeError(".BatchRegisterReq.UserPushTokenRegRequest.topic: array expected");t.topic=[];for(let n=0;n<e.topic.length;++n){if("object"!==typeof e.topic[n])throw TypeError(".BatchRegisterReq.UserPushTokenRegRequest.topic: object expected");t.topic[n]=c.BatchRegisterReq.Topic.fromObject(e.topic[n])}}return t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.deviceInfo=[],n.topic=[]),t.defaults)if(n.userPushToken=null,s.Long){let e=new s.Long(0,0,!1);n.ttl=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.ttl=t.longs===String?"0":0;if(null!=e.userPushToken&&e.hasOwnProperty("userPushToken")&&(n.userPushToken=c.UserPushToken.toObject(e.userPushToken,t)),e.deviceInfo&&e.deviceInfo.length){n.deviceInfo=[];for(let r=0;r<e.deviceInfo.length;++r)n.deviceInfo[r]=c.MapEntry.toObject(e.deviceInfo[r],t)}if(null!=e.ttl&&e.hasOwnProperty("ttl")&&("number"===typeof e.ttl?n.ttl=t.longs===String?String(e.ttl):e.ttl:n.ttl=t.longs===String?s.Long.prototype.toString.call(e.ttl):t.longs===Number?new s.LongBits(e.ttl.low>>>0,e.ttl.high>>>0).toNumber():e.ttl),e.topic&&e.topic.length){n.topic=[];for(let r=0;r<e.topic.length;++r)n.topic[r]=c.BatchRegisterReq.Topic.toObject(e.topic[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BatchRegisterReq.UserPushTokenRegRequest"},e}(),e.Topic=function(){function e(e){if(this.appInfo=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.qualifier="",e.prototype.appInfo=s.emptyArray,e.prototype.client=0,e.encode=function(e,t){if(t||(t=a.create()),t.uint32(10).string(e.name),t.uint32(18).string(e.qualifier),null!=e.appInfo&&e.appInfo.length)for(let n=0;n<e.appInfo.length;++n)c.MapEntry.encode(e.appInfo[n],t.uint32(26).fork()).ldelim();return null!=e.client&&Object.hasOwnProperty.call(e,"client")&&t.uint32(32).int32(e.client),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));let n=void 0===t?e.len:e.pos+t,r=new c.BatchRegisterReq.Topic;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.name=e.string();break;case 2:r.qualifier=e.string();break;case 3:r.appInfo&&r.appInfo.length||(r.appInfo=[]),r.appInfo.push(c.MapEntry.decode(e,e.uint32()));break;case 4:r.client=e.int32();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("name"))throw s.ProtocolError("missing required 'name'",{instance:r});if(!r.hasOwnProperty("qualifier"))throw s.ProtocolError("missing required 'qualifier'",{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(!s.isString(e.name))return"name: string expected";if(!s.isString(e.qualifier))return"qualifier: string expected";if(null!=e.appInfo&&e.hasOwnProperty("appInfo")){if(!Array.isArray(e.appInfo))return"appInfo: array expected";for(let t=0;t<e.appInfo.length;++t){let n=c.MapEntry.verify(e.appInfo[t]);if(n)return"appInfo."+n}}if(null!=e.client&&e.hasOwnProperty("client"))switch(e.client){default:return"client: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null},e.fromObject=function(e){if(e instanceof c.BatchRegisterReq.Topic)return e;let t=new c.BatchRegisterReq.Topic;if(null!=e.name&&(t.name=String(e.name)),null!=e.qualifier&&(t.qualifier=String(e.qualifier)),e.appInfo){if(!Array.isArray(e.appInfo))throw TypeError(".BatchRegisterReq.Topic.appInfo: array expected");t.appInfo=[];for(let n=0;n<e.appInfo.length;++n){if("object"!==typeof e.appInfo[n])throw TypeError(".BatchRegisterReq.Topic.appInfo: object expected");t.appInfo[n]=c.MapEntry.fromObject(e.appInfo[n])}}switch(e.client){default:if("number"===typeof e.client){t.client=e.client;break}break;case"DEFAULT":case 0:t.client=0;break;case"CLOUDD":case 1:t.client=1;break;case"COREIDVD":case 2:t.client=2;break;case"TEST":case 3:t.client=3;break;case"NOTES":case 4:t.client=4;break;case"ICLOUDCOM":case 5:t.client=5;break;case"FAMILY":case 6:t.client=6}return t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.appInfo=[]),t.defaults&&(n.name="",n.qualifier="",n.client=t.enums===String?"DEFAULT":0),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.qualifier&&e.hasOwnProperty("qualifier")&&(n.qualifier=e.qualifier),e.appInfo&&e.appInfo.length){n.appInfo=[];for(let r=0;r<e.appInfo.length;++r)n.appInfo[r]=c.MapEntry.toObject(e.appInfo[r],t)}return null!=e.client&&e.hasOwnProperty("client")&&(n.client=t.enums===String?void 0===c.BatchRegisterReq.Topic.Client[e.client]?e.client:c.BatchRegisterReq.Topic.Client[e.client]:e.client),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BatchRegisterReq.Topic"},e.Client=function(){const e={},t=Object.create(e);return t[e[0]="DEFAULT"]=0,t[e[1]="CLOUDD"]=1,t[e[2]="COREIDVD"]=2,t[e[3]="TEST"]=3,t[e[4]="NOTES"]=4,t[e[5]="ICLOUDCOM"]=5,t[e[6]="FAMILY"]=6,t}(),e}(),e})()),l=c.BatchRegisterResp=(()=>{function e(e){if(this.userPushTokenRegResponses=[],e)for(let 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.message="",e.prototype.userPushTokenRegResponses=s.emptyArray,e.prototype.responseTtl=s.Long?s.Long.fromBits(0,0,!1):0,e.prototype.retryInterval=s.Long?s.Long.fromBits(0,0,!1):0,e.prototype.serverTimestamp=s.Long?s.Long.fromBits(0,0,!1):0,e.encode=function(e,t){if(t||(t=a.create()),t.uint32(8).int32(e.status),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),null!=e.userPushTokenRegResponses&&e.userPushTokenRegResponses.length)for(let n=0;n<e.userPushTokenRegResponses.length;++n)c.BatchRegisterResp.UserPushTokenRegResponse.encode(e.userPushTokenRegResponses[n],t.uint32(26).fork()).ldelim();return null!=e.responseTtl&&Object.hasOwnProperty.call(e,"responseTtl")&&t.uint32(32).int64(e.responseTtl),null!=e.retryInterval&&Object.hasOwnProperty.call(e,"retryInterval")&&t.uint32(40).int64(e.retryInterval),null!=e.serverTimestamp&&Object.hasOwnProperty.call(e,"serverTimestamp")&&t.uint32(48).int64(e.serverTimestamp),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));let n=void 0===t?e.len:e.pos+t,r=new c.BatchRegisterResp;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.status=e.int32();break;case 2:r.message=e.string();break;case 3:r.userPushTokenRegResponses&&r.userPushTokenRegResponses.length||(r.userPushTokenRegResponses=[]),r.userPushTokenRegResponses.push(c.BatchRegisterResp.UserPushTokenRegResponse.decode(e,e.uint32()));break;case 4:r.responseTtl=e.int64();break;case 5:r.retryInterval=e.int64();break;case 6:r.serverTimestamp=e.int64();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("status"))throw s.ProtocolError("missing required 'status'",{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(!s.isInteger(e.status))return"status: integer expected";if(null!=e.message&&e.hasOwnProperty("message")&&!s.isString(e.message))return"message: string expected";if(null!=e.userPushTokenRegResponses&&e.hasOwnProperty("userPushTokenRegResponses")){if(!Array.isArray(e.userPushTokenRegResponses))return"userPushTokenRegResponses: array expected";for(let t=0;t<e.userPushTokenRegResponses.length;++t){let n=c.BatchRegisterResp.UserPushTokenRegResponse.verify(e.userPushTokenRegResponses[t]);if(n)return"userPushTokenRegResponses."+n}}return null==e.responseTtl||!e.hasOwnProperty("responseTtl")||s.isInteger(e.responseTtl)||e.responseTtl&&s.isInteger(e.responseTtl.low)&&s.isInteger(e.responseTtl.high)?null==e.retryInterval||!e.hasOwnProperty("retryInterval")||s.isInteger(e.retryInterval)||e.retryInterval&&s.isInteger(e.retryInterval.low)&&s.isInteger(e.retryInterval.high)?null==e.serverTimestamp||!e.hasOwnProperty("serverTimestamp")||s.isInteger(e.serverTimestamp)||e.serverTimestamp&&s.isInteger(e.serverTimestamp.low)&&s.isInteger(e.serverTimestamp.high)?null:"serverTimestamp: integer|Long expected":"retryInterval: integer|Long expected":"responseTtl: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.BatchRegisterResp)return e;let t=new c.BatchRegisterResp;if(null!=e.status&&(t.status=0|e.status),null!=e.message&&(t.message=String(e.message)),e.userPushTokenRegResponses){if(!Array.isArray(e.userPushTokenRegResponses))throw TypeError(".BatchRegisterResp.userPushTokenRegResponses: array expected");t.userPushTokenRegResponses=[];for(let n=0;n<e.userPushTokenRegResponses.length;++n){if("object"!==typeof e.userPushTokenRegResponses[n])throw TypeError(".BatchRegisterResp.userPushTokenRegResponses: object expected");t.userPushTokenRegResponses[n]=c.BatchRegisterResp.UserPushTokenRegResponse.fromObject(e.userPushTokenRegResponses[n])}}return null!=e.responseTtl&&(s.Long?(t.responseTtl=s.Long.fromValue(e.responseTtl)).unsigned=!1:"string"===typeof e.responseTtl?t.responseTtl=parseInt(e.responseTtl,10):"number"===typeof e.responseTtl?t.responseTtl=e.responseTtl:"object"===typeof e.responseTtl&&(t.responseTtl=new s.LongBits(e.responseTtl.low>>>0,e.responseTtl.high>>>0).toNumber())),null!=e.retryInterval&&(s.Long?(t.retryInterval=s.Long.fromValue(e.retryInterval)).unsigned=!1:"string"===typeof e.retryInterval?t.retryInterval=parseInt(e.retryInterval,10):"number"===typeof e.retryInterval?t.retryInterval=e.retryInterval:"object"===typeof e.retryInterval&&(t.retryInterval=new s.LongBits(e.retryInterval.low>>>0,e.retryInterval.high>>>0).toNumber())),null!=e.serverTimestamp&&(s.Long?(t.serverTimestamp=s.Long.fromValue(e.serverTimestamp)).unsigned=!1:"string"===typeof e.serverTimestamp?t.serverTimestamp=parseInt(e.serverTimestamp,10):"number"===typeof e.serverTimestamp?t.serverTimestamp=e.serverTimestamp:"object"===typeof e.serverTimestamp&&(t.serverTimestamp=new s.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.userPushTokenRegResponses=[]),t.defaults){if(n.status=0,n.message="",s.Long){let e=new s.Long(0,0,!1);n.responseTtl=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.responseTtl=t.longs===String?"0":0;if(s.Long){let e=new s.Long(0,0,!1);n.retryInterval=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.retryInterval=t.longs===String?"0":0;if(s.Long){let e=new s.Long(0,0,!1);n.serverTimestamp=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.serverTimestamp=t.longs===String?"0":0}if(null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),e.userPushTokenRegResponses&&e.userPushTokenRegResponses.length){n.userPushTokenRegResponses=[];for(let r=0;r<e.userPushTokenRegResponses.length;++r)n.userPushTokenRegResponses[r]=c.BatchRegisterResp.UserPushTokenRegResponse.toObject(e.userPushTokenRegResponses[r],t)}return null!=e.responseTtl&&e.hasOwnProperty("responseTtl")&&("number"===typeof e.responseTtl?n.responseTtl=t.longs===String?String(e.responseTtl):e.responseTtl:n.responseTtl=t.longs===String?s.Long.prototype.toString.call(e.responseTtl):t.longs===Number?new s.LongBits(e.responseTtl.low>>>0,e.responseTtl.high>>>0).toNumber():e.responseTtl),null!=e.retryInterval&&e.hasOwnProperty("retryInterval")&&("number"===typeof e.retryInterval?n.retryInterval=t.longs===String?String(e.retryInterval):e.retryInterval:n.retryInterval=t.longs===String?s.Long.prototype.toString.call(e.retryInterval):t.longs===Number?new s.LongBits(e.retryInterval.low>>>0,e.retryInterval.high>>>0).toNumber():e.retryInterval),null!=e.serverTimestamp&&e.hasOwnProperty("serverTimestamp")&&("number"===typeof e.serverTimestamp?n.serverTimestamp=t.longs===String?String(e.serverTimestamp):e.serverTimestamp:n.serverTimestamp=t.longs===String?s.Long.prototype.toString.call(e.serverTimestamp):t.longs===Number?new s.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber():e.serverTimestamp),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BatchRegisterResp"},e.UserPushTokenRegResponse=function(){function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.userPushToken=null,e.prototype.status=0,e.prototype.message="",e.encode=function(e,t){return t||(t=a.create()),c.UserPushToken.encode(e.userPushToken,t.uint32(10).fork()).ldelim(),t.uint32(16).int32(e.status),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(26).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));let n=void 0===t?e.len:e.pos+t,r=new c.BatchRegisterResp.UserPushTokenRegResponse;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.userPushToken=c.UserPushToken.decode(e,e.uint32());break;case 2:r.status=e.int32();break;case 3:r.message=e.string();break;default:e.skipType(7&t)}}if(!r.hasOwnProperty("userPushToken"))throw s.ProtocolError("missing required 'userPushToken'",{instance:r});if(!r.hasOwnProperty("status"))throw s.ProtocolError("missing required 'status'",{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";{let t=c.UserPushToken.verify(e.userPushToken);if(t)return"userPushToken."+t}return s.isInteger(e.status)?null!=e.message&&e.hasOwnProperty("message")&&!s.isString(e.message)?"message: string expected":null:"status: integer expected"},e.fromObject=function(e){if(e instanceof c.BatchRegisterResp.UserPushTokenRegResponse)return e;let t=new c.BatchRegisterResp.UserPushTokenRegResponse;if(null!=e.userPushToken){if("object"!==typeof e.userPushToken)throw TypeError(".BatchRegisterResp.UserPushTokenRegResponse.userPushToken: object expected");t.userPushToken=c.UserPushToken.fromObject(e.userPushToken)}return null!=e.status&&(t.status=0|e.status),null!=e.message&&(t.message=String(e.message)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.userPushToken=null,n.status=0,n.message=""),null!=e.userPushToken&&e.hasOwnProperty("userPushToken")&&(n.userPushToken=c.UserPushToken.toObject(e.userPushToken,t)),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BatchRegisterResp.UserPushTokenRegResponse"},e}(),e})();var d=n(2249),p=n(1093),f=n(1029),h=n.n(f);const m=new TextEncoder;async function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis.fetch;try{const{dsid:n,pushToken:r,deviceInfo:i,ttl:o,pushTopics:a}=e,s={userPushTokenRegRequests:[{userPushToken:{userId:n,userAuth:{icloudAuth:{}},pushToken:r},deviceInfo:i,topic:v(a)}],requestTtl:o};return b(s,t)}catch(n){throw new Error("Issue Registering Web Subscription Topics with PDS")}}const v=e=>e.map((e=>{let t;return e.includes("com.apple.icloud-container")&&(t=e.split(/(\w+.){2}.icloud-container(.\w+[^.com])?./).slice(-1)[0].concat("_P")),{name:e,qualifier:null!==t&&void 0!==t?t:"",client:u.Topic.Client.ICLOUDCOM}}));async function y(e,t){let{customFetch:n=globalThis.fetch,deviceInfo:r=[],ttl:o=600}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const a=await Object(p.a)(e.pushIdentity.connectionKeyPair,h.a.BigInt(Date.now()),"pds"),s={userPushTokenRegRequests:[{userPushToken:{userId:e.dsid,userAuth:{icloudAuth:{}},pushToken:Object(i.b)(e.pushIdentity.token).toUpperCase(),pushTokenAuth:{webTokenAuth:{nonce:a.nonce,publicKey:a.publicKey,signature:a.signature,jwt:m.encode(e.jwToken)}}},deviceInfo:r,topic:v(t)}],requestTtl:o};return b(s,n)}catch(a){throw new Error("Issue Registering Push Token Topics with PDS")}}const b=async(e,t)=>{try{const n=u.encode(e).finish();if(!u.verify(n)){const e=await w("POST",!0,n,{"x-protocol-version":"1","x-pds-client-version":"2","x-pds-client-type":"iCloudCom","x-registration-reason":"1","Content-Type":"application/protobuf"},t),r=new Uint8Array(await e.arrayBuffer());return l.decode(r)}}catch(n){throw n instanceof r.util.ProtocolError?new Error("Issue encoding BatchRegisterReq"):new Error("Issue registering topics with PDS")}},w=async function(e){let 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]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:globalThis.fetch;const o=(()=>{const e="https://gatewayws.icloud.com",t="/pds",n=`${e}.cn`,r=`${e}${t}`;return/^(carry)\.icloud\.com$/.test(globalThis.location.hostname)?`${e}${t}-carry`:/^.*\.icloud\.com\.cn$/.test(globalThis.location.hostname)?`${n}${t}`:r})(),a=d.c(`${o}/WebObjects/pushregistry.woa/webBatchRegister/batchRegisterToken`);return i.call(globalThis,a,{method:e,body:n,credentials:t?"include":"omit",headers:r})}},function(e,t,n){"use strict";n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A}));var r=n(2266),i=n(2296),o=n(1312),a=n(970),s=n(2161),c=n(1209),u=n(1247),l=n(1264),d=n(1265),p=n(1358),f=n(2190),h=n(1350),m=n(2191),g=n(898),v=n(1307),y=n(888),b=n(2290);y.z.object({badge:y.z.number().optional()});var w=n(2248),S=n(973);const C=y.z.object({badge:y.z.number()});var _=n(1322),O=n(2192);async function E(e){(async()=>{if(e&&e!==c.b.identifier)return;const t=await async function(){try{const e=await S.a.fetchJSON(Object(w.j)("reminders","rd/state"),{method:"GET",validate:{type:"ReminderStateResponse",schema:C}});if(e.ok&&e.response.ok)return{isOK:!0,data:e.value}}catch{}return{isOK:!1}}();if(t.isOK){const e=l.a.sharedInstance.getChildApplicationController(c.b.applicationInfo);e&&(e.badgeCount=t.data.badge),d.a.shared.setBadgeCount(c.b.applicationInfo,t.data.badge)}})(),(async()=>{if(e&&e!==a.d.identifier)return;const t=await Object(v.c)();if(t.isOK){const e=l.a.sharedInstance.getChildApplicationController(a.d.applicationInfo);e&&(e.badgeCount=t.data.badge),d.a.shared.setBadgeCount(a.d.applicationInfo,t.data.badge)}})(),(async()=>{if(e&&e!==s.f.identifier)return;const t=await async function(){try{return{isOK:!0,data:{badge:await Object(b.a)().getAppBadgeCount()}}}catch{}return{isOK:!1}}();if(t.isOK){const e=l.a.sharedInstance.getChildApplicationController(s.f.applicationInfo);e&&(e.badgeCount=t.data.badge),d.a.shared.setBadgeCount(s.f.applicationInfo,t.data.badge)}})()}function I(e,t,n){var r;const{ckInfo:i,topic:d,applicationIdentifier:p}=e;e.topic===s.f.applicationInfo.pushTopic.hash?R():e.topic===a.d.applicationInfo.pushTopic.hash?k():"com.apple.notes"===(null===i||void 0===i?void 0:i.containerIdentifier)?D():"com.apple.reminders"===(null===i||void 0===i?void 0:i.containerIdentifier)?M():"com.apple.photos.cloud"===(null===i||void 0===i?void 0:i.containerIdentifier)&&N(),(null===(r=e.ckInfo)||void 0===r?void 0:r.containerIdentifier)===o.a.containerIdentifier&&o.a.shared.handlePush({data:e});for(const o of u.a.sharedInstance.configurations){const r=o.applicationInfo.pushTopic,u=o.applicationInfo.cloudKitInfo;(d&&r&&d===r.hash||i&&u&&i.containerIdentifier===u.containerIdentifier||p===o.identifier)&&(f.a.sharedInstance.scheduleAlarms([o.identifier]),o.identifier===s.a?A():o.identifier===a.a?P():o.identifier===c.a&&T(),e.notification&&e.clientId!==g.a.clientId&&m.a.sharedInstance.enqueue({notificationType:h.a.PUSH,applicationInfo:o.applicationInfo,applicationConfiguration:o,pushNotification:e,isDismissable:null!==t&&void 0!==t&&t,omitWhenActive:null!==n&&void 0!==n&&n}),l.a.sharedInstance.getChildApplicationController(o.applicationInfo).handlePushNotification(e))}}const A=Object(_.a)((()=>E(s.a)),O.a),T=Object(_.a)((()=>E(c.a)),O.a),P=Object(_.a)((()=>E(a.a)),O.a),R=Object(_.a)((()=>{p.a.isMutating({mutationKey:r.b.mutateMails})||(p.a.invalidateQueries(r.b.mailRecentThreads),p.a.invalidateQueries(r.b.mailRecentMessages),p.a.invalidateQueries(r.b.mailbox))}),O.b),k=Object(_.a)((()=>{p.a.isMutating({mutationKey:r.b.mutateCalendarEvents})||p.a.invalidateQueries(r.b.calendarFutureEvents)}),O.b),D=Object(_.a)((()=>{if(!p.a.isMutating({mutationKey:r.b.mutateNotes})&&!p.a.isMutating({mutationKey:r.b.mutatePinNotes})){p.a.invalidateQueries(r.b.notesRecent),p.a.invalidateQueries(r.b.notesWithParentId),p.a.invalidateQueries(r.b.notesPinned),p.a.invalidateQueries(r.b.notesPinInfo);const e=[r.b.notesChildFolders,i.e];p.a.getQueryData(e)?p.a.invalidateQueries(e):p.a.invalidateQueries(r.b.notesRootFolders)}}),O.b),M=Object(_.a)((()=>{p.a.isMutating({mutationKey:r.b.mutateReminders})||(p.a.invalidateQueries(r.b.remindersList),p.a.invalidateQueries(r.b.remindersRecent))}),O.b),N=Object(_.a)((()=>{p.a.isMutating({mutationKey:r.b.mutatePhotos})||(p.a.invalidateQueries(r.b.photosLibraryInfo),p.a.invalidateQueries(r.b.photosRecent))}),O.b)},function(e,t,n){"use strict";n.d(t,"f",(function(){return L})),n.d(t,"e",(function(){return j})),n.d(t,"d",(function(){return U})),n.d(t,"g",(function(){return F})),n.d(t,"h",(function(){return z})),n.d(t,"i",(function(){return H})),n.d(t,"j",(function(){return W})),n.d(t,"c",(function(){return V})),n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return G}));var r=n(1414),i=n(2266),o=n(1413);function a(e){return`Note_UserSpecific::${e.ownerRecordName}/Private::Notes::${e.ownerRecordName}::${e.id}`}var s=n(888),c=n(1419);const u=s.z.object({fields:s.z.object({TitleEncrypted:s.z.object({type:s.z.string(),value:s.z.string()}).optional(),SnippetEncrypted:s.z.object({type:s.z.string(),value:s.z.string()}).optional(),ModificationDate:s.z.object({type:s.z.string(),value:s.z.number()}).optional(),MinimumSupportedNotesVersion:s.z.object({type:s.z.string(),value:s.z.number()}).optional(),Deleted:s.z.object({type:s.z.string(),value:s.z.number()}).optional(),Folder:s.z.object({type:s.z.string(),value:s.z.object({recordName:s.z.string()})}).optional(),HasSubfolder:s.z.object({type:s.z.string(),value:s.z.number()}).optional()}),parent:s.z.object({recordName:s.z.string()}).optional()}),l=s.z.object({fields:s.z.object({IsPinned:s.z.object({type:s.z.string(),value:s.z.number()}).optional()})}),d=s.z.discriminatedUnion("deleted",[c.a.merge(s.z.object({deleted:s.z.literal(!0)})),c.a.merge(s.z.object({deleted:s.z.literal(!1)})).merge(l)]),p=c.a.merge(s.z.object({deleted:s.z.literal(!1)})).merge(u),f=s.z.discriminatedUnion("deleted",[c.a.merge(s.z.object({deleted:s.z.literal(!0)})),p]),h=s.z.object({records:s.z.array(f),continuationMarker:s.z.string().optional()}),m=s.z.object({reason:s.z.string(),serverErrorCode:s.z.string(),uuid:s.z.string()}),g=s.z.object({reason:s.z.string(),serverErrorCode:s.z.string(),recordName:s.z.string().optional()}),v=s.z.object({records:s.z.array(g)}),y=s.z.union([h,m]),b=s.z.union([h,v]),w=s.z.object({records:s.z.array(s.z.union([d,g]))});function S(e){return!e.serverErrorCode&&e.records}function C(e){return!!e.serverErrorCode}s.z.object({zones:s.z.array(s.z.object({moreComing:s.z.boolean(),syncToken:s.z.string().optional()}).merge(c.b).merge(h))});var _=n(2296),O=n(1415),E=n(977);const I={recordType:"SearchIndexes",filterBy:[{comparator:"EQUALS",fieldName:"indexName",fieldValue:{value:"recents",type:"STRING"}}],sortBy:[{fieldName:"modTime",ascending:!1}]},A={recordType:"pinned",sortBy:[{fieldName:"modTime",ascending:!1}]},T={recordType:"SearchIndexes",filterBy:[{comparator:"EQUALS",fieldName:"indexName",fieldValue:{value:"parentless",type:"STRING"}}]};function P(e){return{recordType:"LookupValidatingReferences",filterBy:[{comparator:"EQUALS",fieldName:"reference",fieldValue:{value:{recordName:e,action:"VALIDATE"},type:"REFERENCE"}}]}}const R={zoneName:"Notes"},k=["TitleEncrypted","SnippetEncrypted","ModificationDate","Deleted","LastViewedModificationDate","MinimumSupportedNotesVersion","Folder"],D=["TitleEncrypted","ModificationDate","MinimumSupportedNotesVersion"],M="com.apple.notes",N="ZONE_NOT_FOUND";async function x(e){if(Object(r.f)(e)&&Object(E.a)(e.response)){const{response:t}=e;if((await t.unvalidatedJson()).serverErrorCode===N)return{notes:[]}}throw e}const L=(e,t)=>{let{webServices:n,signal:r}=e;return Object(O.a)("fetchRecentNotes",(async()=>{if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");const e=Object(i.g)(n.ckdatabasews,"production",M,i.a.PRIVATE);try{const n=await Object(o.a)({url:e,method:"POST",includeCredentials:!0,body:{query:I,zoneID:R,desiredKeys:k,resultsLimit:t?50:24,...!!t&&{continuationMarker:t}},validate:{type:"WireRecentNotesResponse",schema:y},signal:r});if(!S(n))throw new Error("failed to fetch note");return{notes:Object(_.g)(n.records),...!!n.continuationMarker&&{continuationMarker:n.continuationMarker}}}catch(a){return x(a)}}))},j=async e=>{let{webServices:t,signal:n}=e;if(null===t||void 0===t||!t.ckdatabasews)throw new Error("no service url available");const r=Object(i.g)(t.ckdatabasews,"production",M,i.a.PRIVATE),a=await Object(o.a)({url:r,method:"POST",includeCredentials:!0,body:{query:A,zoneID:R,desiredKeys:k,resultsLimit:6},validate:{type:"WireRecentNotesResponse",schema:y},signal:n});if(!S(a))throw new Error("failed to fetch note");return{notes:Object(_.g)(a.records)}},U=async(e,t)=>{let{webServices:n,signal:r}=e;if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");if(0===t.length)return Promise.resolve(new Map);const s=t.map((e=>({recordName:a(e)}))),c=Object(i.e)(n.ckdatabasews,"production",M,i.a.PRIVATE),u=await Object(o.a)({url:c,method:"POST",includeCredentials:!0,body:{records:s,zoneID:R},validate:{type:"WireNotesPinLookupResponse",schema:w},signal:r}),l=new Map;return t.forEach((e=>{const t=u.records.find((t=>t.recordName===a(e)));var n;!t||C(t)||t.deleted?l.set(e.id,!1):l.set(e.id,!(null===(n=t.fields.IsPinned)||void 0===n||!n.value))})),l},F=(e,t,n)=>{let{webServices:r,signal:a}=e;return Object(O.a)("fetchRecentNotesWithParentId",(async()=>{if(null===r||void 0===r||!r.ckdatabasews)throw new Error("no service url available");if(t===_.a)return{notes:[]};const e=Object(i.g)(r.ckdatabasews,"production",M,i.a.PRIVATE);try{const r=await Object(o.a)({url:e,method:"POST",includeCredentials:!0,body:{query:P(t),zoneID:R,desiredKeys:k,resultsLimit:50,...!!n&&{continuationMarker:n}},validate:{type:"WireRecentNotesResponse",schema:y},signal:a});if(!S(r))throw new Error("failed to fetch note");return{notes:Object(_.h)(r.records),...!!r.continuationMarker&&{continuationMarker:r.continuationMarker}}}catch(s){return x(s)}}))},z=e=>{let{webServices:t,signal:n}=e;return Object(O.a)("fetchNotesRootFolders",(async()=>{if(null===t||void 0===t||!t.ckdatabasews)throw new Error("no service url available");const e=Object(i.g)(t.ckdatabasews,"production",M,i.a.PRIVATE);try{const t=[];let r;for(;;){const i=await Object(o.a)({url:e,method:"POST",includeCredentials:!0,body:{query:T,zoneID:R,desiredKeys:D,resultsLimit:50,...!!r&&{continuationMarker:r}},validate:{type:"WireRecentNotesResponse",schema:y},signal:n});if(!S(i))throw new Error("failed to fetch folders");if(t.push(...i.records),!i.continuationMarker)break;r=i.continuationMarker}return Object(_.f)(t)}catch(a){return async function(e){if(Object(r.f)(e)&&Object(E.a)(e.response)){const{response:t}=e;if((await t.unvalidatedJson()).serverErrorCode===N)return[]}throw e}(a)}}))},B=(e,t)=>{const n=[{operationType:"update",record:{recordChangeTag:t.changeTag,recordName:t.id,recordType:"Note",shortGUID:t.shortGUID,parent:{recordName:_.d},fields:{Folder:{value:K},Folders:{value:[K]},FoldersModificationDate:{value:Date.now()}}}}];return Object(o.c)({url:e,method:"POST",includeCredentials:!0,body:{operations:n,zoneID:R}}).then(r.g)},K={action:"VALIDATE",recordName:_.d,zoneID:R},H=(e,t)=>{let{webServices:n}=e;const a=t.isShared;return Object(O.a)(a?"moveSharedNoteToTrash":"moveNoteToTrash",(()=>{if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");const e=Object(i.f)(n.ckdatabasews,"production",M,i.a.PRIVATE);return a?((e,t,n)=>{var i,a,s,c,u,l;const d=[{operationType:"forceDelete",record:{recordName:null!==(i=null===(a=n.share)||void 0===a?void 0:a.shareRecordName)&&void 0!==i?i:""}}],p=Object(o.c)({url:e,method:"POST",includeCredentials:!0,body:{operations:d,zoneID:R}}).then(r.g),f=[{operationType:"forceDelete",record:{recordName:`Note_UserSpecific::${null!==(s=null===(c=n.share)||void 0===c?void 0:c.ownerRecordName)&&void 0!==s?s:""}/Private::Notes::${null!==(u=null===(l=n.share)||void 0===l?void 0:l.ownerRecordName)&&void 0!==u?u:""}::${n.id}`}}],h=Object(o.c)({url:e,method:"POST",includeCredentials:!0,body:{operations:f,zoneID:R}}).then(r.g);return Promise.all([p.then((()=>(async(e,t)=>{const n=await Object(o.a)({url:e,method:"POST",includeCredentials:!0,body:{records:[{recordName:t}],zoneID:R},validate:{type:"WireRecentNotesResponse",schema:y}});if(!S(n))throw new Error("failed to fetch note");return Object(_.g)(n.records)[0]})(t,n.id))).then((t=>B(e,t))),h])})(e,Object(i.e)(n.ckdatabasews,"production",M,i.a.PRIVATE),t):B(e,t)}))},W=async(e,t,n)=>{let{webServices:r}=e;if(null===r||void 0===r||!r.ckdatabasews)throw new Error("no service url available");const s=await((e,t)=>{let{webServices:n,signal:r}=e;if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");const s=Object(i.e)(n.ckdatabasews,"production",M,i.a.PRIVATE);return Object(o.a)({url:s,method:"POST",includeCredentials:!0,body:{records:[{recordName:a(t)}],zoneID:R},validate:{type:"WireNotesPinLookupResponse",schema:w},signal:r})})({webServices:r},t),c=Object(i.f)(r.ckdatabasews,"production",M,i.a.PRIVATE),u=[{operationType:"create",record:{recordName:a(t),recordType:"Note_UserSpecific",recordChangeTag:void 0,fields:{Note:{value:{recordName:t.id,action:"NONE",zoneID:{zoneName:"Notes",ownerRecordName:"currentUser",database:"[iCloudWeb.Data.CKDatabaseType: Private]"}}},IsPinned:{value:n?1:0},Folder:{value:{recordName:t.parentFolderId,action:"VALIDATE",zoneID:{zoneName:"Notes",ownerRecordName:t.ownerRecordName,zoneType:"REGULAR_CUSTOM_ZONE"}}}}}}];C(s.records[0])||(u[0].operationType="update",u[0].record.recordChangeTag=s.records[0].recordChangeTag);const l=await Object(o.a)({url:c,method:"POST",includeCredentials:!0,body:{operations:u,zoneID:R},validate:{type:"WireNotesPinModifyResponse",schema:w}});if(C(l.records[0]))throw new Error("failed to pin or unpin note");return l},q=e=>({recordType:"parent_folder",filterBy:[{comparator:"EQUALS",fieldName:"parentFolder",fieldValue:{value:{recordName:e,action:"VALIDATE",zoneID:{zoneName:"Notes",zoneType:"REGULAR_CUSTOM_ZONE"}},type:"REFERENCE"}}]}),V=async(e,t)=>{let{webServices:n,signal:a}=e;if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");const s=Object(i.g)(n.ckdatabasews,"production",M,i.a.PRIVATE);try{let e=await Object(o.a)({url:s,method:"POST",includeCredentials:!0,body:{query:q(t),zoneID:R,resultsLimit:50},validate:{type:"WireRecentNotesResponse",schema:y},signal:a});if(!S(e))throw"TRY_AGAIN_LATER"===e.serverErrorCode?new r.e:new Error("failed to fetch notes folders");return Object(_.f)(e.records)}catch(c){return(await x(c)).notes}};class $ extends Error{}const G=async(e,t)=>{let{webServices:n}=e;if(null===n||void 0===n||!n.ckdatabasews)throw new Error("no service url available");const r=Object(i.e)(n.ckdatabasews,"production",M,i.a.PRIVATE),a=await Object(o.a)({url:r,method:"POST",includeCredentials:!0,body:{records:[{recordName:t}],zoneID:R},validate:{type:"WireRecentNotesResponse",schema:b}});if(function(e){var t;return!e.records||0===e.records.length||!(null===(t=e.records)||void 0===t||!t[0].serverErrorCode)}(a)){var s;if("NOT_FOUND"===(null===(s=a.records)||void 0===s?void 0:s[0].serverErrorCode))throw new $;throw new Error("failed to fetch note folder")}return Object(_.f)(a.records)[0]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"k",(function(){return b})),n.d(t,"e",(function(){return w})),n.d(t,"f",(function(){return S})),n.d(t,"d",(function(){return C})),n.d(t,"g",(function(){return _})),n.d(t,"c",(function(){return O})),n.d(t,"j",(function(){return k})),n.d(t,"i",(function(){return M})),n.d(t,"h",(function(){return N}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=n(1468),c=n(1250),u=n(1219),l=n(1469),d=["styles"];function p(){return p=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},p.apply(null,arguments)}var f=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,d);return i.a.createElement("svg",p({className:n["ui-menu-icon-check"]||"ui-menu-icon-check",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{d:"M8 16c4.376 0 8-3.631 8-8 0-4.376-3.631-8-8.008-8C3.624 0 0 3.624 0 8c0 4.369 3.631 8 8 8zm-.878-4.165c-.267 0-.487-.11-.69-.384l-1.97-2.416a.852.852 0 01-.187-.51c0-.352.274-.643.627-.643.227 0 .4.07.596.33l1.592 2.055 3.35-5.38c.148-.236.352-.362.556-.362.345 0 .667.236.667.604 0 .173-.102.353-.196.518L7.78 11.451c-.164.259-.392.384-.658.384z",fill:"inherit"}))},h=n(1212),m=n(1340),g=n(1467);const v=18,y=v+10;var b;function w(e){let{ariaLabel:t,ariaHasPopup:n,checkedAsset:i,children:o,checkable:s,exclusiveCheckable:c,checked:u,disabled:l,destructive:d,className:p,id:h,_highlightType:m,_isHighlighted:v,_isChosen:y,containerRole:b,hidden:w}=e,S="menuitem";s&&(S="menuitemcheckbox"),c&&(S="menuitemradio"),"listbox"===b&&(S="option");const C=Object(g.a)(o);return r.createElement("ui-menu-item",{role:S,id:h,"aria-checked":s||c?u?"true":"false":void 0,"aria-disabled":!!l||void 0,"aria-selected":v,"aria-label":t,"aria-haspopup":n,"aria-hidden":w,tabindex:v&&!l?0:-1,class:a()(p,v?`is-highlighted ${m}`:void 0,{"is-chosen":y,"contains-icon":C,destructive:d})},u?i||r.createElement(f,{"aria-hidden":"true"}):void 0,o)}function S(e){let{href:t,target:n,rel:i,preventLinkNavigation:o,children:s,ariaLabel:c,disabled:u,className:l,id:d,_highlightType:p,_isHighlighted:f,_isChosen:h}=e;const m=Object(g.a)(s);return r.createElement("a",{role:"menuitem",id:d,href:t,target:n,rel:i,"aria-disabled":!!u||void 0,"aria-label":c,tabIndex:f&&!u?0:-1,onClick:o?e=>{e.preventDefault()}:void 0,className:a()(l,f?`is-highlighted ${p}`:void 0,{"is-chosen":h,"contains-icon":m})},s)}function C(e){let{className:t}=e;return r.createElement("ui-menu-divider",{"aria-hidden":"true",class:t})}!function(e){e.Discrete="DISCRETE",e.Continuous="CONTINUOUS"}(b||(b={}));const _=r.forwardRef((function(e,t){let{directionCSSClassName:n,hoverStart:i,hoverEnd:o}=e;return r.createElement("ui-menu-scroller",{ref:t,class:n,onMouseOver:i,onMouseLeave:o,onFocus:()=>{},"aria-hidden":"true"})})),O=r.forwardRef(((e,t)=>{var n,i;!function(e){const t=new Set;let n=!1;r.Children.forEach(e,(e=>{if(k(e)){const{value:r,initialHighlighted:i}=e.props;if(void 0===r)throw new Error("`UIMenuItem` must have a value, which may not be `undefined`.");if(t.has(r))throw new Error(`Two UIMenuItems in one UIMenu may not have the same value (${r}).`);if(t.add(e.props.value),i){if(n)throw new Error("You can only specify `initialHighlighted` on one UIMenuItem per menu.");n=!0}}}))}(e.children);const[o,u]=r.useState((()=>{let t=-1;return r.Children.forEach(e.children,((n,r)=>{(k(n)||D(n))&&!e.highlightedIndex&&n.props.initialHighlighted&&(t=r)})),t})),d="number"===typeof e.highlightedIndex?e.highlightedIndex:o,[p,f]=r.useState(null!==(n=e.initialHighlightType)&&void 0!==n?n:null),[g,v]=r.useState(void 0),[O,N]=r.useState(-1),x=(r.Children.toArray(e.children).filter((e=>!!e)).map(((t,n)=>{var i;const o=(k(t)||D(t))&&t.key||n;if(k(t))return r.createElement(w,Object.assign({},t.props,{key:o,_isHighlighted:n===d,_highlightType:p,_isChosen:t.props.value===g,containerRole:null!==(i=e.role)&&void 0!==i?i:"menu"}));if(D(t)){if("listbox"===e.role)throw new Error("Unexpected child of menu. Cannot render link items when the role is listbox");return r.createElement(S,Object.assign({},t.props,{key:o,_isHighlighted:n===d,_highlightType:p,_isChosen:t.props.value===g}))}if(M(t))return r.createElement(C,Object.assign({},t.props,{key:o}));if(t)throw new Error(`Unexpected child of menu. Got ${Object(s.a)(t)}, expected UIMenuItem or UIMenuDivider.`)}))||[]).filter(Boolean),L=Object(h.b)(),j=e.scrollMode||(L?b.Continuous:b.Discrete),U=r.useRef(null),[F,z]=function(e){const t=Object(c.a)(),n=r.useRef(void 0!==e?Math.max(0,e):void 0);void 0===n.current&&e!==n.current&&(n.current=Math.max(0,e||0));return[n.current||0,r.useCallback((e=>{n.current=e,t()}),[t])]}(e.initialScrollOffset),[B,K]=r.useState(0),H=e.frame,W=void 0!==e.initialScrollOffset?e.initialScrollOffset:j===b.Discrete?0:void 0;let q,V,$,G,Z=!1,Q=!1;void 0!==H&&(q=H.top,V=H.left,P(H)&&($=H.width,G=H.height,U.current&&void 0!==W&&(W>0?(q=H.top,G=Math.min(U.current.scrollHeight-W+B,H.height),Z=G<H.height):W<0&&(q=H.top-W-B,G=Math.min(H.height+W+B,H.height),Q=q>H.top))));let Y=!1,J=!1;if(U.current&&void 0!==G){Y=F>0;const e=U.current.scrollHeight;J=F+G<e}const X=r.useRef(0);function ee(t,n){if(u(t),f(n),e.onItemHighlighted)if(t>-1){const n=x[t];n&&e.onItemHighlighted(n.props.value,t)}else e.onItemHighlighted(void 0,-1)}function te(t){if(void 0===g&&t>-1){const n=x[t];if(n){const r=n.props.value;v(r),N(t),e.onItemSelectedSync&&e.onItemSelectedSync(r,t)}}}function ne(e){const t=x[e];return k(t)||D(t)&&!0===t.props.preventLinkNavigation}function re(e,t){if(H&&P(H)&&U.current&&void 0!==W){let n=0;if(Z?n=H.height-(U.current.scrollHeight-W):Q&&Q&&(n=-W),t===E.Down&&Q){const t=B+e-F;t<n?K(t):(K(n),H.height<U.current.scrollHeight&&z(F+(t-n)))}else if(t===E.Up&&Z){const t=B+Math.abs(e-F);t<n?(K(t),z(e)):(K(n),H.height<U.current.scrollHeight&&z(F+(t-n)))}else z(e)}}function ie(e){if(null!==U.current&&void 0!==G){const t=U.current.children;let n=null;if(e===E.Up)for(let e=0;e<t.length;e++){const r=t[e];if(r.offsetTop+r.offsetHeight>F)return null!=n?n.offsetHeight:null;n=r}else for(let e=t.length-1;e>=0;e--){const r=t[e];if(r.offsetTop<F+G)return null!=n?n.offsetHeight:null;n=r}}return null}const oe=r.useRef(null);function ae(e,t){if(U.current){const n=ie(t);let r;r=null!=n&&t===E.Up?F-n:null!=n&&t===E.Down?F+n:e,re(I(U.current,r),t)}}const se=r.useRef(ae);se.current=ae;const ce=r.useRef(null);let ue=r.useRef("");const le=r.useRef(null);function de(e){le.current&&clearTimeout(le.current),ue.current+=e;const t=function(e,t){var n,r,i;if(!e||!t)return-1;function o(e){return"number"===typeof e&&(e=String(e)),e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():e.toLowerCase()}for(let a=0;a<t.length;a++){const s=t[a],c=null===(n=null===s||void 0===s?void 0:s.props)||void 0===n?void 0:n.children;if(null===(r=null===s||void 0===s?void 0:s.props)||void 0===r?void 0:r.typeAheadTextValue){if(!s.props.disabled&&o(null===(i=null===s||void 0===s?void 0:s.props)||void 0===i?void 0:i.typeAheadTextValue).startsWith(o(e)))return a}else if(("string"===typeof c||"number"===typeof c)&&(k(s)||D(s))&&!s.props.disabled&&o(c).startsWith(o(e)))return a}return-1}(ue.current,x);-1!==t&&t!==o&&fe(t,t>o?E.Down:E.Up),le.current=setTimeout((()=>{ue.current=""}),500)}function pe(e,t){if(U.current){let n,r;t?(n=e===E.Down?x.length:-1,r=-e):(n=-1===d&&e===E.Up?x.length:d,r=e);const i=function(e,t,n){let r,i;n===E.Up?(r=t-1,i=0):(r=t+1,i=e.length-1);for(let o=r;o*n<=i*n;o+=n){const t=e[o];if(t&&(k(t)||D(t))&&!t.props.disabled&&!t.props.hidden)return o}return t}(x,n,r);fe(i,e)}}function fe(t,n){var r;if(null===(r=null===U||void 0===U?void 0:U.current)||void 0===r?void 0:r.children){const r=U.current.children[t];if(!r)return;if(!0!==e.dontManageFocus&&(ce.current=r),ee(t,"keyboard"),void 0!==G){let e;e=t===x.length-1?U.current.scrollHeight-G:0===t?0:I(U.current,function(e,t){if(U.current&&void 0!==G)if(t===E.Up){const t=Y?y:0,n=e.offsetTop-t;if(n<F)return n}else if(t===E.Down){const t=J?y:0,n=F+G,r=e.offsetTop+e.offsetHeight+t;if(r>n)return r-G}return F}(r,n)),re(e,n)}ge()}}r.useEffect((()=>()=>{clearTimeout(le.current)}),[]),r.useLayoutEffect((()=>{j===b.Discrete&&U.current&&(U.current.scrollTop=F+(Y?y:0)),!0!==e.dontManageFocus&&ce.current&&(ce.current.focus(),ce.current=null)}));const he=r.useRef(null),me=r.useRef(!1),ge=r.useCallback((()=>{const e=he.current;e&&window.clearTimeout(e),me.current=!0,he.current=setTimeout((()=>{me.current=!1}),200)}),[]);r.useLayoutEffect((()=>{ge()}),[ge]),r.useEffect((()=>{const e=U.current;if(e){const t=e=>{j===b.Discrete&&e.preventDefault()};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)}}),[j]);const ve=Object(c.a)();r.useEffect(ve,[ve]);const ye=r.useRef(null),be=r.useRef(null),we=r.useRef(null),Se=r.useRef(!1),Ce=()=>!1===Se.current||(we.current!==U.current.scrollTop||be.current!==U.current.getBoundingClientRect().top),_e=e.dontManageFocus?-1:-1===d?0:-1,Oe=Object(h.c)();return r.createElement("ui-menu",{id:e.id,"aria-label":e.ariaLabel,class:a()(Oe,m.a,e.variant||"standard",Y?"has-overflow-top":null,J?"has-overflow-bottom":null,e.className),ref:t,style:{position:H?"absolute":"relative",top:q,left:V,width:$,height:G},onMouseMove:e=>{ye.current={x:e.clientX,y:e.clientY}},onMouseUp:t=>{const n=t.target;e._unsafe_allowPointerPropagationForSproutCore||t.stopPropagation();const r=T(n);r&&te(R(r))},onMouseOver:e=>{if(me.current)return;const t=T(e.target);t?ee(R(t),"mouse"):ee(-1,null)},onMouseLeave:e=>{void 0===g&&ee(-1,null)},onTouchStart:e=>{if(null!==be.current?Se.current=!1:(be.current=U.current.getBoundingClientRect().top,we.current=U.current.scrollTop,Se.current=!0),me.current)return;const t=T(e.target);t?ee(R(t),"touch"):ee(-1,null)},onTouchMove:e=>{const t=Ce();if(t&&(Se.current=!1),me.current)return;const n=Object(l.a)(e);if(n){e.preventDefault();const r=T(n);r&&!t?ee(R(r),"touch"):ee(-1,null)}},onTouchEnd:t=>{const n=Ce();if(be.current=null,we.current=null,Se.current=!1,me.current)return;const r=Object(l.a)(t);if(r){if(d>-1&&ne(d)&&t.preventDefault(),e._unsafe_allowPointerPropagationForSproutCore||t.stopPropagation(),!0===n)return;const i=T(r);i?te(R(i)):ee(-1,null)}},onMouseDown:t=>{e.dontManageFocus&&t.preventDefault()},onFocus:e=>{const t=e.target;A(t)&&ee(R(t),null==p?"keyboard":p)},onKeyDown:e=>{switch(e.key){case"ArrowDown":e.preventDefault(),pe(E.Down,e.metaKey);break;case"ArrowUp":e.preventDefault(),pe(E.Up,e.metaKey);break;case"Home":e.preventDefault(),pe(E.Up,!0);break;case"End":e.preventDefault(),pe(E.Down,!0);break;case" ":ue.current.length>0?(e.preventDefault(),e.stopPropagation(),de(e.key)):d>-1&&(ne(d)&&e.preventDefault(),te(d));break;case"Enter":d>-1&&(ne(d)&&e.preventDefault(),te(d));break;case"Tab":e.preventDefault();break;case"Escape":break;default:return void(e.key&&1===e.key.length&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),de(e.key)))}},onAnimationEnd:t=>{void 0!==g&&(e.onItemSelected(g,O),v(void 0),N(-1),t.stopPropagation())},tabindex:_e},r.createElement(_,{directionCSSClassName:"top",hoverStart:()=>{oe.current=setInterval((()=>se.current(0,E.Up)),50)},hoverEnd:()=>{oe.current&&clearInterval(oe.current)}}),r.createElement("ui-menu-scroll-container",{role:null!==(i=e.role)&&void 0!==i?i:"menu",ref:U,style:{position:"relative"},onWheel:function(e){if(U.current&&j===b.Discrete&&void 0!==G){X.current+=e.deltaY;const t=X.current>0?E.Down:E.Up,n=ie(t);if(n&&t*X.current>=n/2){const e=I(U.current,F+n*t);for(;t*X.current>=n/2;)X.current-=n/2*t;re(e,t);const r=ye.current;if(r){const e=r.y+n*t,i=document.elementFromPoint(r.x,e);A(i)&&ee(R(i),"mouse")}}else if(null===n){X.current=0;let e=F;t===E.Up?e=0:t===E.Down&&(e=U.current.scrollHeight-G),re(e,t)}}}},x),r.createElement(_,{directionCSSClassName:"bottom",hoverStart:()=>{oe.current=setInterval((()=>{if(U.current){const e=U.current.scrollHeight-U.current.offsetHeight;se.current(e,E.Down)}}),50)},hoverEnd:()=>{oe.current&&clearInterval(oe.current)}}))}));var E;function I(e,t){return e?Math.max(Math.min(e.scrollHeight-e.offsetHeight,t),0):t}function A(e){return!!e&&("UI-MENU-ITEM"===e.tagName||"A"===e.tagName)&&"true"!==e.getAttribute("aria-disabled")}function T(e){if(!e.closest)return A(e)?e:(console.warn("To support UIMenuItems with child elements in IE11, add a 'closest' polyfill to your project."),null);const t=e.closest("[role=menuitem]")||e.closest("ui-menu-item");return t&&A(t)?t:null}function P(e){return"width"in e&&"height"in e}function R(e){return e&&e.parentElement?Array.prototype.slice.call(e.parentElement.children).indexOf(e):-1}function k(e){return Object(u.a)(e)&&e.type===w}function D(e){return Object(u.a)(e)&&e.type===S}function M(e){return Object(u.a)(e)&&e.type===C}function N(e){let t;return r.Children.forEach(e,((e,n)=>{!k(e)&&!D(e)||e.props.disabled||void 0!==t||(t=n)})),t}O.displayName="UIMenu",function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(E||(E={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=["styles"];function c(){return c=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},c.apply(null,arguments)}var u=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,s);return i.a.createElement("svg",c({className:n.icon||"icon",viewBox:"0 0 17.8 17.8"},r),i.a.createElement("g",{transform:"translate(0 -.002) scale(1.11244)"},i.a.createElement("path",{className:n["checkmark-fill"]||"checkmark-fill",d:"M7.029 12.257c-.301 0-.541-.117-.774-.428l-2.188-2.7a.973.973 0 01-.208-.572c0-.404.305-.724.7-.724.248 0 .445.079.656.369l1.776 2.302 3.733-6.019c.168-.273.395-.411.629-.411.38 0 .739.26.739.676 0 .195-.114.402-.219.577L7.76 11.829c-.177.291-.427.428-.731.428z",fill:"#fff"}),i.a.createElement("path",{className:n["checkmark-square-fill"]||"checkmark-square-fill",d:"M10.231 0c2.006 0 2.734.209 3.467.601a4.089 4.089 0 011.701 1.701c.392.733.601 1.46.601 3.467v4.462c0 2.006-.209 2.734-.601 3.467a4.089 4.089 0 01-1.701 1.701c-.733.392-1.46.601-3.467.601H5.77c-2.006 0-2.734-.209-3.467-.601a4.089 4.089 0 01-1.701-1.701C.209 12.965 0 12.238 0 10.23V5.77c0-2.006.209-2.734.601-3.467A4.089 4.089 0 012.302.601C3.035.209 3.762 0 5.77 0h4.462zm1.102 4.137c-.235 0-.46.139-.626.4l-3.71 5.962-1.765-2.277c-.217-.287-.409-.365-.652-.365-.4 0-.704.321-.704.712 0 .2.078.391.209.565l2.181 2.677c.226.304.47.426.765.426.295 0 .547-.14.73-.426l4.085-6.431c.113-.183.217-.383.217-.574 0-.408-.356-.67-.73-.67z"}),i.a.createElement("path",{className:n["minus-fill"]||"minus-fill",d:"M4.366 8.855c-.525 0-.887-.301-.887-.838-.001-.552.341-.864.887-.864h7.272c.547 0 .887.312.887.864 0 .537-.362.838-.887.838H4.366z",fill:"#fff"}),i.a.createElement("path",{className:n["minus-square-fill"]||"minus-square-fill",d:"M10.231 0c2.006 0 2.734.209 3.467.601a4.089 4.089 0 011.701 1.701c.392.733.601 1.46.601 3.467v4.462c0 2.006-.209 2.734-.601 3.467a4.089 4.089 0 01-1.701 1.701c-.733.392-1.46.601-3.467.601H5.77c-2.006 0-2.734-.209-3.467-.601a4.089 4.089 0 01-1.701-1.701C.209 12.965 0 12.238 0 10.23V5.77c0-2.006.209-2.734.601-3.467A4.089 4.089 0 012.302.601C3.035.209 3.762 0 5.77 0h4.462zm1.419 7.15h-7.3a.85.85 0 100 1.7h7.3a.85.85 0 000-1.7z"}),i.a.createElement("rect",{className:n.square||"square",x:".625",y:".625",width:"14.75",height:"14.75",rx:"4.5"})))},l=n(1221),d=n(1225),p=n(1212),f=n(1340),h=n(1467);const m=r.forwardRef((function(e,t){const{checked:n,defaultChecked:i,children:o,variant:s,inputId:c,id:m,name:g,form:v,value:y,disabled:b,required:w,onStateChange:S,style:C,tabIndex:_,tooltip:O,className:E,onInvalid:I,ariaLabel:A,indeterminate:T}=e;if(null!=n&&null==S){const e="You provided a 'checked' prop to a component without an associated change handler. This will render a read-only component. If the component should be mutable use 'defaultChecked'. Otherwise, provide an 'onStateChange' handler.";console.warn(e)}const P=r.useRef(null),[R,k]=r.useState(i||!1);r.useLayoutEffect((()=>{k(P.current.checked)})),r.useLayoutEffect((()=>{const e=P.current;e&&void 0!==T&&(e.indeterminate=T)}),[T]);const[D,M]=r.useState(!1),N=()=>{!0!==b&&M(!0)},x=()=>{!0!==b&&M(!1)},L=()=>{!0!==b&&P.current.click()},j=()=>{!0!==b&&M(!1)},U=Object(l.a)(m,{onActivationStart:N,onActivationEnd:x,onActivationComplete:L,onActivationCancel:j}),F=Object(p.c)(),z=Object(d.a)({active:D,disabled:b,className:a()(F,f.a,E,s||"standard",{labelled:o,"contains-icon":Object(h.a)(o)}),...e.hasOwnProperty("tabIndex")?{tabIndex:_}:{},onActivate:L,onActivationStart:N,onActivationEnd:x,onActivationCancel:j,variant:s});return r.createElement("ui-checkbox",Object.assign({},z,{id:m,style:C,title:O,role:"checkbox","aria-label":A,"aria-labelledby":A?void 0:U,"aria-required":w,"aria-checked":T?"mixed":R,ref:t}),r.createElement("input",{ref:P,id:c,type:"checkbox",checked:n,defaultChecked:i,"aria-hidden":!0,name:g,value:y||"on",disabled:b,required:w,form:v,tabIndex:-1,onInvalid:I,onChange:e=>{let t=e.target.checked;k(t),S&&S({checked:t,indeterminate:!1},["checked"])}}),e.checkboxAsset||r.createElement(u,null),r.createElement("label",null,o))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(870),i=n.n(r),o=n(1215),a=n.n(o),s=n(1487),c=n(1223),u=n(1491),l=n(1492),d=n(1486),p=["styles"];function f(){return f=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},f.apply(null,arguments)}var h=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,p);return i.a.createElement("svg",f({className:n.icon||"icon",viewBox:"0 0 16 16"},r),i.a.createElement("path",{className:n["circle-dot"]||"circle-dot",d:"M7.992 0C12.37 0 16 3.624 16 8c0 4.369-3.624 8-8 8-4.369 0-8-3.631-8-8 0-4.376 3.624-8 7.992-8zm.005 5C6.36 5 5 6.359 5 8c0 1.638 1.362 3 3 3 1.641 0 3-1.362 3-3 0-1.641-1.362-3-3.003-3z"}),i.a.createElement("path",{className:n["circle-empty"]||"circle-empty",d:"M8 16c4.376 0 8-3.631 8-8 0-4.376-3.631-8-8.008-8C3.624 0 0 3.624 0 8c0 4.369 3.631 8 8 8zm0-1.333A6.634 6.634 0 011.341 8a6.628 6.628 0 016.651-6.667A6.653 6.653 0 0114.667 8 6.636 6.636 0 018 14.667z"}),i.a.createElement("path",{className:n["circle-fill"]||"circle-fill",d:"M8.006 11.001c1.64 0 3.01-1.364 3.01-2.999s-1.37-3.001-3.015-3.001c-1.64 0-3.003 1.366-3.003 3.001 0 1.635 1.369 2.999 3.008 2.999z"}))},m=n(1225),g=n(1212),v=n(1340),y=n(1467);class b extends d.a{constructor(e){super(e),this.onActivate=()=>{this.inputRef.current.click()},this.onInputChange=e=>{const{checked:t}=e.currentTarget;this.toggleOn((()=>({checked:t}))),this.props.onChange&&this.props.onChange(e)},this.inputRef=r.createRef(),this.radioButtonRef=r.createRef(),this.validateAllControllableProps=()=>{void 0===this.props.checked||null==this.context||this.context.hasOnStateChangeHandler||this.props.onChange||console.warn("You're controlling a UIRadioButton by passing the 'checked' but you're not passing a callback to it or the UIRadioGroup surrounding that component, making the radio button read-only which is probably not what you want. If you meant to set a default value on the radio button, use the 'defaultChecked' prop.")},this.toggleOn=e=>{const{checked:t}=this.computeApparentState();if(!t&&(Object(s.a)(this,[{controlledKey:"checked",uncontrolledKey:"defaultChecked",callbackKeys:[]}],e),null!=this.context)){const{value:e}=this.propsPlusContextStuff();this.context.notifyChangeToUIRadioGroup(this.internalId,e)}},this.computeApparentState=()=>null!=this.props.checked?{...this.state,checked:this.props.checked}:null!=this.context&&null!=this.context.checkedRadioButton?{...this.state,checked:this.context.checkedRadioButton===this.internalId}:this.state,this.propsPlusContextStuff=()=>{var e;const t=this.context,n={...this.props,form:void 0,required:void 0,variant:Object(u.a)(this.props.variant,"standard")};return null==t?n:{...n,name:null!==(e=t.name)&&void 0!==e?e:n.name,form:t.form,required:Object(u.a)(n.required,t.required),disabled:Object(u.a)(t.disabled,n.disabled)}},this.onLabelId=e=>{this.setState({labelId:e})},this.onActivationStart=()=>{const{disabled:e}=this.propsPlusContextStuff();!0!==e&&this.setState({active:!0})},this.onActivationEnd=()=>{const{disabled:e}=this.propsPlusContextStuff();!0!==e&&this.setState({active:!1})},this.onActivationCancel=()=>{const{disabled:e}=this.propsPlusContextStuff();!0!==e&&this.setState({active:!1})};const t=void 0!==e.checked?e.checked:void 0!==e.defaultChecked&&e.defaultChecked;this.state={checked:t},this.internalId=Object(c.a)()}componentDidMount(){var e;super.componentDidMount(),this.validateAllControllableProps();const{checked:t}=this.computeApparentState();t&&(null===(e=this.context)||void 0===e||e.initialRadioButtonValue(this.internalId))}render(){this.validateAllControllableProps();const{checked:e,active:t,labelId:n}=this.computeApparentState(),i=this.propsPlusContextStuff(),{name:o,form:s,value:c,children:u,variant:l,inputId:d,required:p,disabled:f,id:b,style:w,className:S,tabIndex:C,onInvalid:_,radioButtonAsset:O,ariaLabel:E,tooltip:I}=i,A=Object(m.a)({active:t,disabled:f,className:a()(S,{labelled:u,"contains-icon":Object(y.a)(u)}),...i.hasOwnProperty("tabIndex")?{tabIndex:C}:{},onActivate:this.onActivate,onActivationStart:this.onActivationStart,onActivationEnd:this.onActivationEnd,onActivationCancel:this.onActivationCancel,variant:l});return r.createElement(g.a,{render:(t,i)=>{var l,m,g,y;A.class=a()(A.class,i,v.a);const S=this.radioButtonRef.current===(null===(m=null===(l=this.radioButtonRef.current)||void 0===l?void 0:l.closest("ui-radio-group"))||void 0===m?void 0:m.querySelector("ui-radio-button")),T=(null===(g=this.context)||void 0===g?void 0:g.checkedRadioButton)===this.internalId||void 0===(null===(y=this.context)||void 0===y?void 0:y.checkedRadioButton)&&S?null!==C&&void 0!==C?C:0:-1;return r.createElement("ui-radio-button",Object.assign({},A,{ref:this.radioButtonRef,id:b,style:w,role:"radio","aria-label":E,"aria-labelledby":E?void 0:n,"aria-required":p,"aria-checked":e,title:I,tabindex:T}),r.createElement("input",{type:"radio",ref:this.inputRef,id:d,tabIndex:-1,checked:e,name:o,value:c,disabled:f,form:s,"aria-hidden":!0,required:p,onChange:this.onInputChange,onInvalid:_}),O||r.createElement(h,null),r.createElement("label",null,u))}})}onActivationComplete(){const{disabled:e}=this.propsPlusContextStuff();!0!==e&&this.inputRef.current.click()}}b.contextType=l.b},function(e,t,n){"use strict";n.d(t,"c",(function(){return N})),n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return L}));var r=n(1217);function i(e,t,n,i,o,a){if(w(e,t,o))return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const[s,c]=y(e,t,n,i,o,a);if(void 0===s||!o&&void 0===c)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};let u={left:s.left,right:s.right,width:s.width,top:0,height:0,bottom:0};if(!o&&t&&c){const o=h(n.top+n.height,i),a=d(o+t.height,i),s=d(a+e.height,i)-a;return u.top=a,u.height=s,u.bottom=v(a,s,i),{contentRect:u,arrowRect:{left:c.left,right:c.right,width:c.width,top:o,height:t.height,bottom:v(o,t.height,i)},arrowDirection:r.a.Up}}{const t=d(n.top+n.height,i),o=d(t+e.height,i)-t;return u.top=t,u.height=o,u.bottom=v(t,o,i),{contentRect:u,arrowRect:void 0,arrowDirection:r.a.None,transformOrigin:[S(u.width,n.width,a),0]}}}function o(e,t,n,i,o,a){if(w(e,t,o))return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const[s,c]=y(e,t,n,i,o,a);if(void 0===s||!o&&void 0===c)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};let u={left:s.left,right:s.right,width:s.width,top:0,height:0,bottom:0};if(!o&&t&&c){const o=h(n.top,i),a=l(o-t.height,i),s=a,d=l(s-e.height,i),p=s-d;return u.top=d,u.height=p,u.bottom=v(d,p,i),{contentRect:u,arrowRect:{left:c.left,right:c.right,width:c.width,top:a,height:t.height,bottom:v(a,t.height,i)},arrowDirection:r.a.Down}}{const t=l(n.top,i),o=l(t-e.height,i),s=t-o;return u.top=o,u.height=s,u.bottom=v(o,s,i),{contentRect:u,arrowRect:void 0,arrowDirection:r.a.None,transformOrigin:[S(u.width,n.width,a),u.height]}}}function a(e,t,n,i,o,a){if(w(e,t,o))return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const[s,c]=b(e,t,n,i,o,a);if(void 0===s||!o&&void 0===c)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};let u={top:s.top,bottom:s.bottom,height:s.height,left:0,width:0,right:0};if(!o&&t&&c){const o=m(n.left,i),a=p(o-t.height,i),s=a,l=p(s-e.width,i),d=s-l;return u.left=l,u.width=d,u.right=g(l,d,i),{contentRect:u,arrowRect:{top:c.top,bottom:c.bottom,height:c.height,left:a,width:t.width,right:g(a,t.width,i)},arrowDirection:r.a.Right}}{const t=p(n.left,i),o=p(t-e.width,i),s=t-o;return u.left=o,u.width=s,u.right=g(o,s,i),{contentRect:u,arrowRect:void 0,arrowDirection:r.a.None,transformOrigin:[u.width,S(u.height,n.height,a)]}}}function s(e,t,n,i,o,a){if(w(e,t,o))return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const[s,c]=b(e,t,n,i,o,a);if(void 0===s||void 0===c&&!o)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};let u={top:s.top,bottom:s.bottom,height:s.height,left:0,width:0,right:0};if(!o&&t&&c){const o=m(n.left+n.width,i),a=f(o+t.height,i),s=f(a+e.width,i)-a;return u.left=a,u.width=s,u.right=g(a,s,i),{contentRect:u,arrowRect:{top:c.top,bottom:c.bottom,height:c.height,left:o,width:t.width,right:g(o,t.width,i)},arrowDirection:r.a.Left}}const l=f(n.left+n.width,i),d=f(l+e.width,i)-l;return u.left=l,u.width=d,u.right=g(l,d,i),{contentRect:u,arrowRect:void 0,arrowDirection:r.a.None,transformOrigin:[0,S(u.height,n.height,a)]}}const c=(e,t,n,i)=>{if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const o=m(i.left+i.width/2-e.width/2,i),a=f(o+e.width,i)-o,s=m(i.top+i.height/2-e.height/2,i),c=d(s+e.height,i)-s;return{contentRect:{top:s,left:o,right:g(o,a,i),bottom:v(s,c,i),width:a,height:c},arrowRect:{top:0,left:0,right:g(0,t.width,i),bottom:v(0,t.height,i),width:t.width,height:t.height},arrowDirection:r.a.None}},u=4,l=(e,t)=>Math.max(e,t.top),d=(e,t)=>Math.min(e,t.top+t.height),p=(e,t)=>Math.max(e,t.left),f=(e,t)=>Math.min(e,t.left+t.width),h=(e,t)=>d(l(e,t),t),m=(e,t)=>f(p(e,t),t),g=(e,t,n)=>n.left+n.right+n.width-(e+t),v=(e,t,n)=>n.top+n.bottom+n.height-(e+t);function y(e,t,n,r,i,o){if(!i&&(null===o||void 0===o?void 0:o.includes("corner")))return[void 0,void 0];const a=m(n.left+(()=>{switch(o){case"left corner":return 0;case"right corner":return n.width;default:return n.width/2}})(),r);let s=p(a-(()=>{switch(o){case"left":return n.width/2;case"left corner":return e.width;case"right":return e.width-n.width/2;case"right corner":return 0;default:return e.width/2}})(),r);const c=f(s+e.width,r);c-s<e.width&&(s=p(c-e.width,r));const l=c-s,d={left:s,right:g(s,l,r),width:l};if(!i&&t){let e=a-t.width/2;e+t.width>c&&(e=c-t.width),e<s&&(e=s);const i=e+t.width/2;return i-u<n.left||i+u>n.left+n.width?[void 0,void 0]:[d,{width:t.width,left:e,right:g(e,t.width,r)}]}return[d,void 0]}function b(e,t,n,r,i,o){const a=h(n.top+n.height/2,r);let s=l(a-(()=>{switch(o){case"top":return n.height/2;case"bottom":return e.height-n.height/2;default:return e.height/2}})(),r);const c=d(s+e.height,r);c-s<e.height&&(s=l(c-e.height,r));const p=c-s,f={top:s,bottom:v(s,p,r),height:p};if(!i&&t){let e=a-t.width/2;e+t.width>c&&(e=c-t.width),e<s&&(e=s);const i=e+t.width/2;return i-u<n.top||i+u>n.top+n.height?[void 0,void 0]:[f,{height:t.height,top:e,bottom:v(e,t.height,r)}]}return[f,void 0]}const w=(e,t,n)=>void 0===e||void 0===t&&!n,S=(e,t,n)=>{let r=e/2;return"right"===n||"bottom"===n?r=e-t/2:"left"===n||"top"===n?r=t/2:"left corner"===n?r=e:"right corner"===n&&(r=0),r};function C(e,t,n,r,o){return i(e,t,n,r,o,"left")}function _(e,t,n,r,o){return i(e,t,n,r,o,"right")}function O(e,t,n,r,o){return i(e,t,n,r,o,"left corner")}function E(e,t,n,r,o){return i(e,t,n,r,o,"right corner")}function I(e,t,n,r,i){return o(e,t,n,r,i,"left")}function A(e,t,n,r,i){return o(e,t,n,r,i,"right")}function T(e,t,n,r,i){return o(e,t,n,r,i,"left corner")}function P(e,t,n,r,i){return o(e,t,n,r,i,"right corner")}function R(e,t,n,r,i){return a(e,t,n,r,i,"top")}function k(e,t,n,r,i){return a(e,t,n,r,i,"bottom")}function D(e,t,n,r,i){return s(e,t,n,r,i,"top")}function M(e,t,n,r,i){return s(e,t,n,r,i,"bottom")}const N={sidePreference:[o,i,s,a],inset:{left:7,right:7,top:7,bottom:7},anchorMargin:4};function x(e){const t=(n=e.sidePreference,(e,t,i,o,a,s)=>{if(0===n.length)return{contentRect:void 0,arrowRect:void 0,arrowDirection:r.a.None};const u=new Array(n.length);for(let r=0;r<n.length;r++){const c=(0,n[r])(e,t,i,o,a,s);if(u[r]=c,void 0!==c.contentRect&&(!a&&void 0!==c.arrowRect||a)&&e&&e.width===c.contentRect.width&&e.height===c.contentRect.height)return c}let l=u[0],d=l.contentRect?l.contentRect.width*l.contentRect.height:0;for(let n=1;n<u.length;n++){const e=u[n],t=e.contentRect?e.contentRect.width*e.contentRect.height:0;t>d&&(d=t,l=e)}return 0===d?c(e,t,i,o):l});var n;return(n,r,i,o,a,s)=>t(n,r,j(i,function(e){if("number"===typeof e)return-e;const t={...e};let n;for(n in t){const e=t[n];"number"===typeof e&&(t[n]=-e)}return t}(e.anchorMargin)),j(o,e.inset),a,s)}const L={left:a,leftTop:R,leftBottom:k,right:s,rightTop:D,rightBottom:M,inlineStart:function(e,t,n,r,i,o){return"rtl"===o?s(e,t,n,r,i):a(e,t,n,r,i)},inlineStartTop:function(e,t,n,r,i,o){return"rtl"===o?D(e,t,n,r,i):R(e,t,n,r,i)},inlineStartBottom:function(e,t,n,r,i,o){return"rtl"===o?M(e,t,n,r,i):k(e,t,n,r,i)},inlineEnd:function(e,t,n,r,i,o){return"rtl"===o?a(e,t,n,r,i):s(e,t,n,r,i)},inlineEndTop:function(e,t,n,r,i,o){return"rtl"===o?R(e,t,n,r,i):D(e,t,n,r,i)},inlineEndBottom:function(e,t,n,r,i,o){return"rtl"===o?k(e,t,n,r,i):M(e,t,n,r,i)},above:o,top:o,topLeft:I,topRight:A,topLeftCorner:T,topRightCorner:P,topInlineStart:function(e,t,n,r,i,o){return"rtl"===o?A(e,t,n,r,i):I(e,t,n,r,i)},topInlineEnd:function(e,t,n,r,i,o){return"rtl"===o?I(e,t,n,r,i):A(e,t,n,r,i)},topInlineStartCorner:function(e,t,n,r,i,o){return"rtl"===o?P(e,t,n,r,i):T(e,t,n,r,i)},topInlineEndCorner:function(e,t,n,r,i,o){return"rtl"===o?T(e,t,n,r,i):P(e,t,n,r,i)},below:i,bottom:i,bottomLeft:C,bottomRight:_,bottomLeftCorner:O,bottomRightCorner:E,bottomInlineStart:function(e,t,n,r,i,o){return"rtl"===o?_(e,t,n,r,i):C(e,t,n,r,i)},bottomInlineEnd:function(e,t,n,r,i,o){return"rtl"===o?C(e,t,n,r,i):_(e,t,n,r,i)},bottomInlineStartCorner:function(e,t,n,r,i,o){return"rtl"===o?E(e,t,n,r,i):O(e,t,n,r,i)},bottomInlineEndCorner:function(e,t,n,r,i,o){return"rtl"===o?O(e,t,n,r,i):E(e,t,n,r,i)}};function j(e,t){let n,r,i,o;return"number"===typeof t?n=r=i=o=t:(n=t.left||0,r=t.right||0,i=t.top||0,o=t.bottom||0),{width:e.width-n-r,height:e.height-i-o,left:e.left+n,right:e.right+r,top:e.top+i,bottom:e.bottom+o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(870),i=n(2264),o=n(1464),a=n(2249),s=n(966),c=n(1466),u=n(2313);const l="create-account-widget-container",d="failed to load create account widget loader script",p="invalid widget key provided in config.",f="init timeout";function h(e){let{onError:t,onCancelled:n,onCompleted:i,accountName:h,appContext:m,colorScheme:g="auto",features:v}=e;const y=r.useRef(!1),[b,w]=r.useState(!1),S=r.useRef(void 0);return r.useEffect((()=>{(async e=>{if(y.current)return;const{accountCreateUrl:r}=await Object(c.a)(),b=a.b(r),C=b.searchParams.get("widgetKey")||b.searchParams.get("client_id");if(!C)return void t(p);const _={widgetVersion:"3",serviceKey:C,serviceURL:b.origin,containerId:l,features:{showHeader:!0,showApple:!0,showIntro:null===(e=null===v||void 0===v?void 0:v.showIntro)||void 0===e||e,colorScheme:g},callbacks:{ready(){S.current&&(clearTimeout(S.current),S.current=void 0)},exit:()=>{n()},completed:e=>{i(e),Object(s.a)().onCreateAccountCompleted(e)},failed:e=>{let{reason:n}=e;S.current&&(clearTimeout(S.current),S.current=void 0),t(),Object(s.a)().onCreateAccountFailed(n)}},appContext:m||"icloud",frameTitle:Object(u.a)("AuthService.CreateAccountWidget.Title")};h&&(_.account={name:h,person:{name:{}}});try{S.current=setTimeout((()=>{t(f),S.current=void 0}),45e3),Object(o.init)(_),y.current=!0}catch(O){return t(d),void w(!0)}})()}),[t,n,i,g,null===v||void 0===v?void 0:v.showIntro,h,m]),b?null:r.createElement("div",{id:l,style:{inlineSize:"100%",blockSize:"100%",overflow:"hidden"}})}function m(){const[e,t]=Object(i.b)();return n=>{const{onCancelled:i,onCompleted:o,onError:a,colorScheme:s,features:c,accountName:u,appContext:l}=n;e(r.createElement(h,{colorScheme:s,onCancelled:()=>{t(),null===i||void 0===i||i()},onCompleted:e=>{t(),null===o||void 0===o||o(e)},onError:e=>{t(),null===a||void 0===a||a(e)},features:c,accountName:u,appContext:l}),{includeCloseButton:!1,className:"create-account-widget-modal",appearance:"dark"===s||"light"===s?s:void 0})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"d",(function(){return v}));var r=n(870),i=n(2132),o=n(1347),a=n(1348),s=n(1470),c=n(1260),u=function(e){return Object(r.createElement)(c.a,{originalProps:e,metadata:{name:"questionmark.circle.ar",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM59.4238-25.1465C61.9629-25.1465 63.3301-26.4648 63.3301-29.0039L63.3301-29.6387C63.3301-34.4238 60.6934-37.0117 57.2266-39.4531C52.9297-42.4316 50.8789-44.043 50.8789-47.3633C50.8789-51.0742 53.7598-53.6133 58.252-53.6133C61.4746-53.6133 63.8672-52.002 65.4297-49.3164C67.041-47.4609 67.4805-45.9961 70.2148-45.9961C71.875-45.9961 73.584-47.168 73.584-49.3652C73.584-50.1465 73.4375-50.9766 73.1934-51.7578C71.8262-56.25 66.3086-60.2539 57.9102-60.2539C49.6094-60.2539 42.3828-55.8594 42.3828-47.7539C42.3828-41.8945 45.752-39.0625 50.4883-35.9375C53.9062-33.6914 55.5176-31.9336 55.5176-29.1992L55.5176-28.6133C55.5176-26.709 56.9824-25.1465 59.4238-25.1465ZM59.5703-10.5957C62.3535-10.5957 64.7949-12.8906 64.7949-15.6738C64.7949-18.457 62.4023-20.752 59.5703-20.752C56.6895-20.752 54.2969-18.5059 54.2969-15.6738C54.2969-12.8418 56.7383-10.5957 59.5703-10.5957Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},l=n(878),d=n(926);const p=e=>r.createElement("div",{className:"cloudos-menu-item",role:"presentation"},e.startIcon,r.createElement("div",{className:"label",role:"presentation"},e.children),e.endIcon),f=e=>r.createElement("div",{className:"cloudos-menu-item cloudos-menu-item-link"},e.startIcon,r.createElement("div",{className:"label","aria-hidden":"true"},e.children,r.createElement(v,null)),e.endIcon);function h(){const e=Object(l.b)(),t="rtl"===Object(d.b)()&&"iw-il"!==e;return r.createElement(m,{symbol:t?u:s.a})}function m(e){let{symbol:t}=e;return r.createElement(t,{"aria-hidden":!0,className:"symbol-icon",desiredFontSize:10})}function g(e){var t;return r.createElement(i.a,{applicationIdentifier:e.applicationIdentifier,iconSize:null!==(t=e.iconSize)&&void 0!==t?t:18})}function v(){const e="rtl"===Object(d.b)()?o.a:a.a;return r.createElement(e,{className:"cloudos-menu-item-opens-in-new-tab",desiredFontSize:9,"aria-hidden":"true"})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(2217),i=n(1011),o=n(1030),a=n(1034),s=n(2173);const c=[30,60,300,1800,3600];var u=n(2185),l=n(1032);const d=()=>{};class p{reset(){const e=this.rtc?"Reset":"Set up";this.logger.info`${Object(r.c)(e).constant()} metrics logger`,this.rtc=void 0,this.enqueuedMetrics=[],this.dedupCaches={[u.a.PerSession]:{},[u.a.PerSegment]:{},[u.a.PerCall]:{}},this.endReason=void 0}constructor(e){this.logger=e,this.cid=null,this.callStart=0,this.joinTime=0,this.endTime=0,this.enqueuedMetrics=null,this.dedupCaches=null,this.hasLoggedEndReason=!1,this.syslogMetricsPayload=(e,t)=>{const n={_method:t};for(const r in e)"_sessionID"!==r&&r.startsWith("_")||(n[r]=e[r]);this.logger.info`${Object(r.c)(JSON.stringify(n)).notPII().forCertain()}`},this.reset()}async init(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.RTCReportingAgent.withSamplingUUID.bind(o.RTCReportingAgent);if(this.endTime=0,this.joinTime=Date.now(),n){this.callStart=n.getTime();const e=(Date.now()-this.callStart)/1e3;this.logger.info`Joined ${Object(a.a)(e.toFixed(1))}s into call started at ${Object(a.a)(n.toString())}`}for(this.cid=t||String(Object(s.a)()),this.rtc=await r(this.cid,this.config=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"prod";const{buildNumber:r}=globalThis.__CW_BUILD_INFO,i={webBuild:r,CID:e};return void 0!==t&&(i.listedBrowser=t),{[o.RTCReportingAgentConfigKeys.StorebagURL]:"https://mediaservices.cdn-apple.com/store_bags/ft/v1/rtc_storebag.json",[o.RTCReportingAgentConfigKeys.Sender]:"WEBRTC",[o.RTCReportingAgentConfigKeys.ClientName]:"web",[o.RTCReportingAgentConfigKeys.ServiceName]:`${n}`,[o.RTCReportingAgentConfigKeys.ApplicationName]:"<TODO: fill me in>",[o.RTCReportingAgentConfigKeys.DeviceName]:"",[o.RTCReportingAgentConfigKeys.UserInfoDict]:i}}(this.cid,this.listedBrowser),d);e=this.enqueuedMetrics.shift();)this.log(e)}getAbsoluteTimestampedPayloads(e,t,n){const r=e.encode(t);if(null===r)return;const i={_time:n};return(o=r,Array.isArray(o)?o:[o]).map((e=>Object.assign(e,i)));var o}getRelativeTimestampedPayloads(e,t){const n=[];for(const r of e){const{_time:e,...i}=r;if(t){const r={secondsIntoCall:(e-t)/1e3};n.push(Object.assign(i,r))}else n.push(i)}return n}log(e){var t;const{rtc:n}=this,r=Date.now();if(e.timestampedPayloads||(e.timestampedPayloads=this.getAbsoluteTimestampedPayloads(e,this.callStart,r)),!n)return void this.enqueuedMetrics.push(e);let i=!1;const s=null!==(t=e.type)&&void 0!==t?t:o.RTCReportingAgentEventTypes.BatchEvent,l=e.method||u.a.PerSession,{timestampedPayloads:d}=e,p=d&&this.getRelativeTimestampedPayloads(d,this.callStart);if(p&&e.dedupe)for(const o of p){const e=Object.keys(o).filter((e=>"secondsIntoCall"!==e)).sort(),t=e.join("&"),n=e.map((e=>o[e])).join("&");i=this.dedupCaches[l][t]===n,i||(this.dedupCaches[l][t]=n)}const{hasLoggedEndReason:f}=this,h=null===p||void 0===p?void 0:p[0];if(e instanceof u.b&&h)if(f)i=!0;else{this.endTime=r,this.endReason=e;const{joinTime:t}=this,n=t&&(r-t)/1e3,i=function(e){var t;return e<=10?Math.floor(e):null!==(t=c.find((t=>e<=t)))&&void 0!==t?t:1e4}(n);h.bucketedDuration=i,this.logger.info`Clocked ${Object(a.a)(n.toFixed(1))}s on call, bucketed as ${Object(a.a)(i)}s in metrics`}if(p&&!i){const e=this.syslogMetricsPayload;for(const t of p)n.issueReportingEvent(l,t,s,e)}}logTerminalError(e,t){this.logger.error`Logging terminal error ${Object(r.c)(l.b[e]).constant()}${t?i.b`: ${Object(a.d)(String(t))}`:""}`;const n=new u.b(e,void 0,t);return this.log(n),{metric:n,promise:(async()=>{await this.flush(),this.endSession()})()}}endSession(){var e;null===(e=this.rtc)||void 0===e||e.endSession()}async flush(){var e;this.rtc||await this.init(),null===(e=this.rtc)||void 0===e||null===(e=e.reporter)||void 0===e||e.flushAllEvents()}}const f=e=>new p(e.child`Metrics`().package`shared`.subsystem`metrics`.category`Reported`)},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,i,o,a=n(2176),s=n(1012),c=n(2217),u=n(1025),l=n(1021),d=n(2254),p=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},f=Object(c.c)("s").withClass(s.a.Const),h=Object(c.c)("ms").withClass(s.a.Const),m=n(2253);var g=new Map([[l.a.Error,"error"],[l.a.Warn,"warn"],[l.a.Info,"log"],[l.a.HTTP,"info"],[l.a.Verbose,"debug"],[l.a.Performance,"debug"],[l.a.Debug,"debug"],[l.a.Silly,"debug"]]);const v=function(){return function(e){var t=void 0===e?{}:e,n=t.level,s=void 0===n?l.a.Silly:n,v=t.piiPolicy,y=void 0===v?a.a.none:v,b=t.mappings,w=void 0===b?g:b,S=t.formatter,C=void 0===S?function(){var e={},t=e.shouldWrapLevel,n=void 0===t||t,a=e.seconds,s=void 0===a||a,m=e.timestampDecimalPlaces,g=void 0===m?s?2:0:m,v=e.floor,y=void 0===v||v,b=null,w=null,S=null;return function(e){var t,a=[];null===b&&(b=e.logTimestamp);var m=Math.pow(10,g),v=((y?Math.floor:Math.round)((e.logTimestamp-b)/(1e3/m))/m).toFixed(g),C=e.logActivity,_=e.logSource;_!==S&&a.push(Object(u.a)(r||(r=p(["META == ",""],["META == ",""])),Object(d.a)(_)).params(e.logParams)),C!==w&&a.push(Object(u.a)(i||(i=p(["META -- ",""],["META -- ",""])),Object(d.a)(C)).params(e.logParams)),w=C,S=_;var O=s?f:h;return a.push(Object(u.a)(o||(o=p(["",""," "," ",""],["",""," "," ",""])),Object(c.c)(v).notPII().forCertain(),O,Object(c.c)(n?"["+(null!==(t=l.a[e.logLevel])&&void 0!==t?t:"Unknown")+"]":l.a[e.logLevel]).notPII().forCertain(),e.logString).params(e.logParams)),a}}():S,_=t.consoleImplementation,O=void 0===_?console:_,E=t.filter,I={log:function(e){var t;if(!(e.logLevel>s))for(var n=0,r=C(e);n<r.length;n++){var i=r[n];O[null!==(t=w.get(e.logLevel))&&void 0!==t?t:"log"](i.toString(y))}}};return Object(m.a)(I,{filter:E})}({...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},consoleImplementation:console})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const r=Uint8Array||Array;let i;i=window.crypto&&window.crypto.getRandomValues?function(e){window.crypto.getRandomValues(e)}:function(e){let t,n,r,i=0;for(;i<16;)for(n=Math.random(),t=0;t<4;i++,t++)n*=256,r=0|n,e[i]=r,n-=r};const o=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function a(){var e;return e=(e=s)||new r(16),i(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,s=e,function(e){let t,n,r="";for(t=0;t<16;t++)n=e[t],r+=o[n>>4],r+=o[15&n],3!==t&&5!==t&&7!==t&&9!==t||(r+="-");return r}(s)}let s},function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(2234),i=n(1330),o=n(1478),a=n(2266),s=n(2333),c=n(1481),u=n(1482),l=n(1392),d=n(1227);function p(){const{data:e,isError:t,isLoading:n,refetch:u}=function(){const e=Object(i.b)();return Object(o.a)({endpoint:a.b.getPlanPricing,fetchProvider:()=>()=>{var t;return Object(s.a)(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.dsid)}})}(),{data:l,isError:d,isLoading:p,refetch:h}=function(e){const t=Object(i.b)();return Object(o.a)({endpoint:a.b.getSubscriptionFeaturePlanSummary,cacheKeys:[e],fetchProvider:()=>()=>{var n;return Object(s.b)(e,null===t||void 0===t||null===(n=t.details)||void 0===n?void 0:n.dsid)}})}("cloud.storage"),m=()=>{u(),h()},g=Object(r.b)();if(d)return{type:"error",refetch:m};if(p||!l)return{type:"loading",refetch:m};if(l.includedWithAppleOnePlan.includedInPlan){if(l.includedWithAccountPurchasedPlan.includedInPlan){var v,y,b,w,S,C,_,O;if(t)return{type:"error",refetch:m};if(n||!e)return{type:"loading",refetch:m};const r=l.includedWithAppleOnePlan,i=l.includedWithAccountPurchasedPlan,o=l.summary;return{type:"apple-one-with-extra",storageSize:f(null!==(v=r.limit)&&void 0!==v?v:0,null!==(y=r.limitUnits)&&void 0!==y?y:"GIB"),extraStorageSize:f(null!==(b=i.limit)&&void 0!==b?b:0,null!==(w=i.limitUnits)&&void 0!==w?w:"GIB"),totalStorageSize:f(null!==(S=o.limit)&&void 0!==S?S:0,null!==(C=o.limitUnits)&&void 0!==C?C:"GIB"),price:null!==(_=e.priceForDisplay)&&void 0!==_?_:"",renewalPeriod:null!==(O=e.renewalPeriod)&&void 0!==O?O:"MONTHLY",refetch:m}}{var E,I;const e=l.includedWithAppleOnePlan;return{type:"apple-one",storageSize:f(null!==(E=e.limit)&&void 0!==E?E:0,null!==(I=e.limitUnits)&&void 0!==I?I:"GIB"),refetch:m}}}if(l.includedWithSharedPlan.includedInPlan){var A,T;if(!g.ok)return{type:"error",refetch:m};if(!g.value)return{type:"loading",refetch:m};const e=l.includedWithSharedPlan;return{type:"family-sharing",storageSize:f(null!==(A=e.limit)&&void 0!==A?A:0,null!==(T=e.limitUnits)&&void 0!==T?T:"GIB"),sharerName:Object(c.a)(g.value.firstName,g.value.lastName),refetch:m}}if(l.includedWithAccountPurchasedPlan.includedInPlan){var P,R,k,D;if(t)return{type:"error",refetch:m};if(!e)return{type:"loading",refetch:m};const n=l.includedWithAccountPurchasedPlan;return{type:"icloud+",storageSize:f(null!==(P=n.limit)&&void 0!==P?P:0,null!==(R=n.limitUnits)&&void 0!==R?R:"GIB"),price:null!==(k=e.priceForDisplay)&&void 0!==k?k:"",renewalPeriod:null!==(D=e.renewalPeriod)&&void 0!==D?D:"MONTHLY",refetch:m}}var M,N,x,L;return l.includedWithManagedPlan.includedInPlan?{type:"free",storageSize:f(null!==(M=l.includedWithManagedPlan.limit)&&void 0!==M?M:0,null!==(N=l.includedWithManagedPlan.limitUnits)&&void 0!==N?N:"GIB"),refetch:m}:{type:"free",storageSize:f(null!==(x=l.summary.limit)&&void 0!==x?x:0,null!==(L=l.summary.limitUnits)&&void 0!==L?L:"GIB"),refetch:m}}function f(e,t){return{limit:e,limitUnits:t}}function h(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.type;if("error"!==n&&"loading"!==n)return v("apple-one-with-extra"===e.type?e.totalStorageSize:e.storageSize,t)}const m=1073741824,g=1099511627776;function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("GIB"===e.limitUnits){const n=e.limit*m;return Object(u.a)(n,2,t)}if("TIB"===e.limitUnits){const n=e.limit*g;return Object(u.a)(n,2,t)}Object(l.a)(e.limitUnits)}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=n?"DescribePlanPricing.Monthly.WithSpace":"DescribePlanPricing.Monthly",i=n?"DescribePlanPricing.Yearly.WithSpace":"DescribePlanPricing.Yearly";return""===e?Object(d.a)("DescribePlanPricing.Free"):"MONTHLY"===t?Object(d.a)(r,{price:e}):"YEARLY"===t?Object(d.a)(i,{price:e}):void Object(l.a)(t)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return M})),n.d(t,"b",(function(){return $})),n.d(t,"a",(function(){return G})),n.d(t,"i",(function(){return Z})),n.d(t,"d",(function(){return Q})),n.d(t,"e",(function(){return Y})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return ie})),n.d(t,"h",(function(){return oe})),n.d(t,"j",(function(){return ce})),n.d(t,"l",(function(){return S})),n.d(t,"k",(function(){return le}));var r=n(1231),i=n(1232),o=n(2328),a=n(1237),s=n(870),c=n.n(s);function u(){let e=(0,s.useRef)(new Map),t=(0,s.useCallback)(((t,n,r,i)=>{let o=(null===i||void 0===i?void 0:i.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:i}),t.addEventListener(n,o,i)}),[]),n=(0,s.useCallback)(((t,n,r,i)=>{var o;let a=(null===(o=e.current.get(r))||void 0===o?void 0:o.fn)||r;t.removeEventListener(n,a,i),e.current.delete(r)}),[]),r=(0,s.useCallback)((()=>{e.current.forEach(((e,t)=>{n(e.eventTarget,e.type,t,e.options)}))}),[n]);return(0,s.useEffect)((()=>r),[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function l(e){return!(""!==e.pointerType||!e.isTrusted)||((0,r.a)()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var d=n(1238),p=n(1235),f=(n(1239),n(1240)),h=n(1234);let m="default",g="",v=new WeakMap;function y(e){(0,r.d)()?("default"===m&&(g=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),m="disabled"):(e instanceof HTMLElement||e instanceof SVGElement)&&(v.set(e,e.style.userSelect),e.style.userSelect="none")}function b(e){if((0,r.d)()){if("disabled"!==m)return;m="restoring",setTimeout((()=>{(0,i.a)((()=>{"restoring"===m&&("none"===document.documentElement.style.webkitUserSelect&&(document.documentElement.style.webkitUserSelect=g||""),g="",m="default")}))}),300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&v.has(e)){let t=v.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),v.delete(e)}}const w=c.a.createContext(null);function S(e){let{onPress:t,onPressChange:n,onPressStart:i,onPressEnd:c,onPressUp:p,isDisabled:f,isPressed:h,preventFocusOnPress:m,shouldCancelOnPointerExit:g,allowTextSelectionOnPress:v,ref:S,...P}=function(e){let t=(0,s.useContext)(w);if(t){let{register:n,...r}=t;e=(0,o.a)(r,e),n()}return(0,a.a)(t,e.ref),e}(e),R=(0,s.useRef)(null);R.current={onPress:t,onPressChange:n,onPressStart:i,onPressEnd:c,onPressUp:p,isDisabled:f,shouldCancelOnPointerExit:g};let[k,D]=(0,s.useState)(!1),M=(0,s.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:N,removeAllGlobalListeners:x}=u(),L=(0,s.useMemo)((()=>{let e=M.current,t=(t,n)=>{let{onPressStart:r,onPressChange:i,isDisabled:o}=R.current;o||e.didFirePressStart||(r&&r({type:"pressstart",pointerType:n,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),i&&i(!0),e.didFirePressStart=!0,D(!0))},n=(t,n,r=!0)=>{let{onPressEnd:i,onPressChange:o,onPress:a,isDisabled:s}=R.current;e.didFirePressStart&&(e.ignoreClickAfterPress=!0,e.didFirePressStart=!1,i&&i({type:"pressend",pointerType:n,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),o&&o(!1),D(!1),a&&r&&!s&&a({type:"press",pointerType:n,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}))},i=(e,t)=>{let{onPressUp:n,isDisabled:r}=R.current;r||n&&n({type:"pressup",pointerType:t,target:e.currentTarget,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},o=t=>{e.isPressed&&(e.isOverTarget&&n(E(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,x(),v||b(e.target))},a={onKeyDown(n){_(n.nativeEvent,n.currentTarget)&&n.currentTarget.contains(n.target)?(T(n.target,n.key)&&n.preventDefault(),n.stopPropagation(),e.isPressed||n.repeat||(e.target=n.currentTarget,e.isPressed=!0,t(n,"keyboard"),N(document,"keyup",s,!1))):"Enter"===n.key&&C(n.currentTarget)&&n.stopPropagation()},onKeyUp(t){_(t.nativeEvent,t.currentTarget)&&!t.repeat&&t.currentTarget.contains(t.target)&&i(E(e.target,t),"keyboard")},onClick(r){r&&!r.currentTarget.contains(r.target)||r&&0===r.button&&(r.stopPropagation(),f&&r.preventDefault(),e.ignoreClickAfterPress||e.ignoreEmulatedMouseEvents||"virtual"!==e.pointerType&&!l(r.nativeEvent)||(f||m||(0,d.a)(r.currentTarget),t(r,"virtual"),i(r,"virtual"),n(r,"virtual")),e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1)}},s=t=>{if(e.isPressed&&_(t,e.target)){T(t.target,t.key)&&t.preventDefault(),t.stopPropagation(),e.isPressed=!1;let r=t.target;n(E(e.target,t),"keyboard",e.target.contains(r)),x(),e.target instanceof HTMLElement&&e.target.contains(r)&&(C(e.target)||"link"===e.target.getAttribute("role"))&&e.target.click()}};if("undefined"!==typeof PointerEvent){a.onPointerDown=n=>{var i;0===n.button&&n.currentTarget.contains(n.target)&&(i=n.nativeEvent,!(0,r.a)()&&0===i.width&&0===i.height||1===i.width&&1===i.height&&0===i.pressure&&0===i.detail&&"mouse"===i.pointerType?e.pointerType="virtual":(A(n.currentTarget)&&n.preventDefault(),e.pointerType=n.pointerType,n.stopPropagation(),e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,f||m||(0,d.a)(n.currentTarget),v||y(e.target),t(n,e.pointerType),N(document,"pointermove",s,!1),N(document,"pointerup",c,!1),N(document,"pointercancel",u,!1))))},a.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(A(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},a.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&I(t,t.currentTarget)&&i(t,e.pointerType||t.pointerType)};let s=r=>{r.pointerId===e.activePointerId&&(I(r,e.target)?e.isOverTarget||(e.isOverTarget=!0,t(E(e.target,r),e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,n(E(e.target,r),e.pointerType,!1),R.current.shouldCancelOnPointerExit&&o(r)))},c=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&(I(t,e.target)?n(E(e.target,t),e.pointerType):e.isOverTarget&&n(E(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,x(),v||b(e.target))},u=e=>{o(e)};a.onDragStart=e=>{e.currentTarget.contains(e.target)&&o(e)}}else{a.onMouseDown=n=>{0===n.button&&n.currentTarget.contains(n.target)&&(A(n.currentTarget)&&n.preventDefault(),n.stopPropagation(),e.ignoreEmulatedMouseEvents||(e.isPressed=!0,e.isOverTarget=!0,e.target=n.currentTarget,e.pointerType=l(n.nativeEvent)?"virtual":"mouse",f||m||(0,d.a)(n.currentTarget),t(n,e.pointerType),N(document,"mouseup",r,!1)))},a.onMouseEnter=n=>{n.currentTarget.contains(n.target)&&(n.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!0,t(n,e.pointerType)))},a.onMouseLeave=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!1,n(t,e.pointerType,!1),R.current.shouldCancelOnPointerExit&&o(t)))},a.onMouseUp=t=>{t.currentTarget.contains(t.target)&&(e.ignoreEmulatedMouseEvents||0!==t.button||i(t,e.pointerType))};let r=t=>{0===t.button&&(e.isPressed=!1,x(),e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:(I(t,e.target)?n(E(e.target,t),e.pointerType):e.isOverTarget&&n(E(e.target,t),e.pointerType,!1),e.isOverTarget=!1))};a.onTouchStart=n=>{if(!n.currentTarget.contains(n.target))return;n.stopPropagation();let r=function(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}(n.nativeEvent);r&&(e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=n.currentTarget,e.pointerType="touch",f||m||(0,d.a)(n.currentTarget),v||y(e.target),t(n,e.pointerType),N(window,"scroll",s,!0))},a.onTouchMove=r=>{if(!r.currentTarget.contains(r.target))return;if(r.stopPropagation(),!e.isPressed)return;let i=O(r.nativeEvent,e.activePointerId);i&&I(i,r.currentTarget)?e.isOverTarget||(e.isOverTarget=!0,t(r,e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,n(r,e.pointerType,!1),R.current.shouldCancelOnPointerExit&&o(r))},a.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(t.stopPropagation(),!e.isPressed)return;let r=O(t.nativeEvent,e.activePointerId);r&&I(r,t.currentTarget)?(i(t,e.pointerType),n(t,e.pointerType)):e.isOverTarget&&n(t,e.pointerType,!1),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,v||b(e.target),x()},a.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&o(t))};let s=t=>{e.isPressed&&t.target.contains(e.target)&&o({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};a.onDragStart=e=>{e.currentTarget.contains(e.target)&&o(e)}}return a}),[N,f,m,x,v]);return(0,s.useEffect)((()=>()=>{v||b(M.current.target)}),[v]),{isPressed:h||k,pressProps:(0,o.a)(P,L)}}function C(e){return"A"===e.tagName&&e.hasAttribute("href")}function _(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(i instanceof HTMLInputElement&&!R(i,n)||i instanceof HTMLTextAreaElement||i.isContentEditable)&&(!C(i)||"button"===o&&"Enter"!==n)&&!("link"===o&&"Enter"!==n)}function O(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const e=n[r];if(e.identifier===t)return e}return null}function E(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function I(e,t){let n=t.getBoundingClientRect(),r=function(e){let t=e.width/2||e.radiusX||0,n=e.height/2||e.radiusY||0;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);return o=r,!((i=n).left>o.right||o.left>i.right)&&!(i.top>o.bottom||o.top>i.bottom);var i,o}function A(e){return!(e instanceof HTMLElement)||!e.draggable}function T(e,t){return e instanceof HTMLInputElement?!R(e,t):!(e instanceof HTMLButtonElement)||"submit"!==e.type}w.displayName="PressResponderContext";const P=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function R(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:P.has(e.type)}class k{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function D(e){let t=(0,s.useRef)({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,(0,p.a)((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]),(0,s.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,r=e=>{var r,i;t.current.isFocused=!1,n.disabled&&(null===(i=(r=t.current).onBlur)||void 0===i||i.call(r,new k("blur",e))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",r,{once:!0}),t.current.observer=new MutationObserver((()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[])}function M(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=(0,s.useCallback)((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),a=D(o),c=(0,s.useCallback)((e=>{e.target===e.currentTarget&&document.activeElement===e.target&&(n&&n(e),i&&i(!0),a(e))}),[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:t||!r&&!i?void 0:o}}}let N=null,x=new Set,L=!1,j=!1,U=!1;const F={Tab:!0,Escape:!0};function z(e,t){for(let n of x)n(e,t)}function B(e){j=!0,function(e){return!(e.metaKey||!(0,r.e)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(N="keyboard",z("keyboard",e))}function K(e){N="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(j=!0,z("pointer",e))}function H(e){l(e)&&(j=!0,N="virtual")}function W(e){e.target!==window&&e.target!==document&&(j||U||(N="virtual",z("virtual",e)),j=!1,U=!1)}function q(){j=!1,U=!0}function V(){if("undefined"===typeof window||L)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){j=!0,e.apply(this,arguments)},document.addEventListener("keydown",B,!0),document.addEventListener("keyup",B,!0),document.addEventListener("click",H,!0),window.addEventListener("focus",W,!0),window.addEventListener("blur",q,!1),"undefined"!==typeof PointerEvent?(document.addEventListener("pointerdown",K,!0),document.addEventListener("pointermove",K,!0),document.addEventListener("pointerup",K,!0)):(document.addEventListener("mousedown",K,!0),document.addEventListener("mousemove",K,!0),document.addEventListener("mouseup",K,!0)),L=!0}function $(){return"pointer"!==N}function G(){return N}function Z(){V();let[e,t]=(0,s.useState)(N);return(0,s.useEffect)((()=>{let e=()=>{t(N)};return x.add(e),()=>{x.delete(e)}}),[]),(0,h.a)()?null:e}function Q(e={}){let{isTextInput:t,autoFocus:n}=e,[r,i]=(0,s.useState)(n||$());return Y((e=>{i(e)}),[t],{isTextInput:t}),{isFocusVisible:r}}function Y(e,t,n){V(),(0,s.useEffect)((()=>{let t=(t,r)=>{(function(e,t,n){return!(e&&"keyboard"===t&&n instanceof KeyboardEvent&&!F[n.key])})(null===n||void 0===n?void 0:n.isTextInput,t,r)&&e($())};return x.add(t),()=>{x.delete(t)}}),t)}function J(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=(0,s.useRef)({isFocusWithin:!1}),a=(0,s.useCallback)((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),c=D(a),u=(0,s.useCallback)((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,c(e))}),[r,i,c]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:u,onBlur:a}}}"undefined"!==typeof document&&("loading"!==document.readyState?V():document.addEventListener("DOMContentLoaded",V));let X=!1,ee=0;function te(){X=!0,setTimeout((()=>{X=!1}),50)}function ne(e){"touch"===e.pointerType&&te()}function re(){if("undefined"!==typeof document)return"undefined"!==typeof PointerEvent?document.addEventListener("pointerup",ne):document.addEventListener("touchend",te),ee++,()=>{ee--,ee>0||("undefined"!==typeof PointerEvent?document.removeEventListener("pointerup",ne):document.removeEventListener("touchend",te))}}function ie(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,a]=(0,s.useState)(!1),c=(0,s.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,s.useEffect)(re,[]);let{hoverProps:u,triggerHoverEnd:l}=(0,s.useMemo)((()=>{let e=(e,r)=>{if(c.pointerType=r,i||"touch"===r||c.isHovered||!e.currentTarget.contains(e.target))return;c.isHovered=!0;let o=e.currentTarget;c.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),a(!0)},o=(e,t)=>{if(c.pointerType="",c.target=null,"touch"===t||!c.isHovered)return;c.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),a(!1)},s={};return"undefined"!==typeof PointerEvent?(s.onPointerEnter=t=>{X&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(s.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{c.ignoreEmulatedMouseEvents||X||e(t,"mouse"),c.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:s,triggerHoverEnd:o}}),[t,n,r,i,c]);return(0,s.useEffect)((()=>{i&&l({currentTarget:c.target},c.pointerType)}),[i]),{hoverProps:u,isHovered:o}}function oe(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=(0,s.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:n,onInteractOutsideStart:i}).current;o.onInteractOutside=n,o.onInteractOutsideStart=i,(0,s.useEffect)((()=>{if(r)return;let e=e=>{ae(e,t)&&o.onInteractOutside&&(o.onInteractOutsideStart&&o.onInteractOutsideStart(e),o.isPointerDown=!0)};if("undefined"!==typeof PointerEvent){let n=e=>{o.isPointerDown&&o.onInteractOutside&&ae(e,t)&&o.onInteractOutside(e),o.isPointerDown=!1};return document.addEventListener("pointerdown",e,!0),document.addEventListener("pointerup",n,!0),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("pointerup",n,!0)}}{let n=e=>{o.ignoreEmulatedMouseEvents?o.ignoreEmulatedMouseEvents=!1:o.isPointerDown&&o.onInteractOutside&&ae(e,t)&&o.onInteractOutside(e),o.isPointerDown=!1},r=e=>{o.ignoreEmulatedMouseEvents=!0,o.onInteractOutside&&o.isPointerDown&&ae(e,t)&&o.onInteractOutside(e),o.isPointerDown=!1};return document.addEventListener("mousedown",e,!0),document.addEventListener("mouseup",n,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("touchend",r,!0),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("mouseup",n,!0),document.removeEventListener("touchstart",e,!0),document.removeEventListener("touchend",r,!0)}}}),[t,o,r])}function ae(e,t){if(e.button>0)return!1;if(e.target){const t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target))return!1;if(e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function se(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function ce(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:se(e.onKeyDown),onKeyUp:se(e.onKeyUp)}}}const ue=500;function le(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=ue,accessibilityDescription:c}=e;const l=(0,s.useRef)(null);let{addGlobalListener:d,removeGlobalListener:p}=u(),{pressProps:h}=S({isDisabled:t,onPressStart(e){if(("mouse"===e.pointerType||"touch"===e.pointerType)&&(n&&n({...e,type:"longpressstart"}),l.current=setTimeout((()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...e,type:"longpress"}),l.current=null}),a),"touch"===e.pointerType)){let t=e=>{e.preventDefault()};d(e.target,"contextmenu",t,{once:!0}),d(window,"pointerup",(()=>{setTimeout((()=>{p(e.target,"contextmenu",t)}),30)}),{once:!0})}},onPressEnd(e){l.current&&clearTimeout(l.current),!r||"mouse"!==e.pointerType&&"touch"!==e.pointerType||r({...e,type:"longpressend"})}}),m=(0,f.a)(i&&!t?c:null);return{longPressProps:(0,o.a)(h,m)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(870),i=n(1215),o=n.n(i),a=n(2259),s=n(1227),c=n(2233),u=n(2309),l=n(914),d=n(1260),p=function(e){return Object(r.createElement)(d.a,{originalProps:e,metadata:{name:"chevron.down",svgPath:"M56.3477-7.91016C58.3496-7.91016 60.0586-8.69141 61.6211-10.3027L98.3398-47.8516C99.6094-49.1211 100.244-50.6348 100.244-52.4414C100.244-56.1035 97.3145-59.082 93.6523-59.082C91.8945-59.082 90.1855-58.3008 88.8672-56.9824L56.3965-23.584L23.8281-56.9824C22.5098-58.3008 20.8496-59.082 18.9941-59.082C15.3809-59.082 12.4512-56.1035 12.4512-52.4414C12.4512-50.6348 13.1348-49.1211 14.3555-47.8516L51.0742-10.2539C52.6855-8.69141 54.3457-7.91016 56.3477-7.91016Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:79.15504638671882,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 90.778076171875 54.6396484375",width:90.778076171875,height:54.6396484375,translateX:-9.465986328124927,translateY:62.5498046875,baseline:62.5498046875,capline:-7.91015625}}})};const f=e=>{let{applicationIdentifier:t,className:n,heading:i,index:d}=e;const f=r.useRef(null),h=Object(s.a)("VoiceOver.Tile.EditAriaLabel",{tileName:i}),[m,g]=r.useState(!1),v=Object(u.e)(),y=Object(c.a)({currentApplicationIdentifier:t,buttonRef:f,labelLocKey:"HomePage.CustomizeDashboard.TilePicker.Label",action:e=>{v({type:u.a.UPDATE,configuration:{identifier:e,uuid:Object(l.a)()},index:d})},appIconAriaLabelLocKey:"VoiceOver.AppIconButton.TilePicker.Label",onClose:()=>g(!1)});return r.createElement(a.a,{className:o()("widget-picker","dropdown-button",m?"showing-widget-picker":"",n),onActivate:()=>{y(),g(!0)},ref:f,ariaLabel:h,ariaHasPopup:"menu",variant:"block primary"},r.createElement(p,{width:15,height:10,layoutMode:"glyphBox","aria-hidden":!0}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(870),i=n(2292),o=n(1215),a=n.n(o),s=n(1227),c=n(2132),u=n(1319),l=n(2320),d=n(1331);const p=e=>{let{applicationIdentifier:t,appDisplayName:n,ariaHidden:i=!1,disabled:o=!1,ariaLabelKey:p="VoiceOver.AppIconButton.Launcher.Label",showDisplayName:f,iconSize:h,action:m,className:g,role:v}=e;const y=a()("app-icon-button",g),b=Object(s.a)(p,{appName:n}),w=Object(d.a)(n,80),S=Object(u.b)();return r.createElement(l.a,{ariaHidden:i,className:y,disabled:o,ariaLabel:b,action:m||(()=>S.launchApp(t)),icon:r.createElement(c.a,{applicationIdentifier:t,iconSize:h}),role:v},f&&r.createElement("div",{className:"app-displayname",role:"presentation"},w))};var f=n(1323),h=n(1166),m=n(2263),g=n(2257),v=n(2196),y=n(2224),b=n(1248),w=n(1247),S=n(1329),C=n(1328);function _(){return _=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 O(e){let{currentApplicationIdentifier:t,buttonRef:n,labelLocKey:i,action:o,appIconAriaLabelLocKey:a,onClose:c}=e;const u=r.useRef(null),l=r.useRef(null),d=r.useRef(null),p=r.useCallback((e=>{var t,n,r;const i=null===(t=d.current)||void 0===t?void 0:t.current,o=Array.from(null!==(n=null===i||void 0===i?void 0:i.children)&&void 0!==n?n:[]),a=o.length-1;if(0===o.length)return;const s=o.findIndex((e=>e===document.activeElement));let c=0;switch(e.key){case"ArrowDown":c=1;break;case"ArrowUp":c=-1}let u=s+c;u<0&&(u=a),u>a&&(u=0),o[u].hasAttribute("disabled")&&(u+=c),null===(r=o[u])||void 0===r||r.focus()}),[]),f=Object(s.a)(i),h=Object(s.a)("HomePage.CustomizeDashboard.TilePicker.Close.AriaLabel"),b="widget-picker-label",[w,S]=Object(g.i)(r.createElement(v.b,{anchorRef:n,className:"widget-picker",positioner:Object(y.b)({...y.c,sidePreference:[y.a.bottomRight,y.a.topRight]})},r.createElement("h2",{id:b},f),r.createElement(E,{action:o,currentApplicationIdentifier:t,onClose:()=>S(),"aria-labelledby":b,appIconAriaLabelLocKey:a,ref:u})),{ariaClosePaneDescription:h,className:"widget-picker-pane",initialFocus:"[role=label]",onKeyDown:p,onClose:c}),[_,O]=Object(m.a)(E,{menuProps:{action:o,currentApplicationIdentifier:t,"aria-labelledby":b,appIconAriaLabelLocKey:a,ref:l},cardProps:{closeAriaLabel:h,title:f,titleId:b,onKeyDown:p,onClose:c}});return Object(C.a)(_,O,l,w,S,u,d)}const E=r.forwardRef((function(e,t){let{appIconAriaLabelLocKey:n,currentApplicationIdentifier:o,action:a,onClose:c,...u}=e;const l=Object(f.b)(),d=Object(S.b)(),m=Object(i.b)(),g=r.useMemo((()=>{const e={applicationIdentifier:h.a,displayName:Object(s.a)("AppLibraryHomeTile.Heading")};return d?[...m,e]:[e]}),[d,m]),v=r.useMemo((()=>l.map((e=>{const t=w.a.sharedInstance.getApplicationConfiguration(e);return{applicationIdentifier:e,displayName:t?Object(b.e)(t):""}})).concat(g)),[l,g]).map((e=>{const{applicationIdentifier:t,displayName:i}=e,s=o===t;return r.createElement(p,{iconSize:60,action:()=>{a(t),c()},className:s?"current-app":"",applicationIdentifier:t,appDisplayName:i,key:t,showDisplayName:!0,ariaLabelKey:n,disabled:s,role:"menuitem"})}));return r.createElement("div",_({role:"menu",className:"widget-picker-container",tabIndex:-1,ref:t},u),v)}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g}));var r=n(888);const i=r.z.object({organizer:r.z.string()}),o=r.z.object({dsid:r.z.string(),firstName:r.z.string(),lastName:r.z.string(),fullName:r.z.string()}),a=r.z.object({isMemberOfFamily:r.z.boolean(),family:i.optional(),familyMembers:r.z.array(o).optional()});var s=n(1413),c=n(2266);const u=e=>{let{webServices:t}=e;if(null===t||void 0===t||!t.account)throw new Error("getFamilyDetials: no service url available");return Object(s.a)({url:Object(c.o)(t.account),includeCredentials:!0,validate:{type:"WireFamilyDetails",schema:a}})};var l=n(1478),d=n(465),p=n(1330);function f(){return Object(l.a)({endpoint:c.b.getFamilyDetails,fetchProvider:e=>()=>u(e)})}function h(){const{data:e,isError:t,error:n}=f();if(t)return d.Result.failure(n);if(!e)return d.Result.success(void 0);if(!e.isMemberOfFamily||!e.familyMembers||!e.family)return d.Result.failure(new Error("User not in a family"));const r=e.family.organizer,i=e.familyMembers.find((e=>e.dsid===r));return i?d.Result.success(i):d.Result.failure(new Error("Cannot find family organizer"))}let m=function(e){return e[e.None=0]="None",e[e.Organizer=1]="Organizer",e[e.OrganizerWithNoMember=2]="OrganizerWithNoMember",e[e.NonOrganizerMember=3]="NonOrganizerMember",e}({});function g(){const e=Object(p.b)(),{data:t,isError:n,error:r,refetch:i}=f();if(n)return{result:d.Result.failure(r),refetch:i};if(!t||null===e||void 0===e||!e.details)return{result:d.Result.success(void 0),refetch:i};if(!t.isMemberOfFamily||!t.family||!t.familyMembers)return{result:d.Result.success(m.None),refetch:i};const o=t.family.organizer,a=t.familyMembers.find((e=>e.dsid===o));return a?a.dsid===e.details.dsid?{result:d.Result.success(m.Organizer),refetch:i}:{result:d.Result.success(m.NonOrganizerMember),refetch:i}:{result:d.Result.failure(new Error("Cannot find family organizer")),refetch:i}}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(927),i=n(888);function o(e){return i.z.union([i.z.boolean(),i.z.number(),i.z.string(),i.z.null(),i.z.undefined()]).safeParse(e).success}function a(e){return i.z.record(i.z.unknown()).safeParse(e).success}function s(e,t){const n=e[t];if(o(n))return n;try{const e=n&&n.toJSON&&n.toJSON()||n;return o(e)?""+e:JSON.stringify(e)}catch(r){try{return n+" (could not `JSON.stringify()`)"}catch(i){return"(cannot stringify value)"}}}class c{constructor(e){this.isExceptionHandlingEnabled=!0,this.isExceptionHandlingFatal=!0,this.exceptionWasHandled=!1,this.hostingApplicationCrashInfo=e}exceptionHandler(e){var t,n;const i=function(e){if(!e)return null;const{message:t,type:n,sourceURL:r}=e;return{message:"string"===typeof t?t:"",type:"string"===typeof n?n:"",stack:function(e){if(!a(e))return null;if("string"!==typeof e.stack)return null;const t=e.stack.trim().split("\n"),n=t.length;if(n>500){const e=n-500;t.splice(400,e,`\u2026 ${e} lines truncated \u2026`)}return t.join("\n")}(e),lineNumber:function(e){if(!a(e))return null;if("number"===typeof e.lineNumber)return e.lineNumber;if("number"===typeof e.line)return e.line;if("string"!==typeof e.stack)return null;const t=e.stack.split("\n")[1];if("string"!==typeof t)return null;const n=t.split(":"),r=n[n.length-2],i=parseInt(r,10);return Number.isFinite(i)?i:null}(e),context:function(e){if(o(e))return""+e;if(!a(e))return"";try{const t="function"===typeof e.toJSON?e.toJSON():e;return o(t)?""+t:JSON.stringify(t)}catch{const t={};for(const n in e)t[n]=s(e,n);return JSON.stringify(t)}}(e.context),sourceURL:"string"===typeof r?r:""}}(e);null!==i&&void 0!==i&&null!==(t=i.stack)&&void 0!==t&&t.startsWith("@user-script")||null!==i&&void 0!==i&&null!==(n=i.stack)&&void 0!==n&&n.startsWith("SyntaxError: Unexpected token")||(null!==i&&(i.type="UNHANDLED_EXCEPTION"),r.a.showCrashReporter(i||{},this.hostingApplicationCrashInfo,null,!0))}}var u=n(925),l=n(898),d=n(2155),p=n(2248),f=n(2159);let h;function m(){Object(f.effect)((()=>{const e=function(){var e,t,n,r,i;const o=d.h.value,a=null!==(e=null===(t=p.c.value)||void 0===t?void 0:t.environment)&&void 0!==e?e:"PROD";return{applicationIdentifier:l.a.applicationName,localizedApplicationName:Object(u.a)("Application.Title"),radarComponentId:759510,buildInfo:__CW_BUILD_INFO,environmentInfo:a,dsid:null===o||void 0===o||null===(n=o.details)||void 0===n?void 0:n.dsid,appleId:null===o||void 0===o||null===(r=o.details)||void 0===r?void 0:r.appleId,isAppleInternal:null===o||void 0===o||null===(i=o.requestInfo)||void 0===i?void 0:i.isAppleInternal}}(),t=new c(e);h=t,Object(r.b)(e)}))}function g(){if(void 0===h)throw"getExceptionHandlerDelegate called before initialization.";return h}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,i=n(967),o=n(898),a=n(968),s=n(2249),c=n(1247),u=n(1262),l=n(1264),d=n(2134),p=n(965),f=n(2155);class h{get applicationUrl(){return this._applicationParametersUrl}get applicationParameter(){return this._applicationParameter}get applicationIdentifier(){var e;const t=this._applicationParameter.applicationIdentifier;return this.isDeveloperMode&&null!==(e=this.applicationUrl.searchParams.get("appIdentifier"))&&void 0!==e?e:t}setChildApplication(e,t,n){var r,i;let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.pushHistoryState(e,t,n,null!==(r=e.applicationRelativePath)&&void 0!==r?r:"",null!==(i=e.applicationHash)&&void 0!==i?i:"",o?"":void 0)}pushHistoryState(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.relativePath,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.applicationUrl.hash,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.applicationUrl.search;this.trackingFromPopState?this.replaceHistoryState(e,t,n,r,i,a):(o.a.pushHistoryState(e,t,n,r,a,i),this.update())}replaceHistoryState(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.relativePath,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.applicationUrl.hash,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.applicationUrl.search;o.a.replaceHistoryState(e,t,n,r,a,i)&&this.update()}get relativePath(){return this._applicationParameter.relativePath}get hash(){return this._applicationParameter.hash}get shortGuid(){return this.isDeveloperMode?this.applicationUrl.searchParams.get("shortGuid"):this._applicationParameter.shortGuid}get longGuid(){return this._applicationParameter.longGuid}get showApps(){const e=this.applicationUrl.searchParams.get("showApps");if(!e)return null;const t=[],n=e.split(",");for(const r of n){const e=r.split(":");0!==r.length&&(1===e.length?t.push({identifier:e[0]}):t.push({identifier:e[0],generation:parseInt(e[1],10)}))}return 0===t.length?null:t}get port(){if(!this.isDeveloperMode)return null;const e=this.applicationUrl.searchParams.get("port");return e?parseInt(e,10):null}get showEnvironmentInfo(){return"false"!==this.applicationUrl.searchParams.get("showEnvironmentInfo")}get redirectedFromCarry(){return"false"===this.applicationUrl.searchParams.get("carry")}get postLoginRedirectUrl(){const e=this.applicationUrl,t=e.hash.indexOf("postLoginRedirectUrl="),n=e.hash.substring(t+21);return-1!==t?decodeURIComponent(n):""}get isSignupRequested(){const e=this.applicationUrl.hash;return/[#&]signup(&.*)?$/.test(e)}get vettingParameters(){const e=this.applicationUrl.pathname+this.applicationUrl.search;if(!e)return null;const t=e.split("/");return"v"!==t[1]?null:{vettingToken:t[2],vettingStatus:t[3]}}constructor(e,t){this._applicationParametersUrl=void 0,this._applicationParameter=void 0,this.needsTermsFlow=void 0,this.needsGameCenterTermsFlow=void 0,this.isDebug=void 0,this.redirectedAuthDetails=null,this.trackingFromPopState=!1,this.update=()=>{if(Object(p.l)())return;const e=window.location.href,t=Object(s.c)(e);this._applicationParametersUrl=t,this._applicationParameter=new i.a(t),this.parametersDidChange()};const n=e.searchParams;var r;"true"===n.get("redirectingUserToCorrectDomain")&&(this.redirectedAuthDetails={accountName:n.get("accountName"),accountCountryCode:n.get("accountCountryCode"),dsWebAuthToken:n.get("dsWebAuthToken"),extendedLogin:n.get("extendedLogin"),totalAuthenticationSteps:(()=>{const e=n.get("totalAuthenticationSteps"),t=e?parseInt(e):null;return"number"===typeof t?t:null})()},n.delete("redirectingUserToCorrectDomain"),n.delete("accountName"),n.delete("accountCountryCode"),n.delete("dsWebAuthToken"),n.delete("extendedLogin"),n.delete("totalAuthenticationSteps"),null===(r=window.top)||void 0===r||r.history.replaceState(history.state,document.title,e.href)),this._applicationParametersUrl=e,this._applicationParameter=new i.a(e),this.isDebug=t,window.addEventListener("popstate",(()=>{this.trackingFromPopState=!0,this.update(),this.trackingFromPopState=!1})),window.addEventListener("hashchange",this.update);const o=e.pathname+e.search;let c=Object(a.a)(o);if(!c.length){const t=e.hash;c=Object(a.a)("#"===t[0]?t.slice(1):t)}const u="terms"===c[0];this.needsTermsFlow=u,this.needsGameCenterTermsFlow=u&&"gc"===c[1]}get isDeveloperMode(){return!!this.isDebug&&"true"===this.applicationUrl.searchParams.get("developerMode")}isPhotosSelfRouteUnauthSupported(e){return"photos"===(null!==e&&void 0!==e?e:this.applicationIdentifier)&&this.applicationParameter.isSelfRouteUnauthSupported}parametersDidChange(){c.a.sharedInstance.update(),setTimeout((()=>{const{informationalPageDetails:e}=this.applicationParameter;if(e){const t={relativePath:null===e||void 0===e?void 0:e.relativePath,hash:null===e||void 0===e?void 0:e.hash};return void Object(u.h)(e.route,t)}const t=this.applicationIdentifier,n=d.a.cloudOSApplication.rootComponentProps.rootState;if("landing-page"!==n.kind||n.applicationIdentifier!==t)if("child-application"!==n.kind||d.a.cloudOSApplication.currentChildApplicationIdentifier!==t)if(t){const e=this.isPhotosSelfRouteUnauthSupported(t);if(!f.e.value&&!e)return;l.a.sharedInstance.updateApplicationHistoryState(window.history.state),l.a.sharedInstance.switchToApplication(t)}else d.a.cloudOSApplication.switchToSpringboard();else t||d.a.cloudOSApplication.switchToSpringboard()}))}}r=h,h.sharedInstance=new r(Object(s.c)(window.location.href),!1)},function(e,t,n){"use strict";n.r(t),n.d(t,"t",(function(){return r})),n.d(t,"loadUrl",(function(){return i.a})),n.d(t,"openUrl",(function(){return o.a})),n.d(t,"parseJson",(function(){return a.c})),n.d(t,"parseResponseJson",(function(){return a.d})),n.d(t,"ParseJsonError",(function(){return a.a})),n.d(t,"isZodError",(function(){return a.b})),n.d(t,"parseUrl",(function(){return s.c})),n.d(t,"getBaseUrlStr",(function(){return s.a})),n.d(t,"parsePageUrl",(function(){return s.b})),n.d(t,"HttpStatusCodeError",(function(){return c})),n.d(t,"makeSchema",(function(){return u.a})),n.d(t,"schemaMethods",(function(){return u.b}));var r=n(888),i=n(902),o=n(911),a=n(890),s=n(2249);class c extends Error{constructor(e,t){super(e),this.statusCode=t,this.name="HttpStatusCodeError"}}var u=n(2216)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(2248),i=n(898),o=n(2208),a=n(921),s=n(919),c=n(918);class u extends a.a{constructor(e,t,n,r){const i=function(e,t,n,r){n.endsWith("/")&&(n=n.substring(0,n.length-1)),0===n.indexOf("/")&&(n=n.substring(1,n.length));const i=function(e,t){if("docws"===e&&t.startsWith("ws/")){const e=["upload","update","download","internal"];for(let n=0;n<e.length;n++){let r=t.match(`ws/(.*)/${e[n]}`);r&&r[1]&&(t=t.replace(r[1],"*"))}}if("docws"===e&&t.startsWith("v1/")){const e=["item/copy","enumerate/folders","enumerate/files"];for(let n=0;n<e.length;n++){let r=t.match(`v1/${e[n]}/(.*)`);r&&r[1]&&(t=t.replace(r[1],"*"))}}if("cvws"===e&&(t="*"),"ckdatabasews"===e&&t.startsWith("database/")||("ckdeviceservice"===e||"ckdevice"===e)&&t.startsWith("device/")){const e=["production"];for(let n=0;n<e.length;n++){let r=t.match(`/1/(.*)/${e[n]}`);r&&r[1]&&(t=t.replace(r[1],"*"))}}const n=t.match(/[a-zA-Z0-9_-]{30,}/);return n&&n[0]&&(t=t.replace(n[0],"*")),Object(c.d)(t)}(t,n).replace(/\//g,"_"),o=Math.floor(r/100);let a;switch(o){case 0:a=".timeout";break;case 2:a="";break;default:a=`.${o}xx`}return`${e}.${t}.${i}${a}`}(e,t,n,r.statusCode);if(i.length>l){const r=new s.a("statNameExceedsLimit",{appName:e,serviceName:t,urlPath:n,hubbleStatName:i});o.b.sharedInstance.recordStat(r)}super(i,{...r,latencyAppName:e,isUsedForLatencyBucketing:!0})}}const l=80;var d,p=n(916),f=n(903),h=n(2249);const m="requestInfo";class g{get telemetryClient(){return o.b.sharedInstance}recordStat(e,t,n,r){this._recordStat(!1,e,!1,t,n,r)}recordApplicationStat(e,t,n,r){this._recordStat(!0,e,!1,t,n,r)}recordLegacyApplicationStat(e,t,n,r){try{this._recordStat(!0,e,!0,t,n,r)}catch{const i=new s.a("UnableToRecordStatWithDataProvided",{applicationInfo:e,statsHash:t,statusCode:n,url:r});o.b.sharedInstance.recordStat(i)}}_recordStat(e,t,n,r,i,o){const{appName:a,masteringNumber:s,buildNumber:c}=t;let u,l="";if("string"===typeof o)u=Object(h.c)(o),l=o;else if(o instanceof Location)u=Object(h.c)(o.href),l=o.href;else{if(!(o instanceof URL))throw new Error("A URL object cannot be created with the data provided: "+o);u=o,l=o.href}const d=u.hostname;if(r){const t=function(e,t,n,r,i,o){return o||(o={}),v(e,t,n,r,i,function(e){e.time=(new Date).toString()+"        ("+Math.floor((new Date).getTime())+")";const t=(new Date).toString().match(/.*?\((.*?)\).*/);return t&&2===t.length&&(e.timezone=t[1]),e}(o))}(n,a,s,c,m,{...r,serverHostname:d});var p,f;this._recordWebServiceEndpoint(a,r,l),e?null===(p=this.telemetryClient)||void 0===p||p.recordApplicationStat(a,s,c,m,t):null===(f=this.telemetryClient)||void 0===f||f.recordStatRaw(m,t)}if(function(e,t){if(null!==t&&void 0!==t&&t.dontReportServerError)return!1;let n=!1;return void 0!==e&&null!==e&&(n=0===e||e>=500),n}(i,r)){const t=function(e,t){let n=!1;if(e&&t&&t.length>0){const r=e.hostname;if(r){const e=r.split("-")[0];n=-1!==t.indexOf(e)}}return n}(u,y)?"serverErrorOrTimeout.carry":"serverErrorOrTimeout",o=null===r||void 0===r?void 0:r.urlPath,l=v(n,a,s,c,t,{status:i,...o&&{urlPath:o},serverHostname:d});var g,b;e?null===(g=this.telemetryClient)||void 0===g||g.recordApplicationStat(a,s,c,t,l):null===(b=this.telemetryClient)||void 0===b||b.recordStatRaw(t,l)}}_recordWebServiceEndpoint(e,t,n){const{clientTiming:i,urlPath:a,statusCode:c}=t;let l=t.serviceName;if(a&&i)if(!l&&n&&(l=Object(r.i)(n)),l){const t=new u(e,l,a,{duration:Math.round(i),statusCode:c});o.b.sharedInstance.recordPerfStat(t)}else{const t=new s.a("UnableToCreateWebServiceRequestPerfStat",{appName:e,url:n});o.b.sharedInstance.recordStat(t)}}}function v(e,t,n,r,o){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const{hostname:s,locale:u}=i.a,l=p.a.sharedInstance;if(e){const e=`${(d=o).charAt(0).toUpperCase()}${d.slice(1)}`;a.fullStatName=`${t}${e}`}var d;return Object(c.c)(t,n,r,l.identifier,s,u,f.c.sharedInstance.primaryInteractionMode,o,a)}d=g,g.sharedInstance=new d;const y=["p97","p98"]},function(e,t,n){"use strict";n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return M})),n.d(t,"c",(function(){return N}));var r=n(1248),i=n(2170),o=n(973),a=n(2180),s=n(1299),c=n(1286),u=n(1295),l=n(1288),d=n(1227),p=n(2241),f=n(919),h=n(2208),m=n(2179),g=n(921),v=n(900),y=n(2188),b=n(2189),w=n(2215),S=n(905);class C extends y.b{constructor(e,t,n,i,o,a){if(super({allowedRemoteOrigins:v.a.sharedInstance.allowedRemoteOrigins,url:t,remoteInstanceName:e.applicationInfo.applicationName,remoteInstanceTitle:Object(r.e)(e.applicationInfo.configuration),launchRoute:a}),this.childProcessReferenceClass=b.b,this.controller=void 0,this.remoteInstanceLoadTimeout=12e4,this.historyState=void 0,this.windowParameters=void 0,this.iframeDidLoad=()=>{const e=this._childProcessReference;e&&N(this.controller.applicationInfo).then((t=>{!Object(c.c)(this.remoteInstanceState,c.a.TERMINATED)&&t.ok&&e.sendInvokeMainMessage(this.controller)})).catch((e=>{throw e}))},this.isPresentedViewController=!1,this.controller=e,this.delegate=e,this.historyState=n,this.displayMedium=i||y.a.IFRAME,this.displayMedium===y.a.IFRAME){const t=document.getElementById("early-child"),n=null===t||void 0===t?void 0:t.__data;let r=!1;t&&n&&!n.claimed&&(t.getAttribute("data-name")===e.applicationInfo.applicationName?(n.claimed=!0,this.iframe=t,t.classList.remove("unclaimed"),r=!0):(n.onHydrate(),t.remove())),r||(this.iframe=document.createElement("iframe"),this.iframe.classList.add("child-application"))}this.windowParameters=o,this._remoteInstanceTimeoutMethodIdentifers=[...this._remoteInstanceTimeoutMethodIdentifers,R]}loadRemoteInstance(){const e=super.loadRemoteInstance(),t=this.iframe,n=this.applicationWindow;if(!t&&!n)return;const r=this._childProcessReference;if(r.remoteOrigin=this.remoteOrigin,r.historyState=this.historyState,t){r.iframe=t;const e=r.applicationInfo.allowsFullscreen,n="early-child"===t.id&&t.__data||void 0;!0===(null===n||void 0===n?void 0:n.loaded)?this.iframeDidLoad():t.addEventListener("load",this.iframeDidLoad),e&&(t.setAttribute("allowfullscreen","true"),t.setAttribute("allow","fullscreen")),n&&(n.ready&&this.invokeLaterSupport.invokeLater((()=>{r.isReadyToReceiveMessages()})),n.onHydrate()),w.a.addNeighboringBrowsingContext(t),Object(S.c)(t,this.controller)}else if(n&&n.window){var i;r.applicationWindow=n.window,null===(i=n.window)||void 0===i||i.addEventListener("load",this.iframeDidLoad)}return r.createLegacyMessagingChannel(),e}terminateRemoteInstance(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.iframe&&(this.iframe.removeEventListener("load",this.iframeDidLoad),w.a.removeNeighboringBrowsingContext(this.iframe),Object(S.a)(this.iframe));const n=null===(e=this.applicationWindow)||void 0===e?void 0:e.window;return n&&!n.closed&&n.removeEventListener("load",this.iframeDidLoad),Object(c.c)(this.remoteInstanceState,c.a.RUNNING,c.a.LOADING,c.a.LOADED)||this.applicationWindow?super.terminateRemoteInstance(t):Promise.resolve()}remoteInstanceWillConnect(){const e=this._childProcessReference;e.applicationInfo=this.controller.applicationInfo,e.applicationConfiguration=this.controller.applicationConfiguration,e.messagingFromUIChildDelegate=this,super.remoteInstanceWillConnect()}sendNotificationToRemoteInstance(e){const t=this._childProcessReference,n=t.remoteProxy;return n?t.isLegacyApplication?n.didReceiveNotification(e):n.didReceiveRemoteNotification(e):Promise.resolve()}preferencesDidUpdate(e){const t=this._childProcessReference,n=t.remoteProxy;return!t.isLegacyApplication&&n?n.preferencesDidUpdate(e):Promise.resolve()}didFetchStartup(e,t){const n=this._childProcessReference.remoteProxy;null===n||void 0===n||n.didFetchStartup(e,t)}tileDataDidUpdate(e){const t=this._childProcessReference.remoteProxy;null===t||void 0===t||t.tileDataDidUpdate(e)}launchOptionsDidChange(e){const t=this._childProcessReference.remoteProxy;null===t||void 0===t||t.launchOptionsDidChange(e)}whatsNewDidDisplay(e,t){const n=this._childProcessReference.remoteProxy;null===n||void 0===n||n.whatsNewDidDisplay(e,t)}}var _=n(1265),O=n(1303),E=n(1261),I=n(465),A=n(1262),T=n(2155),P=n(965);const R="IS_APPLICATION_LOADING_SLOWLY_TIMEOUT_IDENTIFIER",k="RESOLVE_SHORT_GUID";class D{constructor(){this._promises=new Map}all(){const e=[],t=[];for(const[n,r]of this._promises.entries())e.push(n),t.push(r);return Promise.all(t).then((t=>{const n=new Map;for(let r=0,i=t.length;r<i;r++){const i=e[r],o=t[r];n.set(i,o)}return n}))}clear(){this._promises.clear()}register(e,t){this._promises.set(e,t)}}class M{get applicationConfiguration(){return this._applicationConfiguration}get applicationInfo(){return this._applicationConfiguration.applicationInfo}get applicationContext(){return this._applicationContext}remoteInstanceIsReadyToTerminateDidChange(e,t){var n;null===(n=this.delegate)||void 0===n||n.childApplicationIsReadyToTerminateDidChange(this,t)}get applicationIsReadyToTerminate(){const{remoteApplicationViewController:e}=this;return!e||e.remoteInstanceIsReadyToTerminate}get currentTitleName(){return this._currentTitleName?this._currentTitleName:Object(r.d)(this.applicationConfiguration)}set currentTitleName(e){this._currentTitleName=e}get isLoading(){var e,t;const n=null!==(e=null===(t=this.remoteApplicationViewController)||void 0===t?void 0:t.remoteInstanceState)&&void 0!==e?e:c.a.NONE;return Object(c.c)(n,c.a.LOADING,c.a.LOADED)}get isLoadingForPresentation(){var e;return this.isLoading&&(null===(e=this.applicationContext)||void 0===e?void 0:e.targetUIStateWhenLaunched)===u.a.ACTIVE_FOREGROUND}get isActiveForeground(){var e;return(null===(e=this.applicationContext)||void 0===e?void 0:e.targetUIStateWhenLaunched)===u.a.ACTIVE_FOREGROUND}get isActive(){const{remoteApplicationViewController:e}=this;return!!e&&e.isPresentedViewController}constructor(e,t){this.currentHistoryState=void 0,this._currentTitleName=void 0,this.reportPendingDidBecomeInteractive=void 0,this.applicationSlowLoadingTimeout=15e3,this.badgeCount=void 0,this.delegate=void 0,this.remoteApplicationViewController=void 0,this._applicationConfiguration=void 0,this._applicationContext=void 0,this._dependentOperationsForLaunchPromise=void 0,this._pendingNotifications=[],this._pendingWhatsNewDidDisplay=void 0,this._pendingStartupResponse=null,this._applicationConfiguration=e,this.delegate=t,this.initializeBrowserHistoryState(e)}initializeBrowserHistoryState(e){const t=e.identifier,n=e&&e.applicationInfo&&e.applicationInfo.authBagId;if(n){const e=window.history.state;if(e&&e.applicationAuthBagId===n)this.currentHistoryState=e,this.currentTitleName=e.applicationTitleName;else{var r;this.currentHistoryState={applicationAuthBagId:n};const{applicationIdentifier:e,hash:i,relativePath:o,shortGuid:a,applicationParameter:s}=p.a.sharedInstance;e===t&&o?(this.currentHistoryState.applicationRelativePath=o,this.currentHistoryState.applicationHash=i):e===t&&a?this.currentHistoryState.applicationHash=`#${a}`:e===A.b.icloudplus&&"customdomain"===(null===(r=s.informationalPageDetails)||void 0===r?void 0:r.relativePath)&&(this.currentHistoryState.applicationHash=s.informationalPageDetails.hash)}}else this.currentHistoryState=void 0}launchRemoteApplicationWithContext(e){const t=null===e||void 0===e?void 0:e.launchPath;let n;return t&&"object"===typeof t&&"fullLaunchURL"in t&&(n=t.fullLaunchURL||window.location.href),this.remoteApplicationViewController&&this.remoteApplicationViewController.url===e.launchUrl||(this.clearForReuse(),this.remoteApplicationViewController=new C(this,e.launchUrl,this.currentHistoryState,e.displayMedium,e.windowParameters,n)),this._applicationContext={...this._applicationContext,...e},this.remoteApplicationViewController}reloadRemoteApplication(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;if(this.remoteApplicationViewController){const{remoteInstanceIsReadyToTerminate:r}=this.remoteApplicationViewController;(t||r)&&(this.remoteApplicationViewController.url=e,this.remoteApplicationViewController.reloadRemoteInstance(t),this.applicationContext&&(this.applicationContext.launchUrl=e),n=!0)}return n}clearForReuse(){const{remoteApplicationViewController:e}=this;e&&e.isConnected&&this.delegate.childApplicationWantsToRemoveViewController(this),this.remoteApplicationViewController=void 0,this._applicationContext=void 0,this._dependentOperationsForLaunchPromise=void 0,this._pendingStartupResponse=null,this.currentHistoryState||this.currentHistoryState||(this._currentTitleName=void 0)}handlePushNotification(e){const{badgeCount:t}=e;void 0!==t&&(this.badgeCount=t),this.sendNotification(e.payload)}sendNotification(e){const{remoteApplicationViewController:t}=this;if(!t)return;const{remoteInstanceState:n}=t;Object(c.c)(n,c.a.RUNNING)?this._sendNotification(e):this._pendingNotifications.push(e)}preferencesDidUpdate(e){const t=this.remoteApplicationViewController.remoteInstanceState;Object(c.c)(t,c.a.RUNNING)&&this._sendPreferences(e)}tileDataDidUpdate(e){const{remoteApplicationViewController:t}=this;if(!t)return;const{remoteInstanceState:n}=t;Object(c.c)(n,c.a.RUNNING)&&this._sendTileData(e)}whatsNewDidDisplay(e,t){const{remoteApplicationViewController:n}=this;if(!n)return;const{remoteInstanceState:r}=n;Object(c.c)(r,c.a.RUNNING)?n.whatsNewDidDisplay(e,t):this._pendingWhatsNewDidDisplay={wasDisplayed:e,shouldShowButton:t}}remoteInstanceWillBeginLaunching(e){const{applicationInfo:t,applicationContext:n,applicationSlowLoadingTimeout:r,delegate:i}=this;i&&e.invokeLaterSupport.invokeLater((()=>i.childApplicationIsLoadingSlowly(this)),r,R);const o=t.applicationName;n.childLoadStat=new f.a("childLoad",{childName:o}).time(),n.willFinishLaunchingStat=new f.a(`${o}.willFinishLaunching`).time(),n.didFinishLaunchingStat=new f.a(`${o}.didFinishLaunching`).time(),n.canBecomeInteractiveStat=new f.a(`${o}.canBecomeInteractive`).time(),n.didBecomeInteractiveStat=new f.a(`${o}.didBecomeInteractive`).time(),this._performDependentOperationsForLaunch(),this._performNonBlockingOperationsWhileLaunching()}remoteInstanceWillFinishLaunching(e,t){const{applicationContext:n={},applicationInfo:r,_dependentOperationsForLaunchPromise:i}=this,{relativePath:o,hash:s,launchItem:u,willFinishLaunchingStat:l,launchPath:d}=n;t.relativePath=o,t.hash=s,t.launchItem=u,t.launchPath=d,void 0!==n.timeBeforeLaunch&&(t.timeBeforeLaunch=n.timeBeforeLaunch),i.then((i=>{if(Object(c.c)(e.remoteInstanceState,c.a.LOADED)){const o=i.get(k),s=!o||null!==o&&void 0!==o&&o.hasErrors?void 0:o.results[0];s?(n.launchItem=s,t.launchReason=_.b.ITEMS_OPENED,t.itemsToOpen=[{type:"CLOUDKIT_RECORD_INFO",item:s}]):n.launchSource&&n.launchSource.reason&&(t.launchReason=n.launchSource.reason),n.launchItem&&!t.launchItem&&(t.launchItem=n.launchItem);const c=r.applicationName,u=a.b.getStartupInfoForApp(c);if(u&&(t.startupInfo=u),l){l.end();const e=new g.a(l.statName,{duration:l.duration});h.b.sharedInstance.recordPerfStat(e)}e.runRemoteInstance(t)}}),(e=>{throw e}))}remoteInstanceDidFinishLaunching(e,t){var n;const r=this.applicationInfo,{childLoadStat:i,didFinishLaunchingStat:o}=this.applicationContext,s=h.b.sharedInstance;let c;if(t){const{launchData:e,launchReason:n}=t;if(e){c=e.buildInfo;const t=r.applicationName,n=e.windowPerfStats||{};i.addAdditionalProperties(n);const{mainProcessDuration:o,mainFetchDuration:a,mainProcessDelay:u,tcpTime:l,timeToFirstByteOfDocument:d}=n,p=a+u,f=l+d;if(!isNaN(o)){const e=new g.a(`${t}.loadSuccess.mainProcessDuration`,{...c,duration:o});s.recordPerfStat(e)}if(!isNaN(p)){const e=new g.a(`${t}.loadSuccess.timeTillExecution`,{...c,duration:p});s.recordPerfStat(e)}if(!isNaN(f)){const e=new g.a(`${t}.loadSuccess.timeTillFetch`,{...c,duration:f});s.recordPerfStat(e)}}c&&i.addAdditionalProperties(c),n&&i.addAdditionalProperties({launchReason:n})}if(!t||!t.launchReason){const e=r.applicationName,t=new f.a("invalidLaunchOptions",{...c,applicationName:e});s.recordStat(t)}if(s.recordStat(i.success()),o){o.end();const e=new g.a(o.statName,{duration:o.duration});s.recordPerfStat(e)}const{additionalProperties:{childName:u},duration:l}=i,d=`${u}.loadSuccess`,p=new g.a(d,{...c,duration:l,isUsedForLoadBucketing:!0,loadedAppName:u});s.recordPerfStat(p),null===(n=this.delegate)||void 0===n||n.childApplicationDidFinishLaunching(this),this._sendPendingNotifications(),this._sendPendingStartupResponse(),this._sendPendingWhatsNewDidDisplay();const m=a.b.registry;this._sendPreferences(m)}remoteInstanceDidBecomeInteractive(e,t){var n,r;const{canBecomeInteractiveStat:i,didBecomeInteractiveStat:o}=null!==(n=this.applicationContext)&&void 0!==n?n:{};if(null===(r=this.delegate)||void 0===r||r.childApplicationDidBecomeInteractive(this),i&&void 0===i.endTimestamp&&this._reportInteractiveStat(i,t,e),o&&void 0===o.endTimestamp){const n=()=>{this._reportInteractiveStat(o,t,e),this.reportPendingDidBecomeInteractive=void 0,E.a.sharedInstance.endLoadPerformanceMeasurement(this.applicationInfo.applicationName)};this.isActive?n():this.reportPendingDidBecomeInteractive=n}}_reportInteractiveStat(e,t,n){if(e&&void 0===e.endTimestamp){var r;const i=h.b.sharedInstance;e.end();let o=e.statName;n&&(o=`${o}.${n}`);let a={duration:e.duration,launchReason:null===(r=this.applicationContext)||void 0===r||null===(r=r.launchSource)||void 0===r?void 0:r.reason};t&&(a={...a,additionalProperties:t});const s=new g.a(o,a);i.recordPerfStat(s)}}remoteInstanceDidTerminate(e,t,n){var r;t!==l.a.USER_INITIATED&&console.error(`remoteInstanceDidTerminate:\nREASON: ${t}\nINFO: ${n?Object(i.b)(n):""}`);const{terminatedProcessState:o,errorMessage:a}=n,s=o||"UNKNOWN",{applicationInfo:{applicationName:c}}=this,u=this.applicationContext.childLoadStat;if(u&&u.status===f.b.NOT_SET&&t!==l.a.LAUNCH_DEPENDENCY_UNAVAILABLE){h.b.sharedInstance.recordStat(u.failure({reason:t,processState:s}));const e=u.duration,n=`${c}.loadFailure`,r=new g.a(n,{reason:t,duration:e});h.b.sharedInstance.recordPerfStat(r);const i=`${n}.${t}`,o=new g.a(i,{duration:e});h.b.sharedInstance.recordPerfStat(o)}else{const e=`${c}.terminated`,n=new f.a(e,{reason:t,processState:s,errorMessage:a});h.b.sharedInstance.recordStat(n);const r=`${e}.${t}`,i=new f.a(r,{processState:s});h.b.sharedInstance.recordStat(i)}null===(r=this.delegate)||void 0===r||r.childApplicationDidTerminate(this,t,n)}_performNonBlockingOperationsWhileLaunching(){this._fetchStartup()}_fetchStartup(){var e;e=this.applicationInfo,a.b.getStartupInfoForApp(e.applicationName)&&async function(e){const t=a.b.getStartupInfoForApp(e.applicationName);if(!t)return null;const{method:n,url:r,requestPayload:i}=t;try{const e=await o.a.fetchURL(r,{method:n,body:JSON.stringify(i)});return{payload:await e.json(),status:e.status}}catch{return null}}(this.applicationInfo).then((e=>{this._sendStartupResponseIfPossible(e)}),(e=>{this._sendStartupResponseIfPossible(null)}))}_sendStartupResponseIfPossible(e){if(!e)return;const{remoteApplicationViewController:t}=this;this._pendingStartupResponse=e,t&&Object(c.c)(t.remoteInstanceState,c.a.RUNNING)&&this._sendPendingStartupResponse()}_sendPendingStartupResponse(){const{remoteApplicationViewController:e}=this;if(!e)throw new Error("The internal _sendPendingStartupResponse should only be called when there is a running remote instance");const t=this._pendingStartupResponse;if(!t)return;this._pendingStartupResponse=null;const n=t.payload||null;e.didFetchStartup(n,t.status)}_performDependentOperationsForLaunch(){const e=new D;e.register("PRELOAD_APP_PREFERENCES",N(this.applicationInfo,this.remoteApplicationViewController)),e.register("PRELOAD_CORE_TYPES",this._preloadCoreTypesIfNeeded()),e.register(k,this._resolveShortGuidIfNeeded()),this._dependentOperationsForLaunchPromise=e.all()}_preloadCoreTypesIfNeeded(){var e;const{applicationInfo:{shouldPreloadCoreTypes:t}}=this,n=null===(e=T.h.value)||void 0===e?void 0:e.details;return t&&n&&n.brMigrated?m.a.sharedInstance.setupThirdPartyAppIcons():Promise.resolve()}_resolveShortGuidIfNeeded(){const{applicationContext:e,applicationInfo:t,remoteApplicationViewController:n,applicationInfo:{cloudKitInfo:r}}=this,i=new s.a;if(!e.launchItem&&function(e){const{cloudKitInfo:t,selfRouteInfo:n}=e;return!n&&t&&t.partition&&t.containerIdentifier}(t)){const{shortGuid:t,shareRecord:o}=e,a=t||o&&o.shortGuid;if(a){const{containerIdentifier:e,partition:t}=r;return async function(e,t,n,r){return(await e.instanceForContainer(n,r)).resolveShortGUID(t)}(i,a,e,t).then((e=>{if(!Object(c.c)(n.remoteInstanceState,c.a.TERMINATED))if(!e||e.hasErrors){let t,i;e&&Object(O.b)(e)?(t=Object(d.a)(r.recoverableErrorTitleLocKey),i=Object(d.a)(r.recoverableErrorSubtitleLocKey)):t=Object(d.a)(r.unrecoverableErrorTitleLocKey),n.remoteInstanceDidFatalError(l.a.LAUNCH_DEPENDENCY_UNAVAILABLE,{title:t,subtitle:i,errorMessage:"Could not resolve the short guid"})}else{const e=p.a.sharedInstance,t=e.redirectedAuthDetails;let n="";if(t){const r=t.accountName;r&&(n=r),e.redirectedAuthDetails=null,Object(P.a)(n,!0);const i=new f.a("userWasRedirectToCorrectDomainToAuthenticate");h.b.sharedInstance.recordStat(i)}}return e}))}}return Promise.resolve()}_sendNotification(e){const{remoteApplicationViewController:t}=this;if(!t)throw new Error("The internal _sendNotification should only be called when there is a running remote instance");t.sendNotificationToRemoteInstance(e)}_sendPendingNotifications(){const{_pendingNotifications:e}=this;if(e){for(const t of e)this._sendNotification(t);e.splice(0,e.length)}}_sendPendingWhatsNewDidDisplay(){const{remoteApplicationViewController:e}=this;if(!e)throw new Error("The internal _sendPendingWhatsNewDidDisplay should only be called when there is a running remote instance");const{_pendingWhatsNewDidDisplay:t}=this;if(t){const{wasDisplayed:n,shouldShowButton:r}=t;e.whatsNewDidDisplay(n,r),this._pendingWhatsNewDidDisplay=void 0}}_sendPreferences(e){const{remoteApplicationViewController:t}=this;if(!t)throw new Error("The internal _sendPreferences should only be called when there is a running remote instance");t.preferencesDidUpdate(e)}_sendTileData(e){const{remoteApplicationViewController:t}=this;if(!t)throw new Error("The internal _sendTileData should only be called when there is a running remote instance");t.tileDataDidUpdate(e)}}function N(e,t){var n;const i=null===(n=T.h.value)||void 0===n?void 0:n.details;return null!==i&&void 0!==i&&i.completedAuthenticationStep||!e.allowsUnauthenticatedMode?null!==i&&void 0!==i&&i.completedAuthenticationStep&&null!==i&&void 0!==i&&i.totalAuthenticationSteps&&(null===i||void 0===i?void 0:i.completedAuthenticationStep)>0&&(null===i||void 0===i?void 0:i.completedAuthenticationStep)<(null===i||void 0===i?void 0:i.totalAuthenticationSteps)&&e.allowsOneFactorAuthenticationMode?Promise.resolve(I.Result.success()):a.b.isAppPreferencesReady(e.authBagId).then((n=>n.isOK?I.Result.success():(null===t||void 0===t||t.remoteInstanceDidFatalError(l.a.LAUNCH_DEPENDENCY_UNAVAILABLE,{title:Object(d.a)("KVS.Unavailable.Title",{appName:Object(r.e)(e.configuration)}),errorMessage:"fetching KVS app preferences failed"}),I.Result.failure(new Error("App preferences are not initialized"))))):Promise.resolve(I.Result.success())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(900),i=n(916),o=n(901),a=n(1247),s=n(898),c=n(1310),u=n(1249),l=n(1252),d=n(925),p=n(2209),f=n(1308),h=n(2180);let m=function(e){return e[e.NOT_AUTHENTICATED=0]="NOT_AUTHENTICATED",e[e.PARTIALLY_AUTHENTICATED_HSA=1]="PARTIALLY_AUTHENTICATED_HSA",e[e.AUTHENTICATED=2]="AUTHENTICATED",e[e.PARTIALLY_AUTHENTICATED_MANAGED_APPLE_ID=3]="PARTIALLY_AUTHENTICATED_MANAGED_APPLE_ID",e}({});var g=n(1309),v=n(1248),y=n(903),b=n(980),w=n(987),S=n(2155),C=n(2248),_=n(923);class O{static getAppPreferences(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};for(const r of e){var n;t[r]=null!==(n=h.b.getPreferences(r))&&void 0!==n?n:{}}return t}static getLocales(e){const t=new Set(e);return f.a.filter((e=>t.has(e.locale)))}static getCloudOSActions(){return["fetchAppUrl","resolveCKShortGUID","fetchIcon","getConformingTypes","meCardUpdated","requestMeCard","deleteMeCardPhoto","storeMeCardPhoto","refreshAppPreferences","setAccountPreference","setAppPreferences","refreshQuotaData","loadRulesForRegions","setStartupInfo","setStartupUrl","startupDataIsLoaded","beginStat","didReceiveSpecialResponse","endStat","recordApplicationMessage","recordStat","recordPerfStat","requestSent","requestReceived","completeAuthentication","logoutFromAllBrowsers","performLogout","replaceCurrentApp","revalidateUser","sendLocalNotification","setAppBanner","setBadgeCount","setRoute","setTitle","showAccountSettings","showAppSwitcher","showAccountMenu","showWhatsNew","showLocalNotification","showSpringBoard","switchToApplication","applicationIsReady","appWillUnload","exit","handleApplicationCrash","isReadyToTerminateDidChange","relayKeyboardShortcut","relayMouseMove","reload","reloadWhenCanTerminate","showCreationMenu","showStorageUsageWarning","showADPAnnouncement","showBeneficiaryAnnouncement","didBecomeInteractive"]}static getCloudOSState(e,t,n,f,O){var E,I,A,T,P,R,k,D,M,N,x,L,j,U;const F=i.a.sharedInstance,{hostname:z,clientId:B}=s.a,K=null===(E=C.c.value)||void 0===E?void 0:E.rawConfiguration,H=null!==(I=null===K||void 0===K?void 0:K.isCarryUser)&&void 0!==I&&I,W=null===K||void 0===K||null===(A=K.dsInfo)||void 0===A?void 0:A.statusCode,q={horizontal:Object(u.a)(),vertical:Object(l.a)()},V=window.hasEnteredLimitedExperienceMode,$=Object(g.a)(),G=r.a.sharedInstance.current.servicesDomain,Z=r.a.sharedInstance.current,Q=`www.${G}`,Y=Z===o.b,J=Z===o.c,X=Z===o.f,ee=Z===o.g,te=G===o.d.servicesDomain?"cn":"",ne=p.a.sharedInstance.regionFormattingRules,re=p.a.sharedInstance.regionFormatBaseUrl,ie=p.a.sharedInstance.regionFormatRulesVersion,oe=this.getLocales(_.b),ae=this.getLocales(_.c),se=null!==(T=t.identifier)&&void 0!==T?T:null;let ce=Object(v.e)(t);"find"===t.identifier&&q.horizontal===y.e.REGULAR&&(ce=Object(d.a)("CloudOS.LandingPage.Find.DisplayName"));const ue=a.a.sharedInstance.configurations.map((e=>e.applicationInfo.authBagId)),le=this.getAppPreferences(ue)||{},de=h.b.getAccountPreferences()||{},pe=h.b.getStartupInfoForApp(e.path);let fe=null,he=null;pe&&(fe=pe.url,he=pe);const me=null!==(P=null===(R=S.h.value)||void 0===R?void 0:R.details)&&void 0!==P?P:null,ge=(Ee=null!==(k=null===me||void 0===me?void 0:me.completedAuthenticationStep)&&void 0!==k?k:0,Ie=null!==(D=null===me||void 0===me?void 0:me.totalAuthenticationSteps)&&void 0!==D?D:0,0===Ee?m.NOT_AUTHENTICATED:Ee<Ie?m.PARTIALLY_AUTHENTICATED_HSA:m.AUTHENTICATED),ve=Object(c.a)(),ye=Object(c.b)(),be=Object(b.b)(),we=null===be||void 0===be?void 0:be.storageQuota,Se=we?{overQuota:we.quotaStatus.overQuota,haveMaxQuotaTier:we.quotaStatus.haveMaxQuotaTier,"almost-full":we.quotaStatus["almost-full"],paidQuota:we.quotaStatus.paidQuota,compStorageInBytes:we.storageUsageInfo.compStorageInBytes,usedStorageInBytes:we.storageUsageInfo.usedStorageInBytes,totalStorageInBytes:we.storageUsageInfo.totalStorageInBytes,commerceStorageInBytes:we.storageUsageInfo.commerceStorageInBytes,storageUsageByMedia:we.storageUsageByMedia,familyStorageUsageInfo:we.storageUsageInfo}:void 0,Ce=null!==(M=null===(N=C.c.value)||void 0===N?void 0:N.environment)&&void 0!==M?M:"PROD",_e=null!==(x=null===n||void 0===n?void 0:n.applicationRelativePath)&&void 0!==x?x:null,Oe=null!==(L=null===n||void 0===n?void 0:n.applicationHash)&&void 0!==L?L:null;var Ee,Ie;return{accountMenu:{items:[{title:Object(d.a)("CloudOS.AccountMenu.Settings.Title"),target:"CloudOS",action:"showAccountSettings",disableWhenCurrentApp:"settings"},{title:Object(d.a)("CloudOS.Authentication.SignOutButton.Title"),target:"CloudOS",action:"performLogout"}],width:200},accountPreferences:de,additionalClassNamesForBody:te,appPreferences:le,appsInfo:null,authBag:K,availableLocales:oe,clientId:B,currentlyActiveApplication:se,defaultAssetHostname:Q,displayName:ce,environment:Ce,hostname:z,isBeta:Y,isCarry:J,isCarryUser:H,isFuture:X,isADP:ve,isBeneficiary:ye,isSprinkles:ee,isCloudOS2:!0,limitedExperienceMode:V,primaryInteractionMode:s.a.primaryInteractionMode,isOnSupportedMobile:null,localesSupportedByAllApps:ae,meCard:null!==(j=null===(U=Object(w.b)())||void 0===U?void 0:U.meCard)&&void 0!==j?j:null,mininumWindowSize:{width:320,height:240},pushToken:null,quotaData:Se,sizeClass:q,visualViewport:$,regionFormattingRules:ne,regionFormattingRulesBaseUrl:re,regionFormattingRulesVersion:ie,requestedStartupUrl:fe,requestedStartupInfo:he,route:_e,routeHash:Oe,secureChannelInfoData:null,sessionID:F.identifier,userAuthenticationState:ge,userStatusCode:W,versions:null,launchItem:f,launchReason:O}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(870),i=n(1215),o=n.n(i),a=n(2249),s=n(902),c=n(1451),u=n(2298);const l=e=>{let{className:t,action:n}=e;const i=o()("redirect-page",t),l=r.useRef(null),d=a.c(window.location.href),p=d.searchParams.get("env")||"PROD",f=Object(c.c)(p).toString(),h=a.c(`${f}${c.a}`).toString(),m=d.searchParams.get("alternateDSID")||"",g=d.searchParams.get("isNativeTakeOverLogin")||"false",v=n||"manage_appleid",[y,b]=r.useState("");return r.useEffect((()=>{(async()=>{try{const e=await Object(u.a)(),t=e.status,n=e.centralizedWebToken;if("success"!==t||!n)return void s.a(f);b(window.btoa(`${m}:${n}`))}catch(e){return void s.a(f)}})()}),[f,m]),r.useEffect((()=>{l.current&&""!==y&&l.current.submit()}),[y]),r.createElement("div",{className:i},r.createElement("form",{ref:l,action:h,method:"POST"},r.createElement("input",{type:"hidden",name:"referrer",value:"icloud"}),r.createElement("input",{type:"hidden",name:"nativeTakeOver",value:g}),r.createElement("input",{type:"hidden",name:"action",value:v}),r.createElement("input",{type:"hidden",name:"token",value:y})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1215),i=n.n(r),o=n(870),a=n(1335),s=n(1250);let c=1;function u(e){let{to:t}=e;const n=o.useRef([]),r=Object(s.a)(),u=o.useMemo((()=>{if(t)return{key:c++,element:t,isCurrent:!0}}),[t]),l=Object(a.a)(u);if(l!==u&&l){const e={...l,isCurrent:!1};n.current=[...n.current,e],setTimeout((()=>{n.current=n.current.filter((t=>t!==e)),r()}),500)}const d=u?[...n.current,u]:n.current;return o.createElement("div",{className:"notification-presenter"},d.map((e=>{let{element:t,key:n,isCurrent:r}=e;return o.cloneElement(t,{className:i()(t.props.className,r?"slide-in":"slide-out"),key:n,ariaHidden:!r})})))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"d",(function(){return g}));var r=n(2159),i=n(885),o=n(886),a=n(2249);const s=Object(r.signal)(null),c=crypto.randomUUID(),u=Object(r.computed)((()=>{var e;const t=s.value;return t?function(e,t){const n=a.b(e),{searchParams:r}=n;for(const[i,o]of Object.entries(t))null!==o&&void 0!==o&&r.set(i,String(o));return n}(null!==(e=t.urls.accountAuthorizeUI)&&void 0!==e?e:t.urls.accountLoginUI,{redirect_uri:globalThis.location.origin,response_mode:"web_message",response_type:"code",frame_id:c}).href:null}));function l(){const e=Object(r.effect)((()=>{const t=s.value;if(!t)return;const n=(()=>{const e=t.environment;return"PROD"===e?"https://appleid.cdn-apple.com/appleauth/static/jsapi/authService.latest.min.js":"ICLOUD3"===e?"https://idmsauth-stable.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js":"https://idmsauth-uat.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js"})();Object(i.a)(n,(()=>{var e;return!(null===(e=globalThis.AppleID)||void 0===e||!e.service.auth)}),3).finally((()=>{e()}))}))}function d(){var e;return!(null!==(e=s.value)&&void 0!==e&&e.environment)||"ICLOUD1"===s.value.environment||"PROD"===s.value.environment}function p(e,t){var n;return o.e(null!==(n=s.value)&&void 0!==n?n:void 0,e,t)}function f(e){var t;return o.c(null!==(t=s.value)&&void 0!==t?t:void 0,e)}function h(e){var t;return o.d(null!==(t=s.value)&&void 0!==t?t:void 0,e)}function m(e){var t;return o.b(null!==(t=s.value)&&void 0!==t?t:void 0,e)}function g(){var e;return o.a(null!==(e=s.value)&&void 0!==e?e:void 0)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));const r=Symbol("isSafeUrl"),i=Object.freeze(["javascript","data"]);function o(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e instanceof URL&&function(e){return!0===e[r]}(e))return e;const o=new URL(e,n.base||void 0),a=o.protocol.slice(0,-1);if(i.includes(a)&&(null===(t=n.dangerouslyAllowProtocols)||void 0===t||!t.includes(a)))throw Error("Bad URL protocol!");return function(e){const t=e;return t[r]=!0,t}(o)}function a(){var e;return(null===(e=globalThis.document.querySelector("base"))||void 0===e?void 0:e.href)||globalThis.location.href}function s(e,t){return o(e,{...t,base:a()})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2249);const i={url:r.c("https://www.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"www"},o={url:r.c("https://www.icloud.com.cn/"),servicesDomain:"icloud.com.cn",domainLogo:"icloud.cn.logo",cookiesDomain:"icloud.com.cn",rootDomain:"www"},a={url:r.c("https://beta.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"beta"},s={url:r.c("https://future.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:a,cookiesDomain:"icloud.com",rootDomain:"future"},c={url:r.c("https://carry.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:i,cookiesDomain:"icloud.com",rootDomain:"carry"},u={url:r.c("https://sprinkles.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"sprinkles"},l=[i,o,a,s,c,u];var d;class p{constructor(){this.current=(()=>{const e=window.location.hostname;for(const t of l)if(t.url.hostname===e)return t;throw new Error(`hostname ${e} is not supported`)})(),this.allowedRemoteOrigins=l.map((e=>e.url.origin))}findAvailableHostname(e){for(let t=this.current;t;t=t.fallbackDomain)if(e.includes(t))return t.url.hostname;return null}get isDomainCN(){return this.current===o}}d=p,p.sharedInstance=new d},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return S}));var r=n(2243),i=n(898),o=n(977),a=n(976),s=n(2175),c=n(974),u=n(924);const l=(e,t,n,r,i)=>{const o=`${i?`${i}: `:""}Request timeout after ${e.toFixed(1)}ms`,a=new Response(o,{status:408,statusText:o}),s=()=>{const e=window.performance.now()-r;a.took=e,a.message=`${o} (arrived after ${e.toFixed(1)}ms)`};return t.then(s,s),Object.assign(a,{responsePromise:t,ms:e,url:n,message:o,startTime:r,schemaName:i})};var d=n(2208),p=n(919),f=n(918),h=n(2155),m=n(965),g=n(2248),v=n(2134);async function y(e,t){var n;const{type:m=""}=(null===t||void 0===t?void 0:t.validate)||{};if(Object(c.a)(s.a.failRequests,m))return Promise.reject(new Error(`Manually failed "${m}" fetch by featureFlag`));const{defaultQueryParameters:g}=t||{},{href:v,hostname:y,pathname:b}=Object(u.a)(e,null!==g&&void 0!==g?g:{clientBuildNumber:i.a.buildNumber,clientMasteringNumber:i.a.masteringNumber,clientId:i.a.clientId,dsid:null===(n=h.h.value)||void 0===n||null===(n=n.details)||void 0===n?void 0:n.dsid}),{dontReportServerError:w,reportingPathname:S=b,shouldReportSuccess:O=!0,shouldReportFailure:E=!0,timeout:I,validate:A,maxAttempts:T=1,...P}=t||{};let R,k,D,M,N=1;do{var x,L,j,U,F,z;N>1&&await Object(a.a)(200*Math.pow(2,N),`try ${N} loading ${e}`),D=window.performance.now();try{R=window.fetch(v,P),k=await(I?Promise.race([R,Object(a.a)(I,v,null)]):R)}catch(H){var B;throw H instanceof Error&&d.b.sharedInstance.recordStat(new p.a("CloudOSReportingURLConnectionFetch.failure",{url:Object(f.d)(e.toString()),method:null!==(B=P.method)&&void 0!==B?B:"GET",error:H.name,message:H.message})),H}const t=window.performance.now(),n=null!==(x=null===(L=k)||void 0===L?void 0:L.status)&&void 0!==x?x:0,s=C(n,E,O)?{httpMethod:null!==(j=P.method)&&void 0!==j?j:"GET",statusCode:n,hostname:y,serviceName:_(v),clientTiming:t-D,net_uncompressedResponseSize:null!==(U=null===(F=k)||void 0===F||null===(F=F.headers)||void 0===F?void 0:F.get("content-length"))&&void 0!==U?U:0,timedOut:!1,urlPath:S,dontReportServerError:w}:null;var K;if(r.a.sharedInstance.recordStat({appName:i.a.applicationName,masteringNumber:i.a.masteringNumber,buildNumber:i.a.buildNumber},s,n,v),A&&N!==T&&null!==(z=k)&&void 0!==z&&z.ok)try{const e=Object(o.b)(k,A,D);return await e.json(),e}catch{M=!1}else M=null===(K=k)||void 0===K?void 0:K.ok}while(++N<T&&!M);return null===k?l(I,R,v,D,m):A?Object(o.b)(k,A,D):k}async function b(e,t){const n=await y(e,t);return S(n.status,!0),n}let w=0;function S(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case 330:if(w=w?++w:1,w>3)return void window.setTimeout((()=>{w=0}),1e4);Object(m.s)();break;case 403:case 421:case 401:if(403===e&&t)break;h.e.value&&v.a.cloudOSApplication.unauthenticateUser({trustBrowserConfirmation:!1})}}function C(e,t,n){return 330===e||401===e||421===e||423===e||503===e||(e<200?t:e<400?n:t)}function _(e){const t=Object(g.i)(e.toString());if(t)return t;const n=e.match("https://p*[0-9]*-*([a-zA-Z0-9]*).");return n?n[1]:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r=new Date("Thu, 01-Jan-1970 00:00:01 GMT;");class i{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.name=e,this.value=t,this.path=n,this.domain=r,this.expirationDate=i,this.isSecure=o}get cookieString(){const{name:e,value:t,path:n,domain:r,_expirationDateStringGMT:i,_sslString:o}=this;return`${e}=${t};path=${n};${r?`domain=${r};`:""}${i}${o}`}expire(){this.value="",this.expirationDate=r}get _expirationDateStringGMT(){let{expirationDate:e}=this;return e?`expires=${new Date(e).toUTCString()};`:""}get _sslString(){return this.isSecure?"Secure;":""}}class o{constructor(e){this._cookies=new Map,this.defaultDomain=e}readCookieValue(e){const t=this._fetchCookie(e);return t?t.value:""}readCookie(e){return this._fetchCookie(e)}writeCookie(e,t,n){let r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=null,c=null;return void 0!==t&&null!==t||(c=this._fetchCookie(e),c&&c.expire()),a&&(r=1e3*a*60*60,s=new Date((new Date).getTime()+r)),c||(c=this._createCookie(e,null!==t&&void 0!==t?t:"",n,o,null!==s&&void 0!==s?s:void 0,i)),document.cookie=c.cookieString,c}updateCookie(e){const{_cookies:t}=this;if(this._fetchCookie(e.name))return t.set(e.name,e),this.writeCookie(e.name,e.value);throw"Unable to find the cookie provided to update"}deleteCookie(e){const{_cookies:t}=this;let n=null;return this._fetchCookie(e)&&(n=this.writeCookie(e,""),t.delete(e)),n}deleteAllCookies(){const{_cookies:e}=this;e.forEach((e=>{this.deleteCookie(e.name)}))}_fetchCookie(e){var t;const{_cookies:n}=this;let r=null!==(t=n.get(e))&&void 0!==t?t:null;return r||document.cookie.split(";").forEach((t=>{const n=t.match(`${e}=(.*)`);if(n&&n[1]){let t=n[1];r=this._createCookie(e,t)}})),r}_createCookie(e,t,n,r,o,a){r||(r=this.defaultDomain);let s=new i(e,t,n,r=`.${r}`,o,a);return this._cookies.set(s.name,s),s}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(1026),i=n(1018),o=n(1010),a=n(1011),s=n(1020),c=n(1023),u=n(1019),l=n(1025),d=n(1016),p=n(1021),f=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function h(e,t,n){return void 0===t&&(t=function(e){return e}),{handler:e,error:function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=t(l.a.apply(void 0,f([n],r)).level(p.a.Error));return e.log(o),new d.a(o.logString)},warn:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Warn,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Warn)))},info:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Info,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Info)))},log:function(r){n&&!n.shouldLoggerLogAtLevel(r.logLevel,this)||e.log(t(r))},http:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.HTTP,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.HTTP)))},performance:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Performance,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Performance)))},verbose:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Verbose,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Verbose)))},debug:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Debug,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Debug)))},silly:function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];n&&!n.shouldLoggerLogAtLevel(p.a.Silly,this)||e.log(t(l.a.apply(void 0,f([r],i)).level(p.a.Silly)))}}}var m=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},g=function(){return g=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},g.apply(this,arguments)},v=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function y(e,t,n,r,i){var s=Object.assign((function(){return r.tag(t,(function(e){return new o.a(n,i,Object(o.b)(e)?e:null)}))}),{id:function(i){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return y(e,t,n,r,a.b.apply(void 0,v([i],o)))}});return s}var b,w,S,C=new i.a(new a.a([]));function _(e,t){var n=void 0===t?{}:t,i=n.baseMessage,o=void 0===i?C:i,l=n.transform,d=void 0===l?function(e){return e}:l,p=n.filter,f=function(e){return d(e.tags(o.logTagKeys,o.logTagValues))},O=h(e,f,p);return g(g({isLogger:!0},O),{handler:e,baseMessage:o,logTransform:f,options:{baseMessage:o,transform:d,filter:p},get logSource(){return this.baseMessage.logSource},get logActivity(){return this.baseMessage.logActivity},log:function(t){p&&!p.shouldLoggerLogAtLevel(t.logLevel,this)||e.log(d(t))},transform:function(t){return _(e,g(g({},this.options),{transform:function(e){return t(d(e))}}))},withTransform:function(t){return _(e,g(g({},this.options),{transform:t}))},source:function(t){return _(e,g(g({},this.options),{baseMessage:this.baseMessage.source(t)}))},child:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return y(e,c.h,a.b.apply(void 0,v([t],n)),this)},activity:function(t){return _(e,g(g({},this.options),{baseMessage:this.baseMessage.activity(Object(r.a)(t)?t.logActivity:t)}))},begin:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return y(e,c.a,a.b.apply(void 0,v([t],n)),this)},tag:function(t,n){return void 0===n&&(n=null),_(e,g(g({},this.options),{baseMessage:this.baseMessage.tag(t,n)}))},package:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.tag(c.g,a.b.apply(void 0,v([e],t)))},subsystem:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.tag(c.i,a.b.apply(void 0,v([e],t)))},category:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.tag(c.b,a.b.apply(void 0,v([e],t)))},mark:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.tag(c.d).performance(b||(b=m(["Mark: ",""],["Mark: ",""])),a.b.apply(void 0,v([e],t)))},measure:function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Object(u.a)();return this.tag(c.f).performance(w||(w=m(["Begin: ",""],["Begin: ",""])),a.b.apply(void 0,v([e],n))),{end:function(){var r=Object(u.a)()-i;return t.tag(c.e).performance(S||(S=m(["End: "," (","ms elapsed)"],["End: "," (","ms elapsed)"])),a.b.apply(void 0,v([e],n)),r),r}}},sep:h(e,(function(e){return f(e.style(s.a.Separator))}),p),break:h(e,(function(e){return f(e.style(s.a.Break))}),p),h1:h(e,(function(e){return f(e.style(s.a.H1))}),p),h2:h(e,(function(e){return f(e.style(s.a.H2))}),p),h3:h(e,(function(e){return f(e.style(s.a.H3))}),p),h4:h(e,(function(e){return f(e.style(s.a.H4))}),p),h5:h(e,(function(e){return f(e.style(s.a.H5))}),p)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,i,o,a,s=n(1010),c=n(1011),u=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},l=Object(c.b)(r||(r=u(["."],["."]))),d=Object(c.b)(i||(i=u(["["],["["]))),p=Object(c.b)(o||(o=u(["]"],["]"])));function f(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1/0),Object(s.b)(e)||null===e?function(e,t,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=1/0);for(var s=[],l=e,f=[];l;)f.push(l),l=l.parent;f.reverse();for(var h=i;h<Math.min(f.length,i+o);h++){h>0&&s.push.apply(s,n.fragments);var m=f[h];s.push.apply(s,(g=m,Object(c.b)(a||(a=u(["","","","",""],["","","","",""])),g.message,d,g.id,p)).fragments)}var g;return 0===s.length?c.a.empty:new c.a(s)}(e,0,l,0,t,n):e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return E})),n.d(t,"c",(function(){return I})),n.d(t,"a",(function(){return T}));var r=n(1029),i=n.n(r),o=n(1075),a=n(1077),s=n(1073),c=n(1074),u=n(1093),l=n(1027),d=n(1038),p=n(1090),f=n(2227),h=n(1037),m=n(1039),g=n(1040),v=n(2253),y=n(1016),b=n(1011),w=n(2217);async function S(){return{connectionKeyPair:await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}}const C=1e4,_=Object(v.a)({log(){}}),O=new class{reportStat(){}reportPerf(){}reportError(){}reportPush(){}finishInit(){}didEncounterIssue(){}};function E(e){const{env:t,logger:n=_,feedback:r=O}=e,i=Object(f.a)(n),o=new s.a;return new h.a([c.b.useInstance(c.a[t]),d.a.useInstance(n),m.a.useInstance(i),g.a.useInstance(r),s.b.useInstance(o)])}async function I(e){const{topics:t,identity:n,provider:r}=e,s=Object(d.a)(r);s.info`Opening push connection`;const{connectionKeyPair:c,token:u}=n,l=function(e){const{token:t,connectionKeyPair:n}=e;return(e,r)=>T(e,n,r.timestamp,t)}({connectionKeyPair:c,token:u}),f=await async function(e,t){const{topics:n,connectMessage:r}=t,s=Object(d.a)(e);s.info`Creating webcourier connection`;let c=null;const u=new o.b(e,n);e.set(o.c.useInstance(u));const l=await Object(p.a)((async t=>{s.debug`Connection attempt [${t}]`,s.debug`Creating connect message`;const n=await r(e,{timestamp:null!==c&&void 0!==c?c:i.a.BigInt(Date.now())});if(n instanceof Error)return s.debug`Failed to create connect message`,n;s.debug`Sending connect message`;const l=await Object(p.b)((()=>u.connectWithMessage(n)),C);return l instanceof Error&&(l instanceof o.a&&(c=l.serverTimestamp),s.debug`Webcourier connection error: ${l}`,Object(a.b)(e).close()),l}),3);return l instanceof Error||s.debug`Webcourier connection established`,l}(r,{topics:t,connectMessage:l});if(Object(p.c)(f,(()=>s.warn`Failed to open push connection - error: ${f}`)))return f;const h={connectionKeyPair:c,token:f.pushToken};return f.setReconnectHandler((async e=>async function(e,t,n){if(!e.has(o.c))return new y.a(b.b`Can't reconnect as was never connected`);const r=Object(o.c)(e),{token:a,connectionKeyPair:s}=t;if(!s||!a)return new y.a(b.b`Can't reconnect as don't have token or key`);const c=Object(d.a)(e).begin`attemptReconnection`();c.info`Attempting reconnect.`,c.info`creating reconnect messsage for ${Object(w.c)(a)}`;const u=await T(e,s,null!==n&&void 0!==n?n:i.a.BigInt(Date.now()),a);if(u instanceof Error)return u;c.info`reconnecting... ${Object(w.c)(u)}`;const l=await r.reconnectWithMessage(u);return l instanceof Error||c.info`Push reconnected`,l}(r,h,e))),{connection:f,identity:h}}const A=86400;async function T(e,t,n,r){const i=Object(d.a)(e),o=await Object(u.a)(t,n);if(o instanceof Error)return i.debug`Failed to generate and sign WebCourier nonce`,o;if(r){const e=Object(l.c)(r);return{publicKey:o.publicKey,nonce:o.nonce,signature:o.signature,connectWithPushToken:{pushToken:e}}}return{publicKey:o.publicKey,nonce:o.nonce,signature:o.signature,newConnectionRequest:{tokenExpirationSeconds:A}}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return E}));var r=n(2218),i=n(970),o=n(2161),a=n(2180);const s=async(e,t)=>{let n;const r=new Promise(((e,r)=>{n=setTimeout((()=>r(new Error("Asynchrononous event timed out before event could be completed."))),t)}));return Promise.race([e,r]).then((e=>(clearTimeout(n),e)))};var c,u=n(2284),l=n(1165),d=n(465),p=n(914),f=n(1255),h=n(1256),m=n(919),g=n(920),v=n(1257),y=n(2155),b=n(2248);let w=function(e){return e.mail="mail",e.calendar="calendar",e}({});const S="iCloud.Browser.Notification.Identifier",C="pushNotification.registerOnLogin",_={devices:[],version:1},O={create_subscription_failed:"create_subscription_failed"};class E{constructor(){}get browserID(){let e=Object(l.a)(S);return(!e||e&&!/^(?:[a-zA-Z0-9]+-)+[a-zA-Z0-9]+$/.test(e))&&(e=Object(p.a)(),Object(l.b)(S,e)),e}async getNotificationSettingsAsync(){return await a.b.isReady,this.notificationSettings}get notificationSettings(){var e;const t=a.b.getAccountPreferences();return null!==(e=null===t||void 0===t?void 0:t.notificationSettings)&&void 0!==e?e:_}get pushEnabledApps(){const e=this.notificationSettings.devices.find((e=>e.id===this.browserID));return e?new Set(e.apps.flatMap((e=>e.enabled?[e.name]:[]))):new Set}async requestPermission(){return await Notification.requestPermission()}async getBrowserSubscription(){if(!Object(u.a)())return null;try{return await s(this.getBrowserSubscriptionInternal(),2e4)}catch(e){return new m.a("pushNotification.getSubscriptionFailure",{statCategory:g.a.SESSION,success:!1,error:Object(f.a)(e)}).record(),null}}async getBrowserSubscriptionInternal(){const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();return t?Object(h.a)("Existing Subscription"):Object(h.a)("No Existing Subscription"),t}async createNotificationSubscription(){let e;try{e=await s(navigator.serviceWorker.ready,2e4)}catch(n){const e=Object(f.a)(n);return new m.a("pushNotification.serviceWorkerReadyFailure",{statCategory:g.a.SESSION,success:!1,error:e}).record(),d.Result.failure(new Error(e))}if(!e)return d.Result.failure(new Error("Service Worker is Not Available"));try{var t;const n=Object(b.f)()&&"ICLOUD1"!==(null===(t=b.c.value)||void 0===t?void 0:t.environment)?"BIw9HNMKzIaNIF_CxSB2SYQJCBWYsLGZ7u5QRY0H6xYaOVOeXlRNi0UNnPT661vX9z6VDi7e-VtIVyi24nY-8jY=":"BPM78qt9kU6Od1Zm8KbLWa8-D8OnASXy0Bb7954zuwELAbifVkPr9Ij-iFpLctV-vmMvtjc_WdRm03Yf37PWbeY=",r=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:I(n)});return d.Result.success(r)}catch(n){const e=Object(f.a)(n);return new m.a("pushNotification.subscribeToPushError",{statCategory:g.a.SESSION,success:!1,error:e}).record(),d.Result.failure(new Error(e))}}async updateAccountPreferences(e,t){const n=y.h.peek();if(!n)return{success:!0};const i=Object(v.a)(this.notificationSettings),o=this.updateNotificationSettings(e,t),s={...a.b.getAccountPreferences(),notificationSettings:o};if(!e)return await a.b.setAccountPreferences(s),{success:!0};const c=P(o,e,n,this.browserID),u=await Object(r.b)(c);if(!u||0!==u.status)return new m.a("pushNotification.PDSRegistration",{statCategory:g.a.SESSION,success:!1,error:"PDS Registration Failure"}).record(),{success:!1,errorDesc:"PDS Registration Failure",errorCode:null===u||void 0===u?void 0:u.status};if(new m.a("pushNotification.PDSRegistration",{statCategory:g.a.SESSION,success:!0}).record(),(await a.b.setAccountPreferences(s)).isOK)return{success:!0};const l=A(i),d=await Object(r.b)({...c,pushTopics:l});return 0===(null===d||void 0===d?void 0:d.status)?{success:!1,errorDesc:"Rollback of PDS Registration due to KVS failure",errorCode:d.status}:{success:!1,errorDesc:"Failure to Rollback PDS Registration after KVS Failure",errorCode:null===d||void 0===d?void 0:d.status}}updateNotificationSettings(e,t){const n=this.notificationSettings;let r;return r=!t.has(w.mail)&&!t.has(w.calendar)||null===e?this.removeDeviceFromNotificationSettings(n):this.addOrUpdateDeviceInNotificationSettings(t,e.endpoint),r}addOrUpdateDeviceInNotificationSettings(e,t){var n,r;const s=function(e,t,n){return{id:e,subscription:n,apps:[{name:w.mail,topics:[o.c],enabled:t.has(w.mail)},{name:w.calendar,topics:[i.b],enabled:t.has(w.calendar)}]}}(this.browserID,e,t),c=null!==(n=null===(r=a.b.getAccountPreferences())||void 0===r||null===(r=r.notificationSettings)||void 0===r?void 0:r.devices.findIndex((e=>e.id===E.sharedInstance.browserID)))&&void 0!==n?n:-1,u=Object(v.a)(this.notificationSettings);return c>-1?u.devices[c]=s:u.devices.push(s),u}removeDeviceFromNotificationSettings(e){return{version:1,devices:e.devices.filter((e=>e.id!==E.sharedInstance.browserID))}}async tryRefreshPushRegistrationTTL(){try{if(0===this.pushEnabledApps.size)return;const e=y.h.peek();if(void 0===e)return;const t=await this.getBrowserSubscription();if(null===t)return;const n=P(this.notificationSettings,t,e,this.browserID);await Object(r.b)(n)}catch(e){new m.a("pushNotification.registerOnHeartbeat",{statCategory:g.a.USER,success:!1,error:Object(f.a)(e)}).record()}}async setupBrowserNotificationData(){let e=!1;try{const t=await this.getBrowserSubscription(),n=(await this.getNotificationSettingsAsync()).devices.find((e=>e.id===this.browserID));if(void 0===n)return void(t&&(e=!0,await t.unsubscribe()));if(t){if(t.endpoint===n.subscription)return;if(e=!0,!await t.unsubscribe())throw new Error("Unable to unsubscribe from the browser.")}const r=await this.createNotificationSubscription();if(!r.ok)return void new m.a(C,{statCategory:g.a.USER,success:!1,userMatchesPreviousSession:!e,error:Object(f.a)(r.error)}).record();const i=new Set(n.apps.flatMap((e=>e.name in w&&e.enabled?[e.name]:[]))),o=await this.updateAccountPreferences(r.value,i);if(!o.success)return void new m.a(C,{statCategory:g.a.USER,success:!1,userMatchesPreviousSession:!e,error:o.errorDesc}).record();new m.a(C,{statCategory:g.a.USER,success:!0,userMatchesPreviousSession:!e}).record()}catch(t){new m.a(C,{statCategory:g.a.USER,success:!1,userMatchesPreviousSession:!e,error:Object(f.a)(t)}).record()}}async onLogOut(){try{const e=y.h.peek();if(void 0===e)return;const t=await this.getBrowserSubscription();if(null===t)return;if(!await t.unsubscribe())throw new Error("Unable to unregister subscription from browser");const n=P(_,t,e,this.browserID);await Object(r.b)(n),new m.a("pushNotification.unregisterOnLogout",{statCategory:g.a.USER,success:!0}).record()}catch(e){new m.a("pushNotification.unregisterOnLogout",{statCategory:g.a.USER,success:!1,error:Object(f.a)(e)}).record()}}}function I(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}function A(e){const t=e.devices.filter((e=>e.id===E.sharedInstance.browserID))[0];return t?t.apps.flatMap((e=>e.enabled?e.topics.flatMap((e=>e===o.c?[o.d]:e===i.b?[i.c]:[])):[])):[]}c=E,E.sharedInstance=new c;const T="web-push-subscription";function P(e,t,n,r){var i;const o=A(e),a=`WEBPUSH:${r}`,s=JSON.stringify(t).replace(/"/g,'"'),c=n.isExtendedLogin?2592e3:1800,u=[{key:T,value:s}],l=null===(i=n.details)||void 0===i?void 0:i.dsid;return{dsid:null!==l&&void 0!==l?l:"",pushToken:a,deviceInfo:u,ttl:c,pushTopics:o}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"f",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"l",(function(){return d})),n.d(t,"o",(function(){return p})),n.d(t,"m",(function(){return f})),n.d(t,"n",(function(){return h})),n.d(t,"h",(function(){return g})),n.d(t,"k",(function(){return v})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return b})),n.d(t,"g",(function(){return D})),n.d(t,"a",(function(){return M})),n.d(t,"d",(function(){return x}));var r,i,o,a=n(870),s=n(1215),c=n.n(s);n(1216),function(e){e[e.ESCAPE=0]="ESCAPE",e[e.MOUSE_UP=1]="MOUSE_UP"}(r||(r={})),function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT",e[e.IN_AND_OUT=2]="IN_AND_OUT",e[e.NONE=3]="NONE"}(i||(i={})),function(e){e.IN="in",e.OUT="out",e.NOT="not"}(o||(o={}));const u=e=>{let{children:t,allowNesting:n=!1,layers:r=["default","popups","alerts"]}=e;const i=a.useContext(D);if(a.useRef(!!i).current&&!n)return a.createElement(a.Fragment,null,t);{const e=-1!==r.indexOf("default")?r:["default",...r];return a.createElement(I,{layers:e},t)}},l=u;function d(){return m(x.Base)}function p(){return console.log("NOTICE: useShowPane will soon change its default PaneType to PaneType.Base. If you want an easily dismissible pane, please change to using the `useShowDismissiblePane` hook."),m(x.Dismissible)}function f(){return m(x.Dismissible)}function h(){return m(x.Modal)}function m(e){const t=a.useContext(D);N(t,e===x.Dismissible?"useShowPane":"useShowModalPane");const n=a.useRef(e),[r]=a.useState((()=>k())),i=a.useRef((function(e){t({type:S.HidePane,key:r,transitionOptions:e})})),o=a.useContext(M),s=a.useCallback((function(e,a){var s;c.current=void 0!==(null===a||void 0===a?void 0:a.unmountWithPresenter)?null===a||void 0===a?void 0:a.unmountWithPresenter:void 0!==(null===a||void 0===a?void 0:a.unmountWithParent)&&(null===a||void 0===a?void 0:a.unmountWithParent);const u={onRequestClose:()=>i.current(),...a};t({type:S.ShowPane,key:r,paneType:(null===a||void 0===a?void 0:a.paneType)||n.current,pane:e,options:u,layer:null!==(s=null===a||void 0===a?void 0:a.layer)&&void 0!==s?s:o})}),[o,t,r]),c=a.useRef(!1);return a.useLayoutEffect((()=>{const e=i.current;return()=>{!0===c.current&&e()}}),[t,r]),[s,i.current]}function g(e,t){return w(e,(null===t||void 0===t?void 0:t.paneType)||x.Base,t)}function v(e,t){return console.log("NOTICE: usePane will soon change its default PaneType to PaneType.Base. If you want an easily dismissible pane, please change to using the `useDismissiblePane` hook."),w(e,(null===t||void 0===t?void 0:t.paneType)||x.Dismissible,t)}function y(e,t){return w(e,(null===t||void 0===t?void 0:t.paneType)||x.Dismissible,t)}function b(e,t){return w(e,(null===t||void 0===t?void 0:t.paneType)||x.Modal,t)}function w(e,t,n){const r=a.useContext(D);N(r,P(t));const[i]=a.useState((()=>k())),o=a.useCallback((function(e){u({transitionOptions:e})}),[]),s=a.useCallback((function(e){r({type:S.HidePane,transitionOptions:e,key:i})}),[r,i]),[c,u]=a.useState(),l=a.useContext(M);a.useLayoutEffect((()=>{var o;if(c){const a={...n};a.onRequestClose||(a.onRequestClose=()=>s()),r({...c,type:S.ShowPane,pane:e,paneType:t,key:i,options:a,layer:null!==(o=null===n||void 0===n?void 0:n.layer)&&void 0!==o?o:l}),u(void 0)}else r({type:S.UpdatePane,pane:e,key:i,options:n||{}})}),[n,r,e,t,i,s,c,l]);const d=void 0!==(null===n||void 0===n?void 0:n.unmountWithPresenter)?null===n||void 0===n?void 0:n.unmountWithPresenter:void 0===(null===n||void 0===n?void 0:n.unmountWithParent)||(null===n||void 0===n?void 0:n.unmountWithParent),p=a.useRef(d);return a.useLayoutEffect((()=>{p.current=d}),[d]),a.useLayoutEffect((()=>()=>{p.current&&r({type:S.HidePane,key:i})}),[r,i]),[o,s]}var S;!function(e){e.ShowPane="showpane",e.UpdatePane="updatepane",e.HidePane="hidepane",e.AnimatedIn="animatedin",e.AnimatedOut="animatedout"}(S||(S={}));const C=(e,t)=>{switch(t.type){case S.ShowPane:{const{pane:n,key:r,paneType:a,options:s,transitionOptions:c,layer:u}=t;e.layers.includes(u)||console.warn(`Layer ${u} is not defined. This pane will be placed with other default panes in the layer stack.`);const l=e.layers.includes(u)?u:"default";let d=o.IN;s.animates!==i.NONE&&s.animates!==i.OUT&&!1!==(null===c||void 0===c?void 0:c.animate)||(d=o.NOT);const p={pane:n,key:r,type:a,onRequestClose:s.onRequestClose,animates:i.IN_AND_OUT,animating:d,layer:l};E(p,s);const f=Object.assign({},e.layerMap);let[h,m]=_(e,r);return null!==h&&-1!==m?f[h][m]=p:(f[l]||(f[l]=[]),f[l].push(p)),{...e,layerMap:f}}case S.UpdatePane:{const{key:n,pane:r,options:i}=t;return O(e,n,(e=>{const t={...e,pane:r};return E(t,i),t}))}case S.HidePane:{const{key:n,transitionOptions:r}=t,[a,s]=_(e,n);if(null===a)return e;const c=e.layerMap[a][s],u=c.animates===i.IN_AND_OUT||c.animates===i.OUT,l=!r||r.animate;if(u&&l){const t=Object.assign({},e.layerMap);return t[a][s]={...c,animating:o.OUT},{...e,layerMap:t}}{const t=Object.assign({},e.layerMap);return t[a].splice(s,1),{...e,layerMap:t}}}case S.AnimatedIn:{const{key:n}=t;return O(e,n,(e=>({...e,animating:o.NOT})))}case S.AnimatedOut:{const{key:n}=t,[r,i]=_(e,n);if(null===r)return e;const o=Object.assign({},e.layerMap);return o[r].splice(i,1),{...e,layerMap:o}}}};function _(e,t){for(const n in e.layerMap){let r=e.layerMap[n].findIndex((e=>e.key===t));if(-1!==r)return[n,r]}return[null,-1]}function O(e,t,n){const r=Object.assign({},e.layerMap);let[i,o]=_(e,t);return null===i?e:(r[i][o]=n(r[i][o]),{...e,layerMap:r})}function E(e,t){void 0!==t.animates&&(e.animates=t.animates),t.initialFocus&&(e.initialFocus=t.initialFocus),t.onClose&&(e.onClose=t.onClose),t.onRequestClose&&(e.onRequestClose=t.onRequestClose),e.dir=t.dir,e.classNameFromOptions=t.className,e.ariaClosePaneDescription=t.ariaClosePaneDescription,e.onKeyDownOption=t.onKeyDown,e.hasVisibleBackdropOption=t.__spi__hasVisibleBackdrop,e.hasMenuBehavior=t.__spi__hasMenuBehavior,e.appearance=t.appearance}const I=e=>{let{children:t,layers:n}=e;const[r,i]=a.useReducer(C,{layerMap:{},layers:n}),s=n.flatMap((e=>{var t;return null!==(t=r.layerMap[e])&&void 0!==t?t:[]})),c=a.useRef(s);c.current=s;const[u]=a.useState((()=>e=>{(e.type!==S.UpdatePane||c.current.find((t=>t.key===e.key)))&&i(e)})),l=a.useRef(s);a.useEffect((()=>{l.current.forEach((e=>{e.onClose&&!s.find((t=>t.key===e.key))&&e.onClose()})),l.current=s}),[s]);const d=s.length-1;let p=-1,f=!1;for(let a=d;a>=0;a--){const e=s[a];if(e.type===x.Modal||e.hasVisibleBackdropOption){p=a,e.animating===o.OUT&&(f=!0);break}}let h=-1;for(let o=p-1;o>=0;o--){const e=s[o];if(e.type===x.Modal||e.hasVisibleBackdropOption){h=o;break}}function m(e){if(d<0)return!1;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(let t=0;t<=d;t++)if(s[t].type!==x.Base)return!0}else for(let t=e+1;t<d;t++)if(s[t].type!==x.Base)return!0;return!1}function g(e){i({type:S.AnimatedIn,key:e})}function v(e){i({type:S.AnimatedOut,key:e})}const y=a.useRef(null),b=s.length>0;return a.useLayoutEffect((()=>{var e,t;const n="ui-pane-provider-has-open-panes",r="ui-pane-container-has-open-panes",i=null!==(t=null===(e=y.current)||void 0===e?void 0:e.ownerDocument)&&void 0!==t?t:window.document;i.getElementsByTagName("ui-pane").length?(i.body.classList.add(r),i.body.classList.add(n)):(i.body.classList.remove(r),i.body.classList.remove(n))}),[b]),a.createElement(D.Provider,{value:u},a.createElement("ui-main-pane",{inert:m(-1,!0)?"":void 0,ref:y},t),s.map(((e,t)=>a.createElement(M.Provider,{key:e.key,value:e.layer},a.createElement(A,{paneFinishedAnimatingIn:g,paneFinishedAnimatingOut:v,paneDef:e,isTopPane:t>=d,isTopVisibleBackdropPane:t===p,isBecomingTopVisibleBackdropPaneAgain:t===h&&f,isPaneInert:m(t)})))))};function A(e){let{paneDef:t,paneFinishedAnimatingIn:n,paneFinishedAnimatingOut:i,isTopPane:s,isTopVisibleBackdropPane:u,isBecomingTopVisibleBackdropPaneAgain:l,isPaneInert:d}=e;const{pane:p,key:f,type:h,animating:m=o.NOT,onRequestClose:g,classNameFromOptions:v,ariaClosePaneDescription:y,onKeyDownOption:b,hasVisibleBackdropOption:w,hasMenuBehavior:C,dir:_}=t,O=a.useRef(null),E=a.useRef(null),I=a.useContext(D),A=e=>{I({type:S.HidePane,key:f,transitionOptions:e})};let R;function k(e){return e===O.current||e.parentElement===O.current}m===o.IN?R=e=>{let{target:t}=e;k(t)&&(N(),n(f))}:m===o.OUT&&(R=e=>{let{target:t}=e;k(t)&&(N(),i(f))});const M=a.useRef();function N(){void 0!==M.current&&(window.clearTimeout(M.current),M.current=void 0)}a.useEffect((()=>(m!==o.NOT&&(M.current=window.setTimeout((()=>{console.error(function(e,t){const n=P(e);return`${n} animate-${t} 2.5s timeout:\n- If your pane doesn\u2019t have any animation (or doesn\u2019t animate ${t}), you must call ${n} with \`{ animates: PaneAnimates.NONE }\` (or \`{ animates: PaneAnimates.${t===o.IN?"OUT":"IN"} }\`).\n- If your pane has an animation, it must be on the \`ui-pane\` element or the outermost element of its content.\nFor more, see the \u201cAnimating Panes\u201d section in the \`UIPaneContainer\` docs.`}(t.type,m))}),2500)),N)),[m,t.type]);const L=a.useRef(t.initialFocus),j=a.useRef(document.activeElement);a.useEffect((()=>{const e=L.current;let n;const r=O.current;if(e instanceof HTMLElement)n=e;else if("function"===typeof e){let t=e(r);"string"===typeof t&&(t=null===r||void 0===r?void 0:r.querySelector(t)),t instanceof HTMLElement&&(n=t)}else if("object"===typeof e&&"current"in e)n=e.current;else if("string"===typeof e){const t=null===r||void 0===r?void 0:r.querySelector(e);t instanceof HTMLElement&&(n=t)}if(t.type!==x.Base){n||(n=O.current),n.focus({preventScroll:!0}),"INPUT"===n.tagName&&n.select&&n.select();const e=j.current;return()=>{setTimeout((()=>{document.activeElement===document.body&&e&&document.body.contains(e)&&e instanceof HTMLElement&&e.focus({preventScroll:!0})}),0)}}return()=>{}}),[t.type]);const U=h===x.Dismissible,F=h===x.Modal;let z=y;y||(z="Close pane");const B=null!==w&&void 0!==w?w:F,K=s&&F,H=l&&F;return a.createElement(a.Fragment,null,h!==x.Base&&a.createElement("ui-pane-backdrop",{ref:E,dir:_,role:U?"button":void 0,"aria-label":U?z:void 0,class:c()(T(h),B?"is-visible":null,s?"top":null,K?"top-modal":null,u?"top-visible":null,l?"becoming-top-visible-again":null,H?"becoming-top-modal-again":null,m===o.IN?"is-opening":null,m===o.OUT?"is-closing":null,v),onMouseUp:()=>{C&&h===x.Dismissible&&g(r.MOUSE_UP,A)},onMouseDown:e=>{h===x.Dismissible?g(r.MOUSE_UP,A):e.preventDefault()},"data-appearance":t.appearance}),a.createElement("ui-pane",{ref:O,dir:_,class:c()(T(h),m===o.IN?"is-opening":null,m===o.OUT?"is-closing":null,v),inert:d?"true":void 0,tabindex:-1,"aria-modal":h===x.Modal,onKeyDown:e=>{b&&b(e),"Escape"===e.key&&h===x.Dismissible&&g(r.ESCAPE,A)},onTransitionEnd:R,onAnimationEnd:R,"data-appearance":t.appearance},p))}function T(e){switch(e){case x.Modal:return"modal";case x.Dismissible:return"dismissible dismissable";default:return""}}function P(e){switch(e){case x.Dismissible:return"useDismissiblePane";case x.Modal:return"useModalPane";case x.Base:return"useBasePane"}}let R=0;function k(){return R++}const D=a.createContext(void 0),M=a.createContext("default");function N(e,t){if(!e)throw new Error(`\`${t}\` must be called from within a \`UIPaneContainer\`.`)}var x;!function(e){e.Modal="Modal",e.Dismissible="dismissible",e.Base="Base"}(x||(x={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(870),i=n(1215),o=n.n(i),a=n(1226),s=n(2257),c=n(2259),u=n(1212);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{variant:n,...i}=t,[a,c]=Object(s.h)(r.createElement(p,{options:t,hideFunc:()=>c()},e),{...i,paneType:i.paneType||s.d.Modal,className:o()("for-ui-card",i.className,n||"standard")});return[a,c]}function d(){const[e,t]=Object(s.l)();return[function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{variant:a,...c}=i;e(r.createElement(p,{options:i,hideFunc:t},n),{...c,paneType:c.paneType||s.d.Modal,className:o()("for-ui-card",c.className,a||"standard")})},t]}function p(e){const{children:t,options:n,hideFunc:i}=e,{ariaLabelledBy:l,ariaDescribedBy:d,ariaLabel:p,closeButtonProps:f}=n;return r.createElement("ui-card",{role:"dialog","aria-labelledby":l,"aria-describedby":d,"aria-label":p,class:Object(u.c)()},(n.title||n.includeCloseButton)&&r.createElement("ui-card-header",null,n.includeCloseButton&&r.createElement(c.a,{onActivate:()=>{n.onRequestClose?n.onRequestClose(s.e.MOUSE_UP,i):i()},ariaLabel:null===f||void 0===f?void 0:f.ariaLabel,disabled:null===f||void 0===f?void 0:f.disabled,className:o()("x-close-button",null===f||void 0===f?void 0:f.className),variant:"push primary icon"},r.createElement(a.a,{"aria-hidden":!0})),n.title&&r.createElement("h1",null,n.title)),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(1221),o=n(1225),a=n(1215),s=n.n(a),c=n(1212);const u=r.forwardRef((function(e,t){const{variant:n,children:a,destructive:u,onActivate:l,submit:d,className:p,id:f,disabled:h,style:m,tabIndex:g,tooltip:v,ariaLabel:y,ariaHasPopup:b,ariaDescribedBy:w,ariaHidden:S,ariaLabelledBy:C}=e,_=r.useRef(null),[O,E]=r.useState(!1),I=()=>{h||E(!0)},A=()=>{h||E(!1)},T=()=>{h||E(!1)},P=e=>{null===e||void 0===e||e.stopPropagation(),h||_.current.click()},R=Object(i.a)(f,{onActivationStart:I,onActivationEnd:A,onActivationComplete:P,onActivationCancel:T}),k=Object(o.a)({active:O,disabled:h,className:s()(p,u?"destructive":void 0,Object(c.c)()),...e.hasOwnProperty("tabIndex")?{tabIndex:g}:{},onActivate:P,onActivationStart:I,onActivationEnd:A,onActivationCancel:T,variant:n||"push primary"});return r.createElement("ui-button",Object.assign({},k,{id:f,style:m,title:v,role:"button",ref:t,"aria-labelledby":C||(y?void 0:R),"aria-disabled":h,"aria-label":y,"aria-haspopup":b,"aria-describedby":w,"aria-hidden":S}),r.createElement("button",{ref:_,type:d?"submit":"button",disabled:h,tabIndex:-1,onClick:e=>{e.stopPropagation(),l&&l()}}),a)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(870),i=n(1222),o=n(1224),a=n(1223);class s extends r.Component{constructor(e){super(e),this.userActivated=!1,this.touchHover=!1,this.startActivation=e=>{e.nativeEvent.preventDefault(),this.messageTransmitter.transmitMessage(this.labelId,new i.d)},this.endActivation=e=>{e.nativeEvent.preventDefault(),this.messageTransmitter.transmitMessage(this.labelId,new i.c)},this.completeActivation=e=>{e.nativeEvent.preventDefault(),this.messageTransmitter.transmitMessage(this.labelId,new i.b)},this.cancelActivation=e=>{e.nativeEvent.preventDefault(),this.messageTransmitter.transmitMessage(this.labelId,new i.a)},this.startMouseInteraction=e=>{e.nativeEvent.preventDefault(),this.userActivated=!0,this.startActivation(e),document.addEventListener("mouseup",this.detectDetachedMouseInteraction,!0)},this.endMouseInteraction=e=>{this.userActivated&&(e.nativeEvent.preventDefault(),this.endActivation(e),this.completeActivation(e),this.userActivated=!1,document.removeEventListener("mouseup",this.detectDetachedMouseInteraction,!0))},this.suspendMouseInteraction=e=>{this.userActivated&&(e.nativeEvent.preventDefault(),this.endActivation(e))},this.resumeMouseInteraction=e=>{this.userActivated&&(e.nativeEvent.preventDefault(),this.startActivation(e))},this.detectDetachedMouseInteraction=e=>{const t=this.ref.current;t&&t===e.target&&t.contains(e.target)||(this.userActivated=!1,document.removeEventListener("mouseup",this.detectDetachedMouseInteraction,!0))},this.startTouchInteraction=e=>{e.nativeEvent.preventDefault(),this.userActivated=!0,this.touchHover=!0,this.startActivation(e)},this.endTouchInteraction=e=>{e.nativeEvent.preventDefault(),this.userActivated=!1,this.touchHover=!1,this.endActivation(e),c(e.nativeEvent,this.ref.current)?this.completeActivation(e):this.cancelActivation(e)},this.cancelTouchInteraction=e=>{e.nativeEvent.preventDefault(),this.userActivated=!1,this.touchHover=!1,this.endActivation(e),this.cancelActivation(e)},this.detectTouchHover=e=>{const t=e.nativeEvent;if(t.preventDefault(),!this.ref.current)return;const n=c(t,this.ref.current);n&&!this.touchHover?(this.touchHover=!0,this.startActivation(e)):!n&&this.touchHover&&(this.touchHover=!1,this.endActivation(e))},this.labelId=this.props.id||`ui-label-${Object(a.a)()}`,this.ref=r.createRef()}componentDidMount(){const{props:e}=this;let t;"htmlFor"in e?t=e.htmlFor:(console.warn("The `for` property is deprecated, please use `htmlFor` instead."),t=e.for),this.messageTransmitter.registerLabel(this.labelId,t)}UNSAFE_componentWillUpdate(e){const{messageTransmitter:t,labelId:n,props:r}=this;let i,o=!1;i="htmlFor"in r?r.htmlFor:r.for,"htmlFor"in e&&e.htmlFor!==i?(i=e.htmlFor,o=!0):"for"in e&&e.for!==i&&(i=e.for,o=!0),e.id&&e.id!==r.id&&(t.unregisterLabel(n),this.labelId=e.id,o=!0),o&&t.registerLabel(this.labelId,i)}componentWillUnmount(){this.messageTransmitter.unregisterLabel(this.labelId)}get messageTransmitter(){return s.messageTransmitter}render(){const{props:e}=this;let t;return t="htmlFor"in e?e.htmlFor:e.for,r.createElement("ui-label",{id:this.labelId,for:t,ref:this.ref,class:e.className,style:e.style,onMouseDown:this.startMouseInteraction,onMouseUp:this.endMouseInteraction,onMouseOut:this.suspendMouseInteraction,onMouseEnter:this.resumeMouseInteraction,onTouchStart:this.startTouchInteraction,onTouchMove:this.detectTouchHover,onTouchEnd:this.endTouchInteraction,onTouchCancel:this.cancelTouchInteraction},e.children)}}function c(e,t){const{changedTouches:n}=e,r=n[0]||n.item(0);if(!r)return!1;const i=t.getBoundingClientRect(),o=r.clientX>=i.left&&r.clientX<=i.right,a=r.clientY>=i.top&&r.clientY<=i.bottom;return o&&a}s.messageTransmitter=new o.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h}));var r=n(870),i=n(1260),o=function(e){return Object(r.createElement)(i.a,{originalProps:e,metadata:{name:"doc",svgPath:"M27.5879 17.0898L79.4434 17.0898C89.5508 17.0898 94.5801 11.9629 94.5801 1.80664L94.5801-42.5293C94.5801-48.8281 93.8477-51.5625 89.9414-55.5664L63.0371-82.959C59.3262-86.7676 56.25-87.5977 50.7812-87.5977L27.5879-87.5977C17.5293-87.5977 12.4512-82.4219 12.4512-72.2656L12.4512 1.80664C12.4512 12.0117 17.4805 17.0898 27.5879 17.0898ZM27.9297 9.22852C22.9004 9.22852 20.3125 6.54297 20.3125 1.66016L20.3125-72.1191C20.3125-76.9531 22.9004-79.7363 27.9785-79.7363L49.707-79.7363L49.707-51.3672C49.707-45.2148 52.7832-42.1875 58.8867-42.1875L86.7188-42.1875L86.7188 1.66016C86.7188 6.54297 84.1309 9.22852 79.0527 9.22852ZM59.7656-49.5605C57.8125-49.5605 57.0801-50.3418 57.0801-52.2949L57.0801-78.2227L85.2051-49.5605Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:80.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 82.130126953125 104.7353515625",width:82.130126953125,height:104.7353515625,translateX:-12.449907226562573,translateY:87.59765625,baseline:87.59765625,capline:17.1376953125}}})},a=n(901),s=n(903),c=n(898),u=n(971),l=n(1168);const d={...u.a,authBagId:"newspublisher",applicationName:"newspublisher",path:"newspublisher",supportedDevices:[{primaryInteractionMode:s.b.MOUSE,sizeClass:s.e.REGULAR},{primaryInteractionMode:s.b.MOUSE,sizeClass:s.e.COMPACT}],supportedDomains:[a.e,a.d,a.b],supportedFileExtensions:[],availableFromDomains:[a.e,a.d,a.b],isPCSRequired:!0,pcsKeyIdentifier:Object(l.a)("newspublisher"),supportedLocales:["en-us"],isUsingCloudOSPreferencesAPI:!0,radarComponentId:632145,helpButtonConfigs:[{externalURL:()=>(()=>{const e=c.a.locale;return"https://help.apple.com/newspublisher/icloud/"+("en-us"===e.toLowerCase()?"":`?lang=${e}`)})()},{externalURL:()=>"https://developer.apple.com/news-publisher/",title:"Newspublisher.ResourcesTitle",symbol:r.createElement(o,{"aria-hidden":!0,desiredFontSize:11})}],configuration:null,supportsTile:!1},p="newspublisher",f={identifier:p,displayName:"News Publisher",titleNameNonLocalized:"iCloud - News Publisher",generations:[d],applicationInfo:d},h={identifier:p,displayName:"News Publisher",titleNameNonLocalized:"iCloud - News Publisher",descriptionLocKey:"CloudOS.LandingPage.NewsPublisher.Description",learnMoreLinkHref:"https://developer.apple.com/apple-news/",learnMoreLinkTextLocKey:"CloudOS.LandingPage.NewsPublisher.LearnMoreLink.Text"};d.configuration=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1215),o=n.n(i);const a=r.forwardRef((function(e,t){const{variant:n="standard",className:i,id:a,style:s,description:c,ariaHidden:u,nibStyle:l,size:d=0,tabIndex:p}=e,f=o()(n,i),h=d>0?{fontSize:`${d}px`}:{};return r.createElement("ui-activity-indicator",{ref:t,role:"progressbar",class:f,id:a,style:{...s,...h},"aria-label":c,"aria-hidden":u,tabindex:p},r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}),r.createElement("ui-spinner-nib",{style:l}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(870),i=n(1326),o=n(2258),a=n(2257),s=n(1227),c=n(2291);function u(){return u=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},u.apply(null,arguments)}function l(e,t){let{menuProps:n,cardProps:{title:l,titleId:d="card-title",className:p,closeAriaLabel:f,onKeyDown:h,onClose:m}}=t;const g=r.useRef(null),v=Object(s.a)("VoiceOver.Menu.Close"),y=r.createElement(r.Fragment,null,r.createElement("header",{className:"compact-menu-header"},r.createElement(c.a,{onActivate:()=>w(),className:"close-button",ariaLabel:null!==f&&void 0!==f?f:v}),l&&r.createElement("div",{className:"header-title",id:d},l)),r.createElement(e,u({},n,{onClose:()=>w(),ref:Object(i.a)(g,null===n||void 0===n?void 0:n.ref)}))),[b,w]=Object(o.a)(y,{paneType:a.d.Dismissible,ariaLabelledBy:l&&d,className:p,onKeyDown:h,onClose:m});return[b,w]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f}));var r=n(870),i=n(1215),o=n.n(i),a=n(1229),s=n(2257),c=n(2259),u=n(1226),l=n(1340),d=n(1218);function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,i]=Object(s.h)(r.createElement(h,{options:t,hideFunc:()=>i()},e),m(t));return[n,i]}function f(){const[e,t]=Object(s.l)(),n=r.useCallback((function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(r.createElement(h,{options:i,hideFunc:t},n),m(i))}),[e,t]);return[n,t]}function h(e){var t;const{children:n,options:i,hideFunc:l}=e,p=Object(a.d)(),f=i.closeButtonProps,h=r.useRef(null),[m,g]=r.useState(!1),[v,y]=r.useState(0);return r.useEffect((()=>{const e=h.current;e&&e.addEventListener("scroll",(()=>{h.current&&y(h.current.scrollTop)}))}),[]),r.useLayoutEffect((()=>{const e=h.current;if(e){const t=e.scrollHeight>e.clientHeight;Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<1?g(!1):t&&Object(d.a)(n)&&g(!0)}}),[h,n,v]),r.createElement("ui-popup",{role:null!==(t=i.ariaRole)&&void 0!==t?t:"dialog","aria-labelledby":i.ariaLabelledBy,"aria-describedby":i.ariaDescribedBy,"aria-label":i.ariaLabel,tabindex:-1,class:o()(p,{"ui-overlay-actions-separator":m}),ref:h},i.includeCloseButton&&r.createElement(c.a,{onActivate:()=>{i.onRequestClose?i.onRequestClose(s.e.MOUSE_UP,l):l()},ariaLabel:null===f||void 0===f?void 0:f.ariaLabel,disabled:null===f||void 0===f?void 0:f.disabled,className:o()("x-close-button",null===f||void 0===f?void 0:f.className),variant:"push primary icon"},r.createElement(u.a,{"aria-hidden":!0})),n)}function m(e){return{initialFocus:"ui-popup",__spi__hasVisibleBackdrop:!0,...e,layer:e.layer||"popups",paneType:e.paneType||s.d.Modal,className:o()(l.a,"for-ui-popup",e.className,e.variant||"standard")}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(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,"b",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"g",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"v",(function(){return S})),n.d(t,"z",(function(){return C})),n.d(t,"A",(function(){return _})),n.d(t,"p",(function(){return I})),n.d(t,"i",(function(){return A})),n.d(t,"D",(function(){return T})),n.d(t,"j",(function(){return P})),n.d(t,"q",(function(){return R})),n.d(t,"l",(function(){return k})),n.d(t,"u",(function(){return D})),n.d(t,"m",(function(){return M})),n.d(t,"t",(function(){return N})),n.d(t,"k",(function(){return x})),n.d(t,"n",(function(){return L})),n.d(t,"w",(function(){return j})),n.d(t,"s",(function(){return U})),n.d(t,"y",(function(){return F})),n.d(t,"x",(function(){return z})),n.d(t,"d",(function(){return B})),n.d(t,"C",(function(){return K})),n.d(t,"B",(function(){return H})),n.d(t,"r",(function(){return W})),n.d(t,"o",(function(){return q}));var r=n(882),i=n.n(r);const o={getListOfAvailableCookiesAsHash:()=>i.a.get(),getListOfAvailableCookiesAsConcatenatedString(){const e=this.getListOfAvailableCookiesAsHash(),t=Object.keys(e);let n="";for(let r=0;r<t.length;r++){let i=t[r];n+=i+":"+e[i]+";"}return n},getValidateToken(){return this.getListOfAvailableCookiesAsHash()["X-APPLE-WEBAUTH-VALIDATE"]}};var a=n(1392),s=n(1393),c=n(878),u=n(900),l=n(924),d=n(1244);let p=function(e){return e.accountLogin="accountLogin",e.continueOnDevice="continueOnDevice",e.getCoDEligibleDevicesList="getCoDEligibleDevicesList",e.fetchCentralizedWebToken="fetchCentralizedWebToken",e.validateUser="validateUser",e.storageUsage="storageUsage",e.hmeList="hmeList",e.customEmailDomains="customEmailDomains",e.photosRecent="photos-tile.getDerivativeUrlsForTile",e.photosLibraryInfo="photos-tile.getLibraryCounts",e.photosTileList="photos-tile.getTileList",e.photosAlbumsList="photosAlbumsList",e.notesRecent="notesRecent",e.notesPinned="notesPinned",e.notesPinInfo="notesPinInfo",e.notesShared="notesShared",e.notesRootFolders="notesRootFolders",e.notesChildFolders="notesChildFolders",e.notesWithParentId="notesWithParentId",e.notesFolderById="notesFolderById",e.mailRecentMessages="mailRecentMessages",e.mailRecentThreads="mailRecentThreads",e.mailbox="mailbox",e.mailPreferences="mailPreferences",e.calendarFutureEvents="calendarFutureEvents",e.iWorksRecent="iWorksRecent",e.iWorksSharedByMe="iWorksSharedByMe",e.iWorksSharedByOthers="iWorksSharedByOthers",e.driveRecent="driveRecent",e.driveDownload="driveDownload",e.driveLookupByPath="driveLookupByPath",e.driveFavoritesFolders="driveFavoritesFolders",e.driveRetrieveItemDetailsInFolders="driveRetrieveItemDetailsInFolders",e.driveDownloadUrl="driveDownloadUrl",e.driveFiles="driveFiles",e.driveFolders="driveFolders",e.driveItemById="driveItemById",e.driveChildFolders="driveChildFolders",e.meCardGet="meCardGet",e.devicesBackup="devicesBackup",e.listCalendarArchives="listCalendarArchives",e.listContactArchives="listContactArchives",e.retrieveDeletedItemDetails="retrieveDeletedItemDetails",e.enumerateDeletedDriveFiles="enumerateDeletedDriveFiles",e.bookmarks="bookmarks",e.remindersPrimaryZone="remindersPrimaryZone",e.remindersRecent="remindersRecent",e.remindersList="remindersList",e.lookMeUpByEmailList="lookMeUpByEmailList",e.listSubscriptionFeatures="listSubscriptionFeatures",e.getSubscriptionFeaturePlanSummary="getSubscriptionFeaturePlanSummary",e.getPlanPricing="getPlanPricing",e.getManageStorage="getManageStorage",e.getFamilyDetails="getFamilyDetails",e.mutateCalendarEvents="mutateCalendarEvents",e.mutateNotes="mutateNotes",e.mutatePinNotes="mutatePinNotes",e.mutateReminders="mutateReminders",e.mutateMails="mutateMails",e.mutatePhotos="mutatePhotos",e.mutateDocuments="mutateDocuments",e.invites="invites",e}({});const f=u.a.sharedInstance.isDomainCN,h=f?"https://setup.icloud.com.cn/setup/ws/1":"https://setup.icloud.com/setup/ws/1";let m=function(e){return e.PUBLIC="public",e.PRIVATE="private",e.SHARED="shared",e.SHARE_DB="sharedb",e}({});const g=(e,t,n,r,i)=>`${e}/database/1/${n}/${t}/${r}/${i}`,v=(e,t,n,r)=>g(e,t,n,r,"records/query"),y=(e,t,n,r)=>g(e,t,n,r,"records/modify"),b=(e,t,n,r)=>g(e,t,n,r,"records/lookup"),w=(e,t,n,r)=>g(e,t,n,r,"zones/list"),S=(e,t)=>Object(l.a)(`${e}/ws/_all_/list/enumerate/recentDocs`,{limit:6,unified_format:!0,extension:{pages:"pages",numbers:"numbers",keynote:"key"}[t]||Object(a.a)(t)}),C=(e,t)=>Object(l.a)(`${e}/ws/_all_/list/enumerate/sharedByMe`,{limit:6,unified_format:!0,extension:{pages:"pages",numbers:"numbers",keynote:"key"}[t]}),_=(e,t)=>Object(l.a)(`${e}/ws/com.apple.${Object(d.a)(t)}/list/enumerate/sharedToMe`,{limit:6,unified_format:!0,extension:{pages:"pages",numbers:"numbers",keynote:"key"}[t]});let O=1;const E="5.1",I=(e,t)=>Object(l.a)(`${e}/ca/startup`,{startDate:Object(s.a)(t),endDate:Object(s.a)(t),usertz:(new Intl.DateTimeFormat).resolvedOptions().timeZone,requestID:""+O++,lang:Object(c.b)(),brief:!0,details:!0,clientVersion:E}),A=(e,t,n)=>Object(l.a)(`${e}/ca/eventdetail/${t}/${n}`,{usertz:(new Intl.DateTimeFormat).resolvedOptions().timeZone,requestID:""+O++,lang:Object(c.b)(),clientVersion:E}),T=function(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"PUT";return Object(l.a)(`${e}/ca/events/${n}/${r}${o?"/"+o:""}`,{startDate:Object(s.a)(i),endDate:Object(s.a)(i),usertz:(new Intl.DateTimeFormat).resolvedOptions().timeZone,requestID:""+O++,lang:Object(c.b)(),clientVersion:E,ifMatch:t,methodOverride:a})},P=e=>`${e}/setup/web/device/getDevices`,R=e=>`${e}/listArchives`,k=(e,t,n,r)=>Object(l.a)(`${e}/ws/_all_/list/enumerate/${t}`,{limit:n,unified_format:!0,nextPage:r}),D=function(e){return k(e,"recentDocs",arguments.length>1&&void 0!==arguments[1]?arguments[1]:6)},M=(e,t,n)=>k(e,"favorites",t,n),N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=arguments.length>2?arguments[2]:void 0;return Object(l.a)(`${e}/ws/_all_/list/changes/recentDocs`,{limit:t,unified_format:!0,nextPage:n})},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown";try{const n=function(e){let t=null;if(null!==e&&void 0!==e){const n=e.match(/^v=\d{1}:t=([\w\W]*)$/);null!=n&&2===n.length&&(t=n[1])}return t}(o.getValidateToken());return Object(l.a)(`${e}/ws/${t}/download/batch`,{token:n})}catch(n){const e=o.getListOfAvailableCookiesAsConcatenatedString();throw new Error(`Error in DocWebService._executeBatchedDownload requesting COSK getValidateCookie(). Cookies = ${e}`)}},L=(e,t)=>Object(l.a)(`${e}/ws/com.apple.CloudDocs/list/lookup_by_path`,{path:t,unified_format:!0}),j=e=>`${e}/restoreArchive`,U=(e,t)=>`${e}/ws/${t}/update/purgeTombstones`,F=e=>`${e}/retrieveServiceStatus`,z=e=>`${e}/v1/items`,B=f?"https://gatewayws.icloud.com.cn/acsegateway":"https://gatewayws.icloud.com/acsegateway",K=e=>`${B}/v3/accounts/${e}/subscriptions/features`,H=(e,t)=>`${B}/v3/accounts/${e}/subscriptions/features/${t}/plan-summary`,W=e=>`${B}/v1/accounts/${e}/plans/icloud/pricing`,q=e=>`${e}/setup/web/family/getFamilyDetails`},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(870),i=n(1332);const o="rgb(255, 255, 255)",a="rgb(28, 28, 30)";function s(e){let{scrollContainerRef:t,contentStartRef:n,contentEndRef:s,fadeSize:c=70}=e;const u=Object(i.a)()?a:o,l=r.useCallback((()=>{const e=t.current,n=e.clientHeight,r=e.scrollHeight,i=e.scrollTop,o=r-n-i,a=i/c,s=Math.min(d(a)*c,c);e.style.setProperty("--fadeTopHeight",`${s}px`);const u=o/c,l=Math.min(d(u)*c,c);e.style.setProperty("--fadeBottomHeight",`${l}px`)}),[t,c]);r.useLayoutEffect((()=>{if(null==t.current)return;const e=t.current,r=null===n||void 0===n?void 0:n.current,i=null===s||void 0===s?void 0:s.current,o=r||e.querySelector(":scope > :first-child"),a=i||e.querySelector(":scope > :last-child");e.setAttribute("data-overflow-fade","true"),o.setAttribute("data-overflow-fade-content-start",""),a.setAttribute("data-overflow-fade-content-end",""),l()}),[t,n,s,l]),r.useLayoutEffect((()=>{if(null==t.current)return;const e=t.current;return e.addEventListener("scroll",l,{passive:!0}),()=>{e.removeEventListener("scroll",l)}}),[t,l]),r.useLayoutEffect((()=>{if(null==t.current)return;const e=t.current;null===e||void 0===e||e.style.setProperty("--fadeSize",`${c}px`);const n=function(e){const t=e.match(/()([\d]{1,3},\s[\d]{1,3},\s[\d]{1,3})/gi)[0];return`linear-gradient(\n            rgba(${t}, 1) 0%,\n            rgba(${t}, 0.987) 8.1%,\n            rgba(${t}, 0.951) 15.5%,\n            rgba(${t}, 0.896) 22.5%,\n            rgba(${t}, 0.825) 29%,\n            rgba(${t}, 0.741) 35.3%,\n            rgba(${t}, 0.648) 41.2%,\n            rgba(${t}, 0.55) 47.1%,\n            rgba(${t}, 0.45) 52.9%,\n            rgba(${t}, 0.352) 58.8%,\n            rgba(${t}, 0.259) 64.7%,\n            rgba(${t}, 0.175) 71%,\n            rgba(${t}, 0.104) 77.5%,\n            rgba(${t}, 0.049) 84.5%,\n            rgba(${t}, 0.013) 91.9%,\n            rgba(${t}, 0) 100%\n        )`}(u);null===e||void 0===e||e.style.setProperty("--fadeGradient",n)}),[c,u,t]);const p=r.useRef();return function(e,t){const n=r.useRef(e);n.current=e;const i=r.useRef({height:0,width:0}),o=r.useCallback((()=>{!function(e,t,n){if(!e)return;const r=n.current,i=e.getBoundingClientRect();r.height===i.height&&r.width===i.width||(n.current=i,t(i))}(t.current,n.current,i)}),[t]);r.useLayoutEffect((()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)})),[o])}((e=>{e.height!==p.current&&l(),p.current=e.height}),t),l}function c(e){return 1/(1+Math.exp(-1*(12*e-.1)))}const u=c(0),l=c(1);function d(e){return(c(e)-u)*(1/(l-u))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(1215),o=n.n(i),a=n(1326),s=n(1342),c=n(1341);const u=r.forwardRef(((e,t)=>{let{children:n,className:i,id:u,mode:d,style:p,variant:f,singleButtonAlignment:h="center",largeButtonSize:m=!1}=e;const g=r.useRef(null),v=function(e,t){return r.Children.map(e,((e,n)=>{let i=e.props.variant;return i||(i=0===n?"primary":"secondary"),r.cloneElement(e,{variant:i,className:o()(e.props.className,"block",{large:t})})}))}(Object(s.a)(n,"UIOverlayActions"),m),y=v[0],b=v.length>1?v[1]:null,w=v.length>2,S=w?v[2]:null,[C,_]=r.useState(!1);let O,E;"compact"===d||C?(O=r.createElement("ui-overlay-actions-stack",null,y,b,S),E=r.createElement("ui-overlay-actions-stack",null,r.createElement("div",null,y.props.children),r.createElement("div",null,null===b||void 0===b?void 0:b.props.children),r.createElement("div",null,null===S||void 0===S?void 0:S.props.children))):w?(O=r.createElement(r.Fragment,null,S,r.createElement("div",{className:"inline-end-buttons"},b,y)),E=r.createElement(r.Fragment,null,l(null===S||void 0===S?void 0:S.props.children,m),r.createElement("div",{className:"inline-end-buttons"},l(null===b||void 0===b?void 0:b.props.children,m),l(null===y||void 0===y?void 0:y.props.children,m)))):(O=r.createElement(r.Fragment,null,b,y),E=r.createElement(r.Fragment,null,b&&l(null===b||void 0===b?void 0:b.props.children,m),l(null===y||void 0===y?void 0:y.props.children,m))),r.useLayoutEffect((()=>{_(Object(c.a)(g))}),[g]);const I=1===v.length;return r.createElement("ui-overlay-actions",{class:o()(f||"standard",i,d,h,{"contains-tertiary-button":w,"single-button":I,"should-stack":C}),id:u,ref:Object(a.a)(t,g),style:p},O,r.createElement("div",{className:"buttons-measurer","aria-hidden":"true"},E))}));function l(e,t){return r.createElement("div",{className:o()({large:t})},e)}u.displayName="UIOverlayActions"},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"g",(function(){return y})),n.d(t,"c",(function(){return b})),n.d(t,"f",(function(){return S})),n.d(t,"d",(function(){return C})),n.d(t,"b",(function(){return _})),n.d(t,"i",(function(){return O})),n.d(t,"e",(function(){return E})),n.d(t,"h",(function(){return I}));var r=n(1413),i=n(1414),o=n(1426),a=n(878),s=n(999),c=n(1395);function u(e,t){let n="";const r=Object(a.b)(),i=Object(o.parseOneAddress)(e);if(!i||"mailbox"!==i.type)return e;if(null!==t&&void 0!==t&&t.has(i.address)){const e=t.get(i.address);n=Object(s.a)(r,{givenName:null===e||void 0===e?void 0:e.firstName,familyName:null===e||void 0===e?void 0:e.lastName,emailAddress:i.address})||""}return n||(n=i.name||i.address||""),n}const l=4,d=32,p=1<<19;var f=n(1227),h=n(2197),m=n(2290);const g="no service url available",v="INBOX",y=()=>Object(f.a)("MailHomeTile.TilePicker.Inbox.Label"),b="/VIP";function w(e){return e===b||Object(h.g)(e)?v:e}const S=async e=>{var t;let{webServices:n,mailboxPath:i,id:o,flag:a,value:s}=e;if(null===n||void 0===n||!n.mccgateway)throw new Error(g);const c=w(i),u=await Object(r.c)({url:`${n.mccgateway}/mailws2/v1/thread/flag`,method:"POST",includeCredentials:!0,body:{method:"unread"===a!==s?"ADD":"REMOVE",flags:["unread"===a?"SEEN":"FLAGGED"],threadIds:[o],sessionHeaders:{condstore:1,folder:c,modseq:null,qresync:1,threadmode:1,threadmodseq:null}},contentType:"application/json"}),l=await u.json();return u.ok&&!(null!==(t=l.partialException)&&void 0!==t&&t.length)},C=async(e,t,n,r)=>{let{webServices:o}=e;if(r)throw new i.a("");if(null===o||void 0===o||!o.mail)throw new i.d("");const a=await Object(m.a)().fetchMailboxThreads(t);if(a.ok)return function(e,t){return e.map((e=>{var n,r,i,o;const a=null!==(n=null===e||void 0===e?void 0:e.flags)&&void 0!==n?n:0,s=(null===e||void 0===e||null===(r=e.rfc2047DecodedSenders)||void 0===r?void 0:r[0])||(null===e||void 0===e||null===(i=e.senders)||void 0===i?void 0:i[0]);return{id:e.identifier||"",from:s?u(s,t):"",read:!!(a&d),subject:(null===e||void 0===e?void 0:e.rfc2047DecodedSubject)||"",time:Object(c.a)(new Date((null===e||void 0===e?void 0:e.emailMatchTimestamp)||Date.now())),flagged:!!(a&l),count:null!==(o=null===e||void 0===e?void 0:e.count)&&void 0!==o?o:0,hasAttachment:!!(a&p)}}))}(a.value,n);throw new Error("failed to fetch mailbox threads")};let _=function(e){return e.MOVE="MOVE",e.DELETE="DELETE",e}({});const O=async e=>{var t;let{webServices:n,mailboxPath:i,id:o,moveMethod:a}=e;if(null===n||void 0===n||!n.mccgateway)throw new Error(g);const s=w(i),c=a===_.DELETE?"Deleted Messages":"Junk",u=await Object(r.c)({url:`${n.mccgateway}/mailws2/v1/thread/move`,method:"POST",includeCredentials:!0,body:{moveMethod:a,destFolder:c,threadIds:[o],sessionHeaders:{condstore:1,folder:s,modseq:null,qresync:1,threadmode:1,threadmodseq:null}},contentType:"application/json"}),l=await u.json();return u.ok&&!(null!==(t=l.partialException)&&void 0!==t&&t.length)},E=async e=>{let{webServices:t,mailboxPath:n,id:i,flag:o,value:a}=e;if(null===t||void 0===t||!t.mail)throw new Error(g);const s=!0===a?"setflag":"clrflag",c=w(n);return(await Object(r.c)(A(t.mail,c,i,s,o))).ok},I=async e=>{let{webServices:t,mailboxPath:n,id:i,moveMethod:o}=e;if(null===t||void 0===t||!t.mail)throw new Error(g);const a=w(n),s=o===_.MOVE?"folder:Junk":void 0;return(await Object(r.c)(A(t.mail,a,i,o.toLowerCase(),void 0,s))).ok},A=(e,t,n,r,i,o)=>({url:`${e}/wm/message`,method:"POST",includeCredentials:!0,body:{jsonrpc:"2.0",id:`${Date.now()}/1`,method:r,params:{folder:`folder:${t}`,rollbackslot:"0.0",uids:[n],...!!o&&{dest:o},...!!i&&{flag:i}}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2257);function i(){const[e,t]=Object(r.n)();return[(t,n)=>{e(t,{animates:r.b.IN,className:"show-modal-pane-centered",...n})},t]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(870),i=n(1215),o=n.n(i),a=n(1326);const s=r.forwardRef(((e,t)=>{var n;const{id:i,variant:s,className:u,style:l,alt:d,crop:p,src:f,srcSet:h,sizes:m,loadingTimeout:g,onLoad:v,onLoadFailure:y,crossOrigin:b,decoding:w,ariaHidden:S}=e,[C,_]=r.useState("don't know yet"),O=r.useRef(null);function E(){"loaded"!==C&&(_("loaded"),P.current&&(window.clearTimeout(P.current),P.current=null),v&&v())}r.useLayoutEffect((()=>{(f||h)&&O.current&&(O.current.complete?O.current.naturalHeight?I.current():T.current():_("loading"))}),[f,h]);const I=r.useRef(E);function A(){"error"!==C&&(_("error"),R.current&&R.current(c.Error),P.current&&(window.clearTimeout(P.current),P.current=null))}I.current=E;const T=r.useRef(A);T.current=A;const P=r.useRef(null),R=r.useRef(y);R.current=y;const k=r.useRef(g);r.useEffect((()=>{if("loading"===C&&!P.current)return P.current=setTimeout((()=>{"loading"===C&&(_("error"),R.current&&R.current(c.Timeout)),P.current=null}),k.current||1e4),()=>{P.current&&(window.clearTimeout(P.current),P.current=null)}}),[C]);const D=r.useRef(null),[M,N]=r.useState(0);r.useLayoutEffect((()=>{D.current&&"loaded"===C&&p&&N(D.current.offsetWidth/p.width)}),[p,C,null===(n=D.current)||void 0===n?void 0:n.offsetWidth]);const x=r.useMemo((()=>M&&p?{transformOrigin:"left top",transform:`scale(${M}) translate(${-1*p.left}px, ${-1*p.top}px)`,pointerEvents:"none"}:{pointerEvents:"none"}),[p,M]),L=r.useRef(!1);r.useLayoutEffect((()=>{L.current?(P.current&&(window.clearTimeout(P.current),P.current=null),_("don't know yet")):L.current=!0}),[f,h]);const j="loading"===C?"is-loading":"loaded"===C?"is-loaded":"error"===C?"load-failed":void 0;return r.createElement("ui-image",{id:i,style:l,"aria-hidden":!!S||void 0,class:o()(u,s||"standard",j),ref:Object(a.a)(t,D),dir:"ltr"},r.createElement("img",{ref:O,alt:d,src:f,srcSet:h,sizes:m,crossOrigin:b,decoding:w,draggable:!1,style:x,onLoad:E,onError:A}))}));var c;s.displayName="UIImage",function(e){e.Error="ERROR",e.Timeout="TIMEOUT"}(c||(c={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(870),i=n(1330),o=n(1215),a=n.n(o),s=n(900),c=n(945),u=n(1227),l=n(1455),d=n(2201);const p=e=>r.createElement("div",{className:a()("legal-footer",{transparent:e.isTransparent})},r.createElement("div",{className:"application-content"},r.createElement("div",{className:"legal-footer-content"},r.createElement("div",{className:"inner-row",role:"presentation"},r.createElement(f,null)),r.createElement("div",{className:"inner-row",role:"presentation"},r.createElement(C,null)))));function f(){var e;const{isDomainCN:t}=s.a.sharedInstance,n=Object(l.a)(),o=null!==(e=Object(i.a)())&&void 0!==e&&e.isManagedAppleID?[r.createElement(g,{key:0}),r.createElement(b,{key:1}),r.createElement(w,{key:2})]:[r.createElement(m,{key:0}),r.createElement(g,{key:1}),r.createElement(y,{key:2})];let a=o.length;n&&o.push(r.createElement(v,{key:a++})),t&&o.push(r.createElement(S,{key:a++}));const c=o.map(((e,t)=>t!==o.length-1?r.createElement(h,{key:t},e):r.createElement(r.Fragment,{key:t},e)));return r.createElement(r.Fragment,null,c)}function h(e){let{children:t}=e;return r.createElement("div",{className:"with-separator"},t,r.createElement("div",{"aria-hidden":!0,className:"separator"}))}function m(){return r.createElement(d.a,{href:Object(c.a)("systemStatus"),hideArrow:!0,className:"systemStatus","aria-label":`${Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`},Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title"))}function g(){return r.createElement(d.a,{href:s.a.sharedInstance.isDomainCN?Object(c.a)("cnPrivacyPolicy"):Object(c.a)("privacyPolicy"),hideArrow:!0,className:"privacy","aria-label":`${Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`},Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title"))}function v(){const e=Object(l.a)();return e&&r.createElement(d.a,{className:"safety",href:Object(c.a)(`${e}OnlineSafety`),hideArrow:!0,"aria-label":`${Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.SafetyLink.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`,statName:"onlineSafetyLinkClicked"},Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.SafetyLink.Title"))}function y(){return r.createElement(d.a,{className:"terms",href:Object(c.a)("termsAndCondition"),hideArrow:!0,"aria-label":`${Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`},Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title"))}function b(){return r.createElement(d.a,{className:"terms",href:Object(c.a)("schoolTerms"),"aria-label":`${Object(u.a)("CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`,hideArrow:!0},Object(u.a)("CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title"))}function w(){return r.createElement(d.a,{href:Object(c.a)("businessTerms"),hideArrow:!0,className:"terms","aria-label":`${Object(u.a)("CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title")} ${Object(u.a)("VoiceOver.ExternalLink.Description")}`},Object(u.a)("CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title"))}function S(){return r.createElement(d.a,{className:"chinaICP",href:"https://beian.miit.gov.cn",hideArrow:!0},"\u9ed4ICP\u590718008477\u53f7")}function C(){return r.createElement("span",{className:"copyright"},Object(u.a)("CloudOS.LegalFooterView.Text.Fragment.Copyright",{currentYear:(new Date).getFullYear()}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(870),i=n(2259),o=n(2257),a=n(1227),s=n(900),c=n(1459),u=n(1463),l=n(1460),d=n(2212),p=n(2155),f=n(1247);function h(){return r.createElement("h2",{tabIndex:-1,className:"with-ellipsis"},r.createElement("span",null,Object(a.a)("ADP.ArmingRequestState.Title")),"\u2060",r.createElement(_,null))}function m(e){var t;const n=s.a.sharedInstance.isDomainCN?Object(a.a)("ADP.Domain.icloud.com.cn"):Object(a.a)("ADP.Domain.icloud.com");return r.createElement(r.Fragment,null,r.createElement("h2",{tabIndex:-1},Object(a.a)("ADP.AwaitingDeviceConsentState.Title")),r.createElement("div",{className:"description"},Object(a.a)("ADP.AwaitingDeviceConsentState.Description.WithOSList",{domain:n,osList:Object(a.a)(null!==(t=e.adpMinimumOSListLocKey)&&void 0!==t?t:"ADP.SupportedOS.Default")})),r.createElement("div",{className:"didnt-receive"},Object(a.a)("ADP.AwaitingDeviceConsentState.DidntReceive")),r.createElement("div",null,r.createElement(i.a,{variant:"push primary",onActivate:e.onSendAgain},Object(a.a)("ADP.AwaitingDeviceConsentState.SendAgain"))),!e.hideButtons&&r.createElement("div",{className:"button-container"},r.createElement(i.a,{variant:"block secondary neutral large",onActivate:e.onCancel},Object(a.a)("ADP.AwaitingDeviceConsentState.Cancel"))))}function g(e){return r.createElement(r.Fragment,null,r.createElement("h2",{tabIndex:-1},e.title),r.createElement("div",{className:"description"},e.description),!e.hideButtons&&e.buttonText&&e.onClick&&r.createElement(i.a,{variant:"block primary large",onActivate:e.onClick},r.createElement("span",null,e.buttonText)))}function v(e){var t,n,i;const o=null===(t=p.h.value)||void 0===t?void 0:t.primaryEmail,s=Object(a.a)("ADP.FailedToSendAccessRequest.Title"),c=o?Object(a.a)("ADP.FailedToSendAccessRequest.Description.WithOSList",{appleId:o,osList:Object(a.a)(null!==(n=e.adpMinimumOSListLocKey)&&void 0!==n?n:"ADP.SupportedOS.Default")}):Object(a.a)("ADP.FailedToSendAccessRequest.Description.NoUser.WithOSList",{osList:Object(a.a)(null!==(i=e.adpMinimumOSListLocKey)&&void 0!==i?i:"ADP.SupportedOS.Default")}),u=Object(a.a)("ADP.FailedToSendAccessRequest.OK");return r.createElement(g,{title:s,description:c,buttonText:u,onClick:e.onOK,hideButtons:e.hideButtons})}function y(e){const t=s.a.sharedInstance.isDomainCN?Object(a.a)("ADP.Domain.icloud.com.cn"):Object(a.a)("ADP.Domain.icloud.com"),n=Object(c.a)(e.applicationIdentifier),i=Object(c.b)(e.applicationIdentifier),o="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.FailedToObtainConsent.Title.MailDrop"):Object(a.a)("ADP.FailedToObtainConsent.Title",{data:i}),u="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.FailedToObtainConsent.Description.MailDrop",{domain:t}):Object(a.a)("ADP.FailedToObtainConsent.Description",{domain:t,data:n}),l=Object(a.a)("ADP.FailedToObtainConsent.OK");return r.createElement(g,{title:o,description:u,buttonText:l,onClick:e.onOK,hideButtons:e.hideButtons})}function b(e){const t=s.a.sharedInstance.isDomainCN?Object(a.a)("ADP.Domain.icloud.com.cn"):Object(a.a)("ADP.Domain.icloud.com"),n=Object(c.a)(e.applicationIdentifier),i=Object(c.b)(e.applicationIdentifier),o="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.DeviceConsentDenied.Title.MailDrop"):Object(a.a)("ADP.DeviceConsentDenied.Title",{data:i}),u="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.DeviceConsentDenied.Description.MailDrop",{domain:t}):Object(a.a)("ADP.DeviceConsentDenied.Description",{data:n,domain:t}),l=Object(a.a)("ADP.DeviceConsentDenied.OK");return r.createElement(g,{title:o,description:u,buttonText:l,onClick:e.onOK,hideButtons:e.hideButtons})}function w(e){const t=s.a.sharedInstance.isDomainCN?Object(a.a)("ADP.Domain.icloud.com.cn"):Object(a.a)("ADP.Domain.icloud.com"),n=(()=>{switch(e.applicationIdentifier){case"maildrop":return Object(a.a)("ADP.FetchingKeysState.Description.MailDrop",{domain:t});case"bookmarks":return Object(a.a)("ADP.FetchingKeysState.Description.RestoreBookmarks",{domain:t});case"iclouddrivefilerecovery":return Object(a.a)("ADP.FetchingKeysState.Description.RestoreFiles",{domain:t});default:return Object(a.a)("ADP.FetchingKeysState.Description",{domain:t,data:Object(c.a)(e.applicationIdentifier)})}})();return r.createElement(r.Fragment,null,r.createElement("h2",{tabIndex:-1,className:"with-ellipsis"},r.createElement("span",null,Object(a.a)("ADP.FetchingKeysState.Title")),"\u2060",r.createElement(_,null)),r.createElement("div",{className:"description"},n))}function S(e){const t=s.a.sharedInstance.isDomainCN?Object(a.a)("ADP.Domain.icloud.com.cn"):Object(a.a)("ADP.Domain.icloud.com"),n=Object(c.a)(e.applicationIdentifier),i=Object(c.b)(e.applicationIdentifier),o="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.FailedToObtainConsent.Title.MailDrop"):Object(a.a)("ADP.FailedToFetchKeys.Title",{data:i}),u="maildrop"===e.applicationIdentifier?Object(a.a)("ADP.FailedToObtainConsent.Description.MailDrop",{domain:t}):Object(a.a)("ADP.FailedToFetchKeys.Description",{data:n}),l=Object(a.a)("ADP.FailedToFetchKeys.OK");return r.createElement(g,{title:o,description:u,buttonText:l,onClick:e.onOK,hideButtons:e.hideButtons})}function C(e){var t;const n=Object(c.a)(e.applicationIdentifier),i=Object(c.b)(e.applicationIdentifier),o=Object(a.a)("ADP.FailedToFetchKeys.Title",{data:i}),s=Object(a.a)("ADP.FailedToFetchKeys.ArmedDeviceNotSupported.Description",{data:n,osList:Object(a.a)(null!==(t=e.adpMinimumOSListLocKey)&&void 0!==t?t:"ADP.SupportedOS.Default")});return r.createElement(g,{title:o,description:s,hideButtons:!0})}function _(){return r.createElement("span",{className:"ellipsis"},r.createElement("span",{className:"dots"}))}function O(e){const t=e.onResult,n=e.applicationIdentifier,i=f.a.sharedInstance.getApplicationConfiguration(n),o=null===i||void 0===i?void 0:i.applicationInfo.adpMinimumOSListLocKey,a=e.pcsKeyIdentifier,[s,c]=Object(l.b)(n,a),d=(()=>{switch(s){case l.a.ArmingRequest:return r.createElement(h,null);case l.a.FailedToSendAccessRequest:return r.createElement(v,{onOK:()=>e.onResult(!1),hideButtons:e.hideButtons,adpMinimumOSListLocKey:o});case l.a.AwaitingDeviceConsent:return r.createElement(m,{onCancel:()=>e.onResult(!1),onSendAgain:c,hideButtons:e.hideButtons,adpMinimumOSListLocKey:o});case l.a.FailedToObtainConsent:return r.createElement(y,{applicationIdentifier:n,onOK:()=>e.onResult(!1),hideButtons:e.hideButtons});case l.a.DeviceConsentDenied:return r.createElement(b,{applicationIdentifier:n,onOK:()=>e.onResult(!1),hideButtons:e.hideButtons});case l.a.FailedToFetchKeys:return r.createElement(S,{applicationIdentifier:n,onOK:()=>e.onResult(!1),hideButtons:e.hideButtons});case l.a.AppNotSupportedWithArmedDevice:return r.createElement(C,{applicationIdentifier:n,adpMinimumOSListLocKey:o});case l.a.FetchingKeys:case l.a.AccessGranted:return r.createElement(w,{applicationIdentifier:n})}})(),p=r.useRef(null);return r.useEffect((()=>{var e;null===(e=p.current)||void 0===e||null===(e=e.querySelector("h2"))||void 0===e||e.focus()}),[s]),r.useEffect((()=>{s===l.a.AccessGranted&&t(!0)}),[s,t]),r.createElement("div",{ref:p,className:"adp-modal"},r.createElement("div",{className:"adp-modal-content"},r.createElement(u.a,{"aria-hidden":"true"}),d))}function E(){const[e,t]=Object(o.n)();return r.useCallback(((n,i,a,s)=>{d.a.sharedInstance.hasPCSKey(i)?s(!0):e(r.createElement(O,{applicationIdentifier:n,pcsKeyIdentifier:i,onResult:e=>{t(),s(e)},hideButtons:a}),{animates:o.b.IN_AND_OUT,className:"adp-modal-pane"})}),[e,t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(870),i=n(1215),o=n.n(i),a=n(1490),s=n(1489),c=n(1494),u=n(1491),l=n(1487),d=n(1486),p=n(1340);class f extends d.a{constructor(e){super(e),this.sliderElement=r.createRef(),this.knobElement=r.createRef(),this.initialDragKnobDelta=0,this.dragGestureIdentifier=null,this.touchStartDrag=e=>{if(!this.props.disabled&&1===e.changedTouches.length&&null===this.dragGestureIdentifier){e.preventDefault();const t=e.changedTouches[0];this.dragGestureIdentifier=t.identifier,this.startDragHelper(t.clientX,t.clientY),window.addEventListener("touchmove",this.touchDrag),window.addEventListener("touchend",this.endDrag)}},this.mouseStartDrag=e=>{0===e.button&&(e.preventDefault(),this.startDragHelper(e.clientX,e.clientY),m(e)?(window.addEventListener("mousemove",this.mouseDrag),window.addEventListener("mouseup",this.endDrag)):(window.addEventListener("pointermove",this.mouseDrag),window.addEventListener("pointerup",this.endDrag)))},this.startDragHelper=(e,t)=>{const{step:n}=this.props,{min:r,max:i,vertical:o}=y(this.props),a=this.sliderElement.current,s=this.knobElement.current;if(a&&s){let c;if(o){const{top:e,height:o}=s.getBoundingClientRect();t>e-4&&t<e+o+4&&(this.initialDragKnobDelta=t-(e+o/2)),c=S(a,t,r,i,this.initialDragKnobDelta,n)}else{const{left:t,width:o}=s.getBoundingClientRect();if(e>t-4&&e<t+o+4){const n="rtl"===window.getComputedStyle(a).direction;this.initialDragKnobDelta=n?e-t:e-(t+o/2)}c=w(a,e,r,i,this.initialDragKnobDelta,n)}this.updateValue(c,!0)}},this.endDrag=e=>{if(function(e){return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type}(e)&&null===v(e.changedTouches,this.dragGestureIdentifier))return;e.preventDefault(),this.initialDragKnobDelta=0,this.dragGestureIdentifier=null;const{value:t}=Object(s.a)(this.props,this.state,h);this.updateValue(t,!1),m(e)?(window.removeEventListener("mousemove",this.mouseDrag),window.removeEventListener("mouseup",this.endDrag)):function(e){return"pointerdown"===e.type||"pointermove"===e.type||"pointerup"===e.type}(e)?(window.removeEventListener("pointermove",this.mouseDrag),window.removeEventListener("pointerup",this.endDrag)):(window.removeEventListener("touchmove",this.touchDrag),window.removeEventListener("touchend",this.endDrag))},this.mouseDrag=e=>{e.preventDefault(),this.dragHelper(e.clientX,e.clientY)},this.touchDrag=e=>{const t=v(e.changedTouches,this.dragGestureIdentifier);null!==t&&(e.preventDefault(),this.dragHelper(t.clientX,t.clientY))},this.dragHelper=(e,t)=>{const{step:n}=this.props,{min:r,max:i,vertical:o}=y(this.props),a=this.sliderElement.current;if(a){let s;s=o?S(a,t,r,i,this.initialDragKnobDelta,n):w(a,e,r,i,this.initialDragKnobDelta,n),this.updateValue(s,!0)}},this.stepWithKeyboard=e=>{const{accessibilityStep:t}=this.props;let{step:n}=this.props;void 0===n&&(n=void 0===t?1:t);const{max:r,min:i}=y(this.props),{value:o}=Object(s.a)(this.props,this.state,h);["ArrowRight","ArrowUp","PageUp"].includes(e.key)?(e.preventDefault(),o+n<=r&&this.updateValue(b(o+n,n),this.state.isDragging)):["ArrowLeft","ArrowDown","PageDown"].includes(e.key)&&(e.preventDefault(),o-n>=i&&this.updateValue(b(o-n,n),this.state.isDragging))},Object(c.a)(e,h);const t=Object(s.b)(e,{value:0},h);this.state={...t,isDragging:!1}}componentDidMount(){super.componentDidMount(),this.forceUpdate(),this.sliderElement.current.addEventListener("touchstart",this.touchStartDrag)}componentDidUpdate(e,t){e.vertical===this.props.vertical&&e.min===this.props.min&&e.max===this.props.max||this.forceUpdate()}componentWillUnmount(){super.componentWillUnmount(),this.sliderElement.current.removeEventListener("touchstart",this.touchStartDrag)}render(){const{props:e,state:t}=this,{id:n,name:i,form:a,disabled:u,className:l,style:d,tooltip:f,vertical:m,ariaLabel:g}=e,{min:v,max:b,variant:w}=y(e),{isDragging:S}=t;Object(c.a)(e,h);const{value:C,labelId:_}=Object(s.a)(e,t,h);let O=o()(w,l,p.a);S&&(O=o()(O,"ui-component-dragging"));const E=this.sliderElement,I=!!E.current&&"rtl"===window.getComputedStyle(E.current).direction,A=this.computePosition(C,I),T=I?100-A:A;return r.createElement("ui-slider",{ref:E,id:n,class:O,style:d,title:f,tabindex:this.tabindex,onKeyDown:u?void 0:this.stepWithKeyboard,"aria-disabled":u,"aria-orientation":m?"vertical":"horizontal",onMouseDown:u?void 0:this.mouseStartDrag,onPointerDown:u?void 0:this.mouseStartDrag,"aria-label":g,"aria-labelledby":g?void 0:_},r.createElement("ui-slider-track",null,r.createElement("ui-slider-track-progress",{style:{[m?"height":"width"]:`${T}%`}})),r.createElement("ui-slider-knob",{role:"slider","aria-valuemin":v,"aria-valuemax":b,"aria-valuenow":C,ref:this.knobElement,style:{top:"auto",right:"auto",bottom:m?`${A}%`:"auto",left:m?"auto":`${A}%`}}),r.createElement("input",{type:"hidden",name:i,value:C,disabled:u,form:a}))}onLabelId(e){this.setState({labelId:e})}onActivationComplete(){this.sliderElement.current.focus()}computePosition(e,t){const{max:n,min:r}=y(this.props);return function(e,t,n,r){e<t&&(e=t),e>n&&(e=n);const i=(e-t)/(n-t);return 100*(r?1-i:i)}(e,r,n,t)}updateValue(e,t){const n=this.state,r={value:e,isDragging:t};this.setState(r),Object(l.b)({state:r,changedKeys:Object(a.a)(n,r,["value","isDragging"])},this.props)}get tabindex(){const{props:e}=this;if(!e.disabled)return e.hasOwnProperty("tabindex")?e.tabindex:0}}const h=[{controlledKey:"value",uncontrolledKey:"defaultValue",callbackKeys:["onStateChange"]}];function m(e){return"mousedown"===e.type||"mousemove"===e.type||"mouseup"===e.type}function g(e,t){if(t){const t=e.getBoundingClientRect();return{top:t.top,left:t.left,sliderSize:t.height}}{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,sliderSize:t.width}}}function v(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t===r.identifier)return r}return null}function y(e){return{min:Object(u.a)(e.min,0),max:Object(u.a)(e.max,100),variant:Object(u.a)(e.variant,"standard"),vertical:Object(u.a)(e.vertical,!1)}}function b(e,t){const n=Math.round(e);if(n%t===0)return n;{const e=n-n%t,r=e+t;return n-e<r-n?e:r}}function w(e,t,n,r,i,o){const{left:a,sliderSize:s}=g(e,!1),c="rtl"===window.getComputedStyle(e).direction,u=t-i;if(u<=a)return c?r:n;if(u>=a+s)return c?n:r;{const e=u-a,t=(r-n)*(c?1-e/s:e/s);return o?b(t,o)+n:t+n}}function S(e,t,n,r,i,o){const{top:a,sliderSize:s}=g(e,!0),c=t-i;if(c<=a)return r;if(c>=a+s)return n;{const e=(r-n)*(1-1/s*(c-a));return o?b(e,o)+n:e+n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(870),i=n(1215),o=n.n(i),a=n(1487),s=n(1494),c=n(1489),u=n(1486),l=n(1225),d=n(1212),p=n(1340);class f extends u.a{constructor(e){super(e),this.onActivate=async()=>{await this.toggleChecked(((e,t)=>({checked:!e.checked})))},this.onInputChange=async e=>{const t=e.currentTarget;await this.toggleChecked(((e,n)=>({checked:!t.indeterminate&&t.checked})))},this.toggleChecked=async e=>{const t=await Object(a.a)(this,h,e);Object(a.b)(t,this.props)},this.onActivationStart=()=>{!0!==this.props.disabled&&this.setState({active:!0})},this.onActivationEnd=()=>{!0!==this.props.disabled&&this.setState({active:!1})},this.onActivationCancel=()=>{!0!==this.props.disabled&&this.setState({active:!1})},Object(s.a)(e,h),this.state=Object(c.b)(e,{checked:!1},h),this.rootRef=r.createRef()}render(){const{props:e,state:t}=this;Object(s.a)(e,h);const{checked:n,labelId:i}=Object(c.a)(e,t,h),{variant:a,inputId:u,name:f,form:m,value:g,disabled:v,id:y,style:b,tabIndex:w,ariaLabel:S,tooltip:C}=e,_=Object(l.a)({active:t.active,...e.hasOwnProperty("tabIndex")?{tabIndex:w}:{},disabled:v,onActivate:this.onActivate,onActivationStart:this.onActivationStart,onActivationEnd:this.onActivationEnd,onActivationCancel:this.onActivationCancel,variant:a||"standard"});return r.createElement(d.a,{render:(e,t)=>(_.class=o()(_.class,t,p.a),r.createElement("ui-switch",Object.assign({},_,{id:y,style:b,ref:this.rootRef,role:"switch","aria-label":S,"aria-labelledby":S?void 0:i,"aria-checked":n,title:C}),r.createElement("ui-switch-knob",null),r.createElement("input",{id:u,type:"checkbox",checked:n,"aria-hidden":!0,name:f,value:g||"on",disabled:v,form:m,onChange:this.onInputChange})))})}onLabelId(e){this.setState({labelId:e})}onActivationComplete(){!0!==this.props.disabled&&this.onActivate()}}const h=[{controlledKey:"checked",uncontrolledKey:"defaultChecked",callbackKeys:["onStateChange"]}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(870),i=n(1495);const o=r.forwardRef((function(e,t){const{children:n,rows:o,cols:a,resize:s,tooltip:c,variant:u,className:l,id:d,disabled:p,required:f,validate:h,onBlur:m,onChange:g,onStateChange:v,onSelect:y,onInput:b,defaultValue:w,value:S,defaultSelection:C,selection:_,invalid:O,ariaLabelledBy:E,...I}=e,{inputProps:A,wrapperProps:T}=Object(i.a)({variant:u,className:l,id:d,ref:t,disabled:p,required:f,validate:h,onBlur:m,onChange:g,onStateChange:v,onSelect:y,onInput:b,defaultValue:w,value:S,defaultSelection:C,selection:_,invalid:O,ariaLabelledBy:E}),P={resize:s};return void 0===s&&(P.resize="none"),r.createElement("ui-text-area",Object.assign({title:c},T),r.createElement("textarea",Object.assign({},I,A,{rows:o,cols:a,style:P})),n)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(1486),o=n(1494),a=n(1489),s=n(1487),c=n(1225);const u=r.forwardRef(((e,t)=>r.createElement(l,Object.assign({innerRef:t},e))));u.displayName="UIToggleButton";class l extends i.a{constructor(e){super(e),this.onActivate=async()=>{const e=await Object(s.a)(this,d,((e,t)=>({checked:!e.checked})));Object(s.b)(e,this.props)},Object(o.a)(e,d),this.state=Object(a.b)(e,{checked:!1},d)}render(){const{props:e,state:t}=this;Object(o.a)(e,d);const{checked:n,labelId:i}=Object(a.a)(e,t,d),{ariaLabel:s,ariaDescribedBy:u,children:l,variant:p,disabled:f,id:h,innerRef:m,style:g,className:v,tabIndex:y,tooltip:b}=e,w=Object(c.a)({disabled:f,className:v,...e.hasOwnProperty("tabIndex")?{tabIndex:y}:{},onActivate:this.onActivate,variant:p||"push standard"});return r.createElement("ui-toggle-button",Object.assign({},w,{id:h,style:g,title:b,ref:m,role:"button","aria-pressed":n,"aria-label":s,"aria-labelledby":s?void 0:i,"aria-describedby":u}),l)}onLabelId(e){this.setState({labelId:e})}onActivationComplete(){!0!==this.props.disabled&&this.onActivate()}}const d=[{controlledKey:"checked",uncontrolledKey:"defaultChecked",callbackKeys:["onStateChange"]}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(870),i=n(2221),o=n(1498),a=n(1508),s=n(2224),c=n(2196),u=n(2257);function l(e){var t,n;const l=r.useRef(null),d=null!==(t=e.textFieldRef)&&void 0!==t?t:l,{selectedItem:p,textFieldValueForMenuItem:f}=e;let h="";if(void 0!==p)if("string"===typeof p)h=p;else{if(!f)throw new Error("selectedItem must be of type string or you must provide a function for textFieldValueForMenuItem");h=f(p)}const{inputProps:m,menuProps:g}=Object(a.b)({autocompleteType:"Simple",shouldAutoHighlightFirstHighlightableItem:!1,valueForMenuItem:f,initialValue:h,...e}),v=r.useRef(0),[y,b]=r.useState(0);r.useLayoutEffect((()=>{g.items.length!==y&&(v.current+=1,b(g.items.length))}),[g,y]);const w=null!==(n=e.menuPositioner)&&void 0!==n?n:Object(s.b)({...s.c,sidePreference:[s.a.bottomInlineStart,s.a.topInlineStart],anchorMargin:{left:10}}),S=`ui-combobox-${e.id}-menu`,[C,_]=Object(u.h)(r.createElement(c.b,{positioner:w,anchorRef:d,arrowless:!0,remeasureToken:v.current},r.createElement(i.c,Object.assign({},g,{scrollMode:i.k.Continuous,id:S,className:e.menuClassName,variant:e.menuVariant,dontManageFocus:!0,role:"listbox",ariaLabel:e.menuAriaLabel}),g.items)));return r.useLayoutEffect((()=>{g.isOpen?C():_()}),[g.isOpen,_,C]),r.createElement("ui-combo-box",null,r.createElement(o.a,Object.assign({},m,{value:m.value,ref:d,id:e.id,placeholder:e.placeholder,disabled:!0===e.disabled,variant:e.variant,className:e.className,autoComplete:"off","aria-expanded":g.isOpen,"aria-controls":S,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-autocomplete":"list",role:"combobox","aria-haspopup":"listbox",invalid:m.invalid,leadingAccessory:e.leadingAccessory,maxLength:e.maxLength})))}function d(e,t,n){if(!t)return e;const r=e.slice(0).reverse();let i=[];const o=(e,t)=>e===t,a=(e,t)=>e.startsWith(t),s=(e,t)=>e.includes(t);for(const c of[o,a,s]){let o=r.length;const a=[];for(;--o>=0;){let s;if("string"!==typeof e[o]){if(!n)throw new Error("For menu items that do not consist of strings, you must supply a textForItem handler.");s=n(e[o])}else s=e[o];c(s.toLowerCase(),t.toLowerCase())&&-1===i.indexOf(e[o])&&-1===a.indexOf(e[o])&&(a.push(e[o]),r.splice(o,1))}"string"!==typeof e[0]?a.sort(((e,t)=>n(e).localeCompare(n(t)))):a.sort(),i=i.concat(a)}return i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(913),i=n(912);function o(e){let{stack:t}=e;if(!t||"string"!==typeof t)return t;t=t.trim();const n=t.split("\n"),r=n.length;if(r<=501)return t;const i=r-400-100;return n.splice(400,i,`... ${i} lines truncated ...`),n.join("\n")}function a(e){if(!e)return"Unknown";const t=parseInt(e,10);return Number.isFinite(t)?t:"Unknown"}const s="network",c="UNKNOWN",u={reportStat(e){i.a.queueStat(e)},reportPerfStat(e){i.a.queueStat(e,i.b.PERF_STAT)},reportCrash:e=>Promise.all([i.a.sendAllStats(),i.a.sendCrashError(e)]),flush:()=>i.a.sendAllStats()},l={testID:new URLSearchParams(location.search).get("testID")||void 0,location:location};function d(e){if(e.statName!==s)return[e];const t=[],n=Object.assign({},e,{statName:"requestInfo"});if(t.push(n),n.response_status>299){const n=Object.assign({},e,{statName:"serverErrorOrTimeout"});t.push(n)}return t}function p(e){return Object.assign(e,{testID:e.testID||l.testID,sessionID:e.sessionID||l.sessionID,isInternal:!1,isDebug:!1})}function f(e){const{appName:t,statName:n,fullStatName:r}=e,i=r||`${t}.${n}`;return delete e.fullStatName,Object.assign(e,{statName:i})}function h(e){let{appName:t}=e;return t=t||l.appName,Object.assign(e,{appName:t})}function m(e,t){return Math.max(0,Math.round(e/t)*t)}function g(e){return Number.isFinite(e.clientTiming)&&(e.clientTiming=m(e.clientTiming,100)),Number.isFinite(e.net_uncompressedResponseSize)&&(e.net_uncompressedResponseSize=function(e){return(t=e)>1e3?">1KB":m(t,100);var t}(e.net_uncompressedResponseSize)),e}function v(){const{buildInfo:e,environmentInfo:t,userAgent:n,testID:r,sessionID:i,location:o,appName:a,hostingAppName:s}=l,{hostname:c}=o;return Object.assign({appName:a,hostingAppName:s,clientTime:`${new Date} (${Date.now()})`,userAgent:n,hostname:c,buildInfo:e,testID:r,sessionID:i,environmentInfo:t})}function y(e){const{message:t,type:n,requestUUID:r,appName:i}=e;return h({appName:i,reportedErrorTitle:t||c,reportedErrorType:n||c,requestUUID:r})}function b(e){const t=window.performance.now();return{toJSON:()=>Object.assign(v(),{statName:e,clientTiming:Math.floor(window.performance.now()-t)})}}const w={configure(e){Object.assign(l,e),!0===l.isSendingStatsEnabled&&(r.a.isSendingStatsEnabled=!0),r.a.flushInterval=e.flushInterval,i.a.scheduleFlush()},recordCWNetworkRequest(e){const t=b(s);e.on("didFinalize",(()=>{const n=Object.assign(t.toJSON(),function(e){const{url:t,method:n,response:r}=e,{status:i,encodedBody:o}=r,{hostname:a,pathname:s}=t;let c;return"function"===typeof e.getUUID&&(c=e.getUUID()),{request_uuid:c||"",request_method:n,request_pathname:s,request_hostname:a,request_timedOut:"timedout"===e.state,response_status:i,response_body:i>299?o:"(skipped)",response_size:o?o.length:null}}(e));w.handleStat(n)}))},recordErrorCatcherWasDisplayed(e){const t=b("errorCatcherWasDisplayed"),n=Object.assign(t.toJSON(),y(e));return w.handleStat(n),w.flush()},createErrorReport(e){const{lineNumber:t,columnNumber:n}=function(e){const t={lineNumber:"Unknown",columnNumber:"Unknown"};if("object"!==typeof(n=e)||null===n||!("stack"in n)||"string"!==typeof n.stack)return t;var n;const r=e.stack.split("\n")[1];if("string"!==typeof r)return t;const i=r.split(":"),o=a(i.pop());return{lineNumber:a(i.pop()),columnNumber:o}}(e);return Object.assign(v(),y(e),{lineNumber:t,columnNumber:n,userAppleId:l.userAppleId,userDSID:l.userDSID,stack:o(e),errorContext:l.stringifyExceptionContext(e.context)})},recordErrorReportWithUserConsent:e=>u.reportCrash(e),handleStat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.flatMap(d).map(p).map(h).map(f).map(g).forEach(u.reportStat)},handlePerfStat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.flatMap(d).map(p).map(g).forEach(u.reportPerfStat)},flush:()=>u.flush(),updateServiceUrl(e){if(!e)throw"[Reporting] `serviceUrl` missing from `updateServiceUrl()` routine.";r.a.serviceUrl=e}}},function(e,t,n){"use strict";n.d(t,"h",(function(){return T})),n.d(t,"g",(function(){return L})),n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return U})),n.d(t,"d",(function(){return F})),n.d(t,"c",(function(){return z})),n.d(t,"e",(function(){return B})),n.d(t,"f",(function(){return K}));var r=n(1001),i="FN",o="MN",a="LN",s="FI",c="LI",u=" ",l="I1",d={fullName:[i,u,a],completeName:[i,u,o,u,a],shortName:[i],initials:[s,c],lastInitial:[c],wordInitials:[l,"I2","I3","I4"],isFirstLast:!0},p={fullName:[a,i],completeName:[a,i],shortName:[a,i],wordInitials:[l],isFirstLast:!1},f={fullName:[i,u,a],completeName:[i,u,o,u,a],shortName:[i],isFirstLast:!0},h={fullName:[i,u,a],completeName:[i,u,o,u,a],shortName:[i],initials:[s,c],lastInitial:[c],wordInitials:d.wordInitials,isFirstLast:!0},m={fullName:[a,u,o,u,i],completeName:[a,u,o,u,i],shortName:[i],initials:[c,s],lastInitial:[c],wordInitials:d.wordInitials,isFirstLast:!1},g={fullName:[a,u,o,u,i],completeName:[a,u,o,u,i],shortName:[a,u,i],initials:[c,s],lastInitial:[c],wordInitials:d.wordInitials,isFirstLast:!1},v=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))},y=/\s+/g,b=[[44032,55203]],w=v(v([],b,!0),[[19968,40959],[13312,19903],[131072,173791],[173824,183983],[173824,183983],[63744,64255],[12593,55197],[12288,12543]],!1),S=[[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279],[69216,69247],[126064,126143],[126208,126287],[126464,126719]],C=[[1424,1535],[64285,64335]],_=v(v(v(v(v([],[[65,90],[97,122],[192,214],[216,246],[248,591],[7682,7923]],!0),[[884,1023]],!0),[[1024,1279]],!0),w,!0),C,!0);function O(e,t){return t.some((function(t){return e>=t[0]&&e<=t[1]}))}function E(e){return((null===e||void 0===e?void 0:e.givenName)||"").trim()}function I(e){return((null===e||void 0===e?void 0:e.familyName)||"").trim()}function A(e){var t=e.replace(y,"").codePointAt(0);return t?String.fromCodePoint(t):""}function T(e){return!!e&&(!!R(E(e))||!!R(I(e)))}var P=function(e){return function(e){return Array.from(e).map((function(e){return e.codePointAt(0)}))}(e.replace(y,""))};function R(e){return!!e&&P(e).every((function(e){return O(e,w)}))}function k(e){return!!e&&P(e).some((function(e){return O(e,b)}))}function D(e){return P(e).every((function(e){return O(e,_)}))}function M(e,t){if(e){if(T(e))return p;if(function(e){if(!e)return!1;var t=E(e)||I(e);return!!t&&P(t).every((function(e){return O(e,S)}))}(e))return f;if(function(e){if(!e)return!1;var t=E(e)||I(e);return!!t&&P(t).every((function(e){return O(e,C)}))}(e))return h}if(t){if(t===r.a)return m;if(t===r.d)return g}return d}function N(e,t){return e?t.reduce((function(t,n){var r,d=e;switch(n){case i:return t.push(E(d)),t;case o:return t.push(function(e){return((null===e||void 0===e?void 0:e.middleName)||"").trim()}(d)),t;case a:return t.push(I(d)),t;case s:return t.push(function(e){return A(E(e))}(d)),t;case c:return t.push(function(e){return A(I(e))}(d)),t;case u:return""!==(t[t.length-1]||"").trim()&&t.push(u),t}var p=e;switch(n){case l:r=p.word1;break;case"I2":r=p.word2;break;case"I3":r=p.word3;break;case"I4":r=p.word4}var f=(r||"").trim();return t.push(A(f)),t}),[]).join("").trim():""}var x=function(e,t){return t=(null===t||void 0===t?void 0:t.toLowerCase())||"",/^\w\w$/.test(t)?t:Object(r.e)(e)||r.c},L=function(e){return!r.b.has(e)},j=function(e,t,n){return N(e,M(e,x(t,n)).fullName)},U=function(e,t,n){return N(e,M(e,x(t,n)).completeName)},F=function(e,t,n){return N(e,M(e,x(t,n)).shortName)},z=function(e,t,n){var r=E(e);if(k(r))return r.length>=3?"":r;var i=I(e);if(R(i))return i.length>=3?"":i;if(R(r))return"";var o=M(e,x(t,n));if(!o.initials)return"";var a=N(e,o.initials).replace(y,"").toLocaleUpperCase(t);return D(a)?a:""},B=function(e,t,n){if(T(e))return z(e,t,n);var r=M(e,x(t,n));if(!r.lastInitial)return"";var i=N(e,r.lastInitial).replace(y,"");return D(i)?i:""},K=function(e){var t=(e||"").split(y).filter((function(e){return!/^\d/.test(e)})),n=R(e)?p:d,r=N({word1:t[0],word2:t[1],word3:t[2],word4:t[3]},n.wordInitials||[]).replace(y,"");return k(r)||function(e){return!!e&&function(e){return!!e&&P(e).some((function(e){return O(e,w)}))}(e)&&!R(e)}(r)?"":D(r)?r:""}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return w}));var r,i=n(1038),o=n(1035),a=n(1036),s=n(2217),c=n(1086),u=n(1085),l=n(1084);!function(e){e[e.Success=0]="Success",e[e.NoResultCode=1]="NoResultCode",e[e.LegacyTunnelOK=200]="LegacyTunnelOK",e[e.LegacyTunnelBadRequest=400]="LegacyTunnelBadRequest",e[e.ParseFailure=1e3]="ParseFailure",e[e.InvalidField=1001]="InvalidField",e[e.MessageRemoved=1002]="MessageRemoved",e[e.MessageInhibited=1003]="MessageInhibited",e[e.DecodeFailureBase64=1004]="DecodeFailureBase64",e[e.DecodeFailureHex=1005]="DecodeFailureHex",e[e.AuthFailure=1006]="AuthFailure",e[e.StorageFailure=1007]="StorageFailure",e[e.InternalError=5001]="InternalError",e[e.ServerTooBusy=5004]="ServerTooBusy",e[e.BadPushToken=5006]="BadPushToken",e[e.MissingRequiredKey=5008]="MissingRequiredKey",e[e.UPlusOneDisabled=5010]="UPlusOneDisabled",e[e.BadSignature=5032]="BadSignature",e[e.WebTunnelServiceDisabled=5200]="WebTunnelServiceDisabled",e[e.WebTunnelServiceInternalError=5201]="WebTunnelServiceInternalError",e[e.WebTunnelServiceTooBusy=5202]="WebTunnelServiceTooBusy",e[e.WebTunnelServiceMissingKey=5203]="WebTunnelServiceMissingKey",e[e.WebTunnelServiceMalformedURL=5204]="WebTunnelServiceMalformedURL",e[e.WebTunnelServiceUnauthorizedURL=5205]="WebTunnelServiceUnauthorizedURL",e[e.WebTunnelServiceResponseTooLarge=5206]="WebTunnelServiceResponseTooLarge",e[e.WebTunnelServiceOriginServerTimeout=5207]="WebTunnelServiceOriginServerTimeout",e[e.UnknownCommand=6e3]="UnknownCommand",e[e.RateLimited=7e3]="RateLimited",e[e.ServiceDisabled=7001]="ServiceDisabled",e[e.AliasEmpty=5035]="AliasEmpty",e[e.EmailInvalid=5036]="EmailInvalid",e[e.EmailInRequired=5037]="EmailInRequired",e[e.EmailInUse=5038]="EmailInUse",e[e.EmailInUseAlt=5055]="EmailInUseAlt",e[e.EmailLegacyOrInactive=5088]="EmailLegacyOrInactive",e[e.EmailVetted=5051]="EmailVetted",e[e.EmailNotVetted=5052]="EmailNotVetted",e[e.HTTPSuccess=200]="HTTPSuccess",e[e.BadRequest=5003]="BadRequest",e[e.CancelledByUser=5013]="CancelledByUser",e[e.UnsupportedManagedID=5100]="UnsupportedManagedID",e[e.UnsupportedAuditorID=5103]="UnsupportedAuditorID",e[e.ValidationFailure=8e3]="ValidationFailure",e[e.ValidationCertFetchFailure=8001]="ValidationCertFetchFailure",e[e.NoNetworkAvailable=1e4]="NoNetworkAvailable",e[e.FailedRequest=2e4]="FailedRequest",e[e.PushRequestFailed=20001]="PushRequestFailed",e[e.ActionDoNotRetry=6001]="ActionDoNotRetry",e[e.ActionRetryWithDelay=6002]="ActionRetryWithDelay",e[e.ActionRetryWithCorrectedTime=6003]="ActionRetryWithCorrectedTime",e[e.ActionRetryWithNewAbsintheContext=6004]="ActionRetryWithNewAbsintheContext",e[e.ActionRefreshCredentials=6005]="ActionRefreshCredentials",e[e.ActionRefreshRegistration=6006]="ActionRefreshRegistration",e[e.ActionAuthenticationFailed=6008]="ActionAuthenticationFailed",e[e.ActionPermanentFailure=6009]="ActionPermanentFailure",e[e.ActionIdMSSessionRefreshException=6010]="ActionIdMSSessionRefreshException",e[e.ActionProvisionLimitReached=6011]="ActionProvisionLimitReached",e[e.ActionProvisionReplaceAllSessionKeys=6012]="ActionProvisionReplaceAllSessionKeys",e[e.Unauthenticated=5e3]="Unauthenticated",e[e.InvalidNameOrPassword=5012]="InvalidNameOrPassword",e[e.AccountDisabledForSecurityReasons=5046]="AccountDisabledForSecurityReasons",e[e.VersionMismatch=5002]="VersionMismatch",e[e.NoSuchPlayerID=5005]="NoSuchPlayerID",e[e.NoSuchAchievement=5007]="NoSuchAchievement",e[e.MissingRequiredHeader=5009]="MissingRequiredHeader",e[e.UnrecognizedGameDescriptorHeaders=5010]="UnrecognizedGameDescriptorHeaders",e[e.MustAcceptTermsOfService=5011]="MustAcceptTermsOfService",e[e.NoSuchFriendRelationship=5014]="NoSuchFriendRelationship",e[e.NoSuchAlias=5015]="NoSuchAlias",e[e.EmailNotInNetwork=5016]="EmailNotInNetwork",e[e.RequestDisallowed=5017]="RequestDisallowed",e[e.NoSuchRID=5018]="NoSuchRID",e[e.NoSuchGame=5019]="NoSuchGame",e[e.MixedResponse=5020]="MixedResponse",e[e.ProfileExists=5021]="ProfileExists",e[e.AliasExists=5022]="AliasExists",e[e.AccountNameNotEmailAddress=5023]="AccountNameNotEmailAddress",e[e.AliasTooLong=5024]="AliasTooLong",e[e.AliasTooFrequentUpdates=5025]="AliasTooFrequentUpdates",e[e.PlayerStatusNotAllowed=5026]="PlayerStatusNotAllowed",e[e.PlayerStatusTooLong=5027]="PlayerStatusTooLong",e[e.NoSuchBucketID=5028]="NoSuchBucketID",e[e.AuthenticatedNotAuthorized=5029]="AuthenticatedNotAuthorized",e[e.NoPushTokenForID=5030]="NoPushTokenForID",e[e.PushPayloadTooBig=5031]="PushPayloadTooBig",e[e.NewSignatureRequired=5033]="NewSignatureRequired",e[e.NewLinkedSignatureRequired=5099]="NewLinkedSignatureRequired",e[e.NewRegistrationRequred=5034]="NewRegistrationRequred",e[e.ExpiredRelayToken=5039]="ExpiredRelayToken",e[e.BadSessionToken=5040]="BadSessionToken",e[e.ExpiredSessionToken=5041]="ExpiredSessionToken",e[e.ForcePasswordChange=5047]="ForcePasswordChange",e[e.ProfileBlocklisted=5048]="ProfileBlocklisted",e[e.SelfVersionTooOld=5057]="SelfVersionTooOld",e[e.PeerVersionTooOld=5058]="PeerVersionTooOld",e[e.PhoneNumberTooShort=5059]="PhoneNumberTooShort",e[e.PhoneNumberTooLong=5060]="PhoneNumberTooLong",e[e.PhoneNumberBadCountryCode=5061]="PhoneNumberBadCountryCode",e[e.PhoneNumberMalformed=5062]="PhoneNumberMalformed",e[e.BadInvitationContext=5063]="BadInvitationContext",e[e.UnpromotablePhoneNumber=5064]="UnpromotablePhoneNumber",e[e.RegistrationLimitReached=5068]="RegistrationLimitReached",e[e.AbsintheInternalError=5078]="AbsintheInternalError",e[e.AbsintheSessionCreationFailed=5079]="AbsintheSessionCreationFailed",e[e.AbsintheValidationFailed=5080]="AbsintheValidationFailed",e[e.AlbertInternalError=5089]="AlbertInternalError",e[e.AlbertValidationFailed=5090]="AlbertValidationFailed",e[e.NeedsBreakBeforeMake=5076]="NeedsBreakBeforeMake",e[e.BadCert=5085]="BadCert",e[e.BadNonce=5086]="BadNonce",e[e.BadNonceTimestamp=5087]="BadNonceTimestamp",e[e.ServerRegistrationUnsupported=5092]="ServerRegistrationUnsupported",e[e.None=255]="None"}(r||(r={}));var d=n(2282),p=n(1076),f=n(1029),h=n.n(f),m=n(1075);const g=new TextDecoder;class v extends u.b{constructor(e){super(),this.provider=e,this.logger=Object(i.a)(this).child`PushDispatcher`.id``().package`Messaging`.subsystem`push`.category`incoming`,this.bplistParser=Object(c.a)(this),this.dispatchersByTopic=new Map}get(e){return this.provider.get(e)}async handleIncomingMessage(e){const{message:t,pushToken:n}=e;if(t.pushMessage){return await this.didReceivePushMessage(t,t.pushMessage,n)||!0}return t.pushAcknowledgmentMessage?this.dispatch({type:"ack",message:t,pushToken:n,payload:t.pushAcknowledgmentMessage}):this.dispatch({type:"other",message:t,pushToken:n})}async didReceivePushMessage(e,t,n){var r,i,a;let c;null!==t.id&&void 0!==t.id&&null!==t.topic&&void 0!==t.topic&&g.decode(t.topic)!==p.a.QuickRelaySignaling?c=Object(d.a)(this).send({pushAcknowledgmentMessage:{id:t.id,topic:t.topic}}):(this.logger.info`Not sending ACK for the message with id: ${Object(s.c)(t.id).sessionID(l.c)}; topic: ${Object(s.c)(t.topic).constant()}`,c=Promise.resolve());const u=async e=>{if(e instanceof Error)return e;const t=await c;return t instanceof Error?t:e},f=t.payload;let v;try{v=f?this.bplistParser.isBPlist(f)?this.bplistParser.parse(f):JSON.parse(g.decode(f)):null}catch(C){this.logger.info`Payload is neither json nor bplist, so won't be a Nice message`,v=Object(o.a)(C,"silent")}const y=Object(m.c)(this.provider),{topicsByHash:b}=y,w=await Object(p.b)(t.topic||new Uint8Array(1),b);if(this.logger.info`[PushConnection --> webClientPushMessage]: Topic: ${Object(s.c)(w).constant()}; id: ${Object(s.c)(t.id).sessionID(l.c)}; ${Object(s.c)(null!==(r=v)&&void 0!==r&&r.c?"command: "+v.c:" ").constant()}`,Number(null===(i=v)||void 0===i?void 0:i.c)===l.a.Response&&"s"in v){var S;const t=null===(S=v)||void 0===S?void 0:S.s;return u(await this.handlePushResponse(h.a.toNumber(h.a.BigInt(t)),w,n,e,v))}if(Number(null===(a=v)||void 0===a?void 0:a.c)===l.a.OfflineMessagePendingStorageCheck)return await this.dispatch({type:"pendingStorageCheck",rawMessage:e,pushMessage:t,payload:v,topic:w,pushToken:n});if(null!==t.id&&void 0!==t.id&&null!==t.topic&&void 0!==t.topic){const e=this.dispatchersByTopic.get(w),t=e&&await e.handleIncomingMessage({message:v instanceof Error?f:v,pushToken:n,topic:w});return t?u(t):(this.logger.warn`[PushConnection --> webClientPushMessage]: did not find handler for ${Object(s.c)(w).constant()} ${v instanceof Error?f:v}`,u(!1))}return this.logger.info`Unknown push: ${t}`,u(!1)}async handlePushResponse(e,t,n,i,o){const a=i.pushMessage;return this.logger.info`[PushConnection --> webClientPushMessage]: message ${Object(s.c)(a.id).sessionID()} is a push response c=${Object(s.c)(e).notPII().forCertain()}=${Object(s.c)(r[e]).notPII().forCertain()}`,h.a.EQ(e,r.Success)?await this.dispatch({type:"delivered",topic:t,pushToken:n,message:i,pushMessage:a,payload:o}):await this.dispatch({type:"error",rawMessage:i,pushMessage:a,payload:o,pushToken:n,topic:t})}dispatcherForTopic(e){const t=this.dispatchersByTopic.get(e);if(t)return t;const n=new u.a(this.provider,e);return this.dispatchersByTopic.set(e,n),n}topic(e,t){return Object(m.c)(this.provider).hashUnknownTopics([e]),t&&this.dispatchersByTopic.set(e,t),this.dispatcherForTopic(e)}}const y=Object(a.a)((e=>new v(e))),b=Object(a.a)((e=>y(e))),w=Object(a.a)((e=>y(e)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(1078),i=n(2173),o=n(1038),a=n(1040),s=n(1079),c=n(1016),u=n(1011),l=n(2217),d=n(1033);const p=Object(c.b)("FailedEveryTry",(e=>({isLoggable:!0,logString:u.b`Failed ${e.length} tries.`,errors:e})));class f{get round(){return this._round}constructor(e){this.triesRemaining=e,this._round=0}next(){this._round++;const e=this.triesRemaining[0];return this.triesRemaining=this.triesRemaining.slice(1),null!==e&&void 0!==e?e:-1}get hasTriesRemaining(){return this.triesRemaining.length>0}}var h=n(1036),m=n(1088),g=n(1021),v=n(1086),y=n(1087),b=n(1084),w=n(1075),S=n(2281),C=n(1076),_=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};const O=[2e3,5e3,1e4,13e3],E=new TextEncoder;class I extends r.a{static createWebClientPushMessage(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now()+1e5;const o=Object(i.b)();return{topic:E.encode(e),id:n,expirationTimeSecs:r/1e3,payload:t,uuid:o}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(w.c)(e);super(e),this.connection=t,this.pendingAcks=new Map,this.pendingDeliveries=new Map,this.logger=Object(o.a)(this).child`PushSender`().package`Messaging`.subsystem`push`.category`outgoing`,this.feedbackWS=Object(a.a)(this),this.bplistParser=Object(v.a)(this),this.dispose=Object(S.a)(e).subscribe((async e=>"ack"===e.type?this.handleAck(e.payload):"delivered"===e.type?this.handleDelivery(e):"pendingStorageCheck"===e.type?this.handleStorageCheck(e):"error"===e.type&&this.handleError(e)))}get pushToken(){return this.connection.pushToken}async send(e){return this.connection.sendMessage(e)}sendRawPush(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.logger;this.logger.info`sending raw push - payload: ${t}`;const{sent:i,ack:o}=this.sendPush(e,t,n,r);return{sent:i,ack:o}}sendPush(e,t,n){var r=this;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.logger;const o=t instanceof Uint8Array?void 0:t.i,a=Object(y.a)();this.connection.hashUnknownTopics([e]);const h=t instanceof Uint8Array?t:this.bplistParser.write(t);i.debug`${Object(l.c)(e).constant()}: pre-wrap for apns: i=${Object(l.c)(o).sessionID()} unencoded=${t}`;const m=Object(s.a)(),g=new f(O),v=async function(e,t,n){const r=n.begin`attemptWithRetries`(),i=Array.isArray(t)?new f(t):t;r.silly`Attempting with schedule: ${Object(l.c)(i.triesRemaining).notPII().forCertain()}`;const o=[];for(;i.hasTriesRemaining;){const t=i.next();if(r.silly`Attempting try ${i.round}`,t<0)break;r.silly`If it fails, retryAfter=${Object(l.c)(t).notPII().forCertain()}`,r.silly`Making attempt...`;const n=await e(i.round,t);if(r.silly`Done.`,n instanceof d.a)r.silly`Is a timeout error: ${n}`,o.push(n);else{if(!(n instanceof Error))return r.silly`Not an error: ${n}`,n;r.silly`Is a normal error: ${n}`,o.push(n),await Object(d.c)(t)}}r.silly`Giving up. Creating wrapper error...`;const a=p(o);return r.silly`Finished.`,a}((async(t,r)=>{i.http`<-- PushConnection] attempt ${Object(l.c)(t).notPII().forCertain()}...`,await this.sendPushOnce(e,h,n,a,null!==o&&void 0!==o?o:null,i),m.resolve();const s=await this.waitForAck(e,a,r,n);return s instanceof Error&&i.http`<-- PushConnection] Timed out after ${Object(l.c)(r).constant()}ms`,s}),g,i);return v.then((e=>{e instanceof Error&&i.http`X-- PushConnection] No ack. ${Object(l.c)(e)}`})),{sent:()=>m.promise,ack:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return g.triesRemaining=e,v},delivered:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4;return void 0===o?Promise.resolve((()=>{const e=u.b`No 'i' field set, so cannot watch for delivery`;return r.feedbackWS.reportError({sendPush:e.toString()}),new c.a(e)})()):r.waitForDelivery(e,o,t)}}}async sendPushOnce(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.logger;const a=I.createWebClientPushMessage(e,t,r),s=a.id;o.debug`<--PushConnection] ${Object(l.c)(e).constant()}: post-wrap for apns: i=${Object(l.c)(i).sessionID()} id=${Object(l.c)(s).sessionID()} encoded=${a}`,o.debug``,o.info`<--PushConnection] ${Object(l.c)(e).constant()} id=${Object(l.c)(r).sessionID(b.c)} i=${Object(l.c)(i).sessionID()}`;const c=await this.send({reversePushMessage:a});return o.debug`Reporting to feedbackws`,this.feedbackWS.reportPush(n,2),c}async waitForAck(e,t,n,r){const i=A(e,t);return new Promise((t=>{const o=setTimeout((()=>{this.pendingAcks.delete(i),t((()=>{const t=u.b`Timeout waiting for push message ack on topic ${Object(l.c)(e).constant()}, message type: ${Object(l.c)(r).constant()}`;return this.feedbackWS.reportError({waitForAck:t.toString()}),new d.a(t,n)})())}),n);this.pendingAcks.set(i,(()=>{this.pendingAcks.delete(i),clearTimeout(o),t()}))}))}async waitForDelivery(e,t,n){const r=A(e,t);return new Promise((t=>{const i=setTimeout((()=>{this.pendingDeliveries.delete(r),t((()=>{const t=u.b`Timeout waiting for push message delivery on topic ${Object(l.c)(e).constant()}`;return this.feedbackWS.reportError({waitForDelivery:t.toString()}),new d.a(t,n)})())}),n);this.pendingDeliveries.set(r,(e=>{this.pendingDeliveries.delete(r),clearTimeout(i),t(e)}))}))}async handleError(e){return!1}async handleStorageCheck(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.logger;return t.verbose`Sending storage check response for topic ${Object(l.c)(e.topic).notPII().forCertain()}...`,t.verbose`Server message: ${e.rawMessage}`,this.sendPush(e.topic,{c:b.a.OfflineMessagePendingStorageCheck,i:Object(y.a)()},"PendingStorageCheckMessage").ack().then((e=>{e?t.warn`Our PendingOfflineMessageResponse was never acked`:t.verbose`Ack received for PendingOfflineMessageResponse`})),!0}async handleAck(e){var t;const{topicsByHash:n}=this.connection,r=await Object(C.b)(e.topic||new Uint8Array(1),n),i=this.pendingAcks.get(A(r,null!==(t=e.id)&&void 0!==t?t:-1));return this.logger.info`[PushConnection--> acknowledgementMessage: ${Object(l.c)(r).constant()} (${Object(l.c)(e.id).sessionID(b.c)})`,i?(this.logger.info`[PushConnection--> acknowledgementMessage]: found matching pending ack`,i(),!0):(this.logger.info`[PushConnection--> acknowledgementMessage]: did not find a matching pending ack for topic ${Object(l.c)(r).constant()}, id ${Object(l.c)(e.id).sessionID(b.c)}`,!0)}async handleDelivery(e){const t=e.topic,n=this.pendingDeliveries.get(A(t,e.payload.i));return this.logger.info`[PushConnection--> deliveredMessage: ${Object(l.c)(t).constant()} i=(${Object(l.c)(e.payload.i).sessionID(b.c)}) s=${Object(l.c)(e.payload.s).session()}`,n?(this.logger.info`[PushConnection--> deliveredMessage]: found matching pending delivery`,n(0===e.payload.s?void 0:new c.a(u.b`Nice status code: ${e.payload.s}`)),!0):(this.logger.info`[PushConnection--> deliveredMessage]: did not find a matching pending delivery for topic ${Object(l.c)(t).constant()}, i=${Object(l.c)(e.payload.i).sessionID(b.c)}, s=${Object(l.c)(e.payload.s).device()}`,!1)}}function A(e,t){return`ack:${e}:${t}`}_([Object(m.a)(g.a.Verbose)],I.prototype,"sendRawPush",null),_([Object(m.a)(g.a.Verbose)],I.prototype,"sendPush",null),_([Object(m.a)(g.a.Verbose)],I.prototype,"sendPushOnce",null),_([Object(m.a)(g.a.Silly)],I.prototype,"handleStorageCheck",null);const T=Object(h.a)((e=>new I(e)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(1038),i=n(2173),o=n(1048),a=n(2217),s=n(1011),c=n(1016),u=n(1086),l=n(1027);function d(e){const t=e;return t instanceof Error?t:"string"===typeof t?Object(l.a)(t):t}var p,f=n(1089),h=n(2166),m=n(1046),g=n(1085);new TextDecoder,function(e){e.Nice="nice",e.Other="other"}(p||(p={}));class v extends Error{constructor(e){super(e.toString()),this.logString=e,this.isLoggable=!0}}class y extends g.b{constructor(e,t){super(),this.provider=e,this.topic=t,this.ids=Object(m.c)(this),this.encryptor=Object(h.a)(this),this.logger=Object(r.a)(this).child`NiceDispatcher`().package`Messaging`.subsystem`push`.category`incoming`,this.bplistParser=Object(u.a)(this)}get(e){return this.provider.get(e)}async handleIncomingMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.logger;const{message:n}=e,r=this.logger.activity(t).begin`[PushDispatcher --> NiceDispatcher]`();if(r.info`Dispatching message ${Object(a.c)(n instanceof Uint8Array||!n.U?"":Object(i.d)(n.U))}`,n instanceof Uint8Array)return r.debug`is Uint8Array`,this.dispatch({type:p.Other,topic:this.topic,message:n});if(!("sP"in n))return r.debug`is ${n.c}`,this.dispatch({type:p.Nice,controller:null,topic:this.topic,message:n,payload:null,fromEndpoint:null});r.debug`unboxing source token`;const c=n.sP,u=d(n.t);if(u instanceof Error)return r.warn`could not unbox their push token`,u;r.debug`looking up our controller by ${n.tP?s.b`URI`:s.b`push token`}`;const l=n.tP?this.ids.controllers.byURI(n.tP):this.ids.controllers.byPushToken(e.pushToken);if(!l&&n.tP)return r.error`Message is for URI ${Object(f.a)(n.tP)}, but we don't have a controller for that URI. Dropping.\n\n${n}`;if(!l)return r.error`Message is for push token ${Object(o.b)(e.pushToken)} but we don't have a controller for it`;r.debug`... found receiving controller for the receiver URI`,r.debug`looking up endpoint...`;const h=c&&u?await l.endpointFor(c,this.topic,Object(o.b)(u),r):null;if(h instanceof Error)return r.warn`Endpoint error: ${h}`,h;if(n.P){if("none"!==n.E&&n.E){if("pair-ec"===n.E){r.verbose` ... encryption strategy = pair-ec`;const e=d(n.P);if(e instanceof Error)return r.warn`failed to unbox raw payload: ${e}`,e;r.debug`unboxed raw payload. decrypting...`;const t=await this.decryptMessage(r,e,l,h);return t instanceof Error?(t instanceof v||r.debug`decryption error: ${t}`,t):(r.verbose`Dispatching decrypted message...`,this.dispatch({type:p.Nice,controller:l,topic:this.topic,message:n,payload:t,fromEndpoint:h}))}return r.error`Unknown encryption strategy: ${Object(a.c)(n.E).notPII().forCertain()}`}{r.verbose` ... encryption strategy = none`;const e=d(n.P);return e instanceof Error?(r.warn`failed to unbox raw payload: ${e}`,e):(r.verbose` dispatching immediately`,this.dispatch({type:p.Nice,controller:l,topic:this.topic,message:n,payload:e,fromEndpoint:h}))}}return r.verbose`no payload; dispatching as a raw message`,this.dispatch({type:p.Nice,controller:l,topic:this.topic,message:n,payload:null,fromEndpoint:h})}async decryptMessage(e,t,n,r){const i=this.logger.activity(e).begin`decryptMessage`();if(!r)return i.warn`Message payload is pair-ec, but no endpoint was found`,new c.a(s.b`Message payload is pair-ec, but no endpoint was found`);i.info`... found a matching endpoint. Decrypting message...`;const o=await this.encryptor.decrypt(r.theirs,n.identity,t);return o instanceof Error?o:r.counter.validateIncomingCounter(o.counter)?(i.verbose`Counter value ${Object(a.c)(o.counter).sessionID()} passed processing`,i.debug` ... Message decrypted.`,o.message):(i.warn`Counter value ${Object(a.c)(o.counter).sessionID()} failed processing, will not decrypt-- already received this message or replay attack`,new v(s.b`Counter value ${Object(a.c)(o.counter).sessionID()} failed processing, will not decrypt`))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1254),i=n(2161),o=n(900),a=n(903),s=n(1164),c=n(1247),u=n(1165),l=n(2155);const d=()=>{var e;let t=!1;const n=r.a.sharedInstance.isChrome||r.a.sharedInstance.isEdge||r.a.sharedInstance.isFirefox,d=!1===a.c.sharedInstance.isMac&&!1===a.c.sharedInstance.isiOS;n&&d&&(t=!0);const p=Object(s.a)(),f=Object(u.a)("iCloud.User.Notifications.Enabled"),h=!Object(i.e)(null!==(e=l.h.value)&&void 0!==e?e:null);return p&&(f||t)&&h&&!o.a.sharedInstance.isDomainCN&&(()=>{const e=new Set(["mail2","calendar"]);return!c.a.sharedInstance.configurations.some((t=>e.has(t.applicationInfo.applicationName)&&t.isHidden))})()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=n(2164),o=n(1286),a=n(1280),s=n(1281),c=n(1277);!function(e){e.LISTENER="LISTENER",e.CONNECTION="CONNECTION",e.BIDIRECTIONAL="BIDIRECTIONAL"}(r||(r={}));class u{constructor(){this.invokeLaterSupport=new a.a,this._processId=void 0,this.delegate=void 0,this.channel=void 0,this.localProtocol=void 0,this._localProtocolTarget=void 0,this.remoteProtocol=void 0,this.remoteProxy={},this.connectionTimeout=3e4,this.messagingChannelClass=i.a,this.primaryMessagingChannel=void 0,this._internal_processState=o.a.NONE,this._messagingChannels=new Set}get processId(){return this._processId}set processId(e){this._processId=e}get processState(){return this._processState}get isConnected(){return Object(o.c)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING)}get isTerminated(){return Object(o.c)(this.processState,o.a.TERMINATED)}get localProtocolTarget(){return this._localProtocolTarget}set localProtocolTarget(e){this._localProtocolTarget=e}connect(){Object(o.b)(this.processState,o.a.NONE),this._processState=o.a.LOADING;const{localProtocol:e,localProtocolTarget:t,remoteProtocol:n,connectionTimeout:r}=this;this.primaryMessagingChannel=this.createMessagingChannel(e,t,n,r)}disconnect(){Object(o.b)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING),this._processState=o.a.UNLOADING;const e=Array.from(this._messagingChannels);let t;return this.invokeLaterSupport.cancelInvokeLaterMethods(),this._messagingChannels.clear(),t=e.length?Promise.allSettled(e.map((e=>e.stop()))):Promise.resolve(),t.then((()=>{this._processState=o.a.UNLOADED}))}terminate(){Object(o.b)(this.processState,o.a.UNLOADED),this._processState=o.a.TERMINATED;const{remoteProxy:e}=this,t=function(){Object(s.b)(new Error("The remote proxy is no longer connected."))};e&&Object.keys(e).forEach((n=>{Object(c.c)(e[n])&&(e[n]=t)})),this.channel=void 0,this.remoteProxy=void 0,this._messagingChannels.clear()}createListenerOnlyMessagingChannel(e,t,n,i){return this._createMessagingChannel({type:r.LISTENER,localProtocol:e,localProtocolTarget:t,timeoutMS:n,messagingChannelClass:i})}createConnectionOnlyMessagingChannel(e,t,n){this._createMessagingChannel({type:r.CONNECTION,remoteProtocol:e,timeoutMS:t,messagingChannelClass:n})}createMessagingChannel(e,t,n,i,o){return this._createMessagingChannel({type:r.BIDIRECTIONAL,localProtocol:e,localProtocolTarget:t,remoteProtocol:n,timeoutMS:i,messagingChannelClass:o})}get _processState(){return this._internal_processState}set _processState(e){this._internal_processState=e}_createMessagingChannel(e){this._validateRequiredProperties(e);const{BIDIRECTIONAL:t,LISTENER:n,CONNECTION:i}=r,{channel:o,remoteProxy:a,_messagingChannels:s}=this;let c=this.messagingChannelClass;e.messagingChannelClass&&(c=e.messagingChannelClass);const u=new c(o);e.type!==t&&e.type!==n||u.setListener(e.localProtocol.protocolName,e.localProtocol.protocolMethodNames,e.localProtocolTarget),e.type!==t&&e.type!==i||u.setConnection(e.remoteProtocol.protocolName,e.remoteProtocol.protocolMethodNames,a);const l=e.timeoutMS;return l&&(u.connectionTimeout=l),u.start(),s.add(u),u}_validateRequiredProperties(e){const{delegate:t,remoteProxy:n,channel:i,messagingChannelClass:o}=this,{BIDIRECTIONAL:a,LISTENER:c,CONNECTION:u}=r;t||Object(s.b)(new Error("A delegate is required")),i&&!i.isDisconnected||Object(s.b)(new Error("A connected ChannelProtocol implementation is required")),"object"!==typeof n&&Object(s.b)(new Error("A remoteProxy Object is required")),o||Object(s.b)(new Error("A MessagingChannel Class is required.")),e.type!==a&&e.type!==c||(e.localProtocol||Object(s.b)(new Error("A valid localProtocol is required")),e.localProtocolTarget||Object(s.b)(new Error("A localProtocolTarget is required"))),e.type!==a&&e.type!==u||e.remoteProtocol||Object(s.b)(new Error("A valid remoteProtocol is required"))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));class r extends Error{constructor(e,t){super(`Invalid state transition.  Expected state: ${e}, actual: ${t}`),this.name="InvalidStateTransitionError"}}var i=n(1287);function o(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!!n.find((t=>t===e))}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(!o(e,...n)){const t=new r(n.join(", "),String(e)),o=Object(i.c)(t,2,7);throw t.message=`${t.message} => ${o.join(",")}`,t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1287),i=n(1288);class o{constructor(e){this.terminate=void 0,this.terminate=e}async sendMessageWithRetryAndTerminateOnError(e,t){let n=0;for(;;){const r=await e(),i=++n>=3;if(r.isOK)return r;if((!r.isTimeout||i)&&(this.terminateIfMessagingResponseError(r,t)||i))return r}}terminateIfMessagingResponseError(e,t){let n=!1;if(!e.isDisconnected&&!e.isCanceled&&!e.isOK){const o=2,a=globalThis.__CW_BUILD_INFO;this.terminate(...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis.__CW_BUILD_INFO,o=arguments.length>3?arguments[3]:void 0;const{USER_INITIATED:a,MESSAGING_TIMEOUT:s,DISCONNECTED:c,UNCAUGHT_EXCEPTION:u}=i.a;let l=u;e.isOK?l=a:e.isTimeout?l=s:e.isDisconnected&&(l=c);const d=Object(r.a)(e.serialize(),t+1);return d.buildInfo=n,d.message=`ProcessKit: ${o} failed`,[l,d]}(e,o,a,t)),n=!0}return n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1282),i=n(1281),o=n(1277),a=n(2307);class s{get isDisconnected(){return this._isDisconnected}set isDisconnected(e){this._isDisconnected=e,this.isDisconnectedChanged.dispatch()}get outgoingWindow(){return this._outgoingWindow}set outgoingWindow(e){this._outgoingWindow=e,this.outgoingWindowDidChange()}constructor(e){this.autoconnect=void 0,this.isDisconnectedChanged=new r.a(this),this.incomingMessage=new r.a(this),this.outgoingMessage=new r.a(this),this._outgoingWindow=void 0,this.remoteOrigin=void 0,this.allowedRemoteOrigins=void 0,this._isDisconnected=!0,this._messageHandler=null,this.autoconnect=void 0===e.autoconnect||e.autoconnect,this._messageHandler=this._defaultMessageHandler.bind(this);const t=e&&e.allowedRemoteOrigins;t&&(e.allowedRemoteOrigins=[...t]),this.allowedRemoteOrigins=e.allowedRemoteOrigins,this.remoteOrigin=e.remoteOrigin,c(this.allowedRemoteOrigins,this.remoteOrigin),e.outgoingWindow?this.outgoingWindow=e.outgoingWindow:this.outgoingWindowDidChange()}connect(){var e=this;if(this.isDisconnected){this.outgoingWindow&&this.outgoingWindow.postMessage||Object(i.b)(new Error("The `outgoingWindow` must be configured and support `postMessage()`"));const t=this._messageHandler;this._messageHandler=function(){const{allowedRemoteOrigins:n,remoteOrigin:r}=e;c(n,r),t(...arguments)},window.addEventListener("message",this._messageHandler),this.isDisconnected=!1}}disconnect(){this.isDisconnected||(window.removeEventListener("message",this._messageHandler),this.isDisconnected=!0)}send(e){this.isDisconnected&&Object(i.b)(new Error("Cannot send message because the channel has not been connected."),this);const{allowedRemoteOrigins:t,remoteOrigin:n}=this;c(t,n),this.outgoingWindow.postMessage(e,n),this.outgoingMessage.dispatch({context:e})}_defaultMessageHandler(e){const{originalEvent:t}=e,n=(t||e).origin,r=this.outgoingWindow,i=e.source;let s=r===i;try{s||(s=r.actualOutgoingWindow===i)}catch(c){s=!1}s&&function(e,t){if("*"===e||"*"===t)return!0;const n=a.a.parse(e),r=a.a.parse(t);if(Object(o.b)(n.protocol)||Object(o.b)(r.protocol)||n.protocol!==r.protocol)return!1;if(Object(o.b)(n.hostname)||Object(o.b)(r.hostname)||n.hostname!==r.hostname)return!1;if(e===t)return!0;let i=n.port;Object(o.b)(i)&&(i="https:"===n.protocol?"443":"80");let s=r.port;return Object(o.b)(s)&&(s="https:"===r.protocol?"443":"80"),i===s}(n,this.remoteOrigin)&&this.incomingMessage.dispatch({context:(t||e).data})}outgoingWindowDidChange(){this.outgoingWindow?this.autoconnect&&this.connect():this.disconnect()}}const c=(e,t)=>{if(!t)throw new Error("Cannot leverage `SafeWindowPostMessageChannel` without a defined `remoteOrigin`.");if("*"===t)throw new Error('Cannot leverage `SafeWindowPostMessageChannel` whose `remoteOrigin` is "*".');if(!e)throw new Error("Cannot leverage `SafeWindowPostMessageChannel` without a defined `allowedRemoteOrigins` array.");if(!e.includes(t))throw new Error(`Cannot leverage this \`SafeWindowPostMessageChannel\`, the \`remoteOrigin\` "${t}" is not present in the \`allowedRemoteOrigins\` array.`);e.forEach((e=>{if(!u(e))throw new Error(`The value "${e}" does not conform to the "https://" protocol, and therefore is not permitted in the \`allowedRemoteOrigins\` array.`)}))},u=e=>e&&"https://"===e.substr(0,8)},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return a})),function(e){e.IOS="IOS",e.ANDROID="ANDROID",e.WINDOWS="WINDOWS",e.MAC="MAC",e.LINUX="LINUX",e.CHROMEOS="CHROMEOS",e.UNKNOWN="UNKNOWN"}(r||(r={}));var i=n(1294),o=n(1293);class a{constructor(){this.platformType=function(){const{userAgent:e}=window.navigator;if(!e)throw new TypeError("Expected user agent!");return/ipad|ipod|iphone/i.test(e)?r.IOS:/android/i.test(e)?r.ANDROID:/mac/i.test(e)&&!/like mac/i.test(e)?"ontouchstart"in window||"createTouch"in window.document?r.IOS:r.MAC:/windows/i.test(e)?r.WINDOWS:/\bcros\b/i.test(e)?r.CHROMEOS:/\blinux\b/i.test(e)?r.LINUX:r.UNKNOWN}(),this.isAndroid=this.platformType===r.ANDROID,this.isWindows=this.platformType===r.WINDOWS,this.isMac=this.platformType===r.MAC,this.isiOS=this.platformType===r.IOS,this.primaryInteractionMode=this.isiOS||this.isAndroid?o.a.TOUCH:o.a.MOUSE,this.isTouch=this.primaryInteractionMode===o.a.TOUCH,this.isMouse=this.primaryInteractionMode===o.a.MOUSE,this.deviceType=this.isMouse?i.a.DESKTOP:Math.min(window.screen.width,window.screen.height)>667?i.a.TABLET:i.a.PHONE,this.isiPad=this.isiOS&&this.deviceType===i.a.TABLET,this.isiPhoneOriPod=this.isiOS&&this.deviceType===i.a.PHONE}static get sharedInstance(){const{_sharedInstance:e=(this._sharedInstance=new a)}=a;return e}get current(){return this.platformType}}a._sharedInstance=void 0},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(908),i=n(1311);class o{constructor(){this.connection=new r.a(i.a),this.connection.exportedObject=this,this.connection.start()}async canShowCategoryViews(){return this.connection.remoteObjectProxy.canShowCategoryViews()}async isMailBlocked(){return this.connection.remoteObjectProxy.isMailBlocked()}async getAppBadgeCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.connection.remoteObjectProxy.getAppBadgeCount(e)}async refreshAppBadgeCount(){return this.connection.remoteObjectProxy.refreshAppBadgeCount()}async fetchMailboxList(e){return this.connection.remoteObjectProxy.fetchMailboxList(e)}async fetchMailboxThreads(e){return this.connection.remoteObjectProxy.fetchMailboxThreads(e)}async fetchPreferences(e){return this.connection.remoteObjectProxy.fetchPreferences(e)}}let a=null;const s=()=>null!==a&&void 0!==a?a:a=new o},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2259),i=n(870),o=n(1227);function a(){return a=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},a.apply(null,arguments)}const s=i.forwardRef(((e,t)=>{const{ariaLabel:n,...s}=e;return i.createElement(r.a,a({},s,{ariaLabel:null!==n&&void 0!==n?n:Object(o.a)("VoiceOver.Close"),variant:"push primary icon x-close-button",ref:t}),i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.731 12.742","aria-hidden":"true"},i.createElement("path",{fill:"inherit",d:"M.287 12.454c.39.383 1.054.375 1.422.008l4.657-4.657 4.652 4.654c.378.378 1.035.38 1.42-.007.385-.39.387-1.037.01-1.417l-4.653-4.66 4.653-4.652c.377-.377.38-1.03-.01-1.414-.39-.39-1.042-.393-1.42-.01L6.366 4.95 1.71.296C1.34-.074.672-.089.287.306-.095.696-.088 1.353.279 1.72l4.658 4.655L.279 11.04c-.367.365-.38 1.03.008 1.414z"})))}));s.displayName="CloseButton"},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(870),i=n(1248),o=n(1247),a=n(1211),s=n(1210),c=n(900);function u(){const e=function(e,t,n){const[i,o]=r.useState(e);return r.useEffect((()=>{const e=n((e=>{o(e)}));return t.add(e),()=>{t.delete(e)}}),[t,n]),r.useDebugValue(i),i}(o.a.sharedInstance.displayOrder,o.a.sharedInstance.displayOrderObservers,d);return r.useMemo((()=>function(e){return e.map((e=>({applicationIdentifier:e.identifier,displayName:Object(i.e)(e)})))}(e)),[e])}function l(){const{isDomainCN:e}=c.a.sharedInstance;return(e?[s.b]:[s.b,a.b]).map((e=>({applicationIdentifier:e.identifier,displayName:Object(i.e)(e)})))}function d(e){return{displayOrderChanged:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2265),i=n(1362),o=n(1363),a=n(1368),s=n(1367),c=n(1361),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=Object(o.a)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),Object(i.i)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){clearTimeout(this.gcTimeout),this.gcTimeout=void 0},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,o=this.state.data,a=Object(i.c)(e,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,a))?a=o:!1!==this.options.structuralSharing&&(a=Object(i.s)(o,a)),this.dispatch({data:a,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),a},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(i.l).catch(i.l):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Object(i.w)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,o,a=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var d=Object(i.b)(this.queryKey),p=Object(i.d)(),f={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(f,"signal",{enumerable:!0,get:function(){if(p)return a.abortSignalConsumed=!0,p.signal}});var h,m,g={fetchOptions:t,options:this.options,queryKey:d,state:this.state,fetchFn:function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(f)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(h=this.options.behavior)||h.onFetch(g)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=g.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=g.fetchOptions)?void 0:m.meta}),this.retryer=new c.b({fn:g.fetchFn,abort:null==p||null==(o=p.abort)?void 0:o.bind(p),onSuccess:function(e){a.setData(e),null==a.cache.config.onSuccess||a.cache.config.onSuccess(e,a),0===a.cacheTime&&a.optionalRemove()},onError:function(e){Object(c.d)(e)&&e.silent||a.dispatch({type:"error",error:e}),Object(c.d)(e)||(null==a.cache.config.onError||a.cache.config.onError(e,a),Object(s.a)().error(e)),0===a.cacheTime&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),a.a.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof e.initialData?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r="undefined"!==typeof t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,r;switch(t.type){case"failed":return Object(o.a)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return Object(o.a)({},e,{isPaused:!0});case"continue":return Object(o.a)({},e,{isPaused:!1});case"fetch":return Object(o.a)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Object(o.a)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return Object(c.d)(i)&&i.revert&&this.revertState?Object(o.a)({},this.revertState):Object(o.a)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Object(o.a)({},e,{isInvalidated:!0});case"setState":return Object(o.a)({},e,t.state);default:return e}},e}(),l=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}Object(r.a)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,o=t.queryKey,a=null!=(r=t.queryHash)?r:Object(i.f)(o,t),s=this.get(a);return s||(s=new u({cache:this,queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=Object(i.m)(e,t)[0];return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((function(e){return Object(i.k)(n,e)}))},n.findAll=function(e,t){var n=Object(i.m)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return Object(i.k)(n,e)})):this.queries},n.notify=function(e){var t=this;a.a.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(n(1365).a)},function(e,t,n){"use strict";var r=n(1368),i=n(873),o=n.n(i).a.unstable_batchedUpdates;r.a.setBatchNotifyFunction(o)},function(e,t,n){"use strict";var r=n(1367),i=console;Object(r.b)(i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"f",(function(){return m}));var r=n(1227),i=n(1395),o=n(1394);const a=e=>{const t=o.a.decode(e);return(new TextDecoder).decode(t)},s="all-icloud",c="icloud-pinned-notes-folder",u="Root",l="DefaultFolder-CloudKit",d="TrashFolder-CloudKit",p="PasswordProtectedNote",f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.filter((e=>{var t,n,r;if(e.deleted)return!1;const i=!(null===(t=e.fields.Deleted)||void 0===t||!t.value),o=null!==(n=null===(r=e.parent)||void 0===r?void 0:r.recordName)&&void 0!==n?n:"";return!i&&o!==d})).map((e=>{var n,o,s,c,u,l,d,f;let h="",m="";null!==(n=e.fields.TitleEncrypted)&&void 0!==n&&n.value&&(m=a(e.fields.TitleEncrypted.value)),null!==(o=e.fields.SnippetEncrypted)&&void 0!==o&&o.value&&(h=a(e.fields.SnippetEncrypted.value));const g=e.recordType===p,v={id:e.recordName,snippet:h||(g?"":Object(r.a)("Note.Empty.Snippet")),title:m||Object(r.a)("Note.Empty.Title"),isShared:t||!(null===(s=e.share)||void 0===s||!s.recordName),isLocked:g,timestamp:null===(c=e.modified)||void 0===c?void 0:c.timestamp,time:Object(i.a)(new Date((null===(u=e.modified)||void 0===u?void 0:u.timestamp)||Date.now())),parentFolderId:(null===(l=e.parent)||void 0===l?void 0:l.recordName)||(null===(d=e.fields.Folder)||void 0===d?void 0:d.value.recordName),shortGUID:e.shortGUID,changeTag:e.recordChangeTag,ownerRecordName:null===(f=e.zoneID)||void 0===f?void 0:f.ownerRecordName};var y,b,w,S;return v.isShared&&(v.share={shareRecordName:null!==(y=null===(b=e.share)||void 0===b?void 0:b.recordName)&&void 0!==y?y:"",ownerRecordName:null!==(w=null===(S=e.zoneID)||void 0===S?void 0:S.ownerRecordName)&&void 0!==w?w:""}),v}))},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return f(e.filter((e=>"Note"===e.recordType||e.recordType===p)),t).sort(((e,t)=>e.timestamp?t.timestamp?t.timestamp-e.timestamp:1:-1))},m=e=>e.filter((e=>{var t,n;if(e.deleted)return!1;const r=null!==(t=null===(n=e.fields.MinimumSupportedNotesVersion)||void 0===n?void 0:n.value)&&void 0!==t?t:0;return"Folder"===e.recordType&&e.recordName!==d&&r<=4})).map((e=>{var t,n,r,i;let o="";return null!==(t=e.fields.TitleEncrypted)&&void 0!==t&&t.value&&(o=a(e.fields.TitleEncrypted.value)),{id:e.recordName,title:o,isShared:!(null===(n=e.share)||void 0===n||!n.recordName),timestamp:null===(r=e.modified)||void 0===r?void 0:r.timestamp,hasSubfolder:!(null===(i=e.fields.HasSubfolder)||void 0===i||!i.value)}})).sort(((e,t)=>e.id===l?-1:t.id===l?1:e.title===t.title?e.id.localeCompare(t.id):e.title.localeCompare(t.title)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(2259),o=n(2268),a=n(1445),s=n(1229);let c=1;function u(e){const t=r.useRef("alert-m-"+c++).current,n=r.useRef("alert-d-"+c++).current,u=Object(s.d)(),l=[r.createElement(i.a,{key:"primaryButton",variant:"block large primary",onActivate:e.primaryButton.onActivate},e.primaryButton.title)];return e.otherButton&&l.push(r.createElement(i.a,{key:"otherButton",variant:"block large secondary",onActivate:e.otherButton.onActivate},e.otherButton.title)),e.alternateButton&&l.push(r.createElement(i.a,{key:"alternateButton",variant:"block large secondary",onActivate:e.alternateButton.onActivate},e.alternateButton.title)),r.createElement("div",{className:`cloudos-alert ${u}`},r.createElement("div",{className:"main-container"},r.createElement("div",{className:"alert-main-content"},r.createElement(a.a,{className:"alert-cloud-icon","aria-hidden":!0,layoutMode:"glyphBox",width:43,height:30}),r.createElement("div",{className:"alert-text-container"},r.createElement("h1",{id:t,className:"message",tabIndex:0},e.message),r.createElement("p",{id:n,className:"description",tabIndex:0},e.description))),r.createElement(o.a,{mode:l.length>=3||"compact"===u?"compact":"regular"},l.map((e=>e)))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(2266),i=n(1413),o=n(888);const a=o.z.object({centralizedWebToken:o.z.string(),status:o.z.string()});var s=n(2249);const c="/fetchCentralizedWebToken";function u(){const e=s.c(`${r.c}${c}`);return Object(i.a)({url:e,includeCredentials:!0,validate:{type:"WireCentralizedWebToken",schema:a}})}},function(e,t,n){"use strict";function r(e){var t,n,r,i,o,a;if(!e)return e;const s=(null!==(t=e.storageUsageByMedia)&&void 0!==t?t:[]).filter((e=>e.usageInBytes)).sort(((e,t)=>t.usageInBytes-e.usageInBytes)),c=e.familyStorageUsageInfo;return c&&s.push({mediaKey:c.mediaKey,displayLabel:c.displayLabel,displayColor:c.displayColor,usageInBytes:c.usageInBytes}),{almostFull:null!==(n=e.quotaStatus["almost-full"])&&void 0!==n&&n,overQuota:null!==(r=e.quotaStatus.overQuota)&&void 0!==r&&r,haveMaxQuotaTier:null!==(i=e.quotaStatus.haveMaxQuotaTier)&&void 0!==i&&i,usedBytes:null!==(o=e.storageUsageInfo.usedStorageInBytes)&&void 0!==o?o:0,totalBytes:null!==(a=e.storageUsageInfo.totalStorageInBytes)&&void 0!==a?a:0,usageByMedia:s,familyStorageUsage:c}}n.d(t,"a",(function(){return a}));var i=n(870),o=n(980);function a(){const[e,t]=i.useState((()=>{var e,t;return r(null!==(e=null===(t=Object(o.b)())||void 0===t?void 0:t.storageQuota)&&void 0!==e?e:null)})),[n,a]=i.useState((()=>{var e,t;return null!==(e=null===(t=Object(o.b)())||void 0===t?void 0:t.isFetching)&&void 0!==e&&e}));return i.useEffect((()=>{const e=Object(o.b)(),n=()=>{var n;return t(r(null!==(n=null===e||void 0===e?void 0:e.storageQuota)&&void 0!==n?n:null))},i=()=>{var t;return a(null!==(t=null===e||void 0===e?void 0:e.isFetching)&&void 0!==t&&t)};return null===e||void 0===e||e.addEventListener("change",n),null===e||void 0===e||e.addEventListener("fetchingchange",i),()=>{null===e||void 0===e||e.removeEventListener("change",n),null===e||void 0===e||e.removeEventListener("fetchingchange",i)}}),[]),{storageUsage:e,isLoading:n}}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(947),i=n(938),o=n(940),a=n(943),s=n(950),c=n(933),u=n(951),l=n(939),d=n(948),p=n(946),f=n(949),h=n(931),m=n(932);class g{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(g.prototype.__init.call(this),g.prototype.__init2.call(this),g.prototype.__init3.call(this),g.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=Object(r.c)(e.dsn);const t=Object(p.a)(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(Object(i.e)(e))return;let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const a=Object(o.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((e=>this._captureEvent(e,n,r))).then((e=>{i=e}))),i}captureEvent(e,t,n){if(t&&t.originalException&&Object(i.e)(t.originalException))return;let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{r=e}))),r}captureSession(e){this._isEnabled()&&("string"!==typeof e.release||(this.sendSession(e),Object(m.c)(e,{init:!1})))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):Object(a.c)(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Object(f.b)(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return null}}sendEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._dsn){let n=function(e,t,n,r){const i=Object(s.g)(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=Object(s.d)(e,i,r,t);delete e.sdkProcessingMetadata;const c=[{type:o},e];return Object(s.c)(a,[c])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Object(s.a)(n,Object(s.b)(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(n)}}sendSession(e){if(this._dsn){const t=function(e,t,n,i){const o=Object(s.g)(n),a={sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!i&&{dsn:Object(r.b)(t)}},c="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return Object(s.c)(a,[c])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(Object(m.c)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new a.a((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=this.getOptions(),s={...e,event_id:e.event_id||t.event_id||Object(i.h)(),timestamp:e.timestamp||Object(c.c)()};this._applyClientOptions(s),this._applyIntegrationsMetadata(s);let u=n;t.captureContext&&(u=h.a.clone(u).update(t.captureContext));let l=Object(a.c)(s);if(u&&u.getAttachments){const e=[...t.attachments||[],...u.getAttachments()];e.length&&(t.attachments=e),l=u.applyToEvent(s,t)}return l.then((e=>"number"===typeof r&&r>0?this._normalizeEvent(e,r,o):e))}_normalizeEvent(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Object(u.a)(e.data,t,n)}})))},...e.user&&{user:Object(u.a)(e.user,t,n)},...e.contexts&&{contexts:Object(u.a)(e.contexts,t,n)},...e.extra&&{extra:Object(u.a)(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(u.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>(e.data&&(e.data=Object(u.a)(e.data,t,n)),e)))),r}_applyClientOptions(e){const t=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Object(l.f)(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Object(l.f)(a.value,o));const s=e.request;s&&s.url&&(s.url=Object(l.f)(s.url,o))}_applyIntegrationsMetadata(e){const t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Object(a.b)(new d.a("SDK not enabled, will not capture event.","log"));const s=y(e),c=v(e),u=e.type||"error",l=`before send for type \`${u}\``;return c&&"number"===typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error",e),Object(a.b)(new d.a(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new d.a("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return v(t)&&r?r(t,n):y(t)&&i?i(t,n):t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Object(o.n)(e))return e.then((e=>{if(!Object(o.i)(e)&&null!==e)throw new d.a(n);return e}),(e=>{throw new d.a(`${t} rejected with ${e}`)}));if(!Object(o.i)(e)&&null!==e)throw new d.a(n);return e}(i,l)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error",e),new d.a(`${l} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const o=r.transaction_info;if(s&&o&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...o,source:e,changes:[...o.changes,{source:e,timestamp:r.timestamp,propagations:o.propagations}]}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof d.a)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new d.a(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){this._transport&&this._dsn&&this._transport.send(e).then(null,(e=>{}))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function v(e){return void 0===e.type}function y(e){return"transaction"===e.type}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r=/[-/\\^$*+?.()|[\]{}]/g;function i(e){return function(e,t,n){if(!e)return"";if("string"!==typeof e)try{e=e.toString()}catch(r){return""}return e.replace(t,n)}(e,r,"\\$&")}class o{static parse(e){const t=e.match(a);let n,r,i,o,s;const c={},u=this.components;if(t)for(i=0,o=u.length;i<o;i++)(n=t[i+1])&&(r=u[i],s=this.componentCleaners[r],c[r]=s?s(n):n);return c}static parseQuery(e,t){const n={};if("string"!==typeof e)return n;if(""===(e=e.replace(s,"")))return n;t=void 0===t?this.shouldUseFormEncoding:t;const r=e.split("&");for(let i=0,o=r.length;i<o;i++){const e=r[i].split("=");let o=e[0],a=e[1],s=!1;d.test(o)&&(o=o.replace(d,""),s=!0),a=this.parseValue(h(a,t));let c=n[o];c?(Array.isArray(c)?c.push(a):c=[c,a],a=c):s&&(a=[a]),n[o]=a}return n}static parseValue(e){if(e&&c.test(e)){const t=e.split(",");for(let e=t.length-1;e>=0;e--)t[e]=m(t[e]);return t}return m(e)}static formatQuery(e,t){if(e&&e.constructor!==Object)return"";t=void 0===t?this.shouldUseFormEncoding:t;const n=Object.keys(e);let r,i,o,a,s="";for(o=0,a=n.length;o<a;o++)r=n[o],i=e[r],o>0&&(s+="&"),s+=f(r,t),null!==i&&void 0!==i&&(i=f(this.formatValue(i),t),s+="="+i);return o>0?"?"+s:""}static formatValue(e){if(Array.isArray(e)){for(let t=e.length-1;t>=0;t--)e[t]=g(e[t]);return e.join(",")}return g(e)}get href(){let e,t,n,r,i,a="";const s=o.components;for(t=0,n=s.length;t<n;t++)r=s[t],(e=this[r])&&(i=o.componentFormatters[r],a+=i?i(e):e);return a}get host(){const e=this.port;let t=this.hostname;return e&&(t=(t||"")+":"+e),t}get origin(){let e=this.host;const t=this.protocol;return t&&(e=o.componentFormatters.protocol(t)+(e||"")),e}get path(){const e=this.query;let t=this.pathname;return e&&(t=(t||"")+e),t}get queryObject(){return o.parseQuery(this.query)}set queryObject(e){this.query=e?o.formatQuery(e):void 0}isInDomain(e){const t=this.hostname;if(!t||""===e)return!1;const n=new RegExp("(^|\\.)"+i(e)+"$","i");return!!t.match(n)}setQueryParameter(e,t){return this.query?(this.removeQueryParameter(e),this.appendQueryParameter(e,t)):this.appendQueryParameter(e,t)}appendQueryParameter(e,t){let n=this.query||"?";return"?"!==n&&(n+="&"),n+=f(e,o.shouldUseFormEncoding)+(null!==t&&void 0!==t?"="+f(o.formatValue(t),o.shouldUseFormEncoding):""),this.query=n,this}removeQueryParameter(e){const t=this.query;if(!t)return this;const n=this._regexpForQueryParameterKey(e);let r=t.replace(n,"");const i=r[0];return r?"?"!==i&&("&"===i&&(r=r.substr(1)),r="?"+r):r=void 0,this.query=r,this}getQueryParameter(e){const t=this.query;if(!t)return;const n=this._regexpForQueryParameterKey(e).exec(t);if(!n)return;const r=n[3];return void 0!==r?h(r,o.shouldUseFormEncoding):void 0}_regexpForQueryParameterKey(e){const t=i(e)+"|"+i(f(e,o.shouldUseFormEncoding));return new RegExp("(^|\\?|&)("+t+")(?:=([^&]*))?(?=&|$)","g")}setMultipleQueryParameters(e){for(const t in e)e.hasOwnProperty(t)&&this.setQueryParameter(t,e[t]);return this}constructor(e){if(this.protocol=void 0,this.auth=void 0,this.hostname=void 0,this.port=void 0,this.pathname=void 0,this.query=void 0,this.hash=void 0,"string"===typeof e)e=o.parse(e);else if(e&&e.constructor===window.Location){const t={};let n,r;const i=o.components;for(let o=0,a=i.length;o<a;o++)r=n=i[o],"query"===r&&(n="search"),t[r]=e[n];e=t}else if(e&&e.constructor!==Object)throw new v("A URLParser object cannot be created with the data provided: "+JSON.stringify(e));for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}toString(){return this.href}toJSON(){return""+this}}o.shouldUseFormEncoding=!1,o.components=["protocol","auth","hostname","port","pathname","query","hash"],o.componentFormatters={protocol:e=>e+(p[e]?"":"//"),auth:e=>e+"@",port:e=>":"+e},o.componentCleaners={protocol:e=>e.replace("//",""),auth:e=>e.replace("@","")};const a=/^(.*?:\/\/)?([^:/?]*:?[^:/?]*@+)?([^:/?]*):?(\d*)?([^?#]*)?(\??[^#]*)(#?.*)?$/,s=/^\?/,c=/,/,u=/%20/g,l=/\+/g,d=/\[\]$/,p={"mailto:":!0},f=function(e,t){const n=encodeURIComponent(""+e);return t?n.replace(u,"+"):n},h=function(e,t){if(!e)return e;const n=decodeURIComponent(""+e);return t?n.replace(l," "):n};function m(e){try{return JSON.parse(e)}catch(t){return e}}function g(e){return""+e}class v extends Error{}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return h}));var r=n(870),i=n(1349),o=n(2200),a=n(2321),s=n(1344),c=n(1227),u=n(1314),l=n(1346),d=n(2212),p=n(1168);const f=Object(p.a)("bookmarks");function h(e){const t=e.deletedBookmarks,n=Object(c.a)("RecoveryPage.BookmarksTile.Title"),p=(()=>{if(e.isLocked)return"";if(e.isLoading)return Object(c.a)("RecoveryPage.Loading");const n=t.length;return Object(c.b)({zero:"RecoveryPage.BookmarksTile.TotalNumber.Zero",one:"RecoveryPage.BookmarksTile.TotalNumber.One",two:"RecoveryPage.BookmarksTile.TotalNumber.Two",many:"RecoveryPage.BookmarksTile.TotalNumber.Many"},n)})();t.sort(((e,t)=>t.deletionDate.getTime()-e.deletionDate.getTime()));const h=Object(u.a)(t,(e=>e.title),e.maxTileLines),m=d.a.sharedInstance.hasPCSKey(f);return r.createElement(o.b,{tileIndex:-1,icon:r.createElement(s.a,{iconSize:40,symbolSize:20,symbol:l.a,backgroundColor:"#FF9500"}),className:"bookmarks-recovery-tile",heading:n,description:p,tileSize:e.tileSize,isLoading:e.isLoading,onTileClick:e.onTileClick},!e.isLoading&&m&&r.createElement(a.a,{contentListItems:h.length>0?h:[Object(c.a)("RecoveryPage.TileContent.NoItems")],contentDescriptionText:""}),!m&&r.createElement("div",{className:"adp-locked-tile"},r.createElement(i.a,{"aria-hidden":"true",className:"adp-icon",layoutMode:"glyphBox",desiredFontSize:18}),r.createElement("div",{className:"title"},Object(c.a)("ADP.BookmarksRecoveryTile.Title"))))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return C})),n.d(t,"e",(function(){return _})),n.d(t,"a",(function(){return O}));var r=n(870),i=n(2180),o=n(1322);const a=2,s=Object(o.a)((e=>{i.b.setAccountPreferences(e)}),500);function c(e,t){var n;let r=i.b.getAccountPreferences();var o;e?(null!==(n=r)&&void 0!==n&&n.tilesConfigurations?(r.tilesConfigurations.configurations=e,t&&(r.tilesConfigurations.defaultOrder=t)):r={...r,tilesConfigurations:{configurations:e,defaultOrder:null!==t&&void 0!==t?t:[],version:a}},s(r)):null!==(o=r)&&void 0!==o&&o.tilesConfigurations&&(delete r.tilesConfigurations,i.b.setAccountPreferences(r))}var u=n(1323),l=n(1211),d=n(1210),p=n(1166),f=n(1165),h=n(919),m=n(920),g=n(1325),v=n(2208);const y=21,b=r.createContext({configurations:void 0,maxTiles:y}),w=r.createContext((()=>{}));function S(e){const[t,n]=r.useReducer(E,void 0,(()=>{try{if(Object(f.a)(g.a))return;return function(){var e,t;const n=i.b.getAccountPreferences(),r=null===n||void 0===n||null===(e=n.tilesConfigurations)||void 0===e?void 0:e.version;if(r&&r<a)return void c(void 0);const o=Object(u.a)();let s=!1;const f=null===n||void 0===n||null===(t=n.tilesConfigurations)||void 0===t?void 0:t.configurations.filter((e=>{const t=function(e,t){return e.identifier===p.a||e.identifier===d.b.identifier||e.identifier===l.b.identifier||-1!==t.indexOf(e.identifier)}(e,o);return t||(s=!0),t}));return s&&f&&c(f),v.b.sharedInstance.recordStatOnce(new h.a("tilesCount",{count:null===f||void 0===f?void 0:f.length})),f}()}catch(e){return}}));return r.createElement(b.Provider,{value:{configurations:t,maxTiles:y}},r.createElement(w.Provider,{value:n},e.children))}function C(){const e=r.useContext(b);if(void 0===e)throw new Error("useTileConfigurationStore must be used within a TileConfigurationStoreProvider");return e}function _(){const e=r.useContext(w);if(void 0===e)throw new Error("useTileConfigurationStoreDispatch must be used within a TileConfigurationStoreProvider");return e}let O=function(e){return e.SET="SET",e.UPDATE="UPDATE",e.DELETE="DELETE",e.INSERT="INSERT",e.MOVE="MOVE",e.UPDATE_OPTIONS="UPDATE_OPTIONS",e}({});function E(e,t){switch(t.type){case O.SET:{const e=[...t.configurations];return c(e),e}case O.DELETE:{if(!e||!A(e,t.index)||e.length<=1)return e;const n=[...e];return I({operationLabel:"delete-tile",tileName:n[t.index].identifier,tileIndex:t.index}),n.splice(t.index,1),c(n,void 0),n}case O.MOVE:{const n=t.fromIndex,r=t.toIndex;if(!e||!A(e,n)||!A(e,r)||n===r)return e;const i=[...e],o=i[n];return i.splice(n,1),i.splice(r,0,o),I({operationLabel:"move-tile",tileName:i[t.toIndex].identifier,tileIndex:t.toIndex,previousTileIndex:t.fromIndex}),c(i,void 0),i}case O.INSERT:{if(!e||(n=e,!((r=t.index)>=0&&r<=n.length))||e.length>=y)return e;const i=[...e.slice(0,t.index),t.configuration,...e.slice(t.index)];return I({operationLabel:"insert-tile",tileName:t.configuration.identifier,tileIndex:t.index}),c(i,void 0),i}case O.UPDATE:{if(!e||!A(e,t.index))return e;const n=e[t.index].identifier,r=[...e.slice(0,t.index),t.configuration,...e.slice(t.index+1)];return I({operationLabel:"update-tile",tileName:t.configuration.identifier,previousTileName:n,tileIndex:t.index}),c(r,void 0),r}case O.UPDATE_OPTIONS:{if(!e||!A(e,t.index))return e;const n=e[t.index];if(n.identifier!==t.configuration.identifier)return e;const r={...t.configuration,uuid:n.uuid},i=[...e.slice(0,t.index),r,...e.slice(t.index+1)];return c(i,void 0),i}default:throw new Error("Reached unexpected case in exhaustive check")}var n,r}function I(e){const{operationLabel:t,...n}=e;h.a.withEventAndLabel("workflow",t,{statCategory:m.a.USER,__allow_user:!0,...n}).record()}function A(e,t){return t>=0&&t<e.length}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1215),i=n.n(r),o=n(870);const a=e=>o.createElement("div",{className:i()("gcbd-branding-text",e.className)},"\u7531\u4e91\u4e0a\u8d35\u5dde\u8fd0\u8425")},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(1215),o=n.n(i),a=n(2259),s=n(2208),c=n(919);const u=e=>{const{className:t,onSignInPressed:n,title:i}=e,u=r.useCallback((()=>{s.b.sharedInstance.recordStat(new c.a("attemptToShowAuthWidget")),n()}),[n]);return r.createElement(a.a,{className:o()("sign-in-button",t),onActivate:u,ariaHasPopup:!1},i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(870);const i=e=>{let{children:t}=e;return r.createElement("span",{className:"screenreader-only-content",role:"presentation"},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(878);Object(r.a)(Object(r.b)(),{"AuthService.Application.Title":"iCloud","AuthService.TermsAndConditions.AgreeButton.Title":"Agree","AuthService.TermsAndConditions.DisagreeButton.Title":"Disagree","AuthService.TermsAndConditions.CancelButton.Title":"Cancel","AuthService.TermsAndConditions.Title":"iCloud Terms and Conditions","AuthService.TermsAndConditions.Title.WithoutiCloud":"Terms and Conditions","AuthService.TermsAndConditions.Description":"I agree to the iCloud Terms and Conditions.","AuthService.TermsAndConditions.DownloadCopyButton.Title":"Download","AuthService.TermsAndConditions.ContinueButton.Title":"Continue","AuthService.TermsAndConditions.Content.Title":"Welcome to iCloud","AuthService.TermsAndConditions.Content":"You must accept the iCloud Terms and Conditions before using iCloud.  These terms cover important information, please read them carefully.","AuthService.TermsAndConditions.ChinaTerms.Content":"You must accept the iCloud Terms and Conditions.  These terms cover important information, please read them carefully. If you choose to use iCloud in China, you are agreeing to be bound by the iCloud and GCBD Terms and Conditions, and acknowledging that GCBD will be processing iCloud data.","AuthService.TermsAndConditions.ChinaTerms.Title":"Your iCloud Account","AuthService.TermsAndConditions.ChinaTerms.Description":"I agree to the iCloud operated by GCBD Terms and Conditions.","AuthService.TermsAndConditions.ChinaTerms.Paragraph.One":"iCloud Services in the mainland of China are now operated by Chinese internet services company Guizhou on the Cloud Big Data Industrial Development Co., Ltd. (GCBD). This allows us to continue to improve the speed and reliability of iCloud and comply with Chinese regulations.","AuthService.TermsAndConditions.ChinaTerms.Paragraph.Two":"iCloud services and the data you store with iCloud, including photos, videos, documents, and backups, will be subject to the terms and conditions of iCloud operated by GCBD.","AuthService.TermsAndConditions.SuccessConfirmation.Title":"Terms and Conditions","AuthService.TermsAndConditions.SuccessConfirmation.Description":"You have successfully accepted the iCloud Terms and Conditions.","AuthService.TermsAndConditions.SuccessConfirmation.GameCenter.Description":"You have successfully accepted the iCloud Terms and Conditions. Go to Game Center on your Mac or device and sign in again.","AuthService.TermsAndConditions.SuccessConfirmation.UpToDate.Description":"Your Terms and Conditions are up to date.","AuthService.TermsAndConditions.SuccessConfirmation.GameCenter.UpToDate.Description":"Your Terms and Conditions are up to date. Go to Game Center on your Mac or device and sign in again.","AuthService.TrustBrowserConfirmation.Title":"Sign Out of iCloud.com?","AuthService.TrustBrowserConfirmation.Description":"If you trust this browser, you will not be asked for a verification code the next time you sign in.","AuthService.TrustBrowserConfirmation.Button.TrustAndSignOut":"Trust and Sign Out","AuthService.TrustBrowserConfirmation.Button.SignOut":"Sign Out","AuthService.TrustBrowserConfirmation.Button.Cancel":"Cancel","AuthService.AuthWidget.SignInLabel":"Sign in with Apple Account","AuthService.Loading":"Loading…","AuthService.DomainRedirect.Title":"This Apple Account can’t sign in to %{currentDomain}.","AuthService.DomainRedirect.Subtitle":"To sign in with this Apple Account, go to %{destinationDomain}.","AuthService.DomainRedirect.RedirectButton.Title":"Go to %{destinationDomain}","AuthService.DomainRedirect.Greeting.0-6":"Good evening.","AuthService.DomainRedirect.Greeting.6-12":"Good morning.","AuthService.DomainRedirect.Greeting.12-18":"Good afternoon.","AuthService.DomainRedirect.Greeting.18-0":"Good evening.","AuthService.DomainRedirect.Domain.icloud.com.cn":"iCloud.com.cn","AuthService.DomainRedirect.Domain.icloud.com":"iCloud.com","AuthService.CreateAccountWidget.Title":"Create Your Apple Account","AuthService.GenericError.Title":"Something Went Wrong","AuthService.GenericError.Description":"Please try again later.","AuthService.Modal.Button.Close":"Close"});var i=n(926);const o=Object(r.d)();Object(i.a)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1227),o=n(1482);const a=e=>{let{id:t,usedBytes:n,totalBytes:a,hideInfo:s=!1,usageByMedia:c}=e;const u=e=>Math.max(Math.min(e,a),0),l=e=>a?u(e)/a*100:0;a=Math.max(a,0),n=u(n);const d=Object(i.a)("StorageUsage.Message",{used:Object(o.a)(n,1),total:Object(o.a)(a,1)});return r.createElement("div",{className:"storage-usage",id:t},r.createElement("div",{className:"meter-gauge"},c.length?c.map(((e,t)=>r.createElement("div",{key:t,className:"segment",style:{inlineSize:`${l(e.usageInBytes)}%`,backgroundColor:`#${e.displayColor}`}}))):r.createElement("div",{className:"meter-filled segment","data-testid":"meter-filled",style:{inlineSize:`${l(n)}%`}})),s||r.createElement("div",{className:"message","data-testid":"message"},d))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(2266),i=n(1413),o=n(888);const a=o.z.object({success:o.z.boolean()});var s=n(2249);const c="/continueOnDevice";let u=function(e){return e.PLAN_UPGRADE="iCloudPlanUpgrade",e.PRIVATE_RELAY="setupPrivateRelay",e.HOMEKIT_SECURE_VIDEO="homeKitSecureVideo",e.FAMILY_SHARING="iCloudPlusFamilySharing",e.STORAGE_MANAGE="iCloudStorageManage",e}({});function l(e,t){const n=s.c(`${r.c}${c}`);return Object(i.a)({url:n,method:"POST",includeCredentials:!0,body:{feature:e,...!!t&&{cid:t}},validate:{type:"WireContinueOnDevice",schema:a}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(870),i=n(1215),o=n.n(i),a=n(1572),s=n(1227),c=n(2201);const u=e=>{const t=Object(a.b)(),{title:n,description:i,icon:u,url:l,urlLinkText:d}=e;return r.createElement("div",{className:"announcement-content"},r.createElement("div",{role:"region",className:o()("announcement-container",t.toLowerCase(),e.className),"aria-label":Object(s.a)("VoiceOver.Announcement.AriaLabel")},r.createElement("div",{className:"content"},u&&r.createElement("div",{className:"icon"},u),n&&r.createElement("div",{className:"title"},n),i&&r.createElement("div",{className:"description"},i,l&&d&&r.createElement(r.Fragment,null," ",r.createElement(c.a,{href:l},d))))))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return P})),n.d(t,"d",(function(){return E})),n.d(t,"f",(function(){return x})),n.d(t,"e",(function(){return M})),n.d(t,"b",(function(){return p})),n.d(t,"g",(function(){return L}));var r=n(1241),i=n(870),o=n.n(i),a=n(1232),s=n(1238),c=n(1235),u=n(2328),l=n(1237),d=n(2231);function p(e){if("virtual"===(0,d.a)()){let t=document.activeElement;(0,a.a)((()=>{document.activeElement===t&&document.contains(e)&&(0,s.a)(e)}))}else(0,s.a)(e)}function f(e,t){return"#comment"!==e.nodeName&&function(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r="none"!==t&&"hidden"!==n&&"collapse"!==n;if(r){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:n,visibility:i}=t(e);r="none"!==n&&"hidden"!==i&&"collapse"!==i}return r}(e)&&function(e,t){return!e.hasAttribute("hidden")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))}(e,t)&&(!e.parentElement||f(e.parentElement,e))}const h=o.a.createContext(null);let m=null;function g(e){let{children:t,contain:n,restoreFocus:r,autoFocus:a}=e,s=(0,i.useRef)(),u=(0,i.useRef)(),l=(0,i.useRef)([]),{parentNode:d}=(0,i.useContext)(h)||{},p=(0,i.useMemo)((()=>new k({scopeRef:l})),[l]);(0,c.a)((()=>{let e=d||D.root;if(D.getTreeNode(e.scopeRef)&&m&&!I(m,e.scopeRef)){let t=D.getTreeNode(m);t&&(e=t)}e.addChild(p),D.addNode(p)}),[p,d]),(0,c.a)((()=>{D.getTreeNode(l).contain=n}),[n]),(0,c.a)((()=>{let e=s.current.nextSibling,t=[];for(;e&&e!==u.current;)t.push(e),e=e.nextSibling;l.current=t}),[t]),function(e,t,n){(0,c.a)((()=>{if(t||n)return;let r=e.current,i=t=>{let n=t.target;_(n,e.current)?m=e:C(n)||(m=null)};return document.addEventListener("focusin",i,!1),r.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),r.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,t,n])}(l,r,n),function(e,t){let n=(0,i.useRef)(),r=(0,i.useRef)(null);(0,c.a)((()=>{let i=e.current;if(!t)return void(r.current&&(cancelAnimationFrame(r.current),r.current=null));let o=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!S(e))return;let n=document.activeElement,r=e.current;if(!_(n,r))return;let i=P(w(r),{tabbable:!0},r);i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,o=t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&A(o,!0)},a=t=>{m&&!I(m,e)||!_(t.target,e.current)?S(e)&&!O(t.target,e)?n.current?n.current.focus():m&&T(m.current):S(e)&&(n.current=t.target):(m=e,n.current=t.target)},s=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame((()=>{S(e)&&!O(document.activeElement,e)&&(m=e,document.body.contains(t.target)?(n.current=t.target,n.current.focus()):m&&T(m.current))}))};return document.addEventListener("keydown",o,!1),document.addEventListener("focusin",a,!1),i.forEach((e=>e.addEventListener("focusin",a,!1))),i.forEach((e=>e.addEventListener("focusout",s,!1))),()=>{document.removeEventListener("keydown",o,!1),document.removeEventListener("focusin",a,!1),i.forEach((e=>e.removeEventListener("focusin",a,!1))),i.forEach((e=>e.removeEventListener("focusout",s,!1)))}}),[e,t]),(0,i.useEffect)((()=>()=>{r.current&&cancelAnimationFrame(r.current)}),[r])}(l,n),function(e,t,n){const r=(0,i.useRef)("undefined"!==typeof document?document.activeElement:null);(0,c.a)((()=>{let r=e.current;if(!t||n)return;let i=()=>{m&&!I(m,e)||(m=e)};return document.addEventListener("focusin",i,!1),r.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),r.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,n]),(0,c.a)((()=>{if(!t)return;D.getTreeNode(e).nodeToRestore=r.current;let i=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey)return;let n=document.activeElement;if(!_(n,e.current))return;let r=D.getTreeNode(e).nodeToRestore,i=P(document.body,{tabbable:!0});i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();if(document.body.contains(r)&&r!==document.body||(r=null,D.getTreeNode(e).nodeToRestore=null),(!o||!_(o,e.current))&&r){i.currentNode=r;do{o=t.shiftKey?i.previousNode():i.nextNode()}while(_(o,e.current));t.preventDefault(),t.stopPropagation(),o?A(o,!0):C(r)?A(r,!0):n.blur()}};return n||document.addEventListener("keydown",i,!0),()=>{n||document.removeEventListener("keydown",i,!0);let r=D.getTreeNode(e).nodeToRestore;if(t&&r&&(_(document.activeElement,e.current)||document.activeElement===document.body&&function(e){let t=D.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null===t||void 0===t?void 0:t.scopeRef)===e}(e))){let t=D.clone();requestAnimationFrame((()=>{if(document.activeElement===document.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&document.body.contains(n.nodeToRestore))return void A(n.nodeToRestore);n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&D.getTreeNode(n.scopeRef))return void T(n.scopeRef.current,!0);n=n.parent}}}))}}}),[e,t,n])}(l,r,n),function(e,t){const n=o.a.useRef(t);(0,i.useEffect)((()=>{n.current&&(m=e,_(document.activeElement,m.current)||T(e.current)),n.current=!1}),[e])}(l,a),(0,i.useEffect)((()=>{if(l){let e=document.activeElement,t=null;if(_(e,l.current)){for(let n of D.traverse())_(e,n.scopeRef.current)&&(t=n);t===D.getTreeNode(l)&&(m=t.scopeRef)}return()=>{let e=D.getTreeNode(l).parent.scopeRef;l!==m&&!I(l,m)||e&&!D.getTreeNode(e)||(m=e),D.removeTreeNode(l)}}}),[l]);let f=(0,i.useMemo)((()=>function(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,s=r||document.activeElement,c=n[0].previousElementSibling,u=P(w(n),{tabbable:i,accept:a},n);u.currentNode=_(s,n)?s:c;let l=u.nextNode();return!l&&o&&(u.currentNode=c,l=u.nextNode()),l&&A(l,!0),l},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,s=r||document.activeElement,c=n[n.length-1].nextElementSibling,u=P(w(n),{tabbable:i,accept:a},n);u.currentNode=_(s,n)?s:c;let l=u.previousNode();return!l&&o&&(u.currentNode=c,l=u.previousNode()),l&&A(l,!0),l},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=P(w(n),{tabbable:r,accept:i},n);o.currentNode=n[0].previousElementSibling;let a=o.nextNode();return a&&A(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=P(w(n),{tabbable:r,accept:i},n);o.currentNode=n[n.length-1].nextElementSibling;let a=o.previousNode();return a&&A(a,!0),a}}}(l)),[]),g=(0,i.useMemo)((()=>({focusManager:f,parentNode:p})),[p,f]);return o.a.createElement(h.Provider,{value:g},o.a.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,o.a.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:u}))}const v=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],y=v.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";v.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const b=v.join(':not([hidden]):not([tabindex="-1"]),');function w(e){return e[0].parentElement}function S(e){let t=D.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function C(e){return O(e)}function _(e,t){return t.some((t=>t.contains(e)))}function O(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of D.traverse(D.getTreeNode(t)))if(_(e,n.current))return!0;return!1}function E(e){return O(e,m)}function I(e,t){var n;let r=null===(n=D.getTreeNode(t))||void 0===n?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function A(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(n){}}else try{p(e)}catch(r){}}function T(e,t=!0){let n=e[0].previousElementSibling,r=P(w(e),{tabbable:t},e);r.currentNode=n;let i=r.nextNode();t&&!i&&(r=P(w(e),{tabbable:!1},e),r.currentNode=n,i=r.nextNode()),A(i)}function P(e,t,n){let r=(null===t||void 0===t?void 0:t.tabbable)?b:y,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return(null===t||void 0===t||null===(i=t.from)||void 0===i?void 0:i.contains(e))?NodeFilter.FILTER_REJECT:!e.matches(r)||!f(e)||n&&!_(e,n)||(null===t||void 0===t?void 0:t.accept)&&!t.accept(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}});return(null===t||void 0===t?void 0:t.from)&&(i.currentNode=t.from),i}class R{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!==t&&void 0!==t?t:null),i=new k({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e),n=t.parent;for(let i of this.traverse())i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef.current&&_(i.nodeToRestore,t.scopeRef.current)&&(i.nodeToRestore=t.nodeToRestore);let r=t.children;n.removeChild(t),r.size>0&&r.forEach((e=>n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new R;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent.scopeRef,t.nodeToRestore);return e}constructor(){(0,r.a)(this,"fastMap",new Map),this.root=new k({scopeRef:null}),this.fastMap.set(null,this.root)}}class k{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){(0,r.a)(this,"children",new Set),(0,r.a)(this,"contain",!1),this.scopeRef=e.scopeRef}}let D=new R;function M(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=(0,i.useRef)({isFocused:!1,isFocusVisible:t||(0,d.b)()}),[a,s]=(0,i.useState)(!1),[c,u]=(0,i.useState)((()=>o.current.isFocused&&o.current.isFocusVisible)),l=(0,i.useCallback)((()=>u(o.current.isFocused&&o.current.isFocusVisible)),[]),p=(0,i.useCallback)((e=>{o.current.isFocused=e,s(e),l()}),[l]);(0,d.e)((e=>{o.current.isFocusVisible=e,l()}),[],{isTextInput:n});let{focusProps:f}=(0,d.c)({isDisabled:r,onFocusChange:p}),{focusWithinProps:h}=(0,d.f)({isDisabled:!r,onFocusWithinChange:p});return{isFocused:a,isFocusVisible:o.current.isFocused&&c,focusProps:r?h:f}}let N=o.a.createContext(null);function x(e,t){let{focusProps:n}=(0,d.c)(e),{keyboardProps:r}=(0,d.j)(e),o=(0,u.a)(n,r),a=function(e){let t=(0,i.useContext)(N)||{};(0,l.a)(t,e);let{ref:n,...r}=t;return r}(t),s=e.isDisabled?{}:a,c=(0,i.useRef)(e.autoFocus);return(0,i.useEffect)((()=>{c.current&&t.current&&p(t.current),c.current=!1}),[t]),{focusableProps:(0,u.a)({...o,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function L(e,t){let n=null===t||void 0===t?void 0:t.isDisabled,[r,o]=(0,i.useState)(!1);return(0,c.a)((()=>{if((null===e||void 0===e?void 0:e.current)&&!n){let t=()=>{if(e.current){let t=P(e.current,{tabbable:!0});o(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{n.disconnect()}}})),!n&&r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(870),i=n(1215),o=n.n(i);const a=e=>{let{icon:t,ariaHidden:n=!1,ariaLabel:i,action:a,className:s,children:c,disabled:u=!1,hasPopup:l=!1,role:d}=e;const p=o()("icon-button","unstyled-button",s);return r.createElement("button",{"aria-haspopup":l,"aria-hidden":n,className:p,disabled:n||u,"aria-label":i,onClick:a,role:d},t,c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(870),i=n(1215),o=n.n(i),a=n(1227),s=n(2201);const c=e=>{const{contentTitleText:t,contentListItems:n,contentDescriptionText:i,learnMoreHref:c}=e,u=o()("static-tile-content",e.className),l=Object(a.a)("EmptyHomeTileContent.LearnMore");return r.createElement("div",{className:u},t&&r.createElement("div",{className:"content-title-text"},t),n&&n.length>0&&r.createElement("div",{className:"content-list-items"},r.createElement("ul",null,n.map(((e,t)=>r.createElement("li",{key:`${t} - ${e}`},e))))),i&&r.createElement("div",{className:"content-description-text"},i,c&&r.createElement(s.a,{href:c},l)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(870),i=n(1215),o=n.n(i),a=n(2201);const s=e=>{const{title:t,icon:n,badge:i,textContent:s,linkInfo:c,tileId:u,contentImgSrc:l,contentImgSrcSet:d,contentImgAlt:p=""}=e,f=o()("info-tile",e.className);return r.createElement("article",{className:f,"aria-labelledby":u},r.createElement("div",{className:"section"},r.createElement("div",{className:"accessory"},r.createElement("div",null,n),i&&r.createElement("div",{className:"badge"},i)),r.createElement("h2",{className:"info-heading",id:u},t),r.createElement("p",null,s),c&&r.createElement(a.a,{href:c.href},c.text)),l&&r.createElement("div",{className:"section"},r.createElement("div",{className:"tile-content-img"},r.createElement("img",{src:l,srcSet:d,alt:p,"aria-hidden":"true"}))))}},function(e,t,n){"use strict";n.r(t);t.default=function(){if("undefined"===typeof JSON||"undefined"===typeof JSON.stringify||"undefined"===typeof JSON.parse)throw"pmrpc requires the JSON library";var e=[];if("undefined"===typeof window.postMessage&&"undefined"===typeof window.onconnect)throw"pmrpc requires the HTML5 cross-document messaging and worker APIs";function t(){return"object"===typeof window.crypto&&"function"===typeof window.crypto.getRandomValues&&"function"===typeof Uint32Array?window.crypto.getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32):Math.random()}function n(){for(var e=[],n=0;n<36;n++)e[n]="0123456789ABCDEF"[Math.floor(16*t())];return e[14]="4",e[19]="89AB"[Math.floor(4*t())],e[8]=e[13]=e[18]=e[23]="-",e.join("")}var r="pmrpc.";function i(e){e.trim()&&(r=e+".")}var o=function(e){if(window.sessionStorage){var t=e.publicProcedureName+"."+r,n={procedure:e.publicProcedureName,status:e.status,description:e.message,namespace:e.namespace?e.namespace:r};sessionStorage.setItem(t,JSON.stringify(n))}};function a(e,t,n,r){if(!(n instanceof Array)){var i=e.toString(),o=i.substring(i.indexOf("(")+1,i.indexOf(")"));o=""===o?[]:o.split(", ");for(var a={},s=0;s<o.length;s++)a[o[s]]=s;var c=[];for(var u in n){if("undefined"===typeof a[u])throw"No such param: "+u;c[a[u]]=n[u]}n=c}return"undefined"!==typeof r&&(n=n.concat(r)),e.apply(t,n)}function s(e){return r+JSON.stringify(e)}function c(e,t,n){var r={jsonrpc:"2.0"};return r.method=e,r.params=t,"undefined"!==typeof n&&(r.id=n),r}function u(e,t,n){var r={};return r.code=e,r.message=t,r.data=n,r}function l(e,t,n){var r={jsonrpc:"2.0"};return r.id=n,console.log(self.name,e,t,n),"undefined"===typeof e||null===e?r.result="undefined"===t?null:t:r.error=e,console.log("%c"+self.name+" - creating response object - ","color:magenta; ",r),r}t();var d={},p={},f={};function h(e){return!(e.publicProcedureName in f)&&(console.log(self.name+" --- Registering ---"+e.publicProcedureName),d[e.publicProcedureName]={publicProcedureName:e.publicProcedureName,procedure:e.procedure,context:e.procedure.context,isAsync:"undefined"!==typeof e.isAsynchronous&&e.isAsynchronous,acl:"undefined"!==typeof e.acl?e.acl:{permittedList:["(.*)"],notPermittedList:[]}},!0)}function m(e){return console.log(self.name+"----- registered pm-rpc ------ ",d),d[e]}function g(t,n){var i=t.id,a=p[i],s={receivePingRequest:"rPR",getRegisteredProcedures:"gRP",ready:"r",config:"i"},c=(new Date).getTime(),u={a:c,b:"",c:"rRE",f:"nPN",e:"f2:uRFRpcC"};if("undefined"!==typeof a&&null!==a){if(delete p[i],!function(e,t,n){var r;if("undefined"!==typeof e&&null!==e&&"undefined"!==typeof e.destinationDomain){if("undefined"===typeof t)return"undefined"!==typeof n&&"undefined"!==typeof n.error&&-4===n.error.code;r=t.origin;for(var i=0;i<e.destinationDomain.length;++i)if(r===e.destinationDomain[i])return!0}return!1}(a,n,t))return u.e="f2:cAF",void e.push(u);if("undefined"===typeof t.error){var l={destination:a.destination,publicProcedureName:a.publicProcedureName,params:a.params,status:"success",namespace:r,returnValue:t.result};console.log("success - rpc: '"+a.publicProcedureName+"'"),e.push({a:c,b:a.callId,c:"rRS",h:s[a.publicProcedureName]?s[a.publicProcedureName]:a.publicProcedureName,e:"f2:rRS"}),a.onSuccess(l)}else{var d={destination:a.destination,publicProcedureName:a.publicProcedureName,params:a.params,status:"error",namespace:r,message:t.error.message+" "+t.error.data};o(d),console.log("failure - rpc: '"+a.publicProcedureName+"'"),e.push({a:c,b:a.callId,c:"rRE",f:d.message,h:s[a.publicProcedureName]?s[a.publicProcedureName]:a.publicProcedureName,e:"f2:rRE"}),a.onError(d)}}else e.push(u)}function v(e){if(e.retries&&e.retries<0)throw new Error("number of retries must be 0 or higher");var t=[];if("undefined"===typeof e.destination||null===e.destination||"workerParent"===e.destination)t=[{context:null,type:"workerParent"}];else if("publish"===e.destination)t=C();else if(e.destination instanceof Array)for(var r=0;r<e.destination.length;r++)"workerParent"===e.destination[r]?t.push({context:null,type:"workerParent"}):"undefined"!==typeof e.destination[r].frames?t.push({context:e.destination[r],type:"window"}):t.push({context:e.destination[r],type:"worker"});else"undefined"!==typeof e.destination.frames?t.push({context:e.destination,type:"window"}):t.push({context:e.destination,type:"worker"});for(r=0;r<t.length;r++){var i={destination:t[r].context,destinationDomain:"undefined"===typeof e.destinationDomain?["*"]:"string"===typeof e.destinationDomain?[e.destinationDomain]:e.destinationDomain,publicProcedureName:e.publicProcedureName,onSuccess:"undefined"!==typeof e.onSuccess?e.onSuccess:function(){},onError:"undefined"!==typeof e.onError?e.onError:function(){},retries:"undefined"!==typeof e.retries?e.retries:5,timeout:"undefined"!==typeof e.timeout?e.timeout:500,status:"requestNotSent"},o="undefined"===typeof e.onError&&"undefined"===typeof e.onSuccess,a="undefined"!==typeof e.params?e.params:[],s=n();p[s]=i,i.callId=s,i.message=o?c(e.publicProcedureName,a):c(e.publicProcedureName,a,s),b(s)}}function y(t,n,r,i){var o={receivePingRequest:"rPR",getRegisteredProcedures:"gRP",ready:"r",config:"i"};if("undefined"!==typeof i?e.push({a:(new Date).getTime(),b:i.callId,c:i.logType||"req",h:o[i.publicProcedureName]?o[i.publicProcedureName]:i.publicProcedureName,e:i.calledAt}):e.push({a:(new Date).getTime(),b:"",c:"uPM",h:"",e:"f3:uRpcC"}),"undefined"===typeof t||null===t)self.postMessage(s(n));else{if("undefined"!==typeof t.frames)return t.postMessage(s(n),r);console.log("%c pm-rpc message to destination WINDOW:","color: blue; font-weight: bold;",s(n)),t.postMessage(s(n))}}function b(e,t){self.setTimeout((function(){var n=p[e];if("undefined"!==typeof n&&(!t||"pinging"===n.status))if(n.retries<=-1)console.log("failure - rpc: '"+n.publicProcedureName+"', reason: reached maximum retries."),g(l(u(-4,"Application error.","Destination unavailable. "+n.timeout),null,e));else{if("requestSent"===n.status)return;if(0===n.retries||"available"===n.status){n.status="requestSent",n.retries=-1,p[e]=n;for(var r=0;r<n.destinationDomain.length;r++)console.log(self.name+" - will send rpc message for '"+n.publicProcedureName+"'"),n.calledAt="wSR:SR",y(n.destination,n.message,n.destinationDomain[r],n),self.setTimeout((function(){b(e)}),n.timeout)}else{n.status="pinging",n.retries=n.retries-1,console.log("will send 'receivePingRequest' for rpc: '"+n.publicProcedureName+"', number of retries left: "+n.retries);var i={destination:n.destination,publicProcedureName:"receivePingRequest",onSuccess:function(t){!0===t.returnValue&&"undefined"!==typeof p[e]&&"pinging"===p[e].status&&(p[e].status="available",console.log("success - 'receivePingRequest' for rpc: '"+p[e].publicProcedureName+"'"),b(e))},params:[n.publicProcedureName],retries:0,destinationDomain:n.destinationDomain};n.destinationDomain&&(i.destinationDomain=n.destinationDomain),v(i),p[e]=n,window.setTimeout((function(){p[e]&&"pinging"===p[e].status&&b(e,!0)}),n.timeout/n.retries)}}}),10)}if(!("window"in window))throw"Pmrpc must be loaded within a browser window";var w,S=(w=function(t){var n=t.event;if(n&&n.data&&"string"===typeof n.data&&0===n.data.indexOf(r)){var i,o=(i=n.data,JSON.parse(i.substring(r.length))),s={data:n.data,source:n.source,origin:n.origin,shouldCheckACL:!0};if("undefined"!==typeof o.method){e.push({a:(new Date).getTime(),b:o.id,c:"rR",h:o.method,e:"f1:mR"}),console.log("%c pm-rpc request recieved at ","color: blue; font-weight: bold;",self.name);var c=function(e,t){if("2.0"!==e.jsonrpc)return l(u(-32600,"Invalid request.","The recived JSON is not a valid JSON-RPC 2.0 request."),null,null);var n=e.id;console.log("%c"+self.name+" processing pm-rpc request ","color: grey; font-weight: bold;",e);var r=m(e.method);if(console.log("%c"+self.name+" registered procedure fetchRegisteredService(request.method) - ","color: grey; font-weight: bold;",r),"undefined"===typeof r)return"undefined"===typeof n?null:l(u(-32601,"Method not found.","The requested remote procedure does not exist or is not available."),null,n);if(t.shouldCheckACL&&!function(e,t,n){var r=e.permittedList,i=e.notPermittedList,o=!1,a=!1;if(n&&{getRegisteredProcedures:!0,receivePingRequest:!0}[n])return!0;for(var s=0;s<r.length;++s)if(t===r[s]){o=!0;break}for(var c=0;c<i.length;++c)if(t===r[s]){a=!0;break}return o&&!a}(r.acl,t.origin,r.publicProcedureName))return"undefined"===typeof n?null:l(u(-2,"Application error.","Access denied on server."),null,n);try{if(r.isAsync){return a(r.procedure,r.context,e.params,[function(e){y(t.source,l(null,e,n),t.origin)},function(e){y(t.source,l(u(-1,"Application error.",e.message),null,n),t.origin)},t]),null}try{var i=a(r.procedure,r.context,e.params,[t]);return"undefined"===typeof n?null:l(null,i,n)}catch(o){return l(u(-5,"Procedure error.","Procedure thrown exception"),null,n)}}catch(s){return"undefined"===typeof n?null:s.match("^(No such param)")?l(u(-32602,"Invalid params.",s.message),null,n):l(u(-1,"Application error.",s.message),null,n)}}(o,s);null!==c&&y(s.source,c,s.origin,{callId:o.id,logType:"res",publicProcedureName:o.method,calledAt:"f1:f4"})}else console.log("%c pm-rpc response recieved at ","color: red; font-weight: bold;",self.name),g(o,s)}},function(e){w({event:e,source:null,destinationType:"window"})});function C(){return function(){var e=[];if("undefined"!==typeof window){e.push({context:window.top,type:"window"});for(var t=0;"undefined"!==typeof e[t];t++)for(var n=e[t],r=0;r<n.context.frames.length;r++)e.push({context:n.context.frames[r],type:"window"})}else e.push({context:window,type:"workerParent"});return e}().concat([])}return function(e,t,n){"addEventListener"in e?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}(window,"message",S),h({publicProcedureName:"receivePingRequest",procedure:function(e){return"undefined"!==typeof m(e)}}),h({publicProcedureName:"getRegisteredProcedures",procedure:function(){var e=[],t="undefined"!==typeof window.frames?window.location.protocol+"//"+window.location.host+(""!==window.location.port?":"+window.location.port:""):"";for(var n in console.log(self.name+"---- Origin ---- "+t),console.log(self.name+"---- registeredServices ---- "+d),d)n in f||e.push({publicProcedureName:d[n].publicProcedureName,acl:d[n].acl,origin:t});return e}}),f={getRegisteredProcedures:null,receivePingRequest:null},{register:h,unregister:function(e){return!(e in f)&&(delete d[e],!0)},call:function(e){e.namespace&&i(e.namespace),v(e)},discover:function(e){var t=null;if("undefined"===typeof e.destination){t=C();for(var n=0;n<t.length;n++)t[n]=t[n].context}else t=e.destination;var r="undefined"===typeof e.originRegex?"(.*)":e.originRegex,i="undefined"===typeof e.nameRegex?"(.*)":e.nameRegex,o=t.length,a=[];this.call({destination:t,destinationDomain:"*",publicProcedureName:"getRegisteredProcedures",onSuccess:function(t){o--,function(e,t){for(var n=0;n<e.length;n++)e[n].origin.match(new RegExp(r))&&e[n].publicProcedureName.match(new RegExp(i))&&a.push({publicProcedureName:e[n].publicProcedureName,destination:t,procedureACL:e[n].acl,destinationOrigin:e[n].origin})}(t.returnValue,t.destination),0===o&&e.callback(a)},onError:function(t){0===--o&&e.callback(a)}})},setNamespace:i,sessionLog:o,getMessageLog:function(){return"undefined"!==typeof e?e:void 0},getMessageStringLog:function(){var t={receivePingRequest:"rPR",getRegisteredProcedures:"gRP",ready:"r",config:"i",getConfig:"gC"};if("undefined"!==typeof e){var n=[],r=[];return e.forEach((function(e){r=[],Object.keys(e).forEach((function(n){var i=e[n];"a"===n?i=(e[n]+"").substring(5):"b"===n?i=e[n].substring(0,8):"h"===n&&(i=t[i]?t[i]:i),r.push(n+":"+i)})),n.push(r.join(" "))})),n.join("|")}}}}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1233),i=n(2329);function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}var a=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r};function s(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let o=e[n];for(let e in o){let n=t[e],s=o[e];"function"===typeof n&&"function"===typeof s&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=(0,r.a)(n,s):"className"!==e&&"UNSAFE_className"!==e||"string"!==typeof n||"string"!==typeof s?"id"===e&&n&&s?t.id=(0,i.a)(n,s):t[e]=void 0!==s?s:n:t[e]=a(n,s)}}return t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p}));var r=n(1235),i=n(1236),o=n(870);var a=n(1234);let s,c=Boolean("undefined"!==typeof window&&window.document&&window.document.createElement),u=new Map;function l(e){let[t,n]=(0,o.useState)(e),i=(0,o.useRef)(null),l=(0,a.b)(t),d=(0,o.useRef)(null);if(s&&s.register(d,l),c){const e=u.get(l);e&&!e.includes(i)?e.push(i):u.set(l,[i])}return(0,r.a)((()=>{let e=l;return()=>{s&&s.unregister(d),u.delete(e)}}),[l]),(0,o.useEffect)((()=>{let e=i.current;return e&&n(e),()=>{e&&(i.current=null)}})),l}function d(e,t){if(e===t)return e;let n=u.get(e);if(n)return n.forEach((e=>e.current=t)),t;let r=u.get(t);return r?(r.forEach((t=>t.current=e)),e):t}function p(e=[]){let t=l(),[n,a]=function(e){let[t,n]=(0,o.useState)(e),a=(0,o.useRef)(null),s=(0,i.a)((()=>{if(!a.current)return;let e=a.current.next();e.done?a.current=null:t===e.value?s():n(e.value)}));(0,r.a)((()=>{a.current&&s()}));let c=(0,i.a)((e=>{a.current=e(t),s()}));return[t,c]}(t),s=(0,o.useCallback)((()=>{a((function*(){yield t,yield document.getElementById(t)?t:void 0}))}),[t,a]);return(0,r.a)(s,[t,s,...e]),n}"undefined"!==typeof FinalizationRegistry&&(s=new FinalizationRegistry((e=>{u.delete(e)})))},,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(888);const i=r.z.union([r.z.literal("cloud.storage"),r.z.literal("home.cameras"),r.z.literal("mail.custom-domains.transfer"),r.z.literal("mail.custom-domains.purchase"),r.z.literal("mail.hide-my-email.create"),r.z.literal("networking.privacy.attestation"),r.z.literal("networking.privacy.subscriber"),r.z.literal("apps.rsvp.create-event")]),o=r.z.union([r.z.literal("GIB"),r.z.literal("TIB")]),a=r.z.object({featureKey:i,canUse:r.z.boolean(),limit:r.z.number().optional(),limitUnits:o.optional(),cacheTill:r.z.string()}),s=r.z.object({includedInPlan:r.z.boolean(),limit:r.z.number().optional(),limitUnits:o.optional()}),c=r.z.object({featureKey:i,summary:s,includedWithAccountPurchasedPlan:s,includedWithAppleOnePlan:s,includedWithSharedPlan:s,includedWithCompedPlan:s,includedWithManagedPlan:s}),u=r.z.array(a),l=r.z.union([r.z.literal("MONTHLY"),r.z.literal("YEARLY")]),d=r.z.object({paidPlan:r.z.boolean(),priceForDisplay:r.z.string().optional(),renewalPeriod:l.nullable()});var p=n(1413),f=n(2266);const h=e=>{if(!e)throw new Error("listSubscriptionFeatures: no dsid available");return Object(p.a)({url:Object(f.C)(e),includeCredentials:!0,validate:{type:"WireSubscriptionFeatures",schema:u}})},m=(e,t)=>{if(!t)throw new Error("getSubscriptionFeaturePlanSummary: no dsid available");return Object(p.a)({url:Object(f.B)(t,e),includeCredentials:!0,validate:{type:"WireSubscriptionFeaturePlanSummary",schema:c}})},g=e=>{if(!e)throw new Error("listSubscriptionFeatures: dsid available");return Object(p.a)({url:Object(f.r)(e),includeCredentials:!0,validate:{type:"WirePlanPricing",schema:d}})}}]));
//# sourceMappingURL=main.js.map