PageSourceSearch

https://portal.cardapioweb.com/assets/index-Cs-In7Vx.js

js cardapioweb.com collected 2026-09-24 11:56:39 UTC 3,532,004 bytes, 508 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="29975569-e1f0-5dce-b6bb-3aa43f8d0ae2")}catch(e){}}();
3const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BV31ycQI.js","assets/useSellers-CS8dupSx.js","assets/Pagination-BN0FIrDJ.js","assets/useOwnerId-aWCIymgc.js","assets/useAccount-BtmLSkRg.js","assets/apiEndpoints-DMnpAh1j.js","assets/UrlNameField-DoccBEEC.js","assets/index-DUZKJvPU.js","assets/formatAddress-DI14OUhR.js","assets/validateCNPJ-D1dZ3Lbf.js","assets/validateCPF-BkwZ4IBk.js","assets/index-CZT6I8m8.js","assets/Drawer-z0Voclkl.js","assets/Receipt-DpaxsT7M.js","assets/formatPeriod-CMJE9Ypw.js","assets/CodeRounded-CAzTBunu.js","assets/GetAppRounded-DDuWLHeg.js","assets/constants-2ySKHZ7n.js","assets/useBillings-Csu4T8Yk.js","assets/CompaniesTable-B9sdvjU3.js","assets/AnnouncementRounded-C3ZHSK9S.js","assets/billingFrequencyMap-DXbBZcAw.js","assets/useAccountCompanies-BLHe3lRe.js","assets/index-BIONtEG3.js","assets/quantityPricing-CjzHYAD5.js","assets/CustomFieldModel-EZo6aAjI.js","assets/CouponField-9Q6k0qeC.js","assets/usePlans-CYGx2EVY.js","assets/ToggleButtonGroup-Bhd5Hj6n.js","assets/ArrowDownwardRounded-Dbc_n-lj.js","assets/MoreHorizRounded-CDFUhCK1.js","assets/StoreRounded-rFkBW34T.js","assets/CreateCompanyDialog-1IfhHToC.js","assets/useSubscriptionCustomFields-Ds4vV-x9.js","assets/MarketSegmentField-Dm3gJtna.js","assets/SellerField-CFyWeZh0.js","assets/AffiliatePartnerAutocomplete-BJwhUbZs.js","assets/constants-DUdecVT3.js","assets/UserImpersonationButton-BwjJAZIR.js","assets/PeopleRounded-C2uIRKdn.js","assets/Breadcrumbs-CsIoPTtN.js","assets/OutstandingChargesTable-CanJXfSu.js","assets/ChargesCreditsDialog-BtRL5AkP.js","assets/AccountsPage-DFPZ7FOk.js","assets/SearchInput-6k8qtIIx.js","assets/AccountCircle-DAKWRHmi.js","assets/LinkRounded-m-dCrWNi.js","assets/SignUpPage-CCOfWqDX.js","assets/SpinnerLoading-BTARSA4B.js","assets/mapKeys-BnL5fZ3L.js","assets/pickBy-CFeWtXAK.js","assets/useOrganization-QJCJqGxh.js","assets/AffiliatePartnersPage-BoN_nQlK.js","assets/CPFMaskCustom-BSgPViA9.js","assets/CNPJMaskCustom-BuuETOHV.js","assets/InfoRounded-DDD1KJPn.js","assets/index-Dpr9l0yn.js","assets/SearchTextInput-Gprlx1Wp.js","assets/EmailRounded-blFpoifh.js","assets/Badge-afidKPqR.js","assets/useFilterStore-DwE7BPPd.js","assets/ReplayRounded-CtlS3Yz1.js","assets/index-BnOb1p2b.js","assets/BillingsPage-i9hQNwwA.js","assets/ApartmentRounded-xr62LVSX.js","assets/ClientMapPage-DqEjJ5lt.js","assets/lowerCase-pGvZ4x_-.js","assets/leaflet.draw-Ct0Z2aeX.js","assets/ClientMapPage-BmKfC4HK.css","assets/CompaniesPage-GBa-qxz7.js","assets/Drawer-CC9gATQS.js","assets/TuneRounded-DS8KpY0d.js","assets/CouponsPage-0zV1C99p.js","assets/CachedRounded-DmfsXYTX.js","assets/IntegratorsPage-CTHYf57a.js","assets/utils-BV20SPqd.js","assets/Lock-C5j5Mq5n.js","assets/CloudUploadRounded-DqYHvwyH.js","assets/appPermissions-IOfUOL5d.js","assets/Draft-yvgGJQ1j.js","assets/DescriptionRounded-fU0kur7i.js","assets/AppsRounded-B77gkWds.js","assets/VpnKeyRounded-DcOTWpCN.js","assets/react-draft-wysiwyg-BRnLTqeH.css","assets/NotificationsPage-CEFy3Ii5.js","assets/SendRounded-F14-gZ8F.js","assets/NotificationCard-Br_kHORa.js","assets/DoneAllRounded-BJ8SQGoK.js","assets/DoneRounded-DPMKgf-4.js","assets/NewReleasesRounded-Bx8h4pgW.js","assets/OrganizationsBillingsPage-B4uCv_4E.js","assets/OrganizationDialog-DUPX4n5_.js","assets/OrganizationProfilePage-CwwLDmgr.js","assets/AddCircleRounded-az9o5Afs.js","assets/apiEndpoints-DLS7WSIB.js","assets/OrganizationsPage-SXWsaFwJ.js","assets/OrganizationUsersPage-DEaRXA0W.js","assets/FlagPermission-Dumh5c7L.js","assets/useStateWithDebounce-BSa_Qs1F.js","assets/CountFilterChip-DXGmwvTg.js","assets/index-BmbvWWZd.js","assets/AddOnContent-BIezAUA-.js","assets/VisibilityOutlined-CAYGdMym.js","assets/ReorderRounded-Ct9eXE7H.js","assets/useDrop-DkAvtxPl.js","assets/index-CzZd9CBB.js","assets/SubscriptionCustomFieldsPage-DQTie-0k.js","assets/SwapVert-C_UU1p_g.js","assets/MoreVert-BCDgbBhi.js","assets/SubscriptionEventsPage-u38Bbmnq.js","assets/CheckBoxOutlineBlankRounded-B4fof7Ef.js","assets/CheckBoxRounded-9nIk-vPl.js","assets/react-apexcharts.esm
3-BeyC2Cqp.js","assets/Done-CqMP_G1M.js","assets/AffiliatePartnerCompaniesPage-YO7kWHlg.js","assets/AffiliatePartnerPaymentsPage-D48DEE2x.js","assets/AffiliatePartnerProfilePage-Dp3F7zk2.js","assets/cwMarketplaceAppDetailsPage-BY92wgvc.js","assets/ArrowBackRounded-d_5Kt6BO.js","assets/marketplaceMapper-D_fQHjuY.js","assets/marketplaceService-D3cbmV08.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/installationsService-BQ85R6py.js","assets/apiError-c5EuW7Ac.js","assets/cwMarketPlacePage-DOahimdI.js","assets/useMarketplaceInstalledApps-Crlqum7A.js","assets/AdminDashboardPage-B5jEyM_R.js","assets/BenefitsPage-BkTu1vpN.js","assets/useOnScreen-DBM-8yy0.js","assets/DonutLarge-DB1XnvNY.js","assets/predefinedRanges-D69D5ddX.js","assets/MetricsCard-UevVuWSO.js","assets/getChartLabels-DIs8f5fD.js","assets/cloneDeep-WMrv_9GL.js","assets/cloneDeep-CWttLxUo.js","assets/CancellationPage-fQXi_ze0.js","assets/ArrowUpwardRounded-guiMUSaD.js","assets/CashFlowPage-XZqqO7dT.js","assets/FinancialCategoriesAutocomplete-CTXS_wau.js","assets/LockRounded-CGMr2OzM.js","assets/useFinancialCategoriesLite-BJUT2mSq.js","assets/AutocompleteField-CYdBf8gZ.js","assets/ClientsPage-729EdOhx.js","assets/ExportReportDialog-D8cuoLvc.js","assets/NotificationsRounded-CplVMLN2.js","assets/GetApp-_wtIVFTa.js","assets/SettingsRounded-B2QVmdGs.js","assets/ClientsPerformancePage-DakxO470.js","assets/DevFeedback-Dv8XXict.js","assets/CardWrapper-CueAJxDP.js","assets/config-f7bvFD3y.js","assets/CouponsPage-DuRy7eVu.js","assets/useGetCoupons-D015gTvi.js","assets/useCategoriesLite-C97aXSJg.js","assets/taggedTemplateLiteral-DxAKf2M4.js","assets/CustomersPerformancePage-BBCvdDH8.js","assets/CustomFieldsPage-JgN9UkXl.js","assets/Delete-DCbpn3_I.js","assets/index-CyJh5SyE.js","assets/moment-range-uyJzC9Kf.js","assets/index-1xA3vlAa.js","assets/useFilters-BJxHebiy.js","assets/index-CIqY8gC8.js","assets/DeliverymanManagement-JHjnaGte.js","assets/locked_module-D-4wDN0s.js","assets/browser-CZVQoyD8.js","assets/DeliveryPerformancePage-Bob7KXfI.js","assets/createRegion-CI0XUtUf.js","assets/max-BqnMCWIn.js","assets/formatMinutes-BkUsv5--.js","assets/shop-DcM_z8AG.js","assets/ThumbUpAltRounded-BMHztzFb.js","assets/TimerRounded-CjJx2Tb3.js","assets/constants-CGt9nw53.js","assets/DeliverySettingsPage-BbWxBvSN.js","assets/Help-D_hZHZg-.js","assets/profile.actions-5K7DhYPO.js","assets/Check-D80HhUso.js","assets/Edit-BngzYF2F.js","assets/ListItemSecondaryAction-j8rMQwuS.js","assets/DeliverySettingsPage-zvyP_-Lb.css","assets/FeedbackPage-CAjh4Okv.js","assets/react-datepicker-rfH8Zmgl.js","assets/react-datepicker-B4brFUq3.css","assets/index-D-RQ5F-f.js","assets/AccountsDialog-DZ8H1Ku4.js","assets/CreationAndUpdateInfo-CcB-rkli.js","assets/CostCentersDialog-DplWxjxQ.js","assets/FinancialCategoriesDialog-CzrVMQNn.js","assets/PaymentMethodsDialog-Uf28_Bj_.js","assets/SuppliersDialog-DM813J-n.js","assets/CustomSelect-CyvZT3Hq.js","assets/useFinancialAccountsLite-LZoNKcV7.js","assets/DateRangePickerWithArrows-2RBfn5OR.js","assets/Spinner-DX5Flz0U.js","assets/values-oz98-6Rc.js","assets/ArrowBackIosRounded-AXdLaQOM.js","assets/DateRangePickerWithArrows-B28-aF0Q.css","assets/lodash-CHJGsSPA.js","assets/utils-X2dEsrfc.js","assets/UnfoldMoreRounded-DXmUH1CY.js","assets/index-CldQ-u6V.css","assets/index-DSSR5iaQ.js","assets/index-BNva6enM.js","assets/index-DSkRIdna.js","assets/index-BOEAfK9C.js","assets/AccountBalanceRounded-Dtw_UubE.js","assets/AccountTreeRounded-DfynTUiD.js","assets/CategoryRounded-CVoUfdJC.js","assets/GroupRounded-CPwgKLtC.js","assets/index-CqyTQpSb.js","assets/FileUpload-BGrl41sJ.js","assets/index-BbpKMpP7.js","assets/index-C1BRRgK3.js","assets/useOrderInvoices-BgFuiwFs.js","assets/index-QGAFfp3H.js","assets/useIfoodStatus-jWKLAuOn.js","assets/HelpOutlineRounded-BdKAN6Cs.js","assets/index-D-RckYy5.js","assets/OpenDrawerButtonMobile-CF3REns_.js","assets/index-D92N2_vc.js","assets/index-CxEsRC25.js","assets/VerifiedUserRounded-COqI9ZdT.js","assets/KdsPage-CLeyBp8E.js","assets/countBy-EJ7lCbpH.js","assets/immer-DcGVaYhT.js","assets/ChipsGroup-BJpEOhUV.js","assets/union-1MeT5C01.js","assets/RoomServiceRounded-DfS0Dhfc.js","assets/LatestOrdersPage-UJUqUzjx.js","assets/index-kCik8b3g.js","assets/AddPaymentPointDialog-Szy62P03.js","assets/react-virtualized-auto-sizer.esm-KOBZLcdN.js","assets/IfoodWidget-BTbiMJWu.js","assets/LatestOrdersPage-q3qdpTos.css","assets/index-9n8m9Vs9.js","assets/useFilters-CXWIBzMP.js","assets/apiEndpoints-CbQdUVtw.js","assets/index-BP-fXNVI.js","assets/index-CGVDfHYp.js","assets/CatalogTreePicker-MYf1zT-L.js","assets/AnalyticsPage-DWsgWh8m.js","assets/TrendingDownRounded-Df8UqwPX.js","assets/SegmentationPage-aZuVUhF2.js","assets/FilteredRecipients-Cv0p9CDv.js","assets/SupervisorAccountRounded-DHnvJqIM.js","assets/ClearRounded-DHIPpCj7.js","assets/WhatsAppConnectionPage-BZ7X0l77.js","assets/cacheKeys-Px_UUtmK.js","assets/ContactPhoneRounded-B3ob7BpZ.js","assets/FiberManualRecord-B1d1Mzjb.js","assets/meta-Bd4svD5c.js","assets/formatWhatsAppPhone-DJG7KN8s.js","assets/useIntegrationOverview-Dol5EBAf.js","assets/WhatsAppChatBotPage-B--tNJKC.js","assets/useIntegrationTemplates-C7sVRBPz.js","assets/errors-BL8YlbI8.js","assets/useWhatsAppIntegrationPageState-B17qVVk9.js","assets/WhatsAppTemplatesPage-BrJA7zCC.js","assets/useTemplateMutations-Bd5usizi.js","assets/ViewHeadlineRounded-CNvGi08T.js","assets/AutorenewRounded-BzryKyaY.js","assets/WhatsAppOrderStatusPage-DWO1Sym7.js","assets/CardLoadingOverlay-BBx8AjSw.js","assets/WhatsAppBotPersonalityPage-BAHPWxO3.js","assets/mingcute_robot-line-B3wWtnZV.js","assets/ZapzapAuth-f06Mb2Ir.js","assets/DateRangePickerWithArrows-DwdY
3jz2w.js","assets/StarsRounded-Csv-JuRR.js","assets/Skeleton-Cws1e6O3.js","assets/PlayCircleOutlineRounded-D4_NJNLz.js","assets/EmojiObjectsOutlined-Cdqaq-eZ.js","assets/SecurityRounded-DKQh__8U.js","assets/ImageOutlined-jBTnVIaP.js","assets/EventRounded-BhIZEe2r.js","assets/MenuPage-BiG56zh2.js","assets/index-fQb1qIxV.js","assets/useMenu-DhF7fScL.js","assets/index-BDBNNqYD.js","assets/MultiCompanyPerformancePage-BDaXALXR.js","assets/NoticesPage-xjURnogj.js","assets/OpeningHoursPage-COe3GaN0.js","assets/index-B3KUoMZT.js","assets/OrdersPage-B0py_Uu3.js","assets/OrderSessionManagementPage--Q8dEFsI.js","assets/_baseClamp-B3OIe0nt.js","assets/OrderSessionQRCodeDialog-B2qXMQD_.js","assets/PaymentMethodsPage-ethbzoAp.js","assets/useEnsure2FA-DZrn0S1r.js","assets/EventNoteRounded--bzqcprI.js","assets/PerformancePage-Bc-Ww6SM.js","assets/ProfilePage-BJgjzqEc.js","assets/jsx-runtime-Crd2NGxj.js","assets/LocationOnRounded-iAbEw2do.js","assets/MovieCreationOutlined-DPxC34Zc.js","assets/SalesPerformancePage-CS5NIUL0.js","assets/defaultChartOptions-Dkbm-kCJ.js","assets/SalesCategoryReportPage-bSzscQTL.js","assets/WrapperLayoutPage-DDC8wKbX.js","assets/SalesProductsReportPage-DpMSK8nz.js","assets/SalesSubitemsReportPage-nPXmWbgk.js","assets/SalesReportPage-CUGkz21a.js","assets/predefinedRanges-CS6BEJDB.js","assets/SettingsPage-Bj7cHj-F.js","assets/index-Cl_ZIIaS.js","assets/index-CgNffi4W.js","assets/WrapperLayoutPage-1twb-OQN.js","assets/ReportButton-BWrEQcNI.js","assets/index-DgKWHLnb.js","assets/index-Bca7xiv6.js","assets/index-v92uJqSA.js","assets/McpOAuthConsentPage-BkaJyUxL.js","assets/mcp-BQUZ5oeG.js","assets/OwnerDashboardPage-Dd0g6-QU.js","assets/Developing-CVlTUX3g.js","assets/OwnerMultilojasPage-HE48Hu_U.js","assets/utils-DEpNR8i0.js","assets/OwnerStoresPage-DKLmx0aj.js","assets/SubscriptionsPage-DUXub71s.js","assets/OwnerUsersPage-Bgko0jLE.js","assets/RevenuePage-CF3DdByj.js","assets/index-Djaihcm0.js","assets/index-Btz3ICrZ.js","assets/useOrderSessions-DlFFJX2M.js","assets/index-DR75hPl5.css"])))=>i.map(i=>d[i]);
4function LNe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(null,arguments)}function yT(e){return e.charAt(0)==="/"}function iN(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}function FNe(e,t){t===void 0&&(t="");var r=e&&e.split("/")||[],n=t&&t.split("/")||[],i=e&&yT(e),a=t&&yT(t),o=i||a;if(e&&yT(e)?n=r:r.length&&(n.pop(),n=n.concat(r)),!n.length)return"/";var s;if(n.length){var l=n[n.length-1];s=l==="."||l===".."||l===""}else s=!1;for(var c=0,d=n.length;d>=0;d--){var f=n[d];f==="."?iN(n,d):f===".."?(iN(n,d),c++):c&&(iN(n,d),c--)}if(!o)for(;c--;c)n.unshift("..");o&&n[0]!==""&&(!n[0]||!yT(n[0]))&&n.unshift("");var h=n.join("/");return s&&h.substr(-1)!=="/"&&(h+="/"),h}function aZ(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function yP(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(i,a){return yP(i,t[a])});if(typeof e=="object"||typeof t=="object"){var r=aZ(e),n=aZ(t);return r!==e||n!==t?yP(r,n):Object.keys(Object.assign({},e,t)).every(function(i){return yP(e[i],t[i])})}return!1}var BNe="Invariant failed";function Eh(e,t){throw new Error(BNe)}function iS(e){return e.charAt(0)==="/"?e:"/"+e}function oZ(e){return e.charAt(0)==="/"?e.substr(1):e}function zNe(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function Pge(e,t){return zNe(e,t)?e.substr(t.length):e}function Rge(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function HNe(e){var t=e||"/",r="",n="",i=t.indexOf("#");i!==-1&&(n=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return a!==-1&&(r=t.substr(a),t=t.substr(0,a)),{pathname:t,search:r==="?"?"":r,hash:n==="#"?"":n}}function Cl(e){var t=e.pathname,r=e.search,n=e.hash,i=t||"/";return r&&r!=="?"&&(i+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function il(e,t,r,n){var i;typeof e=="string"?(i=HNe(e),i.state=t):(i=ve({},e),i.pathname===void 0&&(i.pathname=""),i.search?i.search.charAt(0)!=="?"&&(i.search="?"+i.search):i.search="",i.hash?i.hash.charAt(0)!=="#"&&(i.hash="#"+i.hash):i.hash="",t!==void 0&&i.state===void 0&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invali
4d percent-encoding.'):a}return r&&(i.key=r),n?i.pathname?i.pathname.charAt(0)!=="/"&&(i.pathname=FNe(i.pathname,n.pathname)):i.pathname=n.pathname:i.pathname||(i.pathname="/"),i}function UNe(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&yP(e.state,t.state)}function _q(){var e=null;function t(o){return e=o,function(){e===o&&(e=null)}}function r(o,s,l,c){if(e!=null){var d=typeof e=="function"?e(o,s):e;typeof d=="string"?typeof l=="function"?l(d,c):c(!0):c(d!==!1)}else c(!0)}var n=[];function i(o){var s=!0;function l(){s&&o.apply(void 0,arguments)}return n.push(l),function(){s=!1,n=n.filter(function(c){return c!==l})}}function a(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.forEach(function(c){return c.apply(void 0,s)})}return{setPrompt:t,confirmTransitionTo:r,appendListener:i,notifyListeners:a}}var Oge=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ige(e,t){t(window.confirm(e))}function VNe(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")!==-1||e.indexOf("Android 4.0")!==-1)&&e.indexOf("Mobile Safari")!==-1&&e.indexOf("Chrome")===-1&&e.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function qNe(){return window.navigator.userAgent.indexOf("Trident")===-1}function jNe(){return window.navigator.userAgent.indexOf("Firefox")===-1}function $Ne(e){return e.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var sZ="popstate",lZ="hashchange";function cZ(){try{return window.history.state||{}}catch{return{}}}function kge(e){e===void 0&&(e={}),Oge||Eh();var t=window.history,r=VNe(),n=!qNe(),i=e,a=i.forceRefresh,o=a===void 0?!1:a,s=i.getUserConfirmation,l=s===void 0?Ige:s,c=i.keyLength,d=c===void 0?6:c,f=e.basename?Rge(iS(e.basename)):"";function h(fe){var de=fe||{},ge=de.key,Ae=de.state,Fe=window.location,Pe=Fe.pathname,ce=Fe.search,pe=Fe.hash,Ne=Pe+ce+pe;return f&&(Ne=Pge(Ne,f)),il(Ne,Ae,ge)}function p(){return Math.random().toString(36).substr(2,d)}var g=_q();function _(fe){ve(le,fe),le.length=t.length,g.notifyListeners(le.location,le.action)}function b(fe){$Ne(fe)||P(h(fe.state))}function E(){P(h(cZ()))}var S=!1;function P(fe){if(S)S=!1,_();else{var de="POP";g.confirmTransitionTo(fe,de,l,function(ge){ge?_({action:de,location:fe}):O(fe)})}}function O(fe){var de=le.location,ge=N.indexOf(de.key);ge===-1&&(ge=0);var Ae=N.indexOf(fe.key);Ae===-1&&(Ae=0);var Fe=ge-Ae;Fe&&(S=!0,V(Fe))}var I=h(cZ()),N=[I.key];function M(fe){return f+Cl(fe)}function F(fe,de){var ge="PUSH",Ae=il(fe,de,p(),le.location);g.confirmTransitionTo(Ae,ge,l,function(Fe){if(Fe){var Pe=M(Ae),ce=Ae.key,pe=Ae.state;if(r)if(t.pushState({key:ce,state:pe},null,Pe),o)window.location.href=Pe;else{var Ne=N.indexOf(le.location.key),De=N.slice(0,Ne+1);De.push(Ae.key),N=De,_({action:ge,location:Ae})}else window.location.href=Pe}})}function B(fe,de){var ge="REPLACE",Ae=il(fe,de,p(),le.location);g.confirmTransitionTo(Ae,ge,l,function(Fe){if(Fe){var Pe=M(Ae),ce=Ae.key,pe=Ae.state;if(r)if(t.replaceState({key:ce,state:pe},null,Pe),o)window.location.replace(Pe);else{var Ne=N.indexOf(le.location.key);Ne!==-1&&(N[Ne]=Ae.key),_({action:ge,location:Ae})}else window.location.replace(Pe)}})}function V(fe){t.go(fe)}function W(){V(-1)}function $(){V(1)}var X=0;function re(fe){X+=fe,X===1&&fe===1?(window.addEventListener(sZ,b),n&&window.addEventListener(lZ,E)):X===0&&(window.removeEventListener(sZ,b),n&&window.removeEventListener(lZ,E))}var ae=!1;function Q(fe){fe===void 0&&(fe=!1);var de=g.setPrompt(fe);return ae||(re(1),ae=!0),function(){return ae&&(ae=!1,re(-1)),de()}}function ie(fe){var de=g.appendListener(fe);return re(1),function(){re(-1),de()}}var le={length:t.length,action:"POP",location:I,createHref:M,push:F,replace:B,go:V,goBack:W,goForward:$,block:Q,listen:ie};return le}var uZ="hashchange",WNe={hashbang:{encodePath:function(t){return t.charAt(0)==="!"?t:"!/"+oZ(t)},decodePath:function(t){return t.charAt(0)==="!"?t.substr(1):t}},noslash:{encodePath:oZ,decodePath:iS},slash:{encodePath:iS,decodePath:iS}};function Nge(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function db(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)}function GNe(e){window.location.hash=e}function aN(e){window.location.replace(Nge(window.location.href)+"#"+e)}function KNe(e){e===void 0&&(e={}),Oge||Eh();var t=window.history;jNe();var r=e,n=r.getUserConfirmation,i=n===void 0?Ige:n,a=r.hashType,o=a===void 0?"slash":a,s=e.basename?Rge(iS(e.basename)):"",l=WNe[o],c=l.encodePath,d=l.decodePath;function f(){var de=d(db());return s&&(de=Pge(de,s)),il(de)}var h=_q();function p(de){ve(fe,de),fe.length=t.length,h.notifyListeners(fe.location,fe.action)}var g=!1,_=null;function b(de,ge){return de.pathname===ge.pathname&&de.search===ge.search&&de.hash===ge.hash}function E(){var de=db(),ge=c(de);if(de!==ge)aN(ge);else{var Ae=f(),Fe=fe.location;if(!g&&b(Fe,Ae)||_===Cl(Ae))return;_=null,S(Ae)}}function S(de){if(g)g=!1,p();else{var ge="POP";
4h.confirmTransitionTo(de,ge,i,function(Ae){Ae?p({action:ge,location:de}):P(de)})}}function P(de){var ge=fe.location,Ae=M.lastIndexOf(Cl(ge));Ae===-1&&(Ae=0);var Fe=M.lastIndexOf(Cl(de));Fe===-1&&(Fe=0);var Pe=Ae-Fe;Pe&&(g=!0,W(Pe))}var O=db(),I=c(O);O!==I&&aN(I);var N=f(),M=[Cl(N)];function F(de){var ge=document.querySelector("base"),Ae="";return ge&&ge.getAttribute("href")&&(Ae=Nge(window.location.href)),Ae+"#"+c(s+Cl(de))}function B(de,ge){var Ae="PUSH",Fe=il(de,void 0,void 0,fe.location);h.confirmTransitionTo(Fe,Ae,i,function(Pe){if(Pe){var ce=Cl(Fe),pe=c(s+ce),Ne=db()!==pe;if(Ne){_=ce,GNe(pe);var De=M.lastIndexOf(Cl(fe.location)),Ve=M.slice(0,De+1);Ve.push(ce),M=Ve,p({action:Ae,location:Fe})}else p()}})}function V(de,ge){var Ae="REPLACE",Fe=il(de,void 0,void 0,fe.location);h.confirmTransitionTo(Fe,Ae,i,function(Pe){if(Pe){var ce=Cl(Fe),pe=c(s+ce),Ne=db()!==pe;Ne&&(_=ce,aN(pe));var De=M.indexOf(Cl(fe.location));De!==-1&&(M[De]=ce),p({action:Ae,location:Fe})}})}function W(de){t.go(de)}function $(){W(-1)}function X(){W(1)}var re=0;function ae(de){re+=de,re===1&&de===1?window.addEventListener(uZ,E):re===0&&window.removeEventListener(uZ,E)}var Q=!1;function ie(de){de===void 0&&(de=!1);var ge=h.setPrompt(de);return Q||(ae(1),Q=!0),function(){return Q&&(Q=!1,ae(-1)),ge()}}function le(de){var ge=h.appendListener(de);return ae(1),function(){ae(-1),ge()}}var fe={length:t.length,action:"POP",location:N,createHref:F,push:B,replace:V,go:W,goBack:$,goForward:X,block:ie,listen:le};return fe}function dZ(e,t,r){return Math.min(Math.max(e,t),r)}function YNe(e){e===void 0&&(e={});var t=e,r=t.getUserConfirmation,n=t.initialEntries,i=n===void 0?["/"]:n,a=t.initialIndex,o=a===void 0?0:a,s=t.keyLength,l=s===void 0?6:s,c=_q();function d(F){ve(M,F),M.length=M.entries.length,c.notifyListeners(M.location,M.action)}function f(){return Math.random().toString(36).substr(2,l)}var h=dZ(o,0,i.length-1),p=i.map(function(F){return typeof F=="string"?il(F,void 0,f()):il(F,void 0,F.key||f())}),g=Cl;function _(F,B){var V="PUSH",W=il(F,B,f(),M.location);c.confirmTransitionTo(W,V,r,function($){if($){var X=M.index,re=X+1,ae=M.entries.slice(0);ae.length>re?ae.splice(re,ae.length-re,W):ae.push(W),d({action:V,location:W,index:re,entries:ae})}})}function b(F,B){var V="REPLACE",W=il(F,B,f(),M.location);c.confirmTransitionTo(W,V,r,function($){$&&(M.entries[M.index]=W,d({action:V,location:W}))})}function E(F){var B=dZ(M.index+F,0,M.entries.length-1),V="POP",W=M.entries[B];c.confirmTransitionTo(W,V,r,function($){$?d({action:V,location:W,index:B}):d()})}function S(){E(-1)}function P(){E(1)}function O(F){var B=M.index+F;return B>=0&&B<M.entries.length}function I(F){return F===void 0&&(F=!1),c.setPrompt(F)}function N(F){return c.appendListener(F)}var M={length:p.length,action:"POP",location:p[h],index:h,entries:p,createHref:g,push:_,replace:b,go:E,goBack:S,goForward:P,canGo:O,block:I,listen:N};return M}const ac=kge(),qr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$i=globalThis,Hv="9.47.1";function Gg(){return u3($i),$i}function u3(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Hv,t[Hv]=t[Hv]||{}}function ux(e,t,r=$i){const n=r.__SENTRY__=r.__SENTRY__||{},i=n[Hv]=n[Hv]||{};return i[e]||(i[e]=t())}const XNe=["debug","info","warn","error","log","assert","trace"],ZNe="Sentry Logger ",xR={};function Z1(e){if(!("console"in $i))return e();const t=$i.console,r={},n=Object.keys(xR);n.forEach(i=>{const a=xR[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function QNe(){Eq().enabled=!0}function JNe(){Eq().enabled=!1}function Dge(){return Eq().enabled}function eDe(...e){bq("log",...e)}function tDe(...e){bq("warn",...e)}function rDe(...e){bq("error",...e)}function bq(e,...t){qr&&Dge()&&Z1(()=>{$i.console[e](`${ZNe}[${e}]:`,...t)})}function Eq(){return qr?ux("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const br={enable:QNe,disable:JNe,isEnabled:Dge,log:eDe,warn:tDe,error:rDe},Mge=50,og="?",fZ=/\(error: (.*)\)/,hZ=/captureMessage|captureException/;function Lge(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{const a=[],o=r.split(`
5`);for(let s=n;s<o.length;s++){const l=o[s];if(l.length>1024)continue;const c=fZ.test(l)?l.replace(fZ,"$1"):l;if(!c.match(/\S*Error: /)){for(const d of t){const f=d(c);if(f){a.push(f);break}}if(a.length>=Mge+i)break}}return iDe(a.slice(i))}}function nDe(e){return Array.isArray(e)?Lge(...e):e}function iDe(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(_T(t).function||"")&&t.pop(),t.reverse(),hZ.test(_T(t).function||"")&&(t.pop(),hZ.test(_T(t).function||"")&&t.pop()),t.slice(0,Mge).map(r=>({...r,filename:r.filename||_T(t).filename,function:r.function||og}))}function _T(e){return e[e.length-1]||{}}const oN="<anonymous>";function th(e){try{return!e||typeof e!="function"?oN:e.name||oN}catch{return oN}}function pZ(e){const t=e.exception;if(t){const r=[];
5try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const _P={},mZ={};function vm(e,t){_P[e]=_P[e]||[],_P[e].push(t)}function gm(e,t){if(!mZ[e]){mZ[e]=!0;try{t()}catch(r){qr&&br.error(`Error while instrumenting ${e}`,r)}}}function zc(e,t){const r=e&&_P[e];if(r)for(const n of r)try{n(t)}catch(i){qr&&br.error(`Error while triggering instrumentation handler.
6Type: ${e}
7Name: ${th(n)}
8Error:`,i)}}let sN=null;function Fge(e){const t="error";vm(t,e),gm(t,aDe)}function aDe(){sN=$i.onerror,$i.onerror=function(e,t,r,n,i){return zc("error",{column:n,error:i,line:r,msg:e,url:t}),sN?sN.apply(this,arguments):!1},$i.onerror.__SENTRY_INSTRUMENTED__=!0}let lN=null;function Bge(e){const t="unhandledrejection";vm(t,e),gm(t,oDe)}function oDe(){lN=$i.onunhandledrejection,$i.onunhandledrejection=function(e){return zc("unhandledrejection",e),lN?lN.apply(this,arguments):!0},$i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const zge=Object.prototype.toString;function d3(e){switch(zge.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return rh(e,Error)}}function Q1(e,t){return zge.call(e)===`[object ${t}]`}function Hge(e){return Q1(e,"ErrorEvent")}function vZ(e){return Q1(e,"DOMError")}function sDe(e){return Q1(e,"DOMException")}function zf(e){return Q1(e,"String")}function wq(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function US(e){return e===null||wq(e)||typeof e!="object"&&typeof e!="function"}function VS(e){return Q1(e,"Object")}function f3(e){return typeof Event<"u"&&rh(e,Event)}function lDe(e){return typeof Element<"u"&&rh(e,Element)}function cDe(e){return Q1(e,"RegExp")}function dx(e){return!!(e?.then&&typeof e.then=="function")}function uDe(e){return VS(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function rh(e,t){try{return e instanceof t}catch{return!1}}function Uge(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Vge(e){return typeof Request<"u"&&rh(e,Request)}const Sq=$i,dDe=80;function Dd(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,o=0;const s=" > ",l=s.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||dDe;for(;r&&a++<n&&(c=fDe(r,d),!(c==="html"||a>1&&o+i.length*l+c.length>=f));)i.push(c),o+=c.length,r=r.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function fDe(e,t){const r=e,n=[];if(!r?.tagName)return"";if(Sq.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const i=t?.length?t.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const o=r.className;if(o&&zf(o)){const s=o.split(/\s+/);for(const l of s)n.push(`.${l}`)}}const a=["aria-label","type","name","title","alt"];for(const o of a){const s=r.getAttribute(o);s&&n.push(`[${o}="${s}"]`)}return n.join("")}function fx(){try{return Sq.document.location.href}catch{return""}}function qge(e){if(!Sq.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function TR(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function gZ(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{Uge(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function hDe(e,t,r=!1){return zf(e)?cDe(t)?t.test(e):zf(t)?r?e===t:e.includes(t):!1:!1}function Fp(e,t=[],r=!1){return t.some(n=>hDe(e,n,r))}function oc(e,t,r){if(!(t in e))return;const n=e[t];if(typeof n!="function")return;const i=r(n);typeof i=="function"&&jge(i,n);try{e[t]=i}catch{qr&&br.log(`Failed to replace method "${t}" in object`,e)}}function dc(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{qr&&br.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function jge(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,dc(e,"__sentry_original__",t)}catch{}}function Cq(e){return e.__sentry_original__}function $ge(e){if(d3(e))return{message:e.message,name:e.name,stack:e.stack,..._Z(e)};if(f3(e)){const t={type:e.type,target:yZ(e.target),currentTarget:yZ(e.currentTarget),..._Z(e)};return typeof CustomEvent<"u"&&rh(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function yZ(e){try{return lDe(e)?Dd(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function _Z(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function pDe(e,t=40){const r=Object.keys($ge(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return TR(n,t);for(let i=r.length;i>0;i--){const a=r.slice(0,i).join(", ");
8if(!(a.length>t))return i===r.length?a:TR(a,t)}return""}function mDe(){const e=$i;return e.crypto||e.msCrypto}function Hc(e=mDe()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(t()&15)>>r/4).toString(16))}function Wge(e){return e.exception?.values?.[0]}function Tv(e){const{message:t,event_id:r}=e;if(t)return t;const n=Wge(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function jB(e,t,r){const n=e.exception=e.exception||{},i=n.values=n.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function n1(e,t){const r=Wge(e);if(!r)return;const n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...t},t&&"data"in t){const a={...i?.data,...t.data};r.mechanism.data=a}}function bZ(e){if(vDe(e))return!0;try{dc(e,"__sentry_captured__",!0)}catch{}return!1}function vDe(e){try{return e.__sentry_captured__}catch{}}const Gge=1e3;function Kg(){return Date.now()/Gge}function gDe(){const{performance:e}=$i;if(!e?.now||!e.timeOrigin)return Kg;const t=e.timeOrigin;return()=>(t+e.now())/Gge}let EZ;function fs(){return(EZ??(EZ=gDe()))()}let cN;function yDe(){const{performance:e}=$i;if(!e?.now)return[void 0,"none"];const t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,a=i<t,o=e.timing?.navigationStart,l=typeof o=="number"?Math.abs(o+r-n):t,c=l<t;return a||c?i<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[n,"dateNow"]}function Ml(){return cN||(cN=yDe()),cN[0]}function _De(e){const t=fs(),r={sid:Hc(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>EDe(r)};return e&&i1(r,e),r}function i1(e,t={}){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||fs(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Hc()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function bDe(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),i1(e,r)}function EDe(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function hx(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;const n={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=hx(n[i],t[i],r-1));return n}function Gp(){return Hc()}function px(){return Hc().substring(16)}const $B="_sentrySpan";function a1(e,t){t?dc(e,$B,t):delete e[$B]}function AR(e){return e[$B]}const wDe=100;class Md{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gp(),sampleRand:Math.random()}}clone(){const t=new Md;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,a1(t,AR(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&i1(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,n=r instanceof Md?r.getScopeData():VS(r)?t:void 0,{tags:i,extra:a,user:o,contexts:s,level:l,fingerprint:c=[],propagationContext:d}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),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._session=void 0,a1(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gp(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:wDe;if(n<=0)return this;const i={timestamp:Kg(),...t,message:t.message?TR(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:AR(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=hx(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r?.event_id||Hc();if(!this._client)return qr&&br.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},this),n}captureMessage(t,r,n){const i=n?.event_id||Hc();if(!this._client)return qr&&br.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},this),i}captureEvent(t,r){const n=r?.event_id||Hc();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(qr&&br.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
8h(t=>{t(this)}),this._notifyingListeners=!1)}}function SDe(){return ux("defaultCurrentScope",()=>new Md)}function CDe(){return ux("defaultIsolationScope",()=>new Md)}class xDe{constructor(t,r){let n;t?n=t:n=new Md;let i;r?i=r:i=new Md,this._stack=[{scope:n}],this._isolationScope=i}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(i){throw this._popScope(),i}return dx(n)?n.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function o1(){const e=Gg(),t=u3(e);return t.stack=t.stack||new xDe(SDe(),CDe())}function TDe(e){return o1().withScope(e)}function ADe(e,t){const r=o1();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function wZ(e){return o1().withScope(()=>e(o1().getIsolationScope()))}function PDe(){return{withIsolationScope:wZ,withScope:TDe,withSetScope:ADe,withSetIsolationScope:(e,t)=>wZ(t),getCurrentScope:()=>o1().getScope(),getIsolationScope:()=>o1().getIsolationScope()}}function J1(e){const t=u3(e);return t.acs?t.acs:PDe()}function oa(){const e=Gg();return J1(e).getCurrentScope()}function Vd(){const e=Gg();return J1(e).getIsolationScope()}function RDe(){return ux("globalScope",()=>new Md)}function e_(...e){const t=Gg(),r=J1(t);if(e.length===2){const[n,i]=e;return n?r.withSetScope(n,i):r.withScope(i)}return r.withScope(e[0])}function Hi(){return oa().getClient()}function ODe(e){const t=e.getPropagationContext(),{traceId:r,parentSpanId:n,propagationSpanId:i}=t,a={trace_id:r,span_id:i||px()};return n&&(a.parent_span_id=n),a}const Mc="sentry.source",xq="sentry.sample_rate",Kge="sentry.previous_trace_sample_rate",Du="sentry.op",so="sentry.origin",PR="sentry.idle_span_finish_reason",mx="sentry.measurement_unit",vx="sentry.measurement_value",SZ="sentry.custom_span_name",Tq="sentry.profile_id",t_="sentry.exclusive_time",IDe="sentry.link.type",kDe=0,Yge=1,Do=2;function NDe(e){if(e<400&&e>=100)return{code:Yge};if(e>=400&&e<500)switch(e){case 401:return{code:Do,message:"unauthenticated"};case 403:return{code:Do,message:"permission_denied"};case 404:return{code:Do,message:"not_found"};case 409:return{code:Do,message:"already_exists"};case 413:return{code:Do,message:"failed_precondition"};case 429:return{code:Do,message:"resource_exhausted"};case 499:return{code:Do,message:"cancelled"};default:return{code:Do,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Do,message:"unimplemented"};case 503:return{code:Do,message:"unavailable"};case 504:return{code:Do,message:"deadline_exceeded"};default:return{code:Do,message:"internal_error"}}return{code:Do,message:"unknown_error"}}function Xge(e,t){e.setAttribute("http.response.status_code",t);const r=NDe(t);r.message!=="unknown_error"&&e.setStatus(r)}const Zge="_sentryScope",Qge="_sentryIsolationScope";function DDe(e,t,r){e&&(dc(e,Qge,r),dc(e,Zge,t))}function RR(e){return{scope:e[Zge],isolationScope:e[Qge]}}const Aq="sentry-",MDe=/^sentry-/,LDe=8192;function Jge(e){const t=BDe(e);if(!t)return;const r=Object.entries(t).reduce((n,[i,a])=>{if(i.match(MDe)){const o=i.slice(Aq.length);n[o]=a}return n},{});if(Object.keys(r).length>0)return r}function FDe(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,i])=>(i&&(r[`${Aq}${n}`]=i),r),{});return zDe(t)}function BDe(e){if(!(!e||!zf(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=CZ(r);return Object.entries(n).forEach(([i,a])=>{t[i]=a}),t},{}):CZ(e)}function CZ(e){return e.split(",").map(t=>t.split("=").map(r=>{try{return decodeURIComponent(r.trim())}catch{return}})).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function zDe(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],i)=>{const a=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,o=i===0?a:`${t},${a}`;return o.length>LDe?(qr&&br.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):o},"")}function qS(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const e0e=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function HDe(e){if(!e)return;const t=e.match(e0e);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function UDe(e,t){const r=HDe(e),n=Jge(t);if(!r?.traceId)return{traceId:Gp(),sampleRand:Math.random()};const i=VDe(r,n);n&&(n.sample_rand=i.toString());const{traceId:a,parentSpanId:o,parentSampled:s}=r;return{traceId:a,parentSpanId:o,sampled:s,dsc:n||{},sampleRand:i}}function t0e(e=Gp(),t=px(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function VDe(e,t){const r=qS(t?.sample_rand);if(r!==void 0)return r;const n=qS(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*n:n+Math.random()*(1-n):Math.random()}const r0e=0,Pq=1;let xZ=!1;function qDe(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:o,origin:s,links:l}=Bi(e);return{parent_span_id:a,span_id:t,trace_id:r,data:n,op:i,status:o,origin:s,links:l}}function jDe(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),i=n?t:Bi(e).parent_span_id,a=RR(e).scope,o=n?a?.getPropagationContext().propagationSpanId||px():t;return{parent_span_id:i,span_id:o,trace_id:r}}function $De(e){const{traceId:t,spanId:r}=e.spanContext(),n=Yg(e);return t0e(t,r,n)}function n0e(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:n,...i},attributes:a})=>({span_id:t,trace_id:r,sampled:n===Pq,attributes:a,...i}))}function Uv(e){return typeof e=="number"?TZ(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?TZ(e.getTime()):fs()}function TZ(e){return e>9999999999?e/1e3:e}function Bi(e){if(GDe(e))return e.getSpanJSON();const{spanId:t,traceId:r}=e.spanContext();if(WDe(e)){const{attributes:n,startTime:i,name:a,endTime:o,status:s,links:l}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:r,data:n,description:a,parent_span_id:c,start_timestamp:Uv(i),timestamp:Uv(o)||void 0,status:i0e(s),op:n[Du],origin:n[so],links:n0e(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function WDe(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function GDe(e){return typeof e.getSpanJSON=="function"}function Yg(e){const{traceFlags:t}=e.spanContext();return t===Pq}function i0e(e){if(!(!e||e.code===kDe))return e.code===Yge?"ok":e.message||"unknown_error"}const Vv="_sentryChildSpans",WB="_sentryRootSpan";function a0e(e,t){const r=e[WB]||e;dc(t,WB,r),e[Vv]?e[Vv].add(t):dc(e,Vv,new Set([t]))}function KDe(e,t){e[Vv]&&e[Vv].delete(t)}function bP(e){const t=new Set;function r(n){if(!t.has(n)&&Yg(n)){t.add(n);const i=n[Vv]?Array.from(n[Vv]):[];for(const a of i)r(a)}}return r(e),Array.from(t)}function ol(e){return e[WB]||e}function hc(){const e=Gg(),t=J1(e);return t.getActiveSpan?t.getActiveSpan():AR(oa())}function GB(){xZ||(Z1(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),xZ=!0)}let AZ=!1;function YDe(){if(AZ)return;function e(){const t=hc(),r=t&&ol(t);if(r){const n="internal_error";qr&&br.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:Do,message:n})}}e.tag="sentry_tracingErrorCallback",AZ=!0,Fge(e),Bge(e)}function Kp(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Hi()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const Rq="production",XDe=/^o(\d+)\./,ZDe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function QDe(e){return e==="http"||e==="https"}function r_(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${o}`}
8function JDe(e){const t=ZDe.exec(e);if(!t){Z1(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a="",o="",s=""]=t.slice(1);let l="",c=s;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const f=c.match(/^\d+/);f&&(c=f[0])}return o0e({host:a,pass:i,path:l,projectId:c,port:o,protocol:r,publicKey:n})}function o0e(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function e6e(e){if(!qr)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(br.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:r.match(/^\d+$/)?QDe(n)?t&&isNaN(parseInt(t,10))?(br.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(br.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(br.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function t6e(e){return e.match(XDe)?.[1]}function s0e(e){const t=typeof e=="string"?JDe(e):o0e(e);if(!(!t||!e6e(t)))return t}const l0e="_frozenDsc";function EP(e,t){dc(e,l0e,t)}function c0e(e,t){const r=t.getOptions(),{publicKey:n,host:i}=t.getDsn()||{};let a;r.orgId?a=String(r.orgId):i&&(a=t6e(i));const o={environment:r.environment||Rq,release:r.release,public_key:n,trace_id:e,org_id:a};return t.emit("createDsc",o),o}function u0e(e,t){const r=t.getPropagationContext();return r.dsc||c0e(r.traceId,e)}function Yp(e){const t=Hi();if(!t)return{};const r=ol(e),n=Bi(r),i=n.data,a=r.spanContext().traceState,o=a?.get("sentry.sample_rate")??i[xq]??i[Kge];function s(g){return(typeof o=="number"||typeof o=="string")&&(g.sample_rate=`${o}`),g}const l=r[l0e];if(l)return s(l);const c=a?.get("sentry.dsc"),d=c&&Jge(c);if(d)return s(d);const f=c0e(e.spanContext().traceId,t),h=i[Mc],p=n.description;return h!=="url"&&p&&(f.transaction=p),Kp()&&(f.sampled=String(Yg(r)),f.sample_rand=a?.get("sentry.sample_rand")??RR(r).scope?.getPropagationContext().sampleRand.toString()),s(f),t.emit("createDsc",f,r),f}class Xp{constructor(t={}){this._traceId=t.traceId||Gp(),this._spanId=t.spanId||px()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:r0e}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}}function Cf(e,t=100,r=1/0){try{return KB("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function d0e(e,t=3,r=100*1024){const n=Cf(e,t);return a6e(n)>r?d0e(e,t-1,r):n}function KB(e,t,r=1/0,n=1/0,i=o6e()){const[a,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=r6e(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(l===0)return s.replace("object ","");if(a(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const p=c.toJSON();return KB("",p,l-1,n,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const h=$ge(t);for(const p in h){if(!Object.prototype.hasOwnProperty.call(h,p))continue;if(f>=n){d[p]="[MaxProperties ~]";break}const g=h[p];d[p]=KB(p,g,l-1,n,i),f++}return o(t),d}function r6e(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof globalThis<"u"&&t===globalThis)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Uge(t))return"[VueViewModel]";if(uDe(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${th(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=n6e(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function n6e(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function i6e(e){return~-encodeURI(e).split(/%..|./).length}function a6e(e){return i6e(JSON.stringify(e))}function o6e(){const e=new WeakSet;function t(n){return e.has(n)?!0:(e.add(n),!1)}function r(n){e.delete(n)}return[t,r]}function n_(e,t=[]){return[e,t]}function s6e(e,t){const[r,n]=e;return[r,[...n,t]]}function PZ(e,t){const r=e[1];for(const n of r){const i=n[0].type;if(t(n,i))return!0}return!1}function YB(e){const t=u3($i);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function l6e(e){const[t,r]=e;let n=JSON.stringify(t);
8function i(a){typeof n=="string"?n=typeof a=="string"?n+a:[YB(n),a]:n.push(typeof a=="string"?YB(a):a)}for(const a of r){const[o,s]=a;if(i(`
9${JSON.stringify(o)}
10`),typeof s=="string"||s instanceof Uint8Array)i(s);else{let l;try{l=JSON.stringify(s)}catch{l=JSON.stringify(Cf(s))}i(l)}}return typeof n=="string"?n:c6e(n)}function c6e(e){const t=e.reduce((i,a)=>i+a.length,0),r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return r}function u6e(e){return[{type:"span"},e]}function d6e(e){const t=typeof e.data=="string"?YB(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const f6e={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function RZ(e){return f6e[e]}function f0e(e){if(!e?.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function h6e(e,t,r,n){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:r_(n)},...i&&{trace:i}}}function p6e(e,t){return 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}function m6e(e,t,r,n){const i=f0e(r),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:r_(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return n_(a,[o])}function v6e(e,t,r,n){const i=f0e(r),a=e.type&&e.type!=="replay_event"?e.type:"event";p6e(e,r?.sdk);const o=h6e(e,i,n,t);return delete e.sdkProcessingMetadata,n_(o,[[{type:a},e]])}function g6e(e,t){function r(d){return!!d.trace_id&&!!d.public_key}const n=Yp(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...r(n)&&{trace:n},...!!a&&i&&{dsn:r_(i)}},s=t?.getOptions().beforeSendSpan,l=s?d=>{const f=Bi(d),h=s(f);return h||(GB(),f)}:Bi,c=[];for(const d of e){const f=l(d);f&&c.push(u6e(f))}return n_(o,c)}function y6e(e){if(!qr)return;const{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:n}=Bi(e),{spanId:i}=e.spanContext(),a=Yg(e),o=ol(e),s=o===e,l=`[Tracing] Starting ${a?"sampled":"unsampled"} ${s?"root ":""}span`,c=[`op: ${r}`,`name: ${t}`,`ID: ${i}`];if(n&&c.push(`parent ID: ${n}`),!s){const{op:d,description:f}=Bi(o);c.push(`root ID: ${o.spanContext().spanId}`),d&&c.push(`root op: ${d}`),f&&c.push(`root description: ${f}`)}br.log(`${l}
11  ${c.join(`
12  `)}`)}function _6e(e){if(!qr)return;const{description:t="< unknown name >",op:r="< unknown op >"}=Bi(e),{spanId:n}=e.spanContext(),a=ol(e)===e,o=`[Tracing] Finishing "${r}" ${a?"root ":""}span "${t}" with ID ${n}`;br.log(o)}function b6e(e,t,r,n=hc()){const i=n&&ol(n);i&&(qr&&br.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),i.addEvent(e,{[vx]:t,[mx]:r}))}function OZ(e){if(!e||e.length===0)return;const t={};return e.forEach(r=>{const n=r.attributes||{},i=n[mx],a=n[vx];typeof i=="string"&&typeof a=="number"&&(t[r.name]={value:a,unit:i})}),t}const IZ=1e3;class h3{constructor(t={}){this._traceId=t.traceId||Gp(),this._spanId=t.spanId||px(),this._startTime=t.startTimestamp||fs(),this._links=t.links,this._attributes={},this.setAttributes({[so]:"manual",[Du]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){const{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Pq:r0e}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=Uv(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Mc,"custom"),this}end(t){this._endTime||(this._endTime=Uv(t),_6e(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Du],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:i0e(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[so],profile_id:this._attributes[Tq],exclusive_time:this._attributes[t_],measurements:OZ(this._events),is_segment:this._isStandaloneSpan&&ol(this)===this||void 0,segment_id:this._isStandaloneSpan?ol(this).spanContext().spanId:void 0,links:n0e(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){qr&&br.log("[Tracing] Adding an event to span:",t);const i=kZ(r)?r:n||fs(),a=kZ(r)?{}:r||{},o={name:t,time:Uv(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Hi();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===ol(this)))return;if(this._isStandaloneSpan){this._sampled?w6e(g6e([this],t)):(qr&&br.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const n=this._convertSpanToTransaction();n&&(RR(this).scope||oa()).captureEvent(n)}_convertSpanToTransaction(){if(!NZ(Bi(this)))return;this._name||(qr&&br.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:r}=RR(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const a=bP(this).filter(d=>d!==this&&!E6e(d)).map(d=>Bi(d)).filter(NZ),o=this._attributes[Mc];delete this._attributes[SZ],a.forEach(d=>{delete d.data[SZ]});const s={contexts:{trace:qDe(this)},spans:a.length>IZ?a.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,IZ):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:Yp(this)},request:n,...o&&{transaction_info:{source:o}}},l=OZ(this._events);return l&&Object.keys(l).length&&(qr&&br.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),s.measurements=l),s}}function kZ(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function NZ(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function E6e(e){return e instanceof h3&&e.isStandaloneSpan()}function w6e(e){const t=Hi();if(!t)return;const r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function S6e(e,t,r=()=>{}){let n;try{n=e()}catch(i){throw t(i),r(),i}return C6e(n,t,r)}function C6e(e,t,r){return dx(e)?e.then(n=>(r(),n),n=>{throw t(n),r(),n}):(r(),e)}function x6e(e,t,r){if(!Kp(e))return[!1];let n,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:s=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):s}),n=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,n=!0);const a=qS(i);if(a===void 0)return qr&&br.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return qr&&br.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,a,n];const o=r<a;return o||qr&&br.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,n]}const h0e="__SENTRY_SUPPRESS_TRACING__";function T6e(e,t){const r=Iq();if(r.startSpan)return r.startSpan(e,t);const n=m0e(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return e_(s,()=>P6e(a)(()=>{const c=oa(),d=v0e(c,a),h=e.onlyIfParent&&!d?new Xp:p0e({parentSpan:d,spanArguments:n,forceTransaction:i,scope:c});return a1(c,h),S6e(()=>t(h),()=>{const{status:p}=Bi(h);h.isRecording()&&(!p||p==="ok")&&h.setStatus({code:Do,message:"internal_error"})},()=>{h.end()})}))}function i_(e){const t=Iq();if(t.startInactiveSpan)return t.startInactiveSpan(e);const r=m0e(e),{forceTransaction:n,parentSpan:i}=e;return(e.scope?o=>e_(e.scope,o):i!==void 0?o=>Oq(i,o):o=>o())(()=>{const o=oa(),s=v0e(o,i);return e.onlyIfParent&&!s?new Xp:p0e({parentSpan:s,spanArguments:r,forceTransaction:n,scope:o})})}function Oq(e,t){const r=Iq();
12return r.withActiveSpan?r.withActiveSpan(e,t):e_(n=>(a1(n,e||void 0),t(n)))}function p0e({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!Kp()){const o=new Xp;if(r||!e){const s={sampled:"false",sample_rate:"0",transaction:t.name,...Yp(o)};EP(o,s)}return o}const i=Vd();let a;if(e&&!r)a=A6e(e,n,t),a0e(e,a);else if(e){const o=Yp(e),{traceId:s,spanId:l}=e.spanContext(),c=Yg(e);a=DZ({traceId:s,parentSpanId:l,...t},n,c),EP(a,o)}else{const{traceId:o,dsc:s,parentSpanId:l,sampled:c}={...i.getPropagationContext(),...n.getPropagationContext()};a=DZ({traceId:o,parentSpanId:l,...t},n,c),s&&EP(a,s)}return y6e(a),DDe(a,n,i),a}function m0e(e){const r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...r};return n.startTimestamp=Uv(e.startTime),delete n.startTime,n}return r}function Iq(){const e=Gg();return J1(e)}function DZ(e,t,r){const n=Hi(),i=n?.getOptions()||{},{name:a=""}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:r};n?.emit("beforeSampling",o,{decision:!1});const s=o.parentSampled??r,l=o.spanAttributes,c=t.getPropagationContext(),[d,f,h]=t.getScopeData().sdkProcessingMetadata[h0e]?[!1]:x6e(i,{name:a,parentSampled:s,attributes:l,parentSampleRate:qS(c.dsc?.sample_rate)},c.sampleRand),p=new h3({...e,attributes:{[Mc]:"custom",[xq]:f!==void 0&&h?f:void 0,...l},sampled:d});return!d&&n&&(qr&&br.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate","transaction")),n&&n.emit("spanStart",p),p}function A6e(e,t,r){const{spanId:n,traceId:i}=e.spanContext(),a=t.getScopeData().sdkProcessingMetadata[h0e]?!1:Yg(e),o=a?new h3({...r,parentSpanId:n,traceId:i,sampled:a}):new Xp({traceId:i});a0e(e,o);const s=Hi();return s&&(s.emit("spanStart",o),r.endTimestamp&&s.emit("spanEnd",o)),o}function v0e(e,t){if(t)return t;if(t===null)return;const r=AR(e);if(!r)return;const n=Hi();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ol(r):r}function P6e(e){return e!==void 0?t=>Oq(e,t):t=>t()}const wP={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},R6e="heartbeatFailed",O6e="idleTimeout",I6e="finalTimeout",k6e="externalFinish";function g0e(e,t={}){const r=new Map;let n=!1,i,a=k6e,o=!t.disableAutoFinish;const s=[],{idleTimeout:l=wP.idleTimeout,finalTimeout:c=wP.finalTimeout,childSpanTimeout:d=wP.childSpanTimeout,beforeSpanEnd:f}=t,h=Hi();if(!h||!Kp()){const N=new Xp,M={sample_rate:"0",sampled:"false",...Yp(N)};return EP(N,M),N}const p=oa(),g=hc(),_=N6e(e);_.end=new Proxy(_.end,{apply(N,M,F){if(f&&f(_),M instanceof Xp)return;const[B,...V]=F,W=B||fs(),$=Uv(W),X=bP(_).filter(le=>le!==_);if(!X.length)return I($),Reflect.apply(N,M,[$,...V]);const re=X.map(le=>Bi(le).timestamp).filter(le=>!!le),ae=re.length?Math.max(...re):void 0,Q=Bi(_).start_timestamp,ie=Math.min(Q?Q+c/1e3:1/0,Math.max(Q||-1/0,Math.min($,ae||1/0)));return I(ie),Reflect.apply(N,M,[ie,...V])}});function b(){i&&(clearTimeout(i),i=void 0)}function E(N){b(),i=setTimeout(()=>{!n&&r.size===0&&o&&(a=O6e,_.end(N))},l)}function S(N){i=setTimeout(()=>{!n&&o&&(a=R6e,_.end(N))},d)}function P(N){b(),r.set(N,!0);const M=fs();S(M+d/1e3)}function O(N){if(r.has(N)&&r.delete(N),r.size===0){const M=fs();E(M+l/1e3)}}function I(N){n=!0,r.clear(),s.forEach($=>$()),a1(p,g);const M=Bi(_),{start_timestamp:F}=M;if(!F)return;M.data[PR]||_.setAttribute(PR,a),br.log(`[Tracing] Idle span "${M.op}" finished`);const V=bP(_).filter($=>$!==_);let W=0;V.forEach($=>{$.isRecording()&&($.setStatus({code:Do,message:"cancelled"}),$.end(N),qr&&br.log("[Tracing] Cancelling span since span ended early",JSON.stringify($,void 0,2)));const X=Bi($),{timestamp:re=0,start_timestamp:ae=0}=X,Q=ae<=N,ie=(c+l)/1e3,le=re-ae<=ie;if(qr){const fe=JSON.stringify($,void 0,2);Q?le||br.log("[Tracing] Discarding span since it finished after idle span final timeout",fe):br.log("[Tracing] Discarding span since it happened after idle span was finished",fe)}(!le||!Q)&&(KDe(_,$),W++)}),W>0&&_.setAttribute("sentry.idle_span_discarded_spans",W)}return s.push(h.on("spanStart",N=>{if(n||N===_||Bi(N).timestamp||N instanceof h3&&N.isStandaloneSpan())return;bP(_).includes(N)&&P(N.spanContext().spanId)})),s.push(h.on("spanEnd",N=>{n||O(N.spanContext().spanId)})),s.push(h.on("idleSpanEnableAutoFinish",N=>{N===_&&(o=!0,E(),r.size&&S())})),t.disableAutoFinish||E(),setTimeout(()=>{n||(_.setStatus({code:Do,message:"deadline_exceeded"}),a=I6e,_.end())},c),_}function N6e(e){const t=i_(e);
12return a1(oa(),t),qr&&br.log("[Tracing] Started span is an idle span"),t}const uN=0,MZ=1,LZ=2;function sg(e){return new Zp(t=>{t(e)})}function OR(e){return new Zp((t,r)=>{r(e)})}class Zp{constructor(t){this._state=uN,this._handlers=[],this._runExecutor(t)}then(t,r){return new Zp((n,i)=>{this._handlers.push([!1,a=>{if(!t)n(a);else try{n(t(a))}catch(o){i(o)}},a=>{if(!r)i(a);else try{n(r(a))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new Zp((r,n)=>{let i,a;return this.then(o=>{a=!1,i=o,t&&t()},o=>{a=!0,i=o,t&&t()}).then(()=>{if(a){n(i);return}r(i)})})}_executeHandlers(){if(this._state===uN)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===MZ&&r[1](this._value),this._state===LZ&&r[2](this._value),r[0]=!0)})}_runExecutor(t){const r=(a,o)=>{if(this._state===uN){if(dx(o)){o.then(n,i);return}this._state=a,this._value=o,this._executeHandlers()}},n=a=>{r(MZ,a)},i=a=>{r(LZ,a)};try{t(n,i)}catch(a){i(a)}}}function XB(e,t,r,n=0){return new Zp((i,a)=>{const o=e[n];if(t===null||typeof o!="function")i(t);else{const s=o({...t},r);qr&&o.id&&s===null&&br.log(`Event processor "${o.id}" dropped event`),dx(s)?s.then(l=>XB(e,l,r,n+1).then(i)).then(null,a):XB(e,s,r,n+1).then(i).then(null,a)}})}function D6e(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;M6e(e,t),n&&B6e(e,n),z6e(e,r),L6e(e,i),F6e(e,a)}function FZ(e,t){const{extra:r,tags:n,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:f,propagationContext:h,transactionName:p,span:g}=t;bT(e,"extra",r),bT(e,"tags",n),bT(e,"user",i),bT(e,"contexts",a),e.sdkProcessingMetadata=hx(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function bT(e,t,r){e[t]=hx(e[t],r,1)}function M6e(e,t){const{extra:r,tags:n,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!=="transaction"&&(e.transaction=s)}function L6e(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function F6e(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function B6e(e,t){e.contexts={trace:jDe(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Yp(t),...e.sdkProcessingMetadata};const r=ol(t),n=Bi(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function z6e(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let ET,BZ,wT;function H6e(e){const t=$i._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return wT&&r.length===BZ||(BZ=r.length,wT=r.reduce((n,i)=>{ET||(ET={});const a=ET[i];if(a)n[a[0]]=a[1];else{const o=e(i);for(let s=o.length-1;s>=0;s--){const c=o[s]?.filename,d=t[i];if(c&&d){n[c]=d,ET[i]=[c,d];break}}}return n},{})),wT}function U6e(e,t,r,n,i,a){const{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||r.event_id||Hc(),timestamp:t.timestamp||Kg()},c=r.integrations||e.integrations.map(b=>b.name);V6e(l,e),$6e(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&q6e(l,e.stackParser);const d=G6e(n,r.captureContext);r.mechanism&&n1(l,r.mechanism);const f=i?i.getEventProcessors():[],h=RDe().getScopeData();if(a){const b=a.getScopeData();FZ(h,b)}if(d){const b=d.getScopeData();FZ(h,b)}const p=[...r.attachments||[],...h.attachments];p.length&&(r.attachments=p),D6e(l,h);const g=[...f,...h.eventProcessors];return XB(g,l,r).then(b=>(b&&j6e(b),typeof o=="number"&&o>0?W6e(b,o,s):b))}function V6e(e,t){const{environment:r,release:n,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||r||Rq,!e.release&&n&&(e.release=n),!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&(o.url=TR(o.url,a))}function q6e(e,t){const r=H6e(t);e.exception?.values?.forEach(n=>
12{n.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=r[i.filename])})})}function j6e(e){const t={};if(e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,i])=>{r.push({type:"sourcemap",code_file:n,debug_id:i})})}function $6e(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function W6e(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Cf(i.data,t,r)}}))},...e.user&&{user:Cf(e.user,t,r)},...e.contexts&&{contexts:Cf(e.contexts,t,r)},...e.extra&&{extra:Cf(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Cf(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>({...i,...i.data&&{data:Cf(i.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=Cf(e.contexts.flags,3,r)),n}function G6e(e,t){if(!t)return e;const r=e?e.clone():new Md;return r.update(t),r}function K6e(e){if(e)return Y6e(e)?{captureContext:e}:Z6e(e)?{captureContext:e}:e}function Y6e(e){return e instanceof Md||typeof e=="function"}const X6e=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Z6e(e){return Object.keys(e).some(t=>X6e.includes(t))}function y0e(e,t){return oa().captureException(e,K6e(t))}function _0e(e,t){return oa().captureEvent(e,t)}function Q6e(e,t){Vd().setContext(e,t)}function zZ(e){Vd().setUser(e)}function J6e(){return Vd().lastEventId()}function eMe(){const e=Hi();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function HZ(e){const t=Vd(),r=oa(),{userAgent:n}=$i.navigator||{},i=_De({user:r.getUser()||t.getUser(),...n&&{userAgent:n},...e}),a=t.getSession();return a?.status==="ok"&&i1(a,{status:"exited"}),b0e(),t.setSession(i),i}function b0e(){const e=Vd(),r=oa().getSession()||e.getSession();r&&bDe(r),E0e(),e.setSession()}function E0e(){const e=Vd(),t=Hi(),r=e.getSession();r&&t&&t.captureSession(r)}function UZ(e=!1){if(e){b0e();return}E0e()}const tMe="7";function w0e(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function rMe(e){return`${w0e(e)}${e.projectId}/envelope/`}function nMe(e,t){const r={sentry_version:tMe};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function iMe(e,t,r){return t||`${rMe(e)}?${nMe(e,r)}`}function aMe(e,t){const r=s0e(e);if(!r)return"";const n=`${w0e(r)}embed/error-page/`;let i=`dsn=${r_(r)}`;for(const a in t)if(a!=="dsn"&&a!=="onClose")if(a==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${n}?${i}`}const VZ=[];function oMe(e){const t={};return e.forEach(r=>{const{name:n}=r,i=t[n];i&&!i.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function sMe(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const i=r(t);n=Array.isArray(i)?i:[i]}else n=t;return oMe(n)}function lMe(e,t){const r={};return t.forEach(n=>{n&&S0e(e,n,r)}),r}function qZ(e,t){for(const r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function S0e(e,t,r){if(r[t.name]){qr&&br.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,VZ.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),VZ.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,a)=>n(i,a,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),i=Object.assign((a,o)=>n(a,o,e),{id:t.name});e.addEventProcessor(i)}qr&&br.log(`Integration installed: ${t.name}`)}function cMe(e,t,r){const n=[{type:"client_report"},{timestamp:Kg(),discarded_events:e}];return n_(t?{dsn:t}:{},[n])}function C0e(e){const t=[];e.message&&t.push(e.message);try{const r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function uMe(e){const{trace_id:t,parent_span_id:r,span_id:n,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:o?.[Tq],exclusive_time:o?.[t_],measurements:e.measurements,is_segment:!0}}function dMe(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Tq]:e.profile_id},...e.exclusive_time&&{[t_]:e.exclusive_time}}}},measurements:e.measurements}}const jZ="Not capturing exception because it's already been captured.",$Z="Discarded session because of missing or non-string release",x0e=Symbol.for("SentryInternalError"),T0e=Symbol.for("SentryDoNotSendEventError");function SP(e){return{message:e,[x0e]:!0}}function dN(e){return{message:e,[T0e]:!0}}function WZ(e){return!!e&&typeof e=="object"&&x0e in e}function GZ(e){return!!e&&typeof e=="object"&&T0e in e}class fMe{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=s0e(t.dsn):qr&&br.warn("No DSN provided, client will not send events."),this._dsn){const r=iMe(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}}captureException(t,r,n){const i=Hc();
12if(bZ(t))return qr&&br.log(jZ),i;const a={event_id:i,...r};return this._process(this.eventFromException(t,a).then(o=>this._captureEvent(o,a,n))),a.event_id}captureMessage(t,r,n,i){const a={event_id:Hc(),...n},o=wq(t)?t:String(t),s=US(t)?this.eventFromMessage(o,r,a):this.eventFromException(t,a);return this._process(s.then(l=>this._captureEvent(l,a,i))),a.event_id}captureEvent(t,r,n){const i=Hc();if(r?.originalException&&bZ(r.originalException))return qr&&br.log(jZ),i;const a={event_id:i,...r},o=t.sdkProcessingMetadata||{},s=o.capturedSpanScope,l=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,a,s||n,l)),a.event_id}captureSession(t){this.sendSession(t),i1(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(i=>n&&i))):sg(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];S0e(this,t,this._integrations),r||qZ(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=v6e(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of r.attachments||[])n=s6e(n,d6e(a));const i=this.sendEnvelope(n);i&&i.then(a=>
12this.emit("afterSendEvent",t,a),null)}sendSession(t){const{release:r,environment:n=Rq}=this._options;if("aggregates"in t){const a=t.attrs||{};if(!a.release&&!r){qr&&br.warn($Z);return}a.release=a.release||r,a.environment=a.environment||n,t.attrs=a}else{if(!t.release&&!r){qr&&br.warn($Z);return}t.release=t.release||r,t.environment=t.environment||n}this.emit("beforeSendSession",t);const i=m6e(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,r,n=1){if(this._options.sendClientReports){const i=`${t}:${r}`;qr&&br.log(`Recording outcome: "${i}"${n>1?` (${n} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+n}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const i=n.indexOf(r);i>-1&&n.splice(i,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(i=>i(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(qr&&br.error("Error while sending envelope:",r),r)):(qr&&br.error("Transport disabled"),sg({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=lMe(this,t),qZ(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",i=!1;const a=r.exception?.values;if(a){i=!0;for(const l of a)if(l.mechanism?.handled===!1){n=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&n)&&(i1(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Zp(r=>{let n=0;const i=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),r(!0)):(n+=i,t&&n>=t&&(clearInterval(a),r(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,i){const a=this.getOptions(),o=Object.keys(this._integrations);return!r.integrations&&o?.length&&(r.integrations=o),this.emit("preprocessEvent",t,r),t.type||i.setLastEventId(t.event_id||r.event_id),U6e(a,t,r,n,this,i).then(s=>{if(s===null)return s;this.emit("postprocessEvent",s,r),s.contexts={trace:ODe(n),...s.contexts};const l=u0e(this,n);return s.sdkProcessingMetadata={dynamicSamplingContext:l,...s.sdkProcessingMetadata},s})}_captureEvent(t,r={},n=oa(),i=Vd()){return qr&&ZB(t)&&br.log(`Captured error event \`${C0e(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,i).then(a=>a.event_id,a=>{qr&&(GZ(a)?br.log(a.message):WZ(a)?br.warn(a.message):br.warn(a))})}_processEvent(t,r,n,i){const a=this.getOptions(),{sampleRate:o}=a,s=A0e(t),l=ZB(t),c=t.type||"error",d=`before send for type \`${c}\``,f=typeof o>"u"?void 0:qS(o);if(l&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error"),OR(dN(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const h=c==="replay_event"?"replay":c;return this._prepareEvent(t,r,n,i).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",h),dN("An event processor returned `null`, will not send event.");if(r.data&&r.data.__sentry__===!0)return p;const _=pMe(this,a,p,r);return hMe(_,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",h),s){const E=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",E)}throw dN(`${d} returned \`null\`, will not send event.`)}const g=n.getSession()||i.getSession();if(l&&g&&this._updateSessionFromEvent(g,p),s){const b=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,E=p.spans?p.spans.length:0,S=b-E;S>0&&this.recordDroppedEvent("before_send","span",S)}const _=p.transaction_info;if(s&&_&&p.transaction!==t.transaction){const b="custom";p.transaction_info={..._,source:b}}return this.sendEvent(p,r),p}).then(null,p=>{throw GZ(p)||WZ(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),SP(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{const[i,a]=r.split(":");return{reason:i,category:a,quantity:n}})}_flushOutcomes(){qr&&br.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){qr&&br.log("No outcomes to send");return}if(!this._dsn){qr&&br.log("No dsn provided, will not send outcomes");return}qr&&br.log("Sending outcomes:",t);
13const r=cMe(t,this._options.tunnel&&r_(this._dsn));this.sendEnvelope(r)}}function hMe(e,t){const r=`${t} must return \`null\` or a valid event.`;if(dx(e))return e.then(n=>{if(!VS(n)&&n!==null)throw SP(r);return n},n=>{throw SP(`${t} rejected with ${n}`)});if(!VS(e)&&e!==null)throw SP(r);return e}function pMe(e,t,r,n){const{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;let s=r;if(ZB(s)&&i)return i(s,n);if(A0e(s)){if(o){const l=o(uMe(s));if(l?s=hx(r,dMe(l)):GB(),s.spans){const c=[];for(const d of s.spans){const f=o(d);f?c.push(f):(GB(),c.push(d))}s.spans=c}}if(a){if(s.spans){const l=s.spans.length;s.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return a(s,n)}}return s}function ZB(e){return e.type===void 0}function A0e(e){return e.type==="transaction"}function mMe(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function vMe(e,t,r,n){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=r_(n)),n_(i,[mMe(e)])}function fN(e,t){const r=gMe(e)??[];if(r.length===0)return;const n=e.getOptions(),i=vMe(r,n._metadata,n.tunnel,e.getDsn());P0e().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function gMe(e){return P0e().get(e)}function P0e(){return ux("clientToLogBufferMap",()=>new WeakMap)}function yMe(e,t){t.debug===!0&&(qr?br.enable():Z1(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),oa().update(t.initialScope);const n=new e(t);return _Me(n),n.init(),n}function _Me(e){oa().setClient(e)}const R0e=Symbol.for("SentryBufferFullError");function bMe(e){const t=[];function r(){return e===void 0||t.length<e}function n(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!r())return OR(R0e);const s=o();return t.indexOf(s)===-1&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function a(o){return new Zp((s,l)=>{let c=t.length;if(!c)return s(!0);const d=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(f=>{sg(f).then(()=>{--c||(clearTimeout(d),s(!0))},l)})})}return{$:t,add:i,drain:a}}const EMe=60*1e3;function wMe(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?EMe:n-t}function SMe(e,t){return e[t]||e.all||0}function CMe(e,t,r=Date.now()){return SMe(e,t)>r}function xMe(e,{statusCode:t,headers:r},n=Date.now()){const i={...e},a=r?.["x-sentry-rate-limits"],o=r?.["retry-after"];if(a)for(const s of a.trim().split(",")){const[l,c,,,d]=s.split(":",5),f=parseInt(l,10),h=(isNaN(f)?60:f)*1e3;if(!c)i.all=n+h;else for(const p of c.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[p]=n+h):i[p]=n+h}else o?i.all=n+wMe(o,n):t===429&&(i.all=n+60*1e3);return i}const TMe=64;function AMe(e,t,r=bMe(e.bufferSize||TMe)){let n={};const i=o=>r.drain(o);function a(o){const s=[];if(PZ(o,(f,h)=>{const p=RZ(h);CMe(n,p)?e.recordDroppedEvent("ratelimit_backoff",p):s.push(f)}),s.length===0)return sg({});const l=n_(o[0],s),c=f=>{PZ(l,(h,p)=>{e.recordDroppedEvent(f,RZ(p))})},d=()=>t({body:l6e(l)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&qr&&br.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=xMe(n,f),f),f=>{throw c("network_error"),qr&&br.error("Encountered error running transport request:",f),f});return r.add(d).then(f=>f,f=>{if(f===R0e)return qr&&br.error("Skipped sending event because buffer is full."),c("queue_overflow"),sg({});throw f})}return{send:a,flush:i}}function PMe(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function RMe(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function O0e(e,t,r=[t],n="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(a=>({name:`${n}:@sentry/${a}`,version:Hv})),version:Hv}),e._metadata=i}function I0e(e={}){const t=e.client||Hi();if(!eMe()||!t)return{};const r=Gg(),n=J1(r);if(n.getTraceData)return n.getTraceData(e);const i=e.scope||oa(),a=e.span||hc(),o=a?$De(a):OMe(i),s=a?Yp(a):u0e(t,i),l=FDe(s);return e0e.test(o)?{"sentry-trace":o,baggage:l}:(br.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function OMe(e){const{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return t0e(t,n,r)}const IMe=100;function lg(e,t){const r=Hi(),n=Vd();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=IMe}=r.getOptions();if(a<=0)return;const s={timestamp:Kg(),...e},l=i?Z1(()=>i(s,t)):s;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,a))}let KZ;const kMe="FunctionToString",YZ=new WeakMap,NMe=(()=>({name:kMe,setupOnce(){KZ=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Cq(this),r=YZ.has(Hi())&&t!==void 0?t:this;return KZ.apply(r,e)}}catch{}},setup(e){YZ.set(e,!0)}})),DMe=NMe,MMe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],LMe="EventFilters",FMe=(e={})=>{let t;return{name:LMe,setup(r){const n=r.getOptions();t=XZ(e,n)},processEvent(r,n,i){if(!t){const a=i.getOptions();t=XZ(e,a)}return zMe(r,t)?null:r}}},BMe=((e={})=>({...FMe(e),name:"InboundFilters"}));function XZ(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:MMe],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function zMe(e,t){if(e.type){if(e.type==="transaction"&&UMe(e,t.ignoreTransactions))return qr&&br.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
14Event: ${Tv(e)}`),!0}else{if(HMe(e,t.ignoreErrors))return qr&&br.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15Event: ${Tv(e)}`),!0;if($Me(e))return qr&&br.warn(`Event dropped due to not having an error message, error type or stacktrace.
16Event: ${Tv(e)}`),!0;if(VMe(e,t.denyUrls))return qr&&br.warn(`Event dropped due to being matched by \`denyUrls\` option.
17Event: ${Tv(e)}.
18Url: ${IR(e)}`),!0;if(!qMe(e,t.allowUrls))return qr&&br.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19Event: ${Tv(e)}.
20Url: ${IR(e)}`),!0}return!1}function HMe(e,t){return t?.length?C0e(e).some(r=>Fp(r,t)):!1}function UMe(e,t){if(!t?.length)return!1;const r=e.transaction;return r?Fp(r,t):!1}
20function VMe(e,t){if(!t?.length)return!1;const r=IR(e);return r?Fp(r,t):!1}function qMe(e,t){if(!t?.length)return!0;const r=IR(e);return r?Fp(r,t):!0}function jMe(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function IR(e){try{const r=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?jMe(r):null}catch{return qr&&br.error(`Cannot extract url for event ${Tv(e)}`),null}}function $Me(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function WMe(e,t,r,n,i,a){if(!i.exception?.values||!a||!rh(a.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=QB(e,t,n,a.originalException,r,i.exception.values,o,0))}function QB(e,t,r,n,i,a,o,s){if(a.length>=r+1)return a;let l=[...a];if(rh(n[i],Error)){ZZ(o,s);const c=e(t,n[i]),d=l.length;QZ(c,i,d,s),l=QB(e,t,r,n[i],i,[c,...l],c,d)}return Array.isArray(n.errors)&&n.errors.forEach((c,d)=>{if(rh(c,Error)){ZZ(o,s);const f=e(t,c),h=l.length;QZ(f,`errors[${d}]`,h,s),l=QB(e,t,r,c,i,[f,...l],f,h)}}),l}function ZZ(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function QZ(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function GMe(e){const t="console";vm(t,e),gm(t,KMe)}function KMe(){"console"in $i&&XNe.forEach(function(e){e in $i.console&&oc($i.console,e,function(t){return xR[e]=t,function(...r){zc("console",{args:r,level:e}),xR[e]?.apply($i.console,r)}})})}function YMe(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const XMe="Dedupe",ZMe=(()=>{let e;return{name:XMe,processEvent(t){if(t.type)return t;try{if(JMe(t,e))return qr&&br.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),QMe=ZMe;function JMe(e,t){return t?!!(e8e(e,t)||t8e(e,t)):!1}function e8e(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!N0e(e,t)||!k0e(e,t))}function t8e(e,t){const r=JZ(t),n=JZ(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!N0e(e,t)||!k0e(e,t))}function k0e(e,t){let r=pZ(e),n=pZ(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){const a=n[i],o=r[i];if(a.filename!==o.filename||a.lineno!==o.lineno||a.colno!==o.colno||a.function!==o.function)return!1}return!0}function N0e(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function JZ(e){return e.exception?.values?.[0]}const r8e="thismessage:/";function D0e(e){return"isRelative"in e}function M0e(e,t){const r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=r?r8e:void 0;try{if("canParse"in URL&&!URL.canParse(e,n))return;const i=new URL(e,n);return r?{isRelative:r,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function n8e(e){if(D0e(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function qv(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function i8e(e){return e.split(/[?#]/,1)[0]}function a8e(e,t,r,n,i="auto.http.browser"){if(!e.fetchData)return;const{method:a,url:o}=e.fetchData,s=Kp()&&t(o);if(e.endTimestamp&&s){const f=e.fetchData.__span;if(!f)return;const h=n[f];h&&(s8e(h,e),delete n[f]);return}const l=!!hc(),c=s&&l?i_(c8e(o,a,i)):new Xp;if(e.fetchData.__span=c.spanContext().spanId,n[c.spanContext().spanId]=c,r(e.fetchData.url)){const f=e.args[0],h=e.args[1]||{},p=o8e(f,h,Kp()&&l?c:void 0);
20p&&(e.args[1]=h,h.headers=p)}const d=Hi();if(d){const f={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",c,f)}return c}function o8e(e,t,r){const n=I0e({span:r}),i=n["sentry-trace"],a=n.baggage;if(!i)return;const o=t.headers||(Vge(e)?e.headers:void 0);if(o)if(l8e(o)){const s=new Headers(o);if(s.get("sentry-trace")||s.set("sentry-trace",i),a){const l=s.get("baggage");l?ST(l)||s.set("baggage",`${l},${a}`):s.set("baggage",a)}return s}else if(Array.isArray(o)){const s=[...o];o.find(c=>c[0]==="sentry-trace")||s.push(["sentry-trace",i]);const l=o.find(c=>c[0]==="baggage"&&ST(c[1]));return a&&!l&&s.push(["baggage",a]),s}else{const s="sentry-trace"in o?o["sentry-trace"]:void 0,l="baggage"in o?o.baggage:void 0,c=l?Array.isArray(l)?[...l]:[l]:[],d=l&&(Array.isArray(l)?l.find(f=>ST(f)):ST(l));return a&&!d&&c.push(a),{...o,"sentry-trace":s??i,baggage:c.length>0?c.join(","):void 0}}else return{...n}}function s8e(e,t){if(t.response){Xge(e,t.response.status);const r=t.response?.headers?.get("content-length");if(r){const n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus({code:Do,message:"internal_error"});e.end()}function ST(e){return e.split(",").some(t=>t.trim().startsWith(Aq))}function l8e(e){return typeof Headers<"u"&&rh(e,Headers)}function c8e(e,t,r){const n=M0e(e);return{name:n?`${t} ${n8e(n)}`:t,attributes:u8e(e,n,t,r)}}function u8e(e,t,r,n){const i={url:e,type:"fetch","http.method":r,[so]:n,[Du]:"http.client"};return t&&(D0e(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function L0e(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const jS=$i;function d8e(){return"history"in jS&&!!jS.history}function f8e(){if(!("fetch"in jS))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function JB(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}
20function h8e(){if(typeof EdgeRuntime=="string")return!0;if(!f8e())return!1;if(JB(jS.fetch))return!0;let e=!1;const t=jS.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=JB(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){qr&&br.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function F0e(e,t){const r="fetch";vm(r,e),gm(r,()=>B0e(void 0,t))}function p8e(e){const t="fetch-body-resolved";vm(t,e),gm(t,()=>B0e(v8e))}function B0e(e,t=!1){t&&!h8e()||oc($i,"fetch",function(r){return function(...n){const i=new Error,{method:a,url:o}=g8e(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:fs()*1e3,virtualError:i,headers:y8e(n)};return e||zc("fetch",{...s}),r.apply($i,n).then(async l=>(e?e(l):zc("fetch",{...s,endTimestamp:fs()*1e3,response:l}),l),l=>{if(zc("fetch",{...s,endTimestamp:fs()*1e3,error:l}),d3(l)&&l.stack===void 0&&(l.stack=i.stack,dc(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const c=new URL(s.fetchData.url);l.message=`${l.message} (${c.host})`}catch{}throw l})}})}async function m8e(e,t){if(e?.body){const r=e.body,n=r.getReader(),i=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3);let a=!0;for(;a;){let o;try{o=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);const{done:s}=await n.read();clearTimeout(o),s&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(o)}}clearTimeout(i),n.releaseLock(),r.cancel().then(null,()=>{})}}function v8e(e){let t;try{t=e.clone()}catch{return}m8e(t,()=>{zc("fetch-body-resolved",{endTimestamp:fs()*1e3,response:e})})}function ez(e,t){return!!e&&typeof e=="object"&&!!e[t]}function eQ(e){return typeof e=="string"?e:e?ez(e,"url")?e.url:e.toString?e.toString():"":""}function g8e(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:eQ(r),method:ez(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:eQ(t),method:ez(t,"method")?String(t.method).toUpperCase():"GET"}}function y8e(e){const[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(Vge(t))return new Headers(t.headers)}catch{}}function _8e(){return"npm"}const zn=$i;let tz=0;function z0e(){return tz>0}function b8e(){tz++,setTimeout(()=>{tz--})}function s1(e,t={}){function r(i){return typeof i=="function"}if(!r(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Cq(e))return e}catch{return e}const n=function(...i){try{const a=i.map(o=>s1(o,t));return e.apply(this,a)}catch(a){throw b8e(),e_(o=>{o.addEventProcessor(s=>(t.mechanism&&(jB(s,void 0),n1(s,t.mechanism)),s.extra={...s.extra,arguments:i},s)),y0e(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}jge(n,e),dc(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function kq(){const e=fx(),{referrer:t}=zn.document||{},{userAgent:r}=zn.navigator||{},n={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:n}}function Nq(e,t){const r=Dq(e,t),n={type:x8e(t),value:T8e(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function E8e(e,t,r,n){const a=Hi()?.getOptions().normalizeDepth,o=I8e(t),s={__serialized__:d0e(t,a)};if(o)return{exception:{values:[Nq(e,o)]},extra:s};const l={exception:{values:[{type:f3(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:R8e(t,{isUnhandledRejection:n})}]},extra:s};if(r){const c=Dq(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function hN(e,t){return{exception:{values:[Nq(e,t)]}}}function Dq(e,t){const r=t.stacktrace||t.stack||"",n=S8e(t),i=C8e(t);try{return e(r,n,i)}catch{}return[]}const w8e=/Minified React error #\d+;/i;function S8e(e){return e&&w8e.test(e.message)?1:0}function C8e(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function H0e(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function x8e(e){const t=e?.name;return!t&&H0e(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function T8e(e){const t=e?.message;return H0e(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function A8e(e,t,r,n){const i=r?.syntheticException||void 0,a=Mq(e,t,i,n);return n1(a),a.level="error",r?.event_id&&(a.event_id=r.event_id),sg(a)}function P8e(e,t,r="info",n,i){const a=n?.syntheticException||void 0,o=rz(e,t,a,i);return o.level=r,n?.event_id&&(o.event_id=n.event_id),sg(o)}function Mq(e,t,r,n,i){let a;if(Hge(t)&&t.error)return hN(e,t.error);if(vZ(t)||sDe(t)){const o=t;if("stack"in t)a=hN(e,t);else{const s=o.name||(vZ(o)?"DOMError":"DOMException"),l=o.message?`${s}: ${o.message}`:s;a=rz(e,l,r,n),jB(a,l)}return"code"in o&&(a.tags={...a.tags,"DOMException.code":`${o.code}`}),a}
20return d3(t)?hN(e,t):VS(t)||f3(t)?(a=E8e(e,t,r,i),n1(a,{synthetic:!0}),a):(a=rz(e,t,r,n),jB(a,`${t}`),n1(a,{synthetic:!0}),a)}function rz(e,t,r,n){const i={};if(n&&r){const a=Dq(e,r);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]}),n1(i,{synthetic:!0})}if(wq(t)){const{__sentry_template_string__:a,__sentry_template_values__:o}=t;return i.logentry={message:a,params:o},i}return i.message=t,i}function R8e(e,{isUnhandledRejection:t}){const r=pDe(e),n=t?"promise rejection":"exception";return Hge(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:f3(e)?`Event \`${O8e(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function O8e(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function I8e(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}const k8e=5e3;class N8e extends fMe{constructor(t){const r=D8e(t),n=zn.SENTRY_SDK_SOURCE||_8e();O0e(r,"browser",["browser"],n),super(r);const{sendDefaultPii:i,sendClientReports:a,enableLogs:o,_experiments:s}=this._options,l=o??s?.enableLogs;zn.document&&(a||l)&&zn.document.addEventListener("visibilitychange",()=>{zn.document.visibilityState==="hidden"&&(a&&this._flushOutcomes(),l&&fN(this))}),l&&(this.on("flush",()=>{fN(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{fN(this)},k8e)})),i&&(this.on("postprocessEvent",PMe),this.on("beforeSendSession",RMe))}eventFromException(t,r){return A8e(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return P8e(this._options.stackParser,t,r,n,this._options.attachStacktrace)}_prepareEvent(t,r,n,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n,i)}}function D8e(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:zn.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const p3=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xn=$i,M8e=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",a_=(e,t,r,n)=>{let i,a;return o=>{t.value>=0&&(o||n)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=M8e(t.value,r),e(t)))}},L8e=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,gx=(e=!0)=>{const t=xn.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},o_=()=>gx()?.activationStart??0,s_=(e,t=-1)=>{const r=gx();let n="navigate";return r&&(xn.document?.prerendering||o_()>0?n="prerender":xn.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:L8e(),navigationType:n}},pN=new WeakMap;function Lq(e,t){return pN.get(e)||pN.set(e,new t),pN.get(e)}class kR{constructor(){kR.prototype.__init.call(this),kR.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const r=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Xg=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},m3=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let aS=-1;const F8e=()=>xn.document?.visibilityState==="hidden"&&!xn.document?.prerendering?0:1/0,NR=e=>{xn.document.visibilityState==="hidden"&&aS>-1&&(aS=e.type==="visibilitychange"?e.timeStamp:0,z8e())},B8e=()=>{addEventListener("visibilitychange",NR,!0),addEventListener("prerenderingchange",NR,!0)},z8e=()=>{removeEventListener("visibilitychange",NR,!0),removeEventListener("prerenderingchange",NR,!0)},v3=()=>{if(xn.document&&aS<0){const e=o_();aS=(xn.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>
20e)[0]?.startTime)??F8e(),B8e()}return{get firstHiddenTime(){return aS}}},yx=e=>{xn.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},H8e=[1800,3e3],U8e=(e,t={})=>{yx(()=>{const r=v3(),n=s_("FCP");let i;const o=Xg("paint",s=>{for(const l of s)l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-o_(),0),n.entries.push(l),i(!0)))});o&&(i=a_(e,n,H8e,t.reportAllChanges))})},V8e=[.1,.25],q8e=(e,t={})=>{U8e(m3(()=>{const r=s_("CLS",0);let n;const i=Lq(t,kR),a=s=>{for(const l of s)i._processEntry(l);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},o=Xg("layout-shift",a);o&&(n=a_(e,r,V8e,t.reportAllChanges),xn.document?.addEventListener("visibilitychange",()=>{xn.document?.visibilityState==="hidden"&&(a(o.takeRecords()),n(!0))}),xn?.setTimeout?.(n))}))},g3=e=>{const t=r=>{(r.type==="pagehide"||xn.document?.visibilityState==="hidden")&&e(r)};xn.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},j8e=[100,300],$8e=(e,t={})=>{yx(()=>{const r=v3(),n=s_("FID");let i;const a=l=>{l.startTime<r.firstHiddenTime&&(n.value=l.processingStart-l.startTime,n.entries.push(l),i(!0))},o=l=>{l.forEach(a)},s=Xg("first-input",o);i=a_(e,n,j8e,t.reportAllChanges),s&&g3(m3(()=>{o(s.takeRecords()),s.disconnect()}))})};let U0e=0,mN=1/0,CT=0;const W8e=e=>{e.forEach(t=>{t.interactionId&&(mN=Math.min(mN,t.interactionId),CT=Math.max(CT,t.interactionId),U0e=CT?(CT-mN)/7+1:0)})};let nz;const V0e=()=>nz?U0e:performance.interactionCount||0,G8e=()=>{"interactionCount"in performance||nz||(nz=Xg("event",W8e,{type:"event",buffered:!0,durationThreshold:0}))},vN=10;let q0e=0;const K8e=()=>V0e()-q0e;class DR{constructor(){DR.prototype.__init.call(this),DR.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){q0e=V0e(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(K8e()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const r=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(t.interactionId);if(n||this._longestInteractionList.length<vN||t.duration>r._latency){if(n?t.duration>n._latency?(n.entries=[t],n._latency=t.duration):t.duration===n._latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((i,a)=>a._latency-i._latency),this._longestInteractionList.length>vN){const i=this._longestInteractionList.splice(vN);for(const a of i)this._longestInteractionMap.delete(a.id)}this._onAfterProcessingINPCandidate?.(n)}}}const j0e=e=>{const t=xn.requestIdleCallback||xn.setTimeout;xn.document?.visibilityState==="hidden"?e():(e=m3(e),t(e),g3(e))},Y8e=[200,500],X8e=40,Z8e=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&yx(()=>{G8e();const r=s_("INP");let n;const i=Lq(t,DR),a=s=>{j0e(()=>{for(const c of s)i._processEntry(c);const l=i._estimateP98LongestInteraction();l&&l._latency!==r.value&&(r.value=l._latency,r.entries=l.entries,n())})},o=Xg("event",a,{durationThreshold:t.durationThreshold??X8e});n=a_(e,r,Y8e,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),g3(()=>{a(o.takeRecords()),n(!0)}))})};class Q8e{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const J8e=[2500,4e3],e9e=(e,t={})=>{yx(()=>{const r=v3(),n=s_("LCP");let i;const a=Lq(t,Q8e),o=l=>{t.reportAllChanges||(l=l.slice(-1));for(const c of l)a._processEntry(c),c.startTime<r.firstHiddenTime&&(n.value=Math.max(c.startTime-o_(),0),n.entries=[c],i())},s=Xg("largest-contentful-paint",o);if(s){i=a_(e,n,J8e,t.reportAllChanges);const l=m3(()=>{o(s.takeRecords()),s.disconnect(),i(!0)});for(const c of["keydown","click","visibilitychange"])xn.document&&addEventListener(c,()=>j0e(l),{capture:!0,once:!0})}})},t9e=[800,1800],iz=e=>{xn.document?.prerendering?yx(()=>iz(e)):xn.document?.readyState!=="complete"?addEventListener("load",()=>iz(e),!0):setTimeout(e)},r9e=(e,t={})=>{const r=s_("TTFB"),n=a_(e,r,t9e,t.reportAllChanges);iz(()=>{const i=gx();i&&(r.value=Math.max(i.responseStart-o_(),0),r.entries=[i],n(!0))})},oS={},MR={};let $0e,W0e,G0e,K0e,Y0e;function X0e(e,t=!1){return _x("cls",e,o9e,$0e,t)}function Z0e(e,t=!1){return _x("lcp",e,l9e,G0e,t)}function n9e(e){return _x("fid",e,s9e,W0e)}function i9e(e){return _x("ttfb",e,c9e,K0e)}function a9e(e){return _x("inp",e,u9e,Y0e)}function l1(e,t){return Q0e(e,t),MR[e]||(d9e(e),MR[e]=!0),J0e(e,t)}function l_(e,t){const r=oS[e];if(r?.length)for(const n of r)try{n(t)}catch(i){p3&&br.error(`Error while triggering instrumentation handler.
21Type: ${e}
22Name: ${th(n)}
23Error:`,i)}}function o9e(){return q8e(e=>{l_("cls",{metric:e}),$0e=e},{reportAllChanges:!0})}function s9e(){return $8e(e=>{l_("fid",{metric:e}),W0e=e})}function l9e(){return e9e(e=>{l_("lcp",{metric:e}),G0e=e},{reportAllChanges:!0})}function c9e(){return r9e(e=>{l_("ttfb",{metric:e}),K0e=e})}function u9e(){return Z8e(e=>{l_("inp",{metric:e}),Y0e=e})}function _x(e,t,r,n,i=!1){Q0e(e,t);let a;return MR[e]||(a=r(),MR[e]=!0),n&&t({metric:n}),J0e(e,t,i?a:void 0)}function d9e(e){const t={};e==="event"&&(t.durationThreshold=0),Xg(e,r=>{l_(e,{entries:r})},t)}function Q0e(e,t){oS[e]=oS[e]||[],oS[e].push(t)}function J0e(e,t,r){return()=>{r&&r();const n=oS[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function f9e(e){return"duration"in e}function gN(e){return typeof e=="number"&&isFinite(e)}function nh(e,t,r,{...n}){const i=Bi(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Oq(e,()=>{const a=i_({startTime:t,...n});return a&&a.end(r),a})}function Fq(e){const t=Hi();if(!t)return;const{name:r,transaction:n,attributes:i,startTime:a}=e,{release:o,environment:s,sendDefaultPii:l}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),f=oa(),h=f.getUser(),p=h!==void 0?h.email||h.id||h.ip_address:void 0;let g;
23try{g=f.getScopeData().contexts.profile.profile_id}catch{}const _={release:o,environment:s,user:p||void 0,profile_id:g||void 0,replay_id:d||void 0,transaction:n,"user_agent.original":xn.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...i};return i_({name:r,attributes:_,startTime:a,experimental:{standalone:!0}})}function y3(){return xn.addEventListener&&xn.performance}function Ca(e){return e/1e3}function eye(e){let t="unknown",r="unknown",n="";for(const i of e){if(i==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(i))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=i}return n===e&&(t=n),{name:t,version:r}}function tye(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function rye(e,t){let r,n=!1;function i(s){!n&&r&&t(s,r),n=!0}g3(()=>{i("pagehide")});const a=e.on("beforeStartNavigationSpan",(s,l)=>{l?.isRedirect||(i("navigation"),a?.(),o?.())}),o=e.on("afterStartPageLoadSpan",s=>{r=s.spanContext().spanId,o?.()})}function h9e(e){let t=0,r;if(!tye("layout-shift"))return;const n=X0e(({metric:i})=>{const a=i.entries[i.entries.length-1];a&&(t=i.value,r=a)},!0);rye(e,(i,a)=>{p9e(t,r,a,i),n()})}function p9e(e,t,r,n){p3&&br.log(`Sending CLS span (${e})`);const i=Ca((Ml()||0)+(t?.startTime||0)),a=oa().getScopeData().transactionName,o=t?Dd(t.sources[0]?.node):"Layout shift",s={[so]:"auto.http.browser.cls",[Du]:"ui.webvital.cls",[t_]:t?.duration||0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,d)=>{s[`cls.source.${d+1}`]=Dd(c.node)});const l=Fq({name:o,transaction:a,attributes:s,startTime:i});l&&(l.addEvent("cls",{[mx]:"",[vx]:e}),l.end(i))}function m9e(e){let t=0,r;if(!tye("largest-contentful-paint"))return;const n=Z0e(({metric:i})=>{const a=i.entries[i.entries.length-1];a&&(t=i.value,r=a)},!0);rye(e,(i,a)=>{v9e(t,r,a,i),n()})}function v9e(e,t,r,n){p3&&br.log(`Sending LCP span (${e})`);const i=Ca((Ml()||0)+(t?.startTime||0)),a=oa().getScopeData().transactionName,o=t?Dd(t.element):"Largest contentful paint",s={[so]:"auto.http.browser.lcp",[Du]:"ui.webvital.lcp",[t_]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(s["lcp.element"]=Dd(t.element)),t.id&&(s["lcp.id"]=t.id),t.url&&(s["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(s["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(s["lcp.renderTime"]=t.renderTime),t.size!=null&&(s["lcp.size"]=t.size));const l=Fq({name:o,transaction:a,attributes:s,startTime:i});l&&(l.addEvent("lcp",{[mx]:"millisecond",[vx]:e}),l.end(i))}const g9e=2147483647;let tQ=0,os={},wl,LR;function y9e({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){const n=y3();if(n&&Ml()){n.mark&&xn.performance.mark("sentry-tracing-init");const i=C9e(),a=t?m9e(r):S9e(),o=x9e(),s=e?h9e(r):w9e();return()=>{i(),a?.(),o(),s?.()}}return()=>{}}function _9e(){l1("longtask",({entries:e})=>{const t=hc();if(!t)return;const{op:r,start_timestamp:n}=Bi(t);for(const i of e){const a=Ca(Ml()+i.startTime),o=Ca(i.duration);r==="navigation"&&n&&a<n||nh(t,a,a+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[so]:"auto.ui.browser.metrics"}})}})}function b9e(){new PerformanceObserver(t=>{const r=hc();if(r)for(const n of t.getEntries()){if(!n.scripts[0])continue;const i=Ca(Ml()+n.startTime),{start_timestamp:a,op:o}=Bi(r);if(o==="navigation"&&a&&i<a)continue;const s=Ca(n.duration),l={[so]:"auto.ui.browser.metrics"},c=n.scripts[0],{invoker:d,invokerType:f,sourceURL:h,sourceFunctionName:p,sourceCharPosition:g}=c;l["browser.script.invoker"]=d,l["browser.script.invoker_type"]=f,h&&(l["code.filepath"]=h),p&&(l["code.function"]=p),g!==-1&&(l["browser.script.source_char_position"]=g),nh(r,i,i+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function E9e(){l1("event",({entries:e})=>{const t=hc();if(t){for(const r of e)if(r.name==="click"){const n=Ca(Ml()+r.startTime),i=Ca(r.duration),a={name:Dd(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[so]:"auto.ui.browser.metrics"}},o=qge(r.target);o&&(a.attributes["ui.component_name"]=o),nh(t,n,n+i,a)}}})}function w9e(){return X0e(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(os.cls={value:e.value,unit:""},LR=t)},!0)}function S9e(){return Z0e(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(os.lcp={value:e.value,unit:"millisecond"},wl=t)}
23,!0)}function C9e(){return n9e(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const r=Ca(Ml()),n=Ca(t.startTime);os.fid={value:e.value,unit:"millisecond"},os["mark.fid"]={value:r+n,unit:"second"}})}function x9e(){return i9e(({metric:e})=>{e.entries[e.entries.length-1]&&(os.ttfb={value:e.value,unit:"millisecond"})})}function T9e(e,t){const r=y3(),n=Ml();if(!r?.getEntries||!n)return;const i=Ca(n),a=r.getEntries(),{op:o,start_timestamp:s}=Bi(e);if(a.slice(tQ).forEach(l=>{const c=Ca(l.startTime),d=Ca(Math.max(0,l.duration));if(!(o==="navigation"&&s&&i+c<s))switch(l.entryType){case"navigation":{R9e(e,l,i);break}case"mark":case"paint":case"measure":{A9e(e,l,c,d,i,t.ignorePerformanceApiSpans);const f=v3(),h=l.startTime<f.firstHiddenTime;l.name==="first-paint"&&h&&(os.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&h&&(os.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{k9e(e,l,l.name,c,d,i,t.ignoreResourceSpans);break}}}),tQ=Math.max(a.length-1,0),N9e(e),o==="pageload"){M9e(os);const l=os["mark.fid"];l&&os.fid&&(nh(e,l.value,l.value+Ca(os.fid.value),{name:"first input delay",op:"ui.action",attributes:{[so]:"auto.ui.browser.metrics"}}),delete os["mark.fid"]),t.recordClsOnPageloadSpan||delete os.cls,t.recordLcpOnPageloadSpan||delete os.lcp,Object.entries(os).forEach(([c,d])=>{b6e(c,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",o_()),D9e(e,t)}wl=void 0,LR=void 0,os={}}function A9e(e,t,r,n,i,a){if(["mark","measure"].includes(t.entryType)&&Fp(t.name,a))return;const o=gx(!1),s=Ca(o?o.requestStart:0),l=i+Math.max(r,s),c=i+r,d=c+n,f={[so]:"auto.resource.browser.metrics"};l!==c&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=l),P9e(f,t),l<=d&&nh(e,l,d,{name:t.name,op:t.entryType,attributes:f})}function P9e(e,t){try{const r=t.detail;if(!r)return;if(typeof r=="object"){for(const[n,i]of Object.entries(r))if(i&&US(i))e[`sentry.browser.measure.detail.${n}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${n}`]=JSON.stringify(i)}catch{}return}if(US(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function R9e(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{xT(e,t,n,r)}),xT(e,t,"secureConnection",r,"TLS/SSL"),xT(e,t,"fetch",r,"cache"),xT(e,t,"domainLookup",r,"DNS"),I9e(e,t,r)}function xT(e,t,r,n,i=r){const a=O9e(r),o=t[a],s=t[`${r}Start`];!s||!o||nh(e,n+Ca(s),n+Ca(o),{op:`browser.${i}`,name:t.name,attributes:{[so]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function O9e(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function I9e(e,t,r){const n=r+Ca(t.requestStart),i=r+Ca(t.responseEnd),a=r+Ca(t.responseStart);t.responseEnd&&(nh(e,n,i,{op:"browser.request",name:t.name,attributes:{[so]:"auto.ui.browser.metrics"}}),nh(e,a,i,{op:"browser.response",name:t.name,attributes:{[so]:"auto.ui.browser.metrics"}}))}function k9e(e,t,r,n,i,a,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o?.includes(s))return;const l=qv(r),c={[so]:"auto.resource.browser.metrics"};yN(c,t,"transferSize","http.response_transfer_size"),yN(c,t,"encodedBodySize","http.response_content_length"),yN(c,t,"decodedBodySize","http.decoded_response_content_length");const d=t.deliveryType;d!=null&&(c["http.response_delivery_type"]=d);const f=t.renderBlockingStatus;if(f&&(c["resource.render_blocking_status"]=f),l.protocol&&(c["url.scheme"]=l.protocol.split(":").pop()),l.host&&(c["server.address"]=l.host),c["url.same_origin"]=r.includes(xn.location.origin),t.nextHopProtocol!=null){const{name:g,version:_}=eye(t.nextHopProtocol);c["network.protocol.name"]=g,c["network.protocol.version"]=_}const h=a+n,p=h+i;nh(e,h,p,{name:r.replace(xn.location.origin,""),op:s,attributes:c})}function N9e(e){const t=xn.navigator;if(!t)return;const r=t.connection;r&&(r.effectiveType&&e.setAttribute("effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute("connectionType",r.type),gN(r.rtt)&&(os["connection.rtt"]={value:r.rtt,unit:"millisecond"})),gN(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),gN(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function D9e(e,t){wl&&t.recordLcpOnPageloadSpan&&(wl.element&&e.setAttribute("lcp.element",Dd(wl.element)),wl.id&&e.setAttribute("lcp.id",wl.id),wl.url&&e.setAttribute("lcp.url",wl.url.trim().slice(0,200)),wl.loadTime!=null&&e.setAttribute("lcp.loadTime",wl.loadTime),wl.renderTime!=null&&e.setAttribute("lcp.renderTime",wl.renderTime),e.setAttribute("lcp.size",wl.size)),LR?.sources&&t.recordClsOnPageloadSpan&&LR.sources.forEac
23h((r,n)=>e.setAttribute(`cls.source.${n+1}`,Dd(r.node)))}function yN(e,t,r,n){const i=t[r];i!=null&&i<g9e&&(e[n]=i)}function M9e(e){const t=gx(!1);if(!t)return;const{responseStart:r,requestStart:n}=t;n<=r&&(e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}function L9e(){return y3()&&Ml()?l1("element",F9e):()=>{}}const F9e=({entries:e})=>{const t=hc(),r=t?ol(t):void 0,n=r?Bi(r).description:oa().getScopeData().transactionName;e.forEach(i=>{const a=i;if(!a.identifier)return;const o=a.name,s=a.renderTime,l=a.loadTime,[c,d]=l?[Ca(l),"load-time"]:s?[Ca(s),"render-time"]:[fs(),"entry-emission"],f=o==="image-paint"?Ca(Math.max(0,(s??0)-(l??0))):0,h={[so]:"auto.ui.browser.elementtiming",[Du]:"ui.elementtiming",[Mc]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":n,"element.id":a.id,"element.type":a.element?.tagName?.toLowerCase()||"unknown","element.size":a.naturalWidth&&a.naturalHeight?`${a.naturalWidth}x${a.naturalHeight}`:void 0,"element.render_time":s,"element.load_time":l,"element.url":a.url||void 0,"element.identifier":a.identifier,"element.paint_type":o};T6e({name:`element[${a.identifier}]`,attributes:h,startTime:c,onlyIfParent:!0},p=>{p.end(c+f)})})},B9e=1e3;let rQ,az,oz;function z9e(e){vm("dom",e),gm("dom",H9e)}function H9e(){if(!xn.document)return;const e=zc.bind(null,"dom"),t=nQ(e,!0);xn.document.addEventListener("click",t,!1),xn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const i=xn[r]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(oc(i,"addEventListener",function(a){return function(o,s,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=c[o]=c[o]||{refCount:0};if(!d.handler){const f=nQ(e);d.handler=f,a.call(this,o,f,l)}d.refCount++}catch{}return a.call(this,o,s,l)}}),oc(i,"removeEventListener",function(a){return function(o,s,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},d=c[o];d&&(d.refCount--,d.refCount<=0&&(a.call(this,o,d.handler,l),d.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,o,s,l)}}))})}function U9e(e){if(e.type!==az)return!1;try{if(!e.target||e.target._sentryId!==oz)return!1}catch{}return!0}function V9e(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function nQ(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=q9e(r);if(V9e(r.type,n))return;dc(r,"_sentryCaptured",!0),n&&!n._sentryId&&dc(n,"_sentryId",Hc());const i=r.type==="keypress"?"input":r.type;U9e(r)||(e({event:r,name:i,global:t}),az=r.type,oz=n?n._sentryId:void 0),clearTimeout(rQ),rQ=xn.setTimeout(()=>{oz=void 0,az=void 0},B9e)}}function q9e(e){try{return e.target}catch{return null}}let TT;function Bq(e){const t="history";vm(t,e),gm(t,j9e)}function j9e(){if(xn.addEventListener("popstate",()=>{const t=xn.location.href,r=TT;if(TT=t,r===t)return;zc("history",{from:r,to:t})}),!d8e())return;function e(t){return function(...r){const n=r.length>2?r[2]:void 0;if(n){const i=TT,a=$9e(String(n));if(TT=a,i===a)return t.apply(this,r);zc("history",{from:i,to:a})}return t.apply(this,r)}}oc(xn.history,"pushState",e),oc(xn.history,"replaceState",e)}function $9e(e){try{return new URL(e,xn.location.origin).toString()}catch{return e}}const CP={};function W9e(e){const t=CP[e];if(t)return t;let r=xn[e];if(JB(r))return CP[e]=r.bind(xn);const n=xn.document;if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const a=i.contentWindow;a?.[e]&&(r=a[e]),n.head.removeChild(i)}catch(i){p3&&br.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return r&&(CP[e]=r.bind(xn))}function iQ(e){CP[e]=void 0}const my="__sentry_xhr_v3__";function nye(e){vm("xhr",e),gm("xhr",G9e)}function G9e(){if(!xn.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const i=new Error,a=fs()*1e3,o=zf(n[0])?n[0].toUpperCase():void 0,s=K9e(n[1]);if(!o||!s)return t.apply(r,n);r[my]={method:o,url:s,request_headers:{}}
23,o==="POST"&&s.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const l=()=>{const c=r[my];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}const d={endTimestamp:fs()*1e3,startTimestamp:a,xhr:r,virtualError:i};zc("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(c,d,f){return l(),c.apply(d,f)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(c,d,f){const[h,p]=f,g=d[my];return g&&zf(h)&&zf(p)&&(g.request_headers[h.toLowerCase()]=p),c.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const i=r[my];if(!i)return t.apply(r,n);n[0]!==void 0&&(i.body=n[0]);const a={startTimestamp:fs()*1e3,xhr:r};return zc("xhr",a),t.apply(r,n)}})}function K9e(e){if(zf(e))return e;try{return e.toString()}catch{}}const _N=[],xP=new Map,Y9e=60;function X9e(){if(y3()&&Ml()){const t=Z9e();return()=>{t()}}return()=>{}}const aQ={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Z9e(){return a9e(Q9e)}const Q9e=({metric:e})=>{if(e.value==null)return;const t=Ca(e.value);if(t>Y9e)return;const r=e.entries.find(g=>g.duration===e.value&&aQ[g.name]);if(!r)return;const{interactionId:n}=r,i=aQ[r.name],a=Ca(Ml()+r.startTime),o=hc(),s=o?ol(o):void 0,c=(n!=null?xP.get(n):void 0)||s,d=c?Bi(c).description:oa().getScopeData().transactionName,f=Dd(r.target),h={[so]:"auto.http.browser.inp",[Du]:`ui.interaction.${i}`,[t_]:r.duration},p=Fq({name:f,transaction:d,attributes:h,startTime:a});p&&(p.addEvent("inp",{[mx]:"millisecond",[vx]:e.value}),p.end(a+t))};function J9e(){const e=({entries:t})=>{const r=hc(),n=r&&ol(r);t.forEach(i=>{if(!f9e(i)||!n)return;const a=i.interactionId;if(a!=null&&!xP.has(a)){if(_N.length>10){const o=_N.shift();xP.delete(o)}_N.push(a),xP.set(a,n)}})};l1("event",e),l1("first-input",e)}function eLe(e,t=W9e("fetch")){let r=0,n=0;function i(a){const o=a.body.length;r+=o,n++;const s={body:a.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return iQ("fetch"),OR("No fetch implementation available");try{return t(e.url,s).then(l=>(r-=o,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return iQ("fetch"),r-=o,n--,OR(l)}}return AMe(e,i)}const tLe=30,rLe=50;function sz(e,t,r,n){const i={filename:e,function:t==="<anonymous>"?og:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}const nLe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,iLe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aLe=/\((\S*)(?::(\d+))(?::(\d+))\)/,oLe=e=>{const t=nLe.exec(e);if(t){const[,n,i,a]=t;return sz(n,og,+i,+a)}const r=iLe.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const o=aLe.exec(r[2]);o&&(r[2]=o[1],r[3]=o[2],r[4]=o[3])}const[i,a]=iye(r[1]||og,r[2]);return sz(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},sLe=[tLe,oLe],lLe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,cLe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uLe=e=>{const t=lLe.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=cLe.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let n=t[3],i=t[1]||og;return[i,n]=iye(i,n),sz(n,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},dLe=[rLe,uLe],fLe=[sLe,dLe],hLe=Lge(...fLe),iye=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:og,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ol=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,AT=1024,pLe="Breadcrumbs",mLe=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:pLe,setup(r){t.console&&GMe(_Le(r)),t.dom&&z9e(yLe(r,t.dom)),t.xhr&&nye(bLe(r)),t.fetch&&F0e(ELe(r)),t.history&&Bq(wLe(r)),t.sentry&&r.on("beforeSendEvent",gLe(r))}}}),vLe=mLe;function gLe(e){return function(r){Hi()===e&&lg({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Tv(r)},{event:r})}}function yLe(e,t){return function(n){if(Hi()!==e)return;let i,a,o=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>AT&&(Ol&&br.warn(`\`dom.maxStringLength\` cannot exceed ${AT}, but a value of ${s} was configured. Sentry will use ${AT}
23 instead.`),s=AT),typeof o=="string"&&(o=[o]);try{const c=n.event,d=SLe(c)?c.target:c;i=Dd(d,{keyAttrs:o,maxStringLength:s}),a=qge(d)}catch{i="<unknown>"}if(i.length===0)return;const l={category:`ui.${n.name}`,message:i};a&&(l.data={"ui.component_name":a}),lg(l,{event:n.event,name:n.name,global:n.global})}}function _Le(e){return function(r){if(Hi()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:YMe(r.level),message:gZ(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${gZ(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;lg(n,{input:r.args,level:r.level})}}function bLe(e){return function(r){if(Hi()!==e)return;const{startTimestamp:n,endTimestamp:i}=r,a=r.xhr[my];if(!n||!i||!a)return;const{method:o,url:s,status_code:l,body:c}=a,d={method:o,url:s,status_code:l},f={xhr:r.xhr,input:c,startTimestamp:n,endTimestamp:i},h={category:"xhr",data:d,type:"http",level:L0e(l)};e.emit("beforeOutgoingRequestBreadcrumb",h,f),lg(h,f)}}function ELe(e){return function(r){if(Hi()!==e)return;const{startTimestamp:n,endTimestamp:i}=r;if(i&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.fetchData.method,r.fetchData.url,r.error){const a=r.fetchData,o={data:r.error,input:r.args,startTimestamp:n,endTimestamp:i},s={category:"fetch",data:a,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),lg(s,o)}else{const a=r.response,o={...r.fetchData,status_code:a?.status};r.fetchData.request_body_size,r.fetchData.response_body_size,a?.status;const s={input:r.args,response:a,startTimestamp:n,endTimestamp:i},l={category:"fetch",data:o,type:"http",level:L0e(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,s),lg(l,s)}}}function wLe(e){return function(r){if(Hi()!==e)return;let n=r.from,i=r.to;const a=qv(zn.location.href);let o=n?qv(n):void 0;const s=qv(i);o?.path||(o=a),a.protocol===s.protocol&&a.host===s.host&&(i=s.relative),a.protocol===o.protocol&&a.host===o.host&&(n=o.relative),lg({category:"navigation",data:{from:n,to:i}})}}function SLe(e){return!!e&&!!e.target}const CLe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],xLe="BrowserApiErrors",TLe=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:xLe,setupOnce(){t.setTimeout&&oc(zn,"setTimeout",oQ),t.setInterval&&oc(zn,"setInterval",oQ),t.requestAnimationFrame&&oc(zn,"requestAnimationFrame",PLe),t.XMLHttpRequest&&"XMLHttpRequest"in zn&&oc(XMLHttpRequest.prototype,"send",RLe);const r=t.eventTarget;r&&(Array.isArray(r)?r:CLe).forEach(i=>OLe(i,t))}}}),ALe=TLe;function oQ(e){return function(...t){const r=t[0];return t[0]=s1(r,{mechanism:{data:{function:th(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function PLe(e){return function(t){return e.apply(this,[s1(t,{mechanism:{data:{function:"requestAnimationFrame",handler:th(e)},handled:!1,type:"instrument"}})])}}function RLe(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in r&&typeof r[i]=="function"&&oc(r,i,function(a){const o={mechanism:{data:{function:i,handler:th(a)},handled:!1,type:"instrument"}},s=Cq(a);return s&&(o.mechanism.data.handler=th(s)),s1(a,o)})}),e.apply(this,t)}}function OLe(e,t){const n=zn[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(oc(n,"addEventListener",function(i){return function(a,o,s){try{ILe(o)&&(o.handleEvent=s1(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:th(o),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&kLe(this,a,o),i.apply(this,[a,s1(o,{mechanism:{data:{function:"addEventListener",handler:th(o),target:e},handled:!1,type:"instrument"}}),s])}}),oc(n,"removeEventListener",function(i){return function(a,o,s){try{const l=o.__sentry_wrapped__;l&&i.call(this,a,l,s)}catch{}return i.call(this,a,o,s)}}))}function ILe(e){return typeof e.handleEvent=="function"}function kLe(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}const NLe=()=>({name:"BrowserSession",setupOnce(){if(typeof zn.document>"u"){Ol&&br.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}HZ({ignoreDuration:!0}),UZ(),Bq(({from:e,to:t})=>{e!==void 0&&e!==t&&(HZ({ignoreDuration:!0}),UZ())})}}),DLe="GlobalHandlers",MLe=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:DLe,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(LLe(r),sQ("onerror")),t.onunhandledrejection&&(FLe(r),sQ("onunhandledrejection"))}}}
23),aye=MLe;function LLe(e){Fge(t=>{const{stackParser:r,attachStacktrace:n}=oye();if(Hi()!==e||z0e())return;const{msg:i,url:a,line:o,column:s,error:l}=t,c=HLe(Mq(r,l||i,void 0,n,!1),a,o,s);c.level="error",_0e(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function FLe(e){Bge(t=>{const{stackParser:r,attachStacktrace:n}=oye();if(Hi()!==e||z0e())return;const i=BLe(t),a=US(i)?zLe(i):Mq(r,i,void 0,n,!0);a.level="error",_0e(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function BLe(e){if(US(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function zLe(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function HLe(e,t,r,n){const i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},l=s.frames=s.frames||[],c=n,d=r,f=zf(t)&&t.length>0?t:fx();return l.length===0&&l.push({colno:c,filename:f,function:og,in_app:!0,lineno:d}),e}function sQ(e){Ol&&br.log(`Global Handler attached: ${e}`)}function oye(){return Hi()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ULe=()=>({name:"HttpContext",preprocessEvent(e){if(!zn.navigator&&!zn.location&&!zn.document)return;const t=kq(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}}}),VLe="cause",qLe=5,jLe="LinkedErrors",$Le=((e={})=>{const t=e.limit||qLe,r=e.key||VLe;return{name:jLe,preprocessEvent(n,i,a){const o=a.getOptions();WMe(Nq,o.stackParser,r,t,n,i)}}}),WLe=$Le;function GLe(){return KLe()?(Ol&&Z1(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function KLe(){if(typeof zn.window>"u")return!1;const e=zn;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const r=fx(),n=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(zn===zn.top&&n.some(a=>r.startsWith(`${a}://`)))}function YLe(e){return[BMe(),DMe(),ALe(),vLe(),aye(),WLe(),QMe(),ULe(),NLe()]}function XLe(e={}){const t=!e.skipBrowserExtensionCheck&&GLe(),r={...e,enabled:t?!1:e.enabled,stackParser:nDe(e.stackParser||hLe),integrations:sMe({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?YLe():e.defaultIntegrations}),transport:e.transport||eLe};return yMe(N8e,r)}function lQ(e={}){const t=zn.document,r=t?.head||t?.body;if(!r){Ol&&br.error("[showReportDialog] Global document not defined");return}const n=oa(),a=Hi()?.getDsn();if(!a){Ol&&br.error("[showReportDialog] DSN not configured");return}const o={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||J6e()},s=zn.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=aMe(a,o);const{onLoad:l,onClose:c}=o;if(l&&(s.onload=l),c){const d=f=>{if(f.data==="__sentry_reportdialog_closed__")try{c()}finally{zn.removeEventListener("message",d)}};zn.addEventListener("message",d)}r.appendChild(s)}function nd(e=0){return((Ml()||performance.timeOrigin)+e)/1e3}function ZLe(e){const t=[];if(e.nextHopProtocol!=null){const{name:r,version:n}=eye(e.nextHopProtocol);t.push(["network.protocol.version",n],["network.protocol.name",r])}return Ml()?[...t,["http.request.redirect_start",nd(e.redirectStart)],["http.request.fetch_start",nd(e.fetchStart)],["http.request.domain_lookup_start",nd(e.domainLookupStart)],["http.request.domain_lookup_end",nd(e.domainLookupEnd)],["http.request.connect_start",nd(e.connectStart)],["http.request.secure_connection_start",nd(e.secureConnectionStart)],["http.request.connection_end",nd(e.connectEnd)],["http.request.request_start",nd(e.requestStart)],["http.request.response_start",nd(e.responseStart)],["http.request.response_end",nd(e.responseEnd)]]:t}const cQ=new WeakMap,bN=new Map,sye={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function QLe(e,t){const{traceFetch:r,traceXHR:n,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o,tracePropagationTargets:s,onRequestSpanStart:l}={...sye,...t},c=typeof a=="function"?a:h=>!0,d=h=>e7e(h,s),f={};r&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(p=>{if(p.op==="http.client"){const g=bN.get(p.span_id);g&&(p.timestamp=g/1e3,bN.delete(p.span_id))}}),h)),i&&p8e(h=>
23{if(h.response){const p=cQ.get(h.response);p&&h.endTimestamp&&bN.set(p,h.endTimestamp)}}),F0e(h=>{const p=a8e(h,c,d,f);if(h.response&&h.fetchData.__span&&cQ.set(h.response,h.fetchData.__span),p){const g=lye(h.fetchData.url),_=g?qv(g).host:void 0;p.setAttributes({"http.url":g,"server.address":_}),o&&uQ(p),l?.(p,{headers:h.headers})}})),n&&nye(h=>{const p=t7e(h,c,d,f);if(p){o&&uQ(p);let g;try{g=new Headers(h.xhr.__sentry_xhr_v3__?.request_headers)}catch{}l?.(p,{headers:g})}})}function JLe(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function uQ(e){const{url:t}=Bi(e).data;if(!t||typeof t!="string")return;const r=l1("resource",({entries:n})=>{n.forEach(i=>{JLe(i)&&i.name.endsWith(t)&&(ZLe(i).forEach(o=>e.setAttribute(...o)),setTimeout(r))})})}function e7e(e,t){const r=fx();if(r){let n,i;try{n=new URL(e,r),i=new URL(r).origin}catch{return!1}const a=n.origin===i;return t?Fp(n.toString(),t)||a&&Fp(n.pathname,t):a}else{const n=!!e.match(/^\/(?!\/)/);return t?Fp(e,t):n}}function t7e(e,t,r,n){const i=e.xhr,a=i?.[my];if(!i||i.__sentry_own_request__||!a)return;const{url:o,method:s}=a,l=Kp()&&t(o);if(e.endTimestamp&&l){const _=i.__sentry_xhr_span_id__;if(!_)return;const b=n[_];b&&a.status_code!==void 0&&(Xge(b,a.status_code),b.end(),delete n[_]);return}const c=lye(o),d=qv(c||o),f=i8e(o),h=!!hc(),p=l&&h?i_({name:`${s} ${f}`,attributes:{url:o,type:"xhr","http.method":s,"http.url":c,"server.address":d?.host,[so]:"auto.http.browser",[Du]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new Xp;i.__sentry_xhr_span_id__=p.spanContext().spanId,n[i.__sentry_xhr_span_id__]=p,r(o)&&r7e(i,Kp()&&h?p:void 0);const g=Hi();return g&&g.emit("beforeOutgoingRequestSpan",p,e),p}function r7e(e,t){const{"sentry-trace":r,baggage:n}=I0e({span:t});r&&n7e(e,r,n)}function n7e(e,t,r){const n=e.__sentry_xhr_v3__?.request_headers;if(!n?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),r){const i=n?.baggage;(!i||!i7e(i))&&e.setRequestHeader("baggage",r)}}catch{}}function i7e(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function lye(e){try{return new URL(e,zn.location.origin).href}catch{return}}function a7e(){zn.document?zn.document.addEventListener("visibilitychange",()=>{const e=hc();if(!e)return;const t=ol(e);if(zn.document.hidden&&t){const r="cancelled",{op:n,status:i}=Bi(t);Ol&&br.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${n}`),i||t.setStatus({code:Do,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ol&&br.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const o7e=3600,cye="sentry_previous_trace",s7e="sentry.previous_trace";function l7e(e,{linkPreviousTrace:t,consistentTraceSampling:r}){const n=t==="session-storage";let i=n?d7e():void 0;e.on("spanStart",o=>{if(ol(o)!==o)return;const s=oa().getPropagationContext();i=c7e(i,o,s),n&&u7e(i)});let a=!0;r&&e.on("beforeSampling",o=>{if(!i)return;const s=oa(),l=s.getPropagationContext();if(a&&l.parentSpanId){a=!1;return}s.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(i.sampleRate),sampled:String(lz(i.spanContext))},sampleRand:i.sampleRand}),o.parentSampled=lz(i.spanContext),o.parentSampleRate=i.sampleRate,o.spanAttributes={...o.spanAttributes,[Kge]:i.sampleRate}})}function c7e(e,t,r){const n=Bi(t);function i(){try{return Number(r.dsc?.sample_rate)??Number(n.data?.[xq])}catch{return 0}}const a={spanContext:t.spanContext(),startTimestamp:n.start_timestamp,sampleRate:i(),sampleRand:r.sampleRand};if(!e)return a;const o=e.spanContext;return o.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=o7e&&(Ol&&br.log(`Adding previous_trace ${o} link to span ${{op:n.op,...t.spanContext()}}`),t.addLink({context:o,attributes:{[IDe]:"previous_trace"}}),t.setAttribute(s7e,`${o.traceId}-${o.spanId}-${lz(o)?1:0}`)),a)}function u7e(e){try{zn.sessionStorage.setItem(cye,JSON.stringify(e))}catch(t){Ol&&br.warn("Could not store previous trace in sessionStorage",t)}}function d7e(){try{const e=zn.sessionStorage?.getItem(cye);return JSON.parse(e)}catch{return}}function lz(e){return e.traceFlags===1}const f7e="BrowserTracing",h7e={...wP,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
23dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...sye},p7e=((e={})=>{const t={name:void 0,source:void 0},r=zn.document,{enableInp:n,enableElementTiming:i,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:c},beforeStartSpan:d,idleTimeout:f,finalTimeout:h,childSpanTimeout:p,markBackgroundSpan:g,traceFetch:_,traceXHR:b,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:S,enableHTTPTimings:P,ignoreResourceSpans:O,ignorePerformanceApiSpans:I,instrumentPageLoad:N,instrumentNavigation:M,detectRedirects:F,linkPreviousTrace:B,consistentTraceSampling:V,onRequestSpanStart:W}={...h7e,...e};let $,X;function re(ae,Q,ie=!0){const le=Q.op==="pageload",fe=d?d(Q):Q,de=fe.attributes||{};if(Q.name!==fe.name&&(de[Mc]="custom",fe.attributes=de),!ie){const Fe=Kg();i_({...fe,startTime:Fe}).end(Fe);return}t.name=fe.name,t.source=de[Mc];const ge=g0e(fe,{idleTimeout:f,finalTimeout:h,childSpanTimeout:p,disableAutoFinish:le,beforeSpanEnd:Fe=>{$?.(),T9e(Fe,{recordClsOnPageloadSpan:!l,recordLcpOnPageloadSpan:!c,ignoreResourceSpans:O,ignorePerformanceApiSpans:I}),fQ(ae,void 0);const Pe=oa(),ce=Pe.getPropagationContext();Pe.setPropagationContext({...ce,traceId:ge.spanContext().traceId,sampled:Yg(ge),dsc:Yp(Fe)})}});fQ(ae,ge);function Ae(){r&&["interactive","complete"].includes(r.readyState)&&ae.emit("idleSpanEnableAutoFinish",ge)}le&&r&&(r.addEventListener("readystatechange",()=>{Ae()}),Ae())}return{name:f7e,setup(ae){if(YDe(),$=y9e({recordClsStandaloneSpans:l||!1,recordLcpStandaloneSpans:c||!1,client:ae}),n&&X9e(),i&&L9e(),o&&$i.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?b9e():a&&_9e(),s&&E9e(),F&&r){const ie=()=>{X=fs()};addEventListener("click",ie,{capture:!0}),addEventListener("keydown",ie,{capture:!0,passive:!0})}function Q(){const ie=$S(ae);ie&&!Bi(ie).timestamp&&(Ol&&br.log(`[Tracing] Finishing current active span with op: ${Bi(ie).op}`),ie.setAttribute(PR,"cancelled"),ie.end())}ae.on("startNavigationSpan",(ie,le)=>{if(Hi()!==ae)return;if(le?.isRedirect){Ol&&br.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),re(ae,{op:"navigation.redirect",...ie},!1);return}Q(),Vd().setPropagationContext({traceId:Gp(),sampleRand:Math.random()});const fe=oa();fe.setPropagationContext({traceId:Gp(),sampleRand:Math.random()}),fe.setSDKProcessingMetadata({normalizedRequest:void 0}),re(ae,{op:"navigation",...ie})}),ae.on("startPageLoadSpan",(ie,le={})=>{if(Hi()!==ae)return;Q();const fe=le.sentryTrace||dQ("sentry-trace"),de=le.baggage||dQ("baggage"),ge=UDe(fe,de),Ae=oa();Ae.setPropagationContext(ge),Ae.setSDKProcessingMetadata({normalizedRequest:kq()}),re(ae,{op:"pageload",...ie})})},afterAllSetup(ae){let Q=fx();if(B!=="off"&&l7e(ae,{linkPreviousTrace:B,consistentTraceSampling:V}),zn.location){if(N){const ie=Ml();uye(ae,{name:zn.location.pathname,startTime:ie?ie/1e3:void 0,attributes:{[Mc]:"url",[so]:"auto.pageload.browser"}})}M&&Bq(({to:ie,from:le})=>{if(le===void 0&&Q?.indexOf(ie)!==-1){Q=void 0;return}Q=void 0;const fe=M0e(ie),de=$S(ae),ge=de&&F&&v7e(de,X);dye(ae,{name:fe?.pathname||zn.location.pathname,attributes:{[Mc]:"url",[so]:"auto.navigation.browser"}},{url:ie,isRedirect:ge})})}g&&a7e(),s&&m7e(ae,f,h,p,t),n&&J9e(),QLe(ae,{traceFetch:_,traceXHR:b,trackFetchStreamPerformance:E,tracePropagationTargets:ae.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:P,onRequestSpanStart:W})}}});function uye(e,t,r){e.emit("startPageLoadSpan",t,r),oa().setTransactionName(t.name);const n=$S(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function dye(e,t,r){const{url:n,isRedirect:i}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const a=oa();return a.setTransactionName(t.name),n&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...kq(),url:n}}),$S(e)}function dQ(e){return zn.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function m7e(e,t,r,n,i){const a=zn.document;let o;const s=()=>{const l="ui.action.click",c=$S(e);if(c){const d=Bi(c).op;
23if(["navigation","pageload"].includes(d)){Ol&&br.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(PR,"interactionInterrupted"),o.end(),o=void 0),!i.name){Ol&&br.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=g0e({name:i.name,op:l,attributes:{[Mc]:i.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:n})};a&&addEventListener("click",s,{capture:!0})}const fye="_sentry_idleSpan";function $S(e){return e[fye]}function fQ(e,t){dc(e,fye,t)}const hQ=.3;function v7e(e,t){const r=Bi(e),n=Kg(),i=r.start_timestamp;return!(n-i>hQ||t&&n-t<=hQ)}function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zq(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var EN={exports:{}},Ni={},wN,pQ;function hye(){if(pQ)return wN;pQ=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(d){return o[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return wN=i()?Object.assign:function(a,o){for(var s,l=n(a),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var h=0;h<c.length;h++)r.call(s,c[h])&&(l[c[h]]=s[c[h]])}}return l},wN}var mQ;function g7e(){if(mQ)return Ni;mQ=1;var e=hye(),t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,p=typeof Symbol=="function"&&Symbol.iterator;function g(ce){for(var pe="https://reactjs.org/docs/error-decoder.html?invariant="+ce,Ne=1;Ne<arguments.length;Ne++)pe+="&args[]="+encodeURIComponent(arguments[Ne]);return"Minified React error #"+ce+"; visit "+pe+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function E(ce,pe,Ne){this.props=ce,this.context=pe,this.refs=b,this.updater=Ne||_}E.prototype.isReactComponent={},E.prototype.setState=function(ce,pe){if(typeof ce!="object"&&typeof ce!="function"&&ce!=null)throw Error(g(85));this.updater.enqueueSetState(this,ce,pe,"setState")},E.prototype.forceUpdate=function(ce){this.updater.enqueueForceUpdate(this,ce,"forceUpdate")};function S(){}S.prototype=E.prototype;function P(ce,pe,Ne){this.props=ce,this.context=pe,this.refs=b,this.updater=Ne||_}var O=P.prototype=new S;O.constructor=P,e(O,E.prototype),O.isPureReactComponent=!0;var I={current:null},N=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0};function F(ce,pe,Ne){var De,Ve={},Ke=null,Qe=null;if(pe!=null)for(De in pe.ref!==void 0&&(Qe=pe.ref),pe.key!==void 0&&(Ke=""+pe.key),pe)N.call(pe,De)&&!M.hasOwnProperty(De)&&(Ve[De]=pe[De]);var Ue=arguments.length-2;if(Ue===1)Ve.children=Ne;else if(1<Ue){for(var ut=Array(Ue),We=0;We<Ue;We++)ut[We]=arguments[We+2];Ve.children=ut}if(ce&&ce.defaultProps)for(De in Ue=ce.defaultProps,Ue)Ve[De]===void 0&&(Ve[De]=Ue[De]);return{$$typeof:r,type:ce,key:Ke,ref:Qe,props:Ve,_owner:I.current}}function B(ce,pe){return{$$typeof:r,type:ce.type,key:pe,ref:ce.ref,props:ce.props,_owner:ce._owner}}function V(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===r}function W(ce){var pe={"=":"=0",":":"=2"};return"$"+(""+ce).replace(/[=:]/g,function(Ne){return pe[Ne]})}var $=/\/+/g,X=[];function re(ce,pe,Ne,De){if(X.length){var Ve=X.pop();return Ve.result=ce,Ve.keyPrefix=pe,Ve.func=Ne,Ve.context=De,Ve.count=0,Ve}return{result:ce,keyPrefix:pe,func:Ne,context:De,count:0}}function ae(ce){ce.result=null,ce.keyPrefix=null,ce.func=null,ce.context=null,ce.count=0,10>X.length&&X.push(ce)}function Q(ce,pe,Ne,De){var Ve=typeof ce;(Ve==="undefined"||Ve==="boolean")&&(ce=null);var Ke=!1;if(ce===null)Ke=!0;else switch(Ve){case"string":case"number":Ke=!0;break;case"object":switch(ce.$$typeof){case r:case n:Ke=!0}}if(Ke)return Ne(De,ce,pe===""?"."+le(ce,0):pe),1;if(Ke=0,pe=pe===""?".":pe+":",Array.isArray(ce))for(var Qe=0;Qe<ce.length;Qe++){Ve=ce[Qe];var Ue=pe+le(Ve,Qe);Ke+=Q(Ve,Ue,Ne,De)}else if(ce===null||typeof ce!="object"?Ue=null:(Ue=p&&ce[p]||ce["@@iterator"],Ue=typeof Ue=="function"?Ue:null),typeof Ue=="function")for(ce=Ue.call(ce),Qe=0;!(Ve=ce.next()).done;)Ve=Ve.value,Ue=pe+le(Ve,Qe++),Ke+=Q(Ve,Ue,Ne,De);else if(Ve==="object")throw Ne=""+ce,Error(g(31,Ne==="[object Object]"?"object with keys {"+Object.keys(ce).join(", ")+"}":Ne,""));return Ke}
23function ie(ce,pe,Ne){return ce==null?0:Q(ce,"",pe,Ne)}function le(ce,pe){return typeof ce=="object"&&ce!==null&&ce.key!=null?W(ce.key):pe.toString(36)}function fe(ce,pe){ce.func.call(ce.context,pe,ce.count++)}function de(ce,pe,Ne){var De=ce.result,Ve=ce.keyPrefix;ce=ce.func.call(ce.context,pe,ce.count++),Array.isArray(ce)?ge(ce,De,Ne,function(Ke){return Ke}):ce!=null&&(V(ce)&&(ce=B(ce,Ve+(!ce.key||pe&&pe.key===ce.key?"":(""+ce.key).replace($,"$&/")+"/")+Ne)),De.push(ce))}function ge(ce,pe,Ne,De,Ve){var Ke="";Ne!=null&&(Ke=(""+Ne).replace($,"$&/")+"/"),pe=re(pe,Ke,De,Ve),ie(ce,de,pe),ae(pe)}var Ae={current:null};function Fe(){var ce=Ae.current;if(ce===null)throw Error(g(321));return ce}var Pe={ReactCurrentDispatcher:Ae,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:I,IsSomeRendererActing:{current:!1},assign:e};return Ni.Children={map:function(ce,pe,Ne){if(ce==null)return ce;var De=[];return ge(ce,De,null,pe,Ne),De},forEach:function(ce,pe,Ne){if(ce==null)return ce;pe=re(null,null,pe,Ne),ie(ce,fe,pe),ae(pe)},count:function(ce){return ie(ce,function(){return null},null)},toArray:function(ce){var pe=[];return ge(ce,pe,null,function(Ne){return Ne}),pe},only:function(ce){if(!V(ce))throw Error(g(143));return ce}},Ni.Component=E,Ni.Fragment=i,Ni.Profiler=o,Ni.PureComponent=P,Ni.StrictMode=a,Ni.Suspense=d,Ni.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pe,Ni.cloneElement=function(ce,pe,Ne){if(ce==null)throw Error(g(267,ce));var De=e({},ce.props),Ve=ce.key,Ke=ce.ref,Qe=ce._owner;if(pe!=null){if(pe.ref!==void 0&&(Ke=pe.ref,Qe=I.current),pe.key!==void 0&&(Ve=""+pe.key),ce.type&&ce.type.defaultProps)var Ue=ce.type.defaultProps;for(ut in pe)N.call(pe,ut)&&!M.hasOwnProperty(ut)&&(De[ut]=pe[ut]===void 0&&Ue!==void 0?Ue[ut]:pe[ut])}var ut=arguments.length-2;if(ut===1)De.children=Ne;else if(1<ut){Ue=Array(ut);for(var We=0;We<ut;We++)Ue[We]=arguments[We+2];De.children=Ue}return{$$typeof:r,type:ce.type,key:Ve,ref:Ke,props:De,_owner:Qe}},Ni.createContext=function(ce,pe){return pe===void 0&&(pe=null),ce={$$typeof:l,_calculateChangedBits:pe,_currentValue:ce,_currentValue2:ce,_threadCount:0,Provider:null,Consumer:null},ce.Provider={$$typeof:s,_context:ce},ce.Consumer=ce},Ni.createElement=F,Ni.createFactory=function(ce){var pe=F.bind(null,ce);return pe.type=ce,pe},Ni.createRef=function(){return{current:null}},Ni.forwardRef=function(ce){return{$$typeof:c,render:ce}},Ni.isValidElement=V,Ni.lazy=function(ce){return{$$typeof:h,_ctor:ce,_status:-1,_result:null}},Ni.memo=function(ce,pe){return{$$typeof:f,type:ce,compare:pe===void 0?null:pe}},Ni.useCallback=function(ce,pe){return Fe().useCallback(ce,pe)},Ni.useContext=function(ce,pe){return Fe().useContext(ce,pe)},Ni.useDebugValue=function(){},Ni.useEffect=function(ce,pe){return Fe().useEffect(ce,pe)},Ni.useImperativeHandle=function(ce,pe,Ne){return Fe().useImperativeHandle(ce,pe,Ne)},Ni.useLayoutEffect=function(ce,pe){return Fe().useLayoutEffect(ce,pe)},Ni.useMemo=function(ce,pe){return Fe().useMemo(ce,pe)},Ni.useReducer=function(ce,pe,Ne){return Fe().useReducer(ce,pe,Ne)},Ni.useRef=function(ce){return Fe().useRef(ce)},Ni.useState=function(ce){return Fe().useState(ce)},Ni.version="16.14.0",Ni}var vQ;function Dt(){return vQ||(vQ=1,EN.exports=g7e()),EN.exports}var x=Dt();const u=et(x);function y7e(e){const t={...e};return O0e(t,"react"),Q6e("react",{version:x.version}),XLe(t)}function _7e(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function b7e(e,t){const r=new WeakSet;function n(i,a){if(!r.has(i)){if(i.cause)return r.add(i),n(i.cause,a);i.cause=a}}n(e,t)}function E7e(e,{componentStack:t},r){if(_7e(x.version)&&d3(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,b7e(e,n)}return e_(n=>(n.setContext("react",{componentStack:t}),y0e(e,r)))}var SN={exports:{}},Di={},gQ;function w7e(){if(gQ)return Di;gQ=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function P(I){if(typeof I=="object"&&I!==null){var N=I.$$typeof;switch(N){case t:switch(I=I.type,I){case l:case c:case n:case a:case i:case f:return I;default:switch(I=I&&I.$$typeof,I){case s:case d:case g:case p:case o:return I;default:return N}}case r:return N}}}function O(I){return P(I)===c}return Di.AsyncMode=l,Di.ConcurrentMode=c,Di.ContextConsumer=s,Di.ContextProvider=o,Di.Element=t,Di.ForwardRef=d,Di.Fragment=n,Di.Lazy=g,Di.Memo=p,Di.Portal=r,Di.Profiler=a,Di.StrictMode=i,Di.Suspense=f,Di.isAsyncMode=function(I){return O(I)||P(I)===l},Di.isConcurrentMode=O,Di.isContextConsumer=function(I){return P(I)===s},Di.isContextProvider=function(I){return P(I)===o},Di.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},Di.isForwardRef=function(I){return P(I)===d},Di.isFragment=function(I){return P(I)===n},Di.isLazy=function(I){return P(I)===g},Di.isMemo=function(I){return P(I)===p},Di.isPortal=function(I){return P(I)===r},Di.isProfiler=function(I){return P(I)===a},Di.isStrictMode=function(I){return P(I)===i},Di.isSuspense=function(I){return P(I)===f}
23,Di.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===n||I===c||I===a||I===i||I===f||I===h||typeof I=="object"&&I!==null&&(I.$$typeof===g||I.$$typeof===p||I.$$typeof===o||I.$$typeof===s||I.$$typeof===d||I.$$typeof===b||I.$$typeof===E||I.$$typeof===S||I.$$typeof===_)},Di.typeOf=P,Di}var yQ;function S7e(){return yQ||(yQ=1,SN.exports=w7e()),SN.exports}var CN,_Q;function C7e(){if(_Q)return CN;_Q=1;var e=S7e(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function p(g,_,b){if(typeof _!="string"){if(h){var E=f(_);E&&E!==h&&p(g,E,b)}var S=l(_);c&&(S=S.concat(c(_)));for(var P=o(g),O=o(_),I=0;I<S.length;++I){var N=S[I];if(!r[N]&&!(b&&b[N])&&!(O&&O[N])&&!(P&&P[N])){var M=d(_,N);try{s(g,N,M)}catch{}}}}return g}return CN=p,CN}var x7e=C7e();const cg=et(x7e),T7e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xN={componentStack:null,error:null,eventId:null};let A7e=class extends x.Component{constructor(t){super(t),this.state=xN,this._openFallbackReportDialog=!0;const r=Hi();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&lQ({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,{beforeCapture:i,onError:a,showDialog:o,dialogOptions:s}=this.props;e_(l=>{i&&i(l,t,n);const c=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=E7e(t,r,{mechanism:{handled:c}});a&&a(t,n,d),o&&(this._lastEventId=d,this._openFallbackReportDialog&&lQ({...s,eventId:d})),this.setState({error:t,componentStack:n,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&(this.state===xN?i(null,null,null):i(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(xN)}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;const i=typeof t=="function"?x.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return x.isValidElement(i)?i:(t&&T7e&&br.warn("fallback did not produce a valid ReactElement"),null)}};function P7e(e){const t=p7e({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:r,routes:n,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(s){t.afterAllSetup(s),R7e(s,a,o,r,"reactrouter_v5",n,i)}}}function R7e(e,t,r,n,i,a=[],o){function s(){if(n.location)return n.location.pathname;if(zn.location)return zn.location.pathname}function l(c){if(a.length===0||!o)return[c,"url"];const d=pye(a,c,o);for(const f of d)if(f.match.isExact)return[f.match.path,"route"];return[c,"url"]}if(t){const c=s();if(c){const[d,f]=l(c);uye(e,{name:d,attributes:{[Du]:"pageload",[so]:`auto.pageload.react.${i}`,[Mc]:f}})}}r&&n.listen&&n.listen((c,d)=>{if(d&&(d==="PUSH"||d==="POP")){const[f,h]=l(c.pathname);dye(e,{name:f,attributes:{[Du]:"navigation",[so]:`auto.navigation.react.${i}`,[Mc]:h}})}})}function pye(e,t,r,n=[]){return e.some(i=>{const a=i.path?r(t,i):n.length?n[n.length-1].match:O7e(t);return a&&(n.push({route:i,match:a}),i.routes&&pye(i.routes,t,r,n)),!!a}),n}function O7e(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}var TN={exports:{}},Jl={},AN={exports:{}},PN={},bQ;function I7e(){return bQ||(bQ=1,(function(e){var t,r,n,i,a;if(typeof window>"u"||typeof MessageChannel!="function"){var o=null,s=null,l=function(){if(o!==null)try{var Pe=e.unstable_now();o(!0,Pe),o=null}catch(ce){throw setTimeout(l,0),ce}}
23,c=Date.now();e.unstable_now=function(){return Date.now()-c},t=function(Pe){o!==null?setTimeout(t,0,Pe):(o=Pe,setTimeout(l,0))},r=function(Pe,ce){s=setTimeout(Pe,ce)},n=function(){clearTimeout(s)},i=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var d=window.performance,f=window.Date,h=window.setTimeout,p=window.clearTimeout;if(typeof console<"u"){var g=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof g!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof d=="object"&&typeof d.now=="function")e.unstable_now=function(){return d.now()};else{var _=f.now();e.unstable_now=function(){return f.now()-_}}var b=!1,E=null,S=-1,P=5,O=0;i=function(){return e.unstable_now()>=O},a=function(){},e.unstable_forceFrameRate=function(Pe){0>Pe||125<Pe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):P=0<Pe?Math.floor(1e3/Pe):5};var I=new MessageChannel,N=I.port2;I.port1.onmessage=function(){if(E!==null){var Pe=e.unstable_now();O=Pe+P;try{E(!0,Pe)?N.postMessage(null):(b=!1,E=null)}catch(ce){throw N.postMessage(null),ce}}else b=!1},t=function(Pe){E=Pe,b||(b=!0,N.postMessage(null))},r=function(Pe,ce){S=h(function(){Pe(e.unstable_now())},ce)},n=function(){p(S),S=-1}}function M(Pe,ce){var pe=Pe.length;Pe.push(ce);e:for(;;){var Ne=pe-1>>>1,De=Pe[Ne];if(De!==void 0&&0<V(De,ce))Pe[Ne]=ce,Pe[pe]=De,pe=Ne;else break e}}function F(Pe){return Pe=Pe[0],Pe===void 0?null:Pe}function B(Pe){var ce=Pe[0];if(ce!==void 0){var pe=Pe.pop();if(pe!==ce){Pe[0]=pe;e:for(var Ne=0,De=Pe.length;Ne<De;){var Ve=2*(Ne+1)-1,Ke=Pe[Ve],Qe=Ve+1,Ue=Pe[Qe];if(Ke!==void 0&&0>V(Ke,pe))Ue!==void 0&&0>V(Ue,Ke)?(Pe[Ne]=Ue,Pe[Qe]=pe,Ne=Qe):(Pe[Ne]=Ke,Pe[Ve]=pe,Ne=Ve);else if(Ue!==void 0&&0>V(Ue,pe))Pe[Ne]=Ue,Pe[Qe]=pe,Ne=Qe;else break e}}return ce}return null}function V(Pe,ce){var pe=Pe.sortIndex-ce.sortIndex;return pe!==0?pe:Pe.id-ce.id}var W=[],$=[],X=1,re=null,ae=3,Q=!1,ie=!1,le=!1;function fe(Pe){for(var ce=F($);ce!==null;){if(ce.callback===null)B($);else if(ce.startTime<=Pe)B($),ce.sortIndex=ce.expirationTime,M(W,ce);else break;ce=F($)}}function de(Pe){if(le=!1,fe(Pe),!ie)if(F(W)!==null)ie=!0,t(ge);else{var ce=F($);ce!==null&&r(de,ce.startTime-Pe)}}function ge(Pe,ce){ie=!1,le&&(le=!1,n()),Q=!0;var pe=ae;try{for(fe(ce),re=F(W);re!==null&&(!(re.expirationTime>ce)||Pe&&!i());){var Ne=re.callback;if(Ne!==null){re.callback=null,ae=re.priorityLevel;var De=Ne(re.expirationTime<=ce);ce=e.unstable_now(),typeof De=="function"?re.callback=De:re===F(W)&&B(W),fe(ce)}else B(W);re=F(W)}if(re!==null)var Ve=!0;else{var Ke=F($);Ke!==null&&r(de,Ke.startTime-ce),Ve=!1}return Ve}finally{re=null,ae=pe,Q=!1}}function Ae(Pe){switch(Pe){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Fe=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Pe){Pe.callback=null},e.unstable_continueExecution=function(){ie||Q||(ie=!0,t(ge))},e.unstable_getCurrentPriorityLevel=function(){return ae},e.unstable_getFirstCallbackNode=function(){return F(W)},e.unstable_next=function(Pe){switch(ae){case 1:case 2:case 3:var ce=3;break;default:ce=ae}var pe=ae;ae=ce;try{return Pe()}finally{ae=pe}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Fe,e.unstable_runWithPriority=function(Pe,ce){switch(Pe){case 1:case 2:case 3:case 4:case 5:break;default:Pe=3}var pe=ae;ae=Pe;try{return ce()}finally{ae=pe}},e.unstable_scheduleCallback=function(Pe,ce,pe){var Ne=e.unstable_now();if(typeof pe=="object"&&pe!==null){var De=pe.delay;De=typeof De=="number"&&0<De?Ne+De:Ne,pe=typeof pe.timeout=="number"?pe.timeout:Ae(Pe)}else pe=Ae(Pe),De=Ne;return pe=De+pe,Pe={id:X++,callback:ce,priorityLevel:Pe,startTime:De,expirationTime:pe,sortIndex:-1},De>Ne?(Pe.sortIndex=De,M($,Pe),F(W)===null&&Pe===F($)&&(le?n():le=!0,r(de,De-Ne))):(Pe.sortIndex=pe,M(W,Pe),ie||Q||(ie=!0,t(ge))),Pe},e.unstable_shouldYield=function(){var Pe=e.unstable_now();fe(Pe);var ce=F(W);return ce!==re&&re!==null&&ce!==null&&ce.callback!==null&&ce.startTime<=Pe&&ce.expirationTime<re.expirationTime||i()},e.unstable_wrapCallback=function(Pe){var ce=ae;return function(){var pe=ae;ae=ce;try{return Pe.apply(this,arguments)}finally{ae=pe}}}})(PN)),PN}var EQ;function k7e(){return EQ||(EQ=1,AN.exports=I7e()),AN.exports}var wQ;
23function N7e(){if(wQ)return Jl;wQ=1;var e=Dt(),t=hye(),r=k7e();function n(v){for(var w="https://reactjs.org/docs/error-decoder.html?invariant="+v,R=1;R<arguments.length;R++)w+="&args[]="+encodeURIComponent(arguments[R]);return"Minified React error #"+v+"; visit "+w+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!e)throw Error(n(227));function i(v,w,R,H,G,ye,Ce,Me,St){var Ct=Array.prototype.slice.call(arguments,3);try{w.apply(R,Ct)}catch(xr){this.onError(xr)}}var a=!1,o=null,s=!1,l=null,c={onError:function(v){a=!0,o=v}};function d(v,w,R,H,G,ye,Ce,Me,St){a=!1,o=null,i.apply(c,arguments)}function f(v,w,R,H,G,ye,Ce,Me,St){if(d.apply(this,arguments),a){if(a){var Ct=o;a=!1,o=null}else throw Error(n(198));s||(s=!0,l=Ct)}}var h=null,p=null,g=null;function _(v,w,R){var H=v.type||"unknown-event";v.currentTarget=g(R),f(H,w,void 0,v),v.currentTarget=null}var b=null,E={};function S(){if(b)for(var v in E){var w=E[v],R=b.indexOf(v);if(!(-1<R))throw Error(n(96,v));if(!O[R]){if(!w.extractEvents)throw Error(n(97,v));O[R]=w,R=w.eventTypes;for(var H in R){var G=void 0,ye=R[H],Ce=w,Me=H;if(I.hasOwnProperty(Me))throw Error(n(99,Me));I[Me]=ye;var St=ye.phasedRegistrationNames;if(St){for(G in St)St.hasOwnProperty(G)&&P(St[G],Ce,Me);G=!0}else ye.registrationName?(P(ye.registrationName,Ce,Me),G=!0):G=!1;if(!G)throw Error(n(98,H,v))}}}}function P(v,w,R){if(N[v])throw Error(n(100,v));N[v]=w,M[v]=w.eventTypes[R].dependencies}var O=[],I={},N={},M={};function F(v){var w=!1,R;for(R in v)if(v.hasOwnProperty(R)){var H=v[R];if(!E.hasOwnProperty(R)||E[R]!==H){if(E[R])throw Error(n(102,R));E[R]=H,w=!0}}w&&S()}var B=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V=null,W=null,$=null;function X(v){if(v=p(v)){if(typeof V!="function")throw Error(n(280));var w=v.stateNode;w&&(w=h(w),V(v.stateNode,v.type,w))}}function re(v){W?$?$.push(v):$=[v]:W=v}function ae(){if(W){var v=W,w=$;if($=W=null,X(v),w)for(v=0;v<w.length;v++)X(w[v])}}function Q(v,w){return v(w)}function ie(v,w,R,H,G){return v(w,R,H,G)}function le(){}var fe=Q,de=!1,ge=!1;function Ae(){(W!==null||$!==null)&&(le(),ae())}function Fe(v,w,R){if(ge)return v(w,R);ge=!0;try{return fe(v,w,R)}finally{ge=!1,Ae()}}var Pe=/^[: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]*$/,ce=Object.prototype.hasOwnProperty,pe={},Ne={};function De(v){return ce.call(Ne,v)?!0:ce.call(pe,v)?!1:Pe.test(v)?Ne[v]=!0:(pe[v]=!0,!1)}function Ve(v,w,R,H){if(R!==null&&R.type===0)return!1;switch(typeof w){case"function":case"symbol":return!0;case"boolean":return H?!1:R!==null?!R.acceptsBooleans:(v=v.toLowerCase().slice(0,5),v!=="data-"&&v!=="aria-");default:return!1}}function Ke(v,w,R,H){if(w===null||typeof w>"u"||Ve(v,w,R,H))return!0;if(H)return!1;if(R!==null)switch(R.type){case 3:return!w;case 4:return w===!1;case 5:return isNaN(w);case 6:return isNaN(w)||1>w}return!1}function Qe(v,w,R,H,G,ye){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=H,this.attributeNamespace=G,this.mustUseProperty=R,this.propertyName=v,this.type=w,this.sanitizeURL=ye}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(v){Ue[v]=new Qe(v,0,!1,v,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(v){var w=v[0];Ue[w]=new Qe(w,1,!1,v[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(v){Ue[v]=new Qe(v,2,!1,v.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(v){Ue[v]=new Qe(v,2,!1,v,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInl
23ine readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(v){Ue[v]=new Qe(v,3,!1,v.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(v){Ue[v]=new Qe(v,3,!0,v,null,!1)}),["capture","download"].forEach(function(v){Ue[v]=new Qe(v,4,!1,v,null,!1)}),["cols","rows","size","span"].forEach(function(v){Ue[v]=new Qe(v,6,!1,v,null,!1)}),["rowSpan","start"].forEach(function(v){Ue[v]=new Qe(v,5,!1,v.toLowerCase(),null,!1)});var ut=/[\-:]([a-z])/g;function We(v){return v[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(v){var w=v.replace(ut,We);Ue[w]=new Qe(w,1,!1,v,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(v){var w=v.replace(ut,We);Ue[w]=new Qe(w,1,!1,v,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(v){var w=v.replace(ut,We);Ue[w]=new Qe(w,1,!1,v,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(v){Ue[v]=new Qe(v,1,!1,v.toLowerCase(),null,!1)}),Ue.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(v){Ue[v]=new Qe(v,1,!1,v.toLowerCase(),null,!0)});var ke=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ke.hasOwnProperty("ReactCurrentDispatcher")||(ke.ReactCurrentDispatcher={current:null}),ke.hasOwnProperty("ReactCurrentBatchConfig")||(ke.ReactCurrentBatchConfig={suspense:null});function Le(v,w,R,H){var G=Ue.hasOwnProperty(w)?Ue[w]:null,ye=G!==null?G.type===0:H?!1:!(!(2<w.length)||w[0]!=="o"&&w[0]!=="O"||w[1]!=="n"&&w[1]!=="N");ye||(Ke(w,R,G,H)&&(R=null),H||G===null?De(w)&&(R===null?v.removeAttribute(w):v.setAttribute(w,""+R)):G.mustUseProperty?v[G.propertyName]=R===null?G.type===3?!1:"":R:(w=G.attributeName,H=G.attributeNamespace,R===null?v.removeAttribute(w):(G=G.type,R=G===3||G===4&&R===!0?"":""+R,H?v.setAttributeNS(H,w,R):v.setAttribute(w,R))))}var Be=/^(.*)[\\\/]/,Ze=typeof Symbol=="function"&&Symbol.for,Et=Ze?Symbol.for("react.element"):60103,Yt=Ze?Symbol.for("react.portal"):60106,sr=Ze?Symbol.for("react.fragment"):60107,Kt=Ze?Symbol.for("react.strict_mode"):60108,Qt=Ze?Symbol.for("react.profiler"):60114,qt=Ze?Symbol.for("react.provider"):60109,hr=Ze?Symbol.for("react.context"):60110,rr=Ze?Symbol.for("react.concurrent_mode"):60111,tr=Ze?Symbol.for("react.forward_ref"):60112,dt=Ze?Symbol.for("react.suspense"):60113,bt=Ze?Symbol.for("react.suspense_list"):60120,nr=Ze?Symbol.for("react.memo"):60115,Ee=Ze?Symbol.for("react.lazy"):60116,Oe=Ze?Symbol.for("react.block"):60121,Re=typeof Symbol=="function"&&Symbol.iterator;function pt(v){return v===null||typeof v!="object"?null:(v=Re&&v[Re]||v["@@iterator"],typeof v=="function"?v:null)}function mt(v){if(v._status===-1){v._status=0;var w=v._ctor;w=w(),v._result=w,w.then(function(R){v._status===0&&(R=R.default,v._status=1,v._result=R)},function(R){v._status===0&&(v._status=2,v._result=R)})}}function st(v){if(v==null)return null;if(typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case sr:return"Fragment";case Yt:return"Portal";case Qt:return"Profiler";case Kt:return"StrictMode";case dt:return"Suspense";case bt:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case hr:return"Context.Consumer";case qt:return"Context.Provider";case tr:var w=v.render;return w=w.displayName||w.name||"",v.displayName||(w!==""?"ForwardRef("+w+")":"ForwardRef");case nr:return st(v.type);case Oe:return st(v.render);case Ee:if(v=v._status===1?v._result:null)return st(v)}return null}function ze(v){var w="";do{e:switch(v.tag){case 3:case 4:case 6:case 7:case 10:case 9:var R="";break e;default:var H=v._debugOwner,G=v._debugSource,ye=st(v.type);R=null,H&&(R=st(H.type)),H=ye,ye="",G?ye=" (at "+G.fileName.replace(Be,"")+":"+G.lineNumber+")":R&&(ye=" (created by "+R+")"),R=`
24    in `+(H||"Unknown")+ye}w+=R,v=v.return}while(v);return w}function it(v){switch(typeof v){case"boolean":case"number":case"object":case"string":case"undefined":return v;default:return""}}function Je(v){var w=v.type;return(v=v.nodeName)&&v.toLowerCase()==="input"&&(w==="checkbox"||w==="radio")}function Jt(v){var w=Je(v)?"checked":"value",R=Object.getOwnPropertyDescriptor(v.constructor.prototype,w),H=""+v[w];if(!v.hasOwnProperty(w)&&typeof R<"u"&&typeof R.get=="function"&&typeof R.set=="function"){var G=R.get,ye=R.set;return Object.defineProperty(v,w,{configurable:!0,get:function(){return G.call(this)},set:function(Ce){H=""+Ce,ye.call(this,Ce)}}),Object.defineProperty(v,w,{enumerable:R.enumerable}),{getValue:function(){return H},setValue:function(Ce){H=""+Ce},stopTracking:function(){v._valueTracker=null,delete v[w]}}}}function pr(v){v._valueTracker||(v._valueTracker=Jt(v))}function Fr(v){if(!v)return!1;var w=v._valueTracker;if(!w)return!0;var R=w.getValue(),H="";return v&&(H=Je(v)?v.checked?"true":"false":v.value),v=H,v!==R?(w.setValue(v),!0):!1}function Or(v,w){var R=w.checked;return t({},w,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:R??v._wrapperState.initialChecked})}function vn(v,w){var R=w.defaultValue==null?"":w.defaultValue,H=w.checked!=null?w.checked:w.defaultChecked;R=it(w.value!=null?w.value:R),v._wrapperState={initialChecked:H,initialValue:R,controlled:w.t
vendor: 5,552 bytes, line 24
24ype==="checkbox"||w.type==="radio"?w.checked!=null:w.value!=null}}function cn(v,w){w=w.checked,w!=null&&Le(v,"checked",w,!1)}function Xr(v,w){cn(v,w);var R=it(w.value),H=w.type;if(R!=null)H==="number"?(R===0&&v.value===""||v.value!=R)&&(v.value=""+R):v.value!==""+R&&(v.value=""+R);else if(H==="submit"||H==="reset"){v.removeAttribute("value");return}w.hasOwnProperty("value")?fn(v,w.type,R):w.hasOwnProperty("defaultValue")&&fn(v,w.type,it(w.defaultValue)),w.checked==null&&w.defaultChecked!=null&&(v.defaultChecked=!!w.defaultChecked)}function Zr(v,w,R){if(w.hasOwnProperty("value")||w.hasOwnProperty("defaultValue")){var H=w.type;if(!(H!=="submit"&&H!=="reset"||w.value!==void 0&&w.value!==null))return;w=""+v._wrapperState.initialValue,R||w===v.value||(v.value=w),v.defaultValue=w}R=v.name,R!==""&&(v.name=""),v.defaultChecked=!!v._wrapperState.initialChecked,R!==""&&(v.name=R)}function fn(v,w,R){(w!=="number"||v.ownerDocument.activeElement!==v)&&(R==null?v.defaultValue=""+v._wrapperState.initialValue:v.defaultValue!==""+R&&(v.defaultValue=""+R))}function vs(v){var w="";return e.Children.forEach(v,function(R){R!=null&&(w+=R)}),w}function Ar(v,w){return v=t({children:void 0},w),(w=vs(w.children))&&(v.children=w),v}function Ir(v,w,R,H){if(v=v.options,w){w={};for(var G=0;G<R.length;G++)w["$"+R[G]]=!0;for(R=0;R<v.length;R++)G=w.hasOwnProperty("$"+v[R].value),v[R].selected!==G&&(v[R].selected=G),G&&H&&(v[R].defaultSelected=!0)}else{for(R=""+it(R),w=null,G=0;G<v.length;G++){if(v[G].value===R){v[G].selected=!0,H&&(v[G].defaultSelected=!0);return}w!==null||v[G].disabled||(w=v[G])}w!==null&&(w.selected=!0)}}function Ln(v,w){if(w.dangerouslySetInnerHTML!=null)throw Error(n(91));return t({},w,{value:void 0,defaultValue:void 0,children:""+v._wrapperState.initialValue})}function Wn(v,w){var R=w.value;if(R==null){if(R=w.children,w=w.defaultValue,R!=null){if(w!=null)throw Error(n(92));if(Array.isArray(R)){if(!(1>=R.length))throw Error(n(93));R=R[0]}w=R}w==null&&(w=""),R=w}v._wrapperState={initialValue:it(R)}}function wr(v,w){var R=it(w.value),H=it(w.defaultValue);R!=null&&(R=""+R,R!==v.value&&(v.value=R),w.defaultValue==null&&v.defaultValue!==R&&(v.defaultValue=R)),H!=null&&(v.defaultValue=""+H)}function jt(v){var w=v.textContent;w===v._wrapperState.initialValue&&w!==""&&w!==null&&(v.value=w)}var gn={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Xa(v){switch(v){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 la(v,w){return v==null||v==="http://www.w3.org/1999/xhtml"?Xa(w):v==="http://www.w3.org/2000/svg"&&w==="foreignObject"?"http://www.w3.org/1999/xhtml":v}var si,Ho=(function(v){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(w,R,H,G){MSApp.execUnsafeLocalFunction(function(){return v(w,R,H,G)})}:v})(function(v,w){if(v.namespaceURI!==gn.svg||"innerHTML"in v)v.innerHTML=w;else{for(si=si||document.createElement("div"),si.innerHTML="<svg>"+w.valueOf().toString()+"</svg>",w=si.firstChild;v.firstChild;)v.removeChild(v.firstChild);for(;w.firstChild;)v.appendChild(w.firstChild)}});function gs(v,w){if(w){var R=v.firstChild;if(R&&R===v.lastChild&&R.nodeType===3){R.nodeValue=w;return}}v.textContent=w}function ga(v,w){var R={};return R[v.toLowerCase()]=w.toLowerCase(),R["Webkit"+v]="webkit"+w,R["Moz"+v]="moz"+w,R}var ya={animationend:ga("Animation","AnimationEnd"),animationiteration:ga("Animation","AnimationIteration"),animationstart:ga("Animation","AnimationStart"),transitionend:ga("Transition","TransitionEnd")},Ui={},rs={};B&&(rs=document.createElement("div").style,"AnimationEvent"in window||(delete ya.animationend.animation,delete ya.animationiteration.animation,delete ya.animationstart.animation),"TransitionEvent"in window||delete ya.transitionend.transition);function Za(v){if(Ui[v])return Ui[v];if(!ya[v])return v;var w=ya[v],R;for(R in w)if(w.hasOwnProperty(R)&&R in rs)return Ui[v]=w[R];return v}var Io=Za("animationend"),hl=Za("animationiteration"),pl=Za("animationstart"),Hl=Za("transitionend"),Ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qu=new(typeof WeakMap=="function"?WeakMap:Map);function wo(v){var w=qu.get(v);return w===void 0&&(w=new Map,qu.set(v,w)),w}function Uo(v){var w=v,R=v;if(v.alternate)for(;w.return;)w=w.return;else{v=w;do w=v,(w.effectTag&1026)!==0&&(R=w.return),v=w.return;while(v)}return w.tag===3?R:null}function ju(v){if(v.tag===13){var w=v.memoizedState;if(w===null&&(v=v.alternate,v!==null&&(w=v.memoizedState)),w!==null)return w.dehydrated}return null}function Vl(v){if(Uo(v)!==v)throw Error(n(188))}function ql(v){var w=v.alternate;if(!w){if(w=Uo(v),w===null)throw Error(n(188));return w!==v?null:v}for(var R=v,H=w;;){var G=R.return;if(G===null)break;var ye=G.alternate;if(ye===null){if(H=G.return,H!==null){R=H;continue}break}if(G.child===ye.child){for(ye=G.child;ye;){if(ye===R)return Vl(G),v;if(ye===H)return Vl(G),w;ye=ye.sibling}throw Error(n(188))}if(R.return!==H.return)R=G,H=ye;else{for(var Ce=!1,Me=G.child;Me;){if(Me===R){Ce=!0,R=G,H=ye;break}if(Me===H){Ce=!0,H=G,R=ye;break}Me=Me.sibling}if(!Ce){for(Me=ye.child;Me;){if(Me===R){Ce=!0,R=ye,H=G;break}if(Me===H){Ce=!0,H=ye,R=G;break}Me=Me.sibling}if(!Ce)throw Error(n(189))}}if(R.alternate!==H)throw Error(n(190))}if(R.tag!==3)throw Error(n(188));return R.stateNode.current===R?v:w}
24function _c(v){if(v=ql(v),!v)return null;for(var w=v;;){if(w.tag===5||w.tag===6)return w;if(w.child)w.child.return=w,w=w.child;else{if(w===v)break;for(;!w.sibling;){if(!w.return||w.return===v)return null;w=w.return}w.sibling.return=w.return,w=w.sibling}}return null}function js(v,w){if(w==null)throw Error(n(30));return v==null?w:Array.isArray(v)?Array.isArray(w)?(v.push.apply(v,w),v):(v.push(w),v):Array.isArray(w)?[v].concat(w):[v,w]}function ys(v,w,R){Array.isArray(v)?v.forEach(w,R):v&&w.call(R,v)}var hn=null;function fi(v){if(v){var w=v._dispatchListeners,R=v._dispatchInstances;if(Array.isArray(w))for(var H=0;H<w.length&&!v.isPropagationStopped();H++)_(v,w[H],R[H]);else w&&_(v,w,R);v._dispatchListeners=null,v._dispatchInstances=null,v.isPersistent()||v.constructor.release(v)}}function Ai(v){if(v!==null&&(hn=js(hn,v)),v=hn,hn=null,v){if(ys(v,fi),hn)throw Error(n(95));if(s)throw v=l,s=!1,l=null,v}}function gt(v){return v=v.target||v.srcElement||window,v.correspondingUseElement&&(v=v.correspondingUseElement),v.nodeType===3?v.parentNode:v}function tt(v){if(!B)return!1;v="on"+v;var w=v in document;return w||(w=document.createElement("div"),w.setAttribute(v,"return;"),w=typeof w[v]=="function"),w}var ft=[];function Tt(v){v.topLevelType=null,v.nativeEvent=null,v.targetInst=null,v.ancestors.length=0,10>ft.length&&ft.push(v)}function vr(v,w,R,H){if(ft.length){var G=ft.pop();return G.topLevelType=v,G.eventSystemFlags=H,G.nativeEvent=w,G.targetInst=R,G}return{topLevelType:v,eventSystemFlags:H,nativeEvent:w,targetInst:R,ancestors:[]}}function Pn(v){var w=v.targetInst,R=w;do{if(!R){v.ancestors.push(R);break}var H=R;if(H.tag===3)H=H.stateNode.containerInfo;else{for(;H.return;)H=H.return;H=H.tag!==3?null:H.stateNode.containerInfo}if(!H)break;w=R.tag,w!==5&&w!==6||v.ancestors.push(R),R=vl(H)}while(R);for(R=0;R<v.ancestors.length;R++){w=v.ancestors[R];var G=gt(v.nativeEvent);H=v.topLevelType;var ye=v.nativeEvent,Ce=v.eventSystemFlags;R===0&&(Ce|=64);for(var Me=null,St=0;St<O.length;St++){var Ct=O[St];Ct&&(Ct=Ct.extractEvents(H,w,ye,G,Ce))&&(Me=js(Me,Ct))}Ai(Me)}}function rn(v,w,R){if(!R.has(v)){switch(v){case"scroll":ru(w,"scroll",!0);break;case"focus":case"blur":ru(w,"focus",!0),ru(w,"blur",!0),R.set("blur",null),R.set("focus",null);break;case"cancel":case"close":tt(v)&&ru(w,v,!0);break;case"invalid":case"submit":case"reset":break;default:Ul.indexOf(v)===-1&&Zi(v,w)}R.set(v,null)}}var Pi,_a,Ri,Un=!1,Xn=[],Gn=null,yi=null,ns=null,bc=new Map,ml=new Map,eu=[],nf="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(" "),$s="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Qa(v,w){var R=wo(w);nf.forEach(function(H){rn(H,w,R)}),$s.forEach(function(H){rn(H,w,R)})}function af(v,w,R,H,G){return{blockedOn:v,topLevelType:w,eventSystemFlags:R|32,nativeEvent:G,container:H}}function $u(v,w){switch(v){case"focus":case"blur":Gn=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":ns=null;break;case"pointerover":case"pointerout":bc.delete(w.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(w.pointerId)}}function Wu(v,w,R,H,G,ye){return v===null||v.nativeEvent!==ye?(v=af(w,R,H,G,ye),w!==null&&(w=So(w),w!==null&&_a(w)),v):(v.eventSystemFlags|=H,v)}function Br(v,w,R,H,G){switch(w){case"focus":return Gn=Wu(Gn,v,w,R,H,G),!0;case"dragenter":return yi=Wu(yi,v,w,R,H,G),!0;case"mouseover":return ns=Wu(ns,v,w,R,H,G),!0;case"pointerover":var ye=G.pointerId;return bc.set(ye,Wu(bc.get(ye)||null,v,w,R,H,G)),!0;case"gotpointercapture":return ye=G.pointerId,ml.set(ye,Wu(ml.get(ye)||null,v,w,R,H,G)),!0}return!1}function W_(v){var w=vl(v.target);if(w!==null){var R=Uo(w);if(R!==null){if(w=R.tag,w===13){if(w=ju(R),w!==null){v.blockedOn=w,r.unstable_runWithPriority(v.priority,function(){Ri(R)});return}}else if(w===3&&R.stateNode.hydrate){v.blockedOn=R.tag===3?R.stateNode.containerInfo:null;return}}}v.blockedOn=null}function nn(v){if(v.blockedOn!==null)return!1;var w=jm(v.topLevelType,v.eventSystemFlags,v.container,v.nativeEvent);if(w!==null){var R=So(w);return R!==null&&_a(R),v.blockedOn=w,!1}return!0}function Ws(v,w,R){nn(v)&&R.delete(w)}function Oi(){for(Un=!1;0<Xn.length;){var v=Xn[0];if(v.blockedOn!==null){v=So(v.blockedOn),v!==null&&Pi(v);break}var w=jm(v.topLevelType,v.eventSystemFlags,v.container,v.nativeEvent);w!==null?v.blockedOn=w:Xn.shift()}Gn!==null&&nn(Gn)&&(Gn=null),yi!==null&&nn(yi)&&(yi=null),ns!==null&&nn(ns)&&(ns=null),bc.forEac
24h(Ws),ml.forEach(Ws)}function Gu(v,w){v.blockedOn===w&&(v.blockedOn=null,Un||(Un=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Oi)))}function of(v){function w(G){return Gu(G,v)}if(0<Xn.length){Gu(Xn[0],v);for(var R=1;R<Xn.length;R++){var H=Xn[R];H.blockedOn===v&&(H.blockedOn=null)}}for(Gn!==null&&Gu(Gn,v),yi!==null&&Gu(yi,v),ns!==null&&Gu(ns,v),bc.forEach(w),ml.forEach(w),R=0;R<eu.length;R++)H=eu[R],H.blockedOn===v&&(H.blockedOn=null);for(;0<eu.length&&(R=eu[0],R.blockedOn===null);)W_(R),R.blockedOn===null&&eu.shift()}var Nh={},Dh=new Map,jl=new Map,qm=["abort","abort",Io,"animationEnd",hl,"animationIteration",pl,"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",Hl,"transitionEnd","waiting","waiting"];function tu(v,w){for(var R=0;R<v.length;R+=2){var H=v[R],G=v[R+1],ye="on"+(G[0].toUpperCase()+G.slice(1));
24ye={phasedRegistrationNames:{bubbled:ye,captured:ye+"Capture"},dependencies:[H],eventPriority:w},jl.set(H,w),Dh.set(H,ye),Nh[G]=ye}}tu("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),tu("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),tu(qm,2);for(var Ja="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),$l=0;$l<Ja.length;$l++)jl.set(Ja[$l],0);var eo=r.unstable_UserBlockingPriority,b0=r.unstable_runWithPriority,Mh=!0;function Zi(v,w){ru(w,v,!1)}function ru(v,w,R){var H=jl.get(w);switch(H===void 0?2:H){case 0:H=G_.bind(null,w,1,v);break;case 1:H=E0.bind(null,w,1,v);break;default:H=Rn.bind(null,w,1,v)}R?v.addEventListener(w,H,!0):v.addEventListener(w,H,!1)}function G_(v,w,R,H){de||le();var G=Rn,ye=de;de=!0;try{ie(G,v,w,R,H)}finally{(de=ye)||Ae()}}function E0(v,w,R,H){b0(eo,Rn.bind(null,v,w,R,H))}function Rn(v,w,R,H){if(Mh)if(0<Xn.length&&-1<nf.indexOf(v))v=af(null,v,w,R,H),Xn.push(v);else{var G=jm(v,w,R,H);if(G===null)$u(v,H);else if(-1<nf.indexOf(v))v=af(G,v,w,R,H),Xn.push(v);else if(!Br(G,v,w,R,H)){$u(v,H),v=vr(v,H,null,w);try{Fe(Pn,v)}finally{Tt(v)}}}}function jm(v,w,R,H){if(R=gt(H),R=vl(R),R!==null){var G=Uo(R);if(G===null)R=null;else{var ye=G.tag;if(ye===13){if(R=ju(G),R!==null)return R;R=null}else if(ye===3){if(G.stateNode.hydrate)return G.tag===3?G.stateNode.containerInfo:null;R=null}else G!==R&&(R=null)}}v=vr(v,H,R,w);try{Fe(Pn,v)}finally{Tt(v)}return null}var an={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},sf=["Webkit","ms","Moz","O"];Object.keys(an).forEach(function(v){sf.forEach(function(w){w=w+v.charAt(0).toUpperCase()+v.substring(1),an[w]=an[v]})});function $m(v,w,R){return w==null||typeof w=="boolean"||w===""?"":R||typeof w!="number"||w===0||an.hasOwnProperty(v)&&an[v]?(""+w).trim():w+"px"}function w0(v,w){v=v.style;for(var R in w)if(w.hasOwnProperty(R)){var H=R.indexOf("--")===0,G=$m(R,w[R],H);R==="float"&&(R="cssFloat"),H?v.setProperty(R,G):v[R]=G}}var Wm=t({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 Gm(v,w){if(w){if(Wm[v]&&(w.children!=null||w.dangerouslySetInnerHTML!=null))throw Error(n(137,v,""));if(w.dangerouslySetInnerHTML!=null){if(w.children!=null)throw Error(n(60));if(!(typeof w.dangerouslySetInnerHTML=="object"&&"__html"in w.dangerouslySetInnerHTML))throw Error(n(61))}if(w.style!=null&&typeof w.style!="object")throw Error(n(62,""))}}function Lh(v,w){if(v.indexOf("-")===-1)return typeof w.is=="string";switch(v){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 S0=gn.html;function Wl(v,w){v=v.nodeType===9||v.nodeType===11?v:v.ownerDocument;var R=wo(v);w=M[w];for(var H=0;H<w.length;H++)rn(w[H],v,R)}function Ku(){}function Gs(v){if(v=v||(typeof document<"u"?document:void 0),typeof v>"u")return null;try{return v.activeElement||v.body}catch{return v.body}}function Ks(v){for(;v&&v.firstChild;)v=v.firstChild;return v}function C0(v,w){var R=Ks(v);v=0;for(var H;R;){if(R.nodeType===3){if(H=v+R.textContent.length,v<=w&&H>=w)return{node:R,offset:w-v};v=H}e:{for(;R;){if(R.nextSibling){R=R.nextSibling;break e}R=R.parentNode}R=void 0}R=Ks(R)}}
24function Km(v,w){return v&&w?v===w?!0:v&&v.nodeType===3?!1:w&&w.nodeType===3?Km(v,w.parentNode):"contains"in v?v.contains(w):v.compareDocumentPosition?!!(v.compareDocumentPosition(w)&16):!1:!1}function Gl(){for(var v=window,w=Gs();w instanceof v.HTMLIFrameElement;){try{var R=typeof w.contentWindow.location.href=="string"}catch{R=!1}if(R)v=w.contentWindow;else break;w=Gs(v.document)}return w}function Fh(v){var w=v&&v.nodeName&&v.nodeName.toLowerCase();return w&&(w==="input"&&(v.type==="text"||v.type==="search"||v.type==="tel"||v.type==="url"||v.type==="password")||w==="textarea"||v.contentEditable==="true")}var Ym="$",Bh="/$",zh="$?",_r="$!",q=null,Hh=null;function Xm(v,w){switch(v){case"button":case"input":case"select":case"textarea":return!!w.autoFocus}return!1}function Ec(v,w){return v==="textarea"||v==="option"||v==="noscript"||typeof w.children=="string"||typeof w.children=="number"||typeof w.dangerouslySetInnerHTML=="object"&&w.dangerouslySetInnerHTML!==null&&w.dangerouslySetInnerHTML.__html!=null}var Ys=typeof setTimeout=="function"?setTimeout:void 0,x0=typeof clearTimeout=="function"?clearTimeout:void 0;function nu(v){for(;v!=null;v=v.nextSibling){var w=v.nodeType;if(w===1||w===3)break}return v}function lf(v){v=v.previousSibling;for(var w=0;v;){if(v.nodeType===8){var R=v.data;if(R===Ym||R===_r||R===zh){if(w===0)return v;w--}else R===Bh&&w++}v=v.previousSibling}return null}var _s=Math.random().toString(36).slice(2),bs="__reactInternalInstance$"+_s,Ii="__reactEventHandlers$"+_s,yn="__reactContainere$"+_s;function vl(v){var w=v[bs];if(w)return w;for(var R=v.parentNode;R;){if(w=R[yn]||R[bs]){if(R=w.alternate,w.child!==null||R!==null&&R.child!==null)for(v=lf(v);v!==null;){if(R=v[bs])return R;v=lf(v)}return w}v=R,R=v.parentNode}return null}function So(v){return v=v[bs]||v[yn],!v||v.tag!==5&&v.tag!==6&&v.tag!==13&&v.tag!==3?null:v}function iu(v){if(v.tag===5||v.tag===6)return v.stateNode;throw Error(n(33))}function cf(v){return v[Ii]||null}function ko(v){do v=v.return;while(v&&v.tag!==5);return v||null}function Qi(v,w){var R=v.stateNode;if(!R)return null;var H=h(R);if(!H)return null;R=H[w];e:switch(w){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(H=!H.disabled)||(v=v.type,H=!(v==="button"||v==="input"||v==="select"||v==="textarea")),v=!H;break e;default:v=!1}if(v)return null;if(R&&typeof R!="function")throw Error(n(231,w,typeof R));return R}
24function gl(v,w,R){(w=Qi(v,R.dispatchConfig.phasedRegistrationNames[w]))&&(R._dispatchListeners=js(R._dispatchListeners,w),R._dispatchInstances=js(R._dispatchInstances,v))}function Es(v){if(v&&v.dispatchConfig.phasedRegistrationNames){for(var w=v._targetInst,R=[];w;)R.push(w),w=ko(w);for(w=R.length;0<w--;)gl(R[w],"captured",v);for(w=0;w<R.length;w++)gl(R[w],"bubbled",v)}}function Uh(v,w,R){v&&R&&R.dispatchConfig.registrationName&&(w=Qi(v,R.dispatchConfig.registrationName))&&(R._dispatchListeners=js(R._dispatchListeners,w),R._dispatchInstances=js(R._dispatchInstances,v))}function Vo(v){v&&v.dispatchConfig.registrationName&&Uh(v._targetInst,null,v)}function ws(v){ys(v,Es)}var da=null,_i=null,Vh=null;function au(){if(Vh)return Vh;var v,w=_i,R=w.length,H,G="value"in da?da.value:da.textContent,ye=G.length;for(v=0;v<R&&w[v]===G[v];v++);var Ce=R-v;for(H=1;H<=Ce&&w[R-H]===G[ye-H];H++);return Vh=G.slice(v,1<H?1-H:void 0)}function Yu(){return!0}function Kl(){return!1}function qo(v,w,R,H){this.dispatchConfig=v,this._targetInst=w,this.nativeEvent=R,v=this.constructor.Interface;for(var G in v)v.hasOwnProperty(G)&&((w=v[G])?this[G]=w(R):G==="target"?this.target=H:this[G]=R[G]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?Yu:Kl,this.isPropagationStopped=Kl,this}t(qo.prototype,{preventDefault:function(){this.defaultPrevented=!0;var v=this.nativeEvent;v&&(v.preventDefault?v.preventDefault():typeof v.returnValue!="unknown"&&(v.returnValue=!1),this.isDefaultPrevented=Yu)},stopPropagation:function(){var v=this.nativeEvent;v&&(v.stopPropagation?v.stopPropagation():typeof v.cancelBubble!="unknown"&&(v.cancelBubble=!0),this.isPropagationStopped=Yu)},persist:function(){this.isPersistent=Yu},isPersistent:Kl,destructor:function(){var v=this.constructor.Interface,w;for(w in v)this[w]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kl,this._dispatchInstances=this._dispatchListeners=null}}),qo.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(v){return v.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qo.extend=function(v){function w(){}function R(){return H.apply(this,arguments)}var H=this;w.prototype=H.prototype;var G=new w;return t(G,R.prototype),R.prototype=G,R.prototype.constructor=R,R.Interface=t({},H.Interface,v),R.extend=H.extend,Ss(R),R},Ss(qo);function qh(v,w,R,H){if(this.eventPool.length){var G=this.eventPool.pop();return this.call(G,v,w,R,H),G}return new this(v,w,R,H)}function jh(v){if(!(v instanceof this))throw Error(n(279));v.destructor(),10>this.eventPool.length&&this.eventPool.push(v)}function Ss(v){v.eventPool=[],v.getPooled=qh,v.release=jh}var Xu=qo.extend({data:null}),T0=qo.extend({data:null}),$h=[9,13,27,32],Zm=B&&"CompositionEvent"in window,Co=null;B&&"documentMode"in document&&(Co=document.documentMode);var K_=B&&"TextEvent"in window&&!Co,ou=B&&(!Zm||Co&&8<Co&&11>
24=Co),Wh=" ",to={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(" ")}},uf=!1;function Zn(v,w){switch(v){case"keyup":return $h.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Gh(v){return v=v.detail,typeof v=="object"&&"data"in v?v.data:null}var yl=!1;function Kh(v,w){switch(v){case"compositionend":return Gh(w);case"keypress":return w.which!==32?null:(uf=!0,Wh);case"textInput":return v=w.data,v===Wh&&uf?null:v;default:return null}}function df(v,w){if(yl)return v==="compositionend"||!Zm&&Zn(v,w)?(v=au(),Vh=_i=da=null,yl=!1,v):null;switch(v){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1<w.char.length)return w.char;if(w.which)return String.fromCharCode(w.which)}return null;case"compositionend":return ou&&w.locale!=="ko"?null:w.data;default:return null}}var Nn={eventTypes:to,extractEvents:function(v,w,R,H){var G;if(Zm)e:{switch(v){case"compositionstart":var ye=to.compositionStart;break e;case"compositionend":ye=to.compositionEnd;break e;case"compositionupdate":ye=to.compositionUpdate;break e}ye=void 0}else yl?Zn(v,R)&&(ye=to.compositionEnd):v==="keydown"&&R.keyCode===229&&(ye=to.compositionStart);return ye?(ou&&R.locale!=="ko"&&(yl||ye!==to.compositionStart?ye===to.compositionEnd&&yl&&(G=au()):(da=H,_i="value"in da?da.value:da.textContent,yl=!0)),ye=Xu.getPooled(ye,w,R,H),G?ye.data=G:(G=Gh(R),G!==null&&(ye.data=G)),ws(ye),G=ye):G=null,(v=K_?Kh(v,R):df(v,R))?(w=T0.getPooled(to.beforeInput,w,R,H),w.data=v,ws(w)):w=null,G===null?w:w===null?G:[G,w]}},y={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 T(v){var w=v&&v.nodeName&&v.nodeName.toLowerCase();return w==="input"?!!y[v.type]:w==="textarea"}var A={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function k(v,w,R){return v=qo.getPooled(A.change,v,w,R),v.type="change",re(R),ws(v),v}var z=null,U=null;function Y(v){Ai(v)}function Z(v){var w=iu(v);if(Fr(w))return v}function ue(v,w){if(v==="change")return w}var he=!1;B&&(he=tt("input")&&(!document.documentMode||9<document.documentMode));function Se(){z&&(z.detachEvent("onpropertychange",we),U=z=null)}function we(v){if(v.propertyName==="value"&&Z(U))if(v=k(U,v,gt(v)),de)Ai(v);else{de=!0;try{Q(Y,v)}finally{de=!1,Ae()}}}function ee(v,w,R){v==="focus"?(Se(),z=w,U=R,z.attachEvent("onpropertychange",we)):v==="blur"&&Se()}function oe(v){if(v==="selectionchange"||v==="keyup"||v==="keydown")return Z(U)}function K(v,w){if(v==="click")return Z(w)}function ne(v,w){if(v==="input"||v==="change")return Z(w)}var se={eventTypes:A,_isInputEventSupported:he,extractEvents:function(v,w,R,H){var G=w?iu(w):window,ye=G.nodeName&&G.nodeName.toLowerCase();if(ye==="select"||ye==="input"&&G.type==="file")var Ce=ue;else if(T(G))if(he)Ce=ne;else{Ce=oe;var Me=ee}else(ye=G.nodeName)&&ye.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(Ce=K);if(Ce&&(Ce=Ce(v,w)))return k(Ce,R,H);Me&&Me(v,G,w),v==="blur"&&(v=G._wrapperState)&&v.controlled&&G.type==="number"&&fn(G,"number",G.value)}},be=qo.extend({view:null,detail:null}),Ie={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ge(v){var w=this.nativeEvent;return w.getModifierState?w.getModifierState(v):(v=Ie[v])?!!w[v]:!1}function $e(){return Ge}var je=0,zt=0,xt=!1,rt=!1,ct=be.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,
24shiftKey:null,altKey:null,metaKey:null,getModifierState:$e,button:null,buttons:null,relatedTarget:function(v){return v.relatedTarget||(v.fromElement===v.srcElement?v.toElement:v.fromElement)},movementX:function(v){if("movementX"in v)return v.movementX;var w=je;return je=v.screenX,xt?v.type==="mousemove"?v.screenX-w:0:(xt=!0,0)},movementY:function(v){if("movementY"in v)return v.movementY;var w=zt;return zt=v.screenY,rt?v.type==="mousemove"?v.screenY-w:0:(rt=!0,0)}}),Lt=ct.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),er={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Xt={eventTypes:er,extractEvents:function(v,w,R,H,G){var ye=v==="mouseover"||v==="pointerover",Ce=v==="mouseout"||v==="pointerout";if(ye&&(G&32)===0&&(R.relatedTarget||R.fromElement)||!Ce&&!ye)return null;if(ye=H.window===H?H:(ye=H.ownerDocument)?ye.defaultView||ye.parentWindow:window,Ce){if(Ce=w,w=(w=R.relatedTarget||R.toElement)?vl(w):null,w!==null){var Me=Uo(w);(w!==Me||w.tag!==5&&w.tag!==6)&&(w=null)}}else Ce=null;if(Ce===w)return null;if(v==="mouseout"||v==="mouseover")var St=ct,Ct=er.mouseLeave,xr=er.mouseEnter,Nr="mouse";else(v==="pointerout"||v==="pointerover")&&(St=Lt,Ct=er.pointerLeave,xr=er.pointerEnter,Nr="pointer");if(v=Ce==null?ye:iu(Ce),ye=w==null?ye:iu(w),Ct=St.getPooled(Ct,Ce,R,H),Ct.type=Nr+"leave",Ct.target=v,Ct.relatedTarget=ye,R=St.getPooled(xr,w,R,H),R.type=Nr+"enter",R.target=ye,R.relatedTarget=v,H=Ce,Nr=w,H&&Nr)e:{for(St=H,xr=Nr,Ce=0,v=St;v;v=ko(v))Ce++;for(v=0,w=xr;w;w=ko(w))v++;for(;0<Ce-v;)St=ko(St),Ce--;for(;0<v-Ce;)xr=ko(xr),v--;for(;Ce--;){if(St===xr||St===xr.alternate)break e;St=ko(St),xr=ko(xr)}St=null}else St=null;for(xr=St,St=[];H&&H!==xr&&(Ce=H.alternate,!(Ce!==null&&Ce===xr));)St.push(H),H=ko(H);for(H=[];Nr&&Nr!==xr&&(Ce=Nr.alternate,!(Ce!==null&&Ce===xr));)H.push(Nr),Nr=ko(Nr);for(Nr=0;Nr<St.length;Nr++)Uh(St[Nr],"bubbled",Ct);for(Nr=H.length;0<Nr--;)Uh(H[Nr],"captured",R);return(G&64)===0?[Ct]:[Ct,R]}};function Pr(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var ot=typeof Object.is=="function"?Object.is:Pr,wt=Object.prototype.hasOwnProperty;function It(v,w){if(ot(v,w))return!0;if(typeof v!="object"||v===null||typeof w!="object"||w===null)return!1;var R=Object.keys(v),H=Object.keys(w);if(R.length!==H.length)return!1;for(H=0;H<R.length;H++)if(!wt.call(w,R[H])||!ot(v[R[H]],w[R[H]]))return!1;return!0}var Ht=B&&"documentMode"in document&&11>=document.documentMode,Ha={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},hi=null,ki=null,Ji=null,Oa=!1;function Ua(v,w){var R=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;return Oa||hi==null||hi!==Gs(R)?null:(R=hi,"selectionStart"in R&&Fh(R)?R={start:R.selectionStart,end:R.selectionEnd}:(R=(R.ownerDocument&&R.ownerDocument.defaultView||window).getSelection(),R={anchorNode:R.anchorNode,anchorOffset:R.anchorOffset,focusNode:R.focusNode,focusOffset:R.focusOffset}),Ji&&It(Ji,R)?null:(Ji=R,v=qo.getPooled(Ha.select,ki,v,w),v.type="select",v.target=hi,ws(v),v))}var ea={eventTypes:Ha,extractEvents:function(v,w,R,H,G,ye){if(G=ye||(H.window===H?H.document:H.nodeType===9?H:H.ownerDocument),!(ye=!G)){e:{G=wo(G),ye=M.onSelect;for(var Ce=0;Ce<ye.length;Ce++)if(!G.has(ye[Ce])){G=!1;break e}G=!0}ye=!G}if(ye)return null;switch(G=w?iu(w):window,v){case"focus":(T(G)||G.contentEditable==="true")&&(hi=G,ki=w,Ji=null);break;case"blur":Ji=ki=hi=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":return Oa=!1,Ua(R,H);case"selectionchange":if(Ht)break;case"keydown":case"keyup":return Ua(R,H)}return null}},Qm=qo.extend({animationName:null,elapsedTime:null,pseudoElement:null}),m=qo.extend({clipboardData:function(v){return"clipboardData"in v?v.clipboardData:window.clipboardData}}),C=be.extend({relatedTarget:null});function D(v){var w=v.keyCode;return"charCode"in v?(v=v.charCode,v===0&&w===13&&(v=13)):v=w,v===10&&(v=13),32<=v||v===13?v:0}var j={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J={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"},_e=be.extend({key:function(v){if(v.key){var w=j[v.key]||v.key;if(w!=="Unidentified")return w}
24return v.type==="keypress"?(v=D(v),v===13?"Enter":String.fromCharCode(v)):v.type==="keydown"||v.type==="keyup"?J[v.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:$e,charCode:function(v){return v.type==="keypress"?D(v):0},keyCode:function(v){return v.type==="keydown"||v.type==="keyup"?v.keyCode:0},which:function(v){return v.type==="keypress"?D(v):v.type==="keydown"||v.type==="keyup"?v.keyCode:0}}),He=ct.extend({dataTransfer:null}),lt=be.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:$e}),_t=qo.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),kt=ct.extend({deltaX:function(v){return"deltaX"in v?v.deltaX:"wheelDeltaX"in v?-v.wheelDeltaX:0},deltaY:function(v){return"deltaY"in v?v.deltaY:"wheelDeltaY"in v?-v.wheelDeltaY:"wheelDelta"in v?-v.wheelDelta:0},deltaZ:null,deltaMode:null}),dr={eventTypes:Nh,extractEvents:function(v,w,R,H){var G=Dh.get(v);if(!G)return null;switch(v){case"keypress":if(D(R)===0)return null;case"keydown":case"keyup":v=_e;break;case"blur":case"focus":v=C;break;case"click":if(R.button===2)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=ct;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=He;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=lt;break;case Io:case hl:case pl:v=Qm;break;case Hl:v=_t;break;case"scroll":v=be;break;case"wheel":v=kt;break;case"copy":case"cut":case"paste":v=m;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Lt;break;default:v=qo}return w=v.getPooled(G,w,R,H),ws(w),w}};if(b)throw Error(n(101));b=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),S();var Vr=So;h=cf,p=Vr,g=iu,F({SimpleEventPlugin:dr,EnterLeaveEventPlugin:Xt,ChangeEventPlugin:se,SelectEventPlugin:ea,BeforeInputEventPlugin:Nn});var Qr=[],Ia=-1;function Wr(v){0>Ia||(v.current=Qr[Ia],Qr[Ia]=null,Ia--)}function Sn(v,w){Ia++,Qr[Ia]=v.current,v.current=w}var ba={},fa={current:ba},Cn={current:!1},xo=ba;function Dn(v,w){var R=v.type.contextTypes;if(!R)return ba;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===w)return H.__reactInternalMemoizedMaskedChildContext;var G={},ye;for(ye in R)G[ye]=w[ye];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=w,v.__reactInternalMemoizedMaskedChildContext=G),G}function ha(v){return v=v.childContextTypes,v!=null}function A0(){Wr(Cn),Wr(fa)}function Y_(v,w,R){if(fa.current!==ba)throw Error(n(168));Sn(fa,w),Sn(Cn,R)}function Va(v,w,R){var H=v.stateNode;if(v=w.childContextTypes,typeof H.getChildContext!="function")return R;H=H.getChildContext();for(var G in H)if(!(G in v))throw Error(n(108,st(w)||"Unknown",G));return t({},R,{},H)}function ff(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||ba,xo=fa.current,Sn(fa,v),Sn(Cn,Cn.current),!0}function D2(v,w,R){var H=v.stateNode;if(!H)throw Error(n(169));R?(v=Va(v,w,xo),H.__reactInternalMemoizedMergedChildContext=v,Wr(Cn),Wr(fa),Sn(fa,v)):Wr(Cn),Sn(Cn,R)}var dk=r.unstable_runWithPriority,X_=r.unstable_scheduleCallback,P0=r.unstable_cancelCallback,Z_=r.unstable_requestPaint,Q_=r.unstable_now,aNe=r.unstable_getCurrentPriorityLevel,M2=r.unstable_ImmediatePriority,qY=r.unstable_UserBlockingPriority,jY=r.unstable_NormalPriority,$Y=r.unstable_LowPriority,WY=r.unstable_IdlePriority,GY={},oNe=r.unstable_shouldYield,sNe=Z_!==void 0?Z_:function(){},hf=null,L2=null,fk=!1,KY=Q_(),wc=1e4>KY?Q_:function(){return Q_()-KY};function F2(){switch(aNe()){case M2:return 99;case qY:return 98;case jY:return 97;case $Y:return 96;case WY:return 95;default:throw Error(n(332))}}function YY(v){switch(v){case 99:return M2;case 98:return qY;case 97:return jY;case 96:return $Y;case 95:return WY;default:throw Error(n(332))}}function Yh(v,w){return v=YY(v),dk(v,w)}function XY(v,w,R){return v=YY(v),X_(v,w,R)}function ZY(v){return hf===null?(hf=[v],L2=X_(M2,QY)):hf.push(v),GY}function Zu(){if(L2!==null){var v=L2;L2=null,P0(v)}QY()}
24function QY(){if(!fk&&hf!==null){fk=!0;var v=0;try{var w=hf;Yh(99,function(){for(;v<w.length;v++){var R=w[v];do R=R(!0);while(R!==null)}}),hf=null}catch(R){throw hf!==null&&(hf=hf.slice(v+1)),X_(M2,Zu),R}finally{fk=!1}}}function B2(v,w,R){return R/=10,1073741821-(((1073741821-v+w/10)/R|0)+1)*R}function su(v,w){if(v&&v.defaultProps){w=t({},w),v=v.defaultProps;for(var R in v)w[R]===void 0&&(w[R]=v[R])}return w}var z2={current:null},H2=null,R0=null,U2=null;function hk(){U2=R0=H2=null}function pk(v){var w=z2.current;Wr(z2),v.type._context._currentValue=w}function JY(v,w){for(;v!==null;){var R=v.alternate;if(v.childExpirationTime<w)v.childExpirationTime=w,R!==null&&R.childExpirationTime<w&&(R.childExpirationTime=w);else if(R!==null&&R.childExpirationTime<w)R.childExpirationTime=w;else break;v=v.return}}function O0(v,w){H2=v,U2=R0=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.expirationTime>=w&&(Ju=!0),v.firstContext=null)}function Sc(v,w){if(U2!==v&&w!==!1&&w!==0)if((typeof w!="number"||w===1073741823)&&(U2=v,w=1073741823),w={context:v,observedBits:w,next:null},R0===null){if(H2===null)throw Error(n(308));R0=w,H2.dependencies={expirationTime:0,firstContext:w,responders:null}}else R0=R0.next=w;return v._currentValue}var Xh=!1;function mk(v){v.updateQueue={baseState:v.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function vk(v,w){v=v.updateQueue,w.updateQueue===v&&(w.updateQueue={baseState:v.baseState,baseQueue:v.baseQueue,shared:v.shared,effects:v.effects})}function Zh(v,w){return v={expirationTime:v,suspenseConfig:w,tag:0,payload:null,callback:null,next:null},v.next=v}function Qh(v,w){if(v=v.updateQueue,v!==null){v=v.shared;var R=v.pending;R===null?w.next=w:(w.next=R.next,R.next=w),v.pending=w}}function eX(v,w){var R=v.alternate;R!==null&&vk(R,v),v=v.updateQueue,R=v.baseQueue,R===null?(v.baseQueue=w.next=w,w.next=w):(w.next=R.next,R.next=w)}function J_(v,w,R,H){var G=v.updateQueue;Xh=!1;var ye=G.baseQueue,Ce=G.shared.pending;if(Ce!==null){if(ye!==null){var Me=ye.next;ye.next=Ce.next,Ce.next=Me}ye=Ce,G.shared.pending=null,Me=v.alternate,Me!==null&&(Me=Me.updateQueue,Me!==null&&(Me.baseQueue=Ce))}if(ye!==null){Me=ye.next;var St=G.baseState,Ct=0,xr=null,Nr=null,ni=null;if(Me!==null){var Ci=Me;do{if(Ce=Ci.expirationTime,Ce<H){var xc={expirationTime:Ci.expirationTime,suspenseConfig:Ci.suspenseConfig,tag:Ci.tag,payload:Ci.payload,callback:Ci.callback,next:null};ni===null?(Nr=ni=xc,xr=St):ni=ni.next=xc,Ce>Ct&&(Ct=Ce)}else{ni!==null&&(ni=ni.next={expirationTime:1073741823,suspenseConfig:Ci.suspenseConfig,tag:Ci.tag,payload:Ci.payload,callback:Ci.callback,next:null}),XX(Ce,Ci.suspenseConfig);e:{var is=v,yt=Ci;switch(Ce=w,xc=R,yt.tag){case 1:if(is=yt.payload,typeof is=="function"){St=is.call(xc,St,Ce);break e}St=is;break e;case 3:is.effectTag=is.effectTag&-4097|64;case 0:if(is=yt.payload,Ce=typeof is=="function"?is.call(xc,St,Ce):is,Ce==null)break e;St=t({},St,Ce);break e;case 2:Xh=!0}}Ci.callback!==null&&(v.effectTag|=32,Ce=G.effects,Ce===null?G.effects=[Ci]:Ce.push(Ci))}if(Ci=Ci.next,Ci===null||Ci===Me){if(Ce=G.shared.pending,Ce===null)break;Ci=ye.next=Ce.next,Ce.next=Me,G.baseQueue=ye=Ce,G.shared.pending=null}}while(!0)}ni===null?xr=St:ni.next=Nr,G.baseState=xr,G.baseQueue=ni,pT(Ct),v.expirationTime=Ct,v.memoizedState=St}}function tX(v,w,R){if(v=w.effects,w.effects=null,v!==null)for(w=0;w<v.length;w++){var H=v[w],G=H.callback;if(G!==null){if(H.callback=null,H=G,G=R,typeof H!="function")throw Error(n(191,H));H.call(G)}}}var eb=ke.ReactCurrentBatchConfig,rX=new e.Component().refs;function V2(v,w,R,H){w=v.memoizedState,R=R(H,w),R=R==null?w:t({},w,R),v.memoizedState=R,v.expirationTime===0&&(v.updateQueue.baseState=R)}var q2={isMounted:function(v){return(v=v._reactInternalFiber)?Uo(v)===v:!1},enqueueSetState:function(v,w,R){v=v._reactInternalFiber;var H=td(),G=eb.suspense;H=iv(H,v,G),G=Zh(H,G),G.payload=w,R!=null&&(G.callback=R),Qh(v,G),rp(v,H)},enqueueReplaceState:function(v,w,R){v=v._reactInternalFiber;var H=td(),G=eb.suspense;H=iv(H,v,G),G=Zh(H,G),G.tag=1,G.payload=w,R!=null&&(G.callback=R),Qh(v,G),rp(v,H)},enqueueForceUpdate:function(v,w){v=v._reactInternalFiber;var R=td(),H=eb.suspense;R=iv(R,v,H),H=Zh(R,H),H.tag=2,w!=null&&(H.callback=w),Qh(v,H),rp(v,R)}};function nX(v,w,R,H,G,ye,Ce){return v=v.stateNode,typeof v.shouldComponentUpdate=="function"?v.shouldComponentUpdate(H,ye,Ce):w.prototype&&w.prototype.isPureReactComponent?!It(R,H)||!It(G,ye):!0}function iX(v,w,R){var H=!1,G=ba,ye=w.contextType;return typeof ye=="object"&&ye!==null?ye=Sc(ye):(G=ha(w)?xo:fa.current,H=w.contextTypes,ye=(H=H!=null)?Dn(v,G):ba),w=new w(R,ye),v.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=q2,v.stateNode=w,w._reactInternalFiber=v,H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=G,v.__reactInternalMemoizedMaskedChildContext=ye),w}function aX(v,w,R,H){v=w.state,typeof w.componentWillReceiveProps=="function"&&w.componentWillReceiveProps(R,H),typeof w.UNSAFE_componentWillReceiveProps=="function"&&w.UNSAFE_componentWillReceiveProps(R,H),w.state!==v&&q2.enqueueReplaceState(w,w.state,null)}function gk(v,w,R,H){var G=v.stateNode;G.props=R,G.state=v.memoizedState,G.refs=rX,mk(v);var ye=w.contextType;typeof ye=="object"&&ye!==null?G.context=Sc(ye):(ye=ha(w)?xo:fa.current,G.context=Dn(v,ye)),J_(v,R,G,H),G.state=v.memoizedState,ye=w.getDerivedStateFromProps,typeof ye=="function"&&(V2(v,w,ye,R),G.state=v.memoizedState),typeof w.getDerivedStateFromProps=="function"||typeof G.getSnapshotBeforeUpdate=="function"||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(w=G.state,typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount(),w!==G.state&&q2.enqueueReplaceState(G,G.state,null),J_(v,R,G,H),G.state=v.memoizedState),typeof G.componentDidMount=="function"&&(v.effectTag|=4)}var j2=Array.isArray;function tb(v,w,R){if(v=R.ref,v!==null&&typeof v!="function"&&typeof v!="object"){if(R._owner){if(R=R._owner,R){if(R.tag!==1)throw Error(n(309));var H=R.stateNode}if(!H)throw Error(n(147,v));var G=""+v;return w!==null&&w.ref!==null&&typeof w.ref=="function"&&w.ref._stringRef===G?w.ref:(w=function(ye){var 
24Ce=H.refs;Ce===rX&&(Ce=H.refs={}),ye===null?delete Ce[G]:Ce[G]=ye},w._stringRef=G,w)}if(typeof v!="string")throw Error(n(284));if(!R._owner)throw Error(n(290,v))}return v}function $2(v,w){if(v.type!=="textarea")throw Error(n(31,Object.prototype.toString.call(w)==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":w,""))}function oX(v){function w(yt,nt){if(v){var Pt=yt.lastEffect;Pt!==null?(Pt.nextEffect=nt,yt.lastEffect=nt):yt.firstEffect=yt.lastEffect=nt,nt.nextEffect=null,nt.effectTag=8}}function R(yt,nt){if(!v)return null;for(;nt!==null;)w(yt,nt),nt=nt.sibling;return null}function H(yt,nt){for(yt=new Map;nt!==null;)nt.key!==null?yt.set(nt.key,nt):yt.set(nt.index,nt),nt=nt.sibling;return yt}function G(yt,nt){return yt=lv(yt,nt),yt.index=0,yt.sibling=null,yt}function ye(yt,nt,Pt){return yt.index=Pt,v?(Pt=yt.alternate,Pt!==null?(Pt=Pt.index,Pt<nt?(yt.effectTag=2,nt):Pt):(yt.effectTag=2,nt)):nt}function Ce(yt){return v&&yt.alternate===null&&(yt.effectTag=2),yt}function Me(yt,nt,Pt,lr){return nt===null||nt.tag!==6?(nt=Qk(Pt,yt.mode,lr),nt.return=yt,nt):(nt=G(nt,Pt),nt.return=yt,nt)}function St(yt,nt,Pt,lr){return nt!==null&&nt.elementType===Pt.type?(lr=G(nt,Pt.props),lr.ref=tb(yt,nt,Pt),lr.return=yt,lr):(lr=mT(Pt.type,Pt.key,Pt.props,null,yt.mode,lr),lr.ref=tb(yt,nt,Pt),lr.return=yt,lr)}function Ct(yt,nt,Pt,lr){return nt===null||nt.tag!==4||nt.stateNode.containerInfo!==Pt.containerInfo||nt.stateNode.implementation!==Pt.implementation?(nt=Jk(Pt,yt.mode,lr),nt.return=yt,nt):(nt=G(nt,Pt.children||[]),nt.return=yt,nt)}function xr(yt,nt,Pt,lr,Er){return nt===null||nt.tag!==7?(nt=np(Pt,yt.mode,lr,Er),nt.return=yt,nt):(nt=G(nt,Pt),nt.return=yt,nt)}function Nr(yt,nt,Pt){if(typeof nt=="string"||typeof nt=="number")return nt=Qk(""+nt,yt.mode,Pt),nt.return=yt,nt;if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case Et:return Pt=mT(nt.type,nt.key,nt.props,null,yt.mode,Pt),Pt.ref=tb(yt,null,nt),Pt.return=yt,Pt;case Yt:return nt=Jk(nt,yt.mode,Pt),nt.return=yt,nt}if(j2(nt)||pt(nt))return nt=np(nt,yt.mode,Pt,null),nt.return=yt,nt;$2(yt,nt)}return null}function ni(yt,nt,Pt,lr){var Er=nt!==null?nt.key:null;if(typeof Pt=="string"||typeof Pt=="number")return Er!==null?null:Me(yt,nt,""+Pt,lr);if(typeof Pt=="object"&&Pt!==null){switch(Pt.$$typeof){case Et:return Pt.key===Er?Pt.type===sr?xr(yt,nt,Pt.props.children,lr,Er):St(yt,nt,Pt,lr):null;case Yt:return Pt.key===Er?Ct(yt,nt,Pt,lr):null}if(j2(Pt)||pt(Pt))return Er!==null?null:xr(yt,nt,Pt,lr,null);$2(yt,Pt)}return null}function Ci(yt,nt,Pt,lr,Er){if(typeof lr=="string"||typeof lr=="number")return yt=yt.get(Pt)||null,Me(nt,yt,""+lr,Er);if(typeof lr=="object"&&lr!==null){switch(lr.$$typeof){case Et:return yt=yt.get(lr.key===null?Pt:lr.key)||null,lr.type===sr?xr(nt,yt,lr.props.children,Er,lr.key):St(nt,yt,lr,Er);case Yt:return yt=yt.get(lr.key===null?Pt:lr.key)||null,Ct(nt,yt,lr,Er)}if(j2(lr)||pt(lr))return yt=yt.get(Pt)||null,xr(nt,yt,lr,Er,null);$2(nt,lr)}return null}function xc(yt,nt,Pt,lr){for(var Er=null,Dr=null,Jr=nt,pi=nt=0,qa=null;Jr!==null&&pi<Pt.length;pi++){Jr.index>pi?(qa=Jr,Jr=null):qa=Jr.sibling;var Fn=ni(yt,Jr,Pt[pi],lr);if(Fn===null){Jr===null&&(Jr=qa);break}v&&Jr&&Fn.alternate===null&&w(yt,Jr),nt=ye(Fn,nt,pi),Dr===null?Er=Fn:Dr.sibling=Fn,Dr=Fn,Jr=qa}if(pi===Pt.length)return R(yt,Jr),Er;if(Jr===null){for(;pi<Pt.length;pi++)Jr=Nr(yt,Pt[pi],lr),Jr!==null&&(nt=ye(Jr,nt,pi),Dr===null?Er=Jr:Dr.sibling=Jr,Dr=Jr);return Er}for(Jr=H(yt,Jr);pi<Pt.length;pi++)qa=Ci(Jr,yt,pi,Pt[pi],lr),qa!==null&&(v&&qa.alternate!==null&&Jr.delete(qa.key===null?pi:qa.key),nt=ye(qa,nt,pi),Dr===null?Er=qa:Dr.sibling=qa,Dr=qa);return v&&Jr.forEach(function(ip){return w(yt,ip)}),Er}function is(yt,nt,Pt,lr){var Er=pt(Pt);if(typeof Er!="function")throw Error(n(150));if(Pt=Er.call(Pt),Pt==null)throw Error(n(151));for(var Dr=Er=null,Jr=nt,pi=nt=0,qa=null,Fn=Pt.next();Jr!==null&&!Fn.done;pi++,Fn=Pt.next()){Jr.index>pi?(qa=Jr,Jr=null):qa=Jr.sibling;var ip=ni(yt,Jr,Fn.value,lr);if(ip===null){Jr===null&&(Jr=qa);break}v&&Jr&&ip.alternate===null&&w(yt,Jr),nt=ye(ip,nt,pi),Dr===null?Er=ip:Dr.sibling=ip,Dr=ip,Jr=qa}if(Fn.done)return R(yt,Jr),Er;if(Jr===null){for(;!Fn.done;pi++,Fn=Pt.next())Fn=Nr(yt,Fn.value,lr),Fn!==null&&(nt=ye(Fn,nt,pi),Dr===null?Er=Fn:Dr.sibling=Fn,Dr=Fn);return Er}for(Jr=H(yt,Jr);!Fn.done;pi++,Fn=Pt.next())Fn=Ci(Jr,yt,pi,Fn.value,lr),Fn!==null&&(v&&Fn.alternate!==null&&Jr.delete(Fn.key===null?pi:Fn.key),nt=ye(Fn,nt,pi),Dr===null?Er=Fn:Dr.sibling=Fn,Dr=Fn);return v&&Jr.forEach(function(MNe){return w(yt,MNe)}),Er}return function(yt,nt,Pt,lr){var Er=typeof Pt=="object"&&Pt!==null&&Pt.type===sr&&Pt.key===null;Er&&(Pt=Pt.props.children);var Dr=typeof Pt=="object"&&Pt!==null;if(Dr)switch(Pt.$$typeof){case Et:e:{for(Dr=Pt.key,Er=nt;Er!==null;){if(Er.key===Dr){switch(Er.tag){case 7:if(Pt.type===sr){R(yt,Er.sibling),nt=G(Er,Pt.props.children),nt.return=yt,yt=nt;break e}break;default:if(Er.elementType===Pt.type){R(yt,Er.sibling),nt=G(Er,Pt.props),nt.ref=tb(yt,Er,Pt),nt.return=yt,yt=nt;break e}}R(yt,Er);break}else w(yt,Er);Er=Er.sibling}Pt.type===sr?(nt=np(Pt.props.children,yt.mode,lr,Pt.key),nt.return=yt,yt=nt):(lr=mT(Pt.type,Pt.key,Pt.props,null,yt.mode,lr),lr.ref=tb(yt,nt,Pt),lr.return=yt,yt=lr)}return Ce(yt);case Yt:e:{for(Er=Pt.key;nt!==null;){if(nt.key===Er)if(nt.tag===4&&nt.stateNode.containerInfo===Pt.containerInfo&&nt.stateNode.implementation===Pt.implementation){R(yt,nt.sibling),nt=G(nt,Pt.children||[]),nt.return=yt,yt=nt;break e}else{R(yt,nt);break}else w(yt,nt);nt=nt.sibling}nt=Jk(Pt,yt.mode,lr),nt.return=yt,yt=nt}return Ce(yt)}if(typeof Pt=="string"||typeof Pt=="number")return Pt=""+Pt,nt!==null&&nt.tag===6?(R(yt,nt.sibling),nt=G(nt,Pt),nt.return=yt,yt=nt):(R(yt,
24nt),nt=Qk(Pt,yt.mode,lr),nt.return=yt,yt=nt),Ce(yt);if(j2(Pt))return xc(yt,nt,Pt,lr);if(pt(Pt))return is(yt,nt,Pt,lr);if(Dr&&$2(yt,Pt),typeof Pt>"u"&&!Er)switch(yt.tag){case 1:case 0:throw yt=yt.type,Error(n(152,yt.displayName||yt.name||"Component"))}return R(yt,nt)}}var I0=oX(!0),yk=oX(!1),rb={},Qu={current:rb},nb={current:rb},ib={current:rb};function Jm(v){if(v===rb)throw Error(n(174));return v}function _k(v,w){switch(Sn(ib,w),Sn(nb,v),Sn(Qu,rb),v=w.nodeType,v){case 9:case 11:w=(w=w.documentElement)?w.namespaceURI:la(null,"");break;default:v=v===8?w.parentNode:w,w=v.namespaceURI||null,v=v.tagName,w=la(w,v)}Wr(Qu),Sn(Qu,w)}function k0(){Wr(Qu),Wr(nb),Wr(ib)}function sX(v){Jm(ib.current);var w=Jm(Qu.current),R=la(w,v.type);w!==R&&(Sn(nb,v),Sn(Qu,R))}function bk(v){nb.current===v&&(Wr(Qu),Wr(nb))}var ro={current:0};function W2(v){for(var w=v;w!==null;){if(w.tag===13){var R=w.memoizedState;if(R!==null&&(R=R.dehydrated,R===null||R.data===zh||R.data===_r))return w}else if(w.tag===19&&w.memoizedProps.revealOrder!==void 0){if((w.effectTag&64)!==0)return w}else if(w.child!==null){w.child.return=w,w=w.child;continue}if(w===v)break;for(;w.sibling===null;){if(w.return===null||w.return===v)return null;w=w.return}w.sibling.return=w.return,w=w.sibling}return null}function Ek(v,w){return{responder:v,props:w}}var G2=ke.ReactCurrentDispatcher,Cc=ke.ReactCurrentBatchConfig,Jh=0,No=null,Cs=null,xs=null,K2=!1;function Yl(){throw Error(n(321))}function wk(v,w){if(w===null)return!1;for(var R=0;R<w.length&&R<v.length;R++)if(!ot(v[R],w[R]))return!1;return!0}function Sk(v,w,R,H,G,ye){if(Jh=ye,No=w,w.memoizedState=null,w.updateQueue=null,w.expirationTime=0,G2.current=v===null||v.memoizedState===null?lNe:cNe,v=R(H,G),w.expirationTime===Jh){ye=0;do{if(w.expirationTime=0,!(25>ye))throw Error(n(301));ye+=1,xs=Cs=null,w.updateQueue=null,G2.current=uNe,v=R(H,G)}while(w.expirationTime===Jh)}if(G2.current=J2,w=Cs!==null&&Cs.next!==null,Jh=0,xs=Cs=No=null,K2=!1,w)throw Error(n(300));return v}function N0(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xs===null?No.memoizedState=xs=v:xs=xs.next=v,xs}function D0(){if(Cs===null){var v=No.alternate;v=v!==null?v.memoizedState:null}else v=Cs.next;var w=xs===null?No.memoizedState:xs.next;if(w!==null)xs=w,Cs=v;else{if(v===null)throw Error(n(310));Cs=v,v={memoizedState:Cs.memoizedState,baseState:Cs.baseState,baseQueue:Cs.baseQueue,queue:Cs.queue,next:null},xs===null?No.memoizedState=xs=v:xs=xs.next=v}return xs}function ev(v,w){return typeof w=="function"?w(v):w}function Y2(v){var w=D0(),R=w.queue;if(R===null)throw Error(n(311));R.lastRenderedReducer=v;var H=Cs,G=H.baseQueue,ye=R.pending;if(ye!==null){if(G!==null){var Ce=G.next;G.next=ye.next,ye.next=Ce}H.baseQueue=G=ye,R.pending=null}if(G!==null){G=G.next,H=H.baseState;var Me=Ce=ye=null,St=G;do{var Ct=St.expirationTime;if(Ct<Jh){var xr={expirationTime:St.expirationTime,suspenseConfig:St.suspenseConfig,action:St.action,eagerReducer:St.eagerReducer,eagerState:St.eagerState,next:null};Me===null?(Ce=Me=xr,ye=H):Me=Me.next=xr,Ct>No.expirationTime&&(No.expirationTime=Ct,pT(Ct))}else Me!==null&&(Me=Me.next={expirationTime:1073741823,suspenseConfig:St.suspenseConfig,action:St.action,eagerReducer:St.eagerReducer,eagerState:St.eagerState,next:null}),XX(Ct,St.suspenseConfig),H=St.eagerReducer===v?St.eagerState:v(H,St.action);St=St.next}while(St!==null&&St!==G);Me===null?ye=H:Me.next=Ce,ot(H,w.memoizedState)||(Ju=!0),w.memoizedState=H,w.baseState=ye,w.baseQueue=Me,R.lastRenderedState=H}return[w.memoizedState,R.dispatch]}function X2(v){var w=D0(),R=w.queue;if(R===null)throw Error(n(311));R.lastRenderedReducer=v;var H=R.dispatch,G=R.pending,ye=w.memoizedState;if(G!==null){R.pending=null;var Ce=G=G.next;do ye=v(ye,Ce.action),Ce=Ce.next;while(Ce!==G);ot(ye,w.memoizedState)||(Ju=!0),w.memoizedState=ye,w.baseQueue===null&&(w.baseState=ye),R.lastRenderedState=ye}return[ye,H]}function Ck(v){var w=N0();return typeof v=="function"&&(v=v()),w.memoizedState=w.baseState=v,v=w.queue={pending:null,dispatch:null,lastRenderedReducer:ev,lastRenderedState:v},v=v.dispatch=mX.bind(null,No,v),[w.memoizedState,v]}function xk(v,w,R,H){return v={tag:v,create:w,destroy:R,deps:H,next:null},w=No.updateQueue,w===null?(w={lastEffect:null},No.updateQueue=w,w.lastEffect=v.next=v):(R=w.lastEffect,R===null?w.lastEffect=v.next=v:(H=R.next,R.next=v,v.next=H,w.lastEffect=v)),v}function lX(){return D0().memoizedState}function Tk(v,w,R,H){var G=N0();No.effectTag|=v,G.memoizedState=xk(1|w,R,void 0,H===void 0?null:H)}function Ak(v,w,R,H){var G=D0();H=H===void 0?null:H;var ye=void 0;if(Cs!==null){var Ce=Cs.memoizedState;if(ye=Ce.destroy,H!==null&&wk(H,Ce.deps)){xk(w,R,ye,H);return}}No.effectTag|=v,G.memoizedState=xk(1|w,R,ye,H)}function cX(v,w){return Tk(516,4,v,w)}function Z2(v,w){return Ak(516,4,v,w)}function uX(v,w){return Ak(4,2,v,w)}function dX(v,w){if(typeof w=="function")return v=v(),w(v),function(){w(null)};if(w!=null)return v=v(),w.current=v,function(){w.current=null}}function fX(v,w,R){return R=R!=null?R.concat([v]):null,Ak(4,2,dX.bind(null,w,v),R)}function Pk(){}function hX(v,w){return N0().memoizedState=[v,w===void 0?null:w],v}function Q2(v,w){var R=D0();w=w===void 0?null:w;var H=R.memoizedState;return H!==null&&w!==null&&wk(w,H[1])?H[0]:(R.memoizedState=[v,w],v)}function pX(v,w){var R=D0();w=w===void 0?null:w;var H=R.memoizedState;return H!==null&&w!==null&&wk(w,H[1])?H[0]:(v=v(),R.memoizedState=[v,w],v)}function Rk(v,w,R){var H=F2();Yh(98>H?98:H,function(){v(!0)}),Yh(97<H?97:H,function(){var G=Cc.suspense;Cc.suspense=w===void 0?null:w;try{v(!1),R()}finally{Cc.suspense=G}})}function mX(v,w,R){var H=td(),G=eb.suspense;H=iv(H,v,G),G={expirationTime:H,suspenseConfig:G,action:R,eagerReducer:null,eagerState:null,next:null};var ye=w.pending;if(ye===null?G.next=G:(G.next=ye.next,ye.next=G),w.pending=G,ye=v.alternate,v===No||ye!==null&&ye===No)K2=!0,G.expirationTime=Jh,No.expirationTime=Jh;else{if(v.expirationTime===0&&(ye===null||ye.expirationTime===0)&&(ye=w.lastRenderedReducer,ye!==null))try{var Ce=w.lastRenderedState,Me=ye(Ce,R);if(G.eagerReducer=ye,G.eagerState=Me,ot(Me,Ce))return}catch{}rp(v,H)}}var J2={readContext:Sc,useCallback:Yl,useContext:Yl,useEffect:Yl,useImperativeHandle:Yl,useLayoutEffect:Yl,useMemo:Yl,useReducer:Yl,useRef:Yl,useState:Yl,useDebugValue:Yl,useResponder:Yl,useDeferredValue:Yl,useTransition:Yl},lNe={readContext:Sc,useCallback:hX,useContext:Sc,useEffect:cX,useImperativeHandle:function(v,w,R){return R=R!=null?R.concat([v]):null,Tk(4,2,dX.bind(null,w,v),R)},useLayoutEffect:function(v,w){return Tk(4,2,v,w)},useMemo:function(v,w){var R=N0();return w=w===void 0?null:w,v=v(),R.memoizedState=[v,w],v},useReducer:function(v,w,R){var H=N0();return w=R!==void 0?R(w):w,H.memoizedState=H.baseState=w,v=H.queue={pending:null,dispatch:null,lastRenderedReducer:v,lastRenderedState:w},v=v.dispatch=mX.bind(null,No,v),[H.memoizedState,v]}
24,useRef:function(v){var w=N0();return v={current:v},w.memoizedState=v},useState:Ck,useDebugValue:Pk,useResponder:Ek,useDeferredValue:function(v,w){var R=Ck(v),H=R[0],G=R[1];return cX(function(){var ye=Cc.suspense;Cc.suspense=w===void 0?null:w;try{G(v)}finally{Cc.suspense=ye}},[v,w]),H},useTransition:function(v){var w=Ck(!1),R=w[0];return w=w[1],[hX(Rk.bind(null,w,v),[w,v]),R]}},cNe={readContext:Sc,useCallback:Q2,useContext:Sc,useEffect:Z2,useImperativeHandle:fX,useLayoutEffect:uX,useMemo:pX,useReducer:Y2,useRef:lX,useState:function(){return Y2(ev)},useDebugValue:Pk,useResponder:Ek,useDeferredValue:function(v,w){var R=Y2(ev),H=R[0],G=R[1];return Z2(function(){var ye=Cc.suspense;Cc.suspense=w===void 0?null:w;try{G(v)}finally{Cc.suspense=ye}},[v,w]),H},useTransition:function(v){var w=Y2(ev),R=w[0];return w=w[1],[Q2(Rk.bind(null,w,v),[w,v]),R]}},uNe={readContext:Sc,useCallback:Q2,useContext:Sc,useEffect:Z2,useImperativeHandle:fX,useLayoutEffect:uX,useMemo:pX,useReducer:X2,useRef:lX,useState:function(){return X2(ev)},useDebugValue:Pk,useResponder:Ek,useDeferredValue:function(v,w){var R=X2(ev),H=R[0],G=R[1];return Z2(function(){var ye=Cc.suspense;Cc.suspense=w===void 0?null:w;try{G(v)}finally{Cc.suspense=ye}},[v,w]),H},useTransition:function(v){var w=X2(ev),R=w[0];return w=w[1],[Q2(Rk.bind(null,w,v),[w,v]),R]}},pf=null,ep=null,tv=!1;function vX(v,w){var R=rd(5,null,null,0);R.elementType="DELETED",R.type="DELETED",R.stateNode=w,R.return=v,R.effectTag=8,v.lastEffect!==null?(v.lastEffect.nextEffect=R,v.lastEffect=R):v.firstEffect=v.lastEffect=R}function gX(v,w){switch(v.tag){case 5:var R=v.type;return w=w.nodeType!==1||R.toLowerCase()!==w.nodeName.toLowerCase()?null:w,w!==null?(v.stateNode=w,!0):!1;case 6:return w=v.pendingProps===""||w.nodeType!==3?null:w,w!==null?(v.stateNode=w,!0):!1;case 13:return!1;default:return!1}}function Ok(v){if(tv){var w=ep;if(w){var R=w;if(!gX(v,w)){if(w=nu(R.nextSibling),!w||!gX(v,w)){v.effectTag=v.effectTag&-1025|2,tv=!1,pf=v;return}vX(pf,R)}pf=v,ep=nu(w.firstChild)}else v.effectTag=v.effectTag&-1025|2,tv=!1,pf=v}}function yX(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;pf=v}function eT(v){if(v!==pf)return!1;if(!tv)return yX(v),tv=!0,!1;var w=v.type;if(v.tag!==5||w!=="head"&&w!=="body"&&!Ec(w,v.memoizedProps))for(w=ep;w;)vX(v,w),w=nu(w.nextSibling);if(yX(v),v.tag===13){if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));e:{for(v=v.nextSibling,w=0;v;){if(v.nodeType===8){var R=v.data;if(R===Bh){if(w===0){ep=nu(v.nextSibling);break e}w--}else R!==Ym&&R!==_r&&R!==zh||w++}v=v.nextSibling}ep=null}}else ep=pf?nu(v.stateNode.nextSibling):null;return!0}function Ik(){ep=pf=null,tv=!1}var dNe=ke.ReactCurrentOwner,Ju=!1;function Xl(v,w,R,H){w.child=v===null?yk(w,null,R,H):I0(w,v.child,R,H)}function _X(v,w,R,H,G){R=R.render;var ye=w.ref;return O0(w,G),H=Sk(v,w,R,H,ye,G),v!==null&&!Ju?(w.updateQueue=v.updateQueue,w.effectTag&=-517,v.expirationTime<=G&&(v.expirationTime=0),mf(v,w,G)):(w.effectTag|=1,Xl(v,w,H,G),w.child)}function bX(v,w,R,H,G,ye){if(v===null){var Ce=R.type;return typeof Ce=="function"&&!Zk(Ce)&&Ce.defaultProps===void 0&&R.compare===null&&R.defaultProps===void 0?(w.tag=15,w.type=Ce,EX(v,w,Ce,H,G,ye)):(v=mT(R.type,null,H,null,w.mode,ye),v.ref=w.ref,v.return=w,w.child=v)}return Ce=v.child,G<ye&&(G=Ce.memoizedProps,R=R.compare,R=R!==null?R:It,R(G,H)&&v.ref===w.ref)?mf(v,w,ye):(w.effectTag|=1,v=lv(Ce,H),v.ref=w.ref,v.return=w,w.child=v)}function EX(v,w,R,H,G,ye){return v!==null&&It(v.memoizedProps,H)&&v.ref===w.ref&&(Ju=!1,G<ye)?(w.expirationTime=v.expirationTime,mf(v,w,ye)):kk(v,w,R,H,ye)}function wX(v,w){var R=w.ref;(v===null&&R!==null||v!==null&&v.ref!==R)&&(w.effectTag|=128)}function kk(v,w,R,H,G){var ye=ha(R)?xo:fa.current;return ye=Dn(w,ye),O0(w,G),R=Sk(v,w,R,H,ye,G),v!==null&&!Ju?(w.updateQueue=v.updateQueue,w.effectTag&=-517,v.expirationTime<=G&&(v.expirationTime=0),mf(v,w,G)):(w.effectTag|=1,Xl(v,w,R,G),w.child)}function SX(v,w,R,H,G){if(ha(R)){var ye=!0;ff(w)}else ye=!1;if(O0(w,G),w.stateNode===null)v!==null&&(v.alternate=null,w.alternate=null,w.effectTag|=2),iX(w,R,H),gk(w,R,H,G),H=!0;else if(v===null){var Ce=w.stateNode,Me=w.memoizedProps;Ce.props=Me;var St=Ce.context,Ct=R.contextType;typeof Ct=="object"&&Ct!==null?Ct=Sc(Ct):(Ct=ha(R)?xo:fa.current,Ct=Dn(w,Ct));var xr=R.getDerivedStateFromProps,Nr=typeof xr=="function"||typeof Ce.getSnapshotBeforeUpdate=="function";Nr||typeof Ce.UNSAFE_componentWillReceiveProps!="function"&&typeof Ce.componentWillReceiveProps!="function"||(Me!==H||St!==Ct)&&aX(w,Ce,H,Ct),Xh=!1;var ni=w.memoizedState;Ce.state=ni,J_(w,H,Ce,G),St=w.memoizedState,Me!==H||ni!==St||Cn.current||Xh?(typeof xr=="function"&&(V2(w,R,xr,H),St=w.memoizedState),(Me=Xh||nX(w,R,Me,H,ni,St,Ct))?(Nr||typeof Ce.UNSAFE_componentWillMount!="function"&&typeof Ce.componentWillMount!="function"||(typeof Ce.componentWillMount=="function"&&Ce.componentWillMount(),typeof Ce.UNSAFE_componentWillMount=="function"&&Ce.UNSAFE_componentWillMount()),typeof Ce.componentDidMount=="function"&&(w.effectTag|=4)):(typeof Ce.componentDidMount=="function"&&(w.effectTag|=4),w.memoizedProps=H,w.memoizedState=St),Ce.props=H,Ce.state=St,Ce.context=Ct,H=Me):(typeof Ce.componentDidMount=="function"&&(w.effectTag|=4),H=!1)}else Ce=w.stateNode,vk(v,w),Me=w.memoizedProps,Ce.props=w.type===w.elementType?Me:su(w.type,Me),St=Ce.context,Ct=R.contextType,typeof Ct=="object"&&Ct!==null?Ct=Sc(Ct):(Ct=ha(R)?xo:fa.current,Ct=Dn(w,Ct)),xr=R.getDerivedStateFromProps,(Nr=typeof xr=="function"||typeof Ce.getSnapshotBeforeUpdate=="function")||typeof Ce.UNSAFE_componentWillReceiveProps!="function"&&typeof Ce.componentWillReceiveProps!="function"||(Me!==H||St!==Ct)&&aX(w,Ce,H,Ct),Xh=!1,St=w.memoizedState,Ce.state=St,J_(w,H,Ce,G),ni=w.memoizedState,Me!==H||St!==ni||Cn.current||Xh?(typeof xr=="function"&&(V2(w,R,xr,H),ni=w.memoizedState),(xr=Xh||nX(w,R,Me,H,St,ni,Ct))?(Nr||typeof Ce.UNSAFE_componentWillUpdate!="function"&&typeof Ce.componentWillUpdate!="function"||(typeof Ce.componentWillUpdate=="function"&&Ce.componentWillUpdate(H,ni,Ct),typeof Ce.UNSAFE_componentWillUpdate=="function"&&Ce.UNSAFE_componentWillUpdate(H,ni,Ct)),typeof Ce.componentDidUpdate=="function"&&(w.effectTag|=4),typeof Ce.getSnapshotBeforeUpdate=="function"&&(w.effectTag|=256)):(typeof Ce.componentDidUpdate!="function"||Me===v.memoizedProps&&St===v.memoizedState||(w.effectTag|=4),typeof Ce.getSnapshotBeforeUpdate!="function"||Me===v.memoizedProps&&St===v.memoizedState||(w.effectTag|=256),w.memoizedProps=H,w.memoizedState=ni),Ce.props=H,Ce.state=ni,Ce.context=Ct,H=xr):(typeof Ce.componentDidUpdate!="function"||Me===v.memoizedProps&&St===v.memoizedState||(w.effectTag|=4),typeof Ce.getSnapshotBeforeUpdate!="function"||Me===v.memoizedProps&&St===v.memoizedState||(w.effectTag|=256),H=!1);return Nk(v,w,R,H,ye,G)}function Nk(v,w,R,H,G,ye){wX(v,w);var Ce=(w.effectTag&64)!==0;if(!H&&!Ce)return G&&D2(w,R,!1),mf(v,w,ye);H=w.stateNode,dNe.current=w;var Me=Ce&&typeof R.getDerivedStateFromError!="function"?null:H.render();return w.effectTag|=1,v!==null&&Ce?(w.child=I0(w,v.child,null,ye),w.child=I0(w,null,Me,ye)):Xl(v,w,Me,ye),w.memoizedState=H.state,G&&D2(w,R,!0),w.child}function CX(v){var w=v.stateNode;w.pendingContext?Y_(v,w.pendingContext,w.pendingContext!==w.context):w.context&&Y_(v,w.context,!1),_k(v,w.containerInfo)}var Dk={dehydrated:null,retryTime:0};function xX(v,w,R){var H=w.mode,G=w.pendingProps,ye=ro.current,Ce=!1,Me;if((Me=(w.effectTag&64)!==0)||(Me=(ye&2)!==0&&(v===null||v.memoizedState!==null)),Me?(Ce=!0,w.effectTag&=-65):v!==null&&v.memoizedState===null||G.fallback===void 0||G.unstable_avoidThisFallback===!0||(ye|=1),Sn(ro,ye&1),v===null){if(G.fallback!==void 0&&Ok(w),Ce){if(Ce=G.fallback,G=np(null,H,0,null),G.return=w,(w.mode&2)===0)for(v=w.memoizedState!==null?w.child.child:w.child,G.child=v;v!==null;)v.return=G,v=v.sibling;return R=np(Ce,H,R,null),R.return=w,G.sibling=R,w.memoizedState=Dk,w.child=G,R}return H=G.children,w.memoizedState=null,w.child=yk(w,null,H,R)}if(v.memoizedState!==null){if(v=v.child,H=v.sibling,Ce){if(G=G.fallback,R=lv(v,v.pen
24dingProps),R.return=w,(w.mode&2)===0&&(Ce=w.memoizedState!==null?w.child.child:w.child,Ce!==v.child))for(R.child=Ce;Ce!==null;)Ce.return=R,Ce=Ce.sibling;return H=lv(H,G),H.return=w,R.sibling=H,R.childExpirationTime=0,w.memoizedState=Dk,w.child=R,H}return R=I0(w,v.child,G.children,R),w.memoizedState=null,w.child=R}if(v=v.child,Ce){if(Ce=G.fallback,G=np(null,H,0,null),G.return=w,G.child=v,v!==null&&(v.return=G),(w.mode&2)===0)for(v=w.memoizedState!==null?w.child.child:w.child,G.child=v;v!==null;)v.return=G,v=v.sibling;return R=np(Ce,H,R,null),R.return=w,G.sibling=R,R.effectTag|=2,G.childExpirationTime=0,w.memoizedState=Dk,w.child=G,R}return w.memoizedState=null,w.child=I0(w,v,G.children,R)}function TX(v,w){v.expirationTime<w&&(v.expirationTime=w);var R=v.alternate;R!==null&&R.expirationTime<w&&(R.expirationTime=w),JY(v.return,w)}function Mk(v,w,R,H,G,ye){var Ce=v.memoizedState;Ce===null?v.memoizedState={isBackwards:w,rendering:null,renderingStartTime:0,last:H,tail:R,tailExpiration:0,tailMode:G,lastEffect:ye}:(Ce.isBackwards=w,Ce.rendering=null,Ce.renderingStartTime=0,Ce.last=H,Ce.tail=R,Ce.tailExpiration=0,Ce.tailMode=G,Ce.lastEffect=ye)}function AX(v,w,R){var H=w.pendingProps,G=H.revealOrder,ye=H.tail;if(Xl(v,w,H.children,R),H=ro.current,(H&2)!==0)H=H&1|2,w.effectTag|=64;else{if(v!==null&&(v.effectTag&64)!==0)e:for(v=w.child;v!==null;){if(v.tag===13)v.memoizedState!==null&&TX(v,R);else if(v.tag===19)TX(v,R);else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===w)break e;for(;v.sibling===null;){if(v.return===null||v.return===w)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}H&=1}if(Sn(ro,H),(w.mode&2)===0)w.memoizedState=null;else switch(G){case"forwards":for(R=w.child,G=null;R!==null;)v=R.alternate,v!==null&&W2(v)===null&&(G=R),R=R.sibling;R=G,R===null?(G=w.child,w.child=null):(G=R.sibling,R.sibling=null),Mk(w,!1,G,R,ye,w.lastEffect);break;case"backwards":for(R=null,G=w.child,w.child=null;G!==null;){if(v=G.alternate,v!==null&&W2(v)===null){w.child=G;break}v=G.sibling,G.sibling=R,R=G,G=v}Mk(w,!0,R,null,ye,w.lastEffect);break;case"together":Mk(w,!1,null,null,void 0,w.lastEffect);break;default:w.memoizedState=null}return w.child}function mf(v,w,R){v!==null&&(w.dependencies=v.dependencies);var H=w.expirationTime;if(H!==0&&pT(H),w.childExpirationTime<R)return null;if(v!==null&&w.child!==v.child)throw Error(n(153));if(w.child!==null){for(v=w.child,R=lv(v,v.pendingProps),w.child=R,R.return=w;v.sibling!==null;)v=v.sibling,R=R.sibling=lv(v,v.pendingProps),R.return=w;R.sibling=null}return w.child}var PX,Lk,RX,OX;PX=function(v,w){for(var R=w.child;R!==null;){if(R.tag===5||R.tag===6)v.appendChild(R.stateNode);else if(R.tag!==4&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===w)break;for(;R.sibling===null;){if(R.return===null||R.return===w)return;R=R.return}R.sibling.return=R.return,R=R.sibling}},Lk=function(){},RX=function(v,w,R,H,G){var ye=v.memoizedProps;if(ye!==H){var Ce=w.stateNode;switch(Jm(Qu.current),v=null,R){case"input":ye=Or(Ce,ye),H=Or(Ce,H),v=[];break;case"option":ye=Ar(Ce,ye),H=Ar(Ce,H),v=[];break;case"select":ye=t({},ye,{value:void 0}),H=t({},H,{value:void 0}),v=[];break;case"textarea":ye=Ln(Ce,ye),H=Ln(Ce,H),v=[];break;default:typeof ye.onClick!="function"&&typeof H.onClick=="function"&&(Ce.onclick=Ku)}Gm(R,H);var Me,St;R=null;for(Me in ye)if(!H.hasOwnProperty(Me)&&ye.hasOwnProperty(Me)&&ye[Me]!=null)if(Me==="style")for(St in Ce=ye[Me],Ce)Ce.hasOwnProperty(St)&&(R||(R={}),R[St]="");else Me!=="dangerouslySetInnerHTML"&&Me!=="children"&&Me!=="suppressContentEditableWarning"&&Me!=="suppressHydrationWarning"&&Me!=="autoFocus"&&(N.hasOwnProperty(Me)?v||(v=[]):(v=v||[]).push(Me,null));for(Me in H){var Ct=H[Me];if(Ce=ye?.[Me],H.hasOwnProperty(Me)&&Ct!==Ce&&(Ct!=null||Ce!=null))if(Me==="style")if(Ce){for(St in Ce)!Ce.hasOwnProperty(St)||Ct&&Ct.hasOwnProperty(St)||(R||(R={}),R[St]="");for(St in Ct)Ct.hasOwnProperty(St)&&Ce[St]!==Ct[St]&&(R||(R={}),R[St]=Ct[St])}else R||(v||(v=[]),v.push(Me,R)),R=Ct;else Me==="dangerouslySetInnerHTML"?(Ct=Ct?Ct.__html:void 0,Ce=Ce?Ce.__html:void 0,Ct!=null&&
24Ce!==Ct&&(v=v||[]).push(Me,Ct)):Me==="children"?Ce===Ct||typeof Ct!="string"&&typeof Ct!="number"||(v=v||[]).push(Me,""+Ct):Me!=="suppressContentEditableWarning"&&Me!=="suppressHydrationWarning"&&(N.hasOwnProperty(Me)?(Ct!=null&&Wl(G,Me),v||Ce===Ct||(v=[])):(v=v||[]).push(Me,Ct))}R&&(v=v||[]).push("style",R),G=v,(w.updateQueue=G)&&(w.effectTag|=4)}},OX=function(v,w,R,H){R!==H&&(w.effectTag|=4)};function tT(v,w){switch(v.tailMode){case"hidden":w=v.tail;for(var R=null;w!==null;)w.alternate!==null&&(R=w),w=w.sibling;R===null?v.tail=null:R.sibling=null;break;case"collapsed":R=v.tail;for(var H=null;R!==null;)R.alternate!==null&&(H=R),R=R.sibling;H===null?w||v.tail===null?v.tail=null:v.tail.sibling=null:H.sibling=null}}function fNe(v,w,R){var H=w.pendingProps;switch(w.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ha(w.type)&&A0(),null;case 3:return k0(),Wr(Cn),Wr(fa),R=w.stateNode,R.pendingContext&&(R.context=R.pendingContext,R.pendingContext=null),v!==null&&v.child!==null||!eT(w)||(w.effectTag|=4),Lk(w),null;case 5:bk(w),R=Jm(ib.current);var G=w.type;if(v!==null&&w.stateNode!=null)RX(v,w,G,H,R),v.ref!==w.ref&&(w.effectTag|=128);else{if(!H){if(w.stateNode===null)throw Error(n(166));return null}if(v=Jm(Qu.current),eT(w)){H=w.stateNode,G=w.type;var ye=w.memoizedProps;switch(H[bs]=w,H[Ii]=ye,G){case"iframe":case"object":case"embed":Zi("load",H);break;case"video":case"audio":for(v=0;v<Ul.length;v++)Zi(Ul[v],H);break;case"source":Zi("error",H);break;case"img":case"image":case"link":Zi("error",H),Zi("load",H);break;case"form":Zi("reset",H),Zi("submit",H);break;case"details":Zi("toggle",H);break;case"input":vn(H,ye),Zi("invalid",H),Wl(R,"onChange");break;case"select":H._wrapperState={wasMultiple:!!ye.multiple},Zi("invalid",H),Wl(R,"onChange");break;case"textarea":Wn(H,ye),Zi("invalid",H),Wl(R,"onChange")}Gm(G,ye),v=null;for(var Ce in ye)if(ye.hasOwnProperty(Ce)){var Me=ye[Ce];Ce==="children"?typeof Me=="string"?H.textContent!==Me&&(v=["children",Me]):typeof Me=="number"&&H.textContent!==""+Me&&(v=["children",""+Me]):N.hasOwnProperty(Ce)&&Me!=null&&Wl(R,Ce)}switch(G){case"input":pr(H),Zr(H,ye,!0);break;case"textarea":pr(H),jt(H);break;case"select":case"option":break;default:typeof ye.onClick=="function"&&(H.onclick=Ku)}R=v,w.updateQueue=R,R!==null&&(w.effectTag|=4)}else{switch(Ce=R.nodeType===9?R:R.ownerDocument,v===S0&&(v=Xa(G)),v===S0?G==="script"?(v=Ce.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild)):typeof H.is=="string"?v=Ce.createElement(G,{is:H.is}):(v=Ce.createElement(G),G==="select"&&(Ce=v,H.multiple?Ce.multiple=!0:H.size&&(Ce.size=H.size))):v=Ce.createElementNS(v,G),v[bs]=w,v[Ii]=H,PX(v,w,!1,!1),w.stateNode=v,Ce=Lh(G,H),G){case"iframe":case"object":case"embed":Zi("load",v),Me=H;break;case"video":case"audio":for(Me=0;Me<Ul.length;Me++)Zi(Ul[Me],v);Me=H;break;case"source":Zi("error",v),Me=H;break;case"img":case"image":case"link":Zi("error",v),Zi("load",v),Me=H;break;case"form":Zi("reset",v),Zi("submit",v),Me=H;break;case"details":Zi("toggle",v),Me=H;break;case"input":vn(v,H),Me=Or(v,H),Zi("invalid",v),Wl(R,"onChange");break;case"option":Me=Ar(v,H);break;case"select":v._wrapperState={wasMultiple:!!H.multiple},Me=t({},H,{value:void 0}),Zi("invalid",v),Wl(R,"onChange");break;case"textarea":Wn(v,H),Me=Ln(v,H),Zi("invalid",v),Wl(R,"onChange");break;default:Me=H}Gm(G,Me);var St=Me;for(ye in St)if(St.hasOwnProperty(ye)){var Ct=St[ye];ye==="style"?w0(v,Ct):ye==="dangerouslySetInnerHTML"?(Ct=Ct?Ct.__html:void 0,Ct!=null&&Ho(v,Ct)):ye==="children"?typeof Ct=="string"?(G!=="textarea"||Ct!=="")&&gs(v,Ct):typeof Ct=="number"&&gs(v,""+Ct):ye!=="suppressContentEditableWarning"&&ye!=="suppressHydrationWarning"&&ye!=="autoFocus"&&(N.hasOwnProperty(ye)?Ct!=null&&Wl(R,ye):Ct!=null&&Le(v,ye,Ct,Ce))}switch(G){case"input":pr(v),Zr(v,H,!1);break;case"textarea":pr(v),jt(v);break;case"option":H.value!=null&&v.setAttribute("value",""+it(H.value));break;case"select":v.multiple=!!H.multiple,R=H.value,R!=null?Ir(v,!!H.multiple,R,!1):H.defaultValue!=null&&Ir(v,!!H.multiple,H.defaultValue,!0);break;default:typeof Me.onClick=="function"&&(v.onclick=Ku)}Xm(G,H)&&(w.effectTag|=4)}w.ref!==null&&(w.effectTag|=128)}return null;case 6:if(v&&w.stateNode!=null)OX(v,w,v.memoizedProps,H);else{if(typeof H!="string"&&w.stateNode===null)throw Error(n(166));R=Jm(ib.current),Jm(Qu.current),eT(w)?(R=w.stateNode,H=w.memoizedProps,R[bs]=w,R.nodeValue!==H&&(w.effectTag|=4)):(R=(R.nodeType===9?R:R.ownerDocument).createTextNode(H),R[bs]=w,w.stateNode=R)}return null;case 13:return Wr(ro),H=w.memoizedState,(w.effectTag&64)!==0?(w.expirationTime=R,w):(R=H!==null,H=!1,v===null?w.memoizedProps.fallback!==void 0&&eT(w):(G=v.memoizedState,H=G!==null,R||G===null||(G=v.child.sibling,G!==null&&(ye=w.firstEffect,ye!==null?(w.firstEffect=G,G.nextEffect=ye):(w.firstEffect=w.lastEffect=G,G.nextEffect=null),G.effectTag=8))),R&&!H&&(w.mode&2)!==0&&(v===null&&w.memoizedProps.unstable_avoidThisFallback!==!0||(ro.current&1)!==0?$o===rv&&($o=iT):(($o===rv||$o===iT)&&($o=aT),ob!==0&&Zl!==null&&(cv(Zl,_l),rZ(Zl,ob)))),(R||H)&&(w.effectTag|=4),null);case 4:return k0(),Lk(w),null;case 10:return pk(w),null;case 17:return ha(w.type)&&A0(),null;case 19:if(Wr(ro),H=w.memoizedState,H===null)return null;if(G=(w.effectTag&64)!==0,ye=H.rendering,ye===null){if(G)tT(H,!1);else if($o!==rv||v!==null&&(v.effectTag&64)!==0)for(ye=w.child;ye!==null;){if(v=W2(ye),v!==null){for(w.effectTag|=64,tT(H,!1),G=v.updateQueue,G!==null&&(w.updateQueue=G,w.effectTag|=4),H.lastEffect===null&&(w.firstEffect=null),w.lastEffect=H.lastEffect,H=w.child;H!==null;)G=H,ye=R,G.effectTag&=2,G.nextEffect=null,G.firstEffect=null,G.lastEffect=null,v=G.alternate,v===null?(G.childExpirationTime=0,G.expirationTime=ye,G.child=null,G.memoizedProps=null,G.memoizedState=null,G.updateQueue=null,G.dependencies=null):(G.childExpirationTime=v.childExpirationTime,G.expirationTime=v.expirationTime,G.child=v.child,G.memoizedProps=v.memoizedProps,G.memoizedState=v.memoizedState,G.updateQueue=v.updateQueue,ye=v.depen
24dencies,G.dependencies=ye===null?null:{expirationTime:ye.expirationTime,firstContext:ye.firstContext,responders:ye.responders}),H=H.sibling;return Sn(ro,ro.current&1|2),w.child}ye=ye.sibling}}else{if(!G)if(v=W2(ye),v!==null){if(w.effectTag|=64,G=!0,R=v.updateQueue,R!==null&&(w.updateQueue=R,w.effectTag|=4),tT(H,!0),H.tail===null&&H.tailMode==="hidden"&&!ye.alternate)return w=w.lastEffect=H.lastEffect,w!==null&&(w.nextEffect=null),null}else 2*wc()-H.renderingStartTime>H.tailExpiration&&1<R&&(w.effectTag|=64,G=!0,tT(H,!1),w.expirationTime=w.childExpirationTime=R-1);H.isBackwards?(ye.sibling=w.child,w.child=ye):(R=H.last,R!==null?R.sibling=ye:w.child=ye,H.last=ye)}return H.tail!==null?(H.tailExpiration===0&&(H.tailExpiration=wc()+500),R=H.tail,H.rendering=R,H.tail=R.sibling,H.lastEffect=w.lastEffect,H.renderingStartTime=wc(),R.sibling=null,w=ro.current,Sn(ro,G?w&1|2:w&1),R):null}throw Error(n(156,w.tag))}function hNe(v){switch(v.tag){case 1:ha(v.type)&&A0();var w=v.effectTag;return w&4096?(v.effectTag=w&-4097|64,v):null;case 3:if(k0(),Wr(Cn),Wr(fa),w=v.effectTag,(w&64)!==0)throw Error(n(285));return v.effectTag=w&-4097|64,v;case 5:return bk(v),null;case 13:return Wr(ro),w=v.effectTag,w&4096?(v.effectTag=w&-4097|64,v):null;case 19:return Wr(ro),null;case 4:return k0(),null;case 10:return pk(v),null;default:return null}}function Fk(v,w){return{value:v,source:w,stack:ze(w)}}var pNe=typeof WeakSet=="function"?WeakSet:Set;function Bk(v,w){var R=w.source,H=w.stack;H===null&&R!==null&&(H=ze(R)),R!==null&&st(R.type),w=w.value,v!==null&&v.tag===1&&st(v.type);try{console.error(w)}catch(G){setTimeout(function(){throw G})}}function mNe(v,w){try{w.props=v.memoizedProps,w.state=v.memoizedState,w.componentWillUnmount()}catch(R){sv(v,R)}}function IX(v){var w=v.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(R){sv(v,R)}else w.current=null}function vNe(v,w){switch(w.tag){case 0:case 11:case 15:case 22:return;case 1:if(w.effectTag&256&&v!==null){var R=v.memoizedProps,H=v.memoizedState;v=w.stateNode,w=v.getSnapshotBeforeUpdate(w.elementType===w.type?R:su(w.type,R),H),v.__reactInternalSnapshotBeforeUpdate=w}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(n(163))}function kX(v,w){if(w=w.updateQueue,w=w!==null?w.lastEffect:null,w!==null){var R=w=w.next;do{if((R.tag&v)===v){var H=R.destroy;R.destroy=void 0,H!==void 0&&H()}R=R.next}while(R!==w)}}function NX(v,w){if(w=w.updateQueue,w=w!==null?w.lastEffect:null,w!==null){var R=w=w.next;do{if((R.tag&v)===v){var H=R.create;R.destroy=H()}R=R.next}while(R!==w)}}function gNe(v,w,R){switch(R.tag){case 0:case 11:case 15:case 22:NX(3,R);return;case 1:if(v=R.stateNode,R.effectTag&4)if(w===null)v.componentDidMount();else{var H=R.elementType===R.type?w.memoizedProps:su(R.type,w.memoizedProps);v.componentDidUpdate(H,w.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}w=R.updateQueue,w!==null&&tX(R,w,v);return;case 3:if(w=R.updateQueue,w!==null){if(v=null,R.child!==null)switch(R.child.tag){case 5:v=R.child.stateNode;break;case 1:v=R.child.stateNode}tX(R,w,v)}return;case 5:v=R.stateNode,w===null&&R.effectTag&4&&Xm(R.type,R.memoizedProps)&&v.focus();return;case 6:return;case 4:return;case 12:return;case 13:R.memoizedState===null&&(R=R.alternate,R!==null&&(R=R.memoizedState,R!==null&&(R=R.dehydrated,R!==null&&of(R))));return;case 19:case 17:case 20:case 21:return}throw Error(n(163))}function DX(v,w,R){switch(typeof Xk=="function"&&Xk(w),w.tag){case 0:case 11:case 14:case 15:case 22:if(v=w.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var H=v.next;Yh(97<R?97:R,function(){var G=H;do{var ye=G.destroy;if(ye!==void 0){var Ce=w;try{ye()}catch(Me){sv(Ce,Me)}}G=G.next}while(G!==H)})}break;case 1:IX(w),R=w.stateNode,typeof R.componentWillUnmount=="function"&&mNe(w,R);break;case 5:IX(w);break;case 4:BX(v,w,R)}}function MX(v){var w=v.alternate;v.return=null,v.child=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.alternate=null,v.firstEffect=null,v.lastEffect=null,v.pendingProps=null,v.memoizedProps=null,v.stateNode=null,w!==null&&MX(w)}function LX(v){return v.tag===5||v.tag===3||v.tag===4}function FX(v){e:{for(var w=v.return;w!==null;){if(LX(w)){var R=w;break e}w=w.return}throw Error(n(160))}switch(w=R.stateNode,R.tag){case 5:var H=!1;break;case 3:w=w.containerInfo,H=!0;break;case 4:w=w.containerInfo,H=!0;break;default:throw Error(n(161))}R.effectTag&16&&(gs(w,""),R.effectTag&=-17);e:t:for(R=v;;){for(;R.sibling===null;){if(R.return===null||LX(R.return)){R=null;break e}R=R.return}for(R.sibling.return=R.return,R=R.sibling;R.tag!==5&&R.tag!==6&&R.tag!==18;){if(R.effectTag&2||R.child===null||R.tag===4)continue t;R.child.return=R,R=R.child}if(!(R.effectTag&2)){R=R.stateNode;break e}}H?zk(v,R,w):Hk(v,R,w)}function zk(v,w,R){var H=v.tag,G=H===5||H===6;if(G)v=G?v.stateNode:v.stateNode.instance,w?R.nodeType===8?R.parentNode.insertBefore(v,w):R.insertBefore(v,w):(R.nodeType===8?(w=R.parentNode,w.insertBefore(v,R)):(w=R,w.appendChild(v)),R=R._reactRootContainer,R!=null||w.onclick!==null||(w.onclick=Ku));else if(H!==4&&(v=v.child,v!==null))for(zk(v,w,R),v=v.sibling;v!==null;)zk(v,w,R),v=v.sibling}function Hk(v,w,R){var H=v.tag,G=H===5||H===6;if(G)v=G?v.stateNode:v.stateNode.instance,w?R.insertBefore(v,w):R.appendChild(v);else if(H!==4&&(v=v.child,v!==null))for(Hk(v,w,R),v=v.sibling;v!==null;)Hk(v,w,R),v=v.sibling}function BX(v,w,R){for(var H=w,G=!1,ye,Ce;;){if(!G){G=H.return;e:for(;;){if(G===null)throw Error(n(160));switch(ye=G.stateNode,G.tag){case 5:Ce=!1;break e;case 3:ye=ye.containerInfo,Ce=!0;break e;case 4:ye=ye.containerInfo,Ce=!0;break e}G=G.return}G=!0}if(H.tag===5||H.tag===6){e:for(var Me=v,St=H,Ct=R,xr=St;;)if(DX(Me,xr,Ct),xr.child!==null&&xr.tag!==4)xr.child.return=xr,xr=xr.child;else{if(xr===St)break e;for(;xr.sibling===null;){if(xr.return===null||xr.return===St)break e;xr=xr.return}xr.sibling.return=xr.return,xr=xr.sibling}Ce?(Me=ye,St=H.stateNode,Me.nodeType===8?Me.parentNode.removeChild(St):Me.removeChild(St)):ye.removeChild(H.stateNode)}else if(H.tag===4){if(H.child!==null){ye=H.stateNode.containerInfo,Ce=!0,H.child.return=H,H=H.child;continue}}else if(DX(v,H,R),H.child!==null){H.child.return=H,H=H.child;continue}if(H===w)break;for(;H.sibling===null;){if(H.return===null||H.return===w)return;H=H.return,H.tag===4&&(G=!1)}H.sibling.return=H.return,H=H.sibling}}function Uk(v,w){switch(w.tag){case 0:case 11:case 14:case 15:case 22:kX(3,w);return;case 1:return;case 5:var R=w.stateNode;if(R!=null){var H=w.memoizedProps,G=v!==null?v.memoizedProps:H;v=w.type;var ye=w.updateQueue;if(w.updateQueue=null,ye!==null){for(R[Ii]=H,v==="input"&&H.type==="radio"&&H.name!=null&&cn(R,H),Lh(v,G),w=Lh(v,H),G=0;G<ye.length;G+=2){var Ce=ye[G],Me=ye[G+1];Ce==="style"?w0(R,Me):Ce==="dangerouslySetInnerHTML"?Ho(R,Me):Ce==="children"?gs(R,Me):Le(R,Ce,Me,w)}switch(v){case"input":Xr(R,H);break;case"textarea":wr(R,H);break;case"select":w=R._wrapperState.wasMultiple,R._wrapperState.wasMultiple=!!H.multiple,v=H.value,v!=null?Ir(R,!!H.multiple,v,!1):w!==!!H.multiple&&(H.defaultValue!=null?Ir(R,!!H.multiple,H.defaultValue,!0):Ir(R,!!H.multiple,H.multiple?[]:"",!1))}}}return;case 6:if(w.stateNode===null)throw Error(n(162));w.stateNode.nodeValue=w.memoizedProps;return;case 3:w=w.stateNode,w.hydrate&&(w.hydrate=!1,of(w.containerInfo));return;case 12:return;case 13:if(R=w,w.memoizedState===null?H=!1:(H=!0,R=w.child,jk=wc()),R!==null)e:for(v=R;;){if(v.tag===5)ye=v.stateNode,H?(ye=ye.style,typeof ye.setProperty=="function"?ye.setProperty("display","none","important"):ye.display="none"):(ye=v.stateNode,G=v.memoizedProps.style,G=G!=null&&G.hasOwnProperty("display")?G.display:null,ye.style.display=$m("display",G));else if(v.tag===6)v.stateNode.nodeValue=H?"":v.memoizedProps;else if(v.tag===13&&v.memoizedState!==null&&v.memoizedState.dehydrated===null){ye=v.child.sibling,ye.return=v,v=ye;continue}else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===R)break;for(;v.sibling===null;){if(v.return===null||v.return===R)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}zX(w);return;case 19:zX(w);return;case 17:return}throw Error(n(163))}function zX(v){var w=v.updateQueue;if(w!==null){v.updateQueue=null;var R=v.stateNode;
24R===null&&(R=v.stateNode=new pNe),w.forEach(function(H){var G=ANe.bind(null,v,H);R.has(H)||(R.add(H),H.then(G,G))})}}var yNe=typeof WeakMap=="function"?WeakMap:Map;function HX(v,w,R){R=Zh(R,null),R.tag=3,R.payload={element:null};var H=w.value;return R.callback=function(){cT||(cT=!0,$k=H),Bk(v,w)},R}function UX(v,w,R){R=Zh(R,null),R.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var G=w.value;R.payload=function(){return Bk(v,w),H(G)}}var ye=v.stateNode;return ye!==null&&typeof ye.componentDidCatch=="function"&&(R.callback=function(){typeof H!="function"&&(tp===null?tp=new Set([this]):tp.add(this),Bk(v,w));var Ce=w.stack;this.componentDidCatch(w.value,{componentStack:Ce!==null?Ce:""})}),R}var _Ne=Math.ceil,rT=ke.ReactCurrentDispatcher,VX=ke.ReactCurrentOwner,jo=0,Vk=8,lu=16,ed=32,rv=0,nT=1,qX=2,iT=3,aT=4,qk=5,pn=jo,Zl=null,On=null,_l=0,$o=rv,oT=null,vf=1073741823,ab=1073741823,sT=null,ob=0,lT=!1,jk=0,jX=500,Ur=null,cT=!1,$k=null,tp=null,uT=!1,sb=null,lb=90,nv=null,cb=0,Wk=null,dT=0;function td(){return(pn&(lu|ed))!==jo?1073741821-(wc()/10|0):dT!==0?dT:dT=1073741821-(wc()/10|0)}function iv(v,w,R){if(w=w.mode,(w&2)===0)return 1073741823;var H=F2();if((w&4)===0)return H===99?1073741823:1073741822;if((pn&lu)!==jo)return _l;if(R!==null)v=B2(v,R.timeoutMs|0||5e3,250);else switch(H){case 99:v=1073741823;break;case 98:v=B2(v,150,100);break;case 97:case 96:v=B2(v,5e3,250);break;case 95:v=2;break;default:throw Error(n(326))}return Zl!==null&&v===_l&&--v,v}function rp(v,w){if(50<cb)throw cb=0,Wk=null,Error(n(185));if(v=fT(v,w),v!==null){var R=F2();w===1073741823?(pn&Vk)!==jo&&(pn&(lu|ed))===jo?Gk(v):(Ql(v),pn===jo&&Zu()):Ql(v),(pn&4)===jo||R!==98&&R!==99||(nv===null?nv=new Map([[v,w]]):(R=nv.get(v),(R===void 0||R>w)&&nv.set(v,w)))}}function fT(v,w){v.expirationTime<w&&(v.expirationTime=w);var R=v.alternate;R!==null&&R.expirationTime<w&&(R.expirationTime=w);var H=v.return,G=null;if(H===null&&v.tag===3)G=v.stateNode;else for(;H!==null;){if(R=H.alternate,H.childExpirationTime<w&&(H.childExpirationTime=w),R!==null&&R.childExpirationTime<w&&(R.childExpirationTime=w),H.return===null&&H.tag===3){G=H.stateNode;break}H=H.return}return G!==null&&(Zl===G&&(pT(w),$o===aT&&cv(G,_l)),rZ(G,w)),G}function hT(v){var w=v.lastExpiredTime;if(w!==0||(w=v.firstPendingTime,!tZ(v,w)))return w;var R=v.lastPingedTime;return v=v.nextKnownPendingLevel,v=R>v?R:v,2>=v&&w!==v?0:v}function Ql(v){if(v.lastExpiredTime!==0)v.callbackExpirationTime=1073741823,v.callbackPriority=99,v.callbackNode=ZY(Gk.bind(null,v));else{var w=hT(v),R=v.callbackNode;if(w===0)R!==null&&(v.callbackNode=null,v.callbackExpirationTime=0,v.callbackPriority=90);else{var H=td();if(w===1073741823?H=99:w===1||w===2?H=95:(H=10*(1073741821-w)-10*(1073741821-H),H=0>=H?99:250>=H?98:5250>=H?97:95),R!==null){var G=v.callbackPriority;if(v.callbackExpirationTime===w&&G>=H)return;R!==GY&&P0(R)}v.callbackExpirationTime=w,v.callbackPriority=H,w=w===1073741823?ZY(Gk.bind(null,v)):XY(H,$X.bind(null,v),{timeout:10*(1073741821-w)-wc()}),v.callbackNode=w}}}function $X(v,w){if(dT=0,w)return w=td(),eN(v,w),Ql(v),null;var R=hT(v);if(R!==0){if(w=v.callbackNode,(pn&(lu|ed))!==jo)throw Error(n(327));if(M0(),v===Zl&&R===_l||av(v,R),On!==null){var H=pn;pn|=lu;var G=YX();do try{wNe();break}catch(Me){KX(v,Me)}while(!0);if(hk(),pn=H,rT.current=G,$o===nT)throw w=oT,av(v,R),cv(v,R),Ql(v),w;if(On===null)switch(G=v.finishedWork=v.current.alternate,v.finishedExpirationTime=R,H=$o,Zl=null,H){case rv:case nT:throw Error(n(345));case qX:eN(v,2<R?2:R);break;case iT:if(cv(v,R),H=v.lastSuspendedTime,R===H&&(v.nextKnownPendingLevel=Kk(G)),vf===1073741823&&(G=jk+jX-wc(),10<G)){if(lT){var ye=v.lastPingedTime;if(ye===0||ye>=R){v.lastPingedTime=R,av(v,R);break}}if(ye=hT(v),ye!==0&&ye!==R)break;if(H!==0&&H!==R){v.lastPingedTime=H;break}v.timeoutHandle=Ys(ov.bind(null,v),G);break}ov(v);break;case aT:if(cv(v,R),H=v.lastSuspendedTime,R===H&&(v.nextKnownPendingLevel=Kk(G)),lT&&(G=v.lastPingedTime,G===0||G>=R)){v.lastPingedTime=R,av(v,R);break}if(G=hT(v),G!==0&&G!==R)break;if(H!==0&&H!==R){v.lastPingedTime=H;break}if(ab!==1073741823?H=10*(1073741821-ab)-wc():vf===1073741823?H=0:(H=10*(1073741821-vf)-5e3,G=wc(),R=10*(1073741821-R)-G,H=G-H,0>H&&(H=0),H=(120>H?120:480>H?480:1080>H?1080:1920>H?1920:3e3>H?3e3:4320>H?4320:1960*_Ne(H/1960))-H,R<H&&(H=R)),10<H){v.timeoutHandle=Ys(ov.bind(null,v),H);break}ov(v);break;case qk:if(vf!==1073741823&&sT!==null){ye=vf;var Ce=sT;if(H=Ce.busyMinDurationMs|0,0>=H?H=0:(G=Ce.busyDelayMs|0,ye=wc()-(10*(1073741821-ye)-(Ce.timeoutMs|0||5e3)),H=ye<=G?0:G+H-ye),10<H){cv(v,R),v.timeoutHandle=Ys(ov.bind(null,v),H);break}}ov(v);break;default:throw Error(n(329))}if(Ql(v),v.callbackNode===w)return $X.bind(null,v)}}return null}function Gk(v){var w=v.lastExpiredTime;if(w=w!==0?w:1073741823,(pn&(lu|ed))!==jo)throw Error(n(327));if(M0(),v===Zl&&w===_l||av(v,w),On!==null){var R=pn;pn|=lu;var H=YX();do try{ENe();break}catch(G){KX(v,G)}while(!0);if(hk(),pn=R,rT.current=H,$o===nT)throw R=oT,av(v,w),cv(v,w),Ql(v),R;if(On!==null)throw Error(n(261));v.finishedWork=v.current.alternate,v.finishedExpirationTime=w,Zl=null,ov(v),Ql(v)}return null}function bNe(){if(nv!==null){var v=nv;nv=null,v.forEach(function(w,R){eN(R,w),Ql(R)}),Zu()}}function WX(v,w){var R=pn;pn|=1;try{return v(w)}finally{pn=R,pn===jo&&Zu()}}function GX(v,w){var R=pn;pn&=-2,pn|=Vk;try{return v(w)}finally{pn=R,pn===jo&&Zu()}}function av(v,w){v.finishedWork=null,v.finishedExpirationTime=0;var R=v.timeoutHandle;if(R!==-1&&(v.timeoutHandle=-1,x0(R)),On!==null)for(R=On.return;R!==null;){var H=R;switch(H.tag){case 1:H=H.type.childContextTypes,H!=null&&A0();break;case 3:k0(),Wr(Cn),Wr(fa);break;case 5:bk(H);break;case 4:k0();break;case 13:Wr(ro);break;case 19:Wr(ro);break;case 10:pk(H)}R=R.return}Zl=v,On=lv(v.current,null),_l=w,$o=rv,oT=null,ab=vf=1073741823,sT=null,ob=0,lT=!1}function KX(v,w){do{try{if(hk(),G2.current=J2,K2)for(var R=No.memoizedState;R!==null;){var H=R.queue;H!==null&&(H.pending=null),R=R.next}if(Jh=0,xs=Cs=No=null,K2=!1,On===null||On.return===null)return $o=nT,oT=w,On=null;e:{var G=v,ye=On.return,Ce=On,Me=w;if(w=_l,Ce.effectTag|=2048,Ce.firstEffect=Ce.lastEffect=null,Me!==null&&typeof Me=="object"&&typeof Me.then=="function"){var St=Me;if((Ce.mode&2)===0){var Ct=Ce.alternate;Ct?(Ce.updateQueue=Ct.updateQueue,Ce.memoizedState=Ct.memoizedState,Ce.expirationTime=Ct.expirationTime):(Ce.updateQueue=null,Ce.memoizedState=null)}var xr=(ro.current&1)!==0,Nr=ye;do{var ni;
24if(ni=Nr.tag===13){var Ci=Nr.memoizedState;if(Ci!==null)ni=Ci.dehydrated!==null;else{var xc=Nr.memoizedProps;ni=xc.fallback===void 0?!1:xc.unstable_avoidThisFallback!==!0?!0:!xr}}if(ni){var is=Nr.updateQueue;if(is===null){var yt=new Set;yt.add(St),Nr.updateQueue=yt}else is.add(St);if((Nr.mode&2)===0){if(Nr.effectTag|=64,Ce.effectTag&=-2981,Ce.tag===1)if(Ce.alternate===null)Ce.tag=17;else{var nt=Zh(1073741823,null);nt.tag=2,Qh(Ce,nt)}Ce.expirationTime=1073741823;break e}Me=void 0,Ce=w;var Pt=G.pingCache;if(Pt===null?(Pt=G.pingCache=new yNe,Me=new Set,Pt.set(St,Me)):(Me=Pt.get(St),Me===void 0&&(Me=new Set,Pt.set(St,Me))),!Me.has(Ce)){Me.add(Ce);var lr=TNe.bind(null,G,St,Ce);St.then(lr,lr)}Nr.effectTag|=4096,Nr.expirationTime=w;break e}Nr=Nr.return}while(Nr!==null);Me=Error((st(Ce.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
25
26Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+ze(Ce))}$o!==qk&&($o=qX),Me=Fk(Me,Ce),Nr=ye;do{switch(Nr.tag){case 3:St=Me,Nr.effectTag|=4096,Nr.expirationTime=w;var Er=HX(Nr,St,w);eX(Nr,Er);break e;case 1:St=Me;var Dr=Nr.type,Jr=Nr.stateNode;if((Nr.effectTag&64)===0&&(typeof Dr.getDerivedStateFromError=="function"||Jr!==null&&typeof Jr.componentDidCatch=="function"&&(tp===null||!tp.has(Jr)))){Nr.effectTag|=4096,Nr.expirationTime=w;var pi=UX(Nr,St,w);eX(Nr,pi);break e}}Nr=Nr.return}while(Nr!==null)}On=QX(On)}catch(qa){w=qa;continue}break}while(!0)}function YX(){var v=rT.current;return rT.current=J2,v===null?J2:v}function XX(v,w){v<vf&&2<v&&(vf=v),w!==null&&v<ab&&2<v&&(ab=v,sT=w)}function pT(v){v>ob&&(ob=v)}function ENe(){for(;On!==null;)On=ZX(On)}function wNe(){for(;On!==null&&!oNe();)On=ZX(On)}function ZX(v){var w=eZ(v.alternate,v,_l);return v.memoizedProps=v.pendingProps,w===null&&(w=QX(v)),VX.current=null,w}function QX(v){On=v;do{var w=On.alternate;if(v=On.return,(On.effectTag&2048)===0){if(w=fNe(w,On,_l),_l===1||On.childExpirationTime!==1){for(var R=0,H=On.child;H!==null;){var G=H.expirationTime,ye=H.childExpirationTime;G>R&&(R=G),ye>R&&(R=ye),H=H.sibling}On.childExpirationTime=R}if(w!==null)return w;v!==null&&(v.effectTag&2048)===0&&(v.firstEffect===null&&(v.firstEffect=On.firstEffect),On.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=On.firstEffect),v.lastEffect=On.lastEffect),1<On.effectTag&&(v.lastEffect!==null?v.lastEffect.nextEffect=On:v.firstEffect=On,v.lastEffect=On))}else{if(w=hNe(On),w!==null)return w.effectTag&=2047,w;v!==null&&(v.firstEffect=v.lastEffect=null,v.effectTag|=2048)}if(w=On.sibling,w!==null)return w;On=v}while(On!==null);return $o===rv&&($o=qk),null}function Kk(v){var w=v.expirationTime;return v=v.childExpirationTime,w>v?w:v}function ov(v){var w=F2();return Yh(99,SNe.bind(null,v,w)),null}function SNe(v,w){do M0();while(sb!==null);if((pn&(lu|ed))!==jo)throw Error(n(327));var R=v.finishedWork,H=v.finishedExpirationTime;if(R===null)return null;if(v.finishedWork=null,v.finishedExpirationTime=0,R===v.current)throw Error(n(177));v.callbackNode=null,v.callbackExpirationTime=0,v.callbackPriority=90,v.nextKnownPendingLevel=0;var G=Kk(R);if(v.firstPendingTime=G,H<=v.lastSuspendedTime?v.firstSuspendedTime=v.lastSuspendedTime=v.nextKnownPendingLevel=0:H<=v.firstSuspendedTime&&(v.firstSuspendedTime=H-1),H<=v.lastPingedTime&&(v.lastPingedTime=0),H<=v.lastExpiredTime&&(v.lastExpiredTime=0),v===Zl&&(On=Zl=null,_l=0),1<R.effectTag?R.lastEffect!==null?(R.lastEffect.nextEffect=R,G=R.firstEffect):G=R:G=R.firstEffect,G!==null){var ye=pn;pn|=ed,VX.current=null,q=Mh;var Ce=Gl();if(Fh(Ce)){if("selectionStart"in Ce)var Me={start:Ce.selectionStart,end:Ce.selectionEnd};else e:{Me=(Me=Ce.ownerDocument)&&Me.defaultView||window;var St=Me.getSelection&&Me.getSelection();if(St&&St.rangeCount!==0){Me=St.anchorNode;var Ct=St.anchorOffset,xr=St.focusNode;St=St.focusOffset;try{Me.nodeType,xr.nodeType}catch{Me=null;break e}var Nr=0,ni=-1,Ci=-1,xc=0,is=0,yt=Ce,nt=null;t:for(;;){for(var Pt;yt!==Me||Ct!==0&&yt.nodeType!==3||(ni=Nr+Ct),yt!==xr||St!==0&&yt.nodeType!==3||(Ci=Nr+St),yt.nodeType===3&&(Nr+=yt.nodeValue.length),(Pt=yt.firstChild)!==null;)nt=yt,yt=Pt;for(;;){if(yt===Ce)break t;if(nt===Me&&++xc===Ct&&(ni=Nr),nt===xr&&++is===St&&(Ci=Nr),(Pt=yt.nextSibling)!==null)break;yt=nt,nt=yt.parentNode}yt=Pt}Me=ni===-1||Ci===-1?null:{start:ni,end:Ci}}else Me=null}Me=Me||{start:0,end:0}}else Me=null;Hh={activeElementDetached:null,focusedElem:Ce,selectionRange:Me},Mh=!1,Ur=G;do try{CNe()}catch(Fn){if(Ur===null)throw Error(n(330));sv(Ur,Fn),Ur=Ur.nextEffect}while(Ur!==null);Ur=G;do try{for(Ce=v,Me=w;Ur!==null;){var lr=Ur.effectTag;if(lr&16&&gs(Ur.stateNode,""),lr&128){var Er=Ur.alternate;if(Er!==null){var Dr=Er.ref;Dr!==null&&(typeof Dr=="function"?Dr(null):Dr.current=null)}}switch(lr&1038){case 2:FX(Ur),Ur.effectTag&=-3;break;case 6:FX(Ur),Ur.effectTag&=-3,Uk(Ur.alternate,Ur);break;case 1024:Ur.effectTag&=-1025;break;case 1028:Ur.effectTag&=-1025,Uk(Ur.alternate,Ur);break;case 4:Uk(Ur.alternate,Ur);break;case 8:Ct=Ur,BX(Ce,Ct,Me),MX(Ct)}Ur=Ur.nextEffect}}catch(Fn){if(Ur===null)throw Error(n(330));sv(Ur,Fn),Ur=Ur.nextEffect}while(Ur!==null);if(Dr=Hh,Er=Gl(),lr=Dr.focusedElem,Me=Dr.selectionRange,Er!==lr&&lr&&lr.ownerDocument&&Km(lr.ownerDocument.documentElement,lr)){for(Me!==null&&Fh(lr)&&(Er=Me.start,Dr=Me.end,Dr===void 0&&(Dr=Er),"selectionStart"in lr?(lr.selectionStart=Er,lr.selectionEnd=Math.min(Dr,lr.value.length)):(Dr=(Er=lr.ownerDocument||document)&&Er.defaultView||window,Dr.getSelection&&(Dr=Dr.getSelection(),Ct=lr.textContent.length,Ce=Math.min(Me.start,Ct),Me=Me.end===void 0?Ce:Math.min(Me.end,Ct),!Dr.extend&&Ce>Me&&(Ct=Me,Me=Ce,Ce=Ct),Ct=C0(lr,Ce),xr=C0(lr,Me),Ct&&xr&&(Dr.rangeCount!==1||Dr.anchorNode!==Ct.node||Dr.anchorOffset!==Ct.offset||Dr.focusNode!==xr.node||Dr.focusOffset!==xr.offset)&&(Er=Er.createRange(),Er.setStart(Ct.node,Ct.offset),Dr.removeAllRanges(),Ce>Me?(Dr.addRange(Er),Dr.extend(xr.node,xr.offset)):(Er.setEnd(xr.node,xr.offset),Dr.addRange(Er)))))),Er=[],Dr=lr;Dr=Dr.parentNode;)Dr.nodeType===1&&Er.push({element:Dr,left:Dr.scrollLeft,top:Dr.scrollTop});for(typeof lr.focus=="function"&&lr.focus(),lr=0;lr<Er.length;lr++)Dr=Er[lr],Dr.element.scrollLeft=Dr.left,Dr.element.scrollTop=Dr.top}Mh=!!q,Hh=q=null,v.current=R,Ur=G;do try{for(lr=v;Ur!==null;){var Jr=Ur.effectTag;if(Jr&36&&gNe(lr,Ur.alternate,Ur),Jr&128){Er=void 0;var pi=Ur.ref;if(pi!==null){var qa=Ur.stateNode;Ur.tag,Er=qa,typeof pi=="function"?pi(Er):pi.current=Er}}Ur=Ur.nextEffect}}catch(Fn){if(Ur===null)throw Error(n(330));sv(Ur,Fn),Ur=Ur.nextEffect}while(Ur!==null);Ur=null,sNe(),pn=ye}else v.current=R;if(uT)uT=!1,sb=v,lb=w;else for(Ur=G;Ur!==null;)w=Ur.nextEffect,Ur.nextEffect=null,Ur=w;if(w=v.firstPendingTime,w===0&&(tp=null),w===1073741823?v===Wk?cb++:(cb=0,Wk=v):cb=0,typeof Yk=="function"&&Yk(R.stateNode,H),Ql(v),cT)throw cT=!1,v=$k,$k=null,v;return(pn&Vk)!==jo||Zu(),null}function CNe(){for(;
26Ur!==null;){var v=Ur.effectTag;(v&256)!==0&&vNe(Ur.alternate,Ur),(v&512)===0||uT||(uT=!0,XY(97,function(){return M0(),null})),Ur=Ur.nextEffect}}function M0(){if(lb!==90){var v=97<lb?97:lb;return lb=90,Yh(v,xNe)}}function xNe(){if(sb===null)return!1;var v=sb;if(sb=null,(pn&(lu|ed))!==jo)throw Error(n(331));var w=pn;for(pn|=ed,v=v.current.firstEffect;v!==null;){try{var R=v;if((R.effectTag&512)!==0)switch(R.tag){case 0:case 11:case 15:case 22:kX(5,R),NX(5,R)}}catch(H){if(v===null)throw Error(n(330));sv(v,H)}R=v.nextEffect,v.nextEffect=null,v=R}return pn=w,Zu(),!0}function JX(v,w,R){w=Fk(R,w),w=HX(v,w,1073741823),Qh(v,w),v=fT(v,1073741823),v!==null&&Ql(v)}function sv(v,w){if(v.tag===3)JX(v,v,w);else for(var R=v.return;R!==null;){if(R.tag===3){JX(R,v,w);break}else if(R.tag===1){var H=R.stateNode;if(typeof R.type.getDerivedStateFromError=="function"||typeof H.componentDidCatch=="function"&&(tp===null||!tp.has(H))){v=Fk(w,v),v=UX(R,v,1073741823),Qh(R,v),R=fT(R,1073741823),R!==null&&Ql(R);break}}R=R.return}}function TNe(v,w,R){var H=v.pingCache;H!==null&&H.delete(w),Zl===v&&_l===R?$o===aT||$o===iT&&vf===1073741823&&wc()-jk<jX?av(v,_l):lT=!0:tZ(v,R)&&(w=v.lastPingedTime,w!==0&&w<R||(v.lastPingedTime=R,Ql(v)))}function ANe(v,w){var R=v.stateNode;R!==null&&R.delete(w),w=0,w===0&&(w=td(),w=iv(w,v,null)),v=fT(v,w),v!==null&&Ql(v)}var eZ;eZ=function(v,w,R){var H=w.expirationTime;if(v!==null){var G=w.pendingProps;if(v.memoizedProps!==G||Cn.current)Ju=!0;else{if(H<R){switch(Ju=!1,w.tag){case 3:CX(w),Ik();break;case 5:if(sX(w),w.mode&4&&R!==1&&G.hidden)return w.expirationTime=w.childExpirationTime=1,null;break;case 1:ha(w.type)&&ff(w);break;case 4:_k(w,w.stateNode.containerInfo);break;case 10:H=w.memoizedProps.value,G=w.type._context,Sn(z2,G._currentValue),G._currentValue=H;break;case 13:if(w.memoizedState!==null)return H=w.child.childExpirationTime,H!==0&&H>=R?xX(v,w,R):(Sn(ro,ro.current&1),w=mf(v,w,R),w!==null?w.sibling:null);Sn(ro,ro.current&1);break;case 19:if(H=w.childExpirationTime>=R,(v.effectTag&64)!==0){if(H)return AX(v,w,R);w.effectTag|=64}if(G=w.memoizedState,G!==null&&(G.rendering=null,G.tail=null),Sn(ro,ro.current),!H)return null}return mf(v,w,R)}Ju=!1}}else Ju=!1;switch(w.expirationTime=0,w.tag){case 2:if(H=w.type,v!==null&&(v.alternate=null,w.alternate=null,w.effectTag|=2),v=w.pendingProps,G=Dn(w,fa.current),O0(w,R),G=Sk(null,w,H,v,G,R),w.effectTag|=1,typeof G=="object"&&G!==null&&typeof G.render=="function"&&G.$$typeof===void 0){if(w.tag=1,w.memoizedState=null,w.updateQueue=null,ha(H)){var ye=!0;ff(w)}else ye=!1;w.memoizedState=G.state!==null&&G.state!==void 0?G.state:null,mk(w);var Ce=H.getDerivedStateFromProps;typeof Ce=="function"&&V2(w,H,Ce,v),G.updater=q2,w.stateNode=G,G._reactInternalFiber=w,gk(w,H,v,R),w=Nk(null,w,H,!0,ye,R)}else w.tag=0,Xl(null,w,G,R),w=w.child;return w;case 16:e:{if(G=w.elementType,v!==null&&(v.alternate=null,w.alternate=null,w.effectTag|=2),v=w.pendingProps,mt(G),G._status!==1)throw G._result;switch(G=G._result,w.type=G,ye=w.tag=ONe(G),v=su(G,v),ye){case 0:w=kk(null,w,G,v,R);break e;case 1:w=SX(null,w,G,v,R);break e;case 11:w=_X(null,w,G,v,R);break e;case 14:w=bX(null,w,G,su(G.type,v),H,R);break e}throw Error(n(306,G,""))}return w;case 0:return H=w.type,G=w.pendingProps,G=w.elementType===H?G:su(H,G),kk(v,w,H,G,R);case 1:return H=w.type,G=w.pendingProps,G=w.elementType===H?G:su(H,G),SX(v,w,H,G,R);case 3:if(CX(w),H=w.updateQueue,v===null||H===null)throw Error(n(282));if(H=w.pendingProps,G=w.memoizedState,G=G!==null?G.element:null,vk(v,w),J_(w,H,null,R),H=w.memoizedState.element,H===G)Ik(),w=mf(v,w,R);else{if((G=w.stateNode.hydrate)&&(ep=nu(w.stateNode.containerInfo.firstChild),pf=w,G=tv=!0),G)for(R=yk(w,null,H,R),w.child=R;R;)R.effectTag=R.effectTag&-3|1024,R=R.sibling;else Xl(v,w,H,R),Ik();w=w.child}return w;case 5:return sX(w),v===null&&Ok(w),H=w.type,G=w.pendingProps,ye=v!==null?v.memoizedProps:null,Ce=G.children,Ec(H,G)?Ce=null:ye!==null&&Ec(H,ye)&&(w.effectTag|=16),wX(v,w),w.mode&4&&R!==1&&G.hidden?(w.expirationTime=w.childExpirationTime=1,w=null):(Xl(v,w,Ce,R),w=w.child),w;case 6:return v===null&&Ok(w),null;case 13:return xX(v,w,R);case 4:return _k(w,w.stateNode.containerInfo),H=w.pendingProps,v===null?w.child=I0(w,null,H,R):Xl(v,w,H,R),w.child;case 11:return H=w.type,G=w.pendingProps,G=w.elementType===H?G:su(H,G),_X(v,w,H,G,R);case 7:return Xl(v,w,w.pendingProps,R),w.child;case 8:return Xl(v,w,w.pendingProps.children,R),w.child;case 12:return Xl(v,w,w.pendingProps.children,R),w.child;case 10:e:{H=w.type._context,G=w.pendingProps,Ce=w.memoizedProps,ye=G.value;var Me=w.type._context;if(Sn(z2,Me._currentValue),Me._currentValue=ye,Ce!==null)if(Me=Ce.value,ye=ot(Me,ye)?0:(typeof H._calculateChangedBits=="function"?H._calculateChangedBits(Me,ye):1073741823)|0,ye===0){if(Ce.children===G.children&&!Cn.current){w=mf(v,w,R);break e}}else for(Me=w.child,Me!==null&&(Me.return=w);Me!==null;
26){var St=Me.dependencies;if(St!==null){Ce=Me.child;for(var Ct=St.firstContext;Ct!==null;){if(Ct.context===H&&(Ct.observedBits&ye)!==0){Me.tag===1&&(Ct=Zh(R,null),Ct.tag=2,Qh(Me,Ct)),Me.expirationTime<R&&(Me.expirationTime=R),Ct=Me.alternate,Ct!==null&&Ct.expirationTime<R&&(Ct.expirationTime=R),JY(Me.return,R),St.expirationTime<R&&(St.expirationTime=R);break}Ct=Ct.next}}else Ce=Me.tag===10&&Me.type===w.type?null:Me.child;if(Ce!==null)Ce.return=Me;else for(Ce=Me;Ce!==null;){if(Ce===w){Ce=null;break}if(Me=Ce.sibling,Me!==null){Me.return=Ce.return,Ce=Me;break}Ce=Ce.return}Me=Ce}Xl(v,w,G.children,R),w=w.child}return w;case 9:return G=w.type,ye=w.pendingProps,H=ye.children,O0(w,R),G=Sc(G,ye.unstable_observedBits),H=H(G),w.effectTag|=1,Xl(v,w,H,R),w.child;case 14:return G=w.type,ye=su(G,w.pendingProps),ye=su(G.type,ye),bX(v,w,G,ye,H,R);case 15:return EX(v,w,w.type,w.pendingProps,H,R);case 17:return H=w.type,G=w.pendingProps,G=w.elementType===H?G:su(H,G),v!==null&&(v.alternate=null,w.alternate=null,w.effectTag|=2),w.tag=1,ha(H)?(v=!0,ff(w)):v=!1,O0(w,R),iX(w,H,G),gk(w,H,G,R),Nk(null,w,H,!0,v,R);case 19:return AX(v,w,R)}throw Error(n(156,w.tag))};var Yk=null,Xk=null;function PNe(v){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var w=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(w.isDisabled||!w.supportsFiber)return!0;try{var R=w.inject(v);Yk=function(H){try{w.onCommitFiberRoot(R,H,void 0,(H.current.effectTag&64)===64)}catch{}},Xk=function(H){try{w.onCommitFiberUnmount(R,H)}catch{}}}catch{}return!0}function RNe(v,w,R,H){this.tag=v,this.key=R,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=w,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=H,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function rd(v,w,R,H){return new RNe(v,w,R,H)}function Zk(v){return v=v.prototype,!(!v||!v.isReactComponent)}function ONe(v){if(typeof v=="function")return Zk(v)?1:0;if(v!=null){if(v=v.$$typeof,v===tr)return 11;if(v===nr)return 14}return 2}function lv(v,w){var R=v.alternate;return R===null?(R=rd(v.tag,w,v.key,v.mode),R.elementType=v.elementType,R.type=v.type,R.stateNode=v.stateNode,R.alternate=v,v.alternate=R):(R.pendingProps=w,R.effectTag=0,R.nextEffect=null,R.firstEffect=null,R.lastEffect=null),R.childExpirationTime=v.childExpirationTime,R.expirationTime=v.expirationTime,R.child=v.child,R.memoizedProps=v.memoizedProps,R.memoizedState=v.memoizedState,R.updateQueue=v.updateQueue,w=v.dependencies,R.dependencies=w===null?null:{expirationTime:w.expirationTime,firstContext:w.firstContext,responders:w.responders},R.sibling=v.sibling,R.index=v.index,R.ref=v.ref,R}function mT(v,w,R,H,G,ye){var Ce=2;if(H=v,typeof v=="function")Zk(v)&&(Ce=1);else if(typeof v=="string")Ce=5;else e:switch(v){case sr:return np(R.children,G,ye,w);case rr:Ce=8,G|=7;break;case Kt:Ce=8,G|=1;break;case Qt:return v=rd(12,R,w,G|8),v.elementType=Qt,v.type=Qt,v.expirationTime=ye,v;case dt:return v=rd(13,R,w,G),v.type=dt,v.elementType=dt,v.expirationTime=ye,v;case bt:return v=rd(19,R,w,G),v.elementType=bt,v.expirationTime=ye,v;default:if(typeof v=="object"&&v!==null)switch(v.$$typeof){case qt:Ce=10;break e;case hr:Ce=9;break e;case tr:Ce=11;break e;case nr:Ce=14;break e;case Ee:Ce=16,H=null;break e;case Oe:Ce=22;break e}throw Error(n(130,v==null?v:typeof v,""))}return w=rd(Ce,R,w,G),w.elementType=v,w.type=H,w.expirationTime=ye,w}function np(v,w,R,H){return v=rd(7,v,H,w),v.expirationTime=R,v}function Qk(v,w,R){return v=rd(6,v,null,w),v.expirationTime=R,v}function Jk(v,w,R){return w=rd(4,v.children!==null?v.children:[],v.key,w),w.expirationTime=R,w.stateNode={containerInfo:v.containerInfo,pendingChildren:null,implementation:v.implementation},w}function INe(v,w,R){this.tag=w,this.current=null,this.containerInfo=v,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=R,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function tZ(v,w){var R=v.firstSuspendedTime;return v=v.lastSuspendedTime,R!==0&&R>=w&&v<=w}function cv(v,w){var R=v.firstSuspendedTime,H=v.lastSuspendedTime;R<w&&(v.firstSuspendedTime=w),(H>w||R===0)&&(v.lastSuspendedTime=w),w<=v.lastPingedTime&&(v.lastPingedTime=0),w<=v.lastExpiredTime&&(v.lastExpiredTime=0)}function rZ(v,w){w>v.firstPendingTime&&(v.firstPendingTime=w);var R=v.firstSuspendedTime;R!==0&&(w>=R?v.firstSuspendedTime=v.lastSuspendedTime=v.nextKnownPendingLevel=0:w>=v.lastSuspendedTime&&(v.lastSuspendedTime=w+1),w>v.nextKnownPendingLevel&&(v.nextKnownPendingLevel=w))}function eN(v,w){var R=v.lastExpiredTime;(R===0||R>w)&&(v.lastExpiredTime=w)}function vT(v,w,R,H){var G=w.current,ye=td(),Ce=eb.suspense;ye=iv(ye,G,Ce);e:if(R){R=R._reactInternalFiber;
26t:{if(Uo(R)!==R||R.tag!==1)throw Error(n(170));var Me=R;do{switch(Me.tag){case 3:Me=Me.stateNode.context;break t;case 1:if(ha(Me.type)){Me=Me.stateNode.__reactInternalMemoizedMergedChildContext;break t}}Me=Me.return}while(Me!==null);throw Error(n(171))}if(R.tag===1){var St=R.type;if(ha(St)){R=Va(R,St,Me);break e}}R=Me}else R=ba;return w.context===null?w.context=R:w.pendingContext=R,w=Zh(ye,Ce),w.payload={element:v},H=H===void 0?null:H,H!==null&&(w.callback=H),Qh(G,w),rp(G,ye),ye}function tN(v){return v=v.current,v.child?(v.child.tag===5,v.child.stateNode):null}function nZ(v,w){v=v.memoizedState,v!==null&&v.dehydrated!==null&&v.retryTime<w&&(v.retryTime=w)}function rN(v,w){nZ(v,w),(v=v.alternate)&&nZ(v,w)}function nN(v,w,R){R=R!=null&&R.hydrate===!0;var H=new INe(v,w,R),G=rd(3,null,null,w===2?7:w===1?3:0);H.current=G,G.stateNode=H,mk(G),v[yn]=H.current,R&&w!==0&&Qa(v,v.nodeType===9?v:v.ownerDocument),this._internalRoot=H}nN.prototype.render=function(v){vT(v,this._internalRoot,null,null)},nN.prototype.unmount=function(){var v=this._internalRoot,w=v.containerInfo;vT(null,v,null,function(){w[yn]=null})};function ub(v){return!(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11&&(v.nodeType!==8||v.nodeValue!==" react-mount-point-unstable "))}function kNe(v,w){if(w||(w=v?v.nodeType===9?v.documentElement:v.firstChild:null,w=!(!w||w.nodeType!==1||!w.hasAttribute("data-reactroot"))),!w)for(var R;R=v.lastChild;)v.removeChild(R);return new nN(v,0,w?{hydrate:!0}:void 0)}function gT(v,w,R,H,G){var ye=R._reactRootContainer;if(ye){var Ce=ye._internalRoot;if(typeof G=="function"){var Me=G;G=function(){var Ct=tN(Ce);Me.call(Ct)}}vT(w,Ce,v,G)}else{if(ye=R._reactRootContainer=kNe(R,H),Ce=ye._internalRoot,typeof G=="function"){var St=G;G=function(){var Ct=tN(Ce);St.call(Ct)}}GX(function(){vT(w,Ce,v,G)})}return tN(Ce)}function NNe(v,w,R){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yt,key:H==null?null:""+H,children:v,containerInfo:w,implementation:R}}Pi=function(v){if(v.tag===13){var w=B2(td(),150,100);rp(v,w),rN(v,w)}},_a=function(v){v.tag===13&&(rp(v,3),rN(v,3))},Ri=function(v){if(v.tag===13){var w=td();w=iv(w,v,null),rp(v,w),rN(v,w)}},V=function(v,w,R){switch(w){case"input":if(Xr(v,R),w=R.name,R.type==="radio"&&w!=null){for(R=v;R.parentNode;)R=R.parentNode;for(R=R.querySelectorAll("input[name="+JSON.stringify(""+w)+'][type="radio"]'),w=0;w<R.length;w++){var H=R[w];if(H!==v&&H.form===v.form){var G=cf(H);if(!G)throw Error(n(90));Fr(H),Xr(H,G)}}}break;case"textarea":wr(v,R);break;case"select":w=R.value,w!=null&&Ir(v,!!R.multiple,w,!1)}},Q=WX,ie=function(v,w,R,H,G){var ye=pn;pn|=4;try{return Yh(98,v.bind(null,w,R,H,G))}finally{pn=ye,pn===jo&&Zu()}},le=function(){(pn&(1|lu|ed))===jo&&(bNe(),M0())},fe=function(v,w){var R=pn;pn|=2;try{return v(w)}finally{pn=R,pn===jo&&Zu()}};function iZ(v,w){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ub(w))throw Error(n(200));return NNe(v,w,null,R)}var DNe={Events:[So,iu,cf,F,I,ws,function(v){ys(v,Vo)},re,ae,Rn,Ai,M0,{current:!1}]};return(function(v){var w=v.findFiberByHostInstance;return PNe(t({},v,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ke.ReactCurrentDispatcher,findHostInstanceByFiber:function(R){return R=_c(R),R===null?null:R.stateNode},findFiberByHostInstance:function(R){return w?w(R):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:vl,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),Jl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DNe,Jl.createPortal=iZ,Jl.findDOMNode=function(v){if(v==null)return null;if(v.nodeType===1)return v;var w=v._reactInternalFiber;if(w===void 0)throw typeof v.render=="function"?Error(n(188)):Error(n(268,Object.keys(v)));return v=_c(w),v=v===null?null:v.stateNode,v},Jl.flushSync=function(v,w){if((pn&(lu|ed))!==jo)throw Error(n(187));var R=pn;pn|=1;try{return Yh(99,v.bind(null,w))}finally{pn=R,Zu()}},Jl.hydrate=function(v,w,R){if(!ub(w))throw Error(n(200));return gT(null,v,w,!0,R)},Jl.render=function(v,w,R){if(!ub(w))throw Error(n(200));return gT(null,v,w,!1,R)},Jl.unmountComponentAtNode=function(v){if(!ub(v))throw Error(n(40));return v._reactRootContainer?(GX(function(){gT(null,null,v,!1,function(){v._reactRootContainer=null,v[yn]=null})}),!0):!1},Jl.unstable_batchedUpdates=WX,Jl.unstable_createPortal=function(v,w){return iZ(v,w,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Jl.unstable_renderSubtreeIntoContainer=function(v,w,R,H){if(!ub(R))throw Error(n(200));if(v==null||v._reactInternalFiber===void 0)throw Error(n(38));return gT(v,w,R,!1,H)},Jl.version="16.14.0",Jl}var SQ;function D7e(){if(SQ)return TN.exports;SQ=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),TN.exports=N7e(),TN.exports}var vo=D7e();const vy=et(vo),M7e=LNe({__proto__:null,default:vy},[vo]),L7e="modulepreload",F7e=function(e){return"/"+e},CQ={},Zt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}
26))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=o?.nonce||o?.getAttribute("nonce");i=l(r.map(c=>{if(c=F7e(c),c in CQ)return;CQ[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":L7e,d||(h.as="script"),h.crossOrigin="",h.href=c,s&&h.setAttribute("nonce",s),document.head.appendChild(h),d)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};if(typeof document<"u"&&!document.getElementById("cweb-animate-keyframes")){const e=document.createElement("style");e.id="cweb-animate-keyframes",e.textContent=["@keyframes cweb-fade-in{from{opacity:0}to{opacity:1}}","@keyframes cweb-slide-up-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}","@keyframes cweb-expand-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}","@keyframes cweb-slide-right-in{from{transform:translateX(100%)}to{transform:none}}"].join(""),document.head.appendChild(e)}const xQ={"transition.fadeIn":"cweb-fade-in","transition.slideUpIn":"cweb-slide-up-in","transition.expandIn":"cweb-expand-in"},B7e=u.forwardRef(function({animation:t="transition.fadeIn",runOnMount:r=!0,duration:n=300,delay:i=50,easing:a=[.4,0,.2,1],children:o},s){if(!u.isValidElement(o))return o??null;if(!r)return o;let l;if(typeof t=="string")l=xQ[t]||xQ["transition.fadeIn"];else if(typeof t=="object"&&t.translateX)l="cweb-slide-right-in";else return o;const c=Array.isArray(a)?`cubic-bezier(${a.join(",")})`:"ease";return u.cloneElement(o,{ref:s,style:{...o.props.style||{},animation:`${l} ${n}ms ${c} ${i}ms both`}})}),rer=u.memo(B7e);var cz=function(e,t){return cz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},cz(e,t)};function Hq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");cz(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Rt=function(){return Rt=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Rt.apply(this,arguments)};function pc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function ner(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function Ka(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function cl(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var gf=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},Uq={measureLayout:gf(["layout","layoutId","drag","_layoutResetTransform"]),animation:gf(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:gf(["exit"]),drag:gf(["drag","dragControls"]),focus:gf(["whileFocus"]),hover:gf(["whileHover","onHoverStart","onHoverEnd"]),tap:gf(["whileTap","onTap","onTapStart","onTapCancel"]),pan:gf(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:gf(["layout","layoutId"])};function z7e(e){for(var t in e){var r=e[t];r!==null&&(Uq[t].Component=r)}}var WS=function(){},mye=x.createContext({strict:!1}),vye=Object.keys(Uq),H7e=vye.length;function U7e(e,t,r){var n=[];if(x.useContext(mye),!t)return null;for(var i=0;i<H7e;i++){var a=vye[i],o=Uq[a],s=o.isEnabled,l=o.Component;s(e)&&l&&n.push(x.createElement(l,Rt({key:a},e,{visualElement:t})))}return n}var _3=x.createContext({transformPagePoint:function(e){return e},isStatic:!1}),b3=x.createContext({});function V7e(){return x.useContext(b3).visualElement}var bx=x.createContext(null);function GS(e){var t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}function gye(){var e=x.useContext(bx);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=W7e();x.useEffect(function(){return n(i)},[]);var a=function(){return r?.(i)};return!t&&r?[!1,a]:[!0]}function q7e(e){return e===null?!0:e.isPresent}var j7e=0,$7e=function(){return j7e++},W7e=function(){return GS($7e)},G7e=x.createContext(null),Ex=typeof window<"u",TQ=Ex?x.useLayoutEffect:x.useEffect;function K7e(e){var t=e.layoutId,r=x.useContext(G7e);return r&&t!==void 0?r+"-"+t:t}function Y7e(e,t,r,n){var i=x.useContext(_3),a=x.useContext(mye),o=V7e(),s=x.useContext(bx),l=K7e(r),c=x.useRef(void 0);n||(n=a.renderer),!c.current&&n&&(c.current=n(e,{visualState:t,parent:o,props:Rt(Rt({},r),{layoutId:l}),presenceId:s?.id,blockInitialAnimation:s?.initial===!1}));var d=c.current;return TQ(function(){d&&(d.setProps(Rt(Rt(Rt({},i),r),{layoutId:l})),d.isPresent=q7e(s),d.isPresenceRoot=!o||o.presenceId!==s?.id,d.syncRender())}),x.useEffect(function(){var f;d&&((f=d.animationState)===null||f===void 0||f.animateChanges())}),TQ(function(){return function(){return d?.notifyUnmount()}},[]),d}function uz(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function X7e(e,t,r){return x.useCallback(function(n){var i;n&&((i=e.mount)===null||i===void 0||i.call(e,n)),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):uz(r)&&(r.current=n))},[t])}function yye(e){return Array.isArray(e)}function mu(e){return typeof e=="string"||yye(e)}function Z7e(e){var t={};return e.forEachValue(function(r,n){return t[n]=r.get()}),t}function Q7e(e){var t={};return e.forEachValue(function(r,n){return t[n]=r.getVelocity()}),t}function _ye(e,t,r,n,i){var a;return n===void 0&&(n={}),i===void 0&&(i={}),typeof t=="string"&&(t=(a=e.variants)===null||a===void 0?void 0:a[t]),typeof t=="function"?t(r??e.custom,n,i):t}function E3(e,t,r){var n=e.getProps();return _ye(n,t,r??n.custom,Z7e(e),Q7e(e))}function w3(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||mu(e.initial)||mu(e.animate)||mu(e.whileHover)||mu(e.whileDrag)||mu(e.whileTap)||mu(e.whileFocus)||mu(e.exit)}function bye(e){return!!(w3(e)||e.variants)}function J7e(e,t){if(w3(e)){var r=e.initial,n=e.animate;return{initial:r===!1||mu(r)?r:void 0,animate:mu(n)?n:void 0}}return e.inherit!==!1?t:{}}function eFe(e,t){var r=J7e(e,x.useContext(b3)),n=r.initial,i=r.animate;return x.useMemo(function(){return{initial:n,animate:i}},t?[AQ(n),AQ(i)]:[])}function AQ(e){return Array.isArray(e)?e.join(" "):e}function tFe(e){var t=e.preloadedFeatures,r=e.createVisualElement,n=e.useRender,i=e.useVisualState,a=e.Component;t&&z7e(t);function o(s,l){var c=x.useContext(_3).isStatic,d=null,f=eFe(s,c),h=i(s,c);return!c&&Ex&&(f.visualElement=Y7e(a,h,s,r),d=U7e(s,f.visualElement)),x.createElement(x.Fragment,null,x.createElement(b3.Provider,{value:f},n(a,s,X7e(h,f.visualElement,l),h,c)),d)}return x.forwardRef(o)}function rFe(e){function t(n,i){return i===void 0&&(i={}),tFe(e(n,i))}var r=new Map;return new Proxy(t,{get:function(n,i){return r.has(i)||r.set(i,t(i)),r.get(i)}})}var nFe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Vq(e){return typeof e!="string"||e.includes("-")?!1:!!(nFe.indexOf(e)>-1||/[A-Z]/.test(e))}var sS={};function iFe(e){for(var t in e)sS[t]=e[t]}var aFe=["","X","Y","Z"],oFe=["translate","scale","rotate","skew"],KS=["transformPerspective","x","y","z"];oFe.forEach(function(e){return aFe.forEach(function(t){return KS.push(e+t)})});function sFe(e,t){return KS.indexOf(e)-KS.indexOf(t)}var lFe=new Set(KS);function S3(e){return lFe.has(e)}var cFe=new Set(["originX","originY","originZ"]);function Eye(e){return cFe.has(e)}function wye(e,t){var r=t.layout,n=t.layoutId;return S3(e)||Eye(e)||(r||n!==void 0)&&(!!sS[e]||e==="opacity")}var Qp=function(e){return e!==null&&typeof e=="object"&&e.getVelocity},uFe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function dFe(e,t,r,n){var i=e.transform,a=e.transformKeys,o=t.enableHardwareAcceleration,s=o===void 0?!0:o,l=t.allowTransformNone,c=l===void 0?!0:l,d="";a.sort(sFe);for(var f=!1,h=a.length,p=0;p<h;p++){var g=a[p];d+=(uFe[g]||g)+"("+i[g]+") ",g==="z"&&(f=!0)}return!f&&s?d+="translateZ(0)":d=d.trim(),n?d=n(i,r?"":d):c&&r&&(d="none"),d}function fFe(e){var t=e.originX,r=t===void 0?"50%":t,n=e.originY,i=n===void 0?"50%":n,a=e.originZ,o=a===void 0?0:a;return r+" "+i+" "+o}function Sye(e){return e.startsWith("--")}var hFe=function(e,t){return t&&typeof e=="number"?t.transform(e):e},Cye=function(e,t){return function(r){return Math.max(Math.min(r,t),e)}},lS=function(e){return e%1?Number(e.toFixed(5)):e}
26,YS=/(-)?([\d]*\.?[\d])+/g,dz=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,pFe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function wx(e){return typeof e=="string"}var Zg={test:function(e){return typeof e=="number"},parse:parseFloat,transform:function(e){return e}},cS=Rt(Rt({},Zg),{transform:Cye(0,1)}),PT=Rt(Rt({},Zg),{default:1}),Sx=function(e){return{test:function(t){return wx(t)&&t.endsWith(e)&&t.split(" ").length===1},parse:parseFloat,transform:function(t){return""+t+e}}},hp=Sx("deg"),My=Sx("%"),dn=Sx("px"),mFe=Sx("vh"),vFe=Sx("vw"),PQ=Rt(Rt({},My),{parse:function(e){return My.parse(e)/100},transform:function(e){return My.transform(e*100)}}),qq=function(e,t){return function(r){return!!(wx(r)&&pFe.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t))}},xye=function(e,t,r){return function(n){var i;if(!wx(n))return n;var a=n.match(YS),o=a[0],s=a[1],l=a[2],c=a[3];return i={},i[e]=parseFloat(o),i[t]=parseFloat(s),i[r]=parseFloat(l),i.alpha=c!==void 0?parseFloat(c):1,i}},gy={test:qq("hsl","hue"),parse:xye("hue","saturation","lightness"),transform:function(e){var t=e.hue,r=e.saturation,n=e.lightness,i=e.alpha,a=i===void 0?1:i;return"hsla("+Math.round(t)+", "+My.transform(lS(r))+", "+My.transform(lS(n))+", "+lS(cS.transform(a))+")"}},gFe=Cye(0,255),RN=Rt(Rt({},Zg),{transform:function(e){return Math.round(gFe(e))}}),yy={test:qq("rgb","red"),parse:xye("red","green","blue"),transform:function(e){var t=e.red,r=e.green,n=e.blue,i=e.alpha,a=i===void 0?1:i;return"rgba("+RN.transform(t)+", "+RN.transform(r)+", "+RN.transform(n)+", "+lS(cS.transform(a))+")"}};function yFe(e){var t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var fz={test:qq("#"),parse:yFe,transform:yy.transform},Zs={test:function(e){return yy.test(e)||fz.test(e)||gy.test(e)},parse:function(e){return yy.test(e)?yy.parse(e):gy.test(e)?gy.parse(e):fz.parse(e)},transform:function(e){return wx(e)?e:e.hasOwnProperty("red")?yy.transform(e):gy.transform(e)}},Tye="${c}",Aye="${n}";function _Fe(e){var t,r,n,i;return isNaN(e)&&wx(e)&&((r=(t=e.match(YS))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(dz))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function Pye(e){var t=[],r=0,n=e.match(dz);n&&(r=n.length,e=e.replace(dz,Tye),t.push.apply(t,n.map(Zs.parse)));var i=e.match(YS);return i&&(e=e.replace(YS,Aye),t.push.apply(t,i.map(Zg.parse))),{values:t,numColors:r,tokenised:e}}function Rye(e){return Pye(e).values}function Oye(e){var t=Pye(e),r=t.values,n=t.numColors,i=t.tokenised,a=r.length;return function(o){for(var s=i,l=0;l<a;l++)s=s.replace(l<n?Tye:Aye,l<n?Zs.transform(o[l]):lS(o[l]));return s}}var bFe=function(e){return typeof e=="number"?0:e};function EFe(e){var t=Rye(e),r=Oye(e);return r(t.map(bFe))}var ih={test:_Fe,parse:Rye,createTransformer:Oye,getAnimatableNone:EFe},wFe=new Set(["brightness","contrast","saturate","opacity"]);function SFe(e){var t=e.slice(0,-1).split("("),r=t[0],n=t[1];if(r==="drop-shadow")return e;var i=(n.match(YS)||[])[0];if(!i)return e;var a=n.replace(i,""),o=wFe.has(r)?1:0;return i!==n&&(o*=100),r+"("+o+a+")"}var CFe=/([a-z-]*)\(.*?\)/g,hz=Rt(Rt({},ih),{getAnimatableNone:function(e){var t=e.match(CFe);return t?t.map(SFe).join(" "):e}}),RQ=Rt(Rt({},Zg),{transform:Math.round}),Iye={borderWidth:dn,borderTopWidth:dn,borderRightWidth:dn,borderBottomWidth:dn,borderLeftWidth:dn,borderRadius:dn,radius:dn,borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomRightRadius:dn,borderBottomLeftRadius:dn,width:dn,maxWidth:dn,height:dn,maxHeight:dn,size:dn,top:dn,right:dn,bottom:dn,left:dn,padding:dn,paddingTop:dn,paddingRight:dn,paddingBottom:dn,paddingLeft:dn,margin:dn,marginTop:dn,marginRight:dn,marginBottom:dn,marginLeft:dn,rotate:hp,rotateX:hp,rotateY:hp,rotateZ:hp,scale:PT,scaleX:PT,scaleY:PT,scaleZ:PT,skew:hp,skewX:hp,skewY:hp,distance:dn,translateX:dn,translateY:dn,translateZ:dn,x:dn,y:dn,z:dn,perspective:dn,transformPerspective:dn,opacity:cS,originX:PQ,originY:PQ,originZ:dn,zIndex:RQ,fillOpacity:cS,strokeOpacity:cS,numOctaves:RQ};function jq(e,t,r,n,i,a,o,s){var l,c=e.style,d=e.vars,f=e.transform,h=e.transformKeys,p=e.transformOrigin;h.length=0;var g=!1,_=!1,b=!0;for(var E in t){var S=t[E];if(Sye(E)){d[E]=S;continue}
26var P=Iye[E],O=hFe(S,P);if(S3(E)){if(g=!0,f[E]=O,h.push(E),!b)continue;S!==((l=P.default)!==null&&l!==void 0?l:0)&&(b=!1)}else if(Eye(E))p[E]=O,_=!0;else if(r?.isHydrated&&n?.isHydrated&&sS[E]){var I=sS[E].process(S,n,r),N=sS[E].applyTo;if(N)for(var M=N.length,F=0;F<M;F++)c[N[F]]=I;else c[E]=I}else c[E]=O}n&&r&&o&&s?(c.transform=o(n.deltaFinal,n.treeScale,g?f:void 0),a&&(c.transform=a(f,c.transform)),c.transformOrigin=s(n)):(g&&(c.transform=dFe(e,i,b,a)),_&&(c.transformOrigin=fFe(p)))}var $q=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function kye(e,t,r){for(var n in t)!Qp(t[n])&&!wye(n,r)&&(e[n]=t[n])}function xFe(e,t,r){var n=e.transformTemplate;return x.useMemo(function(){var i=$q();jq(i,t,void 0,void 0,{enableHardwareAcceleration:!r},n);var a=i.vars,o=i.style;return Rt(Rt({},a),o)},[t])}function TFe(e,t,r){var n=e.style||{},i={};return kye(i,n,e),Object.assign(i,xFe(e,t,r)),e.transformValues&&(i=e.transformValues(i)),i}function AFe(e,t,r){var n={},i=TFe(e,t,r);return e.drag&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-"+(e.drag==="x"?"y":"x")),n.style=i,n}var PFe=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function FR(e){return PFe.has(e)}var Nye=function(e){return!FR(e)};try{var RFe=require("@emotion/is-prop-valid").default;Nye=function(e){return e.startsWith("on")?!FR(e):RFe(e)}}catch{}function OFe(e,t,r){var n={};for(var i in e)(Nye(i)||r===!0&&FR(i)||!t&&!FR(i))&&(n[i]=e[i]);return n}function OQ(e,t,r){return typeof e=="string"?e:dn.transform(t+r*e)}function IFe(e,t,r){var n=OQ(t,e.x,e.width),i=OQ(r,e.y,e.height);return n+" "+i}var ON=function(e,t){return dn.transform(e*t)},kFe={offset:"strokeDashoffset",array:"strokeDasharray"};function NFe(e,t,r,n,i,a){n===void 0&&(n=1),i===void 0&&(i=0);var o=kFe;e[o.offset]=ON(-i,t);var s=ON(r,t),l=ON(n,t);e[o.array]=s+" "+l}function Wq(e,t,r,n,i,a,o,s){var l=t.attrX,c=t.attrY,d=t.originX,f=t.originY,h=t.pathLength,p=t.pathSpacing,g=p===void 0?1:p,_=t.pathOffset,b=_===void 0?0:_,E=pc(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);jq(e,E,r,n,i,a,o,s),e.attrs=e.style,e.style={};var S=e.attrs,P=e.style,O=e.dimensions,I=e.totalPathLength;S.transform&&(O&&(P.transform=S.transform),delete S.transform),O&&(d!==void 0||f!==void 0||P.transform)&&(P.transformOrigin=IFe(O,d!==void 0?d:.5,f!==void 0?f:.5)),l!==void 0&&(S.x=l),c!==void 0&&(S.y=c),I!==void 0&&h!==void 0&&NFe(S,I,h,g,b)}var Dye=function(){return Rt(Rt({},$q()),{attrs:{}})};function DFe(e,t){var r=x.useMemo(function(){var i=Dye();return Wq(i,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Rt(Rt({},i.attrs),{style:Rt({},i.style)})},[t]);if(e.style){var n={};kye(n,e.style,e),r.style=Rt(Rt({},n),r.style)}return r}function MFe(e){e===void 0&&(e=!1);var t=function(r,n,i,a,o){var s=a.latestValues,l=Vq(r)?DFe:AFe,c=l(n,s,o),d=OFe(n,typeof r=="string",e),f=Rt(Rt(Rt({},d),c),{ref:i});return x.createElement(r,f)};return t}var LFe=/([a-z])([A-Z])/g,FFe="$1-$2",Mye=function(e){return e.replace(LFe,FFe).toLowerCase()};function Lye(e,t){var r=t.style,n=t.vars;Object.assign(e.style,r);for(var i in n)e.style.setProperty(i,n[i])}var Fye=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function Bye(e,t){Lye(e,t);for(var r in t.attrs)e.setAttribute(Fye.has(r)?r:Mye(r),t.attrs[r])}function Gq(e){var t=e.style,r={};for(var n in t)(Qp(t[n])||wye(n,e))&&(r[n]=t[n]);return r}function zye(e){var t=Gq(e);for(var r in e)if(Qp(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function Kq(e){return typeof e=="object"&&typeof e.start=="function"}var XS=function(e){return Array.isArray(e)},BFe=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},zFe=function(e){return XS(e)?e[e.length-1]||0:e};function HFe(e){var t=Qp(e)?e.get():e;return BFe(t)?t.toValue():t}function IQ(e,t,r,n){var i=e.scrapeMotionValuesFromProps,a=e.createRenderState,o=e.onMount,s={latestValues:UFe(t,r,n,i),renderState:a()};return o&&(s.mount=function(l){return o(t,l,s)}),s}var Hye=function(e){return function(t,r){var n=x.useContext(b3),i=x.useContext(bx);return r?IQ(e,t,n,i):GS(function(){return IQ(e,t,n,i)})}};function UFe(e,t,r,n){var i={},a=r?.initial===!1,o=n(e);for(var s in o)i[s]=HFe(o[s]);var l=e.initial,c=e.animate,d=w3(e),f=bye(e);t&&f&&!d&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var h=a||l===!1?c:l;if(h&&typeof h!="boolean"&&!Kq(h)){var p=Array.isArray(h)?h:[h];p.forEach(function(g){var _=_ye(e,g);if(_){var b=_.transitionEnd;_.transition;var E=pc(_,["transitionEnd","transition"]);for(var S in E)i[S]=E[S];for(var S in b)i[S]=b[S]}})}return i}var VFe={useVisualState:Hye({scrapeMotionValuesFromProps:zye,createRenderState:Dye,onMount:function(e,t,r){var n=r.render
26State,i=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}qFe(t)&&(n.totalPathLength=t.getTotalLength()),Wq(n,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Bye(t,n)}})};function qFe(e){return e.tagName==="path"}var jFe={useVisualState:Hye({scrapeMotionValuesFromProps:Gq,createRenderState:$q})};function $Fe(e,t,r,n){var i=t.forwardMotionProps,a=i===void 0?!1:i,o=Vq(e)?VFe:jFe;return Rt(Rt({},o),{preloadedFeatures:r,useRender:MFe(a),createVisualElement:n,Component:e})}var ao;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"})(ao||(ao={}));function Yq(e,t,r,n){return e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r,n)}}function pz(e,t,r,n){x.useEffect(function(){var i=e.current;if(r&&i)return Yq(i,t,r,n)},[e,t,r,n])}function WFe(e){var t=e.whileFocus,r=e.visualElement,n=function(){var a;(a=r.animationState)===null||a===void 0||a.setActive(ao.Focus,!0)},i=function(){var a;(a=r.animationState)===null||a===void 0||a.setActive(ao.Focus,!1)};pz(r,"focus",t?n:void 0),pz(r,"blur",t?i:void 0)}function Uye(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Vye(e){var t=!!e.touches;return t}function GFe(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var KFe={pageX:0,pageY:0};function YFe(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||KFe;return{x:n[t+"X"],y:n[t+"Y"]}}function XFe(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Xq(e,t){return t===void 0&&(t="page"),{point:Vye(e)?YFe(e,t):XFe(e,t)}}function ZFe(e){return Xq(e,"client")}var qye=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,Xq(n))};return t?GFe(r):r},QFe=function(){return Ex&&window.onpointerdown===null},JFe=function(){return Ex&&window.ontouchstart===null},eBe=function(){return Ex&&window.onmousedown===null},tBe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rBe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function jye(e){return QFe()?e:JFe()?rBe[e]:eBe()?tBe[e]:e}function Ly(e,t,r,n){return Yq(e,jye(t),qye(r,t==="pointerdown"),n)}function BR(e,t,r,n){return pz(e,jye(t),r&&qye(r,t==="pointerdown"),n)}function $ye(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var kQ=$ye("dragHorizontal"),NQ=$ye("dragVertical");function Wye(e){var t=!1;if(e==="y")t=NQ();else if(e==="x")t=kQ();else{var r=kQ(),n=NQ();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function Gye(){var e=Wye(!0);return e?(e(),!1):!0}function DQ(e,t,r){return function(n,i){var a;!Uye(n)||Gye()||(r?.(n,i),(a=e.animationState)===null||a===void 0||a.setActive(ao.Hover,t))}}function nBe(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,i=e.visualElement;BR(i,"pointerenter",t||n?DQ(i,!0,t):void 0),BR(i,"pointerleave",r||n?DQ(i,!1,r):void 0)}var Kye=function(e,t){return t?e===t?!0:Kye(e,t.parentElement):!1};function Zq(e){return x.useEffect(function(){return function(){return e()}},[])}var zR=function(e,t,r){return Math.min(Math.max(r,e),t)},IN=.001,iBe=.01,aBe=10,oBe=.05,sBe=1;function lBe(e){var t=e.duration,r=t===void 0?800:t,n=e.bounce,i=n===void 0?.25:n,a=e.velocity,o=a===void 0?0:a,s=e.mass,l=s===void 0?1:s,c,d,f=1-i;f=zR(oBe,sBe,f),r=zR(iBe,aBe,r/1e3),f<1?(c=function(_){var b=_*f,E=b*r,S=b-o,P=mz(_,f),O=Math.exp(-E);return IN-S/P*O},d=function(_){var b=_*f,E=b*r,S=E*o+o,P=Math.pow(f,2)*Math.pow(_,2)*r,O=Math.exp(-E),I=mz(Math.pow(_,2),f),N=-c(_)+IN>0?-1:1;return N*((S-P)*O)/I}):(c=function(_){var b=Math.exp(-_*r),E=(_-o)*r+1;return-IN+b*E},d=function(_){var b=Math.exp(-_*r),E=(o-_)*(r*r);return b*E});var h=5/r,p=uBe(c,d,h);if(r=r*1e3,isNaN(p))return{stiffness:100,damping:10,duration:r};var g=Math.pow(p,2)*l;return{stiffness:g,damping:f*2*Math.sqrt(l*g),duration:r}}var cBe=12;function uBe(e,t,r){for(var n=r,i=1;i<cBe;i++)n=n-e(n)/t(n);return n}function mz(e,t){return e*Math.sqrt(1-t*t)}var dBe=["duration","bounce"],fBe=["stiffness","damping","mass"];function MQ(e,t){return t.some(function(r){return e[r]!==void 0})}function hBe(e){var t=Rt({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!MQ(e,fBe)&&MQ(e,dBe)){var r=lBe(e);t=Rt(Rt(Rt({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Qq(e){var t=e.from,r=t===void 0?0:t,n=e.to,i=n===void 0?1:n,a=e.restSpeed,o=a===void 0?2:a,s=e.restDelta,l=pc(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:r},d=hBe(l),f=d.stiffness,h=d.damping,p=d.mass,g=d.velocity,_=d.duration,b=d.isResolvedFromDuration,E=LQ,S=LQ;function P(){var O=g?-(g/1e3):0,I=i-r,N=h/(2*Math.sqrt(f*p)),M=Math.sqrt(f/p
26)/1e3;if(s??(s=Math.abs(i-r)<=1?.01:.4),N<1){var F=mz(M,N);E=function(V){var W=Math.exp(-N*M*V);return i-W*((O+N*M*I)/F*Math.sin(F*V)+I*Math.cos(F*V))},S=function(V){var W=Math.exp(-N*M*V);return N*M*W*(Math.sin(F*V)*(O+N*M*I)/F+I*Math.cos(F*V))-W*(Math.cos(F*V)*(O+N*M*I)-F*I*Math.sin(F*V))}}else if(N===1)E=function(V){return i-Math.exp(-M*V)*(I+(O+M*I)*V)};else{var B=M*Math.sqrt(N*N-1);E=function(V){var W=Math.exp(-N*M*V),$=Math.min(B*V,300);return i-W*((O+N*M*I)*Math.sinh($)+B*I*Math.cosh($))/B}}}return P(),{next:function(O){var I=E(O);if(b)c.done=O>=_;else{var N=S(O)*1e3,M=Math.abs(N)<=o,F=Math.abs(i-I)<=s;c.done=M&&F}return c.value=c.done?i:I,c},flipTarget:function(){var O;g=-g,O=[i,r],r=O[0],i=O[1],P()}}}Qq.needsInterpolation=function(e,t){return typeof e=="string"||typeof t=="string"};var LQ=function(e){return 0},ZS=function(e,t,r){var n=t-e;return n===0?1:(r-e)/n},Il=function(e,t,r){return-r*e+r*t+e},pBe=function(e,t,r){var n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},mBe=[fz,yy,gy],FQ=function(e){return mBe.find(function(t){return t.test(e)})},Yye=function(e,t){var r=FQ(e),n=FQ(t);WS(r.transform===n.transform);var i=r.parse(e),a=n.parse(t),o=Rt({},i),s=r===gy?Il:pBe;return function(l){for(var c in o)c!=="alpha"&&(o[c]=s(i[c],a[c],l));return o.alpha=Il(i.alpha,a.alpha,l),r.transform(o)}},vz=function(e){return typeof e=="number"},vBe=function(e,t){return function(r){return t(e(r))}},Cx=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(vBe)};function Xye(e,t){return vz(e)?function(r){return Il(e,t,r)}:Zs.test(e)?Yye(e,t):Qye(e,t)}var Zye=function(e,t){var r=cl([],e),n=r.length,i=e.map(function(a,o){return Xye(a,t[o])});return function(a){for(var o=0;o<n;o++)r[o]=i[o](a);return r}},gBe=function(e,t){var r=Rt(Rt({},e),t),n={};for(var i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=Xye(e[i],t[i]));return function(a){for(var o in n)r[o]=n[o](a);return r}};function BQ(e){for(var t=ih.parse(e),r=t.length,n=0,i=0,a=0,o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?a++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:a}}var Qye=function(e,t){var r=ih.createTransformer(t),n=BQ(e),i=BQ(t);return Cx(Zye(n.parsed,i.parsed),r)},yBe=function(e,t){return function(r){return Il(e,t,r)}};function _Be(e){if(typeof e=="number")return yBe;if(typeof e=="string")return Zs.test(e)?Yye:Qye;if(Array.isArray(e))return Zye;if(typeof e=="object")return gBe}function bBe(e,t,r){for(var n=[],i=r||_Be(e[0]),a=e.length-1,o=0;o<a;o++){var s=i(e[o],e[o+1]);if(t){var l=Array.isArray(t)?t[o]:t;s=Cx(l,s)}n.push(s)}return n}function EBe(e,t){var r=e[0],n=e[1],i=t[0];return function(a){return i(ZS(r,n,a))}}function wBe(e,t){var r=e.length,n=r-1;return function(i){var a=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(a=n-1,o=!0),!o){for(var s=1;s<r&&!(e[s]>i||s===n);s++);a=s-1}var l=ZS(e[a],e[a+1],i);return t[a](l)}}function Jye(e,t,r){var n=r===void 0?{}:r,i=n.clamp,a=i===void 0?!0:i,o=n.ease,s=n.mixer,l=e.length;WS(l===t.length),WS(!o||!Array.isArray(o)||o.length===l-1),e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var c=bBe(t,o,s),d=l===2?EBe(e,c):wBe(e,c);return a?function(f){return d(zR(e[0],e[l-1],f))}:d}var C3=function(e){return function(t){return 1-e(1-t)}},Jq=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},SBe=function(e){return function(t){return Math.pow(t,e)}},e1e=function(e){return function(t){return t*t*((e+1)*t-e)}},CBe=function(e){var t=e1e(e);return function(r){return(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))}},t1e=1.525,xBe=4/11,TBe=8/11,ABe=9/10,r1e=function(e){return e}
26,ej=SBe(2),PBe=C3(ej),n1e=Jq(ej),i1e=function(e){return 1-Math.sin(Math.acos(e))},a1e=C3(i1e),RBe=Jq(a1e),tj=e1e(t1e),OBe=C3(tj),IBe=Jq(tj),kBe=CBe(t1e),NBe=4356/361,DBe=35442/1805,MBe=16061/1805,HR=function(e){if(e===1||e===0)return e;var t=e*e;return e<xBe?7.5625*t:e<TBe?9.075*t-9.9*e+3.4:e<ABe?NBe*t-DBe*e+MBe:10.8*e*e-20.52*e+10.72},LBe=C3(HR),FBe=function(e){return e<.5?.5*(1-HR(1-e*2)):.5*HR(e*2-1)+.5};function BBe(e,t){return e.map(function(){return t||n1e}).splice(0,e.length-1)}function zBe(e){var t=e.length;return e.map(function(r,n){return n!==0?n/(t-1):0})}function HBe(e,t){return e.map(function(r){return r*t})}function TP(e){var t=e.from,r=t===void 0?0:t,n=e.to,i=n===void 0?1:n,a=e.ease,o=e.offset,s=e.duration,l=s===void 0?300:s,c={done:!1,value:r},d=Array.isArray(i)?i:[r,i],f=HBe(o&&o.length===d.length?o:zBe(d),l);function h(){return Jye(f,d,{ease:Array.isArray(a)?a:BBe(d,a)})}var p=h();return{next:function(g){return c.value=p(g),c.done=g>=l,c},flipTarget:function(){d.reverse(),p=h()}}}function UBe(e){var t=e.velocity,r=t===void 0?0:t,n=e.from,i=n===void 0?0:n,a=e.power,o=a===void 0?.8:a,s=e.timeConstant,l=s===void 0?350:s,c=e.restDelta,d=c===void 0?.5:c,f=e.modifyTarget,h={done:!1,value:i},p=o*r,g=i+p,_=f===void 0?g:f(g);return _!==g&&(p=_-i),{next:function(b){var E=-p*Math.exp(-b/l);return h.done=!(E>d||E<-d),h.value=h.done?_:_+E,h},flipTarget:function(){}}}var zQ={keyframes:TP,spring:Qq,decay:UBe};function VBe(e){if(Array.isArray(e.to))return TP;if(zQ[e.type])return zQ[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?TP:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Qq:TP}var o1e=1/60*1e3,qBe=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},s1e=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(qBe())},o1e)};function jBe(e){var t=[],r=[],n=0,i=!1,a=new WeakSet,o={schedule:function(s,l,c){l===void 0&&(l=!1),c===void 0&&(c=!1);var d=c&&i,f=d?t:r;return l&&a.add(s),f.indexOf(s)===-1&&(f.push(s),d&&i&&(n=t.length)),s},cancel:function(s){var l=r.indexOf(s);l!==-1&&r.splice(l,1),a.delete(s)},process:function(s){var l;if(i=!0,l=[r,t],t=l[0],r=l[1],r.length=0,n=t.length,n)for(var c=0;c<n;c++){var d=t[c];d(s),a.has(d)&&(o.schedule(d),e())}i=!1}};return o}var $Be=40,gz=!0,QS=!1,yz=!1,Fy={delta:0,timestamp:0},xx=["read","update","preRender","render","postRender"],x3=xx.reduce(function(e,t){return e[t]=jBe(function(){return QS=!0}),e},{}),wd=xx.reduce(function(e,t){var r=x3[t];return e[t]=function(n,i,a){return i===void 0&&(i=!1),a===void 0&&(a=!1),QS||GBe(),r.schedule(n,i,a)},e},{}),uS=xx.reduce(function(e,t){return e[t]=x3[t].cancel,e},{}),_y=xx.reduce(function(e,t){return e[t]=function(){return x3[t].process(Fy)},e},{}),WBe=function(e){return x3[e].process(Fy)},l1e=function(e){QS=!1,Fy.delta=gz?o1e:Math.max(Math.min(e-Fy.timestamp,$Be),1),Fy.timestamp=e,yz=!0,xx.forEach(WBe),yz=!1,QS&&(gz=!1,s1e(l1e))},GBe=function(){QS=!0,gz=!0,yz||s1e(l1e)},UR=function(){return Fy};function c1e(e,t,r){return r===void 0&&(r=0),e-t-r}function KBe(e,t,r,n){return r===void 0&&(r=0),n===void 0&&(n=!0),n?c1e(t+-e,t,r):t-(e-t)+r}function YBe(e,t,r,n){return n?e>=t+r:e<=-r}var XBe=function(e){var t=function(r){var n=r.delta;return e(n)};return{start:function(){return wd.update(t,!0)},stop:function(){return uS.update(t)}}};function u1e(e){var t,r,n=e.from,i=e.autoplay,a=i===void 0?!0:i,o=e.driver,s=o===void 0?XBe:o,l=e.elapsed,c=l===void 0?0:l,d=e.repeat,f=d===void 0?0:d,h=e.repeatType,p=h===void 0?"loop":h,g=e.repeatDelay,_=g===void 0?0:g,b=e.onPlay,E=e.onStop,S=e.onComplete,P=e.onRepeat,O=e.onUpdate,I=pc(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),N=I.to,M,F=0,B=I.duration,V,W=!1,$=!0,X,re=VBe(I);!((r=(t=re).needsInterpolation)===null||r===void 0)&&r.call(t,n,N)&&(X=Jye([0,100],[n,N],{clamp:!1}),n=0,N=100);var ae=re(Rt(Rt({},I),{from:n,to:N}));function Q(){F++,p==="reverse"?($=F%2===0,c=KBe(c,B,_,$)):(c=c1e(c,B,_),p==="mirror"&&ae.flipTarget()),W=!1,P&&P()}function ie(){M.stop(),S&&S()}function le(de){if($||(de=-de),c+=de,!W){var ge=ae.next(Math.max(0,c));V=ge.value,X&&(V=X(V)),W=$?ge.done:c<=0}O?.(V),W&&(F===0&&(B??(B=c)),F<f?YBe(c,B,_,$)&&Q():ie())}function fe(){b?.(),M=s(le),M.start()}return a&&fe(),{stop:function(){E?.(),M.stop()}}}function d1e(e,t){return t?e*(1e3/t):0}function ZBe(e){var t=e.from,r=t===void 0?0:t,n=e.velocity,i=n===void 0?0:n,a=e.min,o=e.max,s=e.power,l=s===void 0?.8:s,c=e.timeConstant,d=c===void 0?750:c,f=e.bounceStiffness,h=f===void 0?500:f,p=e.bounceDamping,g=p===void 0?10:p,_=e.restDelta,b=_===void 0?1:_,E=e.modifyTarget,S=e.driver,P=e.onUpdate,O=e.onComplete,I;function N(Q){return a!==void 0&&Q<a||o!==void 0&&Q>o}function M(Q){return a===void 0?o:o===void 0||Math.abs(a-Q)<Math.abs(o-
26Q)?a:o}function F(Q){I?.stop(),I=u1e(Rt(Rt({},Q),{driver:S,onUpdate:function(ie){var le;P?.(ie),(le=Q.onUpdate)===null||le===void 0||le.call(Q,ie)},onComplete:O}))}function B(Q){F(Rt({type:"spring",stiffness:h,damping:g,restDelta:b},Q))}if(N(r))B({from:r,velocity:i,to:M(r)});else{var V=l*i+r;typeof E<"u"&&(V=E(V));var W=M(V),$=W===a?-1:1,X,re,ae=function(Q){X=re,re=Q,i=d1e(Q-X,UR().delta),($===1&&Q>W||$===-1&&Q<W)&&B({from:Q,to:W,velocity:i})};F({type:"decay",from:r,velocity:i,timeConstant:d,power:l,restDelta:b,modifyTarget:E,onUpdate:N(V)?ae:void 0})}return{stop:function(){return I?.stop()}}}var _z=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},HQ=function(e){return _z(e)&&e.hasOwnProperty("z")},RT=function(e,t){return Math.abs(e-t)};function f1e(e,t){if(vz(e)&&vz(t))return RT(e,t);if(_z(e)&&_z(t)){var r=RT(e.x,t.x),n=RT(e.y,t.y),i=HQ(e)&&HQ(t)?RT(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}var h1e=function(e,t){return 1-3*t+3*e},p1e=function(e,t){return 3*t-6*e},m1e=function(e){return 3*e},VR=function(e,t,r){return((h1e(t,r)*e+p1e(t,r))*e+m1e(t))*e},v1e=function(e,t,r){return 3*h1e(t,r)*e*e+2*p1e(t,r)*e+m1e(t)},QBe=1e-7,JBe=10;function eze(e,t,r,n,i){var a,o,s=0;do o=t+(r-t)/2,a=VR(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>QBe&&++s<JBe);return o}var tze=8,rze=.001;function nze(e,t,r,n){for(var i=0;i<tze;++i){var a=v1e(t,r,n);if(a===0)return t;var o=VR(t,r,n)-e;t-=o/a}return t}var AP=11,OT=1/(AP-1);function ize(e,t,r,n){if(e===t&&r===n)return r1e;for(var i=new Float32Array(AP),a=0;a<AP;++a)i[a]=VR(a*OT,e,r);function o(s){for(var l=0,c=1,d=AP-1;c!==d&&i[c]<=s;++c)l+=OT;--c;var f=(s-i[c])/(i[c+1]-i[c]),h=l+f*OT,p=v1e(h,e,r);return p>=rze?nze(s,h,e,r):p===0?h:eze(s,l,l+OT,e,r)}return function(s){return s===0||s===1?s:VR(o(s),t,n)}}function aze(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,i=e.whileTap,a=e.visualElement,o=t||r||n||i,s=x.useRef(!1),l=x.useRef(null);function c(){var g;(g=l.current)===null||g===void 0||g.call(l),l.current=null}function d(){var g;return c(),s.current=!1,(g=a.animationState)===null||g===void 0||g.setActive(ao.Tap,!1),!Gye()}function f(g,_){d()&&(Kye(a.getInstance(),g.target)?t?.(g,_):n?.(g,_))}function h(g,_){d()&&n?.(g,_)}function p(g,_){var b;c(),!s.current&&(s.current=!0,l.current=Cx(Ly(window,"pointerup",f),Ly(window,"pointercancel",h)),r?.(g,_),(b=a.animationState)===null||b===void 0||b.setActive(ao.Tap,!0))}BR(a,"pointerdown",o?p:void 0),Zq(c)}var jv=function(e){return function(t){return e(t),null}},oze={tap:jv(aze),focus:jv(WFe),hover:jv(nBe)};function g1e(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var qR=function(e){return e*1e3},sze={linear:r1e,easeIn:ej,easeInOut:n1e,easeOut:PBe,circIn:i1e,circInOut:RBe,circOut:a1e,backIn:tj,backInOut:IBe,backOut:OBe,anticipate:kBe,bounceIn:LBe,bounceInOut:FBe,bounceOut:HR},UQ=function(e){if(Array.isArray(e)){WS(e.length===4);var t=Ka(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return ize(r,n,i,a)}else if(typeof e=="string")return sze[e];return e},lze=function(e){return Array.isArray(e)&&typeof e[0]!="number"},VQ=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ih.test(t)&&!t.startsWith("url("))},uv=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},IT=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},kN=function(){return{type:"keyframes",ease:"linear",duration:.3}},cze=function(e){return{type:"keyframes",duration:.8,values:e}},qQ={x:uv,y:uv,z:uv,rotate:uv,rotateX:uv,rotateY:uv,rotateZ:uv,scaleX:IT,scaleY:IT,scale:IT,opacity:kN,backgroundColor:kN,color:kN,default:IT},uze=function(e,t){var r;return XS(t)?r=cze:r=qQ[e]||qQ.default,Rt({to:t},r(t))},dze=Rt(Rt({},Iye),{color:Zs,backgroundColor:Zs,outlineColor:Zs,fill:Zs,stroke:Zs,borderColor:Zs,borderTopColor:Zs,borderRightColor:Zs,borderBottomColor:Zs,borderLeftColor:Zs,filter:hz,WebkitFilter:hz}),rj=function(e){return dze[e]};function nj(e,t){var r,n=rj(e);
26return n!==hz&&(n=ih),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,t)}function fze(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=pc(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}function hze(e){var t=e.ease,r=e.times,n=e.yoyo,i=e.flip,a=e.loop,o=pc(e,["ease","times","yoyo","flip","loop"]),s=Rt({},o);return r&&(s.offset=r),o.duration&&(s.duration=qR(o.duration)),o.repeatDelay&&(s.repeatDelay=qR(o.repeatDelay)),t&&(s.ease=lze(t)?t.map(UQ):UQ(t)),o.type==="tween"&&(s.type="keyframes"),(n||a||i)&&(n?s.repeatType="reverse":a?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=a||n||i||o.repeat),o.type!=="spring"&&(s.type="keyframes"),s}function pze(e,t){var r,n=ij(e,t)||{};return(r=n.delay)!==null&&r!==void 0?r:0}function mze(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=cl([],Ka(e.to)),e.to[0]=e.from),e}function vze(e,t,r){var n;return Array.isArray(t.to)&&((n=e.duration)!==null&&n!==void 0||(e.duration=.8)),mze(t),fze(e)||(e=Rt(Rt({},e),uze(r,t.to))),Rt(Rt({},t),hze(e))}function gze(e,t,r,n,i){var a,o=ij(n,e),s=(a=o.from)!==null&&a!==void 0?a:t.get(),l=VQ(e,r);s==="none"&&l&&typeof r=="string"?s=nj(e,r):jQ(s)&&typeof r=="string"?s=$Q(r):!Array.isArray(r)&&jQ(r)&&typeof s=="string"&&(r=$Q(s));var c=VQ(e,s);function d(){var h={from:s,to:r,velocity:t.getVelocity(),onComplete:i,onUpdate:function(p){return t.set(p)}};return o.type==="inertia"||o.type==="decay"?ZBe(Rt(Rt({},h),o)):u1e(Rt(Rt({},vze(o,h,e)),{onUpdate:function(p){var g;h.onUpdate(p),(g=o.onUpdate)===null||g===void 0||g.call(o,p)},onComplete:function(){var p;h.onComplete(),(p=o.onComplete)===null||p===void 0||p.call(o)}}))}function f(){var h;return t.set(r),i(),(h=o?.onComplete)===null||h===void 0||h.call(o),{stop:function(){}}}return!c||!l||o.type===!1?f:d}function jQ(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function $Q(e){return typeof e=="number"?0:nj("",e)}function ij(e,t){return e[t]||e.default||e}function jR(e,t,r,n){return n===void 0&&(n={}),t.start(function(i){var a,o,s=gze(e,t,r,n,i),l=pze(n,e),c=function(){return o=s()};return l?a=setTimeout(c,qR(l)):c(),function(){clearTimeout(a),o?.stop()}})}var yze=function(e){return/^\-?\d*\.?\d+$/.test(e)};function y1e(e,t){e.indexOf(t)===-1&&e.push(t)}function _1e(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}var PP=(function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return y1e(this.subscriptions,t),function(){return _1e(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(var a=0;a<i;a++){var o=this.subscriptions[a];o&&o(t,r,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e})(),_ze=function(e){return!isNaN(parseFloat(e))},bze=(function(){function e(t){var r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new PP,this.velocityUpdateSubscribers=new PP,this.renderSubscribers=new PP,this.canTrackVelocity=!1,this.updateAndNotify=function(n,i){i===void 0&&(i=!0),r.prev=r.current,r.current=n;var a=UR(),o=a.delta,s=a.timestamp;r.lastUpdated!==s&&(r.timeDelta=o,r.lastUpdated=s,wd.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),i&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return wd.postRender(r.velocityCheck)},this.velocityCheck=function(n){var i=n.timestamp;i!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=_ze(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,r){r===void 0&&(r=!0),!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?d1e(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var r=this;return this.stop(),new Promise(function(n){r.hasAnimated=!0,r.stopAnimation=t(n)}).then(function(){return r.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e})();function $v(e){return new bze(e)}var b1e=function(e){return function(t){return t.test(e)}},Eze={test:function(e){return e==="auto"},parse:function(e){return e}},E1e=[Zg,dn,My,hp,vFe,mFe,Eze],kT=function(e){return E1e.find(b1e(e))},wze=cl(cl([],Ka(E1e)),[Zs,ih]),Sze=function(e){return wze.find(b1e(e))};function Cze(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,$v(r))}function xze(e,t){var r=E3(e,t),n=r?e.makeTargetAnimatable(r,!1):{},i=n.transitionEnd,a=i===void 0?{}:i;n.transition;var o=pc(n,["transitionEnd","transition"]);o=Rt(Rt({},o),a);for(var s in o){var l=zFe(o[s]);Cze(e,s,l)}}function Tze(e,t,r){var n,i,a,o,s=Object.keys(t).filter(function(p){return!e.hasValue(p)}),l=s.length;if(l)for(var c=0;c<l;
26c++){var d=s[c],f=t[d],h=null;Array.isArray(f)&&(h=f[0]),h===null&&(h=(i=(n=r[d])!==null&&n!==void 0?n:e.readValue(d))!==null&&i!==void 0?i:t[d]),h!=null&&(typeof h=="string"&&yze(h)?h=parseFloat(h):!Sze(h)&&ih.test(f)&&(h=nj(d,f)),e.addValue(d,$v(h)),(a=(o=r)[d])!==null&&a!==void 0||(o[d]=h),e.setBaseTarget(d,h))}}function Aze(e,t){if(t){var r=t[e]||t.default||t;return r.from}}function Pze(e,t,r){var n,i,a={};for(var o in e)a[o]=(n=Aze(o,t))!==null&&n!==void 0?n:(i=r.getValue(o))===null||i===void 0?void 0:i.get();return a}function Rze(e,t,r){r===void 0&&(r={}),e.notifyAnimationStart();var n;if(Array.isArray(t)){var i=t.map(function(o){return bz(e,o,r)});n=Promise.all(i)}else if(typeof t=="string")n=bz(e,t,r);else{var a=typeof t=="function"?E3(e,t,r.custom):t;n=w1e(e,a,r)}return n.then(function(){return e.notifyAnimationComplete(t)})}function bz(e,t,r){var n;r===void 0&&(r={});var i=E3(e,t,r.custom),a=(i||{}).transition,o=a===void 0?e.getDefaultTransition()||{}:a;r.transitionOverride&&(o=r.transitionOverride);var s=i?function(){return w1e(e,i,r)}:function(){return Promise.resolve()},l=!((n=e.variantChildren)===null||n===void 0)&&n.size?function(p){p===void 0&&(p=0);var g=o.delayChildren,_=g===void 0?0:g,b=o.staggerChildren,E=o.staggerDirection;return Oze(e,t,_+p,b,E,r)}:function(){return Promise.resolve()},c=o.when;if(c){var d=Ka(c==="beforeChildren"?[s,l]:[l,s],2),f=d[0],h=d[1];return f().then(h)}else return Promise.all([s(),l(r.delay)])}function w1e(e,t,r){var n,i=r===void 0?{}:r,a=i.delay,o=a===void 0?0:a,s=i.transitionOverride,l=i.type,c=e.makeTargetAnimatable(t),d=c.transition,f=d===void 0?e.getDefaultTransition():d,h=c.transitionEnd,p=
26pc(c,["transition","transitionEnd"]);s&&(f=s);var g=[],_=l&&((n=e.animationState)===null||n===void 0?void 0:n.getState()[l]);for(var b in p){var E=e.getValue(b),S=p[b];if(!(!E||S===void 0||_&&kze(_,b))){var P=jR(b,E,S,Rt({delay:o},f));g.push(P)}}return Promise.all(g).then(function(){h&&xze(e,h)})}function Oze(e,t,r,n,i,a){r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1);var o=[],s=(e.variantChildren.size-1)*n,l=i===1?function(c){return c===void 0&&(c=0),c*n}:function(c){return c===void 0&&(c=0),s-c*n};return Array.from(e.variantChildren).sort(Ize).forEach(function(c,d){o.push(bz(c,t,Rt(Rt({},a),{delay:r+l(d)})).then(function(){return c.notifyAnimationComplete(t)}))}),Promise.all(o)}function Ize(e,t){return e.sortNodePosition(t)}function kze(e,t){var r=e.protectedKeys,n=e.needsAnimating,i=r.hasOwnProperty(t)&&n[t]!==!0;return n[t]=!1,i}var aj=[ao.Animate,ao.Hover,ao.Tap,ao.Drag,ao.Focus,ao.Exit],Nze=cl([],Ka(aj)).reverse(),Dze=aj.length;function Mze(e){return function(t){return Promise.all(t.map(function(r){var n=r.animation,i=r.options;return Rze(e,n,i)}))}}function Lze(e){var t=Mze(e),r=Bze(),n={},i=!0,a=function(d,f){var h=E3(e,f);if(h){h.transition;var p=h.transitionEnd,g=pc(h,["transition","transitionEnd"]);d=Rt(Rt(Rt({},d),g),p)}return d};function o(d){return n[d]!==void 0}function s(d){t=d(e)}function l(d,f){for(var h,p=e.getProps(),g=e.getVariantContext(!0)||{},_=[],b=new Set,E={},S=1/0,P=function(M){var F=Nze[M],B=r[F],V=(h=p[F])!==null&&h!==void 0?h:g[F],W=mu(V),$=F===f?B.isActive:null;$===!1&&(S=M);var X=V===g[F]&&V!==p[F]&&W;if(X&&i&&e.manuallyAnimateOnMount&&(X=!1),B.protectedKeys=Rt({},E),!B.isActive&&$===null||!V&&!B.prevProp||Kq(V)||typeof V=="boolean")return"continue";var re=Fze(B.prevProp,V)||F===f&&B.isActive&&!X&&W||M>S&&W,ae=Array.isArray(V)?V:[V],Q=ae.reduce(a,{});$===!1&&(Q={});var ie=B.prevResolvedValues,le=ie===void 0?{}:ie,fe=Rt(Rt({},le),Q),de=function(Pe){re=!0,b.delete(Pe),B.needsAnimating[Pe]=!0};for(var ge in fe){var Ae=Q[ge],Fe=le[ge];E.hasOwnProperty(ge)||(Ae!==Fe?XS(Ae)&&XS(Fe)?g1e(Ae,Fe)?B.protectedKeys[ge]=!0:de(ge):Ae!==void 0?de(ge):b.add(ge):Ae!==void 0&&b.has(ge)?de(ge):B.protectedKeys[ge]=!0)}B.prevProp=V,B.prevResolvedValues=Q,B.isActive&&(E=Rt(Rt({},E),Q)),i&&e.blockInitialAnimation&&(re=!1),re&&!X&&_.push.apply(_,cl([],Ka(ae.map(function(Pe){return{animation:Pe,options:Rt({type:F},d)}}))))},O=0;O<Dze;O++)P(O);if(n=Rt({},E),b.size){var I={};b.forEach(function(M){var F=e.getBaseTarget(M);F!==void 0&&(I[M]=F)}),_.push({animation:I})}var N=!!_.length;return i&&p.initial===!1&&!e.manuallyAnimateOnMount&&(N=!1),i=!1,N?t(_):Promise.resolve()}function c(d,f,h){var p;return r[d].isActive===f?Promise.resolve():((p=e.variantChildren)===null||p===void 0||p.forEach(function(g){var _;return(_=g.animationState)===null||_===void 0?void 0:_.setActive(d,f)}),r[d].isActive=f,l(h,d))}return{isAnimated:o,animateChanges:l,setActive:c,setAnimateFunction:s,getState:function(){return r}}}function Fze(e,t){return typeof t=="string"?t!==e:yye(t)?!g1e(t,e):!1}function L0(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bze(){var e;return e={},e[ao.Animate]=L0(!0),e[ao.Hover]=L0(),e[ao.Tap]=L0(),e[ao.Drag]=L0(),e[ao.Focus]=L0(),e[ao.Exit]=L0(),e}var zze={animation:jv(function(e){var t=e.visualElement,r=e.animate;t.animationState||(t.animationState=Lze(t)),Kq(r)&&x.useEffect(function(){return r.subscribe(t)},[r])}),exit:jv(function(e){var t=e.custom,r=e.visualElement,n=Ka(gye(),2),i=n[0],a=n[1],o=x.useContext(bx);x.useEffect(function(){var s,l,c=(s=r.animationState)===null||s===void 0?void 0:s.setActive(ao.Exit,!i,{custom:(l=o?.custom)!==null&&l!==void 0?l:t});!i&&c?.then(a)},[i])})},S1e=(function(){function e(t,r,n){var i=this,a=n===void 0?{}:n,o=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var h=DN(i.lastMoveEventInfo,i.history),p=i.startEvent!==null,g=f1e(h.offset,{x:0,y:0})>=3;if(!(!p&&!g)){var _=h.point,b=UR().timestamp;i.history.push(Rt(Rt({},_),{timestamp:b}));var E=i.handlers,S=E.onStart,P=E.onMove;p||(S&&S(i.lastMoveEvent,h),i.startEvent=i.lastMoveEvent),P&&P(i.lastMoveEvent,h)}}},this.handlePointerMove=function(h,p){if(i.lastMoveEvent=h,i.lastMoveEventInfo=NN(p,i.transformPagePoint),Uye(h)&&h.buttons===0){i.handlePointerUp(h,p);return}wd.update(i.updatePoint,!0)},this.handlePointerUp=function(h,p){i.end();var g=i.handlers,_=g.onEnd,b=g.onSessionEnd,E=DN(NN(p,i.transformPagePoint),i.history);i.startEvent&&_&&_(h,E),b&&b(h,E)},!(Vye(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=o;var s=Xq(t),l=NN(s,this.transformPagePoint),c=l.point,d=UR().timestamp;this.history=[Rt(Rt({},c),{timestamp:d})];var f=r.onSessionStart;f&&f(t,DN(l,this.history)),this.removeListeners=Cx(Ly(window,"pointermove",this.handlePointerMove),Ly(window,"pointerup",this.handlePointerUp),Ly(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),uS.update(this.updatePoint)},e})();function NN(e,t){return t?{point:t(e.point)}:e}function WQ(e,t){return{x:e.x-t.x,y:e.y-t.y}}function DN(e,t){var r=e.point;return{point:r,delta:WQ(r,C1e(t)),offset:WQ(r,Hze(t)),velocity:Uze(t,.1)}}function Hze(e){return e[0]}function C1e(e){return e[e.length-1]}function Uze(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,i=C1e(e);r>=0&&(n=e[r],!(i.timestamp-n.timestamp>qR(t)));)r--;if(!n)return{x:0,y:0};var a=(i.timestamp-n.timestamp)/1e3;if(a===0)return{x:0,y:0};var o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Vze(e){return e}function x1e(e){var t=e.top,r=e.left,n=e.right,i=e.bottom;return{x:{min:r,max:n},y:{min:t,max:i}}}function qze(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}function jze(e,t){var r=e.top,n=e.left,i=e.bottom,a=e.right;t===void 0&&(t=Vze);var o=t({x:n,y:r}),s=t({x:a,y:i});return{top:o.y,left:o.x,bottom:s.y,right:s.x}}function Jp(){return{x:{min:0,max:1},y:{min:0,max:1}}}function $ze(e){return{x:Rt({},e.x),y:Rt({},e.y)}}var GQ={translate:0,scale:1,origin:0,originPoint:0};function KQ(){return{x:Rt({},GQ),y:Rt({},GQ)}}function xl(e){return[e("x"),e("y")]}function T1e(e,t,r){var n=t.min,i=t.max;return n!==void 0&&e<n?e=r?Il(n,e,r.min):Math.max(e,n):i!==void 0&&e>i&&(e=r?Il(i,e,r.max):Math.min(e,i)),e}function Wze(e,t,r,n,i){var a=e-t*r;return n?T1e(a,n,i):a}function YQ(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Gze(e,t){var r=t.top,n=t.left,i=t.bottom,a=t.right;return{x:YQ(e.x,n,a),y:YQ(e.y,r,i)}}function XQ(e,t){var r,n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=Ka([i,n],2),n=r[0],i=r[1]),{min:e.min+n,max:e.min+i}}function Kze(e,t){return{x:XQ(e.x,t.x),y:XQ(e.y,t.y)}}function Yze(e,t,r){var n=e.max-e.min,i=Il(t.min,t.max-n,r);return{min:i,max:i+n}}function Xze(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var A1e=.35;function Zze(e){return e===!1?e=0:e===!0&&(e=A1e),{x:ZQ(e,"left","right"),y:ZQ(e,"top","bottom")}}function ZQ(e,t,r){return{min:QQ(e,t),max:QQ(e,r)}}function QQ(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}function P1e(e,t){var r=e.getBoundingClientRect();return x1e(jze(r,t))}var Qze=function(e){return zR(0,1,e)};function JQ(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),f1e(e,t)<r}function JS(e){return e.max-e.min}function Jze(e,t){var r=.5,n=JS(e),i=JS(t);return i>n?r=ZS(t.min,t.max-n,e.min):n>i&&(r=ZS(e.min,e.max-i,t.min)),Qze(r)}function eJ(e,t,r,n){n===void 0&&(n=.5),e.origin=n,e.originPoint=Il(t.min,t.max,e.origin),e.scale=JS(r)/JS(t),JQ(e.scale,1,1e-4)&&(e.scale=1),e.translate=Il(r.min,r.max,e.origin)-e.originPoint,JQ(e.translate)&&(e.translate=0)}function R1e(e,t,r,n){eJ(e.x,t.x,r.x,tJ(n.originX)),eJ(e.y,t.y,r.y,tJ(n.originY))}function tJ(e){return typeof e=="number"?e:.5}function rJ(e,t,r){e.min=r.min+t.min,e.max=e.min+JS(t)}function eHe(e,t){rJ(e.target.x,e.relativeTarget.x,t.target.x),rJ(e.target.y,e.relativeTarget.y,t.target.y)}var oj=function(e,t){return e.depth-t.depth};function O1e(e){var t=e.projection.isEnabled;return t||e.shouldResetTransform()}function $R(e,t){t===void 0&&(t=[]);var r=e.parent;return r&&$R(r,t),O1e(e)&&t.push(e),t}function tHe(e){var t=[],r=function(n){O1e(n)&&t.push(n),n.children.forEac
26h(r)};return e.children.forEach(r),t.sort(oj)}function RP(e){if(!e.shouldResetTransform()){var t=e.getLayoutState();e.notifyBeforeLayoutMeasure(t.layout),t.isHydrated=!0,t.layout=e.measureViewportBox(),t.layoutCorrected=$ze(t.layout),e.notifyLayoutMeasure(t.layout,e.prevViewportBox||t.layout),wd.update(function(){return e.rebaseProjectionTarget()})}}function rHe(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}function nHe(e,t,r,n){e.min=Il(t.min,r.min,n),e.max=Il(t.max,r.max,n)}function nJ(e,t){return{min:t.min-e.min,max:t.max-e.min}}function c1(e,t){return{x:nJ(e.x,t.x),y:nJ(e.y,t.y)}}function iHe(e,t){var r=e.getLayoutId(),n=t.getLayoutId();return r!==n||n===void 0&&e!==t}function I1e(e){var t=e.getProps(),r=t.drag,n=t._dragX;return r&&!n}function iJ(e,t){e.min=t.min,e.max=t.max}function aHe(e,t){iJ(e.x,t.x),iJ(e.y,t.y)}function WR(e,t,r){var n=e-r,i=t*n;return r+i}function aJ(e,t,r,n,i){return i!==void 0&&(e=WR(e,i,n)),WR(e,r,n)+t}function Ez(e,t,r,n,i){t===void 0&&(t=0),r===void 0&&(r=1),e.min=aJ(e.min,t,r,n,i),e.max=aJ(e.max,t,r,n,i)}function oHe(e,t){var r=t.x,n=t.y;Ez(e.x,r.translate,r.scale,r.originPoint),Ez(e.y,n.translate,n.scale,n.originPoint)}function oJ(e,t,r,n){var i=Ka(n,3),a=i[0],o=i[1],s=i[2];e.min=t.min,e.max=t.max;var l=r[s]!==void 0?r[s]:.5,c=Il(t.min,t.max,l);Ez(e,r[a],r[o],c,r.scale)}var k1e=["x","scaleX","originX"],N1e=["y","scaleY","originY"];function wz(e,t,r){oJ(e.x,t.x,r,k1e),oJ(e.y,t.y,r,N1e)}function sJ(e,t,r,n,i){return e-=t,e=WR(e,1/r,n),i!==void 0&&(e=WR(e,1/i,n)),e}function sHe(e,t,r,n,i){t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5);var a=Il(e.min,e.max,n)-t;e.min=sJ(e.min,t,r,a,i),e.max=sJ(e.max,t,r,a,i)}function lJ(e,t,r){var n=Ka(r,3),i=n[0],a=n[1],o=n[2];sHe(e,t[i],t[a],t[o],t.scale)}function D1e(e,t){lJ(e.x,t,k1e),lJ(e.y,t,N1e)}function lHe(e,t,r){var n=r.length;if(n){t.x=t.y=1;for(var i,a,o=0;o<n;o++)i=r[o],a=i.getLayoutState().delta,t.x*=a.x.scale,t.y*=a.y.scale,oHe(e,a),I1e(i)&&wz(e,e,i.getLatestValues())}}function cHe(e,t){t===void 0&&(t=!0);var r=e.getProjectionParent();if(!r)return!1;var n;return t?(n=c1(r.projection.target,e.projection.target),D1e(n,r.getLatestValues())):n=c1(r.getLayoutState().layout,e.getLayoutState().layout),xl(function(i){return e.setProjectionTargetAxis(i,n[i].min,n[i].max,!0)}),!0}var dS=new Set;function cJ(e,t,r){e[r]||(e[r]=[]),e[r].push(t)}function Sz(e){return dS.add(e),function(){return dS.delete(e)}}function Cz(){if(dS.size){var e=0,t=[[]],r=[],n=function(s){return cJ(t,s,e)},i=function(s){cJ(r,s,e),e++};dS.forEach(function(s){s(n,i),e=0}),dS.clear();for(var a=r.length,o=0;o<=a;o++)t[o]&&t[o].forEach(uJ),r[o]&&r[o].forEach(uJ)}}var uJ=function(e){return e()},uHe=new WeakMap,dJ,dHe=(function(){function e(t){var r=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic=Jp(),this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=r,this.visualElement.enableLayoutProjection(),uHe.set(r,this)}return e.prototype.start=function(t,r){var n=this,i=r===void 0?{}:r,a=i.snapToCursor,o=a===void 0?!1:a,s=i.cursorProgress,l=function(p){var g;n.stopMotion();var _=ZFe(p).point;(g=n.cancelLayout)===null||g===void 0||g.call(n),n.cancelLayout=Sz(function(b,E){var S=$R(n.visualElement),P=tHe(n.visualElement),O=cl(cl([],Ka(S)),Ka(P)),I=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),E(function(){O.forEach(function(N){return N.resetTransform()})}),b(function(){RP(n.visualElement),P.forEach(RP)}),E(function(){O.forEach(function(N){return N.restoreTransform()}),o&&(I=n.snapToCursor(_))}),b(function(){var N=!!(n.getAxisMotionValue("x")&&!n.isExternalDrag());N||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var M=n.visualElement.projection;xl(function(F){if(!I){var B=M.target[F],V=B.min,W=B.max;n.cursorProgress[F]=s?s[F]:ZS(V,W,_[F])}var $=n.getAxisMotionValue(F);$&&(n.originPoint[F]=$.get())})}),E(function(){_y.update(),_y.preRender(),_y.render(),_y.postRender()}),b(function(){return n.resolveDragConstraints()})})},c=function(p,g){var _,b,E,S=n.props,P=S.drag,O=S.dragPropagation;P&&!O&&(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Wye(P),!n.openGlobalLock)||(Cz(),n.isDragging=!0,n.currentDirection=null,(b=(_=n.props).onDragStart)===null||b===void 0||b.call(_,p,g),(E=n.visualElement.animationState)===null||E===void 0||E.setActive(ao.Drag,!0))},d=function(p,g){var _,b,E,S,P=n.props,O=P.dragPropagation,I=P.dragDirectionLock;if(!(!O&&!n.openGlobalLock)){var N=g.offset;if(I&&n.currentDirection===null){n.currentDirection=fHe(N),n.currentDirection!==null&&((b=(_=n.props).onDirectionLock)===null||b===void 0||b.call(_,n.currentDirection));return}n.updateAxis("x",g.point,N),n.updateAxis("y",g.point,N),(S=(E=n.props).onDrag)===null||S===void 0||S.call(E,p,g),dJ=p}},f=function(p,g){return n.stop(p,g)},h=this.props.transformPagePoint;this.panSession=new S1e(t,{onSessionStart:l,onStart:c,onMove:d,onSessionEnd:f},{transformPagePoint:h})},e.prototype.resolveDragConstraints=function(){var t=this,r=this.props,n=r.dragConstraints,i=r.dragElastic,a=this.visualElement.getLayoutState().layoutCorrected;n?this.constraints=uz(n)?this.resolveRefConstraints(a,n):Gze(a,n):this.constraints=!1,this.elastic=Zze(i),this.constraints&&!this.hasMutatedConstraints&&xl(function(o){t.getAxisMotionValue(o)&&(t.constraints[o]=Xze(a[o],t.constraints[o]))})},e.prototype.resolveRefConstraints=function(t,r){var n=this.props,i=n.onMeasureDragConstraints,a=n.transformPagePoint,o=r.current;this.constraintsBox=P1e(o,a);var s=Kze(t,this.constraintsBox);if(i){var l=i(qze(s));this.hasMutatedConstraints=!!l,l&&(s=x1e(l))}return s},e.prototype.cancelDrag=function(){var t,r;this.visualElement.unlockProjectionTarget(),(t=this.cancelLayout)===null||t===void 0||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(ao.Drag,!1)},e.prototype.stop=function(t,r){var n,i,a;(n=this.panSession)===null||n===void 0||n.end(),this.panSession=null;var o=this.isDragging;if(this.cancelDrag(),!!o){var s=r.velocity;this.animateDragEnd(s),(a=(i=this.props).onDragEnd)===null||a===void 0||a.call(i,t,r)}},e.prototype.snapToCursor=function(t){var r=this;return xl(function(n){var i=r.props.drag;if(NT(n,i,r.currentDirection)){var a=r.getAxisMotionValue(n);if(a){var o=r.visualElement.getLayoutState().layout,s=o[n].max-o[n].min,l=o[n].min+s/2,c=t[n]-l;r.originPoint[n]=t[n],a.set(c)}else return r.cursorProgress[n]=.5,!0}}).includes(!0)},e.prototype.updateAxis=function(t,r,n){var i=this.props.drag;if(NT(t,i,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,r)},e.prototype.updateAxisMotionValue=function(t,r){var n=this.getAxisMotionValue(t);if(!(!r||!n)){var i=this.originPoint[t]+r[t],a=this.constraints?T1e(i,this.constraints[t],this.elastic[t]):i;n.set(a)}},e.prototype.updateVisualElementAxis=function(t,r){var n,i=this.visualElement.getLayoutState().layout[t],a=i.max-i.min,o=this.cursorProgress[t],s=Wze(r[t],a,o,(n=this.constraints)===null||n===void 0?void 0:n[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,s,s+a)},e.prototype.setProps=function(t){var r=t.drag,n=r===void 0?!1:r,i=t.dragDirectionLock,a=i===void 0?!1:i,o=t.dragPropagation,s=o===void 0?!1:o,l=t.dragConstraints,c=l===void 0?!1:l,d=t.dragElastic,f=d===void 0?A1e:d,h=t.dragMomentum,p=h===void 0?!0:h,g=pc(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Rt({drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:c,dragElastic:f,dragMomentum:p},g)},e.prototype.getAxisMotionValue=function(t){var r=this.props,n=r.layout,i=r.layoutId,a="_drag"+t.toUpperCase();if(this.props[a])return this.props[a];if(!n&&i===void 0)return this.visualElement.getValue(t,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var t=this.props,r=t._dragX,n=t._dragY;return r||n},e.prototype.animateDragEnd=function(t){var r=this,n=this.props,i=n.drag,a=n.dragMomentum,o=n.dragElastic,s=n.dragTransition,l=cHe(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(l&&Object.keys(c).length&&this.isLayoutDrag()){var d=this.visualElement.getProjectionParent();if(d){var f=c1(d.projection.targetFinal,c);xl(function(p){var g=f[p],_=g.min,b=g.max;c[p]={min:isNaN(_)?void 0:_,max:isNaN(b)?void 0:b}})}}var h=xl(function(p){var g;if(NT(p,i,r.currentDirection)){var _=(g=c?.[p])!==null&&g!==void 0?g:{},b=o?200:1e6,E=o?40:1e7,S=Rt(Rt({type:"inertia",velocity:a?t[p]:0,bounceStiffness:b,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10},s),_);return r.getAxisMotionValue(p)?r.startAxisValueAnimation(p,S):r.visualElement.startLayoutAnimation(p,S,l)}});return Promise.all(h).then(function(){var p,g;(g=(p=r.props).onDragTransitionEnd)===null||g===void 0||g.call(p)})},e.prototype.stopMotion=function(){var t=this;xl(function(r){var n=t.getAxisMotionValue(r);n?n.stop():t.visualElement.stopLayoutAnimation()})},e.prototype.startAxisValueAnimation=function(t,r){var n=this.getAxisMotionValue(t);if(n){var i=n.get();return n.set(i),n.set(i),jR(t,n,0,r)}},e.prototype.scalePoint=function(){var t=this,r=this.props,n=r.drag,i=r.dragConstraints;if(!(!uz(i)||!this.constraintsBox)){this.stopMotion();var a={x:0,y:0};xl(function(o){a[o]=Jze(t.visualElement.projection.target[o],t.constraintsBox[o])}
26),this.updateConstraints(function(){xl(function(o){if(NT(o,n,null)){var s=Yze(t.visualElement.projection.target[o],t.constraintsBox[o],a[o]),l=s.min,c=s.max;t.visualElement.setProjectionTargetAxis(o,l,c)}})}),setTimeout(Cz,1)}},e.prototype.updateConstraints=function(t){var r=this;this.cancelLayout=Sz(function(n,i){var a=$R(r.visualElement);i(function(){return a.forEach(function(o){return o.resetTransform()})}),n(function(){return RP(r.visualElement)}),i(function(){return a.forEach(function(o){return o.restoreTransform()})}),n(function(){r.resolveDragConstraints()}),t&&i(t)})},e.prototype.mount=function(t){var r=this,n=t.getInstance(),i=Ly(n,"pointerdown",function(l){var c=r.props,d=c.drag,f=c.dragListener,h=f===void 0?!0:f;d&&h&&r.start(l)}),a=Yq(window,"resize",function(){r.scalePoint()}),o=t.onLayoutUpdate(function(){r.isDragging&&r.resolveDragConstraints()}),s=t.prevDragCursor;return s&&this.start(dJ,{cursorProgress:s}),function(){i?.(),a?.(),o?.(),r.cancelDrag()}},e})();function NT(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function fHe(e,t){t===void 0&&(t=10);var r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}function hHe(e){var t=e.dragControls,r=e.visualElement,n=x.useContext(_3).transformPagePoint,i=GS(function(){return new dHe({visualElement:r})});i.setProps(Rt(Rt({},e),{transformPagePoint:n})),x.useEffect(function(){return t&&t.subscribe(i)},[i]),x.useEffect(function(){return i.mount(r)},[])}function pHe(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,o=t||r||n||i,s=x.useRef(null),l=x.useContext(_3).transformPagePoint,c={onSessionStart:i,onStart:r,onMove:t,onEnd:function(f,h){s.current=null,n&&n(f,h)}};x.useEffect(function(){s.current!==null&&s.current.updateHandlers(c)});function d(f){s.current=new S1e(f,c,{transformPagePoint:l})}BR(a,"pointerdown",o&&d),Zq(function(){return s.current&&s.current.end()})}var mHe={pan:jv(pHe),drag:jv(hHe)},eC;(function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"})(eC||(eC={}));var xz;(function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"})(xz||(xz={}));function Tz(e){return typeof e=="string"&&e.startsWith("var(--")}var M1e=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function vHe(e){var t=M1e.exec(e);if(!t)return[,];var r=Ka(t,3),n=r[1],i=r[2];return[n,i]}function Az(e,t,r){var n=Ka(vHe(e),2),i=n[0],a=n[1];if(i){var o=window.getComputedStyle(t).getPropertyValue(i);return o?o.trim():Tz(a)?Az(a,t):a}}function gHe(e,t,r){var n,i=pc(t,[]),a=e.getInstance();if(!(a instanceof HTMLElement))return{target:i,transitionEnd:r};r&&(r=Rt({},r)),e.forEachValue(function(c){var d=c.get();if(Tz(d)){var f=Az(d,a);f&&c.set(f)}});for(var o in i){var s=i[o];if(Tz(s)){var l=Az(s,a);l&&(i[o]=l,r&&((n=r[o])!==null&&n!==void 0||(r[o]=s)))}}return{target:i,transitionEnd:r}}function fJ(e,t){return e/(t.max-t.min)*100}function yHe(e,t,r){var n=r.target;if(typeof e=="string")if(dn.test(e))e=parseFloat(e);else return e;var i=fJ(e,n.x),a=fJ(e,n.y);return i+"% "+a+"%"}var hJ="_$css";function _He(e,t){var r=t.delta,n=t.treeScale,i=e,a=e.includes("var("),o=[];a&&(e=e.replace(M1e,function(_){return o.push(_),hJ}));var s=ih.parse(e);if(s.length>5)return i;var l=ih.createTransformer(e),c=typeof s[0]!="number"?1:0,d=r.x.scale*n.x,f=r.y.scale*n.y;s[0+c]/=d,s[1+c]/=f;var h=Il(d,f,.5);typeof s[2+c]=="number"&&(s[2+c]/=h),typeof s[3+c]=="number"&&(s[3+c]/=h);var p=l(s);if(a){var g=0;p=p.replace(hJ,function(){var _=o[g];return g++,_})}return p}var fb={process:yHe},bHe={borderRadius:Rt(Rt({},fb),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:fb,borderTopRightRadius:fb,borderBottomLeftRadius:fb,borderBottomRightRadius:fb,boxShadow:{process:_He}},pJ=1e3,EHe=(function(e){Hq(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.frameTarget=Jp(),r.currentAnimationTarget=Jp(),r.isAnimating={x:!1,y:!1},r.stopAxisAnimation={x:void 0,y:void 0},r.isAnimatingTree=!1,r.animate=function(n,i,a){a===void 0&&(a={});var o=a.originBox,s=a.targetBox,l=a.visibilityAction,c=a.shouldStackAnimate,d=a.onComplete,f=a.prevParent,h=pc(a,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),p=r.props,g=p.visualElement,_=p.layout;if(c===!1)return r.isAnimatingTree=!1,r.safeToRemove();if(!(r.isAnimatingTree&&c!==!0)){c&&(r.isAnimatingTree=!0),i=o||i,n=s||n;var b=!1,E=g.getProjectionParent();if(E){var S=E.prevViewportBox,P=E.getLayoutState().layout;f&&(s&&(P=f.getLayoutState().layout),o&&!iHe(f,E)&&f.prevViewportBox&&(S=f.prevViewportBox)),S&&xHe(f,o,s)&&(b=!0,i=c1(S,i),n=c1(P,n))}var O=SHe(i,n),I=xl(function(N){var M,F;if(_==="position"){var B=n[N].max-n[N].min;i[N].max=i[N].min+B}if(!g.projection.isTargetLocked)if(l!==void 0)g.setVisibility(l===xz.Show);else return O?r.animateAxis(N,n[N],i[N],Rt(Rt({},h),{isRelative:b})):((F=(M=r.stopAxisAnimation)[N])===null||F===void 0||F.call(M),g.setProjectionTargetAxis(N,n[N].min,n[N].max,b))});return g.syncRender(),Promise.all(I).then(function(){r.isAnimatingTree=!1,d&&d(),g.notifyLayoutAnimationComplete()})}},r}return t.prototype.componentDidMount=function(){var r=this,n=this.props.visualElement;n.animateMotionValue=jR,n.enableLayoutProjection(),this.unsubLayoutReady=n.onLayoutUpdate(this.animate),n.layoutSafeToRemove=function(){return r.s
26afeToRemove()},iFe(bHe)},t.prototype.componentWillUnmount=function(){var r=this;this.unsubLayoutReady(),xl(function(n){var i,a;return(a=(i=r.stopAxisAnimation)[n])===null||a===void 0?void 0:a.call(i)})},t.prototype.animateAxis=function(r,n,i,a){var o=this,s,l,c=a===void 0?{}:a,d=c.transition,f=c.isRelative;if(!(this.isAnimating[r]&&tC(n,this.currentAnimationTarget[r]))){(l=(s=this.stopAxisAnimation)[r])===null||l===void 0||l.call(s),this.isAnimating[r]=!0;var h=this.props.visualElement,p=this.frameTarget[r],g=h.getProjectionAnimationProgress()[r];g.clearListeners(),g.set(0),g.set(0);var _=function(){var P=g.get()/pJ;nHe(p,i,n,P),h.setProjectionTargetAxis(r,p.min,p.max,f)};_();var b=g.onChange(_);this.stopAxisAnimation[r]=function(){o.isAnimating[r]=!1,g.stop(),b()},this.currentAnimationTarget[r]=n;var E=d||h.getDefaultTransition()||CHe,S=jR(r==="x"?"layoutX":"layoutY",g,pJ,E&&ij(E,"layout")).then(this.stopAxisAnimation[r]);return S}},t.prototype.safeToRemove=function(){var r,n;(n=(r=this.props).safeToRemove)===null||n===void 0||n.call(r)},t.prototype.render=function(){return null},t})(x.Component);function wHe(e){var t=Ka(gye(),2),r=t[1];return x.createElement(EHe,Rt({},e,{safeToRemove:r}))}function SHe(e,t){return!vJ(e)&&!vJ(t)&&(!tC(e.x,t.x)||!tC(e.y,t.y))}var mJ={min:0,max:0};function vJ(e){return tC(e.x,mJ)&&tC(e.y,mJ)}function tC(e,t){return e.min===t.min&&e.max===t.max}var CHe={duration:.45,ease:[.4,0,.1,1]};function xHe(e,t,r){return e||!e&&!(t||r)}var THe={layoutReady:function(e){return e.notifyLayoutReady()}};function L1e(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=t===void 0?THe:t,n=r.layoutReady,i=r.parent;Sz(function(a,o){var s=Array.from(e).sort(oj),l=i?$R(i):[];o(function(){var c=cl(cl([],Ka(l)),Ka(s));c.forEach(function(d){return d.resetTransform()})}),a(function(){s.forEach(RP)}),o(function(){l.forEach(function(c){return c.restoreTransform()}),s.forEach(n)}),a(function(){s.forEach(function(c){c.isPresent&&(c.presence=eC.Present)})}),o(function(){_y.preRender(),_y.render()}),a(function(){wd.postRender(function(){return s.forEach(AHe)}),e.clear()})}),Cz()}}}function AHe(e){e.prevViewportBox=e.projection.target}var F1e=x.createContext(L1e()),PHe=x.createContext(L1e());function vv(e){return!!e.forceUpdate}var RHe=(function(e){Hq(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this.props,n=r.syncLayout,i=r.framerSyncLayout,a=r.visualElement;vv(n)&&n.register(a),vv(i)&&i.register(a),a.onUnmount(function(){vv(n)&&n.remove(a),vv(i)&&i.remove(a)})},t.prototype.getSnapshotBeforeUpdate=function(){var r=this.props,n=r.syncLayout,i=r.visualElement;return vv(n)?n.syncUpdate():(rHe(i),n.add(i)),null},t.prototype.componentDidUpdate=function(){var r=this.props.syncLayout;vv(r)||r.flush()},t.prototype.render=function(){return null},t})(u.Component);function OHe(e){var t=x.useContext(F1e),r=x.useContext(PHe);return u.createElement(RHe,Rt({},e,{syncLayout:t,framerSyncLayout:r}))}var IHe={measureLayout:OHe,layoutAnimation:wHe},kHe=function(){return{isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:Jp(),targetFinal:Jp()}};function B1e(){return{isHydrated:!1,layout:Jp(),layoutCorrected:Jp(),treeScale:{x:1,y:1},delta:KQ(),deltaFinal:KQ(),deltaTransform:""}}var gJ=B1e();function T3(e,t,r){var n=e.x,i=e.y,a=n.translate/t.x,o=i.translate/t.y,s="translate3d("+a+"px, "+o+"px, 0) ";if(r){var l=r.rotate,c=r.rotateX,d=r.rotateY;l&&(s+="rotate("+l+") "),c&&(s+="rotateX("+c+") "),d&&(s+="rotateY("+d+") ")}return s+="scale("+n.scale+", "+i.scale+")",!r&&s===NHe?"":s}function z1e(e){var t=e.deltaFinal;return t.x.origin*100+"% "+t.y.origin*100+"% 0"}var NHe=T3(gJ.delta,gJ.treeScale,{}),DT=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function DHe(){var e=DT.map(function(){return new PP}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){return DT.forEach(function(i){var a;(a=t[i])===null||a===void 0||a.call(t);var o="on"+i,s=n[o];s&&(t[i]=r[o](s))})}};return e.forEach(function(n,i){r["on"+DT[i]]=function(a){return n.add(a)},r["notify"+DT[i]]=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return n.notify.apply(n,cl([],Ka(a)))}}),r}function MHe(e,t,r){var n;for(var i in t){var a=t[i],o=r[i];if(Qp(a))e.addValue(i,a);else if(Qp(o))e.addValue(i,$v(a));else if(o!==a)if(e.hasValue(i)){var s=e.getValue(i);!s.hasAnimated&&s.set(a)}else e.addValue(i,$v((n=e.getStaticValue(i))!==null&&n!==void 0?n:a))}for(var i in r)t[i]===void 0&&e.removeValue(i);return t}function LHe(e,t,r,n){var i=e.delta,a=e.layout,o=e.layoutCorrected,s=e.treeScale,l=t.target;aHe(o,a),lHe(o,s,r),R1e(i,o,l,n)}var FHe=(function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){y1e(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){_1e(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(oj),this.isDirty=!1,this.children.forEac
26h(t)},e})();function BHe(e){var t=e.getProjectionParent();if(!t){e.rebaseProjectionTarget();return}var r=c1(t.getLayoutState().layout,e.getLayoutState().layout);xl(function(n){e.setProjectionTargetAxis(n,r[n].min,r[n].max,!0)})}var H1e=function(e){var t=e.treeType,r=t===void 0?"":t,n=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,o=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,c=e.resetTransform,d=e.restoreTransform,f=e.removeValueFromRenderState,h=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(g,_){var b=g.parent,E=g.props,S=g.presenceId,P=g.blockInitialAnimation,O=g.visualState;_===void 0&&(_={});var I=O.latestValues,N=O.renderState,M,F=DHe(),B=kHe(),V,W=B,$=I,X,re=B1e(),ae,Q=!1,ie=new Map,le=new Map,fe={},de,ge=Rt({},I),Ae;function Fe(){M&&(We.isProjectionReady()&&(wz(W.targetFinal,W.target,$),R1e(re.deltaFinal,re.layoutCorrected,W.targetFinal,I)),Pe(),s(M,N))}function Pe(){var ke=I;if(ae&&ae.isActive()){var Le=ae.getCrossfadeState(We);Le&&(ke=Le)}n(We,N,ke,W,re,_,E)}function ce(){F.notifyUpdate(I)}function pe(){if(We.isProjectionReady()){var ke=re.delta,Le=re.treeScale,Be=Le.x,Ze=Le.y,Et=re.deltaTransform;LHe(re,W,We.path,I),Q&&We.notifyViewportBoxUpdate(W.target,ke),Q=!1;var Yt=T3(ke,Le);(Yt!==Et||Be!==Le.x||Ze!==Le.y)&&We.scheduleRender(),re.deltaTransform=Yt}}function Ne(){We.layoutTree.forEach(HHe)}function De(ke,Le){var Be=Le.onChange(function(Et){I[ke]=Et,E.onUpdate&&wd.update(ce,!1,!0)}),Ze=Le.onRenderRequest(We.scheduleRender);le.set(ke,function(){Be(),Ze()})}var Ve=p(E);for(var Ke in Ve){var Qe=Ve[Ke];I[Ke]!==void 0&&Qp(Qe)&&Qe.set(I[Ke],!1)}var Ue=w3(E),ut=bye(E),We=Rt(Rt({treeType:r,current:null,depth:b?b.depth+1:0,parent:b,children:new Set,path:b?cl(cl([],Ka(b.path)),[b]):[],layoutTree:b?b.layoutTree:new FHe,presenceId:S,projection:B,variantChildren:ut?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!b?.isMounted(),blockInitialAnimation:P,isMounted:function(){return!!M},mount:function(ke){M=We.current=ke,We.pointTo(We),ut&&b&&!Ue&&(Ae=b?.addVariantChild(We)),b?.children.add(We)},unmount:function(){uS.update(ce),uS.render(Fe),uS.preRender(We.updateLayoutProjection),le.forEach(function(ke){return ke()}),We.stopLayoutAnimation(),We.layoutTree.remove(We),Ae?.(),b?.children.delete(We),X?.(),F.clearAllListeners()},addVariantChild:function(ke){var Le,Be=We.getClosestVariantNode();if(Be)return(Le=Be.variantChildren)===null||Le===void 0||Le.add(ke),function(){return Be.variantChildren.delete(ke)}},sortNodePosition:function(ke){return!h||r!==ke.treeType?0:h(We.getInstance(),ke.getInstance())},getClosestVariantNode:function(){return ut?We:b?.getClosestVariantNode()},scheduleUpdateLayoutProjection:b?b.scheduleUpdateLayoutProjection:function(){return wd.preRender(We.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return E.layoutId},getInstance:function(){return M},getStaticValue:function(ke){return I[ke]},setStaticValue:function(ke,Le){return I[ke]=Le},getLatestValues:function(){return I},setVisibility:function(ke){We.isVisible!==ke&&(We.isVisible=ke,We.scheduleRender())},makeTargetAnimatable:function(ke,Le){return Le===void 0&&(Le=!0),a(We,ke,E,Le)},addValue:function(ke,Le){We.hasValue(ke)&&We.removeValue(ke),ie.set(ke,Le),I[ke]=Le.get(),De(ke,Le)},removeValue:function(ke){var Le;ie.delete(ke),(Le=le.get(ke))===null||Le===void 0||Le(),le.delete(ke),delete I[ke],f(ke,N)},hasValue:function(ke){return ie.has(ke)},getValue:function(ke,Le){var Be=ie.get(ke);return Be===void 0&&Le!==void 0&&(Be=$v(Le),We.addValue(ke,Be)),Be},forEachValue:function(ke){return ie.forEach(ke)},readValue:function(ke){var Le;return(Le=I[ke])!==null&&Le!==void 0?Le:l(M,ke,_)},setBaseTarget:function(ke,Le){ge[ke]=Le},getBaseTarget:function(ke){if(i){var Le=i(E,ke);if(Le!==void 0&&!Qp(Le))return Le}return ge[ke]}},F),{build:function(){return Pe(),N},scheduleRender:function(){wd.render(Fe,!1,!0)},syncRender:Fe,setProps:function(ke){E=ke,F.updatePropListeners(ke),fe=MHe(We,p(E),fe)},getProps:function(){return E},getVariant:function(ke){var Le;return(Le=E.variants)===null||Le===void 0?void 0:Le[ke]},getDefaultTransition:function(){return E.transition},getVariantContext:function(ke){if(ke===void 0&&(ke=!1),ke)return b?.getVariantContext();if(!Ue){var Le=b?.getVariantContext()||{};return E.initial!==void 0&&(Le.initial=E.initial),Le}for(var Be={},Ze=0;Ze<UHe;Ze++){var Et=U1e[Ze],Yt=E[Et];(mu(Yt)||Yt===!1)&&(Be[Et]=Yt)}return Be},enableLayoutProjection:function(){B.isEnabled=!0,We.layoutTree.add(We)},lockProjectionTarget:function(){B.isTargetLocked=!0},unlockProjectionTarget:function(){We.stopLayoutAnimation(),B.isTargetLocked=!1},getLayoutState:function(){return re},setCrossfader:function(ke){ae=ke},isProjectionReady:function(){return B.isEnabled&&B.isHydrated&&re.isHydrated},startLayoutAnimation:function(ke,Le,Be){Be===void 0&&(Be=!1);var Ze=We.getProjectionAnimationProgress()[ke],Et=Be?B.relativeTarget[ke]:B.target[ke],Yt=Et.min,sr=Et.max,Kt=sr-Yt;return Ze.clearListeners(),Ze.set(Yt),Ze.set(Yt),Ze.onChange(function(Qt){We.setProjectionTargetAxis(ke,Qt,Qt+Kt,Be)}),We.animateMotionValue(ke,Ze,0,Le)},stopLayoutAnimation:function(){xl(function(ke){return We.getProjectionAnimationProgress()[ke].stop()})},measureViewportBox:function(ke){ke===void 0&&(ke=!0);var Le=o(M,_);return ke||D1e(Le,I),Le},getProjectionAnimationProgress:function(){return de||(de={x:$v(0),y:$v(0)}),de},setProjectionTargetAxis:function(ke,Le,Be,Ze){Ze===void 0&&(Ze=!1);var Et;Ze?(B.relativeTarget||(B.relativeTarget=Jp()),Et=B.relativeTarget[ke]):(B.relativeTarget=void 0,Et=B.target[ke]),B.isHydrated=!0,Et.min=Le,Et.max=Be,Q=!0,F.notifySetAxisTarget()},rebaseProjectionTarget:function(ke,Le){Le===void 0&&(Le=re.layout);
26var Be=We.getProjectionAnimationProgress(),Ze=Be.x,Et=Be.y,Yt=!B.relativeTarget&&!B.isTargetLocked&&!Ze.isAnimating()&&!Et.isAnimating();(ke||Yt)&&xl(function(sr){var Kt=Le[sr],Qt=Kt.min,qt=Kt.max;We.setProjectionTargetAxis(sr,Qt,qt)})},notifyLayoutReady:function(ke){BHe(We),We.notifyLayoutUpdate(re.layout,We.prevViewportBox||re.layout,ke)},resetTransform:function(){return c(We,M,E)},restoreTransform:function(){return d(M,N)},updateLayoutProjection:pe,updateTreeLayoutProjection:function(){We.layoutTree.forEach(zHe),wd.preRender(Ne,!1,!0)},getProjectionParent:function(){if(V===void 0){for(var ke=!1,Le=We.path.length-1;Le>=0;Le--){var Be=We.path[Le];if(Be.projection.isEnabled){ke=Be;break}}V=ke}return V},resolveRelativeTargetBox:function(){var ke=We.getProjectionParent();if(!(!B.relativeTarget||!ke)&&(eHe(B,ke.projection),I1e(ke))){var Le=B.target;wz(Le,Le,ke.getLatestValues())}},shouldResetTransform:function(){return!!E._layoutResetTransform},pointTo:function(ke){W=ke.projection,$=ke.getLatestValues(),X?.(),X=Cx(ke.onSetAxisTarget(We.scheduleUpdateLayoutProjection),ke.onLayoutAnimationComplete(function(){var Le;We.isPresent?We.presence=eC.Present:(Le=We.layoutSafeToRemove)===null||Le===void 0||Le.call(We)}))},isPresent:!0,presence:eC.Entering});return We}};function zHe(e){e.resolveRelativeTargetBox()}function HHe(e){e.updateLayoutProjection()}var U1e=cl(["initial"],Ka(aj)),UHe=U1e.length,VHe=new Set(["width","height","top","left","right","bottom","x","y"]),V1e=function(e){return VHe.has(e)},qHe=function(e){return Object.keys(e).some(V1e)},q1e=function(e,t){e.set(t,!1),e.set(t)},yJ=function(e){return e===Zg||e===dn},_J;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(_J||(_J={}));var bJ=function(e,t){return parseFloat(e.split(", ")[t])},EJ=function(e,t){return function(r,n){var i=n.transform;if(i==="none"||!i)return 0;var a=i.match(/^matrix3d\((.+)\)$/);if(a)return bJ(a[1],t);var o=i.match(/^matrix\((.+)\)$/);return o?bJ(o[1],e):0}},jHe=new Set(["x","y","z"]),$He=KS.filter(function(e){return!jHe.has(e)});function WHe(e){var t=[];return $He.forEach(function(r){var n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var wJ={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:EJ(4,13),y:EJ(5,14)},GHe=function(e,t,r){var n=t.measureViewportBox(),i=t.getInstance(),a=getComputedStyle(i),o=a.display,s=a.top,l=a.left,c=a.bottom,d=a.right,f=a.transform,h={top:s,left:l,bottom:c,right:d,transform:f};o==="none"&&t.setStaticValue("display",e.display||"block"),t.syncRender();var p=t.measureViewportBox();return r.forEach(function(g){var _=t.getValue(g);q1e(_,wJ[g](n,h)),e[g]=wJ[g](p,a)}),e},KHe=function(e,t,r,n){r===void 0&&(r={}),n===void 0&&(n={}),t=Rt({},t),n=Rt({},n);var i=Object.keys(t).filter(V1e),a=[],o=!1,s=[];if(i.forEach(function(c){var d=e.getValue(c);if(e.hasValue(c)){var f=r[c],h=t[c],p=kT(f),g;if(XS(h))for(var _=h.length,b=h[0]===null?1:0;b<_;b++)g?WS(kT(h[b])===g):g=kT(h[b]);else g=kT(h);if(p!==g)if(yJ(p)&&yJ(g)){var E=d.get();typeof E=="string"&&d.set(parseFloat(E)),typeof h=="string"?t[c]=parseFloat(h):Array.isArray(h)&&g===dn&&(t[c]=h.map(parseFloat))}else p?.transform&&g?.transform&&(f===0||h===0)?f===0?d.set(g.transform(f)):t[c]=p.transform(h):(o||(a=WHe(e),o=!0),s.push(c),n[c]=n[c]!==void 0?n[c]:t[c],q1e(d,h))}}),s.length){var l=GHe(t,e,s);return a.length&&a.forEach(function(c){var d=Ka(c,2),f=d[0],h=d[1];e.getValue(f).set(h)}),e.syncRender(),{target:l,transitionEnd:n}}else return{target:t,transitionEnd:n}};function YHe(e,t,r,n){return qHe(t)?KHe(e,t,r,n):{target:t,transitionEnd:n}}var XHe=function(e,t,r,n){var i=gHe(e,t,n);return t=i.target,n=i.transitionEnd,YHe(e,t,r,n)};function ZHe(e){return window.getComputedStyle(e)}var j1e={treeType:"dom",readValueFromInstance:function(e,t){if(S3(t)){var r=rj(t);return r&&r.default||0}else{var n=ZHe(e);return(Sye(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return P1e(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var i=r.transformValues;n===void 0&&(n=!0);var a=t.transition,o=t.transitionEnd,s=pc(t,["transition","transitionEnd"]),l=Pze(s,a||{},e);
26if(i&&(o&&(o=i(o)),s&&(s=i(s)),l&&(l=i(l))),n){Tze(e,s,l);var c=XHe(e,s,l,o);o=c.transitionEnd,s=c.target}return Rt({transition:a,transitionEnd:o},s)},scrapeMotionValuesFromProps:Gq,build:function(e,t,r,n,i,a,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden");var s=n.isEnabled&&i.isHydrated;jq(t,r,n,i,a,o.transformTemplate,s?T3:void 0,s?z1e:void 0)},render:Lye},QHe=H1e(j1e),JHe=H1e(Rt(Rt({},j1e),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return S3(t)?((r=rj(t))===null||r===void 0?void 0:r.default)||0:(t=Fye.has(t)?t:Mye(t),e.getAttribute(t))},scrapeMotionValuesFromProps:zye,build:function(e,t,r,n,i,a,o){var s=n.isEnabled&&i.isHydrated;Wq(t,r,n,i,a,o.transformTemplate,s?T3:void 0,s?z1e:void 0)},render:Bye})),eUe=function(e,t){return Vq(e)?JHe(t,{enableHardwareAcceleration:!1}):QHe(t,{enableHardwareAcceleration:!0})},tUe=Rt(Rt(Rt(Rt({},zze),oze),mHe),IHe),rUe=rFe(function(e,t){return $Fe(e,t,tUe,eUe)});function nUe(){var e=x.useRef(!1),t=Ka(x.useState(0),2),r=t[0],n=t[1];return Zq(function(){return e.current=!0}),x.useCallback(function(){!e.current&&n(r+1)},[r])}var SJ=0;function iUe(){var e=SJ;return SJ++,e}var MN=function(e){var t=e.children,r=e.initial,n=e.isPresent,i=e.onExitComplete,a=e.custom,o=e.presenceAffectsLayout,s=GS(aUe),l=GS(iUe),c=x.useMemo(function(){return{id:l,initial:r,isPresent:n,custom:a,onExitComplete:function(d){s.set(d,!0);var f=!0;s.forEach(function(h){h||(f=!1)}),f&&i?.()},register:function(d){return s.set(d,!1),function(){return s.delete(d)}}}},o?void 0:[n]);return x.useMemo(function(){s.forEach(function(d,f){return s.set(f,!1)})},[n]),x.useEffect(function(){!n&&!s.size&&i?.()},[n]),x.createElement(bx.Provider,{value:c},t)};function aUe(){return new Map}function cy(e){return e.key||""}function oUe(e,t){e.forEach(function(r){var n=cy(r);t.set(n,r)})}function sUe(e){var t=[];return x.Children.forEach(e,function(r){x.isValidElement(r)&&t.push(r)}),t}var lUe=function(e){var t=e.children,r=e.custom,n=e.initial,i=n===void 0?!0:n,a=e.onExitComplete,o=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=s===void 0?!0:s,c=nUe(),d=x.useContext(F1e);vv(d)&&(c=d.forceUpdate);var f=x.useRef(!0),h=sUe(t),p=x.useRef(h),g=x.useRef(new Map).current,_=x.useRef(new Set).current;if(oUe(h,g),f.current)return f.current=!1,x.createElement(x.Fragment,null,h.map(function(N){return x.createElement(MN,{key:cy(N),isPresent:!0,initial:i?void 0:!1,presenceAffectsLayout:l},N)}));for(var b=cl([],Ka(h)),E=p.current.map(cy),S=h.map(cy),P=E.length,O=0;O<P;O++){var I=E[O];S.indexOf(I)===-1?_.add(I):_.delete(I)}return o&&_.size&&(b=[]),_.forEach(function(N){if(S.indexOf(N)===-1){var M=g.get(N);if(M){var F=E.indexOf(N),B=function(){g.delete(N),_.delete(N);var V=p.current.findIndex(function(W){return W.key===N});p.current.splice(V,1),_.size||(p.current=h,c(),a&&a())};b.splice(F,0,x.createElement(MN,{key:cy(M),isPresent:!1,onExitComplete:B,custom:r,presenceAffectsLayout:l},M))}}}),b=b.map(function(N){var M=N.key;return _.has(M)?N:x.createElement(MN,{key:cy(N),isPresent:!0,presenceAffectsLayout:l},N)}),p.current=b,x.createElement(x.Fragment,null,_.size?b:b.map(function(N){return x.cloneElement(N)}))};const CJ={"transition.fadeIn":{initial:{opacity:0}
26,animate:{opacity:1}},"transition.expandIn":{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1}},"transition.slideUpIn":{initial:{opacity:0,y:20},animate:{opacity:1,y:0}}};function cUe({enter:e={},leave:t={},easing:r=[.4,0,.2,1],runOnMount:n=!0,children:i,...a}){const o=e.stagger??50,s=e.duration??200,l=e.delay??0,c=t.duration??200,d=CJ[e.animation]||CJ["transition.fadeIn"];return u.createElement("div",{...a},u.createElement(lUe,null,u.Children.map(i,(f,h)=>f?u.createElement(rUe.div,{key:f.key??h,initial:n?d.initial:!1,animate:{...d.animate,transitionEnd:{transform:"none"}},exit:{opacity:0,transition:{duration:c/1e3}},transition:{duration:s/1e3,delay:(l+o*h)/1e3,ease:r}},f):null)))}const ier=u.memo(cUe),$1e=u.createContext({}),Ye={admin:["ADMIN"],reseller:["RESELLER"],affiliatePartner:["AFFILIATE_PARTNER"],admins:["ADMIN","RESELLER"],cwManager:["CW_MANAGER","ADMIN"],clientsManager:["CW_MANAGER","RESELLER","ADMIN"],userCreator:["CW_MANAGER","RESELLER","ADMIN","SELLER"],internalUserCreator:["CW_MANAGER","ADMIN","SELLER"],owner:["OWNER"],manager:["OWNER","MANAGER"],staff:["OWNER","MANAGER","EMPLOYEE","ACCOUNTANT"],waiter:["OWNER","MANAGER","EMPLOYEE","WAITER"],companyUsers:["OWNER","MANAGER","EMPLOYEE","WAITER","ACCOUNTANT"],user:["ADMIN","RESELLER","SELLER","CW_MANAGER","OWNER","MANAGER","EMPLOYEE","WAITER","ACCOUNTANT","AFFILIATE_PARTNER"],onlyGuest:[]};var LN,xJ;function uUe(){if(xJ)return LN;xJ=1;function e(){this.__data__=[],this.size=0}return LN=e,LN}var FN,TJ;function Tx(){if(TJ)return FN;TJ=1;function e(t,r){return t===r||t!==t&&r!==r}return FN=e,FN}var BN,AJ;function A3(){if(AJ)return BN;AJ=1;var e=Tx();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return BN=t,BN}var zN,PJ;function dUe(){if(PJ)return zN;PJ=1;var e=A3(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return zN=n,zN}var HN,RJ;function fUe(){if(RJ)return HN;RJ=1;var e=A3();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return HN=t,HN}var UN,OJ;function hUe(){if(OJ)return UN;OJ=1;var e=A3();function t(r){return e(this.__data__,r)>-1}return UN=t,UN}var VN,IJ;function pUe(){if(IJ)return VN;IJ=1;var e=A3();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return VN=t,VN}var qN,kJ;function P3(){if(kJ)return qN;kJ=1;var e=uUe(),t=dUe(),r=fUe(),n=hUe(),i=pUe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,qN=a,qN}var jN,NJ;function mUe(){if(NJ)return jN;NJ=1;var e=P3();function t(){this.__data__=new e,this.size=0}return jN=t,jN}var $N,DJ;function vUe(){if(DJ)return $N;DJ=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return $N=e,$N}var WN,MJ;function gUe(){if(MJ)return WN;MJ=1;function e(t){return this.__data__.get(t)}return WN=e,WN}var GN,LJ;function yUe(){if(LJ)return GN;LJ=1;function e(t){return this.__data__.has(t)}return GN=e,GN}var KN,FJ;function W1e(){if(FJ)return KN;FJ=1;var e=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;return KN=e,KN}var YN,BJ;function Vs(){if(BJ)return YN;BJ=1;var e=W1e(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return YN=r,YN}var XN,zJ;function c_(){if(zJ)return XN;zJ=1;var e=Vs(),t=e.Symbol;return XN=t,XN}var ZN,HJ;
vendor: 10,475 bytes, line 26
26function _Ue(){if(HJ)return ZN;HJ=1;var e=c_(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=r.call(o,i),l=o[i];try{o[i]=void 0;var c=!0}catch{}var d=n.call(o);return c&&(s?o[i]=l:delete o[i]),d}return ZN=a,ZN}var QN,UJ;function bUe(){if(UJ)return QN;UJ=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return QN=r,QN}var JN,VJ;function ym(){if(VJ)return JN;VJ=1;var e=c_(),t=_Ue(),r=bUe(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?t(s):r(s)}return JN=o,JN}var eD,qJ;function qs(){if(qJ)return eD;qJ=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return eD=e,eD}var tD,jJ;function Ax(){if(jJ)return tD;jJ=1;var e=ym(),t=qs(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var l=e(s);return l==n||l==i||l==r||l==a}return tD=o,tD}var rD,$J;function EUe(){if($J)return rD;$J=1;var e=Vs(),t=e["__core-js_shared__"];return rD=t,rD}var nD,WJ;function wUe(){if(WJ)return nD;WJ=1;var e=EUe(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return nD=r,nD}var iD,GJ;function G1e(){if(GJ)return iD;GJ=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return iD=r,iD}var aD,KJ;function SUe(){if(KJ)return aD;KJ=1;var e=Ax(),t=wUe(),r=qs(),n=G1e(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!r(h)||t(h))return!1;var p=e(h)?d:a;return p.test(n(h))}return aD=f,aD}var oD,YJ;function CUe(){if(YJ)return oD;YJ=1;function e(t,r){return t?.[r]}return oD=e,oD}var sD,XJ;function Qg(){if(XJ)return sD;XJ=1;var e=SUe(),t=CUe();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return sD=r,sD}var lD,ZJ;function sj(){if(ZJ)return lD;ZJ=1;var e=Qg(),t=Vs(),r=e(t,"Map");return lD=r,lD}var cD,QJ;function R3(){if(QJ)return cD;QJ=1;var e=Qg(),t=e(Object,"create");return cD=t,cD}var uD,JJ;function xUe(){if(JJ)return uD;JJ=1;var e=R3();function t(){this.__data__=e?e(null):{},this.size=0}return uD=t,uD}var dD,eee;function TUe(){if(eee)return dD;eee=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return dD=e,dD}var fD,tee;function AUe(){if(tee)return fD;tee=1;var e=R3(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return n.call(o,a)?o[a]:void 0}return fD=i,fD}var hD,ree;function PUe(){if(ree)return hD;ree=1;var e=R3(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return hD=n,hD}var pD,nee;function RUe(){if(nee)return pD;nee=1;var e=R3(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return pD=r,pD}var mD,iee;function OUe(){if(iee)return mD;iee=1;var e=xUe(),t=TUe(),r=AUe(),n=PUe(),i=RUe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,mD=a,mD}var vD,aee;function IUe(){if(aee)return vD;aee=1;var e=OUe(),t=P3(),r=sj();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return vD=n,vD}var gD,oee;function kUe(){if(oee)return gD;oee=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return gD=e,gD}var yD,see;function O3(){if(see)return yD;see=1;var e=kUe();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return yD=t,yD}var _D,lee;function NUe(){if(lee)return _D;lee=1;var e=O3();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return _D=t,_D}var bD,cee;function DUe(){if(cee)return bD;cee=1;var e=O3();function t(r){return e(this,r).get(r)}return bD=t,bD}var ED,uee;function MUe(){if(uee)return ED;uee=1;var e=O3();function t(r){return e(this,r).has(r)}return ED=t,ED}var wD,dee;function LUe(){if(dee)return wD;dee=1;var e=O3();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return wD=t,wD}var SD,fee;function lj(){if(fee)return SD;fee=1;var e=IUe(),t=NUe(),r=DUe(),n=MUe(),i=LUe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,SD=a,SD}var CD,hee;function FUe(){if(hee)return CD;hee=1;var e=P3(),t=sj(),r=lj(),n=200;function i(a,o){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<n-1)return l.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(l)}return s.set(a,o),this.size=s.size,this}return CD=i,CD}var xD,pee;function I3(){if(pee)return xD;pee=1;var e=P3(),t=mUe(),r=vUe(),n=gUe(),i=yUe(),a=FUe();function o(s){var l=this.__data__=new e(s);this.size=l.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,xD=o,xD}var TD,mee;function k3(){if(mee)return TD;mee=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return TD=e,TD}var AD,vee;function K1e(){if(vee)return AD;vee=1;var e=Qg(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return AD=t,AD}var PD,gee;function u_(){if(gee)return PD;gee=1;var e=K1e();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return PD=t,PD}var RD,yee;function cj(){if(yee)return RD;yee=1;var e=u_(),t=Tx(),r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s){var l=a[o];(!(n.call(a,o)&&t(l,s))||s===void 0&&!(o in a))&&e(a,o,s)}return RD=i,RD}var OD,_ee;function d_(){if(_ee)return OD;_ee=1;var e=cj(),t=u_();function r(n,i,a,o){var s=!a;a||(a={});for(var l=-1,c=i.length;++l<c;){var d=i[l],f=o?o(a[d],n[d],d,a,n):void 0;f===void 0&&(f=n[d]),s?t(a,d,f):e(a,d,f)}return a}return OD=r,OD}var ID,bee;function BUe(){if(bee)return ID;bee=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return ID=e,ID}var kD,Eee;function jc(){if(Eee)return kD;Eee=1;function e(t){return t!=null&&typeof t=="object"}return kD=e,kD}var ND,wee;function zUe(){if(wee)return ND;wee=1;var e=ym(),t=jc(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return ND=n,ND}var DD,See;function Px(){if(See)return DD;See=1;var e=zUe(),t=jc(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return DD=a,DD}var MD,Cee;function co(){if(Cee)return MD;Cee=1;var e=Array.isArray;return MD=e,MD}var jw={exports:{}},LD,xee;function HUe(){if(xee)return LD;xee=1;function e(){return!1}return LD=e,LD}jw.exports;var Tee;function f_(){return Tee||(Tee=1,(function(e,t){var r=Vs(),n=HUe(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c})(jw,jw.exports)),jw.exports}var FD,Aee;function Rx(){if(Aee)return FD;Aee=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return FD=r,FD}var BD,Pee;function uj(){if(Pee)return BD;Pee=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return BD=t,BD}var zD,Ree;function UUe(){if(Ree)return zD;Ree=1;var e=ym(),t=uj(),r=jc(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",S="[object Float32Array]",P="[object Float64Array]",O="[object Int8Array]",I="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",V="[object Uint32Array]",W={};W[S]=W[P]=W[O]=W[I]=W[N]=W[M]=W[F]=W[B]=W[V]=!0,W[n]=W[i]=W[b]=W[a]=W[E]=W[o]=W[s]=W[l]=W[c]=W[d]=W[f]=W[h]=W[p]=W[g]=W[_]=!1;function $(X){return r(X)&&t(X.length)&&!!W[e(X)]}return zD=$,zD}var HD,Oee;function Jg(){if(Oee)return HD;Oee=1;function e(t){return function(r){return t(r)}}return HD=e,HD}var $w={exports:{}};$w.exports;var Iee;function dj(){return Iee||(Iee=1,(function(e,t){var r=W1e(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})($w,$w.exports)),$w.exports}var UD,kee;function Ox(){if(kee)return UD;kee=1;var e=UUe(),t=Jg(),r=dj(),n=r&&r.isTypedArray,i=n?t(n):e;return UD=i,UD}var VD,Nee;function Y1e(){if(Nee)return VD;Nee=1;var e=BUe(),t=Px(),r=co(),n=f_(),i=Rx(),a=Ox(),o=Object.prototype,s=o.hasOwnProperty;function l(c,d){var f=r(c),h=!f&&t(c),p=!f&&!h&&n(c),g=!f&&!h&&!p&&a(c),_=f||h||p||g,b=_?e(c.length,String):[],E=b.length;for(var S in c)(d||s.call(c,S))&&!(_&&(S=="length"||p&&(S=="offset"||S=="parent")||g&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||i(S,E)))&&b.push(S);return b}return VD=l,VD}var qD,Dee;function N3(){if(Dee)return qD;Dee=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return qD=t,qD}var jD,Mee;function X1e(){if(Mee)return jD;Mee=1;function e(t,r){return function(n){return t(r(n))}}return jD=e,jD}var $D,Lee;function VUe(){if(Lee)return $D;Lee=1;var e=X1e(),t=e(Object.keys,Object);return $D=t,$D}var WD,Fee;function Z1e(){if(Fee)return WD;Fee=1;var e=N3(),t=VUe(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return WD=i,WD}var GD,Bee;function _m(){if(Bee)return GD;Bee=1;var e=Ax(),t=uj();function r(n){return n!=null&&t(n.length)&&!e(n)}return GD=r,GD}var KD,zee;function h_(){if(zee)return KD;zee=1;var e=Y1e(),t=Z1e(),r=_m();function n(i){return r(i)?e(i):t(i)}return KD=n,KD}var YD,Hee;
26function qUe(){if(Hee)return YD;Hee=1;var e=d_(),t=h_();function r(n,i){return n&&e(i,t(i),n)}return YD=r,YD}var XD,Uee;function jUe(){if(Uee)return XD;Uee=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return XD=e,XD}var ZD,Vee;function $Ue(){if(Vee)return ZD;Vee=1;var e=qs(),t=N3(),r=jUe(),n=Object.prototype,i=n.hasOwnProperty;function a(o){if(!e(o))return r(o);var s=t(o),l=[];for(var c in o)c=="constructor"&&(s||!i.call(o,c))||l.push(c);return l}return ZD=a,ZD}var QD,qee;function Ix(){if(qee)return QD;qee=1;var e=Y1e(),t=$Ue(),r=_m();function n(i){return r(i)?e(i,!0):t(i)}return QD=n,QD}var JD,jee;function WUe(){if(jee)return JD;jee=1;var e=d_(),t=Ix();function r(n,i){return n&&e(i,t(i),n)}return JD=r,JD}var Ww={exports:{}};Ww.exports;var $ee;function Q1e(){return $ee||($ee=1,(function(e,t){var r=Vs(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,h=s?s(f):new c.constructor(f);return c.copy(h),h}e.exports=l})(Ww,Ww.exports)),Ww.exports}var e6,Wee;function D3(){if(Wee)return e6;Wee=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return e6=e,e6}var t6,Gee;function GUe(){if(Gee)return t6;Gee=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var s=t[n];r(s,n,t)&&(o[a++]=s)}return o}return t6=e,t6}var r6,Kee;function J1e(){if(Kee)return r6;Kee=1;function e(){return[]}return r6=e,r6}var n6,Yee;function fj(){if(Yee)return n6;Yee=1;var e=GUe(),t=J1e(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return n.call(o,s)}))}:t;return n6=a,n6}var i6,Xee;function KUe(){if(Xee)return i6;Xee=1;var e=d_(),t=fj();function r(n,i){return e(n,t(n),i)}return i6=r,i6}var a6,Zee;function hj(){if(Zee)return a6;Zee=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return a6=e,a6}var o6,Qee;function M3(){if(Qee)return o6;Qee=1;var e=X1e(),t=e(Object.getPrototypeOf,Object);return o6=t,o6}var s6,Jee;function e_e(){if(Jee)return s6;Jee=1;var e=hj(),t=M3(),r=fj(),n=J1e(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)e(s,r(o)),o=t(o);return s}:n;return s6=a,s6}var l6,ete;function YUe(){if(ete)return l6;ete=1;var e=d_(),t=e_e();function r(n,i){return e(n,t(n),i)}return l6=r,l6}var c6,tte;function t_e(){if(tte)return c6;tte=1;var e=hj(),t=co();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return c6=r,c6}var u6,rte;function r_e(){if(rte)return u6;rte=1;var e=t_e(),t=fj(),r=h_();function n(i){return e(i,r,t)}return u6=n,u6}var d6,nte;function pj(){if(nte)return d6;nte=1;var e=t_e(),t=e_e(),r=Ix();function n(i){return e(i,r,t)}return d6=n,d6}var f6,ite;function XUe(){if(ite)return f6;ite=1;var e=Qg(),t=Vs(),r=e(t,"DataView");return f6=r,f6}var h6,ate;function ZUe(){if(ate)return h6;ate=1;var e=Qg(),t=Vs(),r=e(t,"Promise");return h6=r,h6}var p6,ote;function n_e(){if(ote)return p6;ote=1;var e=Qg(),t=Vs(),r=e(t,"Set");return p6=r,p6}var m6,ste;function i_e(){if(ste)return m6;ste=1;var e=Qg(),t=Vs(),r=e(t,"WeakMap");return m6=r,m6}var v6,lte;function kx(){if(lte)return v6;lte=1;var e=XUe(),t=sj(),r=ZUe(),n=n_e(),i=i_e(),a=ym(),o=G1e(),s="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=o(e),g=o(t),_=o(r),b=o(n),E=o(i),S=a;return(e&&S(new e(new ArrayBuffer(1)))!=h||t&&S(new t)!=s||r&&S(r.resolve())!=c||n&&S(new n)!=d||i&&S(new i)!=f)&&(S=function(P){var O=a(P),I=O==l?P.constructor:void 0,N=I?o(I):"";if(N)switch(N){case p:return h;case g:return s;case _:return c;case b:return d;case E:return f}return O}),v6=S,v6}var g6,cte;function QUe(){if(cte)return g6;cte=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,a=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(a.index=n.index,a.input=n.input),a}return g6=r,g6}var y6,ute;function a_e(){if(ute)return y6;ute=1;var e=Vs(),t=e.Uint8Array;return y6=t,y6}var _6,dte;function mj(){if(dte)return _6;dte=1;var e=a_e();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return _6=t,_6}var b6,fte;
26function JUe(){if(fte)return b6;fte=1;var e=mj();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return b6=t,b6}var E6,hte;function eVe(){if(hte)return E6;hte=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return E6=t,E6}var w6,pte;function tVe(){if(pte)return w6;pte=1;var e=c_(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return w6=n,w6}var S6,mte;function o_e(){if(mte)return S6;mte=1;var e=mj();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return S6=t,S6}var C6,vte;function rVe(){if(vte)return C6;vte=1;var e=mj(),t=JUe(),r=eVe(),n=tVe(),i=o_e(),a="[object Boolean]",o="[object Date]",s="[object Map]",l="[object Number]",c="[object RegExp]",d="[object Set]",f="[object String]",h="[object Symbol]",p="[object ArrayBuffer]",g="[object DataView]",_="[object Float32Array]",b="[object Float64Array]",E="[object Int8Array]",S="[object Int16Array]",P="[object Int32Array]",O="[object Uint8Array]",I="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]";function F(B,V,W){var $=B.constructor;switch(V){case p:return e(B);case a:case o:return new $(+B);case g:return t(B,W);case _:case b:case E:case S:case P:case O:case I:case N:case M:return i(B,W);case s:return new $;case l:case f:return new $(B);case c:return r(B);case d:return new $;case h:return n(B)}}return C6=F,C6}var x6,gte;function Nx(){if(gte)return x6;gte=1;var e=qs(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var a=new n;return n.prototype=void 0,a}})();return x6=r,x6}var T6,yte;function s_e(){if(yte)return T6;yte=1;var e=Nx(),t=M3(),r=N3();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return T6=n,T6}var A6,_te;function nVe(){if(_te)return A6;_te=1;var e=kx(),t=jc(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return A6=n,A6}var P6,bte;function iVe(){if(bte)return P6;bte=1;var e=nVe(),t=Jg(),r=dj(),n=r&&r.isMap,i=n?t(n):e;return P6=i,P6}var R6,Ete;function aVe(){if(Ete)return R6;Ete=1;var e=kx(),t=jc(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return R6=n,R6}var O6,wte;function oVe(){if(wte)return O6;wte=1;var e=aVe(),t=Jg(),r=dj(),n=r&&r.isSet,i=n?t(n):e;return O6=i,O6}var I6,Ste;function l_e(){if(Ste)return I6;Ste=1;var e=I3(),t=k3(),r=cj(),n=qUe(),i=WUe(),a=Q1e(),o=D3(),s=KUe(),l=YUe(),c=r_e(),d=pj(),f=kx(),h=QUe(),p=rVe(),g=s_e(),_=co(),b=f_(),E=iVe(),S=qs(),P=oVe(),O=h_(),I=Ix(),N=1,M=2,F=4,B="[object Arguments]",V="[object Array]",W="[object Boolean]",$="[object Date]",X="[object Error]",re="[object Function]",ae="[object GeneratorFunction]",Q="[object Map]",ie="[object Number]",le="[object Object]",fe="[object RegExp]",de="[object Set]",ge="[object String]",Ae="[object Symbol]",Fe="[object WeakMap]",Pe="[object ArrayBuffer]",ce="[object DataView]",pe="[object Float32Array]",Ne="[object Float64Array]",De="[object Int8Array]",Ve="[object Int16Array]",Ke="[object Int32Array]",Qe="[object Uint8Array]",Ue="[object Uint8ClampedArray]",ut="[object Uint16Array]",We="[object Uint32Array]",ke={};ke[B]=ke[V]=ke[Pe]=ke[ce]=ke[W]=ke[$]=ke[pe]=ke[Ne]=ke[De]=ke[Ve]=ke[Ke]=ke[Q]=ke[ie]=ke[le]=ke[fe]=ke[de]=ke[ge]=ke[Ae]=ke[Qe]=ke[Ue]=ke[ut]=ke[We]=!0,ke[X]=ke[re]=ke[Fe]=!1;function Le(Be,Ze,Et,Yt,sr,Kt){var Qt,qt=Ze&N,hr=Ze&M,rr=Ze&F;if(Et&&(Qt=sr?Et(Be,Yt,sr,Kt):Et(Be)),Qt!==void 0)return Qt;if(!S(Be))return Be;var tr=_(Be);if(tr){if(Qt=h(Be),!qt)return o(Be,Qt)}else{var dt=f(Be),bt=dt==re||dt==ae;if(b(Be))return a(Be,qt);if(dt==le||dt==B||bt&&!sr){if(Qt=hr||bt?{}:g(Be),!qt)return hr?l(Be,i(Qt,Be)):s(Be,n(Qt,Be))}else{if(!ke[dt])return sr?Be:{};Qt=p(Be,dt,qt)}}Kt||(Kt=new e);var nr=Kt.get(Be);if(nr)return nr;Kt.set(Be,Qt),P(Be)?Be.forEach(function(Re){Qt.add(Le(Re,Ze,Et,Re,Be,Kt))}):E(Be)&&Be.forEach(function(Re,pt){Qt.set(pt,Le(Re,Ze,Et,pt,Be,Kt))});var Ee=rr?hr?d:c:hr?I:O,Oe=tr?void 0:Ee(Be);return t(Oe||Be,function(Re,pt){Oe&&(pt=Re,Re=Be[pt]),r(Qt,pt,Le(Re,Ze,Et,pt,Be,Kt))}),Qt}return I6=Le,I6}var k6,Cte;function sVe(){if(Cte)return k6;Cte=1;var e=l_e(),t=4;function r(n){return e(n,t)}return k6=r,k6}var lVe=sVe();const Pz=et(lVe);var N6,xte;function p_(){if(xte)return N6;xte=1;var e=ym(),t=jc(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return N6=n,N6}var D6,Tte;function vj(){if(Tte)return D6;Tte=1;
26var e=co(),t=p_(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return D6=i,D6}var M6,Ate;function cVe(){if(Ate)return M6;Ate=1;var e=lj(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],l=a.cache;if(l.has(s))return l.get(s);var c=n.apply(this,o);return a.cache=l.set(s,c)||l,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,M6=r,M6}var L6,Pte;function uVe(){if(Pte)return L6;Pte=1;var e=cVe(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return L6=r,L6}var F6,Rte;function dVe(){if(Rte)return F6;Rte=1;var e=uVe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,l,c){a.push(l?c.replace(r,"$1"):s||o)}),a});return F6=n,F6}var B6,Ote;function qd(){if(Ote)return B6;Ote=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return B6=e,B6}var z6,Ite;function c_e(){if(Ite)return z6;Ite=1;var e=c_(),t=qd(),r=co(),n=p_(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return t(s,o)+"";if(n(s))return a?a.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return z6=o,z6}var H6,kte;function e0(){if(kte)return H6;kte=1;var e=c_e();function t(r){return r==null?"":e(r)}return H6=t,H6}var U6,Nte;function m_(){if(Nte)return U6;Nte=1;var e=co(),t=vj(),r=dVe(),n=e0();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return U6=i,U6}var V6,Dte;function v_(){if(Dte)return V6;Dte=1;var e=p_();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return V6=t,V6}var q6,Mte;function u_e(){if(Mte)return q6;Mte=1;var e=cj(),t=m_(),r=Rx(),n=qs(),i=v_();function a(o,s,l,c){if(!n(o))return o;s=t(s,o);for(var d=-1,f=s.length,h=f-1,p=o;p!=null&&++d<f;){var g=i(s[d]),_=l;if(g==="__proto__"||g==="constructor"||g==="prototype")return o;if(d!=h){var b=p[g];_=c?c(b,g,p):void 0,_===void 0&&(_=n(b)?b:r(s[d+1])?[]:{})}e(p,g,_),p=p[g]}return o}return q6=a,q6}var j6,Lte;function fVe(){if(Lte)return j6;Lte=1;var e=u_e();function t(r,n,i,a){return a=typeof a=="function"?a:void 0,r==null?r:e(r,n,i,a)}return j6=t,j6}var hVe=fVe();const pVe=et(hVe);function mVe(e,t,r){return pVe(Pz(e),t,r,Pz)}function g_(e,t){const[r,n]=x.useState(e),i=x.useCallback(l=>{l.persist(),n(c=>({...c,[l.target.name]:l.target.type==="checkbox"?l.target.checked:l.target.value}))},[]),a=x.useCallback(()=>{n(e)},[e]),o=x.useCallback((l,c)=>{n(d=>mVe(d,l,c))},[]),s=x.useCallback(l=>{l&&l.preventDefault()},[t]);return{form:r,handleChange:i,handleSubmit:s,resetForm:a,setForm:n,setInForm:o}}function d_e(e,t){return function(){return e.apply(t,arguments)}}const{toString:vVe}=Object.prototype,{getPrototypeOf:u1}=Object,{iterator:Dx,toStringTag:f_e}=Symbol,GR=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),rC=(e,t)=>{let r=e;const n=[];for(;r!=null&&r!==Object.prototype;){if(n.indexOf(r)!==-1)return!1;if(n.push(r),GR(r,t))return!0;r=u1(r)}return!1},gVe=(e,t)=>e!=null&&rC(e,t)?e[t]:void 0,gj=(e=>t=>{const r=vVe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),$c=e=>(e=e.toLowerCase(),t=>gj(t)===e),L3=e=>t=>typeof t===e,{isArray:ug}=Array,dg=L3("undefined");function y_(e){return e!==null&&!dg(e)&&e.constructor!==null&&!dg(e.constructor)&&Pl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h_e=$c("ArrayBuffer");function yVe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&h_e(e.buffer),t}const _Ve=L3("string"),Pl=L3("function"),p_e=L3("number"),__=e=>e!==null&&typeof e=="object",bVe=e=>e===!0||e===!1,OP=e=>{if(!__(e))return!1;const t=u1(e);return(t===null||t===Object.prototype||u1(t)===null)&&!rC(e,f_e)&&!rC(e,Dx)},EVe=e=>{if(!__(e)||y_(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wVe=$c("Date"),SVe=$c("File"),CVe=e=>!!(e&&typeof e.uri<"u"),xVe=e=>e&&typeof e.getParts<"u",TVe=$c("Blob"),AVe=$c("FileList"),PVe=$c("Set"),RVe=e=>__(e)&&Pl(e.pipe);function OVe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Fte=OVe(),Bte=typeof Fte.FormData<"u"?Fte.FormData:void 0,IVe=e=>{if(!e)return!1;if(Bte&&e instanceof Bte)return!0;const t=u1(e);if(!t||t===Object.prototype||!Pl(e.append))return!1;const r=gj(e);return r==="formdata"||r==="object"&&Pl(e.toString)&&e.toString()==="[object FormData]"},kVe=$c("URLSearchParams"),[NVe,DVe,MVe,LVe]=["ReadableStream","Request","Response","Headers"].map($c),FVe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mx(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),ug(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(y_(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(n=0;n<o;n++)s=a[n],t.call(null,e[s],s,e)}}function m_e(e,t){if(y_(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Ov=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,v_e=e=>!dg(e)&&e!==Ov;function Rz(...e){const{caseless:t,skipUndefined:r}=v_e(this)&&this||{},n={},i=(a,o)=>
vendor: 2,634 bytes, line 26
26{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=t&&typeof o=="string"&&m_e(n,o)||o,l=GR(n,s)?n[s]:void 0;OP(l)&&OP(a)?n[s]=Rz(l,a):OP(a)?n[s]=Rz({},a):ug(a)?n[s]=a.slice():(!r||!dg(a))&&(n[s]=a)};for(let a=0,o=e.length;a<o;a++){const s=e[a];if(!s||y_(s)||(Mx(s,i),typeof s!="object"||ug(s)))continue;const l=Object.getOwnPropertySymbols(s);for(let c=0;c<l.length;c++){const d=l[c];YVe.call(s,d)&&i(s[d],d)}}return n}const BVe=(e,t,r,{allOwnKeys:n}={})=>(Mx(t,(i,a)=>{r&&Pl(i)?Object.defineProperty(e,a,{__proto__:null,value:d_e(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),zVe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HVe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},UVe=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&u1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},VVe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},qVe=e=>{if(!e)return null;if(ug(e))return e;let t=e.length;if(!p_e(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},jVe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&u1(Uint8Array)),$Ve=(e,t)=>{const n=(e&&e[Dx]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},WVe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},GVe=$c("HTMLFormElement"),KVe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),{propertyIsEnumerable:YVe}=Object.prototype,XVe=$c("RegExp"),g_e=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Mx(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},ZVe=e=>{g_e(e,(t,r)=>{if(Pl(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(Pl(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},QVe=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return ug(e)?n(e):n(String(e).split(t)),r},JVe=()=>{},eqe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function tqe(e){return!!(e&&Pl(e.append)&&e[f_e]==="FormData"&&e[Dx])}const rqe=e=>{const t=new WeakSet,r=n=>
26{if(__(n)){if(t.has(n))return;if(y_(n))return n;if(!("toJSON"in n)){t.add(n);let i;if(PVe(n)){i=[];for(const a of n){const o=r(a);!dg(o)&&i.push(o)}}else i=ug(n)?[]:{},Mx(n,(a,o)=>{const s=r(a);!dg(s)&&(i[o]=s)});return t.delete(n),i}}return n};return r(e)},nqe=$c("AsyncFunction"),iqe=e=>e&&(__(e)||Pl(e))&&Pl(e.then)&&Pl(e.catch),y_e=((e,t)=>e?setImmediate:t?((r,n)=>(Ov.addEventListener("message",({source:i,data:a})=>{i===Ov&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ov.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Pl(Ov.postMessage)),aqe=typeof queueMicrotask<"u"?queueMicrotask.bind(Ov):typeof process<"u"&&process.nextTick||y_e,__e=e=>e!=null&&Pl(e[Dx]),oqe=e=>e!=null&&rC(e,Dx)&&__e(e),Xe={isArray:ug,isArrayBuffer:h_e,isBuffer:y_,isFormData:IVe,isArrayBufferView:yVe,isString:_Ve,isNumber:p_e,isBoolean:bVe,isObject:__,isPlainObject:OP,isEmptyObject:EVe,isReadableStream:NVe,isRequest:DVe,isResponse:MVe,isHeaders:LVe,isUndefined:dg,isDate:wVe,isFile:SVe,isReactNativeBlob:CVe,isReactNative:xVe,isBlob:TVe,isRegExp:XVe,isFunction:Pl,isStream:RVe,isURLSearchParams:kVe,isTypedArray:jVe,isFileList:AVe,forEach:Mx,merge:Rz,extend:BVe,trim:FVe,stripBOM:zVe,inherits:HVe,toFlatObject:UVe,kindOf:gj,kindOfTest:$c,endsWith:VVe,toArray:qVe,forEachEntry:$Ve,matchAll:WVe,isHTMLForm:GVe,hasOwnProperty:GR,hasOwnProp:GR,hasOwnInPrototypeChain:rC,getSafeProp:gVe,reduceDescriptors:g_e,freezeMethods:ZVe,toObjectSet:QVe,toCamelCase:KVe,noop:JVe,toFiniteNumber:eqe,findKey:m_e,global:Ov,isContextDefined:v_e,isSpecCompliantForm:tqe,toJSONObject:rqe,isAsyncFn:nqe,isThenable:iqe,setImmediate:y_e,asap:aqe,isIterable:__e,isSafeIterable:oqe},sqe=Xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lqe=e=>{const t={};let r,n,i;return e&&e.split(`
27`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim();const s=Xe.hasOwnProp(t,r);!r||s&&Xe.hasOwnProp(sqe,r)||(r==="set-cookie"?s?t[r].push(n):t[r]=[n]:t[r]=s?t[r]+", "+n:n)}),t};function cqe(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const uqe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),dqe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function yj(e,t){return Xe.isArray(e)?e.map(r=>yj(r,t)):cqe(String(e).replace(t,""))}const fqe=e=>yj(e,uqe),hqe=e=>yj(e,dqe);function b_e(e){const t=Object.create(null);return Xe.forEach(e.toJSON(),(r,n)=>{t[n]=hqe(r)}),t}const zte=Symbol("internals");function hb(e){return e&&String(e).trim().toLowerCase()}function IP(e){return e===!1||e==null?e:Xe.isArray(e)?e.map(IP):fqe(String(e))}function pqe(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const mqe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function $6(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function vqe(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n<t;n++){const i=e.charCodeAt(n);if(i===34||i===92&&(n+=1,n>=t))return e;r+=e[n]}return r}function gqe(e){const t=Object.create(null),r=String(e);let n=0,i=!1,a=!1;function o(s){const l=$6(r.slice(n,s)),c=l.indexOf("=");if(c<1)return;const d=$6(l.slice(0,c));if(!mqe.test(d))return;const f=d.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const h=$6(l.slice(c+1));t[f]=vqe(h)}for(let s=0;s<r.length;s++){const l=r.charCodeAt(s);i?a?a=!1:l===92?a=!0:l===34&&(i=!1):l===34?i=!0:(l===44||l===59)&&(o(s),n=s+1)}return o(r.length),t}const yqe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function W6(e,t,r,n,i){if(Xe.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!Xe.isString(t)){if(Xe.isString(n))return t.indexOf(n)!==-1;if(Xe.isRegExp(n))return n.test(t)}}function _qe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function bqe(e,t){const r=Xe.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let Fs=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,c){const d=hb(l);
vendor: 11,474 bytes, lines 27-28
27if(!d)return;const f=Xe.findKey(i,d);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=IP(s))}const o=(s,l)=>Xe.forEach(s,(c,d)=>a(c,d,l));if(Xe.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(Xe.isString(t)&&(t=t.trim())&&!yqe(t))o(lqe(t),r);else if(Xe.isObject(t)&&Xe.isSafeIterable(t)){let s=Object.create(null),l,c;for(const d of t){if(!Xe.isArray(d))throw new TypeError("Object iterator must return a key-value pair");c=d[0],Xe.hasOwnProp(s,c)?(l=s[c],s[c]=Xe.isArray(l)?[...l,d[1]]:[l,d[1]]):s[c]=d[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=hb(t),t){const n=Xe.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return pqe(i);if(Xe.isFunction(r))return r.call(this,i,n);if(Xe.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=hb(t),t){const n=Xe.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||W6(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=hb(o),o){const s=Xe.findKey(n,o);s&&(!r||W6(n,n[s],s,r))&&(delete n[s],i=!0)}}return Xe.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||W6(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return Xe.forEach(this,(i,a)=>{const o=Xe.findKey(n,a);if(o){r[o]=IP(i),delete r[a];return}const s=t?_qe(a):String(a).trim();s!==a&&delete r[a],r[s]=IP(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Xe.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&Xe.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
28`)}getSetCookie(){const t=this.get("set-cookie");return Xe.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return gqe(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[zte]=this[zte]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=hb(o);n[s]||(bqe(i,o),n[s]=!0)}return Xe.isArray(t)?t.forEach(a):a(t),this}};Fs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Xe.reduceDescriptors(Fs.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Xe.freezeMethods(Fs);const KR="[REDACTED ****]";function Eqe(e){if(Xe.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Xe.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function wqe(e,t){const r=new Set(t.map(a=>String(a).toLowerCase())),n=[],i=a=>{if(a===null||typeof a!="object"||Xe.isBuffer(a))return a;if(n.indexOf(a)!==-1)return;a instanceof Fs&&(a=a.toJSON()),n.push(a);let o;if(Xe.isArray(a))o=[],a.forEach((s,l)=>{const c=i(s);Xe.isUndefined(c)||(o[l]=c)});else{if(!Xe.isPlainObject(a)&&Eqe(a))return n.pop(),a;o=Object.create(null);for(const[s,l]of Object.entries(a)){const c=r.has(s.toLowerCase())?KR:i(l);Xe.isUndefined(c)||(o[s]=c)}}return n.pop(),o};return i(e)}function Hte(e){try{return String(e)}catch{return""}}function Sqe(e){return e.errors.map(r=>{try{return r&&r.message?Hte(r.message):Hte(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Sr=class E_e extends Error{static from(t,r,n,i,a,o){let s=t.message;!s&&Xe.isArray(t.errors)&&t.errors.length&&(s=Sqe(t));const l=new E_e(s,r||t.code,n,i,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),o&&Object.assign(l,o),l}constructor(t,r,n,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,r=t&&Xe.hasOwnProp(t,"redact")?t.redact:void 0,n=Xe.isArray(r)&&r.length>0?wqe(t,r):Xe.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Sr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Sr.ERR_BAD_OPTION="ERR_BAD_OPTION";Sr.ECONNABORTED="ECONNABORTED";Sr.ETIMEDOUT="ETIMEDOUT";Sr.ECONNREFUSED="ECONNREFUSED";Sr.ERR_NETWORK="ERR_NETWORK";Sr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Sr.ERR_DEPRECATED="ERR_DEPRECATED";Sr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Sr.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Sr.ERR_CANCELED="ERR_CANCELED";Sr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Sr.ERR_INVALID_URL="ERR_INVALID_URL";Sr.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Cqe=null,w_e=100;function Oz(e){return Xe.isPlainObject(e)||Xe.isArray(e)}function S_e(e){return Xe.endsWith(e,"[]")?e.slice(0,-2):e}function G6(e,t,r){return e?e.concat(t).map(function(i,a){return i=S_e(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function xqe(e){return Xe.isArray(e)&&!e.some(Oz)}const Tqe=Xe.toFlatObject(Xe,{},null,function(t){return/^is[A-Z]/.test(t)});function F3(e,t,r){if(!Xe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Xe.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,P){return!Xe.isUndefined(P[S])});const n=r.metaTokens,i=r.visitor||g,a=r.dots,o=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,l=r.maxDepth===void 0?w_e:r.maxDepth,c=s&&Xe.isSpecCompliantForm(t),d=[];if(!Xe.isFunction(i))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(Xe.isDate(E))return E.toISOString();if(Xe.isBoolean(E))return E.toString();if(!c&&Xe.isBlob(E))throw new Sr("Blob is not supported. Use a Buffer instead.");if(Xe.isArrayBuffer(E)||Xe.isTypedArray(E)){if(c&&typeof s=="function")return new s([E]);throw new Sr("Blob is not supported. Use a Buffer instead.",Sr.ERR_NOT_SUPPORT)}return E}function h(E){if(E>l)throw new Sr("Object is too deeply nested ("+E+" levels). Max depth: "+l,Sr.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(E,S){if(l===1/0)return JSON.stringify(E);const P=[];return JSON.stringify(E,function(I,N){if(!Xe.isObject(N))return N;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push(N),h(S+P.length-1),N})}function g(E,S,P){let O=E;if(Xe.isReactNative(t)&&Xe.isReactNativeBlob(E))return t.append(G6(P,S,a),f(E)),!1;if(E&&!P&&typeof E=="object"){if(Xe.endsWith(S,"{}"))S=n?S:S.slice(0,-2),E=p(E,1);else if(Xe.isArray(E)&&xqe(E)||(Xe.isFileList(E)||Xe.endsWith(S,"[]"))&&(O=Xe.toArray(E)))return S=S_e(S),O.forEach(function(N,M){!(Xe.isUndefined(N)||N===null)&&t.append(o===!0?G6([S],M,a):o===null?S:S+"[]",f(N))}),!1}return Oz(E)?!0:(t.append(G6(P,S,a),f(E)),!1)}const _=Object.assign(Tqe,{defaultVisitor:g,convertValue:f,isVisitable:Oz});function b(E,S,P=0){if(!Xe.isUndefined(E)){if(h(P),d.indexOf(E)!==-1)throw new Error("Circular reference detected in "+S.join("."));d.push(E),Xe.forEach(E,function(I,N){(!(Xe.isUndefined(I)||I===null)&&i.call(t,I,Xe.isString(N)?N.trim():N,S,_))===!0&&b(I,S?S.concat(N):[N],P+1)}),d.pop()}}if(!Xe.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ute(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function _j(e,t){this._pairs=[],e&&F3(e,this,t)}const C_e=_j.prototype;C_e.append=function(t,r){this._pairs.push([t,r])};C_e.toString=function(t){const r=t?n=>t.call(this,n,Ute):Ute;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Aqe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function x_e(e,t,r){if(!t)return e;e=e||"";const n=Xe.isFunction(r)?{serialize:r}:r,i=Xe.getSafeProp(n,"encode")||Aqe,a=Xe.getSafeProp(n,"serialize");let o;if(a?o=a(t,n):o=Xe.isURLSearchParams(t)?t.toString():new _j(t,n).toString(i),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Vte{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Xe.forEach(this.handlers,function(n){n!==null&&t(n)})}}const bj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Pqe=typeof URLSearchParams<"u"?URLSearchParams:_j,Rqe=typeof FormData<"u"?FormData:null,Oqe=typeof Blob<"u"?Blob:null,Iqe={isBrowser:!0,classes:{URLSearchParams:Pqe,FormData:Rqe,Blob:Oqe},protocols:["http","https","file","blob","url","data"]},Ej=typeof window<"u"&&typeof document<"u",Iz=typeof navigator=="object"&&navigator||void 0,kqe=Ej&&(!Iz||["ReactNative","NativeScript","NS"].indexOf(Iz.product)<0),Nqe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dqe=Ej&&window.location.href||"http://localhost",Mqe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ej,hasStandardBrowserEnv:kqe,hasStandardBrowserWebWorkerEnv:Nqe,navigator:Iz,origin:Dqe},Symbol.toStringTag,{value:"Module"})),cs={...Mqe,...Iqe};function Lqe(e,t){return F3(e,new cs.classes.URLSearchParams,{visitor:function(r,n,i,a){return cs.isNode&&Xe.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const qte=w_e;function T_e(e){if(e>qte)throw new Sr("FormData field is too deeply nested ("+e+" levels). Max depth: "+qte,Sr.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Fqe(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)T_e(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Bqe(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function A_e(e){function t(r,n,i,a){T_e(a);let o=r[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=r.length;return o=!o&&Xe.isArray(i)?i.length:o,l?(Xe.hasOwnProp(i,o)?i[o]=Xe.isArray(i[o])?i[o].concat(n):[i[o],n]:i[o]=n,!s):((!Xe.hasOwnProp(i,o)||!Xe.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&Xe.isArray(i[o])&&(i[o]=Bqe(i[o])),!s)}if(Xe.isFormData(e)&&Xe.isFunction(e.entries)){const r={};return Xe.forEachEntry(e,(n,i)=>{t(Fqe(n),i,r,0)}),r}return null}const F0=(e,t)=>e!=null&&Xe.hasOwnProp(e,t)?e[t]:void 0;function zqe(e,t,r){if(Xe.isString(e))try{return(t||JSON.parse)(e),Xe.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Lx={transitional:bj,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=Xe.isObject(t);if(a&&Xe.isHTMLForm(t)&&(t=new FormData(t)),Xe.isFormData(t))return i?JSON.stringify(A_e(t)):t;if(Xe.isArrayBuffer(t)||Xe.isBuffer(t)||Xe.isStream(t)||Xe.isFile(t)||Xe.isBlob(t)||Xe.isReadableStream(t))return t;if(Xe.isArrayBufferView(t))return t.buffer;if(Xe.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;
28if(a){const l=F0(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Lqe(t,l).toString();if((s=Xe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=F0(this,"env"),d=c&&c.FormData;return F3(s?{"files[]":t}:t,d&&new d,l)}}return a||i?(r.setContentType("application/json",!1),zqe(t)):t}],transformResponse:[function(t){const r=F0(this,"transitional")||Lx.transitional,n=r&&r.forcedJSONParsing,i=F0(this,"responseType"),a=i==="json";if(Xe.isResponse(t)||Xe.isReadableStream(t))return t;if(t&&Xe.isString(t)&&(n&&!i||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,F0(this,"parseReviver"))}catch(l){if(s)throw l.name==="SyntaxError"?Sr.from(l,Sr.ERR_BAD_RESPONSE,this,null,F0(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cs.classes.FormData,Blob:cs.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Xe.forEach(["delete","get","head","post","put","patch","query"],e=>{Lx.headers[e]={}});function K6(e,t){const r=this||Lx,n=t||r,i=Fs.from(n.headers);let a=n.data;return Xe.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function P_e(e){return!!(e&&e.__CANCEL__)}let Fx=class extends Sr{constructor(t,r,n){super(t??"canceled",Sr.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function R_e(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Sr("Request failed with status code "+r.status,r.status>=400&&r.status<500?Sr.ERR_BAD_REQUEST:Sr.ERR_BAD_RESPONSE,r.config,r.request,r))}function Hqe(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Uqe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=n[a];o||(o=c),r[i]=l,n[i]=c;let f=a,h=0;for(;f!==i;)h+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=d&&c-d;return p?Math.round(h*1e3/p):void 0}}function Vqe(e,t){let r=0,n=1e3/t,i,a;const o=(c,d=Date.now())=>{r=d,i=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?o(c,d):(i=c,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const YR=(e,t,r=3)=>{let n=0;const i=Uqe(50,250);return Vqe(a=>{if(!a||typeof a.loaded!="number")return;const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=Math.max(0,s!=null?Math.min(o,s):o),c=Math.max(0,l-n),d=i(c);n=Math.max(n,l);const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:c,rate:d||void 0,estimated:d&&s?(s-l)/d:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},jte=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},$te=(e,t=Xe.asap)=>(...r)=>t(()=>e(...r)),qqe=cs.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,cs.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(cs.origin),cs.navigator&&/(msie|trident)/i.test(cs.navigator.userAgent)):()=>!0,jqe=cs.hasStandardBrowserEnv?{write(e,t,r,n,i,a,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];Xe.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),Xe.isString(n)&&s.push(`path=${n}`),Xe.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),Xe.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),i=n.indexOf("=");if(i!==-1&&n.slice(0,i)===e)try{return decodeURIComponent(n.slice(i+1))}catch{return n.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $qe(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wqe(e,t){if(!t)return e;let r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const Gqe=/^https?:(?!\/\/)/i,Kqe=/[\t\n\r]/g;function Yqe(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Xqe(e){return Yqe(e).replace(Kqe,"")}function Zqe(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${KR}`)}function Qqe(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${KR}@`),r=t.indexOf("#"),i=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${KR}`);return r===-1?i:`${i}#${Zqe(t.slice(r+1))}`}function Wte(e,t){if(typeof e=="string"){const r=Xqe(e);
vendor: 5,172 bytes, line 28
28if(Gqe.test(r))throw new Sr(`Invalid URL ${JSON.stringify(Qqe(r))}: missing "//" after protocol`,Sr.ERR_INVALID_URL,t)}}function O_e(e,t,r,n){Wte(t,n);let i=!$qe(t);return e&&(i||r===!1)?(Wte(e,n),Wqe(e,t)):t}const Gte=e=>e instanceof Fs?{...e}:e,Jqe=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function fg(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(d,f,h,p){return Xe.isPlainObject(d)&&Xe.isPlainObject(f)?Xe.merge.call({caseless:p},d,f):Xe.isPlainObject(f)?Xe.merge({},f):Xe.isArray(f)?f.slice():f}function i(d,f,h,p){if(Xe.isUndefined(f)){if(!Xe.isUndefined(d))return n(void 0,d,h,p)}else return n(d,f,h,p)}function a(d,f){if(!Xe.isUndefined(f))return n(void 0,f)}function o(d,f){if(Xe.isUndefined(f)){if(!Xe.isUndefined(d))return n(void 0,d)}else return n(void 0,f)}function s(d){const f=Xe.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Xe.isUndefined(f))if(Xe.isPlainObject(f)){if(Xe.hasOwnProp(f,d))return f[d]}else return;const h=Xe.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Xe.isPlainObject(h)&&Xe.hasOwnProp(h,d))return h[d]}function l(d,f,h){if(Xe.hasOwnProp(t,h))return n(d,f);if(Xe.hasOwnProp(e,h))return n(void 0,d)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:l,headers:(d,f,h)=>i(Gte(d),Gte(f),h,!0)};return Xe.forEach(Jqe({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const h=Xe.hasOwnProp(c,f)?c[f]:i,p=Xe.hasOwnProp(e,f)?e[f]:void 0,g=Xe.hasOwnProp(t,f)?t[f]:void 0,_=h(p,g,f);Xe.isUndefined(_)&&h!==l||(r[f]=_)}),Xe.hasOwnProp(t,"validateStatus")&&Xe.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(Xe.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const eje=["content-type","content-length"];function tje(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,i])=>{eje.includes(n.toLowerCase())&&e.set(n,i)})}const rje=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function I_e(e){const t=fg({},e),r=h=>Xe.hasOwnProp(t,h)?t[h]:void 0,n=r("data");let i=r("withXSRFToken");const a=r("xsrfHeaderName"),o=r("xsrfCookieName");let s=r("headers");const l=r("auth"),c=r("baseURL"),d=r("allowAbsoluteUrls"),f=r("url");if(t.headers=s=Fs.from(s),t.url=x_e(O_e(c,f,d,t),r("params"),r("paramsSerializer")),l){const h=Xe.getSafeProp(l,"username")||"",p=Xe.getSafeProp(l,"password")||"";try{s.set("Authorization","Basic "+btoa(h+":"+(p?rje(p):"")))}catch(g){throw Sr.from(g,Sr.ERR_BAD_OPTION_VALUE,e)}}if(Xe.isFormData(n)&&(cs.hasStandardBrowserEnv||cs.hasStandardBrowserWebWorkerEnv||Xe.isReactNative(n)?s.setContentType(void 0):Xe.isFunction(n.getHeaders)&&tje(s,n.getHeaders(),r("formDataHeaderPolicy"))),cs.hasStandardBrowserEnv&&(Xe.isFunction(i)&&(i=i(t)),i===!0||i==null&&qqe(t.url))){const p=a&&o&&jqe.read(o);p&&s.set(a,p)}return t}const nje=typeof XMLHttpRequest<"u",ije=nje&&function(e){return new Promise(function(r,n){const i=I_e(e);let a=i.data;const o=Fs.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=i,d,f,h,p,g;function _(){p&&p(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function E(){if(!b)return;const P=Fs.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),I={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:P,config:e,request:b};R_e(function(M){r(M),_()},function(M){n(M),_()},I),b=null}"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(E)},b.onabort=function(){b&&(n(new Sr("Request aborted",Sr.ECONNABORTED,e,b)),_(),b=null)},b.onerror=function(O){const I=O&&O.message?O.message:"Network Error",N=new Sr(I,Sr.ERR_NETWORK,e,b);N.event=O||null,n(N),_(),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const I=i.transitional||bj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),n(new Sr(O,I.clarifyTimeoutError?Sr.ETIMEDOUT:Sr.ECONNABORTED,e,b)),_(),b=null},a===void 0&&o.setContentType(null),"setRequestHeader"in b&&Xe.forEach(b_e(o),function(O,I){b.setRequestHeader(I,O)}),Xe.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),c&&
28([h,g]=YR(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([f,p]=YR(l),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(d=P=>{b&&(n(!P||P.type?new Fx(null,e,b):P),b.abort(),_(),b=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const S=Hqe(i.url);if(S&&!cs.protocols.includes(S)){n(new Sr("Unsupported protocol "+S+":",Sr.ERR_BAD_REQUEST,e)),_();return}b.send(a||null)})},aje=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const i=function(l){if(!n){n=!0,o();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Sr?c:new Fx(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new Sr(`timeout of ${t}ms exceeded`,Sr.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>{if(!n){if(l.aborted){i.call(l);return}l.addEventListener("abort",i,{once:!0})}});const{signal:s}=r;return s.unsubscribe=()=>Xe.asap(o),s},oje=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},sje=async function*(e,t){for await(const r of lje(e))yield*oje(r,t)},lje=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Kte=(e,t,r,n)=>{const i=sje(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await i.next();if(c){s(),l.close();return}let f=d.byteLength;if(r){let h=a+=f;r(h)}l.enqueue(new Uint8Array(d))}catch(c){throw s(c),c}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},Yte=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,k_e=(e,t,r)=>t+2<r&&Yte(e.charCodeAt(t+1))&&Yte(e.charCodeAt(t+2)),Xte=e=>e<=57?e-48:(e&223)-55,cje=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,uje=e=>e===9||e===10||e===12||e===13||e===32,dje=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},fje=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},hje=e=>{const t=e.length;let r=0,n=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&k_e(e,a,t)&&(o=Xte(e.charCodeAt(a+1))*16+Xte(e.charCodeAt(a+2)),a+=2),!uje(o)){if(o===61){n++;continue}if(!cje(o)||n>0){i=!0;continue}r++}}return i||n>2||n>0&&(r+n)%4!==0||r%4===1?fje(e):dje(r)},pje=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let o=0;for(let s=0,l=i.length;s<l;s++){const c=i.charCodeAt(s);if(c===37&&k_e(i,s,l))o+=1,s+=2;else if(c<128)o+=1;else if(c<2048)o+=2;else if(c>=55296&&c<=56319&&s+1<l){const d=i.charCodeAt(s+1);d>=56320&&d<=57343?(o+=4,s++):o+=3}else o+=3}return o};function mje(e){const t=typeof e=="string"?e.indexOf("#"):-1;return pje(t===-1?e:e.slice(0,t),hje)}const wj="1.19.0",Zte=64*1024,{isFunction:MT}=Xe,vje=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Qte=e=>{if(!Xe.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Jte=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gje=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},yje=e=>{const t=Xe.global!==void 0&&Xe.global!==null?Xe.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=Xe.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,s=i?MT(i):typeof fetch=="function",l=MT(a),c=MT(o);if(!s)return!1;const d=s&&MT(r),f=s&&(typeof n=="function"?(E=>S=>E.encode(S))(new n):async E=>new Uint8Array(await new a(E).arrayBuffer())),h=l&&d&&Jte(()=>{let E=!1;const S=new a(cs.origin,{body:new r,method:"POST",get duplex(){return E=!0,"half"}}),P=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),E&&!P}),p=c&&d&&Jte(()=>
vendor: 12,150 bytes, lines 28-34
28Xe.isReadableStream(new o("").body)),g={stream:p&&(E=>E.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(S,P)=>{let O=S&&S[E];if(O)return O.call(S);throw new Sr(`Response type '${E}' is not supported`,Sr.ERR_NOT_SUPPORT,P)})});const _=async E=>{if(E==null)return 0;if(Xe.isBlob(E))return E.size;if(Xe.isSpecCompliantForm(E))return(await new a(cs.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(Xe.isArrayBufferView(E)||Xe.isArrayBuffer(E))return E.byteLength;if(Xe.isURLSearchParams(E)&&(E=E+""),Xe.isString(E))return(await f(E)).byteLength},b=async(E,S)=>{const P=Xe.toFiniteNumber(E.getContentLength());return P??_(S)};return async E=>{let{url:S,method:P,data:O,signal:I,cancelToken:N,timeout:M,onDownloadProgress:F,onUploadProgress:B,responseType:V,headers:W,withCredentials:$="same-origin",fetchOptions:X,maxContentLength:re,maxBodyLength:ae}=I_e(E);const Q=Xe.isNumber(re)&&re>-1,ie=Xe.isNumber(ae)&&ae>-1,le=pe=>Xe.hasOwnProp(E,pe)?E[pe]:void 0;let fe=i||fetch;V=V?(V+"").toLowerCase():"text";let de=aje([I,N&&N.toAbortSignal()],M),ge=null;const Ae=de&&de.unsubscribe&&(()=>{de.unsubscribe()});let Fe,Pe=null;const ce=()=>new Sr("Request body larger than maxBodyLength limit",Sr.ERR_BAD_REQUEST,E,ge);try{let pe;const Ne=le("auth");if(Ne){const Le=Xe.getSafeProp(Ne,"username")||"",Be=Xe.getSafeProp(Ne,"password")||"";pe={username:Le,password:Be}}if(gje(S)){const Le=new URL(S,cs.origin);if(!pe&&(Le.username||Le.password)){const Be=Qte(Le.username),Ze=Qte(Le.password);pe={username:Be,password:Ze}}(Le.username||Le.password)&&(Le.username="",Le.password="",S=Le.href)}if(pe&&(W.delete("authorization"),W.set("Authorization","Basic "+btoa(vje((pe.username||"")+":"+(pe.password||""))))),Q&&typeof S=="string"&&S.startsWith("data:")&&mje(S)>re)throw new Sr("maxContentLength size of "+re+" exceeded",Sr.ERR_BAD_RESPONSE,E,ge);if(ie&&P!=="get"&&P!=="head"){const Le=await _(O);if(typeof Le=="number"&&isFinite(Le)&&(Fe=Le,Le>ae))throw ce()}const De=ie&&(Xe.isReadableStream(O)||Xe.isStream(O)),Ve=(Le,Be,Ze)=>Kte(Le,Zte,Et=>{if(ie&&Et>ae)throw Pe=ce();Be&&Be(Et)},Ze);if(h&&P!=="get"&&P!=="head"&&(B||De)){if(Fe=Fe??await b(W,O),Fe!==0||De){let Le=new a(S,{method:"POST",body:O,duplex:"half"}),Be;if(Xe.isFormData(O)&&(Be=Le.headers.get("content-type"))&&W.setContentType(Be),Le.body){const[Ze,Et]=B&&jte(Fe,YR($te(B)))||[];O=Ve(Le.body,Ze,Et)}}}else if(De&&!l&&d&&P!=="get"&&P!=="head")O=Ve(O);else if(De&&l&&!h&&P!=="get"&&P!=="head")throw new Sr("Stream request bodies are not supported by the current fetch implementation",Sr.ERR_NOT_SUPPORT,E,ge);Xe.isString($)||($=$?"include":"omit");const Ke=l&&"credentials"in a.prototype;if(Xe.isFormData(O)){const Le=W.getContentType();Le&&/^multipart\/form-data/i.test(Le)&&!/boundary=/i.test(Le)&&W.delete("content-type")}W.set("User-Agent","axios/"+wj,!1);const Qe={...X,signal:de,method:P.toUpperCase(),headers:b_e(W.normalize()),body:O,duplex:"half",credentials:Ke?$:void 0};ge=l&&new a(S,Qe);let Ue=await(l?fe(ge,X):fe(S,Qe));const ut=Fs.from(Ue.headers);if(Q){const Le=Xe.toFiniteNumber(ut.getContentLength());if(Le!=null&&Le>re)throw new Sr("maxContentLength size of "+re+" exceeded",Sr.ERR_BAD_RESPONSE,E,ge)}const We=p&&(V==="stream"||V==="response");if(p&&Ue.body&&(F||Q||We&&Ae)){const Le={};["status","statusText","headers"].forEach(Kt=>{Le[Kt]=Ue[Kt]});const Be=Xe.toFiniteNumber(ut.getContentLength()),[Ze,Et]=F&&jte(Be,YR($te(F),!0))||[];let Yt=0;const sr=Kt=>{if(Q&&(Yt=Kt,Yt>re))throw new Sr("maxContentLength size of "+re+" exceeded",Sr.ERR_BAD_RESPONSE,E,ge);Ze&&Ze(Kt)};Ue=new o(Kte(Ue.body,Zte,sr,()=>{Et&&Et(),Ae&&Ae()}),Le)}V=V||"text";let ke=await g[Xe.findKey(g,V)||"text"](Ue,E);if(Q&&!p&&!We){let Le;if(ke!=null&&(typeof ke.byteLength=="number"?Le=ke.byteLength:typeof ke.size=="number"?Le=ke.size:typeof ke=="string"&&(Le=typeof n=="function"?new n().encode(ke).byteLength:ke.length)),typeof Le=="number"&&Le>re)throw new Sr("maxContentLength size of "+re+" exceeded",Sr.ERR_BAD_RESPONSE,E,ge)}return!We&&Ae&&Ae(),await new Promise((Le,Be)=>{R_e(Le,Be,{data:ke,headers:Fs.from(Ue.headers),status:Ue.status,statusText:Ue.statusText,config:E,request:ge})})}catch(pe){if(Ae&&Ae(),de&&de.aborted&&de.reason instanceof Sr){const Ne=de.reason;throw Ne.config=E,ge&&(Ne.request=ge),pe!==Ne&&Object.defineProperty(Ne,"cause",{__proto__:null,value:pe,writable:!0,enumerable:!1,configurable:!0}),Ne}if(Pe)throw ge&&!Pe.request&&(Pe.request=ge),Pe;if(pe instanceof Sr)throw ge&&!pe.request&&(pe.request=ge),pe;if(pe&&pe.name==="TypeError"&&/Load failed|fetch/i.test(pe.message)){const Ne=new Sr("Network Error",Sr.ERR_NETWORK,E,ge,pe&&pe.response);throw Object.defineProperty(Ne,"cause",{__proto__:null,value:pe.cause||pe,writable:!0,enumerable:!1,configurable:!0}),Ne}throw Sr.from(pe,pe&&pe.code,E,ge,pe&&pe.response)}}},_je=new Map,N_e=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,c,d=_je;for(;s--;)l=a[s],c=d.get(l),c===void 0&&d.set(l,c=s?new Map:yje(t)),d=c;return c};N_e();const Sj={http:Cqe,xhr:ije,fetch:{get:N_e}};Xe.forEach(Sj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ere=e=>`- ${e}`,bje=e=>Xe.isFunction(e)||e===null||e===!1;function Eje(e,t){e=Xe.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o<r;o++){n=e[o];let s;if(i=n,!bje(n)&&(i=Sj[(s=String(n)).toLowerCase()],i===void 0))throw new Sr(`Unknown adapter '${s}'`);if(i&&(Xe.isFunction(i)||(i=i.get(t))))break;a[s||"#"+o]=i}if(!i){const o=Object.entries(a).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since :
29`+o.map(ere).join(`
30`):" "+ere(o[0]):"as no adapter specified";throw new Sr("There is no suitable adapter to dispatch the request "+s,Sr.ERR_NOT_SUPPORT)}return i}const D_e={getAdapter:Eje,adapters:Sj};function Y6(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fx(null,e)}function X6(e){return Y6(e),e.headers=Fs.from(e.headers),e.data=K6.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),D_e.getAdapter(e.adapter||Lx.adapter,e)(e).then(function(n){Y6(e),e.response=n;try{n.data=K6.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=Fs.from(n.headers),n},function(n){if(!P_e(n)&&(Y6(e),n&&n.response)){e.response=n.response;try{n.response.data=K6.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=Fs.from(n.response.headers)}return Promise.reject(n)})}const B3={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{B3[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const tre={};B3.transitional=function(t,r,n){function i(a,o){return"[Axios v"+wj+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new Sr(i(o," has been removed"+(r?" in "+r:"")),Sr.ERR_DEPRECATED);return r&&!tre[o]&&(tre[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};B3.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wje(e,t,r){if(typeof e!="object"||e===null)throw new Sr("options must be an object",Sr.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new Sr("option "+a+" must be "+l,Sr.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Sr("Unknown option "+a,Sr.ERR_BAD_OPTION)}}const kP={assertOptions:wje,validators:B3},Ts=kP.validators;let Wv=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Vte,response:new Vte}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=(()=>{if(!i.stack)return"";const o=i.stack.indexOf(`
31`);return o===-1?"":i.stack.slice(o+1)})();try{if(!n.stack)n.stack=a;else if(a){const o=a.indexOf(`
32`),s=o===-1?-1:a.indexOf(`
33`,o+1),l=s===-1?"":a.slice(s+1);String(n.stack).endsWith(l)||(n.stack+=`
34`+a)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=fg(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&kP.assertOptions(n,{silentJSONParsing:Ts.transitional(Ts.boolean),forcedJSONParsing:Ts.transitional(Ts.boolean),clarifyTimeoutError:Ts.transitional(Ts.boolean),legacyInterceptorReqResOrdering:Ts.transitional(Ts.boolean),advertiseZstdAcceptEncoding:Ts.transitional(Ts.boolean),validateStatusUndefinedResolves:Ts.transitional(Ts.boolean)},!1),i!=null&&(Xe.isFunction(i)?r.paramsSerializer={serialize:i}:kP.assertOptions(i,{encode:Ts.function,serialize:Ts.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),kP.assertOptions(r,{baseUrl:Ts.spelling("baseURL"),withXsrfToken:Ts.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&Xe.merge(a.common,a[r.method]);a&&Xe.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete a[g]}),r.headers=Fs.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(r)===!1)return;l=l&&_.synchronous;const b=r.transitional||bj;b&&b.legacyInterceptorReqResOrdering?s.unshift(_.fulfilled,_.rejected):s.push(_.fulfilled,_.rejected)});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let d,f=0,h;if(!l){const g=[X6.bind(this),void 0];for(g.unshift(...s),g.push(...c),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=s.length;let p=r;for(;f<h;){const g=s[f++],_=s[f++];try{p=g?g(p):p}catch(b){if(!_){d=Promise.reject(b);break}try{const E=_.call(this,b);Xe.isThenable(E)&&(d=Promise.resolve(E).then(()=>X6.call(this,p)))}catch(E){d=Promise.reject(E)}break}}if(!d)try{d=X6.call(this,p)}catch(g){d=Promise.reject(g)}for(f=0,h=c.length;f<h;)d=d.then(c[f++],c[f++]);return d}getUri(t){t=fg(this.defaults,t);const r=O_e(t.baseURL,t.url,t.allowAbsoluteUrls,t);return x_e(r,t.params,t.paramsSerializer)}};Xe.forEach(["delete","get","head","options"],function(t){Wv.prototype[t]=function(r,n){return this.request(fg(n||{},{method:t,url:r,data:n&&Xe.hasOwnProp(n,"data")?n.data:void 0}))}});Xe.forEach(["post","put","patch","query"],function(t){function r(n){return function(a,o,s){return this.request(fg(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Wv.prototype[t]=r(),t!=="query"&&(Wv.prototype[t+"Form"]=r(!0))});let Sje=class M_e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new Fx(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new M_e(function(i){t=i}),cancel:t}}};function Cje(e){return function(r){return e.apply(null,r)}}function xje(e){return Xe.isObject(e)&&e.isAxiosError===!0}const kz={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
34alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kz).forEach(([e,t])=>{kz[t]=e});function L_e(e){const t=new Wv(e),r=d_e(Wv.prototype.request,t);return Xe.extend(r,Wv.prototype,t,{allOwnKeys:!0}),Xe.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return L_e(fg(e,i))},r}const ht=L_e(Lx);ht.Axios=Wv;ht.CanceledError=Fx;ht.CancelToken=Sje;ht.isCancel=P_e;ht.VERSION=wj;ht.toFormData=F3;ht.AxiosError=Sr;ht.Cancel=ht.CanceledError;ht.all=function(t){return Promise.all(t)};ht.spread=Cje;ht.isAxiosError=xje;ht.mergeConfig=fg;ht.AxiosHeaders=Fs;ht.formToJSON=e=>A_e(Xe.isHTMLForm(e)?new FormData(e):e);ht.getAdapter=D_e.getAdapter;ht.HttpStatusCode=kz;ht.default=ht;const{Axios:ler,AxiosError:cer,CanceledError:uer,isCancel:der,CancelToken:fer,VERSION:her,all:per,Cancel:mer,isAxiosError:ver,spread:ger,toFormData:yer,AxiosHeaders:_er,HttpStatusCode:ber,formToJSON:Eer,getAdapter:wer,mergeConfig:Ser,create:Cer}=ht;var F_e;function qe(){return F_e.apply(null,arguments)}function Tje(e){F_e=e}function Mu(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Gv(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function wi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Cj(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(wi(e,t))return!1;return!0}function Sl(e){return e===void 0}function ah(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bx(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function B_e(e,t){var r=[],n,i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function Pp(e,t){for(var r in t)wi(t,r)&&(e[r]=t[r]);return wi(t,"toString")&&(e.toString=t.toString),wi(t,"valueOf")&&(e.valueOf=t.valueOf),e}function jd(e,t,r,n){return sbe(e,t,r,n,!0).utc()}function Aje(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function In(e){return e._pf==null&&(e._pf=Aje()),e._pf}var Nz;Array.prototype.some?Nz=Array.prototype.some:Nz=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function xj(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=In(e),r=Nz.call(t.parsedDateParts,function(i){return i!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function z3(e){var t=jd(NaN);return e!=null?Pp(In(t),e):In(t).userInvalidated=!0,t}var rre=qe.momentProperties=[],Z6=!1;function Tj(e,t){var r,n,i,a=rre.length;if(Sl(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Sl(t._i)||(e._i=t._i),Sl(t._f)||(e._f=t._f),Sl(t._l)||(e._l=t._l),Sl(t._strict)||(e._strict=t._strict),Sl(t._tzm)||(e._tzm=t._tzm),Sl(t._isUTC)||(e._isUTC=t._isUTC),Sl(t._offset)||(e._offset=t._offset),Sl(t._pf)||(e._pf=In(t)),Sl(t._locale)||(e._locale=t._locale),a>0)for(r=0;r<a;r++)n=rre[r],i=t[n],Sl(i)||(e[n]=i);return e}function zx(e){Tj(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Z6===!1&&(Z6=!0,qe.updateOffset(this),Z6=!1)}function Lu(e){return e instanceof zx||e!=null&&e._isAMomentObject!=null}function z_e(e){qe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Wc(e,t){var r=!0;return Pp(function(){if(qe.deprecationHandler!=null&&qe.deprecationHandler(null,e),r){var n=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i="",typeof arguments[a]=="object"){i+=`
35[`+a+"] ";for(o in arguments[0])wi(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];n.push(i)}z_e(e+`
36Arguments: `+Array.prototype.slice.call(n).join("")+`
37`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var nre={};function H_e(e,t){qe.deprecationHandler!=null&&qe.deprecationHandler(e,t),nre[e]||(z_e(t),nre[e]=!0)}qe.suppressDeprecationWarnings=!1;qe.deprecationHandler=null;function $d(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Pje(e){var t,r;for(r in e)wi(e,r)&&(t=e[r],$d(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Dz(e,t){var r=Pp({},e),n;for(n in t)wi(t,n)&&(Gv(e[n])&&Gv(t[n])?(r[n]={},Pp(r[n],e[n]),Pp(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)wi(e,n)&&!wi(t,n)&&Gv(e[n])&&(r[n]=Pp({},r[n]));return r}function Aj(e){e!=null&&this.set(e)}var Mz;Object.keys?Mz=Object.keys:Mz=function(e){var t,r=[];for(t in e)wi(e,t)&&r.push(t);return r};var Rje={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Oje(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return $d(n)?n.call(t,r):n}function Ld(e,t,r){var n=""+Math.abs(e),i=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var Pj=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 25,063 bytes, line 37
37|x|X|zz?|ZZ?|.)/g,LT=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Q6={},By={};function jr(e,t,r,n){var i=n;typeof n=="string"&&(i=function(){return this[n]()}),e&&(By[e]=i),t&&(By[t[0]]=function(){return Ld(i.apply(this,arguments),t[1],t[2])}),r&&(By[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Ije(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function kje(e){var t=e.match(Pj),r,n;for(r=0,n=t.length;r<n;r++)By[t[r]]?t[r]=By[t[r]]:t[r]=Ije(t[r]);return function(i){var a="",o;for(o=0;o<n;o++)a+=$d(t[o])?t[o].call(i,e):t[o];return a}}function NP(e,t){return e.isValid()?(t=U_e(t,e.localeData()),Q6[t]=Q6[t]||kje(t),Q6[t](e)):e.localeData().invalidDate()}function U_e(e,t){var r=5;function n(i){return t.longDateFormat(i)||i}for(LT.lastIndex=0;r>=0&&LT.test(e);)e=e.replace(LT,n),LT.lastIndex=0,r-=1;return e}var Nje={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Dje(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Pj).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var Mje="Invalid date";function Lje(){return this._invalidDate}var Fje="%d",Bje=/\d{1,2}/;function zje(e){return this._ordinal.replace("%d",e)}var Hje={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Uje(e,t,r,n){var i=this._relativeTime[r];return $d(i)?i(e,t,r,n):i.replace(/%d/i,e)}function Vje(e,t){var r=this._relativeTime[e>0?"future":"past"];return $d(r)?r(t):r.replace(/%s/i,t)}var ire={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Gc(e){return typeof e=="string"?ire[e]||ire[e.toLowerCase()]:void 0}function Rj(e){var t={},r,n;for(n in e)wi(e,n)&&(r=Gc(n),r&&(t[r]=e[n]));return t}var qje={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function jje(e){var t=[],r;for(r in e)wi(e,r)&&t.push({unit:r,priority:qje[r]});return t.sort(function(n,i){return n.priority-i.priority}),t}var V_e=/\d/,mc=/\d\d/,q_e=/\d{3}/,Oj=/\d{4}/,H3=/[+-]?\d{6}/,Pa=/\d\d?/,j_e=/\d\d\d\d?/,$_e=/\d\d\d\d\d\d?/,U3=/\d{1,3}/,Ij=/\d{1,4}/,V3=/[+-]?\d{1,6}/,b_=/\d+/,q3=/[+-]?\d+/,$je=/Z|[+-]\d\d:?\d\d/gi,j3=/Z|[+-]\d\d(?::?\d\d)?/gi,Wje=/[+-]?\d+(\.\d{1,3})?/,Hx=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,E_=/^[1-9]\d?/,kj=/^([1-9]\d|\d)/,XR;XR={};function kr(e,t,r){XR[e]=$d(t)?t:function(n,i){return n&&r?r:t}}function Gje(e,t){return wi(XR,e)?XR[e](t._strict,t._locale):new RegExp(Kje(e))}function Kje(e){return Hf(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,i,a){return r||n||i||a}))}function Hf(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Oc(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ti(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Oc(t)),r}var Lz={};function sa(e,t){var r,n=t,i;for(typeof e=="string"&&(e=[e]),ah(t)&&(n=function(a,o){o[t]=ti(a)}),i=e.length,r=0;r<i;r++)Lz[e[r]]=n}function Ux(e,t){sa(e,function(r,n,i,a){i._w=i._w||{},t(r,i._w,i,a)})}function Yje(e,t,r){t!=null&&wi(Lz,e)&&Lz[e](t,r._a,r,e)}function $3(e){return e%4===0&&e%100!==0||e%400===0}var Bs=0,Rf=1,md=2,Fo=3,Tu=4,Of=5,Iv=6,Xje=7,Zje=8;jr("Y",0,0,function(){var e=this.year();return e<=9999?Ld(e,4):"+"+e});jr(0,["YY",2],0,function(){return this.year()%100});jr(0,["YYYY",4],0,"year");jr(0,["YYYYY",5],0,"year");jr(0,["YYYYYY",6,!0],0,"year");kr("Y",q3);kr("YY",Pa,mc);kr("YYYY",Ij,Oj);kr("YYYYY",V3,H3);kr("YYYYYY",V3,H3);sa(["YYYYY","YYYYYY"],Bs);sa("YYYY",function(e,t){t[Bs]=e.length===2?qe.parseTwoDigitYear(e):ti(e)});sa("YY",function(e,t){t[Bs]=qe.parseTwoDigitYear(e)});sa("Y",function(e,t){t[Bs]=parseInt(e,10)});function fS(e){return $3(e)?366:365}qe.parseTwoDigitYear=function(e){return ti(e)+(ti(e)>68?1900:2e3)};var W_e=w_("FullYear",!0);function Qje(){return $3(this.year())}function w_(e,t){return function(r){return r!=null?(G_e(this,e,r),qe.updateOffset(this,t),this):nC(this,e)}}function nC(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function G_e(e,t,r){var n,i,a,o,s;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}a=r,o=e.month(),s=e.date(),s=s===29&&o===1&&!$3(a)?28:s,i?n.setUTCFullYear(a,o,s):n.setFullYear(a,o,s)}}function Jje(e){return e=Gc(e),$d(this[e])?this[e]():this}function e$e(e,t){if(typeof e=="object"){e=Rj(e);var r=jje(e),n,i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(e=Gc(e),$d(this[e]))return this[e](t);return this}function t$e(e,t){return(e%t+t)%t}var uo;Array.prototype.indexOf?uo=Array.prototype.indexOf:uo=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Nj(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=t$e(t,12);return e+=(t-r)/12,r===1?$3(e)?29:28:31-r%7%2}jr("M",["MM",2],"Mo",function(){return this.month()+1});jr("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});jr("MMMM",0,0,function(e){return this.localeData().months(this,e)});kr("M",Pa,E_);kr("MM",Pa,mc);kr("MMM",function(e,t){return t.monthsShortRegex(e)});kr("MMMM",function(e,t){return t.monthsRegex(e)});sa(["M","MM"],function(e,t){t[Rf]=ti(e)-1});sa(["MMM","MMMM"],function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);i!=null?t[Rf]=i:In(r).invalidMonth=e});var r$e="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),K_e="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Y_e=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,n$e=Hx,i$e=Hx;function a$e(e,t){return e?Mu(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Y_e).test(t)?"format":"standalone"][e.month()]:Mu(this._months)?this._months:this._months.standalone}function o$e(e,t){return e?Mu(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Y_e.test(t)?"format":"standalone"][e.month()]:Mu(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function s$e(e,t,r){var n,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=jd([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?t==="MMM"?(i=uo.call(this._shortMonthsParse,o),i!==-1?i:null):(i=uo.call(this._longMonthsParse,o),i!==-1?i:null):t==="MMM"?(i=uo.call(this._shortMonthsParse,o),i!==-1?i:(i=uo.call(this._longMonthsParse,o),i!==-1?i:null)):(i=uo.call(this._longMonthsParse,o),i!==-1?i:(i=uo.call(this._shortMonthsParse,o),i!==-1?i:null))}function l$e(e,t,r){var n,i,a;if(this._monthsParseExact)return s$e.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=jd([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function X_e(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=ti(t);else if(t=e.localeData().monthsParse(t),!ah(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Nj(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Z_e(e){return e!=null?(X_e(this,e),qe.updateOffset(this,!0),this):nC(this,"Month")}function c$e(){return Nj(this.year(),this.month())}function u$e(e){return this._monthsParseExact?(wi(this,"_monthsRegex")||Q_e.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(wi(this,"_monthsShortRegex")||(this._monthsShortRegex=n$e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function d$e(e){return this._monthsParseExact?(wi(this,"_monthsRegex")||Q_e.call(this),e?this._monthsStrictRegex:this._monthsRegex):(wi(this,"_monthsRegex")||(this._monthsRegex=i$e),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Q_e(){function e(l,c){return c.length-l.length}var t=[],r=[],n=[],i,a,o,s;for(i=0;i<12;i++)a=jd([2e3,i]),o=Hf(this.monthsShort(a,"")),s=Hf(this.months(a,"")),t.push(o),r.push(s),n.push(s),n.push(o);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function f$e(e,t,r,n,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,a,o),s}function iC(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ZR(e,t,r){var n=7+t-r,i=(7+iC(e,0,n).getUTCDay()-t)%7;return-i+n-1}function J_e(e,t,r,n,i){var a=(7+r-n)%7,o=ZR(e,n,i),s=1+7*(t-1)+a+o,l,c;return s<=0?(l=e-1,c=fS(l)+s):s>fS(e)?(l=e+1,c=s-fS(e)):(l=e,c=s),{year:l,dayOfYear:c}}function aC(e,t,r){var n=ZR(e.year(),t,r),i=Math.floor((e.dayOfYear()-n-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+Uf(o,t,r)):i>Uf(e.year(),t,r)?(a=i-Uf(e.year(),t,r),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function Uf(e,t,r){var n=ZR(e,t,r),i=ZR(e+1,t,r);return(fS(e)-n+i)/7}jr("w",["ww",2],"wo","week");jr("W",["WW",2],"Wo","isoWeek");kr("w",Pa,E_);kr("ww",Pa,mc);kr("W",Pa,E_);kr("WW",Pa,mc);Ux(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=ti(e)});function h$e(e){return aC(e,this._week.dow,this._week.doy).week}var p$e={dow:0,doy:6};function m$e(){return this._week.dow}function v$e(){return this._week.doy}function g$e(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function y$e(e){var t=aC(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}jr("d",0,"do","day");jr("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});jr("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});jr("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});jr("e",0,0,"weekday");jr("E",0,0,"isoWeekday");kr("d",Pa);kr("e",Pa);kr("E",Pa);kr("dd",function(e,t){return t.weekdaysMinRegex(e)});kr("ddd",function(e,t){return t.weekdaysShortRegex(e)});kr("dddd",function(e,t){return t.weekdaysRegex(e)});Ux(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);i!=null?t.d=i:In(r).invalidWeekday=e});Ux(["d","e","E"],function(e,t,r,n){t[n]=ti(e)});function _$e(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function b$e(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Dj(e,t){return e.slice(t,7).concat(e.slice(0,t))}var E$e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ebe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),w$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),S$e=Hx,C$e=Hx,x$e=Hx;function T$e(e,t){var r=Mu(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Dj(r,this._week.dow):e?r[e.day()]:r}function A$e(e){return e===!0?Dj(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function P$e(e){return e===!0?Dj(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function R$e(e,t,r){var n,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=jd([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(i=uo.call(this._weekdaysParse,o),i!==-1?i:null):t==="ddd"?(i=uo.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=uo.call(this._minWeekdaysParse,o),i!==-1?i:null):t==="dddd"?(i=uo.call(this._weekdaysParse,o),i!==-1||(i=uo.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=uo.call(this._minWeekdaysParse,o),i!==-1?i:null)):t==="ddd"?(i=uo.call(this._shortWeekdaysParse,o),i!==-1||(i=uo.call(this._weekdaysParse,o),i!==-1)?i:(i=uo.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=uo.call(this._minWeekdaysParse,o),i!==-1||(i=uo.call(this._weekdaysParse,o),i!==-1)?i:(i=uo.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function O$e(e,t,r){var n,i,a;if(this._weekdaysParseExact)return R$e.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=jd([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function I$e(e){if(!this.isValid())return e!=null?this:NaN;var t=nC(this,"Day");return e!=null?(e=_$e(e,this.localeData()),this.add(e-t,"d")):t}function k$e(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function N$e(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=b$e(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function D$e(e){return this._weekdaysParseExact?(wi(this,"_weekdaysRegex")||Mj.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(wi(this,"_weekdaysRegex")||(this._weekdaysRegex=S$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function M$e(e){return this._weekdaysParseExact?(wi(this,"_weekdaysRegex")||Mj.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(wi(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=C$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function L$e(e){return this._weekdaysParseExact?(wi(this,"_weekdaysRegex")||Mj.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(wi(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=x$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Mj(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=jd([2e3,1]).day(a),s=Hf(this.weekdaysMin(o,"")),l=Hf(this.weekdaysShort(o,"")),c=Hf(this.weekdays(o,"")),t.push(s),r.push(l),n.push(c),i.push(s),i.push(l),i.push(c);t.sort(e),r.sort(e),n.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Lj(){return this.hours()%12||12}function F$e(){return this.hours()||24}jr("H",["HH",2],0,"hour");jr("h",["hh",2],0,Lj);jr("k",["kk",2],0,F$e);jr("hmm",0,0,function(){return""+Lj.apply(this)+Ld(this.minutes(),2)});jr("hmmss",0,0,function(){return""+Lj.apply(this)+Ld(this.minutes(),2)+Ld(this.seconds(),2)});jr("Hmm",0,0,function(){return""+this.hours()+Ld(this.minutes(),2)});jr("Hmmss",0,0,function(){return""+this.hours()+Ld(this.minutes(),2)+Ld(this.seconds(),2)});function tbe(e,t){jr(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}tbe("a",!0);tbe("A",!1);function rbe(e,t){return t._meridiemParse}kr("a",rbe);kr("A",rbe);kr("H",Pa,kj);kr("h",Pa,E_);kr("k",Pa,E_);kr("HH",Pa,mc);kr("hh",Pa,mc);kr("kk",Pa,mc);kr("hmm",j_e);kr("hmmss",$_e);kr("Hmm",j_e);kr("Hmmss",$_e);sa(["H","HH"],Fo);sa(["k","kk"],function(e,t,r){var n=ti(e);t[Fo]=n===24?0:n});sa(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});sa(["h","hh"],function(e,t,r){t[Fo]=ti(e),In(r).bigHour=!0});sa("hmm",function(e,t,r){var n=e.length-2;t[Fo]=ti(e.substr(0,n)),t[Tu]=ti(e.substr(n)),In(r).bigHour=!0});sa("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Fo]=ti(e.substr(0,n)),t[Tu]=ti(e.substr(n,2)),t[Of]=ti(e.substr(i)),In(r).bigHour=!0});sa("Hmm",function(e,t,r){var n=e.length-2;t[Fo]=ti(e.substr(0,n)),t[Tu]=ti(e.substr(n))});sa("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Fo]=ti(e.substr(0,n)),t[Tu]=ti(e.substr(n,2)),t[Of]=ti(e.substr(i))});function B$e(e){return(e+"").toLowerCase().charAt(0)==="p"}var z$e=/[ap]\.?m?\.?/i,H$e=w_("Hours",!0);function U$e(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var nbe={calendar:Rje,longDateFormat:Nje,invalidDate:Mje,ordinal:Fje,dayOfMonthOrdinalParse:Bje,relativeTime:Hje,months:r$e,monthsShort:K_e,week:p$e,weekdays:E$e,weekdaysMin:w$e,weekdaysShort:ebe,meridiemParse:z$e},Na={},pb={},oC;function V$e(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function are(e){return e&&e.toLowerCase().replace("_","-")}function q$e(e){for(var t=0,r,n,i,a;t<e.length;){for(a=are(e[t]).split("-"),r=a.length,n=are(e[t+1]),n=n?n.split("-"):null;r>0;){if(i=W3(a.slice(0,r).join("-")),i)return i;if(n&&n.length>=r&&V$e(a,n)>=r-1)break;r--}t++}return oC}function j$e(e){return!!(e&&e.match("^[^/\\\\]*$"))}function W3(e){var t=null,r;if(Na[e]===void 0&&typeof module<"u"&&module&&module.exports&&j$e(e))try{t=oC._abbr,r=require,r("./locale/"+e),Bp(t)}catch{Na[e]=null}return Na[e]}function Bp(e,t){var r;return e&&(Sl(t)?r=wh(e):r=Fj(e,t),r?oC=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),oC._abbr}function Fj(e,t){if(t!==null){var r,n=nbe;if(t.abbr=e,Na[e]!=null)H_e("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Na[e]._config;else if(t.parentLocale!=null)if(Na[t.parentLocale]!=null)n=Na[t.parentLocale]._config;else if(r=W3(t.parentLocale),r!=null)n=r._config;else return pb[t.parentLocale]||(pb[t.parentLocale]=[]),pb[t.parentLocale].push({name:e,config:t}),null;return Na[e]=new Aj(Dz(n,t)),pb[e]&&pb[e].forEach(function(i){Fj(i.name,i.config)}),Bp(e),Na[e]}else return delete Na[e],null}function $$e(e,t){if(t!=null){var r,n,i=nbe;Na[e]!=null&&Na[e].parentLocale!=null?Na[e].set(Dz(Na[e]._config,t)):(n=W3(e),n!=null&&(i=n._config),t=Dz(i,t),n==null&&(t.abbr=e),r=new Aj(t),r.parentLocale=Na[e],Na[e]=r),Bp(e)}else Na[e]!=null&&(Na[e].parentLocale!=null?(Na[e]=Na[e].parentLocale,e===Bp()&&Bp(e)):Na[e]!=null&&delete Na[e]);return Na[e]}function wh(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return oC;if(!Mu(e)){if(t=W3(e),t)return t;e=[e]}return q$e(e)}function W$e(){return Mz(Na)}function Bj(e){var t,r=e._a;return r&&In(e).overflow===-2&&(t=r[Rf]<0||r[Rf]>11?Rf:r[md]<1||r[md]>Nj(r[Bs],r[Rf])?md:r[Fo]<0||r[Fo]>24||r[Fo]===24&&(r[Tu]!==0||r[Of]!==0||r[Iv]!==0)?Fo:r[Tu]<0||r[Tu]>59?Tu:r[Of]<0||r[Of]>59?Of:r[Iv]<0||r[Iv]>999?Iv:-1,In(e)._overflowDayOfYear&&(t<Bs||t>md)&&(t=md),In(e)._overflowWeeks&&t===-1&&(t=Xje),In(e)._overflowWeekday&&t===-1&&(t=Zje),In(e).overflow=t),e}var G$e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,K$e=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Y$e=/Z|[+-]\d\d(?::?\d\d)?/,FT=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],J6=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],X$e=/^\/?Date\((-?\d+)/i,Z$e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Q$e={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ibe(e){var t,r,n=e._i,i=G$e.exec(n)||K$e.exec(n),a,o,s,l,c=FT.length,d=J6.length;if(i){for(In(e).iso=!0,t=0,r=c;t<r;t++)if(FT[t][1].exec(i[1])){o=FT[t][0],a=FT[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,r=d;t<r;t++)if(J6[t][1].exec(i[3])){s=(i[2]||" ")+J6[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(Y$e.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=o+(s||"")+(l||""),Hj(e)}else e._isValid=!1}function J$e(e,t,r,n,i,a){var o=[eWe(e),K_e.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function eWe(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function tWe(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function rWe(e,t,r){if(e){var n=ebe.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return In(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function nWe(e,t,r){if(e)return Q$e[e];if(t)return 0;var n=parseInt(r,10),i=n%100,a=(n-i)/100;return a*60+i}function abe(e){var t=Z$e.exec(tWe(e._i)),r;if(t){if(r=J$e(t[4],t[3],t[2],t[5],t[6],t[7]),!rWe(t[1],r,e))return;e._a=r,e._tzm=nWe(t[8],t[9],t[10]),e._d=iC.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),In(e).rfc2822=!0}else e._isValid=!1}function iWe(e){var t=X$e.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(ibe(e),e._isValid===!1)delete e._isValid;else return;if(abe(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:qe.createFromInputFallback(e)}qe.createFromInputFallback=Wc("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function uy(e,t,r){return e??t??r}
vendor: 8,628 bytes, line 37
37function aWe(e){var t=new Date(qe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function zj(e){var t,r,n=[],i,a,o;if(!e._d){for(i=aWe(e),e._w&&e._a[md]==null&&e._a[Rf]==null&&oWe(e),e._dayOfYear!=null&&(o=uy(e._a[Bs],i[Bs]),(e._dayOfYear>fS(o)||e._dayOfYear===0)&&(In(e)._overflowDayOfYear=!0),r=iC(o,0,e._dayOfYear),e._a[Rf]=r.getUTCMonth(),e._a[md]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=i[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Fo]===24&&e._a[Tu]===0&&e._a[Of]===0&&e._a[Iv]===0&&(e._nextDay=!0,e._a[Fo]=0),e._d=(e._useUTC?iC:f$e).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Fo]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(In(e).weekdayMismatch=!0)}}function oWe(e){var t,r,n,i,a,o,s,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,r=uy(t.GG,e._a[Bs],aC(xa(),1,4).year),n=uy(t.W,1),i=uy(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,c=aC(xa(),a,o),r=uy(t.gg,e._a[Bs],c.year),n=uy(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),n<1||n>Uf(r,a,o)?In(e)._overflowWeeks=!0:l!=null?In(e)._overflowWeekday=!0:(s=J_e(r,n,i,a,o),e._a[Bs]=s.year,e._dayOfYear=s.dayOfYear)}qe.ISO_8601=function(){};qe.RFC_2822=function(){};function Hj(e){if(e._f===qe.ISO_8601){ibe(e);return}if(e._f===qe.RFC_2822){abe(e);return}e._a=[],In(e).empty=!0;var t=""+e._i,r,n,i,a,o,s=t.length,l=0,c,d;for(i=U_e(e._f,e._locale).match(Pj)||[],d=i.length,r=0;r<d;r++)a=i[r],n=(t.match(Gje(a,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&In(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),l+=n.length),By[a]?(n?In(e).empty=!1:In(e).unusedTokens.push(a),Yje(a,n,e)):e._strict&&!n&&In(e).unusedTokens.push(a);In(e).charsLeftOver=s-l,t.length>0&&In(e).unusedInput.push(t),e._a[Fo]<=12&&In(e).bigHour===!0&&e._a[Fo]>0&&(In(e).bigHour=void 0),In(e).parsedDateParts=e._a.slice(0),In(e).meridiem=e._meridiem,e._a[Fo]=sWe(e._locale,e._a[Fo],e._meridiem),c=In(e).era,c!==null&&(e._a[Bs]=e._locale.erasConvertYear(c,e._a[Bs])),zj(e),Bj(e)}function sWe(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function lWe(e){var t,r,n,i,a,o,s=!1,l=e._f.length;if(l===0){In(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,t=Tj({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Hj(t),xj(t)&&(o=!0),a+=In(t).charsLeftOver,a+=In(t).unusedTokens.length*10,In(t).score=a,s?a<n&&(n=a,r=t):(n==null||a<n||o)&&(n=a,r=t,o&&(s=!0));Pp(e,r||t)}function cWe(e){if(!e._d){var t=Rj(e._i),r=t.day===void 0?t.date:t.day;e._a=B_e([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),zj(e)}}function uWe(e){var t=new zx(Bj(obe(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function obe(e){var t=e._i,r=e._f;return e._locale=e._locale||wh(e._l),t===null||r===void 0&&t===""?z3({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Lu(t)?new zx(Bj(t)):(Bx(t)?e._d=t:Mu(r)?lWe(e):r?Hj(e):dWe(e),xj(e)||(e._d=null),e))}function dWe(e){var t=e._i;Sl(t)?e._d=new Date(qe.now()):Bx(t)?e._d=new Date(t.valueOf()):typeof t=="string"?iWe(e):Mu(t)?(e._a=B_e(t.slice(0),function(r){return parseInt(r,10)}),zj(e)):Gv(t)?cWe(e):ah(t)?e._d=new Date(t):qe.createFromInputFallback(e)}function sbe(e,t,r,n,i){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Gv(e)&&Cj(e)||Mu(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=r,a._i=e,a._f=t,a._strict=n,uWe(a)}function xa(e,t,r,n){return sbe(e,t,r,n,!1)}var fWe=Wc("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xa.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:z3()}),hWe=Wc("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xa.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:z3()});function lbe(e,t){var r,n;if(t.length===1&&Mu(t[0])&&(t=t[0]),!t.length)return xa();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function pWe(){var e=[].slice.call(arguments,0);return lbe("isBefore",e)}function mWe(){var e=[].slice.call(arguments,0);return lbe("isAfter",e)}var vWe=function(){return Date.now?Date.now():+new Date},mb=["year","quarter","month","week","day","hour","minute","second","millisecond"];function gWe(e){var t,r=!1,n,i=mb.length;for(t in e)if(wi(e,t)&&!(uo.call(mb,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<i;++n)if(e[mb[n]]){if(r)return!1;parseFloat(e[mb[n]])!==ti(e[mb[n]])&&(r=!0)}return!0}function yWe(){return this._isValid}function _We(){return zu(NaN)}function G3(e){var t=Rj(e),r=t.year||0,n=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=gWe(t),this._milliseconds=+d+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+n*3+r*12,this._data={},this._locale=wh(),this._bubble()}function DP(e){return e instanceof G3}function Fz(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function bWe(e,t,r){var n=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<n;o++)ti(e[o])!==ti(t[o])&&a++;return a+i}function cbe(e,t){jr(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Ld(~~(r/60),2)+t+Ld(~~r%60,2)})}cbe("Z",":");cbe("ZZ","");kr("Z",j3);kr("ZZ",j3);sa(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Uj(j3,e)});var EWe=/([\+\-]|\d\d)/gi;function Uj(e,t){var r=(t||"").match(e),n,i,a;return r===null?null:(n=r[r.length-1]||[],i=(n+"").match(EWe)||["-",0,0],a=+(i[1]*60)+ti(i[2]),a===0?0:i[0]==="+"?a:-a)}function Vj(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Lu(e)||Bx(e)?e.valueOf():xa(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),qe.updateOffset(r,!1),r):xa(e).local()}function Bz(e){return-Math.round(e._d.getTimezoneOffset())}qe.updateOffset=function(){};function wWe(e,t,r){var n=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Uj(j3,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(i=Bz(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),n!==e&&(!t||this._changeInProgress?fbe(this,zu(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,qe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Bz(this)}function SWe(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function CWe(e){return this.utcOffset(0,e)}function xWe(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bz(this),"m")),this}function TWe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Uj($je,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function AWe(e){return this.isValid()?(e=e?xa(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function PWe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function RWe(){if(!Sl(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Tj(e,this),e=obe(e),e._a?(t=e._isUTC?jd(e._a):xa(e._a),this._isDSTShifted=this.isValid()&&bWe(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function OWe(){return this.isValid()?!this._isUTC:!1}function IWe(){return this.isValid()?this._isUTC:!1}function ube(){return this.isValid()?this._isUTC&&this._offset===0:!1}var kWe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,NWe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zu(e,t){var r=e,n=null,i,a,o;return DP(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ah(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=kWe.exec(e))?(i=n[1]==="-"?-1:1,r={y:0,d:ti(n[md])*i,h:ti(n[Fo])*i,m:ti(n[Tu])*i,s:ti(n[Of])*i,ms:ti(Fz(n[Iv]*1e3))*i}):(n=NWe.exec(e))?(i=n[1]==="-"?-1:1,r={y:dv(n[2],i),M:dv(n[3],i),w:dv(n[4],i),d:dv(n[5],i),h:dv(n[6],i),m:dv(n[7],i),s:dv(n[8],i)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=DWe(xa(r.from),xa(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),a=new G3(r),DP(e)&&wi(e,"_locale")&&(a._locale=e._locale),DP(e)&&wi(e,"_isValid")&&(a._isValid=e._isValid),a}zu.fn=G3.prototype;
vendor: 20,474 bytes, line 37
37zu.invalid=_We;function dv(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function ore(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function DWe(e,t){var r;return e.isValid()&&t.isValid()?(t=Vj(t,e),e.isBefore(t)?r=ore(e,t):(r=ore(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function dbe(e,t){return function(r,n){var i,a;return n!==null&&!isNaN(+n)&&(H_e(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),i=zu(r,n),fbe(this,i,e),this}}function fbe(e,t,r,n){var i=t._milliseconds,a=Fz(t._days),o=Fz(t._months);e.isValid()&&(n=n??!0,o&&X_e(e,nC(e,"Month")+o*r),a&&G_e(e,"Date",nC(e,"Date")+a*r),i&&e._d.setTime(e._d.valueOf()+i*r),n&&qe.updateOffset(e,a||o))}var MWe=dbe(1,"add"),LWe=dbe(-1,"subtract");function hbe(e){return typeof e=="string"||e instanceof String}function FWe(e){return Lu(e)||Bx(e)||hbe(e)||ah(e)||zWe(e)||BWe(e)||e===null||e===void 0}function BWe(e){var t=Gv(e)&&!Cj(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=n.length;for(i=0;i<o;i+=1)a=n[i],r=r||wi(e,a);return t&&r}function zWe(e){var t=Mu(e),r=!1;return t&&(r=e.filter(function(n){return!ah(n)&&hbe(e)}).length===0),t&&r}function HWe(e){var t=Gv(e)&&!Cj(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<n.length;i+=1)a=n[i],r=r||wi(e,a);return t&&r}function UWe(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function VWe(e,t){arguments.length===1&&(arguments[0]?FWe(arguments[0])?(e=arguments[0],t=void 0):HWe(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||xa(),n=Vj(r,this).startOf("day"),i=qe.calendarFormat(this,n)||"sameElse",a=t&&($d(t[i])?t[i].call(this,r):t[i]);return this.format(a||this.localeData().calendar(i,this,xa(r)))}function qWe(){return new zx(this)}function jWe(e,t){var r=Lu(e)?e:xa(e);return this.isValid()&&r.isValid()?(t=Gc(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function $We(e,t){var r=Lu(e)?e:xa(e);return this.isValid()&&r.isValid()?(t=Gc(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function WWe(e,t,r,n){var i=Lu(e)?e:xa(e),a=Lu(t)?t:xa(t);return this.isValid()&&i.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(i,r):!this.isBefore(i,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function GWe(e,t){var r=Lu(e)?e:xa(e),n;return this.isValid()&&r.isValid()?(t=Gc(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function KWe(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function YWe(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function XWe(e,t,r){var n,i,a;if(!this.isValid())return NaN;if(n=Vj(e,this),!n.isValid())return NaN;switch(i=(n.utcOffset()-this.utcOffset())*6e4,t=Gc(t),t){case"year":a=MP(this,n)/12;break;case"month":a=MP(this,n);break;case"quarter":a=MP(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-i)/864e5;break;case"week":a=(this-n-i)/6048e5;break;default:a=this-n}return r?a:Oc(a)}function MP(e,t){if(e.date()<t.date())return-MP(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),i,a;return t-n<0?(i=e.clone().add(r-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(r+1,"months"),a=(t-n)/(i-n)),-(r+a)||0}qe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";qe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ZWe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function QWe(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?NP(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$d(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",NP(r,"Z")):NP(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function JWe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+i+a)}function eGe(e){e||(e=this.isUtc()?qe.defaultFormatUtc:qe.defaultFormat);var t=NP(this,e);return this.localeData().postformat(t)}function tGe(e,t){return this.isValid()&&(Lu(e)&&e.isValid()||xa(e).isValid())?zu({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rGe(e){return this.from(xa(),e)}function nGe(e,t){return this.isValid()&&(Lu(e)&&e.isValid()||xa(e).isValid())?zu({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function iGe(e){return this.to(xa(),e)}function pbe(e){var t;return e===void 0?this._locale._abbr:(t=wh(e),t!=null&&(this._locale=t),this)}var mbe=Wc("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function vbe(){return this._locale}var QR=1e3,zy=60*QR,JR=60*zy,gbe=(365*400+97)*24*JR;function Hy(e,t){return(e%t+t)%t}function ybe(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-gbe:new Date(e,t,r).valueOf()}function _be(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-gbe:Date.UTC(e,t,r)}function aGe(e){var t,r;if(e=Gc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?_be:ybe,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Hy(t+(this._isUTC?0:this.utcOffset()*zy),JR);break;case"minute":t=this._d.valueOf(),t-=Hy(t,zy);break;case"second":t=this._d.valueOf(),t-=Hy(t,QR);break}return this._d.setTime(t),qe.updateOffset(this,!0),this}function oGe(e){var t,r;if(e=Gc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?_be:ybe,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=JR-Hy(t+(this._isUTC?0:this.utcOffset()*zy),JR)-1;break;case"minute":t=this._d.valueOf(),t+=zy-Hy(t,zy)-1;break;case"second":t=this._d.valueOf(),t+=QR-Hy(t,QR)-1;break}return this._d.setTime(t),qe.updateOffset(this,!0),this}function sGe(){return this._d.valueOf()-(this._offset||0)*6e4}function lGe(){return Math.floor(this.valueOf()/1e3)}function cGe(){return new Date(this.valueOf())}function uGe(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function dGe(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function fGe(){return this.isValid()?this.toISOString():null}function hGe(){return xj(this)}function pGe(){return Pp({},In(this))}function mGe(){return In(this).overflow}function vGe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}jr("N",0,0,"eraAbbr");jr("NN",0,0,"eraAbbr");jr("NNN",0,0,"eraAbbr");jr("NNNN",0,0,"eraName");jr("NNNNN",0,0,"eraNarrow");jr("y",["y",1],"yo","eraYear");jr("y",["yy",2],0,"eraYear");jr("y",["yyy",3],0,"eraYear");jr("y",["yyyy",4],0,"eraYear");kr("N",qj);kr("NN",qj);kr("NNN",qj);kr("NNNN",AGe);kr("NNNNN",PGe);sa(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?In(r).era=i:In(r).invalidEra=e});kr("y",b_);kr("yy",b_);kr("yyy",b_);kr("yyyy",b_);kr("yo",RGe);sa(["y","yy","yyy","yyyy"],Bs);sa(["yo"],function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Bs]=r._locale.eraYearOrdinalParse(e,i):t[Bs]=parseInt(e,10)});function gGe(e,t){var r,n,i,a=this._eras||wh("en")._eras;for(r=0,n=a.length;r<n;++r)switch(typeof a[r].since==="string"&&(i=qe(a[r].since).startOf("day"),a[r].since=i.valueOf()),typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":i=qe(a[r].until).startOf("day").valueOf(),a[r].until=i.valueOf();break}return a}function yGe(e,t,r){var n,i,a=this.eras(),o,s,l;for(e=e.toUpperCase(),n=0,i=a.length;n<i;++n)if(o=a[n].name.toUpperCase(),s=a[n].abbr.toUpperCase(),l=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return a[n];break;case"NNNN":if(o===e)return a[n];break;case"NNNNN":if(l===e)return a[n];break}else if([o,s,l].indexOf(e)>=0)return a[n]}function _Ge(e,t){var r=e.since<=e.until?1:-1;return t===void 0?qe(e.since).year():qe(e.since).year()+(t-e.offset)*r}function bGe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function EGe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function wGe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function SGe(){var e,t,r,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(r=i[e].since<=i[e].until?1:-1,n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return(this.year()-qe(i[e].since).year())*r+i[e].offset;return this.year()}function CGe(e){return wi(this,"_erasNameRegex")||jj.call(this),e?this._erasNameRegex:this._erasRegex}function xGe(e){return wi(this,"_erasAbbrRegex")||jj.call(this),e?this._erasAbbrRegex:this._erasRegex}function TGe(e){return wi(this,"_erasNarrowRegex")||jj.call(this),e?this._erasNarrowRegex:this._erasRegex}function qj(e,t){return t.erasAbbrRegex(e)}function AGe(e,t){return t.erasNameRegex(e)}function PGe(e,t){return t.erasNarrowRegex(e)}function RGe(e,t){return t._eraYearOrdinalRegex||b_}function jj(){var e=[],t=[],r=[],n=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=Hf(c[i].name),s=Hf(c[i].abbr),l=Hf(c[i].narrow),t.push(o),e.push(s),r.push(l),n.push(o),n.push(s),n.push(l);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}jr(0,["gg",2],0,function(){return this.weekYear()%100});jr(0,["GG",2],0,function(){return this.isoWeekYear()%100});function K3(e,t){jr(0,[e,e.length],0,t)}K3("gggg","weekYear");K3("ggggg","weekYear");K3("GGGG","isoWeekYear");K3("GGGGG","isoWeekYear");kr("G",q3);kr("g",q3);kr("GG",Pa,mc);kr("gg",Pa,mc);kr("GGGG",Ij,Oj);kr("gggg",Ij,Oj);kr("GGGGG",V3,H3);kr("ggggg",V3,H3);Ux(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=ti(e)});Ux(["gg","GG"],function(e,t,r,n){t[n]=qe.parseTwoDigitYear(e)});function OGe(e){return bbe.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function IGe(e){return bbe.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function kGe(){return Uf(this.year(),1,4)}function NGe(){return Uf(this.isoWeekYear(),1,4)}function DGe(){var e=this.localeData()._week;return Uf(this.year(),e.dow,e.doy)}function MGe(){var e=this.localeData()._week;return Uf(this.weekYear(),e.dow,e.doy)}function bbe(e,t,r,n,i){var a;return e==null?aC(this,n,i).year:(a=Uf(e,n,i),t>a&&(t=a),LGe.call(this,e,t,r,n,i))}function LGe(e,t,r,n,i){var a=J_e(e,t,r,n,i),o=iC(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}jr("Q",0,"Qo","quarter");kr("Q",V_e);sa("Q",function(e,t){t[Rf]=(ti(e)-1)*3});function FGe(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}jr("D",["DD",2],"Do","date");kr("D",Pa,E_);kr("DD",Pa,mc);kr("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});sa(["D","DD"],md);sa("Do",function(e,t){t[md]=ti(e.match(Pa)[0])});var Ebe=w_("Date",!0);jr("DDD",["DDDD",3],"DDDo","dayOfYear");kr("DDD",U3);kr("DDDD",q_e);sa(["DDD","DDDD"],function(e,t,r){r._dayOfYear=ti(e)});function BGe(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}jr("m",["mm",2],0,"minute");kr("m",Pa,kj);kr("mm",Pa,mc);sa(["m","mm"],Tu);var zGe=w_("Minutes",!1);jr("s",["ss",2],0,"second");kr("s",Pa,kj);kr("ss",Pa,mc);sa(["s","ss"],Of);var HGe=w_("Seconds",!1);jr("S",0,0,function(){return~~(this.millisecond()/100)});jr(0,["SS",2],0,function(){return~~(this.millisecond()/10)});jr(0,["SSS",3],0,"millisecond");jr(0,["SSSS",4],0,function(){return this.millisecond()*10});jr(0,["SSSSS",5],0,function(){return this.millisecond()*100});jr(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});jr(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});jr(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});jr(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});kr("S",U3,V_e);kr("SS",U3,mc);kr("SSS",U3,q_e);var Rp,wbe;for(Rp="SSSS";Rp.length<=9;Rp+="S")kr(Rp,b_);function UGe(e,t){t[Iv]=ti(("0."+e)*1e3)}for(Rp="S";Rp.length<=9;Rp+="S")sa(Rp,UGe);wbe=w_("Milliseconds",!1);jr("z",0,0,"zoneAbbr");jr("zz",0,0,"zoneName");function VGe(){return this._isUTC?"UTC":""}function qGe(){return this._isUTC?"Coordinated Universal Time":""}var or=zx.prototype;or.add=MWe;or.calendar=VWe;or.clone=qWe;or.diff=XWe;or.endOf=oGe;or.format=eGe;or.from=tGe;or.fromNow=rGe;or.to=nGe;or.toNow=iGe;or.get=Jje;or.invalidAt=mGe;or.isAfter=jWe;or.isBefore=$We;or.isBetween=WWe;or.isSame=GWe;or.isSameOrAfter=KWe;or.isSameOrBefore=YWe;or.isValid=hGe;or.lang=mbe;or.locale=pbe;or.localeData=vbe;or.max=hWe;or.min=fWe;or.parsingFlags=pGe;or.set=e$e;or.startOf=aGe;or.subtract=LWe;or.toArray=uGe;or.toObject=dGe;or.toDate=cGe;or.toISOString=QWe;or.inspect=JWe;typeof Symbol<"u"&&Symbol.for!=null&&(or[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});or.toJSON=fGe;or.toString=ZWe;or.unix=lGe;or.valueOf=sGe;or.creationData=vGe;or.eraName=bGe;or.eraNarrow=EGe;or.eraAbbr=wGe;or.eraYear=SGe;or.year=W_e;or.isLeapYear=Qje;or.weekYear=OGe;or.isoWeekYear=IGe;or.quarter=or.quarters=FGe;or.month=Z_e;or.daysInMonth=c$e;or.week=or.weeks=g$e;or.isoWeek=or.isoWeeks=y$e;or.weeksInYear=DGe;or.weeksInWeekYear=MGe;or.isoWeeksInYear=kGe;or.isoWeeksInISOWeekYear=NGe;or.date=Ebe;or.day=or.days=I$e;or.weekday=k$e;or.isoWeekday=N$e;or.dayOfYear=BGe;or.hour=or.hours=H$e;or.minute=or.minutes=zGe;or.second=or.seconds=HGe;or.millisecond=or.milliseconds=wbe;or.utcOffset=wWe;or.utc=CWe;or.local=xWe;or.parseZone=TWe;or.hasAlignedHourOffset=AWe;or.isDST=PWe;or.isLocal=OWe;or.isUtcOffset=IWe;or.isUtc=ube;or.isUTC=ube;or.zoneAbbr=VGe;or.zoneName=qGe;or.dates=Wc("dates accessor is deprecated. Use date instead.",Ebe);or.months=Wc("months accessor is deprecated. Use month instead",Z_e);or.years=Wc("years accessor is deprecated. Use year instead",W_e);or.zone=Wc("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",SWe);or.isDSTShifted=Wc("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",RWe);function jGe(e){return xa(e*1e3)}function $Ge(){return xa.apply(null,arguments).parseZone()}function Sbe(e){return e}var Si=Aj.prototype;Si.calendar=Oje;Si.longDateFormat=Dje;Si.invalidDate=Lje;Si.ordinal=zje;Si.preparse=Sbe;Si.postformat=Sbe;Si.relativeTime=Uje;Si.pastFuture=Vje;Si.set=Pje;Si.eras=gGe;Si.erasParse=yGe;Si.erasConvertYear=_Ge;Si.erasAbbrRegex=xGe;Si.erasNameRegex=CGe;Si.erasNarrowRegex=TGe;Si.months=a$e;Si.monthsShort=o$e;Si.monthsParse=l$e;Si.monthsRegex=d$e;Si.monthsShortRegex=u$e;Si.week=h$e;Si.firstDayOfYear=v$e;Si.firstDayOfWeek=m$e;Si.weekdays=T$e;Si.weekdaysMin=P$e;Si.weekdaysShort=A$e;Si.weekdaysParse=O$e;Si.weekdaysRegex=D$e;Si.weekdaysShortRegex=M$e;Si.weekdaysMinRegex=L$e;Si.isPM=B$e;Si.meridiem=U$e;function eO(e,t,r,n){var i=wh(),a=jd().set(n,t);return i[r](a,e)}function Cbe(e,t,r){if(ah(e)&&(t=e,e=void 0),e=e||"",t!=null)return eO(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=eO(e,n,r,"month");return i}function $j(e,t,r,n){typeof e=="boolean"?(ah(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ah(t)&&(r=t,t=void 0),t=t||"");var i=wh(),a=e?i._week.dow:0,o,s=[];if(r!=null)return eO(t,(r+a)%7,n,"day");for(o=0;o<7;o++)s[o]=eO(t,(o+a)%7,n,"day");return s}function WGe(e,t){return Cbe(e,t,"months")}function GGe(e,t){return Cbe(e,t,"monthsShort")}function KGe(e,t,r){return $j(e,t,r,"weekdays")}function YGe(e,t,r){return $j(e,t,r,"weekdaysShort")}function XGe(e,t,r){return $j(e,t,r,"weekdaysMin")}Bp("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=ti(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});qe.lang=Wc("moment.lang is deprecated. Use moment.locale instead.",Bp);qe.langData=Wc("moment.langData is deprecated. Use moment.localeData instead.",wh);var yf=Math.abs;function ZGe(){var e=this._data;return this._milliseconds=yf(this._milliseconds),this._days=yf(this._days),this._months=yf(this._months),e.milliseconds=yf(e.milliseconds),e.seconds=yf(e.seconds),e.minutes=yf(e.minutes),e.hours=yf(e.hours),e.months=yf(e.months),e.years=yf(e.years),this}function xbe(e,t,r,n){var i=zu(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function QGe(e,t){return xbe(this,e,t,1)}function JGe(e,t){return xbe(this,e,t,-1)}function sre(e){return e<0?Math.floor(e):Math.ceil(e)}function eKe(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,i,a,o,s,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=sre(zz(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,i=Oc(e/1e3),n.seconds=i%60,a=Oc(i/60),n.minutes=a%60,o=Oc(a/60),n.hours=o%24,t+=Oc(o/24),l=Oc(Tbe(t)),r+=l,t-=sre(zz(l)),s=Oc(r/12),r%=12,n.days=t,n.months=r,n.years=s,this}function Tbe(e){return e*4800/146097}function zz(e){return e*146097/4800}function tKe(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Gc(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Tbe(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(zz(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Sh(e){return function(){return this.as(e)}}var Abe=Sh("ms"),rKe=Sh("s"),nKe=Sh("m"),iKe=Sh("h"),aKe=Sh("d"),oKe=Sh("w"),sKe=Sh("M"),lKe=Sh("Q"),cKe=Sh("y"),uKe=Abe;function dKe(){return zu(this)}function fKe(e){return e=Gc(e),this.isValid()?this[e+"s"]():NaN}function t0(e){return function(){return this.isValid()?this._data[e]:NaN}}var hKe=t0("milliseconds"),pKe=t0("seconds"),mKe=t0("minutes"),vKe=t0("hours"),g
37Ke=t0("days"),yKe=t0("months"),_Ke=t0("years");function bKe(){return Oc(this.days()/7)}var xf=Math.round,by={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function EKe(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function wKe(e,t,r,n){var i=zu(e).abs(),a=xf(i.as("s")),o=xf(i.as("m")),s=xf(i.as("h")),l=xf(i.as("d")),c=xf(i.as("M")),d=xf(i.as("w")),f=xf(i.as("y")),h=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||o<=1&&["m"]||o<r.m&&["mm",o]||s<=1&&["h"]||s<r.h&&["hh",s]||l<=1&&["d"]||l<r.d&&["dd",l];return r.w!=null&&(h=h||d<=1&&["w"]||d<r.w&&["ww",d]),h=h||c<=1&&["M"]||c<r.M&&["MM",c]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=n,EKe.apply(null,h)}function SKe(e){return e===void 0?xf:typeof e=="function"?(xf=e,!0):!1}function CKe(e,t){return by[e]===void 0?!1:t===void 0?by[e]:(by[e]=t,e==="s"&&(by.ss=t-1),!0)}function xKe(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=by,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},by,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),i=this.localeData(),a=wKe(this,!r,n,i),r&&(a=i.pastFuture(+this,a)),i.postformat(a)}var eM=Math.abs;function B0(e){return(e>0)-(e<0)||+e}function Y3(){if(!this.isValid())return this.localeData().invalidDate();var e=eM(this._milliseconds)/1e3,t=eM(this._days),r=eM(this._months),n,i,a,o,s=this.asSeconds(),l,c,d,f;return s?(n=Oc(e/60),i=Oc(n/60),e%=60,n%=60,a=Oc(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=B0(this._months)!==B0(s)?"-":"",d=B0(this._days)!==B0(s)?"-":"",f=B0(this._milliseconds)!==B0(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(r?c+r+"M":"")+(t?d+t+"D":"")+(i||n||e?"T":"")+(i?f+i+"H":"")+(n?f+n+"M":"")+(e?f+o+"S":"")):"P0D"}var ui=G3.prototype;ui.isValid=yWe;ui.abs=ZGe;ui.add=QGe;ui.subtract=JGe;ui.as=tKe;ui.asMilliseconds=Abe;ui.asSeconds=rKe;ui.asMinutes=nKe;ui.asHours=iKe;ui.asDays=aKe;ui.asWeeks=oKe;ui.asMonths=sKe;ui.asQuarters=lKe;ui.asYears=cKe;ui.valueOf=uKe;ui._bubble=eKe;ui.clone=dKe;ui.get=fKe;ui.milliseconds=hKe;ui.seconds=pKe;ui.minutes=mKe;ui.hours=vKe;ui.days=gKe;ui.weeks=bKe;ui.months=yKe;ui.years=_Ke;ui.humanize=xKe;ui.toISOString=Y3;ui.toString=Y3;ui.toJSON=Y3;ui.locale=pbe;ui.localeData=vbe;ui.toIsoString=Wc("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Y3);ui.lang=mbe;jr("X",0,0,"unix");jr("x",0,0,"valueOf");kr("x",q3);kr("X",Wje);sa("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});sa("x",function(e,t,r){r._d=new Date(ti(e))});qe.version="2.30.1";Tje(xa);qe.fn=or;qe.min=pWe;qe.max=mWe;qe.now=vWe;qe.utc=jd;qe.unix=jGe;qe.months=WGe;qe.isDate=Bx;qe.locale=Bp;qe.invalid=z3;qe.duration=zu;qe.isMoment=Lu;qe.weekdays=KGe;qe.parseZone=$Ge;qe.localeData=wh;qe.isDuration=DP;qe.monthsShort=GGe;qe.weekdaysMin=XGe;qe.defineLocale=Fj;qe.updateLocale=$$e;qe.locales=W$e;qe.weekdaysShort=YGe;qe.normalizeUnits=Gc;qe.relativeTimeRounding=SKe;qe.relativeTimeThreshold=CKe;qe.calendarFormat=UWe;qe.prototype=or;qe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const xer=Object.freeze(Object.defineProperty({__proto__:null,default:qe},Symbol.toStringTag,{value:"Module"})),Pbe="[GLOBAL COMPANY] GET COMPANY";function Wj(e){return(t,r)=>{const n=r().auth.user.activeCompany.id;return ht.get(`/api/v2/user/companies/${n}`).then(a=>{if(a.status===200&&a.data.status!==500){const o=qe(),s=qe(a.data.server_timestamp),l=qe.duration(o.diff(s)).asSeconds();t({type:Pbe,payload:{...a.data,timeCorrection:l}})}else t(oh())}).catch(()=>t(oh())).finally(()=>{})}}function Ter(e){return async(t,r)=>{const n=r().auth.user.activeCompany.id,i=await ht.put(`/api/v1/user/companies/${n}`,{company:e});if(i.status===200&&i.data.status!==500)return await t(Wj()),i.data;throw Error(i.data.message)}}const TKe="[NAVIGATION] GET NAVIGATION",Rbe="[NAVIGATION] SET NAVIGATION",AKe="[NAVIGATION] RESET NAVIGATION";function Aer(e,t){return(r,n)=>{const{navigation:i}=n().fuse;return r({type:Rbe,navigation:me.updateNavItem(i,e,t)})}}const PKe="[NAVBAR] OPEN FOLDED",RKe="[NAVBAR] CLOSE FOLDED",OKe="[NAVBAR] TOGGLE FOLDED",Obe="[NAVBAR] TOGGLE MOBILE",IKe="[NAVBAR] OPEN MOBILE",kKe="[NAVBAR] CLOSE MOBILE";function Per(){return{type:Obe}}const Ibe="[MESSAGE] CLOSE",kbe="[MESSAGE] SHOW";function lre(){return{type:Ibe}}function kl(e){return{type:kbe,options:e}}function Nbe(e){return t=>{t(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:1800,message:e||"Salvo com sucesso",variant:"success"}))}}function oh(e){return t=>{t(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:1800,message:e||"Erro ao salvar as informações",variant:"error"}))}}function Rer(){return e=>{e(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:1800,message:"Erro ao obter as informações",variant:"error"}))}}const Dbe="[DIALOG] OPEN MESSAGE DIALOG",Mbe="[DIALOG] CLOSE  MESSAGE DIALOG";function Oer(e){return{type:Dbe,options:e}}function NKe(){return{type:Mbe}}const DKe="[DIALOG] OPEN NEW RELEASES DIALOG",MKe="[DIALOG] CLOSE NEW RELEASES DIALOG";var tM={exports:{}},rM,cre;function LKe(){if(cre)return rM;cre=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rM=e,rM}var nM,ure;function FKe(){if(ure)return nM;ure=1;var e=LKe();function t(){}function r(){}return r.resetWarningCache=t,nM=function(){function n(o,s,l,c,d,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},nM}var dre;function BKe(){return dre||(dre=1,tM.exports=FKe()()),tM.exports}var Av=BKe();const xe=et(Av);var sh=u.createContext(null);function zKe(e){e()}var Lbe=zKe,HKe=function(t){return Lbe=t},UKe=function(){return Lbe};function VKe(){var e=UKe(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=t;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=r={callback:i,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){!a||t===null||(a=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var fre={notify:function(){},get:function(){return[]}};function Gj(e,t){var r,n=fre;function i(f){return l(),n.subscribe(f)}function a(){n.notify()}function o(){d.onStateChange&&d.onStateChange()}function s(){return!!r}function l(){r||(r=t?t.addNestedSub(o):e.subscribe(o),n=VKe())}function c(){r&&(r(),r=void 0,n.clear(),n=fre)}var d={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:function(){return n}};return d}var tO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function qKe(e){var t=e.store,r=e.context,n=e.children,i=x.useMemo(function(){var s=Gj(t);return{store:t,subscription:s}},[t]),a=x.useMemo(function(){return t.getState()},[t]);tO(function(){var s=i.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==t.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[i,a]);var o=r||sh;return u.createElement(o.Provider,{value:i},n)}function Yr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iM={exports:{}},ta={},hre;function jKe(){if(hre)return ta;hre=1;var e=60103,t=60106,r=60107,n=60108,i=60114,a=60109,o=60110,s=60112,l=60113,c=60120,d=60115,f=60116,h=60121,p=60122,g=60117,_=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),r=E("react.fragment"),n=E("react.strict_mode"),i=E("react.profiler"),a=E("react.provider"),o=E("react.context"),s=E("react.forward_ref"),l=E("react.suspense"),c=E("react.suspense_list"),d=E("react.memo"),f=E("react.lazy"),h=E("react.block"),p=E("react.server.block"),g=E("react.fundamental"),_=E("react.debug_trace_mode"),b=E("react.legacy_hidden")}function S(X){if(typeof X=="object"&&X!==null){var re=X.$$typeof;switch(re){case e:switch(X=X.type,X){case r:case i:case n:case l:case c:return X;default:switch(X=X&&X.$$typeof,X){case o:case s:case f:case d:case a:return X;default:return re}}case t:return re}}}var P=a,O=e,I=s,N=r,M=f,F=d,B=t,V=i,W=n,$=l;return ta.ContextConsumer=o,ta.ContextProvider=P,ta.Element=O,ta.ForwardRef=I,ta.Fragment=N,ta.Lazy=M,ta.Memo=F,ta.Portal=B,ta.Profiler=V,ta.StrictMode=W,ta.Suspense=$,ta.isAsyncMode=function(){return!1},ta.isConcurrentMode=function(){return!1},ta.isContextConsumer=function(X){return S(X)===o},ta.isContextProvider=function(X){return S(X)===a},ta.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===e},ta.isForwardRef=function(X){return S(X)===s},ta.isFragment=function(X){return S(X)===r},ta.isLazy=function(X){return S(X)===f},ta.isMemo=function(X){return S(X)===d},ta.isPortal=function(X){return S(X)===t},ta.isProfiler=function(X){return S(X)===i},ta.isStrictMode=function(X){return S(X)===n},ta.isSuspense=function(X){return S(X)===l},ta.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===r||X===i||X===_||X===n||X===l||X===c||X===b||typeof X=="object"&&X!==null&&(X.$$typeof===f||X.$$typeof===d||X.$$typeof===a||X.$$typeof===o||X.$$typeof===s||X.$$typeof===g||X.$$typeof===h||X[0]===p)},ta.typeOf=S,ta}var pre;function $Ke(){return pre||(pre=1,iM.exports=jKe()),iM.exports}var Hz=$Ke(),WKe=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],GKe=["reactReduxForwardedRef"],KKe=[],YKe=[null,
37null];function XKe(e,t){var r=e[1];return[t.payload,r+1]}function mre(e,t,r){tO(function(){return e.apply(void 0,t)},r)}function ZKe(e,t,r,n,i,a,o){e.current=n,t.current=i,r.current=!1,a.current&&(a.current=null,o())}function QKe(e,t,r,n,i,a,o,s,l,c){if(e){var d=!1,f=null,h=function(){if(!d){var _=t.getState(),b,E;try{b=n(_,i.current)}catch(S){E=S,f=S}E||(f=null),b===a.current?o.current||l():(a.current=b,s.current=b,o.current=!0,c({type:"STORE_UPDATED",payload:{error:E}}))}};r.onStateChange=h,r.trySubscribe(),h();var p=function(){if(d=!0,r.tryUnsubscribe(),r.onStateChange=null,f)throw f};return p}}var JKe=function(){return[null,0]};function eYe(e,t){t===void 0&&(t={});var r=t,n=r.getDisplayName,i=n===void 0?function(P){return"ConnectAdvanced("+P+")"}:n,a=r.methodName,o=a===void 0?"connectAdvanced":a,s=r.renderCountProp,l=s===void 0?void 0:s,c=r.shouldHandleStateChanges,d=c===void 0?!0:c,f=r.storeKey,h=f===void 0?"store":f;r.withRef;var p=r.forwardRef,g=p===void 0?!1:p,_=r.context,b=_===void 0?sh:_,E=Yr(r,WKe),S=b;return function(O){var I=O.displayName||O.name||"Component",N=i(I),M=ve({},E,{getDisplayName:i,methodName:o,renderCountProp:l,shouldHandleStateChanges:d,storeKey:h,displayName:N,wrappedComponentName:I,WrappedComponent:O}),F=E.pure;function B(re){return e(re.dispatch,M)}var V=F?x.useMemo:function(re){return re()};function W(re){var ae=x.useMemo(function(){var Et=re.reactReduxForwardedRef,Yt=Yr(re,GKe);return[re.context,Et,Yt]},[re]),Q=ae[0],ie=ae[1],le=ae[2],fe=x.useMemo(function(){return Q&&Q.Consumer&&Hz.isContextConsumer(u.createElement(Q.Consumer,null))?Q:S},[Q,S]),de=x.useContext(fe),ge=!!re.store&&!!re.store.getState&&!!re.store.dispatch;de&&de.store;var Ae=ge?re.store:de.store,Fe=x.useMemo(function(){return B(Ae)},[Ae]),Pe=x.useMemo(function(){if(!d)return YKe;var Et=Gj(Ae,ge?null:de.subscription),Yt=Et.notifyNestedSubs.bind(Et);return[Et,Yt]},[Ae,ge,de]),ce=Pe[0],pe=Pe[1],Ne=x.useMemo(function(){return ge?de:ve({},de,{subscription:ce})},[ge,de,ce]),De=x.useReducer(XKe,KKe,JKe),Ve=De[0],Ke=Ve[0],Qe=De[1];if(Ke&&Ke.error)throw Ke.error;var Ue=x.useRef(),ut=x.useRef(le),We=x.useRef(),ke=x.useRef(!1),Le=V(function(){return We.current&&le===ut.current?We.current:Fe(Ae.getState(),le)},[Ae,Ke,le]);mre(ZKe,[ut,Ue,ke,le,Le,We,pe]),mre(QKe,[d,Ae,ce,Fe,ut,Ue,ke,We,pe,Qe],[Ae,ce,Fe]);var Be=x.useMemo(function(){return u.createElement(O,ve({},Le,{ref:ie}))},[ie,O,Le]),Ze=x.useMemo(function(){return d?u.createElement(fe.Provider,{value:Ne},Be):Be},[fe,Be,Ne]);return Ze}var $=F?u.memo(W):W;if($.WrappedComponent=O,$.displayName=W.displayName=N,g){var X=u.forwardRef(function(ae,Q){return u.createElement($,ve({},ae,{reactReduxForwardedRef:Q}))});return X.displayName=N,X.WrappedComponent=O,cg(X,O)}return cg($,O)}}function vre(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function LP(e,t){if(vre(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!vre(e[r[i]],t[r[i]]))return!1;return!0}function tYe(e,t){var r={},n=function(o){var s=e[o];typeof s=="function"&&(r[o]=function(){return t(s.apply(void 0,arguments))})};for(var i in e)n(i);return r}function Kj(e){return function(r,n){var i=e(r,n);function a(){return i}return a.dependsOnOwnProps=!1,a}}function gre(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function Fbe(e,t){return function(n,i){i.displayName;var a=function(s,l){return a.dependsOnOwnProps?a.mapToProps(s,l):a.mapToProps(s)};return a.dependsOnOwnProps=!0,a.mapToProps=function(s,l){a.mapToProps=e,a.dependsOnOwnProps=gre(e);var c=a(s,l);return typeof c=="function"&&(a.mapToProps=c,a.dependsOnOwnProps=gre(c),c=a(s,l)),c},a}}function rYe(e){return typeof e=="function"?Fbe(e):void 0}function nYe(e){return e?void 0:Kj(function(t){return{dispatch:t}})}function iYe(e){return e&&typeof e=="object"?Kj(function(t){return tYe(e,t)}):void 0}const aYe=[rYe,nYe,iYe];function oYe(e){return typeof e=="function"?Fbe(e):void 0}function sYe(e){return e?void 0:Kj(function(){return{}})}const lYe=[oYe,sYe];function cYe(e,t,r){return ve({},r,e,t)}function uYe(e){return function(r,n){n.displayName;var i=n.pure,a=n.areMergedPropsEqual,o=!1,s;return function(c,d,f){var h=e(c,d,f);return o?(!i||!a(h,s))&&(s=h):(o=!0,s=h),s}}}function dYe(e){return typeof e=="function"?uYe(e):void 0}function fYe(e){return e?void 0:function(){return cYe}}const hYe=[dYe,fYe];
37var pYe=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function mYe(e,t,r,n){return function(a,o){return r(e(a,o),t(n,o),o)}}function vYe(e,t,r,n,i){var a=i.areStatesEqual,o=i.areOwnPropsEqual,s=i.areStatePropsEqual,l=!1,c,d,f,h,p;function g(P,O){return c=P,d=O,f=e(c,d),h=t(n,d),p=r(f,h,d),l=!0,p}function _(){return f=e(c,d),t.dependsOnOwnProps&&(h=t(n,d)),p=r(f,h,d),p}function b(){return e.dependsOnOwnProps&&(f=e(c,d)),t.dependsOnOwnProps&&(h=t(n,d)),p=r(f,h,d),p}function E(){var P=e(c,d),O=!s(P,f);return f=P,O&&(p=r(f,h,d)),p}function S(P,O){var I=!o(O,d),N=!a(P,c,O,d);return c=P,d=O,I&&N?_():I?b():N?E():p}return function(O,I){return l?S(O,I):g(O,I)}}function gYe(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,i=t.initMergeProps,a=Yr(t,pYe),o=r(e,a),s=n(e,a),l=i(e,a),c=a.pure?vYe:mYe;return c(o,s,l,e,a)}var yYe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function aM(e,t,r){for(var n=t.length-1;n>=0;n--){var i=t[n](e);if(i)return i}return function(a,o){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+o.wrappedComponentName+".")}}function _Ye(e,t){return e===t}function bYe(e){var t={},r=t.connectHOC,n=r===void 0?eYe:r,i=t.mapStateToPropsFactories,a=i===void 0?lYe:i,o=t.mapDispatchToPropsFactories,s=o===void 0?aYe:o,l=t.mergePropsFactories,c=l===void 0?hYe:l,d=t.selectorFactory,f=d===void 0?gYe:d;return function(p,g,_,b){b===void 0&&(b={});var E=b,S=E.pure,P=S===void 0?!0:S,O=E.areStatesEqual,I=O===void 0?_Ye:O,N=E.areOwnPropsEqual,M=N===void 0?LP:N,F=E.areStatePropsEqual,B=F===void 0?LP:F,V=E.areMergedPropsEqual,W=V===void 0?LP:V,$=Yr(E,yYe),X=aM(p,a,"mapStateToProps"),re=aM(g,s,"mapDispatchToProps"),ae=aM(_,c,"mergeProps");return n(f,ve({methodName:"connect",getDisplayName:function(ie){return"Connect("+ie+")"},shouldHandleStateChanges:!!p,initMapStateToProps:X,initMapDispatchToProps:re,initMergeProps:ae,pure:P,areStatesEqual:I,areOwnPropsEqual:M,areStatePropsEqual:B,areMergedPropsEqual:W},$))}}const Bbe=bYe();function zbe(){var e=x.useContext(sh);return e}function Hbe(e){e===void 0&&(e=sh);var t=e===sh?zbe:function(){return x.useContext(e)};return function(){var n=t(),i=n.store;return i}}var EYe=Hbe();function wYe(e){e===void 0&&(e=sh);var t=e===sh?EYe:Hbe(e);return function(){var n=t();return n.dispatch}}var An=wYe(),SYe=function(t,r){return t===r};function CYe(e,t,r,n){var i=x.useReducer(function(g){return g+1},0),a=i[1],o=x.useMemo(function(){return Gj(r,n)},[r,n]),s=x.useRef(),l=x.useRef(),c=x.useRef(),d=x.useRef(),f=r.getState(),h;try{if(e!==l.current||f!==c.current||s.current){var p=e(f);d.current===void 0||!t(p,d.current)?h=p:h=d.current}else h=d.current}catch(g){throw s.current&&(g.message+=`
38The error may be correlated with this previous error:
39`+s.current.stack+`
40
41`),g}return tO(function(){l.current=e,c.current=f,d.current=h,s.current=void 0}),tO(function(){function g(){try{var _=r.getState();if(_===c.current)return;var b=l.current(_);if(t(b,d.current))return;d.current=b,c.current=_}catch(E){s.current=E}a()}return o.onStateChange=g,o.trySubscribe(),g(),function(){return o.tryUnsubscribe()}},[r,o]),h}function xYe(e){e===void 0&&(e=sh);var t=e===sh?zbe:function(){return x.useContext(e)};return function(n,i){i===void 0&&(i=SYe);var a=t(),o=a.store,s=a.subscription,l=CYe(n,i,o,s);return x.useDebugValue(l),l}}var at=xYe();HKe(vo.unstable_batchedUpdates);const TYe={anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:5e3},AYe={SAVED_SUCCESSFULLY:"Salvo com sucesso",ERROR_SAVING:"Erro ao salvar as informações"};function Lr(){const e=An(),t=u.useCallback(n=>(i,a)=>{i&&e(kl({...TYe,...a,message:i,variant:n}))},[e]);return u.useMemo(()=>({success:t("success"),error:t("error"),info:t("info"),warning:t("warning"),messages:AYe}),[t])}function PYe(e,t){const r=x.useRef(e);x.useEffect(()=>{r.current=e},[e]),x.useEffect(()=>{if(t&&e&&typeof e=="function"){const n=setTimeout(r.current,t||0);return()=>{n&&clearTimeout(n)}}},[e,t])}function rO(e,t){return rO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},rO(e,t)}function Qo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rO(e,t)}var fv={exports:{}},oM,yre;function RYe(){return yre||(yre=1,oM=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}),oM}var _re;function OYe(){if(_re)return fv.exports;_re=1;var e=RYe();fv.exports=b,fv.exports.parse=r,fv.exports.compile=i,fv.exports.tokensToFunction=s,fv.exports.tokensToRegExp=_;var t=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function r(E,S){for(var P=[],O=0,I=0,N="",M=S&&S.delimiter||"/",F;(F=t.exec(E))!=null;){var B=F[0],V=F[1],W=F.index;if(N+=E.slice(I,W),I=W+B.length,V){N+=V[1];continue}var $=E[I],X=F[2],re=F[3],ae=F[4],Q=F[5],ie=F[6],le=F[7];N&&(P.push(N),N="");var fe=X!=null&&$!=null&&$!==X,de=ie==="+"||ie==="*",ge=ie==="?"||ie==="*",Ae=X||M,Fe=ae||Q,Pe=X||(typeof P[P.length-1]=="string"?P[P.length-1]:"");P.push({name:re||O++,prefix:X||"",delimiter:Ae,optional:ge,repeat:de,partial:fe,asterisk:!!le,pattern:
41Fe?c(Fe):le?".*":n(Ae,Pe)})}return I<E.length&&(N+=E.substr(I)),N&&P.push(N),P}function n(E,S){return!S||S.indexOf(E)>-1?"[^"+l(E)+"]+?":l(S)+"|(?:(?!"+l(S)+")[^"+l(E)+"])+?"}function i(E,S){return s(r(E,S),S)}function a(E){return encodeURI(E).replace(/[\/?#]/g,function(S){return"%"+S.charCodeAt(0).toString(16).toUpperCase()})}function o(E){return encodeURI(E).replace(/[?#]/g,function(S){return"%"+S.charCodeAt(0).toString(16).toUpperCase()})}function s(E,S){for(var P=new Array(E.length),O=0;O<E.length;O++)typeof E[O]=="object"&&(P[O]=new RegExp("^(?:"+E[O].pattern+")$",f(S)));return function(I,N){for(var M="",F=I||{},B=N||{},V=B.pretty?a:encodeURIComponent,W=0;W<E.length;W++){var $=E[W];if(typeof $=="string"){M+=$;continue}var X=F[$.name],re;if(X==null)if($.optional){$.partial&&(M+=$.prefix);continue}else throw new TypeError('Expected "'+$.name+'" to be defined');if(e(X)){if(!$.repeat)throw new TypeError('Expected "'+$.name+'" to not repeat, but received `'+JSON.stringify(X)+"`");if(X.length===0){if($.optional)continue;throw new TypeError('Expected "'+$.name+'" to not be empty')}for(var ae=0;ae<X.length;ae++){if(re=V(X[ae]),!P[W].test(re))throw new TypeError('Expected all "'+$.name+'" to match "'+$.pattern+'", but received `'+JSON.stringify(re)+"`");M+=(ae===0?$.prefix:$.delimiter)+re}continue}if(re=$.asterisk?o(X):V(X),!P[W].test(re))throw new TypeError('Expected "'+$.name+'" to match "'+$.pattern+'", but received "'+re+'"');M+=$.prefix+re}return M}}function l(E){return E.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(E){return E.replace(/([=!:$\/()])/g,"\\$1")}function d(E,S){return E.keys=S,E}function f(E){return E&&E.sensitive?"":"i"}function h(E,S){var P=E.source.match(/\((?!\?)/g);if(P)for(var O=0;O<P.length;O++)S.push({name:O,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return d(E,S)}function p(E,S,P){for(var O=[],I=0;I<E.length;I++)O.push(b(E[I],S,P).source);var N=new RegExp("(?:"+O.join("|")+")",f(P));return d(N,S)}function g(E,S,P){return _(r(E,P),S,P)}function _(E,S,P){e(S)||(P=S||P,S=[]),P=P||{};for(var O=P.strict,I=P.end!==!1,N="",M=0;M<E.length;M++){var F=E[M];if(typeof F=="string")N+=l(F);else{var B=l(F.prefix),V="(?:"+F.pattern+")";S.push(F),F.repeat&&(V+="(?:"+B+V+")*"),F.optional?F.partial?V=B+"("+V+")?":V="(?:"+B+"("+V+"))?":V=B+"("+V+")",N+=V}}var W=l(P.delimiter||"/"),$=N.slice(-W.length)===W;return O||(N=($?N.slice(0,-W.length):N)+"(?:"+W+"(?=$))?"),I?N+="$":N+=O&&$?"":"(?="+W+"|$)",d(new RegExp("^"+N,f(P)),S)}function b(E,S,P){return e(S)||(P=S||P,S=[]),P=P||{},E instanceof RegExp?h(E,S):e(E)?p(E,S,P):g(E,S,P)}return fv.exports}var IYe=OYe();const Ube=et(IYe);var sM={exports:{}},Mi={},bre;
41function kYe(){if(bre)return Mi;bre=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function P(I){if(typeof I=="object"&&I!==null){var N=I.$$typeof;switch(N){case t:switch(I=I.type,I){case l:case c:case n:case a:case i:case f:return I;default:switch(I=I&&I.$$typeof,I){case s:case d:case g:case p:case o:return I;default:return N}}case r:return N}}}function O(I){return P(I)===c}return Mi.AsyncMode=l,Mi.ConcurrentMode=c,Mi.ContextConsumer=s,Mi.ContextProvider=o,Mi.Element=t,Mi.ForwardRef=d,Mi.Fragment=n,Mi.Lazy=g,Mi.Memo=p,Mi.Portal=r,Mi.Profiler=a,Mi.StrictMode=i,Mi.Suspense=f,Mi.isAsyncMode=function(I){return O(I)||P(I)===l},Mi.isConcurrentMode=O,Mi.isContextConsumer=function(I){return P(I)===s},Mi.isContextProvider=function(I){return P(I)===o},Mi.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},Mi.isForwardRef=function(I){return P(I)===d},Mi.isFragment=function(I){return P(I)===n},Mi.isLazy=function(I){return P(I)===g},Mi.isMemo=function(I){return P(I)===p},Mi.isPortal=function(I){return P(I)===r},Mi.isProfiler=function(I){return P(I)===a},Mi.isStrictMode=function(I){return P(I)===i},Mi.isSuspense=function(I){return P(I)===f},Mi.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===n||I===c||I===a||I===i||I===f||I===h||typeof I=="object"&&I!==null&&(I.$$typeof===g||I.$$typeof===p||I.$$typeof===o||I.$$typeof===s||I.$$typeof===d||I.$$typeof===b||I.$$typeof===E||I.$$typeof===S||I.$$typeof===_)},Mi.typeOf=P,Mi}var Ere;function NYe(){return Ere||(Ere=1,sM.exports=kYe()),sM.exports}NYe();var lM=1073741823,wre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{};function DYe(){var e="__global_unique_id__";return wre[e]=(wre[e]||0)+1}function MYe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function LYe(e){var t=[];return{on:function(n){t.push(n)},off:function(n){t=t.filter(function(i){return i!==n})},get:function(){return e},set:function(n,i){e=n,t.forEach(function(a){return a(e,i)})}}}function FYe(e){return Array.isArray(e)?e[0]:e}function BYe(e,t){var r,n,i="__create-react-context-"+DYe()+"__",a=(function(s){Qo(l,s);function l(){for(var d,f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return d=s.call.apply(s,[this].concat(h))||this,d.emitter=LYe(d.props.value),d}var c=l.prototype;return c.getChildContext=function(){var f;return f={},f[i]=this.emitter,f},c.componentWillReceiveProps=function(f){if(this.props.value!==f.value){var h=this.props.value,p=f.value,g;MYe(h,p)?g=0:(g=typeof t=="function"?t(h,p):lM,g|=0,g!==0&&this.emitter.set(f.value,g))}},c.render=function(){return this.props.children},l})(u.Component);a.childContextTypes=(r={},r[i]=xe.object.isRequired,r);var o=(function(s){Qo(l,s);function l(){for(var d,f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return d=s.call.apply(s,[this].concat(h))||this,d.observedBits=void 0,d.state={value:d.getValue()},d.onUpdate=function(g,_){var b=d.observedBits|0;(b&_)!==0&&d.setState({value:d.getValue()})},d}var c=l.prototype;return c.componentWillReceiveProps=function(f){var h=f.observedBits;this.observedBits=h??lM},c.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var f=this.props.observedBits;this.observedBits=f??lM},c.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},c.getValue=function(){return this.context[i]?this.context[i].get():e},c.render=function(){return FYe(this.props.children)(this.state.value)},l})(u.Component);return o.contextTypes=(n={},n[i]=xe.object,n),{Provider:a,Consumer:o}}var zYe=u.createContext||BYe,Vbe=function(t){var r=zYe();return r.displayName=t,r},qbe=Vbe("Router-History"),Fu=Vbe("Router"),S_=(function(e){Qo(t,e),t.computeRootMatch=function(i){return{path:"/",url:"/",params:{},isExact:i==="/"}};function t(n){var i;return i=e.call(this,n)||this,i.state={location:n.history.location},i._isMounted=!1,i._pendingLocation=null,n.staticContext||(i.unlisten=n.history.listen(function(a){i._pendingLocation=a})),i}
41var r=t.prototype;return r.componentDidMount=function(){var i=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(a){i._isMounted&&i.setState({location:a})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return u.createElement(Fu.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},u.createElement(qbe.Provider,{children:this.props.children||null,value:this.props.history}))},t})(u.Component);u.Component;var HYe=(function(e){Qo(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},r.componentDidUpdate=function(i){this.props.onUpdate&&this.props.onUpdate.call(this,this,i)},r.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},r.render=function(){return null},t})(u.Component),cM={},UYe=1e4,Sre=0;function VYe(e){if(cM[e])return cM[e];var t=Ube.compile(e);return Sre<UYe&&(cM[e]=t,Sre++),t}function Cre(e,t){return e===void 0&&(e="/"),t===void 0&&(t={}),e==="/"?e:VYe(e)(t,{pretty:!0})}function us(e){var t=e.computedMatch,r=e.to,n=e.push,i=n===void 0?!1:n;return u.createElement(Fu.Consumer,null,function(a){a||Eh();var o=a.history,s=a.staticContext,l=i?o.push:o.replace,c=il(t?typeof r=="string"?Cre(r,t.params):ve({},r,{pathname:Cre(r.pathname,t.params)}):r);return s?(l(c),null):u.createElement(HYe,{onMount:function(){l(c)},onUpdate:function(f,h){var p=il(h.to);UNe(p,ve({},c,{key:p.key}))||l(c)},to:r})})}var xre={},qYe=1e4,Tre=0;function jYe(e,t){var r=""+t.end+t.strict+t.sensitive,n=xre[r]||(xre[r]={});if(n[e])return n[e];var i=[],a=Ube(e,i,t),o={regexp:a,keys:i};return Tre<qYe&&(n[e]=o,Tre++),o}function Vx(e,t){t===void 0&&(t={}),(typeof t=="string"||Array.isArray(t))&&(t={path:t});var r=t,n=r.path,i=r.exact,a=i===void 0?!1:i,o=r.strict,s=o===void 0?!1:o,l=r.sensitive,c=l===void 0?!1:l,d=[].concat(n);return d.reduce(function(f,h){if(!h&&h!=="")return null;if(f)return f;
41var p=jYe(h,{end:a,strict:s,sensitive:c}),g=p.regexp,_=p.keys,b=g.exec(e);if(!b)return null;var E=b[0],S=b.slice(1),P=e===E;return a&&!P?null:{path:h,url:h==="/"&&E===""?"/":E,isExact:P,params:_.reduce(function(O,I,N){return O[I.name]=S[N],O},{})}},null)}function $Ye(e){return u.Children.count(e)===0}var WYe=(function(e){Qo(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.render=function(){var i=this;return u.createElement(Fu.Consumer,null,function(a){a||Eh();var o=i.props.location||a.location,s=i.props.computedMatch?i.props.computedMatch:i.props.path?Vx(o.pathname,i.props):a.match,l=ve({},a,{location:o,match:s}),c=i.props,d=c.children,f=c.component,h=c.render;return Array.isArray(d)&&$Ye(d)&&(d=null),u.createElement(Fu.Provider,{value:l},l.match?d?typeof d=="function"?d(l):d:f?u.createElement(f,l):h?h(l):null:typeof d=="function"?d(l):null)})},t})(u.Component);function Yj(e){return e.charAt(0)==="/"?e:"/"+e}function GYe(e,t){return e?ve({},t,{pathname:Yj(e)+t.pathname}):t}function KYe(e,t){if(!e)return t;var r=Yj(e);return t.pathname.indexOf(r)!==0?t:ve({},t,{pathname:t.pathname.substr(r.length)})}function Are(e){return typeof e=="string"?e:Cl(e)}function uM(e){return function(){Eh()}}function Pre(){}u.Component;var YYe=(function(e){Qo(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.render=function(){var i=this;return u.createElement(Fu.Consumer,null,function(a){a||Eh();var o=i.props.location||a.location,s,l;return u.Children.forEach(i.props.children,function(c){if(l==null&&u.isValidElement(c)){s=c;var d=c.props.path||c.props.from;l=d?Vx(o.pathname,ve({},c.props,{path:d})):a.match}}),l?u.cloneElement(s,{location:o,computedMatch:l}):null})},t})(u.Component);function XYe(e){var t="withRouter("+(e.displayName||e.name)+")",r=function(i){var a=i.wrappedComponentRef,o=Yr(i,["wrappedComponentRef"]);return u.createElement(Fu.Consumer,null,function(s){return s||Eh(),u.createElement(e,ve({},o,s,{ref:a}))})};return r.displayName=t,r.WrappedComponent=e,cg(r,e)}var X3=u.useContext;function vc(){return X3(qbe)}function Z3(){return X3(Fu).location}function Ier(){var e=X3(Fu).match;return e?e.params:{}}function ker(e){var t=Z3(),r=X3(Fu).match;return e?Vx(t.pathname,e):r}u.Component;u.Component;var Uz=function(t,r){return typeof t=="function"?t(r):t},Vz=function(t,r){return typeof t=="string"?il(t,null,null,r):t},Xj=function(t){return t},d1=u.forwardRef;typeof d1>"u"&&(d1=Xj);function ZYe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var QYe=d1(function(e,t){var r=e.innerRef,n=e.navigate,i=e.onClick,a=Yr(e,["innerRef","navigate","onClick"]),o=a.target,s=ve({},a,{onClick:function(c){try{i&&i(c)}catch(d){throw c.preventDefault(),d}!c.defaultPrevented&&c.button===0&&(!o||o==="_self")&&!ZYe(c)&&(c.preventDefault(),n())}});return Xj!==d1?s.ref=t||r:s.ref=r,u.createElement("a",s)}),jbe=d1(function(e,t){var r=e.component,n=r===void 0?QYe:r,i=e.replace,a=e.to,o=e.innerRef,s=Yr(e,["component","replace","to","innerRef"]);return u.createElement(Fu.Consumer,null,function(l){l||Eh();var c=l.history,d=Vz(Uz(a,l.location),l.location),f=d?c.createHref(d):"",h=ve({},s,{href:f,navigate:function(){var g=Uz(a,l.location),_=Cl(l.location)===Cl(Vz(g)),b=i||_?c.replace:c.push;b(g)}});return Xj!==d1?h.ref=t||o:h.innerRef=o,u.createElement(n,h)})}),$be=function(t){return t},nO=u.forwardRef;typeof nO>"u"&&(nO=$be);function JYe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(function(n){return n}).join(" ")}var eXe=nO(function(e,t){var r=e["aria-current"],n=r===void 0?"page":r,i=e.activeClassName,a=i===void 0?"active":i,o=e.activeStyle,s=e.className,l=e.exact,c=e.isActive,d=e.location,f=e.sensitive,h=e.strict,p=e.style,g=e.to,_=e.innerRef,b=Yr(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return u.createElement(Fu.Consumer,null,function(E){E||Eh();var S=d||E.location,P=Vz(Uz(g,S),S),O=P.pathname,I=O&&O.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),N=I?Vx(S.pathname,{path:I,exact:l,sensitive:f,strict:h}):null,M=!!(c?c(N,S):N),F=typeof s=="function"?s(M):s,B=typeof p=="function"?p(M):p;M&&(F=JYe(F,a),B=ve({},B,o));var V=ve({"aria-current":M&&n||null,className:F,style:B,to:P},b);return $be!==nO?V.ref=t||_:V.innerRef=_,u.createElement(jbe,V)})});function Wbe(){const e=Z3(),t=x.useMemo(()=>e.search,[e.search]);return x.useMemo(()=>new URLSearchParams(t),[t])}function Gbe(){const e=Wbe(),t=vc();return u.useCallback(n=>{if(!n)return null;e.has("pedido")?e.set("pedido",n):e.append("pedido",n),t.push({search:e.toString()})},[t,e])}var sC={black:"#000",white:"#fff"},FP={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},BP={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},tXe={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},rXe={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},zP={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},hS={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},nXe={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},iXe={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},aXe={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},pS={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},oXe={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},sXe={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},lXe={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},Kbe={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},HP={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},cXe={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"}
41,uXe={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},Q3={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},dXe={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};const fXe=Object.freeze(Object.defineProperty({__proto__:null,amber:Kbe,blue:hS,blueGrey:dXe,brown:uXe,common:sC,cyan:iXe,deepOrange:cXe,deepPurple:rXe,green:pS,grey:Q3,indigo:zP,lightBlue:nXe,lightGreen:oXe,lime:sXe,orange:HP,pink:BP,purple:tXe,red:FP,teal:aXe,yellow:lXe},Symbol.toStringTag,{value:"Module"}));function hXe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rre(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ybe(n.key),n)}}function pXe(e,t,r){return t&&Rre(e.prototype,t),r&&Rre(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mXe(e,t,r){return(t=Ybe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iO(){return iO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iO.apply(null,arguments)}function Ore(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ore(Object(r),!0).forEach(function(n){mXe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ore(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vXe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ybe(e){var t=vXe(e,"string");return typeof t=="symbol"?t:t+""}var Xbe={exports:{}};(function(e){typeof window>"u"||(function(t){var r=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,n=t.Blob&&(function(){try{return!!new Blob}catch{return!1}})(),i=n&&t.Uint8Array&&(function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}})(),a=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,o=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,s=(n||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var c,d,f,h,p,g,_,b,E;if(c=l.match(o),!c)throw new Error("invalid data URI");for(d=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),f=!!c[4],h=l.slice(c[0].length),f?p=atob(h):p=decodeURIComponent(h),g=new ArrayBuffer(p.length),_=new Uint8Array(g),b=0;b<p.length;
41b+=1)_[b]=p.charCodeAt(b);return n?new Blob([i?_:g],{type:d}):(E=new a,E.append(g),E.getBlob(d))};t.HTMLCanvasElement&&!r.toBlob&&(r.mozGetAsFile?r.toBlob=function(l,c,d){var f=this;setTimeout(function(){d&&r.toDataURL&&s?l(s(f.toDataURL(c,d))):l(f.mozGetAsFile("blob",c))})}:r.toDataURL&&s&&(r.msToBlob?r.toBlob=function(l,c,d){var f=this;setTimeout(function(){(c&&c!=="image/png"||d)&&r.toDataURL&&s?l(s(f.toDataURL(c,d))):l(f.msToBlob(c))})}:r.toBlob=function(l,c,d){var f=this;setTimeout(function(){l(s(f.toDataURL(c,d)))})})),e.exports?e.exports=s:t.dataURLtoBlob=s})(window)})(Xbe);var Ire=Xbe.exports,gXe=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},kre={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},yXe=typeof window<"u"&&typeof window.document<"u",em=yXe?window:{},aO=function(t){return t>0&&t<1/0},_Xe=Array.prototype.slice;function Zj(e){return Array.from?Array.from(e):_Xe.call(e)}var bXe=/^image\/.+$/;function qz(e){return bXe.test(e)}function EXe(e){var t=qz(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var Zbe=String.fromCharCode;function wXe(e,t,r){var n="",i;for(r+=t,i=t;i<r;i+=1)n+=Zbe(e.getUint8(i));return n}function SXe(){try{var e=document.createElement("canvas");e.width=2,e.height=1;var t=e.getContext("2d");if(!t)return!1;var r=t.createImageData(2,1);r.data[0]=12,r.data[1]=23,r.data[2]=34,r.data[3]=255,r.data[4]=45,r.data[5]=56,r.data[6]=67,r.data[7]=255,t.putImageData(r,0,0);var n=t.getImageData(0,0,2,1),i=[12,23,34,255,45,56,67,255];return n.data.every(function(a,o){return a===i[o]})}catch{return!1}}var CXe=em.btoa;function Nre(e,t){for(var r=[],n=8192,i=new Uint8Array(e);i.length>0;)r.push(Zbe.apply(null,Zj(i.subarray(0,n)))),i=i.subarray(n);return"data:".concat(t,";base64,").concat(CXe(r.join("")))}function xXe(e){var t=new DataView(e),r;try{var n,i,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1<o;){if(t.getUint8(s)===255&&t.getUint8(s+1)===225){i=s;break}s+=1}if(i){var l=i+4,c=i+10;if(wXe(t,l,4)==="Exif"){var d=t.getUint16(c);if(n=d===18761,(n||d===19789)&&t.getUint16(c+2,n)===42){var f=t.getUint32(c+4,n);f>=8&&(a=c+f)}}}if(a){var h=t.getUint16(a,n),p,g;for(g=0;g<h;g+=1)if(p=a+g*12+2,t.getUint16(p,n)===274){p+=8,r=t.getUint16(p,n),t.setUint16(p,1,n);break}}}catch{r=1}return r}function TXe(e){var t=0,r=1,n=1;switch(e){case 2:r=-1;break;case 3:t=-180;break;case 4:n=-1;break;case 5:t=90,n=-1;break;case 6:t=90;break;case 7:t=90,r=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:r,scaleY:n}}var AXe=/\.\d*(?:0|9){12}\d*$/;function Dre(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return AXe.test(e)?Math.round(e*t)/t:e}function vb(e){var t=e.aspectRatio,r=e.height,n=e.width,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=aO(n),o=aO(r);if(a&&o){var s=r*t;(i==="contain"||i==="none")&&s>n||i==="cover"&&s<n?r=n/t:n=r*t}else a?r=n/t:o&&(n=r*t);return{width:n,height:r}}function PXe(e){for(var t=Zj(new Uint8Array(e)),r=t.length,n=[],i=0;i+3<r;){var a=t[i],o=t[i+1];if(a===255&&o===218)break;if(a===255&&o===216)i+=2;else{var s=t[i+2]*256+t[i+3],l=i+s+2,c=t.slice(i,l);n.push(c),i=l}}return n.reduce(function(d,f){return f[0]===255&&f[1]===225?d.concat(f):d},[])}function RXe(e,t){var r=Zj(new Uint8Array(e));if(r[2]!==255||r[3]!==224)return e;var n=r[4]*256+r[5],i=[255,216].concat(t,r.slice(4+n));return new Uint8Array(i)}var OXe=em.ArrayBuffer,dM=em.FileReader,hv=em.URL||em.webkitURL,IXe=/\.\w+$/,kXe=em.Compressor,NXe=(function(){function e(t,r){hXe(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=BT(BT({},kre),r),this.aborted=!1,this.result=null,this.init()}return pXe(e,[{key:"init",value:function(){var r=this,n=this.file,i=this.options;if(!gXe(n)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=n.type;if(!qz(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!hv||!dM){this.fail(new Error("The current browser does not support image compression."));return}OXe||(i.checkOrientation=!1,i.retainExif=!1);var o=a==="image/jpeg",s=o&&i.checkOrientation,l=o&&i.retainExif;if(hv&&!s&&!l)this.load({url:hv.createObjectURL(n)});else{var c=new dM;this.reader=c,c.onload=function(d){var f=d.target,h=f.result,p={},g=1;s&&(g=xXe(h),g>1&&iO(p,TXe(g))),l&&(r.exif=PXe(h)),s||l?!hv||g>1?p.url=Nre(h,a):p.url=hv.createObjectURL(n):p.url=h,r.load(p)},c.onabort=function(){r.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){r.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){r.reader=null},s||l?c.readAsArrayBuffer(n):c.readAsDataURL(n)}}},{key:"load",value:function(r){var n=this,i=this.file,a=this.image;a.onload=function(){SXe()?n.draw(BT(BT({},r),{}
41,{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight})):n.done({naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight,result:null})},a.onabort=function(){n.fail(new Error("Aborted to load the image."))},a.onerror=function(){n.fail(new Error("Failed to load the image."))},em.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(em.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=i.name,a.src=r.url}},{key:"draw",value:function(r){var n=this,i=r.naturalWidth,a=r.naturalHeight,o=r.rotate,s=o===void 0?0:o,l=r.scaleX,c=l===void 0?1:l,d=r.scaleY,f=d===void 0?1:d,h=this.file,p=this.image,g=this.options,_=document.createElement("canvas"),b=_.getContext("2d"),E=Math.abs(s)%180===90,S=(g.resize==="contain"||g.resize==="cover")&&aO(g.width)&&aO(g.height),P=Math.max(g.maxWidth,0)||1/0,O=Math.max(g.maxHeight,0)||1/0,I=Math.max(g.minWidth,0)||0,N=Math.max(g.minHeight,0)||0,M=i/a,F=g.width,B=g.height;if(E){var V=[O,P];P=V[0],O=V[1];var W=[N,I];I=W[0],N=W[1];var $=[B,F];F=$[0],B=$[1]}S&&(M=F/B);var X=vb({aspectRatio:M,width:P,height:O},"contain");P=X.width,O=X.height;var re=vb({aspectRatio:M,width:I,height:N},"cover");if(I=re.width,N=re.height,S){var ae=vb({aspectRatio:M,width:F,height:B},g.resize);F=ae.width,B=ae.height}
41else{var Q=vb({aspectRatio:M,width:F,height:B}),ie=Q.width;F=ie===void 0?i:ie;var le=Q.height;B=le===void 0?a:le}F=Math.floor(Dre(Math.min(Math.max(F,I),P))),B=Math.floor(Dre(Math.min(Math.max(B,N),O)));var fe=-F/2,de=-B/2,ge=F,Ae=B,Fe=[];if(S){var Pe=0,ce=0,pe=i,Ne=a,De=vb({aspectRatio:M,width:i,height:a},{contain:"cover",cover:"contain"}[g.resize]);pe=De.width,Ne=De.height,Pe=(i-pe)/2,ce=(a-Ne)/2,Fe.push(Pe,ce,pe,Ne)}if(Fe.push(fe,de,ge,Ae),E){var Ve=[B,F];F=Ve[0],B=Ve[1]}_.width=F,_.height=B,qz(g.mimeType)||(g.mimeType=h.type);var Ke="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var Qe=g.mimeType==="image/jpeg";if(Qe&&(Ke="#fff"),b.fillStyle=Ke,b.fillRect(0,0,F,B),g.beforeDraw&&g.beforeDraw.call(this,b,_),!this.aborted&&(b.save(),b.translate(F/2,B/2),b.rotate(s*Math.PI/180),b.scale(c,f),b.drawImage.apply(b,[p].concat(Fe)),b.restore(),g.drew&&g.drew.call(this,b,_),!this.aborted)){var Ue=function(We){if(!n.aborted){var ke=function(Et){return n.done({naturalWidth:i,naturalHeight:a,result:Et})};if(We&&Qe&&g.retainExif&&n.exif&&n.exif.length>0){var Le=function(Et){return ke(Ire(Nre(RXe(Et,n.exif),g.mimeType)))};if(We.arrayBuffer)We.arrayBuffer().then(Le).catch(function(){n.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Be=new dM;n.reader=Be,Be.onload=function(Ze){var Et=Ze.target;Le(Et.result)},Be.onabort=function(){n.fail(new Error("Aborted to read the compressed image with FileReader."))},Be.onerror=function(){n.fail(new Error("Failed to read the compressed image with FileReader."))},Be.onloadend=function(){n.reader=null},Be.readAsArrayBuffer(We)}}else ke(We)}};_.toBlob?_.toBlob(Ue,g.mimeType,g.quality):Ue(Ire(_.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(r){var n=r.naturalWidth,i=r.naturalHeight,a=r.result,o=this.file,s=this.image,l=this.options;if(hv&&s.src.indexOf("blob:")===0&&hv.revokeObjectURL(s.src),a)if(l.strict&&!l.retainExif&&a.size>o.size&&l.mimeType===o.type&&!(l.width>n||l.height>i||l.minWidth>n||l.minHeight>i||l.maxWidth<n||l.maxHeight<i))a=o;else{var c=o.name;c&&a.type!==o.type&&(c=c.replace(IXe,EXe(a.type)));try{a=new File([a],c,{type:a.type})}catch{var d=new Date;a.name=c,a.lastModified=d.getTime(),a.lastModifiedDate=d}}else a=o;this.result=a,l.success&&l.success.call(this,a)}},{key:"fail",value:function(r){var n=this.options;if(n.error)n.error.call(this,r);else throw r}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=kXe,e}},{key:"setDefaults",value:function(r){iO(kre,r)}}])})(),fM,Mre;function DXe(){if(Mre)return fM;Mre=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return fM=t,fM}var hM,Lre;function MXe(){if(Lre)return hM;Lre=1;function e(t){return this.__data__.has(t)}return hM=e,hM}var pM,Fre;function J3(){if(Fre)return pM;Fre=1;var e=lj(),t=DXe(),r=MXe();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,pM=n,pM}var mM,Bre;function LXe(){if(Bre)return mM;Bre=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return mM=e,mM}var vM,zre;function e5(){if(zre)return vM;zre=1;function e(t,r){return t.has(r)}return vM=e,vM}var gM,Hre;function Qbe(){if(Hre)return gM;Hre=1;var e=J3(),t=LXe(),r=e5(),n=1,i=2;function a(o,s,l,c,d,f){var h=l&n,p=o.length,g=s.length;if(p!=g&&!(h&&g>p))return!1;var _=f.get(o),b=f.get(s);if(_&&b)return _==s&&b==o;var E=-1,S=!0,P=l&i?new e:void 0;for(f.set(o,s),f.set(s,o);++E<p;){var O=o[E],I=s[E];if(c)var N=h?c(I,O,E,s,o,f):c(O,I,E,o,s,f);if(N!==void 0){if(N)continue;S=!1;break}if(P){if(!t(s,function(M,F){if(!r(P,F)&&(O===M||d(O,M,l,c,f)))return P.push(F)})){S=!1;break}}else if(!(O===I||d(O,I,l,c,f))){S=!1;break}}return f.delete(o),f.delete(s),S}return gM=a,gM}var yM,Ure;function FXe(){if(Ure)return yM;Ure=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return yM=e,yM}var _M,Vre;function Qj(){if(Vre)return _M;Vre=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return _M=e,_M}var bM,qre;function BXe(){if(qre)return bM;qre=1;var e=c_(),t=a_e(),r=Tx(),n=Qbe(),i=FXe(),a=Qj(),o=1,s=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",_="[object String]",b="[object Symbol]",E="[object ArrayBuffer]",S="[object DataView]",P=e?e.prototype:void 0,O=P?P.valueOf:void 0;function I(N,M,F,B,V,W,$){switch(F){case S:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case E:return!(N.byteLength!=M.byteLength||!W(new t(N),new t(M)));case l:case c:case h:return r(+N,+M);case d:return N.name==M.name&&N.message==M.message;case p:case _:return N==M+"";case f:var X=i;case g:var re=B&o;if(X||(X=a),N.size!=M.size&&!re)return!1;var ae=$.get(N);if(ae)return ae==M;B|=s,$.set(N,M);var Q=n(X(N),X(M),B,V,W,$);return $.delete(N),Q;case b:if(O)return O.call(N)==O.call(M)}return!1}return bM=I,bM}var EM,jre;
vendor: 6,283 bytes, line 41
41function zXe(){if(jre)return EM;jre=1;var e=r_e(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,l,c,d){var f=s&t,h=e(a),p=h.length,g=e(o),_=g.length;if(p!=_&&!f)return!1;for(var b=p;b--;){var E=h[b];if(!(f?E in o:n.call(o,E)))return!1}var S=d.get(a),P=d.get(o);if(S&&P)return S==o&&P==a;var O=!0;d.set(a,o),d.set(o,a);for(var I=f;++b<p;){E=h[b];var N=a[E],M=o[E];if(l)var F=f?l(M,N,E,o,a,d):l(N,M,E,a,o,d);if(!(F===void 0?N===M||c(N,M,s,l,d):F)){O=!1;break}I||(I=E=="constructor")}if(O&&!I){var B=a.constructor,V=o.constructor;B!=V&&"constructor"in a&&"constructor"in o&&!(typeof B=="function"&&B instanceof B&&typeof V=="function"&&V instanceof V)&&(O=!1)}return d.delete(a),d.delete(o),O}return EM=i,EM}var wM,$re;function HXe(){if($re)return wM;$re=1;var e=I3(),t=Qbe(),r=BXe(),n=zXe(),i=kx(),a=co(),o=f_(),s=Ox(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(_,b,E,S,P,O){var I=a(_),N=a(b),M=I?d:i(_),F=N?d:i(b);M=M==c?f:M,F=F==c?f:F;var B=M==f,V=F==f,W=M==F;if(W&&o(_)){if(!o(b))return!1;I=!0,B=!1}if(W&&!B)return O||(O=new e),I||s(_)?t(_,b,E,S,P,O):r(_,b,M,E,S,P,O);if(!(E&l)){var $=B&&p.call(_,"__wrapped__"),X=V&&p.call(b,"__wrapped__");if($||X){var re=$?_.value():_,ae=X?b.value():b;return O||(O=new e),P(re,ae,E,S,O)}}return W?(O||(O=new e),n(_,b,E,S,P,O)):!1}return wM=g,wM}var SM,Wre;function Jj(){if(Wre)return SM;Wre=1;var e=HXe(),t=jc();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,s)}return SM=r,SM}var CM,Gre;function UXe(){if(Gre)return CM;Gre=1;var e=Jj();function t(r,n){return e(r,n)}return CM=t,CM}var VXe=UXe();const r0=et(VXe);var qXe=qs();const Kre=et(qXe);var xM,Yre;function jXe(){if(Yre)return xM;Yre=1;var e=I3(),t=Jj(),r=1,n=2;function i(a,o,s,l){var c=s.length,d=c,f=!l;if(a==null)return!d;for(a=Object(a);c--;){var h=s[c];if(f&&h[2]?h[1]!==a[h[0]]:!(h[0]in a))return!1}for(;++c<d;){h=s[c];var p=h[0],g=a[p],_=h[1];if(f&&h[2]){if(g===void 0&&!(p in a))return!1}else{var b=new e;if(l)var E=l(g,_,p,a,o,b);if(!(E===void 0?t(_,g,r|n,l,b):E))return!1}}return!0}return xM=i,xM}var TM,Xre;function Jbe(){if(Xre)return TM;Xre=1;var e=qs();function t(r){return r===r&&!e(r)}return TM=t,TM}var AM,Zre;function $Xe(){if(Zre)return AM;Zre=1;var e=Jbe(),t=h_();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],s=n[o];i[a]=[o,s,e(s)]}return i}return AM=r,AM}var PM,Qre;function eEe(){if(Qre)return PM;Qre=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return PM=e,PM}var RM,Jre;function WXe(){if(Jre)return RM;Jre=1;var e=jXe(),t=$Xe(),r=eEe();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return RM=n,RM}var OM,ene;function qx(){if(ene)return OM;ene=1;var e=m_(),t=v_();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return OM=r,OM}var IM,tne;function tEe(){if(tne)return IM;tne=1;var e=qx();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return IM=t,IM}var kM,rne;function GXe(){if(rne)return kM;rne=1;function e(t,r){return t!=null&&r in Object(t)}return kM=e,kM}var NM,nne;function KXe(){if(nne)return NM;nne=1;var e=m_(),t=Px(),r=co(),n=Rx(),i=uj(),a=v_();function o(s,l,c){l=e(l,s);for(var d=-1,f=l.length,h=!1;++d<f;){var p=a(l[d]);if(!(h=s!=null&&c(s,p)))break;s=s[p]}return h||++d!=f?h:(f=s==null?0:s.length,!!f&&i(f)&&n(p,f)&&(r(s)||t(s)))}return NM=o,NM}var DM,ine;function rEe(){if(ine)return DM;ine=1;var e=GXe(),t=KXe();function r(n,i){return n!=null&&t(n,i,e)}return DM=r,DM}var MM,ane;function YXe(){if(ane)return MM;ane=1;var e=Jj(),t=tEe(),r=rEe(),n=vj(),i=Jbe(),a=eEe(),o=v_(),s=1,l=2;function c(d,f){return n(d)&&i(f)?a(o(d),f):function(h){var p=t(h,d);return p===void 0&&p===f?r(h,d):e(f,p,s|l)}}return MM=c,MM}var LM,one;function C_(){if(one)return LM;one=1;function e(t){return t}return LM=e,LM}var FM,sne;function XXe(){if(sne)return FM;sne=1;function e(t){return function(r){return r?.[t]}}return FM=e,FM}var BM,lne;function ZXe(){if(lne)return BM;lne=1;var e=qx();function t(r){return function(n){return e(n,r)}}return BM=t,BM}var zM,cne;function QXe(){if(cne)return zM;cne=1;var e=XXe(),t=ZXe(),r=vj(),n=v_();function i(a){return r(a)?e(n(a)):t(a)}return zM=i,zM}var HM,une;function ms(){if(une)return HM;une=1;var e=WXe(),t=YXe(),r=C_(),n=co(),i=QXe();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return HM=a,HM}var UM,dne;function JXe(){if(dne)return UM;dne=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),s=i(r),l=s.length;l--;){var c=s[t?l:++a];if(n(o[c],c,o)===!1)break}return r}}return UM=e,UM}var VM,fne;function nEe(){if(fne)return VM;fne=1;var e=JXe(),t=e();return VM=t,VM}var qM,hne;function e$(){if(hne)return qM;hne=1;var e=nEe(),t=h_();function r(n,i){return n&&e(n,i,t)}return qM=r,qM}var jM,pne;function eZe(){if(pne)return jM;pne=1;var e=_m();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,s=n?o:-1,l=Object(i);(n?s--:++s<o)&&a(l[s],s,l)!==!1;);return i}}return jM=t,jM}var $M,mne;function t5(){if(mne)return $M;mne=1;var e=e$(),t=eZe(),r=t(e);return $M=r,$M}var WM,vne;function iEe(){if(vne)return WM;vne=1;var e=t5(),t=_m();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(s,l,c){o[++a]=i(s,l,c)}),o}return WM=r,WM}var GM,gne;function aEe(){if(gne)return GM;gne=1;var e=qd(),t=ms(),r=iEe(),n=co();function i(a,o){var s=n(a)?e:r;return s(a,t(o,3))}return GM=i,GM}var tZe=aEe();const yne=et(tZe);var KM,_ne;function oEe(){if(_ne)return KM;_ne=1;var e=u_(),t=Tx();function r(n,i,a){(a!==void 0&&!t(n[i],a)||a===void 0&&!(i in n))&&e(n,i,a)}return KM=r,KM}var YM,bne;function jx(){if(bne)return YM;bne=1;var e=_m(),t=jc();function r(n){return t(n)&&e(n)}return YM=r,YM}var XM,Ene;function sEe(){if(Ene)return XM;Ene=1;var e=ym(),t=M3(),r=jc(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,l=o.call(Object);function c(d){if(!r(d)||e(d)!=n)return!1;var f=t(d);if(f===null)return!0;var h=s.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&o.call(h)==l}return XM=c,XM}var ZM,wne;
41function lEe(){if(wne)return ZM;wne=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return ZM=e,ZM}var QM,Sne;function rZe(){if(Sne)return QM;Sne=1;var e=d_(),t=Ix();function r(n){return e(n,t(n))}return QM=r,QM}var JM,Cne;function nZe(){if(Cne)return JM;Cne=1;var e=oEe(),t=Q1e(),r=o_e(),n=D3(),i=s_e(),a=Px(),o=co(),s=jx(),l=f_(),c=Ax(),d=qs(),f=sEe(),h=Ox(),p=lEe(),g=rZe();function _(b,E,S,P,O,I,N){var M=p(b,S),F=p(E,S),B=N.get(F);if(B){e(b,S,B);return}var V=I?I(M,F,S+"",b,E,N):void 0,W=V===void 0;if(W){var $=o(F),X=!$&&l(F),re=!$&&!X&&h(F);V=F,$||X||re?o(M)?V=M:s(M)?V=n(M):X?(W=!1,V=t(F,!0)):re?(W=!1,V=r(F,!0)):V=[]:f(F)||a(F)?(V=M,a(M)?V=g(M):(!d(M)||c(M))&&(V=i(F))):W=!1}W&&(N.set(F,V),O(V,F,P,I,N),N.delete(F)),e(b,S,V)}return JM=_,JM}var e8,xne;function iZe(){if(xne)return e8;xne=1;var e=I3(),t=oEe(),r=nEe(),n=nZe(),i=qs(),a=Ix(),o=lEe();function s(l,c,d,f,h){l!==c&&r(c,function(p,g){if(h||(h=new e),i(p))n(l,c,g,d,s,f,h);else{var _=f?f(o(l,g),p,g+"",l,c,h):void 0;_===void 0&&(_=p),t(l,g,_)}},a)}return e8=s,e8}var t8,Tne;function r5(){if(Tne)return t8;Tne=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return t8=e,t8}var r8,Ane;function cEe(){if(Ane)return r8;Ane=1;var e=r5(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,l=t(o.length-i,0),c=Array(l);++s<l;)c[s]=o[i+s];s=-1;for(var d=Array(i+1);++s<i;)d[s]=o[s];return d[i]=a(c),e(n,this,d)}}return r8=r,r8}var n8,Pne;function aZe(){if(Pne)return n8;Pne=1;function e(t){return function(){return t}}return n8=e,n8}var i8,Rne;function oZe(){if(Rne)return i8;Rne=1;var e=aZe(),t=K1e(),r=C_(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return i8=n,i8}var a8,One;function uEe(){if(One)return a8;One=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var s=r(),l=t-(s-o);if(o=s,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return a8=n,a8}var o8,Ine;function t$(){if(Ine)return o8;Ine=1;var e=oZe(),t=uEe(),r=t(e);return o8=r,o8}var s8,kne;function bm(){if(kne)return s8;kne=1;var e=C_(),t=cEe(),r=t$();function n(i,a){return r(t(i,a,e),i+"")}return s8=n,s8}var l8,Nne;function n5(){if(Nne)return l8;Nne=1;var e=Tx(),t=_m(),r=Rx(),n=qs();function i(a,o,s){if(!n(s))return!1;var l=typeof o;return(l=="number"?t(s)&&r(o,s.length):l=="string"&&o in s)?e(s[o],a):!1}return l8=i,l8}var c8,Dne;function sZe(){if(Dne)return c8;Dne=1;var e=bm(),t=n5();function r(n){return e(function(i,a){var o=-1,s=a.length,l=s>1?a[s-1]:void 0,c=s>2?a[2]:void 0;for(l=n.length>3&&typeof l=="function"?(s--,l):void 0,c&&t(a[0],a[1],c)&&(l=s<3?void 0:l,s=1),i=Object(i);++o<s;){var d=a[o];d&&n(i,d,o,l)}return i})}return c8=r,c8}var u8,Mne;function lZe(){if(Mne)return u8;Mne=1;var e=iZe(),t=sZe(),r=t(function(n,i,a){e(n,i,a)});return u8=r,u8}var cZe=lZe();const Pc=et(cZe);var d8,Lne;function r$(){if(Lne)return d8;Lne=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return d8=e,d8}var f8,Fne;function dEe(){if(Fne)return f8;Fne=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return f8=e,f8}var h8,Bne;function uZe(){if(Bne)return h8;Bne=1;var e=qx(),t=dEe();function r(n,i){return i.length<2?n:e(n,t(i,0,-1))}return h8=r,h8}var p8,zne;function dZe(){if(zne)return p8;zne=1;var e=m_(),t=r$(),r=uZe(),n=v_(),i=Object.prototype,a=i.hasOwnProperty;function o(s,l){l=e(l,s);var c=-1,d=l.length;if(!d)return!0;for(;++c<d;){var f=n(l[c]);if(f==="__proto__"&&!a.call(s,"__proto__")||(f==="constructor"||f==="prototype")&&c<d-1)return!1}var h=r(s,l);return h==null||delete h[n(t(l))]}return p8=o,p8}var m8,Hne;function fZe(){if(Hne)return m8;Hne=1;var e=sEe();function t(r){return e(r)?void 0:r}return m8=t,m8}var v8,Une;function hZe(){if(Une)return v8;Une=1;var e=c_(),t=Px(),r=co(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return v8=i,v8}var g8,Vne;function x_(){if(Vne)return g8;Vne=1;var e=hj(),t=hZe();function r(n,i,a,o,s){var l=-1,c=n.length;for(a||(a=t),s||(s=[]);++l<c;){var d=n[l];i>0&&a(d)?i>1?r(d,i-1,a,o,s):e(s,d):o||(s[s.length]=d)}return s}return g8=r,g8}var y8,qne;function fEe(){if(qne)return y8;qne=1;var e=x_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return y8=t,y8}var _8,jne;function n$(){if(jne)return _8;jne=1;var e=fEe(),t=cEe(),r=t$();function n(i){return r(t(i,void 0,e),i+"")}return _8=n,_8}var b8,$ne;function pZe(){if($ne)return b8;$ne=1;var e=qd(),t=l_e(),r=dZe(),n=m_(),i=d_(),a=fZe(),o=n$(),s=pj(),l=1,c=2,d=4,f=o(function(h,p){var g={};if(h==null)return g;var _=!1;p=e(p,function(E){return E=n(E,h),_||(_=E.length>1),E}),i(h,s(h),g),_&&(g=t(g,l|c|d,a));for(var b=p.length;b--;)r(g,p[b]);return g});return b8=f,b8}var mZe=pZe();const Em=et(mZe);var E8,Wne;function vZe(){if(Wne)return E8;Wne=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return E8=t,E8}var w8,Gne;function hEe(){if(Gne)return w8;Gne=1;var e=vZe(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return w8=r,w8}var S8,Kne;function i$(){if(Kne)return S8;Kne=1;var e=hEe(),t=qs(),r=p_(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var f=a.test(c);return f||o.test(c)?s(c.slice(2),f?2:8):i.test(c)?n:+c}return S8=l,S8}var C8,Yne;function a$(){if(Yne)return C8;Yne=1;var e=i$(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*r}return i===i?i:0}return C8=n,C8}var x8,Xne;function o$(){if(Xne)return x8;Xne=1;var e=a$();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return x8=t,x8}var T8,Zne;function pEe(){if(Zne)return T8;Zne=1;var e=Vs(),t=o$(),r=i$(),n=e0(),i=e.isFinite,a=Math.min;function o(s){var l=Math[s];return function(c,d){if(c=r(c),d=d==null?0:a(t(d),292),d&&i(c)){var f=(n(c)+"e").split("e"),h=l(f[0]+"e"+(+f[1]+d)
41);return f=(n(h)+"e").split("e"),+(f[0]+"e"+(+f[1]-d))}return l(c)}}return T8=o,T8}var A8,Qne;function gZe(){if(Qne)return A8;Qne=1;var e=pEe(),t=e("round");return A8=t,A8}var yZe=gZe();const xi=et(yZe);var P8,Jne;function _Ze(){if(Jne)return P8;Jne=1;var e=k3(),t=Nx(),r=e$(),n=ms(),i=M3(),a=co(),o=f_(),s=Ax(),l=qs(),c=Ox();function d(f,h,p){var g=a(f),_=g||o(f)||c(f);if(h=n(h,4),p==null){var b=f&&f.constructor;_?p=g?new b:[]:l(f)?p=s(b)?t(i(f)):{}:p={}}return(_?e:r)(f,function(E,S,P){return h(p,E,S,P)}),p}return P8=d,P8}var bZe=_Ze();const EZe=et(bZe),mEe="cw:chunk-reload-attempt",UP="__cw_chunk_reload",wZe=60*1e3,SZe=5e3;function vEe(e){const t=Number(e);return Number.isFinite(t)&&t>0?t:null}function CZe(){try{const e=new URL(window.location.href),t=vEe(e.searchParams.get(UP));return e.searchParams.has(UP)&&(e.searchParams.delete(UP),window.history.replaceState(window.history.state,"",e.toString())),t}catch{return null}}let Gw=CZe();function xZe(){if(Gw)return Gw;try{Gw=vEe(window.sessionStorage.getItem(mEe))}catch{return null}return Gw}function TZe(e){Gw=e;try{window.sessionStorage.setItem(mEe,String(e));return}catch{try{const r=new URL(window.location.href);r.searchParams.set(UP,String(e)),window.history.replaceState(window.history.state,"",r.toString())}catch{return}}}function AZe(){let e=!1;const t=()=>{e||(e=!0,window.location.reload())};if(!navigator.serviceWorker?.getRegistration){t();return}const r=window.setTimeout(t,SZe);navigator.serviceWorker.getRegistration().then(async n=>{n&&(await n.update().catch(()=>{}),!n.waiting&&n.installing&&await Promise.race([new Promise(i=>{n.installing.addEventListener("statechange",i,{once:!0})}),new Promise(i=>window.setTimeout(i,1e3))]),n.waiting&&await Promise.race([new Promise(i=>{navigator.serviceWorker.addEventListener("controllerchange",i,{once:!0}),n.waiting.postMessage({type:"SKIP_WAITING"})}),new Promise(i=>window.setTimeout(i,2e3))]))}).catch(()=>{}).finally(()=>{window.clearTimeout(r),t()})}let PZe=class{constructor(){this.events={}}_getEventListByName(t){return typeof this.events[t]>"u"&&(this.events[t]=new Set),this.events[t]}on(t,r){this._getEventListByName(t).add(r)}once(t,r){const n=this,i=function(...a){n.removeListener(t,i),r.apply(n,a)};this.on(t,i)}emit(t,...r){this._getEventListByName(t).forEach((function(n){n.apply(this,r)}).bind(this))}removeListener(t,r){this._getEventListByName(t).delete(r)}};class me{static filterArrayByString(t,r){return r===""?t:(r=r.toLowerCase(),t.filter(n=>this.searchInObj(n,r)))}static searchInObj(t,r){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const i=t[n];if(typeof i=="string"){if(this.searchInString(i,r))return!0}else if(Array.isArray(i)&&this.searchInArray(i,r))return!0;if(typeof i=="object"&&this.searchInObj(i,r))return!0}}static searchInArray(t,r){for(const n of t)if(typeof n=="string"&&this.searchInString(n,r)||typeof n=="object"&&this.searchInObj(n,r))return!0}static searchInString(t,r){return t.toLowerCase().includes(r)}static generateGUID(){function t(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}
41return t()+t()}static toggleInArray(t,r){r.indexOf(t)===-1?r.push(t):r.splice(r.indexOf(t),1)}static handleize(t){return t.toString().toLowerCase().replace(/\s+/g,"-").replace(/\W+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}static setRoutes(t){let r=[...t.routes];return(t.settings||t.auth||t.userPermissions||t.userRolePermissions||t.modules)&&(r=r.map(n=>{const i=t.auth||n.auth?[...t.auth||[],...n.auth||[]]:null,a=t.modules||n.modules?[...t.modules||[],...n.modules||[]]:null,o=t.userPermissions||n.userPermissions?[...t.userPermissions||[],...n.userPermissions||[]]:null,s=t.userRolePermissions||n.userRolePermissions?[...t.userRolePermissions||[],...n.userRolePermissions||[]]:null;return{...n,auth:i,modules:a,userPermissions:o,userRolePermissions:s,settings:{...t.settings,...n.settings}}})),[...r]}static generateRoutesFromConfigs(t){let r=[];return t.forEach(n=>{r=[...r,...this.setRoutes(n)]}),r}static highestPriceFromSelectedSubcategories(t,r){const n={};return!t||!r||Object.values(r.add_ons).forEach(i=>{const a=t.addons[i.id];if(a&&i.use_value_of_most_expensive_subitem){let o=0;Object.values(i.subitems).filter(s=>a[s.id]).forEach(s=>{o<parseFloat(s.price)&&(o=s.price)}),n[i.id]=parseFloat(o)}}),n}static urlBuilder({subdomain:t,route:r="",defaultUrl:n="",queryParams:i=null}){const a=window.location.host.split(".").slice(1).join("."),o=window.location.protocol;let s=`${n}/${r}`;return a&&(s=`${o}//${t}.${a}/${r}`),i&&(s+="?"+i),s}static queryParamsObjectToString(t){return yne(t,function(r,n){return Array.isArray(r)?r.map(i=>`${n}[]=${i}`).join("&"):typeof r=="object"?yne(r,(i,a)=>Array.isArray(i)?i.map(o=>`${n}[${a}][]=${o}`).join("&"):`${n}[${a}]=${i}`).filter(Boolean).join("&"):!r&&r!==0||!n?null:n+"="+(r||r===0?r:"")},"").filter(Boolean).join("&")}static findById(t,r){if(t.id===r)return t;let n,i;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&typeof t[i]=="object"&&(n=this.findById(t[i],r),n))return n;return n}static predicateBy(t){return(r,n)=>r[t]>n[t]?1:r[t]<n[t]?-1:0}static getFlatNavigation(t,r){r=r||[];for(const n of t)if(n.type!=="subheader"){if(n.type==="item"){r.push({id:n.id,title:n.title,type:n.type,icon:n.icon||!1,url:n.url,auth:n.auth||null});continue}(n.type==="collapse"||n.type==="group")&&n.children&&this.getFlatNavigation(n.children,r)}return r}static randomMatColor(t){t=t||"400";const r=["red","pink","purple","deepPurple","indigo","blue","lightBlue","cyan","teal","green","lightGreen","lime","yellow","amber","orange","deepOrange"],n=r[Math.floor(Math.random()*r.length)];return fXe[n][t]}static difference(t,r){function n(i,a){return EZe(i,function(o,s,l){r0(s,a[l])||(o[l]=Kre(s)&&Kre(a[l])?n(s,a[l]):s)})}return n(t,r)}static EventEmitter=PZe;static updateNavItem(t,r,n){return t.map(i=>i.id===r?Pc({},i,n):i.children?Pc({},i,{children:this.updateNavItem(i.children,r,n)}):Pc({},i))}static removeNavItem(t,r){return t.map(n=>n.id===r?null:n.children?Pc({},Em(n,["children"]),{children:this.removeNavItem(n.children,r)}):Pc({},n)).filter(n=>n)}static prependNavItem(t,r,n){return n?t.map(i=>i.id===n&&i.children?{_item:i,children:[r,...i.children]}:i.children?Pc({},i,{children:this.prependNavItem(i.children,r,n)}):Pc({},i)):[r,...t]}static appendNavItem(t,r,n){return n?t.map(i=>i.id===n&&i.children?{_item:i,children:[...i.children,r]}:i.children?Pc({},i,{children:this.appendNavItem(i.children,r,n)}):Pc({},i)):[...t,r]}static hasPermission(t,r){return t==null?!0:t.length===0?!r||r.length===0:r&&Array.isArray(r)?t.some(n=>r.indexOf(n)>=0):t.includes(r)}static formatMonetaryValue(t,r=!1){let n="0,00",i="";return isNaN(parseFloat(t))||(n=Math.abs(parseFloat(t)).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."),parseFloat(t)<0&&(i="- ")),r?n=i+n:n=i+"R$ "+n,n}static formatNumber(t,r=2){function n(a){return a===+a&&a!==(a|0)}if(!t)return 0;const i=parseFloat(t.toString().replace(",","."));if(n(i)){const[a,o]=(r?i.toFixed(r):xi(i,5)).toString().split("."),s=a.replace(/\B(?=(\d{3})+(?!\d))/g,".");return o?`${s},${o}`:s}return i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}static formatCurrencyString=t=>(parseFloat(t)||0).toFixed(2).toString().replace(".",",");static currencyStringToFloat=t=>parseFloat((parseFloat(t?.toString().replace(",",".")||0)||0).toFixed(2));static validateCurrencyFormat=t=>!!t.match(/^(0|[1-9]\d*){1}([,.]\d{0,2})?$/g)||t===""?t.replace(".",","):null;static correctTime(t,r){return!r&&t?qe(t):r&&t?qe(t).add(r,"seconds"):qe()}static isPromotionalScheduleActive(t,r){if(!t?.promotional_price_schedules||!Array.isArray(t.promotional_price_schedules))return!1;const i=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][r.day()],a=t.promotional_price_schedules.find(o=>o.day===i);if(!a)return!1;if(!a.start&&!a.end)return!0;
41if(a.start&&a.end){const[o,s]=a.start.split(":").map(Number),[l,c]=a.end.split(":").map(Number),d=r.clone().set({hour:o,minute:s,second:0,millisecond:0}),f=r.clone().set({hour:l,minute:c,second:59,millisecond:999});return r.isBetween(d,f,null,"[]")}return!1}static getActivePromotionalPrice(t,r){if(!t?.promotional_price_active)return null;if(t.promotional_price_schedules&&Array.isArray(t.promotional_price_schedules)&&t.promotional_price_schedules.length>0)return this.isPromotionalScheduleActive(t,r)?t.promotional_price:null;if(t.promotional_price_availability&&Array.isArray(t.promotional_price_availability)){const i=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][r.day()];return t.promotional_price_availability.includes(i)?t.promotional_price:null}return null}static getSpecialOfferItem(t,r){return!t||!t.promotional_price_active?null:this.getActivePromotionalPrice(t,r)}static compressImage(t,r){return new Promise((n,i)=>{new NXe(t,{...r,success(a){n(a)},error(a){i(a)}})})}static validateName(t){return!!(t&&/^[\S]+( [\S]+)*$/gi.test(t.trim()))}static smartImport(t,r=1,n=1e3){return new Promise((i,a)=>{t().then(i).catch(o=>{setTimeout(()=>{if(r===1){const s=Date.now(),l=xZe(),c=l?s-l:null;if(c!==null&&c>=0&&c<wZe){a(o);return}TZe(s),AZe();return}this.smartImport(t,r-1,n).then(i,a)},n)})})}static buildFormData(t,r,n){if(r&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof File))Object.keys(r).forEach(i=>{this.buildFormData(t,r[i],n?`${n}[${i}]`:i)});else if(Array.isArray(r))t.append(n,JSON.stringify(r));else{const i=r??"";t.append(n,i)}}static convertNumberToFloat(t){return typeof t=="number"?t:typeof t=="string"?parseFloat(t.replace(",",".")||0):0}static sumNumbersCorrectly(t,r){const n=this.convertNumberToFloat(t),i=this.convertNumberToFloat(r);return parseFloat((n+i).toFixed(4)).toString().replace(".",",")}static isPromise(t){return!!(t&&typeof t.then=="function")}static isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}}function $x(){const e=at(({auth:t})=>t.user.user?.organization);return x.useMemo(()=>({organization:e,isResellerOrganization:e?.kind==="partner_reseller",isCWOrganization:e?.kind==="cardapio_web"}),[e])}function i5(e,t){const r=x.useCallback(n=>{t&&n.ctrlKey&&(Array.isArray(e)?e.includes(n.key):n.key===e)&&(n.preventDefault(),t(n.key))},[t,e]);return x.useEffect(()=>(window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r)}),[r]),null}var R8,eie;function RZe(){if(eie)return R8;eie=1;var e=Vs(),t=function(){return e.Date.now()};return R8=t,R8}var O8,tie;function gEe(){if(tie)return O8;tie=1;var e=qs(),t=RZe(),r=i$(),n="Expected a function",i=Math.max,a=Math.min;function o(s,l,c){var d,f,h,p,g,_,b=0,E=!1,S=!1,P=!0;if(typeof s!="function")throw new TypeError(n);l=r(l)||0,e(c)&&(E=!!c.leading,S="maxWait"in c,h=S?i(r(c.maxWait)||0,l):h,P="trailing"in c?!!c.trailing:P);function O(X){var re=d,ae=f;return d=f=void 0,b=X,p=s.apply(ae,re),p}function I(X){return b=X,g=setTimeout(F,l),E?O(X):p}function N(X){var re=X-_,ae=X-b,Q=l-re;return S?a(Q,h-ae):Q}function M(X){var re=X-_,ae=X-b;return _===void 0||re>=l||re<0||S&&ae>=h}function F(){var X=t();if(M(X))return B(X);g=setTimeout(F,N(X))}function B(X){return g=void 0,P&&d?O(X):(d=f=void 0,p)}function V(){g!==void 0&&clearTimeout(g),b=0,d=_=f=g=void 0}function W(){return g===void 0?p:B(t())}function $(){var X=t(),re=M(X);if(d=arguments,f=this,_=X,re){if(g===void 0)return I(_);if(S)return clearTimeout(g),g=setTimeout(F,l),O(_)}return g===void 0&&(g=setTimeout(F,l)),p}return $.cancel=V,$.flush=W,$}return O8=o,O8}var OZe=gEe();const a5=et(OZe),wm=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data}),IZe=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return{total:t.headers.total,data:t.data}}),Der=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return{data:t.data.data,meta:t.data.meta,total:t.data.meta?.total||0}});var I8={exports:{}},k8={},rie;
41function kZe(){if(rie)return k8;rie=1;var e=Dt();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,h){var p=h(),g=n({inst:{value:p,getSnapshot:h}}),_=g[0].inst,b=g[1];return a(function(){_.value=p,_.getSnapshot=h,l(_)&&b({inst:_})},[f,p,h]),i(function(){return l(_)&&b({inst:_}),f(function(){l(_)&&b({inst:_})})},[f]),o(p),p}function l(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!r(f,p)}catch{return!0}}function c(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return k8.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,k8}var nie;function yEe(){return nie||(nie=1,I8.exports=kZe()),I8.exports}var jz=yEe(),iie=Object.prototype.hasOwnProperty;function $z(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&$z(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(iie.call(e,r)&&++n&&!iie.call(t,r)||!(r in t)||!$z(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}const _Ee=0,bEe=1,EEe=2,aie=3,wEe=4,Ic=new WeakMap,If=()=>{},ca=If(),Wz=Object,en=e=>e===ca,bu=e=>typeof e=="function",Vf=(e,t)=>({...e,...t}),Gz=e=>bu(e.then),N8={},zT={},s$="undefined",Wx=typeof window!=s$,Kz=typeof document!=s$,NZe=Wx&&"Deno"in window,DZe=()=>Wx&&typeof window.requestAnimationFrame!=s$,vp=(e,t)=>{const r=Ic.get(e);return[()=>!en(t)&&e.get(t)||N8,n=>{if(!en(t)){const i=e.get(t);t in zT||(zT[t]=i),r[5](t,Vf(i,n),i||N8)}},r[6],()=>!en(t)&&t in zT?zT[t]:!en(t)&&e.get(t)||N8]};let Yz=!0;const MZe=()=>Yz,[Xz,Zz]=Wx&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[If,If],LZe=()=>{const e=Kz&&document.visibilityState;return en(e)||e!=="hidden"},FZe=e=>(Kz&&document.addEventListener("visibilitychange",e),Xz("focus",e),()=>{Kz&&document.removeEventListener("visibilitychange",e),Zz("focus",e)}),BZe=e=>{const t=()=>{Yz=!0,e()},r=()=>{Yz=!1};return Xz("online",t),Xz("offline",r),()=>{Zz("online",t),Zz("offline",r)}},zZe={isOnline:MZe,isVisible:LZe},HZe={initFocus:FZe,initReconnect:BZe},oie=!u.useId,kv=!Wx||NZe,UZe=e=>DZe()?window.requestAnimationFrame(e):setTimeout(e,1),Kw=kv?x.useEffect:x.useLayoutEffect,D8=typeof navigator<"u"&&navigator.connection,sie=!kv&&D8&&(["slow-2g","2g"].includes(D8.effectiveType)||D8.saveData),HT=new WeakMap,VZe=e=>Wz.prototype.toString.call(e),M8=(e,t)=>e===`[object ${t}]`;let qZe=0;const Qz=e=>{const t=typeof e,r=VZe(e),n=M8(r,"Date"),i=M8(r,"RegExp"),a=M8(r,"Object");let o,s;if(Wz(e)===e&&!n&&!i){if(o=HT.get(e),o)return o;if(o=++qZe+"~",HT.set(e,o),Array.isArray(e)){for(o="@",s=0;s<e.length;s++)o+=Qz(e[s])+",";HT.set(e,o)}if(a){o="#";const l=Wz.keys(e).sort();for(;!en(s=l.pop());)en(e[s])||(o+=s+":"+Qz(e[s])+",");HT.set(e,o)}}else o=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},f1=e=>{if(bu(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Qz(e):"",[e,t]};let jZe=0;const oO=()=>++jZe;async function SEe(...e){const[t,r,n,i]=e,a=Vf({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=a.populateCache;const s=a.rollbackOnError;let l=a.optimisticData;const c=h=>typeof s=="function"?s(h):s!==!1,d=a.throwOnError;if(bu(r)){const h=r,p=[],g=t.keys();for(const _ of g)!/^\$(inf|sub)\$/.test(_)&&h(t.get(_)._k)&&p.push(_);return Promise.all(p.map(f))}return f(r);async function f(h){const[p]=f1(h);if(!p)return;const[g,_]=vp(t,p),[b,E,S,P]=Ic.get(t),O=()=>{const re=b[p];return(bu(a.revalidate)?a.revalidate(g().data,h):a.revalidate!==!1)&&(delete S[p],delete P[p],re&&re[0])?re[0](EEe).then(()=>g().data):g().data};if(e.length<3)return O();let I=n,N,M=!1;const F=oO();E[p]=[F,0];const B=!en(l),V=g(),W=V.data,$=V._c,X=en($)?W:$;if(B&&(l=bu(l)?l(X,W):l,_({data:l,_c:X})),bu(I))try{I=I(X)}catch(re){N=re,M=!0}if(I&&Gz(I))if(I=await I.catch(re=>{N=re,M=!0}
41),F!==E[p][0]){if(M)throw N;return I}else M&&B&&c(N)&&(o=!0,_({data:X,_c:ca}));if(o&&!M)if(bu(o)){const re=o(I,X);_({data:re,error:ca,_c:ca})}else _({data:I,error:ca,_c:ca});if(E[p][1]=oO(),Promise.resolve(O()).then(()=>{_({_c:ca})}),M){if(d)throw N;return}return I}}const lie=(e,t)=>{for(const r in e)e[r][0]&&e[r][0](t)},$Ze=(e,t)=>{if(!Ic.has(e)){const n=Vf(HZe,t),i=Object.create(null),a=SEe.bind(ca,e);let o=If;const s=Object.create(null),l=(h,p)=>{const g=s[h]||[];return s[h]=g,g.push(p),()=>{const _=g.indexOf(p);_>=0&&(g[_]=g[g.length-1],g.pop())}},c=(h,p,g)=>{e.set(h,p);const _=s[h];if(_)for(const b of _)b(p,g)},d=h=>{const p=Ic.get(e),[,g,_,b]=p,E=oO();p[8]++;for(const O in _)delete _[O];for(const O in b)delete b[O];for(const O in g)g[O]=[E,E];const S={};for(const O of[...e.keys()]){const I=e.get(O);e.delete(O);const N=s[O];if(N)for(const M of N)M(S,I)}const P=!h||h.revalidate!==!1;for(const O in i){const I=i[O];for(let N=0;N<I.length;N++)I[N](wEe,{revalidate:P&&!N})}},f=()=>{if(!Ic.has(e)&&(Ic.set(e,[i,Object.create(null),Object.create(null),Object.create(null),a,c,l,d,0]),!kv)){const h=n.initFocus(setTimeout.bind(ca,lie.bind(ca,i,_Ee))),p=n.initReconnect(setTimeout.bind(ca,lie.bind(ca,i,bEe)));o=()=>{h&&h(),p&&p(),Ic.delete(e)}}};return f(),[e,a,f,o,d]}const r=Ic.get(e);return[e,r[4],ca,ca,r[7]]},WZe=(e,t,r,n,i)=>{const a=r.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;!en(a)&&o>a||setTimeout(n,s,i)},GZe=$z,[l$,KZe,,,YZe]=$Ze(new Map),XZe=Vf({onLoadingSlow:If,onSuccess:If,onError:If,onErrorRetry:WZe,onDiscarded:If,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:sie?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:sie?5e3:3e3,compare:GZe,isPaused:()=>!1,cache:l$,mutate:KZe,unload:YZe,fallback:{}},zZe),ZZe=(e,t)=>{const r=Vf(e,t);if(t){const{use:n,fallback:i,cacheData:a}=e,{use:o,fallback:s,cacheData:l}=t;n&&o&&(r.use=n.concat(o)),i&&s&&(r.fallback=Vf(i,s)),a&&l&&(r.cacheData=Vf(a,l))}return r},QZe=x.createContext({}),CEe="$inf$",xEe=Wx&&window.__SWR_DEVTOOLS_USE__,JZe=xEe?window.__SWR_DEVTOOLS_USE__:[],eQe=()=>{xEe&&(window.__SWR_DEVTOOLS_REACT__=u)},TEe=e=>bu(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],di=()=>{const e=x.useContext(QZe);return x.useMemo(()=>Vf(XZe,e),[e])},tQe=e=>(t,r,n)=>e(t,r&&((...a)=>{const[o]=f1(t),[,,,s]=Ic.get(l$);if(o.startsWith(CEe))return r(...a);const l=s[o];return en(l)?r(...a):(delete s[o],l)}),n),rQe=JZe.concat(tQe),nQe=e=>function(...r){const n=di(),[i,a,o]=TEe(r),s=ZZe(n,o);let l=e;const{use:c}=s,d=(c||[]).concat(rQe);for(let f=d.length;f--;)l=d[f](l);return l(i,a||s.fetcher||null,s)},iQe=(e,t,r)=>{const n=t[e]||(t[e]=[]);return n.push(r),()=>{const i=n.indexOf(r);i>=0&&(n[i]=n[n.length-1],n.pop())}},AEe=(e,t)=>(...r)=>{const[n,i,a]=TEe(r),o=(a.use||[]).concat(t);return e(n,i,{...a,use:o})};eQe();const UT=u.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),L8={dedupe:!0},sO=Promise.resolve(ca);sO.status="fulfilled";sO.value=ca;const aQe=()=>If,oQe=(e,t,r)=>{var n;const{cache:i,compare:a,suspense:o,fallbackData:s,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:d,refreshWhenHidden:f,refreshWhenOffline:h,keepPreviousData:p,strictServerPrefetchWarning:g}=r,[_,b,E,S]=Ic.get(i),[P,O]=f1(e),I=x.useRef(!1),N=x.useRef(!1),M=x.useRef(P),F=x.useRef(t),B=x.useRef(r),V=()=>B.current,W=()=>V().isVisible()&&V().isOnline(),[$,X,re,ae]=vp(i,P),Q=x.useRef({}).current,ie=en(s)?en(r.fallback)?ca:r.fallback[P]:s,le=P?(n=r.cacheData)==null?void 0:n[P]:ca,fe=P?S[P]:ca,de=en(fe)&&!en(le),ge=de?le:fe,Ae=(qt,hr)=>{for(const rr in Q){const tr=rr;if(tr==="data"){if(!a(qt[tr],hr[tr])&&(!en(qt[tr])||!a(ut,hr[tr])))return!1}else if(hr[tr]!==qt[tr])return!1}return!0},Fe=!I.current,Pe=x.useMemo(()=>{const qt=$(),hr=ae(),rr=nr=>{const Ee=Vf(nr);return delete Ee._k,(()=>{if(!P||!t||V().isPaused())return!1;if(Fe&&!en(l))return l;if(o&&de)return!1;const Re=en(ie)?Ee.data:ie;return en(Re)||c})()?{isValidating:!0,isLoading:!0,...Ee}:Ee},tr=rr(qt),dt=qt===hr?tr:rr(hr);let bt=tr;return[()=>{const nr=rr($());return Ae(nr,bt)?(bt.data=nr.data,bt.isLoading=nr.isLoading,bt.isValidating=nr.isValidating,bt.error=nr.error,bt):(bt=nr,nr)},()=>dt]},[i,P]),ce=jz.useSyncExternalStore(x.useCallback(qt=>re(P,(hr,rr)=>{Ae(rr,hr)||qt()}),[i,P]),Pe[0],Pe[1]),pe=_[P]&&_[P].length>0,Ne=ce.data;let De=en(Ne)?ie&&Gz(ie)?UT(ie):ie:Ne;const Ve=ce.error,Ke=x.useRef(De),Qe=x.useRef(!1),Ue=x.useRef(null);let ut=p?en(Ne)?en(Ke.current)?De:Ke.current:Ne:De;const We=P&&en(De),ke=x.useRef(null);!kv&&jz.useSyncExternalStore(aQe,()=>(ke.current=!1,ke),()=>(ke.current=!0,ke));const Le=ke.current;g&&Le&&!o&&We&&console.warn(`Missing pre-initiated data for serialized key "${P}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Be=!P||!t||V().isPaused()||pe&&!en(Ve)?!1:Fe&&!en(l)?l:o&&de?!1:o?en(De)?!1:c:en(De)||c,Ze=Fe&&Be,Et=en(ce.isValidating)?Ze:ce.isValidating,Yt=en(ce.isLoading)?Ze:ce.isLoading,sr=x.useCallback(async qt=>{const hr=F.current;if(!P||!hr||N.current||V().isPaused())return!1;let rr,tr,dt=!0;const bt=qt||{}
41,nr=!E[P]||!bt.dedupe,Ee=de&&!Qe.current&&!en(ge)&&en($().data),Oe=()=>oie?!N.current&&P===M.current&&I.current:P===M.current,Re={isValidating:!1,isLoading:!1},pt=()=>{X(Re)},mt=()=>{const ze=E[P];ze&&ze[1]===tr&&delete E[P]},st={isValidating:!0};en($().data)&&(st.isLoading=!0);try{if(nr&&(X(st),r.loadingTimeout&&en($().data)&&setTimeout(()=>{dt&&Oe()&&V().onLoadingSlow(P,r)},r.loadingTimeout),Ee&&(Qe.current=!0),E[P]=[Ee?ge:hr(O),oO()],Ee&&S[P]&&delete S[P]),[rr,tr]=E[P],rr=await rr,nr&&setTimeout(mt,r.dedupingInterval),!E[P]||E[P][1]!==tr)return nr&&Oe()&&V().onDiscarded(P),!1;Re.error=ca;const ze=b[P];if(!en(ze)&&(tr<=ze[0]||tr<=ze[1]||ze[1]===0))return pt(),nr&&Oe()&&V().onDiscarded(P),!1;const it=$().data;Re.data=a(it,rr)?it:rr,nr&&Oe()&&V().onSuccess(rr,P,r)}catch(ze){mt();const it=V(),{shouldRetryOnError:Je}=it;it.isPaused()||(Re.error=ze,nr&&Oe()&&(it.onError(ze,P,it),(Je===!0||bu(Je)&&Je(ze))&&(!V().revalidateOnFocus||!V().revalidateOnReconnect||W())&&it.onErrorRetry(ze,P,it,Jt=>{const pr=_[P];pr&&pr[0]&&pr[0](aie,Jt)},{retryCount:(bt.retryCount||0)+1,dedupe:!0})))}return dt=!1,pt(),!0},[P,i]),Kt=x.useCallback((...qt)=>SEe(i,M.current,...qt),[]);if(Kw(()=>{const qt=Ue.current;qt&&(Ue.current=null,en($().data)&&X({data:qt.data,error:ca,_k:qt._k}),S[qt.key]&&delete S[qt.key])}),Kw(()=>{F.current=t,B.current=r,en(Ne)||(Ke.current=Ne)}),Kw(()=>{if(!P)return;const qt=sr.bind(ca,L8);let hr=0;V().revalidateOnFocus&&(hr=Date.now()+V().focusThrottleInterval);const tr=iQe(P,_,(dt,bt={})=>{if(dt==_Ee){const nr=Date.now();V().revalidateOnFocus&&nr>hr&&W()&&(hr=nr+V().focusThrottleInterval,qt())}else if(dt==bEe)V().revalidateOnReconnect&&W()&&qt();else{if(dt==EEe)return sr();if(dt==aie)return sr(bt);if(dt==wEe&&(Ke.current=ca,bt.revalidate))return sr()}});return N.current=!1,M.current=P,I.current=!0,X({_k:O}),Be&&(E[P]||(en(De)||kv?qt():UZe(qt))),()=>{N.current=!0,tr()}},[P]),Kw(()=>{let qt;function hr(){const tr=bu(d)?d($().data):d;tr&&qt!==-1&&(qt=setTimeout(rr,tr))}function rr(){!$().error&&(f||V().isVisible())&&(h||V().isOnline())?sr(L8).then(hr):hr()}return hr(),()=>{qt&&(clearTimeout(qt),qt=-1)}},[d,f,h,P]),x.useDebugValue(ut),o){if(!oie&&kv&&We&&en(ge))throw new Error("Fallback data is required when using Suspense in SSR.");We&&(F.current=t,B.current=r,N.current=!1);const qt=!en(ge)&&We;let hr=ca;if(qt&&de)hr=ge&&Gz(ge)?UT(ge):ge,De=hr,ut=hr,kv||(Qe.current=!0,Ue.current={data:hr,_k:O,key:P});else{const tr=qt?Kt(ge):sO;UT(tr)}if(!en(Ve)&&We)throw Ve;const rr=We&&en(hr)?sr(L8):sO;!en(ut)&&We&&(rr.status="fulfilled",rr.value=!0),UT(rr)}return{mutate:Kt,get data(){return Q.data=!0,ut},get error(){return Q.error=!0,Ve},get isValidating(){return Q.isValidating=!0,Et},get isLoading(){return Q.isLoading=!0,Yt}}},Ll=nQe(oQe),sQe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function PEe(e){return typeof e=="string"&&sQe.test(e)}const as=[];for(let e=0;e<256;++e)as.push((e+256).toString(16).slice(1));function lQe(e,t=0){return(as[e[t+0]]+as[e[t+1]]+as[e[t+2]]+as[e[t+3]]+"-"+as[e[t+4]]+as[e[t+5]]+"-"+as[e[t+6]]+as[e[t+7]]+"-"+as[e[t+8]]+as[e[t+9]]+"-"+as[e[t+10]]+as[e[t+11]]+as[e[t+12]]+as[e[t+13]]+as[e[t+14]]+as[e[t+15]]).toLowerCase()}const cQe=new Uint8Array(16);function uQe(){return crypto.getRandomValues(cQe)}const F8={};function dQe(e,t,r){let n;{const i=Date.now(),a=uQe();fQe(F8,i,a),n=hQe(a,F8.msecs,F8.seq,t,r)}return t??lQe(n)}function fQe(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function hQe(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}function pQe(e){if(!PEe(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}const REe="cw_device_id";let gb=null;function cie(e){return typeof e=="string"&&PEe(e)&&pQe(e)===7}function mQe(){try{return localStorage.getItem(REe)}catch{return null}}function uie(e){try{localStorage.setItem(REe,e)}catch{}}function vQe(){const e=mQe();if(cie(e))return gb=e,e;if(cie(gb))return uie(gb),gb;const t=dQe();return gb=t,uie(t),t}async function OEe(e,t,r=null,n=null){const i={grant_type:"user_credentials",email:e,password:t,device_id:vQe()};return r&&(i.otp_code=r),n&&(i.recaptcha_token=n),(await ht.post("/api/v2/auth/token",i)).data}async function IEe(e){return(await ht.post("/api/v2/auth/token",{grant_type:"refresh_token",refresh_token:e})).data}async function kEe(e){return(await ht.post("/api/v2/auth/proxy_token",{email:e})).data}async function o5(){const e=localStorage.getItem("active_company_id"),t={};return e&&(t.headers={Companyid:e}),(await ht.get("/api/v2/user/profile",t)).data}async function gQe(){return(await ht.get("/api/v2/auth/firebase_token")).data}async function yQe(e){return(await ht.delete(`/api/v2/user/companies/${e}`)).data}const _Qe=Object.freeze(Object.defineProperty({__proto__:null,getFirebaseToken:gQe,getUserProfile:o5,proxyUserToken:kEe,refreshAccessToken:IEe,removeUserCompany:yQe,signIn:OEe},Symbol.toStringTag,{value:"Module"}));
41class Yw extends Error{}Yw.prototype.name="InvalidTokenError";function bQe(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function EQe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return bQe(t)}catch{return atob(t)}}function s5(e,t){if(typeof e!="string")throw new Yw("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new Yw(`Invalid token specified: missing part #${r+1}`);let i;try{i=EQe(n)}catch(a){throw new Yw(`Invalid token specified: invalid base64 for part #${r+1} (${a.message})`)}try{return JSON.parse(i)}catch(a){throw new Yw(`Invalid token specified: invalid json for part #${r+1} (${a.message})`)}}const Fi={accessTokenStorageKey:"access_token",refreshTokenStorageKey:"refresh_token",authHeaderKey:"Authorization",userEmailQueryParamKey:"userEmail",tokenRefreshInterval:1e3*60*8,tokenExpirationThreshold:3600*2};let VT=!1;const Jz={beginLogout(){return VT?!1:(VT=!0,!0)},isInProgress(){return VT},reset(){VT=!1}},qi={set(e,t){localStorage.setItem(Fi.accessTokenStorageKey,e),localStorage.setItem(Fi.refreshTokenStorageKey,t),this.getTmpAccessToken()||(ht.defaults.headers.common[Fi.authHeaderKey]=e)},setAccessToken(e){this.getTmpAccessToken()?(sessionStorage.setItem(Fi.accessTokenStorageKey,e),ht.defaults.headers.common[Fi.authHeaderKey]=e):(localStorage.setItem(Fi.accessTokenStorageKey,e),ht.defaults.headers.common[Fi.authHeaderKey]=e)},setHeader(e){ht.defaults.headers.common[Fi.authHeaderKey]=e},reset(){localStorage.removeItem(Fi.accessTokenStorageKey),delete ht.defaults.headers.common[Fi.authHeaderKey]},resetRefreshToken(){localStorage.removeItem(Fi.refreshTokenStorageKey)},setTmp(e){sessionStorage.setItem(Fi.accessTokenStorageKey,e),ht.defaults.headers.common[Fi.authHeaderKey]=e},resetTmp(){sessionStorage.removeItem(Fi.accessTokenStorageKey),delete ht.defaults.headers.common[Fi.authHeaderKey]},logout(){this.getTmpAccessToken()?this.resetTmp():(this.reset(),this.resetRefreshToken())},getAccessToken(){return localStorage.getItem(Fi.accessTokenStorageKey)},getTmpAccessToken(){return sessionStorage.getItem(Fi.accessTokenStorageKey)},getCurrentAccessToken(){return this.getTmpAccessToken()||this.getAccessToken()},getRefreshToken(){return localStorage.getItem(Fi.refreshTokenStorageKey)},getRefreshTokenId(){const e=this.getRefreshToken();if(this.getTmpAccessToken()||!e)return null;try{return s5(e).jti}catch{return null}}};function VP(e){if(e)try{const t=s5(e),r=Date.now()/1e3;return t.exp>r}catch{return!1}return!1}function Mer(e){if(e)try{return!!s5(e).otp_method}catch{return!1}return!1}const wQe=()=>{};var die={};const NEe={NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},ur=function(e,t){if(!e)throw T_(t)},T_=function(e){return new Error("Firebase Database ("+NEe.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},DEe=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):(i&64512)===55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128)}return t},SQe=function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const a=e[r++];t[n++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=e[r++],o=e[r++],s=e[r++],l=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;t[n++]=String.fromCharCode(55296+(l>>10)),t[n++]=String.fromCharCode(56320+(l&1023))}else{const a=e[r++],o=e[r++];t[n++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return t.join("")},c$={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const a=e[i],o=i+1<e.length,s=o?e[i+1]:0,l=i+2<e.length,c=l?e[i+2]:0,d=a>>2,f=(a&3)<<4|s>>4;let h=(s&15)<<2|c>>6,p=c&63;l||(p=64,o||(h=64)),n.push(r[d],r[f],r[h],r[p])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(DEe(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):SQe(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const a=r[e.charAt(i++)],s=i<e.length?r[e.charAt(i)]:0;++i;const c=i<e.length?r[e.charAt(i)]:64;++i;const f=i<e.length?r[e.charAt(i)]:64;if(++i,a==null||s==null||c==null||f==null)throw new CQe;const h=a<<2|s>>4;if(n.push(h),c!==64){const p=s<<4&240|c>>2;if(n.push(p),f!==64){const g=c<<6&192|f;n.push(g)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
41class CQe extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const MEe=function(e){const t=DEe(e);return c$.encodeByteArray(t,!0)},lO=function(e){return MEe(e).replace(/\./g,"")},cO=function(e){try{return c$.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function xQe(e){return LEe(void 0,e)}function LEe(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const r=t;return new Date(r.getTime());case Object:e===void 0&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)!t.hasOwnProperty(r)||!TQe(r)||(e[r]=LEe(e[r],t[r]));return e}function TQe(e){return e!=="__proto__"}function AQe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("Unable to locate global object.")}const PQe=()=>AQe().__FIREBASE_DEFAULTS__,RQe=()=>{if(typeof process>"u"||typeof die>"u")return;const e=die.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},OQe=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&cO(e[1]);return t&&JSON.parse(t)},u$=()=>{try{return wQe()||PQe()||RQe()||OQe()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},FEe=e=>u$()?.emulatorHosts?.[e],IQe=e=>{const t=FEe(e);if(!t)return;const r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const n=parseInt(t.substring(r+1),10);return t[0]==="["?[t.substring(1,r-1),n]:[t.substring(0,r),n]},BEe=()=>u$()?.config,zEe=e=>u$()?.[`_${e}`];class vd{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r})}wrapCallback(t){return(r,n)=>{r?this.reject(r):this.resolve(n),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(r):t(r,n))}}}function kQe(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r={alg:"none",type:"JWT"},n=t||"demo-project",i=e.iat||0,a=e.sub||e.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o={iss:`https://securetoken.google.com/${n}`,aud:n,iat:i,exp:i+3600,auth_time:i,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}},...e};return[lO(JSON.stringify(r)),lO(JSON.stringify(o)),""].join(".")}function ul(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function d$(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ul())}function NQe(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function DQe(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function HEe(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function MQe(){const e=ul();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function LQe(){return NEe.NODE_ADMIN===!0}function UEe(){try{return typeof indexedDB=="object"}catch{return!1}}function VEe(){return new Promise((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{t(i.error?.message||"")}}catch(r){t(r)}})}function FQe(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}const BQe="FirebaseError";class Ch extends Error{constructor(t,r,n){super(r),this.code=t,this.customData=n,this.name=BQe,Object.setPrototypeOf(this,Ch.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,n0.prototype.create)}}class n0{constructor(t,r,n){this.service=t,this.serviceName=r,this.errors=n}create(t,...r){const n=r[0]||{},i=`${this.service}/${t}`,a=this.errors[t],o=a?zQe(a,n):"Error",s=`${this.serviceName}: ${o} (${i}).`;return new Ch(i,s,n)}}function zQe(e,t){try{let r=0,n="";for(;r<e.length;){const i=e.indexOf("{$",r);if(i===-1){n+=e.substring(r);break}const a=e.indexOf("}",i+2);if(a===-1){n+=e.substring(r);break}const o=e.substring(i+2,a),s=t[o];n+=e.substring(r,i)+(s!=null?String(s):`<${o}?>`),r=a+1}return n}catch{return e}}function lC(e){return JSON.parse(e)}function Lo(e){return JSON.stringify(e)}const qEe=function(e){let t={},r={},n={},i="";try{const a=e.split(".");
41t=lC(cO(a[0])||""),r=lC(cO(a[1])||""),i=a[2],n=r.d||{},delete r.d}catch{}return{header:t,claims:r,data:n,signature:i}},HQe=function(e){const t=qEe(e),r=t.claims;return!!r&&typeof r=="object"&&r.hasOwnProperty("iat")},UQe=function(e){const t=qEe(e).claims;return typeof t=="object"&&t.admin===!0};function Wd(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h1(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]}function uO(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function dO(e,t,r){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t.call(r,e[i],i,e));return n}function hg(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const i of r){if(!n.includes(i))return!1;const a=e[i],o=t[i];if(fie(a)&&fie(o)){if(!hg(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function fie(e){return e!==null&&typeof e=="object"}function A_(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(i=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class VQe{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(t,r){r||(r=0);const n=this.W_;if(typeof t=="string")for(let f=0;f<16;f++)n[f]=t.charCodeAt(r)<<24|t.charCodeAt(r+1)<<16|t.charCodeAt(r+2)<<8|t.charCodeAt(r+3),r+=4;else for(let f=0;f<16;f++)n[f]=t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3],r+=4;for(let f=16;f<80;f++){const h=n[f-3]^n[f-8]^n[f-14]^n[f-16];n[f]=(h<<1|h>>>31)&4294967295}let i=this.chain_[0],a=this.chain_[1],o=this.chain_[2],s=this.chain_[3],l=this.chain_[4],c,d;for(let f=0;f<80;f++){f<40?f<20?(c=s^a&(o^s),d=1518500249):(c=a^o^s,d=1859775393):f<60?(c=a&o|s&(a|o),d=2400959708):(c=a^o^s,d=3395469782);const h=(i<<5|i>>>27)+c+l+d+n[f]&4294967295;l=s,s=o,o=(a<<30|a>>>2)&4294967295,a=i,i=h}this.chain_[0]=this.chain_[0]+i&4294967295,this.chain_[1]=this.chain_[1]+a&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+s&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295}update(t,r){if(t==null)return;r===void 0&&(r=t.length);const n=r-this.blockSize;let i=0;const a=this.buf_;let o=this.inbuf_;for(;i<r;){if(o===0)for(;i<=n;)this.compress_(t,i),i+=this.blockSize;if(typeof t=="string"){for(;i<r;)if(a[o]=t.charCodeAt(i),++o,++i,o===this.blockSize){this.compress_(a),o=0;break}}else for(;i<r;)if(a[o]=t[i],++o,++i,o===this.blockSize){this.compress_(a),o=0;break}}this.inbuf_=o,this.total_+=r}digest(){const t=[];let r=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let i=this.blockSize-1;i>=56;i--)this.buf_[i]=r&255,r/=256;this.compress_(this.buf_);let n=0;for(let i=0;i<5;i++)for(let a=24;a>=0;a-=8)t[n]=this.chain_[i]>>a&255,++n;return t}}function qQe(e,t){const r=new jQe(e,t);return r.subscribe.bind(r)}class jQe{constructor(t,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{t(this)}).catch(n=>{this.error(n)})}next(t){this.forEachObserver(r=>{r.next(t)})}error(t){this.forEachObserver(r=>{r.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,r,n){let i;if(t===void 0&&r===void 0&&n===void 0)throw new Error("Missing Observer.");$Qe(t,["next","error","complete"])?i=t:i={next:t,error:r,complete:n},i.next===void 0&&(i.next=B8),i.error===void 0&&(i.error=B8),i.complete===void 0&&(i.complete=B8);const a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),a}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,t)}sendOne(t,r){this.task.then(()=>
41{if(this.observers!==void 0&&this.observers[t]!==void 0)try{r(this.observers[t])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function $Qe(e,t){if(typeof e!="object"||e===null)return!1;for(const r of t)if(r in e&&typeof e[r]=="function")return!0;return!1}function B8(){}function p1(e,t){return`${e} failed: ${t} argument `}const WQe=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i>=55296&&i<=56319){const a=i-55296;n++,ur(n<e.length,"Surrogate pair missing trail surrogate.");const o=e.charCodeAt(n)-56320;i=65536+(a<<10)+o}i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):i<65536?(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128)}return t},l5=function(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t++:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3}return t};function Bo(e){return e&&e._delegate?e._delegate:e}function Gx(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function jEe(e){return(await fetch(e,{credentials:"include"})).ok}let Bu=class{constructor(t,r,n){this.name=t,this.instanceFactory=r,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};const gv="[DEFAULT]";let GQe=class{constructor(t,r){this.name=t,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const r=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(r)){const n=new vd;if(this.instancesDeferred.set(r,n),this.isInitialized(r)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:r});i&&n.resolve(i)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(t){const r=this.normalizeInstanceIdentifier(t?.identifier),n=t?.optional??!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(i){if(n)return null;throw i}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(YQe(t))try{this.getOrInitializeService({instanceIdentifier:gv})}catch{}for(const[r,n]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(r);try{const a=this.getOrInitializeService({instanceIdentifier:i});n.resolve(a)}catch{}}}}clearInstance(t=gv){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...t.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=gv){return this.instances.has(t)}getOptions(t=gv){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:r={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:r});for(const[a,o]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(a);n===s&&o.resolve(i)}return i}onInit(t,r){const n=this.normalizeInstanceIdentifier(r),i=this.onInitCallbacks.get(n)??new Set;i.add(t),this.onInitCallbacks.set(n,i);const a=this.instances.get(n);return a&&t(a,n),()=>{i.delete(t)}}invokeOnInitCallbacks(t,r){const n=this.onInitCallbacks.get(r);if(n)for(const i of n)try{i(t,r)}catch{}}getOrInitializeService({instanceIdentifier:t,options:r={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:KQe(t),options:r}),this.instances.set(t,n),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch{}return n||null}normalizeInstanceIdentifier(t=gv){return this.component?this.component.multipleInstances?t:gv:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function KQe(e){return e===gv?void 0:e}function YQe(e){return e.instantiationMode==="EAGER"}class XQe{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const r=this.getProvider(t.name);if(r.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);r.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const r=new GQe(t,this);return this.providers.set(t,r),r}getProviders(){return Array.from(this.providers.values())}}var na;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.E
41RROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(na||(na={}));const ZQe={debug:na.DEBUG,verbose:na.VERBOSE,info:na.INFO,warn:na.WARN,error:na.ERROR,silent:na.SILENT},QQe=na.INFO,JQe={[na.DEBUG]:"log",[na.VERBOSE]:"log",[na.INFO]:"info",[na.WARN]:"warn",[na.ERROR]:"error"},eJe=(e,t,...r)=>{if(t<e.logLevel)return;const n=new Date().toISOString(),i=JQe[t];if(i)console[i](`[${n}]  ${e.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class f${constructor(t){this.name=t,this._logLevel=QQe,this._logHandler=eJe,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in na))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?ZQe[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,na.DEBUG,...t),this._logHandler(this,na.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,na.VERBOSE,...t),this._logHandler(this,na.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,na.INFO,...t),this._logHandler(this,na.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,na.WARN,...t),this._logHandler(this,na.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,na.ERROR,...t),this._logHandler(this,na.ERROR,...t)}}const tJe=(e,t)=>t.some(r=>e instanceof r);let hie,pie;function rJe(){return hie||(hie=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nJe(){return pie||(pie=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const $Ee=new WeakMap,eH=new WeakMap,WEe=new WeakMap,z8=new WeakMap,h$=new WeakMap;function iJe(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(qf(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(r=>{r instanceof IDBCursor&&$Ee.set(r,e)}).catch(()=>{}),h$.set(t,e),t}function aJe(e){if(eH.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});eH.set(e,t)}let tH={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return eH.get(e);if(t==="objectStoreNames")return e.objectStoreNames||WEe.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return qf(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function oJe(e){tH=e(tH)}function sJe(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...r){const n=e.call(H8(this),t,...r);return WEe.set(n,t.sort?t.sort():[t]),qf(n)}:nJe().includes(e)?function(...t){return e.apply(H8(this),t),qf($Ee.get(this))}:function(...t){return qf(e.apply(H8(this),t))}}function lJe(e){return typeof e=="function"?sJe(e):(e instanceof IDBTransaction&&aJe(e),tJe(e,rJe())?new Proxy(e,tH):e)}function qf(e){if(e instanceof IDBRequest)return iJe(e);if(z8.has(e))return z8.get(e);const t=lJe(e);return t!==e&&(z8.set(e,t),h$.set(t,e)),t}const H8=e=>h$.get(e);function c5(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=qf(o);return n&&o.addEventListener("upgradeneeded",l=>{n(qf(o.result),l.oldVersion,l.newVersion,qf(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}function qP(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&r.addEventListener("blocked",n=>t(n.oldVersion,n)),qf(r).then(()=>{})}const cJe=["get","getKey","getAll","getAllKeys","count"],uJe=["put","add","delete","clear"],U8=new Map;function mie(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(U8.get(t))return U8.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=uJe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||cJe.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;
41return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),i&&l.done]))[0]};return U8.set(t,a),a}oJe(e=>({...e,get:(t,r,n)=>mie(t,r)||e.get(t,r,n),has:(t,r)=>!!mie(t,r)||e.has(t,r)}));class dJe{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(fJe(r)){const n=r.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(r=>r).join(" ")}}function fJe(e){return e.getComponent()?.type==="VERSION"}const rH="@firebase/app",vie="0.16.0",lh=new f$("@firebase/app"),hJe="@firebase/app-compat",pJe="@firebase/analytics-compat",mJe="@firebase/analytics",vJe="@firebase/app-check-compat",gJe="@firebase/app-check",yJe="@firebase/auth",_Je="@firebase/auth-compat",bJe="@firebase/database",EJe="@firebase/data-connect",wJe="@firebase/database-compat",SJe="@firebase/functions",CJe="@firebase/functions-compat",xJe="@firebase/installations",TJe="@firebase/installations-compat",AJe="@firebase/messaging",PJe="@firebase/messaging-compat",RJe="@firebase/performance",OJe="@firebase/performance-compat",IJe="@firebase/remote-config",kJe="@firebase/remote-config-compat",NJe="@firebase/storage",DJe="@firebase/storage-compat",MJe="@firebase/firestore",LJe="@firebase/ai",FJe="@firebase/firestore-compat",BJe="firebase",zJe="12.17.0",nH="[DEFAULT]",HJe={[rH]:"fire-core",[hJe]:"fire-core-compat",[mJe]:"fire-analytics",[pJe]:"fire-analytics-compat",[gJe]:"fire-app-check",[vJe]:"fire-app-check-compat",[yJe]:"fire-auth",[_Je]:"fire-auth-compat",[bJe]:"fire-rtdb",[EJe]:"fire-data-connect",[wJe]:"fire-rtdb-compat",[SJe]:"fire-fn",[CJe]:"fire-fn-compat",[xJe]:"fire-iid",[TJe]:"fire-iid-compat",[AJe]:"fire-fcm",[PJe]:"fire-fcm-compat",[RJe]:"fire-perf",[OJe]:"fire-perf-compat",[IJe]:"fire-rc",[kJe]:"fire-rc-compat",[NJe]:"fire-g
41cs",[DJe]:"fire-gcs-compat",[MJe]:"fire-fst",[FJe]:"fire-fst-compat",[LJe]:"fire-vertex","fire-js":"fire-js",[BJe]:"fire-js-all"},cC=new Map,UJe=new Map,iH=new Map;function gie(e,t){try{e.container.addComponent(t)}catch(r){lh.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function Fd(e){const t=e.name;if(iH.has(t))return lh.debug(`There were multiple attempts to register component ${t}.`),!1;iH.set(t,e);for(const r of cC.values())gie(r,e);for(const r of UJe.values())gie(r,e);return!0}function P_(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function Eu(e){return e==null?!1:e.settings!==void 0}const VJe={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different {$mismatchedParam}. Existing: '{$oldValue}'. New: '{$newValue}'.","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
41d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},kf=new n0("app","Firebase",VJe);class qJe{constructor(t,r,n){this._isDeleted=!1,this._options={...t},this._config={...r},this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Bu("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw kf.create("app-deleted",{appName:this._name})}}const R_=zJe;function GEe(e,t={}){let r=e;typeof t!="object"&&(t={name:t});const n={name:nH,automaticDataCollectionEnabled:!0,...t},i=n.name;if(typeof i!="string"||!i)throw kf.create("bad-app-name",{appName:String(i)});if(r||(r=BEe()),!r)throw kf.create("no-options");const a=cC.get(i);if(a)if(hg(r,a.options)){if(hg(n,a.config))return a;throw kf.create("duplicate-app",{appName:i,mismatchedParam:"config",oldValue:JSON.stringify(a.config),newValue:JSON.stringify(n)})}else throw kf.create("duplicate-app",{appName:i,mismatchedParam:"options",oldValue:JSON.stringify(a.options),newValue:JSON.stringify(r)});const o=new XQe(i);for(const l of iH.values())o.addComponent(l);const s=new qJe(r,n,o);return cC.set(i,s),s}function p$(e=nH){const t=cC.get(e);if(!t&&e===nH&&BEe())return GEe();if(!t)throw kf.create("no-app",{appName:e});return t}function cu(){return Array.from(cC.values())}function Uc(e,t,r){let n=HJe[e]??e;r&&(n+=`-${r}`);const i=n.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const o=[`Unable to register library "${n}" with version "${t}":`];i&&o.push(`library name "${n}" contains illegal characters (whitespace or "/")`),i&&a&&o.push("and"),a&&o.push(`version name "${t}" contains illegal characters (whitespace or "/")`),lh.warn(o.join(" "));return}Fd(new Bu(`${n}-version`,()=>({library:n,version:t}),"VERSION"))}const jJe="firebase-heartbeat-database",$Je=1,uC="firebase-heartbeat-store";let V8=null;function KEe(){return V8||(V8=c5(jJe,$Je,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(uC)}catch(r){console.warn(r)}}}}).catch(e=>{throw kf.create("idb-open",{originalErrorMessage:e.message})})),V8}async function WJe(e){try{const r=(await KEe()).transaction(uC),n=await r.objectStore(uC).get(YEe(e));return await r.done,n}catch(t){if(t instanceof Ch)lh.warn(t.message);else{const r=kf.create("idb-get",{originalErrorMessage:t?.message});lh.warn(r.message)}}}async function yie(e,t){try{const n=(await KEe()).transaction(uC,"readwrite");await n.objectStore(uC).put(t,YEe(e)),await n.done}catch(r){if(r instanceof Ch)lh.warn(r.message);else{const n=kf.create("idb-set",{originalErrorMessage:r?.message});lh.warn(n.message)}}}function YEe(e){return`${e.name}!${e.options.appId}`}const GJe=1024,KJe=30;class YJe{constructor(t){this.container=t,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new ZJe(r),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){try{const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=_ie();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(i=>i.date===n))return;if(this._heartbeatsCache.heartbeats.push({date:n,agent:r}),this._heartbeatsCache.heartbeats.length>KJe){const i=QJe(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(t){lh.warn(t)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=_ie(),{heartbeatsToSend:r,unsentEntries:n}=XJe(this._heartbeatsCache.heartbeats),i=lO(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(t){return lh.warn(t),""}}}function _ie(){return new Date().toISOString().substring(0,10)}function XJe(e,t=GJe){const r=[];let n=e.slice();for(const i of e){const a=r.find(o=>o.agent===i.agent);if(a){if(a.dates.push(i.date),bie(r)>t){a.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),bie(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}class ZJe{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return UEe()?VEe().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const r=await WJe(this.app);return r?.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const n=await this.read();return yie(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??n.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const n=await this.read();return yie(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...t.heartbeats]})}else return}}function bie(e){return lO(JSON.stringify({version:2,heartbeats:e})).length}function QJe(e){if(e.length===0)return-1;let t=0,r=e[0].date;for(let n=1;n<e.length;n++)e[n].date<r&&(r=e[n].date,t=n);return t}function JJe(e){Fd(new Bu("platform-logger",t=>new dJe(t),"PRIVATE")),Fd(new Bu("heartbeat",t=>new YJe(t),"PRIVATE")),Uc(rH,vie,e),Uc(rH,vie,"esm2020"),Uc("fire-js","")}JJe("");var eet="firebase",tet="12.17.1";Uc(eet,tet,"app");function XEe(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const ret=XEe,ZEe=new n0("auth","Firebase",XEe()),fO=new f$("@firebase/auth");function QEe(e,...t){fO.logLevel<=na.WARN&&fO.warn(`Auth (${R_}): ${e}`,...t)}function jP(e,...t){fO.logLevel<=na.ERROR&&fO.error(`Auth (${R_}): ${e}`,...t)}function ch(e,...t){throw m$(e,...t)}function Td(e,...t){return m$(e,...t)}function JEe(e,t,r){const n={...ret(),[t]:r};
41return new n0("auth","Firebase",n).create(t,{appName:e.name})}function zp(e){return JEe(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function m$(e,...t){if(typeof e!="string"){const r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return ZEe.create(e,...t)}function un(e,t,...r){if(!e)throw m$(t,...r)}function Nf(e){const t="INTERNAL ASSERTION FAILED: "+e;throw jP(t),new Error(t)}function uh(e,t){e||Nf(t)}function aH(){return typeof self<"u"&&self.location?.href||""}function net(){return Eie()==="http:"||Eie()==="https:"}function Eie(){return typeof self<"u"&&self.location?.protocol||null}function iet(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(net()||DQe()||"connection"in navigator)?navigator.onLine:!0}function aet(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}class Kx{constructor(t,r){this.shortDelay=t,this.longDelay=r,uh(r>t,"Short delay should be less than long delay!"),this.isMobile=d$()||HEe()}get(){return iet()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function v$(e,t){uh(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}class ewe{static initialize(t,r,n){this.fetchImpl=t,r&&(this.headersImpl=r),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Nf("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Nf("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Nf("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const oet={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
41aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},set=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],cet=new Kx(3e4,6e4);function u5(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function O_(e,t,r,n,i={}){return twe(e,i,async()=>{let a={},o={};n&&(t==="GET"?o=n:a={body:JSON.stringify(n)});const s=A_({...o,key:e.config.apiKey}).slice(1),l=await e._getAdditionalHeaders();l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode);const c={method:t,headers:l,...a};return NQe()||(c.referrerPolicy="strict-origin-when-cross-origin"),e.emulatorConfig&&Gx(e.emulatorConfig.host)&&(c.credentials="include"),ewe.fetch()(await nwe(e,e.config.apiHost,r,s),c)})}async function twe(e,t,r){e._canInitEmulator=!1;const n={...oet,...t};try{const i=new uet(e),a=await Promise.race([r(),i.promise]);i.clearNetworkTimeout();const o=await a.json();if("needConfirmation"in o)throw qT(e,"account-exists-with-different-credential",o);if(a.ok&&!("errorMessage"in o))return o;{const s=a.ok?o.errorMessage:o.error.message,[l,c]=s.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw qT(e,"credential-already-in-use",o);if(l==="EMAIL_EXISTS")throw qT(e,"email-already-in-use",o);if(l==="USER_DISABLED")throw qT(e,"user-disabled",o);const d=n[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw JEe(e,d,c);ch(e,d)}}catch(i){if(i instanceof Ch)throw i;ch(e,"network-request-failed",{message:String(i)})}}async function rwe(e,t,r,n,i={}){const a=await O_(e,t,r,n,i);return"mfaPendingCredential"in a&&ch(e,"multi-factor-auth-required",{_serverResponse:a}),a}async function nwe(e,t,r,n){const i=`${t}${r}?${n}`,a=e,o=a.config.emulator?v$(e.config,i):`${e.config.apiScheme}://${i}`;return set.includes(r)&&(await a._persistenceManagerAvailable,a._getPersistenceType()==="COOKIE")?a._getPersistence()._getFinalTarget(o).toString():o}class uet{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((r,n)=>{this.timer=setTimeout(()=>n(Td(this.auth,"network-request-failed")),cet.get())})}}function qT(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=Td(e,t,n);return i.customData._tokenResponse=r,i}async function det(e,t){return O_(e,"POST","/v1/accounts:delete",t)}async function hO(e,t){return O_(e,"POST","/v1/accounts:lookup",t)}function mS(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function fet(e,t=!1){const r=Bo(e),n=await r.getIdToken(t),i=g$(n);un(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");const a=typeof i.firebase=="object"?i.firebase:void 0,o=a?.sign_in_provider;return{claims:i,token:n,authTime:mS(q8(i.auth_time)),issuedAtTime:mS(q8(i.iat)),expirationTime:mS(q8(i.exp)),signInProvider:o||null,signInSecondFactor:a?.sign_in_second_factor||null}}function q8(e){return Number(e)*1e3}function g$(e){const[t,r,n]=e.split(".");if(t===void 0||r===void 0||n===void 0)return jP("JWT malformed, contained fewer than 3 sections"),null;try{const i=cO(r);return i?JSON.parse(i):(jP("Failed to decode base64 JWT payload"),null)}catch(i){return jP("Caught error parsing JWT payload as JSON",i?.toString()),null}}function wie(e){const t=g$(e);return un(t,"internal-error"),un(typeof t.exp<"u","internal-error"),un(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}async function dC(e,t,r=!1){if(r)return t;try{return await t}catch(n){throw n instanceof Ch&&het(n)&&e.auth.currentUser===e&&await e.auth.signOut(),n}}function het({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}class pet{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const n=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,n)}}schedule(t=!1){if(!this.isRunning)return;const r=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},r)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class oH{constructor(t,r){this.createdAt=t,this.lastLoginAt=r,this._initializeTime()}_initializeTime(){this.lastSignInTime=mS(this.lastLoginAt),this.creationTime=mS(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function pO(e){const t=e.auth,r=await e.getIdToken(),n=await dC(e,hO(t,{idToken:r}));un(n?.users.length,t,"internal-error");const i=n.users[0];e._notifyReloadListener(i);
41const a=i.providerUserInfo?.length?iwe(i.providerUserInfo):[],o=vet(e.providerData,a),s=e.isAnonymous,l=!(e.email&&i.passwordHash)&&!o?.length,c=s?l:!1,d={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new oH(i.createdAt,i.lastLoginAt),isAnonymous:c};Object.assign(e,d)}async function met(e){const t=Bo(e);await pO(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function vet(e,t){return[...e.filter(n=>!t.some(i=>i.providerId===n.providerId)),...t]}function iwe(e){return e.map(({providerId:t,...r})=>({providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}))}async function get(e,t){const r=await twe(e,{},async()=>{const n=A_({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:a}=e.config,o=await nwe(e,i,"/v1/token",`key=${a}`),s=await e._getAdditionalHeaders();s["Content-Type"]="application/x-www-form-urlencoded";const l={method:"POST",headers:s,body:n};return e.emulatorConfig&&Gx(e.emulatorConfig.host)&&(l.credentials="include"),ewe.fetch()(o,l)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function yet(e,t){return O_(e,"POST","/v2/accounts:revokeToken",u5(e,t))}class Uy{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){un(t.idToken,"internal-error"),un(typeof t.idToken<"u","internal-error"),un(typeof t.refreshToken<"u","internal-error");const r="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):wie(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,r)}updateFromIdToken(t){un(t.length!==0,"internal-error");const r=wie(t);this.updateTokensAndExpiration(t,null,r)}async getToken(t,r=!1){return!r&&this.accessToken&&!this.isExpired?this.accessToken:(un(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,r){const{accessToken:n,refreshToken:i,expiresIn:a}=await get(t,r);this.updateTokensAndExpiration(n,i,Number(a))}updateTokensAndExpiration(t,r,n){this.refreshToken=r||null,this.accessToken=t||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,r){const{refreshToken:n,accessToken:i,expirationTime:a}=r,o=new Uy;return n&&(un(typeof n=="string","internal-error",{appName:t}),o.refreshToken=n),i&&(un(typeof i=="string","internal-error",{appName:t}),o.accessToken=i),a&&(un(typeof a=="number","internal-error",{appName:t}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Uy,this.toJSON())}_performRefresh(){return Nf("not implemented")}}function ap(e,t){un(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class Au{constructor({uid:t,auth:r,stsTokenManager:n,...i}){this.providerId="firebase",this.proactiveRefresh=new pet(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new oH(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(t){const r=await dC(this,this.stsTokenManager.getToken(this.auth,t));return un(r,this.auth,"internal-error"),this.accessToken!==r&&(this.accessToken=r,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),r}getIdTokenResult(t){return fet(this,t)}reload(){return met(this)}_assign(t){this!==t&&(un(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(r=>({...r})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const r=new Au({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return r.metadata._copy(this.metadata),r}_onReload(t){un(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,r=!1){let n=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),n=!0),r&&await pO(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Eu(this.auth.app))return Promise.reject(zp(this.auth));const t=await this.getIdToken();return await dC(this,det(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
41nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,r){const n=r.displayName??void 0,i=r.email??void 0,a=r.phoneNumber??void 0,o=r.photoURL??void 0,s=r.tenantId??void 0,l=r._redirectEventId??void 0,c=r.createdAt??void 0,d=r.lastLoginAt??void 0,{uid:f,emailVerified:h,isAnonymous:p,providerData:g,stsTokenManager:_}=r;un(f&&_,t,"internal-error");const b=Uy.fromJSON(this.name,_);un(typeof f=="string",t,"internal-error"),ap(n,t.name),ap(i,t.name),un(typeof h=="boolean",t,"internal-error"),un(typeof p=="boolean",t,"internal-error"),ap(a,t.name),ap(o,t.name),ap(s,t.name),ap(l,t.name),ap(c,t.name),ap(d,t.name);const E=new Au({uid:f,auth:t,email:i,emailVerified:h,displayName:n,isAnonymous:p,photoURL:o,phoneNumber:a,tenantId:s,stsTokenManager:b,createdAt:c,lastLoginAt:d});return g&&Array.isArray(g)&&(E.providerData=g.map(S=>({...S}))),l&&(E._redirectEventId=l),E}static async _fromIdTokenResponse(t,r,n=!1){const i=new Uy;i.updateFromServerResponse(r);const a=new Au({uid:r.localId,auth:t,stsTokenManager:i,isAnonymous:n});return await pO(a),a}static async _fromGetAccountInfoResponse(t,r,n){const i=r.users[0];un(i.localId!==void 0,"internal-error");const a=i.providerUserInfo!==void 0?iwe(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!a?.length,s=new Uy;s.updateFromIdToken(n);const l=new Au({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:o}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new oH(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!a?.length};return Object.assign(l,c),l}}const Sie=new Map;function Df(e){uh(e instanceof Function,"Expected a class definition");let t=Sie.get(e);return t?(uh(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Sie.set(e,t),t)}class awe{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,r){this.storage[t]=r}async _get(t){const r=this.storage[t];return r===void 0?null:r}async _remove(t){delete this.storage[t]}_addListener(t,r){}_removeListener(t,r){}}awe.type="NONE";const Cie=awe;function $P(e,t,r){return`firebase:${e}:${t}:${r}`}class Vy{constructor(t,r,n){this.persistence=t,this.auth=r,this.userKey=n;const{config:i,name:a}=this.auth;this.fullUserKey=$P(this.userKey,i.apiKey,a),this.fullPersistenceKey=$P("persistence",i.apiKey,a),this.boundEventHandler=r._onStorageEvent.bind(r),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const r=await hO(this.auth,{idToken:t}).catch(()=>{});return r?Au._fromGetAccountInfoResponse(this.auth,r,t):null}return Au._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const r=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,r)return this.setCurrentUser(r)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,r,n="authUser"){if(!r.length)return new Vy(Df(Cie),t,n);const i=(await Promise.all(r.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c);let a=i[0]||Df(Cie);const o=$P(n,t.config.apiKey,t.name);let s=null;for(const c of r)try{const d=await c._get(o);if(d){let f;if(typeof d=="string"){const h=await hO(t,{idToken:d}).catch(()=>{});if(!h)break;f=await Au._fromGetAccountInfoResponse(t,h,d)}else f=Au._fromJSON(t,d);c!==a&&(s=f),a=c;break}}catch{}const l=i.filter(c=>c._shouldAllowMigration);return!a._shouldAllowMigration||!l.length?new Vy(a,t,n):(a=l[0],s&&await a._set(o,s.toJSON()),await Promise.all(r.map(async c=>{if(c!==a)try{await c._remove(o)}catch{}})),new Vy(a,t,n))}}function xie(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(cwe(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(owe(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(dwe(t))return"Blackberry";if(fwe(t))return"Webos";if(swe(t))return"Safari";if((t.includes("chrome/")||lwe(t))&&!t.includes("edge/"))return"Chrome";if(uwe(t))return"Android";{const r=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(r);if(n?.length===2)return n[1]}return"Other"}function owe(e=ul()){return/firefox\//i.test(e)}function swe(e=ul()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function lwe(e=ul()){return/crios\//i.test(e)}function cwe(e=ul()){return/iemobile/i.test(e)}function uwe(e=ul()){return/android/i.test(e)}function dwe(e=ul()){return/blackberry/i.test(e)}function fwe(e=ul()){return/webos/i.test(e)}function y$(e=ul()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function _et(e=ul()){return y$(e)&&!!window.navigator?.standalone}function bet(){return MQe()&&document.documentMode===10}function hwe(e=ul()){return y$(e)||uwe(e)||fwe(e)||dwe(e)||/windows phone/i.test(e)||cwe(e)}function pwe(e,t=[]){let r;switch(e){case"Browser":r=xie(ul());break;case"Worker":r=`${xie(ul())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${R_}/${n}`}class Eet{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,r){const n=a=>new Promise((o,s)=>{try{const l=t(a);o(l)}catch(l){s(l)}});n.onAbort=r,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const r=[];try{for(const n of this.queue)await n(t),n.onAbort&&r.push(n.onAbort)}catch(n){r.reverse();for(const i of r)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}}}async function wet(e,t={}){return O_(e,"GET","/v2/passwordPolicy",u5(e,t))}const Cet=6;class xet{constructor(t){const r=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=r.minPasswordLength??Cet,r.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=r.maxPasswordLength),r.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=r.containsLowercaseCharacter),r.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=r.containsUppercaseCharacter),r.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=r.containsNumericCharacter),r.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=r.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=t.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const r={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,r),this.validatePasswordCharacterOptions(t,r),r.isValid&&
41(r.isValid=r.meetsMinPasswordLength??!0),r.isValid&&(r.isValid=r.meetsMaxPasswordLength??!0),r.isValid&&(r.isValid=r.containsLowercaseLetter??!0),r.isValid&&(r.isValid=r.containsUppercaseLetter??!0),r.isValid&&(r.isValid=r.containsNumericCharacter??!0),r.isValid&&(r.isValid=r.containsNonAlphanumericCharacter??!0),r}validatePasswordLengthOptions(t,r){const n=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;n&&(r.meetsMinPasswordLength=t.length>=n),i&&(r.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,r){this.updatePasswordCharacterOptionsStatuses(r,!1,!1,!1,!1);let n;for(let i=0;i<t.length;i++)n=t.charAt(i),this.updatePasswordCharacterOptionsStatuses(r,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(t,r,n,i,a){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=r)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=a))}}class Tet{constructor(t,r,n,i){this.app=t,this.heartbeatServiceProvider=r,this.appCheckServiceProvider=n,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Tie(this),this.idTokenSubscription=new Tie(this),this.beforeStateQueue=new Eet(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ZEe,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(a=>this._resolvePersistenceManagerAvailable=a)}_initializeWithPersistence(t,r){return r&&(this._popupRedirectResolver=Df(r)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await Vy.create(this,t),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(r),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const r=await hO(this,{idToken:t}),n=await Au._fromGetAccountInfoResponse(this,r,t);await this.directlySetCurrentUser(n)}catch(r){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",r),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){if(Eu(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(o=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(o,o))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const a=this.redirectUser?._redirectEventId,o=n?._redirectEventId,s=await this.tryRedirectSignIn(t);(!a||a===o)&&s?.user&&(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(a){n=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return un(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(t){let r=null;try{r=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return r}async reloadAndSetCurrentUserOrClear(t){try{await pO(t)}catch(r){if(r?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=aet()}async _delete(){this._deleted=!0}
41async updateCurrentUser(t){if(Eu(this.app))return Promise.reject(zp(this));const r=t?Bo(t):null;return r&&un(r.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(r&&r._clone(this))}async _updateCurrentUser(t,r=!1){if(!this._deleted)return t&&un(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),r||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return Eu(this.app)?Promise.reject(zp(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return Eu(this.app)?Promise.reject(zp(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Df(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const r=this._getPasswordPolicyInternal();return r.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):r.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await wet(this),r=new xet(t);this.tenantId===null?this._projectPasswordPolicy=r:this._tenantPasswordPolicies[this.tenantId]=r}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new n0("auth","Firebase",t())}onAuthStateChanged(t,r,n){return this.registerStateListener(this.authStateSubscription,t,r,n)}beforeAuthStateChanged(t,r){return this.beforeStateQueue.pushCallback(t,r)}onIdTokenChanged(t,r,n){return this.registerStateListener(this.idTokenSubscription,t,r,n)}authStateReady(){return new Promise((t,r)=>{if(this.currentUser)t();else{const n=this.onAuthStateChanged(()=>{n(),t()},r)}})}async revokeAccessToken(t){if(this.currentUser){const r=await this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:r};this.tenantId!=null&&(n.tenantId=this.tenantId),await yet(this,n)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(t,r){const n=await this.getOrInitRedirectPersistenceManager(r);return t===null?n.removeCurrentUser():n.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const r=t&&Df(t)||this._popupRedirectResolver;un(r,this,"argument-error"),this.redirectPersistenceManager=await Vy.create(this,[Df(r._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===t?this._currentUser:this.redirectUser?._redirectEventId===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=this.currentUser?.uid??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,r,n,i){if(this._deleted)return()=>{};const a=typeof r=="function"?r:r.next.bind(r);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(un(s,this,"internal-error"),s.then(()=>{o||a(this.currentUser)}),typeof r=="function"){const l=t.addObserver(r,n,i);return()=>{o=!0,l()}}else{const l=t.addObserver(r);return()=>{o=!0,l()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return un(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=pwe(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const r=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();r&&(t["X-Firebase-Client"]=r);const n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){if(Eu(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return t?.error&&QEe(`Error while retrieving App Check token: ${t.error}`),t?.token}}function d5(e){return Bo(e)}class Tie{constructor(t){this.auth=t,this.observer=null,this.addObserver=qQe(r=>this.observer=r)}get next(){return un(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let _$={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Aet(e){_$=e}function Pet(e){return _$.loadJS(e)}function Ret(){return _$.gapiScript}function Oet(e){return`__${e}${Math.floor(Math.random()*1e6)}`}function Iet(e,t){const r=P_(e,"auth");if(r.isInitialized()){const i=r.getImmediate(),a=r.getOptions();if(hg(a,t??{}))return i;ch(i,"already-initialized")}return r.initialize({options:t})}function ket(e,t){const r=t?.persistence||[],n=(Array.isArray(r)?r:[r]).map(Df);t?.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,t?.popupRedirectResolver)}function Net(e,t,r){const n=d5(e);un(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!1,a=mwe(t),{host:o,port:s}=Det(t),l=s===null?"":`:${s}`,c={url:`${a}//${o}${l}/`},d=Object.freeze({host:o,port:s,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!n._canInitEmulator){un(n.config.emulator&&n.emulatorConfig,n,"emulator-config-failed"),un(hg(c,n.config.emulator)&&hg(d,n.emulatorConfig),n,"emulator-config-failed");return}n.config.emulator=c,n.emulatorConfig=d,n.settings.appVerificationDisabledForTesting=!0,Gx(o)?jEe(`${a}//${o}${l}`):Met()}function mwe(e){const t=e.indexOf(":");
41return t<0?"":e.substr(0,t+1)}function Det(e){const t=mwe(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};const n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const a=i[1];return{host:a,port:Aie(n.substr(a.length+1))}}else{const[a,o]=n.split(":");return{host:a,port:Aie(o)}}}function Aie(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function Met(){function e(){const t=document.createElement("p"),r=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",r.position="fixed",r.width="100%",r.backgroundColor="#ffffff",r.border=".1em solid #000000",r.color="#b50000",r.bottom="0px",r.left="0px",r.margin="0px",r.zIndex="10000",r.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}class vwe{constructor(t,r){this.providerId=t,this.signInMethod=r}toJSON(){return Nf("not implemented")}_getIdTokenResponse(t){return Nf("not implemented")}_linkToIdToken(t,r){return Nf("not implemented")}_getReauthenticationResolver(t){return Nf("not implemented")}}async function qy(e,t){return rwe(e,"POST","/v1/accounts:signInWithIdp",u5(e,t))}const Let="http://localhost";class pg extends vwe{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const r=new pg(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(r.idToken=t.idToken),t.accessToken&&(r.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(r.nonce=t.nonce),t.pendingToken&&(r.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(r.accessToken=t.oauthToken,r.secret=t.oauthTokenSecret):ch("argument-error"),r}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
41once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const r=typeof t=="string"?JSON.parse(t):t,{providerId:n,signInMethod:i,...a}=r;if(!n||!i)return null;const o=new pg(n,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}_getIdTokenResponse(t){const r=this.buildRequest();return qy(t,r)}_linkToIdToken(t,r){const n=this.buildRequest();return n.idToken=r,qy(t,n)}_getReauthenticationResolver(t){const r=this.buildRequest();return r.autoCreate=!1,qy(t,r)}buildRequest(){const t={requestUri:Let,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const r={};this.idToken&&(r.id_token=this.idToken),this.accessToken&&(r.access_token=this.accessToken),this.secret&&(r.oauth_token_secret=this.secret),r.providerId=this.providerId,this.nonce&&!this.pendingToken&&(r.nonce=this.nonce),t.postBody=A_(r)}return t}}class gwe{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}class Yx extends gwe{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class wp extends Yx{constructor(){super("facebook.com")}static credential(t){return pg._fromParams({providerId:wp.PROVIDER_ID,signInMethod:wp.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return wp.credentialFromTaggedObject(t)}static credentialFromError(t){return wp.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return wp.credential(t.oauthAccessToken)}catch{return null}}}wp.FACEBOOK_SIGN_IN_METHOD="facebook.com";wp.PROVIDER_ID="facebook.com";class Sp extends Yx{constructor(){super("google.com"),this.addScope("profile")}static credential(t,r){return pg._fromParams({providerId:Sp.PROVIDER_ID,signInMethod:Sp.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:r})}static credentialFromResult(t){return Sp.credentialFromTaggedObject(t)}static credentialFromError(t){return Sp.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:r,oauthAccessToken:n}=t;if(!r&&!n)return null;try{return Sp.credential(r,n)}catch{return null}}}Sp.GOOGLE_SIGN_IN_METHOD="google.com";Sp.PROVIDER_ID="google.com";class Cp extends Yx{constructor(){super("github.com")}static credential(t){return pg._fromParams({providerId:Cp.PROVIDER_ID,signInMethod:Cp.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Cp.credentialFromTaggedObject(t)}static credentialFromError(t){return Cp.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Cp.credential(t.oauthAccessToken)}catch{return null}}}Cp.GITHUB_SIGN_IN_METHOD="github.com";Cp.PROVIDER_ID="github.com";class xp extends Yx{constructor(){super("twitter.com")}static credential(t,r){return pg._fromParams({providerId:xp.PROVIDER_ID,signInMethod:xp.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:r})}static credentialFromResult(t){return xp.credentialFromTaggedObject(t)}static credentialFromError(t){return xp.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:r,oauthTokenSecret:n}=t;if(!r||!n)return null;try{return xp.credential(r,n)}catch{return null}}}xp.TWITTER_SIGN_IN_METHOD="twitter.com";xp.PROVIDER_ID="twitter.com";class mg{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,r,n,i=!1){const a=await Au._fromIdTokenResponse(t,n,i),o=Pie(n);return new mg({user:a,providerId:o,_tokenResponse:n,operationType:r})}static async _forOperation(t,r,n){await t._updateTokensIfNecessary(n,!0);const i=Pie(n);return new mg({user:t,providerId:i,_tokenResponse:n,operationType:r})}}function Pie(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class mO extends Ch{constructor(t,r,n,i){super(r.code,r.message),this.operationType=n,this.user=i,Object.setPrototypeOf(this,mO.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:r.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(t,r,n,i){return new mO(t,r,n,i)}}function ywe(e,t,r,n){return(t==="reauthenticate"?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(a=>{throw a.code==="auth/multi-factor-auth-required"?mO._fromErrorAndOperation(e,a,t,n):a})}async function Fet(e,t,r=!1){const n=await dC(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return mg._forOperation(e,"link",n)}async function Bet(e,t,r=!1){const{auth:n}=e;if(Eu(n.app))return Promise.reject(zp(n));const i="reauthenticate";try{const a=await dC(e,ywe(n,i,t,e),r);un(a.idToken,n,"internal-error");const o=g$(a.idToken);un(o,n,"internal-error");const{sub:s}=o;return un(e.uid===s,n,"user-mismatch"),mg._forOperation(e,i,a)}catch(a){throw a?.code==="auth/user-not-found"&&ch(n,"user-mismatch"),a}
41}async function zet(e,t,r=!1){if(Eu(e.app))return Promise.reject(zp(e));const n="signIn",i=await ywe(e,n,t),a=await mg._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(a.user),a}async function Het(e,t){return rwe(e,"POST","/v1/accounts:signInWithCustomToken",u5(e,t))}async function Uet(e,t){if(Eu(e.app))return Promise.reject(zp(e));const r=d5(e),n=await Het(r,{token:t,returnSecureToken:!0}),i=await mg._fromIdTokenResponse(r,"signIn",n);return await r._updateCurrentUser(i.user),i}function Vet(e,t){return Bo(e).setPersistence(t)}function qet(e,t,r,n){return Bo(e).onIdTokenChanged(t,r,n)}function jet(e,t,r){return Bo(e).beforeAuthStateChanged(t,r)}function $et(e,t,r,n){return Bo(e).onAuthStateChanged(t,r,n)}function Wet(e){return Bo(e).signOut()}const vO="__sak";class _we{constructor(t,r){this.storageRetriever=t,this.type=r}_isAvailable(){try{return this.storage?(this.storage.setItem(vO,"1"),this.storage.removeItem(vO),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,r){return this.storage.setItem(t,JSON.stringify(r)),Promise.resolve()}_get(t){const r=this.storage.getItem(t);return Promise.resolve(r?JSON.parse(r):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}const Get=1e3,Ket=10;class bwe extends _we{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,r)=>this.onStorageEvent(t,r),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=hwe(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const r of Object.keys(this.listeners)){const n=this.storage.getItem(r),i=this.localCache[r];n!==i&&t(r,i,n)}}onStorageEvent(t,r=!1){if(!t.key){this.forAllChangedKeys((o,s,l)=>{this.notifyListeners(o,l)});return}const n=t.key;r?this.detachListener():this.stopPolling();const i=()=>{const o=this.storage.getItem(n);!r&&this.localCache[n]===o||this.notifyListeners(n,o)},a=this.storage.getItem(n);bet()&&a!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,Ket):i()}notifyListeners(t,r){this.localCache[t]=r;const n=this.listeners[t];if(n)for(const i of Array.from(n))i(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,r,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:r,newValue:n}),!0)})},Get)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(r)}_removeListener(t,r){this.listeners[t]&&(this.listeners[t].delete(r),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,r){await super._set(t,r),this.localCache[t]=JSON.stringify(r)}async _get(t){const r=await super._get(t);return this.localCache[t]=JSON.stringify(r),r}async _remove(t){await super._remove(t),delete this.localCache[t]}}bwe.type="LOCAL";const Yet=bwe;class Ewe extends _we{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,r){}_removeListener(t,r){}}Ewe.type="SESSION";const b$=Ewe;function Xet(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(r){return{fulfilled:!1,reason:r}}}))}class f5{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const r=this.receivers.find(i=>i.isListeningto(t));if(r)return r;const n=new f5(t);return this.receivers.push(n),n}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const r=t,{eventId:n,eventType:i,data:a}=r.data,o=this.handlersMap[i];if(!o?.size)return;r.ports[0].postMessage({status:"ack",eventId:n,eventType:i});const s=Array.from(o).map(async c=>c(r.origin,a)),l=await Xet(s);r.ports[0].postMessage({status:"done",eventId:n,eventType:i,response:l})}_subscribe(t,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(r)}_unsubscribe(t,r){this.handlersMap[t]&&r&&this.handlersMap[t].delete(r),(!r||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}f5.receivers=[];function E$(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(Math.random()*10);return e+r}class Zet{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,r,n=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let a,o;return new Promise((s,l)=>{const c=E$("",20);i.port1.start();const d=setTimeout(()=>{l(new Error("unsupported_event"))},n);o={messageChannel:i,onMessage(f){const h=f;if(h.data.eventId===c)switch(h.data.status){case"ack":clearTimeout(d),a=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(a),s(h.data.response);break;default:clearTimeout(d),clearTimeout(a),l(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:c,data:r},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}function Ad(){return window}
41function Qet(e){Ad().location.href=e}function wwe(){return typeof Ad().WorkerGlobalScope<"u"&&typeof Ad().importScripts=="function"}async function Jet(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function ett(){return navigator?.serviceWorker?.controller||null}function ttt(){return wwe()?self:null}const Swe="firebaseLocalStorageDb",rtt=1,gO="firebaseLocalStorage",Cwe="fbase_key";class Xx{constructor(t){this.request=t}toPromise(){return new Promise((t,r)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{r(this.request.error)})})}}function h5(e,t){return e.transaction([gO],t?"readwrite":"readonly").objectStore(gO)}function ntt(){const e=indexedDB.deleteDatabase(Swe);return new Xx(e).toPromise()}function xwe(){const e=indexedDB.open(Swe,rtt);return new Promise((t,r)=>{e.addEventListener("error",()=>{r(e.error)}),e.addEventListener("upgradeneeded",()=>{const n=e.result;try{n.createObjectStore(gO,{keyPath:Cwe})}catch(i){r(i)}}),e.addEventListener("success",async()=>{const n=e.result;n.objectStoreNames.contains(gO)?t(n):(n.close(),await ntt(),t(await xwe()))})})}async function Rie(e,t,r){const n=h5(e,!0).put({[Cwe]:t,value:r});return new Xx(n).toPromise()}async function itt(e,t){const r=h5(e,!1).get(t),n=await new Xx(r).toPromise();return n===void 0?null:n.value}function Oie(e,t){const r=h5(e,!0).delete(t);return new Xx(r).toPromise()}const att=800,ott=3;class Twe{registerLifecycleListeners(){typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("pagehide",this.onPageHide),window.addEventListener("pageshow",this.onPageShow)),typeof document<"u"&&typeof document.addEventListener=="function"&&document.addEventListener("visibilitychange",this.onVisibilityChange)}unregisterLifecycleListeners(){typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("pagehide",this.onPageHide),window.removeEventListener("pageshow",this.onPageShow)),typeof document<"u"&&typeof document.removeEventListener=="function"&&document.removeEventListener("visibilitychange",this.onVisibilityChange)}constructor(){this.type="LOCAL",this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.isHiding=!1,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this.onPageHide=()=>{this.isHiding=!0,this.stopPolling(),this.dbPromise&&(this.dbPromise.then(t=>t.close()).catch(()=>{}),this.dbPromise=null)},this.onPageShow=()=>{this.isHiding&&(this.isHiding=!1,Object.keys(this.listeners).length>0&&this.startPolling())},this.onVisibilityChange=()=>{typeof document<"u"&&(document.visibilityState==="hidden"?this.onPageHide():document.visibilityState==="visible"&&this.onPageShow())},this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){if(this.isHiding)throw new Error("Database is closing/hidden");return this.dbPromise?this.dbPromise:(this.dbPromise=xwe(),this.dbPromise.catch(()=>{this.dbPromise=null}),this.dbPromise)}async _withRetries(t){let r=0;for(;;)try{const n=await this._openDb();return await t(n)}catch(n){if(this.isHiding||r++>ott)throw n;this.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return wwe()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=f5._getInstance(ttt()),this.receiver._subscribe("keyChanged",async(t,r)=>({keyProcessed:(await this._poll()).includes(r.key)})),this.receiver._subscribe("ping",async(t,r)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await Jet(),!this.activeServiceWorker)return;this.sender=new Zet(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&t[0]?.fulfilled&&t[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||ett()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{return indexedDB?(await this._withRetries(async t=>{await Rie(t,vO,"1"),await Oie(t,vO)}),!0):!1}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,r){return this._withPendingWrite(async()=>(await this._withRetries(n=>Rie(n,t,r)),this.localCache[t]=r,this.notifyServiceWorker(t)))}async _get(t){const r=await this._withRetries(n=>itt(n,t));return this.localCache[t]=r,r}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(r=>Oie(r,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){if(this.isHiding)return[];try{const t=await this._withRetries(i=>{const a=h5(i,!1).getAll();return new Xx(a).toPromise()});if(this.isHiding)return[];if(!t)return[];if(this.pendingWrites!==0)return[];const r=[],n=new Set;if(t.length!==0)for(const{fbase_key:i,value:a}of t)n.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(a)&&(this.notifyListeners(i,a),r.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!n.has(i)&&(this.notifyListeners(i,null),r.push(i));return r}catch(t){return this.isHiding||QEe(`Firebase Auth cross-tab polling failed with error: ${t}`),[]}}notifyListeners(t,r){this.localCache[t]=r;const n=this.listeners[t];if(n)for(const i of Array.from(n))i(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),att)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,r){Object.keys(this.listeners).length===0&&(this.startPolling(),this.registerLifecycleListeners()),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(r)}_removeListener(t,r){this.listeners[t]&&(this.listeners[t].delete(r),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.stopPolling(),this.unregisterLifecycleListeners())}}Twe.type="LOCAL";const stt=Twe;new Kx(3e4,6e4);function ltt(e,t){return t?Df(t):(un(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}class w$ extends vwe{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return qy(t,this._buildIdpRequest())}_linkToIdToken(t,r){return qy(t,this._buildIdpRequest(r))}_getReauthenticationResolver(t){return qy(t,this._buildIdpRequest())}_buildIdpRequest(t){const r={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(r.idToken=t),r}}function ctt(e){return zet(e.auth,new w$(e),e.bypassAuthState)}function utt(e){const{auth:t,user:r}=e;return un(r,t,"internal-error"),Bet(r,new w$(e),e.bypassAuthState)}async function dtt(e){const{auth:t,user:r}=e;return un(r,t,"internal-error"),Fet(r,new w$(e),e.bypassAuthState)}class Awe{constructor(t,r,n,i,a=!1){this.auth=t,this.resolver=n,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(r)?r:[r]}execute(){return new Promise(async(t,r)=>{this.pendingPromise={resolve:t,reject:r};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}})}async onAuthEvent(t){const{urlResponse:r,sessionId:n,postBody:i,tenantId:a,error:o,type:s}=t;if(o){this.reject(o);return}const l={auth:this.auth,requestUri:r,sessionId:n,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(l))}catch(c){this.reject(c)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return ctt;case"linkViaPopup":case"linkViaRedirect":return dtt;case"reauthViaPopup":case"reauthViaRedirect":return utt;default:ch(this.auth,"internal-error")}}resolve(t){uh(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){uh(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const ftt=new Kx(2e3,1e4);class Ey extends Awe{constructor(t,r,n,i,a){super(t,r,i,a),this.provider=n,this.authWindow=null,this.pollId=null,Ey.currentPopupAction&&Ey.currentPopupAction.cancel(),Ey.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return un(t,this.auth,"internal-error"),t}async onExecution(){uh(this.filter.length===1,"Popup operations only handle one event");const t=E$();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(Td(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(Td(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Ey.currentPopupAction=null}pollUserCancellation(){const t=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Td(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,ftt.get())};t()}}Ey.currentPopupAction=null;const htt="pendingRedirect",WP=new Map;class ptt extends Awe{constructor(t,r,n=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,n),this.eventId=null}async execute(){let t=WP.get(this.auth._key());if(!t){try{const n=await mtt(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(n)}catch(r){t=()=>Promise.reject(r)}WP.set(this.auth._key(),t)}return this.bypassAuthState||WP.set(this.auth._key(),()=>Promise.resolve(null)),t()}
41async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const r=await this.auth._redirectUserForId(t.eventId);if(r)return this.user=r,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function mtt(e,t){const r=ytt(t),n=gtt(e);if(!await n._isAvailable())return!1;const i=await n._get(r)==="true";return await n._remove(r),i}function vtt(e,t){WP.set(e._key(),t)}function gtt(e){return Df(e._redirectPersistence)}function ytt(e){return $P(htt,e.config.apiKey,e.name)}async function _tt(e,t,r=!1){if(Eu(e.app))return Promise.reject(zp(e));const n=d5(e),i=ltt(n,t),o=await new ptt(n,i,r).execute();return o&&!r&&(delete o.user._redirectEventId,await n._persistUserIfCurrent(o.user),await n._setRedirectUser(null,t)),o}const btt=600*1e3;class Ett{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let r=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(t,n)&&(r=!0,this.sendToConsumer(t,n),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!wtt(t)||(this.hasHandledPotentialRedirect=!0,r||(this.queuedRedirectEvent=t,r=!0)),r}sendToConsumer(t,r){if(t.error&&!Pwe(t)){const n=t.error.code?.split("auth/")[1]||"internal-error";r.onError(Td(this.auth,n))}else r.onAuthEvent(t)}isEventForConsumer(t,r){const n=r.eventId===null||!!t.eventId&&t.eventId===r.eventId;return r.filter.includes(t.type)&&n}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=btt&&this.cachedEventUids.clear(),this.cachedEventUids.has(Iie(t))}saveEventToCache(t){this.cachedEventUids.add(Iie(t)),this.lastProcessedEventTime=Date.now()}}function Iie(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function Pwe({type:e,error:t}){return e==="unknown"&&t?.code==="auth/no-auth-event"}function wtt(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Pwe(e);default:return!1}}async function Stt(e,t={}){return O_(e,"GET","/v1/projects",t)}const Ctt=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,xtt=/^https?/;async function Ttt(e){if(e.config.emulator)return;const{authorizedDomains:t}=await Stt(e);for(const r of t)try{if(Att(r))return}catch{}ch(e,"unauthorized-domain")}function Att(e){const t=aH(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){const o=new URL(e);return o.hostname===""&&n===""?r==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):r==="chrome-extension:"&&o.hostname===n}if(!xtt.test(r))return!1;if(Ctt.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}const Ptt=new Kx(3e4,6e4);function kie(){const e=Ad().___jsl;if(e?.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let r=0;r<e.CP.length;r++)e.CP[r]=null}}function Rtt(e){return new Promise((t,r)=>{function n(){kie(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{kie(),r(Td(e,"network-request-failed"))},timeout:Ptt.get()})}if(Ad().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(Ad().gapi?.load)n();else{const i=Oet("iframefcb");return Ad()[i]=()=>{gapi.load?n():r(Td(e,"network-request-failed"))},Pet(`${Ret()}?onload=${i}`).catch(a=>r(a))}}).catch(t=>{throw GP=null,t})}let GP=null;function Ott(e){return GP=GP||Rtt(e),GP}const Itt=new Kx(5e3,15e3),ktt="__/auth/iframe",Ntt="emulator/auth/iframe",Dtt={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Mtt=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Ltt(e){const t=e.config;un(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?v$(t,Ntt):`https://${e.config.authDomain}/${ktt}
41`,n={apiKey:t.apiKey,appName:e.name,v:R_},i=Mtt.get(e.config.apiHost);i&&(n.eid=i);const a=e._getFrameworks();return a.length&&(n.fw=a.join(",")),`${r}?${A_(n).slice(1)}`}async function Ftt(e){const t=await Ott(e),r=Ad().gapi;return un(r,e,"internal-error"),t.open({where:document.body,url:Ltt(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Dtt,dontclear:!0},n=>new Promise(async(i,a)=>{await n.restyle({setHideOnLeave:!1});const o=Td(e,"network-request-failed"),s=Ad().setTimeout(()=>{a(o)},Itt.get());function l(){Ad().clearTimeout(s),i(n)}n.ping(l).then(l,()=>{a(o)})}))}const Btt={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},ztt=500,Htt=600,Utt="_blank",Vtt="http://localhost";class Nie{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function qtt(e,t,r,n=ztt,i=Htt){const a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString();let s="";const l={...Btt,width:n.toString(),height:i.toString(),top:a,left:o},c=ul().toLowerCase();r&&(s=lwe(c)?Utt:r),owe(c)&&(t=t||Vtt,l.scrollbars="yes");const d=Object.entries(l).reduce((h,[p,g])=>`${h}${p}=${g},`,"");if(_et(c)&&s!=="_self")return jtt(t||"",s),new Nie(null);const f=window.open(t||"",s,d);un(f,e,"popup-blocked");try{f.focus()}catch{}return new Nie(f)}function jtt(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}const $tt="__/auth/handler",Wtt="emulator/auth/handler",Gtt=encodeURIComponent("fac");async function Die(e,t,r,n,i,a){un(e.config.authDomain,e,"auth-domain-config-required"),un(e.config.apiKey,e,"invalid-api-key");const o={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:R_,eventId:i};if(t instanceof gwe){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",uO(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(const[d,f]of Object.entries({}))o[d]=f}if(t instanceof Yx){const d=t.getScopes().filter(f=>f!=="");d.length>0&&(o.scopes=d.join(","))}e.tenantId&&(o.tid=e.tenantId);const s=o;for(const d of Object.keys(s))s[d]===void 0&&delete s[d];const l=await e._getAppCheckToken(),c=l?`#${Gtt}=${encodeURIComponent(l)}`:"";return`${Ktt(e)}?${A_(s).slice(1)}${c}`}function Ktt({config:e}){return e.emulator?v$(e,Wtt):`https://${e.authDomain}/${$tt}`}const j8="webStorageSupport";class Ytt{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=b$,this._completeRedirectFn=_tt,this._overrideRedirectResult=vtt}async _openPopup(t,r,n,i){uh(this.eventManagers[t._key()]?.manager,"_initialize() not called before _openPopup()");const a=await Die(t,r,n,aH(),i);return qtt(t,a,E$())}async _openRedirect(t,r,n,i){await this._originValidation(t);const a=await Die(t,r,n,aH(),i);return Qet(a),new Promise(()=>{})}_initialize(t){const r=t._key();if(this.eventManagers[r]){const{manager:i,promise:a}=this.eventManagers[r];return i?Promise.resolve(i):(uh(a,"If manager is not set, promise should be"),a)}const n=this.initAndGetManager(t);return this.eventManagers[r]={promise:n},n.catch(()=>{delete this.eventManagers[r]}),n}async initAndGetManager(t){const r=await Ftt(t),n=new Ett(t);return r.register("authEvent",i=>
41(un(i?.authEvent,t,"invalid-auth-event"),{status:n.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:n},this.iframes[t._key()]=r,n}_isIframeWebStorageSupported(t,r){this.iframes[t._key()].send(j8,{type:j8},i=>{const a=i?.[0]?.[j8];a!==void 0&&r(!!a),ch(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const r=t._key();return this.originValidationPromises[r]||(this.originValidationPromises[r]=Ttt(t)),this.originValidationPromises[r]}get _shouldInitProactively(){return hwe()||swe()||y$()}}const Xtt=Ytt;var Mie="@firebase/auth",Lie="1.13.4";class Ztt{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const r=this.auth.onIdTokenChanged(n=>{t(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,r),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const r=this.internalListeners.get(t);r&&(this.internalListeners.delete(t),r(),this.updateProactiveRefresh())}assertAuthConfigured(){un(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function Qtt(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Jtt(e){Fd(new Bu("auth",(t,{options:r})=>{const n=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),a=t.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=n.options;un(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});const l={apiKey:o,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:pwe(e)},c=new Tet(n,i,a,l);return ket(c,r),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,r,n)=>{t.getProvider("auth-internal").initialize()})),Fd(new Bu("auth-internal",t=>{const r=d5(t.getProvider("auth").getImmediate());return(n=>new Ztt(n))(r)},"PRIVATE").setInstantiationMode("EXPLICIT")),Uc(Mie,Lie,Qtt(e)),Uc(Mie,Lie,"esm2020")}const ert=300,trt=zEe("authIdTokenMaxAge")||ert;let Fie=null;const rrt=e=>async t=>{const r=t&&await t.getIdTokenResult(),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>trt)return;const i=r?.token;Fie!==i&&(Fie=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function nrt(e=p$()){const t=P_(e,"auth");if(t.isInitialized())return t.getImmediate();const r=Iet(e,{popupRedirectResolver:Xtt,persistence:[stt,Yet,b$]}),n=zEe("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){const a=new URL(n,location.origin);if(location.origin===a.origin){const o=rrt(a.toString());jet(r,o,()=>o(r.currentUser)),qet(r,s=>o(s))}}const i=FEe("auth");return i&&Net(r,`http://${i}`),r}function irt(){return document.getElementsByTagName("head")?.[0]??document}Aet({loadJS(e){return new Promise((t,r)=>{const n=document.createElement("script");n.setAttribute("src",e),n.onload=t,n.onerror=i=>{const a=Td("internal-error");a.customData=i,r(a)},n.type="text/javascript",n.charset="UTF-8",irt().appendChild(n)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});Jtt("Browser");var Bie={};const zie="@firebase/database",Hie="1.1.4";let Rwe="";function art(e){Rwe=e}class ort{constructor(t){this.domStorage_=t,this.prefix_="firebase:"}set(t,r){r==null?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),Lo(r))}get(t){const r=this.domStorage_.getItem(this.prefixedName_(t));return r==null?null:lC(r)}remove(t){this.domStorage_.removeItem(this.prefixedName_(t))}prefixedName_(t){return this.prefix_+t}toString(){return this.domStorage_.toString()}}
41class srt{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(t,r){r==null?delete this.cache_[t]:this.cache_[t]=r}get(t){return Wd(this.cache_,t)?this.cache_[t]:null}remove(t){delete this.cache_[t]}}const Owe=function(e){try{if(typeof window<"u"&&typeof window[e]<"u"){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new ort(t)}}catch{}return new srt},Nv=Owe("localStorage"),lrt=Owe("sessionStorage"),jy=new f$("@firebase/database"),crt=(function(){let e=1;return function(){return e++}})(),Iwe=function(e){const t=WQe(e),r=new VQe;r.update(t);const n=r.digest();return c$.encodeByteArray(n)},Zx=function(...e){let t="";for(let r=0;r<e.length;r++){const n=e[r];Array.isArray(n)||n&&typeof n=="object"&&typeof n.length=="number"?t+=Zx.apply(null,n):typeof n=="object"?t+=Lo(n):t+=n,t+=" "}return t};let vS=null,Uie=!0;const urt=function(e,t){ur(!0,"Can't turn on custom loggers persistently."),jy.logLevel=na.VERBOSE,vS=jy.log.bind(jy)},Xo=function(...e){if(Uie===!0&&(Uie=!1,vS===null&&lrt.get("logging_enabled")===!0&&urt()),vS){const t=Zx.apply(null,e);vS(t)}},Qx=function(e){return function(...t){Xo(e,...t)}},sH=function(...e){const t="FIREBASE INTERNAL ERROR: "+Zx(...e);jy.error(t)},dh=function(...e){const t=`FIREBASE FATAL ERROR: ${Zx(...e)}`;throw jy.error(t),new Error(t)},sl=function(...e){const t="FIREBASE WARNING: "+Zx(...e);jy.warn(t)},drt=function(){typeof window<"u"&&window.location&&window.location.protocol&&window.location.protocol.indexOf("https:")!==-1&&sl("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},p5=function(e){return typeof e=="number"&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},frt=function(e){if(document.readyState==="complete")e();else{let t=!1;const r=function(){if(!document.body){setTimeout(r,Math.floor(10));return}t||(t=!0,e())};document.addEventListener?(document.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&r()}),window.attachEvent("onload",r))}},m1="[MIN_NAME]",vg="[MAX_NAME]",i0=function(e,t){if(e===t)return 0;if(e===m1||t===vg)return-1;if(t===m1||e===vg)return 1;{const r=Vie(e),n=Vie(t);return r!==null?n!==null?r-n===0?e.length-t.length:r-n:-1:n!==null?1:e<t?-1:1}},hrt=function(e,t){return e===t?0:e<t?-1:1},yb=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Lo(t))},S$=function(e){if(typeof e!="object"||e===null)return Lo(e);const t=[];for(const n in e)t.push(n);t.sort();let r="{";for(let n=0;n<t.length;n++)n!==0&&(r+=","),r+=Lo(t[n]),r+=":",r+=S$(e[t[n]]);return r+="}",r},kwe=function(e,t){const r=e.length;if(r<=t)return[e];const n=[];for(let i=0;i<r;i+=t)i+t>r?n.push(e.substring(i,r)):n.push(e.substring(i,i+t));return n};function Jo(e,t){for(const r in e)e.hasOwnProperty(r)&&t(r,e[r])}const Nwe=function(e){ur(!p5(e),"Invalid JSON number");const t=11,r=52,n=(1<<t-1)-1;let i,a,o,s,l;e===0?(a=0,o=0,i=1/e===-1/0?1:0):(i=e<0,e=Math.abs(e),e>=Math.pow(2,1-n)?(s=Math.min(Math.floor(Math.log(e)/Math.LN2),n),a=s+n,o=Math.round(e*Math.pow(2,r-s)-Math.pow(2,r))):(a=0,o=Math.round(e/Math.pow(2,1-n-r))));const c=[];for(l=r;l;l-=1)c.push(o%2?1:0),o=Math.floor(o/2);for(l=t;l;l-=1)c.push(a%2?1:0),a=Math.floor(a/2);c.push(i?1:0),c.reverse();const d=c.join("");let f="";for(l=0;l<64;l+=8){let h=parseInt(d.substr(l,8),2).toString(16);h.length===1&&(h="0"+h),f=f+h}return f.toLowerCase()},prt=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},mrt=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function vrt(e,t){let r="Unknown Error";e==="too_big"?r="The data requested exceeds the maximum size that can be accessed with a single request.":e==="permission_denied"?r="Client doesn't have permission to access the desired data.":e==="unavailable"&&(r="The service is unavailable");const n=new Error(e+" at "+t._path.toString()+": "+r);return n.code=e.toUpperCase(),n}const grt=new RegExp("^-?(0*)\\d{1,10}$"),yrt=-2147483648,_rt=2147483647,Vie=function(e){if(grt.test(e)){const t=Number(e);if(t>=yrt&&t<=_rt)return t}return null},I_=function(e){try{e()}catch(t){setTimeout(()=>{const r=t.stack||"";throw sl("Exception was thrown by user callback.",r),t},Math.floor(0))}},brt=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},gS=function(e,t){const r=setTimeout(e,t);return typeof r=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(r):typeof r=="object"&&r.unref&&r.unref(),r};class Ert{constructor(t,r){this.appCheckProvider=r,this.appName=t.name,Eu(t)&&t.settings.appCheckToken&&(this.serverAppAppCheckToken=t.settings.appCheckToken),this.appCheck=r?.getImmediate({optional:!0}),this.appCheck||r?.get().then(n=>this.appCheck=n)}getToken(t){if(this.serverAppAppCheckToken){if(t)throw new Error("Attempted reuse of `FirebaseServerApp.appCheckToken` after previous usage failed.");return Promise.resolve({token:this.serverAppAppCheckToken})}return this.appCheck?this.appCheck.getToken(t):new Promise((r,n)=>{setTimeout(()=>{this.appCheck?this.getToken(t).then(r,n):r(null)},0)})}addTokenChangeListener(t){this.appCheckProvider?.get().then(r=>r.addTokenListener(t))}notifyForInvalidToken(){sl(`Provided AppCheck credentials for the app named "${this.appName}" are invalid. This usually indicates your app was not initialized correctly.`)}}class wrt{constructor(t,r,n){this.appName_=t,this.firebaseOptions_=r,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit(i=>this.auth_=i)}
41getToken(t){return this.auth_?this.auth_.getToken(t).catch(r=>r&&r.code==="auth/token-not-initialized"?(Xo("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(r)):new Promise((r,n)=>{setTimeout(()=>{this.auth_?this.getToken(t).then(r,n):r(null)},0)})}addTokenChangeListener(t){this.auth_?this.auth_.addAuthTokenListener(t):this.authProvider_.get().then(r=>r.addAuthTokenListener(t))}removeTokenChangeListener(t){this.authProvider_.get().then(r=>r.removeAuthTokenListener(t))}notifyForInvalidToken(){let t='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',sl(t)}}class KP{constructor(t){this.accessToken=t}getToken(t){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(t){t(this.accessToken)}removeTokenChangeListener(t){}notifyForInvalidToken(){}}KP.OWNER="owner";const C$="5",Dwe="v",Mwe="s",Lwe="r",Fwe="f",Bwe=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,zwe="ls",Hwe="p",lH="ac",Uwe="websocket",Vwe="long_polling";class qwe{constructor(t,r,n,i,a=!1,o="",s=!1,l=!1,c=null){this.secure=r,this.namespace=n,this.webSocketOnly=i,this.nodeAdmin=a,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=l,this.emulatorOptions=c,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Nv.get("host:"+t)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&Nv.set("host:"+this._host,this.internalHost))}toString(){let t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t}toURLString(){const t=this.secure?"https://":"http://",r=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${t}${this.host}/${r}`}}function Srt(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams}function jwe(e,t,r){ur(typeof t=="string","typeof type must == string"),ur(typeof r=="object","typeof params must == object");let n;if(t===Uwe)n=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===Vwe)n=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+t);Srt(e)&&(r.ns=e.namespace);const i=[];return Jo(r,(a,o)=>{i.push(a+"="+o)}),n+i.join("&")}class Crt{constructor(){this.counters_={}}incrementCounter(t,r=1){Wd(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=r}get(){return xQe(this.counters_)}}const $8={},W8={};function x$(e){const t=e.toString();return $8[t]||($8[t]=new Crt),$8[t]}function xrt(e,t){const r=e.toString();return W8[r]||(W8[r]=t()),W8[r]}class Trt{constructor(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(t,r){this.closeAfterResponse=t,this.onClose=r,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(t,r){for(this.pendingResponses[t]=r;this.pendingResponses[this.currentResponseNum];){const n=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let i=0;i<n.length;++i)n[i]&&I_(()=>{this.onMessage_(n[i])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}const qie="start",Art="close",Prt="pLPCommand",Rrt="pRTLPCB",$we="id",Wwe="pw",Gwe="ser",Ort="cb",Irt="seg",krt="ts",Nrt="d",Drt="dframe",Kwe=1870,Ywe=30,Mrt=Kwe-Ywe,Lrt=25e3,Frt=3e4;class wy{constructor(t,r,n,i,a,o,s){this.connId=t,this.repoInfo=r,this.applicationId=n,this.appCheckToken=i,this.authToken=a,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=Qx(t),this.stats_=x$(r),this.urlFn=l=>(this.appCheckToken&&(l[lH]=this.appCheckToken),jwe(r,Vwe,l))}open(t,r){this.curSegmentNum=0,this.onDisconnect_=r,this.myPacketOrderer=new Trt(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(Frt)),frt(()=>{if(this.isClosed_)return;this.scriptTagHolder=new T$((...a)=>{const[o,s,l,c,d]=a;if(this.incrementIncomingBytes_(a),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,o===qie)this.id=s,this.password=l;else if(o===Art)s?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(s,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+o)},(...a)=>{const[o,s]=a;this.incrementIncomingBytes_(a),this.myPacketOrderer.handleResponse(o,s)},()=>{this.onClosed_()},this.urlFn);const n={};n[qie]="t",n[Gwe]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(n[Ort]=this.scriptTagHolder.uniqueCallbackIdentifier),n[Dwe]=C$,this.transportSessionId&&(n[Mwe]=this.transportSessionId),this.lastSessionId&&(n[zwe]=this.lastSessionId),this.applicationId&&(n[Hwe]=this.applicationId),this.appCheckToken&&(n[lH]=this.appCheckToken),typeof location<"u"&&location.hostname&&Bwe.test(location.hostname)&&(n[Lwe]=Fwe);const i=this.urlFn(n);this.log_("Connecting via long-poll to "+i),this.scriptTagHolder.addTag(i,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){wy.forceAllow_=!0}static forceDisallow(){wy.forceDisallow_=!0}static isAvailable(){return wy.forceAllow_?!0:!wy.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!prt()&&!mrt()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(t){const r=Lo(t);this.bytesSent+=r.length,this.stats_.incrementCounter("bytes_sent",r.length);const n=MEe(r),i=kwe(n,Mrt);for(let a=0;a<i.length;a++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,i.length,i[a]),this.curSegmentNum++}addDisconnectPingFrame(t,r){this.myDisconnFrame=document.createElement("iframe");const n={};n[Drt]="t",n[$we]=t,n[Wwe]=r,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(t){const r=Lo(t).length;this.bytesReceived+=r,this.stats_.incrementCounter("bytes_received",r)}}class T${constructor(t,r,n,i){this.onDisconnect=n,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(Math.random()*1e8),this.sendNewPolls=!0;{this.uniqueCallbackIdentifier=crt(),window[Prt+this.uniqueCallbackIdentifier]=t,window[Rrt+this.uniqueCallbackIdentifier]=r,this.myIFrame=T$.createI
41Frame_();let a="";this.myIFrame.src&&this.myIFrame.src.substr(0,11)==="javascript:"&&(a='<script>document.domain="'+document.domain+'";<\/script>');const o="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(s){Xo("frame writing exception"),s.stack&&Xo(s.stack),Xo(s)}}}static createIFrame_(){const t=document.createElement("iframe");if(t.style.display="none",document.body){document.body.appendChild(t);try{t.contentWindow.document||Xo("No IE domain setting required")}catch{const n=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+n+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const t=this.onDisconnect;t&&(this.onDisconnect=null,t())}startLongPoll(t,r){for(this.myID=t,this.myPW=r,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const t={};t[$we]=this.myID,t[Wwe]=this.myPW,t[Gwe]=this.currentSerial;let r=this.urlFn(t),n="",i=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+Ywe+n.length<=Kwe;){const o=this.pendingSegs.shift();n=n+"&"+Irt+i+"="+o.seg+"&"+krt+i+"="+o.ts+"&"+Nrt+i+"="+o.d,i++}return r=r+n,this.addLongPollTag_(r,this.currentSerial),!0}else return!1}enqueueSegment(t,r,n){this.pendingSegs.push({seg:t,ts:r,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(t,r){this.outstandingRequests.add(r);const n=()=>{this.outstandingRequests.delete(r),this.newRequest_()},i=setTimeout(n,Math.floor(Lrt)),a=()=>{clearTimeout(i),n()};this.addTag(t,a)}addTag(t,r){setTimeout(()=>{try{if(!this.sendNewPolls)return;const n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=t,n.onload=n.onreadystatechange=function(){const i=n.readyState;(!i||i==="loaded"||i==="complete")&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),r())},n.onerror=()=>{Xo("Long-poll script failed to load: "+t),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch{}},Math.floor(1))}}const Brt=16384,zrt=45e3;let yO=null;typeof MozWebSocket<"u"?yO=MozWebSocket:typeof WebSocket<"u"&&(yO=WebSocket);class wu{constructor(t,r,n,i,a,o,s){this.connId=t,this.applicationId=n,this.appCheckToken=i,this.authToken=a,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=Qx(this.connId),this.stats_=x$(r),this.connURL=wu.connectionURL_(r,o,s,i,n),this.nodeAdmin=r.nodeAdmin}static connectionURL_(t,r,n,i,a){const o={};return o[Dwe]=C$,typeof location<"u"&&location.hostname&&Bwe.test(location.hostname)&&(o[Lwe]=Fwe),r&&(o[Mwe]=r),n&&(o[zwe]=n),i&&(o[lH]=i),a&&(o[Hwe]=a),jwe(t,Uwe,o)}open(t,r){this.onDisconnect=r,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Nv.set("previous_websocket_failure",!0);try{let n;LQe(),this.mySock=new yO(this.connURL,[],n)}catch(n){this.log_("Error instantiating WebSocket.");const i=n.message||n.data;i&&this.log_(i),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=n=>{this.handleIncomingFrame(n)},this.mySock.onerror=n=>{this.log_("WebSocket error.  Closing connection.");const i=n.message||n.data;i&&this.log_(i),this.onClosed_()}}start(){}static forceDisallow(){wu.forceDisallow_=!0}static isAvailable(){let t=!1;if(typeof navigator<"u"&&navigator.userAgent){const r=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(r);n&&n.length>1&&parseFloat(n[1])<4.4&&(t=!0)}return!t&&yO!==null&&!wu.forceDisallow_}static previouslyFailed(){return Nv.isInMemoryStorage||Nv.get("previous_websocket_failure")===!0}markConnectionHealthy(){Nv.remove("previous_websocket_failure")}appendFrame_(t){if(this.frames.push(t),this.frames.length===this.totalFrames){const r=this.frames.join("");this.frames=null;const n=lC(r);this.onMessage(n)}}handleNewFrameCount_(t){this.totalFrames=t,this.frames=[]}extractFrameCount_(t){if(ur(this.frames===null,"We already have a frame buffer"),t.length<=6){const r=Number(t);if(!isNaN(r))return this.handleNewFrameCount_(r),null}return this.handleNewFrameCount_(1),t}handleIncomingFrame(t){if(this.mySock===null)return;const r=t.data;if(this.bytesReceived+=r.length,this.stats_.incrementCounter("bytes_received",r.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(r);else{const n=this.extractFrameCount_(r);n!==null&&this.appendFrame_(n)}}send(t){this.resetKeepAlive();const r=Lo(t);this.bytesSent+=r.length,this.stats_.incrementCounter("bytes_sent",r.length);const n=kwe(r,Brt);n.length>1&&this.sendString_(String(n.length));for(let i=0;i<n.length;i++)this.sendString_(n[i])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(zrt))}sendString_(t){try{this.mySock.send(t)}catch(r){this.log_("Exception thrown from WebSocket.send():",r.message||r.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}wu.responsesRequiredToBeHealthy=2;wu.healthyTimeout=3e4;class fC{static get ALL_TRANSPORTS(){return[wy,wu]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}constructor(t){this.initTransports_(t)}initTransports_(t){const r=wu&&wu.isAvailable();let n=r&&!wu.previouslyFailed();if(t.webSocketOnly&&(r||sl("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),n=!0),n)this.transports_=[wu];else{const i=this.transports_=[];for(const a of fC.ALL_TRANSPORTS)a&&a.isAvailable()&&i.push(a);fC.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}fC.globalTransportInitialized_=!1;const Hrt=6e4,Urt=5e3,Vrt=10*1024,qrt=100*1024,G8="t",jie="d",jrt="s",$ie="r",$rt="e",W
vendor: 9,919 bytes, line 41
41ie="o",Gie="a",Kie="n",Yie="p",Wrt="h";class Grt{constructor(t,r,n,i,a,o,s,l,c,d){this.id=t,this.repoInfo_=r,this.applicationId_=n,this.appCheckToken_=i,this.authToken_=a,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=l,this.onKill_=c,this.lastSessionId=d,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=Qx("c:"+this.id+":"),this.transportManager_=new fC(r),this.log_("Connection created"),this.start_()}start_(){const t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;const r=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(r,n)},Math.floor(0));const i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=gS(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>qrt?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes.  Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>Vrt?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes.  Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(i)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(t){return r=>{t===this.conn_?this.onConnectionLost_(r):t===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(t){return r=>{this.state_!==2&&(t===this.rx_?this.onPrimaryMessageReceived_(r):t===this.secondaryConn_?this.onSecondaryMessageReceived_(r):this.log_("message on old connection"))}}sendRequest(t){const r={t:"d",d:t};this.sendData_(r)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(t){if(G8 in t){const r=t[G8];r===Gie?this.upgradeIfSecondaryHealthy_():r===$ie?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):r===Wie&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(t){const r=yb("t",t),n=yb("d",t);if(r==="c")this.onSecondaryControl_(n);else if(r==="d")this.pendingDataMessages.push(n);else throw new Error("Unknown protocol layer: "+r)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:Yie,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:Gie,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:Kie,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(t){const r=yb("t",t),n=yb("d",t);r==="c"?this.onControl_(n):r==="d"&&this.onDataMessage_(n)}onDataMessage_(t){this.onPrimaryResponse_(),this.onMessage_(t)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(t){const r=yb(G8,t);if(jie in t){const n=t[jie];if(r===Wrt){const i={...n};this.repoInfo_.isUsingEmulator&&(i.h=this.repoInfo_.host),this.onHandshake_(i)}else if(r===Kie){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let i=0;i<this.pendingDataMessages.length;++i)this.onDataMessage_(this.pendingDataMessages[i]);this.pendingDataMessages=[],this.tryCleanupConnection()}else r===jrt?this.onConnectionShutdown_(n):r===$ie?this.onReset_(n):r===$rt?sH("Server Error: "+n):r===Wie?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):sH("Unknown control packet command: "+r)}}onHandshake_(t){const r=t.ts,n=t.v,i=t.h;this.sessionId=t.s,this.repoInfo_.host=i,this.state_===0&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,r),C$!==n&&sl("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)}startUpgrade_(t){this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;const r=this.connReceiver_(this.secondaryConn_),n=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(r,n),gS(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(Hrt))}onReset_(t){this.log_("Reset packet received.  New host: "+t),this.repoInfo_.host=t,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(t,r){this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(r,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):gS(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(Urt))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:Yie,d:{}}}))}onSecondaryConnectionLost_(){const t=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===t||this.rx_===t)&&this.close()}onConnectionLost_(t){this.conn_=null,!t&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Nv.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(t){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(t)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class Xwe{put(t,r,n,i){}merge(t,r,n,i){}refreshAuthToken(t){}refreshAppCheckToken(t){}onDisconnectPut(t,r,n){}onDisconnectMerge(t,r,n){}onDisconnectCancel(t,r){}reportStats(t){}}class Zwe{constructor(t){this.allowedEvents_=t,this.listeners_={},ur(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}trigger(t,...r){if(Array.isArray(this.listeners_[t])){const n=[...this.listeners_[t]];for(let i=0;i<n.length;i++)n[i].callback.apply(n[i].context,r)}}on(t,r,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:r,context:n});const i=this.getInitialEvent(t);i&&r.apply(n,i)}off(t,r,n){this.validateEventType_(t);const i=this.listeners_[t]||[];for(let a=0;a<i.length;a++)if(i[a].callback===r&&(!n||n===i[a].context)){i.splice(a,1);return}}validateEventType_(t){ur(this.allowedEvents_.find(r=>r===t),"Unknown event: "+t)}}class _O extends Zwe{static getInstance(){return new _O}constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!d$()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}getInitialEvent(t){return ur(t==="online","Unknown event type: "+t),[this.online_]}currentlyOnline(){return this.online_}}const Xie=32,Zie=768;class Gi{constructor(t,r){if(r===void 0){this.pieces_=t.split("/");let n=0;for(let i=0;i<this.pieces_.length;i++)this.pieces_[i].length>0&&(this.pieces_[n]=this.pieces_[i],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=r}toString(){let t="";for(let r=this.pieceNum_;r<this.pieces_.length;r++)this.pieces_[r]!==""&&(t+="/"+this.pieces_[r]);return t||"/"}}function Ei(){return new Gi("")}function Bn(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function tm(e){return e.pieces_.length-e.pieceNum_}function ua(e){let t=e.pieceNum_;return t<e.pieces_.length&&t++,new Gi(e.pieces_,t)}function A$(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function Krt(e){let t="";for(let r=e.pieceNum_;r<e.pieces_.length;r++)e.pieces_[r]!==""&&(t+="/"+encodeURIComponent(String(e.pieces_[r])));return t||"/"}function hC(e,t=0){return e.pieces_.slice(e.pieceNum_+t)}function Qwe(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let r=e.pieceNum_;r<e.pieces_.length-1;r++)t.push(e.pieces_[r]);return new Gi(t,0)}function $a(e,t){const r=[];for(let n=e.pieceNum_;n<e.pieces_.length;n++)r.push(e.pieces_[n]);if(t instanceof Gi)for(let n=t.pieceNum_;n<t.pieces_.length;n++)r.push(t.pieces_[n]);else{const n=t.split("/");for(let i=0;i<n.length;i++)n[i].length>0&&r.push(n[i])}return new Gi(r,0)}function Vn(e){return e.pieceNum_>=e.pieces_.length}function al(e,t){const r=Bn(e),n=Bn(t);if(r===null)return t;if(r===n)return al(ua(e),ua(t));
41throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function Yrt(e,t){const r=hC(e,0),n=hC(t,0);for(let i=0;i<r.length&&i<n.length;i++){const a=i0(r[i],n[i]);if(a!==0)return a}return r.length===n.length?0:r.length<n.length?-1:1}function P$(e,t){if(tm(e)!==tm(t))return!1;for(let r=e.pieceNum_,n=t.pieceNum_;r<=e.pieces_.length;r++,n++)if(e.pieces_[r]!==t.pieces_[n])return!1;return!0}function Lc(e,t){let r=e.pieceNum_,n=t.pieceNum_;if(tm(e)>tm(t))return!1;for(;r<e.pieces_.length;){if(e.pieces_[r]!==t.pieces_[n])return!1;++r,++n}return!0}class Xrt{constructor(t,r){this.errorPrefix_=r,this.parts_=hC(t,0),this.byteLength_=Math.max(1,this.parts_.length);for(let n=0;n<this.parts_.length;n++)this.byteLength_+=l5(this.parts_[n]);Jwe(this)}}function Zrt(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=l5(t),Jwe(e)}function Qrt(e){const t=e.parts_.pop();e.byteLength_-=l5(t),e.parts_.length>0&&(e.byteLength_-=1)}function Jwe(e){if(e.byteLength_>Zie)throw new Error(e.errorPrefix_+"has a key path longer than "+Zie+" bytes ("+e.byteLength_+").");if(e.parts_.length>Xie)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+Xie+") or object contains a cycle "+yv(e))}function yv(e){return e.parts_.length===0?"":"in property '"+e.parts_.join(".")+"'"}class R$ extends Zwe{static getInstance(){return new R$}constructor(){super(["visible"]);let t,r;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(r="visibilitychange",t="hidden"):typeof document.mozHidden<"u"?(r="mozvisibilitychange",t="mozHidden"):typeof document.msHidden<"u"?(r="msvisibilitychange",t="msHidden"):typeof document.webkitHidden<"u"&&(r="webkitvisibilitychange",t="webkitHidden")),this.visible_=!0,r&&document.addEventListener(r,()=>{const n=!document[t];n!==this.visible_&&(this.visible_=n,this.trigger("visible",n))},!1)}getInitialEvent(t){return ur(t==="visible","Unknown event type: "+t),[this.visible_]}}const _b=1e3,Jrt=300*1e3,Qie=30*1e3,ent=1.3,tnt=3e4,rnt="server_kill",Jie=3;class jf extends Xwe{constructor(t,r,n,i,a,o,s,l){if(super(),this.repoInfo_=t,this.applicationId_=r,this.onDataUpdate_=n,this.onConnectStatus_=i,this.onServerInfoUpdate_=a,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=l,this.id=jf.nextPersistentConnectionId_++,this.log_=Qx("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=_b,this.maxReconnectDelay_=Jrt,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,l)throw new Error("Auth override specified in options, but not supported on non Node.js platforms");R$.getInstance().on("visible",this.onVisible_,this),t.host.indexOf("fblocal")===-1&&_O.getInstance().on("online",this.onOnline_,this)}sendRequest(t,r,n){const i=++this.requestNumber_,a={r:i,a:t,b:r};this.log_(Lo(a)),ur(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(a),n&&(this.requestCBHash_[i]=n)}get(t){this.initConnection_();const r=new vd,i={action:"g",request:{p:t._path.toString(),q:t._queryObject},onComplete:o=>{const s=o.d;o.s==="ok"?r.resolve(s):r.reject(s)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;const a=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(a),r.promise}listen(t,r,n,i){this.initConnection_();const a=t._queryIdentifier,o=t._path.toString();this.log_("Listen called for "+o+" "+a),this.listens.has(o)||this.listens.set(o,new Map),ur(t._queryParams.isDefault()||!t._queryParams.loadsAllData(),"listen() called for non-default but complete query"),ur(!this.listens.get(o).has(a),"listen() called twice for same path/queryId.");const s={onComplete:i,hashFn:r,query:t,tag:n};this.listens.get(o).set(a,s),this.connected_&&this.sendListen_(s)}sendGet_(t){const r=this.outstandingGets_[t];this.sendRequest("g",r.request,n=>{delete this.outstandingGets_[t],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),r.onComplete&&r.onComplete(n)})}sendListen_(t){const r=t.query,n=r._path.toString(),i=r._queryIdentifier;this.log_("Listen on "+n+" for "+i);const a={p:n},o="q";t.tag&&(a.q=r._queryObject,a.t=t.tag),a.h=t.hashFn(),this.sendRequest(o,a,s=>{const l=s.d,c=s.s;jf.warnOnListenWarnings_(l,r),(this.listens.get(n)&&this.listens.get(n).get(i))===t&&(this.log_("listen response",s),c!=="ok"&&this.removeListen_(n,i),t.onComplete&&t.onComplete(c,l))})}static warnOnListenWarnings_(t,r){if(t&&typeof t=="object"&&Wd(t,"w")){const n=h1(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){const i='".indexOn": "'+r._queryParams.getIndex().toString()+'"',a=r._path.toString();sl(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${i} at ${a} to your security rules for better performance.`)}}}refreshAuthToken(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(t)}reduceReconnectDelayIfAdminCredential_(t){(t&&t.length===40||UQe(t))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=Qie)}refreshAppCheckToken(t){this.appCheckToken_=t,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const t=this.authToken_,r=HQe(t)?"auth":"gauth",n={cred:t};this.authOverride_===null?n.noauth=!0:typeof this.authOverride_=="object"&&(n.authvar=this.authOverride_),this.sendRequest(r,
41n,i=>{const a=i.s,o=i.d||"error";this.authToken_===t&&(a==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(a,o))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},t=>{const r=t.s,n=t.d||"error";r==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(r,n)})}unlisten(t,r){const n=t._path.toString(),i=t._queryIdentifier;this.log_("Unlisten called for "+n+" "+i),ur(t._queryParams.isDefault()||!t._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,i)&&this.connected_&&this.sendUnlisten_(n,i,t._queryObject,r)}sendUnlisten_(t,r,n,i){this.log_("Unlisten on "+t+" for "+r);const a={p:t},o="n";i&&(a.q=n,a.t=i),this.sendRequest(o,a)}onDisconnectPut(t,r,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",t,r,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:r,onComplete:n})}onDisconnectMerge(t,r,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",t,r,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:r,onComplete:n})}onDisconnectCancel(t,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",t,null,r):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:r})}sendOnDisconnect_(t,r,n,i){const a={p:r,d:n};this.log_("onDisconnect "+t,a),this.sendRequest(t,a,o=>{i&&setTimeout(()=>{i(o.s,o.d)},Math.floor(0))})}put(t,r,n,i){this.putInternal("p",t,r,n,i)}merge(t,r,n,i){this.putInternal("m",t,r,n,i)}putInternal(t,r,n,i,a){this.initConnection_();const o={p:r,d:n};a!==void 0&&(o.h=a),this.outstandingPuts_.push({action:t,request:o,onComplete:i}),this.outstandingPutCount_++;const s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+r)}sendPut_(t){const r=this.outstandingPuts_[t].action,n=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(r,n,a=>{this.log_(r+" response",a),delete this.outstandingPuts_[t],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),i&&i(a.s,a.d)})}reportStats(t){if(this.connected_){const r={c:t};this.log_("reportStats",r),this.sendRequest("s",r,n=>{if(n.s!=="ok"){const a=n.d;this.log_("reportStats","Error sending stats: "+a)}})}}onDataMessage_(t){if("r"in t){this.log_("from server: "+Lo(t));const r=t.r,n=this.requestCBHash_[r];n&&(delete this.requestCBHash_[r],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}}onDataPush_(t,r){this.log_("handleServerMessage",t,r),t==="d"?this.onDataUpdate_(r.p,r.d,!1,r.t):t==="m"?this.onDataUpdate_(r.p,r.d,!0,r.t):t==="c"?this.onListenRevoked_(r.p,r.q):t==="ac"?this.onAuthRevoked_(r.s,r.d):t==="apc"?this.onAppCheckRevoked_(r.s,r.d):t==="sd"?this.onSecurityDebugPacket_(r):sH("Unrecognized action received from server: "+Lo(t)+`
42Are you using the latest client?`)}onReady_(t,r){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(t),this.lastSessionId=r,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(t){ur(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(t))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=_b,this.realtime_||this.scheduleConnect_(0)),this.visible_=t}onOnline_(t){t?(this.log_("Browser went online."),this.reconnectDelay_=_b,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>tnt&&(this.reconnectDelay_=_b),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const t=Math.max(0,new Date().getTime()-this.lastConnectionAttemptTime_);let r=Math.max(0,this.reconnectDelay_-t);
42r=Math.random()*r,this.log_("Trying to reconnect in "+r+"ms"),this.scheduleConnect_(r),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*ent)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const t=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+jf.nextConnectionId_++,a=this.lastSessionId;let o=!1,s=null;const l=function(){s?s.close():(o=!0,n())},c=function(f){ur(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(f)};this.realtime_={close:l,sendRequest:c};const d=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[f,h]=await Promise.all([this.authTokenProvider_.getToken(d),this.appCheckTokenProvider_.getToken(d)]);o?Xo("getToken() completed but was canceled"):(Xo("getToken() completed. Creating connection."),this.authToken_=f&&f.accessToken,this.appCheckToken_=h&&h.token,s=new Grt(i,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,t,r,n,p=>{sl(p+" ("+this.repoInfo_.toString()+")"),this.interrupt(rnt)},a))}catch(f){this.log_("Failed to get token: "+f),o||(this.repoInfo_.nodeAdmin&&sl(f),l())}}}interrupt(t){Xo("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(t){Xo("Resuming connection for reason: "+t),delete this.interruptReasons_[t],uO(this.interruptReasons_)&&(this.reconnectDelay_=_b,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(t){const r=t-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:r})}cancelSentTransactions_(){for(let t=0;t<this.outstandingPuts_.length;t++){const r=this.outstandingPuts_[t];r&&"h"in r.request&&r.queued&&(r.onComplete&&r.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}this.outstandingPutCount_===0&&(this.outstandingPuts_=[])}onListenRevoked_(t,r){let n;r?n=r.map(a=>S$(a)).join("$"):n="default";const i=this.removeListen_(t,n);i&&i.onComplete&&i.onComplete("permission_denied")}removeListen_(t,r){const n=new Gi(t).toString();let i;if(this.listens.has(n)){const a=this.listens.get(n);i=a.get(r),a.delete(r),a.size===0&&this.listens.delete(n)}else i=void 0;return i}onAuthRevoked_(t,r){Xo("Auth token revoked: "+t+"/"+r),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(t==="invalid_token"||t==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=Jie&&(this.reconnectDelay_=Qie,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(t,r){Xo("App check token revoked: "+t+"/"+r),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(t==="invalid_token"||t==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=Jie&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace(`
43`,`
44FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const t of this.listens.values())for(const r of t.values())this.sendListen_(r);for(let t=0;t<this.outstandingPuts_.length;t++)this.outstandingPuts_[t]&&this.sendPut_(t);for(;this.onDisconnectRequestQueue_.length;){const t=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(t.action,t.pathString,t.data,t.onComplete)}for(let t=0;t<this.outstandingGets_.length;t++)this.outstandingGets_[t]&&this.sendGet_(t)}sendConnectStats_(){const t={};let r="js";t["sdk."+r+"."+Rwe.replace(/\./g,"-")]=1,d$()?t["framework.cordova"]=1:HEe()&&(t["framework.reactnative"]=1),this.reportStats(t)}shouldReconnect_(){const t=_O.getInstance().currentlyOnline();return uO(this.interruptReasons_)&&t}}jf.nextPersistentConnectionId_=0;jf.nextConnectionId_=0;class jn{constructor(t,r){this.name=t,this.node=r}static Wrap(t,r){return new jn(t,r)}}class m5{getCompare(){return this.compare.bind(this)}indexedValueChanged(t,r){const n=new jn(m1,t),i=new jn(m1,r);return this.compare(n,i)!==0}
vendor: 4,038 bytes, line 44
44minPost(){return jn.MIN}}let jT;class eSe extends m5{static get __EMPTY_NODE(){return jT}static set __EMPTY_NODE(t){jT=t}compare(t,r){return i0(t.name,r.name)}isDefinedOn(t){throw T_("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(t,r){return!1}minPost(){return jn.MIN}maxPost(){return new jn(vg,jT)}makePost(t,r){return ur(typeof t=="string","KeyIndex indexValue must always be a string."),new jn(t,jT)}toString(){return".key"}}const $y=new eSe;class $T{constructor(t,r,n,i,a=null){this.isReverse_=i,this.resultGenerator_=a,this.nodeStack_=[];let o=1;for(;!t.isEmpty();)if(t=t,o=r?n(t.key,r):1,i&&(o*=-1),o<0)this.isReverse_?t=t.left:t=t.right;else if(o===0){this.nodeStack_.push(t);break}else this.nodeStack_.push(t),this.isReverse_?t=t.right:t=t.left}getNext(){if(this.nodeStack_.length===0)return null;let t=this.nodeStack_.pop(),r;if(this.resultGenerator_?r=this.resultGenerator_(t.key,t.value):r={key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return r}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}}}class Yo{constructor(t,r,n,i,a){this.key=t,this.value=r,this.color=n??Yo.RED,this.left=i??Al.EMPTY_NODE,this.right=a??Al.EMPTY_NODE}copy(t,r,n,i,a){return new Yo(t??this.key,r??this.value,n??this.color,i??this.left,a??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,r,n){let i=this;const a=n(t,i.key);return a<0?i=i.copy(null,null,null,i.left.insert(t,r,n),null):a===0?i=i.copy(null,r,null,null,null):i=i.copy(null,null,null,null,i.right.insert(t,r,n)),i.fixUp_()}removeMin_(){if(this.left.isEmpty())return Al.EMPTY_NODE;let t=this;return!t.left.isRed_()&&!t.left.left.isRed_()&&(t=t.moveRedLeft_()),t=t.copy(null,null,null,t.left.removeMin_(),null),t.fixUp_()}remove(t,r){let n,i;if(n=this,r(t,n.key)<0)!n.left.isEmpty()&&!n.left.isRed_()&&!n.left.left.isRed_()&&(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,r),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),!n.right.isEmpty()&&!n.right.isRed_()&&!n.right.left.isRed_()&&(n=n.moveRedRight_()),r(t,n.key)===0){if(n.right.isEmpty())return Al.EMPTY_NODE;i=n.right.min_(),n=n.copy(i.key,i.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,r))}return n.fixUp_()}isRed_(){return this.color}fixUp_(){let t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t}moveRedLeft_(){let t=this.colorFlip_();return t.right.left.isRed_()&&(t=t.copy(null,null,null,null,t.right.rotateRight_()),t=t.rotateLeft_(),t=t.colorFlip_()),t}moveRedRight_(){let t=this.colorFlip_();return t.left.left.isRed_()&&(t=t.rotateRight_(),t=t.colorFlip_()),t}rotateLeft_(){const t=this.copy(null,null,Yo.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight_(){const t=this.copy(null,null,Yo.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip_(){const t=this.left.copy(null,null,!this.left.color,null,null),r=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,r)}checkMaxDepth_(){const t=this.check_();return Math.pow(2,t)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");
44if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)}}Yo.RED=!0;Yo.BLACK=!1;class nnt{copy(t,r,n,i,a){return this}insert(t,r,n){return new Yo(t,r,null)}remove(t,r){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class Al{constructor(t,r=Al.EMPTY_NODE){this.comparator_=t,this.root_=r}insert(t,r){return new Al(this.comparator_,this.root_.insert(t,r,this.comparator_).copy(null,null,Yo.BLACK,null,null))}remove(t){return new Al(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,Yo.BLACK,null,null))}get(t){let r,n=this.root_;for(;!n.isEmpty();){if(r=this.comparator_(t,n.key),r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}getPredecessorKey(t){let r,n=this.root_,i=null;for(;!n.isEmpty();)if(r=this.comparator_(t,n.key),r===0){if(n.left.isEmpty())return i?i.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}else r<0?n=n.left:r>0&&(i=n,n=n.right);throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(t){return this.root_.inorderTraversal(t)}reverseTraversal(t){return this.root_.reverseTraversal(t)}getIterator(t){return new $T(this.root_,null,this.comparator_,!1,t)}getIteratorFrom(t,r){return new $T(this.root_,t,this.comparator_,!1,r)}getReverseIteratorFrom(t,r){return new $T(this.root_,t,this.comparator_,!0,r)}getReverseIterator(t){return new $T(this.root_,null,this.comparator_,!0,t)}}Al.EMPTY_NODE=new nnt;function int(e,t){return i0(e.name,t.name)}function O$(e,t){return i0(e,t)}let cH;function ant(e){cH=e}const tSe=function(e){return typeof e=="number"?"number:"+Nwe(e):"string:"+e},rSe=function(e){if(e.isLeafNode()){const t=e.val();ur(typeof t=="string"||typeof t=="number"||typeof t=="object"&&Wd(t,".sv"),"Priority must be a string or number.")}else ur(e===cH||e.isEmpty(),"priority of unexpected type.");ur(e===cH||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let eae;class Ko{static set __childrenNodeConstructor(t){eae=t}static get __childrenNodeConstructor(){return eae}constructor(t,r=Ko.__childrenNodeConstructor.EMPTY_NODE){this.value_=t,this.priorityNode_=r,this.lazyHash_=null,ur(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),rSe(this.priorityNode_)}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(t){return new Ko(this.value_,t)}getImmediateChild(t){return t===".priority"?this.priorityNode_:Ko.__childrenNodeConstructor.EMPTY_NODE}getChild(t){return Vn(t)?this:Bn(t)===".priority"?this.priorityNode_:Ko.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(t,r){return null}updateImmediateChild(t,r){return t===".priority"?this.updatePriority(r):r.isEmpty()&&t!==".priority"?this:Ko.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,r).updatePriority(this.priorityNode_)}updateChild(t,r){const n=Bn(t);return n===null?r:r.isEmpty()&&n!==".priority"?this:(ur(n!==".priority"||tm(t)===1,".priority must be the last token in a path"),this.updateImmediateChild(n,Ko.__childrenNodeConstructor.EMPTY_NODE.updateChild(ua(t),r)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(t,r){return!1}val(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let t="";this.priorityNode_.isEmpty()||(t+="priority:"+tSe(this.priorityNode_.val())+":");const r=typeof this.value_;t+=r+":",r==="number"?t+=Nwe(this.value_):t+=this.value_,this.lazyHash_=Iwe(t)}return this.lazyHash_}getValue(){return this.value_}compareTo(t){return t===Ko.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof Ko.__childrenNodeConstructor?-1:(ur(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))}compareToLeafNode_(t){const r=typeof t.value_,n=typeof this.value_,i=Ko.VALUE_TYPE_ORDER.indexOf(r),a=Ko.VALUE_TYPE_ORDER.indexOf(n);return ur(i>=0,"Unknown leaf type: "+r),ur(a>=0,"Unknown leaf type: "+n),i===a?n==="object"?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:a-i}withIndex(){return this}isIndexed(){return!0}equals(t){if(t===this)return!0;
44if(t.isLeafNode()){const r=t;return this.value_===r.value_&&this.priorityNode_.equals(r.priorityNode_)}else return!1}}Ko.VALUE_TYPE_ORDER=["object","boolean","number","string"];let nSe,iSe;function ont(e){nSe=e}function snt(e){iSe=e}class lnt extends m5{compare(t,r){const n=t.node.getPriority(),i=r.node.getPriority(),a=n.compareTo(i);return a===0?i0(t.name,r.name):a}isDefinedOn(t){return!t.getPriority().isEmpty()}indexedValueChanged(t,r){return!t.getPriority().equals(r.getPriority())}minPost(){return jn.MIN}maxPost(){return new jn(vg,new Ko("[PRIORITY-POST]",iSe))}makePost(t,r){const n=nSe(t);return new jn(r,new Ko("[PRIORITY-POST]",n))}toString(){return".priority"}}const Ga=new lnt,cnt=Math.log(2);class unt{constructor(t){const r=a=>parseInt(Math.log(a)/cnt,10),n=a=>parseInt(Array(a+1).join("1"),2);this.count=r(t+1),this.current_=this.count-1;const i=n(this.count);this.bits_=t+1&i}nextBitIsOne(){const t=!(this.bits_&1<<this.current_);return this.current_--,t}}const bO=function(e,t,r,n){e.sort(t);const i=function(l,c){const d=c-l;let f,h;if(d===0)return null;if(d===1)return f=e[l],h=r?r(f):f,new Yo(h,f.node,Yo.BLACK,null,null);{const p=parseInt(d/2,10)+l,g=i(l,p),_=i(p+1,c);return f=e[p],h=r?r(f):f,new Yo(h,f.node,Yo.BLACK,g,_)}},a=function(l){let c=null,d=null,f=e.length;const h=function(g,_){const b=f-g,E=f;f-=g;const S=i(b+1,E),P=e[b],O=r?r(P):P;p(new Yo(O,P.node,_,null,S))},p=function(g){c?(c.left=g,c=g):(d=g,c=g)};for(let g=0;g<l.count;++g){const _=l.nextBitIsOne(),b=Math.pow(2,l.count-(g+1));_?h(b,Yo.BLACK):(h(b,Yo.BLACK),h(b,Yo.RED))}return d},o=new unt(e.length),s=a(o);return new Al(n||t,s)};let K8;const z0={};class Mf{static get Default(){return ur(z0&&Ga,"ChildrenNode.ts has not been loaded"),K8=K8||new Mf({".priority":z0},{".priority":Ga}),K8}constructor(t,r){this.indexes_=t,this.indexSet_=r}get(t){const r=h1(this.indexes_,t);if(!r)throw new Error("No index defined for "+t);return r instanceof Al?r:null}hasIndex(t){return Wd(this.indexSet_,t.toString())}addIndex(t,r){ur(t!==$y,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const n=[];let i=!1;const a=r.getIterator(jn.Wrap);let o=a.getNext();for(;o;)i=i||t.isDefinedOn(o.node),n.push(o),o=a.getNext();let s;i?s=bO(n,t.getCompare()):s=z0;const l=t.toString(),c={...this.indexSet_};c[l]=t;const d={...this.indexes_};return d[l]=s,new Mf(d,c)}addToIndexes(t,r){const n=dO(this.indexes_,(i,a)=>{const o=h1(this.indexSet_,a);if(ur(o,"Missing index implementation for "+a),i===z0)if(o.isDefinedOn(t.node)){const s=[],l=r.getIterator(jn.Wrap);let c=l.getNext();for(;c;)c.name!==t.name&&s.push(c),c=l.getNext();return s.push(t),bO(s,o.getCompare())}else return z0;else{const s=r.get(t.name);let l=i;return s&&(l=l.remove(new jn(t.name,s))),l.insert(t,t.node)}});return new Mf(n,this.indexSet_)}removeFromIndexes(t,r){const n=dO(this.indexes_,i=>{if(i===z0)return i;{const a=r.get(t.name);return a?i.remove(new jn(t.name,a)):i}});return new Mf(n,this.indexSet_)}}let bb;class on{static get EMPTY_NODE(){return bb||(bb=new on(new Al(O$),null,Mf.Default))}constructor(t,r,n){this.children_=t,this.priorityNode_=r,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&rSe(this.priorityNode_),this.children_.isEmpty()&&ur(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}isLeafNode(){return!1}getPriority(){return this.priorityNode_||bb}updatePriority(t){return this.children_.isEmpty()?this:new on(this.children_,t,this.indexMap_)}getImmediateChild(t){if(t===".priority")return this.getPriority();{const r=this.children_.get(t);return r===null?bb:r}}getChild(t){const r=Bn(t);return r===null?this:this.getImmediateChild(r).getChild(ua(t))}hasChild(t){return this.children_.get(t)!==null}updateImmediateChild(t,r){if(ur(r,"We should always be passing snapshot nodes"),t===".priority")return this.updatePriority(r);{const n=new jn(t,r);let i,a;r.isEmpty()?(i=this.children_.remove(t),a=this.indexMap_.removeFromIndexes(n,this.children_)):(i=this.children_.insert(t,r),a=this.indexMap_.addToIndexes(n,this.children_));const o=i.isEmpty()?bb:this.priorityNode_;return new on(i,o,a)}}updateChild(t,r){const n=Bn(t);if(n===null)return r;{ur(Bn(t)!==".priority"||tm(t)===1,".priority must be the last token in a path");const i=this.getImmediateChild(n).updateChild(ua(t),r);return this.updateImmediateChild(n,i)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(t){if(this.isEmpty())return null;const r={};let n=0,i=0,a=!0;if(this.forEachChild(Ga,(o,s)=>{r[o]=s.val(t),n++,a&&on.INTEGER_REGEXP_.test(o)?i=Math.max(i,Number(o)):a=!1}),!t&&a&&i<2*n){const o=[];for(const s in r)o[s]=r[s];return o}
44else return t&&!this.getPriority().isEmpty()&&(r[".priority"]=this.getPriority().val()),r}hash(){if(this.lazyHash_===null){let t="";this.getPriority().isEmpty()||(t+="priority:"+tSe(this.getPriority().val())+":"),this.forEachChild(Ga,(r,n)=>{const i=n.hash();i!==""&&(t+=":"+r+":"+i)}),this.lazyHash_=t===""?"":Iwe(t)}return this.lazyHash_}getPredecessorChildName(t,r,n){const i=this.resolveIndex_(n);if(i){const a=i.getPredecessorKey(new jn(t,r));return a?a.name:null}else return this.children_.getPredecessorKey(t)}getFirstChildName(t){const r=this.resolveIndex_(t);if(r){const n=r.minKey();return n&&n.name}else return this.children_.minKey()}getFirstChild(t){const r=this.getFirstChildName(t);return r?new jn(r,this.children_.get(r)):null}getLastChildName(t){const r=this.resolveIndex_(t);if(r){const n=r.maxKey();return n&&n.name}else return this.children_.maxKey()}getLastChild(t){const r=this.getLastChildName(t);return r?new jn(r,this.children_.get(r)):null}forEachChild(t,r){const n=this.resolveIndex_(t);return n?n.inorderTraversal(i=>r(i.name,i.node)):this.children_.inorderTraversal(r)}getIterator(t){return this.getIteratorFrom(t.minPost(),t)}getIteratorFrom(t,r){const n=this.resolveIndex_(r);if(n)return n.getIteratorFrom(t,i=>i);{const i=this.children_.getIteratorFrom(t.name,jn.Wrap);let a=i.peek();for(;a!=null&&r.compare(a,t)<0;)i.getNext(),a=i.peek();return i}}getReverseIterator(t){return this.getReverseIteratorFrom(t.maxPost(),t)}getReverseIteratorFrom(t,r){const n=this.resolveIndex_(r);if(n)return n.getReverseIteratorFrom(t,i=>i);{const i=this.children_.getReverseIteratorFrom(t.name,jn.Wrap);let a=i.peek();for(;a!=null&&r.compare(a,t)>0;)i.getNext(),a=i.peek();return i}}compareTo(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===Jx?-1:0}withIndex(t){if(t===$y||this.indexMap_.hasIndex(t))return this;{const r=this.indexMap_.addIndex(t,this.children_);return new on(this.children_,this.priorityNode_,r)}}isIndexed(t){return t===$y||this.indexMap_.hasIndex(t)}equals(t){if(t===this)return!0;if(t.isLeafNode())return!1;{const r=t;if(this.getPriority().equals(r.getPriority()))if(this.children_.count()===r.children_.count()){const n=this.getIterator(Ga),i=r.getIterator(Ga);let a=n.getNext(),o=i.getNext();for(;a&&o;){if(a.name!==o.name||!a.node.equals(o.node))return!1;a=n.getNext(),o=i.getNext()}return a===null&&o===null}else return!1;else return!1}}resolveIndex_(t){return t===$y?null:this.indexMap_.get(t.toString())}}on.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class dnt extends on{constructor(){super(new Al(O$),on.EMPTY_NODE,Mf.Default)}compareTo(t){return t===this?0:1}equals(t){return t===this}getPriority(){return this}getImmediateChild(t){return on.EMPTY_NODE}isEmpty(){return!1}}const Jx=new dnt;Object.defineProperties(jn,{MIN:{value:new jn(m1,on.EMPTY_NODE)},MAX:{value:new jn(vg,Jx)}});eSe.__EMPTY_NODE=on.EMPTY_NODE;Ko.__childrenNodeConstructor=on;ant(Jx);snt(Jx);const fnt=!0;function oo(e,t=null){if(e===null)return on.EMPTY_NODE;if(typeof e=="object"&&".priority"in e&&(t=e[".priority"]),ur(t===null||typeof t=="string"||typeof t=="number"||typeof t=="object"&&".sv"in t,"Invalid priority type found: "+typeof t),typeof e=="object"&&".value"in e&&e[".value"]!==null&&(e=e[".value"]),typeof e!="object"||".sv"in e){const r=e;return new Ko(r,oo(t))}if(!(e instanceof Array)&&fnt){const r=[];let n=!1;if(Jo(e,(o,s)=>{if(o.substring(0,1)!=="."){const l=oo(s);l.isEmpty()||(n=n||!l.getPriority().isEmpty(),r.push(new jn(o,l)))}}),r.length===0)return on.EMPTY_NODE;const a=bO(r,int,o=>o.name,O$);if(n){const o=bO(r,Ga.getCompare());return new on(a,oo(t),new Mf({".priority":o},{".priority":Ga}))}else return new on(a,oo(t),Mf.Default)}else{let r=on.EMPTY_NODE;return Jo(e,(n,i)=>{if(Wd(e,n)&&n.substring(0,1)!=="."){const a=oo(i);(a.isLeafNode()||!a.isEmpty())&&(r=r.updateImmediateChild(n,a))}}),r.updatePriority(oo(t))}}ont(oo);class hnt extends m5{constructor(t){super(),this.indexPath_=t,ur(!Vn(t)&&Bn(t)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(t){return t.getChild(this.indexPath_)}isDefinedOn(t){return!t.getChild(this.indexPath_).isEmpty()}compare(t,r){const n=this.extractChild(t.node),i=this.extractChild(r.node),a=n.compareTo(i);return a===0?i0(t.name,r.name):a}makePost(t,r){const n=oo(t),i=on.EMPTY_NODE.updateChild(this.indexPath_,n);return new jn(r,i)}maxPost(){const t=on.EMPTY_NODE.updateChild(this.indexPath_,Jx);return new jn(vg,t)}toString(){return hC(this.indexPath_,0).join("/")}}class pnt extends m5{compare(t,r){const n=t.node.compareTo(r.node);return n===0?i0(t.name,r.name):n}isDefinedOn(t){return!0}indexedValueChanged(t,r){return!t.equals(r)}
vendor: 4,940 bytes, line 44
44minPost(){return jn.MIN}maxPost(){return jn.MAX}makePost(t,r){const n=oo(t);return new jn(r,n)}toString(){return".value"}}const mnt=new pnt;function aSe(e){return{type:"value",snapshotNode:e}}function v1(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function pC(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function mC(e,t,r){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:r}}function vnt(e,t){return{type:"child_moved",snapshotNode:t,childName:e}}class I${constructor(t){this.index_=t}updateChild(t,r,n,i,a,o){ur(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");const s=t.getImmediateChild(r);return s.getChild(i).equals(n.getChild(i))&&s.isEmpty()===n.isEmpty()||(o!=null&&(n.isEmpty()?t.hasChild(r)?o.trackChildChange(pC(r,s)):ur(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(v1(r,n)):o.trackChildChange(mC(r,n,s))),t.isLeafNode()&&n.isEmpty())?t:t.updateImmediateChild(r,n).withIndex(this.index_)}updateFullNode(t,r,n){return n!=null&&(t.isLeafNode()||t.forEachChild(Ga,(i,a)=>{r.hasChild(i)||n.trackChildChange(pC(i,a))}),r.isLeafNode()||r.forEachChild(Ga,(i,a)=>{if(t.hasChild(i)){const o=t.getImmediateChild(i);o.equals(a)||n.trackChildChange(mC(i,a,o))}else n.trackChildChange(v1(i,a))})),r.withIndex(this.index_)}updatePriority(t,r){return t.isEmpty()?on.EMPTY_NODE:t.updatePriority(r)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class vC{constructor(t){this.indexedFilter_=new I$(t.getIndex()),this.index_=t.getIndex(),this.startPost_=vC.getStartPost_(t),this.endPost_=vC.getEndPost_(t),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(t){const r=this.startIsInclusive_?this.index_.compare(this.getStartPost(),t)<=0:this.index_.compare(this.getStartPost(),t)<0,n=this.endIsInclusive_?this.index_.compare(t,this.getEndPost())<=0:this.index_.compare(t,this.getEndPost())<0;return r&&n}updateChild(t,r,n,i,a,o){return this.matches(new jn(r,n))||(n=on.EMPTY_NODE),this.indexedFilter_.updateChild(t,r,n,i,a,o)}updateFullNode(t,r,n){r.isLeafNode()&&(r=on.EMPTY_NODE);let i=r.withIndex(this.index_);i=i.updatePriority(on.EMPTY_NODE);const a=this;return r.forEachChild(Ga,(o,s)=>{a.matches(new jn(o,s))||(i=i.updateImmediateChild(o,on.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,i,n)}updatePriority(t,r){return t}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(t){if(t.hasStart()){const r=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),r)}else return t.getIndex().minPost()}static getEndPost_(t){if(t.hasEnd()){const r=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),r)}else return t.getIndex().maxPost()}}class gnt{constructor(t){this.withinDirectionalStart=r=>this.reverse_?this.withinEndPost(r):this.withinStartPost(r),this.withinDirectionalEnd=r=>this.reverse_?this.withinStartPost(r):this.withinEndPost(r),this.withinStartPost=r=>{const n=this.index_.compare(this.rangedFilter_.getStartPost(),r);return this.startIsInclusive_?n<=0:n<0},this.withinEndPost=r=>{const n=this.index_.compare(r,this.rangedFilter_.getEndPost());return this.endIsInclusive_?n<=0:n<0},this.rangedFilter_=new vC(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft(),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}updateChild(t,r,n,i,a,o){return this.rangedFilter_.matches(new jn(r,n))||(n=on.EMPTY_NODE),t.getImmediateChild(r).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,r,n,i,a,o):this.fullLimitUpdateChild_(t,r,n,a,o)}updateFullNode(t,r,n){let i;if(r.isLeafNode()||r.isEmpty())i=on.EMPTY_NODE.withIndex(this.index_);else if(this.limit_*2<r.numChildren()&&r.isIndexed(this.index_)){i=on.EMPTY_NODE.withIndex(this.index_);let a;this.reverse_?a=r.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):a=r.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let o=0;for(;a.hasNext()&&o<this.limit_;){const s=a.getNext();if(this.withinDirectionalStart(s))if(this.withinDirectionalEnd(s))i=i.updateImmediateChild(s.name,s.node),o++;else break;else continue}}else{i=r.withIndex(this.index_),i=i.updatePriority(on.EMPTY_NODE);let a;this.reverse_?a=i.getReverseIterator(this.index_):a=i.getIterator(this.index_);let o=0;for(;a.hasNext();){const s=a.getNext();o<this.limit_&&this.withinDirectionalStart(s)&&this.withinDirectionalEnd(s)?o++:i=i.updateImmediateChild(s.name,on.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,i,n)}updatePriority(t,r){return t}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}
44fullLimitUpdateChild_(t,r,n,i,a){let o;if(this.reverse_){const f=this.index_.getCompare();o=(h,p)=>f(p,h)}else o=this.index_.getCompare();const s=t;ur(s.numChildren()===this.limit_,"");const l=new jn(r,n),c=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),d=this.rangedFilter_.matches(l);if(s.hasChild(r)){const f=s.getImmediateChild(r);let h=i.getChildAfterChild(this.index_,c,this.reverse_);for(;h!=null&&(h.name===r||s.hasChild(h.name));)h=i.getChildAfterChild(this.index_,h,this.reverse_);const p=h==null?1:o(h,l);if(d&&!n.isEmpty()&&p>=0)return a?.trackChildChange(mC(r,n,f)),s.updateImmediateChild(r,n);{a?.trackChildChange(pC(r,f));const _=s.updateImmediateChild(r,on.EMPTY_NODE);return h!=null&&this.rangedFilter_.matches(h)?(a?.trackChildChange(v1(h.name,h.node)),_.updateImmediateChild(h.name,h.node)):_}}else return n.isEmpty()?t:d&&o(c,l)>=0?(a!=null&&(a.trackChildChange(pC(c.name,c.node)),a.trackChildChange(v1(r,n))),s.updateImmediateChild(r,n).updateImmediateChild(c.name,on.EMPTY_NODE)):t}}class k${constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Ga}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return ur(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return ur(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:m1}hasEnd(){return this.endSet_}getIndexEndValue(){return ur(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return ur(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:vg}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return ur(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===Ga}copy(){const t=new k$;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.startAfterSet_=this.startAfterSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.endBeforeSet_=this.endBeforeSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_=this.index_,t.viewFrom_=this.viewFrom_,t}}function ynt(e){return e.loadsAllData()?new I$(e.getIndex()):e.hasLimit()?new gnt(e):new vC(e)}function tae(e){const t={};if(e.isDefault())return t;let r;if(e.index_===Ga?r="$priority":e.index_===mnt?r="$value":e.index_===$y?r="$key":(ur(e.index_ instanceof hnt,"Unrecognized index type!"),r=e.index_.toString()),t.orderBy=Lo(r),e.startSet_){const n=e.startAfterSet_?"startAfter":"startAt";t[n]=Lo(e.indexStartValue_),e.startNameSet_&&(t[n]+=","+Lo(e.indexStartName_))}if(e.endSet_){const n=e.endBeforeSet_?"endBefore":"endAt";t[n]=Lo(e.indexEndValue_),e.endNameSet_&&(t[n]+=","+Lo(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function rae(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let r=e.viewFrom_;r===""&&(e.isViewFromLeft()?r="l":r="r"),t.vf=r}return e.index_!==Ga&&(t.i=e.index_.toString()),t}class EO extends Xwe{reportStats(t){throw new Error("Method not implemented.")}static getListenId_(t,r){return r!==void 0?"tag$"+r:(ur(t._queryParams.isDefault(),"should have a tag if it's not a default query."),t._path.toString())}constructor(t,r,n,i){super(),this.repoInfo_=t,this.onDataUpdate_=r,this.authTokenProvider_=n,this.appCheckTokenProvider_=i,this.log_=Qx("p:rest:"),this.listens_={}}listen(t,r,n,i){const a=t._path.toString();this.log_("Listen called for "+a+" "+t._queryIdentifier);const o=EO.getListenId_(t,n),s={};this.listens_[o]=s;const l=tae(t._queryParams);this.restRequest_(a+".json",l,(c,d)=>{let f=d;if(c===404&&(f=null,c=null),c===null&&this.onDataUpdate_(a,f,!1,n),h1(this.listens_,o)===s){let h;c?c===401?h="permission_denied":h="rest_error:"+c:h="ok",i(h,null)}})}unlisten(t,r){const n=EO.getListenId_(t,r);delete this.listens_[n]}get(t){const r=tae(t._queryParams),n=t._path.toString(),i=new vd;return this.restRequest_(n+".json",r,(a,o)=>{let s=o;a===404&&(s=null,a=null),a===null?(this.onDataUpdate_(n,s,!1,null),i.resolve(s)):i.reject(new Error(s))}),i.promise}refreshAuthToken(t){}restRequest_(t,r={},n){return r.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([i,a])=>{i&&i.accessToken&&(r.auth=i.accessToken),a&&a.token&&(r.ac=a.token);const o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+t+"?ns="+this.repoInfo_.namespace+A_(r);this.log_("Sending REST request for "+o);const s=new XMLHttpRequest;s.onreadystatechange=()=>{if(n&&s.readyState===4){this.log_("REST Response for "+o+" received. status:",s.status,"response:",s.responseText);let l=null;if(s.status>=200&&s.status<300){try{l=lC(s.responseText)}catch{sl("Failed to parse JSON response for "+o+": "+s.responseText)}n(null,l)}else s.status!==401&&s.status!==404&&sl("Got unsuccessful REST response for "+o+" Status: "+s.status),n(s.status);n=null}},s.open("GET",o,!0),s.send()})}}class _nt{constructor(){this.rootNode_=on.EMPTY_NODE}getNode(t){return this.rootNode_.getChild(t)}updateSnapshot(t,r){this.rootNode_=this.rootNode_.updateChild(t,r)}}function wO(){return{value:null,children:new Map}}function k_(e,t,r){if(Vn(t))e.value=r,e.children.clear();else if(e.value!==null)e.value=e.value.updateChild(t,r);else{const n=Bn(t);e.children.has(n)||e.children.set(n,wO());const i=e.children.get(n);t=ua(t),k_(i,t,r)}}function uH(e,t){if(Vn(t))return e.value=null,e.children.clear(),!0;if(e.value!==null){if(e.value.isLeafNode())return!1;{const r=e.value;return e.value=null,r.forEachChild(Ga,(n,i)=>{k_(e,new Gi(n),i)}),uH(e,t)}}else if(e.children.size>0){const r=Bn(t);return t=ua(t),e.children.has(r)&&uH(e.children.get(r),t)&&e.children.delete(r),e.children.size===0}else return!0}function dH(e,t,r){e.value!==null?r(t,e.value):bnt(e,(n,i)=>{const a=new Gi(t.toString()+"/"+n);dH(i,a,r)})}
44function bnt(e,t){e.children.forEach((r,n)=>{t(n,r)})}class Ent{constructor(t){this.collection_=t,this.last_=null}get(){const t=this.collection_.get(),r={...t};return this.last_&&Jo(this.last_,(n,i)=>{r[n]=r[n]-i}),this.last_=t,r}}const nae=10*1e3,wnt=30*1e3,Snt=300*1e3;class Cnt{constructor(t,r){this.server_=r,this.statsToReport_={},this.statsListener_=new Ent(t);const n=nae+(wnt-nae)*Math.random();gS(this.reportStats_.bind(this),Math.floor(n))}reportStats_(){const t=this.statsListener_.get(),r={};let n=!1;Jo(t,(i,a)=>{a>0&&Wd(this.statsToReport_,i)&&(r[i]=a,n=!0)}),n&&this.server_.reportStats(r),gS(this.reportStats_.bind(this),Math.floor(Math.random()*2*Snt))}}var Pu;(function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(Pu||(Pu={}));function N$(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function D$(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function M$(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}class SO{constructor(t,r,n){this.path=t,this.affectedTree=r,this.revert=n,this.type=Pu.ACK_USER_WRITE,this.source=N$()}operationForChild(t){if(Vn(this.path)){if(this.affectedTree.value!=null)return ur(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const r=this.affectedTree.subtree(new Gi(t));return new SO(Ei(),r,this.revert)}}else return ur(Bn(this.path)===t,"operationForChild called for unrelated child."),new SO(ua(this.path),this.affectedTree,this.revert)}}class gC{constructor(t,r){this.source=t,this.path=r,this.type=Pu.LISTEN_COMPLETE}operationForChild(t){return Vn(this.path)?new gC(this.source,Ei()):new gC(this.source,ua(this.path))}}class gg{constructor(t,r,n){this.source=t,this.path=r,this.snap=n,this.type=Pu.OVERWRITE}operationForChild(t){return Vn(this.path)?new gg(this.source,Ei(),this.snap.getImmediateChild(t)):new gg(this.source,ua(this.path),this.snap)}}class g1{constructor(t,r,n){this.source=t,this.path=r,this.children=n,this.type=Pu.MERGE}operationForChild(t){if(Vn(this.path)){const r=this.children.subtree(new Gi(t));return r.isEmpty()?null:r.value?new gg(this.source,Ei(),r.value):new g1(this.source,Ei(),r)}else return ur(Bn(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new g1(this.source,ua(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class rm{constructor(t,r,n){this.node_=t,this.fullyInitialized_=r,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(t){if(Vn(t))return this.isFullyInitialized()&&!this.filtered_;const r=Bn(t);return this.isCompleteForChild(r)}isCompleteForChild(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)}getNode(){return this.node_}}class xnt{constructor(t){this.query_=t,this.index_=this.query_._queryParams.getIndex()}}function Tnt(e,t,r,n){const i=[],a=[];return t.forEach(o=>{o.type==="child_changed"&&e.index_.indexedValueChanged(o.oldSnap,o.snapshotNode)&&a.push(vnt(o.childName,o.snapshotNode))}),Eb(e,i,"child_removed",t,n,r),Eb(e,i,"child_added",t,n,r),Eb(e,i,"child_moved",a,n,r),Eb(e,i,"child_changed",t,n,r),Eb(e,i,"value",t,n,r),i}function Eb(e,t,r,n,i,a){const o=n.filter(s=>s.type===r);o.sort((s,l)=>Pnt(e,s,l)),o.forEach(s=>{const l=Ant(e,s,a);i.forEach(c=>{c.respondsTo(s.type)&&t.push(c.createEvent(l,e.query_))})})}function Ant(e,t,r){return t.type==="value"||t.type==="child_removed"||(t.prevName=r.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}function Pnt(e,t,r){if(t.childName==null||r.childName==null)throw T_("Should only compare child_ events.");const n=new jn(t.childName,t.snapshotNode),i=new jn(r.childName,r.snapshotNode);return e.index_.compare(n,i)}function v5(e,t){return{eventCache:e,serverCache:t}}function yS(e,t,r,n){return v5(new rm(t,r,n),e.serverCache)}function oSe(e,t,r,n){return v5(e.eventCache,new rm(t,r,n))}function CO(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function yg(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let Y8;const Rnt=()=>(Y8||(Y8=new Al(hrt)),Y8);class ma{static fromObject(t){let r=new ma(null);return Jo(t,(n,i)=>{r=r.set(new Gi(n),i)}),r}constructor(t,r=Rnt()){this.value=t,this.children=r}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(t,r){if(this.value!=null&&r(this.value))return{path:Ei(),value:this.value};if(Vn(t))return null;{const n=Bn(t),i=this.children.get(n);if(i!==null){const a=i.findRootMostMatchingPathAndValue(ua(t),r);return a!=null?{path:$a(new Gi(n),a.path),value:a.value}:null}else return null}}findRootMostValueAndPath(t){return this.findRootMostMatchingPathAndValue(t,()=>!0)}subtree(t){if(Vn(t))return this;{const r=Bn(t),n=this.children.get(r);return n!==null?n.subtree(ua(t)):new ma(null)}}set(t,r){if(Vn(t))return new ma(r,this.children);{const n=Bn(t),a=(this.children.get(n)||new ma(null)).set(ua(t),r),o=this.children.insert(n,a);return new ma(this.value,o)}}remove(t){if(Vn(t))return this.children.isEmpty()?new ma(null):new ma(null,this.children);{const r=Bn(t),n=this.children.get(r);if(n){const i=n.remove(ua(t));let a;return i.isEmpty()?a=this.children.remove(r):a=this.children.insert(r,i),this.value===null&&a.isEmpty()?new ma(null):new ma(this.value,a)}else return this}}get(t){if(Vn(t))return this.value;{const r=Bn(t),n=this.children.get(r);return n?n.get(ua(t)):null}}setTree(t,r){if(Vn(t))return r;{const n=Bn(t),a=(this.children.get(n)||new ma(null)).setTree(ua(t),r);let o;return a.isEmpty()?o=this.children.remove(n):o=this.children.insert(n,a),new ma(this.value,o)}}fold(t){return this.fold_(Ei(),t)}fold_(t,r){const n={};return this.children.inorderTraversal((i,a)=>{n[i]=a.fold_($a(t,i),r)}
44),r(t,this.value,n)}findOnPath(t,r){return this.findOnPath_(t,Ei(),r)}findOnPath_(t,r,n){const i=this.value?n(r,this.value):!1;if(i)return i;if(Vn(t))return null;{const a=Bn(t),o=this.children.get(a);return o?o.findOnPath_(ua(t),$a(r,a),n):null}}foreachOnPath(t,r){return this.foreachOnPath_(t,Ei(),r)}foreachOnPath_(t,r,n){if(Vn(t))return this;{this.value&&n(r,this.value);const i=Bn(t),a=this.children.get(i);return a?a.foreachOnPath_(ua(t),$a(r,i),n):new ma(null)}}foreach(t){this.foreach_(Ei(),t)}foreach_(t,r){this.children.inorderTraversal((n,i)=>{i.foreach_($a(t,n),r)}),this.value&&r(t,this.value)}foreachChild(t){this.children.inorderTraversal((r,n)=>{n.value&&t(r,n.value)})}}class ku{constructor(t){this.writeTree_=t}static empty(){return new ku(new ma(null))}}function _S(e,t,r){if(Vn(t))return new ku(new ma(r));{const n=e.writeTree_.findRootMostValueAndPath(t);if(n!=null){const i=n.path;let a=n.value;const o=al(i,t);return a=a.updateChild(o,r),new ku(e.writeTree_.set(i,a))}else{const i=new ma(r),a=e.writeTree_.setTree(t,i);return new ku(a)}}}function fH(e,t,r){let n=e;return Jo(r,(i,a)=>{n=_S(n,$a(t,i),a)}),n}function iae(e,t){if(Vn(t))return ku.empty();{const r=e.writeTree_.setTree(t,new ma(null));return new ku(r)}}function hH(e,t){return a0(e,t)!=null}function a0(e,t){const r=e.writeTree_.findRootMostValueAndPath(t);return r!=null?e.writeTree_.get(r.path).getChild(al(r.path,t)):null}function aae(e){const t=[],r=e.writeTree_.value;return r!=null?r.isLeafNode()||r.forEachChild(Ga,(n,i)=>{t.push(new jn(n,i))}):e.writeTree_.children.inorderTraversal((n,i)=>{i.value!=null&&t.push(new jn(n,i.value))}),t}function Hp(e,t){if(Vn(t))return e;{const r=a0(e,t);return r!=null?new ku(new ma(r)):new ku(e.writeTree_.subtree(t))}}function pH(e){return e.writeTree_.isEmpty()}function y1(e,t){return sSe(Ei(),e.writeTree_,t)}function sSe(e,t,r){if(t.value!=null)return r.updateChild(e,t.value);{let n=null;return t.children.inorderTraversal((i,a)=>{i===".priority"?(ur(a.value!==null,"Priority writes must always be leaf nodes"),n=a.value):r=sSe($a(e,i),a,r)}),!r.getChild(e).isEmpty()&&n!==null&&(r=r.updateChild($a(e,".priority"),n)),r}}function g5(e,t){return dSe(t,e)}function Ont(e,t,r,n,i){ur(n>e.lastWriteId,"Stacking an older write on top of newer ones"),i===void 0&&(i=!0),e.allWrites.push({path:t,snap:r,writeId:n,visible:i}),i&&(e.visibleWrites=_S(e.visibleWrites,t,r)),e.lastWriteId=n}function Int(e,t,r,n){ur(n>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:r,writeId:n,visible:!0}),e.visibleWrites=fH(e.visibleWrites,t,r),e.lastWriteId=n}function knt(e,t){for(let r=0;r<e.allWrites.length;r++){const n=e.allWrites[r];if(n.writeId===t)return n}return null}function Nnt(e,t){const r=e.allWrites.findIndex(s=>s.writeId===t);ur(r>=0,"removeWrite called with nonexistent writeId.");const n=e.allWrites[r];e.allWrites.splice(r,1);let i=n.visible,a=!1,o=e.allWrites.length-1;for(;i&&o>=0;){const s=e.allWrites[o];s.visible&&(o>=r&&Dnt(s,n.path)?i=!1:Lc(n.path,s.path)&&(a=!0)),o--}if(i){if(a)return Mnt(e),!0;if(n.snap)e.visibleWrites=iae(e.visibleWrites,n.path);else{const s=n.children;Jo(s,l=>{e.visibleWrites=iae(e.visibleWrites,$a(n.path,l))})}return!0}else return!1}function Dnt(e,t){if(e.snap)return Lc(e.path,t);for(const r in e.children)if(e.children.hasOwnProperty(r)&&Lc($a(e.path,r),t))return!0;return!1}function Mnt(e){e.visibleWrites=lSe(e.allWrites,Lnt,Ei()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}function Lnt(e){return e.visible}function lSe(e,t,r){let n=ku.empty();for(let i=0;i<e.length;++i){const a=e[i];if(t(a)){const o=a.path;let s;if(a.snap)Lc(r,o)?(s=al(r,o),n=_S(n,s,a.snap)):Lc(o,r)&&(s=al(o,r),n=_S(n,Ei(),a.snap.getChild(s)));else if(a.children){if(Lc(r,o))s=al(r,o),n=fH(n,s,a.children);else if(Lc(o,r))if(s=al(o,r),Vn(s))n=fH(n,Ei(),a.children);else{const l=h1(a.children,Bn(s));if(l){const c=l.getChild(ua(s));n=_S(n,Ei(),c)}}}else throw T_("WriteRecord should have .snap or .children")}}return n}function cSe(e,t,r,n,i){if(!n&&!i){const a=a0(e.visibleWrites,t);
44if(a!=null)return a;{const o=Hp(e.visibleWrites,t);if(pH(o))return r;if(r==null&&!hH(o,Ei()))return null;{const s=r||on.EMPTY_NODE;return y1(o,s)}}}else{const a=Hp(e.visibleWrites,t);if(!i&&pH(a))return r;if(!i&&r==null&&!hH(a,Ei()))return null;{const o=function(c){return(c.visible||i)&&(!n||!~n.indexOf(c.writeId))&&(Lc(c.path,t)||Lc(t,c.path))},s=lSe(e.allWrites,o,t),l=r||on.EMPTY_NODE;return y1(s,l)}}}function Fnt(e,t,r){let n=on.EMPTY_NODE;const i=a0(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(Ga,(a,o)=>{n=n.updateImmediateChild(a,o)}),n;if(r){const a=Hp(e.visibleWrites,t);return r.forEachChild(Ga,(o,s)=>{const l=y1(Hp(a,new Gi(o)),s);n=n.updateImmediateChild(o,l)}),aae(a).forEach(o=>{n=n.updateImmediateChild(o.name,o.node)}),n}else{const a=Hp(e.visibleWrites,t);return aae(a).forEach(o=>{n=n.updateImmediateChild(o.name,o.node)}),n}}function Bnt(e,t,r,n,i){ur(n||i,"Either existingEventSnap or existingServerSnap must exist");const a=$a(t,r);if(hH(e.visibleWrites,a))return null;{const o=Hp(e.visibleWrites,a);return pH(o)?i.getChild(r):y1(o,i.getChild(r))}}function znt(e,t,r,n){const i=$a(t,r),a=a0(e.visibleWrites,i);if(a!=null)return a;
44if(n.isCompleteForChild(r)){const o=Hp(e.visibleWrites,i);return y1(o,n.getNode().getImmediateChild(r))}else return null}function Hnt(e,t){return a0(e.visibleWrites,t)}function Unt(e,t,r,n,i,a,o){let s;const l=Hp(e.visibleWrites,t),c=a0(l,Ei());if(c!=null)s=c;else if(r!=null)s=y1(l,r);else return[];if(s=s.withIndex(o),!s.isEmpty()&&!s.isLeafNode()){const d=[],f=o.getCompare(),h=a?s.getReverseIteratorFrom(n,o):s.getIteratorFrom(n,o);let p=h.getNext();for(;p&&d.length<i;)f(p,n)!==0&&d.push(p),p=h.getNext();return d}else return[]}function Vnt(){return{visibleWrites:ku.empty(),allWrites:[],lastWriteId:-1}}function xO(e,t,r,n){return cSe(e.writeTree,e.treePath,t,r,n)}function L$(e,t){return Fnt(e.writeTree,e.treePath,t)}function oae(e,t,r,n){return Bnt(e.writeTree,e.treePath,t,r,n)}function TO(e,t){return Hnt(e.writeTree,$a(e.treePath,t))}function qnt(e,t,r,n,i,a){return Unt(e.writeTree,e.treePath,t,r,n,i,a)}function F$(e,t,r){return znt(e.writeTree,e.treePath,t,r)}function uSe(e,t){return dSe($a(e.treePath,t),e.writeTree)}function dSe(e,t){return{treePath:e,writeTree:t}}class jnt{constructor(){this.changeMap=new Map}trackChildChange(t){const r=t.type,n=t.childName;ur(r==="child_added"||r==="child_changed"||r==="child_removed","Only child changes supported for tracking"),ur(n!==".priority","Only non-priority child changes can be tracked.");const i=this.changeMap.get(n);if(i){const a=i.type;if(r==="child_added"&&a==="child_removed")this.changeMap.set(n,mC(n,t.snapshotNode,i.snapshotNode));else if(r==="child_removed"&&a==="child_added")this.changeMap.delete(n);else if(r==="child_removed"&&a==="child_changed")this.changeMap.set(n,pC(n,i.oldSnap));else if(r==="child_changed"&&a==="child_added")this.changeMap.set(n,v1(n,t.snapshotNode));else if(r==="child_changed"&&a==="child_changed")this.changeMap.set(n,mC(n,t.snapshotNode,i.oldSnap));else throw T_("Illegal combination of changes: "+t+" occurred after "+i)}else this.changeMap.set(n,t)}getChanges(){return Array.from(this.changeMap.values())}}class $nt{getCompleteChild(t){return null}getChildAfterChild(t,r,n){return null}}const fSe=new $nt;class B${constructor(t,r,n=null){this.writes_=t,this.viewCache_=r,this.optCompleteServerCache_=n}getCompleteChild(t){const r=this.viewCache_.eventCache;if(r.isCompleteForChild(t))return r.getNode().getImmediateChild(t);{const n=this.optCompleteServerCache_!=null?new rm(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return F$(this.writes_,t,n)}}getChildAfterChild(t,r,n){const i=this.optCompleteServerCache_!=null?this.optCompleteServerCache_:yg(this.viewCache_),a=qnt(this.writes_,i,r,1,n,t);return a.length===0?null:a[0]}}function Wnt(e){return{filter:e}}function Gnt(e,t){ur(t.eventCache.getNode().isIndexed(e.filter.getIndex()),"Event snap not indexed"),ur(t.serverCache.getNode().isIndexed(e.filter.getIndex()),"Server snap not indexed")}function Knt(e,t,r,n,i){const a=new jnt;let o,s;if(r.type===Pu.OVERWRITE){const c=r;c.source.fromUser?o=mH(e,t,c.path,c.snap,n,i,a):(ur(c.source.fromServer,"Unknown source."),s=c.source.tagged||t.serverCache.isFiltered()&&!Vn(c.path),o=AO(e,t,c.path,c.snap,n,i,s,a))}else if(r.type===Pu.MERGE){const c=r;c.source.fromUser?o=Xnt(e,t,c.path,c.children,n,i,a):(ur(c.source.fromServer,"Unknown source."),s=c.source.tagged||t.serverCache.isFiltered(),o=vH(e,t,c.path,c.children,n,i,s,a))}else if(r.type===Pu.ACK_USER_WRITE){const c=r;c.revert?o=Jnt(e,t,c.path,n,i,a):o=Znt(e,t,c.path,c.affectedTree,n,i,a)}else if(r.type===Pu.LISTEN_COMPLETE)o=Qnt(e,t,r.path,n,a);else throw T_("Unknown operation type: "+r.type);const l=a.getChanges();return Ynt(t,o,l),{viewCache:o,changes:l}}function Ynt(e,t,r){const n=t.eventCache;if(n.isFullyInitialized()){const i=n.getNode().isLeafNode()||n.getNode().isEmpty(),a=CO(e);(r.length>0||!e.eventCache.isFullyInitialized()||i&&!n.getNode().equals(a)||!n.getNode().getPriority().equals(a.getPriority()))&&r.push(aSe(CO(t)))}}function hSe(e,t,r,n,i,a){const o=t.eventCache;if(TO(n,r)!=null)return t;{let s,l;if(Vn(r))if(ur(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const c=yg(t),d=c instanceof on?c:on.EMPTY_NODE,f=L$(n,d);s=e.filter.updateFullNode(t.eventCache.getNode(),f,a)}else{const c=xO(n,yg(t));s=e.filter.updateFullNode(t.eventCache.getNode(),c,a)}else{const c=Bn(r);if(c===".priority"){ur(tm(r)===1,"Can't have a priority with additional path components");const d=o.getNode();l=t.serverCache.getNode();const f=oae(n,r,d,l);f!=null?s=e.filter.updatePriority(d,f):s=o.getNode()}else{const d=ua(r);let f;if(o.isCompleteForChild(c)){l=t.serverCache.getNode();const h=oae(n,r,o.getNode(),l);h!=null?f=o.getNode().getImmediateChild(c).updateChild(d,h):f=o.getNode().getImmediateChild(c)}else f=F$(n,c,t.serverCache);f!=null?s=e.filter.updateChild(o.getNode(),c,f,d,i,a):s=o.getNode()}}return yS(t,s,o.isFullyInitialized()||Vn(r),e.filter.filtersNodes())}}function AO(e,t,r,n,i,a,o,s){const l=t.serverCache;let c;const d=o?e.filter:e.filter.getIndexedFilter();if(Vn(r))c=d.updateFullNode(l.getNode(),n,null);else if(d.filtersNodes()&&!l.isFiltered()){const p=l.getNode().updateChild(r,n);c=d.updateFullNode(l.getNode(),p,null)}else{const p=Bn(r);if(!l.isCompleteForPath(r)&&tm(r)>1)return t;const g=ua(r),b=l.getNode().getImmediateChild(p).updateChild(g,n);p===".priority"?c=d.updatePriority(l.getNode(),b):c=d.updateChild(l.getNode(),p,b,g,fSe,null)}const f=oSe(t,c,l.isFullyInitialized()||Vn(r),d.filtersNodes()),h=new B$(i,f,a);return hSe(e,f,r,i,h,s)}function mH(e,t,r,n,i,a,o){const s=t.eventCache;let l,c;const d=new B$(i,t,a);if(Vn(r))c=e.filter.updateFullNode(t.eventCache.getNode(),n,o),l=yS(t,c,!0,e.filter.filtersNodes());else{const f=Bn(r);if(f===".priority")c=e.filter.updatePriority(t.eventCache.getNode(),n),l=yS(t,c,s.isFullyInitialized(),s.isFiltered());else{const h=ua(r),p=s.getNode().getImmediateChild(f);let g;if(Vn(h))g=n;else{const _=d.getCompleteChild(f);
44_!=null?A$(h)===".priority"&&_.getChild(Qwe(h)).isEmpty()?g=_:g=_.updateChild(h,n):g=on.EMPTY_NODE}if(p.equals(g))l=t;else{const _=e.filter.updateChild(s.getNode(),f,g,h,d,o);l=yS(t,_,s.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function sae(e,t){return e.eventCache.isCompleteForChild(t)}function Xnt(e,t,r,n,i,a,o){let s=t;return n.foreach((l,c)=>{const d=$a(r,l);sae(t,Bn(d))&&(s=mH(e,s,d,c,i,a,o))}),n.foreach((l,c)=>{const d=$a(r,l);sae(t,Bn(d))||(s=mH(e,s,d,c,i,a,o))}),s}function lae(e,t,r){return r.foreach((n,i)=>{t=t.updateChild(n,i)}),t}function vH(e,t,r,n,i,a,o,s){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let l=t,c;Vn(r)?c=n:c=new ma(null).setTree(r,n);const d=t.serverCache.getNode();return c.children.inorderTraversal((f,h)=>{if(d.hasChild(f)){const p=t.serverCache.getNode().getImmediateChild(f),g=lae(e,p,h);l=AO(e,l,new Gi(f),g,i,a,o,s)}}),c.children.inorderTraversal((f,h)=>{const p=!t.serverCache.isCompleteForChild(f)&&h.value===null;if(!d.hasChild(f)&&!p){const g=t.serverCache.getNode().getImmediateChild(f),_=lae(e,g,h);l=AO(e,l,new Gi(f),_,i,a,o,s)}}),l}function Znt(e,t,r,n,i,a,o){if(TO(i,r)!=null)return t;const s=t.serverCache.isFiltered(),l=t.serverCache;if(n.value!=null){if(Vn(r)&&l.isFullyInitialized()||l.isCompleteForPath(r))return AO(e,t,r,l.getNode().getChild(r),i,a,s,o);if(Vn(r)){let c=new ma(null);return l.getNode().forEachChild($y,(d,f)=>{c=c.set(new Gi(d),f)}),vH(e,t,r,c,i,a,s,o)}else return t}else{let c=new ma(null);return n.foreach((d,f)=>{const h=$a(r,d);l.isCompleteForPath(h)&&(c=c.set(d,l.getNode().getChild(h)))}),vH(e,t,r,c,i,a,s,o)}}function Qnt(e,t,r,n,i){const a=t.serverCache,o=oSe(t,a.getNode(),a.isFullyInitialized()||Vn(r),a.isFiltered());return hSe(e,o,r,n,fSe,i)}function Jnt(e,t,r,n,i,a){let o;if(TO(n,r)!=null)return t;{const s=new B$(n,t,i),l=t.eventCache.getNode();let c;if(Vn(r)||Bn(r)===".priority"){let d;if(t.serverCache.isFullyInitialized())d=xO(n,yg(t));else{const f=t.serverCache.getNode();ur(f instanceof on,"serverChildren would be complete if leaf node"),d=L$(n,f)}d=d,c=e.filter.updateFullNode(l,d,a)}else{const d=Bn(r);let f=F$(n,d,t.serverCache);f==null&&t.serverCache.isCompleteForChild(d)&&(f=l.getImmediateChild(d)),f!=null?c=e.filter.updateChild(l,d,f,ua(r),s,a):t.eventCache.getNode().hasChild(d)?c=e.filter.updateChild(l,d,on.EMPTY_NODE,ua(r),s,a):c=l,c.isEmpty()&&t.serverCache.isFullyInitialized()&&(o=xO(n,yg(t)),o.isLeafNode()&&(c=e.filter.updateFullNode(c,o,a)))}return o=t.serverCache.isFullyInitialized()||TO(n,Ei())!=null,yS(t,c,o,e.filter.filtersNodes())}}class eit{constructor(t,r){this.query_=t,this.eventRegistrations_=[];const n=this.query_._queryParams,i=new I$(n.getIndex()),a=ynt(n);this.processor_=Wnt(a);const o=r.serverCache,s=r.eventCache,l=i.updateFullNode(on.EMPTY_NODE,o.getNode(),null),c=a.updateFullNode(on.EMPTY_NODE,s.getNode(),null),d=new rm(l,o.isFullyInitialized(),i.filtersNodes()),f=new rm(c,s.isFullyInitialized(),a.filtersNodes());this.viewCache_=v5(f,d),this.eventGenerator_=new xnt(this.query_)}get query(){return this.query_}}function tit(e){return e.viewCache_.serverCache.getNode()}function rit(e){return CO(e.viewCache_)}function nit(e,t){const r=yg(e.viewCache_);return r&&(e.query._queryParams.loadsAllData()||!Vn(t)&&!r.getImmediateChild(Bn(t)).isEmpty())?r.getChild(t):null}function cae(e){return e.eventRegistrations_.length===0}function iit(e,t){e.eventRegistrations_.push(t)}function uae(e,t,r){const n=[];if(r){ur(t==null,"A cancel should cancel all event registrations.");const i=e.query._path;e.eventRegistrations_.forEach(a=>{const o=a.createCancelEvent(r,i);o&&n.push(o)})}if(t){let i=[];for(let a=0;a<e.eventRegistrations_.length;++a){const o=e.eventRegistrations_[a];if(!o.matches(t))i.push(o);else if(t.hasAnyCallback()){i=i.concat(e.eventRegistrations_.slice(a+1));break}}e.eventRegistrations_=i}else e.eventRegistrations_=[];return n}function dae(e,t,r,n){t.type===Pu.MERGE&&t.source.queryId!==null&&(ur(yg(e.viewCache_),"We should always have a full cache before handling merges"),ur(CO(e.viewCache_),"Missing event cache, even though we have a server cache"));const i=e.viewCache_,a=Knt(e.processor_,i,t,r,n);return Gnt(e.processor_,a.viewCache),ur(a.viewCache.serverCache.isFullyInitialized()||!i.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=a.viewCache,pSe(e,a.changes,a.viewCache.eventCache.getNode(),null)}function ait(e,t){const r=e.viewCache_.eventCache,n=[];
44return r.getNode().isLeafNode()||r.getNode().forEachChild(Ga,(a,o)=>{n.push(v1(a,o))}),r.isFullyInitialized()&&n.push(aSe(r.getNode())),pSe(e,n,r.getNode(),t)}function pSe(e,t,r,n){const i=n?[n]:e.eventRegistrations_;return Tnt(e.eventGenerator_,t,r,i)}let PO;class mSe{constructor(){this.views=new Map}}function oit(e){ur(!PO,"__referenceConstructor has already been defined"),PO=e}function sit(){return ur(PO,"Reference.ts has not been loaded"),PO}function lit(e){return e.views.size===0}function z$(e,t,r,n){const i=t.source.queryId;if(i!==null){const a=e.views.get(i);return ur(a!=null,"SyncTree gave us an op for an invalid query."),dae(a,t,r,n)}else{let a=[];for(const o of e.views.values())a=a.concat(dae(o,t,r,n));return a}}function vSe(e,t,r,n,i){const a=t._queryIdentifier,o=e.views.get(a);if(!o){let s=xO(r,i?n:null),l=!1;s?l=!0:n instanceof on?(s=L$(r,n),l=!1):(s=on.EMPTY_NODE,l=!1);const c=v5(new rm(s,l,!1),new rm(n,i,!1));return new eit(t,c)}return o}function cit(e,t,r,n,i,a){const o=vSe(e,t,n,i,a);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,o),iit(o,r),ait(o,r)}function uit(e,t,r,n){const i=t._queryIdentifier,a=[];let o=[];const s=nm(e);if(i==="default")for(const[l,c]of e.views.entries())o=o.concat(uae(c,r,n)),cae(c)&&(e.views.delete(l),c.query._queryParams.loadsAllData()||a.push(c.query));else{const l=e.views.get(i);l&&(o=o.concat(uae(l,r,n)),cae(l)&&(e.views.delete(i),l.query._queryParams.loadsAllData()||a.push(l.query)))}return s&&!nm(e)&&a.push(new(sit())(t._repo,t._path)),{removed:a,events:o}}function gSe(e){const t=[];for(const r of e.views.values())r.query._queryParams.loadsAllData()||t.push(r);return t}function Up(e,t){let r=null;for(const n of e.views.values())r=r||nit(n,t);return r}function ySe(e,t){if(t._queryParams.loadsAllData())return y5(e);{const n=t._queryIdentifier;return e.views.get(n)}}function _Se(e,t){return ySe(e,t)!=null}function nm(e){return y5(e)!=null}function y5(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let RO;function dit(e){ur(!RO,"__referenceConstructor has already been defined"),RO=e}function fit(){return ur(RO,"Reference.ts has not been loaded"),RO}let hit=1;class fae{constructor(t){this.listenProvider_=t,this.syncPointTree_=new ma(null),this.pendingWriteTree_=Vnt(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function bSe(e,t,r,n,i){return Ont(e.pendingWriteTree_,t,r,n,i),i?N_(e,new gg(N$(),t,r)):[]}function pit(e,t,r,n){Int(e.pendingWriteTree_,t,r,n);const i=ma.fromObject(r);return N_(e,new g1(N$(),t,i))}function Op(e,t,r=!1){const n=knt(e.pendingWriteTree_,t);if(Nnt(e.pendingWriteTree_,t)){let a=new ma(null);return n.snap!=null?a=a.set(Ei(),!0):Jo(n.children,o=>{a=a.set(new Gi(o),!0)}),N_(e,new SO(n.path,a,r))}else return[]}function e2(e,t,r){return N_(e,new gg(D$(),t,r))}function mit(e,t,r){const n=ma.fromObject(r);return N_(e,new g1(D$(),t,n))}function vit(e,t){return N_(e,new gC(D$(),t))}function git(e,t,r){const n=U$(e,r);if(n){const i=V$(n),a=i.path,o=i.queryId,s=al(a,t),l=new gC(M$(o),s);return q$(e,a,l)}else return[]}function OO(e,t,r,n,i=!1){const a=t._path,o=e.syncPointTree_.get(a);let s=[];if(o&&(t._queryIdentifier==="default"||_Se(o,t))){const l=uit(o,t,r,n);lit(o)&&(e.syncPointTree_=e.syncPointTree_.remove(a));const c=l.removed;if(s=l.events,!i){const d=c.findIndex(h=>h._queryParams.loadsAllData())!==-1,f=e.syncPointTree_.findOnPath(a,(h,p)=>nm(p));if(d&&!f){const h=e.syncPointTree_.subtree(a);if(!h.isEmpty()){const p=bit(h);for(let g=0;g<p.length;++g){const _=p[g],b=_.query,E=CSe(e,_);e.listenProvider_.startListening(bS(b),yC(e,b),E.hashFn,E.onComplete)}}}!f&&c.length>0&&!n&&(d?e.listenProvider_.stopListening(bS(t),null):c.forEach(h=>{const p=e.queryToTagMap.get(_5(h));e.listenProvider_.stopListening(bS(h),p)}))}Eit(e,c)}return s}function ESe(e,t,r,n){const i=U$(e,n);if(i!=null){const a=V$(i),o=a.path,s=a.queryId,l=al(o,t),c=new gg(M$(s),l,r);return q$(e,o,c)}else return[]}function yit(e,t,r,n){const i=U$(e,n);if(i){const a=V$(i),o=a.path,s=a.queryId,l=al(o,t),c=ma.fromObject(r),d=new g1(M$(s),l,c);return q$(e,o,d)}else return[]}function gH(e,t,r,n=!1){const i=t._path;let a=null,o=!1;e.syncPointTree_.foreachOnPath(i,(h,p)=>{const g=al(h,i);a=a||Up(p,g),o=o||nm(p)});let s=e.syncPointTree_.get(i);s?(o=o||nm(s),a=a||Up(s,Ei())):(s=new mSe,e.syncPointTree_=e.syncPointTree_.set(i,s));let l;a!=null?l=!0:(l=!1,a=on.EMPTY_NODE,e.syncPointTree_.subtree(i).foreachChild((p,g)=>{const _=Up(g,Ei());_&&(a=a.updateImmediateChild(p,_))}));const c=_Se(s,t);if(!c&&!t._queryParams.loadsAllData()){const h=_5(t);ur(!e.queryToTagMap.has(h),"View does not exist, but we have a tag");const p=wit();e.queryToTagMap.set(h,p),e.tagToQueryMap.set(p,h)}const d=g5(e.pendingWriteTree_,i);let f=cit(s,t,r,d,a,l);if(!c&&!o&&!n){const h=ySe(s,t);f=f.concat(Sit(e,t,h))}return f}function H$(e,t,r){const i=e.pendingWriteTree_,a=e.syncPointTree_.findOnPath(t,(o,s)=>{const l=al(o,t),c=Up(s,l);if(c)return c});return cSe(i,t,a,r,!0)}function _it(e,t){const r=t._path;let n=null;e.syncPointTree_.foreachOnPath(r,(c,d)=>{const f=al(c,r);n=n||Up(d,f)});let i=e.syncPointTree_.get(r);i?n=n||Up(i,Ei()):(i=new mSe,e.syncPointTree_=e.syncPointTree_.set(r,i));const a=n!=null,o=a?new rm(n,!0,!1):null,s=g5(e.pendingWriteTree_,t._path),l=vSe(i,t,s,a?o.getNode():on.EMPTY_NODE,a);return rit(l)}function N_(e,t){return wSe(t,e.syncPointTree_,null,g5(e.pendingWriteTree_,Ei()))}function wSe(e,t,r,n){if(Vn(e.path))return SSe(e,t,r,n);{const i=t.get(Ei());r==null&&i!=null&&(r=Up(i,Ei()));let a=[];const o=Bn(e.path),s=e.operationForChild(o),l=t.children.get(o);if(l&&s){const c=r?r.getImmediateChild(o):null,d=uSe(n,o);a=a.concat(wSe(s,l,c,d))}return i&&(a=a.concat(z$(i,e,n,r))),a}}function SSe(e,t,r,n){const i=t.get(Ei());r==null&&i!=null&&(r=Up(i,Ei()));let a=[];return t.children.inorderTraversal((o,s)=>{const l=r?r.getImmediateChild(o):null,c=uSe(n,o),d=e.operationForChild(o);d&&(a=a.concat(SSe(d,s,l,c)))}),i&&(a=a.concat(z$(i,e,n,r))),a}function CSe(e,t){const r=t.query,n=yC(e,r);return{hashFn:()=>(tit(t)||on.EMPTY_NODE).hash(),onComplete:i=>{if(i==="ok")return n?git(e,r._path,n):vit(e,r._path);{const a=vrt(i,r);return OO(e,r,null,a)}}}}function yC(e,t){const r=_5(t);return e.queryToTagMap.get(r)}function _5(e){return e._path.toString()+"$"+e._queryIdentifier}function U$(e,t){return e.tagToQueryMap.get(t)}function V$(e){const t=e.indexOf("$");return ur(t!==-1&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new Gi(e.substr(0,t))}}function q$(e,t,r){const n=e.syncPointTree_.get(t);ur(n,"Missing sync point for query tag that we're tracking");const i=g5(e.pendingWriteTree_,t);return z$(n,r,i,null)}function bit(e){return e.fold((t,r,n)=>{if(r&&nm(r))return[y5(r)];{let i=[];return r&&(i=gSe(r)),Jo(n,(a,o)=>{i=i.concat(o)}),i}})}
44function bS(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new(fit())(e._repo,e._path):e}function Eit(e,t){for(let r=0;r<t.length;++r){const n=t[r];if(!n._queryParams.loadsAllData()){const i=_5(n),a=e.queryToTagMap.get(i);e.queryToTagMap.delete(i),e.tagToQueryMap.delete(a)}}}function wit(){return hit++}function Sit(e,t,r){const n=t._path,i=yC(e,t),a=CSe(e,r),o=e.listenProvider_.startListening(bS(t),i,a.hashFn,a.onComplete),s=e.syncPointTree_.subtree(n);if(i)ur(!nm(s.value),"If we're adding a query, it shouldn't be shadowed");else{const l=s.fold((c,d,f)=>{if(!Vn(c)&&d&&nm(d))return[y5(d).query];{let h=[];return d&&(h=h.concat(gSe(d).map(p=>p.query))),Jo(f,(p,g)=>{h=h.concat(g)}),h}});for(let c=0;c<l.length;++c){const d=l[c];e.listenProvider_.stopListening(bS(d),yC(e,d))}}return o}class j${constructor(t){this.node_=t}getImmediateChild(t){const r=this.node_.getImmediateChild(t);return new j$(r)}node(){return this.node_}}class $${constructor(t,r){this.syncTree_=t,this.path_=r}getImmediateChild(t){const r=$a(this.path_,t);return new $$(this.syncTree_,r)}node(){return H$(this.syncTree_,this.path_)}}const Cit=function(e){return e=e||{},e.timestamp=e.timestamp||new Date().getTime(),e},hae=function(e,t,r){if(!e||typeof e!="object")return e;if(ur(".sv"in e,"Unexpected leaf node or priority contents"),typeof e[".sv"]=="string")return xit(e[".sv"],t,r);if(typeof e[".sv"]=="object")return Tit(e[".sv"],t);ur(!1,"Unexpected server value: "+JSON.stringify(e,null,2))},xit=function(e,t,r){if(e==="timestamp")return r.timestamp;ur(!1,"Unexpected server value: "+e)},Tit=function(e,t,r){e.hasOwnProperty("increment")||ur(!1,"Unexpected server value: "+JSON.stringify(e,null,2));const n=e.increment;typeof n!="number"&&ur(!1,"Unexpected increment value: "+n);const i=t.node();if(ur(i!==null&&typeof i<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return n;const o=i.getValue();return typeof o!="number"?n:o+n},xSe=function(e,t,r,n){return W$(t,new $$(r,e),n)},TSe=function(e,t,r){return W$(e,new j$(t),r)};function W$(e,t,r){const n=e.getPriority().val(),i=hae(n,t.getImmediateChild(".priority"),r);let a;if(e.isLeafNode()){const o=e,s=hae(o.getValue(),t,r);return s!==o.getValue()||i!==o.getPriority().val()?new Ko(s,oo(i)):e}else{const o=e;return a=o,i!==o.getPriority().val()&&(a=a.updatePriority(new Ko(i))),o.forEachChild(Ga,(s,l)=>{const c=W$(l,t.getImmediateChild(s),r);c!==l&&(a=a.updateImmediateChild(s,c))}),a}}class G${constructor(t="",r=null,n={children:{},childCount:0}){this.name=t,this.parent=r,this.node=n}}function K$(e,t){let r=t instanceof Gi?t:new Gi(t),n=e,i=Bn(r);for(;i!==null;){const a=h1(n.node.children,i)||{children:{},childCount:0};n=new G$(i,n,a),r=ua(r),i=Bn(r)}return n}function D_(e){return e.node.value}function ASe(e,t){e.node.value=t,yH(e)}function PSe(e){return e.node.childCount>0}function Ait(e){return D_(e)===void 0&&!PSe(e)}function b5(e,t){Jo(e.node.children,(r,n)=>{t(new G$(r,e,n))})}function RSe(e,t,r,n){r&&t(e),b5(e,i=>{RSe(i,t,!0)})}function Pit(e,t,r){let n=e.parent;for(;n!==null;){if(t(n))return!0;n=n.parent}return!1}function t2(e){return new Gi(e.parent===null?e.name:t2(e.parent)+"/"+e.name)}function yH(e){e.parent!==null&&Rit(e.parent,e.name,e)}function Rit(e,t,r){const n=Ait(r),i=Wd(e.node.children,t);n&&i?(delete e.node.children[t],e.node.childCount--,yH(e)):!n&&!i&&(e.node.children[t]=r.node,e.node.childCount++,yH(e))}const Oit=/[\[\].#$\/\u0000-\u001F\u007F]/,Iit=/[\[\].#$\u0000-\u001F\u007F]/,X8=10*1024*1024,Y$=function(e){return typeof e=="string"&&e.length!==0&&!Oit.test(e)},OSe=function(e){return typeof e=="string"&&e.length!==0&&!Iit.test(e)},kit=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),OSe(e)},ISe=function(e){return e===null||typeof e=="string"||typeof e=="number"&&!p5(e)||e&&typeof e=="object"&&Wd(e,".sv")},IO=function(e,t,r,n){n&&t===void 0||E5(p1(e,"value"),t,r)},E5=function(e,t,r){const n=r instanceof Gi?new Xrt(r,e):r;if(t===void 0)throw new Error(e+"contains undefined "+yv(n));if(typeof t=="function")throw new Error(e+"contains a function "+yv(n)+" with contents = "+t.toString());if(p5(t))throw new Error(e+"contains "+t.toString()+" "+yv(n));if(typeof t=="string"&&t.length>X8/3&&l5(t)>X8)throw new Error(e+"contains a string greater than "+X8+" utf8 bytes "+yv(n)+" ('"+t.substring(0,50)+"...')");if(t&&typeof t=="object"){let i=!1,a=!1;if(Jo(t,(o,s)=>{if(o===".value")i=!0;else if(o!==".priority"&&o!==".sv"&&(a=!0,!Y$(o)))throw new Error(e+" contains an invali
44d key ("+o+") "+yv(n)+`.  Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);Zrt(n,o),E5(e,s,n),Qrt(n)}),i&&a)throw new Error(e+' contains ".value" child '+yv(n)+" in addition to actual children.")}},Nit=function(e,t){let r,n;for(r=0;r<t.length;r++){n=t[r];const a=hC(n);for(let o=0;o<a.length;o++)if(!(a[o]===".priority"&&o===a.length-1)){if(!Y$(a[o]))throw new Error(e+"contains an invalid key ("+a[o]+") in path "+n.toString()+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`)}}t.sort(Yrt);let i=null;for(r=0;r<t.length;r++){if(n=t[r],i!==null&&Lc(i,n))throw new Error(e+"contains a path "+i.toString()+" that is ancestor of another path "+n.toString());i=n}},kSe=function(e,t,r,n){const i=p1(e,"values");if(!(t&&typeof t=="object")||Array.isArray(t))throw new Error(i+" must be an object containing the children to replace.");const a=[];Jo(t,(o,s)=>{const l=new Gi(o);if(E5(i,s,$a(r,l)),A$(l)===".priority"&&!ISe(s))throw new Error(i+"contains an invalid value for '"+l.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");a.push(l)}),Nit(i,a)},Dit=function(e,t,r){if(p5(t))throw new Error(p1(e,"priority")+"is "+t.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!ISe(t))throw new Error(p1(e,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")},NSe=function(e,t,r,n){if(!OSe(r))throw new Error(p1(e,t)+'was an invalid path = "'+r+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},Mit=function(e,t,r,n){r&&(r=r.replace(/^\/*\.info(\/|$)/,"/")),NSe(e,t,r)},Dv=function(e,t){if(Bn(t)===".info")throw new Error(e+" failed = Can't modify data under /.info/")},Lit=function(e,t){const r=t.path.toString();if(typeof t.repoInfo.host!="string"||t.repoInfo.host.length===0||!Y$(t.repoInfo.namespace)&&t.repoInfo.host.split(":")[0]!=="localhost"||r.length!==0&&!kit(r))throw new Error(p1(e,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};class Fit{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function w5(e,t){let r=null;for(let n=0;n<t.length;n++){const i=t[n],a=i.getPath();r!==null&&!P$(a,r.path)&&(e.eventLists_.push(r),r=null),r===null&&(r={events:[],path:a}),r.events.push(i)}r&&e.eventLists_.push(r)}function DSe(e,t,r){w5(e,r),MSe(e,n=>P$(n,t))}function Vc(e,t,r){w5(e,r),MSe(e,n=>Lc(n,t)||Lc(t,n))}function MSe(e,t){e.recursionDepth_++;let r=!0;for(let n=0;n<e.eventLists_.length;n++){const i=e.eventLists_[n];if(i){const a=i.path;t(a)?(Bit(e.eventLists_[n]),e.eventLists_[n]=null):r=!1}}r&&(e.eventLists_=[]),e.recursionDepth_--}function Bit(e){for(let t=0;t<e.events.length;t++){const r=e.events[t];if(r!==null){e.events[t]=null;const n=r.getEventRunner();vS&&Xo("event: "+r.toString()),I_(n)}}}const zit="repo_interrupt",Hit=25;class Uit{constructor(t,r,n,i){this.repoInfo_=t,this.forceRestClient_=r,this.authTokenProvider_=n,this.appCheckProvider_=i,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Fit,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=wO(),this.transactionQueueTree_=new G$,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function Vit(e,t,r){if(e.stats_=x$(e.repoInfo_),e.forceRestClient_||brt())e.server_=new EO(e.repoInfo_,(n,i,a,o)=>{pae(e,n,i,a,o)},e.authTokenProvider_,e.appCheckProvider_),setTimeout(()=>mae(e,!0),0);else{if(typeof r<"u"&&r!==null){if(typeof r!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Lo(r)}catch(n){throw new Error("Invalid authOverride provided: "+n)}}e.persistentConnection_=new jf(e.repoInfo_,t,(n,i,a,o)=>{pae(e,n,i,a,o)},n=>{mae(e,n)},n=>{qit(e,n)},e.authTokenProvider_,e.appCheckProvider_,r),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener(n=>{e.server_.refreshAuthToken(n)}),e.appCheckProvider_.addTokenChangeListener(n=>{e.server_.refreshAppCheckToken(n.token)}),e.statsReporter_=xrt(e.repoInfo_,()=>new Cnt(e.stats_,e.server_)),e.infoData_=new _nt,e.infoSyncTree_=new fae({startListening:(n,i,a,o)=>{let s=[];const l=e.infoData_.getNode(n._path);return l.isEmpty()||(s=e2(e.infoSyncTree_,n._path,l),setTimeout(()=>{o("ok")},0)),s},stopListening:()=>{}}),X$(e,"connected",!1),e.serverSyncTree_=new fae({startListening:(n,i,a,o)=>(e.server_.listen(n,a,i,(s,l)=>{const c=o(s,l);Vc(e.eventQueue_,n._path,c)}),[]),stopListening:(n,i)=>{e.server_.unlisten(n,i)}})}function LSe(e){const r=e.infoData_.getNode(new Gi(".info/serverTimeOffset")).val()||0;return new Date().getTime()+r}function S5(e){return Cit({timestamp:LSe(e)})}function pae(e,t,r,n,i){e.dataUpdateCount++;const a=new Gi(t);r=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,r):r;let o=[];if(i)if(n){const l=dO(r,c=>oo(c));o=yit(e.serverSyncTree_,a,l,i)}else{const l=oo(r);o=ESe(e.serverSyncTree_,a,l,i)}else if(n){const l=dO(r,c=>oo(c));o=mit(e.serverSyncTree_,a,l)}else{const l=oo(r);o=e2(e.serverSyncTree_,a,l)}let s=a;o.length>0&&(s=_1(e,a)),Vc(e.eventQueue_,s,o)}function mae(e,t){X$(e,"connected",t),t===!1&&Git(e)}function qit(e,t){Jo(t,(r,n)=>{X$(e,r,n)})}
44function X$(e,t,r){const n=new Gi("/.info/"+t),i=oo(r);e.infoData_.updateSnapshot(n,i);const a=e2(e.infoSyncTree_,n,i);Vc(e.eventQueue_,n,a)}function Z$(e){return e.nextWriteId_++}function jit(e,t,r){const n=_it(e.serverSyncTree_,t);return n!=null?Promise.resolve(n):e.server_.get(t).then(i=>{const a=oo(i).withIndex(t._queryParams.getIndex());gH(e.serverSyncTree_,t,r,!0);let o;if(t._queryParams.loadsAllData())o=e2(e.serverSyncTree_,t._path,a);else{const s=yC(e.serverSyncTree_,t);o=ESe(e.serverSyncTree_,t._path,a,s)}return Vc(e.eventQueue_,t._path,o),OO(e.serverSyncTree_,t,r,null,!0),a},i=>(r2(e,"get for query "+Lo(t)+" failed: "+i),Promise.reject(new Error(i))))}function $it(e,t,r,n,i){r2(e,"set",{path:t.toString(),value:r,priority:n});const a=S5(e),o=oo(r,n),s=H$(e.serverSyncTree_,t),l=TSe(o,s,a),c=Z$(e),d=bSe(e.serverSyncTree_,t,l,c,!0);w5(e.eventQueue_,d),e.server_.put(t.toString(),o.val(!0),(h,p)=>{const g=h==="ok";g||sl("set at "+t+" failed: "+h);const _=Op(e.serverSyncTree_,c,!g);Vc(e.eventQueue_,t,_),im(e,i,h,p)});const f=J$(e,t);_1(e,f),Vc(e.eventQueue_,f,[])}function Wit(e,t,r,n){r2(e,"update",{path:t.toString(),value:r});let i=!0;const a=S5(e),o={};if(Jo(r,(s,l)=>{i=!1,o[s]=xSe($a(t,s),oo(l),e.serverSyncTree_,a)}),i)Xo("update() called with empty data.  Don't do anything."),im(e,n,"ok",void 0);else{const s=Z$(e),l=pit(e.serverSyncTree_,t,o,s);w5(e.eventQueue_,l),e.server_.merge(t.toString(),r,(c,d)=>{const f=c==="ok";f||sl("update at "+t+" failed: "+c);const h=Op(e.serverSyncTree_,s,!f),p=h.length>0?_1(e,t):t;Vc(e.eventQueue_,p,h),im(e,n,c,d)}),Jo(r,c=>{const d=J$(e,$a(t,c));_1(e,d)}),Vc(e.eventQueue_,t,[])}}function Git(e){r2(e,"onDisconnectEvents");const t=S5(e),r=wO();dH(e.onDisconnect_,Ei(),(i,a)=>{const o=xSe(i,a,e.serverSyncTree_,t);k_(r,i,o)});let n=[];dH(r,Ei(),(i,a)=>{n=n.concat(e2(e.serverSyncTree_,i,a));const o=J$(e,i);_1(e,o)}),e.onDisconnect_=wO(),Vc(e.eventQueue_,Ei(),n)}function Kit(e,t,r){e.server_.onDisconnectCancel(t.toString(),(n,i)=>{n==="ok"&&uH(e.onDisconnect_,t),im(e,r,n,i)})}function vae(e,t,r,n){const i=oo(r);e.server_.onDisconnectPut(t.toString(),i.val(!0),(a,o)=>{a==="ok"&&k_(e.onDisconnect_,t,i),im(e,n,a,o)})}function Yit(e,t,r,n,i){const a=oo(r,n);e.server_.onDisconnectPut(t.toString(),a.val(!0),(o,s)=>{o==="ok"&&k_(e.onDisconnect_,t,a),im(e,i,o,s)})}function Xit(e,t,r,n){if(uO(r)){Xo("onDisconnect().update() called with empty data.  Don't do anything."),im(e,n,"ok",void 0);return}e.server_.onDisconnectMerge(t.toString(),r,(i,a)=>{i==="ok"&&Jo(r,(o,s)=>{const l=oo(s);k_(e.onDisconnect_,$a(t,o),l)}),im(e,n,i,a)})}function Zit(e,t,r){let n;Bn(t._path)===".info"?n=gH(e.infoSyncTree_,t,r):n=gH(e.serverSyncTree_,t,r),DSe(e.eventQueue_,t._path,n)}function _H(e,t,r){let n;Bn(t._path)===".info"?n=OO(e.infoSyncTree_,t,r):n=OO(e.serverSyncTree_,t,r),DSe(e.eventQueue_,t._path,n)}function Qit(e){e.persistentConnection_&&e.persistentConnection_.interrupt(zit)}function r2(e,...t){let r="";e.persistentConnection_&&(r=e.persistentConnection_.id+":"),Xo(r,...t)}function im(e,t,r,n){t&&I_(()=>{if(r==="ok")t(null);else{const i=(r||"error").toUpperCase();let a=i;n&&(a+=": "+n);const o=new Error(a);o.code=i,t(o)}})}function FSe(e,t,r){return H$(e.serverSyncTree_,t,r)||on.EMPTY_NODE}function Q$(e,t=e.transactionQueueTree_){if(t||C5(e,t),D_(t)){const r=zSe(e,t);ur(r.length>0,"Sending zero length transaction queue"),r.every(i=>i.status===0)&&Jit(e,t2(t),r)}else PSe(t)&&b5(t,r=>{Q$(e,r)})}function Jit(e,t,r){const n=r.map(c=>c.currentWriteId),i=FSe(e,t,n);let a=i;const o=i.hash();for(let c=0;c<r.length;c++){const d=r[c];ur(d.status===0,"tryToSendTransactionQueue_: items in queue should all be run."),d.status=1,d.retryCount++;const f=al(t,d.path);a=a.updateChild(f,d.currentOutputSnapshotRaw)}const s=a.val(!0),l=t;e.server_.put(l.toString(),s,c=>{r2(e,"transaction put response",{path:l.toString(),status:c});let d=[];if(c==="ok"){const f=[];for(let h=0;h<r.length;h++)r[h].status=2,d=d.concat(Op(e.serverSyncTree_,r[h].currentWriteId)),r[h].onComplete&&f.push(()=>r[h].onComplete(null,!0,r[h].currentOutputSnapshotResolved)),r[h].unwatcher();C5(e,K$(e.transactionQueueTree_,t)),Q$(e,e.transactionQueueTree_),Vc(e.eventQueue_,t,d);for(let h=0;h<f.length;h++)I_(f[h])}else{if(c==="datastale")for(let f=0;f<r.length;f++)r[f].status===3?r[f].status=4:r[f].status=0;else{sl("transaction at "+l.toString()+" failed: "+c);for(let f=0;f<r.length;f++)r[f].status=4,r[f].abortReason=c}_1(e,t)}},o)}function _1(e,t){const r=BSe(e,t),n=t2(r),i=zSe(e,r);return eat(e,i,n),n}function eat(e,t,r){if(t.length===0)return;const n=[];let i=[];const o=t.filter(s=>s.status===0).map(s=>s.currentWriteId);for(let s=0;s<t.length;s++){const l=t[s],c=al(r,l.path);let d=!1,f;if(ur(c!==null,"rerunTransactionsUnderNode_: relativePath should not be null."),l.status===4)d=!0,f=l.abortReason,i=i.concat(Op(e.serverSyncTree_,l.currentWriteId,!0));else if(l.status===0)if(l.retryCount>=Hit)d=!0,f="maxretry",i=i.concat(Op(e.serverSyncTree_,l.currentWriteId,!0));else{const h=FSe(e,l.path,o);l.currentInputSnapshot=h;const p=t[s].update(h.val());if(p!==void 0){E5("transaction failed: Data returned ",p,l.path);let g=oo(p);typeof p=="object"&&p!=null&&Wd(p,".priority")||(g=g.updatePriority(h.getPriority()));const b=l.currentWriteId,E=S5(e),S=TSe(g,h,E);l.currentOutputSnapshotRaw=g,l.currentOutputSnapshotResolved=S,l.currentWriteId=Z$(e),o.splice(o.indexOf(b),1),i=i.concat(bSe(e.serverSyncTree_,l.path,S,l.currentWriteId,l.applyLocally)),i=i.concat(Op(e.serverSyncTree_,b,!0))}else d=!0,f="nodata",i=i.concat(Op(e.serverSyncTree_,l.currentWriteId,!0))}Vc(e.eventQueue_,r,i),i=[],d&&(t[s].status=2,(function(h){setTimeout(h,Math.floor(0))})(t[s].unwatcher),t[s].onComplete&&(f==="nodata"?n.push(()=>t[s].onComplete(null,!1,t[s].currentInputSnapshot)):n.push(()=>t[s].onComplete(new Error(f),!1,null))))}C5(e,e.transactionQueueTree_);for(let s=0;s<n.length;s++)I_(n[s]);Q$(e,e.transactionQueueTree_)}function BSe(e,t){let r,n=e.transactionQueueTree_;
44for(r=Bn(t);r!==null&&D_(n)===void 0;)n=K$(n,r),t=ua(t),r=Bn(t);return n}function zSe(e,t){const r=[];return HSe(e,t,r),r.sort((n,i)=>n.order-i.order),r}function HSe(e,t,r){const n=D_(t);if(n)for(let i=0;i<n.length;i++)r.push(n[i]);b5(t,i=>{HSe(e,i,r)})}function C5(e,t){const r=D_(t);if(r){let n=0;for(let i=0;i<r.length;i++)r[i].status!==2&&(r[n]=r[i],n++);r.length=n,ASe(t,r.length>0?r:void 0)}b5(t,n=>{C5(e,n)})}function J$(e,t){const r=t2(BSe(e,t)),n=K$(e.transactionQueueTree_,t);return Pit(n,i=>{Z8(e,i)}),Z8(e,n),RSe(n,i=>{Z8(e,i)}),r}function Z8(e,t){const r=D_(t);if(r){const n=[];let i=[],a=-1;for(let o=0;o<r.length;o++)r[o].status===3||(r[o].status===1?(ur(a===o-1,"All SENT items should be at beginning of queue."),a=o,r[o].status=3,r[o].abortReason="set"):(ur(r[o].status===0,"Unexpected transaction status in abort"),r[o].unwatcher(),i=i.concat(Op(e.serverSyncTree_,r[o].currentWriteId,!0)),r[o].onComplete&&n.push(r[o].onComplete.bind(null,new Error("set"),!1,null))));a===-1?ASe(t,void 0):r.length=a+1,Vc(e.eventQueue_,t2(t),i);for(let o=0;o<n.length;o++)I_(n[o])}}function tat(e){let t="";const r=e.split("/");for(let n=0;n<r.length;n++)if(r[n].length>0){let i=r[n];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch{}t+="/"+i}return t}function rat(e){const t={};e.charAt(0)==="?"&&(e=e.substring(1));for(const r of e.split("&")){if(r.length===0)continue;const n=r.split("=");n.length===2?t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]):sl(`Invalid query segment '${r}' in query '${e}'`)}return t}const gae=function(e,t){const r=nat(e),n=r.namespace;r.domain==="firebase.com"&&dh(r.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),(!n||n==="undefined")&&r.domain!=="localhost"&&dh("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),r.secure||drt();const i=r.scheme==="ws"||r.scheme==="wss";return{repoInfo:new qwe(r.host,r.secure,n,i,t,"",n!==r.subdomain),path:new Gi(r.pathString)}},nat=function(e){let t="",r="",n="",i="",a="",o=!0,s="https",l=443;if(typeof e=="string"){let c=e.indexOf("//");c>=0&&(s=e.substring(0,c-1),e=e.substring(c+2));let d=e.indexOf("/");d===-1&&(d=e.length);let f=e.indexOf("?");f===-1&&(f=e.length),t=e.substring(0,Math.min(d,f)),d<f&&(i=tat(e.substring(d,f)));const h=rat(e.substring(Math.min(e.length,f)));c=t.indexOf(":"),c>=0?(o=s==="https"||s==="wss",l=parseInt(t.substring(c+1),10)):c=t.length;const p=t.slice(0,c);if(p.toLowerCase()==="localhost")r="localhost";else if(p.split(".").length<=2)r=p;else{const g=t.indexOf(".");n=t.substring(0,g).toLowerCase(),r=t.substring(g+1),a=n}"ns"in h&&(a=h.ns)}return{host:t,port:l,domain:r,subdomain:n,secure:o,scheme:s,pathString:i,namespace:a}},yae="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",iat=(function(){let e=0;const t=[];return function(r){const n=r===e;e=r;let i;const a=new Array(8);for(i=7;i>=0;i--)a[i]=yae.charAt(r%64),r=Math.floor(r/64);ur(r===0,"Cannot push at time == 0");let o=a.join("");if(n){for(i=11;i>=0&&t[i]===63;i--)t[i]=0;t[i]++}else for(i=0;i<12;i++)t[i]=Math.floor(Math.random()*64);for(i=0;i<12;i++)o+=yae.charAt(t[i]);return ur(o.length===20,"nextPushId: Length should be 20."),o}})();class USe{constructor(t,r,n,i){this.eventType=t,this.eventRegistration=r,this.snapshot=n,this.prevName=i}getPath(){const t=this.snapshot.ref;return this.eventType==="value"?t._path:t.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Lo(this.snapshot.exportVal())}}class VSe{constructor(t,r,n){this.eventRegistration=t,this.error=r,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class eW{constructor(t,r){this.snapshotCallback=t,this.cancelCallback=r}onValue(t,r){this.snapshotCallback.call(null,t,r)}onCancel(t){return ur(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,t)}get hasCancelCallback(){return!!this.cancelCallback}matches(t){return this.snapshotCallback===t.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===t.snapshotCallback.userCallback&&this.snapshotCallback.context===t.snapshotCallback.context}}class aat{constructor(t,r){this._repo=t,this._path=r}cancel(){const t=new vd;return Kit(this._repo,this._path,t.wrapCallback(()=>{})),t.promise}remove(){Dv("OnDisconnect.remove",this._path);const t=new vd;return vae(this._repo,this._path,null,t.wrapCallback(()=>{})),t.promise}set(t){Dv("OnDisconnect.set",this._path),IO("OnDisconnect.set",t,this._path,!1);const r=new vd;return vae(this._repo,this._path,t,r.wrapCallback(()=>{})),r.promise}setWithPriority(t,r){Dv("OnDisconnect.setWithPriority",this._path),IO("OnDisconnect.setWithPriority",t,this._path,!1),Dit("OnDisconnect.setWithPriority",r);const n=new vd;return Yit(this._repo,this._path,t,r,n.wrapCallback(()=>{})),n.promise}update(t){Dv("OnDisconnect.update",this._path),kSe("OnDisconnect.update",t,this._path);const r=new vd;return Xit(this._repo,this._path,t,r.wrapCallback(()=>{})),r.promise}}class tW{constructor(t,r,n,i){this._repo=t,this._path=r,this._queryParams=n,this._orderByCalled=i}get key(){return Vn(this._path)?null:A$(this._path)}get ref(){return new Gd(this._repo,this._path)}get _queryIdentifier(){const t=rae(this._queryParams),r=S$(t);return r==="{}"?"default":r}get _queryObject(){return rae(this._queryParams)}isEqual(t){if(t=Bo(t),!(t instanceof tW))return!1;const r=this._repo===t._repo,n=P$(this._path,t._path),i=this._queryIdentifier===t._queryIdentifier;return r&&n&&i}toJSON(){return this.toString()}toString(){return this._repo.toString()+Krt(this._path)}}class Gd extends tW{constructor(t,r){super(t,r,new k$,!1)}get parent(){const t=Qwe(this._path);return t===null?null:new Gd(this._repo,t)}get root(){let t=this;for(;t.parent!==null;)t=t.parent;return t}}class b1{constructor(t,r,n){this._node=t,this.ref=r,this._index=n}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(t){const r=new Gi(t),n=rc(this.ref,t);return new b1(this._node.getChild(r),n,Ga)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(t){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(n,i)=>t(new b1(i,rc(this.ref,n),Ga)))}hasChild(t){const r=new Gi(t);return!this._node.getChild(r).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function uu(e,t){return e=Bo(e),e._checkNotDeleted("ref"),t!==void 0?rc(e._root,t):e._root}function rc(e,t){return e=Bo(e),Bn(e._path)===null?Mit("child","path",t):NSe("child","path",t),new Gd(e._repo,$a(e._path,t))}function _ae(e){return e=Bo(e),new aat(e._repo,e._path)}function bae(e,t){e=Bo(e),Dv("push",e._path),IO("push",t,e._path,!0);const r=LSe(e._repo),n=iat(r),i=rc(e,n),a=rc(e,n);let o;return o=Promise.resolve(a),i.then=o.then.bind(o),i.catch=o.then.bind(o,void 0),i}function Eae(e){return Dv("remove",e._path),bH(e,null)}function bH(e,t){e=Bo(e),Dv("set",e._path),IO("set",t,e._path,!1);const r=new vd;return $it(e._repo,e._path,t,null,r.wrapCallback(()=>{})),r.promise}function wae(e,t){kSe("update",t,e._path);const r=new vd;return Wit(e._repo,e._path,t,r.wrapCallback(()=>{})),r.promise}function Sae(e){e=Bo(e);const t=new eW(()=>{}),r=new n2(t);return jit(e._repo,e,r).then(n=>new b1(n,new Gd(e._repo,e._path),e._queryParams.getIndex()))}class n2{constructor(t){this.callbackContext=t}respondsTo(t){return t==="value"}createEvent(t,r){const n=r._queryParams.getIndex();return new USe("value",this,new b1(t.snapshotNode,new Gd(r._repo,r._path),n))}getEventRunner(t){return t.getEventType()==="cancel"?()=>this.callbackContext.onCancel(t.error):()=>this.callbackContext.onValue(t.snapshot,null)}createCancelEvent(t,r){return this.callbackContext.hasCancelCallback?new VSe(this,t,r):null}matches(t){return t instanceof n2?!t.callbackContext||!this.callbackContext?!0:t.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class x5{constructor(t,r){this.eventType=t,this.callbackContext=r}respondsTo(t){let r=t==="children_added"?"child_added":t;return r=r==="children_removed"?"child_removed":r,this.eventType===r}createCancelEvent(t,r){return this.callbackContext.hasCancelCallback?new VSe(this,t,r):null}createEvent(t,r){ur(t.childName!=null,"Child events should have a childName.");const n=rc(new Gd(r._repo,r._path),t.childName),i=r._queryParams.getIndex();return new USe(t.type,this,new b1(t.snapshotNode,n,i),t.prevName)}getEventRunner(t){return t.getEventType()==="cancel"?()=>this.callbackContext.onCancel(t.error):()=>this.callbackContext.onValue(t.snapshot,t.prevName)}matches(t){return t instanceof x5?this.eventType===t.eventType&&(!this.callbackContext||!t.callbackContext||this.callbackContext.matches(t.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function qSe(e,t,r,n,i){let a;if(typeof n=="object"&&(a=void 0,i=n),typeof n=="function"&&(a=n),i&&i.onlyOnce){const l=r,c=(d,f)=>{_H(e._repo,e,s),l(d,f)};c.userCallback=r.userCallback,c.context=r.context,r=c}const o=new eW(r,a||void 0),s=t==="value"?new n2(o):new x5(t,o);return Zit(e._repo,e,s),()=>_H(e._repo,e,s)}function id(e,t,r,n){return qSe(e,"value",t,r,n)}function oat(e,t,r,n){return qSe(e,"child_added",t,r,n)}function H0(e,t,r){let n=null;const i=r?new eW(r):null;t==="value"?n=new n2(i):t&&(n=new x5(t,i)),_H(e._repo,e,n)}oit(Gd);dit(Gd);const sat="FIREBASE_DATABASE_EMULATOR_HOST",EH={};let lat=!1;function cat(e,t,r,n){const i=t.lastIndexOf(":"),a=t.substring(0,i),o=Gx(a);e.repoInfo_=new qwe(t,o,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams,!0,r),n&&(e.authTokenProvider_=n)}function uat(e,t,r,n,i){let a=n||e.options.databaseURL;a===void 0&&(e.options.projectId||dh("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),Xo("Using default host for project ",e.options.projectId),a=`${e.options.projectId}-default-rtdb.firebaseio.com`);let o=gae(a,i),s=o.repoInfo,l;typeof process<"u"&&Bie&&(l=Bie[sat]),l?(a=`http://${l}?ns=${s.namespace}`,o=gae(a,i),s=o.repoInfo):o.repoInfo.secure;const c=new wrt(e.name,e.options,t);Lit("Invalid Firebase Database URL",o),Vn(o.path)||dh("Database URL must point to the root of a Firebase Database (not including a child path).");const d=fat(s,e,c,new Ert(e,r));return new hat(d,e)}function dat(e,t){const r=EH[t];(!r||r[e.key]!==e)&&dh(`Database ${t}(${e.repoInfo_}) has already been deleted.`),Qit(e),delete r[e.key]}function fat(e,t,r,n){let i=EH[t.name];i||(i={},EH[t.name]=i);let a=i[e.toURLString()];return a&&dh("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),a=new Uit(e,lat,r,n),i[e.toURLString()]=a,a}class hat{constructor(t,r){this._repoInternal=t,this.app=r,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(Vit(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new Gd(this._repo,Ei())),this._rootInternal}_delete(){return this._rootInternal!==null&&(dat(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(t){this._rootInternal===null&&dh("Cannot call "+t+" on a deleted database.")}}function pat(e=p$(),t){const r=P_(e,"database").getImmediate({identifier:t});if(!r._instanceStarted){const n=IQe("database");n&&mat(r,...n)}return r}function mat(e,t,r,n={}){e=Bo(e),e._checkNotDeleted("useEmulator");const i=`${t}:${r}`,a=e._repoInternal;if(e._instanceStarted){if(i===e._repoInternal.repoInfo_.host&&hg(n,a.repoInfo_.emulatorOptions))return;dh("connectDatabaseEmulator() cannot initialize or alter the emulator configuration after the database instance has started.")}let o;if(a.repoInfo_.nodeAdmin)n.mockUserToken&&dh('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new KP(KP.OWNER);else if(n.mockUserToken){const s=typeof n.mockUserToken=="string"?n.mockUserToken:kQe(n.mockUserToken,e.app.options.projectId);o=new KP(s)}Gx(t)&&jEe(t),cat(a,i,n,o)}function vat(e){art(R_),Fd(new Bu("database",(t,{instanceIdentifier:r})=>{const n=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),a=t.getProvider("app-check-internal");return uat(n,i,a,r)},"PUBLIC").setMultipleInstances(!0)),Uc(zie,Hie,e),Uc(zie,Hie,"esm2020")}const gat={".sv":"timestamp"};function wb(){return gat}jf.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)};jf.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};vat();const jSe="@firebase/installations",rW="0.6.23",$Se=1e4,WSe=`w:${rW}`,GSe="FIS_v2",yat="https://firebaseinstallations.googleapis.com/v1",_at=3600*1e3,bat="installations",Eat="Installations",wat={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},_g=new n0(bat,Eat,wat);function KSe(e){return e instanceof Ch&&e.code.includes("request-failed")}function YSe({projectId:e}){return`${yat}/projects/${e}/installations`}
44function XSe(e){return{token:e.token,requestStatus:2,expiresIn:Cat(e.expiresIn),creationTime:Date.now()}}async function ZSe(e,t){const n=(await t.json()).error;return _g.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function QSe({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Sat(e,{refreshToken:t}){const r=QSe(e);return r.append("Authorization",xat(t)),r}async function JSe(e){const t=await e();return t.status>=500&&t.status<600?e():t}function Cat(e){return Number(e.replace("s","000"))}function xat(e){return`${GSe} ${e}`}async function Tat({appConfig:e,heartbeatServiceProvider:t},{fid:r}){const n=YSe(e),i=QSe(e),a=t.getImmediate({optional:!0});if(a){const c=await a.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const o={fid:r,authVersion:GSe,appId:e.appId,sdkVersion:WSe},s={method:"POST",headers:i,body:JSON.stringify(o)},l=await JSe(()=>fetch(n,s));if(l.ok){const c=await l.json();return{fid:c.fid||r,registrationStatus:2,refreshToken:c.refreshToken,authToken:XSe(c.authToken)}}else throw await ZSe("Create Installation",l)}function eCe(e){return new Promise(t=>{setTimeout(t,e)})}function Aat(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}const Pat=/^[cdef][\w-]{21}$/,wH="";function Rat(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const r=Oat(e);return Pat.test(r)?r:wH}catch{return wH}}function Oat(e){return Aat(e).substr(0,22)}function M_(e){return`${e.appName}!${e.appId}`}const E1=new Map;function tCe(e,t){const r=M_(e);rCe(r,t),Nat(r,t)}function Iat(e,t){nCe();const r=M_(e);let n=E1.get(r);n||(n=new Set,E1.set(r,n)),n.add(t)}function kat(e,t){const r=M_(e),n=E1.get(r);n&&(n.delete(t),n.size===0&&E1.delete(r),iCe())}function rCe(e,t){const r=E1.get(e);if(r)for(const n of r)n(t)}function Nat(e,t){const r=nCe();r&&r.postMessage({key:e,fid:t}),iCe()}let Mv=null;function nCe(){return!Mv&&"BroadcastChannel"in self&&(Mv=new BroadcastChannel("[Firebase] FID Change"),Mv.onmessage=e=>{rCe(e.data.key,e.data.fid)}),Mv}function iCe(){E1.size===0&&Mv&&(Mv.close(),Mv=null)}const Dat="firebase-installations-database",Mat=1,bg="firebase-installations-store";let Q8=null;function nW(){return Q8||(Q8=c5(Dat,Mat,{upgrade:(e,t)=>{t===0&&e.createObjectStore(bg)}})),Q8}async function kO(e,t){const r=M_(e),i=(await nW()).transaction(bg,"readwrite"),a=i.objectStore(bg),o=await a.get(r);return await a.put(t,r),await i.done,(!o||o.fid!==t.fid)&&tCe(e,t.fid),t}async function aCe(e){const t=M_(e),n=(await nW()).transaction(bg,"readwrite");await n.objectStore(bg).delete(t),await n.done}async function T5(e,t){const r=M_(e),i=(await nW()).transaction(bg,"readwrite"),a=i.objectStore(bg),o=await a.get(r),s=t(o);return s===void 0?await a.delete(r):await a.put(s,r),await i.done,s&&(!o||o.fid!==s.fid)&&tCe(e,s.fid),s}async function iW(e){let t;const r=await T5(e.appConfig,n=>{const i=Lat(n),a=Fat(e,i);return t=a.registrationPromise,a.installationEntry});return r.fid===wH?{installationEntry:await t}:{installationEntry:r,registrationPromise:t}}function Lat(e){const t=e||{fid:Rat(),registrationStatus:0};return oCe(t)}function Fat(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(_g.create("app-offline"));return{installationEntry:t,registrationPromise:i}}const r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=Bat(e,r);return{installationEntry:r,registrationPromise:n}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:zat(e)}:{installationEntry:t}}async function Bat(e,t){try{const r=await Tat(e,t);return kO(e.appConfig,r)}catch(r){throw KSe(r)&&r.customData.serverCode===409?await aCe(e.appConfig):await kO(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}async function zat(e){let t=await Cae(e.appConfig);for(;t.registrationStatus===1;)await eCe(100),t=await Cae(e.appConfig);if(t.registrationStatus===0){const{installationEntry:r,registrationPromise:n}=await iW(e);return n||r}return t}function Cae(e){return T5(e,t=>{if(!t)throw _g.create("installation-not-found");return oCe(t)})}function oCe(e){return Hat(e)?{fid:e.fid,registrationStatus:0}:e}function Hat(e){return e.registrationStatus===1&&e.registrationTime+$Se<Date.now()}async function Uat({appConfig:e,heartbeatServiceProvider:t},r){const n=Vat(e,r),i=Sat(e,r),a=t.getImmediate({optional:!0});if(a){const c=await a.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const o={installation:{sdkVersion:WSe,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},l=await JSe(()=>fetch(n,s));if(l.ok){const c=await l.json();return XSe(c)}else throw await ZSe("Generate Auth Token",l)}function Vat(e,{fid:t}){return`${YSe(e)}/${t}/authTokens:generate`}async function aW(e,t=!1){let r;const n=await T5(e.appConfig,a=>{if(!sCe(a))throw _g.create("not-registered");const o=a.authToken;if(!t&&$at(o))return a;
44if(o.requestStatus===1)return r=qat(e,t),a;{if(!navigator.onLine)throw _g.create("app-offline");const s=Gat(a);return r=jat(e,s),s}});return r?await r:n.authToken}async function qat(e,t){let r=await xae(e.appConfig);for(;r.authToken.requestStatus===1;)await eCe(100),r=await xae(e.appConfig);const n=r.authToken;return n.requestStatus===0?aW(e,t):n}function xae(e){return T5(e,t=>{if(!sCe(t))throw _g.create("not-registered");const r=t.authToken;return Kat(r)?{...t,authToken:{requestStatus:0}}:t})}async function jat(e,t){try{const r=await Uat(e,t),n={...t,authToken:r};return await kO(e.appConfig,n),r}catch(r){if(KSe(r)&&(r.customData.serverCode===401||r.customData.serverCode===404))await aCe(e.appConfig);else{const n={...t,authToken:{requestStatus:0}};await kO(e.appConfig,n)}throw r}}function sCe(e){return e!==void 0&&e.registrationStatus===2}function $at(e){return e.requestStatus===2&&!Wat(e)}function Wat(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+_at}function Gat(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}function Kat(e){return e.requestStatus===1&&e.requestTime+$Se<Date.now()}async function Yat(e){const t=e,{installationEntry:r,registrationPromise:n}=await iW(t);return n?n.catch(console.error):aW(t).catch(console.error),r.fid}async function Xat(e,t=!1){const r=e;return await Zat(r),(await aW(r,t)).token}async function Zat(e){const{registrationPromise:t}=await iW(e);t&&await t}function Qat(e,t){const{appConfig:r}=e;return Iat(r,t),()=>{kat(r,t)}}function Jat(e){if(!e||!e.options)throw J8("App Configuration");if(!e.name)throw J8("App Name");const t=["projectId","apiKey","appId"];for(const r of t)if(!e.options[r])throw J8(r);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function J8(e){return _g.create("missing-app-config-values",{valueName:e})}const lCe="installations",eot="installations-internal",tot=e=>{const t=e.getProvider("app").getImmediate(),r=Jat(t),n=P_(t,"heartbeat");return{app:t,appConfig:r,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},rot=e=>{const t=e.getProvider("app").getImmediate(),r=P_(t,lCe).getImmediate();return{getId:()=>Yat(r),getToken:i=>Xat(r,i)}};function not(){Fd(new Bu(lCe,tot,"PUBLIC")),Fd(new Bu(eot,rot,"PRIVATE"))}not();Uc(jSe,rW);Uc(jSe,rW,"esm2020");const iot="/firebase-messaging-sw.js",aot="/firebase-cloud-messaging-push-scope",cCe="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",oot="https://fcmregistrations.googleapis.com/v1",uCe="google.c.a.c_id",sot="google.c.a.c_l",lot="google.c.a.ts",cot="google.c.a.e",Tae=1e4;var Aae;(function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"})(Aae||(Aae={}));var w1;(function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked",e.FID_REGISTERED="fid-registered"})(w1||(w1={}));function vu(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function dCe(e){const t="=".repeat((4-e.length%4)%4),r=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(r),i=new Uint8Array(n.length);for(let a=0;a<n.length;++a)i[a]=n.charCodeAt(a);return i}const e9="fcm_token_details_db",uot=5,Pae="fcm_token_object_Store";async function dot(e){if("databases"in indexedDB&&!(await indexedDB.databases()).map(a=>a.name).includes(e9))return null;let t=null;return(await c5(e9,uot,{upgrade:async(n,i,a,o)=>{if(i<2||!n.objectStoreNames.contains(Pae))return;const s=o.objectStore(Pae),l=await s.index("fcmSenderId").get(e);if(await s.clear(),!!l){if(i===2){const c=l;if(!c.auth||!c.p256dh||!c.endpoint)return;t={token:c.fcmToken,createTime:c.createTime??Date.now(),subscriptionOptions:{auth:c.auth,p256dh:c.p256dh,endpoint:c.endpoint,swScope:c.swScope,vapidKey:typeof c.vapidKey=="string"?c.vapidKey:vu(c.vapidKey)}}}else if(i===3){const c=l;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:vu(c.auth),p256dh:vu(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:vu(c.vapidKey)}}}else if(i===4){const c=l;t={token:c.fcmToken,createTime:c.createTime,subscriptionOptions:{auth:vu(c.auth),p256dh:vu(c.p256dh),endpoint:c.endpoint,swScope:c.swScope,vapidKey:vu(c.vapidKey)}}}}}})).close(),await qP(e9),await qP("fcm_vapid_details_db"),await qP("undefined"),fot(t)?t:null}function fot(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return typeof e.createTime=="number"&&e.createTime>0&&typeof e.token=="string"&&e.token.length>
440&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}const hot={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","fid-registration-failed":"A problem occurred while creating an FCM registration via FID: {$errorInfo}","fid-unregister-failed":"A problem occurred while unregistering the FCM registration via FID: {$errorInfo}","fid-registration-idb-schema-unavailable":"Unable to read or persist FID registration metadata because the messaging IndexedDB schema is unavailable (for example, the database could not be upgraded to the latest version).","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.","invalid-on-registered-handler":"No onRegistered callback handler was provided or registered. Implement onRegistered() before register()."},aa=new n0("messaging","Messaging",hot),Rae="firebase-messaging-database",Oae=2,Eg="firebase-messaging-store",$f="firebase-messaging-fid-registration-store",pot={openDB:c5,deleteDB:qP};let Iae=pot,ES=null;function mot(e,t,r){switch(t){case 0:if(e.createObjectStore(Eg),r===1)break;case 1:r===2&&e.createObjectStore($f)}}function kae(e){return{upgrade:(t,r)=>{mot(t,r,e)},blocked:()=>{},blocking:(t,r,n)=>{ES=null,n.target?.close()},terminated:()=>{ES=null}}}function A5(){return ES||(ES=Iae.openDB(Rae,Oae,kae(2)).catch(()=>Iae.openDB(Rae,Oae-1,kae(1)))),ES}function fCe(e,t){return e.objectStoreNames.contains(t)}function hCe(e){if(!fCe(e,$f))throw aa.create("fid-registration-idb-schema-unavailable")}async function vot(e){const t=P5(e),n=await(await A5()).transaction(Eg).objectStore(Eg).get(t);if(n)return n;{const i=await dot(e.appConfig.senderId);if(i)return await oW(e,i),i}}async function oW(e,t){const r=P5(e),n=await A5(),i=[Eg],a=fCe(n,$f);a&&i.push($f);const o=n.transaction(i,"readwrite");return await o.objectStore(Eg).put(t,r),a&&await o.objectStore($f).delete(r),await o.done,t}async function pCe(e){const t=P5(e),r=await A5();return hCe(r),await r.transaction($f).objectStore($f).get(t)}async function got(e,t){const r=P5(e),n=await A5();hCe(n);const i=n.transaction([Eg,$f],"readwrite");return await i.objectStore($f).put(t,r),await i.objectStore(Eg).delete(r),await i.done,t}function P5({appConfig:e}){return e.appId}const Nae="@firebase/messaging",SH="0.13.1",yot=3,_ot=1e3;async function bot(e,t){const r=await O5(e),n=sW(t,e.appConfig.appName,!1),i={method:"POST",headers:r,body:JSON.stringify(n)};let a;try{a=await(await fetch(R5(e.appConfig),i)).json()}catch(o){throw aa.create("token-subscribe-failed",{errorInfo:o?.toString()})}if(a.error){const o=a.error.message;throw aa.create("token-subscribe-failed",{errorInfo:o})}if(!a.token)throw aa.create("token-subscribe-no-token");return a.token}async function Eot(e,t){const r=await O5(e),n=sW(t,e.appConfig.appName,!0),i={method:"POST",headers:r,body:JSON.stringify(n)};let a;try{a=await Tot(()=>fetch(R5(e.appConfig),i),yot,_ot)}catch(l){throw aa.create("fid-registration-failed",{errorInfo:l?.toString()})}if(a.ok)return{responseFid:await wot(a)};let o;try{o=await a.json()}catch{throw aa.create("fid-registration-failed",{errorInfo:a.statusText})}const s=o.error?.message??a.statusText;throw aa.create("fid-registration-failed",{errorInfo:s})}async function wot(e){const t=await e.text();if(!t.trim())throw aa.create("fid-registration-failed",{errorInfo:"CreateRegistration succeeded but response body is empty"});let r;try{r=JSON.parse(t)}catch{throw aa.create("fid-registration-failed",{errorInfo:"CreateRegistration succeeded but response body is not val
44id JSON"})}const n=r.name;if(typeof n!="string"||n.length===0)throw aa.create("fid-registration-failed",{errorInfo:"CreateRegistration succeeded but response did not include a non-empty name"});return Sot(n)}const Dae="/registrations/";function Sot(e){const t=e.indexOf(Dae);if(t!==-1){const r=e.slice(t+Dae.length);if(r.length>0)return r}throw aa.create("fid-registration-failed",{errorInfo:"CreateRegistration succeeded but response name is not a valid registration resource name"})}async function Cot(e,t){const r=await O5(e),n=sW(t.subscriptionOptions,e.appConfig.appName,!1),i={method:"PATCH",headers:r,body:JSON.stringify(n)};let a;try{a=await(await fetch(`${R5(e.appConfig)}/${t.token}`,i)).json()}catch(o){throw aa.create("token-update-failed",{errorInfo:o?.toString()})}if(a.error){const o=a.error.message;throw aa.create("token-update-failed",{errorInfo:o})}if(!a.token)throw aa.create("token-update-no-token");return a.token}async function xot(e,t){const n={method:"DELETE",headers:await O5(e)};try{const a=await(await fetch(`${R5(e.appConfig)}/${t}`,n)).json();if(a.error){const o=a.error.message;throw aa.create("token-unsubscribe-failed",{errorInfo:o})}}catch(i){throw aa.create("token-unsubscribe-failed",{errorInfo:i?.toString()})}}async function Tot(e,t,r){let n;for(let i=0;i<t;i++)try{return await e()}catch(a){if(n=a,i<t-1){const o=r*Math.pow(2,i);await new Promise(s=>setTimeout(s,o))}}throw n}function R5({projectId:e}){return`${oot}/projects/${e}/registrations`}async function O5({appConfig:e,installations:t}){const r=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${r}`})}function Aot(e,t){try{if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e))return new URL(e).host}catch{}try{if(typeof self<"u"&&self.location?.href)return new URL(e,self.location.origin).host}catch{}return typeof self<"u"&&self.location?.host?self.location.host:t}function sW({p256dh:e,auth:t,endpoint:r,vapidKey:n,swScope:i},a,o){const s={web:{origin:Aot(i,a),endpoint:r,auth:t,p256dh:e}};return o&&(s.fcm_sdk_version=SH),n!==cCe&&(s.web.applicationPubKey=n),s}const Pot=10080*60*1e3;async function Rot(e){const t=await Iot(e.swRegistration,e.vapidKey),r={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:vu(t.getKey("auth")),p256dh:vu(t.getKey("p256dh"))},n=await vot(e.firebaseDependencies);if(n){if(kot(n.subscriptionOptions,r))return Date.now()>=n.createTime+Pot?Oot(e,{token:n.token,createTime:Date.now(),subscriptionOptions:r}):n.token;try{await xot(e.firebaseDependencies,n.token)}catch(i){console.warn(i)}return Mae(e.firebaseDependencies,r)}else return Mae(e.firebaseDependencies,r)}async function Oot(e,t){try{const r=await Cot(e.firebaseDependencies,t),n={...t,token:r,createTime:Date.now()};return await oW(e.firebaseDependencies,n),r}catch(r){throw r}}async function Mae(e,t){const n={token:await bot(e,t),createTime:Date.now(),subscriptionOptions:t};return await oW(e,n),n.token}async function Iot(e,t){const r=await e.pushManager.getSubscription();return r||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:dCe(t)})}function kot(e,t){const r=t.vapidKey===e.vapidKey,n=t.endpoint===e.endpoint,i=t.auth===e.auth,a=t.p256dh===e.p256dh;return r&&n&&i&&a}function Not(e,t){const r=e.onRegisteredHandler;r&&(typeof r=="function"?r(t):r.next(t))}async function Dot(e){try{e.swRegistration=await navigator.serviceWorker.register(iot,{scope:aot}),e.swRegistration.update().catch(()=>{}),await Mot(e.swRegistration)}catch(t){throw aa.create("failed-service-worker-registration",{browserErrorMessage:t?.message})}}async function Mot(e){return new Promise((t,r)=>{const n=setTimeout(()=>r(new Error(`Service worker not registered after ${Tae} ms`)),Tae),i=e.installing||e.waiting;e.active?(clearTimeout(n),t()):i?i.onstatechange=a=>{a.target?.state==="activated"&&(i.onstatechange=null,clearTimeout(n),t())}:(clearTimeout(n),r(new Error("No incoming service worker found.")))})}async function mCe(e,t){if(!t&&!e.swRegistration&&await Dot(e),!(!t&&e.swRegistration)){if
44(!(t instanceof ServiceWorkerRegistration))throw aa.create("invalid-sw-registration");e.swRegistration=t}}async function vCe(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=cCe)}const Lae=3;async function Lot(e,t){const r=await Fot(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:r.endpoint,auth:vu(r.getKey("auth")),p256dh:vu(r.getKey("p256dh"))},i=e.firebaseDependencies.installations;for(let a=0;a<Lae;a++){const{responseFid:o}=await Eot(e.firebaseDependencies,n);if(o===t)return;a<Lae-1&&await i.getToken(!0)}throw aa.create("fid-registration-failed",{errorInfo:"CreateRegistration response FID does not match Firebase Installation ID"})}async function Fot(e,t){const r=await e.pushManager.getSubscription();return r||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:dCe(t)})}const Bot=10080*60*1e3;async function gCe(e,t){if(!navigator)throw aa.create("only-available-in-window");if(Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission!=="granted")throw aa.create("permission-blocked");if(!e.onRegisteredHandler)throw aa.create("invalid-on-registered-handler");await vCe(e,t?.vapidKey),await mCe(e,t?.serviceWorkerRegistration);const r=e._registerNotifyChain.catch(()=>{});return e._registerNotifyChain=r.then(async()=>{const n=await e.firebaseDependencies.installations.getId(),i=await pCe(e.firebaseDependencies),a=Date.now();if((!i||i.fid!==n||a>=i.lastRegisterTime+Bot)&&(await Lot(e,n),await got(e.firebaseDependencies,{fid:n,lastRegisterTime:a,vapidKey:e.vapidKey}
44)),!e.onRegisteredHandler)throw aa.create("invalid-on-registered-handler");Not(e,n)}),e._registerNotifyChain}function zot(e,t){return Qat(t,()=>{(async()=>!e.onRegisteredHandler||!await pCe(e.firebaseDependencies)||await gCe(e).catch(()=>{}))()})}function Fae(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return Hot(t,e),Uot(t,e),Vot(t,e),t}function Hot(e,t){if(!t.notification)return;e.notification={};const r=t.notification.title;r&&(e.notification.title=r);const n=t.notification.body;n&&(e.notification.body=n);const i=t.notification.image;i&&(e.notification.image=i);const a=t.notification.icon;a&&(e.notification.icon=a)}function Uot(e,t){t.data&&(e.data=t.data)}function Vot(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};const r=t.fcmOptions?.link??t.notification?.click_action;r&&(e.fcmOptions.link=r);const n=t.fcmOptions?.analytics_label;n&&(e.fcmOptions.analyticsLabel=n)}function qot(e){return typeof e=="object"&&!!e&&uCe in e}function jot(e){if(!e||!e.options)throw t9("App Configuration Object");if(!e.name)throw t9("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:r}=e;for(const n of t)if(!r[n])throw t9(n);return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}function t9(e){return aa.create("missing-app-config-values",{valueName:e})}class $ot{constructor(t,r,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.onRegisteredHandler=null,this.onUnregisteredHandler=null,this._registerNotifyChain=Promise.resolve(),this._fidChangeUnsubscribe=null,this.logEvents=[],this.logQueue={state:"stopped"};const i=jot(t);this.firebaseDependencies={app:t,appConfig:i,installations:r,analyticsProvider:n}}_delete(){return this._fidChangeUnsubscribe&&(this._fidChangeUnsubscribe(),this._fidChangeUnsubscribe=null),this.logQueue.state==="scheduled"&&clearTimeout(this.logQueue.timerId),this.logQueue={state:"stopped"},Promise.resolve()}}async function yCe(e,t){if(!navigator)throw aa.create("only-available-in-window");if(Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission!=="granted")throw aa.create("permission-blocked");return await vCe(e,t?.vapidKey),await mCe(e,t?.serviceWorkerRegistration),Rot(e)}async function Wot(e,t,r){const n=Got(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(n,{message_id:r[uCe],message_name:r[sot],message_time:r[lot],message_device_time:Math.floor(Date.now()/1e3)})}function Got(e){switch(e){case w1.NOTIFICATION_CLICKED:return"notification_open";case w1.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}async function Kot(e,t){const r=t.data;if(!r.isFirebaseMessaging)return;if(e.onMessageHandler&&r.messageType===w1.PUSH_RECEIVED&&(typeof e.onMessageHandler=="function"?e.onMessageHandler(Fae(r)):e.onMessageHandler.next(Fae(r))),e.onRegisteredHandler&&r.messageType===w1.FID_REGISTERED){const i=r.fid;typeof e.onRegisteredHandler=="function"?e.onRegisteredHandler(i):e.onRegisteredHandler.next(i)}const n=r.data;qot(n)&&n[cot]==="1"&&await Wot(e,r.messageType,n)}const Yot=e=>{const t=new $ot(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",r=>Kot(t,r)),t._fidChangeUnsubscribe=zot(t,e.getProvider("installations").getImmediate()),t},Xot=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:n=>yCe(t,n),register:n=>gCe(t,n)}};function Zot(){Fd(new Bu("messaging",Yot,"PUBLIC")),Fd(new Bu("messaging-internal",Xot,"PRIVATE")),Uc(Nae,SH),Uc(Nae,SH,"esm2020")}async function _Ce(){try{await VEe()}catch{return!1}return typeof window<"u"&&UEe()&&FQe()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function Qot(e=p$()){return _Ce().then(t=>{if(!t)throw aa.create("unsupported-browser")},t=>{throw aa.create("indexed-db-unsupported")}),P_(Bo(e),"messaging").getImmediate()}async function WT(e,t){return e=Bo(e),yCe(e,t)}Zot();var S1={},Vt;if(typeof window>"u"){var Bae={hostname:""};Vt={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:Bae,referrer:""},screen:{width:0,height:0},location:Bae,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else Vt=window;var Rl={DEBUG:!1,LIB_VERSION:"2.81.0"},gu="__mp_targeting",CH="__mp_recorder",Jot="__MP_RECORDER_FILENAME__",bCe="__MP_TARGETING_FILENAME__";function zae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hae(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)}function I5(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){Hae(a,n,i,o,s,"next",l)}
vendor: 41,659 bytes, lines 44-61
44function s(l){Hae(a,n,i,o,s,"throw",l)}o(void 0)})}}function YP(e,t,r){return ECe()?YP=Reflect.construct:YP=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return o&&_C(c,o.prototype),c},YP.apply(null,arguments)}function est(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ra(e,t,r){return t&&est(e.prototype,t),e}function Mn(){return Mn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mn.apply(this,arguments)}function xH(e){return xH=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xH(e)}function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_C(e,t)}function Gr(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function tst(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function wg(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _C(e,t){return _C=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_C(e,t)}function Kr(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function rst(e,t){if(e){if(typeof e=="string")return zae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zae(e,t)}}function bC(e){var t=typeof Map=="function"?new Map:void 0;return bC=function(n){if(n===null||!tst(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return YP(n,arguments,xH(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_C(i,n)},bC(e)}function ECe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ECe=function(){return!!e})()}function ir(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=rst(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sg(e,t){var r,n,i,a,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(d){return l([c,d])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=c[0]&2?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){o=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(c[0]===6&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(d){c=[6,d],n=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function lW(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nst=Object.defineProperty,ist=function(e,t,r){return t in e?nst(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},gr=function(e,t,r){return ist(e,(typeof t>"u"?"undefined":Kr(t))!=="symbol"?t+"":t,r)},Uae,ast=Object.defineProperty,ost=function(e,t,r){return t in e?ast(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Vae=function(e,t,r){return ost(e,(typeof t>"u"?"undefined":Kr(t))!=="symbol"?t+"":t,r)},Mo=(function(e){return 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",e})(Mo||{}),qae={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jae={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},GT={},sst=function(){return!!globalThis.Zone};function cW(e){if(GT[e])return GT[e];var t=globalThis[e],r=t.prototype,n=e in qae?qae[e]:void 0,i=!!(n&&n.every(function(d){var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(r,d))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),a=e in jae?jae[e]:void 0,o=!!(a&&a.every(function(d){var f;return typeof r[d]=="function"&&((f=r[d])==null?void 0:f.toString().includes("[native code]"))}));if(i&&o&&!sst())return GT[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?GT[e]=c:r}catch{return r}}var r9={};function Sm(e,t,r){var n,i=e+"."+String(r);if(r9[i])return r9[i].call(t);var a=cW(e),o=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return o?(r9[i]=o,o.call(t)):t[r]}var n9={};function wCe(e,t,r){var n=e+"."+String(r);if(n9[n])return n9[n].bind(t);var i=cW(e),a=i[r];return typeof a!="function"?t[r]:(n9[n]=a,a.bind(t))}function lst(e){return Sm("Node",e,"childNodes")}function cst(e){return Sm("Node",e,"parentNode")}function ust(e){return Sm("Node",e,"parentElement")}function dst(e){return Sm("Node",e,"textContent")}function fst(e,t){return wCe("Node",e,"contains")(t)}function hst(e){return wCe("Node",e,"getRootNode")()}function pst(e){return!e||!("host"in e)?null:Sm("ShadowRoot",e,"host")}function mst(e){return e.styleSheets}function vst(e){return!e||!("shadowRoot"in e)?null:Sm("Element",e,"shadowRoot")}function gst(e,t){return Sm("Element",e,"querySelector")(t)}function yst(e,t){return Sm("Element",e,"querySelectorAll")(t)}function _st(){return cW("MutationObserver").constructor}function bst(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch{return function(){}}}var Ls={childNodes:lst,parentNode:cst,parentElement:ust,textContent:dst,contains:fst,getRootNode:hst,host:pst,styleSheets:mst,shadowRoot:vst,querySelector:gst,querySelectorAll:yst,mutationObserver:_st,patch:bst};function SCe(e){return e.nodeType===e.ELEMENT_NODE}function wS(e){var t=e&&"host"in e&&"mode"in e&&Ls.host(e)||null;return!!(t&&"shadowRoot"in t&&Ls.shadowRoot(t)===e)}function SS(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Est(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function wst(e){var t=e.cssText;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function TH(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);var n=Array.from(t,function(i){return CCe(i,r)}).join("");return Est(n)}catch{return null}}function CCe(e,t){if(Cst(e)){var r;try{r=TH(e.styleSheet)||wst(e)}catch{r=e.cssText}return e.styleSheet.href?MO(r,e.styleSheet.href):r}else{var n=e.cssText;return xst(e)&&e.selectorText.includes(":")&&(n=Sst(n)),t?MO(n,t):n}}function Sst(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Cst(e){return"styleSheet"in e}function xst(e){return"selectorText"in e}var xCe=(function(){function e(){Vae(this,"idNodeMap",new Map),Vae(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(n){var i;if(!n)return-1;var a=(i=this.getMeta(n))==null?void 0:i.id;return a??-1},t.getNode=function(n){return this.idNodeMap.get(n)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(n){return this.nodeMetaMap.get(n)||null},t.removeNodeFromMap=function(n,i){var a=this;i===void 0&&(i=!1);var o=this.getId(n);this.idNodeMap.delete(o),i&&this.nodeMetaMap.delete(n),n.childNodes&&n.childNodes.forEach(function(s){return a.removeNodeFromMap(s,i)})},t.has=function(n){return this.idNodeMap.has(n)},t.hasNode=function(n){return this.nodeMetaMap.has(n)},t.add=function(n,i){var a=i.id;this.idNodeMap.set(a,n),this.nodeMetaMap.set(n,i)},t.replace=function(n,i){var a=this.getNode(n);if(a){var o=this.nodeMetaMap.get(a);o&&this.nodeMetaMap.set(i,o)}this.idNodeMap.set(n,i)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();function Tst(){return new xCe}function NO(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,i=e.type,a=e.value,o=e.maskInputFn,s=a||"",l=i&&Cg(i);return(r[n.toLowerCase()]||l&&r[l])&&(o?s=o(s,t):s="*".repeat(s.length)),s}function Cg(e){return e.toLowerCase()}var $ae="__rrweb_original__";function Ast(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n<e.width;n+=r)for(var i=0;i<e.height;i+=r){var a=t.getImageData,o=$ae in a?a[$ae]:a,s=new Uint32Array(o.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer);if(s.some(function(l){return l!==0}))return!1}return!0}function DO(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Cg(t):null}function TCe(e,t){var r;try{r=new URL(e,t??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n),a;return(a=i?.[1])!=null?a:null}function Pst(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Rst=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ost=/^(?:[a-z+]+:)?\/\//i,Ist=/^www\..*/i,kst=/^(data:)([^,]*),(.*)/i;function MO(e,t){return(e||"").replace(Rst,function(r,n,i,a,o,s){var l=i||o||s,c=n||a||"";if(!l)return r;if(Ost.test(l)||Ist.test(l)||kst.test(l))return"url("+c+l+c+")";if(l[0]==="/")return"url("+c+(Pst(t)+l)+c+")";var d=t.split("/"),f=l.split("/");d.pop();for(var h=ir(f),p;!(p=h()).done;){var g=p.value;g!=="."&&(g===".."?d.pop():d.push(g))}return"url("+c+d.join("/")+c+")"})}function KT(e,t){return t===void 0&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Nst(e,t,r){r===void 0&&(r=!1);var n=Array.from(t.childNodes),i=[],a=0;if(n.length>1&&e&&typeof e=="string"){for(var o=KT(e,r),s=o.length/e.length,l=1;l<n.length;l++)if(n[l].textContent&&typeof n[l].textContent=="string"){for(var c=KT(n[l].textContent,r),d=100,f=3;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){var h=c.substring(0,f),p=o.split(h),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[l-1].textContent!=="")g=o.indexOf(h,1);else if(p.length===1){if(h=h.substring(0,h.length-1),p=o.split(h),p.length<=1)return i.push(e),i;f=d+1}else f===c.length-1&&(g=o.indexOf(h));if(p.length>=2&&f>d){var _=n[l-1].textContent;if(_&&typeof _=="string"){var b=KT(_).length;g=o.indexOf(h,b)}g===-1&&(g=p[0].length)}if(g!==-1){for(var E=Math.floor(g/s);E>0&&E<e.length;){if(a+=1,a>50*n.length)return i.push(e),i;var S=KT(e.substring(0,E),r);if(S.length===g){i.push(e.substring(0,E)),e=e.substring(E),o=o.substring(g);break}else S.length<g?E+=Math.max(1,Math.floor((g-S.length)/s)):E-=Math.max(1,Math.floor((S.length-g)*s))}break}}}}return i.push(e),i}function Dst(e,t){return Nst(e,t).join("/* rr_split */")}var Mst=1,Lst=new RegExp("[^a-z0-9-_:]"),EC=-2;function ACe(){return Mst++}function Fst(e){if(Gr(e,HTMLFormElement))return"form";var t=Cg(e.tagName);return Lst.test(t)?"div":t}var U0,Wae,Bst=/^[^ \t\n\r\u000c]+/,zst=/^[, \t\n\r\u000c]+/;function Hst(e,t){if(t.trim()==="")return t;var r=0;function n(c){var d,f=c.exec(t.substring(r));return f?(d=f[0],r+=d.length,d):""}for(var i=[];n(zst),!(r>=t.length);){var a=n(Bst);if(a.slice(-1)===",")a=Sy(e,a.substring(0,a.length-1)),i.push(a);else{var o="";a=Sy(e,a);for(var s=!1;;){var l=t.charAt(r);if(l===""){i.push((a+o).trim());break}else if(s)l===")"&&(s=!1);else if(l===","){r+=1,i.push((a+o).trim());break}else l==="("&&(s=!0);o+=l,r+=1}}}return i.join(", ")}var Gae=new WeakMap;function Sy(e,t){return!t||t.trim()===""?t:uW(e,t)}function Ust(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function uW(e,t){var r=Gae.get(e);if(r||(r=e.createElement("a"),Gae.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function PCe(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Sy(e,n):r==="srcset"?Hst(e,n):r==="style"?MO(n,uW(e)):t==="object"&&r==="data"?Sy(e,n):n)}function RCe(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Vst(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function LO(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?LO(Ls.parentNode(e),t,r):!1;for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return r?LO(Ls.parentNode(e),t,r):!1}function OCe(e,t,r,n){var i;if(SCe(e)){if(i=e,!Ls.childNodes(i).length)return!1}else{if(Ls.parentElement(e)===null)return!1;i=Ls.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(LO(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function qst(e,t,r){var n=e.contentWindow;if(n){var i=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){var o=setTimeout(function(){i||(t(),i=!0)},r);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()});return}var s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function jst(e,t,r){var n=!1,i;try{i=e.sheet}catch{return}if(!i){var a=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(a),n=!0,t()})}}function $st(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,a=t.blockSelector,o=t.needsMask,s=t.inlineStylesheet,l=t.maskInputOptions,c=l===void 0?{}:l,d=t.maskTextFn,f=t.maskInputFn,h=t.dataURLOptions,p=h===void 0?{}:h,g=t.inlineImages,_=t.recordCanvas,b=t.keepIframeSrcFn,E=t.newlyAddedElement,S=E===void 0?!1:E,P=t.cssCaptured,O=P===void 0?!1:P,I=Wst(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Mo.Document,childNodes:[],compatMode:e.compatMode}:{type:Mo.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Mo.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return Kst(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:s,maskInputOptions:c,maskInputFn:f,dataURLOptions:p,inlineImages:g,recordCanvas:_,keepIframeSrcFn:b,newlyAddedElement:S,rootId:I});case e.TEXT_NODE:return Gst(e,{doc:r,needsMask:o,maskTextFn:d,rootId:I,cssCaptured:O});case e.CDATA_SECTION_NODE:return{type:Mo.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:Mo.Comment,textContent:Ls.textContent(e)||"",rootId:I};default:return!1}}function Wst(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function Gst(e,t){var r=t.needsMask,n=t.maskTextFn,i=t.rootId,a=t.cssCaptured,o=Ls.parentNode(e),s=o&&o.tagName,l="",c=s==="STYLE"?!0:void 0,d=s==="SCRIPT"?!0:void 0;return d?l="SCRIPT_PLACEHOLDER":a||(l=Ls.textContent(e),c&&l&&(l=MO(l,uW(t.doc)))),!c&&!d&&l&&r&&(l=n?n(l,Ls.parentElement(e)):l.replace(/[\S]/g,"*")),{type:Mo.Text,textContent:l||"",rootId:i}}function Kst(e,t){for(var r=t.doc,n=t.blockClass,i=t.blockSelector,a=t.inlineStylesheet,o=t.maskInputOptions,s=o===void 0?{}:o,l=t.maskInputFn,c=t.dataURLOptions,d=c===void 0?{}:c,f=t.inlineImages,h=t.recordCanvas,p=t.keepIframeSrcFn,g=t.newlyAddedElement,_=g===void 0?!1:g,b=t.rootId,E=Vst(e,n,i),S=Fst(e),P={},O=e.attributes.length,I=0;I<O;I++){var N=e.attributes[I];RCe(S,N.name,N.value)||(P[N.name]=PCe(r,S,Cg(N.name),N.value))}if(S==="link"&&a){var M=Array.from(r.styleSheets).find(function(Pe){return Pe.href===e.href}),F=null;M&&(F=TH(M)),F&&(delete P.rel,delete P.href,P._cssText=F)}if(S==="style"&&e.sheet){var B=TH(e.sheet);B&&(e.childNodes.length>1&&(B=Dst(B,e)),P._cssText=B)}if(S==="input"||S==="textarea"||S==="select"){var V=e.value,W=e.checked;P.type!=="radio"&&P.type!=="checkbox"&&P.type!=="submit"&&P.type!=="button"&&V?P.value=NO({element:e,type:DO(e),tagName:S,value:V,maskInputOptions:s,maskInputFn:l}):W&&(P.checked=W)}if(S==="option"&&(e.selected&&!s.select?P.selected=!0:delete P.selected),S==="dialog"&&e.open&&(P.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),S==="canvas"&&h){if(e.__context==="2d")Ast(e)||(P.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var $=e.toDataURL(d.type,d.quality),X=r.createElement("canvas");X.width=e.width,X.height=e.height;var re=X.toDataURL(d.type,d.quality);$!==re&&(P.rr_dataURL=$)}}if(S==="img"&&f){U0||(U0=r.createElement("canvas"),Wae=U0.getContext("2d"));var ae=e,Q=ae.currentSrc||ae.getAttribute("src")||"<unknown-src>",ie=ae.crossOrigin,le=function(){ae.removeEventListener("load",le);try{U0.width=ae.naturalWidth,U0.height=ae.naturalHeight,Wae.drawImage(ae,0,0),P.rr_dataURL=U0.toDataURL(d.type,d.quality)}catch(Pe){if(ae.crossOrigin!=="anonymous"){ae.crossOrigin="anonymous",ae.complete&&ae.naturalWidth!==0?le():ae.addEventListener("load",le);return}else console.warn("Cannot inline img src="+Q+"! Error: "+Pe)}ae.crossOrigin==="anonymous"&&(ie?P.crossOrigin=ie:ae.removeAttribute("crossorigin"))};ae.complete&&ae.naturalWidth!==0?le():ae.addEventListener("load",le)}if(S==="audio"||S==="video"){var fe=P;fe.rr_mediaState=e.paused?"paused":"played",fe.rr_mediaCurrentTime=e.currentTime,fe.rr_mediaPlaybackRate=e.playbackRate,fe.rr_mediaMuted=e.muted,fe.rr_mediaLoop=e.loop,fe.rr_mediaVolume=e.volume}if(_||(e.scrollLeft&&(P.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(P.rr_scrollTop=e.scrollTop)),E){var de=e.getBoundingClientRect(),ge=de.width,Ae=de.height;P={class:P.class,rr_width:""+ge+"px",rr_height:""+Ae+"px"}}S==="iframe"&&!p(P.src)&&(e.contentDocument||(P.rr_src=P.src),delete P.src);var Fe;try{customElements.get(S)&&(Fe=!0)}catch{}return{type:Mo.Element,tagName:S,attributes:P,childNodes:[],isSVG:Ust(e)||void 0,needBlock:E,rootId:b,isCustom:Fe}}function pa(e){return e==null?"":e.toLowerCase()}function Yst(e,t){if(t.comment&&e.type===Mo.Comment)return!0;if(e.type===Mo.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&TCe(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(pa(e.attributes.name).match(/^msapplication-tile(image|color)$/)||pa(e.attributes.name)==="application-name"||pa(e.attributes.rel)==="icon"||pa(e.attributes.rel)==="apple-touch-icon"||pa(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&pa(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(pa(e.attributes.property).match(/^(og|twitter|fb):/)||pa(e.attributes.name).match(/^(og|twitter):/)||pa(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(pa(e.attributes.name)==="robots"||pa(e.attributes.name)==="googlebot"||pa(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(pa(e.attributes.name)==="author"||pa(e.attributes.name)==="generator"||pa(e.attributes.name)==="framework"||pa(e.attributes.name)==="publisher"||pa(e.attributes.name)==="progid"||pa(e.attributes.property).match(/^article:/)||pa(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(pa(e.attributes.name)==="google-site-verification"||pa(e.attributes.name)==="yandex-verification"||pa(e.attributes.name)==="csrf-token"||pa(e.attributes.name)==="p:domain_verify"||pa(e.attributes.name)==="verify-v1"||pa(e.attributes.name)==="verification"||pa(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Cy(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,a=t.blockSelector,o=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,d=t.inlineStylesheet,f=d===void 0?!0:d,h=t.maskInputOptions,p=h===void 0?{}:h,g=t.maskTextFn,_=t.maskInputFn,b=t.slimDOMOptions,E=t.dataURLOptions,S=E===void 0?{}:E,P=t.inlineImages,O=P===void 0?!1:P,I=t.recordCanvas,N=I===void 0?!1:I,M=t.onSerialize,F=t.onIframeLoad,B=t.iframeLoadTimeout,V=B===void 0?5e3:B,W=t.onStylesheetLoad,$=t.stylesheetLoadTimeout,X=$===void 0?5e3:$,re=t.keepIframeSrcFn,ae=re===void 0?function(){return!1}:re,Q=t.newlyAddedElement,ie=Q===void 0?!1:Q,le=t.cssCaptured,fe=le===void 0?!1:le,de=t.needsMask,ge=t.preserveWhiteSpace,Ae=ge===void 0?!0:ge;if(!de){var Fe=de===void 0;de=OCe(e,o,s,Fe)}var Pe=$st(e,{doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:de,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:_,dataURLOptions:S,inlineImages:O,recordCanvas:N,keepIframeSrcFn:ae,newlyAddedElement:ie,cssCaptured:fe});if(!Pe)return console.warn(e,"not serialized"),null;var ce;n.hasNode(e)?ce=n.getId(e):Yst(Pe,b)||!Ae&&Pe.type===Mo.Text&&!Pe.textContent.replace(/^\s+|\s+$/gm,"").length?ce=EC:ce=ACe();var pe=Object.assign(Pe,{id:ce});if(n.add(e,pe),ce===EC)return null;M&&M(e);var Ne=!c;if(pe.type===Mo.Element){Ne=Ne&&!pe.needBlock,delete pe.needBlock;var De=Ls.shadowRoot(e);De&&SS(De)&&(pe.isShadowHost=!0)}if((pe.type===Mo.Document||pe.type===Mo.Element)&&Ne){b.headWhitespace&&pe.type===Mo.Element&&pe.tagName==="head"&&(Ae=!1);var Ve={doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:de,maskTextClass:o,maskTextSelector:s,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:_,slimDOMOptions:b,dataURLOptions:S,inlineImages:O,recordCanvas:N,preserveWhiteSpace:Ae,onSerialize:M,onIframeLoad:F,iframeLoadTimeout:V,onStylesheetLoad:W,stylesheetLoadTimeout:X,keepIframeSrcFn:ae,cssCaptured:!1};if(!(pe.type===Mo.Element&&pe.tagName==="textarea"&&pe.attributes.value!==void 0)){pe.type===Mo.Element&&pe.attributes._cssText!==void 0&&typeof pe.attributes._cssText=="string"&&(Ve.cssCaptured=!0);for(var Ke=ir(Array.from(Ls.childNodes(e))),Qe;!(Qe=Ke()).done;){var Ue=Qe.value,ut=Cy(Ue,Ve);ut&&pe.childNodes.push(ut)}}var We=null;if(SCe(e)&&(We=Ls.shadowRoot(e)))for(var ke=ir(Array.from(Ls.childNodes(We))),Le;!(Le=ke()).done;){var Be=Le.value,Ze=Cy(Be,Ve);Ze&&(SS(We)&&(Ze.isShadow=!0),pe.childNodes.push(Ze))}}var Et=Ls.parentNode(e);return Et&&wS(Et)&&SS(Et)&&(pe.isShadow=!0),pe.type===Mo.Element&&pe.tagName==="iframe"&&qst(e,function(){var Yt=e.contentDocument;if(Yt&&F){var sr=Cy(Yt,{doc:Yt,mirror:n,blockClass:i,blockSelector:a,needsMask:de,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:_,slimDOMOptions:b,dataURLOptions:S,inlineImages:O,recordCanvas:N,preserveWhiteSpace:Ae,onSerialize:M,onIframeLoad:F,iframeLoadTimeout:V,onStylesheetLoad:W,stylesheetLoadTimeout:X,keepIframeSrcFn:ae});sr&&F(e,sr)}},V),pe.type===Mo.Element&&pe.tagName==="link"&&typeof pe.attributes.rel=="string"&&(pe.attributes.rel==="stylesheet"||pe.attributes.rel==="preload"&&typeof pe.attributes.href=="string"&&TCe(pe.attributes.href)==="css")&&jst(e,function(){if(W){var Yt=Cy(e,{doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:de,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:_,slimDOMOptions:b,dataURLOptions:S,inlineImages:O,recordCanvas:N,preserveWhiteSpace:Ae,onSerialize:M,onIframeLoad:F,iframeLoadTimeout:V,onStylesheetLoad:W,stylesheetLoadTimeout:X,keepIframeSrcFn:ae});Yt&&W(e,Yt)}},X),pe}function Xst(e,t){var r=t||{},n=r.mirror,i=n===void 0?new xCe:n,a=r.blockClass,o=a===void 0?"rr-block":a,s=r.blockSelector,l=s===void 0?null:s,c=r.maskTextClass,d=c===void 0?"rr-mask":c,f=r.maskTextSelector,h=f===void 0?null:f,p=r.inlineStylesheet,g=p===void 0?!0:p,_=r.inlineImages,b=_===void 0?!1:_,E=r.recordCanvas,S=E===void 0?!1:E,P=r.maskAllInputs,O=P===void 0?!1:P,I=r.maskTextFn,N=r.maskInputFn,M=r.slimDOM,F=M===void 0?!1:M,B=r.dataURLOptions,V=r.preserveWhiteSpace,W=r.onSerialize,$=r.onIframeLoad,X=r.iframeLoadTimeout,re=r.onStylesheetLoad,ae=r.stylesheetLoadTimeout,Q=r.keepIframeSrcFn,ie=Q===void 0?function(){return!1}:Q,le=O===!0?{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,hidden:!0}:O===!1?{password:!0}:O,fe=F===!0||F==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:F==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:F===!1?{}:F;return Cy(e,{doc:e,mirror:i,blockClass:o,blockSelector:l,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:le,maskTextFn:I,maskInputFn:N,slimDOMOptions:fe,dataURLOptions:B,inlineImages:b,recordCanvas:S,preserveWhiteSpace:V,onSerialize:W,onIframeLoad:$,iframeLoadTimeout:X,onStylesheetLoad:re,stylesheetLoadTimeout:ae,keepIframeSrcFn:ie,newlyAddedElement:!1})}function Zst(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qst(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return Gr(this,n)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var dW={exports:{}},Ea=String,ICe=function(){return{isColorSupported:!1,reset:Ea,bold:Ea,dim:Ea,italic:Ea,underline:Ea,inverse:Ea,hidden:Ea,strikethrough:Ea,black:Ea,red:Ea,green:Ea,yellow:Ea,blue:Ea,magenta:Ea,cyan:Ea,white:Ea,gray:Ea,bgBlack:Ea,bgRed:Ea,bgGreen:Ea,bgYellow:Ea,bgBlue:Ea,bgMagenta:Ea,bgCyan:Ea,bgWhite:Ea}};dW.exports=ICe();dW.exports.createColors=ICe;var Jst=dW.exports,elt={},tlt=Object.freeze(Object.defineProperty({__proto__:null,default:elt},Symbol.toStringTag,{value:"Module"})),go=Qst(tlt),Kae=Jst,Yae=go,AH=(function(e){La(t,e);function t(n,i,a,o,s,l){var c;return c=e.call(this,n)||this,c.name="CssSyntaxError",c.reason=n,s&&(c.file=s),o&&(c.source=o),l&&(c.plugin=l),typeof i<"u"&&typeof a<"u"&&(typeof i=="number"?(c.line=i,c.column=a):(c.line=i.line,c.column=i.column,c.endLine=a.line,c.endColumn=a.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var a=this;if(!this.source)return"";var o=this.source;i==null&&(i=Kae.isColorSupported),Yae&&i&&(o=Yae(o));var s=o.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),d=String(c).length,f,h;if(i){var p=Kae.createColors(!0),g=p.bold,_=p.gray,b=p.red;f=function(E){return g(b(E))},h=function(E){return _(E)}}else f=h=function(E){return E};return s.slice(l,c).map(function(E,S){var P=l+1+S,O=" "+(" "+P).slice(-d)+" | ";if(P===a.line){var I=h(O.replace(/\d/g," "))+E.slice(0,a.column-1).replace(/[^\t]/g," ");return f(">")+h(O)+E+`
45 `+I+f("^")}return" "+h(O)+E}).join(`
46`)},r.toString=function(){var i=this.showSourceCode();return i&&(i=`
47
48`+i+`
49`),this.name+": "+this.message+i},t})(bC(Error)),fW=AH;AH.default=AH;var Cm={};Cm.isClean=Symbol("isClean");Cm.my=Symbol("my");var Xae={after:`
50`,beforeClose:`
51`,beforeComment:`
52`,beforeDecl:`
53`,beforeOpen:" ",beforeRule:`
54`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function rlt(e){return e[0].toUpperCase()+e.slice(1)}var PH=(function(){function e(r){this.builder=r}var t=e.prototype;return t.atrule=function(n,i){var a="@"+n.name,o=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?a+=n.raws.afterName:o&&(a+=" "),n.nodes)this.block(n,a+o);else{var s=(n.raws.between||"")+(i?";":"");this.builder(a+o+s,n)}},t.beforeAfter=function(n,i){var a;n.type==="decl"?a=this.raw(n,null,"beforeDecl"):n.type==="comment"?a=this.raw(n,null,"beforeComment"):i==="before"?a=this.raw(n,null,"beforeRule"):a=this.raw(n,null,"beforeClose");for(var o=n.parent,s=0;o&&o.type!=="root";)s+=1,o=o.parent;if(a.includes(`
55`)){var l=this.raw(n,null,"indent");if(l.length)for(var c=0;c<s;c++)a+=l}return a},t.block=function(n,i){var a=this.raw(n,"between","beforeOpen");this.builder(i+a+"{",n,"start");var o;n.nodes&&n.nodes.length?(this.body(n),o=this.raw(n,"after")):o=this.raw(n,"after","emptyBody"),o&&this.builder(o),this.builder("}",n,"end")},t.body=function(n){for(var i=n.nodes.length-1;i>0&&n.nodes[i].type==="comment";)i-=1;for(var a=this.raw(n,"semicolon"),o=0;o<n.nodes.length;o++){var s=n.nodes[o],l=this.raw(s,"before");l&&this.builder(l),this.stringify(s,i!==o||a)}},t.comment=function(n){var i=this.raw(n,"left","commentLeft"),a=this.raw(n,"right","commentRight");this.builder("/*"+i+n.text+a+"*/",n)},t.decl=function(n,i){var a=this.raw(n,"between","colon"),o=n.prop+a+this.rawValue(n,"value");n.important&&(o+=n.raws.important||" !important"),i&&(o+=";"),this.builder(o,n)},t.document=function(n){this.body(n)},t.raw=function(n,i,a){var o;if(a||(a=i),i&&(o=n.raws[i],typeof o<"u"))return o;var s=n.parent;if(a==="before"&&(!s||s.type==="root"&&s.first===n||s&&s.type==="document"))return"";if(!s)return Xae[a];var l=n.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[a]<"u")return l.rawCache[a];if(a==="before"||a==="after")return this.beforeAfter(n,a);var c="raw"+rlt(a);return this[c]?o=this[c](l,n):l.walk(function(d){if(o=d.raws[i],typeof o<"u")return!1}),typeof o>"u"&&(o=Xae[a]),l.rawCache[a]=o,o},t.rawBeforeClose=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length>0&&typeof a.raws.after<"u")return i=a.raws.after,i.includes(`
56`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawBeforeComment=function(n,i){var a;return n.walkComments(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
57`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeDecl=function(n,i){var a;return n.walkDecls(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
58`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeOpen=function(n){var i;return n.walk(function(a){if(a.type!=="decl"&&(i=a.raws.between,typeof i<"u"))return!1}),i},t.rawBeforeRule=function(n){var i;return n.walk(function(a){if(a.nodes&&(a.parent!==n||n.first!==a)&&typeof a.raws.before<"u")return i=a.raws.before,i.includes(`
59`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawColon=function(n){var i;return n.walkDecls(function(a){if(typeof a.raws.between<"u")return i=a.raws.between.replace(/[^\s:]/g,""),!1}),i},t.rawEmptyBody=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length===0&&(i=a.raws.after,typeof i<"u"))return!1}),i},t.rawIndent=function(n){if(n.raws.indent)return n.raws.indent;var i;return n.walk(function(a){var o=a.parent;if(o&&o!==n&&o.parent&&o.parent===n&&typeof a.raws.before<"u"){var s=a.raws.before.split(`
60`);return i=s[s.length-1],i=i.replace(/\S/g,""),!1}}),i},t.rawSemicolon=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(i=a.raws.semicolon,typeof i<"u"))return!1}),i},t.rawValue=function(n,i){var a=n[i],o=n.raws[i];return o&&o.value===a?o.raw:a},t.root=function(n){this.body(n),n.raws.after&&this.builder(n.raws.after)},t.rule=function(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end")},t.stringify=function(n,i){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,i)},e})(),kCe=PH;PH.default=PH;var nlt=kCe;function RH(e,t){var r=new nlt(t);r.stringify(e)}var k5=RH;RH.default=RH;var YT=Cm.isClean,ilt=Cm.my,alt=fW,olt=kCe,slt=k5;function OH(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n!=="proxyCache"){var i=e[n],a=typeof i>"u"?"undefined":Kr(i);n==="parent"&&a==="object"?t&&(r[n]=t):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(function(o){return OH(o,r)}):(a==="object"&&i!==null&&(i=OH(i)),r[n]=i)}return r}var IH=(function(){function e(r){r===void 0&&(r={}),this.raws={},this[YT]=!1,this[ilt]=!0;for(var n in r)if(n==="nodes"){this.nodes=[];for(var i=ir(r[n]),a;!(a=i()).done;){var o=a.value;typeof o.clone=="function"?this.append(o.clone()):this.append(o)}}else this[n]=r[n]}var t=e.prototype;return t.addToError=function(n){if(n.postcssNode=this,n.stack&&this.source&&/\n\s{4}at /.test(n.stack)){var i=this.source;n.stack=n.stack.replace(/\n\s{4}at /,"$&"+i.input.from+":"+i.start.line+":"+i.start.column+"$&")}return n},t.after=function(n){return this.parent.insertAfter(this,n),this},t.assign=function(n){n===void 0&&(n={});for(var i in n)this[i]=n[i];return this},t.before=function(n){return this.parent.insertBefore(this,n),this},t.cleanRaws=function(n){delete this.raws.before,delete this.raws.after,n||delete this.raws.between},t.clone=function(n){n===void 0&&(n={});var i=OH(this);for(var a in n)i[a]=n[a];return i},t.cloneAfter=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertAfter(this,i),i},t.cloneBefore=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertBefore(this,i),i},t.error=function(n,i){if(i===void 0&&(i={}),this.source){var a=this.rangeBy(i),o=a.end,s=a.start;return this.source.input.error(n,{column:s.column,line:s.line},{column:o.column,line:o.line},i)}return new alt(n)},t.getProxyProcessor=function(){return{get:function(i,a){return a==="proxyOf"?i:a==="root"?function(){return i.root().toProxy()}:i[a]},set:function(i,a,o){return i[a]===o||(i[a]=o,(a==="prop"||a==="value"||a==="name"||a==="params"||a==="important"||a==="text")&&i.markDirty()),!0}}},t.markDirty=function(){if(this[YT]){this[YT]=!1;for(var n=this;n=n.parent;)n[YT]=!1}},t.next=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n+1]}},t.positionBy=function(n,i){var a=this.source.start;if(n.index)a=this.positionInside(n.index,i);else if(n.word){i=this.toString();var o=i.indexOf(n.word);o!==-1&&(a=this.positionInside(o,i))}return a},t.positionInside=function(n,i){for(var a=i||this.toString(),o=this.source.start.column,s=this.source.start.line,l=0;l<n;l++)a[l]===`
61`?(o=1,s+=1):o+=1;return{column:o,line:s}},t.prev=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n-1]}},t.rangeBy=function(n){var i={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(n.word){var o=this.toString(),s=o.indexOf(n.word);s!==-1&&(i=this.positionInside(s,o),a=this.positionInside(s+n.word.length,o))}else n.start?i={column:n.start.column,line:n.start.line}:n.index&&(i=this.positionInside(n.index)),n.end?a={column:n.end.column,line:n.end.line}:typeof n.endIndex=="number"?a=this.positionInside(n.endIndex):n.index&&(a=this.positionInside(n.index+1));return(a.line<i.line||a.line===i.line&&a.column<=i.column)&&(a={column:i.column+1,line:i.line}),{end:a,start:i}},t.raw=function(n,i){var a=new olt;return a.raw(this,n,i)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];if(this.parent){for(var o=this,s=!1,l=ir(i),c;!(c=l()).done;){var d=c.value;d===this?s=!0:s?(this.parent.insertAfter(o,d),o=d):this.parent.insertBefore(o,d)}s||this.remove()}return this},t.root=function(){for(var n=this;n.parent&&n.parent.type!=="document";)n=n.parent;return n},t.toJSON=function(n,i){var a={},o=i==null;i=i||new Map;var s=0;for(var l in this)if(Object.prototype.hasOwnProperty.call(this,l)&&!(l==="parent"||l==="proxyCache")){var c=this[l];if(Array.isArray(c))a[l]=c.map(function(f){return(typeof f>"u"?"undefined":Kr(f))==="object"&&f.toJSON?f.toJSON(null,i):f});else if((typeof c>"u"?"undefined":Kr(c))==="object"&&c.toJSON)a[l]=c.toJSON(null,i);else if(l==="source"){var d=i.get(c.input);d==null&&(d=s,i.set(c.input,s),s++),a[l]={end:c.end,inputId:d,start:c.start}}else a[l]=c}return o&&(a.inputs=[].concat(i.keys()).map(function(f){return f.toJSON()})),a},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(n){n===void 0&&(n=slt),n.stringify&&(n=n.stringify);var i="";return n(this,function(a){i+=a}),i},t.warn=function(n,i,a){var o={node:this};for(var s in a)o[s]=a[s];return n.warn(i,o)},Ra(e,[{key:"proxyOf",get:function(){return this}}]),e})(),N5=IH;IH.default=IH;var llt=N5,kH=(function(e){La(t,e);function t(r){var n;return r&&typeof r.value<"u"&&typeof r.value!="string"&&(r=Mn({},r,{value:String(r.value)})),n=e.call(this,r)||this,n.type="decl",n}return Ra(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),t})(llt),D5=kH;kH.default=kH;var clt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ult=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=clt[Math.random()*64|0];return t},dlt={nanoid:ult},Zae=go.SourceMapConsumer,Qae=go.SourceMapGenerator,flt=go.existsSync,hlt=go.readFileSync,i9=go.dirname,plt=go.join;function mlt(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var NH=(function(){function e(r,n){if(n.map!==!1){this.loadAnnotation(r),this.inline=this.startWith(this.annotation,"data:");var i=n.map?n.map.prev:void 0,a=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i9(this.mapFile)),a&&(this.text=a)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new Zae(this.text)),this.consumerCache},t.decodeInline=function(n){var i=/^data:application\/json;charset=utf-?8;base64,/,a=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(n)||s.test(n))return decodeURIComponent(n.substr(RegExp.lastMatch.length));if(i.test(n)||a.test(n))return mlt(n.substr(RegExp.lastMatch.length));var l=n.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)},t.getAnnotationURL=function(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(n){return(typeof n>"u"?"undefined":Kr(n))!=="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)},t.loadAnnotation=function(n){var i=n.match(/\/\*\s*# sourceMappingURL=/gm);if(i){var a=n.lastIndexOf(i.pop()),o=n.indexOf("*/",a);a>-1&&o>-1&&(this.annotation=this.getAnnotationURL(n.substring(a,o)))}},t.loadFile=function(n){if(this.root=i9(n),flt(n))return this.mapFile=n,hlt(n,"utf-8").toString().trim()},t.loadMap=function(n,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){var a=i(n);if(a){var o=this.loadFile(a);if(!o)throw new Error("Unable to load previous source map: "+a.toString());return o}}else{if(Gr(i,Zae))return Qae.fromSourceMap(i).toString();if(Gr(i,Qae))return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var s=this.annotation;return n&&(s=plt(i9(n),s)),this.loadFile(s)}}},t.startWith=function(n,i){return n?n.substr(0,i.length)===i:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e})(),NCe=NH;NH.default=NH;var vlt=go.SourceMapConsumer,glt=go.SourceMapGenerator,Jae=go.fileURLToPath,XT=go.pathToFileURL,DH=go.isAbsolute,MH=go.resolve,ylt=dlt.nanoid,a9=go,eoe=fW,_lt=NCe,o9=Symbol("fromOffsetCac
61he"),blt=!!(vlt&&glt),toe=!!(MH&&DH),FO=(function(){function e(r,n){if(n===void 0&&(n={}),r===null||typeof r>"u"||(typeof r>"u"?"undefined":Kr(r))==="object"&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!toe||/^\w+:\/\//.test(n.from)||DH(n.from)?this.file=n.from:this.file=MH(n.from)),toe&&blt){var i=new _lt(this.css,n);if(i.text){this.map=i;var a=i.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+ylt(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(n,i,a,o){o===void 0&&(o={});var s,l,c;if(i&&(typeof i>"u"?"undefined":Kr(i))==="object"){var d=i,f=a;if(typeof d.offset=="number"){var h=this.fromOffset(d.offset);i=h.line,a=h.col}else i=d.line,a=d.column;if(typeof f.offset=="number"){var p=this.fromOffset(f.offset);l=p.line,c=p.col}else l=f.line,c=f.column}else if(!a){var g=this.fromOffset(i);i=g.line,a=g.col}var _=this.origin(i,a,l,c);return _?s=new eoe(n,_.endLine===void 0?_.line:{column:_.column,line:_.line},_.endLine===void 0?_.column:{column:_.endColumn,line:_.endLine},_.source,_.file,o.plugin):s=new eoe(n,l===void 0?i:{column:a,line:i},l===void 0?a:{column:c,line:l},this.css,this.file,o.plugin),s.input={column:a,endColumn:c,endLine:l,line:i,source:this.css},this.file&&(XT&&(s.input.url=XT(this.file).toString()),s.input.file=this.file),s},t.fromOffset=function(n){var i,a;if(this[o9])a=this[o9];else{var o=this.css.split(`
62`);a=new Array(o.length);for(var s=0,l=0,c=o.length;l<c;l++)a[l]=s,s+=o[l].length+1;this[o9]=a}i=a[a.length-1];var d=0;if(n>=i)d=a.length-1;else for(var f=a.length-2,h;d<f;)if(h=d+(f-d>>1),n<a[h])f=h-1;else if(n>=a[h+1])d=h+1;else{d=h;break}return{col:n-a[d]+1,line:d+1}},t.mapResolve=function(n){return/^\w+:\/\//.test(n)?n:MH(this.map.consumer().sourceRoot||this.map.root||".",n)},t.origin=function(n,i,a,o){if(!this.map)return!1;var s=this.map.consumer(),l=s.originalPositionFor({column:i,line:n});if(!l.source)return!1;var c;typeof a=="number"&&(c=s.originalPositionFor({column:o,line:a}));var d;DH(l.source)?d=XT(l.source):d=new URL(l.source,this.map.consumer().sourceRoot||XT(this.map.mapFile));var f={column:l.column,endColumn:c&&c.column,endLine:c&&c.line,line:l.line,url:d.toString()};if(d.protocol==="file:")if(Jae)f.file=Jae(d);else throw new Error("file: protocol is not available in this PostCSS build");var h=s.sourceContentFor(l.source);return h&&(f.source=h),f},t.toJSON=function(){for(var n={},i=0,a=["hasBOM","css","file","id"];i<a.length;i++){var o=a[i];this[o]!=null&&(n[o]=this[o])}return this.map&&(n.map=Mn({},this.map),n.map.consumerCache&&(n.map.consumerCache=void 0)),n},Ra(e,[{key:"from",get:function(){return this.file||this.id}}]),e})(),M5=FO;FO.default=FO;a9&&a9.registerInput&&a9.registerInput(FO);var DCe=go.SourceMapConsumer,XP=go.SourceMapGenerator,ZP=go.dirname,MCe=go.relative,LCe=go.resolve,FCe=go.sep,roe=go.pathToFileURL,Elt=M5,wlt=!!(DCe&&XP),Slt=!!(ZP&&LCe&&MCe&&FCe),Clt=(function(){function e(r,n,i,a){this.stringify=r,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";var i=`
63`;this.css.includes(`\r
64`)&&(i=`\r
65`),this.css+=i+"/*# sourceMappingURL="+n+" */"},t.applyPrevMaps=function(){for(var n=ir(this.previous()),i;!(i=n()).done;){var a=i.value,o=this.toUrl(this.path(a.file)),s=a.root||ZP(a.file),l=void 0;this.mapOpts.sourcesContent===!1?(l=new DCe(a.text),l.sourcesContent&&(l.sourcesContent=null)):l=a.consumer(),this.map.applySourceMap(l,o,this.toUrl(this.path(s)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var n,i=this.root.nodes.length-1;i>=0;i--)n=this.root.nodes[i],n.type==="comment"&&n.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(i);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),Slt&&wlt&&this.isMap())return this.generateMap();var n="";return this.stringify(this.root,function(i){n+=i}),[n]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=XP.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new XP({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var n=this;this.css="",this.map=new XP({file:this.outputFile(),ignoreInvalidMapping:!0});var i=1,a=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},l,c;this.stringify(this.root,function(d,f,h){if(n.css+=d,f&&h!=="end"&&(s.generated.line=i,s.generated.column=a-1,f.source&&f.source.start?(s.source=n.sourcePath(f),s.original.line=f.source.start.line,s.original.column=f.source.start.column-1,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,n.map.addMapping(s))),l=d.match(/\n/g),l?(i+=l.length,c=d.lastIndexOf(`
66`),a=d.length-c):a+=d.length,f&&h!=="start"){var p=f.parent||{raws:{}},g=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!g||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(s.source=n.sourcePath(f),s.original.line=f.source.end.line,s.original.column=f.source.end.column-1,s.generated.line=i,s.generated.column=a-2,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=a-1,n.map.addMapping(s)))}})},t.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(n){return n.annotation}):!0},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var n=this.mapOpts.annotation;return typeof n<"u"&&n!==!0?!1:this.previous().length?this.previous().some(function(i){return i.inline}):!0},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(n){return n.withContent()}):!0},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}
vendor: 50,524 bytes, lines 66-86
66,t.path=function(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;var i=this.memoizedPaths.get(n);if(i)return i;var a=this.opts.to?ZP(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(a=ZP(LCe(a,this.mapOpts.annotation)));var o=MCe(a,n);return this.memoizedPaths.set(n,o),o},t.previous=function(){var n=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(a){if(a.source&&a.source.input.map){var o=a.source.input.map;n.previousMaps.includes(o)||n.previousMaps.push(o)}});else{var i=new Elt(this.originalCSS,this.opts);i.map&&this.previousMaps.push(i.map)}return this.previousMaps},t.setSourcesContent=function(){var n=this,i={};if(this.root)this.root.walk(function(o){if(o.source){var s=o.source.input.from;if(s&&!i[s]){i[s]=!0;var l=n.usesFileUrls?n.toFileUrl(s):n.toUrl(n.path(s));n.map.setSourceContent(l,o.source.input.css)}}});else if(this.css){var a=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(a,this.css)}},t.sourcePath=function(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))},t.toBase64=function(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))},t.toFileUrl=function(n){var i=this.memoizedFileURLs.get(n);if(i)return i;if(roe){var a=roe(n).toString();return this.memoizedFileURLs.set(n,a),a}else throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(n){var i=this.memoizedURLs.get(n);if(i)return i;FCe==="\\"&&(n=n.replace(/\\/g,"/"));var a=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,a),a},e})(),BCe=Clt,xlt=N5,LH=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="comment",n}return t})(xlt),L5=LH;LH.default=LH;var zCe=Cm.isClean,HCe=Cm.my,UCe=D5,VCe=L5,Tlt=N5,qCe,hW,pW,jCe;function $Ce(e){return e.map(function(t){return t.nodes&&(t.nodes=$Ce(t.nodes)),delete t.source,t})}function WCe(e){if(e[zCe]=!1,e.proxyOf.nodes)for(var t=ir(e.proxyOf.nodes),r;!(r=t()).done;){var n=r.value;WCe(n)}}var fh=(function(e){La(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];for(var s=ir(a),l;!(l=s()).done;)for(var c=l.value,d=this.normalize(c,this.last),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.push(p)}return this.markDirty(),this},r.cleanRaws=function(i){if(e.prototype.cleanRaws.call(this,i),this.nodes)for(var a=ir(this.nodes),o;!(o=a()).done;){var s=o.value;s.cleanRaws(i)}},r.each=function(i){if(this.proxyOf.nodes){for(var a=this.getIterator(),o,s;this.indexes[a]<this.proxyOf.nodes.length&&(o=this.indexes[a],s=i(this.proxyOf.nodes[o],o),s!==!1);)this.indexes[a]+=1;return delete this.indexes[a],s}},r.every=function(i){return this.nodes.every(i)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var i=this.lastEach;return this.indexes[i]=0,i},r.getProxyProcessor=function(){return{get:function(a,o){return o==="proxyOf"?a:a[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d;return(d=a)[o].apply(d,[].concat(l.map(function(f){return typeof f=="function"?function(h,p){return f(h.toProxy(),p)}:f})))}:o==="every"||o==="some"?function(s){return a[o](function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];return s.apply(void 0,[].concat([l.toProxy()],d))})}:o==="root"?function(){return a.root().toProxy()}:o==="nodes"?a.nodes.map(function(s){return s.toProxy()}):o==="first"||o==="last"?a[o].toProxy():a[o]:a[o]},set:function(a,o,s){return a[o]===s||(a[o]=s,(o==="name"||o==="params"||o==="selector")&&a.markDirty()),!0}}},r.index=function(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))},r.insertAfter=function(i,a){var o=this.index(i),s=this.normalize(a,this.proxyOf.nodes[o]).reverse();o=this.index(i);for(var l=ir(s),c;!(c=l()).done;){var d=c.value;this.proxyOf.nodes.splice(o+1,0,d)}var f;for(var h in this.indexes)f=this.indexes[h],o<f&&(this.indexes[h]=f+s.length);return this.markDirty(),this},r.insertBefore=function(i,a){var o=this.index(i),s=o===0?"prepend":!1,l=this.normalize(a,this.proxyOf.nodes[o],s).reverse();o=this.index(i);for(var c=ir(l),d;!(d=c()).done;){var f=d.value;this.proxyOf.nodes.splice(o,0,f)}var h;for(var p in this.indexes)h=this.indexes[p],o<=h&&(this.indexes[p]=h+l.length);return this.markDirty(),this},r.normalize=function(i,a){var o=this;if(typeof i=="string")i=$Ce(qCe(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(var s=ir(i),l;!(l=s()).done;){var c=l.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(var d=ir(i),f;!(f=d()).done;){var h=f.value;h.parent&&h.parent.removeChild(h,"ignore")}}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new UCe(i)]}else if(i.selector)i=[new hW(i)];else if(i.name)i=[new pW(i)];else if(i.text)i=[new VCe(i)];else throw new Error("Unknown node type in node creation");var p=i.map(function(g){return g[HCe]||t.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[zCe]&&WCe(g),typeof g.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(g.raws.before=a.raws.before.replace(/\S/g,"")),g.parent=o.proxyOf,g});return p},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a=a.reverse();for(var s=ir(a),l;!(l=s()).done;){for(var c=l.value,d=this.normalize(c,this.first,"prepend").reverse(),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.unshift(p)}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+d.length}return this.markDirty(),this},r.push=function(i){return i.parent=this,this.proxyOf.nodes.push(i),this},r.removeAll=function(){for(var i=ir(this.proxyOf.nodes),a;!(a=i()).done;){var o=a.value;o.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);var a;for(var o in this.indexes)a=this.indexes[o],a>=i&&(this.indexes[o]=a-1);return this.markDirty(),this},r.replaceValues=function(i,a,o){return o||(o=a,a={}),this.walkDecls(function(s){a.props&&!a.props.includes(s.prop)||a.fast&&!s.value.includes(a.fast)||(s.value=s.value.replace(i,o))}),this.markDirty(),this},r.some=function(i){return this.nodes.some(i)},r.walk=function(i){return this.each(function(a,o){var s;try{s=i(a,o)}catch(l){throw a.addToError(l)}return s!==!1&&a.walk&&(s=a.walk(i)),s})},r.walkAtRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="atrule"&&i.test(o.name))return a(o,s)}):this.walk(function(o,s){if(o.type==="atrule"&&o.name===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="atrule")return a(o,s)}))},r.walkComments=function(i){return this.walk(function(a,o){if(a.type==="comment")return i(a,o)})},r.walkDecls=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="decl"&&i.test(o.prop))return a(o,s)}):this.walk(function(o,s){if(o.type==="decl"&&o.prop===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="decl")return a(o,s)}))},r.walkRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="rule"&&i.test(o.selector))return a(o,s)}):this.walk(function(o,s){if(o.type==="rule"&&o.selector===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="rule")return a(o,s)}))},Ra(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t})(Tlt);fh.registerParse=function(e){qCe=e};fh.registerRule=function(e){hW=e};fh.registerAtRule=function(e){pW=e};fh.registerRoot=function(e){jCe=e};var o0=fh;fh.default=fh;fh.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,pW.prototype):e.type==="rule"?Object.setPrototypeOf(e,hW.prototype):e.type==="decl"?Object.setPrototypeOf(e,UCe.prototype):e.type==="comment"?Object.setPrototypeOf(e,VCe.prototype):e.type==="root"&&Object.setPrototypeOf(e,jCe.prototype),e[HCe]=!0,e.nodes&&e.nodes.forEach(function(t){fh.rebuild(t)})};var Alt=o0,GCe,KCe,wC=(function(e){La(t,e);function t(n){var i;return i=e.call(this,Mn({type:"document"},n))||this,i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.toResult=function(i){i===void 0&&(i={});var a=new GCe(new KCe,this,i);return a.stringify()},t})(Alt);wC.registerLazyResult=function(e){GCe=e};wC.registerProcessor=function(e){KCe=e};var mW=wC;wC.default=wC;var FH=(function(){function e(r,n){if(n===void 0&&(n={}),this.type="warning",this.text=r,n.node&&n.node.source){var i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var a in n)this[a]=n[a]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e})(),YCe=FH;FH.default=FH;var Plt=YCe,BH=(function(){function e(r,n,i){this.processor=r,this.messages=[],this.root=n,this.opts=i,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(n,i){i===void 0&&(i={}),i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);var a=new Plt(n,i);return this.messages.push(a),a},t.warnings=function(){return this.messages.filter(function(n){return n.type==="warning"})},Ra(e,[{key:"content",get:function(){return this.css}}]),e})(),vW=BH;BH.default=BH;var s9=39,noe=34,ZT=92,ioe=47,QT=10,Sb=32,JT=12,eA=9,tA=13,Rlt=91,Olt=93,Ilt=40,klt=41,Nlt=123,Dlt=125,Mlt=59,Llt=42,Flt=58,Blt=64,rA=/[\t\n\f\r "#'()/;[\\\]{}]/g,nA=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zlt=/.[\r\n"'(/\\]/,aoe=/[\da-f]/i,Hlt=function(t,r){r===void 0&&(r={});var n=t.css.valueOf(),i=r.ignoreErrors,a,o,s,l,c,d,f,h,p,g,_=n.length,b=0,E=[],S=[];function P(){return b}function O(F){throw t.error("Unclosed "+F,b)}function I(){return S.length===0&&b>=_}function N(F){if(S.length)return S.pop();if(!(b>=_)){var B=F?F.ignoreUnclosed:!1;switch(a=n.charCodeAt(b),a){case QT:case Sb:case eA:case tA:case JT:{o=b;do o+=1,a=n.charCodeAt(o);while(a===Sb||a===QT||a===eA||a===tA||a===JT);g=["space",n.slice(b,o)],b=o-1;break}case Rlt:case Olt:case Nlt:case Dlt:case Flt:case Mlt:case klt:{var V=String.fromCharCode(a);g=[V,V,b];break}case Ilt:{if(h=E.length?E.pop()[1]:"",p=n.charCodeAt(b+1),h==="url"&&p!==s9&&p!==noe&&p!==Sb&&p!==QT&&p!==eA&&p!==JT&&p!==tA){o=b;do{if(d=!1,o=n.indexOf(")",o+1),o===-1)if(i||B){o=b;break}else O("bracket");for(f=o;n.charCodeAt(f-1)===ZT;)f-=1,d=!d}while(d);g=["brackets",n.slice(b,o+1),b,o],b=o}else o=n.indexOf(")",b+1),l=n.slice(b,o+1),o===-1||zlt.test(l)?g=["(","(",b]:(g=["brackets",l,b,o],b=o);break}case s9:case noe:{s=a===s9?"'":'"',o=b;do{if(d=!1,o=n.indexOf(s,o+1),o===-1)if(i||B){o=b+1;break}else O("string");for(f=o;n.charCodeAt(f-1)===ZT;)f-=1,d=!d}while(d);g=["string",n.slice(b,o+1),b,o],b=o;break}case Blt:{rA.lastIndex=b+1,rA.test(n),rA.lastIndex===0?o=n.length-1:o=rA.lastIndex-2,g=["at-word",n.slice(b,o+1),b,o],b=o;break}case ZT:{for(o=b,c=!0;n.charCodeAt(o+1)===ZT;)o+=1,c=!c;if(a=n.charCodeAt(o+1),c&&a!==ioe&&a!==Sb&&a!==QT&&a!==eA&&a!==tA&&a!==JT&&(o+=1,aoe.test(n.charAt(o)))){for(;aoe.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===Sb&&(o+=1)}g=["word",n.slice(b,o+1),b,o],b=o;break}default:{a===ioe&&n.charCodeAt(b+1)===Llt?(o=n.indexOf("*/",b+2)+1,o===0&&(i||B?o=n.length:O("comment")),g=["comment",n.slice(b,o+1),b,o],b=o):(nA.lastIndex=b+1,nA.test(n),nA.lastIndex===0?o=n.length-1:o=nA.lastIndex-2,g=["word",n.slice(b,o+1),b,o],E.push(g),b=o);break}}return b++,g}}function M(F){S.push(F)}return{back:M,endOfFile:I,nextToken:N,position:P}},XCe=o0,BO=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="atrule",i}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.append).call.apply(s,[].concat([this],a))},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.prepend).call.apply(s,[].concat([this],a))},t})(XCe),gW=BO;BO.default=BO;XCe.registerAtRule(BO);var ZCe=o0,QCe,JCe,C1=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="root",i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.normalize=function(i,a,o){var s=e.prototype.normalize.call(this,i);if(a){if(o==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(var l=ir(s),c;!(c=l()).done;){var d=c.value;d.raws.before=a.raws.before}}return s},r.removeChild=function(i,a){var o=this.index(i);return!a&&o===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[o].raws.before),e.prototype.removeChild.call(this,i)},r.toResult=function(i){i===void 0&&(i={});var a=new QCe(new JCe,this,i);return a.stringify()},t})(ZCe);C1.registerLazyResult=function(e){QCe=e};C1.registerProcessor=function(e){JCe=e};var i2=C1;C1.default=C1;ZCe.registerRoot(C1);var SC={comma:function(t){return SC.split(t,[","],!0)},space:function(t){var r=[" ",`
67`,"	"];return SC.split(t,r)},split:function(t,r,n){for(var i=[],a="",o=!1,s=0,l=!1,c="",d=!1,f=ir(t),h;!(h=f()).done;){var p=h.value;d?d=!1:p==="\\"?d=!0:l?p===c&&(l=!1):p==='"'||p==="'"?(l=!0,c=p):p==="("?s+=1:p===")"?s>0&&(s-=1):s===0&&r.includes(p)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=p}return(n||a!=="")&&i.push(a.trim()),i}},exe=SC;SC.default=SC;var txe=o0,Ult=exe,zO=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="rule",n.nodes||(n.nodes=[]),n}return Ra(t,[{key:"selectors",get:function(){return Ult.comma(this.selector)},set:function(n){var i=this.selector?this.selector.match(/,\s*/):null,a=i?i[0]:","+this.raw("between","beforeOpen");this.selector=n.join(a)}}]),t})(txe),yW=zO;zO.default=zO;txe.registerRule(zO);var Vlt=D5,qlt=Hlt,jlt=L5,$lt=gW,Wlt=i2,ooe=yW,soe={empty:!0,space:!0};function Glt(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}var Klt=(function(){function e(r){this.input=r,this.root=new Wlt,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(n){var i=new $lt;i.name=n[1].slice(1),i.name===""&&this.unnamedAtrule(i,n),this.init(i,n[2]);for(var a,o,s,l=!1,c=!1,d=[],f=[];!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),a=n[0],a==="("||a==="["?f.push(a==="("?")":"]"):a==="{"&&f.length>0?f.push("}"):a===f[f.length-1]&&f.pop(),f.length===0)if(a===";"){i.source.end=this.getPosition(n[2]),i.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){c=!0;break}else if(a==="}"){if(d.length>0){for(s=d.length-1,o=d[s];o&&o[0]==="space";)o=d[--s];o&&(i.source.end=this.getPosition(o[3]||o[2]),i.source.end.offset++)}this.end(n);break}else d.push(n);else d.push(n);if(this.tokenizer.endOfFile()){l=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(d),d.length?(i.raws.afterName=this.spacesAndCommentsFromStart(d),this.raw(i,"params",d),l&&(n=d[d.length-1],i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),c&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(n){var i=this.colon(n);if(i!==!1){for(var a=0,o,s=i-1;s>=0&&(o=n[s],!(o[0]!=="space"&&(a+=1,a===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}},t.colon=function(n){for(var i=0,a,o,s,l=ir(n.entries()),c;!(c=l()).done;){var d=c.value,f=d[0],h=d[1];if(a=h,o=a[0],o==="("&&(i+=1),o===")"&&(i-=1),i===0&&o===":")if(!s)this.doubleColon(a);else{if(s[0]==="word"&&s[1]==="progid")continue;return f}s=a}return!1},t.comment=function(n){var i=new jlt;this.init(i,n[2]),i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++;var a=n[1].slice(2,-2);if(/^\s*$/.test(a))i.text="",i.raws.left=a,i.raws.right="";else{var o=a.match(/^(\s*)([^]*\S)(\s*)$/);i.text=o[2],i.raws.left=o[1],i.raws.right=o[3]}},t.createTokenizer=function(){this.tokenizer=qlt(this.input)},t.decl=function(n,i){var a=new Vlt;this.init(a,n[0][2]);var o=n[n.length-1];for(o[0]===";"&&(this.semicolon=!0,n.pop()),a.source.end=this.getPosition(o[3]||o[2]||Glt(n)),a.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),a.raws.before+=n.shift()[1];for(a.source.start=this.getPosition(n[0][2]),a.prop="";n.length;){var s=n[0][0];if(s===":"||s==="space"||s==="comment")break;a.prop+=n.shift()[1]}a.raws.between="";for(var l;n.length;)if(l=n.shift(),l[0]===":"){a.raws.between+=l[1];break}else l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]),a.raws.between+=l[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));for(var c=[],d;n.length&&(d=n[0][0],!(d!=="space"&&d!=="comment"));)c.push(n.shift());this.precheckMissedSemicolon(n);for(var f=n.length-1;f>=0;f--){if(l=n[f],l[1].toLowerCase()==="!important"){a.important=!0;var h=this.stringFrom(n,f);h=this.spacesFromEnd(n)+h,h!==" !important"&&(a.raws.important=h);break}else if(l[1].toLowerCase()==="important"){for(var p=n.slice(0),g="",_=f;_>0;_--){var b=p[_][0];if(g.trim().indexOf("!")===0&&b!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(a.important=!0,a.raws.important=g,n=p)}if(l[0]!=="space"&&l[0]!=="comment")break}var E=n.some(function(S){return S[0]!=="space"&&S[0]!=="comment"});E&&(a.raws.between+=c.map(function(S){return S[1]}).join(""),c=[]),this.raw(a,"value",c.concat(n),i),a.value.includes(":")&&!i&&this.checkMissedSemicolon(n)},t.doubleColon=function(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})},t.emptyRule=function(n){var i=new ooe;this.init(i,n[2]),i.selector="",i.raws.between="",this.current=i},t.end=function(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(n){if(this.spaces+=n[1],this.current.nodes){var i=this.current.nodes[this.current.nodes.length-1];i&&i.type==="rule"&&!i.raws.ownSemicolon&&(i.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(n){var i=this.input.fromOffset(n);return{column:i.col,line:i.line,offset:n}},t.init=function(n,i){this.current.push(n),n.source={input:this.input,start:this.getPosition(i)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)},t.other=function(n){for(var i=!1,a=null,o=!1,s=null,l=[],c=n[1].startsWith("--"),d=[],f=n;f;){if(a=f[0],d.push(f),a==="("||a==="[")s||(s=f),l.push(a==="("?")":"]");else if(c&&o&&a==="{")s||(s=f),l.push("}");else if(l.length===0)if(a===";")if(o){this.decl(d,c);return}else break;else if(a==="{"){this.rule(d);return}else if(a==="}"){this.tokenizer.back(d.pop()),i=!0;break}else a===":"&&(o=!0);else a===l[l.length-1]&&(l.pop(),l.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),l.length>0&&this.unclosedBracket(s),i&&o){if(!c)for(;d.length&&(f=d[d.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(d.pop());this.decl(d,c)}else this.unknownWord(d)},t.parse=function(){for(var n;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(n,i,a,o){for(var s,l,c=a.length,d="",f=!0,h,p,g=0;g<c;g+=1)s=a[g],l=s[0],l==="space"&&g===c-1&&!o?f=!1:l==="comment"?(p=a[g-1]?a[g-1][0]:"empty",h=a[g+1]?a[g+1][0]:"empty",!soe[p]&&!soe[h]?d.slice(-1)===","?f=!1:d+=s[1]:f=!1):d+=s[1];if(!f){var _=a.reduce(function(b,E){return b+E[1]},"");n.raws[i]={raw:_,value:d}}n[i]=d},t.rule=function(n){n.pop();var i=new ooe;this.init(i,n[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(i,"selector",n),this.current=i},t.spacesAndCommentsFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],!(i!=="space"&&i!=="comment"));)a=n.pop()[1]+a;return a},t.spacesAndCommentsFromStart=function(n){for(var i,a="";n.length&&(i=n[0][0],!(i!=="space"&&i!=="comment"));)a+=n.shift()[1];return a},t.spacesFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],i==="space");)a=n.pop()[1]+a;return a},t.stringFrom=function(n,i){for(var a="",o=i;o<n.length;o++)a+=n[o][1];return n.splice(i,n.length-i),a},t.unclosedBlock=function(){var n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)},t.unclosedBracket=function(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})},t.unexpectedClose=function(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})},t.unknownWord=function(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})},t.unnamedAtrule=function(n,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})},e})(),Ylt=Klt,Xlt=o0,Zlt=Ylt,Qlt=M5;function HO(e,t){var r=new Qlt(e,t),n=new Zlt(r);try{n.parse()}catch(i){throw i}return n.root}var _W=HO;HO.default=HO;Xlt.registerParse(HO);var od=Cm.isClean,Jlt=Cm.my,ect=BCe,tct=k5,rct=o0,nct=mW,loe=vW,ict=_W,act=i2,oct={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sct={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},lct={Once:!0,postcssPlugin:!0,prepare:!0},x1=0;function Cb(e){return(typeof e>"u"?"undefined":Kr(e))==="object"&&typeof e.then=="function"}function rxe(e){var t=!1,r=oct[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,x1,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,x1,r+"Exit"]:[r,r+"Exit"]}function coe(e){var t;return e.type==="document"?t=["Document",x1,"DocumentExit"]:e.type==="root"?t=["Root",x1,"RootExit"]:t=rxe(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function zH(e){return e[od]=!1,e.nodes&&e.nodes.forEach(function(t){return zH(t)}),e}var HH={},T1=(function(){function e(r,n,i){var a=this;this.stringified=!1,this.processed=!1;var o;if((typeof n>"u"?"undefined":Kr(n))==="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=zH(n);else if(Gr(n,e)||Gr(n,loe))o=zH(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{var s=ict;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{o=s(n,i)}catch(l){this.processed=!0,this.error=l}o&&!o[Jlt]&&rct.rebuild(o)}this.result=new loe(r,o,i),this.helpers=Mn({},HH,{postcss:HH,result:this.result}),this.plugins=this.processor.plugins.map(function(l){return(typeof l>"u"?"undefined":Kr(l))==="object"&&l.prepare?Mn({},l,l.prepare(a.result)):l})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(n,i){var a=this.result.lastPlugin;try{if(i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin)n.plugin=a.postcssPlugin,n.setMessage();else if(a.postcssVersion)var o,s,l,c,d}catch(f){console&&console.error&&console.error(f)}return n},t.prepareVisitors=function(){var n=this;this.listeners={};for(var i=function(d,f,h){n.listeners[f]||(n.listeners[f]=[]),n.listeners[f].push([d,h])},a=ir(this.plugins),o;!(o=a()).done;){var s=o.value;if((typeof s>"u"?"undefined":Kr(s))==="object")for(var l in s){if(!sct[l]&&/^[A-Z]/.test(l))throw new Error("Unknown event "+l+" in "+s.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!lct[l])if(Kr(s[l])==="object")for(var c in s[l])c==="*"?i(s,l,s[l][c]):i(s,l+"-"+c.toLowerCase(),s[l][c]);else typeof s[l]=="function"&&i(s,l,s[l])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var n=this;return I5(function(){var i,a,o,s,l,c,d,f,h,p,g,_;return Sg(this,function(b){switch(b.label){case 0:n.plugin=0,i=0,b.label=1;case 1:if(!(i<n.plugins.length))return[3,6];if(a=n.plugins[i],o=n.runOnRoot(a),!Cb(o))return[3,5];b.label=2;case 2:return b.trys.push([2,4,,5]),[4,o];case 3:return b.sent(),[3,5];case 4:throw s=b.sent(),n.handleError(s);case 5:return i++,[3,1];case 6:if(n.prepareVisitors(),!n.hasListener)return[3,18];l=n.result.root,b.label=7;case 7:if(l[od])return[3,14];l[od]=!0,c=[coe(l)],b.label=8;case 8:if(!(c.length>0))return[3,13];if(d=n.visitTick(c),!Cb(d))return[3,12];b.label=9;case 9:return b.trys.push([9,11,,12]),[4,d];case 10:return b.sent(),[3,12];case 11:throw f=b.sent(),h=c[c.length-1].node,n.handleError(f,h);case 12:return[3,8];case 13:return[3,7];case 14:if(!n.listeners.OnceExit)return[3,18];p=function(){var E,S,P,O,I;return Sg(this,function(N){switch(N.label){case 0:E=_.value,S=E[0],P=E[1],n.result.lastPlugin=S,N.label=1;case 1:return N.trys.push([1,6,,7]),l.type!=="document"?[3,3]:(O=l.nodes.map(function(M){return P(M,n.helpers)}),[4,Promise.all(O)]);case 2:return N.sent(),[3,5];case 3:return[4,P(l,n.helpers)];case 4:N.sent(),N.label=5;case 5:return[3,7];case 6:throw I=N.sent(),n.handleError(I);case 7:return[2]}})},g=ir(n.listeners.OnceExit),b.label=15;case 15:return(_=g()).done?[3,18]:[5,lW(p())];case 16:b.sent(),b.label=17;case 17:return[3,15];case 18:return n.processed=!0,[2,n.stringify()]}})})()},t.runOnRoot=function(n){var i=this;this.result.lastPlugin=n;try{if((typeof n>"u"?"undefined":Kr(n))==="object"&&n.Once){if(this.result.root.type==="document"){var a=this.result.root.nodes.map(function(o){return n.Once(o,i.helpers)});return Cb(a[0])?Promise.all(a):a}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(o){throw this.handleError(o)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var n=this.result.opts,i=tct;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);var a=new ect(i,this.result.root,this.result.opts),o=a.generate();return this.result.css=o[0],this.result.map=o[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var n=ir(this.plugins),i;!(i=n()).done;){var a=i.value,o=this.runOnRoot(a);if(Cb(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[od];)s[od]=!0,this.walkSync(s);if(this.listeners.OnceExit)if(s.type==="document")for(var l=ir(s.nodes),c;!(c=l()).done;){var d=c.value;this.visitSync(this.listeners.OnceExit,d)}else this.visitSync(this.listeners.OnceExit,s)}return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this.css},t.visitSync=function(n,i){for(var a=ir(n),o;!(o=a()).done;){var s=o.value,l=s[0],c=s[1];this.result.lastPlugin=l;var d=void 0;try{d=c(i,this.helpers)}catch(f){throw this.handleError(f,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(Cb(d))throw this.getAsyncError()}},t.visitTick=function(n){var i=n[n.length-1],a=i.node,o=i.visitors;if(a.type!=="root"&&a.type!=="document"&&!a.parent){n.pop();return}if(o.length>0&&i.visitorIndex<o.length){var s=o[i.visitorIndex],l=s[0],c=s[1];i.visitorIndex+=1,i.visitorIndex===o.length&&(i.visitors=[],i.visitorIndex=0),this.result.lastPlugin=l;try{return c(a.toProxy(),this.helpers)}catch(g){throw this.handleError(g,a)}}if(i.iterator!==0){for(var d=i.iterator,f;f=a.nodes[a.indexes[d]];)if(a.indexes[d]+=1,!f[od]){f[od]=!0,n.push(coe(f));return}i.iterator=0,delete a.indexes[d]}for(var h=i.events;i.eventIndex<h.length;){var p=h[i.eventIndex];if(i.eventIndex+=1,p===x1){a.nodes&&a.nodes.length&&(a[od]=!0,i.iterator=a.getIterator());return}else if(this.listeners[p]){i.visitors=this.listeners[p];return}}n.pop()},t.walkSync=function(n){var i=this;n[od]=!0;for(var a=rxe(n),o=ir(a),s;!(s=o()).done;){var l=s.value;if(l===x1)n.nodes&&n.each(function(d){d[od]||i.walkSync(d)});else{var c=this.listeners[l];if(c&&this.visitSync(c,n.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},Ra(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e})();T1.registerPostcss=function(e){HH=e};var nxe=T1;T1.default=T1;act.registerLazyResult(T1);nct.registerLazyResult(T1);var cct=BCe,uct=k5,dct=_W,fct=vW,UH=(function(){function e(r,n,i){n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=i,this._map=void 0;var a,o=uct;this.result=new fct(this._processor,a,this._opts),this.result.css=n;var s=this;Object.defineProperty(this.result,"root",{get:function(){return s.root}});var l=new cct(o,a,this._opts,n);if(l.isMap()){var c=l.generate(),d=c[0],f=c[1];d&&(this.result.css=d),f&&(this.result.map=f)}else l.clearAnnotation(),this.result.css=l.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this._css},t.warnings=function(){return[]},Ra(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var n,i=dct;try{n=i(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=n,n}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e})(),hct=UH;UH.default=UH;var pct=hct,mct=nxe,vct=mW,gct=i2,CC=(function(){function e(r){r===void 0&&(r=[]),this.version="8.4.38",this.plugins=this.normalize(r)}var t=e.prototype;return t.normalize=function(n){for(var i=[],a=ir(n),o;!(o=a()).done;){var s=o.value;if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),(typeof s>"u"?"undefined":Kr(s))==="object"&&Array.isArray(s.plugins))i=i.concat(s.plugins);else if((typeof s>"u"?"undefined":Kr(s))==="object"&&s.postcssPlugin)i.push(s);else if(typeof s=="function")i.push(s);else if(!((typeof s>"u"?"undefined":Kr(s))==="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin")}return i},t.process=function(n,i){return i===void 0&&(i={}),!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new pct(this,n,i):new mct(this,n,i)},t.use=function(n){return this.plugins=this.plugins.concat(this.normalize([n])),this},e})(),yct=CC;CC.default=CC;gct.registerProcessor(CC);vct.registerProcessor(CC);var _ct=D5,bct=NCe,Ect=L5,wct=gW,Sct=M5,Cct=i2,xct=yW;function xC(e,t){if(Array.isArray(e))return e.map(function(f){return xC(f)});var r=e.inputs,n=wg(e,["inputs"]);if(r){t=[];for(var i=ir(r),a;!(a=i()).done;){var o=a.value,s=Mn({},o,{__proto__:Sct.prototype});s.map&&(s.map=Mn({},s.map,{__proto__:bct.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(f){return xC(f,t)})),n.source){var l=n.source,c=l.inputId,d=wg(l,["inputId"]);n.source=d,c!=null&&(n.source.input=t[c])}if(n.type==="root")return new Cct(n);if(n.type==="decl")return new _ct(n);if(n.type==="rule")return new xct(n);if(n.type==="comment")return new Ect(n);if(n.type==="atrule")return new wct(n);throw new Error("Unknown node type: "+e.type)}var Tct=xC;xC.default=xC;var Act=fW,ixe=D5,Pct=nxe,Rct=o0,bW=yct,Oct=k5,Ict=Tct,axe=mW,kct=YCe,oxe=L5,sxe=gW,Nct=vW,Dct=M5,Mct=_W,Lct=exe,lxe=yW,cxe=i2,Fct=N5;function Ki(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new bW(t)}Ki.plugin=function(t,r){var n=!1;function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
68https://evilmartians.com/chronicles/postcss-8-plugin-migration`),S1.LANG&&S1.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
69https://www.w3ctech.com/topic/2226`));var c=r.apply(void 0,[].concat(s));return c.postcssPlugin=t,c.postcssVersion=new bW().version,c}var a;return Object.defineProperty(i,"postcss",{get:function(){return a||(a=i()),a}}),i.process=function(o,s,l){return Ki([i(l)]).process(o,s)},i};Ki.stringify=Oct;Ki.parse=Mct;Ki.fromJSON=Ict;Ki.list=Lct;Ki.comment=function(e){return new oxe(e)};Ki.atRule=function(e){return new sxe(e)};Ki.decl=function(e){return new ixe(e)};Ki.rule=function(e){return new lxe(e)};Ki.root=function(e){return new cxe(e)};Ki.document=function(e){return new axe(e)};Ki.CssSyntaxError=Act;Ki.Declaration=ixe;Ki.Container=Rct;Ki.Processor=bW;Ki.Document=axe;Ki.Comment=oxe;Ki.Warning=kct;Ki.AtRule=sxe;Ki.Result=Nct;Ki.Input=Dct;Ki.Rule=lxe;Ki.Root=cxe;Ki.Node=Fct;Pct.registerPostcss(Ki);var Bct=Ki;Ki.default=Ki;var Fa=Zst(Bct);Fa.stringify;Fa.fromJSON;Fa.plugin;Fa.parse;Fa.list;Fa.document;Fa.comment;Fa.atRule;Fa.rule;Fa.decl;Fa.root;Fa.CssSyntaxError;Fa.Declaration;Fa.Container;Fa.Processor;Fa.Document;Fa.Comment;Fa.Warning;Fa.AtRule;Fa.Result;Fa.Input;Fa.Rule;Fa.Root;Fa.Node;var zct=Object.defineProperty,Hct=function(e,t,r){return t in e?zct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Tc=function(e,t,r){return Hct(e,(typeof t>"u"?"undefined":Kr(t))!=="symbol"?t+"":t,r)};function Uct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vct(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return Gr(this,n)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var EW={exports:{}},wa=String,uxe=function(){return{isColorSupported:!1,reset:wa,bold:wa,dim:wa,italic:wa,underline:wa,inverse:wa,hidden:wa,strikethrough:wa,black:wa,red:wa,green:wa,yellow:wa,blue:wa,magenta:wa,cyan:wa,white:wa,gray:wa,bgBlack:wa,bgRed:wa,bgGreen:wa,bgYellow:wa,bgBlue:wa,bgMagenta:wa,bgCyan:wa,bgWhite:wa}};EW.exports=uxe();EW.exports.createColors=uxe;var qct=EW.exports,jct={},$ct=Object.freeze(Object.defineProperty({__proto__:null,default:jct},Symbol.toStringTag,{value:"Module"})),yo=Vct($ct),uoe=qct,doe=yo,VH=(function(e){La(t,e);function t(n,i,a,o,s,l){var c;return c=e.call(this,n)||this,c.name="CssSyntaxError",c.reason=n,s&&(c.file=s),o&&(c.source=o),l&&(c.plugin=l),typeof i<"u"&&typeof a<"u"&&(typeof i=="number"?(c.line=i,c.column=a):(c.line=i.line,c.column=i.column,c.endLine=a.line,c.endColumn=a.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var a=this;if(!this.source)return"";var o=this.source;i==null&&(i=uoe.isColorSupported),doe&&i&&(o=doe(o));var s=o.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),d=String(c).length,f,h;if(i){var p=uoe.createColors(!0),g=p.bold,_=p.gray,b=p.red;f=function(E){return g(b(E))},h=function(E){return _(E)}}else f=h=function(E){return E};return s.slice(l,c).map(function(E,S){var P=l+1+S,O=" "+(" "+P).slice(-d)+" | ";if(P===a.line){var I=h(O.replace(/\d/g," "))+E.slice(0,a.column-1).replace(/[^\t]/g," ");return f(">")+h(O)+E+`
70 `+I+f("^")}return" "+h(O)+E}).join(`
71`)},r.toString=function(){var i=this.showSourceCode();return i&&(i=`
72
73`+i+`
74`),this.name+": "+this.message+i},t})(bC(Error)),wW=VH;VH.default=VH;var xm={};xm.isClean=Symbol("isClean");xm.my=Symbol("my");var foe={after:`
75`,beforeClose:`
76`,beforeComment:`
77`,beforeDecl:`
78`,beforeOpen:" ",beforeRule:`
79`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function Wct(e){return e[0].toUpperCase()+e.slice(1)}var qH=(function(){function e(r){this.builder=r}var t=e.prototype;return t.atrule=function(n,i){var a="@"+n.name,o=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?a+=n.raws.afterName:o&&(a+=" "),n.nodes)this.block(n,a+o);else{var s=(n.raws.between||"")+(i?";":"");this.builder(a+o+s,n)}},t.beforeAfter=function(n,i){var a;n.type==="decl"?a=this.raw(n,null,"beforeDecl"):n.type==="comment"?a=this.raw(n,null,"beforeComment"):i==="before"?a=this.raw(n,null,"beforeRule"):a=this.raw(n,null,"beforeClose");for(var o=n.parent,s=0;o&&o.type!=="root";)s+=1,o=o.parent;if(a.includes(`
80`)){var l=this.raw(n,null,"indent");if(l.length)for(var c=0;c<s;c++)a+=l}return a},t.block=function(n,i){var a=this.raw(n,"between","beforeOpen");this.builder(i+a+"{",n,"start");var o;n.nodes&&n.nodes.length?(this.body(n),o=this.raw(n,"after")):o=this.raw(n,"after","emptyBody"),o&&this.builder(o),this.builder("}",n,"end")},t.body=function(n){for(var i=n.nodes.length-1;i>0&&n.nodes[i].type==="comment";)i-=1;for(var a=this.raw(n,"semicolon"),o=0;o<n.nodes.length;o++){var s=n.nodes[o],l=this.raw(s,"before");l&&this.builder(l),this.stringify(s,i!==o||a)}},t.comment=function(n){var i=this.raw(n,"left","commentLeft"),a=this.raw(n,"right","commentRight");this.builder("/*"+i+n.text+a+"*/",n)},t.decl=function(n,i){var a=this.raw(n,"between","colon"),o=n.prop+a+this.rawValue(n,"value");n.important&&(o+=n.raws.important||" !important"),i&&(o+=";"),this.builder(o,n)},t.document=function(n){this.body(n)},t.raw=function(n,i,a){var o;if(a||(a=i),i&&(o=n.raws[i],typeof o<"u"))return o;var s=n.parent;if(a==="before"&&(!s||s.type==="root"&&s.first===n||s&&s.type==="document"))return"";if(!s)return foe[a];var l=n.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[a]<"u")return l.rawCache[a];if(a==="before"||a==="after")return this.beforeAfter(n,a);var c="raw"+Wct(a);return this[c]?o=this[c](l,n):l.walk(function(d){if(o=d.raws[i],typeof o<"u")return!1}),typeof o>"u"&&(o=foe[a]),l.rawCache[a]=o,o},t.rawBeforeClose=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length>0&&typeof a.raws.after<"u")return i=a.raws.after,i.includes(`
81`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawBeforeComment=function(n,i){var a;return n.walkComments(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
82`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeDecl=function(n,i){var a;return n.walkDecls(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
83`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeOpen=function(n){var i;return n.walk(function(a){if(a.type!=="decl"&&(i=a.raws.between,typeof i<"u"))return!1}),i},t.rawBeforeRule=function(n){var i;return n.walk(function(a){if(a.nodes&&(a.parent!==n||n.first!==a)&&typeof a.raws.before<"u")return i=a.raws.before,i.includes(`
84`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawColon=function(n){var i;return n.walkDecls(function(a){if(typeof a.raws.between<"u")return i=a.raws.between.replace(/[^\s:]/g,""),!1}),i},t.rawEmptyBody=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length===0&&(i=a.raws.after,typeof i<"u"))return!1}),i},t.rawIndent=function(n){if(n.raws.indent)return n.raws.indent;var i;return n.walk(function(a){var o=a.parent;if(o&&o!==n&&o.parent&&o.parent===n&&typeof a.raws.before<"u"){var s=a.raws.before.split(`
85`);return i=s[s.length-1],i=i.replace(/\S/g,""),!1}}),i},t.rawSemicolon=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(i=a.raws.semicolon,typeof i<"u"))return!1}),i},t.rawValue=function(n,i){var a=n[i],o=n.raws[i];return o&&o.value===a?o.raw:a},t.root=function(n){this.body(n),n.raws.after&&this.builder(n.raws.after)},t.rule=function(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end")},t.stringify=function(n,i){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,i)},e})(),dxe=qH;qH.default=qH;var Gct=dxe;function jH(e,t){var r=new Gct(t);r.stringify(e)}var F5=jH;jH.default=jH;var iA=xm.isClean,Kct=xm.my,Yct=wW,Xct=dxe,Zct=F5;function $H(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n!=="proxyCache"){var i=e[n],a=typeof i>"u"?"undefined":Kr(i);n==="parent"&&a==="object"?t&&(r[n]=t):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(function(o){return $H(o,r)}):(a==="object"&&i!==null&&(i=$H(i)),r[n]=i)}return r}var WH=(function(){function e(r){r===void 0&&(r={}),this.raws={},this[iA]=!1,this[Kct]=!0;for(var n in r)if(n==="nodes"){this.nodes=[];for(var i=ir(r[n]),a;!(a=i()).done;){var o=a.value;typeof o.clone=="function"?this.append(o.clone()):this.append(o)}}else this[n]=r[n]}var t=e.prototype;return t.addToError=function(n){if(n.postcssNode=this,n.stack&&this.source&&/\n\s{4}at /.test(n.stack)){var i=this.source;n.stack=n.stack.replace(/\n\s{4}at /,"$&"+i.input.from+":"+i.start.line+":"+i.start.column+"$&")}return n},t.after=function(n){return this.parent.insertAfter(this,n),this},t.assign=function(n){n===void 0&&(n={});for(var i in n)this[i]=n[i];return this},t.before=function(n){return this.parent.insertBefore(this,n),this},t.cleanRaws=function(n){delete this.raws.before,delete this.raws.after,n||delete this.raws.between},t.clone=function(n){n===void 0&&(n={});var i=$H(this);for(var a in n)i[a]=n[a];return i},t.cloneAfter=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertAfter(this,i),i},t.cloneBefore=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertBefore(this,i),i},t.error=function(n,i){if(i===void 0&&(i={}),this.source){var a=this.rangeBy(i),o=a.end,s=a.start;return this.source.input.error(n,{column:s.column,line:s.line},{column:o.column,line:o.line},i)}return new Yct(n)},t.getProxyProcessor=function(){return{get:function(i,a){return a==="proxyOf"?i:a==="root"?function(){return i.root().toProxy()}:i[a]},set:function(i,a,o){return i[a]===o||(i[a]=o,(a==="prop"||a==="value"||a==="name"||a==="params"||a==="important"||a==="text")&&i.markDirty()),!0}}},t.markDirty=function(){if(this[iA]){this[iA]=!1;for(var n=this;n=n.parent;)n[iA]=!1}},t.next=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n+1]}},t.positionBy=function(n,i){var a=this.source.start;if(n.index)a=this.positionInside(n.index,i);else if(n.word){i=this.toString();var o=i.indexOf(n.word);o!==-1&&(a=this.positionInside(o,i))}return a},t.positionInside=function(n,i){for(var a=i||this.toString(),o=this.source.start.column,s=this.source.start.line,l=0;l<n;l++)a[l]===`
86`?(o=1,s+=1):o+=1;return{column:o,line:s}},t.prev=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n-1]}},t.rangeBy=function(n){var i={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(n.word){var o=this.toString(),s=o.indexOf(n.word);s!==-1&&(i=this.positionInside(s,o),a=this.positionInside(s+n.word.length,o))}else n.start?i={column:n.start.column,line:n.start.line}:n.index&&(i=this.positionInside(n.index)),n.end?a={column:n.end.column,line:n.end.line}:typeof n.endIndex=="number"?a=this.positionInside(n.endIndex):n.index&&(a=this.positionInside(n.index+1));return(a.line<i.line||a.line===i.line&&a.column<=i.column)&&(a={column:i.column+1,line:i.line}),{end:a,start:i}},t.raw=function(n,i){var a=new Xct;return a.raw(this,n,i)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];if(this.parent){for(var o=this,s=!1,l=ir(i),c;!(c=l()).done;){var d=c.value;d===this?s=!0:s?(this.parent.insertAfter(o,d),o=d):this.parent.insertBefore(o,d)}s||this.remove()}return this},t.root=function(){for(var n=this;n.parent&&n.parent.type!=="document";)n=n.parent;return n},t.toJSON=function(n,i){var a={},o=i==null;i=i||new Map;var s=0;for(var l in this)if(Object.prototype.hasOwnProperty.call(this,l)&&!(l==="parent"||l==="proxyCache")){var c=this[l];if(Array.isArray(c))a[l]=c.map(function(f){return(typeof f>"u"?"undefined":Kr(f))==="object"&&f.toJSON?f.toJSON(null,i):f});else if((typeof c>"u"?"undefined":Kr(c))==="object"&&c.toJSON)a[l]=c.toJSON(null,i);else if(l==="source"){var d=i.get(c.input);d==null&&(d=s,i.set(c.input,s),s++),a[l]={end:c.end,inputId:d,start:c.start}}else a[l]=c}return o&&(a.inputs=[].concat(i.keys()).map(function(f){return f.toJSON()})),a},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(n){n===void 0&&(n=Zct),n.stringify&&(n=n.stringify);var i="";return n(this,function(a){i+=a}),i},t.warn=function(n,i,a){var o={node:this};for(var s in a)o[s]=a[s];return n.warn(i,o)},Ra(e,[{key:"proxyOf",get:function(){return this}}]),e})(),B5=WH;WH.default=WH;var Qct=B5,GH=(function(e){La(t,e);function t(r){var n;return r&&typeof r.value<"u"&&typeof r.value!="string"&&(r=Mn({},r,{value:String(r.value)})),n=e.call(this,r)||this,n.type="decl",n}return Ra(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),t})(Qct),z5=GH;GH.default=GH;var Jct="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",eut=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Jct[Math.random()*64|0];return t},tut={nanoid:eut},hoe=yo.SourceMapConsumer,poe=yo.SourceMapGenerator,rut=yo.existsSync,nut=yo.readFileSync,l9=yo.dirname,iut=yo.join;function aut(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var KH=(function(){function e(r,n){if(n.map!==!1){this.loadAnnotation(r),this.inline=this.startWith(this.annotation,"data:");var i=n.map?n.map.prev:void 0,a=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=l9(this.mapFile)),a&&(this.text=a)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new hoe(this.text)),this.consumerCache},t.decodeInline=function(n){var i=/^data:application\/json;charset=utf-?8;base64,/,a=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(n)||s.test(n))return decodeURIComponent(n.substr(RegExp.lastMatch.length));if(i.test(n)||a.test(n))return aut(n.substr(RegExp.lastMatch.length));var l=n.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)},t.getAnnotationURL=function(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(n){return(typeof n>"u"?"undefined":Kr(n))!=="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)},t.loadAnnotation=function(n){var i=n.match(/\/\*\s*# sourceMappingURL=/gm);if(i){var a=n.lastIndexOf(i.pop()),o=n.indexOf("*/",a);a>-1&&o>-1&&(this.annotation=this.getAnnotationURL(n.substring(a,o)))}},t.loadFile=function(n){if(this.root=l9(n),rut(n))return this.mapFile=n,nut(n,"utf-8").toString().trim()},t.loadMap=function(n,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){var a=i(n);if(a){var o=this.loadFile(a);if(!o)throw new Error("Unable to load previous source map: "+a.toString());return o}}else{if(Gr(i,hoe))return poe.fromSourceMap(i).toString();if(Gr(i,poe))return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var s=this.annotation;return n&&(s=iut(l9(n),s)),this.loadFile(s)}}},t.startWith=function(n,i){return n?n.substr(0,i.length)===i:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e})(),fxe=KH;KH.default=KH;var out=yo.SourceMapConsumer,sut=yo.SourceMapGenerator,moe=yo.fileURLToPath,aA=yo.pathToFileURL,YH=yo.isAbsolute,XH=yo.resolve,lut=tut.nanoid,c9=yo,voe=wW,cut=fxe,u9=Symbol("fromOffsetCac
86he"),uut=!!(out&&sut),goe=!!(XH&&YH),UO=(function(){function e(r,n){if(n===void 0&&(n={}),r===null||typeof r>"u"||(typeof r>"u"?"undefined":Kr(r))==="object"&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!goe||/^\w+:\/\//.test(n.from)||YH(n.from)?this.file=n.from:this.file=XH(n.from)),goe&&uut){var i=new cut(this.css,n);if(i.text){this.map=i;var a=i.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+lut(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(n,i,a,o){o===void 0&&(o={});var s,l,c;if(i&&(typeof i>"u"?"undefined":Kr(i))==="object"){var d=i,f=a;if(typeof d.offset=="number"){var h=this.fromOffset(d.offset);i=h.line,a=h.col}else i=d.line,a=d.column;if(typeof f.offset=="number"){var p=this.fromOffset(f.offset);l=p.line,c=p.col}else l=f.line,c=f.column}else if(!a){var g=this.fromOffset(i);i=g.line,a=g.col}var _=this.origin(i,a,l,c);return _?s=new voe(n,_.endLine===void 0?_.line:{column:_.column,line:_.line},_.endLine===void 0?_.column:{column:_.endColumn,line:_.endLine},_.source,_.file,o.plugin):s=new voe(n,l===void 0?i:{column:a,line:i},l===void 0?a:{column:c,line:l},this.css,this.file,o.plugin),s.input={column:a,endColumn:c,endLine:l,line:i,source:this.css},this.file&&(aA&&(s.input.url=aA(this.file).toString()),s.input.file=this.file),s},t.fromOffset=function(n){var i,a;if(this[u9])a=this[u9];else{var o=this.css.split(`
87`);a=new Array(o.length);for(var s=0,l=0,c=o.length;l<c;l++)a[l]=s,s+=o[l].length+1;this[u9]=a}i=a[a.length-1];var d=0;if(n>=i)d=a.length-1;else for(var f=a.length-2,h;d<f;)if(h=d+(f-d>>1),n<a[h])f=h-1;else if(n>=a[h+1])d=h+1;else{d=h;break}return{col:n-a[d]+1,line:d+1}},t.mapResolve=function(n){return/^\w+:\/\//.test(n)?n:XH(this.map.consumer().sourceRoot||this.map.root||".",n)},t.origin=function(n,i,a,o){if(!this.map)return!1;var s=this.map.consumer(),l=s.originalPositionFor({column:i,line:n});if(!l.source)return!1;var c;typeof a=="number"&&(c=s.originalPositionFor({column:o,line:a}));var d;YH(l.source)?d=aA(l.source):d=new URL(l.source,this.map.consumer().sourceRoot||aA(this.map.mapFile));var f={column:l.column,endColumn:c&&c.column,endLine:c&&c.line,line:l.line,url:d.toString()};if(d.protocol==="file:")if(moe)f.file=moe(d);else throw new Error("file: protocol is not available in this PostCSS build");var h=s.sourceContentFor(l.source);return h&&(f.source=h),f},t.toJSON=function(){for(var n={},i=0,a=["hasBOM","css","file","id"];i<a.length;i++){var o=a[i];this[o]!=null&&(n[o]=this[o])}return this.map&&(n.map=Mn({},this.map),n.map.consumerCache&&(n.map.consumerCache=void 0)),n},Ra(e,[{key:"from",get:function(){return this.file||this.id}}]),e})(),H5=UO;UO.default=UO;c9&&c9.registerInput&&c9.registerInput(UO);var hxe=yo.SourceMapConsumer,QP=yo.SourceMapGenerator,JP=yo.dirname,pxe=yo.relative,mxe=yo.resolve,vxe=yo.sep,yoe=yo.pathToFileURL,dut=H5,fut=!!(hxe&&QP),hut=!!(JP&&mxe&&pxe&&vxe),put=(function(){function e(r,n,i,a){this.stringify=r,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";var i=`
88`;this.css.includes(`\r
89`)&&(i=`\r
90`),this.css+=i+"/*# sourceMappingURL="+n+" */"},t.applyPrevMaps=function(){for(var n=ir(this.previous()),i;!(i=n()).done;){var a=i.value,o=this.toUrl(this.path(a.file)),s=a.root||JP(a.file),l=void 0;this.mapOpts.sourcesContent===!1?(l=new hxe(a.text),l.sourcesContent&&(l.sourcesContent=null)):l=a.consumer(),this.map.applySourceMap(l,o,this.toUrl(this.path(s)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var n,i=this.root.nodes.length-1;i>=0;i--)n=this.root.nodes[i],n.type==="comment"&&n.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(i);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),hut&&fut&&this.isMap())return this.generateMap();var n="";return this.stringify(this.root,function(i){n+=i}),[n]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=QP.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new QP({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var n=this;this.css="",this.map=new QP({file:this.outputFile(),ignoreInvalidMapping:!0});var i=1,a=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},l,c;this.stringify(this.root,function(d,f,h){if(n.css+=d,f&&h!=="end"&&(s.generated.line=i,s.generated.column=a-1,f.source&&f.source.start?(s.source=n.sourcePath(f),s.original.line=f.source.start.line,s.original.column=f.source.start.column-1,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,n.map.addMapping(s))),l=d.match(/\n/g),l?(i+=l.length,c=d.lastIndexOf(`
91`),a=d.length-c):a+=d.length,f&&h!=="start"){var p=f.parent||{raws:{}},g=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!g||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(s.source=n.sourcePath(f),s.original.line=f.source.end.line,s.original.column=f.source.end.column-1,s.generated.line=i,s.generated.column=a-2,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=a-1,n.map.addMapping(s)))}})},t.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(n){return n.annotation}):!0},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var n=this.mapOpts.annotation;return typeof n<"u"&&n!==!0?!1:this.previous().length?this.previous().some(function(i){return i.inline}):!0},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(n){return n.withContent()}):!0},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}
vendor: 29,700 bytes, lines 91-92
91,t.path=function(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;var i=this.memoizedPaths.get(n);if(i)return i;var a=this.opts.to?JP(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(a=JP(mxe(a,this.mapOpts.annotation)));var o=pxe(a,n);return this.memoizedPaths.set(n,o),o},t.previous=function(){var n=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(a){if(a.source&&a.source.input.map){var o=a.source.input.map;n.previousMaps.includes(o)||n.previousMaps.push(o)}});else{var i=new dut(this.originalCSS,this.opts);i.map&&this.previousMaps.push(i.map)}return this.previousMaps},t.setSourcesContent=function(){var n=this,i={};if(this.root)this.root.walk(function(o){if(o.source){var s=o.source.input.from;if(s&&!i[s]){i[s]=!0;var l=n.usesFileUrls?n.toFileUrl(s):n.toUrl(n.path(s));n.map.setSourceContent(l,o.source.input.css)}}});else if(this.css){var a=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(a,this.css)}},t.sourcePath=function(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))},t.toBase64=function(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))},t.toFileUrl=function(n){var i=this.memoizedFileURLs.get(n);if(i)return i;if(yoe){var a=yoe(n).toString();return this.memoizedFileURLs.set(n,a),a}else throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(n){var i=this.memoizedURLs.get(n);if(i)return i;vxe==="\\"&&(n=n.replace(/\\/g,"/"));var a=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,a),a},e})(),gxe=put,mut=B5,ZH=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="comment",n}return t})(mut),U5=ZH;ZH.default=ZH;var yxe=xm.isClean,_xe=xm.my,bxe=z5,Exe=U5,vut=B5,wxe,SW,CW,Sxe;function Cxe(e){return e.map(function(t){return t.nodes&&(t.nodes=Cxe(t.nodes)),delete t.source,t})}function xxe(e){if(e[yxe]=!1,e.proxyOf.nodes)for(var t=ir(e.proxyOf.nodes),r;!(r=t()).done;){var n=r.value;xxe(n)}}var hh=(function(e){La(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];for(var s=ir(a),l;!(l=s()).done;)for(var c=l.value,d=this.normalize(c,this.last),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.push(p)}return this.markDirty(),this},r.cleanRaws=function(i){if(e.prototype.cleanRaws.call(this,i),this.nodes)for(var a=ir(this.nodes),o;!(o=a()).done;){var s=o.value;s.cleanRaws(i)}},r.each=function(i){if(this.proxyOf.nodes){for(var a=this.getIterator(),o,s;this.indexes[a]<this.proxyOf.nodes.length&&(o=this.indexes[a],s=i(this.proxyOf.nodes[o],o),s!==!1);)this.indexes[a]+=1;return delete this.indexes[a],s}},r.every=function(i){return this.nodes.every(i)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var i=this.lastEach;return this.indexes[i]=0,i},r.getProxyProcessor=function(){return{get:function(a,o){return o==="proxyOf"?a:a[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d;return(d=a)[o].apply(d,[].concat(l.map(function(f){return typeof f=="function"?function(h,p){return f(h.toProxy(),p)}:f})))}:o==="every"||o==="some"?function(s){return a[o](function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];return s.apply(void 0,[].concat([l.toProxy()],d))})}:o==="root"?function(){return a.root().toProxy()}:o==="nodes"?a.nodes.map(function(s){return s.toProxy()}):o==="first"||o==="last"?a[o].toProxy():a[o]:a[o]},set:function(a,o,s){return a[o]===s||(a[o]=s,(o==="name"||o==="params"||o==="selector")&&a.markDirty()),!0}}},r.index=function(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))},r.insertAfter=function(i,a){var o=this.index(i),s=this.normalize(a,this.proxyOf.nodes[o]).reverse();o=this.index(i);for(var l=ir(s),c;!(c=l()).done;){var d=c.value;this.proxyOf.nodes.splice(o+1,0,d)}var f;for(var h in this.indexes)f=this.indexes[h],o<f&&(this.indexes[h]=f+s.length);return this.markDirty(),this},r.insertBefore=function(i,a){var o=this.index(i),s=o===0?"prepend":!1,l=this.normalize(a,this.proxyOf.nodes[o],s).reverse();o=this.index(i);for(var c=ir(l),d;!(d=c()).done;){var f=d.value;this.proxyOf.nodes.splice(o,0,f)}var h;for(var p in this.indexes)h=this.indexes[p],o<=h&&(this.indexes[p]=h+l.length);return this.markDirty(),this},r.normalize=function(i,a){var o=this;if(typeof i=="string")i=Cxe(wxe(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(var s=ir(i),l;!(l=s()).done;){var c=l.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(var d=ir(i),f;!(f=d()).done;){var h=f.value;h.parent&&h.parent.removeChild(h,"ignore")}}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new bxe(i)]}else if(i.selector)i=[new SW(i)];else if(i.name)i=[new CW(i)];else if(i.text)i=[new Exe(i)];else throw new Error("Unknown node type in node creation");var p=i.map(function(g){return g[_xe]||t.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[yxe]&&xxe(g),typeof g.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(g.raws.before=a.raws.before.replace(/\S/g,"")),g.parent=o.proxyOf,g});return p},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a=a.reverse();for(var s=ir(a),l;!(l=s()).done;){for(var c=l.value,d=this.normalize(c,this.first,"prepend").reverse(),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.unshift(p)}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+d.length}return this.markDirty(),this},r.push=function(i){return i.parent=this,this.proxyOf.nodes.push(i),this},r.removeAll=function(){for(var i=ir(this.proxyOf.nodes),a;!(a=i()).done;){var o=a.value;o.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);var a;for(var o in this.indexes)a=this.indexes[o],a>=i&&(this.indexes[o]=a-1);return this.markDirty(),this},r.replaceValues=function(i,a,o){return o||(o=a,a={}),this.walkDecls(function(s){a.props&&!a.props.includes(s.prop)||a.fast&&!s.value.includes(a.fast)||(s.value=s.value.replace(i,o))}),this.markDirty(),this},r.some=function(i){return this.nodes.some(i)},r.walk=function(i){return this.each(function(a,o){var s;try{s=i(a,o)}catch(l){throw a.addToError(l)}return s!==!1&&a.walk&&(s=a.walk(i)),s})},r.walkAtRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="atrule"&&i.test(o.name))return a(o,s)}):this.walk(function(o,s){if(o.type==="atrule"&&o.name===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="atrule")return a(o,s)}))},r.walkComments=function(i){return this.walk(function(a,o){if(a.type==="comment")return i(a,o)})},r.walkDecls=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="decl"&&i.test(o.prop))return a(o,s)}):this.walk(function(o,s){if(o.type==="decl"&&o.prop===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="decl")return a(o,s)}))},r.walkRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="rule"&&i.test(o.selector))return a(o,s)}):this.walk(function(o,s){if(o.type==="rule"&&o.selector===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="rule")return a(o,s)}))},Ra(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t})(vut);hh.registerParse=function(e){wxe=e};hh.registerRule=function(e){SW=e};hh.registerAtRule=function(e){CW=e};hh.registerRoot=function(e){Sxe=e};var s0=hh;hh.default=hh;hh.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,CW.prototype):e.type==="rule"?Object.setPrototypeOf(e,SW.prototype):e.type==="decl"?Object.setPrototypeOf(e,bxe.prototype):e.type==="comment"?Object.setPrototypeOf(e,Exe.prototype):e.type==="root"&&Object.setPrototypeOf(e,Sxe.prototype),e[_xe]=!0,e.nodes&&e.nodes.forEach(function(t){hh.rebuild(t)})};var gut=s0,Txe,Axe,TC=(function(e){La(t,e);function t(n){var i;return i=e.call(this,Mn({type:"document"},n))||this,i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.toResult=function(i){i===void 0&&(i={});var a=new Txe(new Axe,this,i);return a.stringify()},t})(gut);TC.registerLazyResult=function(e){Txe=e};TC.registerProcessor=function(e){Axe=e};var xW=TC;TC.default=TC;var QH=(function(){function e(r,n){if(n===void 0&&(n={}),this.type="warning",this.text=r,n.node&&n.node.source){var i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var a in n)this[a]=n[a]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e})(),Pxe=QH;QH.default=QH;var yut=Pxe,JH=(function(){function e(r,n,i){this.processor=r,this.messages=[],this.root=n,this.opts=i,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(n,i){i===void 0&&(i={}),i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);var a=new yut(n,i);return this.messages.push(a),a},t.warnings=function(){return this.messages.filter(function(n){return n.type==="warning"})},Ra(e,[{key:"content",get:function(){return this.css}}]),e})(),TW=JH;JH.default=JH;var d9=39,_oe=34,oA=92,boe=47,sA=10,xb=32,lA=12,cA=9,uA=13,_ut=91,but=93,Eut=40,wut=41,Sut=123,Cut=125,xut=59,Tut=42,Aut=58,Put=64,dA=/[\t\n\f\r "#'()/;[\\\]{}]/g,fA=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Rut=/.[\r\n"'(/\\]/,Eoe=/[\da-f]/i,Out=function(t,r){r===void 0&&(r={});var n=t.css.valueOf(),i=r.ignoreErrors,a,o,s,l,c,d,f,h,p,g,_=n.length,b=0,E=[],S=[];function P(){return b}function O(F){throw t.error("Unclosed "+F,b)}function I(){return S.length===0&&b>=_}function N(F){if(S.length)return S.pop();if(!(b>=_)){var B=F?F.ignoreUnclosed:!1;switch(a=n.charCodeAt(b),a){case sA:case xb:case cA:case uA:case lA:{o=b;do o+=1,a=n.charCodeAt(o);while(a===xb||a===sA||a===cA||a===uA||a===lA);g=["space",n.slice(b,o)],b=o-1;break}case _ut:case but:case Sut:case Cut:case Aut:case xut:case wut:{var V=String.fromCharCode(a);g=[V,V,b];break}case Eut:{if(h=E.length?E.pop()[1]:"",p=n.charCodeAt(b+1),h==="url"&&p!==d9&&p!==_oe&&p!==xb&&p!==sA&&p!==cA&&p!==lA&&p!==uA){o=b;do{if(d=!1,o=n.indexOf(")",o+1),o===-1)if(i||B){o=b;break}else O("bracket");for(f=o;n.charCodeAt(f-1)===oA;)f-=1,d=!d}while(d);g=["brackets",n.slice(b,o+1),b,o],b=o}else o=n.indexOf(")",b+1),l=n.slice(b,o+1),o===-1||Rut.test(l)?g=["(","(",b]:(g=["brackets",l,b,o],b=o);break}case d9:case _oe:{s=a===d9?"'":'"',o=b;do{if(d=!1,o=n.indexOf(s,o+1),o===-1)if(i||B){o=b+1;break}else O("string");for(f=o;n.charCodeAt(f-1)===oA;)f-=1,d=!d}while(d);g=["string",n.slice(b,o+1),b,o],b=o;break}case Put:{dA.lastIndex=b+1,dA.test(n),dA.lastIndex===0?o=n.length-1:o=dA.lastIndex-2,g=["at-word",n.slice(b,o+1),b,o],b=o;break}case oA:{for(o=b,c=!0;n.charCodeAt(o+1)===oA;)o+=1,c=!c;if(a=n.charCodeAt(o+1),c&&a!==boe&&a!==xb&&a!==sA&&a!==cA&&a!==uA&&a!==lA&&(o+=1,Eoe.test(n.charAt(o)))){for(;Eoe.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===xb&&(o+=1)}g=["word",n.slice(b,o+1),b,o],b=o;break}default:{a===boe&&n.charCodeAt(b+1)===Tut?(o=n.indexOf("*/",b+2)+1,o===0&&(i||B?o=n.length:O("comment")),g=["comment",n.slice(b,o+1),b,o],b=o):(fA.lastIndex=b+1,fA.test(n),fA.lastIndex===0?o=n.length-1:o=fA.lastIndex-2,g=["word",n.slice(b,o+1),b,o],E.push(g),b=o);break}}return b++,g}}function M(F){S.push(F)}return{back:M,endOfFile:I,nextToken:N,position:P}},Rxe=s0,VO=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="atrule",i}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.append).call.apply(s,[].concat([this],a))},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.prepend).call.apply(s,[].concat([this],a))},t})(Rxe),AW=VO;VO.default=VO;Rxe.registerAtRule(VO);var Oxe=s0,Ixe,kxe,A1=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="root",i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.normalize=function(i,a,o){var s=e.prototype.normalize.call(this,i);if(a){if(o==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(var l=ir(s),c;!(c=l()).done;){var d=c.value;d.raws.before=a.raws.before}}return s},r.removeChild=function(i,a){var o=this.index(i);return!a&&o===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[o].raws.before),e.prototype.removeChild.call(this,i)},r.toResult=function(i){i===void 0&&(i={});var a=new Ixe(new kxe,this,i);return a.stringify()},t})(Oxe);A1.registerLazyResult=function(e){Ixe=e};A1.registerProcessor=function(e){kxe=e};var a2=A1;A1.default=A1;Oxe.registerRoot(A1);var AC={comma:function(t){return AC.split(t,[","],!0)},space:function(t){var r=[" ",`
92`,"	"];return AC.split(t,r)},split:function(t,r,n){for(var i=[],a="",o=!1,s=0,l=!1,c="",d=!1,f=ir(t),h;!(h=f()).done;){var p=h.value;d?d=!1:p==="\\"?d=!0:l?p===c&&(l=!1):p==='"'||p==="'"?(l=!0,c=p):p==="("?s+=1:p===")"?s>0&&(s-=1):s===0&&r.includes(p)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=p}return(n||a!=="")&&i.push(a.trim()),i}},Nxe=AC;AC.default=AC;var Dxe=s0,Iut=Nxe,qO=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="rule",n.nodes||(n.nodes=[]),n}return Ra(t,[{key:"selectors",get:function(){return Iut.comma(this.selector)},set:function(n){var i=this.selector?this.selector.match(/,\s*/):null,a=i?i[0]:","+this.raw("between","beforeOpen");this.selector=n.join(a)}}]),t})(Dxe),PW=qO;qO.default=qO;Dxe.registerRule(qO);var kut=z5,Nut=Out,Dut=U5,Mut=AW,Lut=a2,woe=PW,Soe={empty:!0,space:!0};function Fut(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}var But=(function(){function e(r){this.input=r,this.root=new Lut,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(n){var i=new Mut;i.name=n[1].slice(1),i.name===""&&this.unnamedAtrule(i,n),this.init(i,n[2]);for(var a,o,s,l=!1,c=!1,d=[],f=[];!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),a=n[0],a==="("||a==="["?f.push(a==="("?")":"]"):a==="{"&&f.length>0?f.push("}"):a===f[f.length-1]&&f.pop(),f.length===0)if(a===";"){i.source.end=this.getPosition(n[2]),i.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){c=!0;break}else if(a==="}"){if(d.length>0){for(s=d.length-1,o=d[s];o&&o[0]==="space";)o=d[--s];o&&(i.source.end=this.getPosition(o[3]||o[2]),i.source.end.offset++)}this.end(n);break}else d.push(n);else d.push(n);if(this.tokenizer.endOfFile()){l=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(d),d.length?(i.raws.afterName=this.spacesAndCommentsFromStart(d),this.raw(i,"params",d),l&&(n=d[d.length-1],i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),c&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(n){var i=this.colon(n);if(i!==!1){for(var a=0,o,s=i-1;s>=0&&(o=n[s],!(o[0]!=="space"&&(a+=1,a===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}},t.colon=function(n){for(var i=0,a,o,s,l=ir(n.entries()),c;!(c=l()).done;){var d=c.value,f=d[0],h=d[1];if(a=h,o=a[0],o==="("&&(i+=1),o===")"&&(i-=1),i===0&&o===":")if(!s)this.doubleColon(a);else{if(s[0]==="word"&&s[1]==="progid")continue;return f}s=a}return!1},t.comment=function(n){var i=new Dut;this.init(i,n[2]),i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++;var a=n[1].slice(2,-2);if(/^\s*$/.test(a))i.text="",i.raws.left=a,i.raws.right="";else{var o=a.match(/^(\s*)([^]*\S)(\s*)$/);i.text=o[2],i.raws.left=o[1],i.raws.right=o[3]}},t.createTokenizer=function(){this.tokenizer=Nut(this.input)},t.decl=function(n,i){var a=new kut;this.init(a,n[0][2]);var o=n[n.length-1];for(o[0]===";"&&(this.semicolon=!0,n.pop()),a.source.end=this.getPosition(o[3]||o[2]||Fut(n)),a.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),a.raws.before+=n.shift()[1];for(a.source.start=this.getPosition(n[0][2]),a.prop="";n.length;){var s=n[0][0];if(s===":"||s==="space"||s==="comment")break;a.prop+=n.shift()[1]}a.raws.between="";for(var l;n.length;)if(l=n.shift(),l[0]===":"){a.raws.between+=l[1];break}else l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]),a.raws.between+=l[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));for(var c=[],d;n.length&&(d=n[0][0],!(d!=="space"&&d!=="comment"));)c.push(n.shift());this.precheckMissedSemicolon(n);for(var f=n.length-1;f>=0;f--){if(l=n[f],l[1].toLowerCase()==="!important"){a.important=!0;var h=this.stringFrom(n,f);h=this.spacesFromEnd(n)+h,h!==" !important"&&(a.raws.important=h);break}else if(l[1].toLowerCase()==="important"){for(var p=n.slice(0),g="",_=f;_>0;_--){var b=p[_][0];if(g.trim().indexOf("!")===0&&b!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(a.important=!0,a.raws.important=g,n=p)}if(l[0]!=="space"&&l[0]!=="comment")break}var E=n.some(function(S){return S[0]!=="space"&&S[0]!=="comment"});E&&(a.raws.between+=c.map(function(S){return S[1]}).join(""),c=[]),this.raw(a,"value",c.concat(n),i),a.value.includes(":")&&!i&&this.checkMissedSemicolon(n)},t.doubleColon=function(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})},t.emptyRule=function(n){var i=new woe;this.init(i,n[2]),i.selector="",i.raws.between="",this.current=i},t.end=function(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(n){if(this.spaces+=n[1],this.current.nodes){var i=this.current.nodes[this.current.nodes.length-1];i&&i.type==="rule"&&!i.raws.ownSemicolon&&(i.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(n){var i=this.input.fromOffset(n);return{column:i.col,line:i.line,offset:n}},t.init=function(n,i){this.current.push(n),n.source={input:this.input,start:this.getPosition(i)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)},t.other=function(n){for(var i=!1,a=null,o=!1,s=null,l=[],c=n[1].startsWith("--"),d=[],f=n;f;){if(a=f[0],d.push(f),a==="("||a==="[")s||(s=f),l.push(a==="("?")":"]");else if(c&&o&&a==="{")s||(s=f),l.push("}");else if(l.length===0)if(a===";")if(o){this.decl(d,c);return}else break;else if(a==="{"){this.rule(d);return}else if(a==="}"){this.tokenizer.back(d.pop()),i=!0;break}else a===":"&&(o=!0);else a===l[l.length-1]&&(l.pop(),l.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),l.length>0&&this.unclosedBracket(s),i&&o){if(!c)for(;d.length&&(f=d[d.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(d.pop());this.decl(d,c)}else this.unknownWord(d)},t.parse=function(){for(var n;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(n,i,a,o){for(var s,l,c=a.length,d="",f=!0,h,p,g=0;g<c;g+=1)s=a[g],l=s[0],l==="space"&&g===c-1&&!o?f=!1:l==="comment"?(p=a[g-1]?a[g-1][0]:"empty",h=a[g+1]?a[g+1][0]:"empty",!Soe[p]&&!Soe[h]?d.slice(-1)===","?f=!1:d+=s[1]:f=!1):d+=s[1];if(!f){var _=a.reduce(function(b,E){return b+E[1]},"");n.raws[i]={raw:_,value:d}}n[i]=d},t.rule=function(n){n.pop();var i=new woe;this.init(i,n[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(i,"selector",n),this.current=i},t.spacesAndCommentsFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],!(i!=="space"&&i!=="comment"));)a=n.pop()[1]+a;return a},t.spacesAndCommentsFromStart=function(n){for(var i,a="";n.length&&(i=n[0][0],!(i!=="space"&&i!=="comment"));)a+=n.shift()[1];return a},t.spacesFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],i==="space");)a=n.pop()[1]+a;return a},t.stringFrom=function(n,i){for(var a="",o=i;o<n.length;o++)a+=n[o][1];return n.splice(i,n.length-i),a},t.unclosedBlock=function(){var n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)},t.unclosedBracket=function(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})},t.unexpectedClose=function(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})},t.unknownWord=function(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})},t.unnamedAtrule=function(n,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})},e})(),zut=But,Hut=s0,Uut=zut,Vut=H5;function jO(e,t){var r=new Vut(e,t),n=new Uut(r);try{n.parse()}catch(i){throw i}return n.root}var RW=jO;jO.default=jO;Hut.registerParse(jO);var sd=xm.isClean,qut=xm.my,jut=gxe,$ut=F5,Wut=s0,Gut=xW,Coe=TW,Kut=RW,Yut=a2,Xut={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zut={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Qut={Once:!0,postcssPlugin:!0,prepare:!0},P1=0;function Tb(e){return(typeof e>"u"?"undefined":Kr(e))==="object"&&typeof e.then=="function"}function Mxe(e){var t=!1,r=Xut[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,P1,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,P1,r+"Exit"]:[r,r+"Exit"]}function xoe(e){var t;return e.type==="document"?t=["Document",P1,"DocumentExit"]:e.type==="root"?t=["Root",P1,"RootExit"]:t=Mxe(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function eU(e){return e[sd]=!1,e.nodes&&e.nodes.forEach(function(t){return eU(t)}),e}var tU={},R1=(function(){function e(r,n,i){var a=this;this.stringified=!1,this.processed=!1;var o;if((typeof n>"u"?"undefined":Kr(n))==="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=eU(n);else if(Gr(n,e)||Gr(n,Coe))o=eU(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{var s=Kut;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{o=s(n,i)}catch(l){this.processed=!0,this.error=l}o&&!o[qut]&&Wut.rebuild(o)}this.result=new Coe(r,o,i),this.helpers=Mn({},tU,{postcss:tU,result:this.result}),this.plugins=this.processor.plugins.map(function(l){return(typeof l>"u"?"undefined":Kr(l))==="object"&&l.prepare?Mn({},l,l.prepare(a.result)):l})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(n,i){var a=this.result.lastPlugin;try{if(i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin)n.plugin=a.postcssPlugin,n.setMessage();else if(a.postcssVersion)var o,s,l,c,d}catch(f){console&&console.error&&console.error(f)}return n},t.prepareVisitors=function(){var n=this;this.listeners={};for(var i=function(d,f,h){n.listeners[f]||(n.listeners[f]=[]),n.listeners[f].push([d,h])},a=ir(this.plugins),o;!(o=a()).done;){var s=o.value;if((typeof s>"u"?"undefined":Kr(s))==="object")for(var l in s){if(!Zut[l]&&/^[A-Z]/.test(l))throw new Error("Unknown event "+l+" in "+s.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Qut[l])if(Kr(s[l])==="object")for(var c in s[l])c==="*"?i(s,l,s[l][c]):i(s,l+"-"+c.toLowerCase(),s[l][c]);else typeof s[l]=="function"&&i(s,l,s[l])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var n=this;return I5(function(){var i,a,o,s,l,c,d,f,h,p,g,_;return Sg(this,function(b){switch(b.label){case 0:n.plugin=0,i=0,b.label=1;case 1:if(!(i<n.plugins.length))return[3,6];if(a=n.plugins[i],o=n.runOnRoot(a),!Tb(o))return[3,5];b.label=2;case 2:return b.trys.push([2,4,,5]),[4,o];case 3:return b.sent(),[3,5];case 4:throw s=b.sent(),n.handleError(s);case 5:return i++,[3,1];case 6:if(n.prepareVisitors(),!n.hasListener)return[3,18];l=n.result.root,b.label=7;case 7:if(l[sd])return[3,14];l[sd]=!0,c=[xoe(l)],b.label=8;case 8:if(!(c.length>0))return[3,13];if(d=n.visitTick(c),!Tb(d))return[3,12];b.label=9;case 9:return b.trys.push([9,11,,12]),[4,d];case 10:return b.sent(),[3,12];case 11:throw f=b.sent(),h=c[c.length-1].node,n.handleError(f,h);case 12:return[3,8];case 13:return[3,7];case 14:if(!n.listeners.OnceExit)return[3,18];p=function(){var E,S,P,O,I;return Sg(this,function(N){switch(N.label){case 0:E=_.value,S=E[0],P=E[1],n.result.lastPlugin=S,N.label=1;case 1:return N.trys.push([1,6,,7]),l.type!=="document"?[3,3]:(O=l.nodes.map(function(M){return P(M,n.helpers)}),[4,Promise.all(O)]);case 2:return N.sent(),[3,5];case 3:return[4,P(l,n.helpers)];case 4:N.sent(),N.label=5;case 5:return[3,7];case 6:throw I=N.sent(),n.handleError(I);case 7:return[2]}})},g=ir(n.listeners.OnceExit),b.label=15;case 15:return(_=g()).done?[3,18]:[5,lW(p())];case 16:b.sent(),b.label=17;case 17:return[3,15];case 18:return n.processed=!0,[2,n.stringify()]}})})()},t.runOnRoot=function(n){var i=this;this.result.lastPlugin=n;try{if((typeof n>"u"?"undefined":Kr(n))==="object"&&n.Once){if(this.result.root.type==="document"){var a=this.result.root.nodes.map(function(o){return n.Once(o,i.helpers)});return Tb(a[0])?Promise.all(a):a}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(o){throw this.handleError(o)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var n=this.result.opts,i=$ut;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);var a=new jut(i,this.result.root,this.result.opts),o=a.generate();return this.result.css=o[0],this.result.map=o[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var n=ir(this.plugins),i;!(i=n()).done;){var a=i.value,o=this.runOnRoot(a);if(Tb(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[sd];)s[sd]=!0,this.walkSync(s);if(this.listeners.OnceExit)if(s.type==="document")for(var l=ir(s.nodes),c;!(c=l()).done;){var d=c.value;this.visitSync(this.listeners.OnceExit,d)}else this.visitSync(this.listeners.OnceExit,s)}return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this.css},t.visitSync=function(n,i){for(var a=ir(n),o;!(o=a()).done;){var s=o.value,l=s[0],c=s[1];this.result.lastPlugin=l;var d=void 0;try{d=c(i,this.helpers)}catch(f){throw this.handleError(f,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(Tb(d))throw this.getAsyncError()}},t.visitTick=function(n){var i=n[n.length-1],a=i.node,o=i.visitors;if(a.type!=="root"&&a.type!=="document"&&!a.parent){n.pop();return}if(o.length>0&&i.visitorIndex<o.length){var s=o[i.visitorIndex],l=s[0],c=s[1];i.visitorIndex+=1,i.visitorIndex===o.length&&(i.visitors=[],i.visitorIndex=0),this.result.lastPlugin=l;try{return c(a.toProxy(),this.helpers)}catch(g){throw this.handleError(g,a)}}if(i.iterator!==0){for(var d=i.iterator,f;f=a.nodes[a.indexes[d]];)if(a.indexes[d]+=1,!f[sd]){f[sd]=!0,n.push(xoe(f));return}i.iterator=0,delete a.indexes[d]}for(var h=i.events;i.eventIndex<h.length;){var p=h[i.eventIndex];if(i.eventIndex+=1,p===P1){a.nodes&&a.nodes.length&&(a[sd]=!0,i.iterator=a.getIterator());return}else if(this.listeners[p]){i.visitors=this.listeners[p];return}}n.pop()},t.walkSync=function(n){var i=this;n[sd]=!0;for(var a=Mxe(n),o=ir(a),s;!(s=o()).done;){var l=s.value;if(l===P1)n.nodes&&n.each(function(d){d[sd]||i.walkSync(d)});else{var c=this.listeners[l];if(c&&this.visitSync(c,n.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()}
92,Ra(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e})();R1.registerPostcss=function(e){tU=e};var Lxe=R1;R1.default=R1;Yut.registerLazyResult(R1);Gut.registerLazyResult(R1);var Jut=gxe,edt=F5,tdt=RW,rdt=TW,rU=(function(){function e(r,n,i){n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=i,this._map=void 0;var a,o=edt;this.result=new rdt(this._processor,a,this._opts),this.result.css=n;var s=this;Object.defineProperty(this.result,"root",{get:function(){return s.root}});var l=new Jut(o,a,this._opts,n);if(l.isMap()){var c=l.generate(),d=c[0],f=c[1];d&&(this.result.css=d),f&&(this.result.map=f)}else l.clearAnnotation(),this.result.css=l.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this._css},t.warnings=function(){return[]},Ra(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var n,i=tdt;try{n=i(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=n,n}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e})(),ndt=rU;rU.default=rU;var idt=ndt,adt=Lxe,odt=xW,sdt=a2,PC=(function(){function e(r){r===void 0&&(r=[]),this.version="8.4.38",this.plugins=this.normalize(r)}var t=e.prototype;return t.normalize=function(n){for(var i=[],a=ir(n),o;!(o=a()).done;){var s=o.value;if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),(typeof s>"u"?"undefined":Kr(s))==="object"&&Array.isArray(s.plugins))i=i.concat(s.plugins);else if((typeof s>"u"?"undefined":Kr(s))==="object"&&s.postcssPlugin)i.push(s);else if(typeof s=="function")i.push(s);else if(!((typeof s>"u"?"undefined":Kr(s))==="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin")}return i},t.process=function(n,i){return i===void 0&&(i={}),!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new idt(this,n,i):new adt(this,n,i)},t.use=function(n){return this.plugins=this.plugins.concat(this.normalize([n])),this},e})(),ldt=PC;PC.default=PC;
vendor: 6,529 bytes, lines 92-94
92sdt.registerProcessor(PC);odt.registerProcessor(PC);var cdt=z5,udt=fxe,ddt=U5,fdt=AW,hdt=H5,pdt=a2,mdt=PW;function RC(e,t){if(Array.isArray(e))return e.map(function(f){return RC(f)});var r=e.inputs,n=wg(e,["inputs"]);if(r){t=[];for(var i=ir(r),a;!(a=i()).done;){var o=a.value,s=Mn({},o,{__proto__:hdt.prototype});s.map&&(s.map=Mn({},s.map,{__proto__:udt.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(f){return RC(f,t)})),n.source){var l=n.source,c=l.inputId,d=wg(l,["inputId"]);n.source=d,c!=null&&(n.source.input=t[c])}if(n.type==="root")return new pdt(n);if(n.type==="decl")return new cdt(n);if(n.type==="rule")return new mdt(n);if(n.type==="comment")return new ddt(n);if(n.type==="atrule")return new fdt(n);throw new Error("Unknown node type: "+e.type)}var vdt=RC;RC.default=RC;var gdt=wW,Fxe=z5,ydt=Lxe,_dt=s0,OW=ldt,bdt=F5,Edt=vdt,Bxe=xW,wdt=Pxe,zxe=U5,Hxe=AW,Sdt=TW,Cdt=H5,xdt=RW,Tdt=Nxe,Uxe=PW,Vxe=a2,Adt=B5;function Yi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new OW(t)}Yi.plugin=function(t,r){var n=!1;function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
93https://evilmartians.com/chronicles/postcss-8-plugin-migration`),S1.LANG&&S1.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
94https://www.w3ctech.com/topic/2226`));var c=r.apply(void 0,[].concat(s));return c.postcssPlugin=t,c.postcssVersion=new OW().version,c}var a;return Object.defineProperty(i,"postcss",{get:function(){return a||(a=i()),a}}),i.process=function(o,s,l){return Yi([i(l)]).process(o,s)},i};Yi.stringify=bdt;Yi.parse=xdt;Yi.fromJSON=Edt;Yi.list=Tdt;Yi.comment=function(e){return new zxe(e)};Yi.atRule=function(e){return new Hxe(e)};Yi.decl=function(e){return new Fxe(e)};Yi.rule=function(e){return new Uxe(e)};Yi.root=function(e){return new Vxe(e)};Yi.document=function(e){return new Bxe(e)};Yi.CssSyntaxError=gdt;Yi.Declaration=Fxe;Yi.Container=_dt;Yi.Processor=OW;Yi.Document=Bxe;Yi.Comment=zxe;Yi.Warning=wdt;Yi.AtRule=Hxe;Yi.Result=Sdt;Yi.Input=Cdt;Yi.Rule=Uxe;Yi.Root=Vxe;Yi.Node=Adt;ydt.registerPostcss(Yi);var Pdt=Yi;Yi.default=Yi;var Ba=Uct(Pdt);Ba.stringify;Ba.fromJSON;Ba.plugin;Ba.parse;Ba.list;Ba.document;Ba.comment;Ba.atRule;Ba.rule;Ba.decl;Ba.root;Ba.CssSyntaxError;Ba.Declaration;Ba.Container;Ba.Processor;Ba.Document;Ba.Comment;Ba.Warning;Ba.AtRule;Ba.Result;Ba.Input;Ba.Rule;Ba.Root;Ba.Node;var Rdt=(function(){function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];Tc(this,"parentElement",null),Tc(this,"parentNode",null),Tc(this,"ownerDocument"),Tc(this,"firstChild",null),Tc(this,"lastChild",null),Tc(this,"previousSibling",null),Tc(this,"nextSibling",null),Tc(this,"ELEMENT_NODE",1),Tc(this,"TEXT_NODE",3),Tc(this,"nodeType"),Tc(this,"nodeName"),Tc(this,"RRNodeType")}var t=e.prototype;return t.contains=function(n){if(Gr(n,e)){if(n.ownerDocument!==this.ownerDocument)return!1;if(n===this)return!0}else return!1;for(;n.parentNode;){if(n.parentNode===this)return!0;n=n.parentNode}return!1},t.appendChild=function(n){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")},t.insertBefore=function(n,i){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")},t.removeChild=function(n){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")},t.toString=function(){return"RRNode"},Ra(e,[{key:"childNodes",get:function(){for(var n=[],i=this.firstChild;i;)n.push(i),i=i.nextSibling;return n}}]),e})(),Toe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Aoe={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hA={},Odt=function(){return!!globalThis.Zone};function IW(e){if(hA[e])return hA[e];var t=globalThis[e],r=t.prototype,n=e in Toe?Toe[e]:void 0,i=!!(n&&n.every(function(d){var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(r,d))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),a=e in Aoe?Aoe[e]:void 0,o=!!(a&&a.every(function(d){var f;return typeof r[d]=="function"&&((f=r[d])==null?void 0:f.toString().includes("[native code]"))}));if(i&&o&&!Odt())return hA[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?hA[e]=c:r}catch{return r}}var f9={};function Tm(e,t,r){var n,i=e+"."+String(r);if(f9[i])return f9[i].call(t);var a=IW(e),o=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return o?(f9[i]=o,o.call(t)):t[r]}var h9={};function qxe(e,t,r){var n=e+"."+String(r);if(h9[n])return h9[n].bind(t);var i=IW(e),a=i[r];return typeof a!="function"?t[r]:(h9[n]=a,a.bind(t))}function Idt(e){return Tm("Node",e,"childNodes")}function kdt(e){return Tm("Node",e,"parentNode")}function Ndt(e){return Tm("Node",e,"parentElement")}function Ddt(e){return Tm("Node",e,"textContent")}function Mdt(e,t){return qxe("Node",e,"contains")(t)}function Ldt(e){return qxe("Node",e,"getRootNode")()}function Fdt(e){return!e||!("host"in e)?null:Tm("ShadowRoot",e,"host")}function Bdt(e){return e.styleSheets}function zdt(e){return!e||!("shadowRoot"in e)?null:Tm("Element",e,"shadowRoot")}function Hdt(e,t){return Tm("Element",e,"querySelector")(t)}function Udt(e,t){return Tm("Element",e,"querySelectorAll")(t)}function jxe(){return IW("MutationObserver").constructor}function l0(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch{return function(){}}}var Qn={childNodes:Idt,parentNode:kdt,parentElement:Ndt,textContent:Ddt,contains:Mdt,getRootNode:Ldt,host:Fdt,styleSheets:Bdt,shadowRoot:zdt,querySelector:Hdt,querySelectorAll:Udt,mutationObserver:jxe,patch:l0};function tl(e,t,r){r===void 0&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var dy=`Please stop import mirror directly. Instead of that,\r
95now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
96or you can use record.mirror to access the mirror instance during recording.`,Poe={map:{},getId:function(){return console.error(dy),-1},getNode:function(){return console.error(dy),null},removeNodeFromMap:function(){console.error(dy)},has:function(){return console.error(dy),!1},reset:function(){console.error(dy)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Poe=new Proxy(Poe,{get:function(t,r,n){return r==="map"&&console.error(dy),Reflect.get(t,r,n)}}));function OC(e,t,r){r===void 0&&(r={});var n=null,i=0;return function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=Date.now();!i&&r.leading===!1&&(i=l);var c=t-(l-i),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),i=l,e.apply(d,o)):!n&&r.trailing!==!1&&(n=setTimeout(function(){i=r.leading===!1?0:Date.now(),n=null,e.apply(d,o)},c))}}function V5(e,t,r,n,i){i===void 0&&(i=window);var a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set:function(s){var l=this;setTimeout(function(){r.set.call(l,s)},0),a&&a.set&&a.set.call(this,s)}}),function(){return V5(e,t,a||{},!0)}}var $O=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||($O=function(){return new Date().getTime()});function $xe(e){var t,r,n,i,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=Qn.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((n=Qn.parentElement(a.body))==null?void 0:n.scrollTop)||((i=a?.body)==null?void 0:i.scrollTop)||0}}function Wxe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Gxe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Kxe(e){if(!e)return null;var t=e.nodeType===e.ELEMENT_NODE?e:Qn.parentElement(e);return t}function rl(e,t,r,n){if(!e)return!1;var i=Kxe(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(LO(i,t,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function Vdt(e,t){return t.getId(e)!==-1}function p9(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===EC}function Yxe(e,t){if(wS(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=Qn.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Yxe(n,t):!0}function nU(e){return!!e.changedTouches}function qdt(e){e===void 0&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Xxe(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zxe(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function iU(e){return e?Gr(e,Rdt)&&"shadowRoot"in e?!!e.shadowRoot:!!Qn.shadowRoot(e):!1}var jdt=(function(){function e(){gr(this,"id",1),gr(this,"styleIDMap",new WeakMap),gr(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(n){var i;return(i=this.styleIDMap.get(n))!=null?i:-1},t.has=function(n){return this.styleIDMap.has(n)},t.add=function(n,i){if(this.has(n))return this.getId(n);var a;return i===void 0?a=this.id++:a=i,this.styleIDMap.set(n,a),this.idStyleMap.set(a,n),a},t.getStyle=function(n){return this.idStyleMap.get(n)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},t.remove=function(n){var i=this.styleIDMap.get(n);return i!==void 0?(this.styleIDMap.delete(n),this.idStyleMap.delete(i),!0):!1},e})();function Qxe(e){var t,r=null;return"getRootNode"in e&&((t=Qn.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Qn.host(Qn.getRootNode(e))&&(r=Qn.host(Qn.getRootNode(e))),r}function $dt(e){for(var t=e,r;r=Qxe(t);)t=r;return t}function Wdt(e){var t=e.ownerDocument;if(!t)return!1;var r=$dt(e);
vendor: 9,458 bytes, line 96
96return Qn.contains(t,r)}function Jxe(e){var t=e.ownerDocument;return t?Qn.contains(t,e)||Wdt(e):!1}var ii=(function(e){return 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",e})(ii||{}),_n=(function(e){return 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",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e})(_n||{}),bl=(function(e){return 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",e})(bl||{}),Ef=(function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e})(Ef||{}),O1=(function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e})(O1||{}),fy=(function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e})(fy||{}),e2e=(function(e){return 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",e})(e2e||{});function Roe(e){return"__ln"in e}var Gdt=(function(){function e(){gr(this,"length",0),gr(this,"head",null),gr(this,"tail",null)}var t=e.prototype;return t.get=function(n){if(n>=this.length)throw new Error("Position outside of list range");for(var i=this.head,a=0;a<n;a++)i=i?.next||null;return i},t.addNode=function(n){var i={value:n,previous:null,next:null};if(n.__ln=i,n.previousSibling&&Roe(n.previousSibling)){var a=n.previousSibling.__ln.next;i.next=a,i.previous=n.previousSibling.__ln,n.previousSibling.__ln.next=i,a&&(a.previous=i)}else if(n.nextSibling&&Roe(n.nextSibling)&&n.nextSibling.__ln.previous){var o=n.nextSibling.__ln.previous;i.previous=o,i.next=n.nextSibling.__ln,n.nextSibling.__ln.previous=i,o&&(o.next=i)}else this.head&&(this.head.previous=i),i.next=this.head,this.head=i;i.next===null&&(this.tail=i),this.length++},t.removeNode=function(n){var i=n.__ln;this.head&&(i.previous?(i.previous.next=i.next,i.next?i.next.previous=i.previous:this.tail=i.previous):(this.head=i.next,this.head?this.head.previous=null:this.tail=null),n.__ln&&delete n.__ln,this.length--)},e})(),Ooe=function(e,t){return e+"@"+t},Kdt=(function(){function e(){var r=this;gr(this,"frozen",!1),gr(this,"locked",!1),gr(this,"texts",[]),gr(this,"attributes",[]),gr(this,"attributeMap",new WeakMap),gr(this,"removes",[]),gr(this,"mapRemoves",[]),gr(this,"movedMap",{}),gr(this,"addedSet",new Set),gr(this,"movedSet",new Set),gr(this,"droppedSet",new Set),gr(this,"removesSubTreeCache",new Set),gr(this,"mutationCb"),gr(this,"blockClass"),gr(this,"blockSelector"),gr(this,"maskTextClass"),gr(this,"maskTextSelector"),gr(this,"inlineStylesheet"),gr(this,"maskInputOptions"),gr(this,"maskTextFn"),gr(this,"maskInputFn"),gr(this,"keepIframeSrcFn"),gr(this,"recordCanvas"),gr(this,"inlineImages"),gr(this,"slimDOMOptions"),gr(this,"dataURLOptions"),gr(this,"doc"),gr(this,"mirror"),gr(this,"iframeManager"),gr(this,"stylesheetManager"),gr(this,"shadowDomManager"),gr(this,"canvasManager"),gr(this,"processedNodeManager"),gr(this,"unattachedDoc"),gr(this,"processMutations",function(n){n.forEach(r.processMutation),r.emit()}),gr(this,"emit",function(){if(!(r.frozen||r.locked)){for(var n=[],i=new Set,a=new Gdt,o=function($){for(var X=$,re=EC;re===EC;)X=X&&X.nextSibling,re=X&&r.mirror.getId(X);return re},s=function($){var X=Qn.parentNode($);if(!(!X||!Jxe($))){var re=!1;if($.nodeType===Node.TEXT_NODE){var ae=X.tagName;if(ae==="TEXTAREA")return;ae==="STYLE"&&r.addedSet.has(X)&&(re=!0)}var Q=wS(X)?r.mirror.getId(Qxe($)):r.mirror.getId(X),ie=o($);if(Q===-1||ie===-1)return a.addNode($);var le=Cy($,{doc:r.doc,mirror:r.mirror,blockClass:r.blockClass,blockSelector:r.blockSelector,maskTextClass:r.maskTextClass,maskTextSelector:r.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:r.inlineStylesheet,maskInputOptions:r.maskInputOptions,maskTextFn:r.maskTextFn,maskInputFn:r.maskInputFn,slimDOMOptions:r.slimDOMOptions,dataURLOptions:r.dataURLOptions,recordCanvas:r.recordCanvas,inlineImages:r.inlineImages,onSerialize:function(fe){Xxe(fe,r.mirror)&&r.iframeManager.addIframe(fe),Zxe(fe,r.mirror)&&r.stylesheetManager.trackLinkElement(fe),iU($)&&r.shadowDomManager.addShadowRoot(Qn.shadowRoot($),r.doc)},onIframeLoad:function(fe,de){r.iframeManager.attachIframe(fe,de),r.shadowDomManager.observeAttachShadow(fe)},onStylesheetLoad:function(fe,de){r.stylesheetManager.attachLinkElement(fe,de)},cssCaptured:re});le&&(n.push({parentId:Q,nextId:ie,node:le}),i.add(le.id))}};r.mapRemoves.length;){var l=r.mapRemoves.shift();r.cleanupRemovedNode(l),r.mirror.removeNodeFromMap(l)}for(var c=ir(r.movedSet),d;!(d=c()).done;){var f=d.value;Ioe(r.removesSubTreeCache,f,r.mirror)&&!r.movedSet.has(Qn.parentNode(f))||s(f)}for(var h=ir(r.addedSet),p;!(p=h()).done;){var g=p.value;!koe(r.droppedSet,g)&&!Ioe(r.removesSubTreeCache,g,r.mirror)||koe(r.movedSet,g)?s(g):r.droppedSet.add(g)}for(var _=null;a.length;){var b=null;if(_){var E=r.mirror.getId(Qn.parentNode(_.value)),S=o(_.value);E!==-1&&S!==-1&&(b=_)}if(!b)for(var P=a.tail;P;){var O=P;if(P=P.previous,O){var I=r.mirror.getId(Qn.parentNode(O.value)),N=o(O.value);if(N===-1)continue;if(I!==-1){b=O;break}else{var M=O.value,F=Qn.parentNode(M);if(F&&F.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var B=Qn.host(F),V=r.mirror.getId(B);if(V!==-1){b=O;break}}}}}if(!b){for(;a.head;)a.removeNode(a.head.value);break}_=b.previous,a.removeNode(b.value),s(b.value)}var W={texts:r.texts.map(function($){var X=$.node,re=Qn.parentNode(X);return re&&re.tagName==="TEXTAREA"&&r.genTextAreaValueMutation(re),{id:r.mirror.getId(X),value:$.value}}).filter(function($){return!i.has($.id)}).filter(function($){return r.mirror.has($.id)}),attributes:r.attributes.map(function($){var X=$.attributes;if(typeof X.style=="string"){var re=JSON.stringify($.styleDiff),ae=JSON.stringify($._unchangedStyles);re.length<X.style.length&&(re+ae).split("var(").length===X.style.split("var(").length&&(X.style=$.styleDiff)}return{id:r.mirror.getId($.node),attributes:X}}).filter(function($){return!i.has($.id)}).filter(function($){return r.mirror.has($.id)}),removes:r.removes,adds:n};!W.texts.length&&!W.attributes.length&&!W.removes.length&&!W.adds.length||(r.texts=[],r.attributes=[],r.attributeMap=new WeakMap,r.removes=[],r.addedSet=new Set,r.movedSet=new Set,r.droppedSet=new Set,r.removesSubTreeCache=new Set,r.movedMap={},r.mutationCb(W))}}),gr(this,"genTextAreaValueMutation",function(n){var i=r.attributeMap.get(n);i||(i={node:n,attributes:{},styleDiff:{},_unchangedStyles:{}},r.attributes.push(i),r.attributeMap.set(n,i));var a=Array.from(Qn.childNodes(n),function(o){return Qn.textContent(o)||""}).join("");i.attributes.value=NO({element:n,maskInputOptions:r.maskInputOptions,tagName:n.tagName,type:DO(n),value:a,maskInputFn:r.maskInputFn})}),gr(this,"processMutation",function(n){if(!p9(n.target,r.mirror,r.slimDOMOptions))switch(n.type){case"characterData":{var i=Qn.textContent(n.target);!rl(n.target,r.blockClass,r.blockSelector,!1)&&i!==n.oldValue&&r.texts.push({value:OCe(n.target,r.maskTextClass,r.maskTextSelector,!0)&&i?r.maskTextFn?r.maskTextFn(i,Kxe(n.target)):i.replace(/[\S]/g,"*"):i,node:n.target});break}case"attributes":{var a=n.target,o=n.attributeName,s=n.target.getAttribute(o);if(o==="value"){var l=DO(a);s=NO({element:a,maskInputOptions:r.maskInputOptions,tagName:a.tagName,type:l,value:s,maskInputFn:r.maskInputFn})}if(rl(n.target,r.blockClass,r.blockSelector,!1)||s===n.oldValue)return;var c=r.attributeMap.get(n.target);if(a.tagName==="IFRAME"&&o==="src"&&!r.keepIframeSrcFn(s))if(!a.contentDocument)o="rr_src";else return;if(c||(c={node:n.target,attributes:{},styleDiff:{},_unchangedStyles:{}},r.attributes.push(c),r.attributeMap.set(n.target,c)),o==="type"&&a.tagName==="INPUT"&&(n.oldValue||"").toLowerCase()==="password"&&a.setAttribute("data-rr-is-password","true"),!RCe(a.tagName,o))if(c.attributes[o]=PCe(r.doc,Cg(a.tagName),Cg(o),s),o==="style"){if(!r.unattachedDoc)try{r.unattachedDoc=document.implementation.createHTMLDocument()}catch{r.unattachedDoc=r.doc}var d=r.unattachedDoc.createElement("span");n.oldValue&&d.setAttribute("style",n.oldValue);for(var f=ir(Array.from(a.style)),h;!(h=f()).done;){var p=h.value,g=a.style.getPropertyValue(p),_=a.style.getPropertyPriority(p);g!==d.style.getPropertyValue(p)||_!==d.style.getPropertyPriority(p)?_===""?c.styleDiff[p]=g:c.styleDiff[p]=[g,_]:c._unchangedStyles[p]=[g,_]}for(var b=ir(Array.from(d.style)),E;!(E=b()).done;){var S=E.value;a.style.getPropertyValue(S)===""&&(c.styleDiff[S]=!1)}}else o==="open"&&a.tagName==="DIALOG"&&(a.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}
vendor: 5,294 bytes, line 96
96case"childList":{if(rl(n.target,r.blockClass,r.blockSelector,!0))return;if(n.target.tagName==="TEXTAREA"){r.genTextAreaValueMutation(n.target);return}n.addedNodes.forEach(function(P){return r.genAdds(P,n.target)}),n.removedNodes.forEach(function(P){var O=r.mirror.getId(P),I=wS(n.target)?r.mirror.getId(Qn.host(n.target)):r.mirror.getId(n.target);rl(n.target,r.blockClass,r.blockSelector,!1)||p9(P,r.mirror,r.slimDOMOptions)||!Vdt(P,r.mirror)||(r.addedSet.has(P)?(aU(r.addedSet,P),r.droppedSet.add(P)):r.addedSet.has(n.target)&&O===-1||Yxe(n.target,r.mirror)||(r.movedSet.has(P)&&r.movedMap[Ooe(O,I)]?aU(r.movedSet,P):(r.removes.push({parentId:I,id:O,isShadow:wS(n.target)&&SS(n.target)?!0:void 0}),Ydt(P,r.removesSubTreeCache))),r.mapRemoves.push(P))});break}}}),gr(this,"genAdds",function(n,i){if(!r.processedNodeManager.inOtherBuffer(n,r)&&!(r.addedSet.has(n)||r.movedSet.has(n))){if(r.mirror.hasNode(n)){if(p9(n,r.mirror,r.slimDOMOptions))return;r.movedSet.add(n);var a=null;i&&r.mirror.hasNode(i)&&(a=r.mirror.getId(i)),a&&a!==-1&&(r.movedMap[Ooe(r.mirror.getId(n),a)]=!0)}else r.addedSet.add(n),r.droppedSet.delete(n);rl(n,r.blockClass,r.blockSelector,!1)||(Qn.childNodes(n).forEach(function(o){return r.genAdds(o)}),iU(n)&&Qn.childNodes(Qn.shadowRoot(n)).forEach(function(o){r.processedNodeManager.add(o,r),r.genAdds(o,n)}))}}),gr(this,"cleanupRemovedNode",function(n){if(n.nodeName==="IFRAME")try{r.iframeManager.removeIframe(n)}catch{}else try{r.stylesheetManager.cleanupStylesheetsForRemovedNode(n)}catch{}n.childNodes.forEach(function(i){r.cleanupRemovedNode(i)})})}var t=e.prototype;return t.init=function(n){var i=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(a){i[a]=n[a]})},t.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},t.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},t.isFrozen=function(){return this.frozen},t.lock=function(){this.locked=!0,this.canvasManager.lock()},t.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},t.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},t.getDoc=function(){return this.doc},e})();function aU(e,t){e.delete(t),Qn.childNodes(t).forEach(function(r){return aU(e,r)})}function Ydt(e,t){for(var r=[e];r.length;){var n=r.pop();t.has(n)||(t.add(n),Qn.childNodes(n).forEach(function(i){return r.push(i)}))}}function Ioe(e,t,r){return e.size===0?!1:Xdt(e,t)}function Xdt(e,t,r){var n=Qn.parentNode(t);return n?e.has(n):!1}function koe(e,t){return e.size===0?!1:t2e(e,t)}function t2e(e,t){var r=Qn.parentNode(t);return r?e.has(r)?!0:t2e(e,r):!1}var CS;function Zdt(e){CS=e}function Qdt(){CS=void 0}var ci=function(e){if(!CS)return e;var t=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];try{return e.apply(void 0,[].concat(n))}catch(a){if(CS&&CS(a)===!0)return;throw a}};return t},Sd=[];function o2(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]}catch{}return e&&e.target}function r2e(e,t){var r=new Kdt;Sd.push(r),r.init(e);var n=new(jxe())(ci(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function Jdt(e){for(var t=Sd.length-1;t>=0;t--){var r=Sd[t];r.getDoc()===e&&Sd.splice(t,1)}}function eft(e){var t=e.mousemoveCb,r=e.sampling,n=e.doc,i=e.mirror;if(r.mousemove===!1)return function(){};var a=typeof r.mousemove=="number"?r.mousemove:50,o=typeof r.mousemoveCallback=="number"?r.mousemoveCallback:500,s=[],l,c=OC(ci(function(h){var p=Date.now()-l;t(s.map(function(g){return g.timeOffset-=p,g}),h),s=[],l=null}),o),d=ci(OC(ci(function(h){var p=o2(h),g=nU(h)?h.changedTouches[0]:h,_=g.clientX,b=g.clientY;l||(l=$O()),s.push({x:_,y:b,id:i.getId(p),timeOffset:$O()-l}),c(typeof DragEvent<"u"&&Gr(h,DragEvent)?_n.Drag:Gr(h,MouseEvent)?_n.MouseMove:_n.TouchMove)}),a,{trailing:!1})),f=[tl("mousemove",d,n),tl("touchmove",d,n),tl("drag",d,n)];return ci(function(){f.forEach(function(h){return h()})})}function tft(e){var t=e.mouseInteractionCb,r=e.doc,n=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.sampling;if(o.mouseInteraction===!1)return function(){};var s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],c=null,d=function(f){return function(h){var p=o2(h);if(!rl(p,i,a,!0)){var g=null,_=f;if("pointerType"in h){switch(h.pointerType){case"mouse":g=Ef.Mouse;break;case"touch":g=Ef.Touch;break;case"pen":g=Ef.Pen;break}g===Ef.Touch?bl[f]===bl.MouseDown?_="TouchStart":bl[f]===bl.MouseUp&&(_="TouchEnd"):Ef.Pen}else nU(h)&&(g=Ef.Touch);g!==null?(c=g,(_.startsWith("Touch")&&g===Ef.Touch||_.startsWith("Mouse")&&g===Ef.Mouse)&&(g=null)):bl[f]===bl.Click&&(g=c,c=null);var b=nU(h)?h.changedTouches[0]:h;if(b){var E=n.getId(p),S=b.clientX,P=b.clientY;ci(t)(Mn({type:bl[_],id:E,x:S,y:P},g!==null&&{pointerType:g}))}}}};return Object.keys(bl).filter(function(f){return Number.isNaN(Number(f))&&
vendor: 25,115 bytes, line 96
96!f.endsWith("_Departed")&&s[f]!==!1}).forEach(function(f){var h=Cg(f),p=d(f);if(window.PointerEvent)switch(bl[f]){case bl.MouseDown:case bl.MouseUp:h=h.replace("mouse","pointer");break;case bl.TouchStart:case bl.TouchEnd:return}l.push(tl(h,p,r))}),ci(function(){l.forEach(function(f){return f()})})}function n2e(e){var t=e.scrollCb,r=e.doc,n=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.sampling,s=ci(OC(ci(function(l){var c=o2(l);if(!(!c||rl(c,i,a,!0))){var d=n.getId(c);if(c===r&&r.defaultView){var f=$xe(r.defaultView);t({id:d,x:f.left,y:f.top})}else t({id:d,x:c.scrollLeft,y:c.scrollTop})}}),o.scroll||100));return tl("scroll",s,r)}function rft(e,t){var r=e.viewportResizeCb,n=t.win,i=-1,a=-1,o=ci(OC(ci(function(){var s=Wxe(),l=Gxe();(i!==s||a!==l)&&(r({width:Number(l),height:Number(s)}),i=s,a=l)}),200));return tl("resize",o,n)}var nft=["INPUT","TEXTAREA","SELECT"],Noe=new WeakMap;function ift(e){var t=e.inputCb,r=e.doc,n=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.ignoreClass,s=e.ignoreSelector,l=e.maskInputOptions,c=e.maskInputFn,d=e.sampling,f=e.userTriggeredOnInput;function h(O){var I=o2(O),N=O.isTrusted,M=I&&I.tagName;if(I&&M==="OPTION"&&(I=Qn.parentElement(I)),!(!I||!M||nft.indexOf(M)<0||rl(I,i,a,!0))&&!(I.classList.contains(o)||s&&I.matches(s))){var F=I.value,B=!1,V=DO(I)||"";V==="radio"||V==="checkbox"?B=I.checked:(l[M.toLowerCase()]||l[V])&&(F=NO({element:I,maskInputOptions:l,tagName:M,type:V,value:F,maskInputFn:c})),p(I,f?{text:F,isChecked:B,userTriggered:N}:{text:F,isChecked:B});var W=I.name;V==="radio"&&W&&B&&r.querySelectorAll('input[type="radio"][name="'+W+'"]').forEach(function($){if($!==I){var X=$.value;p($,f?{text:X,isChecked:!B,userTriggered:!1}:{text:X,isChecked:!B})}})}}function p(O,I){var N=Noe.get(O);if(!N||N.text!==I.text||N.isChecked!==I.isChecked){Noe.set(O,I);var M=n.getId(O);ci(t)(Mn({},I,{id:M}))}}var g=d.input==="last"?["change"]:["input","change"],_=g.map(function(O){return tl(O,ci(h),r)}),b=r.defaultView;if(!b)return function(){_.forEach(function(O){return O()})};var E=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),S=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];if(E&&E.set){var P;(P=_).push.apply(P,[].concat(S.map(function(O){return V5(O[0],O[1],{set:function(){ci(h)({target:this,isTrusted:!1})}},!1,b)})))}return ci(function(){_.forEach(function(O){return O()})})}function WO(e){var t=[];function r(n,i){if(pA("CSSGroupingRule")&&Gr(n.parentRule,CSSGroupingRule)||pA("CSSMediaRule")&&Gr(n.parentRule,CSSMediaRule)||pA("CSSSupportsRule")&&Gr(n.parentRule,CSSSupportsRule)||pA("CSSConditionRule")&&Gr(n.parentRule,CSSConditionRule)){var a=Array.from(n.parentRule.cssRules),o=a.indexOf(n);i.unshift(o)}else if(n.parentStyleSheet){var s=Array.from(n.parentStyleSheet.cssRules),l=s.indexOf(n);i.unshift(l)}return i}return r(e,t)}function gp(e,t,r){var n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function aft(e,t){var r=e.styleSheetRuleCb,n=e.mirror,i=e.stylesheetManager,a=t.win;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return function(){};var o=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ci(function(h,p,g){var _=g[0],b=g[1],E=gp(p,n,i.styleMirror),S=E.id,P=E.styleId;return(S&&S!==-1||P&&P!==-1)&&r({id:S,styleId:P,adds:[{rule:_,index:b}]}),h.apply(p,g)})}),a.CSSStyleSheet.prototype.addRule=function(h,p,g){g===void 0&&(g=this.cssRules.length);var _=h+" { "+p+" }";return a.CSSStyleSheet.prototype.insertRule.apply(this,[_,g])};var s=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ci(function(h,p,g){var _=g[0],b=gp(p,n,i.styleMirror),E=b.id,S=b.styleId;return(E&&E!==-1||S&&S!==-1)&&r({id:E,styleId:S,removes:[{index:_}]}),h.apply(p,g)})}),a.CSSStyleSheet.prototype.removeRule=function(h){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};var l;a.CSSStyleSheet.prototype.replace&&(l=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:ci(function(h,p,g){var _=g[0],b=gp(p,n,i.styleMirror),E=b.id,S=b.styleId;return(E&&E!==-1||S&&S!==-1)&&r({id:E,styleId:S,replace:_}),h.apply(p,g)})}));var c;a.CSSStyleSheet.prototype.replaceSync&&(c=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ci(function(h,p,g){var _=g[0],b=gp(p,n,i.styleMirror),E=b.id,S=b.styleId;return(E&&E!==-1||S&&S!==-1)&&r({id:E,styleId:S,replaceSync:_}),h.apply(p,g)})}));var d={};mA("CSSGroupingRule")?d.CSSGroupingRule=a.CSSGroupingRule:(mA("CSSMediaRule")&&(d.CSSMediaRule=a.CSSMediaRule),mA("CSSConditionRule")&&(d.CSSConditionRule=a.CSSConditionRule),mA("CSSSupportsRule")&&(d.CSSSupportsRule=a.CSSSupportsRule));var f={};return Object.entries(d).forEach(function(h){var p=h[0],g=h[1];f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:ci(function(_,b,E){var S=E[0],P=E[1],O=gp(b.parentStyleSheet,n,i.styleMirror),I=O.id,N=O.styleId;return(I&&I!==-1||N&&N!==-1)&&r({id:I,styleId:N,adds:[{rule:S,index:[].concat(WO(b),[P||0])}]}),_.apply(b,E)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:ci(function(_,b,E){var S=E[0],P=gp(b.parentStyleSheet,n,i.styleMirror),O=P.id,I=P.styleId;return(O&&O!==-1||I&&I!==-1)&&r({id:O,styleId:I,removes:[{index:[].concat(WO(b),[S])}]}),_.apply(b,E)})})}),ci(function(){a.CSSStyleSheet.prototype.insertRule=o,a.CSSStyleSheet.prototype.deleteRule=s,l&&(a.CSSStyleSheet.prototype.replace=l),c&&(a.CSSStyleSheet.prototype.replaceSync=c),Object.entries(d).forEach(function(h){var p=h[0],g=h[1];g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function i2e(e,t){var r=e.mirror,n=e.stylesheetManager,i,a,o,s=null;t.nodeName==="#document"?s=r.getId(t):s=r.getId(Qn.host(t));var l=t.nodeName==="#document"?(i=t.defaultView)==null?void 0:i.Document:(o=(a=t.ownerDocument)==null?void 0:a.defaultView)==null?void 0:o.ShadowRoot,c=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!l||!c?function(){}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var f;return(f=c.get)==null?void 0:f.call(this)},set:function(f){var h,p=(h=c.set)==null?void 0:h.call(this,f);if(s!==null&&s!==-1)try{n.adoptStyleSheets(f,s)}catch{}return p}}),ci(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function oft(e,t){var r=e.styleDeclarationCb,n=e.mirror,i=e.ignoreCSSAttributes,a=e.stylesheetManager,o=t.win,s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ci(function(c,d,f){var h,p=f[0],g=f[1],_=f[2];if(i.has(p))return s.apply(d,[p,g,_]);var b=gp((h=d.parentRule)==null?void 0:h.parentStyleSheet,n,a.styleMirror),E=b.id,S=b.styleId;return(E&&E!==-1||S&&S!==-1)&&r({id:E,styleId:S,set:{property:p,value:g,priority:_},index:WO(d.parentRule)}),c.apply(d,f)})});var l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ci(function(c,d,f){var h,p=f[0];if(i.has(p))return l.apply(d,[p]);var g=gp((h=d.parentRule)==null?void 0:h.parentStyleSheet,n,a.styleMirror),_=g.id,b=g.styleId;return(_&&_!==-1||b&&b!==-1)&&r({id:_,styleId:b,remove:{property:p},index:WO(d.parentRule)}),c.apply(d,f)})}),ci(function(){o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=l})}function sft(e){var t=e.mediaInteractionCb,r=e.blockClass,n=e.blockSelector,i=e.mirror,a=e.sampling,o=e.doc,s=ci(function(c){return OC(ci(function(d){var f=o2(d);if(!(!f||rl(f,r,n,!0))){var h=f.currentTime,p=f.volume,g=f.muted,_=f.playbackRate,b=f.loop;t({type:c,id:i.getId(f),currentTime:h,volume:p,muted:g,playbackRate:_,loop:b})}}),a.media||500)}),l=[tl("play",s(fy.Play),o),tl("pause",s(fy.Pause),o),tl("seeked",s(fy.Seeked),o),tl("volumechange",s(fy.VolumeChange),o),tl("ratechange",s(fy.RateChange),o)];return ci(function(){l.forEach(function(c){return c()})})}function lft(e){var t=e.fontCb,r=e.doc,n=r.defaultView;if(!n)return function(){};var i=[],a=new WeakMap,o=n.FontFace;n.FontFace=function(c,d,f){var h=new o(c,d,f);return a.set(h,{family:c,buffer:typeof d!="string",descriptors:f,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),h};var s=l0(r.fonts,"add",function(l){return function(c){return setTimeout(ci(function(){var d=a.get(c);d&&(t(d),a.delete(c))}),0),l.apply(this,[c])}});return i.push(function(){n.FontFace=o}),i.push(s),ci(function(){i.forEach(function(l){return l()})})}function cft(e){var t=e.doc,r=e.mirror,n=e.blockClass,i=e.blockSelector,a=e.selectionCb,o=!0,s=ci(function(){var l=t.getSelection();if(!(!l||o&&l?.isCollapsed)){o=l.isCollapsed||!1;for(var c=[],d=l.rangeCount||0,f=0;f<d;f++){var h=l.getRangeAt(f),p=h.startContainer,g=h.startOffset,_=h.endContainer,b=h.endOffset,E=rl(p,n,i,!0)||rl(_,n,i,!0);E||c.push({start:r.getId(p),startOffset:g,end:r.getId(_),endOffset:b})}a({ranges:c})}});return s(),tl("selectionchange",s)}function uft(e){var t=e.doc,r=e.customElementCb,n=t.defaultView;if(!n||!n.customElements)return function(){};var i=l0(n.customElements,"define",function(a){return function(o,s,l){try{r({define:{name:o}})}catch{console.warn("Custom element callback failed for "+o)}return a.apply(this,[o,s,l])}});return i}function dft(e,t){var r=e.mutationCb,n=e.mousemoveCb,i=e.mouseInteractionCb,a=e.scrollCb,o=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,f=e.canvasMutationCb,h=e.fontCb,p=e.selectionCb,g=e.customElementCb;e.mutationCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.mutation){var S;(S=t).mutation.apply(S,[].concat(b))}r.apply(void 0,[].concat(b))},e.mousemoveCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.mousemove){var S;(S=t).mousemove.apply(S,[].concat(b))}n.apply(void 0,[].concat(b))},e.mouseInteractionCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.mouseInteraction){var S;(S=t).mouseInteraction.apply(S,[].concat(b))}i.apply(void 0,[].concat(b))},e.scrollCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.scroll){var S;(S=t).scroll.apply(S,[].concat(b))}a.apply(void 0,[].concat(b))},e.viewportResizeCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.viewportResize){var S;(S=t).viewportResize.apply(S,[].concat(b))}o.apply(void 0,[].concat(b))},e.inputCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.input){var S;(S=t).input.apply(S,[].concat(b))}s.apply(void 0,[].concat(b))},e.mediaInteractionCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.mediaInteaction){var S;(S=t).mediaInteaction.apply(S,[].concat(b))}l.apply(void 0,[].concat(b))},e.styleSheetRuleCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.styleSheetRule){var S;(S=t).styleSheetRule.apply(S,[].concat(b))}c.apply(void 0,[].concat(b))},e.styleDeclarationCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.styleDeclaration){var S;(S=t).styleDeclaration.apply(S,[].concat(b))}d.apply(void 0,[].concat(b))},e.canvasMutationCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.canvasMutation){var S;(S=t).canvasMutation.apply(S,[].concat(b))}f.apply(void 0,[].concat(b))},e.fontCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.font){var S;(S=t).font.apply(S,[].concat(b))}h.apply(void 0,[].concat(b))},e.selectionCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.selection){var S;(S=t).selection.apply(S,[].concat(b))}p.apply(void 0,[].concat(b))},e.customElementCb=function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];if(t.customElement){var S;(S=t).customElement.apply(S,[].concat(b))}g.apply(void 0,[].concat(b))}}function fft(e,t){t===void 0&&(t={});var r=e.doc.defaultView;if(!r)return function(){};dft(e,t);var n;e.recordDOM&&(n=r2e(e,e.doc));var i=eft(e),a=tft(e),o=n2e(e),s=rft(e,{win:r}),l=ift(e),c=sft(e),d=function(){},f=function(){},h=function(){},p=function(){};e.recordDOM&&(d=aft(e,{win:r}),f=i2e(e,e.doc),h=oft(e,{win:r}),e.collectFonts&&(p=lft(e)));for(var g=cft(e),_=uft(e),b=[],E=ir(e.plugins),S;!(S=E()).done;){var P=S.value;b.push(P.observer(P.callback,r,P.options))}return ci(function(){Sd.forEach(function(O){return O.reset()}),n?.disconnect(),i(),a(),o(),s(),l(),c(),d(),f(),h(),p(),g(),_(),b.forEach(function(O){return O()})})}function pA(e){return typeof window[e]<"u"}function mA(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Doe=(function(){function e(r){gr(this,"iframeIdToRemoteIdMap",new WeakMap),gr(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=r}var t=e.prototype;return t.getId=function(n,i,a,o){var s=a||this.getIdToRemoteIdMap(n),l=o||this.getRemoteIdToIdMap(n),c=s.get(i);return c||(c=this.generateIdFn(),s.set(i,c),l.set(c,i)),c},t.getIds=function(n,i){var a=this,o=this.getIdToRemoteIdMap(n),s=this.getRemoteIdToIdMap(n);return i.map(function(l){return a.getId(n,l,o,s)})},t.getRemoteId=function(n,i,a){var o=a||this.getRemoteIdToIdMap(n);if(typeof i!="number")return i;var s=o.get(i);return s||-1},t.getRemoteIds=function(n,i){var a=this,o=this.getRemoteIdToIdMap(n);return i.map(function(s){return a.getRemoteId(n,s,o)})},t.reset=function(n){if(!n){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(n),this.iframeRemoteIdToIdMap.delete(n)},t.getIdToRemoteIdMap=function(n){var i=this.iframeIdToRemoteIdMap.get(n);return i||(i=new Map,this.iframeIdToRemoteIdMap.set(n,i)),i},t.getRemoteIdToIdMap=function(n){var i=this.iframeRemoteIdToIdMap.get(n);return i||(i=new Map,this.iframeRemoteIdToIdMap.set(n,i)),i},e})(),hft=(function(){function e(r){gr(this,"iframes",new WeakMap),gr(this,"crossOriginIframeMap",new WeakMap),gr(this,"crossOriginIframeMirror",new Doe(ACe)),gr(this,"crossOriginIframeStyleMirror"),gr(this,"crossOriginIframeRootIdMap",new WeakMap),gr(this,"iframeContentDocumentMap",new WeakMap),gr(this,"iframeObserverCleanupMap",new WeakMap),gr(this,"mirror"),gr(this,"mutationCb"),gr(this,"wrappedEmit"),gr(this,"loadListener"),gr(this,"stylesheetManager"),gr(this,"recordCrossOriginIframes"),this.mutationCb=r.mutationCb,this.wrappedEmit=r.wrappedEmit,this.stylesheetManager=r.stylesheetManager,this.recordCrossOriginIframes=r.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Doe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=r.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var t=e.prototype;return t.addIframe=function(n){this.iframes.set(n,!0),n.contentWindow&&this.crossOriginIframeMap.set(n.contentWindow,n)},t.getIframeContentDocument=function(n){return this.iframeContentDocumentMap.get(n)},t.setObserverCleanup=function(n,i){this.iframeObserverCleanupMap.set(n,i)},t.getObserverCleanup=function(n){return this.iframeObserverCleanupMap.get(n)},t.removeIframe=function(n){var i=this.iframeContentDocumentMap.get(n);i&&(this.stylesheetManager.cleanupStylesheetsForRemovedNode(i),this.mirror.removeNodeFromMap(i,!0)),this.iframes.delete(n),this.iframeContentDocumentMap.delete(n);var a=this.iframeObserverCleanupMap.get(n);if(a){try{a()}catch{}this.iframeObserverCleanupMap.delete(n)}},t.addLoadListener=function(n){this.loadListener=n},t.attachIframe=function(n,i){var a,o;this.mutationCb({adds:[{parentId:this.mirror.getId(n),nextId:null,node:i}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),n.contentDocument&&this.iframeContentDocumentMap.set(n,n.contentDocument),this.recordCrossOriginIframes&&((a=n.contentWindow)==null||a.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,n),n.contentDocument&&n.contentDocument.adoptedStyleSheets&&n.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.contentDocument.adoptedStyleSheets,this.mirror.getId(n.contentDocument))},t.handleMessage=function(n){var i=n;if(!(i.data.type!=="rrweb"||i.origin!==i.data.origin)){var a=n.source;if(a){var o=this.crossOriginIframeMap.get(n.source);if(o){var s=this.transformCrossOriginEvent(o,i.data.event);s&&this.wrappedEmit(s,i.data.isCheckout)}}}},t.transformCrossOriginEvent=function(n,i){var a=this,o;switch(i.type){case ii.FullSnapshot:{this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(i.data.node,n);var s=i.data.node.id;return this.crossOriginIframeRootIdMap.set(n,s),this.patchRootIdOnNode(i.data.node,s),{timestamp:i.timestamp,type:ii.IncrementalSnapshot,data:{source:_n.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:i.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ii.Meta:case ii.Load:case ii.DomContentLoaded:return!1;case ii.Plugin:return i;case ii.Custom:return this.replaceIds(i.data.payload,n,["id","parentId","previousId","nextId"]),i;case ii.IncrementalSnapshot:switch(i.data.source){case _n.Mutation:return i.data.adds.forEach(function(l){a.replaceIds(l,n,["parentId","nextId","previousId"]),a.replaceIdOnNode(l.node,n);var c=a.crossOriginIframeRootIdMap.get(n);c&&a.patchRootIdOnNode(l.node,c)}),i.data.removes.forEach(function(l){a.replaceIds(l,n,["parentId","id"])}),i.data.attributes.forEach(function(l){a.replaceIds(l,n,["id"])}),i.data.texts.forEach(function(l){a.replaceIds(l,n,["id"])}),i;case _n.Drag:case _n.TouchMove:case _n.MouseMove:return i.data.positions.forEach(function(l){a.replaceIds(l,n,["id"])}),i;case _n.ViewportResize:return!1;case _n.MediaInteraction:case _n.MouseInteraction:case _n.Scroll:case _n.CanvasMutation:case _n.Input:return this.replaceIds(i.data,n,["id"]),i;case _n.StyleSheetRule:case _n.StyleDeclaration:return this.replaceIds(i.data,n,["id"]),this.replaceStyleIds(i.data,n,["styleId"]),i;case _n.Font:return i;case _n.Selection:return i.data.ranges.forEach(function(l){a.replaceIds(l,n,["start","end"])}),i;case _n.AdoptedStyleSheet:return this.replaceIds(i.data,n,["id"]),this.replaceStyleIds(i.data,n,["styleIds"]),(o=i.data.styles)==null||o.forEach(function(l){a.replaceStyleIds(l,n,["styleId"])}),i}}return!1},t.replace=function(n,i,a,o){for(var s=ir(o),l;!(l=s()).done;){var c=l.value;!Array.isArray(i[c])&&typeof i[c]!="number"||(Array.isArray(i[c])?i[c]=n.getIds(a,i[c]):i[c]=n.getId(a,i[c]))}return i},t.replaceIds=function(n,i,a){return this.replace(this.crossOriginIframeMirror,n,i,a)},t.replaceStyleIds=function(n,i,a){return this.replace(this.crossOriginIframeStyleMirror,n,i,a)},t.replaceIdOnNode=function(n,i){var a=this;this.replaceIds(n,i,["id","rootId"]),"childNodes"in n&&n.childNodes.forEach(function(o){a.replaceIdOnNode(o,i)})},t.patchRootIdOnNode=function(n,i){var a=this;n.type!==e2e.Document&&!n.rootId&&(n.rootId=i),"childNodes"in n&&n.childNodes.forEach(function(o){a.patchRootIdOnNode(o,i)})},e})(),pft=(function(){function e(r){gr(this,"shadowDoms",new WeakSet),gr(this,"mutationCb"),gr(this,"scrollCb"),gr(this,"bypassOptions"),gr(this,"mirror"),gr(this,"restoreHandlers",[]),this.mutationCb=r.mutationCb,this.scrollCb=r.scrollCb,this.bypassOptions=r.bypassOptions,this.mirror=r.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(n,i){var a=this;if(SS(n)&&!this.shadowDoms.has(n)){this.shadowDoms.add(n);var o=r2e(Mn({},this.bypassOptions,{doc:i,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),n);this.restoreHandlers.push(function(){return o.disconnect()}),this.restoreHandlers.push(n2e(Mn({},this.bypassOptions,{scrollCb:this.scrollCb,doc:n,mirror:this.mirror}))),setTimeout(function(){n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&a.bypassOptions.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,a.mirror.getId(Qn.host(n))),a.restoreHandlers.push(i2e({mirror:a.mirror,stylesheetManager:a.bypassOptions.stylesheetManager},n))},0)}},t.observeAttachShadow=function(n){!n.contentWindow||!n.contentDocument||this.patchAttachShadow(n.contentWindow.Element,n.contentDocument)},t.patchAttachShadow=function(n,i){var a=this;this.restoreHandlers.push(l0(n.prototype,"attachShadow",function(o){return function(s){var l=o.call(this,s),c=Qn.shadowRoot(this);return c&&Jxe(this)&&a.addShadowRoot(c,i),l}}))},t.reset=function(){this.restoreHandlers.forEach(function(n){try{n()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e})(),xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mft=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var vA=0;vA<xy.length;vA++)mft[xy.charCodeAt(vA)]=vA;var vft=function(t){var r=new Uint8Array(t),n,i=r.length,a="";for(n=0;n<i;n+=3)a+=xy[r[n]>>2],a+=xy[(r[n]&3)<<4|r[n+1]>>4],a+=xy[(r[n+1]&15)<<2|r[n+2]>>6],a+=xy[r[n+2]&63];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},Moe=new Map;function gft(e,t){var r=Moe.get(e);return r||(r=new Map,Moe.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var a2e=function(e,t,r){if(!(!e||!(s2e(e,t)||(typeof e>"u"?"undefined":Kr(e))==="object"))){var n=e.constructor.name,i=gft(r,n),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a}};function eR(e,t,r){if(Gr(e,Array))return e.map(function(g){return eR(g,t,r)});if(e===null)return e;if(Gr(e,Float32Array)||Gr(e,Float64Array)||Gr(e,Int32Array)||Gr(e,Uint32Array)||Gr(e,Uint8Array)||Gr(e,Uint16Array)||Gr(e,Int16Array)||Gr(e,Int8Array)||Gr(e,Uint8ClampedArray)){var n=e.constructor.name;return{rr_type:n,args:[Object.values(e)]}}else if(Gr(e,ArrayBuffer)){var i=e.constructor.name,a=vft(e);return{rr_type:i,base64:a}}else if(Gr(e,DataView)){var o=e.constructor.name;return{rr_type:o,args:[eR(e.buffer,t,r),e.byteOffset,e.byteLength]}}else if(Gr(e,HTMLImageElement)){var s=e.constructor.name,l=e.src;return{rr_type:s,src:l}}else if(Gr(e,HTMLCanvasElement)){var c="HTMLImageElement",d=e.toDataURL();return{rr_type:c,src:d}}else if(Gr(e,ImageData)){var f=e.constructor.name;return{rr_type:f,args:[eR(e.data,t,r),e.width,e.height]}}else if(s2e(e,t)||(typeof e>"u"?"undefined":Kr(e))==="object"){var h=e.constructor.name,p=a2e(e,t,r);return{rr_type:h,index:p}}return e}var o2e=function(e,t,r){return e.map(function(n){return eR(n,t,r)})},s2e=function(e,t){var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"],n=r.filter(function(i){return typeof t[i]=="function"});return!!n.find(function(i){return Gr(e,t[i])})};function yft(e,t,r,n){for(var i=function(){var c=l.value;try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")return"continue";var d=l0(t.CanvasRenderingContext2D.prototype,c,function(h){return function(){for(var p=this,g=arguments.length,_=new Array(g),b=0;b<g;b++)_[b]=arguments[b];return rl(this.canvas,r,n,!0)||setTimeout(function(){var E=o2e(_,t,p);e(p.canvas,{type:O1["2D"],property:c,args:E})},0),h.apply(this,_)}});a.push(d)}catch{var f=V5(t.CanvasRenderingContext2D.prototype,c,{set:function(g){e(this.canvas,{type:O1["2D"],property:c,args:[g],setter:!0})}});a.push(f)}},a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=ir(o),l;!(l=s()).done;)i();return function(){a.forEach(function(c){return c()})}}function _ft(e){return e==="experimental-webgl"?"webgl":e}function Loe(e,t,r,n){var i=[];try{var a=l0(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];if(!rl(this,t,r,!0)){var f=_ft(s);if("__context"in this||(this.__context=f),n&&["webgl","webgl2"].includes(f))if(c[0]&&Kr(c[0])==="object"){var h=c[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[].concat([s],c))}});i.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach(function(o){return o()})}}function Foe(e,t,r,n,i,a){for(var o=function(){var f=d.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))return"continue";try{if(typeof e[f]!="function")return"continue";var h=l0(e,f,function(g){return function(){for(var _=arguments.length,b=new Array(_),E=0;E<_;E++)b[E]=arguments[E];var S=g.apply(this,b);
96if(a2e(S,a,this),"tagName"in this.canvas&&!rl(this.canvas,n,i,!0)){var P=o2e(b,a,this),O={type:t,property:f,args:P};r(this.canvas,O)}return S}});s.push(h)}catch{var p=V5(e,f,{set:function(b){r(this.canvas,{type:t,property:f,args:[b],setter:!0})}});s.push(p)}},s=[],l=Object.getOwnPropertyNames(e),c=ir(l),d;!(d=c()).done;)o();return s}function bft(e,t,r,n){var i,a=[];if((i=a).push.apply(i,[].concat(Foe(t.WebGLRenderingContext.prototype,O1.WebGL,e,r,n,t))),typeof t.WebGL2RenderingContext<"u"){var o;(o=a).push.apply(o,[].concat(Foe(t.WebGL2RenderingContext.prototype,O1.WebGL2,e,r,n,t)))}return function(){a.forEach(function(s){return s()})}}var l2e="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
96hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Eft=function(e){return Uint8Array.from(atob(e),function(t){return t.charCodeAt(0)})},Boe=typeof window<"u"&&window.Blob&&new Blob([Eft(l2e)],{type:"text/javascript;charset=utf-8"});function wft(e){var t;try{if(t=Boe&&(window.URL||window.webkitURL).createObjectURL(Boe),!t)throw"";var r=new Worker(t,{name:e?.name});return r.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+l2e,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var Sft=(function(){function e(r){var n=this;gr(this,"pendingCanvasMutations",new Map),gr(this,"rafStamps",{latestId:0,invokeId:null}),gr(this,"mirror"),gr(this,"mutationCb"),gr(this,"resetObservers"),gr(this,"frozen",!1),gr(this,"locked",!1),gr(this,"processMutation",function(f,h){var p=n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId;(p||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(f)||n.pendingCanvasMutations.set(f,[]),n.pendingCanvasMutations.get(f).push(h)});var i=r.sampling,a=i===void 0?"all":i,o=r.win,s=r.blockClass,l=r.blockSelector,c=r.recordCanvas,d=r.dataURLOptions;this.mutationCb=r.mutationCb,this.mirror=r.mirror,c&&a==="all"&&this.initCanvasMutationObserver(o,s,l),c&&typeof a=="number"&&this.initCanvasFPSObserver(a,o,s,l,{dataURLOptions:d})}var t=e.prototype;return t.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},t.freeze=function(){this.frozen=!0},t.unfreeze=function(){this.frozen=!1},t.lock=function(){this.locked=!0},t.unlock=function(){this.locked=!1},t.initCanvasFPSObserver=function(n,i,a,o,s){var l=this,c=Loe(i,a,o,!0),d=new Map,f=new wft;f.onmessage=function(E){var S=E.data.id;if(d.set(S,!1),"base64"in E.data){var P=E.data,O=P.base64,I=P.type,N=P.width,M=P.height;l.mutationCb({id:S,type:O1["2D"],commands:[{property:"clearRect",args:[0,0,N,M]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:O}],type:I}]},0,0]}]})}};var h=1e3/n,p=0,g,_=function(){var E=[];return i.document.querySelectorAll("canvas").forEach(function(S){rl(S,a,o,!0)||E.push(S)}),E},b=function(E){if(p&&E-p<h){g=requestAnimationFrame(b);return}p=E;var S=l;
vendor: 30,449 bytes, lines 96-113
96_().forEach(I5(function(P){var O,I,N,M;return Sg(this,function(F){switch(F.label){case 0:return I=S.mirror.getId(P),d.get(I)?[2]:P.width===0||P.height===0?[2]:(d.set(I,!0),["webgl","webgl2"].includes(P.__context)&&(N=P.getContext(P.__context),((O=N?.getContextAttributes())==null?void 0:O.preserveDrawingBuffer)===!1&&N.clear(N.COLOR_BUFFER_BIT)),[4,createImageBitmap(P)]);case 1:return M=F.sent(),f.postMessage({id:I,bitmap:M,width:P.width,height:P.height,dataURLOptions:s.dataURLOptions},[M]),[2]}})})),g=requestAnimationFrame(b)};g=requestAnimationFrame(b),this.resetObservers=function(){c(),cancelAnimationFrame(g)}},t.initCanvasMutationObserver=function(n,i,a){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var o=Loe(n,i,a,!1),s=yft(this.processMutation.bind(this),n,i,a),l=bft(this.processMutation.bind(this),n,i,a);this.resetObservers=function(){o(),s(),l()}},t.startPendingCanvasMutationFlusher=function(){var n=this;requestAnimationFrame(function(){return n.flushPendingCanvasMutations()})},t.startRAFTimestamping=function(){var n=this,i=function(a){n.rafStamps.latestId=a,requestAnimationFrame(i)};requestAnimationFrame(i)},t.flushPendingCanvasMutations=function(){var n=this;this.pendingCanvasMutations.forEach(function(i,a){var o=n.mirror.getId(a);n.flushPendingCanvasMutationFor(a,o)}),requestAnimationFrame(function(){return n.flushPendingCanvasMutations()})},t.flushPendingCanvasMutationFor=function(n,i){if(!(this.frozen||this.locked)){var a=this.pendingCanvasMutations.get(n);if(!(!a||i===-1)){var o=a.map(function(l){l.type;var c=wg(l,["type"]);return c}),s=a[0].type;this.mutationCb({id:i,type:s,commands:o}),this.pendingCanvasMutations.delete(n)}}},e})(),Cft=(function(){function e(r){gr(this,"trackedLinkElements",new WeakSet),gr(this,"mutationCb"),gr(this,"adoptedStyleSheetCb"),gr(this,"styleMirror",new jdt),this.mutationCb=r.mutationCb,this.adoptedStyleSheetCb=r.adoptedStyleSheetCb}var t=e.prototype;return t.attachLinkElement=function(n,i){"_cssText"in i.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:i.id,attributes:i.attributes}]}),this.trackLinkElement(n)},t.trackLinkElement=function(n){this.trackedLinkElements.has(n)||(this.trackedLinkElements.add(n),this.trackStylesheetInLinkElement(n))},t.adoptStyleSheets=function(n,i){var a,o=function(){var f=d.value,h=void 0;a.styleMirror.has(f)?h=a.styleMirror.getId(f):(h=a.styleMirror.add(f),l.push({styleId:h,rules:Array.from(f.rules||CSSRule,function(p,g){return{rule:CCe(p,f.href),index:g}})})),s.styleIds.push(h)};if(n.length!==0){for(var s={id:i,styleIds:[]},l=[],c=ir(n),d;!(d=c()).done;)a=this,o();l.length>0&&(s.styles=l),this.adoptedStyleSheetCb(s)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.cleanupStylesheetsForRemovedNode=function(n){var i=this;try{if(n.nodeType===Node.DOCUMENT_NODE){var a=n;if(a.adoptedStyleSheets)for(var o=ir(a.adoptedStyleSheets),s;!(s=o()).done;){var l=s.value;this.styleMirror.remove(l)}}if(n.nodeName==="STYLE"){var c=n;c.sheet&&this.styleMirror.remove(c.sheet)}if(n.nodeName==="LINK"&&n.rel==="stylesheet"){var d=n;d.sheet&&this.styleMirror.remove(d.sheet)}n.childNodes&&n.childNodes.forEach(function(f){i.cleanupStylesheetsForRemovedNode(f)})}catch{}},t.trackStylesheetInLinkElement=function(n){},e})(),xft=(function(){function e(){gr(this,"nodeMap",new WeakMap),gr(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(n,i){var a=this.nodeMap.get(n);return a&&Array.from(a).some(function(o){return o!==i})},t.add=function(n,i){var a=this;this.active||(this.active=!0,requestAnimationFrame(function(){a.nodeMap=new WeakMap,a.active=!1})),this.nodeMap.set(n,(this.nodeMap.get(n)||new Set).add(i))},t.destroy=function(){},e})();function Tft(e){try{var t=new URL(e).origin;return t!=="null"?t:null}catch{return null}}function Aft(e){if(!Array.isArray(e)||e.length===0)throw new Error("[rrweb] allowedIframeOrigins must be a non-empty array of origin strings.");for(var t=new Set,r=0;r<e.length;r++){var n=e[r];if(typeof n!="string")throw new Error("[rrweb] allowedIframeOrigins["+r+"] must be a string, got "+(typeof n>"u"?"undefined":Kr(n))+".");var i=Tft(n);i&&t.add(i)}return Object.freeze(t)}var no,tR,m9,GO=!1;try{if(Array.from([1],function(e){return e*2})[0]!==2){var v9=document.createElement("iframe");document.body.appendChild(v9),Array.from=((Uae=v9.contentWindow)==null?void 0:Uae.Array.from)||Array.from,document.body.removeChild(v9)}}catch(e){console.debug("Unable to override Array.from",e)}var hu=Tst();function Am(e){e===void 0&&(e={});var t=e.emit,r=e.checkoutEveryNms,n=e.checkoutEveryNth,i=e.blockClass,a=i===void 0?"rr-block":i,o=e.blockSelector,s=o===void 0?null:o,l=e.ignoreClass,c=l===void 0?"rr-ignore":l,d=e.ignoreSelector,f=d===void 0?null:d,h=e.maskTextClass,p=h===void 0?"rr-mask":h,g=e.maskTextSelector,_=g===void 0?null:g,b=e.inlineStylesheet,E=b===void 0?!0:b,S=e.maskAllInputs,P=e.maskInputOptions,O=e.slimDOMOptions,I=e.maskInputFn,N=e.maskTextFn,M=e.hooks,F=e.packFn,B=e.sampling,V=B===void 0?{}:B,W=e.dataURLOptions,$=W===void 0?{}:W,X=e.mousemoveWait,re=e.recordDOM,ae=re===void 0?!0:re,Q=e.recordCanvas,ie=Q===void 0?!1:Q,le=e.recordCrossOriginIframes,fe=le===void 0?!1:le,de=e.allowedIframeOrigins,ge=e.recordAfter,Ae=ge===void 0?e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load":ge,Fe=e.userTriggeredOnInput,Pe=Fe===void 0?!1:Fe,ce=e.collectFonts,pe=ce===void 0?!1:ce,Ne=e.inlineImages,De=Ne===void 0?!1:Ne,Ve=e.plugins,Ke=e.keepIframeSrcFn,Qe=Ke===void 0?function(){return!1}:Ke,Ue=e.ignoreCSSAttributes,ut=Ue===void 0?new Set([]):Ue,We=e.errorHandler;Zdt(We);var ke;fe&&de&&de.length>0&&(ke=Aft(de),ke.size===0&&(ke=void 0));var Le=fe?window.parent===window:!0,Be=!1;if(!Le)try{window.parent.document&&(Be=!1)}catch{Be=!0}if(Le&&!t)throw new Error("emit function is required");if(!Le&&!Be)return function(){};X!==void 0&&V.mousemove===void 0&&(V.mousemove=X),hu.reset();var Ze=S===!0?{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,hidden:!0}:P!==void 0?P:{password:!0},Et=O===!0||O==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:O==="all",headMetaDescKeywords:O==="all",headTitleMutations:O==="all"}:O||{};qdt();var Yt,sr=0,Kt=function(ze){for(var it=ir(Ve||[]),Je;!(Je=it()).done;){var Jt=Je.value;Jt.eventProcessor&&(ze=Jt.eventProcessor(ze))}return F&&!Be&&(ze=F(ze)),ze};no=function(ze,it){var Je,Jt=ze;if(Jt.timestamp=$O(),(Je=Sd[0])!=null&&Je.isFrozen()&&Jt.type!==ii.FullSnapshot&&!(Jt.type===ii.IncrementalSnapshot&&Jt.data.source===_n.Mutation)&&Sd.forEach(function(Zr){return Zr.unfreeze()}),Le)t?.(Kt(Jt),it);else if(Be){var pr={type:"rrweb",event:Kt(Jt),origin:window.location.origin,isCheckout:it};if(ke)for(var Fr=ir(ke),Or;!(Or=Fr()).done;){var vn=Or.value;window.parent.postMessage(pr,vn)}else window.parent.postMessage(pr,"*")}if(Jt.type===ii.FullSnapshot)Yt=Jt,sr=0;else if(Jt.type===ii.IncrementalSnapshot){if(Jt.data.source===_n.Mutation&&Jt.data.isAttachIframe)return;sr++;var cn=n&&sr>=n,Xr=r&&Jt.timestamp-Yt.timestamp>r;(cn||Xr)&&tR(!0)}};for(var Qt=function(ze){no({type:ii.IncrementalSnapshot,data:Mn({source:_n.Mutation},ze)})},qt=function(ze){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.Scroll},ze)})},hr=function(ze){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.CanvasMutation},ze)})},rr=function(ze){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.AdoptedStyleSheet},ze)})},tr=new Cft({mutationCb:Qt,adoptedStyleSheetCb:rr}),dt=new hft({mirror:hu,mutationCb:Qt,stylesheetManager:tr,recordCrossOriginIframes:fe,wrappedEmit:no}),bt=ir(Ve||[]),nr;!(nr=bt()).done;){var Ee=nr.value;Ee.getMirror&&Ee.getMirror({nodeMirror:hu,crossOriginIframeMirror:dt.crossOriginIframeMirror,crossOriginIframeStyleMirror:dt.crossOriginIframeStyleMirror})}var Oe=new xft;m9=new Sft({recordCanvas:ie,mutationCb:hr,win:window,blockClass:a,blockSelector:s,mirror:hu,sampling:V.canvas,dataURLOptions:$});var Re=new pft({mutationCb:Qt,scrollCb:qt,bypassOptions:{blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:_,inlineStylesheet:E,maskInputOptions:Ze,dataURLOptions:$,maskTextFn:N,maskInputFn:I,recordCanvas:ie,inlineImages:De,sampling:V,slimDOMOptions:Et,iframeManager:dt,stylesheetManager:tr,canvasManager:m9,keepIframeSrcFn:Qe,processedNodeManager:Oe},mirror:hu});tR=function(ze){if(ze===void 0&&(ze=!1),!!ae){no({type:ii.Meta,data:{href:window.location.href,width:Gxe(),height:Wxe()}},ze),tr.reset(),Re.init(),Sd.forEach(function(Je){return Je.lock()});var it=Xst(document,{mirror:hu,blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:_,inlineStylesheet:E,maskAllInputs:Ze,maskTextFn:N,maskInputFn:I,slimDOM:Et,dataURLOptions:$,recordCanvas:ie,inlineImages:De,onSerialize:function(Je){Xxe(Je,hu)&&dt.addIframe(Je),Zxe(Je,hu)&&tr.trackLinkElement(Je),iU(Je)&&Re.addShadowRoot(Qn.shadowRoot(Je),document)},onIframeLoad:function(Je,Jt){dt.attachIframe(Je,Jt),Re.observeAttachShadow(Je)},onStylesheetLoad:function(Je,Jt){tr.attachLinkElement(Je,Jt)},keepIframeSrcFn:Qe});if(!it)return console.warn("Failed to snapshot the document");no({type:ii.FullSnapshot,data:{node:it,initialOffset:$xe(window)}},ze),Sd.forEach(function(Je){return Je.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&tr.adoptStyleSheets(document.adoptedStyleSheets,hu.getId(document))}};try{var pt=[],mt=function(ze){var it;return ci(fft)({mutationCb:Qt,mousemoveCb:function(Je,Jt){return no({type:ii.IncrementalSnapshot,data:{source:Jt,positions:Je}})},mouseInteractionCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.MouseInteraction},Je)})},scrollCb:qt,viewportResizeCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.ViewportResize},Je)})},inputCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.Input},Je)})},mediaInteractionCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.MediaInteraction},Je)})},styleSheetRuleCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.StyleSheetRule},Je)})},styleDeclarationCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.StyleDeclaration},Je)})},canvasMutationCb:hr,fontCb:function(Je){return no({type:ii.IncrementalSnapshot,data:Mn({source:_n.Font},Je)})},selectionCb:function(Je){no({type:ii.IncrementalSnapshot,data:Mn({source:_n.Selection},Je)})},customElementCb:function(Je){no({type:ii.IncrementalSnapshot,data:Mn({source:_n.CustomElement},Je)})},blockClass:a,ignoreClass:c,ignoreSelector:f,maskTextClass:p,maskTextSelector:_,maskInputOptions:Ze,inlineStylesheet:E,sampling:V,recordDOM:ae,recordCanvas:ie,inlineImages:De,userTriggeredOnInput:Pe,collectFonts:pe,doc:ze,maskInputFn:I,maskTextFn:N,keepIframeSrcFn:Qe,blockSelector:s,slimDOMOptions:Et,dataURLOptions:$,mirror:hu,iframeManager:dt,stylesheetManager:tr,shadowDomManager:Re,processedNodeManager:Oe,canvasManager:m9,ignoreCSSAttributes:ut,plugins:((it=Ve?.filter(function(Je){return Je.observer}))==null?void 0:it.map(function(Je){return{observer:Je.observer,options:Je.options,callback:function(Jt){return no({type:ii.Plugin,data:{plugin:Je.name,payload:Jt}})}}}))||[]},M)};dt.addLoadListener(function(ze){try{var it=ze.contentDocument,Je=mt(it);pt.push(Je);var Jt=dt.getObserverCleanup(ze);dt.setObserverCleanup(ze,function(){if(Jt)try{Jt()}catch{}try{Je();var pr=pt.indexOf(Je);pr!==-1&&pt.splice(pr,1),Jdt(it)}catch{}})}catch(pr){console.warn(pr)}});var st=function(){tR(),pt.push(mt(document)),GO=!0};return document.readyState==="interactive"||document.readyState==="complete"?st():(pt.push(tl("DOMContentLoaded",function(){no({type:ii.DomContentLoaded,data:{}}),Ae==="DOMContentLoaded"&&st()})),pt.push(tl("load",function(){no({type:ii.Load,data:{}}),Ae==="load"&&st()},window))),function(){pt.forEach(function(ze){try{ze()}catch(Je){var it=String(Je).toLowerCase();it.includes("cross-origin")||console.warn(Je)}}),Oe.destroy(),GO=!1,Qdt()}}catch(ze){console.warn(ze)}}Am.addCustomEvent=function(e,t){if(!GO)throw new Error("please add custom event after start recording");no({type:ii.Custom,data:{tag:e,payload:t}})};Am.freezePage=function(){Sd.forEach(function(e){return e.freeze()})};Am.takeFullSnapshot=function(e){if(!GO)throw new Error("please take full snapshot after start recording");tR(e)};Am.mirror=hu;var zoe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(zoe||(zoe={}));Am.addCustomEvent;Am.freezePage;Am.takeFullSnapshot;var Hoe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Uoe={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gA={},Pft=function(){return!!globalThis.Zone};function kW(e){if(gA[e])return gA[e];var t=globalThis[e],r=t.prototype,n=e in Hoe?Hoe[e]:void 0,i=!!(n&&n.every(function(d){var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(r,d))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),a=e in Uoe?Uoe[e]:void 0,o=!!(a&&a.every(function(d){var f;return typeof r[d]=="function"&&((f=r[d])==null?void 0:f.toString().includes("[native code]"))}));if(i&&o&&!Pft())return gA[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?gA[e]=c:r}catch{return r}}var g9={};function Pm(e,t,r){var n,i=e+"."+String(r);if(g9[i])return g9[i].call(t);var a=kW(e),o=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return o?(g9[i]=o,o.call(t)):t[r]}var y9={};function c2e(e,t,r){var n=e+"."+String(r);if(y9[n])return y9[n].bind(t);var i=kW(e),a=i[r];return typeof a!="function"?t[r]:(y9[n]=a,a.bind(t))}function Rft(e){return Pm("Node",e,"childNodes")}function Oft(e){return Pm("Node",e,"parentNode")}function Ift(e){return Pm("Node",e,"parentElement")}function kft(e){return Pm("Node",e,"textContent")}function Nft(e,t){return c2e("Node",e,"contains")(t)}function Dft(e){return c2e("Node",e,"getRootNode")()}function Mft(e){return!e||!("host"in e)?null:Pm("ShadowRoot",e,"host")}function Lft(e){return e.styleSheets}function Fft(e){return!e||!("shadowRoot"in e)?null:Pm("Element",e,"shadowRoot")}function Bft(e,t){return Pm("Element",e,"querySelector")(t)}function zft(e,t){return Pm("Element",e,"querySelectorAll")(t)}function Hft(){return kW("MutationObserver").constructor}function Uft(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch{return function(){}}}var Voe={childNodes:Rft,parentNode:Oft,parentElement:Ift,textContent:kft,contains:Nft,getRootNode:Dft,host:Mft,styleSheets:Lft,shadowRoot:Fft,querySelector:Bft,querySelectorAll:zft,mutationObserver:Hft,patch:Uft};function oU(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return oU(Voe.parentNode(e),t);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return oU(Voe.parentNode(e),t)}function Vft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qft(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return Gr(this,n)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var NW={exports:{}},Sa=String,u2e=function(){return{isColorSupported:!1,reset:Sa,bold:Sa,dim:Sa,italic:Sa,underline:Sa,inverse:Sa,hidden:Sa,strikethrough:Sa,black:Sa,red:Sa,green:Sa,yellow:Sa,blue:Sa,magenta:Sa,cyan:Sa,white:Sa,gray:Sa,bgBlack:Sa,bgRed:Sa,bgGreen:Sa,bgYellow:Sa,bgBlue:Sa,bgMagenta:Sa,bgCyan:Sa,bgWhite:Sa}};NW.exports=u2e();NW.exports.createColors=u2e;var jft=NW.exports,$ft={},Wft=Object.freeze(Object.defineProperty({__proto__:null,default:$ft},Symbol.toStringTag,{value:"Module"})),_o=qft(Wft),qoe=jft,joe=_o,sU=(function(e){La(t,e);function t(n,i,a,o,s,l){var c;return c=e.call(this,n)||this,c.name="CssSyntaxError",c.reason=n,s&&(c.file=s),o&&(c.source=o),l&&(c.plugin=l),typeof i<"u"&&typeof a<"u"&&(typeof i=="number"?(c.line=i,c.column=a):(c.line=i.line,c.column=i.column,c.endLine=a.line,c.endColumn=a.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var a=this;if(!this.source)return"";var o=this.source;i==null&&(i=qoe.isColorSupported),joe&&i&&(o=joe(o));var s=o.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),d=String(c).length,f,h;if(i){var p=qoe.createColors(!0),g=p.bold,_=p.gray,b=p.red;f=function(E){return g(b(E))},h=function(E){return _(E)}}else f=h=function(E){return E};return s.slice(l,c).map(function(E,S){var P=l+1+S,O=" "+(" "+P).slice(-d)+" | ";if(P===a.line){var I=h(O.replace(/\d/g," "))+E.slice(0,a.column-1).replace(/[^\t]/g," ");return f(">")+h(O)+E+`
97 `+I+f("^")}return" "+h(O)+E}).join(`
98`)},r.toString=function(){var i=this.showSourceCode();return i&&(i=`
99
100`+i+`
101`),this.name+": "+this.message+i},t})(bC(Error)),DW=sU;sU.default=sU;var Rm={};Rm.isClean=Symbol("isClean");Rm.my=Symbol("my");var $oe={after:`
102`,beforeClose:`
103`,beforeComment:`
104`,beforeDecl:`
105`,beforeOpen:" ",beforeRule:`
106`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function Gft(e){return e[0].toUpperCase()+e.slice(1)}var lU=(function(){function e(r){this.builder=r}var t=e.prototype;return t.atrule=function(n,i){var a="@"+n.name,o=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?a+=n.raws.afterName:o&&(a+=" "),n.nodes)this.block(n,a+o);else{var s=(n.raws.between||"")+(i?";":"");this.builder(a+o+s,n)}},t.beforeAfter=function(n,i){var a;n.type==="decl"?a=this.raw(n,null,"beforeDecl"):n.type==="comment"?a=this.raw(n,null,"beforeComment"):i==="before"?a=this.raw(n,null,"beforeRule"):a=this.raw(n,null,"beforeClose");for(var o=n.parent,s=0;o&&o.type!=="root";)s+=1,o=o.parent;if(a.includes(`
107`)){var l=this.raw(n,null,"indent");if(l.length)for(var c=0;c<s;c++)a+=l}return a},t.block=function(n,i){var a=this.raw(n,"between","beforeOpen");this.builder(i+a+"{",n,"start");var o;n.nodes&&n.nodes.length?(this.body(n),o=this.raw(n,"after")):o=this.raw(n,"after","emptyBody"),o&&this.builder(o),this.builder("}",n,"end")},t.body=function(n){for(var i=n.nodes.length-1;i>0&&n.nodes[i].type==="comment";)i-=1;for(var a=this.raw(n,"semicolon"),o=0;o<n.nodes.length;o++){var s=n.nodes[o],l=this.raw(s,"before");l&&this.builder(l),this.stringify(s,i!==o||a)}},t.comment=function(n){var i=this.raw(n,"left","commentLeft"),a=this.raw(n,"right","commentRight");this.builder("/*"+i+n.text+a+"*/",n)},t.decl=function(n,i){var a=this.raw(n,"between","colon"),o=n.prop+a+this.rawValue(n,"value");n.important&&(o+=n.raws.important||" !important"),i&&(o+=";"),this.builder(o,n)},t.document=function(n){this.body(n)},t.raw=function(n,i,a){var o;if(a||(a=i),i&&(o=n.raws[i],typeof o<"u"))return o;var s=n.parent;if(a==="before"&&(!s||s.type==="root"&&s.first===n||s&&s.type==="document"))return"";if(!s)return $oe[a];var l=n.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[a]<"u")return l.rawCache[a];if(a==="before"||a==="after")return this.beforeAfter(n,a);var c="raw"+Gft(a);return this[c]?o=this[c](l,n):l.walk(function(d){if(o=d.raws[i],typeof o<"u")return!1}),typeof o>"u"&&(o=$oe[a]),l.rawCache[a]=o,o},t.rawBeforeClose=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length>0&&typeof a.raws.after<"u")return i=a.raws.after,i.includes(`
108`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawBeforeComment=function(n,i){var a;return n.walkComments(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
109`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeDecl=function(n,i){var a;return n.walkDecls(function(o){if(typeof o.raws.before<"u")return a=o.raws.before,a.includes(`
110`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(i,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a},t.rawBeforeOpen=function(n){var i;return n.walk(function(a){if(a.type!=="decl"&&(i=a.raws.between,typeof i<"u"))return!1}),i},t.rawBeforeRule=function(n){var i;return n.walk(function(a){if(a.nodes&&(a.parent!==n||n.first!==a)&&typeof a.raws.before<"u")return i=a.raws.before,i.includes(`
111`)&&(i=i.replace(/[^\n]+$/,"")),!1}),i&&(i=i.replace(/\S/g,"")),i},t.rawColon=function(n){var i;return n.walkDecls(function(a){if(typeof a.raws.between<"u")return i=a.raws.between.replace(/[^\s:]/g,""),!1}),i},t.rawEmptyBody=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length===0&&(i=a.raws.after,typeof i<"u"))return!1}),i},t.rawIndent=function(n){if(n.raws.indent)return n.raws.indent;var i;return n.walk(function(a){var o=a.parent;if(o&&o!==n&&o.parent&&o.parent===n&&typeof a.raws.before<"u"){var s=a.raws.before.split(`
112`);return i=s[s.length-1],i=i.replace(/\S/g,""),!1}}),i},t.rawSemicolon=function(n){var i;return n.walk(function(a){if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(i=a.raws.semicolon,typeof i<"u"))return!1}),i},t.rawValue=function(n,i){var a=n[i],o=n.raws[i];return o&&o.value===a?o.raw:a},t.root=function(n){this.body(n),n.raws.after&&this.builder(n.raws.after)},t.rule=function(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end")},t.stringify=function(n,i){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,i)},e})(),d2e=lU;lU.default=lU;var Kft=d2e;function cU(e,t){var r=new Kft(t);r.stringify(e)}var q5=cU;cU.default=cU;var yA=Rm.isClean,Yft=Rm.my,Xft=DW,Zft=d2e,Qft=q5;function uU(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n!=="proxyCache"){var i=e[n],a=typeof i>"u"?"undefined":Kr(i);n==="parent"&&a==="object"?t&&(r[n]=t):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(function(o){return uU(o,r)}):(a==="object"&&i!==null&&(i=uU(i)),r[n]=i)}return r}var dU=(function(){function e(r){r===void 0&&(r={}),this.raws={},this[yA]=!1,this[Yft]=!0;for(var n in r)if(n==="nodes"){this.nodes=[];for(var i=ir(r[n]),a;!(a=i()).done;){var o=a.value;typeof o.clone=="function"?this.append(o.clone()):this.append(o)}}else this[n]=r[n]}var t=e.prototype;return t.addToError=function(n){if(n.postcssNode=this,n.stack&&this.source&&/\n\s{4}at /.test(n.stack)){var i=this.source;n.stack=n.stack.replace(/\n\s{4}at /,"$&"+i.input.from+":"+i.start.line+":"+i.start.column+"$&")}return n},t.after=function(n){return this.parent.insertAfter(this,n),this},t.assign=function(n){n===void 0&&(n={});for(var i in n)this[i]=n[i];return this},t.before=function(n){return this.parent.insertBefore(this,n),this},t.cleanRaws=function(n){delete this.raws.before,delete this.raws.after,n||delete this.raws.between},t.clone=function(n){n===void 0&&(n={});var i=uU(this);for(var a in n)i[a]=n[a];return i},t.cloneAfter=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertAfter(this,i),i},t.cloneBefore=function(n){n===void 0&&(n={});var i=this.clone(n);return this.parent.insertBefore(this,i),i},t.error=function(n,i){if(i===void 0&&(i={}),this.source){var a=this.rangeBy(i),o=a.end,s=a.start;return this.source.input.error(n,{column:s.column,line:s.line},{column:o.column,line:o.line},i)}return new Xft(n)},t.getProxyProcessor=function(){return{get:function(i,a){return a==="proxyOf"?i:a==="root"?function(){return i.root().toProxy()}:i[a]},set:function(i,a,o){return i[a]===o||(i[a]=o,(a==="prop"||a==="value"||a==="name"||a==="params"||a==="important"||a==="text")&&i.markDirty()),!0}}},t.markDirty=function(){if(this[yA]){this[yA]=!1;for(var n=this;n=n.parent;)n[yA]=!1}},t.next=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n+1]}},t.positionBy=function(n,i){var a=this.source.start;if(n.index)a=this.positionInside(n.index,i);else if(n.word){i=this.toString();var o=i.indexOf(n.word);o!==-1&&(a=this.positionInside(o,i))}return a},t.positionInside=function(n,i){for(var a=i||this.toString(),o=this.source.start.column,s=this.source.start.line,l=0;l<n;l++)a[l]===`
113`?(o=1,s+=1):o+=1;return{column:o,line:s}},t.prev=function(){if(this.parent){var n=this.parent.index(this);return this.parent.nodes[n-1]}},t.rangeBy=function(n){var i={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(n.word){var o=this.toString(),s=o.indexOf(n.word);s!==-1&&(i=this.positionInside(s,o),a=this.positionInside(s+n.word.length,o))}else n.start?i={column:n.start.column,line:n.start.line}:n.index&&(i=this.positionInside(n.index)),n.end?a={column:n.end.column,line:n.end.line}:typeof n.endIndex=="number"?a=this.positionInside(n.endIndex):n.index&&(a=this.positionInside(n.index+1));return(a.line<i.line||a.line===i.line&&a.column<=i.column)&&(a={column:i.column+1,line:i.line}),{end:a,start:i}},t.raw=function(n,i){var a=new Zft;return a.raw(this,n,i)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];if(this.parent){for(var o=this,s=!1,l=ir(i),c;!(c=l()).done;){var d=c.value;d===this?s=!0:s?(this.parent.insertAfter(o,d),o=d):this.parent.insertBefore(o,d)}s||this.remove()}return this},t.root=function(){for(var n=this;n.parent&&n.parent.type!=="document";)n=n.parent;return n},t.toJSON=function(n,i){var a={},o=i==null;i=i||new Map;var s=0;for(var l in this)if(Object.prototype.hasOwnProperty.call(this,l)&&!(l==="parent"||l==="proxyCache")){var c=this[l];if(Array.isArray(c))a[l]=c.map(function(f){return(typeof f>"u"?"undefined":Kr(f))==="object"&&f.toJSON?f.toJSON(null,i):f});else if((typeof c>"u"?"undefined":Kr(c))==="object"&&c.toJSON)a[l]=c.toJSON(null,i);else if(l==="source"){var d=i.get(c.input);d==null&&(d=s,i.set(c.input,s),s++),a[l]={end:c.end,inputId:d,start:c.start}}else a[l]=c}return o&&(a.inputs=[].concat(i.keys()).map(function(f){return f.toJSON()})),a},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(n){n===void 0&&(n=Qft),n.stringify&&(n=n.stringify);var i="";return n(this,function(a){i+=a}),i},t.warn=function(n,i,a){var o={node:this};for(var s in a)o[s]=a[s];return n.warn(i,o)},Ra(e,[{key:"proxyOf",get:function(){return this}}]),e})(),j5=dU;dU.default=dU;var Jft=j5,fU=(function(e){La(t,e);function t(r){var n;return r&&typeof r.value<"u"&&typeof r.value!="string"&&(r=Mn({},r,{value:String(r.value)})),n=e.call(this,r)||this,n.type="decl",n}return Ra(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),t})(Jft),$5=fU;fU.default=fU;var eht="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tht=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=eht[Math.random()*64|0];return t},rht={nanoid:tht},Woe=_o.SourceMapConsumer,Goe=_o.SourceMapGenerator,nht=_o.existsSync,iht=_o.readFileSync,_9=_o.dirname,aht=_o.join;function oht(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var hU=(function(){function e(r,n){if(n.map!==!1){this.loadAnnotation(r),this.inline=this.startWith(this.annotation,"data:");var i=n.map?n.map.prev:void 0,a=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=_9(this.mapFile)),a&&(this.text=a)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new Woe(this.text)),this.consumerCache},t.decodeInline=function(n){var i=/^data:application\/json;charset=utf-?8;base64,/,a=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(n)||s.test(n))return decodeURIComponent(n.substr(RegExp.lastMatch.length));if(i.test(n)||a.test(n))return oht(n.substr(RegExp.lastMatch.length));var l=n.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)},t.getAnnotationURL=function(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(n){return(typeof n>"u"?"undefined":Kr(n))!=="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)},t.loadAnnotation=function(n){var i=n.match(/\/\*\s*# sourceMappingURL=/gm);if(i){var a=n.lastIndexOf(i.pop()),o=n.indexOf("*/",a);a>-1&&o>-1&&(this.annotation=this.getAnnotationURL(n.substring(a,o)))}},t.loadFile=function(n){if(this.root=_9(n),nht(n))return this.mapFile=n,iht(n,"utf-8").toString().trim()},t.loadMap=function(n,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){var a=i(n);if(a){var o=this.loadFile(a);if(!o)throw new Error("Unable to load previous source map: "+a.toString());return o}}else{if(Gr(i,Woe))return Goe.fromSourceMap(i).toString();if(Gr(i,Goe))return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var s=this.annotation;return n&&(s=aht(_9(n),s)),this.loadFile(s)}}},t.startWith=function(n,i){return n?n.substr(0,i.length)===i:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e})(),f2e=hU;hU.default=hU;var sht=_o.SourceMapConsumer,lht=_o.SourceMapGenerator,Koe=_o.fileURLToPath,_A=_o.pathToFileURL,pU=_o.isAbsolute,mU=_o.resolve,cht=rht.nanoid,b9=_o,Yoe=DW,uht=f2e,E9=Symbol("fromOffsetCac
113he"),dht=!!(sht&&lht),Xoe=!!(mU&&pU),KO=(function(){function e(r,n){if(n===void 0&&(n={}),r===null||typeof r>"u"||(typeof r>"u"?"undefined":Kr(r))==="object"&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Xoe||/^\w+:\/\//.test(n.from)||pU(n.from)?this.file=n.from:this.file=mU(n.from)),Xoe&&dht){var i=new uht(this.css,n);if(i.text){this.map=i;var a=i.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+cht(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(n,i,a,o){o===void 0&&(o={});var s,l,c;if(i&&(typeof i>"u"?"undefined":Kr(i))==="object"){var d=i,f=a;if(typeof d.offset=="number"){var h=this.fromOffset(d.offset);i=h.line,a=h.col}else i=d.line,a=d.column;if(typeof f.offset=="number"){var p=this.fromOffset(f.offset);l=p.line,c=p.col}else l=f.line,c=f.column}else if(!a){var g=this.fromOffset(i);i=g.line,a=g.col}var _=this.origin(i,a,l,c);return _?s=new Yoe(n,_.endLine===void 0?_.line:{column:_.column,line:_.line},_.endLine===void 0?_.column:{column:_.endColumn,line:_.endLine},_.source,_.file,o.plugin):s=new Yoe(n,l===void 0?i:{column:a,line:i},l===void 0?a:{column:c,line:l},this.css,this.file,o.plugin),s.input={column:a,endColumn:c,endLine:l,line:i,source:this.css},this.file&&(_A&&(s.input.url=_A(this.file).toString()),s.input.file=this.file),s},t.fromOffset=function(n){var i,a;if(this[E9])a=this[E9];else{var o=this.css.split(`
114`);a=new Array(o.length);for(var s=0,l=0,c=o.length;l<c;l++)a[l]=s,s+=o[l].length+1;this[E9]=a}i=a[a.length-1];var d=0;if(n>=i)d=a.length-1;else for(var f=a.length-2,h;d<f;)if(h=d+(f-d>>1),n<a[h])f=h-1;else if(n>=a[h+1])d=h+1;else{d=h;break}return{col:n-a[d]+1,line:d+1}},t.mapResolve=function(n){return/^\w+:\/\//.test(n)?n:mU(this.map.consumer().sourceRoot||this.map.root||".",n)},t.origin=function(n,i,a,o){if(!this.map)return!1;var s=this.map.consumer(),l=s.originalPositionFor({column:i,line:n});if(!l.source)return!1;var c;typeof a=="number"&&(c=s.originalPositionFor({column:o,line:a}));var d;pU(l.source)?d=_A(l.source):d=new URL(l.source,this.map.consumer().sourceRoot||_A(this.map.mapFile));var f={column:l.column,endColumn:c&&c.column,endLine:c&&c.line,line:l.line,url:d.toString()};if(d.protocol==="file:")if(Koe)f.file=Koe(d);else throw new Error("file: protocol is not available in this PostCSS build");var h=s.sourceContentFor(l.source);return h&&(f.source=h),f},t.toJSON=function(){for(var n={},i=0,a=["hasBOM","css","file","id"];i<a.length;i++){var o=a[i];this[o]!=null&&(n[o]=this[o])}return this.map&&(n.map=Mn({},this.map),n.map.consumerCache&&(n.map.consumerCache=void 0)),n},Ra(e,[{key:"from",get:function(){return this.file||this.id}}]),e})(),W5=KO;KO.default=KO;b9&&b9.registerInput&&b9.registerInput(KO);var h2e=_o.SourceMapConsumer,rR=_o.SourceMapGenerator,nR=_o.dirname,p2e=_o.relative,m2e=_o.resolve,v2e=_o.sep,Zoe=_o.pathToFileURL,fht=W5,hht=!!(h2e&&rR),pht=!!(nR&&m2e&&p2e&&v2e),mht=(function(){function e(r,n,i,a){this.stringify=r,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";var i=`
115`;this.css.includes(`\r
116`)&&(i=`\r
117`),this.css+=i+"/*# sourceMappingURL="+n+" */"},t.applyPrevMaps=function(){for(var n=ir(this.previous()),i;!(i=n()).done;){var a=i.value,o=this.toUrl(this.path(a.file)),s=a.root||nR(a.file),l=void 0;this.mapOpts.sourcesContent===!1?(l=new h2e(a.text),l.sourcesContent&&(l.sourcesContent=null)):l=a.consumer(),this.map.applySourceMap(l,o,this.toUrl(this.path(s)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var n,i=this.root.nodes.length-1;i>=0;i--)n=this.root.nodes[i],n.type==="comment"&&n.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(i);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),pht&&hht&&this.isMap())return this.generateMap();var n="";return this.stringify(this.root,function(i){n+=i}),[n]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=rR.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new rR({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var n=this;this.css="",this.map=new rR({file:this.outputFile(),ignoreInvalidMapping:!0});var i=1,a=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},l,c;this.stringify(this.root,function(d,f,h){if(n.css+=d,f&&h!=="end"&&(s.generated.line=i,s.generated.column=a-1,f.source&&f.source.start?(s.source=n.sourcePath(f),s.original.line=f.source.start.line,s.original.column=f.source.start.column-1,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,n.map.addMapping(s))),l=d.match(/\n/g),l?(i+=l.length,c=d.lastIndexOf(`
118`),a=d.length-c):a+=d.length,f&&h!=="start"){var p=f.parent||{raws:{}},g=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!g||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(s.source=n.sourcePath(f),s.original.line=f.source.end.line,s.original.column=f.source.end.column-1,s.generated.line=i,s.generated.column=a-2,n.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=a-1,n.map.addMapping(s)))}})},t.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(n){return n.annotation}):!0},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var n=this.mapOpts.annotation;return typeof n<"u"&&n!==!0?!1:this.previous().length?this.previous().some(function(i){return i.inline}):!0},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(n){return n.withContent()}):!0},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}
vendor: 44,228 bytes, lines 118-130
118,t.path=function(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;var i=this.memoizedPaths.get(n);if(i)return i;var a=this.opts.to?nR(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(a=nR(m2e(a,this.mapOpts.annotation)));var o=p2e(a,n);return this.memoizedPaths.set(n,o),o},t.previous=function(){var n=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(a){if(a.source&&a.source.input.map){var o=a.source.input.map;n.previousMaps.includes(o)||n.previousMaps.push(o)}});else{var i=new fht(this.originalCSS,this.opts);i.map&&this.previousMaps.push(i.map)}return this.previousMaps},t.setSourcesContent=function(){var n=this,i={};if(this.root)this.root.walk(function(o){if(o.source){var s=o.source.input.from;if(s&&!i[s]){i[s]=!0;var l=n.usesFileUrls?n.toFileUrl(s):n.toUrl(n.path(s));n.map.setSourceContent(l,o.source.input.css)}}});else if(this.css){var a=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(a,this.css)}},t.sourcePath=function(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))},t.toBase64=function(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))},t.toFileUrl=function(n){var i=this.memoizedFileURLs.get(n);if(i)return i;if(Zoe){var a=Zoe(n).toString();return this.memoizedFileURLs.set(n,a),a}else throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(n){var i=this.memoizedURLs.get(n);if(i)return i;v2e==="\\"&&(n=n.replace(/\\/g,"/"));var a=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,a),a},e})(),g2e=mht,vht=j5,vU=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="comment",n}return t})(vht),G5=vU;vU.default=vU;var y2e=Rm.isClean,_2e=Rm.my,b2e=$5,E2e=G5,ght=j5,w2e,MW,LW,S2e;function C2e(e){return e.map(function(t){return t.nodes&&(t.nodes=C2e(t.nodes)),delete t.source,t})}function x2e(e){if(e[y2e]=!1,e.proxyOf.nodes)for(var t=ir(e.proxyOf.nodes),r;!(r=t()).done;){var n=r.value;x2e(n)}}var ph=(function(e){La(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];for(var s=ir(a),l;!(l=s()).done;)for(var c=l.value,d=this.normalize(c,this.last),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.push(p)}return this.markDirty(),this},r.cleanRaws=function(i){if(e.prototype.cleanRaws.call(this,i),this.nodes)for(var a=ir(this.nodes),o;!(o=a()).done;){var s=o.value;s.cleanRaws(i)}},r.each=function(i){if(this.proxyOf.nodes){for(var a=this.getIterator(),o,s;this.indexes[a]<this.proxyOf.nodes.length&&(o=this.indexes[a],s=i(this.proxyOf.nodes[o],o),s!==!1);)this.indexes[a]+=1;return delete this.indexes[a],s}},r.every=function(i){return this.nodes.every(i)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var i=this.lastEach;return this.indexes[i]=0,i},r.getProxyProcessor=function(){return{get:function(a,o){return o==="proxyOf"?a:a[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d;return(d=a)[o].apply(d,[].concat(l.map(function(f){return typeof f=="function"?function(h,p){return f(h.toProxy(),p)}:f})))}:o==="every"||o==="some"?function(s){return a[o](function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];return s.apply(void 0,[].concat([l.toProxy()],d))})}:o==="root"?function(){return a.root().toProxy()}:o==="nodes"?a.nodes.map(function(s){return s.toProxy()}):o==="first"||o==="last"?a[o].toProxy():a[o]:a[o]},set:function(a,o,s){return a[o]===s||(a[o]=s,(o==="name"||o==="params"||o==="selector")&&a.markDirty()),!0}}},r.index=function(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))},r.insertAfter=function(i,a){var o=this.index(i),s=this.normalize(a,this.proxyOf.nodes[o]).reverse();o=this.index(i);for(var l=ir(s),c;!(c=l()).done;){var d=c.value;this.proxyOf.nodes.splice(o+1,0,d)}var f;for(var h in this.indexes)f=this.indexes[h],o<f&&(this.indexes[h]=f+s.length);return this.markDirty(),this},r.insertBefore=function(i,a){var o=this.index(i),s=o===0?"prepend":!1,l=this.normalize(a,this.proxyOf.nodes[o],s).reverse();o=this.index(i);for(var c=ir(l),d;!(d=c()).done;){var f=d.value;this.proxyOf.nodes.splice(o,0,f)}var h;for(var p in this.indexes)h=this.indexes[p],o<=h&&(this.indexes[p]=h+l.length);return this.markDirty(),this},r.normalize=function(i,a){var o=this;if(typeof i=="string")i=C2e(w2e(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(var s=ir(i),l;!(l=s()).done;){var c=l.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(var d=ir(i),f;!(f=d()).done;){var h=f.value;h.parent&&h.parent.removeChild(h,"ignore")}}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new b2e(i)]}else if(i.selector)i=[new MW(i)];else if(i.name)i=[new LW(i)];else if(i.text)i=[new E2e(i)];else throw new Error("Unknown node type in node creation");var p=i.map(function(g){return g[_2e]||t.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[y2e]&&x2e(g),typeof g.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(g.raws.before=a.raws.before.replace(/\S/g,"")),g.parent=o.proxyOf,g});return p},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a=a.reverse();for(var s=ir(a),l;!(l=s()).done;){for(var c=l.value,d=this.normalize(c,this.first,"prepend").reverse(),f=ir(d),h;!(h=f()).done;){var p=h.value;this.proxyOf.nodes.unshift(p)}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+d.length}return this.markDirty(),this},r.push=function(i){return i.parent=this,this.proxyOf.nodes.push(i),this},r.removeAll=function(){for(var i=ir(this.proxyOf.nodes),a;!(a=i()).done;){var o=a.value;o.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);var a;for(var o in this.indexes)a=this.indexes[o],a>=i&&(this.indexes[o]=a-1);return this.markDirty(),this},r.replaceValues=function(i,a,o){return o||(o=a,a={}),this.walkDecls(function(s){a.props&&!a.props.includes(s.prop)||a.fast&&!s.value.includes(a.fast)||(s.value=s.value.replace(i,o))}),this.markDirty(),this},r.some=function(i){return this.nodes.some(i)},r.walk=function(i){return this.each(function(a,o){var s;try{s=i(a,o)}catch(l){throw a.addToError(l)}return s!==!1&&a.walk&&(s=a.walk(i)),s})},r.walkAtRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="atrule"&&i.test(o.name))return a(o,s)}):this.walk(function(o,s){if(o.type==="atrule"&&o.name===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="atrule")return a(o,s)}))},r.walkComments=function(i){return this.walk(function(a,o){if(a.type==="comment")return i(a,o)})},r.walkDecls=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="decl"&&i.test(o.prop))return a(o,s)}):this.walk(function(o,s){if(o.type==="decl"&&o.prop===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="decl")return a(o,s)}))},r.walkRules=function(i,a){return a?Gr(i,RegExp)?this.walk(function(o,s){if(o.type==="rule"&&i.test(o.selector))return a(o,s)}):this.walk(function(o,s){if(o.type==="rule"&&o.selector===i)return a(o,s)}):(a=i,this.walk(function(o,s){if(o.type==="rule")return a(o,s)}))},Ra(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t})(ght);ph.registerParse=function(e){w2e=e};ph.registerRule=function(e){MW=e};ph.registerAtRule=function(e){LW=e};ph.registerRoot=function(e){S2e=e};var c0=ph;ph.default=ph;ph.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,LW.prototype):e.type==="rule"?Object.setPrototypeOf(e,MW.prototype):e.type==="decl"?Object.setPrototypeOf(e,b2e.prototype):e.type==="comment"?Object.setPrototypeOf(e,E2e.prototype):e.type==="root"&&Object.setPrototypeOf(e,S2e.prototype),e[_2e]=!0,e.nodes&&e.nodes.forEach(function(t){ph.rebuild(t)})};var yht=c0,T2e,A2e,IC=(function(e){La(t,e);function t(n){var i;return i=e.call(this,Mn({type:"document"},n))||this,i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.toResult=function(i){i===void 0&&(i={});var a=new T2e(new A2e,this,i);return a.stringify()},t})(yht);IC.registerLazyResult=function(e){T2e=e};IC.registerProcessor=function(e){A2e=e};var FW=IC;IC.default=IC;var gU=(function(){function e(r,n){if(n===void 0&&(n={}),this.type="warning",this.text=r,n.node&&n.node.source){var i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var a in n)this[a]=n[a]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e})(),P2e=gU;gU.default=gU;var _ht=P2e,yU=(function(){function e(r,n,i){this.processor=r,this.messages=[],this.root=n,this.opts=i,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(n,i){i===void 0&&(i={}),i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);var a=new _ht(n,i);return this.messages.push(a),a},t.warnings=function(){return this.messages.filter(function(n){return n.type==="warning"})},Ra(e,[{key:"content",get:function(){return this.css}}]),e})(),BW=yU;yU.default=yU;var w9=39,Qoe=34,bA=92,Joe=47,EA=10,Ab=32,wA=12,SA=9,CA=13,bht=91,Eht=93,wht=40,Sht=41,Cht=123,xht=125,Tht=59,Aht=42,Pht=58,Rht=64,xA=/[\t\n\f\r "#'()/;[\\\]{}]/g,TA=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Oht=/.[\r\n"'(/\\]/,ese=/[\da-f]/i,Iht=function(t,r){r===void 0&&(r={});var n=t.css.valueOf(),i=r.ignoreErrors,a,o,s,l,c,d,f,h,p,g,_=n.length,b=0,E=[],S=[];function P(){return b}function O(F){throw t.error("Unclosed "+F,b)}function I(){return S.length===0&&b>=_}function N(F){if(S.length)return S.pop();if(!(b>=_)){var B=F?F.ignoreUnclosed:!1;switch(a=n.charCodeAt(b),a){case EA:case Ab:case SA:case CA:case wA:{o=b;do o+=1,a=n.charCodeAt(o);while(a===Ab||a===EA||a===SA||a===CA||a===wA);g=["space",n.slice(b,o)],b=o-1;break}case bht:case Eht:case Cht:case xht:case Pht:case Tht:case Sht:{var V=String.fromCharCode(a);g=[V,V,b];break}case wht:{if(h=E.length?E.pop()[1]:"",p=n.charCodeAt(b+1),h==="url"&&p!==w9&&p!==Qoe&&p!==Ab&&p!==EA&&p!==SA&&p!==wA&&p!==CA){o=b;do{if(d=!1,o=n.indexOf(")",o+1),o===-1)if(i||B){o=b;break}else O("bracket");for(f=o;n.charCodeAt(f-1)===bA;)f-=1,d=!d}while(d);g=["brackets",n.slice(b,o+1),b,o],b=o}else o=n.indexOf(")",b+1),l=n.slice(b,o+1),o===-1||Oht.test(l)?g=["(","(",b]:(g=["brackets",l,b,o],b=o);break}case w9:case Qoe:{s=a===w9?"'":'"',o=b;do{if(d=!1,o=n.indexOf(s,o+1),o===-1)if(i||B){o=b+1;break}else O("string");for(f=o;n.charCodeAt(f-1)===bA;)f-=1,d=!d}while(d);g=["string",n.slice(b,o+1),b,o],b=o;break}case Rht:{xA.lastIndex=b+1,xA.test(n),xA.lastIndex===0?o=n.length-1:o=xA.lastIndex-2,g=["at-word",n.slice(b,o+1),b,o],b=o;break}case bA:{for(o=b,c=!0;n.charCodeAt(o+1)===bA;)o+=1,c=!c;if(a=n.charCodeAt(o+1),c&&a!==Joe&&a!==Ab&&a!==EA&&a!==SA&&a!==CA&&a!==wA&&(o+=1,ese.test(n.charAt(o)))){for(;ese.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===Ab&&(o+=1)}g=["word",n.slice(b,o+1),b,o],b=o;break}default:{a===Joe&&n.charCodeAt(b+1)===Aht?(o=n.indexOf("*/",b+2)+1,o===0&&(i||B?o=n.length:O("comment")),g=["comment",n.slice(b,o+1),b,o],b=o):(TA.lastIndex=b+1,TA.test(n),TA.lastIndex===0?o=n.length-1:o=TA.lastIndex-2,g=["word",n.slice(b,o+1),b,o],E.push(g),b=o);break}}return b++,g}}function M(F){S.push(F)}return{back:M,endOfFile:I,nextToken:N,position:P}},R2e=c0,YO=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="atrule",i}var r=t.prototype;return r.append=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.append).call.apply(s,[].concat([this],a))},r.prepend=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s;return this.proxyOf.nodes||(this.nodes=[]),(s=e.prototype.prepend).call.apply(s,[].concat([this],a))},t})(R2e),zW=YO;YO.default=YO;R2e.registerAtRule(YO);var O2e=c0,I2e,k2e,I1=(function(e){La(t,e);function t(n){var i;return i=e.call(this,n)||this,i.type="root",i.nodes||(i.nodes=[]),i}var r=t.prototype;return r.normalize=function(i,a,o){var s=e.prototype.normalize.call(this,i);if(a){if(o==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(var l=ir(s),c;!(c=l()).done;){var d=c.value;d.raws.before=a.raws.before}}return s},r.removeChild=function(i,a){var o=this.index(i);return!a&&o===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[o].raws.before),e.prototype.removeChild.call(this,i)},r.toResult=function(i){i===void 0&&(i={});var a=new I2e(new k2e,this,i);return a.stringify()},t})(O2e);I1.registerLazyResult=function(e){I2e=e};I1.registerProcessor=function(e){k2e=e};var s2=I1;I1.default=I1;O2e.registerRoot(I1);var kC={comma:function(t){return kC.split(t,[","],!0)},space:function(t){var r=[" ",`
119`,"	"];return kC.split(t,r)},split:function(t,r,n){for(var i=[],a="",o=!1,s=0,l=!1,c="",d=!1,f=ir(t),h;!(h=f()).done;){var p=h.value;d?d=!1:p==="\\"?d=!0:l?p===c&&(l=!1):p==='"'||p==="'"?(l=!0,c=p):p==="("?s+=1:p===")"?s>0&&(s-=1):s===0&&r.includes(p)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=p}return(n||a!=="")&&i.push(a.trim()),i}},N2e=kC;kC.default=kC;var D2e=c0,kht=N2e,XO=(function(e){La(t,e);function t(r){var n;return n=e.call(this,r)||this,n.type="rule",n.nodes||(n.nodes=[]),n}return Ra(t,[{key:"selectors",get:function(){return kht.comma(this.selector)},set:function(n){var i=this.selector?this.selector.match(/,\s*/):null,a=i?i[0]:","+this.raw("between","beforeOpen");this.selector=n.join(a)}}]),t})(D2e),HW=XO;XO.default=XO;D2e.registerRule(XO);var Nht=$5,Dht=Iht,Mht=G5,Lht=zW,Fht=s2,tse=HW,rse={empty:!0,space:!0};function Bht(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}var zht=(function(){function e(r){this.input=r,this.root=new Fht,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(n){var i=new Lht;i.name=n[1].slice(1),i.name===""&&this.unnamedAtrule(i,n),this.init(i,n[2]);for(var a,o,s,l=!1,c=!1,d=[],f=[];!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),a=n[0],a==="("||a==="["?f.push(a==="("?")":"]"):a==="{"&&f.length>0?f.push("}"):a===f[f.length-1]&&f.pop(),f.length===0)if(a===";"){i.source.end=this.getPosition(n[2]),i.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){c=!0;break}else if(a==="}"){if(d.length>0){for(s=d.length-1,o=d[s];o&&o[0]==="space";)o=d[--s];o&&(i.source.end=this.getPosition(o[3]||o[2]),i.source.end.offset++)}this.end(n);break}else d.push(n);else d.push(n);if(this.tokenizer.endOfFile()){l=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(d),d.length?(i.raws.afterName=this.spacesAndCommentsFromStart(d),this.raw(i,"params",d),l&&(n=d[d.length-1],i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),c&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(n){var i=this.colon(n);if(i!==!1){for(var a=0,o,s=i-1;s>=0&&(o=n[s],!(o[0]!=="space"&&(a+=1,a===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}},t.colon=function(n){for(var i=0,a,o,s,l=ir(n.entries()),c;!(c=l()).done;){var d=c.value,f=d[0],h=d[1];if(a=h,o=a[0],o==="("&&(i+=1),o===")"&&(i-=1),i===0&&o===":")if(!s)this.doubleColon(a);else{if(s[0]==="word"&&s[1]==="progid")continue;return f}s=a}return!1},t.comment=function(n){var i=new Mht;this.init(i,n[2]),i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++;var a=n[1].slice(2,-2);if(/^\s*$/.test(a))i.text="",i.raws.left=a,i.raws.right="";else{var o=a.match(/^(\s*)([^]*\S)(\s*)$/);i.text=o[2],i.raws.left=o[1],i.raws.right=o[3]}},t.createTokenizer=function(){this.tokenizer=Dht(this.input)},t.decl=function(n,i){var a=new Nht;this.init(a,n[0][2]);var o=n[n.length-1];for(o[0]===";"&&(this.semicolon=!0,n.pop()),a.source.end=this.getPosition(o[3]||o[2]||Bht(n)),a.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),a.raws.before+=n.shift()[1];for(a.source.start=this.getPosition(n[0][2]),a.prop="";n.length;){var s=n[0][0];if(s===":"||s==="space"||s==="comment")break;a.prop+=n.shift()[1]}a.raws.between="";for(var l;n.length;)if(l=n.shift(),l[0]===":"){a.raws.between+=l[1];break}else l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]),a.raws.between+=l[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));for(var c=[],d;n.length&&(d=n[0][0],!(d!=="space"&&d!=="comment"));)c.push(n.shift());this.precheckMissedSemicolon(n);for(var f=n.length-1;f>=0;f--){if(l=n[f],l[1].toLowerCase()==="!important"){a.important=!0;var h=this.stringFrom(n,f);h=this.spacesFromEnd(n)+h,h!==" !important"&&(a.raws.important=h);break}else if(l[1].toLowerCase()==="important"){for(var p=n.slice(0),g="",_=f;_>0;_--){var b=p[_][0];if(g.trim().indexOf("!")===0&&b!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(a.important=!0,a.raws.important=g,n=p)}if(l[0]!=="space"&&l[0]!=="comment")break}var E=n.some(function(S){return S[0]!=="space"&&S[0]!=="comment"});E&&(a.raws.between+=c.map(function(S){return S[1]}).join(""),c=[]),this.raw(a,"value",c.concat(n),i),a.value.includes(":")&&!i&&this.checkMissedSemicolon(n)},t.doubleColon=function(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})},t.emptyRule=function(n){var i=new tse;this.init(i,n[2]),i.selector="",i.raws.between="",this.current=i},t.end=function(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(n){if(this.spaces+=n[1],this.current.nodes){var i=this.current.nodes[this.current.nodes.length-1];i&&i.type==="rule"&&!i.raws.ownSemicolon&&(i.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(n){var i=this.input.fromOffset(n);return{column:i.col,line:i.line,offset:n}},t.init=function(n,i){this.current.push(n),n.source={input:this.input,start:this.getPosition(i)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)},t.other=function(n){for(var i=!1,a=null,o=!1,s=null,l=[],c=n[1].startsWith("--"),d=[],f=n;f;){if(a=f[0],d.push(f),a==="("||a==="[")s||(s=f),l.push(a==="("?")":"]");else if(c&&o&&a==="{")s||(s=f),l.push("}");else if(l.length===0)if(a===";")if(o){this.decl(d,c);return}else break;else if(a==="{"){this.rule(d);return}else if(a==="}"){this.tokenizer.back(d.pop()),i=!0;break}else a===":"&&(o=!0);else a===l[l.length-1]&&(l.pop(),l.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),l.length>0&&this.unclosedBracket(s),i&&o){if(!c)for(;d.length&&(f=d[d.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(d.pop());this.decl(d,c)}else this.unknownWord(d)},t.parse=function(){for(var n;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(n,i,a,o){for(var s,l,c=a.length,d="",f=!0,h,p,g=0;g<c;g+=1)s=a[g],l=s[0],l==="space"&&g===c-1&&!o?f=!1:l==="comment"?(p=a[g-1]?a[g-1][0]:"empty",h=a[g+1]?a[g+1][0]:"empty",!rse[p]&&!rse[h]?d.slice(-1)===","?f=!1:d+=s[1]:f=!1):d+=s[1];if(!f){var _=a.reduce(function(b,E){return b+E[1]},"");n.raws[i]={raw:_,value:d}}n[i]=d},t.rule=function(n){n.pop();var i=new tse;this.init(i,n[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(i,"selector",n),this.current=i},t.spacesAndCommentsFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],!(i!=="space"&&i!=="comment"));)a=n.pop()[1]+a;return a},t.spacesAndCommentsFromStart=function(n){for(var i,a="";n.length&&(i=n[0][0],!(i!=="space"&&i!=="comment"));)a+=n.shift()[1];return a},t.spacesFromEnd=function(n){for(var i,a="";n.length&&(i=n[n.length-1][0],i==="space");)a=n.pop()[1]+a;return a},t.stringFrom=function(n,i){for(var a="",o=i;o<n.length;o++)a+=n[o][1];return n.splice(i,n.length-i),a},t.unclosedBlock=function(){var n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)},t.unclosedBracket=function(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})},t.unexpectedClose=function(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})},t.unknownWord=function(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})},t.unnamedAtrule=function(n,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})},e})(),Hht=zht,Uht=c0,Vht=Hht,qht=W5;function ZO(e,t){var r=new qht(e,t),n=new Vht(r);try{n.parse()}catch(i){throw i}return n.root}var UW=ZO;ZO.default=ZO;Uht.registerParse(ZO);var ld=Rm.isClean,jht=Rm.my,$ht=g2e,Wht=q5,Ght=c0,Kht=FW,nse=BW,Yht=UW,Xht=s2,Zht={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qht={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Jht={Once:!0,postcssPlugin:!0,prepare:!0},k1=0;function Pb(e){return(typeof e>"u"?"undefined":Kr(e))==="object"&&typeof e.then=="function"}function M2e(e){var t=!1,r=Zht[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,k1,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,k1,r+"Exit"]:[r,r+"Exit"]}function ise(e){var t;return e.type==="document"?t=["Document",k1,"DocumentExit"]:e.type==="root"?t=["Root",k1,"RootExit"]:t=M2e(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function _U(e){return e[ld]=!1,e.nodes&&e.nodes.forEach(function(t){return _U(t)}),e}var bU={},N1=(function(){function e(r,n,i){var a=this;this.stringified=!1,this.processed=!1;var o;if((typeof n>"u"?"undefined":Kr(n))==="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=_U(n);else if(Gr(n,e)||Gr(n,nse))o=_U(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{var s=Yht;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{o=s(n,i)}catch(l){this.processed=!0,this.error=l}o&&!o[jht]&&Ght.rebuild(o)}this.result=new nse(r,o,i),this.helpers=Mn({},bU,{postcss:bU,result:this.result}),this.plugins=this.processor.plugins.map(function(l){return(typeof l>"u"?"undefined":Kr(l))==="object"&&l.prepare?Mn({},l,l.prepare(a.result)):l})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(n,i){var a=this.result.lastPlugin;try{if(i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin)n.plugin=a.postcssPlugin,n.setMessage();else if(a.postcssVersion)var o,s,l,c,d}catch(f){console&&console.error&&console.error(f)}return n},t.prepareVisitors=function(){var n=this;this.listeners={};for(var i=function(d,f,h){n.listeners[f]||(n.listeners[f]=[]),n.listeners[f].push([d,h])},a=ir(this.plugins),o;!(o=a()).done;){var s=o.value;if((typeof s>"u"?"undefined":Kr(s))==="object")for(var l in s){if(!Qht[l]&&/^[A-Z]/.test(l))throw new Error("Unknown event "+l+" in "+s.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Jht[l])if(Kr(s[l])==="object")for(var c in s[l])c==="*"?i(s,l,s[l][c]):i(s,l+"-"+c.toLowerCase(),s[l][c]);else typeof s[l]=="function"&&i(s,l,s[l])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var n=this;return I5(function(){var i,a,o,s,l,c,d,f,h,p,g,_;return Sg(this,function(b){switch(b.label){case 0:n.plugin=0,i=0,b.label=1;case 1:if(!(i<n.plugins.length))return[3,6];if(a=n.plugins[i],o=n.runOnRoot(a),!Pb(o))return[3,5];b.label=2;case 2:return b.trys.push([2,4,,5]),[4,o];case 3:return b.sent(),[3,5];case 4:throw s=b.sent(),n.handleError(s);case 5:return i++,[3,1];case 6:if(n.prepareVisitors(),!n.hasListener)return[3,18];l=n.result.root,b.label=7;case 7:if(l[ld])return[3,14];l[ld]=!0,c=[ise(l)],b.label=8;case 8:if(!(c.length>0))return[3,13];if(d=n.visitTick(c),!Pb(d))return[3,12];b.label=9;case 9:return b.trys.push([9,11,,12]),[4,d];case 10:return b.sent(),[3,12];case 11:throw f=b.sent(),h=c[c.length-1].node,n.handleError(f,h);case 12:return[3,8];case 13:return[3,7];case 14:if(!n.listeners.OnceExit)return[3,18];p=function(){var E,S,P,O,I;return Sg(this,function(N){switch(N.label){case 0:E=_.value,S=E[0],P=E[1],n.result.lastPlugin=S,N.label=1;case 1:return N.trys.push([1,6,,7]),l.type!=="document"?[3,3]:(O=l.nodes.map(function(M){return P(M,n.helpers)}),[4,Promise.all(O)]);case 2:return N.sent(),[3,5];case 3:return[4,P(l,n.helpers)];case 4:N.sent(),N.label=5;case 5:return[3,7];case 6:throw I=N.sent(),n.handleError(I);case 7:return[2]}})},g=ir(n.listeners.OnceExit),b.label=15;case 15:return(_=g()).done?[3,18]:[5,lW(p())];case 16:b.sent(),b.label=17;case 17:return[3,15];case 18:return n.processed=!0,[2,n.stringify()]}})})()},t.runOnRoot=function(n){var i=this;this.result.lastPlugin=n;try{if((typeof n>"u"?"undefined":Kr(n))==="object"&&n.Once){if(this.result.root.type==="document"){var a=this.result.root.nodes.map(function(o){return n.Once(o,i.helpers)});return Pb(a[0])?Promise.all(a):a}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(o){throw this.handleError(o)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var n=this.result.opts,i=Wht;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);var a=new $ht(i,this.result.root,this.result.opts),o=a.generate();return this.result.css=o[0],this.result.map=o[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var n=ir(this.plugins),i;!(i=n()).done;){var a=i.value,o=this.runOnRoot(a);if(Pb(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[ld];)s[ld]=!0,this.walkSync(s);if(this.listeners.OnceExit)if(s.type==="document")for(var l=ir(s.nodes),c;!(c=l()).done;){var d=c.value;this.visitSync(this.listeners.OnceExit,d)}else this.visitSync(this.listeners.OnceExit,s)}return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this.css},t.visitSync=function(n,i){for(var a=ir(n),o;!(o=a()).done;){var s=o.value,l=s[0],c=s[1];this.result.lastPlugin=l;var d=void 0;try{d=c(i,this.helpers)}catch(f){throw this.handleError(f,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(Pb(d))throw this.getAsyncError()}},t.visitTick=function(n){var i=n[n.length-1],a=i.node,o=i.visitors;if(a.type!=="root"&&a.type!=="document"&&!a.parent){n.pop();return}if(o.length>0&&i.visitorIndex<o.length){var s=o[i.visitorIndex],l=s[0],c=s[1];i.visitorIndex+=1,i.visitorIndex===o.length&&(i.visitors=[],i.visitorIndex=0),this.result.lastPlugin=l;try{return c(a.toProxy(),this.helpers)}catch(g){throw this.handleError(g,a)}}if(i.iterator!==0){for(var d=i.iterator,f;f=a.nodes[a.indexes[d]];)if(a.indexes[d]+=1,!f[ld]){f[ld]=!0,n.push(ise(f));return}i.iterator=0,delete a.indexes[d]}for(var h=i.events;i.eventIndex<h.length;){var p=h[i.eventIndex];if(i.eventIndex+=1,p===k1){a.nodes&&a.nodes.length&&(a[ld]=!0,i.iterator=a.getIterator());return}else if(this.listeners[p]){i.visitors=this.listeners[p];return}}n.pop()},t.walkSync=function(n){var i=this;n[ld]=!0;for(var a=M2e(n),o=ir(a),s;!(s=o()).done;){var l=s.value;if(l===k1)n.nodes&&n.each(function(d){d[ld]||i.walkSync(d)});else{var c=this.listeners[l];if(c&&this.visitSync(c,n.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},Ra(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e})();N1.registerPostcss=function(e){bU=e};var L2e=N1;N1.default=N1;Xht.registerLazyResult(N1);Kht.registerLazyResult(N1);var ept=g2e,tpt=q5,rpt=UW,npt=BW,EU=(function(){function e(r,n,i){n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=i,this._map=void 0;var a,o=tpt;this.result=new npt(this._processor,a,this._opts),this.result.css=n;var s=this;Object.defineProperty(this.result,"root",{get:function(){return s.root}});var l=new ept(o,a,this._opts,n);if(l.isMap()){var c=l.generate(),d=c[0],f=c[1];d&&(this.result.css=d),f&&(this.result.map=f)}else l.clearAnnotation(),this.result.css=l.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(n){return this.async().catch(n)},t.finally=function(n){return this.async().then(n,n)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(n,i){return this.async().then(n,i)},t.toString=function(){return this._css},t.warnings=function(){return[]},Ra(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var n,i=rpt;try{n=i(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=n,n}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e})(),ipt=EU;EU.default=EU;var apt=ipt,opt=L2e,spt=FW,lpt=s2,NC=(function(){function e(r){r===void 0&&(r=[]),this.version="8.4.38",this.plugins=this.normalize(r)}var t=e.prototype;return t.normalize=function(n){for(var i=[],a=ir(n),o;!(o=a()).done;){var s=o.value;if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),(typeof s>"u"?"undefined":Kr(s))==="object"&&Array.isArray(s.plugins))i=i.concat(s.plugins);else if((typeof s>"u"?"undefined":Kr(s))==="object"&&s.postcssPlugin)i.push(s);else if(typeof s=="function")i.push(s);else if(!((typeof s>"u"?"undefined":Kr(s))==="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin")}return i},t.process=function(n,i){return i===void 0&&(i={}),!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new apt(this,n,i):new opt(this,n,i)},t.use=function(n){return this.plugins=this.plugins.concat(this.normalize([n])),this},e})(),cpt=NC;NC.default=NC;lpt.registerProcessor(NC);spt.registerProcessor(NC);var upt=$5,dpt=f2e,fpt=G5,hpt=zW,ppt=W5,mpt=s2,vpt=HW;function DC(e,t){if(Array.isArray(e))return e.map(function(f){return DC(f)});var r=e.inputs,n=wg(e,["inputs"]);if(r){t=[];for(var i=ir(r),a;!(a=i()).done;){var o=a.value,s=Mn({},o,{__proto__:ppt.prototype});s.map&&(s.map=Mn({},s.map,{__proto__:dpt.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(f){return DC(f,t)})),n.source){var l=n.source,c=l.inputId,d=wg(l,["inputId"]);n.source=d,c!=null&&(n.source.input=t[c])}if(n.type==="root")return new mpt(n);if(n.type==="decl")return new upt(n);if(n.type==="rule")return new vpt(n);if(n.type==="comment")return new fpt(n);if(n.type==="atrule")return new hpt(n);throw new Error("Unknown node type: "+e.type)}var gpt=DC;DC.default=DC;var ypt=DW,F2e=$5,_pt=L2e,bpt=c0,VW=cpt,Ept=q5,wpt=gpt,B2e=FW,Spt=P2e,z2e=G5,H2e=zW,Cpt=BW,xpt=W5,Tpt=UW,Apt=N2e,U2e=HW,V2e=s2,Ppt=j5;function Xi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new VW(t)}Xi.plugin=function(t,r){var n=!1;function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
120https://evilmartians.com/chronicles/postcss-8-plugin-migration`),S1.LANG&&S1.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
121https://www.w3ctech.com/topic/2226`));var c=r.apply(void 0,[].concat(s));return c.postcssPlugin=t,c.postcssVersion=new VW().version,c}var a;return Object.defineProperty(i,"postcss",{get:function(){return a||(a=i()),a}}),i.process=function(o,s,l){return Xi([i(l)]).process(o,s)},i};Xi.stringify=Ept;Xi.parse=Tpt;Xi.fromJSON=wpt;Xi.list=Apt;Xi.comment=function(e){return new z2e(e)};Xi.atRule=function(e){return new H2e(e)};Xi.decl=function(e){return new F2e(e)};Xi.rule=function(e){return new U2e(e)};Xi.root=function(e){return new V2e(e)};Xi.document=function(e){return new B2e(e)};Xi.CssSyntaxError=ypt;Xi.Declaration=F2e;Xi.Container=bpt;Xi.Processor=VW;Xi.Document=B2e;Xi.Comment=z2e;Xi.Warning=Spt;Xi.AtRule=H2e;Xi.Result=Cpt;Xi.Input=xpt;Xi.Rule=U2e;Xi.Root=V2e;Xi.Node=Ppt;_pt.registerPostcss(Xi);var Rpt=Xi;Xi.default=Xi;var za=Vft(Rpt);za.stringify;za.fromJSON;za.plugin;za.parse;za.list;za.document;za.comment;za.atRule;za.rule;za.decl;za.root;za.CssSyntaxError;za.Declaration;za.Container;za.Processor;za.Document;za.Comment;za.Warning;za.AtRule;za.Result;za.Input;za.Rule;za.Root;za.Node;var Opt=Object.defineProperty,Ipt=function(e,t,r){return t in e?Opt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},AA=function(e,t,r){return Ipt(e,(typeof t>"u"?"undefined":Kr(t))!=="symbol"?t+"":t,r)};function kpt(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch{return function(){}}}var V0=(function(){function e(r){AA(this,"fileName"),AA(this,"functionName"),AA(this,"lineNumber"),AA(this,"columnNumber"),this.fileName=r.fileName||"",this.functionName=r.functionName||"",this.lineNumber=r.lineNumber,this.columnNumber=r.columnNumber}var t=e.prototype;return t.toString=function(){var n=this.lineNumber||"",i=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+n+":"+i+")":this.fileName+":"+n+":"+i},e})(),Npt=/(^|@)\S+:\d+/,ase=/^\s*at .*(\S+:\d+|\(native\))/m,Dpt=/^(eval@)?(\[native code])?$/,S9={parse:function(t){return t?typeof t.stacktrace<"u"||typeof t["opera#sourceloc"]<"u"?this.parseOpera(t):t.stack&&t.stack.match(ase)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):(console.warn("[console-record-plugin]: Failed to parse error object:",t),[]):[]},extractLocation:function(t){if(t.indexOf(":")===-1)return[t];var r=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=r.exec(t.replace(/[()]/g,""));if(!n)throw new Error("Cannot parse given url: "+t);return[n[1],n[2]||void 0,n[3]||void 0]},parseV8OrIE:function(t){var r=t.stack.split(`
122`).filter(function(n){return!!n.match(ase)},this);return r.map(function(n){n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"("),a=i.match(/ (\((.+):(\d+):(\d+)\)$)/);i=a?i.replace(a[0],""):i;var o=i.split(/\s+/).slice(1),s=this.extractLocation(a?a[1]:o.pop()),l=o.join(" ")||void 0,c=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new V0({functionName:l,fileName:c,lineNumber:s[1],columnNumber:s[2]})},this)},parseFFOrSafari:function(t){var r=t.stack.split(`
123`).filter(function(n){return!n.match(Dpt)},this);return r.map(function(n){if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),n.indexOf("@")===-1&&n.indexOf(":")===-1)return new V0({functionName:n});var i=/((.*".+"[^@]*)?[^@]*)(?:@)/,a=n.match(i),o=a&&a[1]?a[1]:void 0,s=this.extractLocation(n.replace(i,""));return new V0({functionName:o,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf(`
124`)>-1&&t.message.split(`
125`).length>t.stacktrace.split(`
126`).length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split(`
127`),i=[],a=2,o=n.length;a<o;a+=2){var s=r.exec(n[a]);s&&i.push(new V0({fileName:s[2],lineNumber:parseFloat(s[1])}))}return i},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split(`
128`),i=[],a=0,o=n.length;a<o;a+=2){var s=r.exec(n[a]);s&&i.push(new V0({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return i},parseOpera11:function(t){var r=t.stack.split(`
129`).filter(function(n){return!!n.match(Npt)&&!n.match(/^Error created at/)},this);return r.map(function(n){var i=n.split("@"),a=this.extractLocation(i.pop()),o=i.shift()||"",s=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new V0({functionName:s,fileName:a[0],lineNumber:a[1],columnNumber:a[2]})},this)}};function Mpt(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(var a=0;a<n.children.length;a++){var o=n.children[a];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&i.push(o)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function wU(e){return Object.prototype.toString.call(e)==="[object Object]"}function q2e(e,t){if(t===0)return!0;for(var r=Object.keys(e),n=ir(r),i;!(i=n()).done;){var a=i.value;if(wU(e[a])&&q2e(e[a],t-1))return!0}return!1}function q0(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],i=[];return JSON.stringify(e,function(s,l){if(n.length>0){var c=n.indexOf(this);~c?n.splice(c+1):n.push(this),~c?i.splice(c,1/0,s):i.push(s),~n.indexOf(l)&&(n[0]===l?l="[Circular ~]":l="[Circular ~."+i.slice(0,n.indexOf(l)).join(".")+"]")}else n.push(l);if(l===null)return l;if(l===void 0)return"undefined";if(a(l))return o(l);if((typeof l>"u"?"undefined":Kr(l))==="bigint")return l.toString()+"n";if(Gr(l,Event)){var d={};for(var f in l){var h=l[f];Array.isArray(h)?d[f]=Mpt(h.length?h[0]:null):d[f]=h}return d}else{if(Gr(l,Node))return Gr(l,HTMLElement)?l?l.outerHTML:"":l.nodeName;if(Gr(l,Error))return l.stack?l.stack+`
130End of stack for Error object`:l.name+": "+l.message}return l});function a(s){return!!(wU(s)&&Object.keys(s).length>r.numOfKeysLimit||typeof s=="function"||wU(s)&&q2e(s,r.depthOfLimit))}function o(s){var l=s.toString();return r.stringLengthLimit&&l.length>r.stringLengthLimit&&(l=""+l.slice(0,r.stringLengthLimit)+"..."),l}}var ose={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Lpt(e,t,r){var n=r?Object.assign({},ose,r):ose,i=n.logger;if(!i)return function(){};var a;typeof i=="string"?a=t[i]:a=i;var o=0,s=!1,l=[];if(n.level.includes("error")){var c=function(_){var b=_.message,E=_.error,S=S9.parse(E).map(function(O){return O.toString()}),P=[q0(b,n.stringifyOptions)];e({level:"error",trace:S,payload:P})};t.addEventListener("error",c),l.push(function(){t.removeEventListener("error",c)});var d=function(_){var b,E;Gr(_.reason,Error)?(b=_.reason,E=[q0("Uncaught (in promise) "+b.name+": "+b.message,n.stringifyOptions)]):(b=new Error,E=[q0("Uncaught (in promise)",n.stringifyOptions),q0(_.reason,n.stringifyOptions)]);var S=S9.parse(b).map(function(P){return P.toString()});e({level:"error",trace:S,payload:E})};t.addEventListener("unhandledrejection",d),l.push(function(){t.removeEventListener("unhandledrejection",d)})}for(var f=ir(n.level),h;!(h=f()).done;){var p=h.value;l.push(g(a,p))}return function(){l.forEach(function(_){return _()})};function g(_,b){var E=this;return _[b]?kpt(_,b,function(S){var P=E;return function(){for(var O=arguments.length,I=new Array(O),N=0;N<O;N++)I[N]=arguments[N];if(S.apply(P,I),!(b==="assert"&&I[0])&&!s){s=!0;try{var M=S9.parse(new Error).map(function(V){return V.toString()}).splice(1),F=b==="assert"?I.slice(1):I,B=F.map(function(V){return q0(V,n.stringifyOptions)});o++,o<n.lengthThreshold?e({level:b,trace:M,payload:B}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[q0("The number of log records reached the threshold.")]})}catch(V){S.apply(void 0,[].concat(["rrweb logger error:",V],I))}finally{s=!1}}}}):function(){}}}var Fpt="rrweb/console@1",Bpt=function(e){return{name:Fpt,observer:Lpt,options:e}},sse=Vt.setImmediate,am,SU,CU,j2e=Object.prototype.toString,zpt=typeof sse<"u"?function(t){return sse(t)}:setTimeout;try{Object.defineProperty({},"x",{}),am=function(t,r,n,i){return Object.defineProperty(t,r,{value:n,writable:!0,configurable:i!==!1})}}catch{am=function(r,n,i){return r[n]=i,r}}CU=(function(){var t,r,n;function i(a,o){this.fn=a,this.self=o,this.next=void 0}return{add:function(o,s){n=new i(o,s),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var o=t;for(t=r=SU=void 0;o;)o.fn.call(o.self),o=o.next}}})();function QO(e,t){CU.add(e,t),SU||(SU=zpt(CU.drain))}function $2e(e){var t,r=typeof e;return e!==null&&(r==="object"||r==="function")&&(t=e.then),typeof t=="function"?t:!1}function qW(){for(var e=0;e<this.chain.length;e++)Hpt(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function Hpt(e,t,r){var n,i;try{t===!1?r.reject(e.msg):(t===!0?n=e.msg:n=t.call(void 0,e.msg),n===r.promise?r.reject(TypeError("Promise-chain cycle")):(i=$2e(n))?i.call(n,r.resolve,r.reject):r.resolve(n))}catch(a){r.reject(a)}}function W2e(e){var t,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(t=$2e(e))?QO(function(){var n=new lse(r);try{t.call(e,function(){W2e.apply(n,arguments)},function(){xS.apply(n,arguments)})}catch(i){xS.call(n,i)}}):(r.msg=e,r.state=1,r.chain.length>0&&QO(qW,r))}catch(n){xS.call(new lse(r),n)}}}function xS(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&QO(qW,t))}function G2e(e,t,r,n){for(var i=0;i<t.length;i++)(function(o){e.resolve(t[o]).then(function(l){r(o,l)},n)})(i)}function lse(e){this.def=e,this.triggered=!1}function Upt(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}
vendor: 25,579 bytes, lines 130-136
130function Om(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var t=new Upt(this);this.then=function(n,i){var a={success:typeof n=="function"?n:!0,failure:typeof i=="function"?i:!1};return a.promise=new this.constructor(function(s,l){if(typeof s!="function"||typeof l!="function")throw TypeError("Not a function");a.resolve=s,a.reject=l}),t.chain.push(a),t.state!==0&&QO(qW,t),a.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){W2e.call(t,n)},function(n){xS.call(t,n)})}catch(r){xS.call(t,r)}}var K2e=am({},"constructor",Om,!1);Om.prototype=K2e;am(K2e,"__NPO__",0,!1);am(Om,"resolve",function(t){var r=this;return t&&typeof t=="object"&&t.__NPO__===1?t:new r(function(i,a){if(typeof i!="function"||typeof a!="function")throw TypeError("Not a function");i(t)})});am(Om,"reject",function(t){return new this(function(n,i){if(typeof n!="function"||typeof i!="function")throw TypeError("Not a function");i(t)})});am(Om,"all",function(t){var r=this;return j2e.call(t)!=="[object Array]"?r.reject(TypeError("Not an array")):t.length===0?r.resolve([]):new r(function(i,a){if(typeof i!="function"||typeof a!="function")throw TypeError("Not a function");var o=t.length,s=Array(o),l=0;G2e(r,t,function(d,f){s[d]=f,++l===o&&i(s)},a)})});am(Om,"race",function(t){var r=this;return j2e.call(t)!=="[object Array]"?r.reject(TypeError("Not an array")):new r(function(i,a){if(typeof i!="function"||typeof a!="function")throw TypeError("Not a function");G2e(r,t,function(s,l){i(l)},a)})});var En;typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?En=Promise:En=Om;var TS=1440*60*1e3,C9=8*1e3,K5=Array.prototype,Vpt=Function.prototype,Y2e=Object.prototype,Ip=K5.slice,l2=Y2e.toString,Y5=Y2e.hasOwnProperty,To=Vt.console,Lf=Vt.navigator,bn=Vt.document,Xw=Vt.opera,cse=Vt.screen,fd=Lf.userAgent,x9=Vpt.bind,use=K5.forEach,dse=K5.indexOf,fse=K5.map,qpt=Array.isArray,xU={},te={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},mn={log:function(){if(Rl.DEBUG&&!te.isUndefined(To)&&To)try{To.log.apply(To,arguments)}catch{te.each(arguments,function(t){To.log(t)})}},warn:function(){if(Rl.DEBUG&&!te.isUndefined(To)&&To){var e=["Mixpanel warning:"].concat(te.toArray(arguments));try{To.warn.apply(To,e)}catch{te.each(e,function(r){To.warn(r)})}}},error:function(){if(Rl.DEBUG&&!te.isUndefined(To)&&To){var e=["Mixpanel error:"].concat(te.toArray(arguments));try{To.error.apply(To,e)}catch{te.each(e,function(r){To.error(r)})}}},critical:function(){if(!te.isUndefined(To)&&To){var e=["Mixpanel error:"].concat(te.toArray(arguments));try{To.error.apply(To,e)}catch{te.each(e,function(r){To.error(r)})}}}},PA=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(mn,arguments)}},Kd=function(e){return{log:PA(mn.log,e),warn:PA(mn.warn,e),error:PA(mn.error,e),critical:PA(mn.critical,e)}},xg=function(e){return function(){try{return e.apply(this,arguments)}catch(t){mn.critical("Implementation error. Please turn on debug and contact [email protected]."),Rl.DEBUG&&mn.critical(t)}}},jW=function(e){var t=e.prototype;for(var r in t)typeof t[r]=="function"&&(t[r]=xg(t[r]))};te.bind=function(e,t){var r,n;if(x9&&e.bind===x9)return x9.apply(e,Ip.call(arguments,1));if(!te.isFunction(e))throw new TypeError;return r=Ip.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(Ip.call(arguments)));var i={};i.prototype=e.prototype;var a=new i;i.prototype=null;var o=e.apply(a,r.concat(Ip.call(arguments)));return Object(o)===o?o:a},n};te.each=function(e,t,r){if(e!=null){if(use&&e.forEach===use)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n,e)===xU)return}else for(var a in e)if(Y5.call(e,a)&&t.call(r,e[a],a,e)===xU)return}};te.extend=function(e){return te.each(Ip.call(arguments,1),function(t){for(var r in t)t[r]!==void 0&&(e[r]=t[r])}),e};te.isArray=qpt||function(e){return l2.call(e)==="[object Array]"};te.isFunction=function(e){return typeof e=="function"};te.isArguments=function(e){return!!(e&&Y5.call(e,"callee"))};te.toArray=function(e){return e?e.toArray?e.toArray():te.isArray(e)||te.isArguments(e)?Ip.call(e):te.values(e):[]};te.map=function(e,t,r){if(fse&&e.map===fse)return e.map(t,r);var n=[];return te.each(e,function(i){n.push(t.call(r,i))}),n};te.keys=function(e){var t=[];return e===null||te.each(e,function(r,n){t[t.length]=n}),t};te.values=function(e){var t=[];return e===null||te.each(e,function(r){t[t.length]=r}),t};te.include=function(e,t){var r=!1;return e===null?r:dse&&e.indexOf===dse?e.indexOf(t)!=-1:(te.each(e,function(n){if(r||(r=n===t))return xU}),r)};te.includes=function(e,t){return e.indexOf(t)!==-1};te.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e};te.isObject=function(e){return e===Object(e)&&!te.isArray(e)};te.isEmptyObject=function(e){if(te.isObject(e)){for(var t in e)if(Y5.call(e,t))return!1;return!0}return!1};te.isUndefined=function(e){return e===void 0};te.isString=function(e){return l2.call(e)=="[object String]"};te.isDate=function(e){return l2.call(e)=="[object Date]"};te.isNumber=function(e){return l2.call(e)=="[object Number]"};te.isElement=function(e){return!!(e&&e.nodeType===1)};te.encodeDates=function(e){return te.each(e,function(t,r){te.isDate(t)?e[r]=te.formatDate(t):te.isObject(t)&&(e[r]=te.encodeDates(t))}),e};te.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};te.formatDate=function(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())};te.strip_empty_properties=function(e){var t={};return te.each(e,function(r,n){te.isString(r)&&r.length>0&&(t[n]=r)}),t};te.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):te.isArray(e)?(r=[],te.each(e,function(n){r.push(te.truncate(n,t))})):te.isObject(e)?(r={},te.each(e,function(n,i){r[i]=te.truncate(n,t)})):r=e,r};te.JSONEncode=(function(){return function(e){var t=e,r=function(i){var a=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return a.lastIndex=0,a.test(i)?'"'+i.replace(a,function(s){var l=o[s];return typeof l=="string"?l:"\\u"+("0000"+s.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},n=function(i,a){var o="",s="    ",l=0,c="",d="",f=0,h=o,p=[],g=a[i];switch(g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(i)),typeof g){case"string":return r(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(o+=s,p=[],l2.apply(g)==="[object Array]"){for(f=g.length,l=0;l<f;l+=1)p[l]=n(l,g)||"null";return d=p.length===0?"[]":o?`[
131`+o+p.join(`,
132`+o)+`
133`+h+"]":"["+p.join(",")+"]",o=h,d}for(c in g)Y5.call(g,c)&&(d=n(c,g),d&&p.push(r(c)+(o?": ":":")+d));return d=p.length===0?"{}":o?"{"+p.join(",")+h+"}":"{"+p.join(",")+"}",o=h,d}};return n("",{"":t})}})();te.JSONDecode=(function(){var e,t,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
134`,r:"\r",t:"	"},n,i=function(p){var g=new SyntaxError(p);throw g.at=e,g.text=n,g},a=function(p){return p&&p!==t&&i("Expected '"+p+"' instead of '"+t+"'"),t=n.charAt(e),e+=1,t},o=function(){var p,g="";for(t==="-"&&(g="-",a("-"));t>="0"&&t<="9";)g+=t,a();if(t===".")for(g+=".";a()&&t>="0"&&t<="9";)g+=t;if(t==="e"||t==="E")for(g+=t,a(),(t==="-"||t==="+")&&(g+=t,a());t>="0"&&t<="9";)g+=t,a();if(p=+g,!isFinite(p))i("Bad number");else return p},s=function(){var p,g,_="",b;if(t==='"')for(;a();){if(t==='"')return a(),_;if(t==="\\")if(a(),t==="u"){for(b=0,g=0;g<4&&(p=parseInt(a(),16),!!isFinite(p));g+=1)b=b*16+p;_+=String.fromCharCode(b)}else if(typeof r[t]=="string")_+=r[t];else break;else _+=t}i("Bad string")},l=function(){for(;t&&t<=" ";)a()},c=function(){switch(t){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}i('Unexpected "'+t+'"')},d,f=function(){var p=[];if(t==="["){if(a("["),l(),t==="]")return a("]"),p;for(;t;){if(p.push(d()),l(),t==="]")return a("]"),p;a(","),l()}}i("Bad array")},h=function(){var p,g={};if(t==="{"){if(a("{"),l(),t==="}")return a("}"),g;for(;t;){if(p=s(),l(),a(":"),Object.hasOwnProperty.call(g,p)&&i('Duplicate key "'+p+'"'),g[p]=d(),l(),t==="}")return a("}"),g;a(","),l()}}i("Bad object")};return d=function(){switch(l(),t){case"{":return h();case"[":return f();case'"':return s();case"-":return o();default:return t>="0"&&t<="9"?o():c()}},function(p){var g;return n=p,e=0,t=" ",g=d(),l(),t&&i("Syntax error"),g}})();te.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,i,a,o,s,l,c,d=0,f=0,h="",p=[];if(!e)return e;e=te.utf8Encode(e);do r=e.charCodeAt(d++),n=e.charCodeAt(d++),i=e.charCodeAt(d++),c=r<<16|n<<8|i,a=c>>18&63,o=c>>12&63,s=c>>6&63,l=c&63,p[f++]=t.charAt(a)+t.charAt(o)+t.charAt(s)+t.charAt(l);while(d<e.length);switch(h=p.join(""),e.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"=";break}return h};te.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,`
135`).replace(/\r/g,`
136`);var t="",r,n,i=0,a;for(r=n=0,i=e.length,a=0;a<i;a++){var o=e.charCodeAt(a),s=null;o<128?n++:o>127&&o<2048?s=String.fromCharCode(o>>6|192,o&63|128):s=String.fromCharCode(o>>12|224,o>>6&63|128,o&63|128),s!==null&&(n>r&&(t+=e.substring(r,n)),t+=s,r=n=a+1)}return n>r&&(t+=e.substring(r,e.length)),t};te.UUID=function(){try{return Vt.crypto.randomUUID()}catch{for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",te.map(e,function(n){return n.toString(16)}).join("")}};var hse=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];te.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<hse.length;t++)if(e.indexOf(hse[t])!==-1)return!0;return!1};te.HTTPBuildQuery=function(e,t){var r,n,i=[];return te.isUndefined(t)&&(t="&"),te.each(e,function(a,o){r=encodeURIComponent(a.toString()),n=encodeURIComponent(o),i[i.length]=n+"="+r}),i.join(t)};te.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),i=n.exec(e);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var a=i[1];try{a=decodeURIComponent(a)}catch{mn.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")};te.cookie={get:function(e){for(var t=e+"=",r=bn.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=te.JSONDecode(te.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,n,i,a,o){var s="",l="",c="";if(o)s="; domain="+o;else if(n){var d=pse(bn.location.hostname);s=d?"; domain=."+d:""}if(r){var f=new Date;f.setTime(f.getTime()+r*1e3),l="; expires="+f.toGMTString()}a&&(i=!0,c="; SameSite=None"),i&&(c+="; secure"),bn.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c},set:function(e,t,r,n,i,a,o){var s="",l="",c="";if(o)s="; domain="+o;else if(n){var d=pse(bn.location.hostname);s=d?"; domain=."+d:""}if(r){var f=new Date;f.setTime(f.getTime()+r*24*60*60*1e3),l="; expires="+f.toGMTString()}a&&(i=!0,c="; SameSite=None"),i&&(c+="; secure");var h=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c;return bn.cookie=h,h},remove:function(e,t,r){te.cookie.set(e,"",-1,t,!1,!1,r)}};var X2e=function(e){var t=!0;try{var r="__mplss_"+$W(8),n="xyz";e.setItem(r,n),e.getItem(r)!==n&&(t=!1),e.removeItem(r)}catch{t=!1}return t},T9=null,MC=function(e,t){return T9!==null&&!t?T9:T9=X2e(e)},A9=null,jpt=function(e,t){return A9!==null&&!t?A9:A9=X2e(e)};function Z2e(e,t,r){var n=function(i){mn.error(t+" error: "+i)};return{is_supported:function(i){var a=r(e,i);return a||mn.error(t+" unsupported"),a},error:n,get:function(i){try{return e.getItem(i)}catch(a){n(a)}return null},parse:function(i){try{return te.JSONDecode(e.getItem(i))||{}}catch{}return null},set:function(i,a){try{e.setItem(i,a)}catch(o){n(o)}},remove:function(i){try{e.removeItem(i)}catch(a){n(a)}}}}var X5=function(){try{return Vt.localStorage}catch{return null}},$pt=function(){try{return Vt.sessionStorage}catch{return null}};te.localStorage=Z2e(X5(),"localStorage",MC);te.sessionStorage=Z2e($pt(),"sessionStorage",jpt);te.register_event=(function(){var e=function(n,i,a,o,s){if(!n){mn.error("No valid element provided to register_event");return}if(n.addEventListener&&!o)n.addEventListener(i,a,!!s);else{var l="on"+i,c=n[l];n[l]=t(n,a,c)}};function t(n,i,a){var o=function(s){if(s=s||r(Vt.event),!!s){var l=!0,c,d;return te.isFunction(a)&&(c=a(s)),d=i.call(n,s),(c===!1||d===!1)&&(l=!1),l}};return o}function r(n){return n&&(n.preventDefault=r.preventDefault,n.stopPropagation=r.stopPropagation),n}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},e})();var Wpt=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');te.dom_query=(function(){function e(i){return i.all?i.all:i.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(i,a){var o=" "+a+" ";return(" "+i.className+" ").replace(t," ").indexOf(o)>=0}function n(i){if(!bn.getElementsByTagName)return[];var a=i.split(" "),o,s,l,c,d,f,h,p,g,_,b=[bn];for(f=0;f<a.length;f++){if(o=a[f].replace(/^\s+/,"").replace(/\s+$/,""),o.indexOf("#")>-1){s=o.split("#"),l=s[0];var E=s[1],S=bn.getElementById(E);if(!S||l&&S.nodeName.toLowerCase()!=l)return[];b=[S];continue}if(o.indexOf(".")>-1){s=o.split("."),l=s[0];var P=s[1];for(l||(l="*"),c=[],d=0,h=0;h<b.length;h++)for(l=="*"?g=e(b[h]):g=b[h].getElementsByTagName(l),p=0;p<g.length;p++)c[d++]=g[p];for(b=[],_=0,h=0;h<c.length;h++)c[h].className&&te.isString(c[h].className)&&r(c[h],P)&&(b[_++]=c[h]);continue}var O=o.match(Wpt);if(O){l=O[1];var I=O[2],N=O[3],M=O[4];for(l||(l="*"),c=[],d=0,h=0;h<b.length;h++)for(l=="*"?g=e(b[h]):g=b[h].getElementsByTagName(l),p=0;p<g.length;p++)c[d++]=g[p];b=[],_=0;var F;switch(N){case"=":F=function(B){return B.getAttribute(I)==M};break;case"~":F=function(B){return B.getAttribute(I).match(new RegExp("\\b"+M+"\\b"))};break;case"|":F=function(B){return B.getAttribute(I).match(new RegExp("^"+M+"-?"))};break;case"^":F=function(B){return B.getAttribute(I).indexOf(M)===0};break;case"$":F=function(B){return B.getAttribute(I).lastIndexOf(M)==B.getAttribute(I).length-M.length};break;case"*":F=function(B){return B.getAttribute(I).indexOf(M)>-1};break;default:F=function(B){return B.getAttribute(I)}}for(b=[],_=0,h=0;h<c.length;h++)F(c[h])&&(b[_++]=c[h]);continue}for(l=o,c=[],d=0,h=0;h<b.length;h++)for(g=b[h].getElementsByTagName(l),p=0;p<g.length;p++)c[d++]=g[p];b=c}return b}return function(i){return te.isElement(i)?[i]:te.isObject(i)&&!te.isUndefined(i.length)?i:n.call(this,i)}})();var Gpt=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Kpt=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];te.info={campaignParams:function(e){var t="",r={};return te.each(Gpt,function(n){t=te.getQueryParam(bn.URL,n),t.length?r[n]=t:e!==void 0&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return te.each(Kpt,function(r){e=te.getQueryParam(bn.URL,r),e.length&&(t[r]=e)}),t},marketingParams:function(){return te.extend(te.info.campaignParams(),te.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=te.info.searchEngine(e),r=t!="yahoo"?"q":"p",n={};if(t!==null){n.$search_engine=t;var i=te.getQueryParam(e,r);i.length&&(n.mp_keyword=i)}return n},browser:function(e,t,r){return t=t||"",r||te.includes(e," OPR/")?te.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":te.includes(e,"IEMobile")||te.includes(e,"WPDesktop")?"Internet Explorer Mobile":te.includes(e,"SamsungBrowser/")?"Samsung Internet":te.includes(e,"Edge")||te.includes(e,"Edg/")?"Microsoft Edge":te.includes(e,"FBIOS")?"Facebook Mobile":te.includes(e,"Whale/")?"Whale Browser":te.includes(e,"Chrome")?"Chrome":te.includes(e,"CriOS")?"Chrome iOS":te.includes(e,"UCWEB")||te.includes(e,"UCBrowser")?"UC Browser":te.includes(e,"FxiOS")?"Firefox iOS":te.includes(t,"Apple")?te.includes(e,"Mobile")?"Mobile Safari":"Safari":te.includes(e,"Android")?"Android Mobile":te.includes(e,"Konqueror")?"Konqueror":te.includes(e,"Firefox")?"Firefox":te.includes(e,"MSIE")||te.includes(e,"Trident/")?"Internet Explorer":te.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n=te.info.browser(e,t,r),i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},a=i[n];if(a===void 0)return null;var o=e.match(a);return o?parseFloat(o[o.length-2]):null},os:function(){var e=fd;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return Vt.location.href},properties:function(e){return typeof e!="object"&&(e={}),te.extend(te.strip_empty_properties({$os:te.info.os(),$browser:te.info.browser(fd,Lf.vendor,Xw),$referrer:bn.referrer,$referring_domain:te.info.referringDomain(bn.referrer),$device:te.info.device(fd)}),{$current_url:te.info.currentUrl(),$browser_version:te.info.browserVersion(fd,Lf.vendor,Xw),$screen_height:cse.height,$screen_width:cse.width,mp_lib:"web",$lib_version:Rl.LIB_VERSION,$insert_id:$W(),time:te.timestamp()/1e3},te.strip_empty_properties(e))},people_properties:function(){return te.extend(te.strip_empty_properties({$os:te.info.os(),$browser:te.info.browser(fd,Lf.vendor,Xw)}),{$browser_version:te.info.browserVersion(fd,Lf.vendor,Xw)})},mpPageViewProperties:function(){return te.strip_empty_properties({current_page_title:bn.title,current_domain:Vt.location.hostname,current_url_path:Vt.location.pathname,current_url_protocol:Vt.location.protocol,current_url_search:Vt.location.search})}};var Ypt=function(e,t){var r=null,n=[];return function(i){var a=this;return n.push(i),r||(r=new En(function(o){setTimeout(function(){var s=e.apply(a,[n]);r=null,n=[],o(s)},t)})),r}},$W=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},Q2e=function(){var e=te.UUID().replace(/-/g,""),t=te.UUID().replace(/-/g,"").substring(0,16),r="01";return"00-"+e+"-"+t+"-"+r},Xpt=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Zpt=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,pse=function(e){var t=Zpt,r=e.split("."),n=r[r.length-1];(n.length>4||n==="com"||n==="org")&&(t=Xpt);var i=e.match(t);return i?i[0]:""},Qpt=function(){var e=Vt.navigator.onLine;return te.isUndefined(e)||e},Vp=function(){},JO=function(e,t){for(var r=!1,n=0;n<t.length;n++)if(e.match(t[n])){r=!0;break}return r},D1=null,eI=null;typeof JSON<"u"&&(D1=JSON.stringify,eI=JSON.parse);D1=D1||te.JSONEncode;eI=eI||te.JSONDecode;var Jpt=function(e,t,r){if(!Vt.CompressionStream)return!1;var n=te.info.browser(e,t,r),i=te.info.browserVersion(e,t,r);return!((n==="Safari"||n==="Mobile Safari")&&i>=16.4&&i<16.6)};te.info=te.info;te.info.browser=te.info.browser;te.info.browserVersion=te.info.browserVersion;te.info.device=te.info.device;te.info.properties=te.info.properties;te.isBlockedUA=te.isBlockedUA;te.isEmptyObject=te.isEmptyObject;te.isObject=te.isObject;te.JSONDecode=te.JSONDecode;te.JSONEncode=te.JSONEncode;te.toArray=te.toArray;te.NPO=Om;var Kc=function(e,t,r){this.dbName=e,this.storeName=t,this.version=r.version,this.storeNamesInDb=r.storeNames,this.dbPromise=null};Kc.prototype._openDb=function(){var e=this.dbName,t=this.version,r=this.storeNamesInDb;return new En(function(n,i){var a=Vt.indexedDB.open(e,t);a.onerror=function(){i(a.error)},a.onsuccess=function(){n(a.result)},a.onupgradeneeded=function(o){var s=o.target.result;r.forEach(function(l){s.objectStoreNames.contains(l)||s.createObjectStore(l)})}})};Kc.prototype.init=function(){return Vt.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof Vt.IDBDatabase?En.resolve():En.reject(e)})):En.reject("indexedDB is not supported in this browser")};Kc.prototype.isInitialized=function(){return!!this.dbPromise};Kc.prototype.makeTransaction=function(e,t){var r=this.storeName,n=function(i){return new En(function(a,o){var s=i.transaction(r,e);s.oncomplete=function(){a(s)},s.onabort=s.onerror=function(){o(s.error)},t(s.objectStore(r))})};return this.dbPromise.then(n).catch((function(i){return i&&i.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(n)):En.reject(i)}).bind(this))};Kc.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(r){r.put(t,e)})};Kc.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(r){t=r.get(e)}).then(function(){return t.result})};Kc.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})};Kc.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};var WW="mixpanelBrowserDb",J2e="mixpanelRecordingEvents",GW="mixpanelRecordingRegistry",KW={version:1,storeNames:[J2e,GW]},emt="__mp_opt_in_out_";function tmt(e,t){rTe(!0,e,t)}function rmt(e,t){rTe(!1,e,t)}function nmt(e,t){return tTe(e,t)==="1"}function eTe(e,t){if(amt(t))return mn.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=tTe(e,t)==="0";return r&&mn.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function Im(e){return ZW(e,function(t){return this.get_config(t)})}function km(e){return ZW(e,function(t){return this._get_config(t)})}function L_(e){return ZW(e,function(t){return this._get_config(t)})}function imt(e,t){t=t||{},YW(t).remove(XW(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function YW(e){return e=e||{},e.persistenceType==="localStorage"?te.localStorage:te.cookie}function XW(e,t){return t=t||{},(t.persistencePrefix||emt)+e}function tTe(e,t){return YW(t).get(XW(e,t))}function amt(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||Vt,r=t.navigator||{},n=!1;return te.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(i){te.includes([!0,1,"1","yes"],i)&&(n=!0)}),n}function rTe(e,t,r){if(!te.isString(t)||!t.length){mn.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}r=r||{},YW(r).set(XW(t,r),e?1:0,te.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function ZW(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),a=t.call(this,"opt_out_tracking_persistence_type"),o=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");n&&(r=eTe(n,{ignoreDnt:i,persistenceType:a,persistencePrefix:o,window:s}))}catch(c){mn.error("Unexpected error when checking tracking opt-out status: "+c)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];typeof l=="function"&&l(0)}}var omt=Kd("lock"),nTe=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||X5(),this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||En};nTe.prototype.withLock=function(e,t){var r=this.promiseImpl;return new r(te.bind(function(n,i){var a=t||new Date().getTime()+"|"+Math.random(),o=new Date().getTime(),s=this.storageKey,l=this.pollIntervalMS,c=this.timeoutMS,d=this.storage,f
vendor: 10,736 bytes, line 136
136=s+":X",h=s+":Y",p=s+":Z",g=function(P){if(new Date().getTime()-o>c){omt.error("Timeout waiting for mutex on "+s+"; clearing lock. ["+a+"]"),d.removeItem(p),d.removeItem(h),E();return}setTimeout(function(){try{P()}catch(O){i(O)}},l*(Math.random()+.1))},_=function(P,O){P()?O():g(function(){_(P,O)})},b=function(){var P=d.getItem(h);return P&&P!==a?!1:(d.setItem(h,a),d.getItem(h)===a?!0:(MC(d,!0)||i(new Error("localStorage support dropped while acquiring lock")),!1))},E=function(){d.setItem(f,a),_(b,function(){if(d.getItem(f)===a){S();return}g(function(){if(d.getItem(h)!==a){E();return}_(function(){return!d.getItem(p)},S)})})},S=function(){d.setItem(p,"1");var P=function(){d.removeItem(p),d.getItem(h)===a&&d.removeItem(h),d.getItem(f)===a&&d.removeItem(f)};e().then(function(O){P(),n(O)}).catch(function(O){P(),i(O)})};try{if(MC(d,!0))E();else throw new Error("localStorage support check failed")}catch(P){i(P)}},this))};var F_=function(e){this.storage=e||X5()};F_.prototype.init=function(){return this.storage?En.resolve():En.reject(new Error("localStorage is not available"))};F_.prototype.isInitialized=function(){return!0};F_.prototype.setItem=function(e,t){return new En(te.bind(function(r,n){try{this.storage.setItem(e,D1(t))}catch(i){n(i)}r()},this))};F_.prototype.getItem=function(e){return new En(te.bind(function(t,r){var n;try{n=eI(this.storage.getItem(e))}catch(i){r(i)}t(n)},this))};F_.prototype.removeItem=function(e){return new En(te.bind(function(t,r){try{this.storage.removeItem(e)}catch(n){r(n)}t()},this))};var mse=Kd("batch"),Yd=function(e,t){t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new F_,this.lock=new nTe(e,{storage:t.sharedLockStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||te.bind(mse.error,mse),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=Ypt(te.bind(this._enqueuePersisted,this),t.enqueueThrottleMs):this.enqueuePersisted=te.bind(function(r){return this._enqueuePersisted([r])},this)};Yd.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?En.resolve():this.queueStorage.init().then(te.bind(function(){this.initialized=!0},this)).catch(te.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))};Yd.prototype.enqueue=function(e,t){var r={id:$W(),flushAfter:new Date().getTime()+t*2,payload:e};return this.usePersistence?this.enqueuePersisted(r):(this.memQueue.push(r),En.resolve(!0))};Yd.prototype._enqueuePersisted=function(e){var t=te.bind(function(){return this.ensureInit().then(te.bind(function(){return this.readFromStorage()},this)).then(te.bind(function(r){return this.saveToStorage(r.concat(e))},this)).then(te.bind(function(r){return r&&(this.memQueue=this.memQueue.concat(e)),r},this)).catch(te.bind(function(r){return this.reportError("Error enqueueing items",r,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(te.bind(function(r){return this.reportError("Error acquiring storage lock",r),!1},this))};Yd.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(te.bind(function(){return this.readFromStorage()},this)).then(te.bind(function(r){if(r.length){var n={};te.each(t,function(o){n[o.id]=!0});for(var i=0;i<r.length;i++){var a=r[i];if(new Date().getTime()>a.flushAfter&&!n[a.id]&&(a.orphaned=!0,t.push(a),t.length>=e))break}}return t},this)):En.resolve(t)};var vse=function(e,t){var r=[];return te.each(e,function(n){n.id&&!t[n.id]&&r.push(n)}),r};Yd.prototype.removeItemsByID=function(e){var t={};if(te.each(e,function(n){t[n]=!0}),this.memQueue=vse(this.memQueue,t),this.usePersistence){var r=te.bind(function(){return this.ensureInit().then(te.bind(function(){return this.readFromStorage()},this)).then(te.bind(function(n){return n=vse(n,t),this.saveToStorage(n)},this)).then(te.bind(function(){return this.readFromStorage()},this)).then(te.bind(function(n){for(var i=0;i<n.length;i++){var a=n[i];if(a.id&&t[a.id])throw new Error("Item not removed from storage")}return!0},this)).catch(te.bind(function(n){return this.reportError("Error removing items",n,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(te.bind(function(n){return this.reportError("Error acquiring storage lock",n),MC(this.lock.storage,!0)?!1:r().then(te.bind(function(i){return i||this.queueStorage.removeItem(this.storageKey).then(function(){return i})},this)).catch(te.bind(function(i){return this.reportError("Error clearing queue",i),!1},this))},this))}else return En.resolve(!0)};var gse=function(e,t){var r=[];return te.each(e,function(n){var i=n.id;if(i in t){var a=t[i];a!==null&&(n.payload=a,r.push(n))}else r.push(n)}),r};Yd.prototype.updatePayloads=function(e){return this.memQueue=gse(this.memQueue,e),this.usePersistence?this.lock.withLock(te.bind(function(){return this.ensureInit().then(te.bind(function(){return this.readFromStorage()},this)).then(te.bind(function(r){return r=gse(r,e),this.saveToStorage(r)},this)).catch(te.bind(function(r){return this.reportError("Error updating items",e,r),!1},this))},this),this.pid).catch(te.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this)):En.resolve(!0)};Yd.prototype.readFromStorage=function(){return this.ensureInit().then(te.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(te.bind(function(e){return e&&(te.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(te.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))};Yd.prototype.saveToStorage=function(e){return this.ensureInit().then(te.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(te.bind(function(t){return this.reportError("Error saving queue",t),!1},this))};Yd.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(te.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):En.resolve()};var smt=600*1e3,AS=Kd("batch"),Yc=function(e,t){this.errorReporter=t.errorReporter,this.queue=new Yd(e,{errorReporter:te.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};Yc.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)};Yc.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};Yc.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};Yc.prototype.clear=function(){return this.queue.clear()};Yc.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};Yc.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};Yc.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(te.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))};Yc.prototype.sendRequestPromise=function(e,t){return new En(te.bind(function(r){this.sendRequest(e,t,r)},this))};Yc.prototype.flush=function(e){if(this.requestInProgress)return AS.log("Flush: Request already in progress"),En.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),n=this.batchSize;return this.queue.fillBatch(n).then(te.bind(function(i){var a=i.length===n,o=[],s={};if(te.each(i,function(f){var h=f.payload;if(this.beforeSendHook&&!f.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=te.extend({},h.properties,{mp_sent_by_lib_version:Rl.LIB_VERSION}));var p=!0,g=f.id;g?(this.itemIdsSentSuccessfully[g]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:f,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[g]}),p=!1):this.reportError("[dupe] found item with no ID",{item:f}),p&&o.push(h)}s[f.id]=h},this),o.length<1)return this.requestInProgress=!1,this.resetFlush(),En.resolve();var l=te.bind(function(){return this.queue.removeItemsByID(te.map(i,function(f){return f.id})).then(te.bind(function(f){return te.each(i,te.bind(function(h){var p=h.id;p?(this.itemIdsSentSuccessfully[p]=this.itemIdsSentSuccessfully[p]||0,this.itemIdsSentSuccessfully[p]++,this.itemIdsSentSuccessfully[p]>5&&this.reportError("[dupe] item ID sent too many times",{item:h,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[p]})):this.reportError("[dupe] found item with no ID while removing",{item:h})},this)),f?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!a?(this.resetFlush(),En.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),En.resolve())},this))},this),c=te.bind(function(f){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(s);if(te.isObject(f)&&f.error==="timeout"&&new Date().getTime()-r>=t)return this.reportError("Network timeout; retrying"),this.flush();if(te.isObject(f)&&(f.httpStatusCode>=500||f.httpStatusCode===429||f.httpStatusCode<=0&&!Qpt()||f.error==="timeout")){var h=this.flushInterval*2;return f.retryAfter&&(h=parseInt(f.retryAfter,10)*1e3||h),h=Math.min(smt,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h),En.resolve()}else if(te.isObject(f)&&f.httpStatusCode===413)if(i.length>1){var p=Math.max(1,Math.floor(n/2));return this.batchSize=Math.min(this.batchSize,p,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),En.resolve()}else return this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),l();else return l()}catch(g){this.reportError("Error handling API response",g),this.resetFlush()}},this),d={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(d.transport="sendBeacon"),AS.log("MIXPANEL REQUEST:",o),this.sendRequestPromise(o,d).then(c)},this)).catch(te.bind(function(i){this.reportError("Error flushing request queue",i
vendor: 12,811 bytes, line 136
136),this.resetFlush()},this))};Yc.prototype.reportError=function(e,t){if(AS.error.apply(AS.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(r){AS.error(r)}};var QW=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},lmt=250,iTe=function(e,t){if(!te.isArray(e))return e&&t.critical("record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled."),[];for(var r=[],n=0;n<e.length;n++)try{var i=new URL(e[n]).origin;if(i==="null"){t.critical(e[n]+" has an opaque origin. Skipping this entry.");continue}r.push(i)}catch{t.critical(e[n]+" is not a valid origin URL. Skipping this entry.")}return r},LC="change",mh="click",TU="hashchange",cmt="input",yse="load",kp="mp_locationchange",_se="popstate",Z5="scrollend",JW="scroll",umt="select",tI="submit",dmt="toggle",bse="visibilitychange",fmt=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],Ese=["mp-include"],AU=["mp-no-track"],wse=AU.concat(["mp-sensitive"]),hmt=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],pmt={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},mmt={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},vmt={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},Sse=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],gmt=5,va=Kd("autocapture");function PU(e){for(var t={},r=aTe(e).split(" "),n=0;n<r.length;n++){var i=r[n];i&&(t[i]=!0)}return t}function aTe(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function ymt(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!oTe(e));return e}function Cse(e,t,r,n,i,a){var o={$classes:aTe(e).split(" "),$tag_name:e.tagName.toLowerCase()},s=e.id;s&&(o.$id=s),eG(e,t,i,a)&&te.each(hmt.concat(n),function(f){if(e.hasAttribute(f)&&!r[f]){var h=e.getAttribute(f);rI(h)&&(o["$attr-"+f]=h)}});for(var l=1,c=1,d=e;d=ymt(d);)l++,d.tagName===e.tagName&&c++;return o.$nth_child=l,o.$nth_of_type=c,o}function _mt(e,t){var r=t.allowElementCallback,n=t.allowSelectors||[],i=t.blockAttrs||[],a=t.blockElementCallback,o=t.blockSelectors||[],s=t.captureTextContent||!1,l=t.captureExtraAttrs||[],c=t.capturedForHeatMap||!1,d={};te.each(i,function(I){d[I]=!0});var f=null,h=typeof e.target>"u"?e.srcElement:e.target;if(sTe(h)&&(h=h.parentNode),Smt(h,e)&&RU(h,e,r,n)&&!P9(h,e,a,o)){for(var p=[h],g=h;g.parentNode&&!Cd(g,"body");)p.push(g.parentNode),g=g.parentNode;var _=[],b,E=!1;if(te.each(p,function(I){var N=eG(I,e,r,n);!d.href&&I.tagName.toLowerCase()==="a"&&(b=I.getAttribute("href"),b=N&&rI(b)&&b),P9(I,e,a,o)&&(E=!0),_.push(Cse(I,e,d,l,r,n))},this),!E){var S=bn.documentElement;if(f={$event_type:e.type,$host:Vt.location.host,$pathname:Vt.location.pathname,$elements:_,$el_attr__href:b,$viewportHeight:Math.max(S.clientHeight,Vt.innerHeight||0),$viewportWidth:Math.max(S.clientWidth,Vt.innerWidth||0),$pageHeight:bn.body.offsetHeight||0,$pageWidth:bn.body.offsetWidth||0},te.each(l,function(I){if(!d[I]&&h.hasAttribute(I)){var N=h.getAttribute(I);rI(N)&&(f["$el_attr__"+I]=N)}}),s&&(P=xse(h,e,r,n),P&&P.length&&(f.$el_text=P)),e.type===mh&&(te.each(fmt,function(I){I in e&&(f["$"+I]=e[I])}),c&&(f.$captured_for_heatmap=!0),h=bmt(e)),s){var P=xse(h,e,r,n);P&&P.length&&(f.$el_text=P)}if(h){if(!RU(h,e,r,n)||P9(h,e,a,o))return null;var O=Cse(h,e,d,l,r,n);f.$target=O,f.$el_classes=O.$classes,te.extend(f,te.strip_empty_properties({$el_id:O.$id,$el_tag_name:O.$tag_name}))}}}return f}function xse(e,t,r,n){var i="";return eG(e,t,r,n)&&e.childNodes&&e.childNodes.length&&te.each(e.childNodes,function(a){sTe(a)&&a.textContent&&(i+=te.trim(a.textContent).split(/(\s+)/).filter(rI).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),te.trim(i)}function bmt(e){for(var t=e.target,r=e.composedPath(),n=0;n<r.length;n++){var i=r[n];if(Cd(i,"a")||Cd(i,"button")||Cd(i,"input")||Cd(i,"select")||i.getAttribute&&i.getAttribute("role")==="button"){t=i;break}if(i===t)break}return t}function RU(e,t,r,n){if(r)try{if(!r(e,t))return!1}catch(o){return va.critical("Error while checking element in allowElementCallback",o),!1}if(!n.length)return!0;for(var i=0;i<n.length;i++){var a=n[i];try{if(e.matches(a))return!0}catch(o){va.critical("Error while checking selector: "+a,o)}}return!1}function P9(e,t,r,n){var i;if(r)try{if(r(e,t))return!0}catch(s){return va.critical("Error while checking element in blockElementCallback",s),!0}if(n&&n.length)for(i=0;i<n.length;i++){var a=n[i];try{if(e.matches(a))return!0}catch(s){va.critical("Error while checking selector: "+a,s)}}var o=PU(e);for(i=0;i<AU.length;i++)if(o[AU[i]])return!0;return!1}function oTe(e){return e&&e.nodeType===1}function Cd(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sTe(e){return e&&e.nodeType===3}function Emt(){try{var e=bn.createElement("div");return!!e.matches}catch{return!1}}function wmt(){return typeof WeakSet<"u"}function Smt(e,t){if(!e||Cd(e,"html")||!oTe(e))return!1;var r=e.tagName.toLowerCase();switch(r){case"form":return t.type===tI;case"input":return["button","submit"].indexOf(e.getAttribute("type"))===-1?t.type===LC:t.type===mh;case"select":case"textarea":return t.type===LC;default:return t.type===mh}}function lTe(e){var t=(e.name||e.id||"").toString().toLowerCase();if(typeof t=="string"){var r=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(r.test(t.replace(/[^a-zA-Z0-9]/g,"")))return!0}return!1}function eG(e,t,r,n){var i;if(!RU(e,t,r,n))return!1;for(var a=e;a.parentNode&&!Cd(a,"body");a=a.parentNode){var o=PU(a);for(i=0;i<wse.length;i++)if(o[wse[i]])return!1}var s=PU(e);for(i=0;i<Ese.length;i++)if(s[Ese[i]])return!0;if(Cd(e,"input")||Cd(e,"select")||Cd(e,"textarea")||e.getAttribute("contenteditable")==="true")return!1;var l=e.type||"";if(typeof l=="string")switch(l.toLowerCase()){case"hidden":return!1;case"password":return!1}return!lTe(e)}function rI(e){if(e===null||te.isUndefined(e))return!1;if(typeof e=="string"){e=te.trim(e);var t=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(t.test((e||"").replace(/[- ]/g,"")))return!1;var r=/(^\d{3}-?\d{2}-?\d{4}$)/;if(r.test(e))return!1}return!0}function cTe(e){var t="onscrollend"in Vt,r=xg(e),n=Z5;if(!t){var i=null,a=100;r=xg(function(){clearTimeout(i),i=setTimeout(e,a)}),n=JW}return{listener:r,eventType:n}}function Cmt(e){for(var t=0;t<Sse.length;t++)if(e.hasAttribute(Sse[t]))return!0;return!1}function xmt(e){var t=e.getAttribute("role");if(!t)return!1;var r=t.trim().split(/\s+/)[0].toLowerCase();return pmt[r]}function R9(e){var t=e.tagName.toLowerCase();return!!(t==="button"||t==="input"||t==="select"||t==="textarea"||t==="details"||t==="dialog"||e.isContentEditable||e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend||Cmt(e)||xmt(e)||t==="a"&&e.hasAttribute("href")||e.hasAttribute("tabindex"))}function uTe(e){if(!e||!e.tagName)return!0;var t=e.tagName.toLowerCase();if(mmt[t])return!0;if(R9(e))return!1;for(var r=e.parentElement,n=0;r&&n<gmt;){if(R9(r))return!1;if(r.getRootNode&&r.getRootNode()!==bn){var i=r.getRootNode();if(i.host&&R9(i.host))return!1}r=r.parentElement,n++}return!!vmt[t]}function dTe(e){return"composedPath"in e?e.composedPath():[]}function fTe(e){var t=dTe(e);return t&&t.length>0?t[0]:e.target||e.srcElement}var hTe=".mp-mask, .fs-mask, .amp-mask, .rr-mask, .ph-mask",Tmt="data-rr-is-password",Amt=["password","email","tel","hidden"];function RA(e){return e?Array.isArray(e)?e:[e]:[]}function Pmt(e){var t={input:{maskingSelector:"",unmaskingSelector:"",maskAll:!0},text:{maskingSelector:"",unmaskingSelector:"",maskAll:!0}},r=e.get_config("record_mask_input_selector"),n=e.get_config("record_unmask_input_selector"),i=e.get_config("record_mask_all_inputs");t.input.maskingSelector=RA(r).join(","),t.input.unmaskingSelector=RA(n).join(","),i!==void 0&&(t.input.maskAll=i);var a=e.get_config("record_mask_text_selector"),o=e.get_config("record_unmask_text_selector"),s=e.get_config("record_mask_all_text"),l=e.get_config("record_mask_text_class"),c=RA(a);if(l)if(l instanceof RegExp)t.text._legacyClassRegex=l;else{var d="."+l;c.indexOf(d)===-1&&c.push(d)}return t.text.maskingSelector=c.join(","),t.text.unmaskingSelector=RA(o).join(","),s===void 0&&a!==void 0?t.text.maskAll=!1:s!==void 0&&(t.text.maskAll=s),t}function Wy(e,t){return t?!!e.closest(t):!1}function Rmt(e,t){var r=(e.getAttribute("type")||"").toLowerCase();if(Amt.indexOf(r)!==-1)return!0;var n=(e.getAttribute("autocomplete")||"").toLowerCase();return n&&n!==""&&n!=="off"||e.hasAttribute(Tmt)||lTe(e)?!0:t.input.maskAll?!Wy(e,t.input.unmaskingSelector):!!(Wy(e,t.input.maskingSelector)||Wy(e,hTe))}function Omt(e,t){return e?t.text._legacyClassRegex&&oU(e,t.text._legacyClassRegex)?!0:t.text.maskAll?!Wy(e,t.text.unmaskingSelector):!!(Wy(e,t.text.maskingSelector)||Wy(e,hTe)):!1}var Tg=Kd("network-plugin");function nI(e){return Math.round(Date.now()-e.performance.now())}var O9={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],ignoreRequestFn:function(){return!1},recordHeaders:{request:[],response:[]},recordBodyUrls:{request:[],response:[]},recordInitialRequests:!1};function Imt(e){return e.entryType==="navigation"}function OU(e){return e.entryType==="resource"}function kmt(e,t){for(var r=e.length,n=r-1;n>=0;n-=1)if(t(e[n]))return e[n]}function pTe(e,t,r){if(!(t in e)||typeof e[t]!="function")return function(){};var n=e[t],i=r(n);return e[t]=i,function(){e[t]=n}}var I9=1024*1024;function mTe(e){return!e||typeof e!="string"?e:e.length>I9?(Tg.error("Body truncated from "+e.length+" to "+I9+" characters"),e.substring(0,I9)+"... [truncated]"):e}function Nmt(e,t,r){if(!t.PerformanceObserver)return Tg.error("PerformanceObserver not supported"),function(){};if(r.recordInitialRequests){var n=t.performance.getEntries().filter(function(a){return Imt(a)||OU(a)&&r.initiatorTypes.includes(a.initiatorType)});e({requests:n.map(function(a){return{url:a.name,initiatorType:a.initiatorType,status:"responseStatus"in a?a.responseStatus:void 0,startTime:Math.round(a.startTime),endTime:Math.round(a.responseEnd),timeOrigin:nI(t)}}),isInitial:!0})}var i=new t.PerformanceObserver(function(a){var o=a.getEntries().filter(function(s){return OU(s)&&r.initiatorTypes.includes(s.initiatorType)&&s.initiatorType!=="xmlhttprequest"&&s.initiatorType!=="fetch"});e({requests:o.map(function(s){return{url:s.name,initiatorType:s.initiatorType,status:"responseStatus"in s?s.responseStatus:void 0,startTime:Math.round(s.startTime),endTime:Math.round(s.responseEnd),timeOrigin:nI(t)}})})});return i.observe({entryTypes:["navigation","resource"]}),function(){i.disconnect()}}function iI(e,t,r){return!t[e]||t[e].length===0?!1:t[e].includes(r.toLowerCase())}function aI(e,t,r){return!t[e]||t[e].length===0?!1:JO(r,t[e])}function Tse(e){if(e==null)return null;var t;if(typeof e=="string")t=e;else if(e instanceof Document)t=e.textContent;else if(e instanceof FormData)t=te.HTTPBuildQuery(e);else if(te.isObject(e))try{t=JSON.stringify(e)}catch{return"Failed to stringify response object"}else return"Cannot read body of type "+typeof e;return mTe(t)}function Ase(e){return new Promise(function(t){var r=setTimeout(function(){t("Timeout while trying to read body")},500);try{e.clone().text().then(function(n){clearTimeout(r),t(mTe(n))},function(n){clearTimeout(r),t("Failed to read body: "+String(n))})}catch(n){clearTimeout(r),t("Failed to read body: "+String(n))}})}function tG(e,t,r,n,i,a){if(a===void 0&&(a=0),a>10)return Tg.error("Cannot find performance entry"),Promise.resolve(null);var o=e.performance.getEntriesByName(r),s=kmt(o,function(l){return OU(l)&&l.initiatorType===t&&(!n||l.startTime>=n)&&(!i||l.startTime<=i)});return s?Promise.resolve(s):new Promise(function(l){setTimeout(l,50*a)}).then(function(){return tG(e,t,r,n,i,a+1)})}function Dmt(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return function(){};var n=pTe(t.XMLHttpRequest.prototype,"open",function(i){return function(a,o,s,l,c){s===void 0&&(s=!0);
vendor: 5,279 bytes, line 136
136var d=this,f=new Request(o,{method:a}),h={},p,g,_={},b=d.setRequestHeader.bind(d);d.setRequestHeader=function(S,P){return iI("request",r.recordHeaders,S)&&(_[S]=P),b(S,P)},h.requestHeaders=_;var E=d.send.bind(d);d.send=function(S){return aI("request",r.recordBodyUrls,f.url)&&(h.requestBody=Tse(S)),p=t.performance.now(),E(S)},d.addEventListener("readystatechange",function(){if(d.readyState===d.DONE){g=t.performance.now();var S={},P=d.getAllResponseHeaders();if(P){var O=P.trim().split(/[\r\n]+/);O.forEach(function(I){if(I){var N=I.indexOf(": ");if(N!==-1){var M=I.substring(0,N),F=I.substring(N+2);M&&iI("response",r.recordHeaders,M)&&(S[M]=F)}}})}h.responseHeaders=S,aI("response",r.recordBodyUrls,f.url)&&(h.responseBody=Tse(d.response)),tG(t,"xmlhttprequest",f.url,p,g).then(function(I){if(!I){Tg.error("Failed to get performance entry for XHR request to "+f.url);return}var N={url:I.name,method:f.method,initiatorType:I.initiatorType,status:d.status,startTime:Math.round(I.startTime),endTime:Math.round(I.responseEnd),timeOrigin:nI(t),requestHeaders:h.requestHeaders,requestBody:h.requestBody,responseHeaders:h.responseHeaders,responseBody:h.responseBody};e({requests:[N]})}).catch(function(I){Tg.error("Error recording XHR request to "+f.url+": "+String(I))})}}),i.call(d,a,o,s,l,c)}});return function(){n()}}function Mmt(e,t,r){if(!r.initiatorTypes.includes("fetch"))return function(){};var n=pTe(t,"fetch",function(i){return function(){var a=new Request(arguments[0],arguments[1]),o,s={},l,c,d,f=Promise.resolve(void 0),h=Promise.resolve(void 0);try{var p={};a.headers.forEach(function(g,_){iI("request",r.recordHeaders,_)&&(p[_]=g)}),s.requestHeaders=p,aI("request",r.recordBodyUrls,a.url)&&(f=Ase(a).then(function(g){s.requestBody=g})),l=t.performance.now(),d=i.apply(t,arguments).then(function(g){o=g,c=t.performance.now();var _={};return o.headers.forEach(function(b,E){iI("response",r.recordHeaders,E)&&(_[E]=b)}),s.responseHeaders=_,aI("response",r.recordBodyUrls,a.url)&&(h=Ase(o).then(function(b){s.responseBody=b})),o})}catch(g){d=Promise.reject(g)}return Promise.all([f,h,d]).then(function(){return tG(t,"fetch",a.url,l,c)}).then(function(g){if(!g){Tg.error("Failed to get performance entry for fetch request to "+a.url);return}var _={url:g.name,method:a.method,initiatorType:g.initiatorType,status:o?o.status:void 0,startTime:Math.round(g.startTime),endTime:Math.round(g.responseEnd),timeOrigin:nI(t),requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody};e({requests:[_]})}).catch(function(g){Tg.error("Error recording fetch request to "+a.url+": "+String(g))}),d}});return function(){n()}}function Lmt(e,t,r){if(!("performance"in t))return function(){};var n=Object.assign({},O9.recordHeaders,r.recordHeaders||{}),i=Object.assign({},O9.recordBodyUrls,r.recordBodyUrls||{});r=Object.assign({},r,{recordHeaders:n,recordBodyUrls:i});var a=Object.assign({},O9,r),o=function(d){var f=d.requests.filter(function(h){var p=JO(h.url,a.ignoreRequestUrls||[]);return!p&&!a.ignoreRequestFn(h)});(f.length>0||d.isInitial)&&e(Object.assign({},d,{requests:f}))},s=Nmt(o,t,a),l=Dmt(o,t,a),c=Mmt(o,t,a);return function(){s(),l(),c()}}var Fmt="rrweb/[email protected]",Bmt=function(e){return{name:Fmt,observer:Lmt,options:e}},Kv=Kd("recorder"),zmt=Vt.CompressionStream,Hmt={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},Umt=new Set([_n.MouseMove,_n.MouseInteraction,_n.Scroll,_n.ViewportResize,_n.Input,_n.TouchMove,_n.MediaInteraction,_n.Drag,_n.Selection]);function Vmt(e){return e.type===ii.IncrementalSnapshot&&Umt.has(e.data.source)}var mo=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||Vp,this._onMaxLengthReached=e.onMaxLengthReached||Vp,this._onBatchSent=e.onBatchSent||Vp,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=TS,this.recordMinMs=0,this._recordMinMsCheckStart=null;var t=MC(e.sharedLockStorage||X5(),!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new Kc(WW,J2e,KW),this.batcher=new Yc(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:Hmt,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:lmt,sharedLockTimeoutMS:10*1e3})};mo.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var r=this._mixpanel.get_property("$user_id");return r&&(e.$user_id=r),e};mo.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init(
136).catch((function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}).bind(this)).then((function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))}).bind(this))};mo.prototype.getConfig=function(e){return this._mixpanel.get_config(e)};mo.prototype.get_config=function(e){return this.getConfig(e)};mo.prototype.startRecording=function(e){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){Kv.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>TS&&(this.recordMaxMs=TS,Kv.critical("record_max_ms cannot be greater than "+TS+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=te.info.currentUrl(),this.replayStartUrl=te.info.currentUrl()),e||this.recordMinMs>0?(this.batcher.stop(),this._recordMinMsCheckStart=null):this.batcher.start();var t=(function(){clearTimeout(this.idleTimeoutId);var c=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,c),this.idleExpires=new Date().getTime()+c}).bind(this);t();var r=this.getConfig("record_block_selector");(r===""||r===null)&&(r=void 0);var n=Pmt(this._mixpanel),i=[];if(this.getConfig("record_network")){var a=this.getConfig("record_network_options")||{},o=(a.ignoreRequestUrls||[]).slice();o.push(this._getApiRoute()),a.ignoreRequestUrls=o,i.push(Bmt(a))}this.getConfig("record_console")&&i.push(Bpt({stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}}));var s=iTe(this.getConfig("record_allowed_iframe_origins"),Kv);try{this._stopRecording=this._rrwebRecord({emit:(function(c){if(this.idleExpires&&this.idleExpires<c.timestamp){this._onIdleTimeout();return}this._recordMinMsCheckStart===null&&(this._recordMinMsCheckStart=c.timestamp),Vmt(c)&&(this.batcher.stopped&&c.timestamp-this._recordMinMsCheckStart>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(c),(this.lastEventTimestamp===null||c.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=c.timestamp)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextSelector:"*",maskInputFn:this._getMaskFn(Rmt,n),maskTextFn:this._getMaskFn(Omt,n),recordCrossOriginIframes:s.length>0,allowedIframeOrigins:s,recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:i})}catch(c){this.reportError("Unexpected error when starting rrweb recording.",c)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var l=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),l)};mo.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(r){this.reportError("Error with rrweb stopRecording",r)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t};mo.prototype.isRrwebStopped=function(){return this._stopRecording===null};mo.prototype.flushEventsWithOptOut=function(e,t,r){var n=(function(i){i===0&&(this.stopRecording(),r({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(e,t,r,n)};mo.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}};mo.deserialize=function(e,t){var r=new mo(te.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}));return r};mo.prototype._getApiRoute=function(){return this.getConfig("api_routes").record};mo.prototype._sendRequest=function(e,t,r,n){var i=(function(o,s){o.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=te.info.currentUrl()),this._onBatchSent(),n({status:0,httpStatusCode:o.status,responseBody:s,retryAfter:o.headers.get("Retry-After")})}).bind(this),a=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");Vt.fetch(a+"/"+this._getApiRoute()+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(o){o.json().then(function(s){i(o,s)}).catch(function(s){n({error:s})})}).catch(function(o){n({error:o,httpStatusCode:0})})};mo.prototype._flushEvents=Im(function(e,t,r){var n=e.length;if(n>0){for(var i=this.replayId,a=1/0,o=-1/0,s=!1,l=0;l<n;l++)a=Math.min(a,e[l].timestamp),o=Math.max(o,e[l].timestamp),e[l].type===ii.FullSnapshot&&(s=!0);if(this.seqNo===0){if(!s){r({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=a}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=a);var c=o-this.replayStartTime,d={$current_url:this.batchStartUrl,$lib_version:Rl.LIB_VERSION,batch_start_time:a/1e3,mp_lib:"web",replay_id:i,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},f=JSON.stringify(e);if(Object.assign(d,this.getUserIdInfo()),Jpt(fd,Lf.vendor,Xw)){var h=new Blob([f],{type:"application/json"}).stream(),p=h.pipeThrough(new zmt("gzip"));new Response(p).blob().then((function(g){d.format="gzip",this._sendRequest(i,d,g,r)}).bind(this))}else d.format="body",this._sendRequest(i,d,f,r)}});mo.prototype.reportError=function(e,t){Kv.error.apply(Kv.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(r){Kv.error(r)}};mo.prototype.getDurationMs=function(){return this.replayStartTime===null?0:this.lastEventTimestamp===null?new Date().getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime};mo.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>C9?(Kv.critical("record_min_ms cannot be greater than "+C9+"ms. Capping value."),C9):e};mo.prototype._getMaskFn=function(e,t){return(function(r,n){if(!r.trim().length)return"";var i=!0;try{i=e(n,t)}catch(o){this.reportError("Error checking if text should be masked, defaulting to masked",o)}if(i){var a=Math.min(r.length,1e4);return"*".repeat(a)}else return r}).bind(this)};
136var xh=function(e){this.idb=new Kc(WW,GW,KW),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};xh.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")};xh.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)};xh.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return En.resolve();var t=e.tabId;return t?this.idb.init().then((function(){return this.idb.setItem(t,e)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),En.resolve())};xh.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(e){return QW(e)?null:e}).bind(this)).catch(this.handleError.bind(this)):En.resolve(null)};xh.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()};xh.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then((function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}).bind(this)).catch(this.handleError.bind(this))};xh.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):En.resolve()};xh.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(e){var t=e.filter(function(r){return QW(r)}).map((function(r){var n=mo.deserialize(r,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return n.unloadPersistedData().then((function(){return this.idb.removeItem(r.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return En.all(t)}).bind(this)).catch(this.handleError.bind(this)):En.resolve([])};var PS=Kd("recorder"),Xd=function(e,t,r){this.mixpanelInstance=e,this.rrwebRecord=t||Am,this.sharedLockStorage=r,this.recordingRegistry=new xh({mixpanelInstance:this.mixpanelInstance,errorReporter:PS.error,sharedLockStorage:r}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};Xd.prototype.startRecording=function(e){if(e=e||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){PS.log("Recording already in progress, skipping startRecording.");return}var t=(function(){PS.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),r=(function(){PS.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),n=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:n,onIdleTimeout:t,onMaxLengthReached:r,replayId:te.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=mo.deserialize(e.activeSerializedRecording,i):this.activeRecording=new mo(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())};Xd.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then((function(){return this.recordingRegistry.clearActiveRecording()}).bind(this)).then((function(){this.stopRecordingInProgress=!1}).bind(this))};Xd.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)};Xd.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var r=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),r}return En.resolve()};Xd.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),En.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(PS.log("No resumable recording found."),null)}).bind(this))};Xd.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})};Xd.prototype.isRecording=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()};Xd.prototype.getActiveReplayId=function(){return this.isRecording()?this.activeRecording.replayId:null};Object.defineProperty(Xd.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});Vt[CH]=Xd;
vendor: 4,522 bytes, line 136
136function qmt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iR={exports:{}},jmt=iR.exports,Pse;function $mt(){return Pse||(Pse=1,(function(e,t){(function(r,n){e.exports=n()})(jmt,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function r(a){for(var o=[],s=0,l=a.length;s<l;s++)o.indexOf(a[s])===-1&&o.push(a[s]);return o}var n={},i={"==":function(a,o){return a==o},"===":function(a,o){return a===o},"!=":function(a,o){return a!=o},"!==":function(a,o){return a!==o},">":function(a,o){return a>o},">=":function(a,o){return a>=o},"<":function(a,o,s){return s===void 0?a<o:a<o&&o<s},"<=":function(a,o,s){return s===void 0?a<=o:a<=o&&o<=s},"!!":function(a){return n.truthy(a)},"!":function(a){return!n.truthy(a)},"%":function(a,o){return a%o},log:function(a){return console.log(a),a},in:function(a,o){return!o||typeof o.indexOf>"u"?!1:o.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,o,s){if(s<0){var l=String(a).substr(o);return l.substr(0,l.length+s)}return String(a).substr(o,s)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,o){return parseFloat(a,10)+parseFloat(o,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,o){return parseFloat(a,10)*parseFloat(o,10)})},"-":function(a,o){return o===void 0?-a:a-o},"/":function(a,o){return a/o},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,o){return a.concat(o)},[])},var:function(a,o){var s=o===void 0?null:o,l=this;if(typeof a>"u"||a===""||a===null)return l;for(var c=String(a).split("."),d=0;d<c.length;d++)if(l==null||(l=l[c[d]],l===void 0))return s;return l},missing:function(){for(var a=[],o=Array.isArray(arguments[0])?arguments[0]:arguments,s=0;s<o.length;s++){var l=o[s],c=n.apply({var:l},this);(c===null||c==="")&&a.push(l)}return a},missing_some:function(a,o){var s=n.apply({missing:o},this);return o.length-s.length>=a?[]:s}};return n.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},n.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},n.get_operator=function(a){return Object.keys(a)[0]},n.get_values=function(a){return a[n.get_operator(a)]},n.apply=function(a,o){if(Array.isArray(a))return a.map(function(b){return n.apply(b,o)});if(!n.is_logic(a))return a;var s=n.get_operator(a),l=a[s],c,d,f,h,p;if(Array.isArray(l)||(l=[l]),s==="if"||s=="?:"){for(c=0;c<l.length-1;c+=2)if(n.truthy(n.apply(l[c],o)))return n.apply(l[c+1],o);return l.length===c+1?n.apply(l[c],o):null}else if(s==="and"){for(c=0;c<l.length;c+=1)if(d=n.apply(l[c],o),!n.truthy(d))return d;return d}else if(s==="or"){for(c=0;c<l.length;c+=1)if(d=n.apply(l[c],o),n.truthy(d))return d;return d}else{if(s==="filter")return h=n.apply(l[0],o),f=l[1],Array.isArray(h)?h.filter(function(b){return n.truthy(n.apply(f,b))}):[];if(s==="map")return h=n.apply(l[0],o),f=l[1],Array.isArray(h)?h.map(function(b){return n.apply(f,b)}):[];if(s==="reduce")return h=n.apply(l[0],o),f=l[1],p=typeof l[2]<"u"?n.apply(l[2],o):null,Array.isArray(h)?h.reduce(function(b,E){return n.apply(f,{current:E,accumulator:b})},p):p;if(s==="all"){if(h=n.apply(l[0],o),f=l[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(!n.truthy(n.apply(f,h[c])))return!1;return!0}else if(s==="none"){if(h=n.apply(l[0],o),f=l[1],!Array.isArray(h)||!h.length)return!0;for(c=0;c<h.length;c+=1)if(n.truthy(n.apply(f,h[c])))return!1;return!0}else if(s==="some"){if(h=n.apply(l[0],o),f=l[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(n.truthy(n.apply(f,h[c])))return!0;return!1}}if(l=l.map(function(b){return n.apply(b,o)}),i.hasOwnProperty(s)&&typeof i[s]=="function")return i[s].apply(o,l);if(s.indexOf(".")>0){var g=String(s).split("."),_=i;for(c=0;c<g.length;c++){if(!_.hasOwnProperty(g[c]))throw new Error("Unrecognized operation "+s+" (failed at "+g.slice(0,c+1).join(".")+")");_=_[g[c]]}return _.apply(o,l)}throw new Error("Unrecognized operation "+s)},n.uses_data=function(a){var o=[];if(n.is_logic(a)){var s=n.get_operator(a),l=a[s];Array.isArray(l)||(l=[l]),s==="var"?o.push(l[0]):l.forEach(function(c){o.push.apply(o,n.uses_data(c))})}return r(o)},n.add_operation=function(a,o){i[a]=o},n.rm_operation=function(a){delete i[a]},n.rule_like=function(a,o){if(o===a||o==="@")return!0;
136if(o==="number")return typeof a=="number";if(o==="string")return typeof a=="string";if(o==="array")return Array.isArray(a)&&!n.is_logic(a);if(n.is_logic(o)){if(n.is_logic(a)){var s=n.get_operator(o),l=n.get_operator(a);if(s==="@"||s===l)return n.rule_like(n.get_values(a,!1),n.get_values(o,!1))}return!1}if(Array.isArray(o))if(Array.isArray(a)){if(o.length!==a.length)return!1;for(var c=0;c<o.length;c+=1)if(!n.rule_like(a[c],o[c]))return!1;return!0}else return!1;return!1},n})})(iR)),iR.exports}var Wmt=$mt(),Gmt=qmt(Wmt),Kmt=function(e,t,r){if(e!==r.event_name)return{matches:!1};var n=r.property_filters,i=!0;if(n&&!te.isEmptyObject(n))try{i=Gmt.apply(n,t||{})}catch(a){return{matches:!1,error:a.toString()}}return{matches:i}},vTe={};vTe.eventMatchesCriteria=Kmt;Vt[gu]=Promise.resolve(vTe);var Ymt=30,Xmt=1e3,Zmt=4,Qmt=!1;function gTe(){this.clicks=[]}gTe.prototype.isRageClick=function(e,t){t=t||{};var r=t.threshold_px||Ymt,n=t.timeout_ms||Xmt,i=t.click_count||Zmt,a=t.interactive_elements_only||Qmt;if(a){var o=fTe(e);if(!o||uTe(o))return!1}var s=Date.now(),l=e.pageX,c=e.pageY,d=this.clicks[this.clicks.length-1];if(d&&s-d.timestamp<n&&Math.sqrt(Math.pow(l-d.x,2)+Math.pow(c-d.y,2))<r){if(this.clicks.push({x:l,y:c,timestamp:s}),this.clicks.length>=i)return this.clicks=[],!0}else this.clicks=[{x:l,y:c,timestamp:s}];return!1};function B_(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}B_.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return fTe(e)};B_.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=dTe(e),r=0;r<t.length;r++){var n=t[r];n&&n.shadowRoot&&this.observeShadowRoot(n.shadowRoot)}};B_.prototype.observeShadowRoot=function(e){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(e))){var t=this;try{this.observedShadowRoots.add(e);var r=new window.MutationObserver(function(){t.changeCallback()});r.observe(e,this.observerConfig),this.shadowObservers.push(r)}catch(n){va.critical("Error while observing shadow root",n)}}};B_.prototype.start=function(){if(!this.observedShadowRoots){if(!wmt()){va.critical("Shadow DOM observation unavailable: WeakSet not supported");return}this.observedShadowRoots=new WeakSet}};B_.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(t){va.critical("Error while disconnecting shadow DOM observer",t)}this.shadowObservers=[],this.observedShadowRoots=null}};var Jmt=500,evt=[LC,cmt,tI,umt,dmt],tvt=[Z5],rvt=[TU],Rse={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function Zd(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}Zd.prototype.addClick=function(e){var t=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return t||(t=e.target||e.srcElement),!t||uTe(t)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:t,event:e,timestamp:Date.now()}),!0)};Zd.prototype.trackClick=function(e,t){if(!this.isTracking)return!1;var r=this.addClick(e);return r&&this.triggerProcessing(t),r};Zd.prototype.getDeadClicks=function(e){if(this.pendingClicks.length===0)return[];var t=e.timeout_ms,r=Date.now(),n=this.pendingClicks.slice();this.pendingClicks=[];for(var i=[],a=0;a<n.length;a++){var o=n[a];r-o.timestamp>=t?this.hasChangesAfter(o.timestamp)||i.push(o):this.pendingClicks.push(o)}return i};Zd.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100};Zd.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()};Zd.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))};Zd.prototype.processRecursively=function(e){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var t=e.timeout_ms,r=this;this.processingTimeout=setTimeout(function(){if(r.processingActive){for(var n=r.getDeadClicks(e),i=0;i<n.length;i++)r.onDeadClickCallback(n[i].event);r.pendingClicks.length>0?r.processRecursively(e):r.processingActive=!1}},t)};Zd.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;evt.forEach(function(r){var n=function(){e.recordChangeEvent()};document.addEventListener(r,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:r,handler:n,options:{capture:!0,passive:!0}})}),rvt.forEach(function(r){var n=function(){e.recordChangeEvent()};window.addEventListener(r,n),e.eventListeners.push({target:window,event:r,handler:n})}),tvt.forEach(function(r){var n=function(){e.recordChangeEvent()};window.addEventListener(r,n,{passive:!0}),e.eventListeners.push({target:window,event:r,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,Rse)}catch(r){va.critical("Error while setting up mutation observer",r)}if(window.customElements)try{this.shadowDOMObserver=new B_(function(){e.recordChangeEvent()},Rse),this.shadowDOMObserver.start()}catch(r){va.critical("Error while setting up shadow DOM observer",r),this.shadowDOMObserver=null}}};Zd.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var t=this.eventListeners[e];try{t.target.removeEventListener(t.event,t.handler,t.options)}catch(r){va.critical("Error while removing event listener",r)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(r){va.critical("Error while disconnecting mutation observer",r)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(r){va.critical("Error while stopping shadow DOM observer",r)}this.shadowDOMObserver=null}}};var yTe="autocapture",nvt="track_pageview",IU="full-url",ivt="url-with-path-and-query-string",avt="url-with-path",ovt="allow_element_callback",_Te="allow_selectors",bTe="allow_url_regexes",ETe="block_attrs",wTe="block_element_callback",STe="block_selectors",CTe="block_url_regexes",xTe="capture_extra_attrs",TTe="capture_text_content",ATe="scroll_capture_all",PTe="scroll_depth_percent_checkpoints",oI="click",
136sI="dead_click",kU="input",RTe="pageview",lI="rage_click",NU="scroll",Q5="page_leave",DU="submit",Ro={};Ro[_Te]=[];Ro[bTe]=[];Ro[ETe]=[];Ro[wTe]=null;Ro[STe]=[];Ro[CTe]=[];Ro[xTe]=[];Ro[TTe]=!1;Ro[ATe]=!1;Ro[PTe]=[25,50,75,100];Ro[oI]=!0;Ro[sI]=!0;Ro[kU]=!0;Ro[RTe]=IU;Ro[lI]=!0;Ro[NU]=!0;Ro[Q5]=!1;Ro[DU]=!0;var FC={$mp_autocapture:!0},OTe="$mp_click",ITe="$mp_dead_click",svt="$mp_input_change",kTe="$mp_rage_click",lvt="$mp_scroll",cvt="$mp_submit",uvt="$mp_page_leave",bo=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};bo.prototype.init=function(){if(!Emt()){va.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()};bo.prototype.getFullConfig=function(){var e=this.mp.get_config(yTe);return e?te.isObject(e)?te.extend({},Ro,e):Ro:{}};bo.prototype.getConfig=function(e){return this.getFullConfig()[e]};bo.prototype.currentUrlBlocked=function(){var e=te.info.currentUrl(),t=this.getConfig(bTe)||[];if(t.length)try{return!JO(e,t)}catch(n){return va.critical("Error while checking block URL regexes: ",n),!0}var r=this.getConfig(CTe)||[];if(!r||!r.length)return!1;try{return JO(e,r)}catch(n){return va.critical("Error while checking block URL regexes: ",n),!0}};bo.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(yTe)?this.getConfig(RTe):this.mp.get_config(nvt)};bo.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var r=this.mp.is_recording_heatmap_data()&&(t===OTe&&!this.getConfig(oI)||t===kTe&&!this._getClickTrackingConfig(lI)||t===ITe&&!this._getClickTrackingConfig(sI)),n=_mt(e,{allowElementCallback:this.getConfig(ovt),allowSelectors:this.getConfig(_Te),blockAttrs:this.getConfig(ETe),blockElementCallback:this.getConfig(wTe),blockSelectors:this.getConfig(STe),captureExtraAttrs:this.getConfig(xTe),captureTextContent:this.getConfig(TTe),capturedForHeatMap:r});n&&(te.extend(n,FC),this.mp.track(t,n))}};bo.prototype.initPageListeners=function(){if(Vt.removeEventListener(_se,this.listenerPopstate),Vt.removeEventListener(TU,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(Q5)&&!this.mp.get_config("record_heatmap_data"))){this.listenerPopstate=function(){Vt.dispatchEvent(new Event(kp))},this.listenerHashchange=function(){Vt.dispatchEvent(new Event(kp))},Vt.addEventListener(_se,this.listenerPopstate),Vt.addEventListener(TU,this.listenerHashchange);var e=Vt.history.pushState;typeof e=="function"&&(Vt.history.pushState=function(r,n,i){e.call(Vt.history,r,n,i),Vt.dispatchEvent(new Event(kp))});var t=Vt.history.replaceState;typeof t=="function"&&(Vt.history.replaceState=function(r,n,i){t.call(Vt.history,r,n,i),Vt.dispatchEvent(new Event(kp))})}};bo.prototype._getClickTrackingConfig=function(e){var t=this.getConfig(e);return t?t===!0?{}:typeof t=="object"?t:{}:null};bo.prototype._trackPageLeave=function(e,t,r){if(!this.hasTrackedScrollSession&&!(!this.getConfig(Q5)&&!this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var n=Math.max(bn.documentElement.clientHeight,Vt.innerHeight||0),i=Math.round(Math.max(this.maxScrollViewDepth-n,0)/(r-n)*100),a=Math.round(n/r*100);r<=n&&(i=100,a=100);var o=te.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:i,$fold_line_percentage:a,$scroll_height:r,$event_type:e.type,$current_url:t||te.info.currentUrl(),$viewportHeight:n,$viewportWidth:Math.max(bn.documentElement.clientWidth,Vt.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},FC);this.mp.track(uvt,o,{transport:"sendBeacon"})}};bo.prototype._initScrollDepthTracking=function(){if(Vt.removeEventListener(JW,this.listenerScrollDepth),Vt.removeEventListener(Z5,this.listenerScrollDepth),!!this.mp.get_config("record_heatmap_data")){va.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(bn.documentElement.clientHeight,Vt.innerHe
136ight||0);var e=(function(){if(!this.currentUrlBlocked()){var r=Math.max(bn.documentElement.clientHeight,Vt.innerHeight||0)+Vt.scrollY;r>this.maxScrollViewDepth&&(this.maxScrollViewDepth=r),this.previousScrollHeight=bn.body.scrollHeight}}).bind(this),t=cTe(e);this.listenerScrollDepth=t.listener,Vt.addEventListener(t.eventType,this.listenerScrollDepth)}};bo.prototype.initClickTracking=function(){Vt.removeEventListener(mh,this.listenerClick,!0),!(!this.getConfig(oI)&&!this.mp.get_config("record_heatmap_data"))&&(va.log("Initializing click tracking"),this.listenerClick=(function(e){!this.getConfig(oI)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,OTe)}).bind(this),Vt.addEventListener(mh,this.listenerClick,!0))};bo.prototype.initDeadClickTracking=function(){var e=this._getClickTrackingConfig(sI);if(!e&&!this.mp.get_config("record_heatmap_data")){this.stopDeadClickTracking();return}va.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Zd((function(t){this.trackDomEvent(t,ITe)}).bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=(function(t){var r=this._getClickTrackingConfig(sI);if(!(!r&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=r||{};n.timeout_ms||(n.timeout_ms=Jmt),this._deadClickTracker.trackClick(t,n)}}).bind(this),Vt.addEventListener(mh,this.listenerDeadClick,!0))};bo.prototype.initInputTracking=function(){Vt.removeEventListener(LC,this.listenerChange,!0),this.getConfig(kU)&&(va.log("Initializing input tracking"),this.listenerChange=(function(e){this.getConfig(kU)&&this.trackDomEvent(e,svt)}).bind(this),Vt.addEventListener(LC,this.listenerChange,!0))};bo.prototype.initPageviewTracking=function(){if(Vt.removeEventListener(kp,this.listenerLocationchange),!(!this.pageviewTrackingConfig()&&!this.mp.get_config("record_heatmap_data"))){va.log("Initializing pageview tracking");var e="",t=!1;(this.pageviewTrackingConfig()||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()&&(t=this.mp.track_pageview(FC)),t&&(e=te.info.currentUrl()),this.listenerLocationchange=xg((function(){if(!this.currentUrlBlocked()){var r=te.info.currentUrl(),n=!1,i=r.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],a=this.pageviewTrackingConfig();if(!a&&this.mp.is_recording_heatmap_data()&&(a=IU),a===IU?n=r!==e:a===ivt?n=r.split("#")[0]!==e.split("#")[0]:a===avt&&(n=i),n){var o=this.mp.track_pageview(FC);o&&(e=r),i&&(this.lastScrollCheckpoint=0,va.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)),Vt.addEventListener(kp,this.listenerLocationchange)}};bo.prototype.initRageClickTracking=function(){Vt.removeEventListener(mh,this.listenerRageClick,!0);var e=this._getClickTrackingConfig(lI);!e&&!this.mp.get_config("record_heatmap_data")||(va.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new gTe),this.listenerRageClick=(function(t){var r=this._getClickTrackingConfig(lI);!r&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(t,r)&&this.trackDomEvent(t,kTe)}).bind(this),Vt.addEventListener(mh,this.listenerRageClick,!0))};bo.prototype.initScrollTracking=function(){if(Vt.removeEventListener(Z5,this.listenerScroll),Vt.removeEventListener(JW,this.listenerScroll),!!this.getConfig(NU)){va.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=(function(){if(this.getConfig(NU)&&!this.currentUrlBlocked()){var r=this.getConfig(ATe),n=(this.getConfig(PTe)||[]).slice().sort(function(d,f){return d-f}),i=Vt.scrollY,a=te.extend({$scroll_top:i},FC);try{var o=bn.body.scrollHeight,s=Math.round(i/(o-Vt.innerHeight)*100);if(a.$scroll_height=o,a.$scroll_percentage=s,s>this.lastScrollCheckpoint)for(var l=0;l<n.length;l++){var c=n[l];s>=c&&this.lastScrollCheckpoint<c&&(a.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,r=!0)}}catch(d){va.critical("Error while calculating scroll percentage",d)}r&&this.mp.track(lvt,a)}}).bind(this),t=cTe(e);this.listenerScroll=t.listener,Vt.addEventListener(t.eventType,this.listenerScroll)}};bo.prototype.initSubmitTracking=function(){Vt.removeEventListener(tI,this.listenerSubmit,!0),this.getConfig(DU)&&(va.log("Initializing submit tracking"),this.listenerSubmit=(function(e){this.getConfig(DU)&&this.trackDomEvent(e,cvt)}).bind(this),Vt.addEventListener(tI,this.listenerSubmit,!0))};bo.prototype.initPageLeaveTracking=function(){if(bn.removeEventListener(bse,this.listenerPageLeaveVisibilitychange),Vt.removeEventListener(kp,this.listenerPageLeaveLocationchange),Vt.removeEventListener(yse,this.listenerPageLoad),!(!this.getConfig(Q5)&&!this.mp.get_config("record_heatmap_data"))){va.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=te.info.currentUrl();this.listenerPageLoad=(function(){this.previousScrollHeight=bn.body.scrollHeight}).bind(this),Vt.addEventListener(yse,this.listenerPageLoad),this.listenerPageLeaveLocationchange=xg
136((function(t){if(!this.currentUrlBlocked()){var r=te.info.currentUrl(),n=r!==e;n&&(this._trackPageLeave(t,e,this.previousScrollHeight),e=r,this.maxScrollViewDepth=Math.max(bn.documentElement.clientHeight,Vt.innerHeight||0),this.previousScrollHeight=bn.body.scrollHeight,this.hasTrackedScrollSession=!1)}}).bind(this)),Vt.addEventListener(kp,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=(function(t){bn.hidden&&this._trackPageLeave(t,e,this.previousScrollHeight)}).bind(this),bn.addEventListener(bse,this.listenerPageLeaveVisibilitychange)}};bo.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(Vt.removeEventListener(mh,this.listenerDeadClick,!0),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)};jW(bo);var NTe=function(e,t){return Vt[gu]&&typeof Vt[gu].then=="function"||(Vt[gu]=new Promise(function(r){e(t,r)}).then(function(){var r=Vt[gu];if(r&&typeof r.then=="function")return r;throw new Error("targeting failed to load")}).catch(function(r){throw delete Vt[gu],r})),Vt[gu]},Su=Kd("flags"),dvt="mixpanelFlagsDb",DTe="mixpanelFlags",fvt={version:1,storeNames:[DTe]},hvt="persisted_variants_for_",Ose=1440*60*1e3,qp=Object.freeze({NETWORK_ONLY:"networkOnly",NETWORK_FIRST:"networkFirst",PERSISTENCE_UNTIL_NETWORK_SUCCESS:"persistenceUntilNetworkSuccess"}),pvt=[qp.NETWORK_ONLY,qp.NETWORK_FIRST,qp.PERSISTENCE_UNTIL_NETWORK_SUCCESS],u0=function(e,t,r){this.idb=new Kc(dvt,DTe,fvt),this.persistenceConfig=e,this.persistedVariantsKey=hvt+t,this.isGloballyDisabled=r||function(){return!1}};u0.prototype.getPolicy=function(){return this.isGloballyDisabled()||!this._isConfigValid()?qp.NETWORK_ONLY:this.persistenceConfig.variantLookupPolicy};u0.prototype.getTtlMs=function(){if(!this._isConfigValid())return Ose;var e=this.persistenceConfig.persistenceTtlMs;return e??Ose};u0.prototype._isConfigValid=function(){var e=this.persistenceConfig;return e?pvt.indexOf(e.variantLookupPolicy)===-1?(Su.error("Invalid variantLookupPolicy:",e.variantLookupPolicy),!1):e.persistenceTtlMs!==void 0&&e.persistenceTtlMs!==null&&e.persistenceTtlMs<=0?(Su.error("If provided, persistenceTtlMs must be a positive number. Provided value:",e.persistenceTtlMs),!1):!0:!1};u0.prototype.loadFlagsFromStorage=function(e){var t=te.bind(function(){return this.clear().then(function(){return null}).catch(function(){return null})},this);if(this.getPolicy()===qp.NETWORK_ONLY)return t();var r=this.getTtlMs();return this.idb.init().then(te.bind(function(){return this.idb.getItem(this.persistedVariantsKey)},this)).then(te.bind(function(n){if(!n)return Su.log("No persisted variants found in IndexedDB"),null;if(r&&Date.now()-n.persistedAt>=r)return Su.log("Persisted variants are expiring"),null;if(!e||n.distinctId!==e.distinct_id)return Su.log("Persisted variants found, but for a different distinct_id so clearing."),t();var i=new Map;return te.each(n.flagVariants,function(a,o){i.set(o,{key:a.variant_key,value:a.variant_value,experiment_id:a.experiment_id,is_experiment_active:a.is_experiment_active,is_qa_tester:a.is_qa_tester,variant_source:"persistence",persisted_at_in_ms:n.persistedAt,ttl_in_ms:r})}),Su.log("Loaded",i.size,"variants from IndexedDB for distinct_id",n.distinctId),{flags:i,pendingFirstTimeEvents:n.pendingFirstTimeEvents||{},persistedAtMs:n.persistedAt,ttlMs:r}},this)).catch(te.bind(function(n){return Su.error("Failed to load persisted variants from IndexedDB, so clearing",n),t()},this))};u0.prototype.save=function(e,t,r){if(this.getPolicy()===qp.NETWORK_ONLY)return Promise.resolve();var n={};t.forEach(function(a,o){n[o]={variant_key:a.key,variant_value:a.value,experiment_id:a.experiment_id,is_experiment_active:a.is_experiment_active,is_qa_tester:a.is_qa_tester}});var i={persistedAt:Date.now(),distinctId:e&&e.distinct_id,context:e,flagVariants:n,pendingFirstTimeEvents:r||{}};return this.idb.init().then(te.bind(function(){return this.idb.setItem(this.persistedVariantsKey,i)},this)).then(function(){Su.log("Saved",t.size,"variants to IndexedDB for distinct_id",i.distinctId)}).catch(function(a){Su.error("Failed to persist variants to IndexedDB:",a)})};u0.prototype.clear=function(){return this.isGloballyDisabled()?Promise.resolve():this.idb.init().then(te.bind(function(){return this.idb.removeItem(this.persistedVariantsKey)},this)).then(function(){Su.log("Cleared persisted variants from IndexedDB")}
136).catch(function(e){Su.error("Failed to clear persisted variants from IndexedDB:",e)})};var Wi=Kd("flags"),cI="flags",uI="context",mvt="persistence",MU={};MU[uI]={};var vvt=function(e,t){return e+":"+t},gvt=function(e){return e.split(":")[0]},Lv=function(e){return te.isObject(e)?te.extend({},e,{variant_source:"fallback"}):{value:e,variant_source:"fallback"}},Hr=function(e){this.fetch=Vt.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc,this.loadExtraBundle=e.loadExtraBundle||function(){},this.targetingSrc=e.targetingSrc||""};Hr.prototype.init=function(){if(!this.minApisSupported()){Wi.critical("Feature Flags unavailable: missing minimum required APIs");return}return this.flags=null,this.trackedFeatures=new Set,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence=new u0(this.getConfig(mvt),this.getMpConfig("token"),te.bind(function(){return this.getMpConfig("disable_persistence")},this)),this.persistenceLoadedPromise=this.persistence.loadFlagsFromStorage(this._buildContext()).then(te.bind(function(e){e&&(this.flags=e.flags,this.pendingFirstTimeEvents=e.pendingFirstTimeEvents,this._loadedPersistedAtMs=e.persistedAtMs,this._loadedTtlMs=e.ttlMs)},this)),this.persistenceLoadedPromise.then(te.bind(function(){return this.fetchFlags()},this)).catch(function(){Wi.error("Error initializing feature flags")})};Hr.prototype._buildContext=function(){return te.extend({distinct_id:this.getMpProperty("distinct_id"),device_id:this.getMpProperty("$device_id")},this.getConfig(uI))};Hr.prototype.reset=function(){return this.persistence?(this.flags=null,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this.trackedFeatures=new Set,this.fetchPromise=null,this._fetchInProgressStartTime=null,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence.clear().then(te.bind(function(){return this.fetchFlags()},this)).catch(function(){Wi.error("Error during flags reset")})):Promise.resolve()};Hr.prototype.getFullConfig=function(){var e=this.getMpConfig(cI);return e?te.isObject(e)?te.extend({},MU,e):MU:{}};Hr.prototype.getConfig=function(e){return this.getFullConfig()[e]};Hr.prototype.isSystemEnabled=function(){return!!this.getMpConfig(cI)};Hr.prototype.updateContext=function(e,t){if(!this.isSystemEnabled())return Wi.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var r=this.getMpConfig(cI);te.isObject(r)||(r={});var n=t&&t.replace?{}:this.getConfig(uI);r[uI]=te.extend({},n,e);var i={};return i[cI]=r,this.setMpConfig(i),this.fetchFlags().catch(function(){Wi.error("Error fetching flags during updateContext")})};Hr.prototype.areFlagsReady=function(){return this.isSystemEnabled()||Wi.error("Feature Flags not enabled"),!!this.flags};Hr.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this._buildContext(),t=e.distinct_id,r=Q2e();Wi.log("Fetching flags for distinct ID: "+t);var n=new URLSearchParams;n.set("context",JSON.stringify(e)),n.set("token",this.getMpConfig("token")),n.set("mp_lib","web"),n.set("$lib_version",Rl.LIB_VERSION);var i=this.getFullApiRoute()+"?"+n.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(Vt,i,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:r}}).then((function(a){return this.markFetchComplete(),a.json()}).bind(this)).then((function(a){var o=a.flags;if(!o)throw new Error("No flags in API response");var s=new Map,l={};te.each(o,function(d,f){var h=!1,p=f+":";if(te.each(this.activatedFirstTimeEvents,function(_,b){b.startsWith(p)&&(h=!0)}),h){var g=this.flags&&this.flags.get(f);g&&s.set(f,g)}else s.set(f,{key:d.variant_key,value:d.variant_value,experiment_id:d.experiment_id,is_experiment_active:d.is_experiment_active,is_qa_tester:d.is_qa_tester,variant_source:"network"})},this);var c=a.pending_first_time_events;c&&c.length>0&&te.each(c,function(d){var f=d.flag_key,h=vvt(f,d.first_time_event_hash);this.activatedFirstTimeEvents[h]||(l[h]={flag_key:f,flag_id:d.flag_id,project_id:d.project_id,first_time_event_hash:d.first_time_event_hash,event_name:d.event_name,property_filters:d.property_filters,pending_variant:d.pending_variant})},this),this.activatedFirstTimeEvents&&te.each(this.activatedFirstTimeEvents,function(d,f){var h=gvt(f);d&&!s.has(h)&&this.flags&&this.flags.has(h)&&s.set(h,this.flags.get(h))},this),this.flags=s,this.trackedFeatures=new Set,this.pendingFirstTimeEvents=l,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this._traceparent=r,this._loadTargetingIfNeeded(),this.persistence.save(e,this.flags,this.pendingFirstTimeEvents)}).bind(this)).catch((function(a){throw this._fetchInProgressStartTime&&this.markFetchComplete(),Wi.error(a),a}).bind(this)),this.fetchPromise};Hr.prototype.loadFlags=function(){return this.isSystemEnabled()?this.trackedFeatures?this._fetchInProgressStartTime?this.fetchPromise:this.fetchFlags():(Wi.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()};Hr.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){Wi.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null};Hr.prototype._loadTargetingIfNeeded=function(){var e=!1;te.each(this.pendingFirstTimeEvents,function(t){t.property_filters&&!te.isEmptyObject(t.property_filters)&&(e=!0)}),e&&this.getTargeting().then(function(){Wi.log("targeting loaded for property filter evaluation")})};Hr.prototype.getTargeting=function(){return NTe(this.loadExtraBundle.bind(this),this.targetingSrc).catch((function(e){Wi.error("Failed to load targeting: "+e)}).bind(this))};Hr.prototype.checkFirstTimeEvents=function(e,t){!this.pendingFirstTimeEvents||te.isEmptyObject(this.pendingFirstTimeEvents)||(Vt[gu]&&te.isFunction(Vt[gu].then)?Vt[gu].then((function(r){this._processFirstTimeEventCheck(e,t,r)}).bind(this)).catch((function(){this._processFirstTimeEventCheck(e,t,null)}).bind(this)):this._processFirstTimeEventCheck(e,t,null))};Hr.prototype._processFirstTimeEventCheck=function(e,t,r){te.each(this.pendingFirstTimeEvents,function(n,i){if
136(!this.activatedFirstTimeEvents[i]){var a=n.flag_key,o;if(!r&&n.property_filters&&!te.isEmptyObject(n.property_filters)){Wi.warn('Skipping event check for "'+a+'" - property filters require targeting library');return}if(!r)o={matches:e===n.event_name,error:null};else{var s={event_name:n.event_name,property_filters:n.property_filters};o=r.eventMatchesCriteria(e,t,s)}if(o.error){Wi.error('Error checking first-time event for flag "'+a+'": '+o.error);return}if(o.matches){Wi.log('First-time event matched for flag "'+a+'": '+e);var l={key:n.pending_variant.variant_key,value:n.pending_variant.variant_value,experiment_id:n.pending_variant.experiment_id,is_experiment_active:n.pending_variant.is_experiment_active};this.flags.set(a,l),this.trackedFeatures.delete(a),this.activatedFirstTimeEvents[i]=!0,this.recordFirstTimeEvent(n.flag_id,n.project_id,n.first_time_event_hash)}}},this)};Hr.prototype.getFirstTimeEventApiRoute=function(e){var t=this.getFullApiRoute().replace(/\/$/,"");return t+"/"+e+"/first-time-events"};Hr.prototype.recordFirstTimeEvent=function(e,t,r){var n=this.getMpProperty("distinct_id"),i=Q2e(),a=new URLSearchParams;a.set("mp_lib","web"),a.set("$lib_version",Rl.LIB_VERSION);var o=this.getFirstTimeEventApiRoute(e)+"?"+a.toString(),s={distinct_id:n,project_id:t,first_time_event_hash:r};Wi.log("Recording first-time event for flag: "+e),this.fetch.call(Vt,o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:i},body:JSON.stringify(s)}).catch(function(l){Wi.error("Failed to record first-time event for flag "+e+": "+l)})};Hr.prototype.getVariant=function(e,t){if(!this.persistenceLoadedPromise)return new Promise(function(n){Wi.critical("Feature Flags not initialized"),n(Lv(t))});var r=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(te.bind(function(){if(r===qp.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getVariantSync(e,t):this.fetchPromise?this.fetchPromise.then(te.bind(function(){return this.getVariantSync(e,t)},this)).catch(function(i){return Wi.error(i),Lv(t)}):Lv(t);var n=te.bind(function(){return this.getVariantSync(e,t)},this);return this.fetchPromise?this.fetchPromise.then(n).catch(n):Lv(t)},this))};Hr.prototype._loadedPersistenceIsStale=function(){return!this._loadedPersistedAtMs||!this._loadedTtlMs?!1:Date.now()-this._loadedPersistedAtMs>=this._loadedTtlMs};Hr.prototype.getVariantSync=function(e,t){if(this._loadedPersistenceIsStale())return Wi.log('Loaded persisted variants are past TTL so returning fallback for "'+e+'"'),Lv(t);if(!this.areFlagsReady())return Wi.log("Flags not loaded yet"),Lv(t);var r=this.flags.get(e);return r?(this.trackFeatureCheck(e,r),r):(Wi.log('No flag found: "'+e+'"'),Lv(t))};Hr.prototype.getAllVariants=function(){if(!this.persistenceLoadedPromise)return Wi.critical("Feature Flags not initialized"),Promise.resolve(new Map);var e=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(te.bind(function(){if(e===qp.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getAllVariantsSync():this.fetchPromise?this.fetchPromise.then(te.bind(function(){return this.getAllVariantsSync()},this)).catch(function(r){return Wi.error(r),new Map}):new Map;var t=te.bind(this.getAllVariantsSync,this);return this.fetchPromise?this.fetchPromise.then(t).catch(t):new Map},this))};Hr.prototype.getAllVariantsSync=function(){return this._loadedPersistenceIsStale()?(Wi.log("Loaded persisted variants are past TTL so returning empty Map"),new Map):this.flags||new Map};Hr.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(r){return r.value}).catch(function(r){return Wi.error(r),t})};Hr.prototype.getFeatureData=function(e,t){return Wi.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,t)};Hr.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value};Hr.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then((function(){return this.isEnabledSync(e,t)}).bind(this)).catch(function(r){return Wi.error(r),t})};Hr.prototype.isEnabledSync=function(e,t){t=t||!1;var r=this.getVariantValueSync(e,t);return r!==!0&&r!==!1&&(Wi.error('Feature flag "'+e+'" value: '+r+" is not a boolean; returning fallback value: "+t),r=t),r};function op(e){return e!=null}Hr.prototype.trackFeatureCheck=function(e,t){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var r={"Experiment name":e,"Variant name":t.key,$experiment_type:"feature_flag","Variant fetch start time":op(this._fetchStartTime)?new Date(this._fetchStartTime).toISOString():null,"Variant fetch complete time":op(this._fetchCompleteTime)?new Date(this._fetchCompleteTime).toISOString():null,"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};op(t.experiment_id)&&(r.$experiment_id=t.experiment_id),op(t.is_experiment_active)&&(r.$is_experiment_active=t.is_experiment_active),op(t.is_qa_tester)&&(r.$is_qa_tester=t.is_qa_tester),op(t.variant_source)&&(r.$variant_source=t.variant_source),op(t.persisted_at_in_ms)&&(r.$persisted_at_in_ms=t.persisted_at_in_ms),op(t.ttl_in_ms)&&(r.$ttl_in_ms=t.ttl_in_ms),this.track("$experiment_started",r)}};Hr.prototype.whenReady=function(){return this.fetchPromise?this.fetchPromise:Promise.resolve()};Hr.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"};
vendor: 6,050 bytes, line 136
136jW(Hr);Hr.prototype.are_flags_ready=Hr.prototype.areFlagsReady;Hr.prototype.get_variant=Hr.prototype.getVariant;Hr.prototype.get_variant_sync=Hr.prototype.getVariantSync;Hr.prototype.get_all_variants=Hr.prototype.getAllVariants;Hr.prototype.get_all_variants_sync=Hr.prototype.getAllVariantsSync;Hr.prototype.get_variant_value=Hr.prototype.getVariantValue;Hr.prototype.get_variant_value_sync=Hr.prototype.getVariantValueSync;Hr.prototype.is_enabled=Hr.prototype.isEnabled;Hr.prototype.is_enabled_sync=Hr.prototype.isEnabledSync;Hr.prototype.load_flags=Hr.prototype.loadFlags;Hr.prototype.update_context=Hr.prototype.updateContext;Hr.prototype.when_ready=Hr.prototype.whenReady;Hr.prototype.get_feature_data=Hr.prototype.getFeatureData;Hr.prototype.getTargeting=Hr.prototype.getTargeting;var yvt=Kd("recorder"),MTe="mp_iframe_handshake_request",LTe="mp_iframe_handshake_response",es=function(e){this.mixpanelInstance=e.mixpanelInstance,this.getMpConfig=e.getConfigFunc,this.getTabId=e.getTabIdFunc,this.reportError=e.reportErrorFunc,this.getDistinctId=e.getDistinctIdFunc,this.loadExtraBundle=e.loadExtraBundle,this.recorderSrc=e.recorderSrc,this.targetingSrc=e.targetingSrc,this.libBasePath=e.libBasePath,this._recorder=null,this._parentReplayId=null,this._parentFrameRetryInterval=null};es.prototype.shouldLoadRecorder=function(){if(this.getMpConfig("disable_persistence"))return mn.log("Load recorder check skipped due to disable_persistence config"),En.resolve(!1);var e=new Kc(WW,GW,KW),t=this.getTabId();return e.init().then(function(){return e.getAll()}).then(function(r){for(var n=0;n<r.length;n++)if(QW(r[n])||r[n].tabId===t)return!0;return!1}).catch(te.bind(function(r){return this.reportError("Error checking recording registry",r),!1},this))};es.prototype.checkAndStartSessionRecording=function(e,t){if(!Vt.MutationObserver)return mn.critical("Browser does not support MutationObserver; skipping session recording"),En.resolve();var r=te.bind(function(s){return new En(te.bind(function(l){var c=xg(te.bind(function(){this._recorder=this._recorder||new Vt[CH](this.mixpanelInstance),this._recorder.resumeRecording(s),l()},this));if(te.isUndefined(Vt[CH])){var d=this.recorderSrc||this.libBasePath+Jot;this.loadExtraBundle(d,c)}else c()},this))},this),n=iTe(this.getMpConfig("record_allowed_iframe_origins"),yvt),i=n.length>0;if(i&&(this._setupParentFrameListener(n),Vt.parent!==Vt))return this._setupChildFrameListener(n,r),this._sendParentFrameRequestWithRetry(n),En.resolve();var a=te.isUndefined(t)?this.getMpConfig("record_sessions_percent"):t,o=a>0&&Math.random()*100<=a;return e||o?r(!0):this.shouldLoadRecorder().then(te.bind(function(s){return s?r(!1):En.resolve()},this))};es.prototype.isRecording=function(){if(!this._recorder||!te.isFunction(this._recorder.isRecording))return!1;try{return this._recorder.isRecording()}catch(e){return this.reportError("Error checking if recording is active",e),!1}};es.prototype.startRecordingOnEvent=function(e,t){var r=this.isRecording(),n=this.getMpConfig("recording_event_triggers");if(!r&&n){var i=n[e];if(i&&typeof i.percentage=="number"){var a=i.percentage,o=i.property_filters;if(o&&!te.isEmptyObject(o)){var s=this.targetingSrc||this.libBasePath+bCe;NTe(this.loadExtraBundle,s).then((function(l){try{var c=l.eventMatchesCriteria(e,t,{event_name:e,property_filters:o});c.matches&&this.checkAndStartSessionRecording(!1,a)}catch(d){mn.critical("Could not parse recording event trigger properties logic:",d)}}).bind(this)).catch(function(l){mn.critical("Failed to load targeting library:",l)})}else this.checkAndStartSessionRecording(!1,a)}}};es.prototype.stopSessionRecording=function(){return this._recorder?this._recorder.stopRecording():En.resolve()};es.prototype.pauseSessionRecording=function(){return this._recorder?this._recorder.pauseRecording():En.resolve()};es.prototype.resumeSessionRecording=function(){return this._recorder?this._recorder.resumeRecording():En.resolve()};es.prototype.isRecordingHeatmapData=function(){return this.getSessionReplayId()&&this.getMpConfig("record_heatmap_data")};es.prototype.getSessionRecordingProperties=function(){var e={},t=this.getSessionReplayId();return t&&(e.$mp_replay_id=t),e};es.prototype.getSessionReplayUrl=function(){var e=null,t=this.getSessionReplayId();if(t){var r=te.HTTPBuildQuery({replay_id:t,distinct_id:this.getDistinctId(),token:this.getMpConfig("token")});e="https://mixpanel.com/projects/replay-redirect?"+r}return e};es.prototype.getSessionReplayId=function(){if(this._parentReplayId)return this._parentReplayId;var e=null;return this._recorder&&(e=this._recorder.replayId),e||null};es.prototype.getRecorder=function(){return this._recorder};es.prototype._setupChildFrameListener=function(e,t){if(!this._childFrameMessageHandler){var r=this;this._childFrameMessageHandler=function(n){if(e.indexOf(n.origin)!==-1){var i=n.data;i&&i.type===LTe&&i.token===r.getMpConfig("token")&&i.replayId&&(r._parentReplayId=i.replayId,i.distinctId&&r.mixpanelInstance.identify(i.distinctId),r._parentFrameRetryActive=!1,Vt.removeEventListener("message",r._childFrameMessageHandler),r._childFrameMessageHandler=null,t(!0))}},Vt.addEventListener("message",this._childFrameMessageHandler)}};es.prototype._sendParentFrameRequest=function(e){var t={};t.type=MTe,t.token=this.getMpConfig("token");for(var r=0;r<e.length;r++)try{Vt.parent.postMessage(t,e[r])}catch{}};es.prototype._sendParentFrameRequestWithRetry=function(e){var t=this,r=10,n=0,i=50;this._parentFrameRetryActive=!0,this._sendParentFrameRequest(e);function a(){setTimeout(function(){!t._parentFrameRetryActive||t._parentReplayId||++n>=r||(t._sendParentFrameRequest(e),i*=2,a())},i)}a()};es.prototype._setupParentFrameListener=function(e){if(!this._parentFrameMessageHandler){var t=this;this._parentFrameMessageHandler=function(r){if(e.indexOf(r.origin)!==-1){var n=r.data;if(n&&n.type===MTe&&n.token===t.getMpConfig("token")){var i=t.getSessionReplayId();if(i){var a={};a.type=LTe,a.token=t.getMpConfig("token"),a.replayId=i,a.distinctId=t.getDistinctId(),r.source.postMessage(
136a,r.origin)}}}},Vt.addEventListener("message",this._parentFrameMessageHandler)}};jW(es);var Th=function(){};Th.prototype.create_properties=function(){};Th.prototype.event_handler=function(){};Th.prototype.after_track_handler=function(){};Th.prototype.init=function(e){return this.mp=e,this};Th.prototype.track=function(e,t,r,n){var i=this,a=te.dom_query(e);if(a.length===0){mn.error("The DOM query ("+e+") returned 0 elements");return}return te.each(a,function(o){te.register_event(o,this.override_event,function(s){var l={},c=i.create_properties(r,this),d=i.mp.get_config("track_links_timeout");i.event_handler(s,this,l),window.setTimeout(i.track_callback(n,c,l,!0),d),i.mp.track(t,c,i.track_callback(n,c,l))})},this),!0};Th.prototype.track_callback=function(e,t,r,n){n=n||!1;var i=this;return function(){r.callback_fired||(r.callback_fired=!0,!(e&&e(n,t)===!1)&&i.after_track_handler(t,r,n))}};Th.prototype.create_properties=function(e,t){var r;return typeof e=="function"?r=e(t):r=te.extend({},e),r};var M1=function(){this.override_event="click"};te.inherit(M1,Th);M1.prototype.create_properties=function(e,t){var r=M1.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r};M1.prototype.event_handler=function(e,t,r){r.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",r.href=t.href,r.new_tab||e.preventDefault()};M1.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var J5=function(){this.override_event="submit"};te.inherit(J5,Th);J5.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()};J5.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var om="$set",L1="$set_once",yu="$unset",Ag="$add",Pd="$append",Pg="$union",Wf="$remove",_vt="$delete",FTe={set_action:function(e,t){var r={},n={};return te.isObject(e)?te.each(e,function(i,a){this._is_reserved_property(a)||(n[a]=i)},this):n[e]=t,r[om]=n,r},unset_action:function(e){var t={},r=[];return te.isArray(e)||(e=[e]),te.each(e,function(n){this._is_reserved_property(n)||r.push(n)},this),t[yu]=r,t},set_once_action:function(e,t){var r={},n={};return te.isObject(e)?te.each(e,function(i,a){this._is_reserved_property(a)||(n[a]=i)},this):n[e]=t,r[L1]=n,r},union_action:function(e,t){var r={},n={};return te.isObject(e)?te.each(e,function(i,a){this._is_reserved_property(a)||(n[a]=te.isArray(i)?i:[i])}
136,this):n[e]=te.isArray(t)?t:[t],r[Pg]=n,r},append_action:function(e,t){var r={},n={};return te.isObject(e)?te.each(e,function(i,a){this._is_reserved_property(a)||(n[a]=i)},this):n[e]=t,r[Pd]=n,r},remove_action:function(e,t){var r={},n={};return te.isObject(e)?te.each(e,function(i,a){this._is_reserved_property(a)||(n[a]=i)},this):n[e]=t,r[Wf]=n,r},delete_action:function(){var e={};return e[_vt]="",e}},Ta=function(){};te.extend(Ta.prototype,FTe);Ta.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r};Ta.prototype.set=L_(function(e,t,r){var n=this.set_action(e,t);return te.isObject(e)&&(r=t),this._send_request(n,r)});Ta.prototype.set_once=L_(function(e,t,r){var n=this.set_once_action(e,t);return te.isObject(e)&&(r=t),this._send_request(n,r)});Ta.prototype.unset=L_(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});Ta.prototype.union=L_(function(e,t,r){te.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});Ta.prototype.delete=L_(function(e){var t=this.delete_action();return this._send_request(t,e)});Ta.prototype.remove=L_(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)});Ta.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=te.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)};Ta.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};Ta.prototype._get_config=function(e){return this._mixpanel.get_config(e)};Ta.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};Ta.prototype.remove=Ta.prototype.remove;Ta.prototype.set=Ta.prototype.set;Ta.prototype.set_once=Ta.prototype.set_once;Ta.prototype.union=Ta.prototype.union;Ta.prototype.unset=Ta.prototype.unset;Ta.prototype.toString=Ta.prototype.toString;var wn=function(){};te.extend(wn.prototype,FTe);wn.prototype._init=function(e){this._mixpanel=e};wn.prototype.set=km(function(e,t,r){var n=this.set_action(e,t);return te.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[om]=te.extend({},te.info.people_properties(),n[om]),this._send_request(n,r)});wn.prototype.set_once=km(function(e,t,r){var n=this.set_once_action(e,t);return te.isObject(e)&&(r=t),this._send_request(n,r)});wn.prototype.unset=km(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});wn.prototype.increment=km(function(e,t,r){var n={},i={};return te.isObject(e)?(te.each(e,function(a,o){if(!this._is_reserved_property(o))if(isNaN(parseFloat(a))){mn.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else i[o]=a},this),r=t):(te.isUndefined(t)&&(t=1),i[e]=t),n[Ag]=i,this._send_request(n,r)});wn.prototype.append=km(function(e,t,r){te.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)});wn.prototype.remove=km(function(e,t,r){te.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)});wn.prototype.union=km(function(e,t,r){te.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});wn.prototype.track_charge=km(function(){mn.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});wn.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};wn.prototype.delete_user=function(){if(!this._identify_called()){mn.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};wn.prototype.toString=function(){return this._mixpanel.toString()+".people"};wn.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),i&&(e.$had_persisted_distinct_id=i);var a=te.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:a,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),te.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),te.truncate(a,255))};wn.prototype._get_config=function(e){return this._mixpanel.get_config(e)};wn.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};wn.prototype._enqueue=function(e){om in e?this._mixpanel.persistence._add_to_people_queue(om,e):L1 in e?this._mixpanel.persistence._add_to_people_queue(L1,e):yu in e?this._mixpanel.persistence._add_to_people_queue(yu,e):Ag in e?this._mixpanel.persistence._add_to_people_queue(Ag,e):Pd in e?this._mixpanel.persistence._add_to_people_queue(Pd,e):Wf in e?this._mixpanel.persistence._add_to_people_queue(Wf,e):Pg in e?this._mixpanel.persistence._add_to_people_queue(Pg,e):mn.error("Invalid call to _enqueue():",e)};wn.prototype._flush_one_queue=function(e,t,r,n){var i=this,a=te.extend({},this._mixpanel.persistence.load_queue(e)),o=a;!te.isUndefined(a)&&te.isObject(a)&&!te.isEmptyObject(a)&&(i._mixpanel.persistence._pop_from_people_queue(e,a),i._mi
136xpanel.persistence.save(),n&&(o=n(a)),t.call(i,o,function(s,l){s===0&&i._mixpanel.persistence._add_to_people_queue(e,a),te.isUndefined(r)||r(s,l)}))};wn.prototype._flush=function(e,t,r,n,i,a,o){var s=this;this._flush_one_queue(om,this.set,e),this._flush_one_queue(L1,this.set_once,n),this._flush_one_queue(yu,this.unset,a,function(b){return te.keys(b)}),this._flush_one_queue(Ag,this.increment,t),this._flush_one_queue(Pg,this.union,i);var l=this._mixpanel.persistence.load_queue(Pd);if(!te.isUndefined(l)&&te.isArray(l)&&l.length)for(var c,d=function(b,E){b===0&&s._mixpanel.persistence._add_to_people_queue(Pd,c),te.isUndefined(r)||r(b,E)},f=l.length-1;f>=0;f--)l=this._mixpanel.persistence.load_queue(Pd),c=l.pop(),s._mixpanel.persistence.save(),te.isEmptyObject(c)||s.append(c,d);var h=this._mixpanel.persistence.load_queue(Wf);if(!te.isUndefined(h)&&te.isArray(h)&&h.length)for(var p,g=function(b,E){b===0&&s._mixpanel.persistence._add_to_people_queue(Wf,p),te.isUndefined(o)||o(b,E)},_=h.length-1;_>=0;_--)h=this._mixpanel.persistence.load_queue(Wf),p=h.pop(),s._mixpanel.persistence.save(),te.isEmptyObject(p)||s.remove(p,g)};wn.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};wn.prototype.set=wn.prototype.set;wn.prototype.set_once=wn.prototype.set_once;wn.prototype.unset=wn.prototype.unset;wn.prototype.increment=wn.prototype.increment;wn.prototype.append=wn.prototype.append;wn.prototype.remove=wn.prototype.remove;wn.prototype.union=wn.prototype.union;wn.prototype.track_charge=wn.prototype.track_charge;wn.prototype.clear_charges=wn.prototype.clear_charges;wn.prototype.delete_user=wn.prototype.delete_user;wn.prototype.toString=wn.prototype.toString;var rG="__mps",nG="__mpso",iG="__mpus",aG="__mpa",oG="__mpap",sG="__mpr",lG="__mpu",BTe="$people_distinct_id",dI="__alias",BC="__timers",bvt=[rG,nG,iG,aG,oG,sG,lG,BTe,dI,BC],$n=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(mn.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&te.localStorage.is_supported()?this.storage=te.localStorage:this.storage=te.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};$n.prototype.properties=function(){var e={};return this.load(),te.each(this.props,function(t,r){te.include(bvt,r)||(e[r]=t)}),e};$n.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=te.extend({},e))}};$n.prototype.upgrade=function(){var e,t;this.storage===te.localStorage?(e=te.cookie.parse(this.name),te.cookie.remove(this.name),te.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===te.cookie&&(t=te.localStorage.parse(this.name),te.localStorage.remove(this.name),t&&this.register_once(t))};$n.prototype.save=function(){this.disabled||this.storage.set(this.name,D1(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};$n.prototype.load_prop=function(e){return this.load(),this.props[e]};$n.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};$n.prototype.clear=function(){this.remove(),this.props={}};$n.prototype.register_once=function(e,t,r){return te.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),te.each(e,function(n,i){(!this.props.hasOwnProperty(i)||this.props[i]===t)&&(this.props[i]=n)},this),this.save(),!0):!1};$n.prototype.register=function(e,t){return te.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),te.extend(this.props,e),this.save(),!0):!1};$n.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};$n.prototype.update_search_keyword=function(e){this.register(te.info.searchInfo(e))};$n.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:te.info.referringDomain(e)||"$direct"},"")};$n.prototype.get_referrer_info=function(){return te.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};$n.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};$n.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};$n.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};$n.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};$n.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};$n.prototype.get_cross_subdomain=function(){return this.cross_subdomain};$n.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};$n.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],i=this._get_or_create_queue(om),a=this._get_or_create_queue(L1),o=this._get_or_create_queue(yu),s=this._get_or_create_queue(Ag),l=this._get_or_create_queue(Pg),c=this._get_or_create_queue(Wf,[]),d=this._get_or_create_queue(Pd,[]);r===rG?(te.extend(i,n),this._pop_from_people_queue(Ag,n),this._pop_from_people_queue(Pg,n),this._pop_from_people_queue(yu,n)):r===nG?(te.each(n,function(f,h){h in a||(a[h]=f)}),this._pop_from_people_queue(yu,n)):r===iG?te.each(n,function(f){te.each([i,a,s,l],function(h){f in h&&delete h[f]}),te.each(d,function(h){f in h&&delete h[f]}),o[f]=!0}):r===aG?(te.each(n,function(f,h){h in i?i[h]+=f:(h in s||(s[h]=0),s[h]+=f)},this),this._pop_from_people_queue(yu,n)):r===lG?(te.each(n,function(f,h){te.isArray(f)&&(h in l||(l[h]=[]),te.each(f,function(p){te.include(l[h],p)||l[h].push(p)}))}),this._pop_from_people_queue(yu,n)):r===sG?(c.push(n),this._pop_from_people_queue(Pd,n)):r===oG&&(d.push(n),this._pop_from_people_queue(yu,n)),mn.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),mn.log(t),this.save()};$n.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];te.isUndefined(r)||te.each(t,function(n,i){e===Pd||e===Wf?te.each(r,function(a){a[i]===n&&delete a[i]}):delete r[i]},this)};$n.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};$n.prototype._get_queue_key=function(e){if(e===om)return rG;if(e===L1)return nG;if(e===yu)return iG;if(e===Ag)return aG;if(e===Pd)return oG;if(e===Wf)return sG;if(e===Pg)return lG;mn.error("Invalid queue:",e)};$n.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=te.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)};$n.prototype.set_event_timer=function(e,t){var r=this.load_prop(BC)||{};r[e]=t,this.props[BC]=r,this.save()};$n.prototype.remove_event_timer=function(e){var t=this.load_prop(BC)||{},r=t[e];return te.isUndefined(r)||(delete this.props[BC][e],this.save()),r};var fI,LU=function(e,t){throw new Error(e+" not available in this build.")},Is,FU=0,Evt=1,Nc="mixpanel",zTe="base64",wvt="json",cG="$device:",Svt="strict",Cvt
vendor: 24,969 bytes, line 136
136="fallback",xvt="disabled",Gy=Vt.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,HTe=!Gy&&fd.indexOf("MSIE")===-1&&fd.indexOf("Mozilla")===-1,hI=null;Lf.sendBeacon&&(hI=function(){return Lf.sendBeacon.apply(Lf,arguments)});var UTe={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},BU={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:UTe,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:zTe,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Vp,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Vp,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:1800*1e3,record_mask_inputs:!0,record_max_ms:TS,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:xvt},VTe=!1,vt=function(){},zU=function(e,t,r){var n,i=r===Nc?Is:Is[r];if(i&&fI===FU)n=i;else{if(i&&!te.isArray(i)){mn.error("You have already initialized "+r);return}n=new vt}if(n._cached_groups={},n._init(e,t,r),n.people=new wn,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var a=te.info.campaignParams(null),o={},s=!1;te.each(a,function(c,d){o["initial_"+d]=c,c&&(s=!0)}),s&&n.people.set_once(o)}Rl.DEBUG=Rl.DEBUG||n.get_config("debug");var l=fI===FU?"module":"snippet";return Vt.dispatchEvent(new Vt.CustomEvent("$mp_sdk_to_extension_event",{detail:{instance:n,source:l,token:e,name:r,info:te.info}})),!te.isUndefined(i)&&te.isArray(i)&&(n._execute_array.call(n.people,i.people),n._execute_array(i)),n};vt.prototype.init=function(e,t,r){if(te.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===Nc){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var n=zU(e,t,r);return Is[r]=n,n._loaded(),n};vt.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if(!("api_payload_format"in t)){var i=t.api_host||BU.api_host;i.match(/\.mixpanel\.com/)&&(n.api_payload_format=wvt)}if(this.hooks={},this.set_config(te.extend({},BU,n,t,{name:r,token:e,callback_fn:(r===Nc?r:Nc+"."+r)+"._jsc"})),this.recorderManager=new es({mixpanelInstance:this,getConfigFunc:te.bind(this.get_config,this),setConfigFunc:te.bind(this.set_config,this),getTabIdFunc:te.bind(this.get_tab_id,this),reportErrorFunc:te.bind(this.report_error,this),getDistinctIdFunc:te.bind(this.get_distinct_id,this),recorderSrc:this.get_config("recorder_src"),targetingSrc:this.get_config("targeting_src"),libBasePath:this.get_config("lib_base_path"),loadExtraBundle:LU}),this._jsc=Vp,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this._remote_settings_strict_disabled=!1,this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!te.localStorage.is_supported(!0)||!Gy)this._batch_requests=!1,mn.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),te.each(this.get_batcher_configs(),function(l){mn.log("Clearing batch queue "+l.queue_key),te.localStorage.remove(l.queue_key)});else if(this.init_batchers(),hI&&Vt.addEventListener){var a=te.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);Vt.addEventListener("pagehide",function(l){l.persisted&&a()}),Vt.addEventListener("visibilitychange",function(){bn.visibilityState==="hidden"&&a()})}}this.persistence=this.cookie=new $n(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=te.UUID();this.get_distinct_id()||this.register_once({distinct_id:cG+o,$device_id:o},""),this.flags=new Hr({getFullApiRoute:te.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:te.bind(this.get_config,this),setConfigFunc:te.bind(this.set_config,this),getPropertyFunc:te.bind(this.get_property,this),trackingFunc:te.bind(this.track,this),loadExtraBundle:LU,targetingSrc:this.get_config("targeting_src")||this.get_config("lib_base_path")+bCe}),this.flags.init(),this.flags=this.flags,this._init_tab_id();var s=this.get_config("remote_settings_mode");s===Svt||s===Cvt?this.__session_recording_init_promise=this._fetch_remote_settings(s).then(te.bind(function(){return this._check_and_start_session_recording()},this)):this.__session_recording_init_promise=this._check_and_start_session_recording(),this.autocapture=new bo(this),this.autocapture.init()};vt.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))mn.log("Tab ID initialization skipped due to disable_persistence config");else if(te.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,r="mp_gen_new_tab_id_"+e;(te.sessionStorage.get(r)||!te.sessionStorage.get(t))&&te.sessionStorage.set(t,"$tab-"+te.UUID()),te.sessionStorage.set(r,"1"),this.tab_id=te.sessionStorage.get(t),Vt.addEventListener("beforeunload",function(){te.sessionStorage.remove(r)})}catch(n){this.report_error("Error initializing tab id",n)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")};vt.prototype.get_tab_id=function(){return this.tab_id||null};vt.prototype._check_and_start_session_recording=Im(function(e){return this.recorderManager.checkAndStartSessionRecording(e)});vt.prototype._start_recording_on_event=xg(function(e,t){this.__session_recording_init_promise&&this.__session_recording_init_promise.then(te.bind(function(){if(!this._remote_settings_strict_disabled)return this.recorderManager.startRecordingOnEvent(e,t)},this))});vt.prototype.start_session_recording=function(){return this._check_and_start_session_recording(!0)};vt.prototype.stop_session_recording=function(){return this.recorderManager.stopSessionRecording()};vt.prototype.pause_session_recording=function(){return this.recorderManager.pauseSessionRecording()};vt.prototype.resume_session_recording=function(){return this.recorderManager.resumeSessionRecording()};vt.prototype.is_recording_heatmap_data=function(){return this.recorderManager.isRecordingHeatmapData()};vt.prototype.get_session_recording_properties=function(){return this.recorderManager.getSessionRecordingProperties()};vt.prototype.get_session_replay_url=function(){return this.recorderManager.getSessionReplayUrl()};vt.prototype.__get_recorder=function(){return this.recorderManager.getRecorder()};vt.prototype.__get_recording_init_promise=function(){return this.__session_recording_init_promise};vt.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=te.info.campaignParams(null);te.each(e,(function(t,r){this.unregister(r)}).bind(this))}};vt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(bn.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(te.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(bn.referrer)};vt.prototype._dom_loaded=function(){te.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||te.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};vt.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!VTe)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)};vt.prototype._prepare_callback=function(e,t){if(te.isUndefined(e))return null;if(Gy){var r=function(o){e(o,t)};return r}else{var n=this._jsc,i=""+Math.floor(Math.random()*1e8),a=this.get_config("callback_fn")+"["+i+"]";return n[i]=function(o){delete n[i],e(o,t)},a}};vt.prototype._send_request=function(e,t,r,n){var i=!0;if(HTe)return this.__request_queue.push(arguments),i;var a={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},o=null;!n&&(te.isFunction(r)||typeof r=="string")&&(n=r,r=null),r=te.extend(a,r||{}),Gy||(r.method="GET");var s=r.method==="POST",l=hI&&s&&r.transport.toLowerCase()==="sendbeacon",c=r.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),Gy||(n?t.callback=n:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),s&&(o="data="+encodeURIComponent(t.data),delete t.data),te.extend(t,this.get_config("api_extra_query_params")),e+="?"+te.HTTPBuildQuery(t);var d=this;if("img"in t){var f=bn.createElement("img");f.src=e,bn.body.appendChild(f)}else if(l){try{i=hI(e,o)}catch(E){d.report_error(E),i=!1}try{n&&n(i?1:0)}catch(E){d.report_error(E)}}else if(Gy)try{var h=new XMLHttpRequest;h.open(r.method,e,!0);var p=this.get_config("xhr_headers");if(s&&(p["Content-Type"]="application/x-www-form-urlencoded"),te.each(p,function(E,S){h.setRequestHeader(S,E)}),r.timeout_ms&&typeof h.timeout<"u"){h.timeout=r.timeout_ms;var g=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(n)if(c){var E;try{E=te.JSONDecode(h.responseText)}catch(O){if(d.report_error(O),r.ignore_json_errors)E=h.responseText;else return}n(E)}else n(Number(h.responseText))}else{var S;if(h.timeout&&!h.status&&new Date().getTime()-g>=h.timeout?S="timeout":S="Bad HTTP status: "+h.status+" "+h.statusText,d.report_error(S),n)if(c){var P=h.responseHeaders||{};n({status:0,httpStatusCode:h.status,error:S,retryAfter:P["Retry-After"]})}else n(0)}},h.send(o)}catch(E){d.report_error(E),i=!1}else{var _=bn.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var b=bn.getElementsByTagName("script")[0];b.parentNode.insertBefore(_,b)}return i};vt.prototype._fetch_remote_settings=function(e){var t=this,r=function(){e==="strict"&&(t.set_config({record_sessions_percent:0}),t._remote_settings_strict_disabled=!0)};if(!Vt.AbortController)return mn.critical("Remote settings unavailable: missing minimum required APIs"),r(),Promise.resolve();var n=this.get_api_host("settings")+"/"+this.get_config("api_routes").settings,i={$lib_version:Rl.LIB_VERSION,mp_lib:"web",sdk_config:"1"},a=te.HTTPBuildQuery(i),o=n+"?"+a,s=new AbortController,l=setTimeout(function(){s.abort()},500),c={method:"GET",headers:{Authorization:"Basic "+btoa(t.get_config("token")+":")},signal:s.signal};return Vt.fetch(o,c).then(function(d){if(clearTimeout(l),!d.ok){mn.critical("Network response was not ok"),r();return}return d.json()}).then(function(d){if(d&&d.sdk_config&&d.sdk_config.config){var f=d.sdk_config.config,h={};te.each(f,function(p,g){BU.hasOwnProperty(g)&&(h[g]=p)}),te.isEmptyObject(h)?(mn.critical("No valid config keys found in remote settings."),r()):t.set_config(h)}else r()}).catch(function(d){clearTimeout(l),mn.critical("Failed to fetch remote settings",d),r()})};vt.prototype._execute_array=function(e){var t,r=[],n=[],i=[];te.each(e,function(o){o&&(t=o[0],te.isArray(t)?i.push(o):typeof o=="function"?o.call(this):te.isArray(o)&&t==="alias"?r.push(o):te.isArray(o)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?i.push(o):n.push(o))},this);var a=function(o,s){te.each(o,function(l){if(te.isArray(l[0])){var c=s;te.each(l,function(d){c=c[d[0]].apply(c,d.slice(1))})}else this[l[0]].apply(this,l.slice(1))},s)};a(r,this),a(n,this),a(i,this)};vt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};vt.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs};vt.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=te.bind(function(r){return new Yc(r.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:te.bind(function(n,i,a){var o=this.get_config("api_routes");this._send_request(this.get_api_host(r.api_name)+"/"+o[r.api_name],this._encode_data_for_request(n),i,this._prepare_callback(a,n))},this),beforeSendHook:te.bind(function(n){var i=this._run_hook("before_send_"+r.type,n);return i?i[0]:null},this),stopAllBatchingFunc:te.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};vt.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,te.each(this.request_batchers,function(e){e.start()}))};vt.prototype.stop_batch_senders=function(){this._batch_requests=!1,te.each(this.request_batchers,function(e){e.stop(),e.clear()})};vt.prototype.push=function(e){this._execute_array([e])};vt.prototype.enable=function(e){var t,r,n,i;if(typeof e>"u")this._flags.disable_all_events=!1;else{for(t={},r=[],n=0;n<e.length;n++)t[e[n]]=!0;for(i=0;i<this.__disabled_events.length;i++)t[this.__disabled_events[i]]||r.push(this.__disabled_events[i]);this.__disabled_events=r}};vt.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};vt.prototype._encode_data_for_request=function(e){var t=D1(e);return this.get_config("api_payload_format")===zTe&&(t=te.base64Encode(t)),{data:t}};vt.prototype._track_or_batch=function(e,t){var r=te.truncate(e.data,255),n=e.endpoint,i=e.batcher,a=e.should_send_immediately,o=e.send_request_options||{};t=t||Vp;var s=!0,l=te.bind(function(){return o.skip_hooks||(r=this._run_hook("before_send_"+e.type,r),r&&(r=r[0])),r?(mn.log("MIXPANEL REQUEST:"),mn.log(r),this._send_request(n,this._encode_data_for_request(r),o,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!a?i.enqueue(r).then(function(c){c?t(1,r):l()}):s=l(),s&&r};vt.prototype.track=Im(function(e,t,r,n){var i;if(!(r&&r.skip_hooks)){if(i=this._run_hook("before_track",e,t),i===null)return;e=i[0],t=i[1]}!n&&typeof r=="function"&&(n=r,r=null),r=r||{};var a=r.transport;a&&(r.transport=a);var o=r.send_immediately;if(typeof n!="function"&&(n=Vp),te.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){n(0);return}t=te.extend({},t),t.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!te.isUndefined(s)){var l=new Date().getTime()-s;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?te.info.marketingParams():{};t=te.extend({},te.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var d=this.get_config("property_blacklist");te.isArray(d)?te.each(d,function(h){delete t[h]}):this.report_error("Invalid value for property_blacklist config: "+d),this._start_recording_on_event(e,t);var f={event:e,properties:t};return i=this._track_or_batch({type:"events",data:f,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n),this.flags&&this.flags.checkFirstTimeEvents&&this.flags.checkFirstTimeEvents(e,t),i});vt.prototype.set_group=Im(function(e,t,r){te.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)});vt.prototype.add_group=Im(function(e,t,r){var n=this.get_property(e),i={};return n===void 0?(i[e]=[t],this.register(i)):n.indexOf(t)===-1&&(n.push(t),i[e]=n,this.register(i)),this.people.union(e,t,r)});vt.prototype.remove_group=Im(function(e,t,r){var n=this.get_property(e);if(n!==void 0){var i=n.indexOf(t);i>-1&&(n.splice(i,1),this.register({group_key:n})),n.length===0&&this.unregister(e)}return this.people.remove(e,t,r)});vt.prototype.track_with_groups=Im(function(e,t,r,n){var i=te.extend({},t||{});return te.each(r,function(a,o){a!=null&&(i[o]=a)}),this.track(e,i,n)});vt.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};vt.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};vt.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(n===void 0||n._group_key!==e||n._group_id!==t)&&(n=new Ta,n._init(this,e,t),this._cached_groups[r]=n),n};vt.prototype.track_pageview=Im(function(e,t){typeof e!="object"&&(e={}),t=t||{};var r=t.event_name||"$mp_web_page_view",n=te.extend(te.info.mpPageViewProperties(),te.info.campaignParams(),te.info.clickParams()),i=te.extend({},n,e);return this.is_recording_heatmap_data()&&(i.$captured_for_heatmap=!0),this.track(r,i)});vt.prototype.track_links=function(){return this._track_dom.call(this,M1,arguments)};vt.prototype.track_forms=function(){return this._track_dom.call(this,J5,arguments)};vt.prototype.time_event=function(e){if(te.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var Tvt={persistent:!0},uG=function(e){var t;return te.isObject(e)?t=e:te.isUndefined(e)?t={}:t={days:e},te.extend({},Tvt,t)};vt.prototype.register=function(e,t){var r=this._run_hook("before_register",e,t);if(r!==null){e=r[0],t=r[1];var n=uG(t);n.persistent?this.persistence.register(e,n.days):te.extend(this.unpersisted_superprops,e)}};vt.prototype.register_once=function(e,t,r){var n=this._run_hook("before_register_once",e,t,r);if(n!==null){e=n[0],t=n[1],r=n[2];var i=uG(r);i.persistent?this.persistence.register_once(e,t,i.days):(typeof t>"u"&&(t="None"),te.each(e,function(a,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=a)},this))}};vt.prototype.unregister=function(e,t){var r=this._run_hook("before_unregister",e,t);r!==null&&(e=r[0],t=r[1],t=uG(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e])};vt.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)};vt.prototype.identify=function(e,t,r,n,i,a,o,s){var l=this._run_hook("before_identify",e);if(l===null)return-1;e=l[0];var c=this.get_distinct_id();if(e&&c!==e){if(typeof e=="string"&&e.indexOf(cG)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var d=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:d},"")}e!==c&&e!==this.get_property(dI)&&(this.unregister(dI),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,i,a,o,s),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0}),e!==c&&this.flags.fetchFlags().catch(function(){mn.error("[flags] Error fetching flags during identify")})};vt.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=te.UUID();this.register_once({distinct_id:cG+e,$device_id:e},""),this._check_and_start_session_recording(),this.flags.reset()};vt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};vt.prototype.alias=function(e,t){if(e===this.get_property(BTe))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return te.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(dI,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};vt.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};vt.prototype.set_config=function(e){if(te.isObject(e)){te.extend(this.config,e);var t=e.batch_size;t&&te.each(this.request_batchers,function(r){r.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Rl.DEBUG=Rl.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init(),te.isObject(e.hooks)&&(this.hooks={},te.each(e.hooks,function(r,n){if(te.isFunction(r))this.hooks[n]=[r];else if(te.isArray(r)){this.hooks[n]=[];for(var i=0;i<r.length;i++)te.isFunction(r[i])||mn.critical("Invalid hook added. Hook is not a function"),this.hooks[n].push(r[i])}else mn.critical("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this))}};vt.prototype.get_config=function(e){return this.config[e]};vt.prototype._run_hook=function(e){var t=Ip.call(arguments,1);return te.each(this.hooks[e],function(r){if(t===null)return null;var n=r.apply(this,t);typeof n>"u"?(this.report_error(e+" hook did not return a valid value"),t=null):(te.isArray(n)||(n=[n]),t.splice.apply(t,[0,n.length].concat(n)))},this),t};vt.prototype.get_property=function(e){return this.persistence.load_prop([e])};vt.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")};vt.prototype.toString=function(){var e=this.get_config("name");return e!==Nc&&(e=Nc+"."+e),e};vt.prototype._event_is_disabled=function(e){return te.isBlockedUA(fd)||this._flags.disable_all_events||te.include(this.__disabled_events,e)};vt.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&te.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||te.cookie.get("mp_optout"))&&(te.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};vt.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()};vt.prototype._gdpr_call_func=function(e,t){return t=te.extend({track:te.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),te.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie
136:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};vt.prototype.opt_in_tracking=function(e){e=te.extend({enable_persistence:!0},e),this._gdpr_call_func(tmt,e),this._gdpr_update_persistence(e)};vt.prototype.opt_out_tracking=function(e){e=te.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(rmt,e),this._gdpr_update_persistence(e)};vt.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(nmt,e)};vt.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(eTe,e)};vt.prototype.clear_opt_in_out_tracking=function(e){e=te.extend({enable_persistence:!0},e),this._gdpr_call_func(imt,e),this._gdpr_update_persistence(e)};vt.prototype.report_error=function(e,t){mn.error.apply(mn.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){mn.error(r)}};vt.prototype.add_hook=function(e,t){this.hooks[e]||(this.hooks[e]=[]),this.hooks[e].push(t)};vt.prototype.remove_hook=function(e,t){var r;this.hooks[e]&&(r=this.hooks[e].indexOf(t),r!==-1?this.hooks[e].splice(r,1):mn.log("remove_hook failed. Matching hook was not found"))};vt.prototype.init=vt.prototype.init;vt.prototype.reset=vt.prototype.reset;vt.prototype.enable=vt.prototype.enable;vt.prototype.disable=vt.prototype.disable;vt.prototype.time_event=vt.prototype.time_event;vt.prototype.track=vt.prototype.track;vt.prototype.track_links=vt.prototype.track_links;vt.prototype.track_forms=vt.prototype.track_forms;vt.prototype.track_pageview=vt.prototype.track_pageview;vt.prototype.register=vt.prototype.register;vt.prototype.register_once=vt.prototype.register_once;vt.prototype.unregister=vt.prototype.unregister;vt.prototype.identify=vt.prototype.identify;vt.prototype.alias=vt.prototype.alias;vt.prototype.name_tag=vt.prototype.name_tag;vt.prototype.set_config=vt.prototype.set_config;vt.prototype.get_config=vt.prototype.get_config;vt.prototype.get_api_host=vt.prototype.get_api_host;vt.prototype.get_property=vt.prototype.get_property;vt.prototype.get_distinct_id=vt.prototype.get_distinct_id;vt.prototype.toString=vt.prototype.toString;vt.prototype.opt_out_tracking=vt.prototype.opt_out_tracking;vt.prototype.opt_in_tracking=vt.prototype.opt_in_tracking;vt.prototype.has_opted_out_tracking=vt.prototype.has_opted_out_tracking;vt.prototype.has_opted_in_tracking=vt.prototype.has_opted_in_tracking;vt.prototype.clear_opt_in_out_tracking=vt.prototype.clear_opt_in_out_tracking;vt.prototype.get_group=vt.prototype.get_group;vt.prototype.set_group=vt.prototype.set_group;vt.prototype.add_group=vt.prototype.add_group;vt.prototype.remove_group=vt.prototype.remove_group;vt.prototype.add_hook=vt.prototype.add_hook;vt.prototype.remove_hook=vt.prototype.remove_hook;vt.prototype.track_with_groups=vt.prototype.track_with_groups;vt.prototype.start_batch_senders=vt.prototype.start_batch_senders;vt.prototype.stop_batch_senders=vt.prototype.stop_batch_senders;vt.prototype.start_session_recording=vt.prototype.start_session_recording;vt.prototype.stop_session_recording=vt.prototype.stop_session_recording;vt.prototype.pause_session_recording=vt.prototype.pause_session_recording;vt.prototype.resume_session_recording=vt.prototype.resume_session_recording;vt.prototype.get_session_recording_properties=vt.prototype.get_session_recording_properties;vt.prototype.get_session_replay_url=vt.prototype.get_session_replay_url;vt.prototype.get_tab_id=vt.prototype.get_tab_id;vt.prototype.DEFAULT_API_ROUTES=UTe;vt.prototype.__get_recorder=vt.prototype.__get_recorder;vt.prototype.__get_recording_init_promise=vt.prototype.__get_recording_init_promise;$n.prototype.properties=$n.prototype.properties;$n.prototype.update_search_keyword=$n.prototype.update_search_keyword;$n.prototype.update_referrer_info=$n.prototype.update_referrer_info;$n.prototype.get_cross_subdomain=$n.prototype.get_cross_subdomain;$n.prototype.clear=$n.prototype.clear;var Ty={},Avt=function(){te.each(Ty,function(e,t){t!==Nc&&(Is[t]=e)}),Is._=te},Pvt=function(){Is.init=function(e,t,r){if(r)return Is[r]||(Is[r]=Ty[r]=zU(e,t,r),Is[r]._loaded()),Is[r];var n=Is;Ty[Nc]?n=Ty[Nc]:e&&(n=zU(e,t,Nc),n._loaded(),Ty[Nc]=n),Is=n,fI===Evt&&(Vt[Nc]=Is),Avt()}},Rvt=function(){function e(){e.done||(e.done=!0,VTe=!0,HTe=!1,te.each(Ty,function(n){n._dom_loaded()}))}function t(){try{bn.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(bn.addEventListener)bn.readyState==="complete"?e():bn.addEventListener("DOMContentLoaded",e,!1);else if(bn.attachEvent){bn.attachEvent("onreadystatechange",e);var r=!1;try{r=Vt.frameElement===null}catch{}bn.documentElement.doScroll&&r&&t()}te.register_event(Vt,"load",e,!0)};function Ovt(e){return LU=e,fI=FU,Is=new vt,Pvt(),Is.init(),Rvt(),Is}function Ivt(e,t){t()}var nl=Ovt(Ivt);const kvt={apiKey:"AIzaSyDXQX-EOavG3E3eI-TTcR0grtpK8gxv9r0",authDomain:"new-cardapio-web.firebaseapp.com",databaseURL:"https://new-cardapio-web.firebaseio.com/",projectId:"new-cardapio-web",storageBucket:"new-cardapio-web.appspot.com",messagingSenderId:"617600642152",appId:"1:617600642152:web:d2940128ebdde4fa231fdd"};let Rb;const Rs={IDLE:"idle",SYNCING:"syncing",READY:"ready",FAILED:"failed"},Ise=[5e3,5e3,15e3,15e3,15e3,15e3,3e4];function Nvt(e){return Ise[Math.min(e,Ise.length-1)]}const Dvt=3e4,kse=15e3,Mvt=new Set(["auth/network-request-failed","auth/timeout","auth/too-many-requests","auth/internal-error"]);function Zw(e){return{code:e?.code||null,message:e?.message||null}}function wf(e,t){try{nl.track(e,t)}catch(r){console.error(`Failed to track ${e}:`,r)}}function Lvt(e){if(/Database is closing\/hidden/i.test(e?.message||"")||e?.code&&Mvt.has(e.code))return!0;
136if(e?.isAxiosError){const t=e.response?.status;return!t||t>=500}return!1}function Fvt(e){return e?.code==="PERMISSION_DENIED"||e?.code==="permission-denied"||/permission_denied|permission denied/i.test(e?.message||"")}function du(e,t){console.error(`Firebase RTDB listener error (${e}):`,t),Fvt(t)&&wf("Firebase RTDB permission denied",{path:e,...Zw(t)})}function HU(e=[]){return[...new Set(e.map(t=>String(t)))].sort()}function Bvt(e={}){const t=e.company_ids||{};return HU(Object.keys(t).filter(r=>t[r]===!0))}function zvt(e,t){const r=HU(e),n=HU(t);return r.length!==n.length?!1:r.every((i,a)=>i===n[a])}function Hvt(e){return{development:"dev",staging:"stg",production:"prd"}[e]}function Uvt(e){return`portal_${Hvt("production")}_${e}`}class Vvt{constructor(){this.authStatus=Rs.IDLE,this.statusListeners=new Set,this.syncPromise=null,this.syncEpoch=0,this.authReadyPromise=null,this.printerSharingSuspended=!1,this.lastSyncArgs=null,this.lastSessionRecoveryAt=0,this.sessionRecoveryTimer=null,this.syncRetryAttempt=0,this.syncRetryTimer=null,this.unconsumedJobTimers=new Set,this.reportedOrphanPrinters=new Set,this.releasingPrinters=new Set}init(){if(cu().length>0?Rb=cu()[0]:Rb=GEe(kvt),this.db||(this.auth=nrt(Rb),this.db=pat(Rb),this.ordersRef=null,this.notificationsRef=null,this.orderSessionRef=null,this.remotePrintingRef=null,this.remotePrintingPath=null,this.activePrintersRef={},this.offsetRef=null,this.isConnected=!1,this.sessionId=me.generateGUID()+me.generateGUID(),this.authReadyPromise=new Promise(t=>{let r=!1;$et(this.auth,n=>{r||(r=!0,t(n)),this.handleAuthStateChanged(n)})})),!this.swRegistration&&"serviceWorker"in navigator)try{this.swRegistration=navigator.serviceWorker.register("/sw.js",{updateViaCache:"none"}).then(t=>{t.addEventListener("updatefound",()=>{const a=t.installing;a&&a.addEventListener("statechange",()=>{a.state==="installed"&&navigator.serviceWorker.controller&&window.dispatchEvent(new CustomEvent("swUpdated",{detail:t}))})}),t.waiting&&window.dispatchEvent(new CustomEvent("swUpdated",{detail:t}));const r=480*60*1e3;let n=Date.now();const i=()=>{const a=Date.now();a-n>=r&&(n=a,t.update().catch(o=>{console.error("Erro ao verificar atualizações do Service Worker:",o)}))};return document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&i()}),setInterval(i,r),t}).catch(t=>(console.error("Erro ao registrar service worker customizado:",t),null))}catch(t){console.error("Erro ao configurar service worker customizado:",t)}this.messagingPromise||(this.messaging=null,this.messagingPromise=_Ce().then(t=>t?(this.messaging=Qot(Rb),this.messaging):null))}getAuthStatus=()=>this.authStatus;isReady=()=>this.authStatus===Rs.READY;subscribeAuthStatus=t=>(this.statusListeners.add(t),t(this.authStatus),()=>this.statusListeners.delete(t));setAuthStatus=t=>{const r=this.authStatus;this.authStatus=t,r===Rs.READY&&t!==Rs.READY&&this.detachDataListeners(),this.statusListeners.forEach(n=>n(t))};detachDataListeners=()=>{[this.ordersRef,this.orderSessionRef,this.notificationsRef].forEach(t=>{t&&H0(t)}),this.ordersRef=null,this.orderSessionRef=null,this.notificationsRef=null,this.companyId=null};ensureAuthInitialized=async()=>{(!this.auth||!this.db)&&this.init(),this.authReadyPromise&&await this.authReadyPromise};getCurrentSession=async()=>{const t=this.auth?.currentUser;if(!t)return null;const r=await t.getIdTokenResult();return{uid:t.uid,claims:r.claims||{}}};sessionMatchesUser=(t,r)=>{const n=Uvt(r);return!!(n&&t?.uid===n&&t.claims.environment==="production")};sessionMatchesProfile=async({userId:t,companyIds:r})=>{const n=await this.getCurrentSession();return this.sessionMatchesUser(n,t)&&zvt(Bvt(n.claims),r)};assertSignedInUser=async t=>{const r=await this.getCurrentSession();if(!this.sessionMatchesUser(r,t))throw new Error("Firebase session mismatch after sign-in")};ensureAuthPersistence=async()=>{try{await Vet(this.auth,b$)}catch(t){console.error("Failed to set Firebase auth persistence:",t),wf("Firebase auth persistence unavailable",Zw(t))}};signInSession=async()=>{const{getFirebaseToken:t}=await Zt(async()=>{const{getFirebaseToken:n}=await Promise.resolve().then(()=>_Qe);return{getFirebaseToken:n}},void 0),r=await t();await Uet(this.auth,r.token)};handleAuthStateChanged=t=>{t||this.authStatus!==Rs.READY||this.printerSharingSuspended||this.syncPromise||(wf("Firebase session lost",{sessionId:this.sessionId,recovering:!!this.lastSyncArgs}),this.setAuthStatus(Rs.FAILED),this.scheduleSessionRecovery())};scheduleSessionRecovery=()=>
136{if(!this.lastSyncArgs)return;const t=this.lastSyncArgs,r=this.syncEpoch,n=Math.max(0,Dvt-(Date.now()-this.lastSessionRecoveryAt));this.lastSessionRecoveryAt=Date.now()+n,clearTimeout(this.sessionRecoveryTimer),this.sessionRecoveryTimer=setTimeout(()=>{this.sessionRecoveryTimer=null,r===this.syncEpoch&&this.syncSession(t)},n)};syncSession=async({userId:t,companyIds:r=[]}={})=>{if(!t)return!1;if(this.syncPromise)return this.syncPromise;const n=this.syncEpoch;return this.syncPromise=this.performSyncSession({userId:t,companyIds:r,epoch:n}).finally(()=>{this.syncPromise=null}),this.syncPromise};performSyncSession=async({userId:t,companyIds:r,epoch:n})=>{try{if(await this.ensureAuthInitialized(),await this.ensureAuthPersistence(),n!==this.syncEpoch)return!1;if(await this.sessionMatchesProfile({userId:t,companyIds:r})||(this.setAuthStatus(Rs.SYNCING),await this.signInSession(),await this.assertSignedInUser(t)),n!==this.syncEpoch)return await this.signOutCurrentUser(),!1;this.lastSyncArgs={userId:t,companyIds:r};const a=this.authStatus===Rs.FAILED||this.syncRetryAttempt>0,o=this.syncRetryAttempt;return this.syncRetryAttempt=0,this.printerSharingSuspended=!1,this.setAuthStatus(Rs.READY),a&&wf("Firebase auth sync recovered",{sessionId:this.sessionId,attempts:o}),!0}catch(i){console.error("Firebase auth sync failed:",i);const a=Lvt(i);return wf("Firebase auth sync failed",{transient:a,...Zw(i)}),n===this.syncEpoch&&(this.lastSyncArgs={userId:t,companyIds:r},this.setAuthStatus(Rs.FAILED),this.scheduleSyncRetry({userId:t,companyIds:r})),!1}};scheduleSyncRetry=({userId:t,companyIds:r})=>{const n=Nvt(this.syncRetryAttempt),i=this.syncEpoch;this.syncRetryAttempt+=1,clearTimeout(this.syncRetryTimer),this.syncRetryTimer=setTimeout(()=>{this.syncRetryTimer=null,i===this.syncEpoch&&this.syncSession({userId:t,companyIds:r})},n)};signOutCurrentUser=async()=>{try{this.auth?.currentUser&&await Wet(this.auth)}catch(t){console.error("Firebase signOut failed:",t)}};signOutWithPrintersReleased=async()=>{this.printerSharingSuspended=!0,await this.stopSharingAllLocalPrinters(),await this.signOutCurrentUser()};signOutSession=async()=>{this.syncEpoch+=1,this.syncRetryAttempt=0,this.lastSyncArgs=null,clearTimeout(this.syncRetryTimer),this.syncRetryTimer=null,clearTimeout(this.sessionRecoveryTimer),this.sessionRecoveryTimer=null,this.printerSharingSuspended=!0,await this.ensureAuthInitialized(),await this.signOutWithPrintersReleased(),this.setAuthStatus(Rs.IDLE)};getMessagingToken=t=>this.messagingPromise?this.messagingPromise.then(r=>{if(!r)return null;const n={vapidKey:t};return this.swRegistration?this.swRegistration.then(i=>i?navigator.serviceWorker.ready.then(a=>WT(r,{...n,serviceWorkerRegistration:a||i})).catch(()=>WT(r,{...n,serviceWorkerRegistration:i})):WT(r,n)):WT(r,n)}):Promise.resolve(null);onNewOrders=(t,r)=>{if(!cu().length||!t||!this.isReady())return;const n=`production/companies/${t}/orders/delivery/last_change`;this.ordersRef?this.ordersRef&&this.companyId!==t&&(H0(this.ordersRef),this.ordersRef=uu(this.db,n),id(this.ordersRef,i=>{r(i.val())},i=>du(n,i))):(this.companyId=t,this.ordersRef=uu(this.db,n),id(this.ordersRef,i=>{r(i.val())},i=>du(n,i)))};onOrderSessionUpdate=(t,r)=>{if(!cu().length||!t||!this.isReady())return;const n=`production/companies/${t}/orders/order_session/last_change`;this.orderSessionRef?this.orderSessionRef&&this.companyId!==t&&(H0(this.orderSessionRef),this.orderSessionRef=uu(this.db,n),id(this.orderSessionRef,i=>{r(i.val())},i=>du(n,i))):(this.companyId=t,this.orderSessionRef=uu(this.db,n),id(this.orderSessionRef,i=>{r(i.val())},i=>du(n,i)))};onNewNotifications=(t,r)=>{if(!cu().length||!t||!this.isReady())return;const n=`production/companies/${t}/last_notification`;this.notificationsRef?this.notificationsRef&&this.companyId!==t&&(H0(this.notificationsRef),this.notificationsRef=uu(this.db,n),id(this.notificationsRef,i=>{r(i.val())},i=>du(n,i))):(this.companyId=t,this.notificationsRef=uu(this.db,n),id(this.notificationsRef,i=>{r(i.val())},i=>du(n,i)))};sanitizePrinterName=t=>t.replace(/\./g,"4bb882b3").replace(/#/g,"4aa19a6c").replace(/\$/g,"436bae60").replace(/\[/g,"4f33be60").replace(/\]/g,"43f191aa").replace(/\//g,"4d5fd9a6");getOriginalPrinterName=t=>t.replace(/4bb882b3/g,".").replace(/4aa19a6c/g,"#").replace(/436bae60/g,"$").replace(/4f33be60/g,"[").replace(/43f191aa/g,"]").replace(/4d5fd9a6/g,"/");watchPrintersStatus=(t,r,n)=>{if(!cu().length||!this.isReady())return()=>{};this.offsetRef=uu(this.db,".info/serverTimeOffset");const i=".info/serverTimeOffset",a=id(this.offsetRef,h=>{const p=h.val();r(p)},h=>du(i,h)),o=`production/companies/${t}`;this.remotePrintingRef=uu(this.db,o),this.remotePrintingPath=o;const s=uu(this.db,".info/connected"),l=".info/connected",c=id(s,async h=>{if(this.isConnected=h.val(),h.val()===!0){const p=bae(rc(this.remotePrintingRef,"connections"));await _ae(p).remove(),bH(p,{sessionId:this.sessionId,timestamp:wb(),version:"2026-08-0615:00:00.000Z",userAgent:window?.navigator?.userAgent||"Desconhecido"})}},h=>du(l,h)),d=`${o}/status`,f=id(rc(this.remotePrintingRef,"status"),h=>{const p=[],g=[],_=[];
136h?.val()&&Object.entries(h.val()).forEach(([E,S])=>{if(!S.online)return;const P=this.activePrintersRef[E],O=S.sessionId===this.sessionId;if(O&&!P&&!this.releasingPrinters.has(E)){_.push(this.getOriginalPrinterName(E));return}if(p.push(this.getOriginalPrinterName(E)),!P||O||!P.confirmedOnline)return;this.stopPrinterSharing(E,!1),g.push(E)}),this.reportOrphanedPrinters(_);const b=Object.keys(this.activePrintersRef).filter(E=>!g.includes(E)).map(E=>this.getOriginalPrinterName(E));n(p,b)},h=>du(d,h));return()=>{this.stopSharingAllLocalPrinters(),this.clearUnconsumedJobChecks(),a(),c(),f(),this.remotePrintingRef=null,this.remotePrintingPath=null,this.offsetRef=null,this.isConnected=!1,this.reportedOrphanPrinters=new Set}};reportOrphanedPrinters=t=>{const r=t.filter(n=>!this.reportedOrphanPrinters.has(n));this.reportedOrphanPrinters=new Set(t),r.length!==0&&wf("Remote printer orphaned by this session",{printers:r,sessionId:this.sessionId})};markPrinterOnline=async t=>{if(this.printerSharingSuspended||!this.isConnected)return;const r=this.sanitizePrinterName(t),n=this.activePrintersRef[r];if(n){n.confirmedOnline=!1;try{if(await n.statusOnDisconnect.update({online:!1,sessionId:null,timestamp:wb(),userAgent:null}),this.printerSharingSuspended||this.activePrintersRef[r]!==n){await n.statusOnDisconnect.cancel();return}await wae(n.status,{online:!0,sessionId:this.sessionId,timestamp:wb(),userAgent:window?.navigator?.userAgent||"Desconhecido"}),n.confirmedOnline=!0}catch(i){console.error(`Failed to mark printer online (${r}):`,i),wf("Remote printer claim failed",{printer:t,...Zw(i)})}}};startPrinterSharing=(t,r)=>{if(!cu().length||!this.isReady()||!this.remotePrintingRef||!t||this.printerSharingSuspended)return;const n=this.sanitizePrinterName(t);if(this.activePrintersRef[n])return;const i=rc(this.remotePrintingRef,`status/${n}`),a=_ae(i);this.activePrintersRef[n]={status:i,statusOnDisconnect:a,confirmedOnline:!1,queue:rc(this.remotePrintingRef,`queues/${n}`),connected:s=>{s.val()===!0&&this.markPrinterOnline(t)}},id(uu(this.db,".info/connected"),this.activePrintersRef[n].connected,s=>du(".info/connected",s));const o=`${this.remotePrintingPath}/queues/${n}`;oat(this.activePrintersRef[n].queue,s=>{const l=s.val();r(t,{key:s.key,...l})},s=>{du(o,s),this.stopPrinterSharing(t)})};stopPrinterSharing=async(t,r=!0)=>{if(!cu().length||!this.remotePrintingRef||!t)return;const n=this.sanitizePrinterName(t),i=this.activePrintersRef[n];if(!i||(H0(uu(this.db,".info/connected"),"value",i.connected),H0(i.queue),delete this.activePrintersRef[n],!this.isConnected))return;this.releasingPrinters.add(n);const a=i.statusOnDisconnect.cancel().catch(s=>console.error(`Failed to cancel printer onDisconnect (${n}):`,s)),o=r?wae(i.status,{online:!1,sessionId:null,timestamp:wb(),userAgent:null}).catch(s=>{console.error(`Failed to mark printer offline (${n}):`,s),wf("Remote printer release failed",{printer:t,...Zw(s)})}):Promise.resolve();try{await Promise.all([a,o])}finally{this.releasingPrinters.delete(n)}};stopSharingAllLocalPrinters=async()=>{!cu().length||!this.remotePrintingRef||await Promise.all(Object.keys(this.activePrintersRef).map(t=>this.stopPrinterSharing(t)))};forceSharePrintersFromThisSession=async(t,r)=>{t?.length&&await Promise.all(t.map(async n=>{this.startPrinterSharing(n,r),await this.markPrinterOnline(n)}))};addTaskToQueue=async(t,r)=>{if(!cu().length||!this.isReady()||!this.remotePrintingRef)return;const n=this.sanitizePrinterName(t),i={...r,timestamp:wb()},a=bae(rc(this.remotePrintingRef,`queues/${n}`)),o=rc(this.remotePrintingRef,`status/${n}`);await bH(a,i),this.scheduleUnconsumedJobCheck(t,a,o)};scheduleUnconsumedJobCheck=(t,r,n)=>{const i=setTimeout(async()=>{this.unconsumedJobTimers.delete(i);try{if(!(await Sae(r)).exists())return;const o=(await Sae(n)).val();wf("Remote print job not consumed",{printer:t,waitedMs:kse,ownerOnline:!!o?.online,ownerSessionId:o?.sessionId||null,ownerUserAgent:o?.userAgent||null,ownerSince:o?.timestamp||null}),await Eae(n)}catch(a){console.error(`Failed to check or clear unconsumed print job (${t}):`,a)}},kse);this.unconsumedJobTimers.add(i)};clearUnconsumedJobChecks=()=>
136{this.unconsumedJobTimers.forEach(t=>clearTimeout(t)),this.unconsumedJobTimers.clear()};removeTaskFromQueue=async(t,r)=>{if(!cu().length||!this.isReady()||!this.remotePrintingRef)return;const n=this.sanitizePrinterName(t);await Eae(rc(this.remotePrintingRef,`queues/${n}/${r}`))}}const Rc=new Vvt;function qvt(e){return e?.id?Ye.companyUsers.includes(e.profile):!1}function dG(e){return qvt(e)?Rc.syncSession({userId:e.id,companyIds:(e.companies||[]).map(t=>t.id)}).catch(Nse):Rc.signOutSession().catch(Nse)}function Nse(e){return console.error("Firebase session sync failed:",e),!1}const qTe="LOGIN_ERROR",jTe="LOGIN_BILLING_ERROR",$Te="LOGIN_OTP_INFO",WTe="RESET_BILLING_ERROR",GTe="RESET_OTP_INFO",KTe="LOGIN_SUCCESS",YTe="SET_LOADING",jvt="RESET_LOADING",XTe="SET_SIGN_IN_LOADING",ZTe="RESET_SIGN_IN_LOADING";function pI({login:e,password:t,otp_code:r,captcha:n}){return i=>{i(Gvt()),OEe(e,t,r,n).then(async a=>{qi.set(a.access_token,a.refresh_token);try{const o=await o5();dG(o),await i(nAe(o)),i({type:KTe})}catch(o){o.response?.status===401&&(qi.reset(),qi.resetRefreshToken());const s=o.response?.data?.message||"Erro ao se conectar ao servidor";i(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:5e3,message:s,variant:"error"}))}}).catch(a=>{const o=a.response?.data?.message||a.message||"Problema ao obter autorização",s=a.response?.data?.billing,l=a.response?.data;return s&&(s.pix_base64_qrcode||s.invoice_url)?i({type:jTe,payload:{login:e,password:t,billing:s}}):l?.otp_required||l?.otp_resent?i({type:$Te,payload:{login:e,password:t,otp:{...l,otp_message:r?"Código inválido":null}}}):(i(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:2e3,message:o,variant:"error"})),i({type:qTe,payload:{login:"Verifique seu usuário/email",password:"Verifique sua senha"}}))})}}function $vt(){return{type:WTe}}function Wvt(){return{type:GTe}}function Gvt(){return{type:YTe}}function Kvt(){return{type:XTe}}function Yvt(){return{type:ZTe}}const Kn={ACCOUNTS:"accounts",ACCOUNTS_ACCESS_OWNER_ACCOUNT:"accounts_access_owner_account",ACCOUNTS_CHANGE_SUBSCRIPTION_PLAN:"accounts_change_subscription_plan",ACCOUNTS_ADD_SUBSCRIPTION_MODULES:"accounts_add_subscription_modules",ACCOUNTS_CHANGE_SUBSCRIPTION_PLAN_VALUE:"accounts_change_subscription_plan_value",ACCOUNTS_CHANGE_SUBSCRIPTION_OR_MODULE_RENEWAL:"accounts_change_subscription_or_module_renewal",ACCOUNTS_CANCEL_SUBSCRIPTION_OR_MODULE:"accounts_cancel_subscription_or_module",ACCOUNTS_CHANGE_PAYMENT_DAY:"accounts_change_payment_day",ACCOUNTS_CREATE_NEW_ACCOUNT:"accounts_create_new_account",ACCOUNTS_ADD_COMPANY_TO_ACCOUNT:"accounts_add_company_to_account",ACCOUNTS_EXTEND_SUBSCRIPTION_PERIOD:"accounts_extend_subscription_period",ACCOUNTS_ADD_SUBSCRIPTION_REFERRAL:"accounts_add_subscription_referral",ACCOUNTS_CREATE_BILLING:"accounts_create_billing",ACCOUNTS_DELETE_BILLING:"accounts_delete_billing",ACCOUNTS_ADD_CREDIT_CHARGE:"accounts_add_credit_charge",ACCOUNTS_ADD_DEBIT_CHARGE:"accounts_add_debit_charge",ACCOUNTS_EDIT_SUBSCRIPTION_CHARGE:"accounts_edit_subscription_charge",ACCOUNTS_DELETE_SUBSCRIPTION_CHARGE:"accounts_delete_subscription_charge",ACCOUNTS_ERASE_COMPANY_DATA:"accounts_erase_company_data",ACCOUNTS_AUDIT_LOGS:"accounts_audit_logs",PLANS_AND_MODULES:"plans_and_modules",PLANS_AND_MODULES_MANAGE:"plans_and_modules_manage",SUBSCRIPTION_COUPONS:"subscription_coupons",SUBSCRIPTION_COUPONS_MANAGE:"subscription_coupons_manage",SUBSCRIPTION_CUSTOM_FIELDS:"subscription_custom_fields",SUBSCRIPTION_CUSTOM_FIELDS_MANAGE:"subscription_custom_fields_manage",ORGANIZATIONS:"organizations",ORGANIZATIONS_ACCESS_ACCOUNT:"organizations_access_account",ORGANIZATIONS_CREATE:"organizations_create",ORGANIZATIONS_EDIT:"organizations_edit",ORGANIZATIONS_GENERATE_BILLING:"organizations_generate_billing",ORGANIZATIONS_ADD_CREDIT_CHARGE:"organizations_add_credit_charge",ORGANIZATIONS_ADD_DEBIT_CHARGE:"organizations_add_debit_charge",AFFILIATE_PARTNER:"affiliate_partner",AFFILIATE_PARTNER_ACCESS_ACCOUNT:"affiliate_partner_access_account",AFFILIATE_PARTNER_MANAGE:"affiliate_partner_manage",AFFILIATE_PARTNER_MANAGE_PAYMENTS:"affiliate_partner_manage_payments",AFFILIATE_PARTNER_EXPORT:"affiliate_partner_export",SUBSCRIPTION_EVENTS:"subscription_events",INTEGRATORS:"integrators",INTEGRATORS_MANAGE:"integrators_manage",INTEGRATORS_VIEW_TOKEN:"integrators_view_token",NOTIFICATIONS:"notifications",NOTIFICATIONS_MANAGE:"notifications_manage",NOTIFICATIONS_SEND:"notifications_send",SELLER_ANALYSIS:"seller_analysis",SELLER_ANALYSIS_FILTER_BY_SELLERS:"seller_analysis_filter_by_sellers"};function Ber(){const e=at(({auth:a})=>
136a.user.user?.internal_permissions),t=at(({auth:a})=>a.user.role),r=u.useRef(null),n=u.useMemo(()=>!r0(e,r.current)&&e?(r.current=e,e):r.current,[e]),i=u.useCallback(a=>t==="ADMIN"||t==="RESELLER"?!0:typeof a!="string"&&!Array.isArray(a)||!n?.length?!1:Array.isArray(a)?a.some(o=>n.includes(o)):!!n.includes(a),[n,t]);return u.useMemo(()=>({hasUserRolePermissions:i}),[i])}const At={DELIVERY_MODULE:"delivery",DELIVERY_MANAGEMENT_MODULE:"delivery_management_module",TABLE_MODULE:"table_management",CASH_CONTROL_MODULE:"cash_management",PDV_MODULE:"pdv",CUSTOM_FIELDS_MODULE:"custom_fields",AUTOMATIC_PRINTING_MODULE:"automatic_printing",USERS_MANAGEMENT_MODULE:"users_management",CLIENT_MANAGEMENT_MODULE:"client_management",GOOGLE_ADDRESS_MODULE:"google_address",SIMPLE_STOCK_CONTROL_MODULE:"simple_stock_control",ADVANCED_STOCK_CONTROL_MODULE:"advanced_stock_control",ONLINE_PAYMENT:"online_payment",LOYALTY_PROGRAM:"loyalty_program",DEBT_BOOK:"debt_book",FISCAL:"fiscal",ZAPZAP:"zapzap",IFOOD:"ifood",BROWSER_EXTENSION:"browser_extension",CHATBOT:"chatbot",KDS:"kds",FINANCIAL_MANAGEMENT_MODULE:"financial_management_module",TOTEM_MODULE:"totem",TEF_POS_MODULE:"tef_pos"},zer={[At.DELIVERY_MODULE]:"Módulo de delivery",[At.DELIVERY_MANAGEMENT_MODULE]:"Módulo de gestão de entregas",[At.TABLE_MODULE]:"Módulo de mesas",[At.CASH_CONTROL_MODULE]:"Módulo de caixa",[At.PDV_MODULE]:"Módulo de balcão",[At.CUSTOM_FIELDS_MODULE]:"Módulo de campos personalizados",[At.AUTOMATIC_PRINTING_MODULE]:"Módulo de impressão automática",[At.USERS_MANAGEMENT_MODULE]:"Módulo de gestão de usuários",[At.CLIENT_MANAGEMENT_MODULE]:"Módulo de gestão de clientes",[At.GOOGLE_ADDRESS_MODULE]:"Módulo de endereço avançado",[At.SIMPLE_STOCK_CONTROL_MODULE]:"Módulo de estoque simples",[At.ADVANCED_STOCK_CONTROL_MODULE]:"Módulo de estoque avançado",[At.ONLINE_PAYMENT]:"Módulo de pagamento online",[At.LOYALTY_PROGRAM]:"Módulo de fidelidade",[At.DEBT_BOOK]:"Módulo de fiado",[At.FISCAL]:"Módulo Fiscal",[At.ZAPZAP]:"Módulo de disparo via WhatsApp",[At.IFOOD]:"Módulo de integração com iFood",[At.BROWSER_EXTENSION]:"Módulo de extensão do WhatsApp",[At.CHATBOT]:"Módulo de ChatBot (Cardapinho)",[At.KDS]:"Módulo de KDS",[At.FINANCIAL_MANAGEMENT_MODULE]:"Módulo de gestão financeira",[At.TOTEM_MODULE]:"Módulo de totem",[At.TEF_POS_MODULE]:"Módulo TEF POS"};function Ah(){const e=at(({globalCompany:i})=>i.company?.available_features),t=u.useRef(null),r=u.useMemo(()=>r0(e,t.current)?t.current:(t.current=e,e),[e]),n=u.useCallback(i=>!i||typeof i!="string"&&!Array.isArray(i)?!1:!r||!(r.length>0)?null:Array.isArray(i)?i.filter(a=>r.includes(a)).length>0:!!r.includes(i),[r]);return u.useMemo(()=>({hasModule:n}),[n])}var k9,Dse;function Xvt(){if(Dse)return k9;Dse=1;function e(t,r,n,i){for(var a=-1,o=t==null?0:t.length;++a<o;){var s=t[a];r(i,s,n(s),t)}return i}return k9=e,k9}var N9,Mse;function Zvt(){if(Mse)return N9;Mse=1;var e=t5();function t(r,n,i,a){return e(r,function(o,s,l){n(a,o,i(o),l)}),a}return N9=t,N9}var D9,Lse;function QTe(){if(Lse)return D9;Lse=1;var e=Xvt(),t=Zvt(),r=ms(),n=co();function i(a,o){return function(s,l){var c=n(s)?e:t,d=o?o():{};return c(s,a,r(l,2),d)}}return D9=i,D9}var M9,Fse;function Qvt(){if(Fse)return M9;Fse=1;var e=u_(),t=QTe(),r=Object.prototype,n=r.hasOwnProperty,i=t(function(a,o,s){n.call(a,s)?a[s].push(o):e(a,s,[o])});return M9=i,M9}var Jvt=Qvt();const z_=et(Jvt);var L9,Bse;function egt(){if(Bse)return L9;Bse=1;var e=u_(),t=QTe(),r=t(function(n,i,a){e(n,a,i)});return L9=r,L9}var tgt=egt();const Oo=et(tgt);var F9,zse;function rgt(){if(zse)return F9;zse=1;var e=u_(),t=e$(),r=ms();function n(i,a){var o={};return a=r(a,3),t(i,function(s,l,c){e(o,l,a(s,l,c))}),o}return F9=n,F9}var ngt=rgt();const e4=et(ngt),Te={LAST_ORDERS_PAGE:"last_orders_page",EDIT_ORDER:"edit_order",REMOVE_PAYMENT:"remove_order_payment",REMOVE_ORDER_ITEM:"remove_order_item",EDIT_DISCOUNTS_AND_FEES:"edit_order_discounts_and_fees",EDIT_CLIENT:"edit_client",REDEEM_LOYALTY_REWARD:"redeem_loyalty_reward",BACK_TO_PREVIOUS_STATUS:"back_to_previous_status",CANCEL_ORDER:"cancel_order",CLOSE_ORDER:"close_order",REOPEN_ORDER:"reopen_order",TABLE_MANAGEMENT_PAGE:"table_management_page",SWITCH_ORDER_SESSION:"switch_order_session",TRANSFER_ITEMS:"transfer_items",PRINT_ITEMS_KITCHEN:"print_items_kitchen",EDIT_SESSION_ITEMS:"edit_session_items",CANCEL_SESSION_ITEMS:"cancel_items",CANCEL_SESSION:"cancel_session",EDIT_PAYMENT:"edit_payment",REOPEN_ORDER_SESSION:"reopen_order_session",CLOSE_ORDER_SESSION:"close_order_session",EDIT_SESSION_FEES:"edit_session_fees",EDIT_SESSION_DISCOUNTS:"edit_session_discounts",ALLOW_ORDER_WITH_OTHER_USER:"allow_order_with_other_user",CASH_FLOW_PAGE:"cash_flow_page",ADD_CASH_FLOW_OPERATIONS:"add_cash_flow_operations",VIEW_CASH_FLOW_HISTORY:"view_cash_flow_history",VIEW_CASH_FLOW_VALUES:"view_cash_flow_values",REOPEN_CASH_FLOW:"reopen_cash_flow",KDS:"kds",PERFORMANCE_PAGES:"performance_pages",ORDER_HISTORY_PAGE:"order_history_pages",COMPANY_MANAGEMENT_PAGES:"company_management_pages",MANIPULATE_COMPANY_HOURS:"manipulate_company_hours",PAYMENT_METHODS_PAGE:"payment_methods_page",CATALOG_PAGES:"catalog_pages",MANAGE_COST_PRICE:"manage_cost_price",MANAGE_STOCK_O
136N_CATALOG:"manage_stock_on_catalog",STOCK_PAGES:"stock_pages",DELIVERY_MANAGEMENT_PAGES:"delivery_pages",DISCOUNT_COUPONS_PAGE:"discount_coupons_page",LOYALTY_PAGES:"loyalty_pages",ADD_LOYALTY_POINTS:"add_loyalty_points",REMOVE_LOYALTY_POINTS:"remove_loyalty_points",CLIENT_MANAGEMENT_PAGE:"clients_management_page",FEEDBACK_PAGE:"feedback_page",DEBT_BOOK_PAGES:"debt_book_pages",EDIT_DEBT_BOOK:"edit_debt_book",FINANCIAL:"financial",FINANCIAL_EXPENSE_TRANSACTIONS:"financial_expense_transactions",FINANCIAL_REVENUE_TRANSACTIONS:"financial_revenue_transactions",FINANCIAL_CREATE_TRANSACTION:"financial_create_transaction",FINANCIAL_PAY_TRANSACTION:"financial_pay_transaction",FINANCIAL_EDIT_AND_DELETE_TRANSACTION:"financial_edit_and_delete_transaction",FINANCIAL_CASH_FLOW:"financial_cash_flow",FINANCIAL_EXPENSE_ANALYSIS:"financial_expense_analysis",FINANCIAL_REVENUE_ANALYSIS:"financial_revenue_analysis",FINANCIAL_ACCOUNTS_MANAGEMENT:"financial_accounts_management",FINANCIAL_CREATE_ACCOUNT:"financial_create_account",FINANCIAL_CATEGORIES_MANAGEMENT:"financial_categories_management",FINANCIAL_CREATE_CATEGORY:"financial_create_category",FINANCIAL_COST_CENTERS_MANAGEMENT:"financial_cost_centers_management",FINANCIAL_CREATE_COST_CENTER:"financial_create_cost_center",FINANCIAL_SUPPLIERS_MANAGEMENT:"financial_suppliers_management",FINANCIAL_CREATE_SUPPLIER:"financial_create_supplier",FINANCIAL_PAYMENT_METHODS_MANAGEMENT:"financial_payment_methods_management",FINANCIAL_CREATE_PAYMENT_METHOD:"financial_create_payment_method",FISCAL_PAGES:"tax",ISSUE_TAX_INVOICE:"issue_tax_invoice",MARKETING_PAGES:"marketing_pages",SETTINGS_PAGES:"settings",SETTINGS_PAGES_PRINTING:"settings_printing"},t4=[{id:Te.LAST_ORDERS_PAGE,label:"Gestão de pedidos",requiredModules:null,parentPermission:null},{id:Te.EDIT_ORDER,label:"Editar pedido",requiredModules:null,parentPermission:null},{id:Te.REMOVE_PAYMENT,label:"Remover pagamento",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.REMOVE_ORDER_ITEM,label:"Remover item",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.EDIT_DISCOUNTS_AND_FEES,label:"Editar descontos e acréscimos",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.EDIT_CLIENT,label:"Editar cliente",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.REDEEM_LOYALTY_REWARD,label:"Resgatar recompensa de fidelidade",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.BACK_TO_PREVIOUS_STATUS,label:"Voltar status do pedido",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.CANCEL_ORDER,label:"Cancelar pedido",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.CLOSE_ORDER,label:"Finalizar pedido",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.REOPEN_ORDER,label:"Reabrir pedido",requiredModules:null,parentPermission:Te.EDIT_ORDER},{id:Te.TABLE_MANAGEMENT_PAGE,label:"Mesas/Comandas",requiredModules:[At.TABLE_MODULE],parentPermission:null},{id:Te.SWITCH_ORDER_SESSION,label:"Trocar Mesas",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.TRANSFER_ITEMS,label:"Mover items da mesa/comanda",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.PRINT_ITEMS_KITCHEN,label:"Reimprimir items da mesa/comanda",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.EDIT_SESSION_ITEMS,label:"Editar itens",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.CANCEL_SESSION_ITEMS,label:"Cancelar itens",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.CANCEL_SESSION,label:"Cancelar pedido",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.EDIT_PAYMENT,label:"Adicionar e remover pagamentos",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.REOPEN_ORDER_SESSION,label:"Reabrir mesa/comanda",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.CLOSE_ORDER_SESSION,label:"Fechar mesa/comanda",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.EDIT_SESSION_FEES,label:"Alterar taxas",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.EDIT_SESSION_DISCOUNTS,label:"Alterar descontos",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.ALLOW_ORDER_WITH_OTHER_USER,label:"Lançar pedidos como outro garçom",requiredModules:[At.TABLE_MODULE],parentPermission:Te.TABLE_MANAGEMENT_PAGE},{id:Te.KDS,label:"KDS",requiredModules:[At.KDS],parentPermission:null},{id:Te.CASH_FLOW_PAGE,label:"Caixa",requiredModules:[At.CASH_CONTROL_MODULE],parentPermission:null},{id:Te.ADD_CASH_FLOW_OPERATIONS,label:"Adicionar sangria, suprimento e fechar o caixa",requiredModules:[At.CASH_CONTROL_MODULE],parentPermission:Te.CASH_FLOW_PAGE},{id:Te.VIEW_CASH_FLOW_HISTORY,label:"Ver histórico de caixas",requiredModules:[At.CASH_CONTROL_MODULE],parentPermission:Te.CASH_FLOW_PAGE}
136,{id:Te.VIEW_CASH_FLOW_VALUES,label:"Ver valores em caixa (fechamento as cegas)",requiredModules:[At.CASH_CONTROL_MODULE],parentPermission:Te.CASH_FLOW_PAGE},{id:Te.REOPEN_CASH_FLOW,label:"Reabrir caixa",requiredModules:[At.CASH_CONTROL_MODULE],parentPermission:Te.CASH_FLOW_PAGE},{id:Te.PERFORMANCE_PAGES,label:"Desempenho",requiredModules:null,parentPermission:null},{id:Te.ORDER_HISTORY_PAGE,label:"Histórico de pedidos",requiredModules:null,parentPermission:null},{id:Te.COMPANY_MANAGEMENT_PAGES,label:"Minha empresa",requiredModules:null,parentPermission:null},{id:Te.MANIPULATE_COMPANY_HOURS,label:"Antecipar abertura ou fechamento da empresa",requiredModules:null,parentPermission:Te.COMPANY_MANAGEMENT_PAGES},{id:Te.PAYMENT_METHODS_PAGE,label:"Formas de pagamento",requiredModules:null,parentPermission:Te.COMPANY_MANAGEMENT_PAGES},{id:Te.CATALOG_PAGES,label:"Catálogo",requiredModules:null,parentPermission:null},{id:Te.MANAGE_COST_PRICE,label:"Gerenciar preço de custo",requiredModules:null,parentPermission:Te.CATALOG_PAGES},{id:Te.MANAGE_STOCK_ON_CATALOG,label:"Gerenciar estoque no catálogo",requiredModules:null,parentPermission:Te.CATALOG_PAGES},{id:Te.STOCK_PAGES,label:"Estoque",requiredModules:[At.ADVANCED_STOCK_CONTROL_MODULE],parentPermission:null},{id:Te.DELIVERY_MANAGEMENT_PAGES,label:"Delivery",requiredModules:[At.DELIVERY_MODULE],parentPermission:null},{id:Te.DISCOUNT_COUPONS_PAGE,label:"Cupons e descontos",requiredModules:null,parentPermission:null},{id:Te.FINANCIAL,label:"Financeiro",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:null},{id:Te.FINANCIAL_EXPENSE_TRANSACTIONS,label:"Lançamentos (contas a pagar)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_REVENUE_TRANSACTIONS,label:"Lançamentos (contas a receber)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_TRANSACTION,label:"Adicionar lançamento",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_PAY_TRANSACTION,label:"Pagar lançamento",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_EDIT_AND_DELETE_TRANSACTION,label:"Editar e excluir lançamento",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CASH_FLOW,label:"Fluxo de caixa",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_EXPENSE_ANALYSIS,label:"Análise de pagamentos",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_REVENUE_ANALYSIS,label:"Análise de recebimentos",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_ACCOUNTS_MANAGEMENT,label:"Gerenciar contas (ver, editar e excluir)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_ACCOUNT,label:"Adicionar conta",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CATEGORIES_MANAGEMENT,label:"Gerenciar categorias (ver, editar e excluir)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_CATEGORY,label:"Adicionar categoria",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_COST_CENTERS_MANAGEMENT,label:"Gerenciar centros de custo (ver, editar e excluir)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_COST_CENTER,label:"Adicionar centro de custo",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_SUPPLIERS_MANAGEMENT,label:"Gerenciar fornecedores (ver, editar e excluir)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_SUPPLIER,label:"Adicionar fornecedor",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_PAYMENT_METHODS_MANAGEMENT,label:"Gerenciar formas de pagamento (ver, editar e excluir)",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.FINANCIAL_CREATE_PAYMENT_METHOD,label:"Adicionar forma de pagamento",requiredModules:[At.FINANCIAL_MANAGEMENT_MODULE],parentPermission:Te.FINANCIAL},{id:Te.LOYALTY_PAGES,label:"Fidelidade",requiredModules:[At.LOYALTY_PROGRAM],parentPermission:null},{id:Te.ADD_LOYALTY_POINTS,label:"Adicionar pontos",requiredModules:[At.LOYALTY_PROGRAM],parentPermission:Te.LOYALTY_PAGES},{id:Te.REMOVE_LOYALTY_POINTS,label:"Retirar pontos",requiredModules:[At.LOYALTY_PROGRAM],parentPermission:Te.LOYALTY_PAGES},{id:Te.CLIENT_MANAGEMENT_PAGE,label:"Clientes",requiredModules:[At.CLIENT_MANAGEMENT_MODULE],parentPermission:null},{id:Te.FEEDBACK_PAGE,label:"Avaliação",requiredModules:[At.DELIVERY_MODULE],parentPermission:null},{id:Te.DEBT_BOOK_PAGES,label:"Fiado",requiredModules:[At.DEBT_BOOK],parentPermission:null},{id:Te.EDIT_DEBT_BOOK,label:"Adicionar pagamento ou dívida",requiredModules:[At.DEBT_BOOK],parentPermission:Te.DEBT_BOOK_PAGES},{id:Te.FISCAL_PAGES,label:"Fiscal",requiredModules:[At.FISCAL],parentPermission:null},{id:Te.ISSUE_TAX_INVOICE,label:"Emitir notas",requiredModules:[At.FISCAL],parentPermission:Te.FISCAL_PAGES},{id:Te.MARKETING_PAGES,label:"Marketing",requiredModules:[At.ZAPZAP],parentPermission:null},{id:Te.SETTINGS_PAGES,label:"Configurações - Geral",requiredModules:null,parentPermission:null},{id:Te.SETTINGS_PAGES_PRINTING,label:"Configurações - Impressão",requiredModules:null,parentPermission:null}],Her=Oo(t4,"id"),igt=e4(Oo(t4.filter(e=>!e.parentPermission),"id"),()=>[]),agt=e4(z_(t4.filter(e=>e.parentPermission),"parentPermission"),e=>e.map(({id:t})=>t)),Uer={...igt,...agt},Ver={MANAGER:t4.map(({id:e})=>e),EMPLOYEE:[Te.LAST_ORDERS_PAGE,Te.EDIT_ORDER,Te.REMOVE_PAYMENT,Te.REMOVE_ORDER_ITEM,Te.EDIT_DISCOUNTS_AND_FEES,Te.EDIT_CLIENT,Te.BACK_TO_PREVIOUS_STATUS,Te.CANCEL_ORDER,Te.CLOSE_ORDER,Te.TABLE_MANAGEMENT_PAGE,Te.SWITCH_ORDER_SESSION,Te.TRANSFER_ITEMS,Te.PRINT_ITEMS_KITCHEN,Te.EDIT_SESSION_ITEMS,Te.CANCEL_SESSION_ITEMS,Te.CANCEL_SESSION,Te.EDIT_PAYMENT,Te.PAYMENT_METHODS_PAGE,Te.REOPEN_ORDER_SESSION,Te.CLOSE_ORDER_SESSION,Te.EDIT_SESSION_FEES,Te.EDIT_SESSION_DISCOUNTS,Te.ALLOW_ORDER_WITH_OTHER_USER,Te.ORDER_HISTORY_PAGE],WAITER:[Te.TABLE_MANAGEMENT_PAGE,Te.SWITCH_ORDER_SESSION,Te.TRANSFER_ITEMS,Te.PRINT_ITEMS_KITCHEN,Te.ALLOW_ORDER_WITH_OTHER_USER],ACCOUNTANT:[Te.FISCAL_PAGES,Te.ISSUE_TAX_INVOICE]};function d0(){const e=at(({auth:a})=>
136a.user.user?.permissions),t=at(({auth:a})=>a.user.role),r=u.useRef(null),n=u.useMemo(()=>!r0(e,r.current)&&e?(r.current=e,e):r.current,[e]),i=u.useCallback(a=>t==="OWNER"?!0:typeof a!="string"&&!Array.isArray(a)||!n?.length?!1:Array.isArray(a)?a.some(o=>n.includes(o)):!!n.includes(a),[n,t]);return u.useMemo(()=>({hasUserPermissions:i}),[i])}const ogt="@cweb_zapzap_api_access_token",sgt="@cweb_zapzap_api_refresh_token",qer="BAILEYS",jer="META";var B9,Hse;function lgt(){if(Hse)return B9;Hse=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return B9=e,B9}var z9,Use;function cgt(){if(Use)return z9;Use=1;var e=p_();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,s=e(r),l=n!==void 0,c=n===null,d=n===n,f=e(n);if(!c&&!f&&!s&&r>n||s&&l&&d&&!c&&!f||a&&l&&d||!i&&d||!o)return 1;if(!a&&!s&&!f&&r<n||f&&i&&o&&!a&&!s||c&&i&&o||!l&&o||!d)return-1}return 0}return z9=t,z9}var H9,Vse;function ugt(){if(Vse)return H9;Vse=1;var e=cgt();function t(r,n,i){for(var a=-1,o=r.criteria,s=n.criteria,l=o.length,c=i.length;++a<l;){var d=e(o[a],s[a]);if(d){if(a>=c)return d;var f=i[a];return d*(f=="desc"?-1:1)}}return r.index-n.index}return H9=t,H9}var U9,qse;function JTe(){if(qse)return U9;qse=1;var e=qd(),t=qx(),r=ms(),n=iEe(),i=lgt(),a=Jg(),o=ugt(),s=C_(),l=co();function c(d,f,h){f.length?f=e(f,function(_){return l(_)?function(b){return t(b,_.length===1?_[0]:_)}:_}):f=[s];var p=-1;f=e(f,a(r));var g=n(d,function(_,b,E){var S=e(f,function(P){return P(_)});return{criteria:S,index:++p,value:_}});return i(g,function(_,b){return o(_,b,h)})}return U9=c,U9}var V9,jse;function dgt(){if(jse)return V9;jse=1;var e=x_(),t=JTe(),r=bm(),n=n5(),i=r(function(a,o){if(a==null)return[];var s=o.length;return s>1&&n(a,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return V9=i,V9}var fgt=dgt();const F1=et(fgt),aR="[USER] SET APP LAYOUT",eAe="[USER] SET DATA",hgt="[USER] REMOVE DATA",tAe="[USER] LOGGED OUT",pgt="[USER] TOGGLE ACTIVE COMPANY",rAe="[USER] SET USER PUSH NOTIFICATION TOKEN",mgt={ADMIN:"/contas",SELLER:"/recebimentos",CW_MANAGER:"/contas",AFFILIATE_PARTNER:"/parceiro/estabelecimentos",OWNER:"/analise-vendas",MANAGER:"/analise-vendas",EMPLOYEE:"/latest-orders",WAITER:"/mesas",RESELLER:"/contas",ACCOUNTANT:"/fiscal/configuracoes"},vgt=[{perm:Te.PERFORMANCE_PAGES,path:"/analise-vendas"},{perm:Te.LAST_ORDERS_PAGE,path:"/latest-orders"},{perm:Te.TABLE_MANAGEMENT_PAGE,path:"/mesas"},{perm:Te.FISCAL_PAGES,path:"/fiscal/configuracoes"},{perm:Te.CASH_FLOW_PAGE,path:"/caixa"},{perm:Te.ORDER_HISTORY_PAGE,path:"/pedidos"},{perm:Te.COMPANY_MANAGEMENT_PAGES,path:"/profile"},{perm:Te.CATALOG_PAGES,path:"/cardapio/produtos"},{perm:Te.STOCK_PAGES,path:"/estoque/meu_estoque"},{perm:Te.DELIVERY_MANAGEMENT_PAGES,path:"/entrega-taxas"},{perm:Te.DISCOUNT_COUPONS_PAGE,path:"cupons"},{perm:Te.LOYALTY_PAGES,path:"/fidelidade/dashboard"},{perm:Te.CLIENT_MANAGEMENT_PAGE,path:"/clientes"},{perm:Te.FEEDBACK_PAGE,path:"/avaliacoes"},{perm:Te.DEBT_BOOK_PAGES,path:"/fiado/dashboard"},{perm:Te.MARKETING_PAGES,path:"/marketing/whatsapp"},{perm:Te.SETTINGS_PAGES,path:"/configuracoes/geral"},{perm:Te.KDS,path:"/kds"},{perm:Te.FINANCIAL_REVENUE_TRANSACTIONS,path:"/financeiro/lancamentos"},{perm:Te.FINANCIAL_EXPENSE_TRANSACTIONS,path:"/financeiro/lancamentos"},{perm:Te.FINANCIAL_CASH_FLOW,path:"/financeiro/fluxo-caixa"},{perm:Te.FINANCIAL_REVENUE_ANALYSIS,path:"/financeiro/analise-recebimentos"},{perm:Te.FINANCIAL_EXPENSE_ANALYSIS,path:"/financeiro/analise-pagamentos"},{perm:Te.FINANCIAL_ACCOUNTS_MANAGEMENT,path:"/financeiro/configuracoes/contas"},{perm:Te.FINANCIAL_CATEGORIES_MANAGEMENT,path:"/financeiro/configuracoes/categorias"},{perm:Te.FINANCIAL_COST_CENTERS_MANAGEMENT,path:"/financeiro/configuracoes/centros-de-custo"},{perm:Te.FINANCIAL_SUPPLIERS_MANAGEMENT,path:"/financeiro/configuracoes/fornecedores"},{perm:Te.FINANCIAL_PAYMENT_METHODS_MANAGEMENT,path:"/financeiro/configuracoes/formas-de-pagamento"}],ggt=[{perm:Kn.ACCOUNTS,path:"/contas"},{perm:Kn.SUBSCRIPTION_COUPONS,path:"/organizacao-cupons"},{perm:Kn.PLANS_AND_MODULES,path:"/planos-modulos/planos"},{perm:Kn.SUBSCRIPTION_CUSTOM_FIELDS,path:"/campos-personalizados-assinatura"},{perm:Kn.AFFILIATE_PARTNER,path:"/parceiros"}];function ygt(e){return mgt[e]}function _gt(e){return vgt.find(({perm:r})=>e.includes(r))?.path||"/"}
136function bgt(e){return ggt.find(({perm:r})=>e.includes(r))?.path||"/"}function Egt(e){return e.permissions?.length>0?_gt(e.permissions):e.internal_permissions?.length>0?bgt(e.internal_permissions):ygt(e.profile)}function nAe(e){return async t=>{const r=localStorage.getItem("active_company_id");let n=null;if(e.companies.length>0){const a=F1(e.companies,"id"),s=e?.selected_company_id||r||a[0]?.id;n=a.find(l=>l.id===parseInt(s)),n&&(localStorage.setItem("active_company_id",s),ht.defaults.headers.common.CompanyId=s,zZ({companyId:s,companyName:n.name}))}else zZ(null);const i=Egt(e);ac.location.state={...ac.location.state,redirectUserUrl:i},t({type:eAe,user:{...e,companies:F1(e.companies,"id")},activeCompany:n}),n&&await t(Wj())}}function wgt(){return async(e,t)=>{const r=t().auth.user;if(!r.role||r.role.length===0||!Jz.beginLogout())return null;try{if(!!!qi.getTmpAccessToken()){const i=qi.getRefreshTokenId();try{await ht.put(`/api/v1/authentication/logout/${r.user.id}`,{refresh_token_id:i})}catch{}}try{await(await Zt(async()=>{const{default:a}=await import("./index-D1ivZSoG.js");return{default:a}},[])).default.signOutSession()}catch{}qi.logout(),sessionStorage.removeItem(ogt),sessionStorage.removeItem(sgt),localStorage.removeItem("active_company_id"),e({type:tAe}),ac.push({pathname:"/"}),window.location.reload(!0)}finally{Jz.reset()}}}function $er(e){return(t,r)=>{const n=r().auth.user;if(!n.role||n.role.length===0||!n.user.companies||n.user.companies.length===0||n.user.companies.filter(i=>i.id===e).length!==1)return null;localStorage.setItem("active_company_id",e),window.location.reload(!0)}}function Wer(){return e=>{const t=window.location.host.split(".").slice(1).join(".");return ht.get("/api/v1/layout",{params:{origin_domain:t}}).then(n=>{n.status===200?(e({type:aR,payload:{kind:"reseller",...n.data}}),n.data.name&&(window.document.querySelector("title").text=n.data.name),(n.data.favicon||n.data.image)&&(window.document.querySelector('link[rel="shortcut icon"]').href=n.data.favicon||n.data.image)):e({type:aR,payload:{kind:"default"}})}).catch(()=>e({type:aR,payload:{kind:"default"}}))}}function Ger(e){return{type:rAe,payload:e}}let Ob=null;function Sgt(){delete ht.defaults.headers.common[Fi.authHeaderKey]}function Cgt(e=""){return e.includes("/api/v2/auth/token")||e.includes("/api/v2/auth/proxy_token")}async function UU(){if(qi.getTmpAccessToken())return null;const e=qi.getRefreshToken();return e?VP(e)?Ob||(Ob=(async()=>{Sgt();try{const t=await IEe(e);return qi.set(t.access_token,t.refresh_token),t.access_token}catch(t){const r=qi.getAccessToken();throw r&&qi.setHeader(r),t.response?.status===401&&qi.resetRefreshToken(),t}finally{Ob=null}})(),Ob):(qi.resetRefreshToken(),null):null}function xgt(e){if(!e)return!1;const t=s5(e),r=Date.now()/1e3;return t.exp-r<Fi.tokenExpirationThreshold}async function Tgt(){if(qi.getTmpAccessToken())return!1;const e=qi.getAccessToken();if(!qi.getRefreshToken()||!xgt(e))return!1;try{await UU()}catch{}return!0}function Agt(e){const t=e&&!qi.getTmpAccessToken();Ll(t?"refresh_token":null,Tgt,{refreshInterval:Fi.tokenRefreshInterval,dedupingInterval:Math.round(Fi.tokenRefreshInterval/2),revalidateOnReconnect:!0,revalidateOnFocus:!0,refreshWhenHidden:!0,shouldRetryOnError:!1})}function Pgt(){const e=new URLSearchParams(ac.location.search),t=e.get(Fi.userEmailQueryParamKey);return t&&(e.delete(Fi.userEmailQueryParamKey),ac.replace({search:e.toString()})),t}function Rgt(e){const t=Lr(),r=at(({auth:d})=>d.user.user),[n,i]=x.useState("configuring"),a=An();Agt(n==="authenticated");const o=x.useCallback(d=>{t.error(d.response?.data?.message||"Erro ao se conectar ao servidor")},[t]),s=x.useCallback(async d=>{if(!d)return!0;try{const f=await kEe(d);return qi.setTmp(f.access_token),!0}catch(f){o(f)}return!1},[o]),l=x.useCallback(async()=>{const d=qi.getTmpAccessToken();if(d&&VP(d))return qi.setHeader(d),!0;d&&qi.resetTmp();const f=qi.getAccessToken();if(f&&VP(f))return qi.setHeader(f),!0;f&&qi.reset();const h=qi.getRefreshToken();if(h&&VP(h))try{return await UU(),!0}catch(p){return o(p),!1}return h&&qi.resetRefreshToken(),!1},[o]),c=x.useCallback(async()=>{a(Kvt());const d=Pgt();if(await l()){await s(d);try{const h=await o5();dG(h),await a(nAe(h)),i("authenticated")}catch(h){h.response?.status===401&&(qi.getTmpAccessToken()?qi.resetTmp():qi.reset()),i("unauthenticated"),o(h)}}else i("unauthenticated");a(Yvt())},[a,o,l,s]);return x.useEffect(()=>{n==="configuring"&&c()},[c,n]),x.useEffect(()=>{i(r?"authenticated":d=>d==="configuring"?d:"unauthenticated")},[r]),x.useEffect(()=>{const d=ht.interceptors.response.use(f=>f,async f=>{const h=f,p=h.config;if(h?.response?.status!==401||!p)return Promise.reject(h);const g=p.url??"";if(Cgt(g)||g.includes("/authentication/logout")||ac.location.pathname==="/logout"||Jz.isInProgress())return Promise.reject(h);if(p._retry)return ac.push("/logout"),Promise.reject(h);p._retry=!0;try{const _=await UU();return _?(p.headers=p.headers||{},p.headers[Fi.authHeaderKey]=_,ht(p)):(ac.push("/logout"),Promise.reject(h))}catch(_){return _?.response?.status===401&&ac.push("/logout"),Promise.reject(h)}});return()=>{ht.interceptors.response.eject(d)}},[]),n==="configuring"?u.createElement(v0,null):u.createElement(u.Fragment,null,e.children)}function VU(e,t,r){return r===void 0&&(r=[]),e.some(function(n){var i=n.path?Vx(t,n):r.length?r[r.length-1].match:S_.computeRootMatch(t);return i&&(r.push({route:n,match:i}),n.routes&&VU(n.routes,t,r)),i}),r}function Ker(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),e?u.createElement(YYe,r,e.map(function(n,i){return u.createElement(WYe,{key:n.key||i,path:n.path,exact:n.exact,strict:n.strict,render:function(o){return n.render?n.render(ve({},o,{},t,{route:n})):u.createElement(n.component,ve({},o,t,{route:n}))}})})):null}function $se(e,t,r,n){const{auth:i,userPermissions:a,userRolePermissions:o}=n;if(!me.hasPermission(i,e))return!1;const l=me.hasPermission(Ye.admins,e),d=me.hasPermission(Ye.owner,e)||me.hasPermission(a,t),f=l||me.hasPermission(o,r);return d&&f}class iAe extends x.Component{constructor(t,r){super(t);const{routes:n}=r;this.state={accessGranted:!0,routes:n}}componentDidMount(){this.state.accessGranted||this.redirectRoute()}componentDidUpdate(){this.state.accessGranted||this.redirectRoute()}static getDerivedStateFromProps(t,r){const{location:n,userRole:i,userPermissions:a,userRolePermissions:o,companyAvailableModules:s}=t,{pathname:l}=n,c=VU(r.routes,l)[0];if(c){const d=me.hasPermission(c.route.modules,s),f=$se(i,a,o,c.route);return{accessGranted:d&&f}}return{accessGranted:!0}}
136shouldComponentUpdate(t,r){return r.accessGranted!==this.state.accessGranted}redirectRoute(){const{location:t,userRole:r,history:n,userPermissions:i,userRolePermissions:a,companyAvailableModules:o}=this.props,{pathname:s,state:l}=t,c=l?.redirectUrl||"/",d=l?.redirectUserUrl||"/error-404",f=VU(this.state.routes,c)[0],h=!o||me.hasPermission(f.route.modules,o),p=$se(r,i,a,f.route);!r||r.length===0?n.push({pathname:"/login",state:{redirectUrl:s}}):p&&h?n.push({pathname:c}):n.push({pathname:d})}render(){return this.state.accessGranted?u.createElement(u.Fragment,null,this.props.children):null}}function Ogt({auth:e,globalCompany:t}){return{userRole:e.user.role,userPermissions:e.user.user?.permissions,userRolePermissions:e.user.user?.internal_permissions,companyAvailableModules:t.company?.available_features}}iAe.contextType=$1e;const Igt=XYe(Bbe(Ogt)(iAe));function r4(e,t){return function(){return null}}function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function q9(e){return e&&Nl(e)==="object"&&e.constructor===Object}function vh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?ve({},e):e;return q9(e)&&q9(t)&&Object.keys(t).forEach(function(i){i!=="__proto__"&&(q9(t[i])&&i in e?n[i]=vh(e[i],t[i],r):n[i]=t[i])}),n}var aAe=r4(xe.element);aAe.isRequired=r4(xe.element.isRequired);const kgt=r4();function Ngt(e,t){if(Nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oAe(e){var t=Ngt(e,"string");return Nl(t)=="symbol"?t:t+""}function Nt(e,t,r){return(t=oAe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dgt(e){return e}function Rg(e){for(var t="https://mui.com/production-error/?code="+e,r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}var Mgt=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Lgt(e){var t="".concat(e).match(Mgt),r=t&&t[1];return r||""}function sAe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.displayName||e.name||Lgt(e)||t}function Wse(e,t,r){var n=sAe(t);return e.displayName||(n!==""?"".concat(r,"(").concat(n,")"):r)}function Fgt(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return sAe(e,"Component");if(Nl(e)==="object")switch(e.$$typeof){case Hz.ForwardRef:return Wse(e,e.render,"ForwardRef");case Hz.Memo:return Wse(e,e.type,"memo");default:return}}}function Bgt(e,t,r,n,i){return null}const zgt=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();var Hgt=xe.oneOfType([xe.func,xe.object]);const Ugt=Object.freeze(Object.defineProperty({__proto__:null,HTMLElementType:Bgt,chainPropTypes:r4,deepmerge:vh,elementAcceptingRef:aAe,elementTypeAcceptingRef:kgt,exactProp:Dgt,formatMuiErrorMessage:Rg,getDisplayName:Fgt,ponyfillGlobal:zgt,refType:Hgt},Symbol.toStringTag,{value:"Module"}));function fG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,e),r)}function Vgt(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&r[0].length===1&&(r=r.map(function(n){return n+n})),r?"rgb".concat(r.length===4?"a":"","(").concat(r.map(function(n,i){return i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3}).join(", "),")"):""}function qgt(e){e=Og(e);var t=e,r=t.values,n=r[0],i=r[1]/100,a=r[2]/100,o=i*Math.min(a,1-a),s=function(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(f+n/30)%12;return a-o*Math.max(Math.min(h-3,9-h,1),-1)},l="rgb",c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(r[3])),n4({type:l,values:c})}function Og(e){if(e.type)return e;if(e.charAt(0)==="#")return Og(Vgt(e));var t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla"].indexOf(r)===-1)throw new Error(Rg(3,e));var n=e.substring(t+1,e.length-1).split(",");return n=n.map(function(i){return parseFloat(i)}),{type:r,values:n}}function n4(e){var t=e.type,r=e.values;return t.indexOf("rgb")!==-1?r=r.map(function(n,i){return i<3?parseInt(n,10):n}):t.indexOf("hsl")!==-1&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function jgt(e,t){var r=qU(e),n=qU(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function qU(e){e=Og(e);var t=e.type==="hsl"?Og(qgt(e)).values:e.values;return t=t.map(function(r){return r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}
136),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function _v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return qU(e)>.5?Ig(e,t):kg(e,t)}function $gt(e,t){return Jn(e,t)}function Jn(e,t){return e=Og(e),t=fG(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.values[3]=t,n4(e)}function Ig(e,t){if(e=Og(e),t=fG(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)e.values[r]*=1-t;return n4(e)}function kg(e,t){if(e=Og(e),t=fG(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return n4(e)}function Mt(e,t){if(e==null)return{};var r,n,i=Yr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var ks=["xs","sm","md","lg","xl"];function Wgt(e){var t=e.values,r=t===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,i=n===void 0?"px":n,a=e.step,o=a===void 0?5:a,s=Mt(e,["values","unit","step"]);function l(p){var g=typeof r[p]=="number"?r[p]:p;return"@media (min-width:".concat(g).concat(i,")")}function c(p){var g=ks.indexOf(p)+1,_=r[ks[g]];if(g===ks.length)return l("xs");var b=typeof _=="number"&&g>0?_:p;return"@media (max-width:".concat(b-o/100).concat(i,")")}function d(p,g){var _=ks.indexOf(g);return _===ks.length-1?l(p):"@media (min-width:".concat(typeof r[p]=="number"?r[p]:p).concat(i,") and ")+"(max-width:".concat((_!==-1&&typeof r[ks[_+1]]=="number"?r[ks[_+1]]:g)-o/100).concat(i,")")}function f(p){return d(p,p)}function h(p){return r[p]}return ve({keys:ks,values:r,up:l,down:c,between:d,only:f,width:h},s)}function Ggt(e,t,r){var n;return ve({gutters:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",`
137      paddingLeft: theme.spacing(2),
138      paddingRight: theme.spacing(2),
139      [theme.breakpoints.up('sm')]: {
140        paddingLeft: theme.spacing(3),
141        paddingRight: theme.spacing(3),
142      },
143      `].join(`
144`)),ve({paddingLeft:t(2),paddingRight:t(2)},a,Nt({},e.up("sm"),ve({paddingLeft:t(3),paddingRight:t(3)},a[e.up("sm")])))},toolbar:(n={minHeight:56},Nt(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Nt(n,e.up("sm"),{minHeight:64}),n)},r)}var Gse={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:sC.white,default:Q3[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},j9={text:{primary:sC.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Q3[800],default:"#303030"},action:{active:sC.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Kse(e,t,r,n){var i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=kg(e.main,i):t==="dark"&&(e.dark=Ig(e.main,a)))}function Kgt(e){var t=e.primary,r=t===void 0?{light:zP[300],main:zP[500],dark:zP[700]}:t,n=e.secondary,i=n===void 0?{light:BP.A200,main:BP.A400,dark:BP.A700}:n,a=e.error,o=a===void 0?{light:FP[300],main:FP[500],dark:FP[700]}:a,s=e.warning,l=s===void 0?{light:HP[300],main:HP[500],dark:HP[700]}:s,c=e.info,d=c===void 0?{light:hS[300],main:hS[500],dark:hS[700]}:c,f=e.success,h=f===void 0?{light:pS[300],main:pS[500],dark:pS[700]}:f,p=e.type,g=p===void 0?"light":p,_=e.contrastThreshold,b=_===void 0?3:_,E=e.tonalOffset,S=E===void 0?.2:E,P=Mt(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function O(F){var B=jgt(F,j9.text.primary)>=b?j9.text.primary:Gse.text.primary;return B}var I=function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(B=ve({},B),!B.main&&B[V]&&(B.main=B[V]),!B.main)throw new Error(Rg(4,V));if(typeof B.main!="string")throw new Error(Rg(5,JSON.stringify(B.main)));return Kse(B,"light",W,S),Kse(B,"dark",$,S),B.contrastText||(B.contrastText=O(B.main)),B},N={dark:j9,light:Gse}
144,M=vh(ve({common:sC,type:g,primary:I(r),secondary:I(i,"A400","A200","A700"),error:I(o),warning:I(l),info:I(d),success:I(h),grey:Q3,contrastThreshold:b,getContrastText:O,augmentColor:I,tonalOffset:S},N[g]),P);return M}function lAe(e){return Math.round(e*1e5)/1e5}function Ygt(e){return lAe(e)}var Yse={textTransform:"uppercase"},Xse='"Roboto", "Helvetica", "Arial", sans-serif';function Xgt(e,t){var r=typeof t=="function"?t(e):t,n=r.fontFamily,i=n===void 0?Xse:n,a=r.fontSize,o=a===void 0?14:a,s=r.fontWeightLight,l=s===void 0?300:s,c=r.fontWeightRegular,d=c===void 0?400:c,f=r.fontWeightMedium,h=f===void 0?500:f,p=r.fontWeightBold,g=p===void 0?700:p,_=r.htmlFontSize,b=_===void 0?16:_,E=r.allVariants,S=r.pxToRem,P=Mt(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),O=o/14,I=S||function(F){return"".concat(F/b*O,"rem")},N=function(B,V,W,$,X){return ve({fontFamily:i,fontWeight:B,fontSize:I(V),lineHeight:W},i===Xse?{letterSpacing:"".concat(lAe($/V),"em")}:{},X,E)},M={h1:N(l,96,1.167,-1.5),h2:N(l,60,1.2,-.5),h3:N(d,48,1.167,0),h4:N(d,34,1.235,.25),h5:N(d,24,1.334,0),h6:N(h,20,1.6,.15),subtitle1:N(d,16,1.75,.15),subtitle2:N(h,14,1.57,.1),body1:N(d,16,1.5,.15),body2:N(d,14,1.43,.15),button:N(h,14,1.75,.4,Yse),caption:N(d,12,1.66,.4),overline:N(d,12,2.66,1,Yse)};return vh(ve({htmlFontSize:b,pxToRem:I,round:Ygt,fontFamily:i,fontSize:o,fontWeightLight:l,fontWeightRegular:d,fontWeightMedium:h,fontWeightBold:g},M),P,{clone:!1})}var Zgt=.2,Qgt=.14,Jgt=.12;function ka(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(Zgt,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(Qgt,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(Jgt,")")].join(",")}var e0t=["none",ka(0,2,1,-1,0,1,1,0,0,1,3,0),ka(0,3,1,-2,0,2,2,0,0,1,5,0),ka(0,3,3,-2,0,3,4,0,0,1,8,0),ka(0,2,4,-1,0,4,5,0,0,1,10,0),ka(0,3,5,-1,0,5,8,0,0,1,14,0),ka(0,3,5,-1,0,6,10,0,0,1,18,0),ka(0,4,5,-2,0,7,10,1,0,2,16,1),ka(0,5,5,-3,0,8,10,1,0,3,14,2),ka(0,5,6,-3,0,9,12,1,0,3,16,2),ka(0,6,6,-3,0,10,14,1,0,4,18,3),ka(0,6,7,-4,0,11,15,1,0,4,20,3),ka(0,7,8,-4,0,12,17,2,0,5,22,4),ka(0,7,8,-4,0,13,19,2,0,5,24,4),ka(0,7,9,-4,0,14,21,2,0,5,26,4),ka(0,8,9,-5,0,15,22,2,0,6,28,5),ka(0,8,10,-5,0,16,24,2,0,6,30,5),ka(0,8,11,-5,0,17,26,2,0,6,32,5),ka(0,9,11,-5,0,18,28,2,0,7,34,6),ka(0,9,12,-6,0,19,29,2,0,7,36,6),ka(0,10,13,-6,0,20,31,3,0,8,38,7),ka(0,10,13,-6,0,21,33,3,0,8,40,7),ka(0,10,14,-6,0,22,35,3,0,8,42,7),ka(0,11,14,-7,0,23,36,3,0,9,44,8),ka(0,11,15,-7,0,24,38,3,0,9,46,8)],t0t={borderRadius:4};function jU(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r0t(e){if(Array.isArray(e))return jU(e)}function n0t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hG(e,t){if(e){if(typeof e=="string")return jU(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jU(e,t):void 0}}function i0t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c2(e){return r0t(e)||n0t(e)||hG(e)||i0t()}function mI(e,t){return t?vh(e,t,{clone:!1}):e}var a0t={xs:0,sm:600,md:960,lg:1280,xl:1920},Zse={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(a0t[t],"px)")}};function cAe(e,t,r){if(Array.isArray(t)){var n=e.theme.breakpoints||Zse;return t.reduce(function(o,s,l){return o[n.up(n.keys[l])]=r(t[l]),o},{})}if(Nl(t)==="object"){var i=e.theme.breakpoints||Zse;return Object.keys(t).reduce(function(o,s){return o[i.up(s)]=r(t[s]),o},{})}var a=r(t);return a}function Qse(e,t){return!t||typeof t!="string"?null:t.split(".").reduce(function(r,n){return r&&r[n]?r[n]:null},e)}function Mr(e){var t=e.prop,r=e.cssProperty,n=r===void 0?e.prop:r,i=e.themeKey,a=e.transform,o=function(l){if(l[t]==null)return null;var c=l[t],d=l.theme,f=Qse(d,i)||{},h=function(g){var _;return typeof f=="function"?_=f(g):Array.isArray(f)?_=f[g]||g:(_=Qse(f,g)||g,a&&(_=a(_))),n===!1?_:Nt({},n,_)};return cAe(l,c,h)};return o.propTypes={},o.filterProps=[t],o}function Ph(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=function(a){return t.reduce(function(o,s){var l=s(a);return l?mI(o,l):o},{})};return n.propTypes={},n.filterProps=t.reduce(function(i,a){return i.concat(a.filterProps)},[]),n}function u2(e){return typeof e!="number"?e:"".concat(e,"px solid")}var o0t=Mr({prop:"border",themeKey:"borders",transform:u2}),s0t=Mr({prop:"borderTop",themeKey:"borders",transform:u2}),l0t=Mr({prop:"borderRight",themeKey:"borders",transform:u2}),c0t=Mr({prop:"borderBottom",themeKey:"borders",transform:u2}),u0t=Mr({prop:"borderLeft",themeKey:"borders",transform:u2}),d0t=Mr({prop:"borderColor",themeKey:"palette"}),f0t=Mr({prop:"borderRadius",themeKey:"shape"}),h0t=Ph(o0t,s0t,l0t,c0t,u0t,d0t,f0t);function Jse(e,t){var r={};return Object.keys(e).forEach(function(n){t.indexOf(n)===-1&&(r[n]=e[n])}),r}function p0t(e){var t=function(n){var i=e(n);return n.css?ve({},mI(i,e(ve({theme:n.theme},n.css))),Jse(n.css,[e.filterProps])):n.sx?ve({},mI(i,e(ve({theme:n.theme},n.sx))),Jse(n.sx,[e.filterProps])):i};return t.propTypes={},t.filterProps=["css","sx"].concat(c2(e.filterProps)),t}var m0t=Mr({prop:"displayPrint",cssProperty:!1,transform:function(t){return{"@media print":{display:t}}}}),v0t=Mr({prop:"display"}),g0t=Mr({prop:"overflow"}),y0t=Mr({prop:"textOverflow"}),_0t=Mr({prop:"visibility"}),b0t=Mr({prop:"whiteSpace"});const E0t=Ph(m0t,v0t,g0t,y0t,_0t,b0t);var w0t=Mr({prop:"flexBasis"}),S0t=Mr({prop:"flexDirection"}),C0t=Mr({prop:"flexWrap"}),x0t=Mr({prop:"justifyContent"}),T0t=Mr({prop:"alignItems"}),A0t=Mr({prop:"alignContent"}),P0t=Mr({prop:"order"}),R0t=Mr({prop:"flex"}),O0t=Mr({prop:"flexGrow"}),I0t=Mr({prop:"flexShrink"}
145),k0t=Mr({prop:"alignSelf"}),N0t=Mr({prop:"justifyItems"}),D0t=Mr({prop:"justifySelf"}),M0t=Ph(w0t,S0t,C0t,x0t,T0t,A0t,P0t,R0t,O0t,I0t,k0t,N0t,D0t),L0t=Mr({prop:"gridGap"}),F0t=Mr({prop:"gridColumnGap"}),B0t=Mr({prop:"gridRowGap"}),z0t=Mr({prop:"gridColumn"}),H0t=Mr({prop:"gridRow"}),U0t=Mr({prop:"gridAutoFlow"}),V0t=Mr({prop:"gridAutoColumns"}),q0t=Mr({prop:"gridAutoRows"}),j0t=Mr({prop:"gridTemplateColumns"}),$0t=Mr({prop:"gridTemplateRows"}),W0t=Mr({prop:"gridTemplateAreas"}),G0t=Mr({prop:"gridArea"}),K0t=Ph(L0t,F0t,B0t,z0t,H0t,U0t,V0t,q0t,j0t,$0t,W0t,G0t),Y0t=Mr({prop:"color",themeKey:"palette"}),X0t=Mr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),Z0t=Ph(Y0t,X0t),Q0t=Mr({prop:"position"}),J0t=Mr({prop:"zIndex",themeKey:"zIndex"}),eyt=Mr({prop:"top"}),tyt=Mr({prop:"right"}),ryt=Mr({prop:"bottom"}),nyt=Mr({prop:"left"});const iyt=Ph(Q0t,J0t,eyt,tyt,ryt,nyt);var ayt=Mr({prop:"boxShadow",themeKey:"shadows"});function Nm(e){return e<=1?"".concat(e*100,"%"):e}var oyt=Mr({prop:"width",transform:Nm}),syt=Mr({prop:"maxWidth",transform:Nm}),lyt=Mr({prop:"minWidth",transform:Nm}),cyt=Mr({prop:"height",transform:Nm}),uyt=Mr({prop:"maxHeight",transform:Nm}),dyt=Mr({prop:"minHeight",transform:Nm});Mr({prop:"size",cssProperty:"width",transform:Nm});Mr({prop:"size",cssProperty:"height",transform:Nm});var fyt=Mr({prop:"boxSizing"}),hyt=Ph(oyt,syt,lyt,cyt,uyt,dyt,fyt);function pyt(e){if(Array.isArray(e))return e}function myt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function vyt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
146In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zo(e,t){return pyt(e)||myt(e,t)||hG(e,t)||vyt()}function gyt(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var yyt={m:"margin",p:"padding"},_yt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ele={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},byt=gyt(function(e){if(e.length>2)if(ele[e])e=ele[e];else return[e];var t=e.split(""),r=Zo(t,2),n=r[0],i=r[1],a=yyt[n],o=_yt[i]||"";return Array.isArray(o)?o.map(function(s){return a+s}):[a+o]}),uAe=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function dAe(e){var t=e.spacing||8;return typeof t=="number"?function(r){return t*r}:Array.isArray(t)?function(r){return t[r]}:typeof t=="function"?t:function(){}}function Eyt(e,t){if(typeof t=="string"||t==null)return t;var r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:"-".concat(n)}function wyt(e,t){return function(r){return e.reduce(function(n,i){return n[i]=Eyt(t,r),n},{})}}function pG(e){var t=e.theme,r=dAe(t);return Object.keys(e).map(function(n){if(uAe.indexOf(n)===-1)return null;var i=byt(n),a=wyt(i,r),o=e[n];return cAe(e,o,a)}).reduce(mI,{})}pG.propTypes={};pG.filterProps=uAe;var Syt=Mr({prop:"fontFamily",themeKey:"typography"}),Cyt=Mr({prop:"fontSize",themeKey:"typography"}),xyt=Mr({prop:"fontStyle",themeKey:"typography"}),Tyt=Mr({prop:"fontWeight",themeKey:"typography"}),Ayt=Mr({prop:"letterSpacing"}),Pyt=Mr({prop:"lineHeight"}),Ryt=Mr({prop:"textAlign"}),Oyt=Ph(Syt,Cyt,xyt,Tyt,Ayt,Pyt,Ryt);function Iyt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(e.mui)return e;var t=dAe({spacing:e}),r=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return a.length===0?t(1):a.length===1?t(a[0]):a.map(function(s){if(typeof s=="string")return s;var l=t(s);return typeof l=="number"?"".concat(l,"px"):l}).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return e}}),r.mui=!0,r}
146var tle={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},fc={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function rle(e){return"".concat(Math.round(e),"ms")}const kyt={easing:tle,duration:fc,create:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.duration,i=n===void 0?fc.standard:n,a=r.easing,o=a===void 0?tle.easeInOut:a,s=r.delay,l=s===void 0?0:s;return Mt(r,["duration","easing","delay"]),(Array.isArray(t)?t:[t]).map(function(c){return"".concat(c," ").concat(typeof i=="string"?i:rle(i)," ").concat(o," ").concat(typeof l=="string"?l:rle(l))}).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var r=t/36;return Math.round((4+15*Math.pow(r,.25)+r/5)*10)}};var fAe={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function hAe(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.breakpoints,r=t===void 0?{}:t,n=e.mixins,i=n===void 0?{}:n,a=e.palette,o=a===void 0?{}:a,s=e.spacing,l=e.typography,c=l===void 0?{}:l,d=Mt(e,["breakpoints","mixins","palette","spacing","typography"]),f=Kgt(o),h=Wgt(r),p=Iyt(s),g=vh({breakpoints:h,direction:"ltr",mixins:Ggt(h,p,i),overrides:{},palette:f,props:{},shadows:e0t,typography:Xgt(f,c),spacing:p,shape:t0t,transitions:kyt,zIndex:fAe},d),_=arguments.length,b=new Array(_>1?_-1:0),E=1;E<_;E++)b[E-1]=arguments[E];return g=b.reduce(function(S,P){return vh(S,P)},g),g}var Nyt=typeof Symbol=="function"&&Symbol.for;const pAe=Nyt?Symbol.for("mui.nested"):"__THEME_NESTED__";var Dyt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function mAe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.disableGlobal,r=t===void 0?!1:t,n=e.productionPrefix,i=n===void 0?"jss":n,a=e.seed,o=a===void 0?"":a,s=o===""?"":"".concat(o,"-"),l=0,c=function(){return l+=1,l};return function(d,f){var h=f.options.name;if(h&&h.indexOf("Mui")===0&&!f.options.link&&!r){if(Dyt.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var p="".concat(s).concat(h,"-").concat(d.key);return!f.options.theme[pAe]||o!==""?p:"".concat(p,"-").concat(c())}return"".concat(s).concat(i).concat(c())}}function i4(e){var t=e.theme,r=e.name,n=e.props;if(!t||!t.props||!t.props[r])return n;var i=t.props[r],a;for(a in i)n[a]===void 0&&(n[a]=i[a]);return n}var nle=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d2=(typeof window>"u"?"undefined":nle(window))==="object"&&(typeof document>"u"?"undefined":nle(document))==="object"&&document.nodeType===9;function ile(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oAe(n.key),n)}}function kn(e,t,r){return t&&ile(e.prototype,t),r&&ile(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Myt={}.constructor;function $U(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map($U);if(e.constructor!==Myt)return e;var t={};for(var r in e)t[r]=$U(e[r]);return t}function mG(e,t,r){e===void 0&&(e="unnamed");var n=r.jss,i=$U(t),a=n.plugins.onCreateRule(e,i,r);return a||(e[0],null)}var ale=function(t,r){for(var n="",i=0;i<t.length&&t[i]!=="!important";i++)n&&(n+=r),n+=t[i];return n},Yv=function(t){if(!Array.isArray(t))return t;var r="";if(Array.isArray(t[0]))for(var n=0;n<t.length&&t[n]!=="!important";n++)r&&(r+=", "),r+=ale(t[n]," ");else r=ale(t,", ");return t[t.length-1]==="!important"&&(r+=" !important"),r};function H_(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
147`,space:" "}}function Ib(e,t){for(var r="",n=0;n<t;n++)r+="  ";return r+e}function zC(e,t,r){r===void 0&&(r={});var n="";if(!t)return n;var i=r,a=i.indent,o=a===void 0?0:a,s=t.fallbacks;r.format===!1&&(o=-1/0);var l=H_(r),c=l.linebreak,d=l.space;if(e&&o++,s)if(Array.isArray(s))for(var f=0;f<s.length;f++){var h=s[f];for(var p in h){var g=h[p];g!=null&&(n&&(n+=c),n+=Ib(p+":"+d+Yv(g)+";",o))}}else for(var _ in s){var b=s[_];b!=null&&(n&&(n+=c),n+=Ib(_+":"+d+Yv(b)+";",o))}for(var E in t){var S=t[E];S!=null&&E!=="fallbacks"&&(n&&(n+=c),n+=Ib(E+":"+d+Yv(S)+";",o))}return!n&&!r.allowEmpty||!e?n:(o--,n&&(n=""+c+n+c),Ib(""+e+d+"{"+n,o)+Ib("}",o))}var Lyt=/([[\].#*$><+~=|^:(),"'`\s])/g,ole=typeof CSS<"u"&&CSS.escape,vG=(function(e){return ole?ole(e):e.replace(Lyt,"\\$1")}),vAe=(function(){function e(r,n,i){this.type="style",this.isProcessed=!1;var a=i.sheet,o=i.Renderer;this.key=r,this.options=i,this.style=n,a?this.renderer=a.renderer:o&&
147(this.renderer=new o)}var t=e.prototype;return t.prop=function(n,i,a){if(i===void 0)return this.style[n];var o=a?a.force:!1;if(!o&&this.style[n]===i)return this;var s=i;(!a||a.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,n,this));var l=s==null||s===!1,c=n in this.style;if(l&&!c&&!o)return this;var d=l&&c;if(d?delete this.style[n]:this.style[n]=s,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,s),this;var f=this.options.sheet;return f&&f.attached,this},e})(),WU=(function(e){Qo(t,e);function t(n,i,a){var o;o=e.call(this,n,i,a)||this;var s=a.selector,l=a.scoped,c=a.sheet,d=a.generateId;return s?o.selectorText=s:l!==!1&&(o.id=d(Cr(Cr(o)),c),o.selectorText="."+vG(o.id)),o}var r=t.prototype;return r.applyTo=function(i){var a=this.renderer;if(a){var o=this.toJSON();for(var s in o)a.setProperty(i,s,o[s])}return this},r.toJSON=function(){var i={};for(var a in this.style){var o=this.style[a];typeof o!="object"?i[a]=o:Array.isArray(o)&&(i[a]=Yv(o))}return i},r.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,s=o?ve({},i,{allowEmpty:!0}):i;return zC(this.selectorText,this.style,s)},kn(t,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var a=this.renderer,o=this.renderable;if(!(!o||!a)){var s=a.setSelector(o,i);s||a.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),t})(vAe),Fyt={onCreateRule:function(t,r,n){return t[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new WU(t,r,n)}},$9={indent:1,children:!0},Byt=/@([\w-]+)/,zyt=(function(){function e(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var a=r.match(Byt);this.at=a?a[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new a4(ve({},i,{parent:this}));for(var o in n)this.rules.add(o,n[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(n){return this.rules.get(n)},t.indexOf=function(n){return this.rules.indexOf(n)},t.addRule=function(n,i,a){var o=this.rules.add(n,i,a);return o?(this.options.jss.plugins.onProcessRule(o),o):null},t.replaceRule=function(n,i,a){var o=this.rules.replace(n,i,a);return o&&this.options.jss.plugins.onProcessRule(o),o},t.toString=function(n){n===void 0&&(n=$9);var i=H_(n),a=i.linebreak;if(n.indent==null&&(n.indent=$9.indent),n.children==null&&(n.children=$9.children),n.children===!1)return this.query+" {}";var o=this.rules.toString(n);return o?this.query+" {"+a+o+a+"}":""},e})(),Hyt=/@container|@media|@supports\s+/,Uyt={onCreateRule:function(t,r,n){return Hyt.test(t)?new zyt(t,r,n):null}},W9={indent:1,children:!0},Vyt=/@keyframes\s+([\w-]+)/,GU=(function(){function e(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var a=r.match(Vyt);a&&a[1]?this.name=a[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var o=i.scoped,s=i.sheet,l=i.generateId;this.id=o===!1?this.name:vG(l(this,s)),this.rules=new a4(ve({},i,{parent:this}));for(var c in n)this.rules.add(c,n[c],ve({},i,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(n){n===void 0&&(n=W9);var i=H_(n),a=i.linebreak;if(n.indent==null&&(n.indent=W9.indent),n.children==null&&(n.children=W9.children),n.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(n);return o&&(o=""+a+o+a),this.at+" "+this.id+" {"+o+"}"},e})(),qyt=/@keyframes\s+/,jyt=/\$([\w-]+)/g,KU=function(t,r){return typeof t=="string"?t.replace(jyt,function(n,i){return i in r?r[i]:n}):t},sle=function(t,r,n){var i=t[r],a=KU(i,n);a!==i&&(t[r]=a)},$yt={onCreateRule:function(t,r,n){return typeof t=="string"&&qyt.test(t)?new GU(t,r,n):null},onProcessStyle:function(t,r,n){return r.type!=="style"||!n||("animation-name"in t&&sle(t,"animation-name",n.keyframes),"animation"in t&&sle(t,"animation",n.keyframes)),t},onChangeValue:function(t,r,n){var i=n.options.sheet;if(!i)return t;switch(r){case"animation":return KU(t,i.keyframes);case"animation-name":return KU(t,i.keyframes);default:return t}}},Wyt=(function(e){Qo(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,s=o?ve({},i,{allowEmpty:!0}):i;return zC(this.key,this.style,s)},t})(vAe),Gyt={onCreateRule:function(t,r,n){return n.parent&&n.parent.type==="
147keyframes"?new Wyt(t,r,n):null}},Kyt=(function(){function e(r,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var t=e.prototype;return t.toString=function(n){var i=H_(n),a=i.linebreak;if(Array.isArray(this.style)){for(var o="",s=0;s<this.style.length;s++)o+=zC(this.at,this.style[s]),this.style[s+1]&&(o+=a);return o}return zC(this.at,this.style,n)},e})(),Yyt=/@font-face/,Xyt={onCreateRule:function(t,r,n){return Yyt.test(t)?new Kyt(t,r,n):null}},Zyt=(function(){function e(r,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var t=e.prototype;return t.toString=function(n){return zC(this.key,this.style,n)},e})(),Qyt={onCreateRule:function(t,r,n){return t==="@viewport"||t==="@-ms-viewport"?new Zyt(t,r,n):null}},Jyt=(function(){function e(r,n,i){this.type="simple",this.isProcessed=!1,this.key=r,this.value=n,this.options=i}var t=e.prototype;return t.toString=function(n){if(Array.isArray(this.value)){for(var i="",a=0;a<this.value.length;a++)i+=this.key+" "+this.value[a]+";",this.value[a+1]&&(i+=`
148`);return i}return this.key+" "+this.value+";"},e})(),e1t={"@charset":!0,"@import":!0,"@namespace":!0},t1t={onCreateRule:function(t,r,n){return t in e1t?new Jyt(t,r,n):null}},lle=[Fyt,Uyt,$yt,Gyt,Xyt,Qyt,t1t],r1t={process:!0},cle={force:!0,process:!0},a4=(function(){function e(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var t=e.prototype;return t.add=function(n,i,a){var o=this.options,s=o.parent,l=o.sheet,c=o.jss,d=o.Renderer,f=o.generateId,h=o.scoped,p=ve({classes:this.classes,parent:s,sheet:l,jss:c,Renderer:d,generateId:f,scoped:h,name:n,keyframes:this.keyframes,selector:void 0},a),g=n;n in this.raw&&(g=n+"-d"+this.counter++),this.raw[g]=i,g in this.classes&&(p.selector="."+vG(this.classes[g]));var _=mG(g,i,p);if(!_)return null;this.register(_);var b=p.index===void 0?this.index.length:p.index;return this.index.splice(b,0,_),_},t.replace=function(n,i,a){var o=this.get(n),s=this.index.indexOf(o);o&&this.remove(o);var l=a;return s!==-1&&(l=ve({},a,{index:s})),this.add(n,i,l)},t.get=function(n){return this.map[n]},t.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},t.indexOf=function(n){return this.index.indexOf(n)},t.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},t.register=function(n){this.map[n.key]=n,n instanceof WU?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof GU&&this.keyframes&&(this.keyframes[n.name]=n.id)},t.unregister=function(n){delete this.map[n.key],n instanceof WU?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof GU&&delete this.keyframes[n.name]},t.update=function(){var n,i,a;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],a=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],a=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.get(n),i,a);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],i,a)},t.updateOne=function(n,i,a){a===void 0&&(a=r1t);var o=this.options,s=o.jss.plugins,l=o.sheet;if(n.rules instanceof e){n.rules.update(i,a);return}var c=n.style;if(s.onUpdate(i,n,l,a),a.process&&c&&c!==n.style){s.onProcessStyle(n.style,n,l);for(var d in n.style){var f=n.style[d],h=c[d];f!==h&&n.prop(d,f,cle)}for(var p in c){var g=n.style[p],_=c[p];g==null&&g!==_&&n.prop(p,null,cle)}}},t.toString=function(n){for(var i="",a=this.options.sheet,o=a?a.options.link:!1,s=H_(n),l=s.linebreak,c=0;c<this.index.length;c++){var d=this.index[c],f=d.toString(n);!f&&!o||(i&&(i+=l),i+=f)}return i},e})(),gAe=(function(){function e(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=ve({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new a4(this.options);for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(n,i,a){var o=this.queue;
148this.attached&&!o&&(this.queue=[]);var s=this.rules.add(n,i,a);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(o?o.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},t.replaceRule=function(n,i,a){var o=this.rules.get(n);if(!o)return this.addRule(n,i,a);var s=this.rules.replace(n,i,a);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?o.renderable&&this.renderer.replaceRule(o.renderable,s):this.renderer.deleteRule(o)),s):(this.deployed=!1,s)},t.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},t.addRules=function(n,i){var a=[];for(var o in n){var s=this.addRule(o,n[o],i);s&&a.push(s)}return a},t.getRule=function(n){return this.rules.get(n)},t.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},t.indexOf=function(n){return this.rules.indexOf(n)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},t.updateOne=function(n,i,a){return this.rules.updateOne(n,i,a),this},t.toString=function(n){return this.rules.toString(n)},e})(),n1t=(function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(n,i,a){for(var o=0;o<this.registry.onCreateRule.length;o++){var s=this.registry.onCreateRule[o](n,i,a);if(s)return s}return null},t.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,a=0;a<this.registry.onProcessRule.length;a++)this.registry.onProcessRule[a](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},t.onProcessStyle=function(n,i,a){for(var o=0;o<this.registry.onProcessStyle.length;o++)i.style=this.registry.onProcessStyle[o](i.style,i,a)},t.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},t.onUpdate=function(n,i,a,o){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](n,i,a,o)},t.onChangeValue=function(n,i,a){for(var o=n,s=0;s<this.registry.onChangeValue.length;s++)o=this.registry.onChangeValue[s](o,i,a);return o},t.use=function(n,i){i===void 0&&(i={queue:"external"});var a=this.plugins[i.queue];a.indexOf(n)===-1&&(a.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,s){for(var l in s)l in o&&o[l].push(s[l]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e})(),i1t=(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(n){var i=this.registry,a=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||a>=this.index){i.push(n);return}for(var o=0;o<i.length;o++)if(i[o].options.index>a){i.splice(o,0,n);return}}},t.reset=function(){this.registry=[]},t.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},t.toString=function(n){for(var i=n===void 0?{}:n,a=i.attached,o=Yr(i,["attached"]),s=H_(o),l=s.linebreak,c="",d=0;d<this.registry.length;d++){var f=this.registry[d];a!=null&&f.attached!==a||(c&&(c+=l),c+=f.toString(o))}return c},kn(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e})(),RS=new i1t,YU=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),XU="2f1acc6c3a606b082e5eef5e54414ffb";YU[XU]==null&&(YU[XU]=0);var ule=YU[XU]++,dle=function(t){t===void 0&&(t={});var r=0,n=function(a,o){r+=1;var s="",l="";return o&&(o.options.classNamePrefix&&(l=o.options.classNamePrefix),o.options.jss.id!=null&&(s=String(o.options.jss.id))),t.minify?""+(l||"c")+ule+s+r:l+a.key+"-"+ule+(s?"-"+s:"")+"-"+r};return n},yAe=function(t){var r;return function(){return r||(r=t()),r}},a1t=function(t,r){try{return t.attributeStyleMap?t.attributeStyleMap.get(r):t.style.getPropertyValue(r)}catch{return""}},o1t=function(t,r,n){try{var i=n;
148if(Array.isArray(n)&&(i=Yv(n)),t.attributeStyleMap)t.attributeStyleMap.set(r,i);else{var a=i?i.indexOf("!important"):-1,o=a>-1?i.substr(0,a-1):i;t.style.setProperty(r,o,a>-1?"important":"")}}catch{return!1}return!0},s1t=function(t,r){try{t.attributeStyleMap?t.attributeStyleMap.delete(r):t.style.removeProperty(r)}catch{}},l1t=function(t,r){return t.selectorText=r,t.selectorText===r},_Ae=yAe(function(){return document.querySelector("head")});function c1t(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.attached&&n.options.index>t.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}function u1t(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}function d1t(e){for(var t=_Ae(),r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(n.nodeType===8&&n.nodeValue.trim()===e)return n}return null}function f1t(e){var t=RS.registry;if(t.length>0){var r=c1t(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=u1t(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&typeof n=="string"){var i=d1t(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function h1t(e,t){var r=t.insertionPoint,n=f1t(t);if(n!==!1&&n.parent){n.parent.insertBefore(e,n.node);return}if(r&&typeof r.nodeType=="number"){var i=r,a=i.parentNode;a&&a.insertBefore(e,i.nextSibling);return}_Ae().appendChild(e)}var p1t=yAe(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),fle=function(t,r,n){try{"insertRule"in t?t.insertRule(r,n):"appendRule"in t&&t.appendRule(r)}catch{return!1}return t.cssRules[n]},hle=function(t,r){var n=t.cssRules.length;return r===void 0||r>n?n:r},m1t=function(){var t=document.createElement("style");return t.textContent=`
149`,t},v1t=(function(){function e(r){this.getPropertyValue=a1t,this.setProperty=o1t,this.removeProperty=s1t,this.setSelector=l1t,this.hasInsertedRules=!1,this.cssRules=[],r&&RS.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,a=n.meta,o=n.element;this.element=o||m1t(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),a&&this.element.setAttribute("data-meta",a);var s=p1t();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){h1t(this.element,this.sheet.options);var n=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
150`)}},t.deploy=function(){var n=this.sheet;if(n){if(n.options.link){this.insertRules(n.rules);return}this.element.textContent=`
151`+n.toString()+`
152`}},t.insertRules=function(n,i){for(var a=0;a<n.index.length;a++)this.insertRule(n.index[a],a,i)},t.insertRule=function(n,i,a){if(a===void 0&&(a=this.element.sheet),n.rules){var o=n,s=a;if(n.type==="conditional"||n.type==="keyframes"){var l=hle(a,i);if(s=fle(a,o.toString({children:!1}),l),s===!1)return!1;this.refCssRule(n,l,s)}return this.insertRules(o.rules,s),s}var c=n.toString();if(!c)return!1;var d=hle(a,i),f=fle(a,c,d);return f===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(n,d,f),f)},t.refCssRule=function(n,i,a){n.renderable=a,n.options.parent instanceof gAe&&this.cssRules.splice(i,0,a)},t.deleteRule=function(n){var i=this.element.sheet,a=this.indexOf(n);return a===-1?!1:(i.deleteRule(a),this.cssRules.splice(a,1),!0)},t.indexOf=function(n){return this.cssRules.indexOf(n)},t.replaceRule=function(n,i){var a=this.indexOf(n);return a===-1?!1:(this.element.sheet.deleteRule(a),this.cssRules.splice(a,1),this.insertRule(i,a))},t.getRules=function(){return this.element.sheet.cssRules},e})(),g1t=0,y1t=(function(){function e(r){this.id=g1t++,this.version="10.10.0",this.plugins=new n1t,this.options={id:{minify:!1},createGenerateId:dle,Renderer:d2?v1t:null,plugins:[]},this.generateId=dle({minify:!1});for(var n=0;n<lle.length;n++)this.plugins.use(lle[n],{queue:"internal"});this.setup(r)}var t=e.prototype;return t.setup=function(n){return n===void 0&&(n={}),n.createGenerateId&&(this.options.createGenerateId=n.createGenerateId),n.id&&(this.options.id=ve({},this.options.id,n.id)),(n.createGenerateId||n.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),n.insertionPoint!=null&&(this.options.insertionPoint=n.insertionPoint),"Renderer"in n&&(this.options.Renderer=n.Ren
152derer),n.plugins&&this.use.apply(this,n.plugins),this},t.createStyleSheet=function(n,i){i===void 0&&(i={});var a=i,o=a.index;typeof o!="number"&&(o=RS.index===0?0:RS.index+1);var s=new gAe(n,ve({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:o}));return this.plugins.onProcessSheet(s),s},t.removeStyleSheet=function(n){return n.detach(),RS.remove(n),this},t.createRule=function(n,i,a){if(i===void 0&&(i={}),a===void 0&&(a={}),typeof n=="object")return this.createRule(void 0,n,i);var o=ve({},a,{name:n,jss:this,Renderer:this.options.Renderer});o.generateId||(o.generateId=this.generateId),o.classes||(o.classes={}),o.keyframes||(o.keyframes={});var s=mG(n,i,o);return s&&this.plugins.onProcessRule(s),s},t.use=function(){for(var n=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return a.forEach(function(s){n.plugins.use(s)}),this},e})(),o4=function(t){return new y1t(t)},gG=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function bAe(e){var t=null;for(var r in e){var n=e[r],i=typeof n;if(i==="function")t||(t={}),t[r]=n;else if(i==="object"&&n!==null&&!Array.isArray(n)){var a=bAe(n);a&&(t||(t={}),t[r]=a)}}return t}o4();var EAe=Date.now(),G9="fnValues"+EAe,K9="fnStyle"+ ++EAe,_1t=function(){return{onCreateRule:function(r,n,i){if(typeof n!="function")return null;var a=mG(r,{},i);return a[K9]=n,a},onProcessStyle:function(r,n){if(G9 in n||K9 in n)return r;var i={};for(var a in r){var o=r[a];typeof o=="function"&&(delete r[a],i[a]=o)}return n[G9]=i,r},onUpdate:function(r,n,i,a){var o=n,s=o[K9];s&&(o.style=s(r)||{});var l=o[G9];if(l)for(var c in l)o.prop(c,l[c](r),a)}}},jp="@global",ZU="@global ",b1t=(function(){function e(r,n,i){this.type="global",this.at=jp,this.isProcessed=!1,this.key=r,this.options=i,this.rules=new a4(ve({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(n){return this.rules.get(n)},t.addRule=function(n,i,a){var o=this.rules.add(n,i,a);return o&&this.options.jss.plugins.onProcessRule(o),o},t.replaceRule=function(n,i,a){var o=this.rules.replace(n,i,a);return o&&this.options.jss.plugins.onProcessRule(o),o},t.indexOf=function(n){return this.rules.indexOf(n)},t.toString=function(n){return this.rules.toString(n)},e})(),E1t=(function(){function e(r,n,i){this.type="global",this.at=jp,this.isProcessed=!1,this.key=r,this.options=i;var a=r.substr(ZU.length);this.rule=i.jss.createRule(a,n,ve({},i,{parent:this}))}var t=e.prototype;return t.toString=function(n){return this.rule?this.rule.toString(n):""},e})(),w1t=/\s*,\s*/g;function wAe(e,t){for(var r=e.split(w1t),n="",i=0;i<r.length;i++)n+=t+" "+r[i].trim(),r[i+1]&&(n+=", ");return n}function S1t(e,t){var r=e.options,n=e.style,i=n?n[jp]:null;if(i){for(var a in i)t.addRule(a,i[a],ve({},r,{selector:wAe(a,e.selector)}));delete n[jp]}}function C1t(e,t){var r=e.options,n=e.style;for(var i in n)if(!(i[0]!=="@"||i.substr(0,jp.length)!==jp)){var a=wAe(i.substr(jp.length),e.selector);t.addRule(a,n[i],ve({},r,{selector:a})),delete n[i]}}function x1t(){function e(r,n,i){if(!r)return null;if(r===jp)return new b1t(r,n,i);if(r[0]==="@"&&r.substr(0,ZU.length)===ZU)return new E1t(r,n,i);var a=i.parent;return a&&(a.type==="global"||a.options.parent&&a.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=r),null}function t(r,n){r.type!=="style"||!n||(S1t(r,n),C1t(r,n))}return{onCreateRule:e,onProcessRule:t}}var ple=/\s*,\s*/g,T1t=/&/g,A1t=/\$([\w-]+)/g;function P1t(){function e(i,a){return function(o,s){var l=i.getRule(s)||a&&a.getRule(s);return l?l.selector:s}}function t(i,a){for(var o=a.split(ple),s=i.split(ple),l="",c=0;c<o.length;c++)for(var d=o[c],f=0;f<s.length;f++){var h=s[f];l&&(l+=", "),l+=h.indexOf("&")!==-1?h.replace(T1t,d):d+" "+h}return l}function r(i,a,o){if(o)return ve({},o,{index:o.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var l=ve({},i.options,{nestingLevel:s,index:a.indexOf(i)+1});return delete l.name,l}function n(i,a,o){if(a.type!=="style")return i;var s=a,l=s.options.parent,c,d;for(var f in i){var h=f.indexOf("&")!==-1,p=f[0]==="@";if(!(!h&&!p)){if(c=r(s,l,c),h){var g=t(f,s.selector);d||(d=e(l,o)),g=g.replace(A1t,d);var _=s.key+"-"+f;"replaceRule"in l?l.replaceRule(_,i[f],ve({},c,{selector:g})):l.addRule(_,i[f],ve({},c,{selector:g}))}else p&&l.addRule(f,{},c).addRule(s.key,i[f],{selector:s.selector});delete i[f]}}return i}return{onProcessStyle:n}}var R1t=/[A-Z]/g,O1t=/^ms-/,Y9={};function I1t(e){return"-"+e.toLowerCase()}function SAe(e){if(Y9.hasOwnProperty(e))return Y9[e];var t=e.replace(R1t,I1t);return Y9[e]=O1t.test(t)?"-"+t:t}function vI(e){var t={};for(var r in e){var n=r.indexOf("--")===0?r:SAe(r);t[n]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(vI):t.fallbacks=vI(e.fallbacks)),t}function k1t(){function e(r){if(Array.isArray(r)){for(var n=0;n<r.length;n++)r[n]=vI(r[n]);return r}return vI(r)}function t(r,n,i){if(n.indexOf("--")===0)return r;var a=SAe(n);return n===a?r:(i.prop(a,r),null)}
152return{onProcessStyle:e,onChangeValue:t}}var Ot=gG&&CSS?CSS.px:"px",OA=gG&&CSS?CSS.ms:"ms",j0=gG&&CSS?CSS.percent:"%",N1t={"animation-delay":OA,"animation-duration":OA,"background-position":Ot,"background-position-x":Ot,"background-position-y":Ot,"background-size":Ot,border:Ot,"border-bottom":Ot,"border-bottom-left-radius":Ot,"border-bottom-right-radius":Ot,"border-bottom-width":Ot,"border-left":Ot,"border-left-width":Ot,"border-radius":Ot,"border-right":Ot,"border-right-width":Ot,"border-top":Ot,"border-top-left-radius":Ot,"border-top-right-radius":Ot,"border-top-width":Ot,"border-width":Ot,"border-block":Ot,"border-block-end":Ot,"border-block-end-width":Ot,"border-block-start":Ot,"border-block-start-width":Ot,"border-block-width":Ot,"border-inline":Ot,"border-inline-end":Ot,"border-inline-end-width":Ot,"border-inline-start":Ot,"border-inline-start-width":Ot,"border-inline-width":Ot,"border-start-start-radius":Ot,"border-start-end-radius":Ot,"border-end-start-radius":Ot,"border-end-end-radius":Ot,margin:Ot,"margin-bottom":Ot,"margin-left":Ot,"margin-right":Ot,"margin-top":Ot,"margin-block":Ot,"margin-block-end":Ot,"margin-block-start":Ot,"margin-inline":Ot,"margin-inline-end":Ot,"margin-inline-start":Ot,padding:Ot,"padding-bottom":Ot,"padding-left":Ot,"padding-right":Ot,"padding-top":Ot,"padding-block":Ot,"padding-block-end":Ot,"padding-block-start":Ot,"padding-inline":Ot,"padding-inline-end":Ot,"padding-inline-start":Ot,"mask-position-x":Ot,"mask-position-y":Ot,"mask-size":Ot,height:Ot,width:Ot,"min-height":Ot,"max-height":Ot,"min-width":Ot,"max-width":Ot,bottom:Ot,left:Ot,top:Ot,right:Ot,inset:Ot,"inset-block":Ot,"inset-block-end":Ot,"inset-block-start":Ot,"inset-inline":Ot,"inset-inline-end":Ot,"inset-inline-start":Ot,"box-shadow":Ot,"text-shadow":Ot,"column-gap":Ot,"column-rule":Ot,"column-rule-width":Ot,"column-width":Ot,"font-size":Ot,"font-size-delta":Ot,"letter-spacing":Ot,"text-decoration-thickness":Ot,"text-indent":Ot,"text-stroke":Ot,"text-stroke-width":Ot,"word-spacing":Ot,motion:Ot,"motion-offset":Ot,outline:Ot,"outline-offset":Ot,"outline-width":Ot,perspective:Ot,"perspective-origin-x":j0,"perspective-origin-y":j0,"transform-origin":j0,"transform-origin-x":j0,"transform-origin-y":j0,"transform-origin-z":j0,"transition-delay":OA,"transition-duration":OA,"vertical-align":Ot,"flex-basis":Ot,"shape-margin":Ot,size:Ot,gap:Ot,grid:Ot,"grid-gap":Ot,"row-gap":Ot,"grid-row-gap":Ot,"grid-column-gap":Ot,"grid-template-rows":Ot,"grid-template-columns":Ot,"grid-auto-rows":Ot,"grid-auto-columns":Ot,"box-shadow-x":Ot,"box-shadow-y":Ot,"box-shadow-blur":Ot,"box-shadow-spread":Ot,"font-line-height":Ot,"text-shadow-x":Ot,"text-shadow-y":Ot,"text-shadow-blur":Ot};function CAe(e){var t=/(-[a-z])/g,r=function(o){return o[1].toUpperCase()},n={};for(var i in e)n[i]=e[i],n[i.replace(t,r)]=e[i];return n}var D1t=CAe(N1t);function OS(e,t,r){if(t==null)return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=OS(e,t[n],r);else if(typeof t=="object")if(e==="fallbacks")for(var i in t)t[i]=OS(i,t[i],r);else for(var a in t)t[a]=OS(e+"-"+a,t[a],r);else if(typeof t=="number"&&isNaN(t)===!1){var o=r[e]||D1t[e];return o&&!(t===0&&o===Ot)?typeof o=="function"?o(t).toString():""+t+o:t.toString()}return t}function M1t(e){e===void 0&&(e={});var t=CAe(e);function r(i,a){if(a.type!=="style")return i;for(var o in i)i[o]=OS(o,i[o],t);return i}function n(i,a){return OS(a,i,t)}return{onProcessStyle:r,onChangeValue:n}}var Qw="",QU="",xAe="",TAe="",L1t=d2&&"ontouchstart"in document.documentElement;if(d2){var X9={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},F1t=document.createElement("p"),Z9=F1t.style,B1t="Transform";for(var Q9 in X9)if(Q9+B1t in Z9){Qw=Q9,QU=X9[Q9];break}Qw==="Webkit"&&"msHyphens"in Z9&&(Qw="ms",QU=X9.ms,TAe="edge"),Qw==="Webkit"&&"-apple-trailing-word"in Z9&&(xAe="apple")}var Tn={js:Qw,css:QU,vendor:xAe,browser:TAe,isTouch:L1t};function z1t(e){return e[1]==="-"||Tn.js==="ms"?e:"@"+Tn.css+"keyframes"+e.substr(10)}var H1t={noPrefill:["appearance"],supportedProperty:function(t){return t!=="appearance"?!1:Tn.js==="ms"?"-webkit-"+t:Tn.css+t}},U1t={noPrefill:["color-adjust"],supportedProperty:function(t){return t!=="color-adjust"?!1:Tn.js==="Webkit"?Tn.css+"print-"+t:t}},V1t=/[-\s]+(.)?/g;function q1t(e,t){return t?t.toUpperCase():""}function yG(e){return e.replace(V1t,q1t)}function sm(e){return yG("-"+e)}var j1t={noPrefill:["mask"],supportedProperty:function(t,r){if(!/^mask/.test(t))return!1;if(Tn.js==="Webkit"){var n="mask-image";if(yG(n)in r)return t;if(Tn.js+sm(n)in r)return Tn.css+t}return t}},$1t={noPrefill:["text-orientation"],supportedProperty:function(t){return t!=="text-orientation"?!1:Tn.vendor==="apple"&&!Tn.isTouch?Tn.css+t:t}},W1t={noPrefill:["transform"],supportedProperty:function(t,r,n){return t!=="transform"?!1:n.transform?t:Tn.css+t}},G1t={noPrefill:["transition"],supportedProperty:function(t,r,n){return t!=="transition"?!1:n.transition?t:Tn.css+t}},K1t={noPrefill:["writing-mode"],supportedProperty:function(t){return t!=="writing-mode"?!1:Tn.js==="Webkit"||Tn.js==="ms"&&Tn.browser!=="edge"?Tn.css+t:t}},Y1t={noPrefill:["user-select"],supportedProperty:function(t){return t!=="user-select"?!1:Tn.js==="Moz"||Tn.js==="ms"||Tn.vendor==="apple"?Tn.css+t:t}},X1t={supportedProperty:function(t,r){if(!/^break-/.test(t))return!1;if(Tn.js==="Webkit"){var n="WebkitColumn"+sm(t);return n in r?Tn.css+"column-"+t:!1}if(Tn.js==="Moz"){var i="page"+sm(t);return i in r?"page-"+t:!1}return!1}},Z1t={supportedProperty:function(t,r){if(!/^(border|margin|padding)-inline/.test(t))return!1;if(Tn.js==="Moz")return t;var n=t.replace("-inline","");return Tn.js+sm(n)in r?Tn.css+n:!1}},Q1t={supportedProperty:function(t,r){return yG(t)in r?t:!1}},J1t={supportedProperty:function(t,r){var n=sm(t);return t[0]==="-"||t[0]==="-"&&t[1]==="-"?t:Tn.js+n in r?Tn.css+t:Tn.js!=="Webkit"&&"Webkit"+n in r?"-webkit-"+t:!1}}
152,e_t={supportedProperty:function(t){return t.substring(0,11)!=="scroll-snap"?!1:Tn.js==="ms"?""+Tn.css+t:t}},t_t={supportedProperty:function(t){return t!=="overscroll-behavior"?!1:Tn.js==="ms"?Tn.css+"scroll-chaining":t}},r_t={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},n_t={supportedProperty:function(t,r){var n=r_t[t];return n&&Tn.js+sm(n)in r?Tn.css+n:!1}},AAe={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},i_t=Object.keys(AAe),a_t=function(t){return Tn.css+t},o_t={supportedProperty:function(t,r,n){var i=n.multiple;if(i_t.indexOf(t)>-1){var a=AAe[t];if(!Array.isArray(a))return Tn.js+sm(a)in r?Tn.css+a:!1;if(!i)return!1;for(var o=0;o<a.length;o++)if(!(Tn.js+sm(a[0])in r))return!1;return a.map(a_t)}return!1}},PAe=[H1t,U1t,j1t,$1t,W1t,G1t,K1t,Y1t,X1t,Z1t,Q1t,J1t,e_t,t_t,n_t,o_t],mle=PAe.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),s_t=PAe.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,c2(t.noPrefill)),e},[]),Jw,Pv={};if(d2){Jw=document.createElement("p");var J9=window.getComputedStyle(document.documentElement,"");for(var eL in J9)isNaN(eL)||(Pv[J9[eL]]=J9[eL]);s_t.forEach(function(e){return delete Pv[e]})}function JU(e,t){if(t===void 0&&(t={}),!Jw)return e;if(Pv[e]!=null)return Pv[e];(e==="transition"||e==="transform")&&(t[e]=e in Jw.style);for(var r=0;r<mle.length&&(Pv[e]=mle[r](e,Jw.style,t),!Pv[e]);r++);try{Jw.style[e]=""}catch{return!1}return Pv[e]}var $0={},l_t={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},c_t=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,pp;function u_t(e,t,r){if(t==="var")return"var";if(t==="all")return"all";if(r==="all")return", all";var n=t?JU(t):", "+JU(r);return n||t||r}d2&&(pp=document.createElement("p"));function vle(e,t){var r=t;if(!pp||e==="content")return t;if(typeof r!="string"||!isNaN(parseInt(r,10)))return r;var n=e+r;if($0[n]!=null)return $0[n];try{pp.style[e]=r}catch{return $0[n]=!1,!1}if(l_t[e])r=r.replace(c_t,u_t);else if(pp.style[e]===""&&(r=Tn.css+r,r==="-ms-flex"&&(pp.style[e]="-ms-flexbox"),pp.style[e]=r,pp.style[e]===""))return $0[n]=!1,!1;return pp.style[e]="",$0[n]=r,$0[n]}function d_t(){function e(i){if(i.type==="keyframes"){var a=i;a.at=z1t(a.at)}}function t(i){for(var a in i){var o=i[a];if(a==="fallbacks"&&Array.isArray(o)){i[a]=o.map(t);continue}var s=!1,l=JU(a);l&&l!==a&&(s=!0);var c=!1,d=vle(l,Yv(o));d&&d!==o&&(c=!0),(s||c)&&(s&&delete i[a],i[l||a]=d||o)}return i}function r(i,a){return a.type!=="style"?i:t(i)}function n(i,a){return vle(a,Yv(i))||i}return{onProcessRule:e,onProcessStyle:r,onChangeValue:n}}function f_t(){var e=function(r,n){return r.length===n.length?r>n?1:-1:r.length-n.length};return{onProcessStyle:function(r,n){if(n.type!=="style")return r;for(var i={},a=Object.keys(r).sort(e),o=0;o<a.length;o++)i[a[o]]=r[a[o]];return i}}}function _G(){return{plugins:[_1t(),x1t(),P1t(),k1t(),M1t(),typeof window>"u"?null:d_t(),f_t()]}}function bG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.baseClasses,r=e.newClasses;if(e.Component,!r)return t;var n=ve({},t);return Object.keys(r).forEach(function(i){r[i]&&(n[i]="".concat(t[i]," ").concat(r[i]))}),n}var Ay={set:function(t,r,n,i){var a=t.get(r);a||(a=new Map,t.set(r,a)),a.set(n,i)},get:function(t,r,n){var i=t.get(r);return i?i.get(n):void 0},delete:function(t,r,n){var i=t.get(r);i.delete(n)}},RAe=u.createContext(null);function f0(){var e=u.useContext(RAe);return e}var h_t=o4(_G()),p_t=mAe(),m_t=new Map,v_t={disableGeneration:!1,generateClassName:p_t,jss:h_t,sheetsCache:null,sheetsManager:m_t,sheetsRegistry:null},eV=u.createContext(v_t),IA;function g_t(e){var t=e.children,r=e.injectFirst,n=r===void 0?!1:r,i=e.disableGeneration,a=i===void 0?!1:i,o=Mt(e,["children","injectFirst","disableGeneration"]),s=u.useContext(eV),l=ve({},s,{disableGeneration:a},o);if(!l.jss.options.insertionPoint&&n&&typeof window<"u"){if(!IA){var c=document.head;
152IA=document.createComment("mui-inject-first"),c.insertBefore(IA,c.firstChild)}l.jss=o4({plugins:_G().plugins,insertionPoint:IA})}return u.createElement(eV.Provider,{value:l},t)}var gle=-1e9;function y_t(){return gle+=1,gle}var __t={};function b_t(e){var t=typeof e=="function";return{create:function(n,i){var a;try{a=t?e(n):e}catch(l){throw l}if(!i||!n.overrides||!n.overrides[i])return a;var o=n.overrides[i],s=ve({},a);return Object.keys(o).forEach(function(l){s[l]=vh(s[l],o[l])}),s},options:{}}}function E_t(e,t,r){var n=e.state,i=e.stylesOptions;if(i.disableGeneration)return t||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var a=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,a=!0),t!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=t,a=!0),a&&(n.cacheClasses.value=bG({baseClasses:n.cacheClasses.lastJSS,newClasses:t,Component:r})),n.cacheClasses.value}function w_t(e,t){var r=e.state,n=e.theme,i=e.stylesOptions,a=e.stylesCreator,o=e.name;if(!i.disableGeneration){var s=Ay.get(i.sheetsManager,a,n);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Ay.set(i.sheetsManager,a,n,s));var l=ve({},a.options,i,{theme:n,flip:typeof i.flip=="boolean"?i.flip:n.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=i.sheetsRegistry;if(s.refs===0){var d;i.sheetsCache&&(d=Ay.get(i.sheetsCache,a,n));var f=a.create(n,o);d||(d=i.jss.createStyleSheet(f,ve({link:!1},l)),d.attach(),i.sheetsCache&&Ay.set(i.sheetsCache,a,n,d)),c&&c.add(d),s.staticSheet=d,s.dynamicStyles=bAe(f)}if(s.dynamicStyles){var h=i.jss.createStyleSheet(s.dynamicStyles,ve({link:!0},l));h.update(t),h.attach(),r.dynamicSheet=h,r.classes=bG({baseClasses:s.staticSheet.classes,newClasses:h.classes}),c&&c.add(h)}else r.classes=s.staticSheet.classes;s.refs+=1}}function S_t(e,t){var r=e.state;r.dynamicSheet&&r.dynamicSheet.update(t)}function C_t(e){var t=e.state,r=e.theme,n=e.stylesOptions,i=e.stylesCreator;if(!n.disableGeneration){var a=Ay.get(n.sheetsManager,i,r);a.refs-=1;var o=n.sheetsRegistry;a.refs===0&&(Ay.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),t.dynamicSheet&&(n.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function x_t(e,t){var r=u.useRef([]),n,i=u.useMemo(function(){return{}},t);r.current!==i&&(r.current=i,n=e()),u.useEffect(function(){return function(){n&&n()}},[i])}function Rh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.name,n=t.classNamePrefix,i=t.Component,a=t.defaultTheme,o=a===void 0?__t:a,s=Mt(t,["name","classNamePrefix","Component","defaultTheme"]),l=b_t(e),c=r||n||"makeStyles";l.options={index:y_t(),name:r,meta:c,classNamePrefix:c};var d=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=f0()||o,g=ve({},u.useContext(eV),s),_=u.useRef(),b=u.useRef();x_t(function(){var S={name:r,state:{},stylesCreator:l,stylesOptions:g,theme:p};return w_t(S,h),b.current=!1,_.current=S,function(){C_t(S)}},[p,l]),u.useEffect(function(){b.current&&S_t(_.current,h),b.current=!0});var E=E_t(_.current,h.classes,i);return E};return d}function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OAe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=OAe(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function yle(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=OAe(e))&&(n&&(n+=" "),n+=t);return n}function T_t(e,t){var r={};return Object.keys(e).forEach(function(n){t.indexOf(n)===-1&&(r[n]=e[n])}),r}function A_t(e){var t=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.name,o=Mt(i,["name"]),s=a,l=typeof n=="function"?function(h){return{root:function(g){return n(ve({theme:h},g))}}}:{root:n},c=Rh(l,ve({Component:e,name:a||e.displayName,classNamePrefix:s},o)),d;n.filterProps&&(d=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);var f=u.forwardRef(function(p,g){var _=p.children,b=p.className,E=p.clone,S=p.component,P=Mt(p,["children","className","clone","component"]),O=c(p),I=yle(O.root,b),N=P;if(d&&(N=T_t(N,d)),E)return u.cloneElement(_,ve({className:yle(_.props.className,I)},N));if(typeof _=="function")return _(ve({className:I},N));var M=S||e;return u.createElement(M,ve({ref:g,className:I},N),_)});return cg(f,e),f};return t}function P_t(e,t){if(typeof t=="function"){var r=t(e);return r}return ve({},e,t)}function R_t(e){var t=e.children,r=e.theme,n=f0(),i=u.useMemo(function(){var a=n===null?r:P_t(n,r);return a!=null&&(a[pAe]=n!==null),a},[r,n]);return u.createElement(RAe.Provider,{value:i},t)}var O_t=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(n){var i=r.defaultTheme,a=r.withTheme,o=a===void 0?!1:a,s=r.name,l=Mt(r,["defaultTheme","withTheme","name"]),c=s,d=Rh(t,ve({defaultTheme:i,Component:n,name:s||n.displayName,classNamePrefix:c},l)),f=u.forwardRef(function(p,g){p.classes;var _=p.innerRef,b=Mt(p,["classes","innerRef"]),E=d(ve({},n.defaultProps,p)),S,P=b;return(typeof s=="string"||o)&&(S=f0()||i,s&&(P=i4({theme:S,name:s,props:b})),o&&!P.theme&&(P.theme=S)),u.createElement(n,ve({ref:_||g,classes:E},P))});return cg(f,n),f}};function s4(e){return e}var l4=hAe();function Fl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Rh(e,ve({defaultTheme:l4},t))}var I_t=function(t){var r=A_t(t);return function(n,i){return r(n,ve({defaultTheme:l4},i))}};function ts(){var e=f0()||l4;return e}function yr(e,t){return O_t(e,ve({defaultTheme:l4},t))}function zr(e){if(typeof e!="string")throw new Error(Rg(7));return e.charAt(0).toUpperCase()+e.slice(1)}function gh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,i){return i==null?n:function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(this,s),i.apply(this,s)}},function(){})}function IAe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=IAe(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ut(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=IAe(e))&&(n&&(n+=" "),n+=t);return n}var k_t=function(t){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:t.typography.pxToRem(24),transition:t.transitions.create("fill",{duration:t.transitions.duration.shorter})},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(35)}}},kAe=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.color,s=o===void 0?"inherit":o,l=t.component,c=l===void 0?"svg":l,d=t.fontSize,f=d===void 0?"medium":d,h=t.htmlColor,p=t.titleAccess,g=t.viewBox,_=g===void 0?"0 0 24 24":g,b=Mt(t,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return x.createElement(c,ve({className:Ut(i.root,a,s!=="inherit"&&i["color".concat(zr(s))],f!=="default"&&f!=="medium"&&i["fontSize".concat(zr(f))]),focusable:"false",viewBox:_,color:h,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r},b),n,p?x.createElement("title",null,p):null)});kAe.muiName="SvgIcon";const HC=yr(k_t,{name:"MuiSvgIcon"})(kAe);function zo(e,t){var r=function(i,a){return u.createElement(HC,ve({ref:a},i),e)};return r.muiName=HC.muiName,u.memo(u.forwardRef(r))}function Ng(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:166,r;function n(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=this,l=function(){e.apply(s,a)};clearTimeout(r),r=setTimeout(l,t)}return n.clear=function(){clearTimeout(r)},n}function N_t(e,t){return function(){return null}}function IS(e,t){return x.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function ds(e){return e&&e.ownerDocument||document}function c4(e){var t=ds(e);return t.defaultView||window}function D_t(e){return function(){return null}}function yh(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function M_t(e,t,r,n,i){return null}function Rd(e){var t=e.controlled,r=e.default;e.name,e.state;var n=x.useRef(t!==void 0),i=n.current,a=x.useState(r),o=a[0],s=a[1],l=i?t:o,c=x.useCallback(function(d){i||s(d)},[]);return[l,c]}var L_t=typeof window<"u"?x.useLayoutEffect:x.useEffect;function ia(e){var t=x.useRef(e);return L_t(function(){t.current=e}),x.useCallback(function(){return t.current.apply(void 0,arguments)},[])}function mi(e,t){return x.useMemo(function(){return e==null&&t==null?null:function(r){yh(e,r),yh(t,r)}},[e,t])}function Dg(e){var t=x.useState(e),r=t[0],n=t[1],i=e||r;return x.useEffect(function(){r==null&&n("mui-".concat(Math.round(Math.random()*1e5)))},[r]),i}var u4=!0,tV=!1,_le=null,F_t={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 B_t(e){var t=e.type,r=e.tagName;return!!(r==="INPUT"&&F_t[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function z_t(e){e.metaKey||e.altKey||e.ctrlKey||(u4=!0)}function tL(){u4=!1}function H_t(){this.visibilityState==="hidden"&&tV&&(u4=!0)}function U_t(e){e.addEventListener("keydown",z_t,!0),e.addEventListener("mousedown",tL,!0),e.addEventListener("pointerdown",tL,!0),e.addEventListener("touchstart",tL,!0),e.addEventListener("visibilitychange",H_t,!0)}function V_t(e){var t=e.target;try{return t.matches(":focus-visible")}catch{}return u4||B_t(t)}function q_t(){tV=!0,window.clearTimeout(_le),_le=window.setTimeout(function(){tV=!1},100)}function f2(){var e=x.useCallback(function(t){var r=vo.findDOMNode(t);r!=null&&U_t(r.ownerDocument)},[]);return{isFocusVisible:V_t,onBlurVisible:q_t,ref:e}}
vendor: 4,754 bytes, line 152
152const j_t=Object.freeze(Object.defineProperty({__proto__:null,capitalize:zr,createChainedFunction:gh,createSvgIcon:zo,debounce:Ng,deprecatedPropType:N_t,isMuiElement:IS,ownerDocument:ds,ownerWindow:c4,requirePropFactory:D_t,setRef:yh,unstable_useId:Dg,unsupportedProp:M_t,useControlled:Rd,useEventCallback:ia,useForkRef:mi,useIsFocusVisible:f2},Symbol.toStringTag,{value:"Module"}));function $_t(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function W_t(e,t){e.classList?e.classList.add(t):$_t(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function ble(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function G_t(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=ble(e.className,t):e.setAttribute("class",ble(e.className&&e.className.baseVal||"",t))}const Ele={disabled:!1},gI=u.createContext(null);var NAe=function(t){return t.scrollTop},eS="unmounted",bv="exited",Ev="entering",hy="entered",rV="exiting",gc=(function(e){Qo(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=bv,a.appearStatus=Ev):l=hy:n.unmountOnExit||n.mountOnEnter?l=eS:l=bv,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===eS?{status:bv}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ev&&o!==hy&&(a=Ev):(o===Ev||o===hy)&&(a=rV)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Ev){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this);o&&NAe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bv&&this.setState({status:eS})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[vy.findDOMNode(this),s],c=l[0],d=l[1],f=this.getTimeouts(),h=s?f.appear:f.enter;if(!i&&!o||Ele.disabled){this.safeSetState({status:hy},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Ev},function(){a.props.onEntering(c,d),a.onTransitionEnd(h,function(){a.safeSetState({status:hy},function(){a.props.onEntered(c,d)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:vy.findDOMNode(this);if(!a||Ele.disabled){this.safeSetState({status:bv},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:rV},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:bv},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===eS)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=Yr(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return u.createElement(gI.Provider,{value:null},typeof o=="function"?o(i,s):u.cloneElement(u.Children.only(o),s))},t})(u.Component);gc.contextType=gI;gc.propTypes={};function W0(){}gc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
vendor: 3,306 bytes, line 152
152:!0,exit:!0,onEnter:W0,onEntering:W0,onEntered:W0,onExit:W0,onExiting:W0,onExited:W0};gc.UNMOUNTED=eS;gc.EXITED=bv;gc.ENTERING=Ev;gc.ENTERED=hy;gc.EXITING=rV;var K_t=function(t,r){return t&&r&&r.split(" ").forEach(function(n){return W_t(t,n)})},rL=function(t,r){return t&&r&&r.split(" ").forEach(function(n){return G_t(t,n)})},EG=(function(e){Qo(t,e);function t(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(s,l){var c=n.resolveArguments(s,l),d=c[0],f=c[1];n.removeClasses(d,"exit"),n.addClass(d,f?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(s,l)},n.onEntering=function(s,l){var c=n.resolveArguments(s,l),d=c[0],f=c[1],h=f?"appear":"enter";n.addClass(d,h,"active"),n.props.onEntering&&n.props.onEntering(s,l)},n.onEntered=function(s,l){var c=n.resolveArguments(s,l),d=c[0],f=c[1],h=f?"appear":"enter";n.removeClasses(d,h),n.addClass(d,h,"done"),n.props.onEntered&&n.props.onEntered(s,l)},n.onExit=function(s){var l=n.resolveArguments(s),c=l[0];n.removeClasses(c,"appear"),n.removeClasses(c,"enter"),n.addClass(c,"exit","base"),n.props.onExit&&n.props.onExit(s)},n.onExiting=function(s){var l=n.resolveArguments(s),c=l[0];n.addClass(c,"exit","active"),n.props.onExiting&&n.props.onExiting(s)},n.onExited=function(s){var l=n.resolveArguments(s),c=l[0];n.removeClasses(c,"exit"),n.addClass(c,"exit","done"),n.props.onExited&&n.props.onExited(s)},n.resolveArguments=function(s,l){return n.props.nodeRef?[n.props.nodeRef.current,s]:[s,l]},n.getClassNames=function(s){var l=n.props.classNames,c=typeof l=="string",d=c&&l?l+"-":"",f=c?""+d+s:l[s],h=c?f+"-active":l[s+"Active"],p=c?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:p}},n}var r=t.prototype;return r.addClass=function(i,a,o){var s=this.getClassNames(a)[o+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;a==="appear"&&o==="done"&&c&&(s+=" "+c),o==="active"&&i&&NAe(i),s&&(this.appliedClasses[a][o]=s,K_t(i,s))},r.removeClasses=function(i,a){var o=this.appliedClasses[a],s=o.base,l=o.active,c=o.done;this.appliedClasses[a]={},s&&rL(i,s),l&&rL(i,l),c&&rL(i,c)},r.render=function(){var i=this.props;i.classNames;var a=Yr(i,["classNames"]);return u.createElement(gc,ve({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(u.Component);EG.defaultProps={classNames:""};EG.propTypes={};function wG(e,t){var r=function(a){return t&&x.isValidElement(a)?t(a):a},n=Object.create(null);return e&&x.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function Y_t(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var o,s={};for(var l in t){if(n[l])for(o=0;o<n[l].length;o++){var c=n[l][o];s[n[l][o]]=r(c)}s[l]=r(l)}for(o=0;o<i.length;o++)s[i[o]]=r(i[o]);return s}function Fv(e,t,r){return r[t]!=null?r[t]:e.props[t]}function X_t(e,t){return wG(e.children,function(r){return x.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Fv(r,"appear",e),enter:Fv(r,"enter",e),exit:Fv(r,"exit",e)})})}function Z_t(e,t,r){var n=wG(e.children),i=Y_t(t,n);
152return Object.keys(i).forEach(function(a){var o=i[a];if(x.isValidElement(o)){var s=a in t,l=a in n,c=t[a],d=x.isValidElement(c)&&!c.props.in;l&&(!s||d)?i[a]=x.cloneElement(o,{onExited:r.bind(null,o),in:!0,exit:Fv(o,"exit",e),enter:Fv(o,"enter",e)}):!l&&s&&!d?i[a]=x.cloneElement(o,{in:!1}):l&&s&&x.isValidElement(c)&&(i[a]=x.cloneElement(o,{onExited:r.bind(null,o),in:c.props.in,exit:Fv(o,"exit",e),enter:Fv(o,"enter",e)}))}}),i}var Q_t=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},J_t={component:"div",childFactory:function(t){return t}},d4=(function(e){Qo(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=a.handleExited.bind(Cr(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,l=a.firstRender;return{children:l?X_t(i,s):Z_t(i,o,s),firstRender:!1}},r.handleExited=function(i,a){var o=wG(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var l=ve({},s.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=Yr(i,["component","childFactory"]),l=this.state.contextValue,c=Q_t(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?u.createElement(gI.Provider,{value:l},c):u.createElement(gI.Provider,{value:l},u.createElement(a,s,c))},t})(u.Component);d4.propTypes={};d4.defaultProps=J_t;var SG=function(t){return t.scrollTop};function lm(e,t){var r=e.timeout,n=e.style,i=n===void 0?{}:n;return{duration:i.transitionDuration||typeof r=="number"?r:r[t.mode]||0,delay:i.transitionDelay}}var ebt=function(t){return{root:{height:0,overflow:"hidden",transition:t.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}},DAe=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.collapsedHeight,s=t.collapsedSize,l=s===void 0?"0px":s,c=t.component,d=c===void 0?"div":c,f=t.disableStrictModeCompat,h=f===void 0?!1:f,p=t.in,g=t.onEnter,_=t.onEntered,b=t.onEntering,E=t.onExit,S=t.onExited,P=t.onExiting,O=t.style,I=t.timeout,N=I===void 0?fc.standard:I,M=t.TransitionComponent,F=M===void 0?gc:M,B=Mt(t,["children","classes","className","collapsedHeight","collapsedSize","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),V=ts(),W=x.useRef(),$=x.useRef(null),X=x.useRef(),re=typeof(o||l)=="number"?"".concat(o||l,"px"):o||l;x.useEffect(function(){return function(){clearTimeout(W.current)}},[]);var ae=V.unstable_strictMode&&!h,Q=x.useRef(null),ie=mi(r,ae?Q:void 0),le=function(Ne){return function(De,Ve){if(Ne){var Ke=ae?[Q.current,De]:[De,Ve],Qe=Zo(Ke,2),Ue=Qe[0],ut=Qe[1];ut===void 0?Ne(Ue):Ne(Ue,ut)}}},fe=le(function(pe,Ne){pe.style.height=re,g&&g(pe,Ne)}),de=le(function(pe,Ne){var De=$.current?$.current.clientHeight:0,Ve=lm({style:O,timeout:N},{mode:"enter"}),Ke=Ve.duration;if(N==="auto"){var Qe=V.transitions.getAutoHeightDuration(De);pe.style.transitionDuration="".concat(Qe,"ms"),X.current=Qe}else pe.style.transitionDuration=typeof Ke=="string"?Ke:"".concat(Ke,"ms");pe.style.height="".concat(De,"px"),b&&b(pe,Ne)}),ge=le(function(pe,Ne){pe.style.height="auto",_&&_(pe,Ne)}),Ae=le(function(pe){var Ne=$.current?$.current.clientHeight:0;pe.style.height="".concat(Ne,"px"),E&&E(pe)}),Fe=le(S),Pe=le(function(pe){var Ne=$.current?$.current.clientHeight:0,De=lm({style:O,timeout:N},{mode:"exit"}),Ve=De.duration;if(N==="auto"){var Ke=V.transitions.getAutoHeightDuration(Ne);pe.style.transitionDuration="".concat(Ke,"ms"),X.current=Ke}else pe.style.transitionDuration=typeof Ve=="string"?Ve:"".concat(Ve,"ms");pe.style.height=re,P&&P(pe)}),ce=function(Ne,De){var Ve=ae?Ne:De;N==="auto"&&(W.current=setTimeout(Ve,X.current||0))};return x.createElement(F,ve({in:p,onEnter:fe,onEntered:ge,onEntering:de,onExit:Ae,onExited:Fe,onExiting:Pe,addEndListener:ce,nodeRef:ae?Q:void 0,timeout:N==="auto"?null:N},B),function(pe,Ne){return x.createElement(d,ve({className:Ut(i.root,
152i.container,a,{entered:i.entered,exited:!p&&re==="0px"&&i.hidden}[pe]),style:ve({minHeight:re},O),ref:ie},Ne),x.createElement("div",{className:i.wrapper,ref:$},x.createElement("div",{className:i.wrapperInner},n)))})});DAe.muiSupportAuto=!0;const Oh=yr(ebt,{name:"MuiCollapse"})(DAe);var tbt=function(t){var r={};return t.shadows.forEach(function(n,i){r["elevation".concat(i)]={boxShadow:n}}),ve({root:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},rounded:{borderRadius:t.shape.borderRadius},outlined:{border:"1px solid ".concat(t.palette.divider)}},r)},rbt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?"div":a,s=t.square,l=s===void 0?!1:s,c=t.elevation,d=c===void 0?1:c,f=t.variant,h=f===void 0?"elevation":f,p=Mt(t,["classes","className","component","square","elevation","variant"]);return x.createElement(o,ve({className:Ut(n.root,i,h==="outlined"?n.outlined:n["elevation".concat(d)],!l&&n.rounded),ref:r},p))});const Qd=yr(tbt,{name:"MuiPaper"})(rbt);var nbt=typeof window>"u"?x.useEffect:x.useLayoutEffect;function ibt(e){var t=e.classes,r=e.pulsate,n=r===void 0?!1:r,i=e.rippleX,a=e.rippleY,o=e.rippleSize,s=e.in,l=e.onExited,c=l===void 0?function(){}:l,d=e.timeout,f=x.useState(!1),h=f[0],p=f[1],g=Ut(t.ripple,t.rippleVisible,n&&t.ripplePulsate),_={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},b=Ut(t.child,h&&t.childLeaving,n&&t.childPulsate),E=ia(c);return nbt(function(){if(!s){p(!0);var S=setTimeout(E,d);return function(){clearTimeout(S)}}},[E,s,d]),x.createElement("span",{className:g,style:_},x.createElement("span",{className:b}))}var nV=550,abt=80,obt=function(t){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(nV,"ms ").concat(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(nV,"ms ").concat(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},sbt=x.forwardRef(function(t,r){var n=t.center,i=n===void 0?!1:n,a=t.classes,o=t.className,s=Mt(t,["center","classes","className"]),l=x.useState([]),c=l[0],d=l[1],f=x.useRef(0),h=x.useRef(null);x.useEffect(function(){h.current&&(h.current(),h.current=null)},[c]);var p=x.useRef(!1),g=x.useRef(null),_=x.useRef(null),b=x.useRef(null);x.useEffect(function(){return function(){clearTimeout(g.current)}},[]);var E=x.useCallback(function(I){var N=I.pulsate,M=I.rippleX,F=I.rippleY,B=I.rippleSize,V=I.cb;d(function(W){return[].concat(c2(W),[x.createElement(ibt,{key:f.current,classes:a,timeout:nV,pulsate:N,rippleX:M,rippleY:F,rippleSize:B})])}),f.current+=1,h.current=V},[a]),S=x.useCallback(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=arguments.length>2?arguments[2]:void 0,F=N.pulsate,B=F===void 0?!1:F,V=N.center,W=V===void 0?i||N.pulsate:V,$=N.fakeElement,X=$===void 0?!1:$;if(I.type==="mousedown"&&p.current){p.current=!1;return}I.type==="touchstart"&&(p.current=!0);var re=X?null:b.current,ae=re?re.getBoundingClientRect():{width:0,height:0,left:0,top:0},Q,ie,le;if(W||I.clientX===0&&I.clientY===0||!I.clientX&&!I.touches)Q=Math.round(ae.width/2),ie=Math.round(ae.height/2);else{var fe=I.touches?I.touches[0]:I,de=fe.clientX,ge=fe.clientY;Q=Math.round(de-ae.left),ie=Math.round(ge-ae.top)}if(W)le=Math.sqrt((2*Math.pow(ae.width,2)+Math.pow(ae.height,2))/3),le%2===0&&(le+=1);else{var Ae=Math.max(Math.abs((re?re.clientWidth:0)-Q),Q)*2+2,Fe=Math.max(Math.abs((re?re.clientHeight:0)-ie),ie)*2+2;le=Math.sqrt(Math.pow(Ae,2)+Math.pow(Fe,2))}I.touches?_.current===null&&(_.current=function(){E({pulsate:B,rippleX:Q,rippleY:ie,rippleSize:le,cb:M})},g.current=setTimeout(function(){_.current&&(_.current(),_.current=null)},abt)):E({pulsate:B,rippleX:Q,rippleY:ie,rippleSize:le,cb:M})},[i,E]),P=x.useCallback(function(){S({},{pulsate:!0})}
152,[S]),O=x.useCallback(function(I,N){if(clearTimeout(g.current),I.type==="touchend"&&_.current){I.persist(),_.current(),_.current=null,g.current=setTimeout(function(){O(I,N)});return}_.current=null,d(function(M){return M.length>0?M.slice(1):M}),h.current=N},[]);return x.useImperativeHandle(r,function(){return{pulsate:P,start:S,stop:O}},[P,S,O]),x.createElement("span",ve({className:Ut(a.root,o),ref:b},s),x.createElement(d4,{component:null,exit:!0},c))});const lbt=yr(obt,{flip:!1,name:"MuiTouchRipple"})(x.memo(sbt));var cbt={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},ubt=x.forwardRef(function(t,r){var n=t.action,i=t.buttonRef,a=t.centerRipple,o=a===void 0?!1:a,s=t.children,l=t.classes,c=t.className,d=t.component,f=d===void 0?"button":d,h=t.disabled,p=h===void 0?!1:h,g=t.disableRipple,_=g===void 0?!1:g,b=t.disableTouchRipple,E=b===void 0?!1:b,S=t.focusRipple,P=S===void 0?!1:S,O=t.focusVisibleClassName,I=t.onBlur,N=t.onClick,M=t.onFocus,F=t.onFocusVisible,B=t.onKeyDown,V=t.onKeyUp,W=t.onMouseDown,$=t.onMouseLeave,X=t.onMouseUp,re=t.onTouchEnd,ae=t.onTouchMove,Q=t.onTouchStart,ie=t.onDragLeave,le=t.tabIndex,fe=le===void 0?0:le,de=t.TouchRippleProps,ge=t.type,Ae=ge===void 0?"button":ge,Fe=Mt(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Pe=x.useRef(null);function ce(){return vo.findDOMNode(Pe.current)}var pe=x.useRef(null),Ne=x.useState(!1),De=Ne[0],Ve=Ne[1];p&&De&&Ve(!1);var Ke=f2(),Qe=Ke.isFocusVisible,Ue=Ke.onBlurVisible,ut=Ke.ref;x.useImperativeHandle(n,function(){return{focusVisible:function(){Ve(!0),Pe.current.focus()}}},[]),x.useEffect(function(){De&&P&&!_&&pe.current.pulsate()},[_,P,De]);function We(ze,it){var Je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E;return ia(function(Jt){it&&it(Jt);var pr=Je;return!pr&&pe.current&&pe.current[ze](Jt),!0})}var ke=We("start",W),Le=We("stop",ie),Be=We("stop",X),Ze=We("stop",function(ze){De&&ze.preventDefault(),$&&$(ze)}),Et=We("start",Q),Yt=We("stop",re),sr=We("stop",ae),Kt=We("stop",function(ze){De&&(Ue(ze),Ve(!1)),I&&I(ze)},!1),Qt=ia(function(ze){Pe.current||(Pe.current=ze.currentTarget),Qe(ze)&&(Ve(!0),F&&F(ze)),M&&M(ze)}),qt=function(){var it=ce();return f&&f!=="button"&&!(it.tagName==="A"&&it.href)},hr=x.useRef(!1),rr=ia(function(ze){P&&!hr.current&&De&&pe.current&&ze.key===" "&&(hr.current=!0,ze.persist(),pe.current.stop(ze,function(){pe.current.start(ze)})),ze.target===ze.currentTarget&&qt()&&ze.key===" "&&ze.preventDefault(),B&&B(ze),ze.target===ze.currentTarget&&qt()&&ze.key==="Enter"&&!p&&(ze.preventDefault(),N&&N(ze))}),tr=ia(function(ze){P&&ze.key===" "&&pe.current&&De&&!ze.defaultPrevented&&(hr.current=!1,ze.persist(),pe.current.stop(ze,function(){pe.current.pulsate(ze)})),V&&V(ze),N&&ze.target===ze.currentTarget&&qt()&&ze.key===" "&&!ze.defaultPrevented&&N(ze)}),dt=f;dt==="button"&&Fe.href&&(dt="a");var bt={};dt==="button"?(bt.type=Ae,bt.disabled=p):((dt!=="a"||!Fe.href)&&(bt.role="button"),bt["aria-disabled"]=p);var nr=mi(i,r),Ee=mi(ut,Pe),Oe=mi(nr,Ee),Re=x.useState(!1),pt=Re[0],mt=Re[1];x.useEffect(function(){mt(!0)},[]);var st=pt&&!_&&!p;return x.createElement(dt,ve({className:Ut(l.root,c,De&&[l.focusVisible,O],p&&l.disabled),onBlur:Kt,onClick:N,onFocus:Qt,onKeyDown:rr,onKeyUp:tr,onMouseDown:ke,onMouseLeave:Ze,onMouseUp:Be,onDragLeave:Le,onTouchEnd:Yt,onTouchMove:sr,onTouchStart:Et,ref:Oe,tabIndex:p?-1:fe},bt,Fe),s,st?x.createElement(lbt,ve({ref:pe,center:o},de)):null)});const cm=yr(cbt,{name:"MuiButtonBase"})(ubt);var dbt=function(t){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:Jn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:t.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:t.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},fbt=x.forwardRef(function(t,r){var n=t.edge,i=n===void 0?!1:n,a=t.children,o=t.classes,s=t.className,l=t.color,c=l===void 0?"default":l,d=t.disabled,f=d===void 0?!1:d,h=t.disableFocusRipple,p=h===void 0?!1:h,g=t.size,_=g===void 0?"medium":g,b=Mt(t,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return x.createElement(cm,ve({className:Ut(o.root,s,c!=="default"&&o["color".concat(zr(c))],f&&o.disabled,_==="small"&&o["size".concat(zr(_))],{start:o.edgeStart,end:o.edgeEnd}[i]),centerRipple:!0,focusRipple:!p,disabled:f,ref:r},b),x.createElement("span",{className:o.label},a))});const cr=yr(dbt,{name:"MuiIconButton"})(fbt),hbt=zo(x.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var pbt=function(t){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:t.palette.background.default,backgroundColor:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[600]},circle:{},circular:{},rounded:{borderRadius:t.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}};function mbt(e){var t=e.src,r=e.srcSet,n=x.useState(!1),i=n[0],a=n[1];return x.useEffect(function(){if(!(!t&&!r)){a(!1);var o=!0,s=new Image;return s.src=t,s.srcSet=r,s.onload=function(){o&&a("loaded")},s.onerror=function(){o&&a("error")},function(){o=!1}
152}},[t,r]),i}var vbt=x.forwardRef(function(t,r){var n=t.alt,i=t.children,a=t.classes,o=t.className,s=t.component,l=s===void 0?"div":s,c=t.imgProps,d=t.sizes,f=t.src,h=t.srcSet,p=t.variant,g=p===void 0?"circular":p,_=Mt(t,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),b=null,E=mbt({src:f,srcSet:h}),S=f||h,P=S&&E!=="error";return P?b=x.createElement("img",ve({alt:n,src:f,srcSet:h,sizes:d,className:a.img},c)):i!=null?b=i:S&&n?b=n[0]:b=x.createElement(hbt,{className:a.fallback}),x.createElement(l,ve({className:Ut(a.root,a.system,a[g],o,!P&&a.colorDefault),ref:r},_),b)});const UC=yr(pbt,{name:"MuiAvatar"})(vbt);var gbt={entering:{opacity:1},entered:{opacity:1}},ybt={enter:fc.enteringScreen,exit:fc.leavingScreen},MAe=x.forwardRef(function(t,r){var n=t.children,i=t.disableStrictModeCompat,a=i===void 0?!1:i,o=t.in,s=t.onEnter,l=t.onEntered,c=t.onEntering,d=t.onExit,f=t.onExited,h=t.onExiting,p=t.style,g=t.TransitionComponent,_=g===void 0?gc:g,b=t.timeout,E=b===void 0?ybt:b,S=Mt(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=ts(),O=P.unstable_strictMode&&!a,I=x.useRef(null),N=mi(n.ref,r),M=mi(O?I:void 0,N),F=function(Q){return function(ie,le){if(Q){var fe=O?[I.current,ie]:[ie,le],de=Zo(fe,2),ge=de[0],Ae=de[1];Ae===void 0?Q(ge):Q(ge,Ae)}}},B=F(c),V=F(function(ae,Q){SG(ae);var ie=lm({style:p,timeout:E},{mode:"enter"});ae.style.webkitTransition=P.transitions.create("opacity",ie),ae.style.transition=P.transitions.create("opacity",ie),s&&s(ae,Q)}),W=F(l),$=F(h),X=F(function(ae){var Q=lm({style:p,timeout:E},{mode:"exit"});ae.style.webkitTransition=P.transitions.create("opacity",Q),ae.style.transition=P.transitions.create("opacity",Q),d&&d(ae)}),re=F(f);return x.createElement(_,ve({appear:!0,in:o,nodeRef:O?I:void 0,onEnter:V,onEntered:W,onEntering:B,onExit:X,onExited:re,onExiting:$,timeout:E},S),function(ae,Q){return x.cloneElement(n,ve({style:ve({opacity:0,visibility:ae==="exited"&&!o?"hidden":void 0},gbt[ae],p,n.props.style),ref:M},Q))})}),_bt={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},bbt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.invisible,s=o===void 0?!1:o,l=t.open,c=t.transitionDuration,d=t.TransitionComponent,f=d===void 0?MAe:d,h=Mt(t,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return x.createElement(f,ve({in:l,timeout:c},h),x.createElement("div",{className:Ut(i.root,a,s&&i.invisible),"aria-hidden":!0,ref:r},n))});const LAe=yr(_bt,{name:"MuiBackdrop"})(bbt);var Ebt=p0t(Ph(h0t,E0t,M0t,K0t,iyt,Z0t,ayt,hyt,pG,Oyt)),wbt=I_t("div")(Ebt,{name:"MuiBox"}),Sbt=function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},wle={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Cbt=x.forwardRef(function(t,r){var n=t.align,i=n===void 0?"inherit":n,a=t.classes,o=t.className,s=t.color,l=s===void 0?"initial":s,c=t.component,d=t.display,f=d===void 0?"initial":d,h=t.gutterBottom,p=h===void 0?!1:h,g=t.noWrap,_=g===void 0?!1:g,b=t.paragraph,E=b===void 0?!1:b,S=t.variant,P=S===void 0?"body1":S,O=t.variantMapping,I=O===void 0?wle:O,N=Mt(t,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),M=c||(E?"p":I[P]||wle[P])||"span";return x.createElement(M,ve({className:Ut(a.root,o,P!=="inherit"&&a[P],l!=="initial"&&a["color".concat(zr(l))],_&&a.noWrap,p&&a.gutterBottom,E&&a.paragraph,i!=="inherit"&&a["align".concat(zr(i))],f!=="initial"&&a["display".concat(zr(f))]),ref:r}
vendor: 4,817 bytes, line 152
152,N))});const fo=yr(Sbt,{name:"MuiTypography"})(Cbt);var xbt=function(t){return{root:ve({},t.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:t.shape.borderRadius,color:t.palette.text.primary,transition:t.transitions.create(["background-color","box-shadow","border"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Jn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:t.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(t.palette.action.disabledBackground)}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(Jn(t.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.primary.main),backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(Jn(t.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.secondary.main),backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(t.palette.action.disabled)}},contained:{color:t.palette.getContrastText(t.palette.grey[300]),backgroundColor:t.palette.grey[300],boxShadow:t.shadows[2],"&:hover":{backgroundColor:t.palette.grey.A100,boxShadow:t.shadows[4],"@media (hover: none)":{boxShadow:t.shadows[2],backgroundColor:t.palette.grey[300]},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:t.shadows[6]},"&:active":{boxShadow:t.shadows[8]},"&$disabled":{color:t.palette.action.disabled,boxShadow:t.shadows[0],backgroundColor:t.palette.action.disabledBackground}},containedPrimary:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark,"@media (hover: none)":{backgroundColor:t.palette.primary.main}}},containedSecondary:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.dark,"@media (hover: none)":{backgroundColor:t.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}},Tbt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.color,s=o===void 0?"default":o,l=t.component,c=l===void 0?"button":l,d=t.disabled,f=d===void 0?!1:d,h=t.disableElevation,p=h===void 0?!1:h,g=t.disableFocusRipple,_=g===void 0?!1:g,b=t.endIcon,E=t.focusVisibleClassName,S=t.fullWidth,P=S===void 0?!1:S,O=t.size,I=O===void 0?"medium":O,N=t.startIcon,M=t.type,F=M===void 0?"button":M,B=t.variant,V=B===void 0?"text":B,W=Mt(t,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),$=N&&x.createElement("span",{className:Ut(i.startIcon,i["iconSize".concat(zr(I))])},N),X=b&&x.createElement("span",{className:Ut(i.endIcon,i["iconSize".concat(zr(I))])},b);
152return x.createElement(cm,ve({className:Ut(i.root,i[V],a,s==="inherit"?i.colorInherit:s!=="default"&&i["".concat(V).concat(zr(s))],I!=="medium"&&[i["".concat(V,"Size").concat(zr(I))],i["size".concat(zr(I))]],p&&i.disableElevation,f&&i.disabled,P&&i.fullWidth),component:c,disabled:f,focusRipple:!_,focusVisibleClassName:Ut(i.focusVisible,E),ref:r,type:F},W),x.createElement("span",{className:i.label},$,n,X))});const fr=yr(xbt,{name:"MuiButton"})(Tbt);var Abt={root:{overflow:"hidden"}},Pbt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.raised,o=a===void 0?!1:a,s=Mt(t,["classes","className","raised"]);return x.createElement(Qd,ve({className:Ut(n.root,i),elevation:o?8:1,ref:r},s))});const FAe=yr(Abt,{name:"MuiCard"})(Pbt);var Rbt={root:{padding:16,"&:last-child":{paddingBottom:24}}},Obt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?"div":a,s=Mt(t,["classes","className","component"]);return x.createElement(o,ve({className:Ut(n.root,i),ref:r},s))});const BAe=yr(Rbt,{name:"MuiCardContent"})(Obt);var h2=x.createContext();function zAe(){return x.useContext(h2)}function h0(){return x.useContext(h2)}var Ibt={root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},kbt=x.forwardRef(function(t,r){var n=t.autoFocus,i=t.checked,a=t.checkedIcon,o=t.classes,s=t.className,l=t.defaultChecked,c=t.disabled,d=t.icon,f=t.id,h=t.inputProps,p=t.inputRef,g=t.name,_=t.onBlur,b=t.onChange,E=t.onFocus,S=t.readOnly,P=t.required,O=t.tabIndex,I=t.type,N=t.value,M=Mt(t,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),F=Rd({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),B=Zo(F,2),V=B[0],W=B[1],$=h0(),X=function(fe){E&&E(fe),$&&$.onFocus&&$.onFocus(fe)},re=function(fe){_&&_(fe),$&&$.onBlur&&$.onBlur(fe)},ae=function(fe){var de=fe.target.checked;W(de),b&&b(fe,de)},Q=c;$&&typeof Q>"u"&&(Q=$.disabled);var ie=I==="checkbox"||I==="radio";return x.createElement(cr,ve({component:"span",className:Ut(o.root,s,V&&o.checked,Q&&o.disabled),disabled:Q,tabIndex:null,role:void 0,onFocus:X,onBlur:re,ref:r},M),x.createElement("input",ve({autoFocus:n,checked:i,defaultChecked:l,className:o.input,disabled:Q,id:ie&&f,name:g,onChange:ae,readOnly:S,ref:p,required:P,tabIndex:O,type:I,value:N},h)),V?a:d)});const CG=yr(Ibt,{name:"PrivateSwitchBase"})(kbt),Nbt=zo(x.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Dbt=zo(x.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Mbt=zo(x.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));var Lbt=function(t){return{root:{color:t.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}}}},Fbt=x.createElement(Dbt,null),Bbt=x.createElement(Nbt,null),zbt=x.createElement(Mbt,null),Hbt=x.forwardRef(function(t,r){var n=t.checkedIcon,i=n===void 0?Fbt:n,a=t.classes,o=t.color,s=o===void 0?"secondary":o,l=t.icon,c=l===void 0?Bbt:l,d=t.indeterminate,f=d===void 0?!1:d,h=t.indeterminateIcon,p=h===void 0?zbt:h,g=t.inputProps,_=t.size,b=_===void 0?"medium":_,E=Mt(t,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),S=f?p:c,P=f?p:i;return x.createElement(CG,ve({type:"checkbox",classes:{root:Ut(a.root,a["color".concat(zr(s))],f&&a.indeterminate),checked:a.checked,disabled:a.disabled},color:s,inputProps:ve({"data-indeterminate":f},g),icon:x.cloneElement(S,{fontSize:S.props.fontSize===void 0&&b==="small"?b:S.props.fontSize}),checkedIcon:x.cloneElement(P,{fontSize:P.props.fontSize===void 0&&b==="small"?b:P.props.fontSize}),ref:r},E))});const f4=yr(Lbt,{name:"MuiCheckbox"})(Hbt),Ubt=zo(x.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));var Vbt=function(t){var r=t.palette.type==="light"?t.palette.grey[300]:t.palette.grey[700],n=Jn(t.palette.text.primary,.26);return{root:{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:t.palette.getContrastText(r),backgroundColor:r,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],fontSize:t.typography.pxToRem(12)},"& $avatarColorPrimary":{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.dark}
152,"& $avatarColorSecondary":{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:_v(r,.08)},"&:active":{boxShadow:t.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:_v(t.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:_v(t.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:_v(r,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:_v(t.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:_v(t.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Jn(t.palette.text.primary,t.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(t.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity)}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(t.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:n,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Jn(n,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:Jn(t.palette.primary.contrastText,.7),"&:hover, &:active":{color:t.palette.primary.contrastText}},deleteIconColorSecondary:{color:Jn(t.palette.secondary.contrastText,.7),"&:hover, &:active":{color:t.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:Jn(t.palette.primary.main,.7),"&:hover, &:active":{color:t.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:Jn(t.palette.secondary.main,.7),"&:hover, &:active":{color:t.palette.secondary.main}}}};function Sle(e){return e.key==="Backspace"||e.key==="Delete"}var qbt=x.forwardRef(function(t,r){var n=t.avatar,i=t.classes,a=t.className,o=t.clickable,s=t.color,l=s===void 0?"default":s,c=t.component,d=t.deleteIcon,f=t.disabled,h=f===void 0?!1:f,p=t.icon,g=t.label,_=t.onClick,b=t.onDelete,E=t.onKeyDown,S=t.onKeyUp,P=t.size,O=P===void 0?"medium":P,I=t.variant,N=I===void 0?"default":I,M=Mt(t,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),F=x.useRef(null),B=mi(F,r),V=function(Ae){Ae.stopPropagation(),b&&b(Ae)},W=function(Ae){Ae.currentTarget===Ae.target&&Sle(Ae)&&Ae.preventDefault(),E&&E(Ae)},$=function(Ae){Ae.currentTarget===Ae.target&&(b&&Sle(Ae)?b(Ae):Ae.key==="Escape"&&F.current&&F.current.blur()),S&&S(Ae)},X=o!==!1&&_?!0:o,re=O==="small",ae=c||(X?cm:"div"),Q=ae===cm?{component:"div"}:{},ie=null;if(b){var le=Ut(l!=="default"&&(N==="default"?i["deleteIconColor".concat(zr(l))]:i["deleteIconOutlinedColor".concat(zr(l))]),re&&i.deleteIconSmall);ie=d&&x.isValidElement(d)?x.cloneElement(d,{className:Ut(d.props.className,i.deleteIcon,le),onClick:V}):x.createElement(Ubt,{className:Ut(i.deleteIcon,le),onClick:V})}var fe=null;n&&x.isValidElement(n)&&(fe=x.cloneElement(n,{className:Ut(i.avatar,n.props.className,re&&i.avatarSmall,l!=="default"&&i["avatarColor".concat(zr(l))])}));var de=null;return p&&x.isValidElement(p)&&(de=x.cloneElement(p,{className:Ut(i.icon,p.props.className,re&&i.iconSmall,l!=="default"&&i["iconColor".concat(zr(l))])})),x.createElement(ae,ve({role:X||b?"button":void 0,className:Ut(i.root,a,l!=="default"&&[i["color".concat(zr(l))],X&&i["clickableColor".concat(zr(l))],b&&i["deletableColor".concat(zr(l))]],N!=="default"&&[i.outlined,{primary:i.outlinedPrimary,secondary:i.outlinedSecondary}[l]],h&&i.disabled,re&&i.sizeSmall,X&&i.clickable,b&&i.deletable),"aria-disabled":h?!0:void 0,tabIndex:X||b?0:void 0,onClick:_,onKeyDown:W,onKeyUp:$,ref:B},Q,M),fe||de,x.createElement("span",{className:Ut(i.label,re&&i.labelSmall)},g),ie)});const B1=yr(Vbt,{name:"MuiChip"})(qbt);var sp=44,jbt=function(t){return{root:{display:"inline-block"},static:{transition:t.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:t.transitions.create("transform")},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:t.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:t.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},$bt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=a===void 0?"primary":a,s=t.disableShrink,l=s===void 0?!1:s,c=t.size,d=c===void 0?40:c,f=t.style,h=t.thickness,p=h===void 0?3.6:h,g=t.value,_=g===void 0?0:g,b=t.variant,E=b===void 0?"indeterminate":b,S=Mt(t,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),P={},O={},I={};if(E==="determinate"||E==="static"){var N=2*Math.PI*((sp-p)/2);P.strokeDasharray=N.toFixed(3),I["aria-valuenow"]=Math.round(_),P.strokeDashoffset="".concat(((100-_)/100*N).toFixed(3),"px"),O.transform="rotate(-90deg)"}
152return x.createElement("div",ve({className:Ut(n.root,i,o!=="inherit"&&n["color".concat(zr(o))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[E]),style:ve({width:d,height:d},O,f),ref:r,role:"progressbar"},I,S),x.createElement("svg",{className:n.svg,viewBox:"".concat(sp/2," ").concat(sp/2," ").concat(sp," ").concat(sp)},x.createElement("circle",{className:Ut(n.circle,l&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[E]),style:P,cx:sp,cy:sp,r:(sp-p)/2,fill:"none",strokeWidth:p})))});const ai=yr(jbt,{name:"MuiCircularProgress",flip:!1})($bt);function Cle(e){return e.substring(2).toLowerCase()}function Wbt(e){return document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY}function Gbt(e){var t=e.children,r=e.disableReactTree,n=r===void 0?!1:r,i=e.mouseEvent,a=i===void 0?"onClick":i,o=e.onClickAway,s=e.touchEvent,l=s===void 0?"onTouchEnd":s,c=x.useRef(!1),d=x.useRef(null),f=x.useRef(!1),h=x.useRef(!1);x.useEffect(function(){return setTimeout(function(){f.current=!0},0),function(){f.current=!1}},[]);var p=x.useCallback(function(S){d.current=vo.findDOMNode(S)},[]),g=mi(t.ref,p),_=ia(function(S){var P=h.current;if(h.current=!1,!(!f.current||!d.current||Wbt(S))){if(c.current){c.current=!1;return}var O;if(S.composedPath)O=S.composedPath().indexOf(d.current)>-1;else{var I=ds(d.current);O=!I.documentElement.contains(S.target)||d.current.contains(S.target)}!O&&(n||!P)&&o(S)}}),b=function(P){return function(O){h.current=!0;var I=t.props[P];I&&I(O)}},E={ref:g};return l!==!1&&(E[l]=b(l)),x.useEffect(function(){if(l!==!1){var S=Cle(l),P=ds(d.current),O=function(){c.current=!0};return P.addEventListener(S,_),P.addEventListener("touchmove",O),function(){P.removeEventListener(S,_),P.removeEventListener("touchmove",O)}}},[_,l]),a!==!1&&(E[a]=b(a)),x.useEffect(function(){if(a!==!1){var S=Cle(a),P=ds(d.current);return P.addEventListener(S,_),function(){P.removeEventListener(S,_)}}},[_,a]),x.createElement(x.Fragment,null,x.cloneElement(t,E))}function Kbt(e){return e=typeof e=="function"?e():e,vo.findDOMNode(e)}var nL=typeof window<"u"?x.useLayoutEffect:x.useEffect,HAe=x.forwardRef(function(t,r){var n=t.children,i=t.container,a=t.disablePortal,o=a===void 0?!1:a,s=t.onRendered,l=x.useState(null),c=l[0],d=l[1],f=mi(x.isValidElement(n)?n.ref:null,r);return nL(function(){o||d(Kbt(i)||document.body)},[i,o]),nL(function(){if(c&&!o)return yh(r,c),function(){yh(r,null)}},[r,c,o]),nL(function(){s&&(c||o)&&s()},[s,c,o]),o?x.isValidElement(n)?x.cloneElement(n,{ref:f}):n:c&&vo.createPortal(n,c)});function UAe(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function Ybt(e){var t=ds(e);return t.body===e?c4(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function kS(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function xle(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Tle(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,r].concat(c2(n)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,function(s){s.nodeType===1&&a.indexOf(s)===-1&&o.indexOf(s.tagName)===-1&&kS(s,i)})}function iL(e,t){var r=-1;return e.some(function(n,i){return t(n)?(r=i,!0):!1}),r}function Xbt(e,t){var r=[],n=[],i=e.container,a;if(!t.disableScrollLock){if(Ybt(i)){var o=UAe();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(xle(i)+o,"px"),a=ds(i).querySelectorAll(".mui-fixed"),[].forEach.call(a,function(d){n.push(d.style.paddingRight),d.style.paddingRight="".concat(xle(d)+o,"px")})}var s=i.parentElement,l=s.nodeName==="HTML"&&window.getComputedStyle(s)["overflow-y"]==="scroll"?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}var c=function(){a&&[].forEach.call(a,function(f,h){n[h]?f.style.paddingRight=n[h]:f.style.removeProperty("padding-right")}),r.forEach(function(f){var h=f.value,p=f.el,g=f.key;h?p.style.setProperty(g,h):p.style.removeProperty(g)})};return c}function Zbt(e){var t=[];return[].forEach.call(e.children,function(r){r.getAttribute&&r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}var Qbt=(function(){function e(){Hn(this,e),this.modals=[],this.containers=[]}return kn(e,[{key:"add",value:function(r,n){var i=this.modals.indexOf(r);if(i!==-1)return i;i=this.modals.length,this.modals.push(r),r.modalRef&&kS(r.modalRef,!1);var a=Zbt(n);Tle(n,r.mountNode,r.modalRef,a,!0);var o=iL(this.containers,function(s){return s.container===n});return o!==-1?(this.containers[o].modals.push(r),i):(this.containers.push({modals:[r],container:n,restore:null,hiddenSiblingNodes:a}),i)}},{key:"mount",value:function(r,n){var i=iL(this.containers,function(o){return o.modals.indexOf(r)!==-1}),a=this.containers[i];a.restore||(a.restore=Xbt(a,n))}},{key:"remove",value:function(r){var n=this.modals.indexOf(r);if(n===-1)return n;var i=iL(this.containers,function(s){return s.modals.indexOf(r)!==-1}),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(r),1),this.modals.splice(n,1),a.modals.length===0)a.restore&&a.restore(
152),r.modalRef&&kS(r.modalRef,!0),Tle(a.container,r.mountNode,r.modalRef,a.hiddenSiblingNodes,!1),this.containers.splice(i,1);else{var o=a.modals[a.modals.length-1];o.modalRef&&kS(o.modalRef,!1)}return n}},{key:"isTopModal",value:function(r){return this.modals.length>0&&this.modals[this.modals.length-1]===r}}]),e})();function Jbt(e){var t=e.children,r=e.disableAutoFocus,n=r===void 0?!1:r,i=e.disableEnforceFocus,a=i===void 0?!1:i,o=e.disableRestoreFocus,s=o===void 0?!1:o,l=e.getDoc,c=e.isEnabled,d=e.open,f=x.useRef(),h=x.useRef(null),p=x.useRef(null),g=x.useRef(),_=x.useRef(null),b=x.useCallback(function(P){_.current=vo.findDOMNode(P)},[]),E=mi(t.ref,b),S=x.useRef();return x.useEffect(function(){S.current=d},[d]),!S.current&&d&&typeof window<"u"&&(g.current=l().activeElement),x.useEffect(function(){if(d){var P=ds(_.current);!n&&_.current&&!_.current.contains(P.activeElement)&&(_.current.hasAttribute("tabIndex")||_.current.setAttribute("tabIndex",-1),_.current.focus());var O=function(){var F=_.current;if(F!==null){if(!P.hasFocus()||a||!c()||f.current){f.current=!1;return}_.current&&!_.current.contains(P.activeElement)&&_.current.focus()}},I=function(F){a||!c()||F.keyCode!==9||P.activeElement===_.current&&(f.current=!0,F.shiftKey?p.current.focus():h.current.focus())};P.addEventListener("focus",O,!0),P.addEventListener("keydown",I,!0);var N=setInterval(function(){O()},50);return function(){clearInterval(N),P.removeEventListener("focus",O,!0),P.removeEventListener("keydown",I,!0),s||(g.current&&g.current.focus&&g.current.focus(),g.current=null)}}},[n,a,s,c,d]),x.createElement(x.Fragment,null,x.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelStart"}),x.cloneElement(t,{ref:E}),x.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelEnd"}))}var Ale={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},eEt=x.forwardRef(function(t,r){var n=t.invisible,i=n===void 0?!1:n,a=t.open,o=Mt(t,["invisible","open"]);return a?x.createElement("div",ve({"aria-hidden":!0,ref:r},o,{style:ve({},Ale.root,i?Ale.invisible:{},o.style)})):null});function tEt(e){return e=typeof e=="function"?e():e,vo.findDOMNode(e)}function rEt(e){return e.children?e.children.props.hasOwnProperty("in"):!1}var nEt=new Qbt,iEt=function(t){return{root:{position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}},xG=x.forwardRef(function(t,r){var n=f0(),i=i4({name:"MuiModal",props:ve({},t),theme:n}),a=i.BackdropComponent,o=a===void 0?eEt:a,s=i.BackdropProps,l=i.children,c=i.closeAfterTransition,d=c===void 0?!1:c,f=i.container,h=i.disableAutoFocus,p=h===void 0?!1:h,g=i.disableBackdropClick,_=g===void 0?!1:g,b=i.disableEnforceFocus,E=b===void 0?!1:b,S=i.disableEscapeKeyDown,P=S===void 0?!1:S,O=i.disablePortal,I=O===void 0?!1:O,N=i.disableRestoreFocus,M=N===void 0?!1:N,F=i.disableScrollLock,B=F===void 0?!1:F,V=i.hideBackdrop,W=V===void 0?!1:V,$=i.keepMounted,X=$===void 0?!1:$,re=i.manager,ae=re===void 0?nEt:re,Q=i.onBackdropClick,ie=i.onClose,le=i.onEscapeKeyDown,fe=i.onRendered,de=i.open,ge=Mt(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Ae=x.useState(!0),Fe=Ae[0],Pe=Ae[1],ce=x.useRef({}),pe=x.useRef(null),Ne=x.useRef(null),De=mi(Ne,r),Ve=rEt(i),Ke=function(){return ds(pe.current)},Qe=function(){return ce.current.modalRef=Ne.current,ce.current.mountNode=pe.current,ce.current},Ue=function(){ae.mount(Qe(),{disableScrollLock:B}),Ne.current.scrollTop=0},ut=ia(function(){var Qt=tEt(f)||Ke().body;ae.add(Qe(),Qt),Ne.current&&Ue()}),We=x.useCallback(function(){return ae.isTopModal(Qe())},[ae]),ke=ia(function(Qt){pe.current=Qt,Qt&&(fe&&fe(),de&&We()?Ue():kS(Ne.current,!0))}),Le=x.useCallback(function(){ae.remove(Qe())},[ae]);if(x.useEffect(function(){return function(){Le()}},[Le]),x.useEffect(function(){de?ut():(!Ve||!d)&&Le()},[de,Le,Ve,d,ut]),!X&&!de&&(!Ve||Fe))return null;var Be=function(){Pe(!1)},Ze=function(){Pe(!0),d&&Le()},Et=function(qt){qt.target===qt.currentTarget&&(Q&&Q(qt),!_&&ie&&ie(qt,"backdropClick"))},Yt=function(qt){qt.key!=="Escape"||!We()||(le&&le(qt),P||(qt.stopPropagation(),ie&&ie(qt,"escapeKeyDown")))},sr=iEt(n||{zIndex:fAe}),Kt={};return l.props.tabIndex===void 0&&(Kt.tabIndex=l.props.tabIndex||"-1"),Ve&&(Kt.onEnter=gh(Be,l.props.onEnter),Kt.onExited=gh(Ze,l.props.onExited)),x.createElement(HAe,{ref:ke,container:f,disablePortal:I},x.createElement("div",ve({ref:De,onKeyDown:Yt,role:"presentation"},ge,{style:ve({},sr.root,!de&&Fe?sr.hidden:{},ge.style)}),W?null:x.createElement(o,ve({open:de,onClick:Et},s)),x.createElement(Jbt,{disableEnforceFocus:E,disableAutoFocus:p,disableRestoreFocus:M,getDoc:Ke,isEnabled:We,open:de},x.cloneElement(l,Kt))))}),aEt=function(t){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',dis
152play:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(t.breakpoints.values.xs,444),"&$paperScrollBody":Nt({},t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:t.breakpoints.values.sm,"&$paperScrollBody":Nt({},t.breakpoints.down(t.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:t.breakpoints.values.md,"&$paperScrollBody":Nt({},t.breakpoints.down(t.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:t.breakpoints.values.lg,"&$paperScrollBody":Nt({},t.breakpoints.down(t.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:t.breakpoints.values.xl,"&$paperScrollBody":Nt({},t.breakpoints.down(t.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}},oEt={enter:fc.enteringScreen,exit:fc.leavingScreen},sEt=x.forwardRef(function(t,r){var n=t.BackdropProps,i=t.children,a=t.classes,o=t.className,s=t.disableBackdropClick,l=s===void 0?!1:s,c=t.disableEscapeKeyDown,d=c===void 0?!1:c,f=t.fullScreen,h=f===void 0?!1:f,p=t.fullWidth,g=p===void 0?!1:p,_=t.maxWidth,b=_===void 0?"sm":_,E=t.onBackdropClick,S=t.onClose,P=t.onEnter,O=t.onEntered,I=t.onEntering,N=t.onEscapeKeyDown,M=t.onExit,F=t.onExited,B=t.onExiting,V=t.open,W=t.PaperComponent,$=W===void 0?Qd:W,X=t.PaperProps,re=X===void 0?{}:X,ae=t.scroll,Q=ae===void 0?"paper":ae,ie=t.TransitionComponent,le=ie===void 0?MAe:ie,fe=t.transitionDuration,de=fe===void 0?oEt:fe,ge=t.TransitionProps,Ae=t["aria-describedby"],Fe=t["aria-labelledby"],Pe=Mt(t,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),ce=x.useRef(),pe=function(Ve){ce.current=Ve.target},Ne=function(Ve){Ve.target===Ve.currentTarget&&Ve.target===ce.current&&(ce.current=null,E&&E(Ve),!l&&S&&S(Ve,"backdropClick"))};return x.createElement(xG,ve({className:Ut(a.root,o),BackdropComponent:LAe,BackdropProps:ve({transitionDuration:de},n),closeAfterTransition:!0},l?{disableBackdropClick:l}:{},{disableEscapeKeyDown:d,onEscapeKeyDown:N,onClose:S,open:V,ref:r},Pe),x.createElement(le,ve({appear:!0,in:V,timeout:de,onEnter:P,onEntering:I,onEntered:O,onExit:M,onExiting:B,onExited:F,role:"none presentation"},ge),x.createElement("div",{className:Ut(a.container,a["scroll".concat(zr(Q))]),onMouseUp:Ne,onMouseDown:pe},x.createElement($,ve({elevation:24,role:"dialog","aria-describedby":Ae,"aria-labelledby":Fe},re,{className:Ut(a.paper,a["paperScroll".concat(zr(Q))],a["paperWidth".concat(zr(String(b)))],re.className,h&&a.paperFullScreen,g&&a.paperFullWidth)}),i))))});const Eo=yr(aEt,{name:"MuiDialog"})(sEt);var lEt={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},cEt=x.forwardRef(function(t,r){var n=t.disableSpacing,i=n===void 0?!1:n,a=t.classes,o=t.className,s=Mt(t,["disableSpacing","classes","className"]);return x.createElement("div",ve({className:Ut(a.root,o,!i&&a.spacing),ref:r},s))});const VC=yr(lEt,{name:"MuiDialogActions"})(cEt);var uEt=function(t){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(t.palette.divider),borderBottom:"1px solid ".concat(t.palette.divider)}}},dEt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.dividers,o=a===void 0?!1:a,s=Mt(t,["classes","className","dividers"]);
152return x.createElement("div",ve({className:Ut(n.root,i,o&&n.dividers),ref:r},s))});const Xc=yr(uEt,{name:"MuiDialogContent"})(dEt);var fEt={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},hEt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.disableTypography,s=o===void 0?!1:o,l=Mt(t,["children","classes","className","disableTypography"]);return x.createElement("div",ve({className:Ut(i.root,a),ref:r},l),s?n:x.createElement(fo,{component:"h2",variant:"h6"},n))});const p0=yr(fEt,{name:"MuiDialogTitle"})(hEt);var pEt=function(t){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:t.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Jn(t.palette.divider,.08)},middle:{marginLeft:t.spacing(2),marginRight:t.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}},mEt=x.forwardRef(function(t,r){var n=t.absolute,i=n===void 0?!1:n,a=t.classes,o=t.className,s=t.component,l=s===void 0?"hr":s,c=t.flexItem,d=c===void 0?!1:c,f=t.light,h=f===void 0?!1:f,p=t.orientation,g=p===void 0?"horizontal":p,_=t.role,b=_===void 0?l!=="hr"?"separator":void 0:_,E=t.variant,S=E===void 0?"fullWidth":E,P=Mt(t,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return x.createElement(l,ve({className:Ut(a.root,o,S!=="fullWidth"&&a[S],i&&a.absolute,d&&a.flexItem,h&&a.light,g==="vertical"&&a.vertical),role:b,ref:r},P))});const zs=yr(pEt,{name:"MuiDivider"})(mEt);function vEt(e,t){var r=t.getBoundingClientRect(),n;if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,o=0;if(n&&n!=="none"&&typeof n=="string"){var s=n.split("(")[1].split(")")[0].split(",");a=parseInt(s[4],10),o=parseInt(s[5],10)}return e==="left"?"translateX(".concat(window.innerWidth,"px) translateX(").concat(a-r.left,"px)"):e==="right"?"translateX(-".concat(r.left+r.width-a,"px)"):e==="up"?"translateY(".concat(window.innerHeight,"px) translateY(").concat(o-r.top,"px)"):"translateY(-".concat(r.top+r.height-o,"px)")}function kA(e,t){var r=vEt(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}var gEt={enter:fc.enteringScreen,exit:fc.leavingScreen},yEt=x.forwardRef(function(t,r){var n=t.children,i=t.direction,a=i===void 0?"down":i,o=t.in,s=t.onEnter,l=t.onEntered,c=t.onEntering,d=t.onExit,f=t.onExited,h=t.onExiting,p=t.style,g=t.timeout,_=g===void 0?gEt:g,b=t.TransitionComponent,E=b===void 0?gc:b,S=Mt(t,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=ts(),O=x.useRef(null),I=x.useCallback(function(Q){O.current=vo.findDOMNode(Q)},[]),N=mi(n.ref,I),M=mi(N,r),F=function(ie){return function(le){ie&&(le===void 0?ie(O.current):ie(O.current,le))}},B=F(function(Q,ie){kA(a,Q),SG(Q),s&&s(Q,ie)}),V=F(function(Q,ie){var le=lm({timeout:_,style:p},{mode:"enter"});Q.style.webkitTransition=P.transitions.create("-webkit-transform",ve({},le,{easing:P.transitions.easing.easeOut})),Q.style.transition=P.transitions.create("transform",ve({},le,{easing:P.transitions.easing.easeOut})),Q.style.webkitTransform="none",Q.style.transform="none",c&&c(Q,ie)}),W=F(l),$=F(h),X=F(function(Q){var ie=lm({timeout:_,style:p},{mode:"exit"});Q.style.webkitTransition=P.transitions.create("-webkit-transform",ve({},ie,{easing:P.transitions.easing.sharp})),Q.style.transition=P.transitions.create("transform",ve({},ie,{easing:P.transitions.easing.sharp})),kA(a,Q),d&&d(Q)}),re=F(function(Q){Q.style.webkitTransition="",Q.style.transition="",f&&f(Q)}),ae=x.useCallback(function(){O.current&&kA(a,O.current)},[a]);return x.useEffect(function(){if(!(o||a==="down"||a==="right")){var Q=Ng(function(){O.current&&kA(a,O.current)});return window.addEventListener("resize",Q),function(){Q.clear(),window.removeEventListener("resize",Q)}}},[a,o]),x.useEffect(function(){o||ae()},[o,ae]),x.createElement(E,ve({nodeRef:O,onEnter:B,onEntered:W,onEntering:V,onExit:X,onExited:re,onExiting:$,appear:!0,in:o,timeout:_},S),function(Q,ie){return x.cloneElement(n,ve({ref:M,style:ve({visibility:Q==="exited"&&!o?"hidden":void 0},p,n.props.style)},ie))})}),_Et=function(t){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:t.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(t.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(t.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(t.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(t.palette.divider)},modal:{}}}
152,VAe={left:"right",right:"left",top:"down",bottom:"up"};function bEt(e){return["left","right"].indexOf(e)!==-1}function EEt(e,t){return e.direction==="rtl"&&bEt(t)?VAe[t]:t}var wEt={enter:fc.enteringScreen,exit:fc.leavingScreen},SEt=x.forwardRef(function(t,r){var n=t.anchor,i=n===void 0?"left":n,a=t.BackdropProps,o=t.children,s=t.classes,l=t.className,c=t.elevation,d=c===void 0?16:c,f=t.ModalProps;f=f===void 0?{}:f;var h=f.BackdropProps,p=Mt(f,["BackdropProps"]),g=t.onClose,_=t.open,b=_===void 0?!1:_,E=t.PaperProps,S=E===void 0?{}:E,P=t.SlideProps,O=t.TransitionComponent,I=O===void 0?yEt:O,N=t.transitionDuration,M=N===void 0?wEt:N,F=t.variant,B=F===void 0?"temporary":F,V=Mt(t,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),W=ts(),$=x.useRef(!1);x.useEffect(function(){$.current=!0},[]);var X=EEt(W,i),re=x.createElement(Qd,ve({elevation:B==="temporary"?d:0,square:!0},S,{className:Ut(s.paper,s["paperAnchor".concat(zr(X))],S.className,B!=="temporary"&&s["paperAnchorDocked".concat(zr(X))])}),o);if(B==="permanent")return x.createElement("div",ve({className:Ut(s.root,s.docked,l),ref:r},V),re);var ae=x.createElement(I,ve({in:b,direction:VAe[X],timeout:M,appear:$.current},P),re);return B==="persistent"?x.createElement("div",ve({className:Ut(s.root,s.docked,l),ref:r},V),ae):x.createElement(xG,ve({BackdropProps:ve({},a,h,{transitionDuration:M}),BackdropComponent:LAe,className:Ut(s.root,s.modal,l),open:b,onClose:g,ref:r},V,p),ae)});const qAe=yr(_Et,{name:"MuiDrawer",flip:!1})(SEt);function U_(e){var t=e.props,r=e.states,n=e.muiFormControl;return r.reduce(function(i,a){return i[a]=t[a],n&&typeof t[a]>"u"&&(i[a]=n[a]),i},{})}function NA(e,t){return parseInt(e[t],10)||0}var CEt=typeof window<"u"?x.useLayoutEffect:x.useEffect,xEt={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},TEt=x.forwardRef(function(t,r){var n=t.onChange,i=t.rows,a=t.rowsMax,o=t.rowsMin,s=t.maxRows,l=t.minRows,c=l===void 0?1:l,d=t.style,f=t.value,h=Mt(t,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),p=s||a,g=i||o||c,_=x.useRef(f!=null),b=_.current,E=x.useRef(null),S=mi(r,E),P=x.useRef(null),O=x.useRef(0),I=x.useState({}),N=I[0],M=I[1],F=x.useCallback(function(){var V=E.current,W=window.getComputedStyle(V),$=P.current;$.style.width=W.width,$.value=V.value||t.placeholder||"x",$.value.slice(-1)===`
153`&&($.value+=" ");var X=W["box-sizing"],re=NA(W,"padding-bottom")+NA(W,"padding-top"),ae=NA(W,"border-bottom-width")+NA(W,"border-top-width"),Q=$.scrollHeight-re;$.value="x";var ie=$.scrollHeight-re,le=Q;g&&(le=Math.max(Number(g)*ie,le)),p&&(le=Math.min(Number(p)*ie,le)),le=Math.max(le,ie);var fe=le+(X==="border-box"?re+ae:0),de=Math.abs(le-Q)<=1;M(function(ge){return O.current<20&&(fe>0&&Math.abs((ge.outerHeightStyle||0)-fe)>1||ge.overflow!==de)?(O.current+=1,{overflow:de,outerHeightStyle:fe}):ge})},[p,g,t.placeholder]);x.useEffect(function(){var V=Ng(function(){O.current=0,F()});return window.addEventListener("resize",V),function(){V.clear(),window.removeEventListener("resize",V)}},[F]),CEt(function(){F()}),x.useEffect(function(){O.current=0},[f]);var B=function(W){O.current=0,b||F(),n&&n(W)};return x.createElement(x.Fragment,null,x.createElement("textarea",ve({value:f,onChange:B,ref:S,rows:g,style:ve({height:N.outerHeightStyle,overflow:N.overflow?"hidden":null},d)},h)),x.createElement("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:P,tabIndex:-1,style:ve({},xEt.shadow,d)}))});function Ple(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function TG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e&&(Ple(e.value)&&e.value!==""||t&&Ple(e.defaultValue)&&e.defaultValue!=="")}function AEt(e){return e.startAdornment}var PEt=function(t){var r=t.palette.type==="light",n={color:"currentColor",opacity:r?.42:.5,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},i={opacity:"0 !important"},a={opacity:r?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:ve({},t.typography.body1,{color:t.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",curs
153or:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:t.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}},REt=typeof window>"u"?x.useEffect:x.useLayoutEffect,OEt=x.forwardRef(function(t,r){var n=t["aria-describedby"],i=t.autoComplete,a=t.autoFocus,o=t.classes,s=t.className;t.color;var l=t.defaultValue,c=t.disabled,d=t.endAdornment;t.error;var f=t.fullWidth,h=f===void 0?!1:f,p=t.id,g=t.inputComponent,_=g===void 0?"input":g,b=t.inputProps,E=b===void 0?{}:b,S=t.inputRef;t.margin;var P=t.multiline,O=P===void 0?!1:P,I=t.name,N=t.onBlur,M=t.onChange,F=t.onClick,B=t.onFocus,V=t.onKeyDown,W=t.onKeyUp,$=t.placeholder,X=t.readOnly,re=t.renderSuffix,ae=t.rows,Q=t.rowsMax,ie=t.rowsMin,le=t.maxRows,fe=t.minRows,de=t.startAdornment,ge=t.type,Ae=ge===void 0?"text":ge,Fe=t.value,Pe=Mt(t,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),ce=E.value!=null?E.value:Fe,pe=x.useRef(ce!=null),Ne=pe.current,De=x.useRef(),Ve=x.useCallback(function(dt){},[]),Ke=mi(E.ref,Ve),Qe=mi(S,Ke),Ue=mi(De,Qe),ut=x.useState(!1),We=ut[0],ke=ut[1],Le=zAe(),Be=U_({props:t,muiFormControl:Le,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});Be.focused=Le?Le.focused:We,x.useEffect(function(){!Le&&c&&We&&(ke(!1),N&&N())},[Le,c,We,N]);var Ze=Le&&Le.onFilled,Et=Le&&Le.onEmpty,Yt=x.useCallback(function(dt){TG(dt)?Ze&&Ze():Et&&Et()},[Ze,Et]);REt(function(){Ne&&Yt({value:ce})},[ce,Yt,Ne]);var sr=function(bt){if(Be.disabled){bt.stopPropagation();return}B&&B(bt),E.onFocus&&E.onFocus(bt),Le&&Le.onFocus?Le.onFocus(bt):ke(!0)},Kt=function(bt){N&&N(bt),E.onBlur&&E.onBlur(bt),Le&&Le.onBlur?Le.onBlur(bt):ke(!1)},Qt=function(bt){if(!Ne){var nr=bt.target||De.current;if(nr==null)throw new Error(Rg(1));Yt({value:nr.value})}for(var Ee=arguments.length,Oe=new Array(Ee>1?Ee-1:0),Re=1;Re<Ee;Re++)Oe[Re-1]=arguments[Re];E.onChange&&E.onChange.apply(E,[bt].concat(Oe)),M&&M.apply(void 0,[bt].concat(Oe))};x.useEffect(function(){Yt(De.current)},[]);var qt=function(bt){De.current&&bt.currentTarget===bt.target&&De.current.focus(),F&&F(bt)},hr=_,rr=ve({},E,{ref:Ue});typeof hr!="string"?rr=ve({inputRef:Ue,type:Ae},rr,{ref:null}):O?ae&&!le&&!fe&&!Q&&!ie?hr="textarea":(rr=ve({minRows:ae||fe,rowsMax:Q,maxRows:le},rr),hr=TEt):rr=ve({type:Ae},rr);var tr=function(bt){Yt(bt.animationName==="mui-auto-fill-cancel"?De.current:{value:"x"})};return x.useEffect(function(){Le&&Le.setAdornedStart(!!de)},[Le,de]),x.createElement("div",ve({className:Ut(o.root,o["color".concat(zr(Be.color||"primary"))],s,Be.disabled&&o.disabled,Be.error&&o.error,h&&o.fullWidth,Be.focused&&o.focused,Le&&o.formControl,O&&o.multiline,de&&o.adornedStart,d&&o.adornedEnd,Be.margin==="dense"&&o.marginDense),onClick:qt,ref:r},Pe),de,x.createElement(h2.Provider,{value:null},x.createElement(hr,ve({"aria-invalid":Be.error,"aria-describedby":n,autoComplete:i,autoFocus:a,defaultValue:l,disabled:Be.disabled,id:p,onAnimationStart:tr,name:I,placeholder:$,readOnly:X,required:Be.required,rows:ae,value:ce,onKeyDown:V,onKeyUp:W},rr,{className:Ut(o.input,E.className,Be.disabled&&o.disabled,O&&o.inputMultiline,Be.hiddenLabel&&o.inputHiddenLabel,de&&o.inputAdornedStart,d&&o.inputAdornedEnd,Ae==="search"&&o.inputTypeSearch,Be.margin==="dense"&&o.inputMarginDense),onBlur:Kt,onChange:Qt,onFocus:sr}))),d,re?re(ve({},Be,{startAdornment:de})):null)});const Hu=yr(PEt,{name:"MuiInputBase"})(OEt);var IEt=function(t){var r=t.palette.type==="light",n=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:i,borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:r?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:i}},"&$focused":{backgroundColor:r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:t.palette.secondary.main}}
153,underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(t.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:t.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.type==="light"?null:"#fff",caretColor:t.palette.type==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},jAe=x.forwardRef(function(t,r){var n=t.disableUnderline,i=t.classes,a=t.fullWidth,o=a===void 0?!1:a,s=t.inputComponent,l=s===void 0?"input":s,c=t.multiline,d=c===void 0?!1:c,f=t.type,h=f===void 0?"text":f,p=Mt(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return x.createElement(Hu,ve({classes:ve({},i,{root:Ut(i.root,!n&&i.underline),underline:null}),fullWidth:o,inputComponent:l,multiline:d,ref:r,type:h},p))});jAe.muiName="Input";const $Ae=yr(IEt,{name:"MuiFilledInput"})(jAe);var kEt={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},NEt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.color,s=o===void 0?"primary":o,l=t.component,c=l===void 0?"div":l,d=t.disabled,f=d===void 0?!1:d,h=t.error,p=h===void 0?!1:h,g=t.fullWidth,_=g===void 0?!1:g,b=t.focused,E=t.hiddenLabel,S=E===void 0?!1:E,P=t.margin,O=P===void 0?"none":P,I=t.required,N=I===void 0?!1:I,M=t.size,F=t.variant,B=F===void 0?"standard":F,V=Mt(t,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),W=x.useState(function(){var ce=!1;return n&&x.Children.forEach(n,function(pe){if(IS(pe,["Input","Select"])){var Ne=IS(pe,["Select"])?pe.props.input:pe;Ne&&AEt(Ne.props)&&(ce=!0)}}),ce}),$=W[0],X=W[1],re=x.useState(function(){var ce=!1;return n&&x.Children.forEach(n,function(pe){IS(pe,["Input","Select"])&&TG(pe.props,!0)&&(ce=!0)}),ce}),ae=re[0],Q=re[1],ie=x.useState(!1),le=ie[0],fe=ie[1],de=b!==void 0?b:le;f&&de&&fe(!1);var ge,Ae=x.useCallback(function(){Q(!0)},[]),Fe=x.useCallback(function(){Q(!1)},[]),Pe={adornedStart:$,setAdornedStart:X,color:s,disabled:f,error:p,filled:ae,focused:de,fullWidth:_,hiddenLabel:S,margin:(M==="small"?"dense":void 0)||O,onBlur:function(){fe(!1)},onEmpty:Fe,onFilled:Ae,onFocus:function(){fe(!0)},registerEffect:ge,required:N,variant:B};return x.createElement(h2.Provider,{value:Pe},x.createElement(c,ve({className:Ut(i.root,a,O!=="none"&&i["margin".concat(zr(O))],_&&i.fullWidth),ref:r},V),n))});const um=yr(kEt,{name:"MuiFormControl"})(NEt);var DEt=function(t){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:t.palette.text.disabled}}}},MEt=x.forwardRef(function(t,r){t.checked;var n=t.classes,i=t.className,a=t.control,o=t.disabled;t.inputRef;var s=t.label,l=t.labelPlacement,c=l===void 0?"end":l;
153t.name,t.onChange,t.value;var d=Mt(t,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"]),f=h0(),h=o;typeof h>"u"&&typeof a.props.disabled<"u"&&(h=a.props.disabled),typeof h>"u"&&f&&(h=f.disabled);var p={disabled:h};return["checked","name","onChange","value","inputRef"].forEach(function(g){typeof a.props[g]>"u"&&typeof t[g]<"u"&&(p[g]=t[g])}),x.createElement("label",ve({className:Ut(n.root,i,c!=="end"&&n["labelPlacement".concat(zr(c))],h&&n.disabled),ref:r},d),x.cloneElement(a,p),x.createElement(fo,{component:"span",className:Ut(n.label,h&&n.disabled)},s))});const Mg=yr(DEt,{name:"MuiFormControlLabel"})(MEt);var LEt={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},FEt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.row,o=a===void 0?!1:a,s=Mt(t,["classes","className","row"]);return x.createElement("div",ve({className:Ut(n.root,i,o&&n.row),ref:r},s))});const BEt=yr(LEt,{name:"MuiFormGroup"})(FEt);var zEt=function(t){return{root:ve({color:t.palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:t.palette.text.disabled},"&$error":{color:t.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}},HEt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.component,s=o===void 0?"p":o;t.disabled,t.error,t.filled,t.focused,t.margin,t.required,t.variant;var l=Mt(t,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"]),c=h0(),d=U_({props:t,muiFormControl:c,states:["variant","margin","disabled","error","filled","focused","required"]});return x.createElement(s,ve({className:Ut(i.root,(d.variant==="filled"||d.variant==="outlined")&&i.contained,a,d.disabled&&i.disabled,d.error&&i.error,d.filled&&i.filled,d.focused&&i.focused,d.required&&i.required,d.margin==="dense"&&i.marginDense),ref:r},l),n===" "?x.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):n)});const h4=yr(zEt,{name:"MuiFormHelperText"})(HEt);var UEt=function(t){return{root:ve({color:t.palette.text.secondary},t.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled},"&$error":{color:t.palette.error.main}}),colorSecondary:{"&$focused":{color:t.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:t.palette.error.main}}}},VEt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className;t.color;var o=t.component,s=o===void 0?"label":o;t.disabled,t.error,t.filled,t.focused,t.required;var l=Mt(t,["children","classes","className","color","component","disabled","error","filled","focused","required"]),c=h0(),d=U_({props:t,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]});
153return x.createElement(s,ve({className:Ut(i.root,i["color".concat(zr(d.color||"primary"))],a,d.disabled&&i.disabled,d.error&&i.error,d.filled&&i.filled,d.focused&&i.focused,d.required&&i.required),ref:r},l),n,d.required&&x.createElement("span",{"aria-hidden":!0,className:Ut(i.asterisk,d.error&&i.error)}," ","*"))});const qEt=yr(UEt,{name:"MuiFormLabel"})(VEt);var jEt=[0,1,2,3,4,5,6,7,8,9,10],$Et=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function WEt(e,t,r){var n={};$Et.forEach(function(i){var a="grid-".concat(r,"-").concat(i);if(i===!0){n[a]={flexBasis:0,flexGrow:1,maxWidth:"100%"};return}if(i==="auto"){n[a]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};return}var o="".concat(Math.round(i/12*1e8)/1e6,"%");n[a]={flexBasis:o,flexGrow:0,maxWidth:o}}),r==="xs"?ve(e,n):e[t.breakpoints.up(r)]=n}function aL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=parseFloat(e);return"".concat(r/t).concat(String(e).replace(String(r),"")||"px")}function GEt(e,t){var r={};return jEt.forEach(function(n){var i=e.spacing(n);i!==0&&(r["spacing-".concat(t,"-").concat(n)]={margin:"-".concat(aL(i,2)),width:"calc(100% + ".concat(aL(i),")"),"& > $item":{padding:aL(i,2)}})}),r}var KEt=function(t){return ve({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},GEt(t,"xs"),t.breakpoints.keys.reduce(function(r,n){return WEt(r,t,n),r},{}))},YEt=x.forwardRef(function(t,r){var n=t.alignContent,i=n===void 0?"stretch":n,a=t.alignItems,o=a===void 0?"stretch":a,s=t.classes,l=t.className,c=t.component,d=c===void 0?"div":c,f=t.container,h=f===void 0?!1:f,p=t.direction,g=p===void 0?"row":p,_=t.item,b=_===void 0?!1:_,E=t.justify,S=t.justifyContent,P=S===void 0?"flex-start":S,O=t.lg,I=O===void 0?!1:O,N=t.md,M=N===void 0?!1:N,F=t.sm,B=F===void 0?!1:F,V=t.spacing,W=V===void 0?0:V,$=t.wrap,X=$===void 0?"wrap":$,re=t.xl,ae=re===void 0?!1:re,Q=t.xs,ie=Q===void 0?!1:Q,le=t.zeroMinWidth,fe=le===void 0?!1:le,de=Mt(t,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),ge=Ut(s.root,l,h&&[s.container,W!==0&&s["spacing-xs-".concat(String(W))]],b&&s.item,fe&&s.zeroMinWidth,g!=="row"&&s["direction-xs-".concat(String(g))],X!=="wrap"&&s["wrap-xs-".concat(String(X))],o!=="stretch"&&s["align-items-xs-".concat(String(o))],i!=="stretch"&&s["align-content-xs-".concat(String(i))],(E||P)!=="flex-start"&&s["justify-content-xs-".concat(String(E||P))],ie!==!1&&s["grid-xs-".concat(String(ie))],B!==!1&&s["grid-sm-".concat(String(B))],M!==!1&&s["grid-md-".concat(String(M))],I!==!1&&s["grid-lg-".concat(String(I))],ae!==!1&&s["grid-xl-".concat(String(ae))]);return x.createElement(d,ve({className:ge,ref:r},de))}),oL=yr(KEt,{name:"MuiGrid"})(YEt);function iV(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var XEt={entering:{opacity:1,transform:iV(1)},entered:{opacity:1,transform:"none"}},p4=x.forwardRef(function(t,r){var n=t.children,i=t.disableStrictModeCompat,a=i===void 0?!1:i,o=t.in,s=t.onEnter,l=t.onEntered,c=t.onEntering,d=t.onExit,f=t.onExited,h=t.onExiting,p=t.style,g=t.timeout,_=g===void 0?"auto":g,b=t.TransitionComponent,E=b===void 0?gc:b,S=Mt(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=x.useRef(),O=x.useRef(),I=ts(),N=I.unstable_strictMode&&!a,M=x.useRef(null),F=mi(n.ref,r),B=mi(N?M:void 0,F),V=function(fe){return function(de,ge){if(fe){var Ae=N?[M.current,de]:[de,ge],Fe
153=Zo(Ae,2),Pe=Fe[0],ce=Fe[1];ce===void 0?fe(Pe):fe(Pe,ce)}}},W=V(c),$=V(function(le,fe){SG(le);var de=lm({style:p,timeout:_},{mode:"enter"}),ge=de.duration,Ae=de.delay,Fe;_==="auto"?(Fe=I.transitions.getAutoHeightDuration(le.clientHeight),O.current=Fe):Fe=ge,le.style.transition=[I.transitions.create("opacity",{duration:Fe,delay:Ae}),I.transitions.create("transform",{duration:Fe*.666,delay:Ae})].join(","),s&&s(le,fe)}),X=V(l),re=V(h),ae=V(function(le){var fe=lm({style:p,timeout:_},{mode:"exit"}),de=fe.duration,ge=fe.delay,Ae;_==="auto"?(Ae=I.transitions.getAutoHeightDuration(le.clientHeight),O.current=Ae):Ae=de,le.style.transition=[I.transitions.create("opacity",{duration:Ae,delay:ge}),I.transitions.create("transform",{duration:Ae*.666,delay:ge||Ae*.333})].join(","),le.style.opacity="0",le.style.transform=iV(.75),d&&d(le)}),Q=V(f),ie=function(fe,de){var ge=N?fe:de;_==="auto"&&(P.current=setTimeout(ge,O.current||0))};return x.useEffect(function(){return function(){clearTimeout(P.current)}},[]),x.createElement(E,ve({appear:!0,in:o,nodeRef:N?M:void 0,onEnter:$,onEntered:X,onEntering:W,onExit:ae,onExited:Q,onExiting:re,addEndListener:ie,timeout:_==="auto"?null:_},S),function(le,fe){return x.cloneElement(n,ve({style:ve({opacity:0,transform:iV(.75),visibility:le==="exited"&&!o?"hidden":void 0},XEt[le],p,n.props.style),ref:B},fe))})});p4.muiSupportAuto=!0;function yc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=f0(),n=i4({theme:r,name:"MuiUseMediaQuery",props:{}}),i=typeof e=="function"?e(r):e;i=i.replace(/^@media( ?)/m,"");var a=typeof window<"u"&&typeof window.matchMedia<"u",o=ve({},n,t),s=o.defaultMatches,l=s===void 0?!1:s,c=o.matchMedia,d=c===void 0?a?window.matchMedia:null:c,f=o.noSsr,h=f===void 0?!1:f,p=o.ssrMatchMedia,g=p===void 0?null:p,_=x.useState(function(){return h&&a?d(i).matches:g?g(i).matches:l}),b=_[0],E=_[1];return x.useEffect(function(){var S=!0;if(a){var P=d(i),O=function(){S&&E(P.matches)};return O(),P.addListener(O),function(){S=!1,P.removeListener(O)}}},[i,d,a]),b}var ZEt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n?ks.indexOf(t)<=ks.indexOf(r):ks.indexOf(t)<ks.indexOf(r)},QEt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n?ks.indexOf(r)<=ks.indexOf(t):ks.indexOf(r)<ks.indexOf(t)},JEt=typeof window>"u"?x.useEffect:x.useLayoutEffect,ewt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(r){var n=t.withTheme,i=n===void 0?!1:n,a=t.noSSR,o=a===void 0?!1:a,s=t.initialWidth;function l(c){var d=ts(),f=c.theme||d,h=i4({theme:f,name:"MuiWithWidth",props:ve({},c)}),p=h.initialWidth,g=h.width,_=Mt(h,["initialWidth","width"]),b=x.useState(!1),E=b[0],S=b[1];JEt(function(){S(!0)},[]);var P=f.breakpoints.keys.slice().reverse(),O=P.reduce(function(N,M){var F=yc(f.breakpoints.up(M));return!N&&F?M:N},null),I=ve({width:g||(E||o?O:void 0)||p||s},i?{theme:f}:{},_);return I.width===void 0?null:x.createElement(r,I)}return cg(l,r),l}};function WAe(e){var t=e.children,r=e.only,n=e.width,i=ts(),a=!0;if(r)if(Array.isArray(r))for(var o=0;o<r.length;o+=1){var s=r[o];if(n===s){a=!1;break}}else r&&n===r&&(a=!1);if(a)for(var l=0;l<i.breakpoints.keys.length;l+=1){var c=i.breakpoints.keys[l],d=e["".concat(c,"Up")],f=e["".concat(c,"Down")];if(d&&ZEt(c,n)||f&&QEt(c,n)){a=!1;break}}return a?t:null}WAe.propTypes={children:xe.node,className:xe.string,implementation:xe.oneOf(["js","css"]),initialWidth:xe.oneOf(["xs","sm","md","lg","xl"]),lgDown:xe.bool,lgUp:xe.bool,mdDown:xe.bool,mdUp:xe.bool,only:xe.oneOfType([xe.oneOf(["xs","sm","md","lg","xl"]),xe.arrayOf(xe.oneOf(["xs","sm","md","lg","xl"]))]),smDown:xe.bool,smUp:xe.bool,width:xe.string.isRequired,xlDown:xe.bool,xlUp:xe.bool,xsDown:xe.bool,xsUp:xe.bool};const twt=ewt()(WAe);var rwt=function(t){var r={display:"none"};return t.breakpoints.keys.reduce(function(n,i){return n["only".concat(zr(i))]=Nt({},t.breakpoints.only(i),r),n["".concat(i,"Up")]=Nt({},t.breakpoints.up(i),r),n["".concat(i,"Down")]=Nt({},t.breakpoints.down(i),r),n},{})};function nwt(e){var t=e.children,r=e.classes,n=e.className,i=e.only;Mt(e,["children","classes","className","only"]);var a=ts(),o=[];
153n&&o.push(n);for(var s=0;s<a.breakpoints.keys.length;s+=1){var l=a.breakpoints.keys[s],c=e["".concat(l,"Up")],d=e["".concat(l,"Down")];c&&o.push(r["".concat(l,"Up")]),d&&o.push(r["".concat(l,"Down")])}if(i){var f=Array.isArray(i)?i:[i];f.forEach(function(h){o.push(r["only".concat(zr(h))])})}return x.createElement("div",{className:o.join(" ")},t)}const iwt=yr(rwt,{name:"PrivateHiddenCss"})(nwt);function Py(e){var t=e.implementation,r=t===void 0?"js":t,n=e.lgDown,i=n===void 0?!1:n,a=e.lgUp,o=a===void 0?!1:a,s=e.mdDown,l=s===void 0?!1:s,c=e.mdUp,d=c===void 0?!1:c,f=e.smDown,h=f===void 0?!1:f,p=e.smUp,g=p===void 0?!1:p,_=e.xlDown,b=_===void 0?!1:_,E=e.xlUp,S=E===void 0?!1:E,P=e.xsDown,O=P===void 0?!1:P,I=e.xsUp,N=I===void 0?!1:I,M=Mt(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return r==="js"?x.createElement(twt,ve({lgDown:i,lgUp:o,mdDown:l,mdUp:d,smDown:h,smUp:g,xlDown:b,xlUp:S,xsDown:O,xsUp:N},M)):x.createElement(iwt,ve({lgDown:i,lgUp:o,mdDown:l,mdUp:d,smDown:h,smUp:g,xlDown:b,xlUp:S,xsDown:O,xsUp:N},M))}var awt=function(t){return{root:{userSelect:"none",fontSize:t.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(36)}}},GAe=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=a===void 0?"inherit":a,s=t.component,l=s===void 0?"span":s,c=t.fontSize,d=c===void 0?"medium":c,f=Mt(t,["classes","className","color","component","fontSize"]);return x.createElement(l,ve({className:Ut("material-icons",n.root,i,o!=="inherit"&&n["color".concat(zr(o))],d!=="default"&&d!=="medium"&&n["fontSize".concat(zr(d))]),"aria-hidden":!0,ref:r},f))});GAe.muiName="Icon";const Lg=yr(awt,{name:"MuiIcon"})(GAe);var owt=function(t){var r=t.palette.type==="light",n=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:t.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(t.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},KAe=x.forwardRef(function(t,r){var n=t.disableUnderline,i=t.classes,a=t.fullWidth,o=a===void 0?!1:a,s=t.inputComponent,l=s===void 0?"input":s,c=t.multiline,d=c===void 0?!1:c,f=t.type,h=f===void 0?"text":f,p=Mt(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return x.createElement(Hu,ve({classes:ve({},i,{root:Ut(i.root,!n&&i.underline),underline:null}),fullWidth:o,inputComponent:l,multiline:d,ref:r,type:h},p))});KAe.muiName="Input";const AG=yr(owt,{name:"MuiInput"})(KAe);var swt={root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},lwt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.component,s=o===void 0?"div":o,l=t.disablePointerEvents,c=l===void 0?!1:l,d=t.disableTypography,f=d===void 0?!1:d,h=t.position,p=t.variant,g=Mt(t,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),_=zAe()||{},b=p;return p&&_.variant,_&&!b&&(b=_.variant),x.createElement(h2.Provider,{value:null},x.createElement(s,ve({className:Ut(i.root,a,h==="end"?i.positionEnd:i.positionStart,c&&i.disablePointerEvents,_.hiddenLabel&&i.hiddenLabel,b==="filled"&&i.filled,_.margin==="dense"&&i.marginDense),ref:r},g),typeof n=="string"&&!f?x.createElement(fo,{color:"textSecondary"},n):n))});const Fg=yr(swt,{name:"MuiInputAdornment"})(lwt);var cwt=function(t){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:t.transitions.create(["color","transform"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7
153px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}},uwt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.disableAnimation,o=a===void 0?!1:a;t.margin;var s=t.shrink;t.variant;var l=Mt(t,["classes","className","disableAnimation","margin","shrink","variant"]),c=h0(),d=s;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);var f=U_({props:t,muiFormControl:c,states:["margin","variant"]});return x.createElement(qEt,ve({"data-shrink":d,className:Ut(n.root,i,c&&n.formControl,!o&&n.animated,d&&n.shrink,f.margin==="dense"&&n.marginDense,{filled:n.filled,outlined:n.outlined}[f.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:r},l))});const dm=yr(cwt,{name:"MuiInputLabel"})(uwt);var sL=4,dwt=function(t){var r=function(o){return t.palette.type==="light"?kg(o,.62):Ig(o,.5)},n=r(t.palette.primary.main),i=r(t.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:n},colorSecondary:{backgroundColor:i},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(i," 0%, ").concat(i," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:t.palette.primary.main},barColorSecondary:{backgroundColor:t.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(sL,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(sL,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(sL,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}},fwt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=a===void 0?"primary":a,s=t.value,l=t.valueBuffer,c=t.variant,d=c===void 0?"indeterminate":c,f=Mt(t,["classes","className","color","value","valueBuffer","variant"]),h=ts(),p={},g={bar1:{},bar2:{}};if((d==="determinate"||d==="buffer")&&s!==void 0){p["aria-valuenow"]=Math.round(s),p["aria-valuemin"]=0,p["aria-valuemax"]=100;var _=s-100;h.direction==="rtl"&&(_=-_),g.bar1.transform="translateX(".concat(_,"%)")}if(d==="buffer"&&l!==void 0){var b=(l||0)-100;h.direction==="rtl"&&(b=-b),g.bar2.transform="translateX(".concat(b,"%)")}return x.createElement("div",ve({className:Ut(n.root,n["color".concat(zr(o))],i,{determinate:n.determinate,indeterminate:n.indeterminate,buffer:n.buffer,query:n.query}[d]),role:"progressbar"},p,{ref:r},f),d==="buffer"?x.createElement("div",{className:Ut(n.dashed,n["dashedColor".concat(zr(o))])}):null,x.createElement("div",{className:Ut(n.bar,n["barColor".concat(zr(o))],(d==="indeterminate"||d==="query")&&n.bar1Indeterminate,{determinate:n.bar1Determinate,buffer:n.bar1Buffer}[d]),style:g.bar1}),d==="determinate"?null:x.createElement("div",{className:Ut(n.bar,(d==="indeterminate"||d==="query")&&n.bar2Indeterminate,d==="buffer"?[n["color".concat(zr(o))],n.bar2Buffer]:n["barColor".concat(zr(o))]),style:g.bar2}))});const V_=yr(dwt,{name:"MuiLinearProgress"})(fwt);var Ky=x.createContext({}),hwt={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},pwt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.component,s=o===void 0?"ul":o,l=t.dense,c=l===void 0?!1:l,d=t.disablePadding,f=d===void 0?!1:d,h=t.subheader,p=Mt(t,["children","classes","className","component","dense","disablePadding","subheader"]),g=x.useMemo(function(){return{dense:c}},[c]);return x.createElement(Ky.Provider,{value:g},x.createElement(s,ve({className:Ut(i.root,a,c&&i.dense,!f&&i.padding,h&&i.subheader),ref:r},p),h,n))});const YAe=yr(hwt,{name:"MuiList"})(pwt);var mwt=function(t){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:t.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:t.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},vwt=typeof window>"u"?x.useEffect:x.useLayoutEffect,gwt=x.forwardRef(function(t,r){var n=t.alignItems,i=n===void 0?"center":n,a=t.autoF
153ocus,o=a===void 0?!1:a,s=t.button,l=s===void 0?!1:s,c=t.children,d=t.classes,f=t.className,h=t.component,p=t.ContainerComponent,g=p===void 0?"li":p,_=t.ContainerProps;_=_===void 0?{}:_;var b=_.className,E=Mt(_,["className"]),S=t.dense,P=S===void 0?!1:S,O=t.disabled,I=O===void 0?!1:O,N=t.disableGutters,M=N===void 0?!1:N,F=t.divider,B=F===void 0?!1:F,V=t.focusVisibleClassName,W=t.selected,$=W===void 0?!1:W,X=Mt(t,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),re=x.useContext(Ky),ae={dense:P||re.dense||!1,alignItems:i},Q=x.useRef(null);vwt(function(){o&&Q.current&&Q.current.focus()},[o]);var ie=x.Children.toArray(c),le=ie.length&&IS(ie[ie.length-1],["ListItemSecondaryAction"]),fe=x.useCallback(function(Fe){Q.current=vo.findDOMNode(Fe)},[]),de=mi(fe,r),ge=ve({className:Ut(d.root,f,ae.dense&&d.dense,!M&&d.gutters,B&&d.divider,I&&d.disabled,l&&d.button,i!=="center"&&d.alignItemsFlexStart,le&&d.secondaryAction,$&&d.selected),disabled:I},X),Ae=h||"li";return l&&(ge.component=h||"div",ge.focusVisibleClassName=Ut(d.focusVisible,V),Ae=cm),le?(Ae=!ge.component&&!h?"div":Ae,g==="li"&&(Ae==="li"?Ae="div":ge.component==="li"&&(ge.component="div")),x.createElement(Ky.Provider,{value:ae},x.createElement(g,ve({className:Ut(d.container,b),ref:de},E),x.createElement(Ae,ge,ie),ie.pop()))):x.createElement(Ky.Provider,{value:ae},x.createElement(Ae,ve({ref:de},ge),ie))});const aV=yr(mwt,{name:"MuiListItem"})(gwt);var ywt={root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}},_wt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=Mt(t,["classes","className"]),o=x.useContext(Ky);return x.createElement("div",ve({className:Ut(n.root,i,o.alignItems==="flex-start"&&n.alignItemsFlexStart),ref:r},a))});const Rle=yr(ywt,{name:"MuiListItemAvatar"})(_wt);var bwt={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},Ewt=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.className,o=t.disableTypography,s=o===void 0?!1:o,l=t.inset,c=l===void 0?!1:l,d=t.primary,f=t.primaryTypographyProps,h=t.secondary,p=t.secondaryTypographyProps,g=Mt(t,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),_=x.useContext(Ky),b=_.dense,E=d??n;E!=null&&E.type!==fo&&!s&&(E=x.createElement(fo,ve({variant:b?"body2":"body1",className:i.primary,component:"span",display:"block"},f),E));var S=h;return S!=null&&S.type!==fo&&!s&&(S=x.createElement(fo,ve({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},p),S)),x.createElement("div",ve({className:Ut(i.root,a,b&&i.dense,c&&i.inset,E&&S&&i.multiline),ref:r},g),E,S)});const oV=yr(bwt,{name:"MuiListItemText"})(Ewt);var wwt=function(t){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:t.palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},colorPrimary:{color:t.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}},Swt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=a===void 0?"default":a,s=t.component,l=s===void 0?"li":s,c=t.disableGutters,d=c===void 0?!1:c,f=t.disableSticky,h=f===void 0?!1:f,p=t.inset,g=p===void 0?!1:p,_=Mt(t,["classes","className","color","component","disableGutters","disableSticky","inset"]);return x.createElement(l,ve({className:Ut(n.root,i,o!=="default"&&n["color".concat(zr(o))],g&&n.inset,!h&&n.sticky,!d&&n.gutters),ref:r},_))});const PG=yr(wwt,{name:"MuiListSubheader"})(Swt);function Ole(e,t){var r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Ile(e,t){var r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function kle(e){return[e.horizontal,e.vertical].map(function(t){return typeof t=="number"?"".concat(t,"px"):t}).join(" ")}function Cwt(e,t){for(var r=t,n=0;r&&r!==e;)r=r.parentElement,n+=r.scrollTop;return n}function lL(e){return typeof e=="function"?e():e}var xwt={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},Twt=x.forwardRef(function(t,r){var n=t.action,i=t.anchorEl,a=t.anchorOrigin,o=a===void 0?{vertical:"top",horizontal:"left"}:a,s=t.anchorPosition,l=t.anchorReference,c=l===void 0?"anchorEl":l,d=t.children,f=t.classes,h=t.className,p=t.container,g=t.elevation,_=g===void 0?8:g,b=t.getContentAnchorEl,E=t.marginThreshold,S=E===void 0?16:E,P=t.onEnter,O=t.onEntered,I=t.onEntering,N=t.onExit,M=t.onExited,F=t.onExiting,B=t.open,V=t.PaperProps,W=V===void 0?{}:V,$=t.transformOrigin,X=$===void 0?{vertical:"top",horizontal:"left"}:$,re=t.TransitionComponent,ae=re===void 0?p4:re,Q=t.transitionDuration,ie=Q===void 0?"auto":Q,le=t.TransitionProps,fe=le===void 0?{}:le,de=Mt(t,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","o
153pen","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),ge=x.useRef(),Ae=x.useCallback(function(Qe){if(c==="anchorPosition")return s;var Ue=lL(i),ut=Ue&&Ue.nodeType===1?Ue:ds(ge.current).body,We=ut.getBoundingClientRect(),ke=Qe===0?o.vertical:"center";return{top:We.top+Ole(We,ke),left:We.left+Ile(We,o.horizontal)}},[i,o.horizontal,o.vertical,s,c]),Fe=x.useCallback(function(Qe){var Ue=0;if(b&&c==="anchorEl"){var ut=b(Qe);if(ut&&Qe.contains(ut)){var We=Cwt(Qe,ut);Ue=ut.offsetTop+ut.clientHeight/2-We||0}}return Ue},[o.vertical,c,b]),Pe=x.useCallback(function(Qe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{vertical:Ole(Qe,X.vertical)+Ue,horizontal:Ile(Qe,X.horizontal)}},[X.horizontal,X.vertical]),ce=x.useCallback(function(Qe){var Ue=Fe(Qe),ut={width:Qe.offsetWidth,height:Qe.offsetHeight},We=Pe(ut,Ue);if(c==="none")return{top:null,left:null,transformOrigin:kle(We)};var ke=Ae(Ue),Le=ke.top-We.vertical,Be=ke.left-We.horizontal,Ze=Le+ut.height,Et=Be+ut.width,Yt=c4(lL(i)),sr=Yt.innerHeight-S,Kt=Yt.innerWidth-S;if(Le<S){var Qt=Le-S;Le-=Qt,We.vertical+=Qt}else if(Ze>sr){var qt=Ze-sr;Le-=qt,We.vertical+=qt}if(Be<S){var hr=Be-S;Be-=hr,We.horizontal+=hr}else if(Et>Kt){var rr=Et-Kt;Be-=rr,We.horizontal+=rr}return{top:"".concat(Math.round(Le),"px"),left:"".concat(Math.round(Be),"px"),transformOrigin:kle(We)}},[i,c,Ae,Fe,Pe,S]),pe=x.useCallback(function(){var Qe=ge.current;if(Qe){var Ue=ce(Qe);Ue.top!==null&&(Qe.style.top=Ue.top),Ue.left!==null&&(Qe.style.left=Ue.left),Qe.style.transformOrigin=Ue.transformOrigin}},[ce]),Ne=function(Ue,ut){I&&I(Ue,ut),pe()},De=x.useCallback(function(Qe){ge.current=vo.findDOMNode(Qe)},[]);x.useEffect(function(){B&&pe()}),x.useImperativeHandle(n,function(){return B?{updatePosition:function(){pe()}}:null},[B,pe]),x.useEffect(function(){if(B){var Qe=Ng(function(){pe()});return window.addEventListener("resize",Qe),function(){Qe.clear(),window.removeEventListener("resize",Qe)}}},[B,pe]);var Ve=ie;ie==="auto"&&!ae.muiSupportAuto&&(Ve=void 0);var Ke=p||(i?ds(lL(i)).body:void 0);return x.createElement(xG,ve({container:Ke,open:B,ref:r,BackdropProps:{invisible:!0},className:Ut(f.root,h)},de),x.createElement(ae,ve({appear:!0,in:B,onEnter:P,onEntered:O,onExit:N,onExited:M,onExiting:F,timeout:Ve},fe,{onEntering:gh(Ne,fe.onEntering)}),x.createElement(Qd,ve({elevation:_,ref:De},W,{className:Ut(f.paper,W.className)}),d)))});const m4=yr(xwt,{name:"MuiPopover"})(Twt);function cL(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function Nle(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function XAe(e,t){if(t===void 0)return!0;var r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function kb(e,t,r,n,i,a){for(var o=!1,s=i(e,t,t?r:!1);s;){if(s===e.firstChild){if(o)return;o=!0}var l=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!XAe(s,a)||l)s=i(e,s,r);else{s.focus();return}}}var Awt=typeof window>"u"?x.useEffect:x.useLayoutEffect,Pwt=x.forwardRef(function(t,r){var n=t.actions,i=t.autoFocus,a=i===void 0?!1:i,o=t.autoFocusItem,s=o===void 0?!1:o,l=t.children,c=t.className,d=t.disabledItemsFocusable,f=d===void 0?!1:d,h=t.disableListWrap,p=h===void 0?!1:h,g=t.onKeyDown,_=t.variant,b=_===void 0?"selectedMenu":_,E=Mt(t,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),S=x.useRef(null),P=x.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Awt(function(){a&&S.current.focus()},[a]),x.useImperativeHandle(n,function(){return{adjustStyleForScrollbar:function(V,W){var $=!S.current.style.width;if(V.clientHeight<S.current.clientHeight&&$){var X="".concat(UAe(),"px");S.current.style[W.direction==="rtl"?"paddingLeft":"paddingRight"]=X,S.current.style.width="calc(100% + ".concat(X,")")}return S.current}}},[]);var O=function(V){var W=S.current,$=V.key,X=ds(W).activeElement;if($==="ArrowDown")V.preventDefault(),kb(W,X,p,f,cL);else if($==="ArrowUp")V.preventDefault(),kb(W,X,p,f,Nle);else if($==="Home")V.preventDefault(),kb(W,null,p,f,cL);else if($==="End")V.preventDefault(),kb(W,null,p,f,Nle);else if($.length===1){var re=P.current,ae=$.toLowerCase(),Q=performance.now();re.keys.length>0&&(Q-re.lastTime>500?(re.keys=[],re.repeating=!0,re.previousKeyMatched=!0):re.repeating&&ae!==re.keys[0]&&(re.repeating=!1)),re.lastTime=Q,re.keys.push(ae);var ie=X&&!re.repeating&&XAe(X,re);re.previousKeyMatched&&(ie||kb(W,X,!1,f,cL,re))?V.preventDefault():re.previousKeyMatched=!1}g&&g(V)},I=x.useCallback(function(B){S.current=vo.findDOMNode(B)},[]),N=mi(I,r),M=-1;
153x.Children.forEach(l,function(B,V){x.isValidElement(B)&&(B.props.disabled||(b==="selectedMenu"&&B.props.selected||M===-1)&&(M=V))});var F=x.Children.map(l,function(B,V){if(V===M){var W={};return s&&(W.autoFocus=!0),B.props.tabIndex===void 0&&b==="selectedMenu"&&(W.tabIndex=0),x.cloneElement(B,W)}return B});return x.createElement(YAe,ve({role:"menu",ref:N,className:c,onKeyDown:O,tabIndex:a?0:-1},E),F)}),Dle={vertical:"top",horizontal:"right"},Mle={vertical:"top",horizontal:"left"},Rwt={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},Owt=x.forwardRef(function(t,r){var n=t.autoFocus,i=n===void 0?!0:n,a=t.children,o=t.classes,s=t.disableAutoFocusItem,l=s===void 0?!1:s,c=t.MenuListProps,d=c===void 0?{}:c,f=t.onClose,h=t.onEntering,p=t.open,g=t.PaperProps,_=g===void 0?{}:g,b=t.PopoverClasses,E=t.transitionDuration,S=E===void 0?"auto":E,P=t.TransitionProps;P=P===void 0?{}:P;var O=P.onEntering,I=Mt(P,["onEntering"]),N=t.variant,M=N===void 0?"selectedMenu":N,F=Mt(t,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),B=ts(),V=i&&!l&&p,W=x.useRef(null),$=x.useRef(null),X=function(){return $.current},re=function(fe,de){W.current&&W.current.adjustStyleForScrollbar(fe,B),h&&h(fe,de),O&&O(fe,de)},ae=function(fe){fe.key==="Tab"&&(fe.preventDefault(),f&&f(fe,"tabKeyDown"))},Q=-1;x.Children.map(a,function(le,fe){x.isValidElement(le)&&(le.props.disabled||(M!=="menu"&&le.props.selected||Q===-1)&&(Q=fe))});var ie=x.Children.map(a,function(le,fe){return fe===Q?x.cloneElement(le,{ref:function(ge){$.current=vo.findDOMNode(ge),yh(le.ref,ge)}}):le});return x.createElement(m4,ve({getContentAnchorEl:X,classes:b,onClose:f,TransitionProps:ve({onEntering:re},I),anchorOrigin:B.direction==="rtl"?Dle:Mle,transformOrigin:B.direction==="rtl"?Dle:Mle,PaperProps:ve({},_,{classes:ve({},_.classes,{root:o.paper})}),open:p,ref:r,transitionDuration:S},F),x.createElement(Pwt,ve({onKeyDown:ae,actions:W,autoFocus:i&&(Q===-1||l),autoFocusItem:V,variant:M},d,{className:Ut(o.list,d.className)}),ie))});const Zc=yr(Rwt,{name:"MuiMenu"})(Owt);var Iwt=function(t){return{root:ve({},t.typography.body1,Nt({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},t.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:ve({},t.typography.body2,{minHeight:"auto"})}},kwt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?"li":a,s=t.disableGutters,l=s===void 0?!1:s,c=t.ListItemClasses,d=t.role,f=d===void 0?"menuitem":d,h=t.selected,p=t.tabIndex,g=Mt(t,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),_;return t.disabled||(_=p!==void 0?p:-1),x.createElement(aV,ve({button:!0,role:f,tabIndex:_,component:o,selected:h,disableGutters:l,classes:ve({dense:n.dense},c),className:Ut(n.root,i,h&&n.selected,!l&&n.gutters),ref:r},g))});const ln=yr(Iwt,{name:"MuiMenuItem"})(kwt);var ZAe=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.disabled,o=t.IconComponent,s=t.inputRef,l=t.variant,c=l===void 0?"standard":l,d=Mt(t,["classes","className","disabled","IconComponent","inputRef","variant"]);return x.createElement(x.Fragment,null,x.createElement("select",ve({className:Ut(n.root,n.select,n[c],i,a&&n.disabled),disabled:a,ref:s||r},d)),t.multiple?null:x.createElement(o,{className:Ut(n.icon,n["icon".concat(zr(c))],a&&n.disabled)}))});const QAe=zo(x.createElement("path",{d:"M7 10l5 5 5-5z"}));var JAe=function(t){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:t.palette.type==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:t.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:t.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:t.palette.action.active,"&$disabled":{color:t.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},Nwt=x.createElement(AG,null),ePe=x.forwardRef(function(t,r){var n=t.children,i=t.classes,a=t.IconComponent,o=a===void 0?QAe:a,s=t.input,l=s===void 0?Nwt:s,c=t.inputProps;t.variant;var d=Mt(t,["children","classes","IconComponent","input","inputProps","variant"]),f=h0(),h=U_({props:t,muiFormControl:f,states:["variant"]});return x.cloneElement(l,ve({inputComponent:ZAe,inputProps:ve({children:n,classes:i,IconComponent:o,variant:h.variant,type:void 0},c,l?l.props.inputProps:{}),ref:r},d))});ePe.muiName="Select";yr(JAe,{name:"MuiNativeSelect"})(ePe);var Dwt=function(t){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}},Mwt=x.forwardRef(function(t,r){t.children;var n=t.classes,i=t.className,a=t.label,o=t.labelWidth,s=t.notched,l=t.style,c=Mt(t,["children","classes","className","label","labelWidth","notched","style"]),d=ts(),f=d.direction==="rtl"?"right":"left";if(a!==void 0)return x.createElement("fieldset",ve({"aria-hidden":!0,
153className:Ut(n.root,i),ref:r,style:l},c),x.createElement("legend",{className:Ut(n.legendLabelled,s&&n.legendNotched)},a?x.createElement("span",null,a):x.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var h=o>0?o*.75+8:.01;return x.createElement("fieldset",ve({"aria-hidden":!0,style:ve(Nt({},"padding".concat(zr(f)),8),l),className:Ut(n.root,i),ref:r},c),x.createElement("legend",{className:n.legend,style:{width:s?h:.01}},x.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))});const Lwt=yr(Dwt,{name:"PrivateNotchedOutline"})(Mwt);var Fwt=function(t){var r=t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:t.shape.borderRadius,"&:hover $notchedOutline":{borderColor:t.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:r}},"&$focused $notchedOutline":{borderColor:t.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:t.palette.error.main},"&$disabled $notchedOutline":{borderColor:t.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:t.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:r},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:t.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.type==="light"?null:"#fff",caretColor:t.palette.type==="light"?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},tPe=x.forwardRef(function(t,r){var n=t.classes,i=t.fullWidth,a=i===void 0?!1:i,o=t.inputComponent,s=o===void 0?"input":o,l=t.label,c=t.labelWidth,d=c===void 0?0:c,f=t.multiline,h=f===void 0?!1:f,p=t.notched,g=t.type,_=g===void 0?"text":g,b=Mt(t,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return x.createElement(Hu,ve({renderSuffix:function(S){return x.createElement(Lwt,{className:n.notchedOutline,label:l,labelWidth:d,notched:typeof p<"u"?p:!!(S.startAdornment||S.filled||S.focused)})},classes:ve({},n,{root:Ut(n.root,n.underline),notchedOutline:null}),fullWidth:a,inputComponent:s,multiline:h,ref:r,type:_},b))});tPe.muiName="Input";const RG=yr(Fwt,{name:"MuiOutlinedInput"})(tPe);var p2=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Bwt=(function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(p2&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0})();function zwt(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function Hwt(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Bwt))}}var Uwt=p2&&window.Promise,Vwt=Uwt?zwt:Hwt;function rPe(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function m0(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function OG(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function m2(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=m0(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:m2(OG(e))}function nPe(e){return e&&e.referenceNode?e.referenceNode:e}var Lle=p2&&!!(window.MSInputMethodContext&&document.documentMode),Fle=p2&&/MSIE 10/.test(navigator.userAgent);function q_(e){return e===11?Lle:e===10?Fle:Lle||Fle}function z1(e){if(!e)return document.documentElement;for(var t=q_(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&m0(r,"position")==="static"?z1(r):r}function qwt(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||z1(e.firstElementChild)===e}function sV(e){return e.parentNode!==null?sV(e.parentNode):e}function yI(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,a=document.createRange();a.setStart(n,0),a.setEnd(i,0);var o=a.commonAncestorContainer;if(e!==o&&t!==o||n.contains(i))return qwt(o)?o:z1(o);var s=sV(e);return s.host?yI(s.host,t):yI(e,sV(t).host)}function H1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[r]}return e[r]}function jwt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=H1(t,"top"),i=H1(t,"left"),a=r?-1:1;return e.top+=n*a,e.bottom+=n*a,e.left+=i*a,e.right+=i*a,e}function Ble(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function zle(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],q_(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function iPe(e){var t=e.body,r=e.documentElement,n=q_(10)&&getComputedStyle(r);return{height:zle("Height",t,r,n),width:zle("Width",t,r,n)}}var $wt=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Wwt=(function(){function e(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}})(),U1=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},Fc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 18,807 bytes, line 153
153for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function fm(e){return Fc({},e,{right:e.left+e.width,bottom:e.top+e.height})}function lV(e){var t={};try{if(q_(10)){t=e.getBoundingClientRect();var r=H1(e,"top"),n=H1(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a=e.nodeName==="HTML"?iPe(e.ownerDocument):{},o=a.width||e.clientWidth||i.width,s=a.height||e.clientHeight||i.height,l=e.offsetWidth-o,c=e.offsetHeight-s;if(l||c){var d=m0(e);l-=Ble(d,"x"),c-=Ble(d,"y"),i.width-=l,i.height-=c}return fm(i)}function IG(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=q_(10),i=t.nodeName==="HTML",a=lV(e),o=lV(t),s=m2(e),l=m0(t),c=parseFloat(l.borderTopWidth),d=parseFloat(l.borderLeftWidth);r&&i&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=fm({top:a.top-o.top-c,left:a.left-o.left-d,width:a.width,height:a.height});if(f.marginTop=0,f.marginLeft=0,!n&&i){var h=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=c-h,f.bottom-=c-h,f.left-=d-p,f.right-=d-p,f.marginTop=h,f.marginLeft=p}return(n&&!r?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=jwt(f,t)),f}function Gwt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=IG(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),a=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:H1(r),s=t?0:H1(r,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:a};return fm(l)}function aPe(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(m0(e,"position")==="fixed")return!0;var r=OG(e);return r?aPe(r):!1}function oPe(e){if(!e||!e.parentElement||q_())return document.documentElement;for(var t=e.parentElement;t&&m0(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function kG(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a={top:0,left:0},o=i?oPe(e):yI(e,nPe(t));if(n==="viewport")a=Gwt(o,i);else{var s=void 0;n==="scrollParent"?(s=m2(OG(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):n==="window"?s=e.ownerDocument.documentElement:s=n;var l=IG(s,o,i);if(s.nodeName==="HTML"&&!aPe(o)){var c=iPe(e.ownerDocument),d=c.height,f=c.width;a.top+=l.top-l.marginTop,a.bottom=d+l.top,a.left+=l.left-l.marginLeft,a.right=f+l.left}else a=l}r=r||0;var h=typeof r=="number";return a.left+=h?r:r.left||0,a.top+=h?r:r.top||0,a.right-=h?r:r.right||0,a.bottom-=h?r:r.bottom||0,a}function Kwt(e){var t=e.width,r=e.height;return t*r}function sPe(e,t,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=kG(r,n,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(h){return Fc({key:h},s[h],{area:Kwt(s[h])})}).sort(function(h,p){return p.area-h.area}),c=l.filter(function(h){var p=h.width,g=h.height;return p>=r.clientWidth&&g>=r.clientHeight}),d=c.length>0?c[0].key:l[0].key,f=e.split("-")[1];return d+(f?"-"+f:"")}function lPe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=n?oPe(t):yI(t,nPe(r));return IG(r,i,n)}function cPe(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),i=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),a={width:e.offsetWidth+i,height:e.offsetHeight+n};return a}function _I(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function uPe(e,t,r){r=r.split("-")[0];var n=cPe(e),i={width:n.width,height:n.height},a=["right","left"].indexOf(r)!==-1,o=a?"top":"left",s=a?"left":"top",l=a?"height":"width",c=a?"width":"height";return i[o]=t[o]+t[l]/2-n[l]/2,r===s?i[s]=t[s]-n[c]:i[s]=t[_I(s)],i}function v2(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Ywt(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===r});var n=v2(e,function(i){return i[t]===r});return e.indexOf(n)}function dPe(e,t,r){var n=r===void 0?e:e.slice(0,Ywt(e,"name",r));return n.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var a=i.function||i.fn;i.enabled&&rPe(a)&&(t.offsets.popper=fm(t.offsets.popper),t.offsets.reference=fm(t.offsets.reference),t=a(t,i))}),t}function Xwt(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=lPe(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=sPe(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=uPe(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=dPe(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function fPe(e,t){return e.some(function(r){var n=r.name,i=r.enabled;return i&&n===t})}function NG(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],a=i?""+i+r:e;if(typeof document.body.style[a]<"u")return a}return null}function Zwt(){return this.state.isDestroyed=!0,fPe(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[NG("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function hPe(e){var t=e.ownerDocument;return t?t.defaultView:window}function pPe(e,t,r,n){var i=e.nodeName==="BODY",a=i?e.ownerDocument.defaultView:e;a.addEventListener(t,r,{passive:!0}),i||pPe(m2(a.parentNode),t,r,n),n.push(a)}function Qwt(e,t,r,n){r.updateBound=n,hPe(e).addEventListener("resize",r.updateBound,{passive:!0});var i=m2(e);return pPe(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function Jwt(){this.state.eventsEnabled||(this.state=Qwt(this.reference,this.options,this.state,this.scheduleUpdate))}function eSt(e,t){return hPe(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function tSt(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=eSt(this.reference,this.state))}function DG(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function cV(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&DG(t[r])&&(n="px"),e.style[r]=t[r]+n})}function rSt(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function nSt(e){return cV(e.instance.popper,e.styles),rSt(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&cV(e.arrowElement,e.arrowStyles),e}function iSt(e,t,r,n,i){var a=lPe(i,t,e,r.positionFixed),o=sPe(r.placement,a,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),cV(t,{position:r.positionFixed?"fixed":"absolute"}),r}function aSt(e,t){var r=e.offsets,n=r.popper,i=r.reference,a=Math.round,o=Math.floor,s=function(E){return E},l=a(i.width),c=a(n.width),d=["left","right"].indexOf(e.placement)!==-1,f=e.placement.indexOf("-")!==-1,h=l%2===c%2,p=l%2===1&&c%2===1,g=t?d||f||h?a:o:s,_=t?a:s;return{left:g(p&&!f&&t?n.left-1:n.left),top:_(n.top),bottom:_(n.bottom),right:g(n.right)}}var oSt=p2&&/Firefox/i.test(navigator.userAgent);function sSt(e,t){var r=t.x,n=t.y,i=e.offsets.popper,a=v2(e.instance.modifiers,function(P){return P.name==="applyStyle"}).gpuAcceleration;a!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=a!==void 0?a:t.gpuAcceleration,s=z1(e.instance.popper),l=lV(s),c={position:i.position},d=aSt(e,window.devicePixelRatio<2||!oSt),f=r==="bottom"?"top":"bottom",h=n==="right"?"left":"right",p=NG("transform"),g=void 0,_=void 0;if(f==="bottom"?s.nodeName==="HTML"?_=-s.clientHeight+d.bottom:_=-l.height+d.bottom:_=d.top,h==="right"?s.nodeName==="HTML"?g=-s.clientWidth+d.right:g=-l.width+d.right:g=d.left,o&&p)c[p]="translate3d("+g+"px, "+_+"px, 0)",c[f]=0,c[h]=0,c.willChange="transform";else{var b=f==="bottom"?-1:1,E=h==="right"?-1:1;c[f]=_*b,c[h]=g*E,c.willChange=f+", "+h}var S={"x-placement":e.placement};return e.attributes=Fc({},S,e.attributes),e.styles=Fc({},c,e.styles),e.arrowStyles=Fc({},e.offsets.arrow,e.arrowStyles),e}function mPe(e,t,r){var n=v2(e,function(s){var l=s.name;return l===t}),i=!!n&&e.some(function(s){return s.name===r&&s.enabled&&s.order<n.order});if(!i){var a="`"+t+"`",o="`"+r+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}function lSt(e,t){var r;if(!mPe(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,o=a.popper,s=a.reference,l=["left","right"].indexOf(i)!==-1,c=l?"height":"width",d=l?"Top":"Left",f=d.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",g=cPe(n)[c];s[p]-g<o[f]&&(e.offsets.popper[f]-=o[f]-(s[p]-g)),s[f]+g>o[p]&&(e.offsets.popper[f]+=s[f]+g-o[p]),e.offsets.popper=fm(e.offsets.popper);var _=s[f]+s[c]/2-g/2,b=m0(e.instance.popper),E=parseFloat(b["margin"+d]),S=parseFloat(b["border"+d+"Width"]),P=_-e.offsets.popper[f]-E-S;return P=Math.max(Math.min(o[c]-g,P),0),e.arrowElement=n,e.offsets.arrow=(r={},U1(r,f,Math.round(P)),U1(r,h,""),r),e}function cSt(e){return e==="end"?"start":e==="start"?"end":e}var vPe=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],uL=vPe.slice(3);function Hle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=uL.indexOf(e),n=uL.slice(r+1).concat(uL.slice(0,r));return t?n.reverse():n}var dL={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function uSt(e,t){if(fPe(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=kG(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=_I(n),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case dL.FLIP:o=[n,i];break;case dL.CLOCKWISE:o=Hle(n);break;case dL.COUNTERCLOCKWISE:o=Hle(n,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(n!==s||o.length===l+1)return e;n=e.placement.split("-")[0],i=_I(n);var c=e.offsets.popper,d=e.offsets.reference,f=Math.floor,h=n==="left"&&f(c.right)>f(d.left)||n==="right"&&f(c.left)<f(d.right)||n==="top"&&f(c.bottom)>f(d.top)||n==="bottom"&&f(c.top)<f(d.bottom),p=f(c.left)<f(r.left),g=f(c.right)>f(r.right),_=f(c.top)<f(r.top),b=f(c.bottom)>f(r.bottom),E=n==="left"&&p||n==="right"&&g||n==="top"&&_||n==="bottom"&&b,S=["top","bottom"].indexOf(n)!==-1,P=!!t.flipVariations&&(S&&a==="start"&&p||S&&a==="end"&&g||!S&&a==="start"&&_||!S&&a==="end"&&b),O=!!t.flipVariationsByContent&&(S&&a==="start"&&g||S&&a==="end"&&p||!S&&a==="start"&&b||!S&&a==="end"&&_),I=P||O;(h||E||I)&&(e.flipped=!0,(h||E)&&(n=o[l+1]),I&&(a=cSt(a)),e.placement=n+(a?"-"+a:""),e.offsets.popper=Fc({},e.offsets.popper,uPe(e.instance.popper,e.offsets.reference,e.placement)),e=dPe(e.instance.modifiers,e,"flip"))}),e}function dSt(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=["top","bottom"].indexOf(i)!==-1,s=o?"right":"bottom",l=o?"left":"top",c=o?"width":"height";return r[s]<a(n[l])&&(e.offsets.popper[l]=a(n[l])-r[c]),r[l]>a(n[s])&&(e.offsets.popper[l]=a(n[s])),e}function fSt(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(o.indexOf("%")===0){var s=void 0;o==="%p"?s=r:s=n;var l=fm(s);return l[t]/100*a}else if(o==="vh"||o==="vw"){var c=void 0;return o==="vh"?c=Math.max(document.documentElement.clientHeight,window.innerHeight||0):c=Math.max(document.documentElement.clientWidth,window.innerWidth||0),c/100*a}else return a}function hSt(e,t,r,n){var i=[0,0],a=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(d){return d.trim()}),s=o.indexOf(v2(o,function(d){return d.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return c=c.map(function(d,f){var h=(f===1?!a:a)?"height":"width",p=!1;return d.reduce(function(g,_){return g[g.length-1]===""&&["+","-"].indexOf(_)!==-1?(g[g.length-1]=_,p=!0,g):p?(g[g.length-1]+=_,p=!1,g):g.concat(_)},[]).map(function(g){return fSt(g,h,t,r)})}),c.forEach(function(d,f){d.forEach(function(h,p){DG(h)&&(i[f]+=h*(d[p-1]==="-"?-1:1))})}),i}function pSt(e,t){var r=t.offset,n=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=n.split("-")[0],l=void 0;return DG(+r)?l=[+r,0]:l=hSt(r,a,o,s),s==="left"?(a.top+=l[0],a.left-=l[1]):s==="right"?(a.top+=l[0],a.left+=l[1]):s==="top"?(a.left+=l[0],a.top-=l[1]):s==="bottom"&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e}function mSt(e,t){var r=t.boundariesElement||z1(e.instance.popper);e.instance.reference===r&&(r=z1(r));var n=NG("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[n];i.top="",i.left="",i[n]="";var l=kG(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=a,i.left=o,i[n]=s,t.boundaries=l;var c=t.priority,d=e.offsets.popper,f={primary:function(p){var g=d[p];return d[p]<l[p]&&!t.escapeWithReference&&(g=Math.max(d[p],l[p])),U1({},p,g)},secondary:function(p){var g=p==="right"?"left":"top",_=d[g];return d[p]>l[p]&&!t.escapeWithReference&&(_=Math.min(d[g],l[p]-(p==="right"?d.width:d.height))),U1({},g,_)}};return c.forEach(function(h){var p=["left","top"].indexOf(h)!==-1?"primary":"secondary";d=Fc({},d,f[p](h))}),e.offsets.popper=d,e}function vSt(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,a=i.reference,o=i.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",c=s?"width":"height",d={start:U1({},l,a[l]),end:U1({},l,a[l]+a[c]-o[c])};e.offsets.popper=Fc({},o,d[n])}return e}function gSt(e){if(!mPe(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=v2(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function ySt(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,a=n.reference,o=["left","right"].indexOf(r)!==-1,s=["top","left"].indexOf(r)===-1;return i[o?"left":"top"]=a[r]-(s?i[o?"width":"height"]:0),e.placement=_I(t),e.offsets.popper=fm(i),e}var _St={shift:{order:100,enabled:!0,fn:vSt},offset:{order:200,enabled:!0,fn:pSt,offset:0},preventOverflow:{order:300,enabled:!0,fn:mSt,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:dSt},arrow:{order:500,enabled:!0,fn:lSt,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:uSt,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:ySt},hide:{order:800,enabled:!0,fn:gSt},computeStyle:{order:850,enabled:!0,fn:sSt,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:nSt,onLoad:iSt,gpuAcceleration:void 0}},bSt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:_St},v4=(function(){function e(t,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};$wt(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Vwt(this.update.bind(this)),this.options=Fc({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(Fc({},e.Defaults.modifiers,i.modifiers)).forEach(function(o){n.options.modifiers[o]=Fc({},e.Defaults.modifiers[o]||{},i.modifiers?i.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return Fc({name:o},n.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&rPe(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return Wwt(e,[{key:"update",value:function(){return Xwt.call(this)}},{key:"destroy",value:function(){return Zwt.call(this)}},{key:"enableEventListeners",value:function(){return Jwt.call(this)}},{key:"disableEventListeners",value:function(){return tSt.call(this)}}]),e})();v4.Utils=(typeof window<"u"?window:globalThis).PopperUtils;v4.placements=vPe;v4.Defaults=bSt;function ESt(e,t){var r=t&&t.direction||"ltr";if(r==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Ule(e){return typeof e=="function"?e():e}var wSt=typeof window<"u"?x.useLayoutEffect:x.useEffect,SSt={},gPe=x.forwardRef(function(t,r){var n=t.anchorEl,i=t.children,a=t.container,o=t.disablePortal,s=o===void 0?!1:o,l=t.keepMounted,c=l===void 0?!1:l,d=t.modifiers,f=t.open,h=t.placement,p=h===void 0?"bottom":h,g=t.popperOptions,_=g===void 0?SSt:g,b=t.popperRef,E=t.style,S=t.transition,P=S===void 0?!1:S,O=Mt(t,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),I=x.useRef(null),N=mi(I,r),M=x.useRef(null),F=mi(M,b),B=x.useRef(F);wSt(function(){B.current=F},[F]),x.useImperativeHandle(b,function(){return M.current},[]);var V=x.useState(!0),W=V[0],$=V[1],X=f0(),re=ESt(p,X),ae=x.useState(re),Q=ae[0],ie=ae[1];
153x.useEffect(function(){M.current&&M.current.update()});var le=x.useCallback(function(){if(!(!I.current||!n||!f)){M.current&&(M.current.destroy(),B.current(null));var Pe=function(Ne){ie(Ne.placement)};Ule(n);var ce=new v4(Ule(n),I.current,ve({placement:re},_,{modifiers:ve({},s?{}:{preventOverflow:{boundariesElement:"window"}},d,_.modifiers),onCreate:gh(Pe,_.onCreate),onUpdate:gh(Pe,_.onUpdate)}));B.current(ce)}},[n,s,d,f,re,_]),fe=x.useCallback(function(Pe){yh(N,Pe),le()},[N,le]),de=function(){$(!1)},ge=function(){M.current&&(M.current.destroy(),B.current(null))},Ae=function(){$(!0),ge()};if(x.useEffect(function(){return function(){ge()}},[]),x.useEffect(function(){!f&&!P&&ge()},[f,P]),!c&&!f&&(!P||W))return null;var Fe={placement:Q};return P&&(Fe.TransitionProps={in:f,onEnter:de,onExited:Ae}),x.createElement(HAe,{disablePortal:s,container:a},x.createElement("div",ve({ref:fe,role:"tooltip"},O,{style:ve({position:"fixed",top:0,left:0,display:!f&&c&&!P?"none":null},E)}),typeof i=="function"?i(Fe):i))});const CSt=zo(x.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),xSt=zo(x.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}));var TSt=function(t){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},checked:{}}};function ASt(e){var t=e.checked,r=e.classes,n=e.fontSize;return x.createElement("div",{className:Ut(r.root,t&&r.checked)},x.createElement(CSt,{fontSize:n}),x.createElement(xSt,{fontSize:n,className:r.layer}))}const yPe=yr(TSt,{name:"PrivateRadioButtonIcon"})(ASt);var _Pe=x.createContext();function PSt(){return x.useContext(_Pe)}var RSt=function(t){return{root:{color:t.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}}}},OSt=x.createElement(yPe,{checked:!0}),ISt=x.createElement(yPe,null),kSt=x.forwardRef(function(t,r){var n=t.checked,i=t.classes,a=t.color,o=a===void 0?"secondary":a,s=t.name,l=t.onChange,c=t.size,d=c===void 0?"medium":c,f=Mt(t,["checked","classes","color","name","onChange","size"]),h=PSt(),p=n,g=gh(l,h&&h.onChange),_=s;return h&&(typeof p>"u"&&(p=h.value===t.value),typeof _>"u"&&(_=h.name)),x.createElement(CG,ve({color:o,type:"radio",icon:x.cloneElement(ISt,{fontSize:d==="small"?"small":"medium"}),checkedIcon:x.cloneElement(OSt,{fontSize:d==="small"?"small":"medium"}
153),classes:{root:Ut(i.root,i["color".concat(zr(o))]),checked:i.checked,disabled:i.disabled},name:_,checked:p,onChange:g,ref:r},f))});const Bg=yr(RSt,{name:"MuiRadio"})(kSt);var qC=x.forwardRef(function(t,r){var n=t.actions,i=t.children,a=t.name,o=t.value,s=t.onChange,l=Mt(t,["actions","children","name","value","onChange"]),c=x.useRef(null),d=Rd({controlled:o,default:t.defaultValue,name:"RadioGroup"}),f=Zo(d,2),h=f[0],p=f[1];x.useImperativeHandle(n,function(){return{focus:function(){var S=c.current.querySelector("input:not(:disabled):checked");S||(S=c.current.querySelector("input:not(:disabled)")),S&&S.focus()}}},[]);var g=mi(r,c),_=function(S){p(S.target.value),s&&s(S,S.target.value)},b=Dg(a);return x.createElement(_Pe.Provider,{value:{name:b,onChange:_,value:h}},x.createElement(BEt,ve({role:"radiogroup",ref:g},l),i))});function ri(e,t){if(typeof t!="function"&&t!==null)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&&rO(e,t)}function g4(e,t){if(t&&(Nl(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cr(e)}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zg(e)}function Vle(e,t){return Nl(t)==="object"&&t!==null?e===t:String(e)===String(t)}function NSt(e){return e==null||typeof e=="string"&&!e.trim()}var DSt=x.forwardRef(function(t,r){var n=t["aria-label"],i=t.autoFocus,a=t.autoWidth,o=t.children,s=t.classes,l=t.className,c=t.defaultValue,d=t.disabled,f=t.displayEmpty,h=t.IconComponent,p=t.inputRef,g=t.labelId,_=t.MenuProps,b=_===void 0?{}:_,E=t.multiple,S=t.name,P=t.onBlur,O=t.onChange,I=t.onClose,N=t.onFocus,M=t.onOpen,F=t.open,B=t.readOnly,V=t.renderValue,W=t.SelectDisplayProps,$=W===void 0?{}:W,X=t.tabIndex;t.type;var re=t.value,ae=t.variant,Q=ae===void 0?"standard":ae,ie=Mt(t,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),le=Rd({controlled:re,default:c,name:"Select"}),fe=Zo(le,2),de=fe[0],ge=fe[1],Ae=x.useRef(null),Fe=x.useState(null),Pe=Fe[0],ce=Fe[1],pe=x.useRef(F!=null),Ne=pe.current,De=x.useState(),Ve=De[0],Ke=De[1],Qe=x.useState(!1),Ue=Qe[0],ut=Qe[1],We=mi(r,p);x.useImperativeHandle(We,function(){return{focus:function(){Pe.focus()},node:Ae.current,value:de}},[Pe,de]),x.useEffect(function(){i&&Pe&&Pe.focus()},[i,Pe]),x.useEffect(function(){if(Pe){var Oe=ds(Pe).getElementById(g);if(Oe){var Re=function(){getSelection().isCollapsed&&Pe.focus()};return Oe.addEventListener("click",Re),function(){Oe.removeEventListener("click",Re)}}}},[g,Pe]);var ke=function(Re,pt){Re?M&&M(pt):I&&I(pt),Ne||(Ke(a?null:Pe.clientWidth),ut(Re))},Le=function(Re){Re.button===0&&(Re.preventDefault(),Pe.focus(),ke(!0,Re))},Be=function(Re){ke(!1,Re)},Ze=x.Children.toArray(o),Et=function(Re){var pt=Ze.map(function(st){return st.props.value}).indexOf(Re.target.value);if(pt!==-1){var mt=Ze[pt];ge(mt.props.value),O&&O(Re,mt)}},Yt=function(Re){return function(pt){E||ke(!1,pt);var mt;if(E){mt=Array.isArray(de)?de.slice():[];var st=de.indexOf(Re.props.value);st===-1?mt.push(Re.props.value):mt.splice(st,1)}else mt=Re.props.value;Re.props.onClick&&Re.props.onClick(pt),de!==mt&&(ge(mt),O&&(pt.persist(),Object.defineProperty(pt,"target",{writable:!0,value:{value:mt,name:S}}),O(pt,Re)))}},sr=function(Re){if(!B){var pt=[" ","ArrowUp","ArrowDown","Enter"];pt.indexOf(Re.key)!==-1&&(Re.preventDefault(),ke(!0,Re))}},Kt=Pe!==null&&(Ne?F:Ue),Qt=function(Re){!Kt&&P&&(Re.persist(),Object.defineProperty(Re,"target",{writable:!0,value:{value:de,name:S}}),P(Re))};delete ie["aria-invalid"];var qt,hr,rr=[],tr=!1;(TG({value:de})||f)&&(V?qt=V(de):tr=!0);var dt=Ze.map(function(Oe){if(!x.isValidElement(Oe))return null;var Re;if(E){if(!Array.isArray(de))throw new Error(Rg(2));Re=de.some(function(pt){return Vle(pt,Oe.props.value)}),Re&&tr&&rr.push(Oe.props.children)}else Re=Vle(de,Oe.props.value),Re&&tr&&(hr=Oe.props.children);return x.cloneElement(Oe,{"aria-selected":Re?"true":void 0,onClick:Yt(Oe),onKeyUp:function(mt){mt.key===" "&&mt.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(mt)},role:"option",selected:Re,value:void 0,"data-value":Oe.props.value})});tr&&(qt=E?rr.join(", "):hr);var bt=Ve;!a&&Ne&&Pe&&(bt=Pe.clientWidth);var nr;typeof X<"u"?nr=X:nr=d?null:0;var Ee=$.id||(S?"mui-component-select-".concat(S):void 0);return x.createElement(x.Fragment,null,x.createElement("div",ve({className:Ut(s.root,s.select,s.selectMenu,s[Q],l,d&&s.disabled),ref:ce,tabIndex:nr,role:"button","aria-disabled":d?"true":void 0,"aria-expanded":Kt?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[g,Ee].filter(
153Boolean).join(" ")||void 0,onKeyDown:sr,onMouseDown:d||B?null:Le,onBlur:Qt,onFocus:N},$,{id:Ee}),NSt(qt)?x.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):qt),x.createElement("input",ve({value:Array.isArray(de)?de.join(","):de,name:S,ref:Ae,"aria-hidden":!0,onChange:Et,tabIndex:-1,className:s.nativeInput,autoFocus:i},ie)),x.createElement(h,{className:Ut(s.icon,s["icon".concat(zr(Q))],Kt&&s.iconOpen,d&&s.disabled)}),x.createElement(Zc,ve({id:"menu-".concat(S||""),anchorEl:Pe,open:Kt,onClose:Be},b,{MenuListProps:ve({"aria-labelledby":g,role:"listbox",disableListWrap:!0},b.MenuListProps),PaperProps:ve({},b.PaperProps,{style:ve({minWidth:bt},b.PaperProps!=null?b.PaperProps.style:null)})}),dt))}),MSt=JAe,LSt=x.createElement(AG,null),FSt=x.createElement($Ae,null),bPe=x.forwardRef(function e(t,r){var n=t.autoWidth,i=n===void 0?!1:n,a=t.children,o=t.classes,s=t.displayEmpty,l=s===void 0?!1:s,c=t.IconComponent,d=c===void 0?QAe:c,f=t.id,h=t.input,p=t.inputProps,g=t.label,_=t.labelId,b=t.labelWidth,E=b===void 0?0:b,S=t.MenuProps,P=t.multiple,O=P===void 0?!1:P,I=t.native,N=I===void 0?!1:I,M=t.onClose,F=t.onOpen,B=t.open,V=t.renderValue,W=t.SelectDisplayProps,$=t.variant,X=$===void 0?"standard":$,re=Mt(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),ae=N?ZAe:DSt,Q=h0(),ie=U_({props:t,muiFormControl:Q,states:["variant"]}),le=ie.variant||X,fe=h||{standard:LSt,outlined:x.createElement(RG,{label:g,labelWidth:E}),filled:FSt}[le];return x.cloneElement(fe,ve({inputComponent:ae,inputProps:ve({children:a,IconComponent:d,variant:le,type:void 0,multiple:O},N?{id:f}:{autoWidth:i,displayEmpty:l,labelId:_,MenuProps:S,onClose:M,onOpen:F,open:B,renderValue:V,SelectDisplayProps:ve({id:f},W)},p,{classes:p?bG({baseClasses:o,newClasses:p.classes,Component:e}):o},h?h.props.inputProps:{}),ref:r},re))});bPe.muiName="Select";const Bd=yr(MSt,{name:"MuiSelect"})(bPe);var BSt=function(t){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:ve({zIndex:1},t.typography.body2,{fontSize:t.typography.pxToRem(12),lineHeight:1.2,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:t.palette.primary.contrastText,transform:"rotate(45deg)"}}};function zSt(e){var t=e.children,r=e.classes,n=e.className,i=e.open,a=e.value,o=e.valueLabelDisplay;return o==="off"?t:x.cloneElement(t,{className:Ut(t.props.className,(i||o==="on")&&r.open,r.thumb)},x.createElement("span",{className:Ut(r.offset,n)},x.createElement("span",{className:r.circle},x.createElement("span",{className:r.label},a))))}const HSt=yr(BSt,{name:"PrivateValueLabel"})(zSt);function fL(e,t){return e-t}function hL(e,t,r){return Math.min(Math.max(t,e),r)}function qle(e,t){var r=e.reduce(function(i,a,o){var s=Math.abs(t-a);return i===null||s<i.distance||s===i.distance?{distance:s,index:o}:i},null),n=r.index;return n}function DA(e,t){if(t.current!==void 0&&e.changedTouches){for(var r=0;r<e.changedTouches.length;r+=1){var n=e.changedTouches[r];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function MA(e,t,r){return(e-t)*100/(r-t)}function USt(e,t,r){return(r-t)*e+t}function VSt(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}var n=e.toString().split(".")[1];return n?n.length:0}function jle(e,t,r){var n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(VSt(t)))}function $le(e){var t=e.values,r=e.source,n=e.newValue,i=e.index;if(t[i]===n)return r;var a=t.slice();return a[i]=n,a}function LA(e){var t=e.sliderRef,r=e.activeIndex,n=e.setActive;(!t.current.contains(document.activeElement)||Number(document.activeElement.getAttribute("data-index"))!==r)&&t.current.querySelector('[role="slider"][data-index="'.concat(r,'"]')).focus(),n&&n(r)}var FA={horizontal:{offset:function(t){return{left:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},"horizontal-reverse":{offset:function(t){return{right:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},vertical:{offset:function(t){return{bottom:"".concat(t,"%")}},leap:function(t){return{height:"".concat(t,"%")}}}},Wle=function(t){return t},qSt=function(t){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",curs
153or:"pointer",touchAction:"none",color:t.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:t.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:t.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:t.palette.type==="light"?kg(t.palette.primary.main,.62):Ig(t.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow"],{duration:t.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Jn(t.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Jn(t.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Jn(t.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Jn(t.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:t.palette.background.paper,opacity:.8},markLabel:ve({},t.typography.body2,{color:t.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:t.palette.text.primary}}},jSt=x.forwardRef(function(t,r){var n=t["aria-label"],i=t["aria-labelledby"],a=t["aria-valuetext"],o=t.classes,s=t.className,l=t.color,c=l===void 0?"primary":l,d=t.component,f=d===void 0?"span":d,h=t.defaultValue,p=t.disabled,g=p===void 0?!1:p,_=t.getAriaLabel,b=t.getAriaValueText,E=t.marks,S=E===void 0?!1:E,P=t.max,O=P===void 0?100:P,I=t.min,N=I===void 0?0:I,M=t.name,F=t.onChange,B=t.onChangeCommitted,V=t.onMouseDown,W=t.orientation,$=W===void 0?"horizontal":W,X=t.scale,re=X===void 0?Wle:X,ae=t.step,Q=ae===void 0?1:ae,ie=t.ThumbComponent,le=ie===void 0?"span":ie,fe=t.track,de=fe===void 0?"normal":fe,ge=t.value,Ae=t.ValueLabelComponent,Fe=Ae===void 0?HSt:Ae,Pe=t.valueLabelDisplay,ce=Pe===void 0?"off":Pe,pe=t.valueLabelFormat,Ne=pe===void 0?Wle:pe,De=Mt(t,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),Ve=ts(),Ke=x.useRef(),Qe=x.useState(-1),Ue=Qe[0],ut=Qe[1],We=x.useState(-1),ke=We[0],Le=We[1],Be=Rd({controlled:ge,default:h,name:"Slider"}),Ze=Zo(Be,2),Et=Ze[0],Yt=Ze[1],sr=Array.isArray(Et),Kt=sr?Et.slice().sort(fL):[Et];Kt=Kt.map(function(Ar){return hL(Ar,N,O)});var Qt=S===!0&&Q!==null?c2(Array(Math.floor((O-N)/Q)+1)).map(function(Ar,Ir){return{value:N+Q*Ir}}):S||[],qt=f2(),hr=qt.isFocusVisible,rr=qt.onBlurVisible,tr=qt.ref,dt=x.useState(-1),bt=dt[0],nr=dt[1],Ee=x.useRef(),Oe=mi(tr,Ee),Re=mi(r,Oe),pt=ia(function(Ar){var Ir=Number(Ar.currentTarget.getAttribute("data-index"));hr(Ar)&&nr(Ir),Le(Ir)}),mt=ia(function(){bt!==-1&&(nr(-1),rr()),Le(-1)}),st=ia(function(Ar){var Ir=Number(Ar.currentTarget.getAttribute("data-index"));Le(Ir)}),ze=ia(function(){Le(-1)}),it=Ve.direction==="rtl",Je=ia(function(Ar){var Ir=Number(Ar.currentTarget.getAttribute("data-index")),Ln=Kt[Ir],Wn=(O-N)/10,wr=Qt.map(function(Ho){return Ho.value}),jt=wr.indexOf(Ln),gn,Xa=it?"ArrowLeft":"ArrowRight",la=it?"ArrowRight":"ArrowLeft";switch(Ar.key){case"Home":gn=N;break;case"End":gn=O;break;case"PageUp":Q&&(gn=Ln+Wn);break;case"PageDown":Q&&(gn=Ln-Wn);break;case Xa:case"ArrowUp":Q?gn=Ln+Q:gn=wr[jt+1]||wr[wr.length-1];break;case la:case"ArrowDown":Q?gn=Ln-Q:gn=wr[jt-1]||wr[0];break;default:return}if(Ar.preventDefault(),Q&&(gn=jle(gn,Q,N)),gn=hL(gn,N,O),sr){var si=gn;gn=$le({values:Kt,source:Et,newValue:gn,index:Ir}).sort(fL),LA({sliderRef:Ee,activeIndex:gn.indexOf(si)})}Yt(gn),nr(Ir),F&&F(Ar,gn),B&&B(Ar,gn)}),Jt=x.useRef(),pr=$;it&&$!=="vertical"&&(pr+="-reverse");var Fr=function(Ir){var Ln=Ir.finger,Wn=Ir.move,wr=Wn===void 0?!1:Wn,jt=Ir.values,gn=Ir.source,Xa=Ee.current,la=Xa.getBoundingClientRect(),si=la.width,Ho=la.height,g
153s=la.bottom,ga=la.left,ya;pr.indexOf("vertical")===0?ya=(gs-Ln.y)/Ho:ya=(Ln.x-ga)/si,pr.indexOf("-reverse")!==-1&&(ya=1-ya);var Ui;if(Ui=USt(ya,N,O),Q)Ui=jle(Ui,Q,N);else{var rs=Qt.map(function(pl){return pl.value}),Za=qle(rs,Ui);Ui=rs[Za]}Ui=hL(Ui,N,O);var Io=0;if(sr){wr?Io=Jt.current:Io=qle(jt,Ui);var hl=Ui;Ui=$le({values:jt,source:gn,newValue:Ui,index:Io}).sort(fL),Io=Ui.indexOf(hl),Jt.current=Io}return{newValue:Ui,activeIndex:Io}},Or=ia(function(Ar){var Ir=DA(Ar,Ke);if(Ir){var Ln=Fr({finger:Ir,move:!0,values:Kt,source:Et}),Wn=Ln.newValue,wr=Ln.activeIndex;LA({sliderRef:Ee,activeIndex:wr,setActive:ut}),Yt(Wn),F&&F(Ar,Wn)}}),vn=ia(function(Ar){var Ir=DA(Ar,Ke);if(Ir){var Ln=Fr({finger:Ir,values:Kt,source:Et}),Wn=Ln.newValue;ut(-1),Ar.type==="touchend"&&Le(-1),B&&B(Ar,Wn),Ke.current=void 0;var wr=ds(Ee.current);wr.removeEventListener("mousemove",Or),wr.removeEventListener("mouseup",vn),wr.removeEventListener("touchmove",Or),wr.removeEventListener("touchend",vn)}}),cn=ia(function(Ar){Ar.preventDefault();var Ir=Ar.changedTouches[0];Ir!=null&&(Ke.current=Ir.identifier);var Ln=DA(Ar,Ke),Wn=Fr({finger:Ln,values:Kt,source:Et}),wr=Wn.newValue,jt=Wn.activeIndex;LA({sliderRef:Ee,activeIndex:jt,setActive:ut}),Yt(wr),F&&F(Ar,wr);var gn=ds(Ee.current);gn.addEventListener("touchmove",Or),gn.addEventListener("touchend",vn)});x.useEffect(function(){var Ar=Ee.current;Ar.addEventListener("touchstart",cn);var Ir=ds(Ar);return function(){Ar.removeEventListener("touchstart",cn),Ir.removeEventListener("mousemove",Or),Ir.removeEventListener("mouseup",vn),Ir.removeEventListener("touchmove",Or),Ir.removeEventListener("touchend",vn)}},[vn,Or,cn]);var Xr=ia(function(Ar){V&&V(Ar),Ar.preventDefault();var Ir=DA(Ar,Ke),Ln=Fr({finger:Ir,values:Kt,source:Et}),Wn=Ln.newValue,wr=Ln.activeIndex;LA({sliderRef:Ee,activeIndex:wr,setActive:ut}),Yt(Wn),F&&F(Ar,Wn);var jt=ds(Ee.current);jt.addEventListener("mousemove",Or),jt.addEventListener("mouseup",vn)}),Zr=MA(sr?Kt[0]:N,N,O),fn=MA(Kt[Kt.length-1],N,O)-Zr,vs=ve({},FA[pr].offset(Zr),FA[pr].leap(fn));return x.createElement(f,ve({ref:Re,className:Ut(o.root,o["color".concat(zr(c))],s,g&&o.disabled,Qt.length>0&&Qt.some(function(Ar){return Ar.label})&&o.marked,de===!1&&o.trackFalse,$==="vertical"&&o.vertical,de==="inverted"&&o.trackInverted),onMouseDown:Xr},De),x.createElement("span",{className:o.rail}),x.createElement("span",{className:o.track,style:vs}),x.createElement("input",{value:Kt.join(","),name:M,type:"hidden"}),Qt.map(function(Ar,Ir){var Ln=MA(Ar.value,N,O),Wn=FA[pr].offset(Ln),wr;return de===!1?wr=Kt.indexOf(Ar.value)!==-1:wr=de==="normal"&&(sr?Ar.value>=Kt[0]&&Ar.value<=Kt[Kt.length-1]:Ar.value<=Kt[0])||de==="inverted"&&(sr?Ar.value<=Kt[0]||Ar.value>=Kt[Kt.length-1]:Ar.value>=Kt[0]),x.createElement(x.Fragment,{key:Ar.value},x.createElement("span",{style:Wn,"data-index":Ir,className:Ut(o.mark,wr&&o.markActive)}),Ar.label!=null?x.createElement("span",{"aria-hidden":!0,"data-index":Ir,style:Wn,className:Ut(o.markLabel,wr&&o.markLabelActive)},Ar.label):null)}),Kt.map(function(Ar,Ir){var Ln=MA(Ar,N,O),Wn=FA[pr].offset(Ln);return x.createElement(Fe,{key:Ir,valueLabelFormat:Ne,valueLabelDisplay:ce,className:o.valueLabel,value:typeof Ne=="function"?Ne(re(Ar),Ir):Ne,index:Ir,open:ke===Ir||Ue===Ir||ce==="on",disabled:g},x.createElement(le,{className:Ut(o.thumb,o["thumbColor".concat(zr(c))],Ue===Ir&&o.active,g&&o.disabled,bt===Ir&&o.focusVisible),tabIndex:g?null:0,role:"slider",style:Wn,"data-index":Ir,"aria-label":_?_(Ir):n,"aria-labelledby":i,"aria-orientation":$,"aria-valuemax":re(O),"aria-valuemin":re(N),"aria-valuenow":re(Ar),"aria-valuetext":b?b(re(Ar),Ir):a,onKeyDown:Je,onFocus:pt,onBlur:mt,onMouseOver:st,onMouseLeave:ze}))}))});const $St=yr(qSt,{name:"MuiSlider"})(jSt);var WSt=function(t){var r=t.palette.type==="light"?.8:.98,n=_v(t.palette.background.default,r);return{root:ve({},t.typography.body2,Nt({color:t.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:t.shape.borderRadius,flexGrow:1},t.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},GSt=x.forwardRef(function(t,r){var n=t.action,i=t.classes,a=t.className,o=t.message,s=t.role,l=s===void 0?"alert":s,c=Mt(t,["action","classes","className","message","role"]);return x.createElement(Qd,ve({role:l,square:!0,elevation:6,className:Ut(i.root,a),ref:r},c),x.createElement("div",{className:i.message},o),n?x.createElement("div",{className:i.action},n):null)});const MG=yr(WSt,{name:"MuiSnackbarContent"})(GSt);var KSt=function(t){var r={top:8},n={bottom:8},i={justifyContent:"flex-end"},a={justifyContent:"flex-start"},o={top:24},s={bottom:24},l={right:24},c={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:t.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:ve({},r,Nt({},t.breakpoints.up("sm"),ve({},o,d))),anchorOriginBottomCenter:ve({},n,Nt({},t.breakpoints.up("sm"),ve({},s,d))),anchorOriginTopRight:ve({},r,i,Nt({},t.breakpoints.up("sm"),ve({left:"auto"},o,l))),anchorOriginBottomRight:ve({},n,i,Nt({},t.breakpoints.up("sm"),ve({left:"auto"},s,l))),anchorOriginTopLeft:ve({}
153,r,a,Nt({},t.breakpoints.up("sm"),ve({right:"auto"},o,c))),anchorOriginBottomLeft:ve({},n,a,Nt({},t.breakpoints.up("sm"),ve({right:"auto"},s,c)))}},YSt=x.forwardRef(function(t,r){var n=t.action,i=t.anchorOrigin;i=i===void 0?{vertical:"bottom",horizontal:"center"}:i;var a=i.vertical,o=i.horizontal,s=t.autoHideDuration,l=s===void 0?null:s,c=t.children,d=t.classes,f=t.className,h=t.ClickAwayListenerProps,p=t.ContentProps,g=t.disableWindowBlurListener,_=g===void 0?!1:g,b=t.message,E=t.onClose,S=t.onEnter,P=t.onEntered,O=t.onEntering,I=t.onExit,N=t.onExited,M=t.onExiting,F=t.onMouseEnter,B=t.onMouseLeave,V=t.open,W=t.resumeHideDuration,$=t.TransitionComponent,X=$===void 0?p4:$,re=t.transitionDuration,ae=re===void 0?{enter:fc.enteringScreen,exit:fc.leavingScreen}:re,Q=t.TransitionProps,ie=Mt(t,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),le=x.useRef(),fe=x.useState(!0),de=fe[0],ge=fe[1],Ae=ia(function(){E&&E.apply(void 0,arguments)}),Fe=ia(function(Qe){!E||Qe==null||(clearTimeout(le.current),le.current=setTimeout(function(){Ae(null,"timeout")},Qe))});x.useEffect(function(){return V&&Fe(l),function(){clearTimeout(le.current)}},[V,l,Fe]);var Pe=function(){clearTimeout(le.current)},ce=x.useCallback(function(){l!=null&&Fe(W??l*.5)},[l,W,Fe]),pe=function(Ue){F&&F(Ue),Pe()},Ne=function(Ue){B&&B(Ue),ce()},De=function(Ue){E&&E(Ue,"clickaway")},Ve=function(){ge(!0)},Ke=function(){ge(!1)};return x.useEffect(function(){if(!_&&V)return window.addEventListener("focus",ce),window.addEventListener("blur",Pe),function(){window.removeEventListener("focus",ce),window.removeEventListener("blur",Pe)}},[_,ce,V]),!V&&de?null:x.createElement(Gbt,ve({onClickAway:De},h),x.createElement("div",ve({className:Ut(d.root,d["anchorOrigin".concat(zr(a)).concat(zr(o))],f),onMouseEnter:pe,onMouseLeave:Ne,ref:r},ie),x.createElement(X,ve({appear:!0,in:V,onEnter:gh(Ke,S),onEntered:P,onEntering:O,onExit:I,onExited:gh(Ve,N),onExiting:M,timeout:ae,direction:a==="top"?"down":"up"},Q),c||x.createElement(MG,ve({message:b,action:n},p)))))});const EPe=yr(KSt,{flip:!1,name:"MuiSnackbar"})(YSt);var XSt=function(t){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:t.palette.type==="light"?t.palette.grey[50]:t.palette.grey[400],transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:t.palette.type==="light"?.12:.1}},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:Jn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{backgroundColor:t.palette.primary.main},"&$disabled + $track":{backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{backgroundColor:t.palette.secondary.main},"&$disabled + $track":{backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:t.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}
153,track:{height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white,opacity:t.palette.type==="light"?.38:.3}}},ZSt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=a===void 0?"secondary":a,s=t.edge,l=s===void 0?!1:s,c=t.size,d=c===void 0?"medium":c,f=Mt(t,["classes","className","color","edge","size"]),h=x.createElement("span",{className:n.thumb});return x.createElement("span",{className:Ut(n.root,i,{start:n.edgeStart,end:n.edgeEnd}[l],d==="small"&&n["size".concat(zr(d))])},x.createElement(CG,ve({type:"checkbox",icon:h,checkedIcon:h,classes:{root:Ut(n.switchBase,n["color".concat(zr(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:r},f)),x.createElement("span",{className:n.track}))});const bI=yr(XSt,{name:"MuiSwitch"})(ZSt);var QSt=function(t){var r;return{root:ve({},t.typography.button,(r={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Nt(r,t.breakpoints.up("sm"),{padding:"6px 24px"}),Nt(r,"overflow","hidden"),Nt(r,"whiteSpace","normal"),Nt(r,"textAlign","center"),Nt(r,t.breakpoints.up("sm"),{minWidth:160}),r)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled}},textColorSecondary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.secondary.main},"&$disabled":{color:t.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:t.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}},JSt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.disabled,o=a===void 0?!1:a,s=t.disableFocusRipple,l=s===void 0?!1:s,c=t.fullWidth,d=t.icon,f=t.indicator,h=t.label,p=t.onChange,g=t.onClick,_=t.onFocus,b=t.selected,E=t.selectionFollowsFocus,S=t.textColor,P=S===void 0?"inherit":S,O=t.value,I=t.wrapped,N=I===void 0?!1:I,M=Mt(t,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"]),F=function(W){p&&p(W,O),g&&g(W)},B=function(W){E&&!b&&p&&p(W,O),_&&_(W)};return x.createElement(cm,ve({focusRipple:!l,className:Ut(n.root,n["textColor".concat(zr(P))],i,o&&n.disabled,b&&n.selected,h&&d&&n.labelIcon,c&&n.fullWidth,N&&n.wrapped),ref:r,role:"tab","aria-selected":b,disabled:o,onClick:F,onFocus:B,tabIndex:b?0:-1},M),x.createElement("span",{className:n.wrapper},d,h),f)});const wPe=yr(QSt,{name:"MuiTab"})(JSt);var SPe=x.createContext(),eCt=function(t){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":ve({},t.typography.body2,{padding:t.spacing(2),color:t.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}},Gle="table",tCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?Gle:a,s=t.padding,l=s===void 0?"normal":s,c=t.size,d=c===void 0?"medium":c,f=t.stickyHeader,h=f===void 0?!1:f,p=Mt(t,["classes","className","component","padding","size","stickyHeader"]),g=x.useMemo(function(){return{padding:l,size:d,stickyHeader:h}},[l,d,h]);return x.createElement(SPe.Provider,{value:g},x.createElement(o,ve({role:o===Gle?null:"table",ref:r,className:Ut(n.root,i,h&&n.stickyHeader)},p)))});const CPe=yr(eCt,{name:"MuiTable"})(tCt);var y4=x.createContext(),rCt={root:{display:"table-row-group"}},nCt={variant:"body"},Kle="tbody",iCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?Kle:a,s=Mt(t,["classes","className","component"]);return x.createElement(y4.Provider,{value:nCt}
153,x.createElement(o,ve({className:Ut(n.root,i),ref:r,role:o===Kle?null:"rowgroup"},s)))});const xPe=yr(rCt,{name:"MuiTableBody"})(iCt);var aCt=function(t){return{root:ve({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:`1px solid
154    `.concat(t.palette.type==="light"?kg(Jn(t.palette.divider,1),.88):Ig(Jn(t.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:t.palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},body:{color:t.palette.text.primary},footer:{color:t.palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:t.palette.background.default}}},oCt=x.forwardRef(function(t,r){var n=t.align,i=n===void 0?"inherit":n,a=t.classes,o=t.className,s=t.component,l=t.padding,c=t.scope,d=t.size,f=t.sortDirection,h=t.variant,p=Mt(t,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),g=x.useContext(SPe),_=x.useContext(y4),b=_&&_.variant==="head",E,S;s?(S=s,E=b?"columnheader":"cell"):S=b?"th":"td";var P=c;!P&&b&&(P="col");var O=l||(g&&g.padding?g.padding:"normal"),I=d||(g&&g.size?g.size:"medium"),N=h||_&&_.variant,M=null;return f&&(M=f==="asc"?"ascending":"descending"),x.createElement(S,ve({ref:r,className:Ut(a.root,a[N],o,i!=="inherit"&&a["align".concat(zr(i))],O!=="normal"&&a["padding".concat(zr(O))],I!=="medium"&&a["size".concat(zr(I))],N==="head"&&g&&g.stickyHeader&&a.stickyHeader),"aria-sort":M,role:E,scope:P},p))});const Ru=yr(aCt,{name:"MuiTableCell"})(oCt);var sCt={root:{width:"100%",overflowX:"auto"}},lCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?"div":a,s=Mt(t,["classes","className","component"]);return x.createElement(o,ve({ref:r,className:Ut(n.root,i)},s))});const cCt=yr(sCt,{name:"MuiTableContainer"})(lCt);var uCt={root:{display:"table-header-group"}},dCt={variant:"head"},Yle="thead",fCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?Yle:a,s=Mt(t,["classes","className","component"]);return x.createElement(y4.Provider,{value:dCt},x.createElement(o,ve({className:Ut(n.root,i),ref:r,role:o===Yle?null:"rowgroup"},s)))});const TPe=yr(uCt,{name:"MuiTableHead"})(fCt);var hCt=function(t){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Nt({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),regular:t.mixins.toolbar,dense:{minHeight:48}}},pCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?"div":a,s=t.disableGutters,l=s===void 0?!1:s,c=t.variant,d=c===void 0?"regular":c,f=Mt(t,["classes","className","component","disableGutters","variant"]);return x.createElement(o,ve({className:Ut(n.root,n[d],i,!l&&n.gutters),ref:r},f))});const APe=yr(hCt,{name:"MuiToolbar"})(pCt),LG=zo(x.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),FG=zo(x.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));var mCt=x.createElement(FG,null),vCt=x.createElement(LG,null),gCt=x.createElement(LG,null),yCt=x.createElement(FG,null),_Ct=x.forwardRef(function(t,r){var n=t.backIconButtonProps,i=t.count,a=t.nextIconButtonProps,o=t.onChangePage,s=o===void 0?function(){}:o,l=t.onPageChange,c=l===void 0?function(){}:l,d=t.page,f=t.rowsPerPage,h=Mt(t,["backIconButtonProps","count","nextIconButtonProps","onChangePage","onPageChange","page","rowsPerPage"]),p=ts(),g=function(E){s(E,d-1),c(E,d-1)},_=function(E){s(E,d+1),c(E,d+1)};return x.createElement("div",ve({ref:r},h),x.createElement(cr,ve({onClick:g,disabled:d===0,color:"inherit"},n),p.direction==="rtl"?mCt:vCt),x.createElement(cr,ve({onClick:_,disabled:i!==-1?d>=Math.ceil(i/f)-1:!1,color:"inherit"},a),p.direction==="rtl"?gCt:yCt))}),bCt=function(t){return{root:{color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}},ECt=function(t){var r=t.from,n=t.to,i=t.count;return"".concat(r,"-").concat(n," of ").concat(i!==-1?i:"more than ".concat(n))},wCt=[10,25,50,100],SCt=x.forwardRef(function(t,r){var n=t.ActionsComponent,i=n===void 0?_Ct:n,a=t.backIconButtonProps,o=t.backIconButtonText,s=o===void 0?"Previous page":o,l=t.classes,c=t.className,d=t.colSpan,f=t.component,h=f===void 0?Ru:f,p=t.count,g=t.labelDisplayedRows,_=g===void 0?ECt:g,b=t.labelRowsPerPage,E=b===void 0?"Rows per page:":b,S=t.nextIconButtonProps,P=t.nextIconButtonText,O=P===void 0?"Next page":P,I=t.onChangePage,N=t.onPageChange,M=t.onChangeRowsPerPage,F=t.onRowsPerPageChange,B=t.page,V=t.rowsPerPage,W=t.rowsPerPageOptions,$=W===void 0?wCt:W,X=t.SelectProps,re=X===void 0?{}:X,ae=Mt(t,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onPageChange","onChangeRowsPerPage","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps"]),Q=M||F,ie;
154(h===Ru||h==="td")&&(ie=d||1e3);var le=Dg(),fe=Dg(),de=re.native?"option":ln;return x.createElement(h,ve({className:Ut(l.root,c),colSpan:ie,ref:r},ae),x.createElement(APe,{className:l.toolbar},x.createElement("div",{className:l.spacer}),$.length>1&&x.createElement(fo,{color:"inherit",variant:"body2",className:l.caption,id:fe},E),$.length>1&&x.createElement(Bd,ve({classes:{select:l.select,icon:l.selectIcon},input:x.createElement(Hu,{className:Ut(l.input,l.selectRoot)}),value:V,onChange:Q,id:le,labelId:fe},re),$.map(function(ge){return x.createElement(de,{className:l.menuItem,key:ge.value?ge.value:ge,value:ge.value?ge.value:ge},ge.label?ge.label:ge)})),x.createElement(fo,{color:"inherit",variant:"body2",className:l.caption},_({from:p===0?0:B*V+1,to:p!==-1?Math.min(p,(B+1)*V):(B+1)*V,count:p===-1?-1:p,page:B})),x.createElement(i,{className:l.actions,backIconButtonProps:ve({title:s,"aria-label":s},a),count:p,nextIconButtonProps:ve({title:O,"aria-label":O},S),onChangePage:I,onPageChange:N,page:B,rowsPerPage:V})))});const PPe=yr(bCt,{name:"MuiTablePagination"})(SCt);var CCt=function(t){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:t.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Jn(t.palette.secondary.main,t.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}},Xle="tr",xCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.component,o=a===void 0?Xle:a,s=t.hover,l=s===void 0?!1:s,c=t.selected,d=c===void 0?!1:c,f=Mt(t,["classes","className","component","hover","selected"]),h=x.useContext(y4);return x.createElement(o,ve({ref:r,className:Ut(n.root,i,h&&{head:n.head,footer:n.footer}[h.variant],l&&n.hover,d&&n.selected),role:o===Xle?null:"row"},f))});const NS=yr(CCt,{name:"MuiTableRow"})(xCt),TCt=zo(x.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}));var ACt=function(t){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:t.palette.text.secondary},"&:hover":{color:t.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:t.palette.text.primary,"&& $icon":{opacity:1,color:t.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}},PCt=x.forwardRef(function(t,r){var n=t.active,i=n===void 0?!1:n,a=t.children,o=t.classes,s=t.className,l=t.direction,c=l===void 0?"asc":l,d=t.hideSortIcon,f=d===void 0?!1:d,h=t.IconComponent,p=h===void 0?TCt:h,g=Mt(t,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return x.createElement(cm,ve({className:Ut(o.root,s,i&&o.active),component:"span",disableRipple:!0,ref:r},g),a,f&&!i?null:x.createElement(p,{className:Ut(o.icon,o["iconDirection".concat(zr(c))])}))});const RCt=yr(ACt,{name:"MuiTableSortLabel"})(PCt);var G0;function RPe(){if(G0)return G0;var e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),G0="reverse",e.scrollLeft>0?G0="default":(e.scrollLeft=1,e.scrollLeft===0&&(G0="negative")),document.body.removeChild(e),G0}function Zle(e,t){var r=e.scrollLeft;if(t!=="rtl")return r;var n=RPe();switch(n){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function OCt(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function ICt(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},a=n.ease,o=a===void 0?OCt:a,s=n.duration,l=s===void 0?300:s,c=null,d=t[e],f=!1,h=function(){f=!0},p=function g(_){if(f){i(new Error("Animation cancelled"));return}c===null&&(c=_);var b=Math.min(1,(_-c)/l);if(t[e]=o(b)*(r-d)+d,b>=1){requestAnimationFrame(function(){i(null)});return}requestAnimationFrame(g)};return d===r?(i(new Error("Element already at target position")),h):(requestAnimationFrame(p),h)}var kCt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function NCt(e){var t=e.onChange,r=Mt(e,["onChange"]),n=x.useRef(),i=x.useRef(null),a=function(){n.current=i.current.offsetHeight-i.current.clientHeight};return x.useEffect(function(){var o=Ng(function(){var s=n.current;a(),s!==n.current&&t(n.current)});return window.addEventListener("resize",o),function(){o.clear(),window.removeEventListener("resize",o)}},[t]),x.useEffect(function(){a(),t(n.current)},[t]),x.createElement("div",ve({style:kCt,ref:i},r))}var DCt=function(t){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},colorPrimary:{backgroundColor:t.palette.primary.main},colorSecondary:{backgroundColor:t.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}
154,MCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.color,o=t.orientation,s=Mt(t,["classes","className","color","orientation"]);return x.createElement("span",ve({className:Ut(n.root,n["color".concat(zr(a))],i,o==="vertical"&&n.vertical),ref:r},s))});const LCt=yr(DCt,{name:"PrivateTabIndicator"})(MCt);var FCt={root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},BCt=x.createElement(LG,{fontSize:"small"}),zCt=x.createElement(FG,{fontSize:"small"}),HCt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.direction,o=t.orientation,s=t.disabled,l=Mt(t,["classes","className","direction","orientation","disabled"]);return x.createElement(cm,ve({component:"div",className:Ut(n.root,i,s&&n.disabled,o==="vertical"&&n.vertical),ref:r,role:null,tabIndex:null},l),a==="left"?BCt:zCt)});const UCt=yr(FCt,{name:"MuiTabScrollButton"})(HCt);var VCt=function(t){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Nt({},t.breakpoints.down("xs"),{display:"none"}),indicator:{}}},qCt=x.forwardRef(function(t,r){var n=t["aria-label"],i=t["aria-labelledby"],a=t.action,o=t.centered,s=o===void 0?!1:o,l=t.children,c=t.classes,d=t.className,f=t.component,h=f===void 0?"div":f,p=t.indicatorColor,g=p===void 0?"secondary":p,_=t.onChange,b=t.orientation,E=b===void 0?"horizontal":b,S=t.ScrollButtonComponent,P=S===void 0?UCt:S,O=t.scrollButtons,I=O===void 0?"auto":O,N=t.selectionFollowsFocus,M=t.TabIndicatorProps,F=M===void 0?{}:M,B=t.TabScrollButtonProps,V=t.textColor,W=V===void 0?"inherit":V,$=t.value,X=t.variant,re=X===void 0?"standard":X,ae=Mt(t,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),Q=ts(),ie=re==="scrollable",le=Q.direction==="rtl",fe=E==="vertical",de=fe?"scrollTop":"scrollLeft",ge=fe?"top":"left",Ae=fe?"bottom":"right",Fe=fe?"clientHeight":"clientWidth",Pe=fe?"height":"width",ce=x.useState(!1),pe=ce[0],Ne=ce[1],De=x.useState({}),Ve=De[0],Ke=De[1],Qe=x.useState({start:!1,end:!1}),Ue=Qe[0],ut=Qe[1],We=x.useState({overflow:"hidden",marginBottom:null}),ke=We[0],Le=We[1],Be=new Map,Ze=x.useRef(null),Et=x.useRef(null),Yt=function(){var ze=Ze.current,it;if(ze){var Je=ze.getBoundingClientRect();it={clientWidth:ze.clientWidth,scrollLeft:ze.scrollLeft,scrollTop:ze.scrollTop,scrollLeftNormalized:Zle(ze,Q.direction),scrollWidth:ze.scrollWidth,top:Je.top,bottom:Je.bottom,left:Je.left,right:Je.right}}var Jt;if(ze&&$!==!1){var pr=Et.current.children;if(pr.length>0){var Fr=pr[Be.get($)];Jt=Fr?Fr.getBoundingClientRect():null}}return{tabsMeta:it,tabMeta:Jt}},sr=ia(function(){var st,ze=Yt(),it=ze.tabsMeta,Je=ze.tabMeta,Jt=0;if(Je&&it)if(fe)Jt=Je.top-it.top+it.scrollTop;else{var pr=le?it.scrollLeftNormalized+it.clientWidth-it.scrollWidth:it.scrollLeft;Jt=Je.left-it.left+pr}var Fr=(st={},Nt(st,ge,Jt),Nt(st,Pe,Je?Je[Pe]:0),st);if(isNaN(Ve[ge])||isNaN(Ve[Pe]))Ke(Fr);else{var Or=Math.abs(Ve[ge]-Fr[ge]),vn=Math.abs(Ve[Pe]-Fr[Pe]);(Or>=1||vn>=1)&&Ke(Fr)}}),Kt=function(ze){ICt(de,Ze.current,ze)},Qt=function(ze){var it=Ze.current[de];fe?it+=ze:(it+=ze*(le?-1:1),it*=le&&RPe()==="reverse"?-1:1),Kt(it)},qt=function(){Qt(-Ze.current[Fe])},hr=function(){Qt(Ze.current[Fe])},rr=x.useCallback(function(st){Le({overflow:null,marginBottom:-st})},[]),tr=function(){var ze={};ze.scrollbarSizeListener=ie?x.createElement(NCt,{className:c.scrollable,onChange:rr}):null;var it=Ue.start||Ue.end,Je=ie&&(I==="auto"&&it||I==="desktop"||I==="on");return ze.scrollButtonStart=Je?x.createElement(P,ve({orientation:E,direction:le?"right":"left",onClick:qt,disabled:!Ue.start,className:Ut(c.scrollButtons,I!=="on"&&c.scrollButtonsDesktop)},B)):null,ze.scrollButtonEnd=Je?x.createElement(P,ve({orientation:E,direction:le?"left":"right",onClick:hr,disabled:!Ue.end,className:Ut(c.scrollButtons,I!=="on"&&c.scrollButtonsDesktop)},B)):null,ze},dt=ia(function(){var st=Yt(),ze=st.tabsMeta,it=st.tabMeta;if(!(!it||!ze)){if(it[ge]<ze[ge]){var Je=ze[de]+(it[ge]-ze[ge]);Kt(Je)}else if(it[Ae]>ze[Ae]){var Jt=ze[de]+(it[Ae]-ze[Ae]);Kt(Jt)}}}),bt=ia(function(){if(ie&&I!=="off"){var st=Ze.current,ze=st.scrollTop,it=st.scrollHeight,Je=st.clientHeight,Jt=st.scrollWidth,pr=st.clientWidth,Fr,Or;if(fe)Fr=ze>1,Or=ze<it-Je-1;else{var vn=Zle(Ze.current,Q.direction);Fr=le?vn<Jt-pr-1:vn>1,Or=le?vn>1:vn<Jt-pr-1}(Fr!==Ue.start||Or!==Ue.end)&&ut({start:Fr,end:Or})}});x.useEffect(function(){var st=Ng(function(){sr(),bt()}),ze=c4(Ze.current);return ze.addEventListener("resize",st),function(){st.clear(),ze.removeEventListener("resize",st)}},[sr,bt]);var nr=x.useCallback(Ng(function(){bt()}));x.useEffect(function(){return function(){nr.clear()}},[nr]),x.useEffect(function(){Ne(!0)},[]),x.useEffect(function(){sr(),bt()}),x.useEffect(function(){dt()},[dt,Ve]),x.useImperativeHandle(a,function(){return{updateIndicator:sr,updateScrollButtons:bt}},[sr,bt]);var Ee=x.createElement(LCt,ve({className:c.indicator,orientation:E,color:g},F,{style:ve({},Ve,F.style)})),Oe=0,Re=x.Children.map(l,function(st){if(!x.isValidElement(st))return null;var ze=st.props.value===void 0?Oe:st.props.value;Be.set(ze,Oe);var it=ze===$;return Oe+=1,x.cloneElement(st,{fullWidth:re==="fullWidth",indicator:it&&!pe&&Ee,selected:it,selectionFollowsFocus:N,onChange:_,textColor:W,value:ze})}),pt=function(ze){var it=ze.target,Je=it.getAttribute("role");
154if(Je==="tab"){var Jt=null,pr=E!=="vertical"?"ArrowLeft":"ArrowUp",Fr=E!=="vertical"?"ArrowRight":"ArrowDown";switch(E!=="vertical"&&Q.direction==="rtl"&&(pr="ArrowRight",Fr="ArrowLeft"),ze.key){case pr:Jt=it.previousElementSibling||Et.current.lastChild;break;case Fr:Jt=it.nextElementSibling||Et.current.firstChild;break;case"Home":Jt=Et.current.firstChild;break;case"End":Jt=Et.current.lastChild;break}Jt!==null&&(Jt.focus(),ze.preventDefault())}},mt=tr();return x.createElement(h,ve({className:Ut(c.root,d,fe&&c.vertical),ref:r},ae),mt.scrollButtonStart,mt.scrollbarSizeListener,x.createElement("div",{className:Ut(c.scroller,ie?c.scrollable:c.fixed),style:ke,ref:Ze,onScroll:nr},x.createElement("div",{"aria-label":n,"aria-labelledby":i,className:Ut(c.flexContainer,fe&&c.flexContainerVertical,s&&!ie&&c.centered),onKeyDown:pt,ref:Et,role:"tablist"},Re),pe&&Ee),mt.scrollButtonEnd)});const OPe=yr(VCt,{name:"MuiTabs"})(qCt);var jCt={standard:AG,filled:$Ae,outlined:RG},$Ct={root:{}},WCt=x.forwardRef(function(t,r){var n=t.autoComplete,i=t.autoFocus,a=i===void 0?!1:i,o=t.children,s=t.classes,l=t.className,c=t.color,d=c===void 0?"primary":c,f=t.defaultValue,h=t.disabled,p=h===void 0?!1:h,g=t.error,_=g===void 0?!1:g,b=t.FormHelperTextProps,E=t.fullWidth,S=E===void 0?!1:E,P=t.helperText,O=t.hiddenLabel,I=t.id,N=t.InputLabelProps,M=t.inputProps,F=t.InputProps,B=t.inputRef,V=t.label,W=t.multiline,$=W===void 0?!1:W,X=t.name,re=t.onBlur,ae=t.onChange,Q=t.onFocus,ie=t.placeholder,le=t.required,fe=le===void 0?!1:le,de=t.rows,ge=t.rowsMax,Ae=t.maxRows,Fe=t.minRows,Pe=t.select,ce=Pe===void 0?!1:Pe,pe=t.SelectProps,Ne=t.type,De=t.value,Ve=t.variant,Ke=Ve===void 0?"standard":Ve,Qe=Mt(t,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]),Ue={};if(Ke==="outlined"&&(N&&typeof N.shrink<"u"&&(Ue.notched=N.shrink),V)){var ut,We=(ut=N?.required)!==null&&ut!==void 0?ut:fe;Ue.label=x.createElement(x.Fragment,null,V,We&&" *")}ce&&((!pe||!pe.native)&&(Ue.id=void 0),Ue["aria-describedby"]=void 0);var ke=P&&I?"".concat(I,"-helper-text"):void 0,Le=V&&I?"".concat(I,"-label"):void 0,Be=jCt[Ke],Ze=x.createElement(Be,ve({"aria-describedby":ke,autoComplete:n,autoFocus:a,defaultValue:f,fullWidth:S,multiline:$,name:X,rows:de,rowsMax:ge,maxRows:Ae,minRows:Fe,type:Ne,value:De,id:I,inputRef:B,onBlur:re,onChange:ae,onFocus:Q,placeholder:ie,inputProps:M},Ue,F));return x.createElement(um,ve({className:Ut(s.root,l),disabled:p,error:_,fullWidth:S,hiddenLabel:O,ref:r,required:fe,color:d,variant:Ke},Qe),V&&x.createElement(dm,ve({htmlFor:I,id:Le},N),V),ce?x.createElement(Bd,ve({"aria-describedby":ke,id:I,labelId:Le,value:De,input:Ze},pe),o):Ze,P&&x.createElement(h4,ve({id:ke},b),P))});const Tr=yr($Ct,{name:"MuiTextField"})(WCt);function Qle(e){return Math.round(e*1e5)/1e5}function GCt(){return{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}}}var KCt=function(t){return{popper:{zIndex:t.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:GCt(),tooltip:{backgroundColor:Jn(t.palette.grey[700],.9),borderRadius:t.shape.borderRadius,color:t.palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(10),lineHeight:"".concat(Qle(14/10),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:Jn(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(Qle(16/14),"em"),fontWeight:t.typography.fontWeightRegular},tooltipPlacementLeft:Nt({transformOrigin:"right center",margin:"0 24px "},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Nt({transformOrigin:"left center",margin:"0 24px"},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Nt({transformOrigin:"center bottom",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Nt({transformOrigin:"center top",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"})}},BA=!1,pL=null,YCt=x.forwardRef(function(t,r){var n=t.arrow,i=n===void 0?!1:n,a=t.children,o=t.classes,s=t.disableFocusListener,l=s===void 0?!1:s,c=t.disableHoverListener,d=c===void 0?!1:c,f=t.disableTouchListener,h=f===void 0?!1:f,p=t.enterDelay,g=p===void 0?100:p,_=t.enterNextDelay,b=_===void 0?0:_,E=t.enterTouchDelay,S=E===void 0?700:E,P=t.id,O=t.interactive,I=O===void 0?!1:O,N=t.leaveDelay,M=N===void 0?0:N,F=t.leaveTouchDelay,B=F===void 0?1500:F,V=t.onClose,W=t.onOpen,$=t.open,X=t.placement,re=X===void 0?"bottom":X,ae=t.PopperComponent,Q=ae===void 0?gPe:ae,ie=t.PopperProps,le=t.title,fe=t.TransitionComponent,de=fe===void 0?p4:fe,ge=t.TransitionProps,Ae=Mt(t,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),Fe=ts(),Pe=x.useState(),ce=Pe[0],pe=Pe[1],Ne=x.useState(null),De=Ne[0],Ve=Ne[1],Ke=x.useRef(!1),Qe=x.useRef(),Ue=x.useRef(),ut=x.useRef(),We=x.useRef(),ke=Rd({controlled:$,default:!1,name:"Tooltip",state:"open"}),Le=Zo(ke,2),Be=Le[0],Ze=Le[1],Et=Be,Yt=Dg(P);x.useEffect(function(){return function(){clearTimeout(Qe.current),clearTimeout(Ue.current),clearTimeout(ut.current),clearTimeout(We.current)}},[]);var sr=function(Xr){clearTimeout(pL),BA=!0,Ze(!0),W&&W(Xr)},Kt=function(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Zr){var fn=a.props;Zr.type==="mouseover"&&fn.onMouseOver&&Xr&&fn.onMouseOver(Zr),!(Ke.current&&Zr.type!=="touchstart")&&(ce&&ce.removeAttribute("title"),clearTimeout(Ue.current),clearTimeout(ut.current),g||BA&&b?(Zr.persist(),Ue.current=setTimeout(function(){sr(Zr)},BA?b:g)):sr(Zr))}},Qt=f2(),qt=Qt.isFocusVisible,hr=Qt.onBlurVisible,rr=Qt.ref,tr=x.useState(!1),dt=tr[0],bt=tr[1],nr=function(){dt&&(bt(!1),hr())},Ee=function(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Zr){ce||pe(Zr.currentTarget),qt(Zr)&&(bt(!0),Kt()(Zr));var fn=a.props;fn.onFocus&&Xr&&fn.onFocus(Zr)}},Oe=function(Xr){clearTimeout(pL),pL=setTimeout(function(){BA=!1},800+M),Ze(!1),V&&V(Xr),clearTimeout(Qe.current),Qe.current=setTimeout(function(){Ke.current=!1},Fe.transitions.duration.shortest)},Re=function(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Zr){var fn=a.props;Zr.type==="blur"&&(fn.onBlur&&Xr&&fn.onBlur(Zr),nr()),Zr.type==="mouseleave"&&fn.onMouseLeave&&Zr.currentTarget===ce&&fn.onMouseLeave(Zr),clearTimeout(Ue.current),clearTimeout(ut.current),Zr.persist(),ut.current=setTimeout(function(){Oe(Zr)},M)}},pt=function(Xr){Ke.current=!0;var Zr=a.props;Zr.onTouchStart&&Zr.onTouchStart(Xr)},mt=function(Xr){pt(Xr),clearTimeout(ut.current),clearTimeout(Qe.current),clearTimeout(We.current),Xr.persist(),We.current=setTimeout(function(){Kt()(Xr)},S)},st=function(Xr){a.props.onTouchEnd&&a.props.onTouchEnd(Xr),clearTimeout(We.current),clearTimeout(ut.current),Xr.persist(),ut.current=setTimeout(function(){Oe(Xr)},B)},ze=mi(pe,r),it=mi(rr,ze),Je=x.useCallback(function(cn){yh(it,vo.findDOMNode(cn))},[it]),Jt=mi(a.ref,Je);le===""&&(Et=!1);var pr=!Et&&!d,Fr=ve({"aria-describedby":Et?Yt:null,title:pr&&typeof le=="string"?le:null},Ae,a.props,{className:Ut(Ae.className,a.props.className),onTouchStart:pt,ref:Jt}),Or={};h||(Fr.onTouchStart=mt,Fr.onTouchEnd=st),d||(Fr.onMouseOver=Kt(),Fr.onMouseLeave=Re(),I&&(Or.onMouseOver=Kt(!1),Or.onMouseLeave=Re(!1))),l||(Fr.onF
154ocus=Ee(),Fr.onBlur=Re(),I&&(Or.onFocus=Ee(!1),Or.onBlur=Re(!1)));var vn=x.useMemo(function(){return vh({popperOptions:{modifiers:{arrow:{enabled:!!De,element:De}}}},ie)},[De,ie]);return x.createElement(x.Fragment,null,x.cloneElement(a,Fr),x.createElement(Q,ve({className:Ut(o.popper,I&&o.popperInteractive,i&&o.popperArrow),placement:re,anchorEl:ce,open:ce?Et:!1,id:Fr["aria-describedby"],transition:!0},Or,vn),function(cn){var Xr=cn.placement,Zr=cn.TransitionProps;return x.createElement(de,ve({timeout:Fe.transitions.duration.shorter},Zr,ge),x.createElement("div",{className:Ut(o.tooltip,o["tooltipPlacement".concat(zr(Xr.split("-")[0]))],Ke.current&&o.touch,i&&o.tooltipArrow)},le,i?x.createElement("span",{className:o.arrow,ref:Ve}):null))}))});const Yn=yr(KCt,{name:"MuiTooltip",flip:!1})(YCt);function v0({delay:e=!1}){const[t,r]=x.useState(!e);return PYe(()=>{r(!0)},e),t?u.createElement("div",{className:"flex h-full flex-1 flex-col items-center justify-center"},u.createElement(fo,{className:"mb-16 text-20",color:"textSecondary"},"Carregando..."),u.createElement(V_,{className:"w-xs",color:"primary"})):null}v0.propTypes={delay:xe.oneOfType([xe.number,xe.bool])};function IPe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=IPe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ft(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=IPe(e))&&(n&&(n+=" "),n+=t);return n}const XCt=Rh(e=>({root:{},success:{backgroundColor:pS[500],color:"#FFFFFF"},error:{backgroundColor:e.palette.error.dark,color:e.palette.getContrastText(e.palette.error.dark)},info:{backgroundColor:hS[500],color:"#FFFFFF"},warning:{backgroundColor:Kbe[500],color:"#FFFFFF"}})),Jle={success:"check_circle",warning:"warning",error:"error_outline",info:"info"};function ZCt(){const e=An(),t=at(({fuse:i})=>i.message.state),r=at(({fuse:i})=>i.message.options),n=XCt();return u.createElement(EPe,{open:t,onClose:()=>e(lre()),classes:{root:n.root},ContentProps:{variant:"body2",headlineMapping:{body1:"div",body2:"div"}},...r},u.createElement(MG,{className:Ft(n[r.variant]),message:u.createElement("div",{className:"flex items-center"},Jle[r.variant]&&u.createElement(Lg,{className:"mr-8",color:"inherit"},Jle[r.variant]),r.message),action:!r.noActions&&[u.createElement(cr,{key:"close","aria-label":"Close",color:"inherit",onClick:()=>e(lre())},u.createElement(Lg,null,"close"))]}))}const Yer=u.memo(ZCt);var Nb={},mL={exports:{}},ece;function $t(){return ece||(ece=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(mL)),mL.exports}var vL={exports:{}},gL={exports:{}},tce;function QCt(){return tce||(tce=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(gL)),gL.exports}var rce;function Wt(){return rce||(rce=1,(function(e){var t=QCt().default;function r(n,i){if(typeof WeakMap=="function")var a=new WeakMap,o=new WeakMap;return(e.exports=r=function(l,c){if(!c&&l&&l.__esModule)return l;var d,f,h={__proto__:null,default:l};if(l===null||t(l)!="object"&&typeof l!="function")return h;if(d=c?o:a){if(d.has(l))return d.get(l);d.set(l,h)}for(var p in l)p!=="default"&&{}.hasOwnProperty.call(l,p)&&((f=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,p))&&(f.get||f.set)?d(h,p,f):h[p]=l[p]);return h},e.exports.__esModule=!0,e.exports.default=e.exports)(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(vL)),vL.exports}var yL={};const JCt=zq(j_t);var nce;function Gt(){return nce||(nce=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=JCt})(yL)),yL}var ice;function ext(){if(ice)return Nb;ice=1;var e=$t(),t=Wt();
154Object.defineProperty(Nb,"__esModule",{value:!0}),Nb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");return Nb.default=i,Nb}var txt=ext();const BG=et(txt);var Db={},ace;function rxt(){if(ace)return Db;ace=1;var e=$t(),t=Wt();Object.defineProperty(Db,"__esModule",{value:!0}),Db.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");return Db.default=i,Db}var nxt=rxt();const Dm=et(nxt);var Mb={},oce;function ixt(){if(oce)return Mb;oce=1;var e=$t(),t=Wt();Object.defineProperty(Mb,"__esModule",{value:!0}),Mb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");return Mb.default=i,Mb}var axt=ixt();const zG=et(axt);var Lb={},sce;function oxt(){if(sce)return Lb;sce=1;var e=$t(),t=Wt();Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");return Lb.default=i,Lb}var sxt=oxt();const lxt=et(sxt);var Fb={},lce;function cxt(){if(lce)return Fb;lce=1;var e=$t(),t=Wt();Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M1 21h22L12 2 
1541 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");return Fb.default=i,Fb}var uxt=cxt();const dxt=et(uxt);function fxt(){const e=An(),t=at(({fuse:l})=>l.dialogMessage.state),r=at(({fuse:l})=>l.dialogMessage.options),{variant:n,title:i,description:a}=r,o=()=>{e(NKe())},s=u.useMemo(()=>{switch(n){case"success":return u.createElement("div",{className:"flex items-center justify-center rounded-full bg-green-lightest p-12 text-green-dark"},u.createElement(BG,{style:{fontSize:"6rem"}}));case"warning":return u.createElement("div",{className:"flex items-center justify-center rounded-full bg-orange-lightest p-12 text-orange-dark"},u.createElement(dxt,{style:{fontSize:"6rem"}}));case"error":return u.createElement("div",{className:"flex items-center justify-center rounded-full bg-red-lightest p-12 text-red-dark"},u.createElement(zG,{style:{fontSize:"6rem"}}));case"info":return u.createElement("div",{className:"flex items-center justify-center rounded-full bg-blue-lightest p-12 text-blue-dark"},u.createElement(lxt,{style:{fontSize:"6rem"}}));default:return null}},[n]);return u.createElement(Eo,{open:t,onClose:o,fullWidth:!0,PaperProps:{className:"shadow-lg rounded-12 max-w-sm"}},u.createElement("div",{className:"relative flex flex-col items-center justify-center p-24 sm:p-32"},s,u.createElement("div",{className:"mt-24 space-y-24 text-center"},u.createElement("div",{className:"m-0 text-20 font-bold text-gray-700"},i),u.createElement("p",{className:"m-0 text-16 text-gray-500"},a)),u.createElement(cr,{className:"absolute right-0 top-0 mr-12 mt-12 text-gray-500",onClick:o},u.createElement(Dm,{color:"inherit"}))))}const Xer=u.memo(fxt);function hxt({children:e,loadingProps:t={delay:100}}){return u.createElement(u.Suspense,{fallback:u.createElement(v0,{...t})},e)}hxt.propTypes={loadingProps:xe.object,children:xe.node};var Bb={},cce;function pxt(){if(cce)return Bb;cce=1;var e=$t(),t=Wt();Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");return Bb.default=i,Bb}var mxt=pxt();const vxt=et(mxt);var zb={},uce;function gxt(){if(uce)return zb;uce=1;var e=$t(),t=Wt();Object.defineProperty(zb,"__esModule",{value:!0}),zb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");return zb.default=i,zb}var yxt=gxt();const _xt=et(yxt);var bxt=tEe();const Tp=et(bxt);function Ext({columns:e,loadingRowsQuantity:t}){return u.createElement("div",{className:"overflow-auto"},u.createElement("div",{className:"flex border-0 border-b-1 border-solid border-gray-100 bg-gray-200 text-16 font-bold text-gray-700"},e.map(({Header:r,loadingWidth:n,className:i})=>u.createElement("span",{key:r,className:Ft("p-20",i,n||"min-w-160 flex-1 whitespace-nowrap")},r))),Array.from({length:t},(r,n)=>n+1).map(r=>u.createElement("div",{key:r,className:"flex border-0 border-b-1 border-solid border-gray-100"},e.map(({Header:n,loadingWidth:i,className:a})=>u.createElement("span",{key:n,className:Ft("p-20",a,i||"min-w-160 flex-1")},u.createElement("div",{className:"h-28 w-full animate-pulse rounded-8 bg-gray-200"}))))))}var Hb={},dce;function wxt(){if(dce)return Hb;dce=1;var e=$t(),t=Wt();
154Object.defineProperty(Hb,"__esModule",{value:!0}),Hb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}),"ErrorRounded");return Hb.default=i,Hb}var Sxt=wxt();const jC=et(Sxt);function Jd({title:e,className:t,...r}){return u.createElement("div",{className:Ft("flex h-full w-full flex-col items-center justify-center py-68 text-gray-300",t),...r},u.createElement(jC,{className:"h-88 w-88 text-red-lighter"}),e&&u.createElement("h3",{className:"mt-6 text-center text-18 font-semibold text-red-lighter"},e))}const kPe=e=>x.createElement("svg",{id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",style:{enableBackground:"new 0 0 512 512"},xmlSpace:"preserve",width:"1em",height:"1em",...e},x.createElement("g",null,x.createElement("g",null,x.createElement("path",{d:"M451.566,169.439l56.193-56.649c1.663-1.678,2.439-4.04,2.095-6.376c-0.345-2.337-1.77-4.375-3.846-5.5L321.512,0.916 c-2.919-1.581-6.53-1.058-8.877,1.29l-56.639,56.639L199.361,2.21c-1.41-1.42-3.3-2.21-5.29-2.21c-1.25,0-2.48,0.319-3.58,0.92 l-59.259,32.108c-1.76,0.96-3.04,2.54-3.61,4.46c-0.57,1.92-0.36,3.95,0.59,5.71c1.32,2.42,3.85,3.931,6.6,3.931 c1.24,0,2.48-0.32,3.57-0.91l54.329-29.449l50.869,50.869L72.374,160.177l-50.439-50.85l90.068-48.818 c1.77-0.95,3.05-2.53,3.62-4.45c0.57-1.92,0.36-3.95-0.6-5.71c-1.31-2.42-3.84-3.93-6.59-3.93c-1.24,0-2.47,0.319-3.57,0.909 l-98.868,53.59c-2.07,1.109-3.51,3.17-3.85,5.5c-0.34,2.319,0.441,4.699,2.1,6.37l56.187,56.653L4.241,226.089 c-1.663,1.678-2.439,4.04-2.095,6.376c0.345,2.337,1.77,4.375,3.846,5.5l57.513,31.172v135.344 c-0.001,0.259,0.012,0.517,0.038,0.772c0.011,0.109,0.032,0.215,0.047,0.323c0.019,0.131,0.034,0.262,0.06,0.391 c0.032,0.163,0.076,0.321,0.118,0.48c0.02,0.073,0.035,0.147,0.057,0.22c0.049,0.161,0.108,0.318,0.167,0.476 c0.026,0.07,0.048,0.141,0.077,0.21c0.058,0.142,0.125,0.277,0.191,0.413c0.041,0.085,0.078,0.17,0.122,0.253 c0.06,0.112,0.127,0.219,0.191,0.327c0.062,0.103,0.121,0.207,0.187,0.308c0.055,0.083,0.117,0.162,0.176,0.243 c0.085,0.117,0.169,0.236,0.261,0.35c0.051,0.063,0.108,0.121,0.161,0.182c0.106,0.122,0.212,0.244,0.326,0.359 c0.059,0.059,0.124,0.113,0.185,0.172c0.114,0.107,0.226,0.215,0.347,0.315c0.117,0.097,0.241,0.185,0.363,0.274 c0.072,0.053,0.139,0.109,0.213,0.16c0.215,0.145,0.438,0.28,0.668,0.404l184.935,99.966c0.266,0.146,0.544,0.272,0.829,0.386 c0.062,0.024,0.125,0.046,0.188,0.068c0.208,0.077,0.419,0.145,0.636,0.202c0.078,0.021,0.155,0.042,0.233,0.06 c0.21,0.049,0.423,0.088,0.639,0.119c0.074,0.01,0.146,0.024,0.22,0.033c0.282,0.032,0.568,0.053,0.859,0.053 c0.291,0,0.577-0.021,0.859-0.053c0.074-0.009,0.147-0.023,0.221-0.033c0.216-0.031,0.429-0.07,0.638-0.119 c0.078-0.018,0.156-0.039,0.233-0.06c0.216-0.058,0.428-0.125,0.635-0.202c0.063-0.022,0.126-0.044,0.188-0.068 c0.284-0.114,0.562-0.24,0.828-0.386l184.935-99.966c0.23-0.124,0.453-0.259,0.668-0.404c0.074-0.051,0.142-0.108,0.213-0.16 c0.123-0.09,0.247-0.178,0.363-0.274c0.121-0.1,0.233-0.208,0.347-0.315c0.061-0.059,0.126-0.112,0.185-0.172 c0.114-0.115,0.22-0.237,0.326-0.359c0.053-0.061,0.11-0.119,0.161-0.182c0.092-0.113,0.176-0.232,0.261-0.35 c0.059-0.081,0.121-0.16,0.176-0.243c0.066-0.101,0.125-0.204,0.187-0.308c0.065-0.108,0.132-0.215,0.191-0.327 c0.044-0.083,0.081-0.168,0.122-0.253c0.066-0.136,0.133-0.271,0.191-0.413c0.029-0.069,0.051-0.14,0.077-0.21 c0.059-0.157,0.118-0.314,0.167-0.476c0.022-0.072,0.037-0.146,0.057-0.22c0.042-0.159,0.086-0.317,0.118-0.48 c0.026-0.129,0.041-0.26,0.06-0.391c0.015-0.108,0.037-0.214,0.047-0.323c0.026-0.256,0.039-0.514,0.038-0.772V269.137 l57.51-31.171c2.07-1.12,3.51-3.18,3.85-5.5c0.34-2.33-0.44-4.71-2.09-6.38L451.566,169.439z M319.284,16.771l170.777,92.561 l-50.438,50.848L268.419,67.636L319.284,16.771z M74.546,258.061l-52.608-28.514l50.438-50.848l171.205,92.544l-50.866,50.865 L74.61,258.095C74.589,258.083,74.568,258.072,74.546,258.061z M248.5,491.921L78.504,400.03V277.267l111.984,60.696 c1.125,0.609,2.353,0.906,3.571,0.906c1.943,0,3.863-0.754,5.306-2.196l49.135-49.135V491.921z M256,260.905L86.793,169.441 l169.211-91.465l169.207,91.464L256,260.905z M437.483,258.046c-0.041,0.021-0.081,0.043-0.121,0.065l-37.365,20.253 c-1.77,0.95-3.05,2.54-3.62,4.46c-0.57,1.921-0.36,3.95,0.59,5.711c1.32,2.42,3.85,3.92,6.6,3.92c1.24,0,2.48-0.311,3.57-0.9 l26.358-14.287v122.764L263.5,491.922V287.534l49.139,49.139c1.421,1.42,3.3,2.2,5.3,2.2c1.24,0,2.47-0.32,3.57-0.91 l59.259-32.119c1.76-0.95,3.04-2.54,3.61-4.46c0.57-1.92,0.36-3.94-0.59-5.7c-1.32-2.43-3.85-3.93-6.61-3.93 c-1.23,0-2.47,0.31-3.56,0.91l-54.329,29.438l-50.869-50.858l171.207-92.549l50.439,50.85L437.483,258.046z"}))),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null),x.createElement("g",null));function dl({title:e,className:t,ActionButton:r,colorIcon:n="fill-current",children:i,...a}){return u.createElement("div",{className:Ft("flex h-full w-full flex-col items-center justify-center space-y-8 py-68 text-gray-300",t),...a},u.createElement(kPe,{className:Ft("h-88 w-88",n),fill:"currentColor"}),e&&u.createElement("h3",{className:"text-center text-20 font-semibold"},e),i,r)}function fce(e,t,r){return t[r]<e[r]?-1:t[r]>e[r]?1:0}function Cxt(e,t){return e==="desc"?(r,n)=>fce(r,n,t):(r,n)=>-fce(r,n,t)}function xxt(e,t){const r=e.map((n,i)=>[n,i]);return r.sort((n,i)=>{const a=t(n[0],i[0]);return a!==0?a:n[1]-i[1]}),r.map(n=>n[0])}function Yy(e){switch(e){case"xs":return"xs:table-cell";case"sm":return"sm:table-cell";case"md":return"md:table-cell";case"lg":return"lg:table-cell";case"xl":return"xl:table-cell";case"2xl":return"2xl:table-cell";default:return""}}function Txt({columns:e,collapsibleOptions:t,order:r,orderBy:n,onRequestSort:i}){const a=o=>s=>{i(s,o)};return u.createElement(TPe,null,u.createElement(NS,null,t&&u.createElement(Ru,null),e.map((o,s)=>u.createElement(Ru,{key:o.accessor||s,className:Ft("whitespace-nowrap bg-gray-200 text-16 font-bold text-gray-700",o.hidden&&`tw-hidden ${Yy(o.hidden)}`),align:o.align||"left",sortDirection:n===o.accessor?r:!1}
154,o.sortable===!1?o.Header:u.createElement(RCt,{className:o.align==="center"?"ml-24":"",active:n===o.accessor,direction:n===o.accessor?r:"asc",onClick:a(o.accessor)},o.Header)))))}const Axt=Fl({root:{"& > *":{borderBottom:"unset"},backgroundColor:"rgba(0, 0, 0, 0.04)"},table:{backgroundColor:"#fff",borderRadius:10}});function Pxt({open:e,data:t,columns:r}){const n=Axt();return!t||t.length===0?null:u.createElement(NS,{className:n.root},u.createElement(Ru,{className:"w-full max-w-xl px-0 py-0 sm:px-16",colSpan:7},u.createElement(Oh,{in:e,timeout:"auto",unmountOnExit:!0},u.createElement(wbt,{margin:1},u.createElement(CPe,{className:Ft(n.table,"my-8 sm:my-16")},u.createElement(TPe,null,u.createElement(NS,null,r.map((i,a)=>u.createElement(Ru,{key:i.accessor||a,className:Ft(i.hidden&&`tw-hidden ${Yy(i.hidden)}`),align:i.align||"left"},i.Header)))),u.createElement(xPe,null,t.map((i,a)=>u.createElement(NS,{key:i.id||a},r.map((o,s)=>o.Cell?u.createElement(Ru,{key:s,className:Ft(o.className,o.hidden&&`tw-hidden ${Yy(o.hidden)}`)},u.createElement(o.Cell,{row:i})):u.createElement(Ru,{key:o.accessor,className:Ft(o.className,o.hidden&&`tw-hidden ${Yy(o.hidden)}`)},o.formatDataFunction?u.createElement(u.Fragment,null,o.formatDataFunction(Tp(i,o.accessor))):Tp(i,o.accessor)))))))))))}function hce({row:e,columns:t,collapsibleOptions:r,...n}){const[i,a]=u.useState(!1),o={...n};return e?.total&&(o.onClick=null),u.createElement(u.Fragment,null,u.createElement(NS,{classes:{root:"hover:bg-gray-50"},...o},r&&u.createElement(Ru,{key:"collapsibleButton"},u.createElement(cr,{size:"small",disabled:!Tp(e,r.accessor)||Tp(e,r.accessor).length===0,onClick:()=>a(!i)},i?u.createElement(_xt,null):u.createElement(vxt,null))),t.map((s,l)=>s.Cell?u.createElement(Ru,{key:l,align:s.align||"left",style:{backgroundColor:e?.total===!0?"#f3f4f6":"inherit"},className:Ft("text-16 text-gray-600",s.className,s.hidden&&`tw-hidden ${Yy(s.hidden)}`,e?.total&&"font-bold")},u.createElement(s.Cell,{row:e})):u.createElement(Ru,{key:s.accessor,align:s.align||"left",style:{backgroundColor:e?.total===!0?"#f3f4f6":"inherit"},className:Ft("text-16 text-gray-600",s.className,s.hidden&&`tw-hidden ${Yy(s.hidden)}`,e?.total&&"font-bold")},s.formatDataFunction?u.createElement(u.Fragment,null,s.formatDataFunction(Tp(e,s.accessor),e)):Tp(e,s.accessor)))),r&&r.accessor&&u.createElement(Pxt,{open:i,data:Tp(e,r.accessor),columns:r.columns}))}function Zer({data:e,columns:t,collapsibleOptions:r,stickyHeader:n,totalRows:i,onRowClick:a,onChangePage:o,onChangeRowsPerPage:s,onRequestSort:l,resetCurrentPage:c,size:d,defaultOrder:f,defaultOrderBy:h,defaultRowsPerPage:p,rowsPerPageOptions:g=[10,25,50,75],loading:_,showError:b,loadingRowsQuantity:E=10,WrapperComponents:S=Qd,customEmptyState:P}){const[O,I]=u.useState(f||"desc"),[N,M]=u.useState(h||"id"),[F,B]=u.useState(0),[V,W]=u.useState(p||10);u.useEffect(()=>{c&&B(0)},[c]);const $=Q=>{Q&&a&&a(Q)},X=(Q,ie)=>{const le=N===ie&&O==="asc";I(le?"desc":"asc"),M(ie),l&&l(ie,le?"desc":"asc")},re=(Q,ie)=>{o&&o(ie),B(ie)},ae=Q=>{s&&s(parseInt(Q.target.value,10)),W(parseInt(Q.target.value,10)),B(0)};return!_&&b?u.createElement(S,{className:"relative flex h-full w-full flex-col overflow-auto rounded-8",variant:"outlined"},u.createElement(Jd,{title:"Problema ao buscar as informações"})):_&&!e?u.createElement(S,{className:"relative flex h-full w-full flex-col overflow-auto rounded-8",variant:"outlined"},u.createElement(Ext,{columns:t,loadingRowsQuantity:E||V})):u.createElement(S,{className:"relative flex h-full w-full flex-grow flex-col overflow-auto rounded-8",variant:"outlined"},_&&u.createElement("div",{className:"absolute left-0 right-0 z-20 rounded-t-8"},u.createElement(V_,{color:"primary",className:"w-full"})),u.createElement(cCt,{className:"h-full"},u.createElement(CPe,{stickyHeader:n||!1,size:d||"medium"},u.createElement(Txt,{columns:t,collapsibleOptions:r,order:O,orderBy:N,onRequestSort:X}),u.createElement(xPe,null,l?e?.map((Q,ie)=>u.createElement(hce,{key:Q.id||ie,row:Q,columns:t,collapsibleOptions:r,onClick:()=>$(Q),className:a&&!Q.total?"cursor-pointer":""})):xxt(e||[],Cxt(O,N)).map((Q,ie)=>u.createElement(hce,{key:Q.id||ie,row:Q,columns:t,collapsibleOptions:r,onClick:()=>$(Q),className:a?"cursor-pointer":""})))),!e?.length&&(P||u.createElement(dl,{title:"Nada encontrado"}))),i!==void 0&&(e?.length>0||i===-1)&&u.createElement(u.Fragment,null,u.createElement(zs,null),u.createElement(PPe,{className:"w-full flex-shrink-0 justify-end overflow-x-auto overflow-y-hidden",labelRowsPerPage:me.isMobile()?"Por página":"Registros por página",labelDisplayedRows:({from:Q,to:ie,count:le})=>le!==-1?`${Q}-${ie} de ${le}`:`${Q}-${ie}`,rowsPerPageOptions:g,component:"div",count:parseInt(i)||100,rowsPerPage:V,page:F,onChangePage:re,onChangeRowsPerPage:ae,nextIconButtonProps:i===-1?{disabled:e?.length<V}:void 0})))}function NPe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=NPe(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function hd(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=NPe(e))&&(n&&(n+=" "),n+=t);return n}const Rxt=zo(x.createElement("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),Oxt=zo(x.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Ixt=zo(x.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),kxt=zo(x.createElement("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),DPe=zo(x.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));var Nxt=function(t){var r=t.palette.type==="light"?Ig:kg,n=t.palette.type==="light"?kg:Ig;return{root:ve({},t.typography.body2,{borderRadius:t.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:r(t.palette.success.main,.6),backgroundColor:n(t.palette.success.main,.9),"& $icon":{color:t.palette.success.main}},standardInfo:{color:r(t.palette.info.main,.6),backgroundColor:n(t.palette.info.main,.9),"& $icon":{color:t.palette.info.main}},standardWarning:{color:r(t.palette.warning.main,.6),backgroundColor:n(t.palette.warning.main,.9),"& $icon":{color:t.palette.warning.main}},standardError:{color:r(t.palette.error.main,.6),backgroundColor:n(t.palette.error.main,.9),"& $icon":{color:t.palette.error.main}},outlinedSuccess:{color:r(t.palette.success.main,.6),border:"1px solid ".concat(t.palette.success.main),"& $icon":{color:t.palette.success.main}},outlinedInfo:{color:r(t.palette.info.main,.6),border:"1px solid ".concat(t.palette.info.main),"& $icon":{color:t.palette.info.main}},outlinedWarning:{color:r(t.palette.warning.main,.6),border:"1px solid ".concat(t.palette.warning.main),"& $icon":{color:t.palette.warning.main}},outlinedError:{color:r(t.palette.error.main,.6),border:"1px solid ".concat(t.palette.error.main),"& $icon":{color:t.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:t.palette.success.main},filledInfo:{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:t.palette.info.main},filledWarning:{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:t.palette.warning.main},filledError:{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:t.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},pce={success:x.createElement(Rxt,{fontSize:"inherit"}),warning:x.createElement(Oxt,{fontSize:"inherit"}),error:x.createElement(Ixt,{fontSize:"inherit"}),info:x.createElement(kxt,{fontSize:"inherit"})},Dxt=x.createElement(DPe,{fontSize:"small"}),Mxt=x.forwardRef(function(t,r){var n=t.action,i=t.children,a=t.classes,o=t.className,s=t.closeText,l=s===void 0?"Close":s,c=t.color,d=t.icon,f=t.iconMapping,h=f===void 0?pce:f,p=t.onClose,g=t.role,_=g===void 0?"alert":g,b=t.severity,E=b===void 0?"success":b,S=t.variant,P=S===void 0?"standard":S,O=Mt(t,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);
154return x.createElement(Qd,ve({role:_,square:!0,elevation:0,className:hd(a.root,a["".concat(P).concat(zr(c||E))],o),ref:r},O),d!==!1?x.createElement("div",{className:a.icon},d||h[E]||pce[E]):null,x.createElement("div",{className:a.message},i),n!=null?x.createElement("div",{className:a.action},n):null,n==null&&p?x.createElement("div",{className:a.action},x.createElement(cr,{size:"small","aria-label":l,title:l,color:"inherit",onClick:p},Dxt)):null)});const DS=yr(Nxt,{name:"MuiAlert"})(Mxt),Lxt=zo(x.createElement("path",{d:"M7 10l5 5 5-5z"}));function mce(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Fxt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.ignoreAccents,r=t===void 0?!0:t,n=e.ignoreCase,i=n===void 0?!0:n,a=e.limit,o=e.matchFrom,s=o===void 0?"any":o,l=e.stringify,c=e.trim,d=c===void 0?!1:c;return function(f,h){var p=h.inputValue,g=h.getOptionLabel,_=d?p.trim():p;i&&(_=_.toLowerCase()),r&&(_=mce(_));var b=f.filter(function(E){var S=(l||g)(E);return i&&(S=S.toLowerCase()),r&&(S=mce(S)),s==="start"?S.indexOf(_)===0:S.indexOf(_)>-1});return typeof a=="number"?b.slice(0,a):b}}function _L(e,t){for(var r=0;r<e.length;r+=1)if(t(e[r]))return r;return-1}var Bxt=Fxt(),vce=5;function zxt(e){var t=e.autoComplete,r=t===void 0?!1:t,n=e.autoHighlight,i=n===void 0?!1:n,a=e.autoSelect,o=a===void 0?!1:a,s=e.blurOnSelect,l=s===void 0?!1:s,c=e.clearOnBlur,d=c===void 0?!e.freeSolo:c,f=e.clearOnEscape,h=f===void 0?!1:f,p=e.componentName,g=p===void 0?"useAutocomplete":p,_=e.debug,b=_===void 0?!1:_,E=e.defaultValue,S=E===void 0?e.multiple?[]:null:E,P=e.disableClearable,O=P===void 0?!1:P,I=e.disableCloseOnSelect,N=I===void 0?!1:I,M=e.disabledItemsFocusable,F=M===void 0?!1:M,B=e.disableListWrap,V=B===void 0?!1:B,W=e.filterOptions,$=W===void 0?Bxt:W,X=e.filterSelectedOptions,re=X===void 0?!1:X,ae=e.freeSolo,Q=ae===void 0?!1:ae,ie=e.getOptionDisabled,le=e.getOptionLabel,fe=le===void 0?function(gt){return gt}:le,de=e.getOptionSelected,ge=de===void 0?function(gt,tt){return gt===tt}:de,Ae=e.groupBy,Fe=e.handleHomeEndKeys,Pe=Fe===void 0?!e.freeSolo:Fe,ce=e.id,pe=e.includeInputInList,Ne=pe===void 0?!1:pe,De=e.inputValue,Ve=e.multiple,Ke=Ve===void 0?!1:Ve,Qe=e.onChange,Ue=e.onClose,ut=e.onHighlightChange,We=e.onInputChange,ke=e.onOpen,Le=e.open,Be=e.openOnFocus,Ze=Be===void 0?!1:Be,Et=e.options,Yt=e.selectOnFocus,sr=Yt===void 0?!e.freeSolo:Yt,Kt=e.value,Qt=Dg(ce),qt=fe,hr=x.useRef(!1),rr=x.useRef(!0),tr=x.useRef(null),dt=x.useRef(null),bt=x.useState(null),nr=bt[0],Ee=bt[1],Oe=x.useState(-1),Re=Oe[0],pt=Oe[1],mt=i?0:-1,st=x.useRef(mt),ze=Rd({controlled:Kt,default:S,name:g}),it=Zo(ze,2),Je=it[0],Jt=it[1],pr=Rd({controlled:De,default:"",name:g,state:"inputValue"}),Fr=Zo(pr,2),Or=Fr[0],vn=Fr[1],cn=x.useState(!1),Xr=cn[0],Zr=cn[1],fn=ia(function(gt,tt){var ft;if(Ke)ft="";else if(tt==null)ft="";else{var Tt=qt(tt);ft=typeof Tt=="string"?Tt:""}Or!==ft&&(vn(ft),We&&We(gt,ft,"reset"))});x.useEffect(function(){fn(null,Je)},[Je,fn]);var vs=Rd({controlled:Le,default:!1,name:g,state:"open"}),Ar=Zo(vs,2),Ir=Ar[0],Ln=Ar[1],Wn=!Ke&&Je!=null&&Or===qt(Je),wr=Ir,jt=wr?$(Et.filter(function(gt){return!(re&&(Ke?Je:[Je]).some(function(tt){return tt!==null&&ge(gt,tt)}))}),{inputValue:Wn?"":Or,getOptionLabel:qt}):[],gn=ia(function(gt){gt===-1?tr.current.focus():nr.querySelector('[data-tag-index="'.concat(gt,'"]')).focus()});x.useEffect(function(){Ke&&Re>Je.length-1&&(pt(-1),gn(-1))},[Je,Ke,Re,gn]);function Xa(gt,tt){if(!dt.current||gt===-1)return-1;for(var ft=gt;;){if(tt==="next"&&ft===jt.length||tt==="previous"&&ft===-1)return-1;var Tt=dt.current.querySelector('[data-option-index="'.concat(ft,'"]')),vr=F?!1:Tt&&(Tt.disabled||Tt.getAttribute("aria-disabled")==="true");if(Tt&&!Tt.hasAttribute("tabindex")||vr)ft+=tt==="next"?1:-1;else return ft}}var la=ia(function(gt){var tt=gt.event,ft=gt.index,Tt=gt.reason,vr=Tt===void 0?"auto":Tt;if(st.current=ft,ft===-1?tr.current.removeAttribute("aria-activedescendant"):tr.current.setAttribute("aria-activedescendant","".concat(Qt,"-option-").concat(ft)),ut&&ut(tt,ft===-1?null:jt[ft],vr),!!dt.current){var Pn=dt.current.querySelector("[data-focus]");Pn&&Pn.removeAttribute("data-focus");var rn=dt.current.parentElement.querySelector('[role="listbox"]');if(rn){if(ft===-1){rn.scrollTop=0;return}var Pi=dt.current.querySelector('[data-option-index="'.concat(ft,'"]'));if(Pi&&(Pi.setAttribute("data-focus","true"),rn.scrollHeight>rn.clientHeight&&vr!=="mouse")){var _a=Pi,Ri=rn.clientHeight+rn.scrollTop,Un=_a.offsetTop+_a.offsetHeight;Un>Ri?rn.scrollTop=Un-rn.clientHeight:_a.offsetTop-_a.offsetHeight*(Ae?1.3:0)<rn.scrollTop&&(rn.scrollTop=_a.offsetTop-_a.offsetHeight*(Ae?1.3:0))}}}}),si=ia(function(gt){var tt=gt.event,ft=gt.diff,Tt=gt.direction,vr=Tt===void 0?"next":Tt,Pn=gt.reason,rn=Pn===void 0?"auto":Pn;if(wr){var Pi=function(){var Gn=jt.length-1;if(ft==="reset")return mt;if(ft==="start")return 0;if(ft==="end")return Gn;var yi=st.current+ft;return yi<0?yi===-1&&Ne?-1:V&&st.current!==-1||Math.abs(ft)>1?0:Gn:yi>Gn?yi===Gn+1&&Ne?-1:V||Math.abs(ft)>1?Gn:0:yi},_a=Xa(Pi(),vr);if(la({index:_a,reason:rn,event:tt}),r&&ft!=="reset")if(_a===-1)tr.current.value=Or;else{var Ri=qt(jt[_a]);tr.current.value=Ri;var Un=Ri.toLowerCase().indexOf(Or.toLowerCase());Un===0&&Or.length>0&&tr.current.setSelectionRange(Or.length,Ri.length)}}}),Ho=x.useCallback(function(){if(wr){var gt=Ke?Je[0]:Je;if(jt.length===0||gt==null){si({diff:"reset"});return}if(dt.current){if(!re&&gt!=null){var tt=jt[st.current];
154if(Ke&&tt&&_L(Je,function(Tt){return ge(tt,Tt)})!==-1)return;var ft=_L(jt,function(Tt){return ge(Tt,gt)});ft===-1?si({diff:"reset"}):la({index:ft});return}if(st.current>=jt.length-1){la({index:jt.length-1});return}la({index:st.current})}}},[jt.length===0,Ke?!1:Je,re,si,la,wr,Or,Ke]),gs=ia(function(gt){yh(dt,gt),gt&&Ho()});x.useEffect(function(){Ho()},[Ho]);var ga=function(tt){Ir||(Ln(!0),ke&&ke(tt))},ya=function(tt,ft){Ir&&(Ln(!1),Ue&&Ue(tt,ft))},Ui=function(tt,ft,Tt,vr){Je!==ft&&(Qe&&Qe(tt,ft,Tt,vr),Jt(ft))},rs=x.useRef(!1),Za=function(tt,ft){var Tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"select-option",vr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"options",Pn=Tt,rn=ft;if(Ke){rn=Array.isArray(Je)?Je.slice():[];var Pi=_L(rn,function(_a){return ge(ft,_a)});Pi===-1?rn.push(ft):vr!=="freeSolo"&&(rn.splice(Pi,1),Pn="remove-option")}fn(tt,rn),Ui(tt,rn,Pn,{option:ft}),N||ya(tt,Pn),(l===!0||l==="touch"&&rs.current||l==="mouse"&&!rs.current)&&tr.current.blur()};function Io(gt,tt){if(gt===-1)return-1;for(var ft=gt;;){if(tt==="next"&&ft===Je.length||tt==="previous"&&ft===-1)return-1;var Tt=nr.querySelector('[data-tag-index="'.concat(ft,'"]'));if(Tt&&(!Tt.hasAttribute("tabindex")||Tt.disabled||Tt.getAttribute("aria-disabled")==="true"))ft+=tt==="next"?1:-1;else return ft}}var hl=function(tt,ft){if(Ke){ya(tt,"toggleInput");var Tt=Re;Re===-1?Or===""&&ft==="previous"&&(Tt=Je.length-1):(Tt+=ft==="next"?1:-1,Tt<0&&(Tt=0),Tt===Je.length&&(Tt=-1)),Tt=Io(Tt,ft),pt(Tt),gn(Tt)}},pl=function(tt){hr.current=!0,vn(""),We&&We(tt,"","clear"),Ui(tt,Ke?[]:null,"clear")},Hl=function(tt){return function(ft){switch(Re!==-1&&["ArrowLeft","ArrowRight"].indexOf(ft.key)===-1&&(pt(-1),gn(-1)),ft.key){case"Home":wr&&Pe&&(ft.preventDefault(),si({diff:"start",direction:"next",reason:"keyboard",event:ft}));break;case"End":wr&&Pe&&(ft.preventDefault(),si({diff:"end",direction:"previous",reason:"keyboard",event:ft}));break;case"PageUp":ft.preventDefault(),si({diff:-vce,direction:"previous",reason:"keyboard",event:ft}),ga(ft);break;case"PageDown":ft.preventDefault(),si({diff:vce,direction:"next",reason:"keyboard",event:ft}),ga(ft);break;case"ArrowDown":ft.preventDefault(),si({diff:1,direction:"next",reason:"keyboard",event:ft}),ga(ft);break;case"ArrowUp":ft.preventDefault(),si({diff:-1,direction:"previous",reason:"keyboard",event:ft}),ga(ft);break;case"ArrowLeft":hl(ft,"previous");break;case"ArrowRight":hl(ft,"next");break;case"Enter":if(ft.which===229)break;if(st.current!==-1&&wr){var Tt=jt[st.current],vr=ie?ie(Tt):!1;if(ft.preventDefault(),vr)return;Za(ft,Tt,"select-option"),r&&tr.current.setSelectionRange(tr.current.value.length,tr.current.value.length)}else Q&&Or!==""&&Wn===!1&&(Ke&&ft.preventDefault(),Za(ft,Or,"create-option","freeSolo"));break;case"Escape":wr?(ft.preventDefault(),ft.stopPropagation(),ya(ft,"escape")):h&&(Or!==""||Ke&&Je.length>0)&&(ft.preventDefault(),ft.stopPropagation(),pl(ft));break;case"Backspace":if(Ke&&Or===""&&Je.length>0){var Pn=Re===-1?Je.length-1:Re,rn=Je.slice();rn.splice(Pn,1),Ui(ft,rn,"remove-option",{option:Je[Pn]})}break}tt.onKeyDown&&tt.onKeyDown(ft)}},Ul=function(tt){Zr(!0),Ze&&!hr.current&&ga(tt)},qu=function(tt){if(dt.current!==null&&document.activeElement===dt.current.parentElement){tr.current.focus();return}Zr(!1),rr.current=!0,hr.current=!1,!(b&&Or!=="")&&(o&&st.current!==-1&&wr?Za(tt,jt[st.current],"blur"):o&&Q&&Or!==""?Za(tt,Or,"blur","freeSolo"):d&&fn(tt,Je),ya(tt,"blur"))},wo=function(tt){var ft=tt.target.value;Or!==ft&&(vn(ft),We&&We(tt,ft,"input")),ft===""?!O&&!Ke&&Ui(tt,null,"clear"):ga(tt)},Uo=function(tt){la({event:tt,index:Number(tt.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},ju=function(){rs.current=!0},Vl=function(tt){var ft=Number(tt.currentTarget.getAttribute("data-option-index"));Za(tt,jt[ft],"select-option"),rs.current=!1},ql=function(tt){return function(ft){var Tt=Je.slice();Tt.splice(tt,1),Ui(ft,Tt,"remove-option",{option:Je[tt]})}},_c=function(tt){Ir?ya(tt,"toggleInput"):ga(tt)},js=function(tt){tt.target.getAttribute("id")!==Qt&&tt.preventDefault()},ys=function(){tr.current.focus(),sr&&rr.current&&tr.current.selectionEnd-tr.current.selectionStart===0&&tr.current.select(),rr.current=!1},hn=function(tt){(Or===""||!Ir)&&_c(tt)},fi=Q&&Or.length>0;fi=fi||(Ke?Je.length>0:Je!==null);var Ai=jt;return Ae&&(Ai=jt.reduce(function(gt,tt,ft){var Tt=Ae(tt);return gt.length>0&&gt[gt.length-1].group===Tt?gt[gt.length-1].options.push(tt):gt.push({key:ft,index:ft,group:Tt,options:[tt]}),gt},[])),{getRootProps:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ve({"aria-owns":wr?"".concat(Qt,"-popup"):null,role:"combobox","aria-expanded":wr},tt,{onKeyDown:Hl(tt),onMouseDown:js,onClick:ys})},getInputLabelProps:function(){return{id:"".concat(Qt,"-label"),htmlFor:Qt}},getInputProps:function(){return{id:Qt,value:Or,onBlur:qu,onFocus:Ul,onChange:wo,onMouseDown:hn,"aria-activedescendant":wr?"":null,"aria-autocomplete":r?"both":"list","aria-controls":wr?"".concat(Qt,"-popup"):null,autoComplete:"off",ref:tr,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:pl}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:_c}},getTagProps:function(tt){var ft=tt.index;return{key:ft,"data-tag-index":ft,tabIndex:-1,onDelete:ql(ft)}},getListboxProps:function(){return{role:"listbox",id:"".concat(Qt,"-popup"),"aria-labelledby":"".concat(Qt,"-label"),ref:gs,onMouseDown:function(ft){ft.preventDefault()}}},getOptionProps:function(tt){var ft=tt.index,Tt=tt.option,vr=(Ke?Je:[Je]).some(function(rn){return rn!=null&&ge(Tt,rn)}),Pn=ie?ie(Tt):!1;return{key:ft,tabIndex:-1,role:"option",id:"".concat(Qt,"-option-").concat(ft),onMouseOver:Uo,onClick:Vl,onTouchStart:ju,"data-option-index":ft,"aria-disabled":Pn,"aria-selected":vr}},id:Qt,inputValue:Or,value:Je,dirty:fi,popupOpen:wr,focused:Xr||Re!==-1,anchorEl:nr,setAnchorEl:Ee,focusedTag:Re,groupedOptions:Ai}}var Hxt=function(t){var r;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:30},"$hasPopupIcon$hasClearIcon &":{paddingRight:56},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0}
154,inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:t.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:ve({},t.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:t.palette.text.secondary,padding:"14px 16px"},noOptions:{color:t.palette.text.secondary,padding:"14px 16px"},option:(r={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},Nt(r,t.breakpoints.up("sm"),{minHeight:"auto"}),Nt(r,'&[aria-selected="true"]',{backgroundColor:t.palette.action.selected}),Nt(r,'&[data-focus="true"]',{backgroundColor:t.palette.action.hover}),Nt(r,"&:active",{backgroundColor:t.palette.action.selected}),Nt(r,'&[aria-disabled="true"]',{opacity:t.palette.action.disabledOpacity,pointerEvents:"none"}),r),groupLabel:{backgroundColor:t.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}};function Uxt(e){e.anchorEl,e.open;var t=Mt(e,["anchorEl","open"]);return x.createElement("div",t)}var Vxt=x.createElement(DPe,{fontSize:"small"}),qxt=x.createElement(Lxt,null),jxt=x.forwardRef(function(t,r){t.autoComplete,t.autoHighlight,t.autoSelect,t.blurOnSelect;var n=t.ChipProps,i=t.classes,a=t.className,o=t.clearOnBlur;o===void 0&&t.freeSolo,t.clearOnEscape;var s=t.clearText,l=s===void 0?"Clear":s,c=t.closeIcon,d=c===void 0?Vxt:c,f=t.closeText,h=f===void 0?"Close":f;t.debug;var p=t.defaultValue;p===void 0&&t.multiple;var g=t.disableClearable,_=g===void 0?!1:g;t.disableCloseOnSelect;var b=t.disabled,E=b===void 0?!1:b;t.disabledItemsFocusable,t.disableListWrap;var S=t.disablePortal,P=S===void 0?!1:S;t.filterOptions,t.filterSelectedOptions;var O=t.forcePopupIcon,I=O===void 0?"auto":O,N=t.freeSolo,M=N===void 0?!1:N,F=t.fullWidth,B=F===void 0?!1:F,V=t.getLimitTagsText,W=V===void 0?function(wr){return"+".concat(wr)}:V;t.getOptionDisabled;var $=t.getOptionLabel,X=$===void 0?function(wr){return wr}:$;t.getOptionSelected;var re=t.groupBy,ae=t.handleHomeEndKeys;ae===void 0&&t.freeSolo,t.id,t.includeInputInList,t.inputValue;var Q=t.limitTags,ie=Q===void 0?-1:Q,le=t.ListboxComponent,fe=le===void 0?"ul":le,de=t.ListboxProps,ge=t.loading,Ae=ge===void 0?!1:ge,Fe=t.loadingText,Pe=Fe===void 0?"Loading…":Fe,ce=t.multiple,pe=ce===void 0?!1:ce,Ne=t.noOptionsText,De=Ne===void 0?"No options":Ne;t.onChange,t.onClose,t.onHighlightChange,t.onInputChange,t.onOpen,t.open,t.openOnFocus;var Ve=t.openText,Ke=Ve===void 0?"Open":Ve;t.options;var Qe=t.PaperComponent,Ue=Qe===void 0?Qd:Qe,ut=t.PopperComponent,We=ut===void 0?gPe:ut,ke=t.popupIcon,Le=ke===void 0?qxt:ke,Be=t.renderGroup,Ze=t.renderInput,Et=t.renderOption,Yt=t.renderTags,sr=t.selectOnFocus;sr===void 0&&t.freeSolo;var Kt=t.size,Qt=Kt===void 0?"medium":Kt;t.value;var qt=Mt(t,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"]),hr=P?Uxt:We,rr=zxt(ve({},t,{componentName:"Autocomplete"})),tr=rr.getRootProps,dt=rr.getInputProps,bt=rr.getInputLabelProps,nr=rr.getPopupIndicatorProps,Ee=rr.getClearProps,Oe=rr.getTagProps,Re=rr.getListboxProps,pt=rr.getOptionProps,mt=rr.value,st=rr.dirty,ze=rr.id,it=rr.popupOpen,Je=rr.focused,Jt=rr.focusedTag,pr=rr.anchorEl,Fr=rr.setAnchorEl,Or=rr.inputValue,vn=rr.groupedOptions,cn;if(pe&&mt.length>0){var Xr=function(jt){return ve({className:hd(i.tag,Qt==="small"&&i.tagSizeSmall),disabled:E},Oe(jt))};Yt?cn=Yt(mt,Xr):cn=mt.map(function(wr,jt){return x.createElement(B1,ve({label:X(wr),size:Qt},Xr({index:jt}),n))})}if(ie>-1&&Array.isArray(cn)){var Zr=cn.length-ie;!Je&&Zr>0&&(cn=cn.splice(0,ie),cn.push(x.createElement("span",{className:i.tag,key:cn.length},W(Zr))))}var fn=function(jt){return x.createElement("li",{key:jt.key},x.createElement(PG,{className:i.groupLabel,component:"div"},jt.group),x.createElement("ul",{className:i.groupUl},jt.children))},vs=Be||fn,Ar=Et||X,Ir=function(jt,gn){var Xa=pt({option:jt,index:gn});return x.createElement("li",ve({},Xa,{className:i.option}),Ar(jt,{selected:Xa["aria-selected"],inputValue:Or}))},Ln=!_&&!E,Wn=(!M||I===!0)&&I!==!1;return x.createElement(x.Fragment,null,x.createElement("div",ve({ref:r,className:hd(i.root,a,Je&&i.focused,B&&i.fullWidth,Ln&&i.hasClearIcon,Wn&&i.hasPopupIcon)},tr(qt)),Ze({id:ze,disabled:E,fullWidth:!0,size:Qt==="small"?"small":void 0,InputLabelProps:bt(),InputProps:{ref:Fr,className:i.inputRoot,startAdornment:cn,endAdornment:x.createElement("div",{className:i.endAdornment},Ln?x.createElement(cr,ve({},Ee(),{"aria-label":l,title:l,className:hd(i.clearIndicator,st&&i.clearIndicatorDirty)}),d):null,Wn?x.createElement(cr,ve({},nr(),{disabled:E,"aria-label":it?h:Ke,title:it?h:Ke,className:hd(i.popupIndicator,it&&i.popupIndicatorOpen)}),Le):null)},inputProps:ve({className:hd(i.input,Jt===-1&&i.inputFocused),disabled:E},dt())})),it&&pr?x.createElement(hr,{className:hd(i.popper,P&&i.popperDisablePortal),style:{width:pr?pr.clientWidth:null},role:"presentation",anchorEl:pr,open:!0},x.createElement(Ue,{className:i.paper},Ae&&vn.length===0?x.createElement("div",{className:i.loading},Pe):null,vn.length===0&&!M&&!Ae?x.createElement("div",{className:i.noOptions},De):null,vn.length>0?x.createElement(fe,ve({className:i.listbox},Re(),de),vn.map(function(wr,jt){return re?vs({key:wr.key,group:wr.group,children:wr.options.map(function(gn,Xa){return Ir(gn,wr.index+Xa)})}):Ir(wr,jt)})):null)):null)});const MPe=yr(Hxt,{name:"MuiAutocomplete"})(jxt),$xt=zo(x.createElement("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}));function Wxt(e,t,r){return e<t?t:e>r?r:e}function Gxt(e){var t=e.toString().split(".")[1];return t?t.length:0}function bL(e,t){if(e==null)return e;var r=Math.round(e/t)*t;return Number(r.toFixed(Gxt(t)))}var Kxt=function(t){return{root:{display:"inline-flex",position:"relative",fontSize:t.typography.pxToRem(24),color:"#ffb400",cursor:"pointer",textAlign:"left",WebkitTapHighlightColor:"transparent","&$disabled":{opacity:.5,pointerEvents:"none"},"&$focusVisible $iconActive":{outline:"1px solid #999"}},sizeSmall:{fontSize:t.typography.pxToRem(18)},sizeLarge:{fontSize:t.typography.pxToRem(30)},readOnly:{pointerEvents:"none"},disabled:{},focusVisible:{},visuallyhidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,color:"#000",overflow:"hidden",padding:0,position:"absolute",top:20,width:1},pristine:{"input:focus + &":{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}},label:{cursor:"inherit"},icon:{display:"flex",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),pointerEvents:"none"},iconEmpty:{color:t.palette.action.disabled},iconFilled:{},iconHover:{},iconFocus:{},iconActive:{transform:"scale(1.2)"}
154,decimal:{position:"relative"}}};function Yxt(e){e.value;var t=Mt(e,["value"]);return x.createElement("span",t)}var Xxt=x.createElement($xt,{fontSize:"inherit"});function Zxt(e){return"".concat(e," Star").concat(e!==1?"s":"")}var Qxt=x.forwardRef(function(t,r){var n=t.classes,i=t.className,a=t.defaultValue,o=a===void 0?null:a,s=t.disabled,l=s===void 0?!1:s,c=t.emptyIcon,d=t.emptyLabelText,f=d===void 0?"Empty":d,h=t.getLabelText,p=h===void 0?Zxt:h,g=t.icon,_=g===void 0?Xxt:g,b=t.IconContainerComponent,E=b===void 0?Yxt:b,S=t.max,P=S===void 0?5:S,O=t.name,I=t.onChange,N=t.onChangeActive,M=t.onMouseLeave,F=t.onMouseMove,B=t.precision,V=B===void 0?1:B,W=t.readOnly,$=W===void 0?!1:W,X=t.size,re=X===void 0?"medium":X,ae=t.value,Q=Mt(t,["classes","className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"]),ie=Dg(O),le=Rd({controlled:ae,default:o,name:"Rating"}),fe=Zo(le,2),de=fe[0],ge=fe[1],Ae=bL(de,V),Fe=ts(),Pe=x.useState({hover:-1,focus:-1}),ce=Pe[0],pe=ce.hover,Ne=ce.focus,De=Pe[1],Ve=Ae;pe!==-1&&(Ve=pe),Ne!==-1&&(Ve=Ne);var Ke=f2(),Qe=Ke.isFocusVisible,Ue=Ke.onBlurVisible,ut=Ke.ref,We=x.useState(!1),ke=We[0],Le=We[1],Be=x.useRef(),Ze=mi(ut,Be),Et=mi(Ze,r),Yt=function(dt){F&&F(dt);var bt=Be.current,nr=bt.getBoundingClientRect(),Ee=nr.right,Oe=nr.left,Re=bt.firstChild.getBoundingClientRect(),pt=Re.width,mt;Fe.direction==="rtl"?mt=(Ee-dt.clientX)/(pt*P):mt=(dt.clientX-Oe)/(pt*P);var st=bL(P*mt+V/2,V);st=Wxt(st,V,P),De(function(ze){return ze.hover===st&&ze.focus===st?ze:{hover:st,focus:st}}),Le(!1),N&&pe!==st&&N(dt,st)},sr=function(dt){M&&M(dt);var bt=-1;De({hover:bt,focus:bt}),N&&pe!==bt&&N(dt,bt)},Kt=function(dt){var bt=parseFloat(dt.target.value);ge(bt),I&&I(dt,bt)},Qt=function(dt){dt.clientX===0&&dt.clientY===0||(De({hover:-1,focus:-1}),ge(null),I&&parseFloat(dt.target.value)===Ae&&I(dt,null))},qt=function(dt){Qe(dt)&&Le(!0);var bt=parseFloat(dt.target.value);De(function(nr){return{hover:nr.hover,focus:bt}}),N&&Ne!==bt&&N(dt,bt)},hr=function(dt){if(pe===-1){ke!==!1&&(Le(!1),Ue());var bt=-1;De(function(nr){return{hover:nr.hover,focus:bt}}),N&&Ne!==bt&&N(dt,bt)}},rr=function(dt,bt){var nr="".concat(ie,"-").concat(String(dt.value).replace(".","-")),Ee=x.createElement(E,{value:dt.value,className:hd(n.icon,dt.filled?n.iconFilled:n.iconEmpty,dt.hover&&n.iconHover,dt.focus&&n.iconFocus,dt.active&&n.iconActive)},c&&!dt.filled?c:_);return $?x.createElement("span",ve({key:dt.value},bt),Ee):x.createElement(x.Fragment,{key:dt.value},x.createElement("label",ve({className:n.label,htmlFor:nr},bt),Ee,x.createElement("span",{className:n.visuallyhidden},p(dt.value))),x.createElement("input",{onFocus:qt,onBlur:hr,onChange:Kt,onClick:Qt,disabled:l,value:dt.value,id:nr,type:"radio",name:ie,checked:dt.checked,className:n.visuallyhidden}))};return x.createElement("span",ve({ref:Et,onMouseMove:Yt,onMouseLeave:sr,className:hd(n.root,i,re!=="medium"&&n["size".concat(zr(re))],l&&n.disabled,ke&&n.focusVisible,$&&n.readOnly),role:$?"img":null,"aria-label":$?p(Ve):null},Q),Array.from(new Array(P)).map(function(tr,dt){var bt=dt+1;if(V<1){var nr=Array.from(new Array(1/V));return x.createElement("span",{key:bt,className:hd(n.decimal,bt===Math.ceil(Ve)&&(pe!==-1||Ne!==-1)&&n.iconActive)},nr.map(function(Ee,Oe){var Re=bL(bt-1+(Oe+1)*V,V);return rr({value:Re,filled:Re<=Ve,hover:Re<=pe,focus:Re<=Ne,checked:Re===Ae},{style:nr.length-1===Oe?{}:{width:Re===Ve?"".concat((Oe+1)*V*100,"%"):"0%",overflow:"hidden",zIndex:1,position:"absolute"}})}))}return rr({value:bt,active:bt===Ve&&(pe!==-1||Ne!==-1),filled:bt<=Ve,hover:bt<=pe,focus:bt<=Ne,checked:bt===Ae})}),!$&&!l&&Ae==null&&x.createElement(x.Fragment,null,x.createElement("input",{value:"",id:"".concat(ie,"-empty"),type:"radio",name:ie,defaultChecked:!0,className:n.visuallyhidden}),x.createElement("label",{className:n.pristine,htmlFor:"".concat(ie,"-empty")},x.createElement("span",{className:n.visuallyhidden},f))))});const Jxt=yr(Kxt,{name:"MuiRating"})(Qxt);var EL,gce;function e2t(){if(gce)return EL;gce=1;var e=pEe(),t=e("ceil");return EL=t,EL}var t2t=e2t();const Qer=et(t2t);function r2t(){const e=An(),t=u.useCallback(()=>{navigator.onLine?e(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:4e3,message:"Online novamente!",variant:"success"})):e(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:null,message:"Você está sem internet",variant:"error",noActions:!0,onClose:null}))},[e]);return u.useEffect(()=>(window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}),[e,t]),null}function LPe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=LPe(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function g0(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=LPe(e))&&(n&&(n+=" "),n+=t);return n}let n2t={data:""},i2t=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||n2t},a2t=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,o2t=/\/\*[^]*?\*\/|  +/g,yce=/\n+/g,Rv=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?Rv(o,a):a+"{"+Rv(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=Rv(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=a[1]=="-"?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Rv.p?Rv.p(a,o):a+":"+
154o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},lp={},FPe=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+FPe(e[r]);return t}return e},s2t=(e,t,r,n,i)=>{let a=FPe(e),o=lp[a]||(lp[a]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(a));if(!lp[o]){let l=a!==e?e:(c=>{let d,f,h=[{}];for(;d=a2t.exec(c.replace(o2t,""));)d[4]?h.shift():d[3]?(f=d[3].replace(yce," ").trim(),h.unshift(h[0][f]=h[0][f]||{})):h[0][d[1]]=d[2].replace(yce," ").trim();return h[0]})(e);lp[o]=Rv(i?{["@keyframes "+o]:l}:l,r?"":"."+o)}let s=r&&lp.g;return r&&(lp.g=lp[o]),((l,c,d,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(lp[o],t,n,s),o},l2t=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let s=o(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":Rv(s,""):s===!1?"":s}return n+i+(o??"")},"");function HG(e){let t=this||{},r=e.call?e(t.p):e;return s2t(r.unshift?r.raw?l2t(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,i2t(t.target),t.g,t.o,t.k)}HG.bind({g:1});HG.bind({k:1});function c2t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BPe(e,t,r){return t&&c2t(e.prototype,t),e}function ra(){return ra=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ra.apply(this,arguments)}function zPe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function g2(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var bce=function(){return""},HPe=u.createContext({enqueueSnackbar:bce,closeSnackbar:bce}),wv={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},Ece=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},UG=function(t){return""+Ece(t.vertical)+Ece(t.horizontal)},zA=function(t){return!!t||t===0},HA="unmounted",K0="exited",Y0="entering",Ub="entered",wce="exiting",VG=(function(e){zPe(t,e);function t(n){var i;i=e.call(this,n)||this;var a=n.appear,o;return i.appearStatus=null,n.in?a?(o=K0,i.appearStatus=Y0):o=Ub:n.unmountOnExit||n.mountOnEnter?o=HA:o=K0,i.state={status:o},i.nextCallback=null,i}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===HA?{status:K0}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Y0&&o!==Ub&&(a=Y0):(o===Y0||o===Ub)&&(a=wce)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a=i,o=i;return i!=null&&typeof i!="number"&&typeof i!="string"&&(o=i.exit,a=i.enter),{exit:o,enter:a}},r.updateStatus=function(i,a){i===void 0&&(i=!1),a!==null?(this.cancelNextCallback(),a===Y0?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===K0&&this.setState({status:HA})},r.performEnter=function(i){var a=this,o=this.props.enter,s=i,l=this.getTimeouts();if(!i&&!o){this.safeSetState({status:Ub},function(){a.props.onEntered&&a.props.onEntered(a.node,s)});return}this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:Y0},function(){a.props.onEntering&&a.props.onEntering(a.node,s),a.onTransitionEnd(l.enter,function(){a.safeSetState({status:Ub},function(){a.props.onEntered&&a.props.onEntered(a.node,s)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts();if(!a){this.safeSetState({status:K0},function(){i.props.onExited&&i.props.onExited(i.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:wce},function(){i.props.onExiting&&i.props.onExiting(i.node),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:K0},function(){i.props.onExited&&i.props.onExited(i.node)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(){o&&(o=!1,a.nextCallback=null,i())},this.nextCallback.cancel=function(){o=!1}
154,this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=i==null&&!this.props.addEndListener;if(!this.node||o){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===HA)return null;var a=this.props,o=a.children,s=g2(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o(i,s)},BPe(t,[{key:"node",get:function(){var i,a=(i=this.props.nodeRef)===null||i===void 0?void 0:i.current;if(!a)throw new Error("notistack - Custom snackbar is not refForwarding");return a}}]),t})(u.Component);function X0(){}VG.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:X0,onEntering:X0,onEntered:X0,onExit:X0,onExiting:X0,onExited:X0};function Sce(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function uV(e,t){return x.useMemo(function(){return e==null&&t==null?null:function(r){Sce(e,r),Sce(t,r)}},[e,t])}function EI(e){var t=e.timeout,r=e.style,n=r===void 0?{}:r,i=e.mode;return{duration:typeof t=="object"?t[i]||0:t,easing:n.transitionTimingFunction,delay:n.transitionDelay}}var dV={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},UPe=function(t){t.scrollTop=t.scrollTop},Cce=function(t){return Math.round(t)+"ms"};function Ry(e,t){e===void 0&&(e=["all"]);var r=t||{},n=r.duration,i=n===void 0?300:n,a=r.easing,o=a===void 0?dV.easeInOut:a,s=r.delay,l=s===void 0?0:s,c=Array.isArray(e)?e:[e];return c.map(function(d){var f=typeof i=="string"?i:Cce(i),h=typeof l=="string"?l:Cce(l);return d+" "+f+" "+o+" "+h}).join(",")}function u2t(e){return e&&e.ownerDocument||document}function VPe(e){var t=u2t(e);return t.defaultView||window}function d2t(e,t){t===void 0&&(t=166);var r;function n(){for(var i=this,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=function(){e.apply(i,o)};clearTimeout(r),r=setTimeout(l,t)}return n.clear=function(){clearTimeout(r)},n}function f2t(e,t){var r=t.getBoundingClientRect(),n=VPe(t),i;if(t.fakeTransform)i=t.fakeTransform;else{var a=n.getComputedStyle(t);i=a.getPropertyValue("-webkit-transform")||a.getPropertyValue("transform")}var o=0,s=0;if(i&&i!=="none"&&typeof i=="string"){var l=i.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(n.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(n.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}function UA(e,t){if(t){var r=f2t(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}}var qPe=x.forwardRef(function(e,t){var r=e.children,n=e.direction,i=n===void 0?"down":n,a=e.in,o=e.style,s=e.timeout,l=s===void 0?0:s,c=e.onEnter,d=e.onEntered,f=e.onExit,h=e.onExited,p=g2(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),g=x.useRef(null),_=uV(r.ref,g),b=uV(_,t),E=function(M,F){UA(i,M),UPe(M),c&&c(M,F)},S=function(M){var F=o?.transitionTimingFunction||dV.easeOut,B=EI({timeout:l,mode:"enter",style:ra({},o,{transitionTimingFunction:F})});M.style.webkitTransition=Ry("-webkit-transform",B),M.style.transition=Ry("transform",B),M.style.webkitTransform="none",M.style.transform="none"},P=function(M){var F=o?.transitionTimingFunction||dV.sharp,B=EI({timeout:l,mode:"exit",style:ra({},o,{transitionTimingFunction:F})});M.style.webkitTransition=Ry("-webkit-transform",B),M.style.transition=Ry("transform",B),UA(i,M),f&&f(M)},O=function(M){M.style.webkitTransition="",M.style.transition="",h&&h(M)},I=x.useCallback(function(){g.current&&UA(i,g.current)},[i]);return x.useEffect(function(){if(!(a||i==="down"||i==="right")){var N=d2t(function(){g.current&&UA(i,g.current)}),M=VPe(g.current);return M.addEventListener("resize",N),function(){N.clear(),M.removeEventListener("resize",N)}}},[i,a]),x.useEffect(function(){a||I()},[a,I]),x.createElement(VG,Object.assign({appear:!0,nodeRef:g,onEnter:E,onEntered:d,onEntering:S,onExit:P,onExited:O,in:a,timeout:l},p),function(N,M){return x.cloneElement(r,ra({ref:b,style:ra({visibility:N==="exited"&&!a?"hidden":void 0},o,{},r.props.style)},M))})});qPe.displayName="Slide";var _4=function(t){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},t))},h2t=function(){return u.createElement(_4,null,u.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
155        10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},p2t=function(){return u.createElement(_4,null,u.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},m2t=function(){return u.createElement(_4,null,u.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
156        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
157        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},v2t=function(){return u.createElement(_4,null,u.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
158        0 22,12A10,10 0 0,0 12,2Z`}))},g2t={default:void 0,success:u.createElement(h2t,null),warning:u.createElement(p2t,null),error:u.createElement(m2t,null),info:u.createElement(v2t,null)},Xv={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:g2t,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:qPe,transitionDuration:{enter:225,exit:195}},y2t=function(t,r){var n=function(a){return typeof a=="number"||a===null};return n(t)?t:n(r)?r:Xv.autoHideDuration},_2t=function(t,r){var n=function(a,o){return o.some(function(s){return typeof a===s})};return n(t,["string","number"])?t:n(t,["object"])?ra({},Xv.transitionDuration,{},n(r,["object"])&&r,{},t):n(r,["string","number"])?r:n(r,["object"])?ra({},Xv.transitionDuration,{},r):Xv.transitionDuration},b2t=function(t,r){return function(n,i){return i===void 0&&(i=!1),i?ra({},Xv[n],{},r[n],{},t[n]):n==="autoHideDuration"?y2t(t.autoHideDuration,r.autoHideDuration):n==="transitionDuration"?_2t(t.transitionDuration,r.transitionDuration):t[n]||r[n]||Xv[n]}};function y2(e){return Object.entries(e).reduce(function(t,r){var n,i=r[0],a=r[1];return ra({},t,(n={},n[i]=HG(a),n))},{})}var V1={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},xce=y2({root:{height:0},entered:{height:"auto"}}),wL="0px",SL=175,jPe=x.forwardRef(function(e,t){var r=e.children,n=e.in,i=e.onExited,a=x.useRef(null),o=x.useRef(null),s=uV(t,o),l=function(){return a.current?a.current.clientHeight:0},c=function(_){_.style.height=wL},d=function(_){var b=l(),E=EI({timeout:SL,mode:"enter"}),S=E.duration,P=E.easing;_.style.transitionDuration=typeof S=="string"?S:S+"ms",_.style.height=b+"px",_.style.transitionTimingFunction=P||""},f=function(_){_.style.height="auto"},h=function(_){_.style.height=l()+"px"},p=function(_){UPe(_);var b=EI({timeout:SL,mode:"exit"}),E=b.duration,S=b.easing;_.style.transitionDuration=typeof E=="string"?E:E+"ms",_.style.height=wL,_.style.transitionTimingFunction=S||""};return x.createElement(VG,{in:n,unmountOnExit:!0,onEnter:c,onEntered:f,onEntering:d,onExit:h,onExited:i,onExiting:p,nodeRef:o,timeout:SL},function(g,_){return x.createElement("div",Object.assign({ref:s,className:g0(xce.root,g==="entered"&&xce.entered),style:ra({pointerEvents:"all",overflow:"hidden",minHeight:wL,transition:Ry("height")},g==="entered"&&{overflow:"visible"},{},g==="exited"&&!n&&{visibility:"hidden"})},_),x.createElement("div",{ref:a,className:V1.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});jPe.displayName="Collapse";
158var Tce={right:"left",left:"right",bottom:"up",top:"down"},E2t=function(t){return t.horizontal!=="center"?Tce[t.horizontal]:Tce[t.vertical]},w2t=function(t){return"anchorOrigin"+UG(t)},S2t=function(t){t===void 0&&(t={});var r={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(t).filter(function(n){return!r[n]}).reduce(function(n,i){var a;return ra({},n,(a={},a[i]=t[i],a))},{})},C2t=function(){};function MS(e,t){return e.reduce(function(r,n){return n==null?r:function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=[].concat(o);t&&l.indexOf(t)===-1&&l.push(t),r.apply(this,l),n.apply(this,l)}},C2t)}var x2t=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ace(e){var t=x.useRef(e);return x2t(function(){t.current=e}),x.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var $Pe=x.forwardRef(function(e,t){var r=e.children,n=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,o=a===void 0?!1:a,s=e.onClose,l=e.id,c=e.open,d=e.SnackbarProps,f=d===void 0?{}:d,h=x.useRef(),p=Ace(function(){s&&s.apply(void 0,arguments)}),g=Ace(function(P){!s||P==null||(h.current&&clearTimeout(h.current),h.current=setTimeout(function(){p(null,"timeout",l)},P))});x.useEffect(function(){return c&&g(i),function(){h.current&&clearTimeout(h.current)}},[c,i,g]);var _=function(){h.current&&clearTimeout(h.current)},b=x.useCallback(function(){i!=null&&g(i*.5)},[i,g]),E=function(O){f.onMouseEnter&&f.onMouseEnter(O),_()},S=function(O){f.onMouseLeave&&f.onMouseLeave(O),b()};return x.useEffect(function(){if(!o&&c)return window.addEventListener("focus",b),window.addEventListener("blur",_),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",_)}},[o,b,c]),x.createElement("div",Object.assign({ref:t},f,{className:g0(V1.Snackbar,n),onMouseEnter:E,onMouseLeave:S}),r)});$Pe.displayName="Snackbar";var CL,T2t=y2({root:(CL={display:"flex",flexWrap:"wrap",flexGrow:1},CL[wv.upSm]={flexGrow:"initial",minWidth:"288px"},CL)}),WPe=x.forwardRef(function(e,t){var r=e.className,n=g2(e,["className"]);return u.createElement("div",Object.assign({ref:t,className:g0(T2t.root,r)},n))});WPe.displayName="SnackbarContent";var Vb=y2({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),Pce="notistack-snackbar",GPe=x.forwardRef(function(e,t){var r=e.id,n=e.message,i=e.action,a=e.iconVariant,o=e.variant,s=e.hideIconVariant,l=e.style,c=e.className,d=a[o],f=i;return typeof f=="function"&&(f=f(r)),u.createElement(WPe,{ref:t,role:"alert","aria-describedby":Pce,style:l,className:g0(V1.MuiContent,V1.MuiContentVariant(o),Vb.root,Vb[o],c,!s&&d&&Vb.lessPadding)},u.createElement("div",{id:Pce,className:Vb.message},s?null:d,n),f&&u.createElement("div",{className:Vb.action},f))});GPe.displayName="MaterialDesignContent";var A2t=x.memo(GPe),P2t=y2({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),R2t=function(t){var r=x.useRef(),n=x.useState(!0),i=n[0],a=n[1],o=MS([t.snack.onClose,t.onClose]),s=function(){t.snack.requestClose&&o(null,"instructed",t.snack.id)},l=x.useCallback(function(){r.current=setTimeout(function(){a(function(B){return!B})},125)},[]);x.useEffect(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var c=t.snack,d=t.classes,f=t.Component,h=f===void 0?A2t:f,p=x.useMemo(function(){return S2t(d)},[d]),g=c.open,_=c.SnackbarProps,b=c.TransitionComponent,E=c.TransitionProps,S=c.transitionDuration,P=c.disableWindowBlurListener,O=c.content,I=g2(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),N=ra({direction:E2t(I.anchorOrigin),timeout:S},E),M=O;typeof M=="function"&&(M=M(I.id,I.message));var F=["onEnter","onEntered","onExit","onExited"].reduce(function(B,V){var W;return ra({},B,(W={},W[V]=MS([t.snack[V],t[V]],I.id),W))},{});return u.createElement(jPe,{in:i,onExited:F.onExited},u.createElement($Pe,{open:g,id:I.id,disableWindowBlurListener:P,autoHideDuration:I.autoHideDuration,className:g0(P2t.wrappedRoot,p.root,p[w2t(I.anchorOrigin)]),SnackbarProps:_,onClose:o},u.createElement(b,Object.assign({},N,{appear:!0,in:g,onExit:F.onExit,onExited:l,onEnter:F.onEnter,onEntered:MS([F.onEntered,s],I.id)}),M||u.createElement(h,Object.assign({},I)))))},qb,xL,VA,qA,TL,_f={view:{default:20},snackbar:{default:6,dense:2}},Rce="."+V1.CollapseWrapper,AL=16,jA=y2({root:(qb={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Ry(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},qb[Rce]={padding:_f.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},qb.maxWidth="calc(100% - "+_f.view.default*2+"px)",qb[wv.downXs]={width:"100%",maxWidth:"calc(100% - "+AL*2+"px)"},qb),rootDense:(xL={},xL[Rce]={padding:_f.snackbar.dense+"px 0px"},xL),top:{top:_f.view.default-_f.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:_f.view.default-_f.snackbar.default+"px",flexDirection:"column-reverse"},left:(VA={left:_f.view.default+"px"},VA[wv.upSm]={alignItems:"flex-start"},VA[wv.downXs]={left:AL+"px"}
158,VA),right:(qA={right:_f.view.default+"px"},qA[wv.upSm]={alignItems:"flex-end"},qA[wv.downXs]={right:AL+"px"},qA),center:(TL={left:"50%",transform:"translateX(-50%)"},TL[wv.upSm]={alignItems:"center"},TL)}),O2t=function(t){var r=t.classes,n=r===void 0?{}:r,i=t.anchorOrigin,a=t.dense,o=t.children,s=g0(V1.SnackbarContainer,jA[i.vertical],jA[i.horizontal],jA.root,n.containerRoot,n["containerAnchorOrigin"+UG(i)],a&&jA.rootDense);return u.createElement("div",{className:s},o)},I2t=x.memo(O2t),Oce=function(t){var r=typeof t=="string"||x.isValidElement(t);return!r},k2t=(function(e){zPe(t,e);function t(n){var i;return i=e.call(this,n)||this,i.enqueueSnackbar=function(a,o){if(o===void 0&&(o={}),a==null)throw new Error("enqueueSnackbar called with invalid argument");var s=Oce(a)?a:o,l=Oce(a)?a.message:a,c=s.key,d=s.preventDuplicate,f=g2(s,["key","preventDuplicate"]),h=zA(c),p=h?c:new Date().getTime()+Math.random(),g=b2t(f,i.props),_=ra({id:p},f,{message:l,open:!0,entered:!1,requestClose:!1,persist:g("persist"),action:g("action"),content:g("content"),variant:g("variant"),anchorOrigin:g("anchorOrigin"),disableWindowBlurListener:g("disableWindowBlurListener"),autoHideDuration:g("autoHideDuration"),hideIconVariant:g("hideIconVariant"),TransitionComponent:g("TransitionComponent"),transitionDuration:g("transitionDuration"),TransitionProps:g("TransitionProps",!0),iconVariant:g("iconVariant",!0),style:g("style",!0),SnackbarProps:g("SnackbarProps",!0),className:g0(i.props.className,f.className)});return _.persist&&(_.autoHideDuration=void 0),i.setState(function(b){if(d===void 0&&i.props.preventDuplicate||d){var E=function(I){return h?I.id===p:I.message===l},S=b.queue.findIndex(E)>-1,P=b.snacks.findIndex(E)>-1;if(S||P)return b}return i.handleDisplaySnack(ra({},b,{queue:[].concat(b.queue,[_])}))}),p},i.handleDisplaySnack=function(a){var o=a.snacks;return o.length>=i.maxSnack?i.handleDismissOldest(a):i.processQueue(a)},i.processQueue=function(a){var o=a.queue,s=a.snacks;return o.length>0?ra({},a,{snacks:[].concat(s,[o[0]]),queue:o.slice(1,o.length)}):a},i.handleDismissOldest=function(a){if(a.snacks.some(function(d){return!d.open||d.requestClose}))return a;var o=!1,s=!1,l=a.snacks.reduce(function(d,f){return d+(f.open&&f.persist?1:0)},0);l===i.maxSnack&&(s=!0);var c=a.snacks.map(function(d){return!o&&(!d.persist||s)?(o=!0,d.entered?(d.onClose&&d.onClose(null,"maxsnack",d.id),i.props.onClose&&i.props.onClose(null,"maxsnack",d.id),ra({},d,{open:!1})):ra({},d,{requestClose:!0})):ra({},d)});return ra({},a,{snacks:c})},i.handleEnteredSnack=function(a,o,s){if(!zA(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var c=l.snacks;return{snacks:c.map(function(d){return d.id===s?ra({},d,{entered:!0}):ra({},d)})}})},i.handleCloseSnack=function(a,o,s){i.props.onClose&&i.props.onClose(a,o,s);var l=s===void 0;i.setState(function(c){var d=c.snacks,f=c.queue;return{snacks:d.map(function(h){return!l&&h.id!==s?ra({},h):h.entered?ra({},h,{open:!1}):ra({},h,{requestClose:!0})}),queue:f.filter(function(h){return h.id!==s})}})},i.closeSnackbar=function(a){var o=i.state.snacks.find(function(s){return s.id===a});zA(a)&&o&&o.onClose&&o.onClose(null,"instructed",a),i.handleCloseSnack(null,"instructed",a)},i.handleExitedSnack=function(a,o){if(!zA(o))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(s){var l=i.processQueue(ra({},s,{snacks:s.snacks.filter(function(c){return c.id!==o})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},i.enqueueSnackbar,i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(_ce(i)),closeSnackbar:i.closeSnackbar.bind(_ce(i))}},i}var r=t.prototype;return r.render=function(){var i=this,a=this.state.contextValue,o=this.props,s=o.domRoot,l=o.children,c=o.dense,d=c===void 0?!1:c,f=o.Components,h=f===void 0?{}:f,p=o.classes,g=this.state.snacks.reduce(function(b,E){var S,P=UG(E.anchorOrigin),O=b[P]||[];return ra({},b,(S={},S[P]=[].concat(O,[E]),S))},{}),_=Object.keys(g).map(function(b){var E=g[b],S=E[0];return u.createElement(I2t,{key:b,dense:d,anchorOrigin:S.anchorOrigin,classes:p},E.map(function(P){return u.createElement(R2t,{key:P.id,snack:P,classes:p,Component:h[P.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:MS([i.handleExitedSnack,i.props.onExited],P.id),onEntered:MS([i.handleEnteredSnack,i.props.onEntered],P.id)})}))});return u.createElement(HPe.Provider,{value:a},l,s?vo.createPortal(_,s):_)},BPe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Xv.maxSnack}}]),t})(x.Component),KPe=(function(){return x.useContext(HPe)});const Ice=720*60*1e3,$A="pwa-update-available-at";function N2t(){const{enqueueSnackbar:e,closeSnackbar:t}=KPe(),r=ts(),n=x.useRef(r),i=x.useRef({enqueueSnackbar:e,closeSnackbar:t}),a=x.useRef(!0);return n.current=r,i.current={enqueueSnackbar:e,closeSnackbar:t},x.useEffect(()=>{let o,s=!0,l=null,c=!1;const d=P=>{if(c||!P?.waiting)return;c=!0;const{enqueueSnackbar:O,closeSnackbar:I}
158=i.current,{palette:N}=n.current;O("Uma nova versão do Portal está disponível!",{variant:"info",persist:!0,anchorOrigin:{vertical:"bottom",horizontal:"right"},action:F=>u.createElement(fr,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>{P.waiting?.postMessage({type:"SKIP_WAITING"}),I(F)},style:{textTransform:"none",fontWeight:"bold",backgroundColor:"#fff"}},"Atualizar"),style:{backgroundColor:N.primary.main,color:N.primary.contrastText||"#ffffff",fontSize:"16px"}})},f=()=>{const P=localStorage.getItem($A);if(P===null)return null;const O=Number(P);return Number.isFinite(O)?O:null},h=()=>{const P=f();return P===null?Ice:Math.max(0,Ice-(Date.now()-P))},p=()=>{h()===0&&d(l)},g=P=>{if(!P?.waiting)return;l=P,c=!1,f()===null&&localStorage.setItem($A,String(Date.now())),clearTimeout(o),o=setTimeout(p,h())},_=P=>{P?.waiting?.postMessage({type:"SKIP_WAITING"})},b=P=>{s||g(P.detail)},E=()=>{localStorage.removeItem($A),window.location.reload()},S=()=>{document.visibilityState==="visible"&&p()};return window.addEventListener("swUpdated",b),document.addEventListener("visibilitychange",S),navigator.serviceWorker&&(navigator.serviceWorker.addEventListener("controllerchange",E),navigator.serviceWorker.getRegistration().then(P=>{P?.waiting?a.current?_(P):g(P):localStorage.removeItem($A),a.current=!1,s=!1})),()=>{window.removeEventListener("swUpdated",b),document.removeEventListener("visibilitychange",S),clearTimeout(o),navigator.serviceWorker&&navigator.serviceWorker.removeEventListener("controllerchange",E)}},[]),null}const YPe=x.createContext(),Bl=()=>x.useContext(YPe),D2t=u.createContext(),M2t=({show:e,children:t})=>u.createElement(Oh,{in:e,timeout:"auto"},u.createElement("div",{className:Ft(e?"opacity-100 transition-opacity delay-300 duration-200 ease-in":"opacity-0")},t)),L2t=({contents:e,onClose:t,activeTab:r,onActiveTab:n})=>{const i=yc("(max-width:360px)"),a=(o,s)=>{r!==s&&n(s)};return u.createElement("div",{className:"flex w-full flex-shrink-0 border-0 border-b border-solid border-gray-200 shadow-sm"},u.createElement("div",{className:"flex-1 overflow-x-hidden"},e.length>1?u.createElement(OPe,{value:r,onChange:a,indicatorColor:"primary",textColor:"primary",variant:i?"scrollable":"fullWidth"},e.map((o,s)=>u.createElement(wPe,{key:o.id,id:s,label:o.title,className:Ft("min-h-56 text-16 font-semibold",i&&"px-16"),disabled:o.disabled,disableRipple:!0}))):u.createElement("div",{className:"min-h-56 px-24 py-16 text-18 font-semibold text-gray-700"},e[0].title)),t?u.createElement("div",{className:"flex min-h-full items-center justify-center"},u.createElement(cr,{onClick:t,className:"mx-8"},u.createElement(Dm,null))):null)};function Jer({settings:e,contents:t,onClose:r,maxWidth:n,fullHeight:i,dense:a}){const o=Bl(),[s,l]=u.useState(0),[c,d]=x.useState(!1),f=yc("(max-width:600px)"),[h,p]=u.useState([]);u.useEffect(()=>{e.open&&(l(0),d(!1))},[e.open]);const g=u.useCallback(E=>{e.loading||(c?o({title:"Deseja continuar?",description:"As alterações não salvas serão perdidas",cancellationText:"Voltar"}).then(()=>{E(),d(!1)}).catch(()=>{}):E())},[o,c,e.loading]),_=u.useCallback(()=>{g(()=>{r()})},[g,r]),b=E=>{g(()=>{l(E),d(!1)})};return u.createElement(Eo,{open:e.open,onClose:_,fullWidth:!0,fullScreen:f,className:"relative",PaperProps:{className:Ft(n||"max-w-680",i&&"h-full",!f&&"shadow-md rounded-12")},keepMounted:!1},u.createElement(L2t,{contents:t.map(({id:E,title:S,disabled:P})=>({id:E,title:S,disabled:P})),onClose:_,activeTab:s,onActiveTab:b}),u.createElement(D2t.Provider,{value:{setActionsButtons:p,hasUnsavedChanges:c,setHasUnsavedChanges:d}},u.createElement(Xc,{className:Ft(a?"p-0":"p-12 sm:p-20")},t.map(({id:E,Content:S},P)=>u.createElement(M2t,{key:E,show:s===P},u.createElement(S,{active:s===P,settings:e,setActiveTab:l}))))),h.length>0&&u.createElement(VC,{className:"flex justify-between border-0 border-t-1 border-solid border-gray-200 p-12 sm:px-20 sm:py-16"},u.createElement("div",{className:"space-x-8"},h.filter(E=>E&&E.position==="left").map(({label:E,onClick:S,startIcon:P,...O})=>u.createElement(fr,{key:E,onClick:S,startIcon:P?u.createElement(Lg,null,P):null,disableElevation:!0,...O},E))),u.createElement("div",{className:"space-x-8"},h.filter(E=>E&&E.position==="right").map(({label:E,onClick:S,startIcon:P,...O})=>u.createElement(fr,{key:E,onClick:S,startIcon:P?u.createElement(Lg,null,P):null,disableElevation:!0,...O},E)))),e.loading&&u.createElement("div",{className:"absolute inset-0 z-999 flex items-center justify-center bg-white opacity-75"},u.createElement(ai,null)))}var jb={},kce;function F2t(){if(kce)return jb;kce=1;var e=$t(),t=Wt();
158Object.defineProperty(jb,"__esModule",{value:!0}),jb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18.3 5.71a.9959.9959 0 00-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");return jb.default=i,jb}var B2t=F2t();const Aa=et(B2t);function oi({open:e,title:t,loading:r,onClose:n,onSubmit:i,confirmText:a,cancelText:o,submitDisabled:s=!1,disableSubmitOnEnter:l,children:c,dividers:d=!0,Actions:f,contentPadding:h="p-20",maxWidth:p="xs",...g}){const _=yc("(max-width:600px)"),b=u.useMemo(()=>l?E=>E.preventDefault():i||(E=>E.preventDefault()),[l,i]);return u.createElement(Eo,{open:e,onClose:n,maxWidth:p,fullWidth:!0,fullScreen:_,disableEnforceFocus:!0,disableRestoreFocus:!0,PaperProps:{className:_&&g.fullScreen!==!1?"":"shadow-md rounded-12"},...g},u.createElement("form",{onSubmit:b,className:"relative flex h-full flex-col overflow-auto"},u.createElement(p0,{className:"px-20 py-12"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},t),u.createElement(cr,{style:{padding:9},onClick:n},u.createElement(Aa,null)))),u.createElement(Xc,{dividers:d,className:Ft(h,"overflow-auto")},c),!f&&i&&u.createElement(VC,{className:"space-x-12 px-20 py-16"},u.createElement(fr,{onClick:n,color:"primary",variant:"outlined",disableElevation:!0},o||"Cancelar"),u.createElement(fr,{type:l?"button":"submit",onClick:l&&i?i:void 0,color:"primary",variant:"contained",className:"min-w-88",disabled:!e||r||s,disableElevation:!0},a||"Salvar")),f&&u.createElement(VC,{className:"space-x-12 px-20 py-16"},f),r&&u.createElement("div",{className:"absolute inset-0 flex items-center justify-center",style:{zIndex:5e3,backgroundColor:"rgba(255,255,255,0.7)"}},u.createElement(ai,{color:"primary"}))))}class z2t extends u.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){const n={companyId:this.props.company?.id,companyName:this.props.company?.name,pathname:window.location.pathname,localTimestamp:new Date().toString(),error:{message:t.message,stack:t.stack},errorInfo:r};ht.post("/api/v1/errors_reporting",{message:JSON.stringify(n)})}render(){return this.state.hasError?u.createElement("div",{className:"flex h-full w-full flex-col items-center justify-center"},u.createElement(zG,{style:{color:"#890000",fontSize:"16rem"}}),u.createElement("h3",{className:"mt-48 text-center text-4xl font-medium leading-normal text-gray-900"},"Ops! Aconteceu algo inesperado!"),u.createElement("div",{className:"mx-28 max-w-512 text-center"},u.createElement("p",{className:"text-xl leading-relaxed text-gray-500"},"Tente atualizar a página. Se o problema persistir, entre em contato com a nossa equipe de suporte através do email [email protected]"))):this.props.children}}const H2t=e=>{const{company:t}=e.globalCompany||{};return{company:t}};Bbe(H2t)(z2t);u.forwardRef((e,t)=>u.createElement(eXe,{innerRef:t,...e}));function Ma({tooltip:e,onClick:t,children:r,variant:n="default",color:i,tooltipProps:a,padding:o,...s}){const[l,c]=u.useState(!1),d=u.useCallback(async f=>{if(f.stopPropagation(),!t)return;const h=t(f);me.isPromise(h)&&(c(!0),await h,c(!1))},[t]);return n==="button"?u.createElement(Yn,{title:e,placement:"top",arrow:!0,classes:{tooltip:"text-14"},...a||{}},u.createElement("span",null,u.createElement(fr,{...s,"aria-label":e,variant:"outlined",onClick:d,className:Ft("min-w-0 rounded-6 bg-white px-12",i||"text-gray-600"),disabled:l||s.disabled},l?u.createElement(ai,{color:"inherit",size:19}):r))):u.createElement(Yn,{title:e,placement:"top",arrow:!0,classes:{tooltip:"text-14"},...a||{}},u.createElement("span",null,u.createElement(cr,{...s,"aria-label":e,onClick:d,className:Ft("rounded-8",i||"text-gray-500",o||"p-8"),disabled:l||s.disabled,tabIndex:"-1"},l?u.createElement(ai,{color:"inherit",size:19}):r)))}function fV(e,t){return t||(t=e.slice(0)),e.raw=t,e}var Ih=!!(typeof window<"u"&&window.document&&window.document.createElement),U2t=function(){return Ih&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent)},V2t=function(){if(Ih){var t=window.navigator.userAgent.match(/Chrom(e|ium)\/([\d\.]+)\./);return t?parseFloat(t[2]):!1}return!1},q2t=function(){if(Ih){var t=window.navigator.userAgent.match(/Version\/([\d\.]+).*Safari/);return t?parseFloat(t[1]):!1}return!1},j2t=function(){if(U2t())return!1;var t=V2t(),r=q2t();return t?t>=84:r?r>=14.1:!0},PL,Nce;function $2t(){if(Nce)return PL;Nce=1;var e=C_();function t(r){return typeof r=="function"?r:e}return PL=t,PL}var RL,Dce;function W2t(){if(Dce)return RL;Dce=1;var e=k3(),t=t5(),r=$2t(),n=co();function i(a,o){var s=n(a)?e:t;return s(a,r(o))}return RL=i,RL}var G2t=W2t();const Hg=et(G2t);var OL,Mce;function XPe(){if(Mce)return OL;Mce=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return OL=e,OL}var IL,Lce;
158function K2t(){if(Lce)return IL;Lce=1;function e(t){return t!==t}return IL=e,IL}var kL,Fce;function Y2t(){if(Fce)return kL;Fce=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return kL=e,kL}var NL,Bce;function qG(){if(Bce)return NL;Bce=1;var e=XPe(),t=K2t(),r=Y2t();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return NL=n,NL}var DL,zce;function X2t(){if(zce)return DL;zce=1;var e=ym(),t=co(),r=jc(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return DL=i,DL}var Z2t=["top","bottom","right","left"],Q2t=["bottomStart","bottomEnd","topStart","topEnd","leftStart","rightStart","leftEnd","rightEnd"],J2t=["auto","autoVertical","autoVerticalStart","autoVerticalEnd","autoHorizontal","autoHorizontalStart","autoHorizontalEnd"],eTt=[].concat(Z2t,Q2t,J2t),yp;(function(e){e[e.UNCHECK=0]="UNCHECK",e[e.CHECK=1]="CHECK",e[e.INDETERMINATE=2]="INDETERMINATE"})(yp||(yp={}));var tTt=16,rTt=12,Hce;(function(e){e[e.DRAG_OVER=0]="DRAG_OVER",e[e.DRAG_OVER_TOP=1]="DRAG_OVER_TOP",e[e.DRAG_OVER_BOTTOM=2]="DRAG_OVER_BOTTOM"})(Hce||(Hce={}));var Ns={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",ESC:"Escape"},Zv;(function(e){e.CALENDAR="CALENDAR",e.TOOLBAR_BUTTON_OK="TOOLBAR_BUTTON_OK",e.TOOLBAR_SHORTCUT="TOOLBAR_SHORTCUT"})(Zv||(Zv={}));var ML,Uce;function ZPe(){if(Uce)return ML;Uce=1;var e=qx(),t=u_e(),r=m_();function n(i,a,o){for(var s=-1,l=a.length,c={};++s<l;){var d=a[s],f=e(i,d);o(f,d)&&t(c,r(d,i),f)}return c}return ML=n,ML}var LL,Vce;function nTt(){if(Vce)return LL;Vce=1;var e=ZPe(),t=rEe();function r(n,i){return e(n,i,function(a,o){return t(n,o)})}return LL=r,LL}var FL,qce;function iTt(){if(qce)return FL;qce=1;var e=nTt(),t=n$(),r=t(function(n,i){return n==null?{}:e(n,i)});return FL=r,FL}var aTt=iTt();const qc=et(aTt);var BL,jce;function oTt(){if(jce)return BL;jce=1;var e="Expected a function";function t(r){if(typeof r!="function")throw new TypeError(e);return function(){var n=arguments;switch(n.length){case 0:return!r.call(this);case 1:return!r.call(this,n[0]);case 2:return!r.call(this,n[0],n[1]);case 3:return!r.call(this,n[0],n[1],n[2])}return!r.apply(this,n)}}return BL=t,BL}var zL,$ce;function sTt(){if($ce)return zL;$ce=1;var e=qd(),t=ms(),r=ZPe(),n=pj();function i(a,o){if(a==null)return{};var s=e(n(a),function(l){return[l]});return o=t(o),r(a,s,function(l,c){return o(l,c[0])})}return zL=i,zL}var HL,Wce;function lTt(){if(Wce)return HL;Wce=1;var e=ms(),t=oTt(),r=sTt();function n(i,a){return r(i,t(e(a)))}return HL=n,HL}var cTt=lTt();const uTt=et(cTt);function $r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function tn(e){$r(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Nl(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _2(e){$r(1,arguments);var t=tn(e),r=t.getHours();return r}function zi(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function QPe(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return r.setHours(n),r}function dTt(e){$r(1,arguments);var t=tn(e),r=t.getDay();return r}function jG(e){$r(1,arguments);var t=tn(e),r=t.getMinutes();return r}function $G(e){$r(1,arguments);var t=tn(e),r=t.getSeconds();return r}function Od(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function JPe(e){$r(1,arguments);var t=tn(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function eRe(e,t){$r(2,arguments);var r=tn(e),n=zi(t),i=r.getFullYear(),a=r.getDate(),o=new Date(0);o.setFullYear(i,n,15),o.setHours(0,0,0,0);var s=JPe(o);return r.setMonth(n,Math.min(a,s)),r}function fTt(e,t){if($r(2,arguments),Nl(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var r=tn(e);return isNaN(r.getTime())?new Date(NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=eRe(r,t.month)),t.date!=null&&r.setDate(zi(t.date)),t.hours!=null&&r.setHours(zi(t.hours)),t.minutes!=null&&r.setMinutes(zi(t.minutes)),t.seconds!=null&&r.setSeconds(zi(t.seconds)),t.milliseconds!=null&&r.setMilliseconds(zi(t.milliseconds)),r)}function Ou(e,t){$r(2,arguments);var r=tn(e),n=zi(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function hTt(e,t){$r(2,arguments);var r=tn(e),n=tn(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function oR(e){$r(1,arguments);var t=tn(e);return t.setHours(23,59,59,999),t}var pTt={};function Mm(){return pTt}function tRe(e,t){var r,n,i,a,o,s,l,c;$r(1,arguments);var d=Mm(),f=zi((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=tn(e),p=h.getDay(),g=(p<f?-7:0)+6-(p-f);return h.setDate(h.getDate()+g),h.setHours(23,59,59,999),h}function mTt(e){return $r(1,arguments),tRe(e,{weekStartsOn:1}
158)}function vTt(e){$r(1,arguments);var t=tn(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function gTt(e){return $r(1,arguments),e instanceof Date||Nl(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wI(e){if($r(1,arguments),!gTt(e)&&typeof e!="number")return!1;var t=tn(e);return!isNaN(Number(t))}function yTt(e,t){$r(2,arguments);var r=tn(e).getTime(),n=zi(t);return new Date(r+n)}function rRe(e,t){$r(2,arguments);var r=zi(t);return yTt(e,-r)}var _Tt=864e5;function bTt(e){$r(1,arguments);var t=tn(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/_Tt)+1}function q1(e){$r(1,arguments);var t=1,r=tn(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function nRe(e){$r(1,arguments);var t=tn(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=q1(n),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var o=q1(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function ETt(e){$r(1,arguments);var t=nRe(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=q1(r);return n}var wTt=6048e5;function iRe(e){$r(1,arguments);var t=tn(e),r=q1(t).getTime()-ETt(t).getTime();return Math.round(r/wTt)+1}function Ug(e,t){var r,n,i,a,o,s,l,c;$r(1,arguments);var d=Mm(),f=zi((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=tn(e),p=h.getUTCDay(),g=(p<f?7:0)+p-f;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function WG(e,t){var r,n,i,a,o,s,l,c;$r(1,arguments);var d=tn(e),f=d.getUTCFullYear(),h=Mm(),p=zi((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:h.firstWeekContainsDate)!==null&&n!==void 0?n:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(f+1,0,p),g.setUTCHours(0,0,0,0);var _=Ug(g,t),b=new Date(0);b.setUTCFullYear(f,0,p),b.setUTCHours(0,0,0,0);var E=Ug(b,t);return d.getTime()>=_.getTime()?f+1:d.getTime()>=E.getTime()?f:f-1}function STt(e,t){var r,n,i,a,o,s,l,c;$r(1,arguments);var d=Mm(),f=zi((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=WG(e,t),p=new Date(0);p.setUTCFullYear(h,0,f),p.setUTCHours(0,0,0,0);var g=Ug(p,t);return g}var CTt=6048e5;function aRe(e,t){$r(1,arguments);var r=tn(e),n=Ug(r,t).getTime()-STt(r,t).getTime();return Math.round(n/CTt)+1}function Vi(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var cp={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Vi(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Vi(n+1,2)},d:function(t,r){return Vi(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Vi(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Vi(t.getUTCHours(),r.length)},m:function(t,r){return Vi(t.getUTCMinutes(),r.length)},s:function(t,r){return Vi(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return Vi(a,r.length)}},Z0={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xTt={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return cp.y(t,r)},Y:function(t,r,n,i){var a=WG(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return Vi(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):Vi(o,r.length)},R:function(t,r){var n=nRe(t);return Vi(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Vi(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Vi(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Vi(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return cp.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Vi(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=aRe(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):Vi(a,r.length)},I:function(t,r,n){var i=iRe(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Vi(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):cp.d(t,r)},D:function(t,r,n){var i=bTt(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Vi(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return Vi(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return Vi(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return Vi(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=Z0.noon:i===0?a=Z0.midnight:a=i/12>
158=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=Z0.evening:i>=12?a=Z0.afternoon:i>=4?a=Z0.morning:a=Z0.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return cp.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):cp.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Vi(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Vi(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):cp.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):cp.s(t,r)},S:function(t,r){return cp.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Kce(o);case"XXXX":case"XX":return Sv(o);default:return Sv(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return Kce(o);case"xxxx":case"xx":return Sv(o);default:return Sv(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Gce(o,":");default:return"GMT"+Sv(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Gce(o,":");default:return"GMT"+Sv(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return Vi(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return Vi(o,r.length)}};function Gce(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+Vi(a,2)}function Kce(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Vi(Math.abs(e)/60,2)}return Sv(e,t)}function Sv(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=Vi(Math.floor(i/60),2),o=Vi(i%60,2);return n+a+r+o}var Yce=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});default:return r.date({width:"full"})}},oRe=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});default:return r.time({width:"full"})}},TTt=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return Yce(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Yce(i,r)).replace("{{time}}",oRe(a,r))},hV={p:oRe,P:TTt};function sRe(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var ATt=["D","DD"],PTt=["YY","YYYY"];function lRe(e){return ATt.indexOf(e)!==-1}function cRe(e){return PTt.indexOf(e)!==-1}function SI(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").
vendor: 10,066 bytes, line 158
158concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var RTt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},uRe=function(t,r,n){var i,a=RTt[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Gf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var OTt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ITt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kTt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NTt={date:Gf({formats:OTt,defaultWidth:"full"}),time:Gf({formats:ITt,defaultWidth:"full"}),dateTime:Gf({formats:kTt,defaultWidth:"full"})},DTt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dRe=function(t,r,n,i){return DTt[t]};function gd(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var MTt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},LTt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},FTt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},BTt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zTt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HTt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},UTt=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fRe={ordinalNumber:UTt,era:gd({values:MTt,defaultWidth:"wide"}),quarter:gd({values:LTt,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:gd({values:FTt,defaultWidth:"wide"}),day:gd({values:BTt,defaultWidth:"wide"}),dayPeriod:gd({values:zTt,defaultWidth:"wide",formattingValues:HTt,defaultFormattingWidth:"wide"})};function yd(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?qTt(s,function(f){return f.test(o)}):VTt(s,function(f){return f.test(o)}),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;var d=t.slice(o.length);return{value:c,rest:d}}}function VTt(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function qTt(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function hRe(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var jTt=/^(\d+)(th|st|nd|rd)?/i,$Tt=/\d+/i,WTt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},GTt={any:[/^b/i,/^(a|c)/i]},KTt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YTt={any:[/1/i,/2/i,/3/i,/4/i]},XTt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ZTt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QTt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},JTt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eAt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tAt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},pRe={ordinalNumber:hRe({matchPattern:jTt,parsePattern:$Tt,valueCallback:function(t){return parseInt(t,10)}}),era:yd({matchPatterns:WTt,defaultMatchWidth:"wide",parsePatterns:GTt,defaultParseWidth:"any"}),quarter:yd({matchPatterns:KTt,defaultMatchWidth:"wide",parsePatterns:YTt,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:yd({matchPatterns:XTt,defaultMatchWidth:"wide",parsePatterns:ZTt,defaultParseWidth:"any"}),day:yd({matchPatterns:QTt,defaultMatchWidth:"wide",parsePatterns:JTt,defaultParseWidth:"any"}),dayPeriod:yd({matchPatterns:eAt,defaultMatchWidth:"any",parsePatterns:tAt,defaultParseWidth:"any"})},mRe={code:"en-US",formatDistance:uRe,formatLong:NTt,formatRelative:dRe,localize:fRe,match:pRe,options:{weekStartsOn:0,firstWeekContainsDate:1}},rAt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nAt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iAt=/^'([^]*?)'?$/,aAt=/''/g,oAt=/[a-zA-Z]/;function pV(e,t,r){var n,i,a,o,s,l,c,d,f,h,p,g,_,b,E,S,P,O;$r(2,arguments);var I=String(t),N=Mm(),M=(n=(i=r?.locale)!==null&&i!==void 0?i:N.locale)!==null&&n!==void 0?n:mRe,F=zi((a=(o=(s=(l=r?.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(c=r.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:N.firstWeekContainsDate)!==null&&o!==void 0?o:(f=N.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=zi((p=(g=(_=(b=r?.weekStartsOn)!==null&&b!==void 0?b:r==null||(E=r.locale)===null||E===void 0||(S=E.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&_!==void 0?_:N.weekStartsOn)!==null&&g!==void 0?g:(P=N.locale)===null||P===void 0||(O=P.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&p!==void 0?p:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var V=tn(e);if(!wI(V))throw new RangeError("Invalid time value");var W=sRe(V),$=rRe(V,W),X={firstWeekContainsDate:F,weekStartsOn:B,locale:M,_originalDate:V},re=I.match(nAt).map(function(ae){var Q=ae[0];if(Q==="p"||Q==="P"){var ie=hV[Q];return ie(ae,M.formatLong)}return ae}).join("").match(rAt).map(function(ae){if(ae==="''")return"'";var Q=ae[0];if(Q==="'")return sAt(ae);var ie=xTt[Q];if(ie)return!(r!=null&&r.useAdditionalWeekYearTokens)&&cRe(ae)&&SI(ae,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&lRe(ae)&&SI(ae,t,String(e)),ie($,ae,M.localize,X);
158if(Q.match(oAt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return ae}).join("");return re}function sAt(e){var t=e.match(iAt);return t?t[1].replace(aAt,"'"):e}function lAt(e){$r(1,arguments);var t=tn(e),r=t.getDate();return r}function cAt(e){$r(1,arguments);var t=tn(e),r=t.getMonth();return r}function UL(e){return $r(1,arguments),tn(e).getFullYear()}function Bv(e,t){$r(2,arguments);var r=tn(e),n=tn(t);return r.getTime()>n.getTime()}function zv(e,t){$r(2,arguments);var r=tn(e),n=tn(t);return r.getTime()<n.getTime()}function Xy(e){$r(1,arguments);var t=tn(e);return t.setHours(0,0,0,0),t}function Ff(e,t){$r(2,arguments);var r=Xy(e),n=Xy(t);return r.getTime()===n.getTime()}function GG(e,t){$r(2,arguments);var r=tn(e),n=tn(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function Xce(e){$r(1,arguments);var t=tn(e);return t.setMilliseconds(0),t}function Zce(e,t){$r(2,arguments);var r=Xce(e),n=Xce(t);return r.getTime()===n.getTime()}function Qce(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=hG(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
159In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw a}}}}function uAt(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function vRe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vRe=function(){return!!e})()}function vi(e){var t=vRe();return function(){var r,n=zg(e);if(t){var i=zg(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return g4(this,r)}}var dAt=10,gRe=(function(){function e(){Hn(this,e),Nt(this,"priority",void 0),Nt(this,"subPriority",0)}return kn(e,[{key:"validate",value:function(r,n){return!0}}]),e})(),fAt=(function(e){ri(r,e);var t=vi(r);function r(n,i,a,o,s){var l;return Hn(this,r),l=t.call(this),l.value=n,l.validateValue=i,l.setValue=a,l.priority=o,s&&(l.subPriority=s),l}return kn(r,[{key:"validate",value:function(i,a){return this.validateValue(i,this.value,a)}},{key:"set",value:function(i,a,o){return this.setValue(i,a,this.value,o)}}]),r})(gRe),hAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",dAt),Nt(Cr(n),"subPriority",-1),n}return kn(r,[{key:"set",value:function(i,a){if(a.timestampIsSet)return i;var o=new Date(0);return o.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),o.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),o}}]),r})(gRe),Ti=(function(){function e(){Hn(this,e),Nt(this,"incompatibleTokens",void 0),Nt(this,"priority",void 0),Nt(this,"subPriority",void 0)}return kn(e,[{key:"run",value:function(r,n,i,a){var o=this.parse(r,n,i,a);return o?{setter:new fAt(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),e})(),pAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",140),Nt(Cr(n),"incompatibleTokens",["R","u","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"G":case"GG":case"GGG":return o.era(i,{width:"abbreviated"})||o.era(i,{width:"narrow"});case"GGGGG":return o.era(i,{width:"narrow"});default:return o.era(i,{width:"wide"})||o.era(i,{width:"abbreviated"})||o.era(i,{width:"narrow"})}}},{key:"set",value:function(i,a,o){return a.era=o,i.setUTCFullYear(o,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),mAt=6e4,vAt=36e5,gAt=1e3,ho={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/}
vendor: 27,251 bytes, line 159
159,_d={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function po(e,t){return e&&{value:t(e.value),rest:e.rest}}function Wa(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function bd(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,a=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(i*vAt+a*mAt+o*gAt),rest:t.slice(r[0].length)}}function yRe(e){return Wa(ho.anyDigitsSigned,e)}function lo(e,t){switch(e){case 1:return Wa(ho.singleDigit,t);case 2:return Wa(ho.twoDigits,t);case 3:return Wa(ho.threeDigits,t);case 4:return Wa(ho.fourDigits,t);default:return Wa(new RegExp("^\\d{1,"+e+"}"),t)}}function CI(e,t){switch(e){case 1:return Wa(ho.singleDigitSigned,t);case 2:return Wa(ho.twoDigitsSigned,t);case 3:return Wa(ho.threeDigitsSigned,t);case 4:return Wa(ho.fourDigitsSigned,t);default:return Wa(new RegExp("^-?\\d{1,"+e+"}"),t)}}function KG(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function _Re(e,t){var r=t>0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var a=n+50,o=Math.floor(a/100)*100,s=e>=a%100;i=e+o-(s?100:0)}return r?i:1-i}function bRe(e){return e%400===0||e%4===0&&e%100!==0}var yAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",130),Nt(Cr(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return po(lo(4,i),s);case"yo":return po(o.ordinalNumber(i,{unit:"year"}),s);default:return po(lo(a.length,i),s)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,o){var s=i.getUTCFullYear();if(o.isTwoDigitYear){var l=_Re(o.year,s);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),_At=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",130),Nt(Cr(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return po(lo(4,i),s);case"Yo":return po(o.ordinalNumber(i,{unit:"year"}),s);default:return po(lo(a.length,i),s)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,o,s){var l=WG(i,s);if(o.isTwoDigitYear){var c=_Re(o.year,l);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Ug(i,s)}var d=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(d,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Ug(i,s)}}]),r})(Ti),bAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",130),Nt(Cr(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a){return CI(a==="R"?4:a.length,i)}},{key:"set",value:function(i,a,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),q1(s)}}]),r})(Ti),EAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",130),Nt(Cr(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a){return CI(a==="u"?4:a.length,i)}},{key:"set",value:function(i,a,o){return i.setUTCFullYear(o,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),wAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",120),Nt(Cr(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"Q":case"QQ":return lo(a.length,i);case"Qo":return o.ordinalNumber(i,{unit:"quarter"});case"QQQ":return o.quarter(i,{width:"abbreviated",context:"formatting"})||o.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(i,{width:"narrow",context:"formatting"});default:return o.quarter(i,{width:"wide",context:"formatting"})||o.quarter(i,{width:"abbreviated",context:"formatting"})||o.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),SAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",120),Nt(Cr(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"q":case"qq":return lo(a.length,i);case"qo":return o.ordinalNumber(i,{unit:"quarter"});case"qqq":return o.quarter(i,{width:"abbreviated",context:"standalone"})||o.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(i,{width:"narrow",context:"standalone"});default:return o.quarter(i,{width:"wide",context:"standalone"})||o.quarter(i,{width:"abbreviated",context:"standalone"})||o.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),CAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Nt(Cr(n),"priority",110),n}return kn(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c-1};switch(a){case"M":return po(Wa(ho.month,i),s);case"MM":return po(lo(2,i),s);case"Mo":return po(o.ordinalNumber(i,{unit:"month"}),s);case"MMM":return o.month(i,{width:"abbreviated",context:"formatting"})||o.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(i,{width:"narrow",context:"formatting"});default:return o.month(i,{width:"wide",context:"formatting"})||o.month(i,{width:"abbreviated",context:"formatting"})||o.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),xAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",110),Nt(Cr(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c-1};switch(a){case"L":return po(Wa(ho.month,i),s);case"LL":return po(lo(2,i),s);case"Lo":return po(o.ordinalNumber(i,{unit:"month"}),s);case"LLL":return o.month(i,{width:"abbreviated",context:"standalone"})||o.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(i,{width:"narrow",context:"standalone"});default:return o.month(i,{width:"wide",context:"standalone"})||o.month(i,{width:"abbreviated",context:"standalone"})||o.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),r})(Ti);function TAt(e,t,r){$r(2,arguments);var n=tn(e),i=zi(t),a=aRe(n,r)-i;return n.setUTCDate(n.getUTCDate()-a*7),n}var AAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",100),Nt(Cr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"w":return Wa(ho.week,i);case"wo":return o.ordinalNumber(i,{unit:"week"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,o,s){return Ug(TAt(i,o,s),s)}}]),r})(Ti);function PAt(e,t){$r(2,arguments);var r=tn(e),n=zi(t),i=iRe(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}var RAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",100),Nt(Cr(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"I":return Wa(ho.week,i);case"Io":return o.ordinalNumber(i,{unit:"week"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,o){return q1(PAt(i,o))}}]),r})(Ti),OAt=[31,28,31,30,31,30,31,31,30,31,30,31],IAt=[31,29,31,30,31,30,31,31,30,31,30,31],kAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"subPriority",1),Nt(Cr(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"d":return Wa(ho.date,i);case"do":return o.ordinalNumber(i,{unit:"date"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){var o=i.getUTCFullYear(),s=bRe(o),l=i.getUTCMonth();return s?a>=1&&a<=IAt[l]:a>=1&&a<=OAt[l]}},{key:"set",value:function(i,a,o){return i.setUTCDate(o),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),NAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"subpriority",1),Nt(Cr(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"D":case"DD":return Wa(ho.dayOfYear,i);case"Do":return o.ordinalNumber(i,{unit:"date"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){var o=i.getUTCFullYear(),s=bRe(o);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,o){return i.setUTCMonth(0,o),i.setUTCHours(0,0,0,0),i}}]),r})(Ti);function YG(e,t,r){var n,i,a,o,s,l,c,d;$r(2,arguments);var f=Mm(),h=zi((n=(i=(a=(o=r?.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&i!==void 0?i:(c=f.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=tn(e),g=zi(t),_=p.getUTCDay(),b=g%7,E=(b+7)%7,S=(E<h?7:0)+g-_;return p.setUTCDate(p.getUTCDate()+S),p}var DAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"E":case"EE":case"EEE":return o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});default:return o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=YG(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),MAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o,s){var l=function(d){var f=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+f};switch(a){case"e":case"ee":return po(lo(a.length,i),l);case"eo":return po(o.ordinalNumber(i,{unit:"day"}),l);case"eee":return o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"eeeee":return o.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});default:return o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=YG(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),LAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o,s){var l=function(d){var f=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+f};switch(a){case"c":case"cc":return po(lo(a.length,i),l);case"co":return po(o.ordinalNumber(i,{unit:"day"}),l);case"ccc":return o.day(i,{width:"abbreviated",context:"standalone"})||o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"});case"ccccc":return o.day(i,{width:"narrow",context:"standalone"});case"cccccc":return o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"});default:return o.day(i,{width:"wide",context:"standalone"})||o.day(i,{width:"abbreviated",context:"standalone"})||o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=YG(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(Ti);function FAt(e,t){$r(2,arguments);var r=zi(t);r%7===0&&(r=r-7);var n=1,i=tn(e),a=i.getUTCDay(),o=r%7,s=(o+7)%7,l=(s<n?7:0)+r-a;return i.setUTCDate(i.getUTCDate()+l),i}var BAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",90),Nt(Cr(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c===0?7:c};switch(a){case"i":case"ii":return lo(a.length,i);case"io":return o.ordinalNumber(i,{unit:"day"});case"iii":return po(o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return po(o.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return po(o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s);default:return po(o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,a){return a>=1&&a<=7}},{key:"set",value:function(i,a,o){return i=FAt(i,o),i.setUTCHours(0,0,0,0),i}}]),r})(Ti),zAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",80),Nt(Cr(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"a":case"aa":case"aaa":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(i,{width:"narrow",context:"formatting"});default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(KG(o),0,0,0),i}}]),r})(Ti),HAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",80),Nt(Cr(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"b":case"bb":case"bbb":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(i,{width:"narrow",context:"formatting"});default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(KG(o),0,0,0),i}}]),r})(Ti),UAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",80),Nt(Cr(n),"incompatibleTokens",["a","b","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"B":case"BB":case"BBB":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(i,{width:"narrow",context:"formatting"});default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(KG(o),0,0,0),i}}]),r})(Ti),VAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",70),Nt(Cr(n),"incompatibleTokens",["H","K","k","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"h":return Wa(ho.hour12h,i);case"ho":return o.ordinalNumber(i,{unit:"hour"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=12}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):!s&&o===12?i.setUTCHours(0,0,0,0):i.setUTCHours(o,0,0,0),i}}]),r})(Ti),qAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",70),Nt(Cr(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"H":return Wa(ho.hour23h,i);case"Ho":return o.ordinalNumber(i,{unit:"hour"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=23}},{key:"set",value:function(i,a,o){return i.setUTCHours(o,0,0,0),i}}]),r})(Ti),jAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",70),Nt(Cr(n),"incompatibleTokens",["h","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"K":return Wa(ho.hour11h,i);case"Ko":return o.ordinalNumber(i,{unit:"hour"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):i.setUTCHours(o,0,0,0),i}}]),r})(Ti),$At=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",70),Nt(Cr(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"k":return Wa(ho.hour24h,i);case"ko":return o.ordinalNumber(i,{unit:"hour"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=24}},{key:"set",value:function(i,a,o){var s=o<=24?o%24:o;return i.setUTCHours(s,0,0,0),i}}]),r})(Ti),WAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",60),Nt(Cr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"m":return Wa(ho.minute,i);case"mo":return o.ordinalNumber(i,{unit:"minute"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCMinutes(o,0,0),i}}]),r})(Ti),GAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",50),Nt(Cr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(i,a,o){switch(a){case"s":return Wa(ho.second,i);case"so":return o.ordinalNumber(i,{unit:"second"});default:return lo(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCSeconds(o,0),i}}]),r})(Ti),KAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",30),Nt(Cr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(i,a){var o=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return po(lo(a.length,i),o)}},{key:"set",value:function(i,a,o){return i.setUTCMilliseconds(o),i}}]),r})(Ti),YAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",10),Nt(Cr(n),"incompatibleTokens",["t","T","x"]),n}return kn(r,[{key:"parse",value:function(i,a){switch(a){case"X":return bd(_d.basicOptionalMinutes,i);case"XX":return bd(_d.basic,i);case"XXXX":return bd(_d.basicOptionalSeconds,i);case"XXXXX":return bd(_d.extendedOptionalSeconds,i);default:return bd(_d.extended,i)}}},{key:"set",value:function(i,a,o){return a.timestampIsSet?i:new Date(i.getTime()-o)}}]),r})(Ti),XAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",10),Nt(Cr(n),"incompatibleTokens",["t","T","X"]),n}return kn(r,[{key:"parse",value:function(i,a){switch(a){case"x":return bd(_d.basicOptionalMinutes,i);case"xx":return bd(_d.basic,i);case"xxxx":return bd(_d.basicOptionalSeconds,i);case"xxxxx":return bd(_d.extendedOptionalSeconds,i);default:return bd(_d.extended,i)}}},{key:"set",value:function(i,a,o){return a.timestampIsSet?i:new Date(i.getTime()-o)}}]),r})(Ti),ZAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",40),Nt(Cr(n),"incompatibleTokens","*"),n}return kn(r,[{key:"parse",value:function(i){return yRe(i)}},{key:"set",value:function(i,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),r})(Ti),QAt=(function(e){ri(r,e);var t=vi(r);function r(){var n;Hn(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Nt(Cr(n),"priority",20),Nt(Cr(n),"incompatibleTokens","*"),n}return kn(r,[{key:"parse",value:function(i){return yRe(i)}},{key:"set",value:function(i,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),r})(Ti),JAt={G:new pAt,y:new yAt,Y:new _At,R:new bAt,u:new EAt,Q:new wAt,q:new SAt,M:new CAt,L:new xAt,w:new AAt,I:new RAt,d:new kAt,D:new NAt,E:new DAt,e:new MAt,c:new LAt,i:new BAt,a:new zAt,b:new HAt,B:new UAt,h:new VAt,H:new qAt,K:new jAt,k:new $At,m:new WAt,s:new GAt,S:new KAt,X:new YAt,x:new XAt,t:new ZAt,T:new QAt},ePt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tPt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rPt=/^'([^]*?)'?$/,nPt=/''/g,iPt=/\S/,aPt=/[a-zA-Z]/;function ERe(e,t,r,n){var i,a,o,s,l,c,d,f,h,p,g,_,b,E,S,P,O,I;$r(3,arguments);var N=String(e),M=String(t),F=Mm(),B=(i=(a=n?.locale)!==null&&a!==void 0?a:F.locale)!==null&&i!==void 0?i:mRe;if(!B.match)throw new RangeError("locale must contain match property");var V=zi((o=(s=(l=(c=n?.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(d=n.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&l!==void 0?l:F.firstWeekContainsDate)!==null&&s!==void 0?s:(h=F.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(V>=1&&V<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=zi((g=(_=(b=(E=n?.weekStartsOn)!==null&&E!==void 0?E:n==null||(S=n.locale)===null||S===void 0||(P=S.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&b!==void 0?b:F.weekStartsOn)!==null&&_!==void 0?_:(O=F.locale)===null||O===void 0||(I=O.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&g!==void 0?g:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(M==="")return N===""?tn(r):new Date(NaN);var $={firstWeekContainsDate:V,weekStartsOn:W,locale:B},X=[new hAt],re=M.match(tPt).map(function(De){var Ve=De[0];if(Ve in hV){var Ke=hV[Ve];return Ke(De,B.formatLong)}return De}).join("").match(ePt),ae=[],Q=Qce(re),ie;try{var le=function(){var Ve=ie.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&cRe(Ve)&&SI(Ve,M,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&lRe(Ve)&&SI(Ve,M,e);var Ke=Ve[0],Qe=JAt[Ke];if(Qe){var Ue=Qe.incompatibleTokens;if(Array.isArray(Ue)){var ut=ae.find(function(ke){return Ue.includes(ke.token)||ke.token===Ke});
159if(ut)throw new RangeError("The format string mustn't contain `".concat(ut.fullToken,"` and `").concat(Ve,"` at the same time"))}else if(Qe.incompatibleTokens==="*"&&ae.length>0)throw new RangeError("The format string mustn't contain `".concat(Ve,"` and any other token at the same time"));ae.push({token:Ke,fullToken:Ve});var We=Qe.run(N,Ve,B.match,$);if(!We)return{v:new Date(NaN)};X.push(We.setter),N=We.rest}else{if(Ke.match(aPt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ke+"`");if(Ve==="''"?Ve="'":Ke==="'"&&(Ve=oPt(Ve)),N.indexOf(Ve)===0)N=N.slice(Ve.length);else return{v:new Date(NaN)}}};for(Q.s();!(ie=Q.n()).done;){var fe=le();if(Nl(fe)==="object")return fe.v}}catch(De){Q.e(De)}finally{Q.f()}if(N.length>0&&iPt.test(N))return new Date(NaN);var de=X.map(function(De){return De.priority}).sort(function(De,Ve){return Ve-De}).filter(function(De,Ve,Ke){return Ke.indexOf(De)===Ve}).map(function(De){return X.filter(function(Ve){return Ve.priority===De}).sort(function(Ve,Ke){return Ke.subPriority-Ve.subPriority})}).map(function(De){return De[0]}),ge=tn(r);if(isNaN(ge.getTime()))return new Date(NaN);var Ae=rRe(ge,sRe(ge)),Fe={},Pe=Qce(de),ce;try{for(Pe.s();!(ce=Pe.n()).done;){var pe=ce.value;if(!pe.validate(Ae,$))return new Date(NaN);var Ne=pe.set(Ae,Fe,$);Array.isArray(Ne)?(Ae=Ne[0],uAt(Fe,Ne[1])):Ae=Ne}}catch(De){Pe.e(De)}finally{Pe.f()}return Ae}function oPt(e){return e.match(rPt)[1].replace(nPt,"'")}function wRe(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return r.setDate(n),r}function sPt(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return r.setMinutes(n),r}function lPt(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return r.setSeconds(n),r}function cPt(e,t){$r(2,arguments);var r=tn(e),n=zi(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function SRe(e,t){var r,n,i,a,o,s,l,c;$r(1,arguments);var d=Mm(),f=zi((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=tn(e),p=h.getDay(),g=(p<f?7:0)+p-f;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function uPt(e){return $r(1,arguments),SRe(e,{weekStartsOn:1})}function dPt(e){$r(1,arguments);var t=tn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function WA(e,t){$r(2,arguments);var r=zi(t);return Od(e,-r)}function Jce(e,t,r){return $r(2,arguments),wI(ERe(e,t,new Date,r))}function fPt(e,t){$r(2,arguments);var r=tn(e),n=tn(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}var CRe=["disabledHours","disabledMinutes","disabledSeconds"],hPt=["hideHours","hideMinutes","hideSeconds"],xRe=CRe.concat(hPt);function pPt(e,t){return t?Object.keys(e).some(function(r){return/(Hours)/.test(r)?e[r](_2(t),t):/(Minutes)/.test(r)?e[r](jG(t),t):/(Seconds)/.test(r)?e[r]($G(t),t):!1}):!1}function mPt(e,t){var r=qc(e,CRe);return pPt(r,t)}var TRe=function(t){return uTt(t,function(r,n){return n.startsWith("disabled")||n.startsWith("hide")})},xI=function(t){return/([Hhms])/.test(t)},vPt=function(t){return/[Yy]/.test(t)&&/[ML]/.test(t)},gPt=function(t){return/[Yy]/.test(t)&&/[ML]/.test(t)&&/[Dd]/.test(t)},etr=function(t){return/([Hhms])/.test(t)&&!/([YyMDd])/.test(t)};function yPt(e,t){var r=dTt(e),n=0-r;t&&(n=1-r,r===0&&(n=-6));var i=Od(e,n),a=[i],o=Od(i,7);for(a.push(o);a.length<6;)o=Od(o,7),a.push(o);return a}function _Pt(e){return Array.from(e).map(function(t){return t.match(/[A-Za-z]/)?/[\d|A-Za-z]/:t})}function Pf(e){var t=e.from,r=e.to;return fTt(r,{hours:_2(t),minutes:jG(t),seconds:$G(t)})}function eue(e){var t=e[0],r=e[1];return t&&r?[Pf({from:t,to:r}),Pf({from:r,to:t})]:e}var tue=function(t){var r=new Date(t.valueOf()),n=_2(r),i=n>=12?n-12:n+12;return QPe(r,i)},VL={exports:{}},rue;function bPt(){return rue||(rue=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,n(s)))}return a}
159function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(VL)),VL.exports}var EPt=bPt();const Id=et(EPt);var wPt=function(e){return function(t){return!e||!t?"":Array.isArray(t)?Id(t.filter(function(r){return!!r}).map(function(r){return"".concat(e,"-").concat(r)})):"".concat(e,"-").concat(t)}},ARe=x.createContext({});ARe.Provider;function PRe(){var e=x.useContext(ARe)||{},t=e.classPrefix,r=t===void 0?"rs-":t,n=e.csp,i=e.disableInlineStyles,a=i===void 0?!1:i;return{classPrefix:r,csp:n,disableInlineStyles:a}}function SPt(){var e=PRe().classPrefix,t="".concat(e,"icon");return[t,wPt(t)]}var nue=[],GA=[];function CPt(e){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.setAttribute("data-insert-css","rsuite-icons"),e&&t.setAttribute("nonce",e),t}function xPt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.prepend===!0?"prepend":"append",n=t.container||document.querySelector("head");if(!n)throw new Error("No container found to insert CSS.");var i=nue.indexOf(n);i===-1&&(i=nue.push(n)-1,GA[i]={});var a;return GA[i][r]?a=GA[i][r]:(a=CPt(t.nonce),GA[i][r]=a,r==="prepend"?n.insertBefore(a,n.firstChild):n.appendChild(a)),e.charCodeAt(0)===65279&&(e=e.slice(1)),a.styleSheet?a.styleSheet.cssText+=e:a.textContent+=e,a}var TPt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"rs-";return".".concat(e,`icon {
160  display: -webkit-inline-box;
161  display: -ms-inline-flexbox;
162  display: inline-flex;
163  -webkit-box-align: center;
164      -ms-flex-align: center;
165          align-items: center;
166  text-rendering: optimizeLegibility;
167  -webkit-font-smoothing: antialiased;
168  -moz-osx-font-smoothing: grayscale;
169  vertical-align: middle;
170}
171.`).concat(e,`icon[tabindex] {
172  cursor: pointer;
173}
174.`).concat(e,`icon-spin {
175  -webkit-animation: icon-spin 2s infinite linear;
176          animation: icon-spin 2s infinite linear;
177}
178.`).concat(e,`icon-pulse {
179  -webkit-animation: icon-spin 1s infinite steps(8);
180          animation: icon-spin 1s infinite steps(8);
181}
182.`).concat(e,`icon-flip-horizontal {
183  -webkit-transform: scaleX(-1);
184      -ms-transform: scaleX(-1);
185          transform: scaleX(-1);
186}
187.`).concat(e,`icon-flip-vertical {
188  -webkit-transform: scaleY(-1);
189      -ms-transform: scaleY(-1);
190          transform: scaleY(-1);
191}
192@-webkit-keyframes icon-spin {
193  0% {
194    -webkit-transform: rotate(0deg);
195            transform: rotate(0deg);
196  }
197  100% {
198    -webkit-transform: rotate(359deg);
199            transform: rotate(359deg);
200  }
201}
202@keyframes icon-spin {
203  0% {
204    -webkit-transform: rotate(0deg);
205            transform: rotate(0deg);
206  }
207  100% {
208    -webkit-transform: rotate(359deg);
209            transform: rotate(359deg);
210  }
211}`)}
211,iue=!1,APt=function(){var e=PRe(),t=e.csp,r=e.classPrefix,n=e.disableInlineStyles;x.useEffect(function(){!iue&&!n&&(xPt(TPt(r),{prepend:!0,nonce:t?.nonce}),iue=!0)},[])};function aue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function PPt(e){if(Array.isArray(e))return e}function sR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RPt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function OPt(){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 oue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){sR(e,i,r[i])})}return e}function IPt(e,t){if(e==null)return{};var r=kPt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kPt(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function RRe(e,t){return PPt(e)||RPt(e,t)||NPt(e,t)||OPt()}function NPt(e,t){if(e){if(typeof e=="string")return aue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aue(e,t)}}function DPt(e){var t={};return Object.entries(e).forEach(function(r){var n=RRe(r,2),i=n[0],a=n[1];typeof a<"u"&&(t[i]=a)}),t}var ORe=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"svg":r,i=e.spin,a=e.pulse,o=e.flip,s=e.fill,l=s===void 0?"currentColor":s,c=e.className,d=e.rotate,f=e.children,h=e.viewBox,p=e.size,g=e.width,_=e.height,b=e.style,E=IPt(e,["as","spin","pulse","flip","fill","className","rotate","children","viewBox","size","width","height","style"]),S=RRe(SPt(),2),P=S[0],O=S[1],I,N=Id(c,P,(I={},sR(I,O("spin"),i),sR(I,O("pulse"),a),sR(I,O("flip-".concat(o)),!!o),I)),M={msTransform:"rotate(".concat(d,"deg)"),transform:"rotate(".concat(d,"deg)")};APt();var F,B=(F=p??g)!==null&&F!==void 0?F:"1em",V,W=(V=p??_)!==null&&V!==void 0?V:"1em",$=DPt({width:B,height:W,fill:l,viewBox:h,className:N,style:d?oue({},M,b):b});return u.createElement(n,oue({"aria-hidden":!0,focusable:!1,ref:t},$,E),f)});ORe.displayName="Icon";function MPt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LPt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){MPt(e,i,r[i])})}return e}function j_(e){var t=e.as,r=e.ariaLabel,n=e.displayName,i=e.category,a=u.forwardRef(function(o,s){return u.createElement(ORe,LPt({"aria-label":r,"data-category":i,ref:s,as:t},o))});return a.displayName=n,a}function FPt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BPt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){FPt(e,i,r[i])})}return e}var zPt=function(e,t){return x.createElement("svg",BPt({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),x.createElement("path",{d:"m2.784 2.089.069.058 5.146 5.147 5.146-5.147a.5.5 0 0 1 .765.638l-.058.069L8.705 8l5.147 5.146a.5.5 0 0 1-.638.765l-.069-.058-5.146-5.147-5.146 5.147a.5.5 0 0 1-.765-.638l.058-.069L7.293 8 2.146 2.854a.5.5 0 0 1 .638-.765"}))},HPt=x.forwardRef(zPt),UPt=j_({as:HPt,ariaLabel:"close",category:"application",displayName:"Close"});function VPt(){return"_"+Math.random().toString(36).substr(2,12)}var qL,sue;
211function IRe(){if(sue)return qL;sue=1;var e=i_e(),t=e&&new e;return qL=t,qL}var jL,lue;function kRe(){if(lue)return jL;lue=1;var e=C_(),t=IRe(),r=t?function(n,i){return t.set(n,i),n}:e;return jL=r,jL}var $L,cue;function b4(){if(cue)return $L;cue=1;var e=Nx(),t=qs();function r(n){return function(){var i=arguments;switch(i.length){case 0:return new n;case 1:return new n(i[0]);case 2:return new n(i[0],i[1]);case 3:return new n(i[0],i[1],i[2]);case 4:return new n(i[0],i[1],i[2],i[3]);case 5:return new n(i[0],i[1],i[2],i[3],i[4]);case 6:return new n(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new n(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var a=e(n.prototype),o=n.apply(a,i);return t(o)?o:a}}return $L=r,$L}var WL,uue;function qPt(){if(uue)return WL;uue=1;var e=b4(),t=Vs(),r=1;function n(i,a,o){var s=a&r,l=e(i);function c(){var d=this&&this!==t&&this instanceof c?l:i;return d.apply(s?o:this,arguments)}return c}return WL=n,WL}var GL,due;function NRe(){if(due)return GL;due=1;var e=Math.max;function t(r,n,i,a){for(var o=-1,s=r.length,l=i.length,c=-1,d=n.length,f=e(s-l,0),h=Array(d+f),p=!a;++c<d;)h[c]=n[c];for(;++o<l;)(p||o<s)&&(h[i[o]]=r[o]);for(;f--;)h[c++]=r[o++];return h}return GL=t,GL}var KL,fue;function DRe(){if(fue)return KL;fue=1;var e=Math.max;function t(r,n,i,a){for(var o=-1,s=r.length,l=-1,c=i.length,d=-1,f=n.length,h=e(s-c,0),p=Array(h+f),g=!a;++o<h;)p[o]=r[o];for(var _=o;++d<f;)p[_+d]=n[d];for(;++l<c;)(g||o<s)&&(p[_+i[l]]=r[o++]);return p}return KL=t,KL}var YL,hue;function jPt(){if(hue)return YL;hue=1;function e(t,r){for(var n=t.length,i=0;n--;)t[n]===r&&++i;return i}return YL=e,YL}var XL,pue;function XG(){if(pue)return XL;pue=1;function e(){}return XL=e,XL}var ZL,mue;function ZG(){if(mue)return ZL;mue=1;var e=Nx(),t=XG(),r=4294967295;function n(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=r,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,ZL=n,ZL}var QL,vue;function MRe(){if(vue)return QL;vue=1;function e(){}return QL=e,QL}var JL,gue;function LRe(){if(gue)return JL;gue=1;var e=IRe(),t=MRe(),r=e?function(n){return e.get(n)}:t;return JL=r,JL}var e7,yue;function $Pt(){if(yue)return e7;yue=1;var e={};return e7=e,e7}var t7,_ue;function WPt(){if(_ue)return t7;_ue=1;var e=$Pt(),t=Object.prototype,r=t.hasOwnProperty;function n(i){for(var a=i.name+"",o=e[a],s=r.call(e,a)?o.length:0;s--;){var l=o[s],c=l.func;if(c==null||c==i)return l.name}return a}return t7=n,t7}var r7,bue;function FRe(){if(bue)return r7;bue=1;var e=Nx(),t=XG();function r(n,i){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}return r.prototype=e(t.prototype),r.prototype.constructor=r,r7=r,r7}var n7,Eue;function GPt(){if(Eue)return n7;Eue=1;var e=ZG(),t=FRe(),r=D3();function n(i){if(i instanceof e)return i.clone();
211var a=new t(i.__wrapped__,i.__chain__);return a.__actions__=r(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}return n7=n,n7}var i7,wue;function KPt(){if(wue)return i7;wue=1;var e=ZG(),t=FRe(),r=XG(),n=co(),i=jc(),a=GPt(),o=Object.prototype,s=o.hasOwnProperty;function l(c){if(i(c)&&!n(c)&&!(c instanceof e)){if(c instanceof t)return c;if(s.call(c,"__wrapped__"))return a(c)}return new t(c)}return l.prototype=r.prototype,l.prototype.constructor=l,i7=l,i7}var a7,Sue;function YPt(){if(Sue)return a7;Sue=1;var e=ZG(),t=LRe(),r=WPt(),n=KPt();function i(a){var o=r(a),s=n[o];if(typeof s!="function"||!(o in e.prototype))return!1;if(a===s)return!0;var l=t(s);return!!l&&a===l[0]}return a7=i,a7}var o7,Cue;function BRe(){if(Cue)return o7;Cue=1;var e=kRe(),t=uEe(),r=t(e);return o7=r,o7}var s7,xue;function XPt(){if(xue)return s7;xue=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;function r(n){var i=n.match(e);return i?i[1].split(t):[]}return s7=r,s7}var l7,Tue;function ZPt(){if(Tue)return l7;Tue=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function t(r,n){var i=n.length;if(!i)return r;var a=i-1;return n[a]=(i>1?"& ":"")+n[a],n=n.join(i>2?", ":" "),r.replace(e,`{
212/* [wrapped with `+n+`] */
213`)}return l7=t,l7}var c7,Aue;function E4(){if(Aue)return c7;Aue=1;var e=qG();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return c7=t,c7}var u7,Pue;function QPt(){if(Pue)return u7;Pue=1;var e=k3(),t=E4(),r=1,n=2,i=8,a=16,o=32,s=64,l=128,c=256,d=512,f=[["ary",l],["bind",r],["bindKey",n],["curry",i],["curryRight",a],["flip",d],["partial",o],["partialRight",s],["rearg",c]];function h(p,g){return e(f,function(_){var b="_."+_[0];g&_[1]&&!t(p,b)&&p.push(b)}),p.sort()}return u7=h,u7}var d7,Rue;function zRe(){if(Rue)return d7;Rue=1;var e=XPt(),t=ZPt(),r=t$(),n=QPt();function i(a,o,s){var l=o+"";return r(a,t(l,n(e(l),s)))}return d7=i,d7}var f7,Oue;function HRe(){if(Oue)return f7;Oue=1;var e=YPt(),t=BRe(),r=zRe(),n=4,i=8,a=32,o=64;function s(l,c,d,f,h,p,g,_,b,E){var S=c&i,P=S?g:void 0,O=S?void 0:g,I=S?p:void 0,N=S?void 0:p;c|=S?a:o,c&=~(S?o:a),c&n||(c&=-4);var M=[l,c,h,I,P,N,O,_,b,E],F=d.apply(void 0,M);return e(l)&&t(F,M),F.placeholder=f,r(F,l,c)}return f7=s,f7}var h7,Iue;function QG(){if(Iue)return h7;Iue=1;function e(t){var r=t;return r.placeholder}return h7=e,h7}var p7,kue;function JPt(){if(kue)return p7;kue=1;var e=D3(),t=Rx(),r=Math.min;function n(i,a){for(var o=i.length,s=r(a.length,o),l=e(i);s--;){var c=a[s];i[s]=t(c,o)?l[c]:void 0}return i}return p7=n,p7}var m7,Nue;function w4(){if(Nue)return m7;Nue=1;var e="__lodash_placeholder__";function t(r,n){for(var i=-1,a=r.length,o=0,s=[];++i<a;){var l=r[i];(l===n||l===e)&&(r[i]=e,s[o++]=i)}return s}return m7=t,m7}var v7,Due;function URe(){if(Due)return v7;Due=1;var e=NRe(),t=DRe(),r=jPt(),n=b4(),i=HRe(),a=QG(),o=JPt(),s=w4(),l=Vs(),c=1,d=2,f=8,h=16,p=128,g=512;function _(b,E,S,P,O,I,N,M,F,B){var V=E&p,W=E&c,$=E&d,X=E&(f|h),re=E&g,ae=$?void 0:n(b);function Q(){for(var ie=arguments.length,le=Array(ie),fe=ie;fe--;)le[fe]=arguments[fe];if(X)var de=a(Q),ge=r(le,de);if(P&&(le=e(le,P,O,X)),I&&(le=t(le,I,N,X)),ie-=ge,X&&ie<B){var Ae=s(le,de);return i(b,E,_,Q.placeholder,S,le,Ae,M,F,B-ie)}var Fe=W?S:this,Pe=$?Fe[b]:b;return ie=le.length,M?le=o(le,M):re&&ie>1&&le.reverse(),V&&F<ie&&(le.length=F),this&&this!==l&&this instanceof Q&&(Pe=ae||n(Pe)),Pe.apply(Fe,le)}return Q}return v7=_,v7}var g7,Mue;function eRt(){if(Mue)return g7;Mue=1;var e=r5(),t=b4(),r=URe(),n=HRe(),i=QG(),a=w4(),o=Vs();function s(l,c,d){var f=t(l);function h(){for(var p=arguments.length,g=Array(p),_=p,b=i(h);_--;)g[_]=arguments[_];var E=p<3&&g[0]!==b&&g[p-1]!==b?[]:a(g,b);if(p-=E.length,p<d)return n(l,c,r,h.placeholder,void 0,g,E,void 0,void 0,d-p);var S=this&&this!==o&&this instanceof h?f:l;return e(S,this,g)}return h}return g7=s,g7}var y7,Lue;function tRt(){if(Lue)return y7;Lue=1;var e=r5(),t=b4(),r=Vs(),n=1;function i(a,o,s,l){var c=o&n,d=t(a);function f(){for(var h=-1,p=arguments.length,g=-1,_=l.length,b=Array(_+p),E=this&&this!==r&&this instanceof f?d:a;++g<_;)b[g]=l[g];for(;p--;)b[g++]=arguments[++h];return e(E,c?s:this,b)}return f}return y7=i,y7}var _7,Fue;function rRt(){if(Fue)return _7;Fue=1;var e=NRe(),t=DRe(),r=w4(),n="__lodash_placeholder__",i=1,a=2,o=4,s=8,l=128,c=256,d=Math.min;function f(h,p){var g=h[1],_=p[1],b=g|_,E=b<(i|a|l),S=_==l&&g==s||_==l&&g==c&&h[7].length<=p[8]||_==(l|c)&&p[7].length<=p[8]&&g==s;if(!(E||S))return h;_&i&&(h[2]=p[2],b|=g&i?0:o);var P=p[3];if(P){var O=h[3];h[3]=O?e(O,P,p[4]):P,h[4]=O?r(h[3],n):p[4]}return P=p[5],P&&(O=h[5],h[5]=O?t(O,P,p[6]):P,h[6]=O?r(h[5],n):p[6]),P=p[7],P&&(h[7]=P),_&l&&(h[8]=h[8]==null?p[8]:d(h[8],p[8])),h[9]==null&&(h[9]=p[9]),h[0]=p[0],h[1]=b,h}return _7=f,_7}var b7,Bue;function VRe(){if(Bue)return b7;Bue=1;var e=kRe(),t=qPt(),r=eRt(),n=URe(),i=tRt(),a=LRe(),o=rRt(),s=BRe(),l=zRe(),c=o$(),d="Expected a function",f=1,h=2,p=8,g=16,_=32,b=64,E=Math.max;function S(P,O,I,N,M,F,B,V){var W=O&h;if(!W&&typeof P!="function")throw new TypeError(d);var $=N?N.length:0;if($||(O&=-97,N=M=void 0),B=B===void 0?B:E(c(B),0),V=V===void 0?V:c(V),$-=M?M.length:0,O&b){var X=N,re=M;N=M=void 0}var ae=W?void 0:a(P),Q=[P,O,I,N,M,X,re,F,B,V];if(ae&&o(Q,ae),P=Q[0],O=Q[1],I=Q[2],N=Q[3],M=Q[4],V=Q[9]=Q[9]===void 0?W?0:P.length:E(Q[9]-$,0),!V&&O&(p|g)&&(O&=-25),!O||O==f)var ie=t(P,O,I);else O==p||O==g?ie=r(P,O,V):(O==_||O==(f|_))&&!M.length?ie=i(P,O,I,N):ie=n.apply(void 0,Q);var le=ae?e:s;return l(le(ie,Q),P,O)}return b7=S,b7}var E7,zue;function nRt(){if(zue)return E7;zue=1;var e=VRe(),t=8;function r(n,i,a){i=a?void 0:i;var o=e(n,t,void 0,void 0,void 0,void 0,void 0,i);return o.placeholder=r.placeholder,o}return r.placeholder={},E7=r,E7}var iRt=nRt();const aRt=et(iRt);var oRt="rs-",sRt=function(){return oRt};function Zy(e,t){return!e||!t?"":Array.isArray(t)?Id(t.filter(function(r){return!!r}).map(function(r){return e+"-"+r})):e[e.length-1]==="-"?""+e+t:e+"-"+t}aRt(Zy);function Os(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(function(n){return n!==null&&typeof n<"u"}
213).reduce(function(n,i){if(typeof i!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return n===void 0?i:function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(this,s),i.apply(this,s)}},void 0)}function Sf(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}var w7,Hue;function lRt(){if(Hue)return w7;Hue=1;var e=Z1e(),t=kx(),r=Px(),n=co(),i=_m(),a=f_(),o=N3(),s=Ox(),l="[object Map]",c="[object Set]",d=Object.prototype,f=d.hasOwnProperty;function h(p){if(p==null)return!0;if(i(p)&&(n(p)||typeof p=="string"||typeof p.splice=="function"||a(p)||s(p)||r(p)))return!p.length;var g=t(p);if(g==l||g==c)return!p.size;if(o(p))return!e(p).length;for(var _ in p)if(f.call(p,_))return!1;return!0}return w7=h,w7}var cRt=lRt();const JG=et(cRt);var S7,Uue;function uRt(){if(Uue)return S7;Uue=1;function e(t){return t==null}return S7=e,S7}var dRt=uRt();const li=et(dRt);var fRt=co();const S4=et(fRt);var C7,Vue;function hRt(){if(Vue)return C7;Vue=1;function e(t){return t===void 0}return C7=e,C7}var pRt=hRt();const Vg=et(pRt);var x7,que;function eK(){if(que)return x7;que=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return x7=e,x7}var T7,jue;function mRt(){if(jue)return T7;jue=1;var e=J3(),t=E4(),r=eK(),n=qd(),i=Jg(),a=e5(),o=Math.min;function s(l,c,d){for(var f=d?r:t,h=l[0].length,p=l.length,g=p,_=Array(p),b=1/0,E=[];g--;){var S=l[g];g&&c&&(S=n(S,i(c))),b=o(S.length,b),_[g]=!d&&(c||h>=120&&S.length>=120)?new e(g&&S):void 0}S=l[0];var P=-1,O=_[0];e:for(;++P<h&&E.length<b;){var I=S[P],N=c?c(I):I;if(I=d||I!==0?I:0,!(O?a(O,N):f(E,N,d))){for(g=p;--g;){var M=_[g];if(!(M?a(M,N):f(l[g],N,d)))continue e}O&&O.push(N),E.push(I)}}return E}return T7=s,T7}var A7,$ue;function vRt(){if($ue)return A7;$ue=1;var e=jx();function t(r){return e(r)?r:[]}return A7=t,A7}var P7,Wue;function gRt(){if(Wue)return P7;Wue=1;var e=qd(),t=mRt(),r=bm(),n=vRt(),i=r(function(a){var o=e(a,n);return o.length&&o[0]===a[0]?t(o):[]});return P7=i,P7}var yRt=gRt();const $C=et(yRt);var _Rt=Object.prototype.hasOwnProperty;function Gue(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Kf(e,t){if(Gue(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i<r.length;i+=1)if(!_Rt.call(t,r[i])||!Gue(e[r[i]],t[r[i]]))return!1;return!0}function qRe(e,t){return Object.defineProperty(e,"parent",{value:t,writable:!1,enumerable:!1,configurable:!0}),e}function bRt(e,t){if(li(t.refKey)||li(e[t.refKey]))return!1;var r=HOe(e,t);if(!r.length){var n;return(n=e[t.refKey].check)!==null&&n!==void 0?n:!1}return r.every(function(i){return!li(i.refKey)&&e[i.refKey].check})}function jRe(e,t,r){if(!li(t.refKey)&&li(e[t.refKey]))return!1;var n=HOe(e,t);return n.some(function(i){var a;return(i==null||(a=i[r])===null||a===void 0?void 0:a.length)>0?jRe(e,i,r):!li(i.refKey)&&e[i.refKey].check})}function ttr(e,t){return e.some(function(r){return Array.isArray(r[t])})}function rtr(e,t,r,n){var i=[],a=e.parent?e.parent.refKey:"";return Object.keys(t).forEach(function(o){var s,l=t[o];(li(e.parent)&&li(l.parent)||((s=l.parent)===null||s===void 0?void 0:s.refKey)===a)&&i.push(l)}),i.every(function(o){return $Re(o,{uncheckableItemValues:r,valueKey:n})})}function ntr(e,t,r){var n=[];return Object.keys(e).forEach(function(i){var a=e[i];a.parent||n.push(a)}),n.every(function(i){return $Re(i,{uncheckableItemValues:t,valueKey:r})})}function $Re(e,t){var r=t.uncheckableItemValues,n=r===void 0?[]:r,i=t.valueKey;return n.some(function(a){return e[i]===a})}function ERt(e,t,r){var n=r.childrenKey,i=r.cascade;return e.map(function(a){var o=ve({},a),s=t[a.refKey];if(s){var l,c=Vg(i)?void 0:WRe({node:s,cascade:i,nodes:t,childrenKey:n});o.check=s.check,o.expand=s.expand,o.uncheckable=s.uncheckable,qRe(o,s.parent),o.checkState=c,((l=a[n])===null||l===void 0?void 0:l.length)>0&&(o[n]=ERt(o[n],t,r))}return o})}function itr(e,t,r){var n=r.disabledItemValues,i=n===void 0?[]:n,a=r.valueKey;
213return!li(t.refKey)&&li(e[t.refKey])?!1:i.some(function(o){return t.refKey&&e[t.refKey][a]===o})}function atr(e,t){return Array.isArray(e)?e.filter(function(r){return!t.includes(r)}):[]}function otr(e,t){var r=[];return t.forEach(function(n){var i=VOe(n),a=e[i];li(a)||r.push(a)}),r}function WRe(e){var t=e.nodes,r=e.node,n=e.cascade,i=e.childrenKey;return li(t[r.refKey])?yp.UNCHECK:!r[i]||!r[i].length||!n?(t[r.refKey].checkAll=!1,r.check?yp.CHECK:yp.UNCHECK):bRt(t,r)?(t[r.refKey].checkAll=!0,t[r.refKey].check=!0,yp.CHECK):jRe(t,r,i)?(t[r.refKey].checkAll=!1,yp.INDETERMINATE):yp.UNCHECK}var GRe=function(t,r){if(!r)return!1;do if(r===t)return!0;while(r.parentNode&&(r=r.parentNode));return!1},wRt=function(t,r){return r?t.contains?t.contains(r):t.compareDocumentPosition?t===r||!!(t.compareDocumentPosition(r)&16):GRe(t,r):!1};const TI=(function(){return Ih?wRt:GRe})();function SRt(e,t){return e=typeof e=="function"?e():e,e||t}function j1(e){return e&&e.ownerDocument||document}function KRe(e,t){return t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\
213s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")),e}function $1(e,t,r,n){return n===void 0&&(n=!1),e.addEventListener(t,r,n),{off:function(){e.removeEventListener(t,r,n)}}}function CRt(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")!==-1}function YRe(e,t){return t&&(e.classList?e.classList.add(t):CRt(e,t)||(e.className=e.className+" "+t)),e}function XRe(e){return e.replace(/\-(\w)/g,function(t){return t.slice(1).toUpperCase()})}function xRt(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}var TRt=/^ms-/;const mV=(function(e){return xRt(e).replace(TRt,"-ms-")});function Kue(e,t){var r,n;(r=e.style)===null||r===void 0||(n=r.removeProperty)===null||n===void 0||n.call(r,t)}function ARt(e,t){typeof t=="string"?Kue(e,t):Array.isArray(t)&&t.forEach(function(r){return Kue(e,r)})}function ZRe(e,t,r){var n="",i=t;if(typeof t=="string"){if(r===void 0)throw new Error("value is undefined");(i={})[t]=r}if(typeof i=="object")for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(!i[a]&&i[a]!==0?ARt(e,mV(a)):n+=mV(a)+":"+i[a]+";");e.style.cssText+=";"+n}var Qv=[],PRt=function(){return Qv.some(function(e){return e.activeTargets.length>0})},RRt=function(){return Qv.some(function(e){return e.skippedTargets.length>0})},Yue="ResizeObserver loop completed with undelivered notifications.",ORt=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Yue}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Yue),window.dispatchEvent(e)},WC;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(WC||(WC={}));var Jv=function(e){return Object.freeze(e)},IRt=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Jv(this)}return e})(),QRe=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Jv(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,a=t.right,o=t.bottom,s=t.left,l=t.width,c=t.height;return{x:r,y:n,top:i,right:a,bottom:o,left:s,width:l,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),tK=function(e){return e instanceof SVGElement&&"getBBox"in e},JRe=function(e){if(tK(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},Xue=function(e){var t;if(e instanceof Element)return!0;var r=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},kRt=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},LS=typeof window<"u"?window:{},KA=new WeakMap,Zue=/auto|scroll/,NRt=/^tb|vertical/,DRt=/msie|trident/i.test(LS.navigator&&LS.navigator.userAgent),ad=function(e){return parseFloat(e||"0")},Qy=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new IRt((r?t:e)||0,(r?e:t)||0)},Que=Jv({devicePixelContentBoxSize:Qy(),borderBoxSize:Qy(),contentBoxSize:Qy(),contentRect:new QRe(0,0,0,0)}),eOe=function(e,t){if(t===void 0&&(t=!1),KA.has(e)&&!t)return KA.get(e);if(JRe(e))return KA.set(e,Que),Que;var r=getComputedStyle(e),n=tK(e)&&e.ownerSVGElement&&e.getBBox(),i=!DRt&&r.boxSizing==="border-box",a=NRt.test(r.writingMode||""),o=!n&&Zue.test(r.overflowY||""),s=!n&&Zue.test(r.overflowX||""),l=n?0:ad(r.paddingTop),c=n?0:ad(r.paddingRight),d=n?0:ad(r.paddingBottom),f=n?0:ad(r.paddingLeft),h=n?0:ad(r.borderTopWidth),p=n?0:ad(r.borderRightWidth),g=n?0:ad(r.borderBottomWidth),_=n?0:ad(r.borderLeftWidth),b=f+c,E=l+d,S=_+p,P=h+g,O=s?e.offsetHeight-P-e.clientHeight:0,I=o?e.offsetWidth-S-e.clientWidth:0,N=i?b+S:0,M=i?E+P:0,F=n?n.width:ad(r.width)-N-I,B=n?n.height:ad(r.height)-M-O,V=F+b+I+S,W=B+E+O+P,$=Jv({devicePixelContentBoxSize:Qy(Math.round(F*devicePixelRatio),Math.round(B*devicePixelRatio),a),borderBoxSize:Qy(V,W,a),contentBoxSize:Qy(F,B,a),contentRect:new QRe(f,l,F,B)});return KA.set(e,$),$},tOe=function(e,t,r){var n=eOe(e,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(t){case WC.DEVICE_PIXEL_CONTENT_BOX:return o;case WC.BORDER_BOX:return i;default:return a}},MRt=(function(){function e(t){var r=eOe(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Jv([r.borderBoxSize]),this.contentBoxSize=Jv([r.contentBoxSize]),this.devicePixelContentBoxSize=Jv([r.devicePixelContentBoxSize])}return e})(),rOe=function(e){if(JRe(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},LRt=function(){var e=1/0,t=[];
213Qv.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(c){var d=new MRt(c.target),f=rOe(c.target);s.push(d),c.lastReportedSize=tOe(c.target,c.observedBox),f<e&&(e=f)}),t.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},Jue=function(e){Qv.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(rOe(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},FRt=function(){var e=0;for(Jue(e);PRt();)e=LRt(),Jue(e);return RRt()&&ORt(),e>0},R7,nOe=[],BRt=function(){return nOe.splice(0).forEach(function(e){return e()})},zRt=function(e){if(!R7){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return BRt()}).observe(r,n),R7=function(){r.textContent="".concat(t?t--:t++)}}nOe.push(e),R7()},HRt=function(e){zRt(function(){requestAnimationFrame(e)})},lR=0,URt=function(){return!!lR},VRt=250,qRt={attributes:!0,characterData:!0,childList:!0,subtree:!0},ede=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],tde=function(e){return e===void 0&&(e=0),Date.now()+e},O7=!1,jRt=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=VRt),!O7){O7=!0;var n=tde(t);HRt(function(){var i=!1;try{i=FRt()}finally{if(O7=!1,t=n-tde(),!URt())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,qRt)};document.body?r():LS.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ede.forEach(function(r){return LS.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ede.forEach(function(r){return LS.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),vV=new jRt,rde=function(e){!lR&&e>0&&vV.start(),lR+=e,!lR&&vV.stop()},$Rt=function(e){return!tK(e)&&!kRt(e)&&getComputedStyle(e).display==="inline"},WRt=(function(){function e(t,r){this.target=t,this.observedBox=r||WC.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=tOe(this.target,this.observedBox,!0);return $Rt(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),GRt=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),YA=new WeakMap,nde=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},XA=(function(){function e(){}return e.connect=function(t,r){var n=new GRt(t,r);YA.set(t,n)},e.observe=function(t,r,n){var i=YA.get(t),a=i.observationTargets.length===0;nde(i.observationTargets,r)<0&&(a&&Qv.push(i),i.observationTargets.push(new WRt(r,n&&n.box)),rde(1),vV.schedule())},e.unobserve=function(t,r){var n=YA.get(t),i=nde(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&Qv.splice(Qv.indexOf(n),1),n.observationTargets.splice(i,1),rde(-1))},e.disconnect=function(t){var r=this,n=YA.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),iOe=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");XA.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Xue(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");XA.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Xue(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");XA.unobserve(this,t)},e.prototype.disconnect=function(){XA.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}
213)(),KRt=function(t){return t?.nodeType===1&&typeof t?.nodeName=="string"},I7,ide;function aOe(){if(ide)return I7;ide=1;var e=p_();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var s=r[a],l=n(s);if(l!=null&&(c===void 0?l===l&&!e(l):i(l,c)))var c=l,d=s}return d}return I7=t,I7}var k7,ade;function YRt(){if(ade)return k7;ade=1;function e(t,r){return t>r}return k7=e,k7}var N7,ode;function XRt(){if(ode)return N7;ode=1;var e=aOe(),t=YRt(),r=ms();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return N7=n,N7}var ZRt=XRt();const D7=et(ZRt);var M7,sde;function QRt(){if(sde)return M7;sde=1;function e(t,r){return t<r}return M7=e,M7}var L7,lde;function JRt(){if(lde)return L7;lde=1;var e=aOe(),t=ms(),r=QRt();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return L7=n,L7}var eOt=JRt();const cde=et(eOt);var F7,ude;function oOe(){if(ude)return F7;ude=1;function e(t,r,n,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(n=t[++a]);++a<o;)n=r(n,t[a],a,t);return n}return F7=e,F7}var B7,dde;function tOt(){if(dde)return B7;dde=1;function e(t){return function(r){return t?.[r]}}return B7=e,B7}var z7,fde;function rOt(){if(fde)return z7;fde=1;var e=tOt(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r=e(t);return z7=r,z7}var H7,hde;function sOe(){if(hde)return H7;hde=1;
213var e=rOt(),t=e0(),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=n+i+a,s="["+o+"]",l=RegExp(s,"g");function c(d){return d=t(d),d&&d.replace(r,e).replace(l,"")}return H7=c,H7}var U7,pde;function nOt(){if(pde)return U7;pde=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(r){return r.match(e)||[]}return U7=t,U7}var V7,mde;function iOt(){if(mde)return V7;mde=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(r){return e.test(r)}return V7=t,V7}var q7,vde;function aOt(){if(vde)return q7;vde=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",s="\\xac\\xb1\\xd7\\xf7",l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",c="\\u2000-\\u206f",d=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",p=s+l+c+d,g="['’]",_="["+p+"]",b="["+i+"]",E="\\d+",S="["+a+"]",P="["+o+"]",O="[^"+e+p+E+a+o+f+"]",I="\\ud83c[\\udffb-\\udfff]",N="(?:"+b+"|"+I+")",M="[^"+e+"]",F="(?:\\ud83c[\\udde6-\\uddff]){2}",B="[\\ud800-\\udbff][\\udc00-\\udfff]",V="["+f+"]",W="\\u200d",$="(?:"+P+"|"+O+")",X="(?:"+V+"|"+O+")",re="(?:"+g+"(?:d|ll|m|re|s|t|ve))?",ae="(?:"+g+"(?:D|LL|M|RE|S|T|VE))?",Q=N+"?",ie="["+h+"]?",le="(?:"+W+"(?:"+[M,F,B].join("|")+")"+ie+Q+")*",fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",de="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ge=ie+Q+le,Ae="(?:"+[S,F,B].join("|")+")"+ge,Fe=RegExp([V+"?"+P+"+"+re+"(?="+[_,V,"$"].join("|")+")",X+"+"+ae+"(?="+[_,V+$,"$"].join("|")+")",V+"?"+$+"+"+re,V+"+"+ae,de,fe,E,Ae].join("|"),"g");function Pe(ce){return ce.match(Fe)||[]}return q7=Pe,q7}var j7,gde;function oOt(){if(gde)return j7;gde=1;var e=nOt(),t=iOt(),r=e0(),n=aOt();function i(a,o,s){return a=r(a),o=s?void 0:o,o===void 0?t(a)?n(a):e(a):a.match(o)||[]}return j7=i,j7}var $7,yde;function lOe(){if(yde)return $7;yde=1;var e=oOe(),t=sOe(),r=oOt(),n="['’]",i=RegExp(n,"g");function a(o){return function(s){return e(r(t(s).replace(i,"")),o,"")}}return $7=a,$7}var W7,_de;function sOt(){if(_de)return W7;_de=1;var e=lOe(),t=e(function(r,n,i){return r+(i?"-":"")+n.toLowerCase()});return W7=t,W7}var lOt=sOt();const rK=et(lOt);function b2(e){return e===e?.window?e:e?.nodeType===9?e?.defaultView||e?.parentWindow:null}function Yf(e){var t=j1(e),r=b2(t),n=t&&t.documentElement,i={top:0,left:0,height:0,width:0};return t?(TI(n,e)&&(e?.getBoundingClientRect!==void 0&&(i=e.getBoundingClientRect()),(i.width||i.height)&&n&&r&&(i={top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0),width:(i.width===null?e.offsetWidth:i.width)||0,height:(i.height===null?e.offsetHeight:i.height)||0})),i):null}function Xf(e,t){var r=b2(e),n=e.scrollTop,i=0;return r&&(n=r.pageYOffset,i=r.pageXOffset),t!==void 0&&(r?r.scrollTo(i,t):e.scrollTop=t),n}function FS(e,t){var r=b2(e),n=e.scrollLeft;return r&&(n=r.pageXOffset,r.pageYOffset),n}function nK(e){var t;return e?.nodeName&&(e==null||(t=e.nodeName)===null||t===void 0?void 0:t.toLowerCase())}var cOt=/^-ms-/;function uOt(e){return XRe(e.replace(cOt,"ms-"))}const bde=(function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):null});function Ed(e,t){if(t){var r=e.style[uOt(t)];if(r)return r;var n=bde(e);if(n)return n.getPropertyValue(mV(t))}return e.style||bde(e)}function dOt(e){for(var t=j1(e),r=e?.offsetParent;r&&nK(e)!=="html"&&Ed(r,"position")==="static";)r=r.offsetParent;return r||t.documentElement}function cOe(e,t,r){r===void 0&&(r=!0);var n={top:0,left:0},i=null;if(Ed(e,"position")==="fixed")i=e.getBoundingClientRect();else{if(t=t||dOt(e),i=Yf(e),nK(t)!=="html"){var a=Yf(t);a&&(n.top=a.top,n.left=a.left)}
213n.top+=parseInt(Ed(t,"borderTopWidth"),10)-Xf(t)||0,n.left+=parseInt(Ed(t,"borderLeftWidth"),10)-FS(t)||0}if(i){var o=r&&parseInt(Ed(e,"marginTop"),10)||0,s=r&&parseInt(Ed(e,"marginLeft"),10)||0;return ve({},i,{top:i.top-n.top-o,left:i.left-n.left-s})}return null}var fOt={left:"Start",right:"End",top:"Start",bottom:"End"};function Q0(e){var t,r,n,i;if(e.tagName==="BODY")t=window.innerWidth,r=window.innerHeight,i=Xf(j1(e).documentElement)||Xf(e),n=FS(j1(e).documentElement)||FS(e);else{var a=Yf(e);t=a.width,r=a.height,i=Xf(e),n=FS(e)}return{width:t,height:r,scrollX:n,scrollY:i}}const hOt=(function(e){var t=e.placement,r=e.preventOverflow,n=e.padding;function i(l,c,d){if(!r)return 0;var f=Q0(d),h=f.height,p=f.scrollY,g=l-n-p,_=l+n+c-p;return g<0?-g:_>h?h-_:0}function a(l,c,d){if(!r)return 0;var f=Q0(d),h=f.scrollX,p=f.width,g=l-n-h,_=l+n+c-h;return g<0?-g:_>p?p-_:0}function o(l,c,d){if(!r)return d;var f=Q0(l),h=f.scrollY,p=f.height;return c+d>p+h?p-c+h:Math.max(h,d)}function s(l,c,d){if(!r)return d;var f=Q0(l),h=f.scrollX,p=f.width;return c+d>p+h?p-c+h:Math.max(h,d)}return{getPosition:function(c,d){var f=d.tagName==="BODY"?Yf(c):cOe(c,d,!1);return f},getCursorOffsetPosition:function(c,d,f){var h=f.left,p=f.top,g=f.clientLeft,_=f.clientTop,b={left:h,top:p,width:10,height:10};if(Ed(c,"position")==="fixed")return b.left=g,b.top=_,b;if(d.tagName==="BODY")return b;var E={top:0,left:0};if(nK(d)!=="html"){var S=Yf(d);S&&(E.top=S.top,E.left=S.left)}return E.top+=parseInt(Ed(d,"borderTopWidth"),10)-Xf(d)||0,E.left+=parseInt(Ed(d,"borderLeftWidth"),10)-FS(d)||0,b.left=h-E.left,b.top=p-E.top,b},calcAutoPlacement:function(c,d,f){var h=Q0(d),p=h.width,g=h.height,_=h.scrollX,b=h.scrollY,E=c.left-_-f.width,S=c.top-b-f.height,P=p-c.left-c.width+_-f.width,O=g-c.top-c.height+b-f.height,I=[{key:"left",value:E},{key:"right",value:P}],N=[{key:"top",value:S},{key:"bottom",value:O}],M="autoVertical",F="autoHorizontal",B,V;
213return t.indexOf(M)!==-1?(B=D7(N,function(W){return W.value}),t===M?B.key:""+B.key+t.replace(M,"")):t.indexOf(F)!==-1?(B=D7(I,function(W){return W.value}),t===F?B.key:""+B.key+t.replace(F,"")):(B=D7([].concat(N,I),function(W){return W.value}),B.key==="left"||B.key==="right"?V=cde(N,function(W){return W.value}):V=cde(I,function(W){return W.value}),""+B.key+fOt[V.key])},calcOverlayPosition:function(c,d,f,h){var p=h?this.getCursorOffsetPosition(d,f,h):this.getPosition(d,f),g=Yf(c),_=g.height,b=g.width,E=p.top,S=p.left,P=t;t&&t.indexOf("auto")>=0&&(P=this.calcAutoPlacement(p,f,{height:_,width:b}));var O,I,N,M;if(P==="left"||P==="right"){I=p.top+(p.height-_)/2;var F=i(I,_,f);I+=F,M=50*(1-2*F/_)+"%",N=void 0}else if(P==="top"||P==="bottom"){O=S+(p.width-b)/2;var B=a(O,b,f);O+=B,N=50*(1-2*B/b)+"%",M=void 0}if((P==="top"||P==="topStart"||P==="topEnd")&&(I=o(f,_,p.top-_)),(P==="bottom"||P==="bottomStart"||P==="bottomEnd")&&(I=o(f,_,p.top+p.height)),(P==="left"||P==="leftStart"||P==="leftEnd")&&(O=s(f,b,p.left-b)),(P==="right"||P==="rightStart"||P==="rightEnd")&&(O=s(f,b,p.left+p.width)),document.dir==="rtl"&&(P==="left"||P==="leftStart"||P==="leftEnd"||P==="right"||P==="rightStart"||P==="rightEnd")){var V=Q0(f),W=V.width;f.scrollWidth>W&&(O=W+O-f.scrollWidth)}if(P==="topStart"||P==="bottomStart")if(document.dir==="rtl"){var $=S+(p.width-b);O=$+a($,b,f)}else O=S+a(S,b,f);if(P==="topEnd"||P==="bottomEnd")if(document.dir==="rtl")O=S+a(S,b,f);else{var X=S+(p.width-b);O=X+a(X,b,f)}if((P==="leftStart"||P==="rightStart")&&(I=E+i(E,_,f)),P==="leftEnd"||P==="rightEnd"){var re=E+(p.height-_);I=re+i(re,_,f)}return{positionLeft:O,positionTop:I,arrowOffsetLeft:N,arrowOffsetTop:M,positionClassName:"placement-"+rK(P)}}}});var pOt=function(t,r){var n=t.placement,i=n===void 0?"right":n,a=t.preventOverflow,o=a===void 0?!1:a,s=t.containerPadding,l=s===void 0?0:s,c=t.container,d=t.triggerTarget,f=t.followCursor,h=t.cursorPosition,p=x.useRef(null),g=x.useRef(null),_=x.useRef(),b={positionLeft:0,positionTop:0,arrowOffsetLeft:void 0,arrowOffsetTop:void 0},E=x.useState(b),S=E[0],P=E[1],O=x.useMemo(function(){return hOt({placement:i,preventOverflow:o,padding:l})},[i,o,l]),I=x.useCallback(function(N,M){if(N===void 0&&(N=!0),!!(d!=null&&d.current)){var F=Qf(d);if(!KRt(F))throw new Error("`target` should return an HTMLElement");if(!(F===g.current&&!N)){var B=Qf(r.current),V=SRt(typeof c=="function"?c():c??null,j1(r.current).body),W=O.calcOverlayPosition(B,F,V,f?h:void 0);if(M&&B){var $,X,re=B==null||($=B.className)===null||$===void 0||(X=$.match(/(placement-\S+)/))===null||X===void 0?void 0:X[0];KRe(B,re),W.positionClassName&&YRe(B,W.positionClassName),ZRe(B,{left:W.positionLeft+"px",top:W.positionTop+"px"})}else P(W);p.current=V,g.current=F}}},[c,r,d,O,f,h]);return x.useEffect(function(){I(!1);var N=Qf(r.current),M;if(p.current&&o){var F;M=$1(((F=p.current)===null||F===void 0?void 0:F.tagName)==="BODY"?window:p.current,"scroll",function(){return I(!0,!0)})}var B=$1(window,"resize",function(){return I(!0,!0)});return N&&(_.current=new iOe(function(){return I(!0,!0)}),_.current.observe(N)),function(){var V,W;g.current=null,(V=M)===null||V===void 0||V.off(),B?.off(),(W=_.current)===null||W===void 0||W.disconnect()}},[o,r,I]),GOe(function(){return I()},[I,i]),[S,I]},iK=u.forwardRef(function(e,t){var r=e.children,n=e.className,i=e.followCursor,a=e.cursorPosition,o=u.useRef(null),s=pOt(e,o),l=s[0],c=s[1],d=l.positionClassName,f=l.arrowOffsetLeft,h=l.arrowOffsetTop,p=l.positionLeft,g=l.positionTop;if(x.useImperativeHandle(t,function(){return{get child(){return o.current},updatePosition:c}}),x.useEffect(function(){!i||!a||c()},[i,a,c]),typeof r=="function"){var _={className:Id(n,d),arrowOffsetLeft:f,arrowOffsetTop:h,left:p,top:g};return r(_,o)}return r});iK.displayName="Position";iK.propTypes={className:xe.string,children:xe.func.isRequired,container:xe.oneOfType([xe.func,xe.any]),containerPadding:xe.number,placement:xe.any,preventOverflow:xe.bool,triggerTarget:xe.any};function mOt(){if(!Ih)return{};for(var e={O:function(c){return"o"+c.toLowerCase()},Moz:function(c){return c.toLowerCase()},Webkit:function(c){return"webkit"+c},ms:function(c){return"MS"+c}},t=Object.keys(e),r=document.createElement("div").style,n,i="",a=0;a<t.length;a+=1){var o=t[a];if(o+"TransitionProperty"in r){i="-"+o.toLowerCase(),n=e[o]("TransitionEnd");break}}!n&&"transitionProperty"in r&&(n="transitionend"),r=null;var s=function(c){return i+"-"+c};return{end:n,backfaceVisibility:s("backface-visibility"),transform:s("transform"),property:s("transition-property"),timing:s("transition-timing-function"),delay:s("transition-delay"),duration:s("transition-duration")}}function vOt(){return mOt().end}var gOt=Ax();const cR=et(gOt);function yOt(){var e=document.createElement("div").style;return"webkitAnimation"in e?"webkitAnimationEnd":"animationend"}var uOe={onEnter:xe.func,onEntering:xe.func,onEntered:xe.func,onExit:xe.func,onExiting:xe.func,onExited:xe.func},ja;(function(e){e[e.UNMOUNTED=0]="UNMOUNTED",e[e.EXITED=1]="EXITED",e[e.ENTERING=2]="ENTERING",e[e.ENTERED=3]="ENTE
213RED",e[e.EXITING=4]="EXITING"})(ja||(ja={}));var dOe=ve({},uOe,{animation:xe.bool,children:xe.oneOfType([xe.node,xe.func]),className:xe.string,in:xe.bool,unmountOnExit:xe.bool,transitionAppear:xe.bool,timeout:xe.number,exitedClassName:xe.string,exitingClassName:xe.string,enteredClassName:xe.string,enteringClassName:xe.string}),$_=(function(e){Qo(t,e);function t(n){var i;i=e.call(this,n)||this,i.animationEventListener=null,i.instanceElement=null,i.nextCallback=null,i.needsUpdate=null,i.childRef=void 0;var a;return n.in?a=n.transitionAppear?ja.EXITED:ja.ENTERED:a=n.unmountOnExit?ja.UNMOUNTED:ja.EXITED,i.state={status:a},i.nextCallback=null,i.childRef=u.createRef(),i}t.getDerivedStateFromProps=function(i,a){return i.in&&i.unmountOnExit&&a.status===ja.UNMOUNTED?{status:ja.EXITED}:null};var r=t.prototype;return r.getSnapshotBeforeUpdate=function(){return(!this.props.in||!this.props.unmountOnExit)&&(this.needsUpdate=!0),null},r.componentDidMount=function(){this.props.transitionAppear&&this.props.in&&this.performEnter(this.props)},r.componentDidUpdate=function(){var i=this.state.status,a=this.props.unmountOnExit;if(a&&i===ja.EXITED){this.props.in?this.performEnter(this.props):this.instanceElement&&this.setState({status:ja.UNMOUNTED});return}this.needsUpdate&&(this.needsUpdate=!1,this.props.in?(i===ja.EXITING||i===ja.EXITED)&&this.performEnter(this.props):(i===ja.ENTERING||i===ja.ENTERED)&&this.performExit(this.props))},r.componentWillUnmount=function(){this.cancelNextCallback(),this.instanceElement=null},r.onTransitionEnd=function(i,a){var o;if(this.setNextCallback(a),(o=this.animationEventListener)===null||o===void 0||o.off(),!!this.nextCallback)if(i){var s=this.props,l=s.timeout,c=s.animation;this.animationEventListener=$1(i,c?yOt():vOt(),this.nextCallback),l!==null&&setTimeout(this.nextCallback,l)}else setTimeout(this.nextCallback,0)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){if(o){if(s){a.instanceElement===s.target&&(i(s),o=!1,a.nextCallback=null);return}i(s),o=!1,a.nextCallback=null}},this.nextCallback&&(this.nextCallback.cancel=function(){o=!1}),this.nextCallback},r.getChildElement=function(){return this.childRef.current?Qf(this.childRef.current):Qf(this)},r.performEnter=function(i){var a=this,o=i||this.props,s=o.onEnter,l=o.onEntering,c=o.onEntered;this.cancelNextCallback();var d=this.getChildElement();this.instanceElement=d,s?.(d),this.safeSetState({status:ja.ENTERING},function(){l?.(d),a.onTransitionEnd(d,function(){a.safeSetState({status:ja.ENTERED},function(){c?.(d)})})})},r.performExit=function(i){var a=this,o=i||this.props,s=o.onExit,l=o.onExiting,c=o.onExited;this.cancelNextCallback();var d=this.getChildElement();this.instanceElement=d,s?.(d),this.safeSetState({status:ja.EXITING},function(){l?.(d),a.onTransitionEnd(d,function(){a.safeSetState({status:ja.EXITED},function(){c?.(d)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){if(this.instanceElement){var o=this.setNextCallback(a);this.setState(i,function(){return o?.()})}},r.render=function(){var i,a=this.state.status;if(a===ja.UNMOUNTED)return null;var o=this.props,s=o.children,l=o.className,c=o.exitedClassName,d=o.enteringClassName,f=o.enteredClassName,h=o.exitingClassName,p=Yr(o,["children","className","exitedClassName","enteringClassName","enteredClassName","exitingClassName"]),g=Em(p,Object.keys(dOe)),_;if(a===ja.EXITED?_=c:a===ja.ENTERING?_=d:a===ja.ENTERED?_=f:a===ja.EXITING&&(_=h),cR(s))return g.className=Id(l,_),s(g,this.childRef);var b=u.Children.only(s);return u.cloneElement(b,ve({},g,{ref:this.childRef,className:Id(l,(i=b.props)===null||i===void 0?void 0:i.className,_)}))},t})(u.Component);$_.propTypes=dOe;$_.displayName="Transition";$_.defaultProps={timeout:1e3};var fOe=u.forwardRef(function(e,t){var r=e.timeout,n=r===void 0?300:r,i=e.className,a=Yr(e,["timeout","className"]),o=Ya("anim"),s=o.prefix,l=o.merge;return u.createElement($_,ve({},a,{ref:t,timeout:n,className:l(i,s("fade")),enteredClassName:s("in"),enteringClassName:s("in")}))});fOe.displayName="Fade";var aK=u.createContext({});aK.displayName="OverlayContext";var _Ot={container:xe.any,children:xe.any,childrenProps:xe.object,className:xe.string,containerPadding:xe.number,placement:xe.any,preventOverflow:xe.bool,open:xe.bool,rootClose:xe.bool,transition:xe.any,triggerTarget:xe.any,onClose:xe.func,onEnter:xe.func,onEntering:xe.func,onEntered:xe.func,onExit:xe.func,onExiting:xe.func,onExited:xe.func},oK=u.forwardRef(function(e,t){var r=x.useContext(aK),n=r.overlayContainer,i=e.container,a=i===void 0?n:i,o=e.containerPadding,s=e.placement,l=e.rootClose,c=e.children,d=e.childrenProps,f=e.transition,h=f===void 0?fOe:f,p=e.open,g=e.preventOverflow,_=e.triggerTarget,b=e.onClose,E=e.onExited,S=e.onExit,P=e.onExiting,O=e.onEnter,I=e.onEntering,N=e.onEntered,M=e.followCursor,F=e.curs
213orPosition,B=x.useState(!p),V=B[0],W=B[1],$=x.useRef(null);p?V&&W(!1):!h&&!V&&W(!0);var X=p||h&&!V,re=x.useCallback(function(ie){W(!0),E?.(ie)},[E]);if(c3t(b,{triggerTarget:_,overlayTarget:$,disabled:!l||!X}),!X)return null;var ae={container:a,containerPadding:o,triggerTarget:_,placement:s,preventOverflow:g,followCursor:M,cursorPosition:F},Q=function(le,fe){return u.createElement(iK,ve({},ae,le,{ref:kd(t,fe)}),function(de,ge){if(typeof c=="function")return c(Object.assign(de,d),kd(ge,$));var Ae=de.left,Fe=de.top,Pe=de.className;return u.cloneElement(c,ve({},d,c.props,{className:Id(Pe,c.props.className),style:ve({left:Ae,top:Fe},c.props.style),ref:kd(ge,$)}))})};return h?u.createElement(h,{in:p,transitionAppear:!0,onExit:S,onExiting:P,onExited:re,onEnter:O,onEntering:I,onEntered:N},Q):Q()});oK.displayName="Overlay";oK.propTypes=_Ot;function bOt(e,t){e===void 0&&(e={}),t===void 0&&(t={});var r={};return Object.keys(e).forEach(function(n){if(e[n]){var i;r[n]=Os(e[n],(i=t)===null||i===void 0?void 0:i[n])}}),r}var AI;(function(e){e[e.ClickOutside=0]="ClickOutside",e[e.ImperativeHandle=1]="ImperativeHandle"})(AI||(AI={}));function Ede(e,t,r){var n=t.currentTarget,i=t.relatedTarget||Tp(t,["nativeEvent","toElement"]);(!i||i!==n)&&!TI(n,i)&&e(t,r)}var EOt=["hover","focus"],hOe=u.forwardRef(function(e,t){var r=x.useContext(aK),n=r.overlayContainer,i=e.children,a=e.container,o=a===void 0?n:a,s=e.controlId,l=e.defaultOpen,c=e.trigger,d=c===void 0?EOt:c,f=e.disabled,h=e.followCursor,p=e.readOnly,g=e.plaintext,_=e.open,b=e.delay,E=e.delayOpen,S=e.delayClose,P=e.enterable,O=e.placement,I=O===void 0?"bottomStart":O,N=e.speaker,M=e.rootClose,F=M===void 0?!0:M,B=e.onClick,V=e.onMouseOver,W=e.onMouseMove,$=e.onMouseOut,X=e.onContextMenu,re=e.onFocus,ae=e.onBlur,Q=e.onClose,ie=e.onExited,le=Yr(e,["children","container","controlId","defaultOpen","trigger","disabled","followCursor","readOnly","plaintext","open","delay","delayOpen","delayClose","enterable","placement","speaker","rootClose","onClick","onMouseOver","onMouseMove","onMouseOut","onContextMenu","onFocus","onBlur","onClose","onExited"]),fe=$Oe({container:o}),de=fe.Portal,ge=x.useRef(),Ae=x.useRef(),Fe=WOe(_,l),Pe=Fe[0],ce=Fe[1],pe=x.useState(null),Ne=pe[0],De=pe[1],Ve=x.useRef(null),Ke=x.useRef(null),Qe=li(E)?b:E,Ue=li(S)?b:S,ut=x.useRef(!1),We=x.useRef(!1);x.useEffect(function(){return function(){li(Ve.current)||clearTimeout(Ve.current),li(Ke.current)||clearTimeout(Ke.current)}},[]);var ke=x.useCallback(function(dt){var bt=Vg(dt)?Qe:dt;if(bt&&typeof bt=="number")return Ve.current=setTimeout(function(){Ve.current=null,ce(!0)},bt);ce(!0)},[Qe,ce]),Le=x.useCallback(function(dt,bt){var nr=Vg(dt)?Ue:dt;if(nr&&typeof nr=="number")return Ke.current=setTimeout(function(){Ke.current=null,ce(!1),bt?.()},nr);ce(!1),bt?.()},[Ue,ce]),Be=x.useCallback(function(){De(null)},[]);x.useImperativeHandle(t,function(){return{get root(){return ge.current},get overlay(){var dt;return(dt=Ae.current)===null||dt===void 0?void 0:dt.child},open:ke,close:function(bt){return Le(bt,function(){return Q?.(AI.ImperativeHandle)})},updatePosition:function(){var bt,nr;(bt=Ae.current)===null||bt===void 0||(nr=bt.updatePosition)===null||nr===void 0||nr.call(bt)}}});var Ze=x.useCallback(function(){!ut.current&&!We.current&&Le()},[Le]),Et=x.useCallback(function(){Pe?Ze():ke()},[Pe,Ze,ke]),Yt=x.useCallback(function(){if(!P)return ke();if(We.current=!0,!li(Ke.current))return clearTimeout(Ke.current),Ke.current=null,ke();Pe||ke()},[P,Pe,ke]),sr=x.useCallback(function(){if(P||Le(),We.current=!1,!li(Ve.current)){clearTimeout(Ve.current),Ve.current=null;return}!Pe||!li(Ke.current)||(Ke.current=setTimeout(function(){li(Ke.current)||(clearTimeout(Ke.current),Ke.current=null),Ze()},200))},[P,Pe,Le,Ze]),Kt=x.useCallback(function(){ut.current=!0},[]),Qt=x.useCallback(function(){ut.current=!1,!Sf("click",d)&&!Sf("contextMenu",d)&&!Sf("active",d)&&Ze()},[Ze,d]),qt=x.useCallback(function(dt){De(function(){return{top:dt.pageY,left:dt.pageX,clientTop:dt.clientX,clientLeft:dt.clientY}})},[]),hr=x.useCallback(function(dt){dt.preventDefault()},[]),rr=x.useMemo(function(){var dt={onClick:B,onContextMenu:X,onMouseOver:V,onMouseOut:$,onFocus:re,onBlur:ae,onMouseMove:W};if(f||p||g||d==="none")return dt;if(h&&(dt.onMouseMove=Os(qt,W)),Sf("click",d))return dt.onClick=Os(Et,dt.onClick),dt;if(Sf("active",d))return dt.onClick=Os(Yt,dt.onClick),dt;if(Sf("hover",d)){var bt=function(Oe){return Ede(Yt,Oe)},nr=function(Oe){return Ede(sr,Oe)};dt.onMouseOver=Os(bt,dt.onMouseOver),dt.onMouseOut=Os(nr,dt.onMouseOut)}return Sf("focus",d)&&(dt.onFocus=Os(Yt,dt.onFocus),dt.onBlur=Os(sr,dt.onBlur)),Sf("contextMenu",d)&&(dt.onContextMenu=Os(hr,Et,dt.onContextMenu)),dt},[f,h,sr,Yt,Et,qt,ae,B,X,re,W,$,V,g,hr,p,d]),tr=function(){var bt=ve({},le,{rootClose:F,triggerTarget:ge,onClose:d!=="none"?Os(Le,function(){return Q?.(AI.ClickOutside)}):void 0,onExited:Os(h?Be:void 0,ie),placement:I,container:o,open:Pe}),nr={id:s};return d!=="none"&&P&&(nr.onMouseEnter=Kt,nr.onMouseLeave=Qt),u.createElement(oK,ve({},bt,{ref:Ae,childrenProps:nr,followCursor:h,cursorPosition:Ne}),typeof N=="function"?function(Ee,Oe){return N(ve({},Ee,{onClose:Le}),Oe)}:N)};return(typeof i=="object"&&i.type===u.Fragment||typeof i=="string")&&console.error("[rsuite] The OverlayTrigger component does not accept strings or Fragments as child."),u.createElement(u.Fragment,null,typeof i=="function"?i(rr,ge):u.cloneElement(i,ve({ref:ge,"aria-describedby":s},bOt(rr,i.props))),u.createElement(de,null,tr()))});hOe.displayName="OverlayTrigger";var pOe=["onEntered","onExited","onEnter","onEntering","onExit","onExiting","o
213pen","defaultOpen","onHide","container","containerPadding","preventOverflow"],mOe=[].concat(pOe,["disabled","plaintext","readOnly","loading"]),vOe=u.forwardRef(function(e,t){var r=e.pickerProps,n=e.speaker,i=e.placement,a=e.trigger,o=a===void 0?"click":a,s=Yr(e,["pickerProps","speaker","placement","trigger"]),l=qc(r,mOe),c=ef(),d=c.rtl;return u.createElement(hOe,ve({},s,l,{disabled:l.disabled||l.loading,ref:t,trigger:o,placement:qOe(i,d),speaker:n}))});vOe.displayName="PickerToggleTrigger";var wOt=X2t();const gOe=et(wOt);var G7,wde;function SOt(){if(wde)return G7;wde=1;var e=ym(),t=jc(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return G7=n,G7}var COt=SOt();const yOe=et(COt);var K7,Sde;function xOt(){if(Sde)return K7;Sde=1;var e=XPe(),t=ms(),r=o$(),n=Math.max;function i(a,o,s){var l=a==null?0:a.length;if(!l)return-1;var c=s==null?0:r(s);return c<0&&(c=n(l+c,0)),e(a,t(o,3),c)}return K7=i,K7}function TOt(e,t){var r=b2(e);return r?r.innerHeight:Yf(e).height}var AOt=u.forwardRef(function(e,t){var r=e.children,n=e.className,i=e.disableHeight,a=e.disableWidth,o=e.defaultHeight,s=e.defaultWidth,l=e.style,c=e.onResize,d=Yr(e,["children","className","disableHeight","disableWidth","defaultHeight","defaultWidth","style","onResize"]),f=x.useState(o||0),h=f[0],p=f[1],g=x.useState(s||0),_=g[0],b=g[1],E=x.useRef(null),S=x.useCallback(function(){var N;return(N=E.current)!==null&&N!==void 0&&N.parentNode&&E.current.parentNode.ownerDocument&&E.current.parentNode.ownerDocument.defaultView&&E.current.parentNode instanceof E.current.parentNode.ownerDocument.defaultView.HTMLElement?E.current.parentNode:null},[]),P=x.useCallback(function(){var N=S();if(N){var M=N.offsetHeight||0,F=N.offsetWidth||0,B=Ed(N),V=parseInt(B.paddingLeft,10)||0,W=parseInt(B.paddingRight,10)||0,$=parseInt(B.paddingTop,10)||0,X=parseInt(B.paddingBottom,10)||0,re=M-$-X,ae=F-V-W;(!i&&h!==re||!a&&_!==ae)&&(p(M-$-X),b(F-V-W),c?.({height:M,width:F}))}},[i,a,S,h,c,_]);u3t(P),jOe(S(),P);var O={overflow:"visible"},I={width:0,height:0};return i||(O.height=0,I.height=h),a||(O.width=0,I.width=_),u.createElement("div",ve({className:n,ref:kd(E,t),style:ve({},O,l)},d),r(I))}),Cde=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function POt(e,t){return!!(e===t||Cde(e)&&Cde(t))}function ROt(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!POt(e[r],t[r]))return!1;return!0}function Y7(e,t){t===void 0&&(t=ROt);var r,n=[],i,a=!1;function o(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return a&&r===this&&t(s,n)||(i=e.apply(this,s),a=!0,r=this,n=s),i}return o}var OOt=typeof performance=="object"&&typeof performance.now=="function",xde=OOt?function(){return performance.now()}:function(){return Date.now()};function Tde(e){cancelAnimationFrame(e.id)}function IOt(e,t){var r=xde();function n(){xde()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var X7=-1;function Ade(e){if(e===void 0&&(e=!1),X7===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),X7=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return X7}var J0=null;function Pde(e){if(e===void 0&&(e=!1),J0===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?J0="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?J0="negative":J0="positive-ascending"),document.body.removeChild(t),J0}return J0}var kOt=150,NOt=function(t,r){return t};function _Oe(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=(function(f){Qo(h,f);function h(g){var _;return _=f.call(this,g)||this,_._instanceProps=l(_.props,Cr(_)),_._outerRef=void 0,_._resetIsScrollingTimeoutId=null,_.state={instance:Cr(_),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof _.props.initialScrollOffset=="number"?_.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},_._callOnItemsRendered=void 0,_._callOnItemsRendered=Y7(function(b,E,S,P){return _.props.onItemsRendered({overscanStartIndex:b,overscanStopIndex:E,visibleStartIndex:S,visibleStopIndex:P})}),_._callOnScroll=void 0,_._callOnScroll=Y7(function(b,E,S){return _.props.onScroll({scrollDirection:b,scrollOffset:E,scrollUpdateWasRequested:S})}),_._getItemStyle=void 0,_._getItemStyle=function(b){var E=_.props,S=E.direction,P=E.itemSize,O=E.layout,I=_._getItemStyleCache(c&&P,c&&O,c&&S),N;if(I.hasOwnProperty(b))N=I[b];else{var M=r(_.props,b,_._instanceProps),F=i(_.props,b,_._instanceProps),B=S==="horizontal"||O
vendor: 4,769 bytes, line 213
213==="horizontal",V=S==="rtl",W=B?M:0;I[b]=N={position:"absolute",left:V?void 0:W,right:V?W:void 0,top:B?0:M,height:B?"100%":F,width:B?F:"100%"}}return N},_._getItemStyleCache=void 0,_._getItemStyleCache=Y7(function(b,E,S){return{}}),_._onScrollHorizontal=function(b){var E=b.currentTarget,S=E.clientWidth,P=E.scrollLeft,O=E.scrollWidth;_.setState(function(I){if(I.scrollOffset===P)return null;var N=_.props.direction,M=P;if(N==="rtl")switch(Pde()){case"negative":M=-P;break;case"positive-descending":M=O-S-P;break}return M=Math.max(0,Math.min(M,O-S)),{isScrolling:!0,scrollDirection:I.scrollOffset<M?"forward":"backward",scrollOffset:M,scrollUpdateWasRequested:!1}},_._resetIsScrollingDebounced)},_._onScrollVertical=function(b){var E=b.currentTarget,S=E.clientHeight,P=E.scrollHeight,O=E.scrollTop;_.setState(function(I){if(I.scrollOffset===O)return null;var N=Math.max(0,Math.min(O,P-S));return{isScrolling:!0,scrollDirection:I.scrollOffset<N?"forward":"backward",scrollOffset:N,scrollUpdateWasRequested:!1}},_._resetIsScrollingDebounced)},_._outerRefSetter=function(b){var E=_.props.outerRef;_._outerRef=b,typeof E=="function"?E(b):E!=null&&typeof E=="object"&&E.hasOwnProperty("current")&&(E.current=b)},_._resetIsScrollingDebounced=function(){_._resetIsScrollingTimeoutId!==null&&Tde(_._resetIsScrollingTimeoutId),_._resetIsScrollingTimeoutId=IOt(_._resetIsScrolling,kOt)},_._resetIsScrolling=function(){_._resetIsScrollingTimeoutId=null,_.setState({isScrolling:!1},function(){_._getItemStyleCache(-1,null)})},_}h.getDerivedStateFromProps=function(_,b){return DOt(_,b),d(_),null};var p=h.prototype;return p.scrollTo=function(_){_=Math.max(0,_),this.setState(function(b){return b.scrollOffset===_?null:{scrollDirection:b.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(_,b){b===void 0&&(b="auto");var E=this.props,S=E.itemCount,P=E.layout,O=this.state.scrollOffset;_=Math.max(0,Math.min(_,S-1));var I=0;if(this._outerRef){var N=this._outerRef;P==="vertical"?I=N.scrollWidth>N.clientWidth?Ade():0:I=N.scrollHeight>N.clientHeight?Ade():0}this.scrollTo(a(this.props,_,b,O,this._instanceProps,I))},p.componentDidMount=function(){var _=this.props,b=_.direction,E=_.initialScrollOffset,S=_.layout;if(typeof E=="number"&&this._outerRef!=null){var P=this._outerRef;b==="horizontal"||S==="horizontal"?P.scrollLeft=E:P.scrollTop=E}this._callPropsCallbacks()},p.componentDidUpdate=function(){var _=this.props,b=_.direction,E=_.layout,S=this.state,P=S.scrollOffset,O=S.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var I=this._outerRef;if(b==="horizontal"||E==="horizontal")if(b==="rtl")switch(Pde()){case"negative":I.scrollLeft=-P;break;case"positive-ascending":I.scrollLeft=P;break;default:var N=I.clientWidth,M=I.scrollWidth;I.scrollLeft=M-N-P;break}else I.scrollLeft=P;else I.scrollTop=P}this._callPropsCallbacks()},p.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Tde(this._resetIsScrollingTimeoutId)},p.render=function(){var _=this.props,b=_.children,E=_.className,S=_.direction,P=_.height,O=_.innerRef,I=_.innerElementType,N=_.innerTagName,M=_.itemCount,F=_.itemData,B=_.itemKey,V=B===void 0?NOt:B,W=_.layout,$=_.outerElementType,X=_.outerTagName,re=_.style,ae=_.useIsScrolling,Q=_.width,ie=this.state.isScrolling,le=S==="horizontal"||W==="horizontal",fe=le?this._onScrollHorizontal:this._onScrollVertical,de=this._getRangeToRender(),ge=de[0],Ae=de[1],Fe=[];if(M>0)for(var Pe=ge;Pe<=Ae;Pe++)Fe.push(x.createElement(b,{data:F,key:V(Pe,F),index:Pe,isScrolling:ae?ie:void 0,style:this._getItemStyle(Pe)}));var ce=n(this.props,this._instanceProps);return x.createElement($||X||"div",{className:E,onScroll:fe,ref:this._outerRefSetter,style:ve({position:"relative",height:P,width:Q,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},re)},x.createElement(I||N||"div",{children:Fe,ref:O,style:{height:le?"100%":ce,pointerEvents:ie?"none":void 0,width:le?ce:"100%"}}))},p._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var _=this.props.itemCount;if(_>0){var b=this._getRangeToRender(),E=b[0],S=b[1],P=b[2],O=b[3];this._callOnItemsRendered(E,S,P,O)}}if(typeof this.props.onScroll=="function"){var I=this.state,N=I.scrollDirection,M=I.scrollOffset,F=I.scrollUpdateWasRequested;this._callOnScroll(N,M,F)}},p._getRangeToRender=function(){var _=this.props,b=_.itemCount,E=_.overscanCount,S=this.state,P=S.isScrolling,O=S.scrollDirection,I=S.scrollOffset;if(b===0)return[0,0,0,0];var N=o(this.props,I,this._instanceProps),M=s(this.props,N,I,this._instanceProps),F=!P||O==="backward"?Math.max(1,E):1,B=!P||O==="forward"?Math.max(1,E):1;return[Math.max(0,N-F),Math.max(0,Math.min(b-1,M+B)),N,M]},h}
213)(x.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var DOt=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},MOt=50,Oy=function(t,r,n){var i=t,a=i.itemSize,o=n.itemMetadataMap,s=n.lastMeasuredIndex;if(r>s){var l=0;if(s>=0){var c=o[s];l=c.offset+c.size}for(var d=s+1;d<=r;d++){var f=a(d);o[d]={offset:l,size:f},l+=f}n.lastMeasuredIndex=r}return o[r]},LOt=function(t,r,n){var i=r.itemMetadataMap,a=r.lastMeasuredIndex,o=a>0?i[a].offset:0;return o>=n?bOe(t,r,a,0,n):FOt(t,r,Math.max(0,a),n)},bOe=function(t,r,n,i,a){for(;i<=n;){var o=i+Math.floor((n-i)/2),s=Oy(t,o,r).offset;if(s===a)return o;s<a?i=o+1:s>a&&(n=o-1)}return i>0?i-1:0},FOt=function(t,r,n,i){for(var a=t.itemCount,o=1;n<a&&Oy(t,n,r).offset<i;)n+=o,o*=2;return bOe(t,r,Math.min(n,a-1),Math.floor(n/2),i)},Rde=function(t,r){var n=t.itemCount,i=r.itemMetadataMap,a=r.estimatedItemSize,o=r.lastMeasuredIndex,s=0;if(o>=n&&(o=n-1),o>=0){var l=i[o];s=l.offset+l.size}var c=n-o-1,d=c*a;return s+d},str=_Oe({getItemOffset:function(t,r,n){return Oy(t,r,n).offset},getItemSize:function(t,r,n){return n.itemMetadataMap[r].size},getEstimatedTotalSize:Rde,getOffsetForIndexAndAlignment:function(t,r,n,i,a,o){var s=t.direction,l=t.height,c=t.layout,d=t.width,f=s==="horizontal"||c==="horizontal",h=f?d:l,p=Oy(t,r,a),g=Rde(t,a),_=Math.max(0,Math.min(g-h,p.offset)),b=Math.max(0,p.offset-h+p.size+o);switch(n==="smart"&&(i>=b-h&&i<=_+h?n="auto":n="center"),n){case"start":return _;case"end":return b;case"center":return Math.round(b+(_-b)/2);default:return i>=b&&i<=_?i:i<b?b:_}},getStartIndexForOffset:function(t,r,n){return LOt(t,n,r)},getStopIndexForStartIndex:function(t,r,n,i){for(var a=t.direction,o=t.height,s=t.itemCount,l=t.layout,c=t.width,d=a==="horizontal"||l==="horizontal",f=d?c:o,h=Oy(t,r,i),p=n+f,g=h.offset+h.size,_=r;_<s-1&&g<p;)_++,g+=Oy(t,_,i).size;return _},initInstanceProps:function(t,r){var n=t,i=n.estimatedItemSize,a={itemMetadataMap:{},estimatedItemSize:i||MOt,lastMeasuredIndex:-1};return r.resetAfterIndex=function(o,s){s===void 0&&(s=!0),a.lastMeasuredIndex=Math.min(a.lastMeasuredIndex,o-1),r._getItemStyleCache(-1),s&&r.forceUpdate()},a},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){t.itemSize}}),BOt=_Oe({getItemOffset:function(t,r){var n=t.itemSize;return r*n},getItemSize:function(t,r){var n=t.itemSize;return n},getEstimatedTotalSize:function(t){var r=t.itemCount,n=t.itemSize;return n*r},getOffsetForIndexAndAlignment:function(t,r,n,i,a,o){var s=t.direction,l=t.height,c=t.itemCount,d=t.itemSize,f=t.layout,h=t.width,p=s==="horizontal"||f==="horizontal",g=p?h:l,_=Math.max(0,c*d-g),b=Math.min(_,r*d),E=Math.max(0,r*d-g+d+o);switch(n==="smart"&&(i>=E-g&&i<=b+g?n="auto":n="center"),n){case"start":return b;case"end":return E;case"center":{var S=Math.round(E+(b-E)/2);return S<Math.ceil(g/2)?0:S>_+Math.floor(g/2)?_:S}default:return i>=E&&i<=b?i:i<E?E:b}}
213,getStartIndexForOffset:function(t,r){var n=t.itemCount,i=t.itemSize;return Math.max(0,Math.min(n-1,Math.floor(r/i)))},getStopIndexForStartIndex:function(t,r,n){var i=t.direction,a=t.height,o=t.itemCount,s=t.itemSize,l=t.layout,c=t.width,d=i==="horizontal"||l==="horizontal",f=r*s,h=d?c:a,p=Math.ceil((h+n-f)/s);return Math.max(0,Math.min(o-1,r+p-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}}),EOe=u.forwardRef(function(e,t){var r=ef("Plaintext"),n=r.locale,i=e.as,a=i===void 0?"div":i,o=e.classPrefix,s=o===void 0?"plaintext":o,l=e.className,c=e.children,d=e.localeKey,f=d===void 0?"":d,h=e.placeholder,p=h===void 0?n[f]:h,g=Yr(e,["as","classPrefix","className","children","localeKey","placeholder"]),_=Ya(s),b=_.withClassPrefix,E=_.merge,S=E(l,b({empty:!c}));return u.createElement(a,ve({},g,{ref:t,className:S}),c||p)});EOe.displayName="Plaintext";function zOt(e,t){var r=b2(e);if(r)return r.innerWidth;var n=Yf(e);return n?n.width:0}var HOt=["placement","arrowOffsetLeft","arrowOffsetTop","positionLeft","positionTop","getPositionInstance","getToggleInstance","autoWidth"],UOt=["topStart","topEnd","leftEnd","rightEnd","auto","autoVerticalStart","autoVerticalEnd","autoHorizontalEnd"],wOe=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.classPrefix,a=i===void 0?"picker-menu":i,o=e.autoWidth,s=e.className,l=e.placement,c=l===void 0?"bottomStart":l,d=e.target,f=Yr(e,["as","classPrefix","autoWidth","className","placement","target"]),h=x.useRef(null),p=x.useCallback(function(){var S=d?.current;S&&UOt.includes(c)&&S.updatePosition()},[d,c]);jOe(x.useCallback(function(){return h.current},[]),p),x.useEffect(function(){var S=d?.current;if(o&&S!==null&&S!==void 0&&S.root){var P=zOt(Qf(S.root));h.current&&ZRe(h.current,"min-width",P+"px")}},[o,d,h]);var g=Ya(a),_=g.withClassPrefix,b=g.merge,E=b(s,_());return u.createElement(n,ve({},Em(f,HOt),{ref:kd(h,t),className:E}))});wOe.displayName="PickerOverlay";var SOe=u.forwardRef(function(e,t){return u.createElement(Jf,ve({},e,{ref:t,as:"div",ripple:!1}))});SOe.displayName="ToggleButton";var COe=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"span":r,i=e.classPrefix,a=i===void 0?"btn-close":i,o=e.className,s=e.locale,l=Yr(e,["as","classPrefix","className","locale"]),c=Ya(a),d=c.withClassPrefix,f=c.merge,h=ef("CloseButton",s),p=h.locale,g=f(o,d());return u.createElement(n,ve({role:"button"},l,{ref:t,className:g,title:p?.closeLabel,"aria-label":p?.closeLabel}),u.createElement(UPt,null))});COe.displayName="CloseButton";var Z7={},Ode;function VOt(){return Ode||(Ode=1,(function(e){function t(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(f){return typeof f}:t=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(Dt());function n(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return n=function(){return c},c}function i(c){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var d=n();if(d&&d.has(c))return d.get(c);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var g=h?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(f,p,g):f[p]=c[p]}return f.default=c,d&&d.set(c,f),f}function a(){return a=Object.assign||function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(c[h]=f[h])}return c},a.apply(this,arguments)}function o(c,d){return r.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 21 32",fill:"currentColor",ref:d},c),r.createElement("path",{d:"M19.196 13.143a.612.612 0 01-.179.411l-8.321 8.321c-.107.107-.268.179-.411.179s-.304-.071-.411-.179l-8.321-8.321c-.107-.107-.179-.268-.179-.411s.071-.304.179-.411l.893-.893a.582.582 0 01.411-.179c.143 0 .304.071.411.179l7.018 7.018 7.018-7.018c.107-.107.268-.179.411-.179s.304.071.411.179l.893.893a.
213617.617 0 01.179.411z"}))}var s=r.forwardRef(o),l=s;e.default=l})(Z7)),Z7}var qOt=VOt();const jOt=et(qOt);var $Ot=j_({as:jOt,ariaLabel:"angle down",category:"",displayName:"AngleDown"}),Q7={},Ide;function WOt(){return Ide||(Ide=1,(function(e){function t(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(f){return typeof f}:t=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(Dt());function n(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return n=function(){return c},c}function i(c){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var d=n();if(d&&d.has(c))return d.get(c);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var g=h?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(f,p,g):f[p]=c[p]}return f.default=c,d&&d.set(c,f),f}function a(){return a=Object.assign||function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(c[h]=f[h])}return c},a.apply(this,arguments)}function o(c,d){return r.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 21 32",fill:"currentColor",ref:d},c),r.createElement("path",{d:"M19.196 21.143a.612.612 0 01-.179.411l-.893.893a.582.582 0 01-.411.179.612.612 0 01-.411-.179l-7.018-7.018-7.018 7.018c-.107.107-.268.179-.411.179s-.304-.071-.411-.179l-.893-.893c-.107-.107-.179-.268-.179-.411s.071-.304.179-.411l8.321-8.321c.107-.107.268-.179.411-.179s.304.071.411.179l8.321 8.321a.617.617 0 01.179.411z"}))}var s=r.forwardRef(o),l=s;e.default=l})(Q7)),Q7}var GOt=WOt();const KOt=et(GOt);var xOe=j_({as:KOt,ariaLabel:"angle up",category:"",displayName:"AngleUp"}),J7={},kde;function YOt(){return kde||(kde=1,(function(e){function t(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(f){return typeof f}:t=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(Dt());function n(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return n=function(){return c},c}function i(c){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var d=n();if(d&&d.has(c))return d.get(c);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var g=h?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(f,p,g):f[p]=c[p]}return f.default=c,d&&d.set(c,f),f}function a(){return a=Object.assign||function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(c[h]=f[h])}return c},a.apply(this,arguments)}function o(c,d){return r.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 12 32",fill:"currentColor",ref:d},c),r.createElement("path",{d:"M11.196 9.714a.612.612 0 01-.179.411l-7.018 7.018 7.018 7.018c.107.107.179.268.179.411s-.071.304-.179.411l-.893.893c-.107.107-.268.179-.411.179s-.304-.071-.411-.179L.981 17.555c-.107-.107-.179-.268-.179-.411s.071-.304.179-.411l8.321-8.321c.107-.107.268-.179.411-.179s.304.071.411.179l.893.893c.107.107.179.25.179.411z"}))}var s=r.forwardRef(o),l=s;e.default=l})(J7)),J7}var XOt=YOt();const ZOt=et(XOt);var gV=j_({as:ZOt,ariaLabel:"angle left",category:"",displayName:"AngleLeft"}),eF={},Nde;function QOt(){return Nde||(Nde=1,(function(e){function t(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(f){return typeof f}:t=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;
213var r=i(Dt());function n(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return n=function(){return c},c}function i(c){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var d=n();if(d&&d.has(c))return d.get(c);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var g=h?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(f,p,g):f[p]=c[p]}return f.default=c,d&&d.set(c,f),f}function a(){return a=Object.assign||function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(c[h]=f[h])}return c},a.apply(this,arguments)}function o(c,d){return r.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 11 32",fill:"currentColor",ref:d},c),r.createElement("path",{d:"M10.625 17.143a.612.612 0 01-.179.411l-8.321 8.321c-.107.107-.268.179-.411.179s-.304-.071-.411-.179l-.893-.893a.582.582 0 01-.179-.411c0-.143.071-.304.179-.411l7.018-7.018L.41 10.124c-.107-.107-.179-.268-.179-.411s.071-.304.179-.411l.893-.893c.107-.107.268-.179.411-.179s.304.071.411.179l8.321 8.321a.617.617 0 01.179.411z"}))}var s=r.forwardRef(o),l=s;e.default=l})(eF)),eF}var JOt=QOt();const eIt=et(JOt);var yV=j_({as:eIt,ariaLabel:"angle right",category:"",displayName:"AngleRight"}),tIt={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},rIt={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},nIt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iIt={date:Gf({formats:tIt,defaultWidth:"full"}),time:Gf({formats:rIt,defaultWidth:"full"}),dateTime:Gf({formats:nIt,defaultWidth:"full"})},aIt={code:"en-GB",formatDistance:uRe,formatLong:iIt,formatRelative:dRe,localize:fRe,match:pRe,options:{weekStartsOn:1,firstWeekContainsDate:4}},tF={sunday:"Su",monday:"Mo",tuesday:"Tu",wednesday:"We",thursday:"Th",friday:"Fr",saturday:"Sa",ok:"OK",today:"Today",yesterday:"Yesterday",hours:"Hours",minutes:"Minutes",seconds:"Seconds",formattedMonthPattern:"MMM yyyy",formattedDayPattern:"dd MMM yyyy",dateLocale:aIt};const oIt={common:{loading:"Loading...",emptyMessage:"No data found"},Plaintext:{unfilled:"Unfilled",notSelected:"Not selected",notUploaded:"Not uploaded"},Pagination:{more:"More",prev:"Previous",next:"Next",first:"First",last:"Last",limit:"{0} / page",total:"Total Rows: {0}",skip:"Go to{0}"},Calendar:tF,DatePicker:ve({},tF),DateRangePicker:ve({},tF,{last7Days:"Last 7 Days"}),Picker:{noResultsText:"No results found",placeholder:"Select",searchPlaceholder:"Search",checkAll:"All"},InputPicker:{newItem:"New item",createOption:'Create option "{0}"'},Uploader:{inited:"Initial",progress:"Uploading",error:"Error",complete:"Finished",emptyFile:"Empty",upload:"Upload"},CloseButton:{closeLabel:"Close"},Breadcrumb:{expandText:"Show path"},Toggle:{on:"Open",off:"Close"}};Ih&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","");function sK(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;throw new Error("unable to locate global object")}var TOe=sK(),Dde=0;function sIt(e){var t=Date.now(),r=Math.max(0,16-(t-Dde));return Dde=t+r,TOe.setTimeout(function(){e(Date.now())},r)}var Mde=TOe.requestAnimationFrame||sIt,Lde=sK();Lde.cancelAnimationFrame||Lde.clearTimeout;var rF={},_V=["Webkit","ms","Moz","O"],lIt=new RegExp("^("+_V.join("|")+")"),AOe=Ih?document.createElement("div").style:{};function cIt(e){for(var t=0;t<_V.length;t+=1){var r=_V[t]+e;if(r in AOe)return r}return null}function Iy(e){var t=XRe(e);if(rF[t]===void 0){var r=t.charAt(0).toUpperCase()+t.slice(1);if(lIt.test(r))throw new Error(`getVendorPrefixedName must only be called with unprefixed
214          CSS property names. It was called with `+e);rF[t]=t in AOe?t:cIt(r)}return rF[t]||t}const Fde={hasCSSAnimations:function(){return!!Iy("animationName")},hasCSSTransforms:function(){return!!Iy("transform")},hasCSS3DTransforms:function(){return!!Iy("perspective")},hasCSSTransitions:function(){return!!Iy("transition")}};var Bde=sK(),POe=Iy("transform"),uIt=Iy("backfaceVisibility"),dIt=function(t,r,n){return r===void 0&&(r=0),n===void 0&&(n=0),t.left=r+"px",t.top=n+"px",t},zde=function(t,r,n){return r===void 0&&(r=0),n===void 0&&(n=0),t[POe]="translate("+r+"px,"+n+"px)",t},Hde=function(t,r,n){return r===void 0&&(r=0),n===void 0&&(n=0),t[POe]="translate3d("+r+"px,"+n+"px,0)",t[uIt]="hidden",t},fIt=function(t){var r={},n=r.enableTransform,i=n===void 0?!0:n,a=r.enable3DTransform,o=a===void 0?!0:a,s=r.forceUseTransform;if(s)return t.enable3DTransform?Hde:zde;if(Fde.hasCSSTransforms()&&i){var l=Bde.window?Bde.window.navigator.userAgent:"UNKNOWN",c=/Safari\//.test(l)&&!/Chrome\//.test(l);return!c&&Fde.hasCSS3DTransforms()&&o?Hde:zde}return dIt};fIt();
214var hIt=["topCenter","bottomCenter","topStart","topEnd","bottomStart","bottomEnd"],pIt=function(){var t=x.useState([]),r=t[0],n=t[1],i=x.useCallback(function(l){return typeof l>"u"&&r.length?r[r.length-1].key:l},[r]),a=x.useCallback(function(l){var c=VPt();return n(function(d){return[].concat(d,[{key:c,visible:!0,node:l}])}),c},[]),o=x.useCallback(function(){n(r.map(function(l){return ve({},l,{visible:!1})})),setTimeout(function(){n([])},400)},[r]),s=x.useCallback(function(l){n(r.map(function(c){return c.key===i(l)&&(c.visible=!1),c})),setTimeout(function(){n(r.filter(function(c){return c.visible}))},400)},[r,i]);return{messages:r,push:a,clear:o,remove:s}},GC=u.forwardRef(function(e,t){var r=x.useRef(),n=e.as,i=n===void 0?"div":n,a=e.className,o=e.classPrefix,s=o===void 0?"toast-container":o,l=e.placement,c=l===void 0?"topCenter":l,d=e.callback,f=Yr(e,["as","className","classPrefix","placement","callback"]),h=Ya(s),p=h.withClassPrefix,g=h.merge,_=h.rootPrefix,b=g(a,p(rK(c))),E=pIt(),S=E.push,P=E.clear,O=E.remove,I=E.messages;x.useImperativeHandle(t,function(){return{root:r.current,push:S,clear:P,remove:O}});var N=I.map(function(M){return u.createElement($_,{key:M.key,in:M.visible,exitedClassName:_("toast-fade-exited"),exitingClassName:_("toast-fade-exiting"),enteringClassName:_("toast-fade-entering"),enteredClassName:_("toast-fade-entered"),timeout:300},function(F,B){var V,W,$,X,re=F.className,ae=Yr(F,["className"]);return u.cloneElement(M.node,ve({},ae,{ref:B,onClose:Os((V=M.node)===null||V===void 0||(W=V.props)===null||W===void 0?void 0:W.onClose,function(){return O(M.key)}),className:g(_("toast"),($=M.node)===null||$===void 0||(X=$.props)===null||X===void 0?void 0:X.className,re)}))})});return u.createElement(i,ve({},f,{ref:function(F){r.current=F,d?.(F)},className:b}),N)});GC.getInstance=function(e){var t=e.container,r=Yr(e,["container"]),n=u.createRef(),i=(typeof t=="function"?t():t)||document.body;return new Promise(function(a){var o=function(){a([n,l])},s=a3t(u.createElement(GC,ve({},r,{ref:n,callback:o})),i),l=s.unmount})};GC.displayName="ToastContainer";GC.propTypes={className:xe.string,classPrefix:xe.string,placement:xe.elementType,container:xe.oneOfType([xe.node,xe.func]),callback:xe.func};var lK=u.createContext({}),mIt=["light","dark","high-contrast"],vIt=function(t){var r=t.children,n=t.classPrefix,i=n===void 0?sRt():n,a=t.theme,o=t.toastContainer,s=t.disableRipple,l=Yr(t,["children","classPrefix","theme","toastContainer","disableRipple"]),c=u.useRef(new Map),d=$Oe({container:o,waitMount:!0}),f=d.Portal,h=u.useMemo(function(){return ve({classPrefix:i,theme:a,toasters:c,disableRipple:s},l)},[i,a,s,l]);return x.useEffect(function(){Ih&&a&&(YRe(document.body,Zy(i,"theme-"+a)),mIt.forEach(function(p){p!==a&&KRe(document.body,Zy(i,"theme-"+p))}))},[i,a]),u.createElement(lK.Provider,{value:h},r,u.createElement(f,null,u.createElement("div",{className:"rs-toast-provider"},hIt.map(function(p){return u.createElement(GC,{key:p,placement:p,ref:function(_){c.current.set(p,_)}})}))))},Ude=function(t){return t.reduce(function(r,n){return r=ve({},r,n),r},{})},gIt=function(){return typeof window<"u"&&(document.body.getAttribute("dir")||document.dir)==="rtl"};function ef(e,t){var r,n,i=x.useContext(lK),a=i.locale,o=a===void 0?oIt:a,s=i.rtl,l=s===void 0?gIt():s,c=i.formatDate,d=i.parseDate,f=i.toasters,h=i.disableRipple,p=ve({},o?.common,typeof e=="string"?o?.[e]:typeof e=="object"?Ude(e.map(function(b){return o?.[b]})):{});t&&(p=Ude([p,t]));var g=x.useCallback(function(b,E){var S;return pV(b,E,{locale:o==null||(S=o.Calendar)===null||S===void 0?void 0:S.dateLocale})},[(r=o.Calendar)===null||r===void 0?void 0:r.dateLocale]),_=x.useCallback(function(b,E){var S;return ERe(b,E,new Date,{locale:o==null||(S=o.Calendar)===null||S===void 0?void 0:S.dateLocale})},[(n=o.Calendar)===null||n===void 0?void 0:n.dateLocale]);return{locale:p,rtl:l,toasters:f,disableRipple:h,formatDate:c||g,parseDate:d||_}}function yIt(e){var t=ef("Dropdown"),r=t.rtl;return x.useMemo(function(){switch(!0){case/^top/.test(e):return xOe;case/^right/.test(e):return r?gV:yV;case/^left/.test(e):return r?yV:gV;case/^bottom/.test(e):default:return $Ot}},[e,r])}var Vde=[],ey="";function _It(e){var t=e.previousConformedValue,r=t===void 0?ey:t,n=e.previousPlaceholder,i=n===void 0?ey:n,a=e.currentCaretPosition,o=a===void 0?0:a,s=e.conformedValue,l=e.rawValue,c=e.placeholderChar,d=e.placeholder,f=e.indexesOfPipedChars,h=f===void 0?Vde:f,p=e.caretTrapIndexes,g=p===void 0?Vde:p;if(o===0||!l.length)return 0;var _=l.length,b=r.length,E=d.length,S=s.length,P=_-b,O=P>0,I=b===0,N=P>1&&!I;if(N)return o;var M=O&&(r===s||s===d),F=0,B,V;if(M)F=o-P;else{var W=s.toLowerCase(),$=l.toLowerCase(),X=$.substr(0,o).split(ey),re=X.filter(function(Qe){return W.indexOf(Qe)!==-1});V=re[re.length-1];var ae=i.substr(0,re.length).split(ey).filter(function(Qe){return Qe!==c}).length,Q=d.substr(0,re.length).split(ey).filter(function(Qe){return Qe!==c}).length,ie=Q!==ae,le=i[re.length-1]!==void 0&&d[re.length-2]!==void 0&&i[re.length-1]!==c&&i[re.length-1]!==d[re.length-1]&&i[re.length-1]===d[re.length-2];!O&&(ie||le)&&ae>0&&d.indexOf(V)>-1&&l[o]!==void 0&&(B=!0,V=l[o]);for(var fe=h.map(function(Qe){return W[Qe]}),de=fe.filter(function(Qe){return Qe===V}).length,ge=re.filter(function(Qe){return Qe===V}).length,Ae=d.substr(0,d.indexOf(c)).split(ey).filter(function(Qe,Ue){return Qe===V&&l[Ue]!==Qe}).length,Fe=Ae+ge+de+(B?1:0),Pe=0,ce=0;ce<S;ce++){var pe=W[ce];if(F=ce+1,pe===V&&Pe++,Pe>=Fe)break}}if(O){for(var Ne=F,De=F;De<=E;De++)if(d[De]===c&&(Ne=De),d[De]===c||g.indexOf(De)!==-1||De===E)return Ne}else if(B){for(var Ve=F-1;Ve>=0;Ve--)if(s[Ve]===V||g.indexOf(Ve)!==-1||Ve===0)return Ve}else for(var Ke=F;Ke>=0;Ke--)if(d[Ke-1]===c||g.indexOf(Ke)!==-1||Ke===0)return Ke}var bIt=[],EIt="[]",cK="_";function bV(e,t){if(e===void 0&&(e=bIt),t===void 0&&(t=cK),!Array.isArray(e))throw new Error("Text-mask:convertMaskToPlaceholder; The mask property must be an array.");if(e.indexOf(t)!==-1)throw new Error(`Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.
215
216`+("The placeholder character that was received is: "+JSON.stringify(t)+`
217
218`)+("The mask that was received is: "+JSON.stringify(e)));return e.map(function(r){return r instanceof RegExp?t:r}).join("")}function ROe(e){for(var t=[],r;r=e.indexOf(EIt),r!==-1;)t.push(r),e.splice(r,1);return{maskWithoutCaretTraps:e,indexes:t}}function wIt(e){return Array.isArray&&Array.isArray(e)||e instanceof Array}function SIt(e,t,r){if(e===void 0&&(e=""),t===void 0&&(t=[]),r===void 0&&(r={}),!wIt(t))if(typeof t=="function")t=t(e,r),t=ROe(t).maskWithoutCaretTraps;else throw new Error("Text-mask:conformToMask; The mask property must be an array.");var n=r,i=n.guide,a=i===void 0?!0:i,o=n.previousConformedValue,s=o===void 0?"":o,l=n.placeholderChar,c=l===void 0?cK:l,d=n.placeholder,f=d===void 0?bV(t,c):d,h=n.currentCaretPosition,p=h===void 0?0:h,g=n.keepCharPositions,_=a===!1&&s!==void 0,b=e.length,E=s.length,S=f.length,P=t.length,O=b-E,I=O>0,N=p+(I?-O:0),M=N+Math.abs(O);if(g===!0&&!I){for(var F="",B=N;B<M;B++)f[B]===c&&(F+=c);e=e.slice(0,N)+F+e.slice(N,b)}for(var V=e.split("").map(function(Ne,De){return{char:Ne,isNew:De>=N&&De<M}}),W=b-1;W>=0;W--){var $=V[W].char;if($!==c){var X=W>=N&&E===P;$===f[X?W-O:W]&&V.splice(W,1)}}var re="",ae=!1;e:for(var Q=0;Q<S;Q++){var ie=f[Q];if(ie===c){if(V.length>0)for(;V.length>0;){var le=V.shift(),fe=le.char,de=le.isNew;if(fe===c&&_!==!0){re+=c;continue e}else if(t[Q].test(fe)){if(g!==!0||de===!1||s===""||a===!1||!I)re+=fe;else{for(var ge=V.length,Ae=null,Fe=0;Fe<ge;Fe++){var Pe=V[Fe];if(Pe.char!==c&&Pe.isNew===!1)break;if(Pe.char===c){Ae=Fe;break}}Ae!==null?(re+=fe,V.splice(Ae,1)):Q--}continue e}else ae=!0}_===!1&&(re+=f.substr(Q,S));break}else re+=ie}if(_&&I===!1){for(var ce=null,pe=0;pe<re.length;pe++)f[pe]===c&&(ce=pe);ce!==null?re=re.substr(0,ce+1):re=""}return{conformedValue:re,meta:{someCharsRejected:ae}}}var OOe="",qde="none",CIt="object",xIt=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),TIt=typeof requestAnimationFrame<"u"?requestAnimationFrame:setTimeout;function AIt(e){var t={previousConformedValue:void 0,previousPlaceholder:void 0};return{state:t,update:function(n,i){var a,o,s=i===void 0?e:i,l=s.inputElement,c=s.mask,d=s.guide,f=s.pipe,h=s.placeholderChar,p=h===void 0?cK:h,g=s.keepCharPositions,_=g===void 0?!1:g,b=s.showMask,E=b===void 0?!1:b;if(typeof n>"u"&&(n=l.value),n!==t.previousConformedValue){typeof c===CIt&&c.pipe!==void 0&&c.mask!==void 0&&(f=c.pipe,c=c.mask);var S,P;if(c instanceof Array&&(S=bV(c,p)),c!==!1){var O=RIt(n),I=l.selectionEnd,N=t.previousConformedValue,M=t.previousPlaceholder,F;if(typeof c=="function"){if(P=c(O,{currentCaretPosition:I,previousConformedValue:N,placeholderChar:p}),P===!1)return;var B=ROe(P),V=B.maskWithoutCaretTraps,W=B.indexes;P=V,F=W,S=bV(P,p)}else P=c;var $={previousConformedValue:N,guide:d,placeholderChar:p,pipe:f,placeholder:S,
218currentCaretPosition:I,keepCharPositions:_},X=SIt(O,P,$),re=X.conformedValue,ae=typeof f=="function",Q={};ae&&(Q=f(re,ve({rawValue:O},$)),Q===!1?Q={value:N,rejected:!0}:gOe(Q)&&(Q={value:Q}));var ie=ae?(a=Q)===null||a===void 0?void 0:a.value:re,le=_It({previousConformedValue:N,previousPlaceholder:M,conformedValue:ie,placeholder:S,rawValue:O,currentCaretPosition:I,placeholderChar:p,indexesOfPipedChars:(o=Q)===null||o===void 0?void 0:o.indexesOfPipedChars,caretTrapIndexes:F}),fe=ie===S&&le===0,de=E?S:OOe,ge=fe?de:ie;t.previousConformedValue=ge,t.previousPlaceholder=S,l.value!==ge&&(l.value=ge,PIt(l,le))}}}}}function PIt(e,t){document.activeElement===e&&(xIt?TIt(function(){return e.setSelectionRange(t,t,qde)},0):e.setSelectionRange(t,t,qde))}function RIt(e){if(gOe(e))return e;if(yOe(e))return String(e);if(e==null)return OOe;throw new Error(`The 'value' provided to Text Mask needs to be a string or a number. The value received was:
219
220 `+JSON.stringify(e))}var OIt=function(t,r){return u.createElement("input",ve({ref:t},r))},uK=u.forwardRef(function(e,t){var r=e.mask,n=e.guide,i=n===void 0?!0:n,a=e.placeholderChar,o=e.value,s=e.showMask,l=e.pipe,c=e.render,d=c===void 0?OIt:c,f=e.onChange,h=Yr(e,["mask","guide","placeholderChar","value","showMask","pipe","render","onChange"]),p=x.useRef(null),g=x.useRef(),_=x.useCallback(function(){var E;g.current=AIt(ve({inputElement:p.current},e)),(E=g.current)===null||E===void 0||E.update(o)},[e,o]),b=x.useCallback(function(E){var S;(S=g.current)===null||S===void 0||S.update(),f?.(E)},[f]);return x.useEffect(function(){_()},[i,a,s,l,r,o,_]),d(kd(p,t),ve({onChange:b,defaultValue:o},Em(h,["keepCharPositions"])))});uK.displayName="TextMask";uK.propTypes={render:xe.func,onChange:xe.func,mask:xe.oneOfType([xe.array,xe.func,xe.bool]).isRequired,guide:xe.bool,value:xe.oneOfType([xe.string,xe.number]),pipe:xe.func,placeholderChar:xe.string,keepCharPositions:xe.bool,showMask:xe.bool};var PI={};function IOe(e){PI[e]||(console.warn(e),PI[e]=!0)}IOe._resetWarned=function(){for(var e in PI)delete PI[e]};function IIt(e,t){return function(n,i,a){if(n[i]!=null){var o='"'+i+'" property of "'+a+`" has been deprecated.
221`+t;IOe(o)}for(var s=arguments.length,l=new Array(s>3?s-3:0),c=3;c<s;c++)l[c-3]=arguments[c];return e.apply(void 0,[n,i,a].concat(l))}}var dK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.classPrefix,a=i===void 0?"loader":i,o=e.className,s=e.inverse,l=e.backdrop,c=e.speed,d=c===void 0?"normal":c,f=e.center,h=e.vertical,p=e.content,g=e.size,_=Yr(e,["as","classPrefix","className","inverse","backdrop","speed","center","vertical","content","size"]),b=!!p,E=Ya(a),S=E.merge,P=E.withClassPrefix,O=E.prefix,I=S(o,O("wrapper","speed-"+d,g,{"backdrop-wrapper":l,"has-content":b,vertical:h,inverse:s,center:f}));return u.createElement(n,ve({role:"progressbar"},_,{ref:t,className:I}),l&&u.createElement("div",{className:O("backdrop")}),u.createElement("div",{className:P()},u.createElement("span",{className:O("spin")}),b&&u.createElement("span",{className:O("content")},p)))});dK.displayName="Loader";dK.propTypes={as:xe.elementType,className:xe.string,classPrefix:xe.string,center:xe.bool,backdrop:xe.bool,inverse:xe.bool,vertical:xe.bool,content:xe.node,size:xe.oneOf(["lg","md","sm","xs"]),speed:xe.oneOf(["normal","fast","slow"])};function KC(e){var t=e.as,r=t===void 0?"div":t,n=e.style,i=e.className,a=e.alignSelf,o=e.flex,s=e.grow,l=e.shrink,c=e.order,d=e.basis,f=Yr(e,["as","style","className","alignSelf","flex","grow","shrink","order","basis"]);return u.createElement(r,ve({className:i,style:ve({alignSelf:a,order:c},o?{flex:o}:{flexGrow:s,flexShrink:l,flexBasis:d},n)},f))}KC.displayName="StackItem";KC.propTypes={className:xe.string,children:xe.node,alignSelf:xe.oneOf(["flex-start","flex-end","center","baseline","stretch"]),flex:xe.oneOfType([xe.string,xe.number]),grow:xe.number,shrink:xe.number,order:xe.number,basis:xe.string};var Zf=u.forwardRef(function(e,t){var r,n=e.as,i=n===void 0?"div":n,a=e.alignItems,o=a===void 0?"center":a,s=e.classPrefix,l=s===void 0?"stack":s,c=e.childrenRenderMode,d=c===void 0?"wrap":c,f=e.className,h=e.children,p=e.direction,g=e.justifyContent,_=e.spacing,b
221=e.divider,E=e.style,S=e.wrap,P=Yr(e,["as","alignItems","classPrefix","childrenRenderMode","className","children","direction","justifyContent","spacing","divider","style","wrap"]),O=ef("Stack"),I=O.rtl,N=Ya(l),M=N.withClassPrefix,F=N.merge,B=N.prefix,V=F(f,M()),W=j2t(),$=Array.isArray(_)?_:[_,_],X=(r={},r[I?"marginLeft":"marginRight"]=$[0],r.marginBottom=$[1],r),re=ve({alignItems:o,justifyContent:g,flexDirection:p,flexWrap:S?"wrap":void 0,gap:W?_:void 0},E),ae=u.Children.toArray(h),Q=ae.length;return u.createElement(i,ve({},P,{ref:t,className:V,style:re}),u.Children.map(ae,function(ie,le){var fe=d==="wrap"&&ie.type!==KC?u.createElement(KC,{key:le,className:B("item"),style:W?void 0:X},ie):u.cloneElement(ie,{className:F(B("item"),ie.props.className),style:W?ie.props.style:ve({},X,ie.props.style)});return[fe,le<Q-1?b:null]}))});Zf.Item=KC;Zf.displayName="Stack";Zf.propTypes={className:xe.string,children:xe.node,classPrefix:xe.string,direction:xe.oneOf(["row","row-reverse","column","column-reverse"]),alignItems:xe.oneOf(["flex-start","center","flex-end","stretch","baseline"]),justifyContent:xe.oneOf(["flex-start","center","flex-end","space-between","space-around"]),spacing:xe.oneOfType([xe.number,xe.string,xe.array]),divider:xe.node,wrap:xe.bool};var jde,$de,kIt=[],fK=u.forwardRef(function(e,t){var r=e.active,n=e.as,i=n===void 0?SOe:n,a=e.classPrefix,o=a===void 0?"picker-toggle":a,s=e.children,l=e.caret,c=l===void 0?!0:l,d=e.className,f=e.disabled,h=e.readOnly,p=e.plaintext,g=e.hasValue,_=e.editable,b=e.loading,E=b===void 0?!1:b,S=e.cleanable,P=e.tabIndex,O=P===void 0?_?-1:0:P,I=e.id,N=e.value,M=e.inputPlaceholder,F=e.inputValue,B=e.inputMask,V=B===void 0?kIt:B,W=e.onInputChange,$=e.onInputPressEnter,X=e.onInputBlur,re=e.onInputFocus,ae=e.onClean,Q=e.onFocus,ie=e.onBlur,le=e.placement,fe=le===void 0?"bottomStart":le,de=e.caretComponent,ge=e.caretAs,Ae=ge===void 0?de:ge,Fe=e.label,Pe=Yr(e,["active","as","classPrefix","children","caret","className","disabled","readOnly","plaintext","hasValue","editable","loading","cleanable","tabIndex","id","value","inputPlaceholder","inputValue","inputMask","onInputChange","onInputPressEnter","onInputBlur","onInputFocus","onClean","onFocus","onBlur","placement","caretComponent","caretAs","label"]),ce=x.useRef(null),pe=x.useRef(null),Ne=x.useState(!1),De=Ne[0],Ve=Ne[1],Ke=Ya(o),Qe=Ke.withClassPrefix,Ue=Ke.merge,ut=Ke.prefix,We=x.useCallback(function(){return typeof F>"u"?Array.isArray(N)?N.join(","):N:F},[F,N]),ke=x.useState(We),Le=ke[0],Be=ke[1];x.useEffect(function(){if(pe.current){var Ee=We();Be(Ee)}},[We]);var Ze=Ue(d,Qe({active:r||De})),Et=x.useCallback(function(Ee){if(E||Ve(!0),_){if(Ee.target===ce.current&&Q?.(Ee),document.activeElement===pe.current){var Oe;(Oe=ce.current)===null||Oe===void 0||Oe.focus()}}else Q?.(Ee)},[_,E,Q]),Yt=x.useCallback(function(Ee){ce.current&&!_&&Ve(!1),_&&ce.current&&document.activeElement!==ce.current&&Ve(!1),ie?.(Ee)},[_,ie]),sr=function(Oe){Be(We()),X?.(Oe)},Kt=x.useCallback(function(Ee){var Oe,Re;Ee.stopPropagation(),ae?.(Ee),_?(Oe=ce.current)===null||Oe===void 0||Oe.focus():(Re=pe.current)===null||Re===void 0||Re.focus()},[_,ae]),Qt=x.useCallback(function(Ee){var Oe,Re=(Oe=Ee.target)===null||Oe===void 0?void 0:Oe.value;Be(Re),W?.(Re,Ee)},[W]),qt=x.useCallback(function(Ee){_&&Ee.key===Ns.ENTER&&$?.(Ee)},[$,_]),hr=x.useCallback(function(Ee,Oe){return u.createElement("input",ve({ref:kd(ce,Ee),style:{pointerEvents:_?void 0:"none"}},Oe))},[_]),rr=yIt(fe),tr=Ae??rr;if(p)return u.createElement(EOe,{ref:t,localeKey:"notSelected"},g?s:null);var dt=S&&g&&!h,bt=h||f?!1:_&&De,nr=f?void 0:O;return u.createElement(i,ve({role:"combobox","aria-haspopup":"listbox","aria-expanded":r,"aria-disabled":f,"aria-owns":I?I+"-listbox":void 0},Pe,{ref:kd(pe,t),disabled:f,tabIndex:nr,className:Ze,onFocus:f?null:Et,onBlur:f?null:a5(Yt,200)}),u.createElement(Zf,null,Fe&&u.createElement(Zf.Item,null,u.createElement("span",{className:ut("label")},Fe)),u.createElement(Zf.Item,{grow:1,style:{overflow:"hidden"}},E?u.createElement(dK,{style:{display:"block",padding:"1px 0"},"data-testid":"spinner"}):u.createElement(u.Fragment,null,u.createElement(uK,{mask:V,value:Array.isArray(Le)?Le.toString():Le,onBlur:sr,onFocus:re,onChange:Qt,onKeyDown:qt,id:I,"aria-hidden":!bt,readOnly:!bt,disabled:f,"aria-controls":I?I+"-listbox":void 0,tabIndex:_?0:-1,className:ut("textbox",{"read-only":!bt}),placeholder:M,render:hr}),s?u.createElement("span",{className:ut(g?"value":"placeholder"),"aria-placeholder":typeof s=="string"?s:void 0},s):null)),dt&&u.createElement(COe,{className:ut(jde||(jde=fV(["clean"]))),tabIndex:-1,locale:{closeLabel:"Clear"},onClick:Kt}),c&&!dt&&u.createElement(tr,{className:ut($de||($de=fV(["caret"])))})))});fK.displayName="PickerToggle";fK.propTypes={classPrefix:xe.string,hasValue:xe.bool,cleanable:xe.bool,className:xe.string,children:xe.node,caret:xe.bool,as:xe.elementType,onClean:xe.func,active:xe.bool,readOnly:xe.bool,disabled:xe.bool,plaintext:xe.bool,caretComponent:IIt(xe.elementType,"Use `caretAs` instead."),caretAs:xe.elementType};
221function NIt(e){var t=[],r=function n(i){u.Children.forEach(i.props.children,function(a){u.isValidElement(a)?n(a):typeof a=="string"&&t.push(a)})};return r(e),t}var nF,Wde;function kOe(){if(Wde)return nF;Wde=1;var e=dEe();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return nF=t,nF}var iF,Gde;function DIt(){if(Gde)return iF;Gde=1;var e=qG();function t(r,n){for(var i=r.length;i--&&e(n,r[i],0)>-1;);return i}return iF=t,iF}var aF,Kde;function MIt(){if(Kde)return aF;Kde=1;var e=qG();function t(r,n){for(var i=-1,a=r.length;++i<a&&e(n,r[i],0)>-1;);return i}return aF=t,aF}var oF,Yde;function LIt(){if(Yde)return oF;Yde=1;function e(t){return t.split("")}return oF=e,oF}var sF,Xde;function NOe(){if(Xde)return sF;Xde=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function l(c){return s.test(c)}return sF=l,sF}var lF,Zde;function FIt(){if(Zde)return lF;Zde=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=c+"?",_="["+a+"]?",b="(?:"+p+"(?:"+[d,f,h].join("|")+")"+_+g+")*",E=_+g+b,S="(?:"+[d+s+"?",s,f,h,o].join("|")+")",P=RegExp(l+"(?="+l+")|"+S+E,"g");function O(I){return I.match(P)||[]}return lF=O,lF}var cF,Qde;function DOe(){if(Qde)return cF;Qde=1;var e=LIt(),t=NOe(),r=FIt();function n(i){return t(i)?r(i):e(i)}return cF=n,cF}var uF,Jde;function BIt(){if(Jde)return uF;Jde=1;var e=c_e(),t=hEe(),r=kOe(),n=DIt(),i=MIt(),a=DOe(),o=e0();function s(l,c,d){if(l=o(l),l&&(d||c===void 0))return t(l);if(!l||!(c=e(c)))return l;var f=a(l),h=a(c),p=i(f,h),g=n(f,h)+1;return r(f,p,g).join("")}return uF=s,uF}var zIt=BIt();const sc=et(zIt);var dF,efe;function HIt(){if(efe)return dF;efe=1;var e=ms(),t=_m(),r=h_();function n(i){return function(a,o,s){var l=Object(a);if(!t(a)){var c=e(o,3);a=r(a),o=function(f){return c(l[f],f,l)}}var d=i(a,o,s);return d>-1?l[c?a[d]:d]:void 0}}return dF=n,dF}var fF,tfe;function UIt(){if(tfe)return fF;tfe=1;var e=HIt(),t=xOt(),r=e(t);return fF=r,fF}var VIt=UIt();const qIt=et(VIt);var jIt={valueKey:"value",childrenKey:"children"};function ltr(e,t,r){r===void 0&&(r=jIt);var n=r,i=n.valueKey,a=n.childrenKey;return function(o,s){return t&&(e=hK(o,function(l){return t===l[i]})),e[a]=s,o.concat([])}}function MOe(e,t){if(!sc(t))return!0;var r=t.toLocaleLowerCase();if(typeof e=="string"||typeof e=="number")return(""+e).toLocaleLowerCase().indexOf(r)>=0;if(u.isValidElement(e)){var n=NIt(e);return n.join("").toLocaleLowerCase().indexOf(r)>=0}return!1}function $It(e){var t,r=e.name,n=e.classPrefix,i=e.className,a=e.placement,o=e.appearance,s=e.cleanable,l=e.block,c=e.disabled,d=e.countable,f=e.readOnly,h=e.plaintext,p=e.hasValue,g=Yr(e,["name","classPrefix","className","placement","appearance","cleanable","block","disabled","countable","readOnly","plaintext","hasValue"]),_=Ya(n),b=_.withClassPrefix,E=_.merge,S=E(i,b(r,o,"toggle-wrapper",(t={},t["placement-"+rK(qOe(a))]=a,t["read-only"]=f,t["has-value"]=p,t.cleanable=s,t.block=l,t.disabled=c,t.countable=d,t.plaintext=h,t))),P=Object.keys(Em(e,[].concat(Object.keys(g||{}),["disabled","readOnly","plaintext"])));return[S,P]}function WIt(e,t){var r=t.down,n=t.up,i=t.enter,a=t.del,o=t.esc,s=t.right,l=t.left;switch(e.key){case Ns.DOWN:r?.(e),e.preventDefault();break;case Ns.UP:n?.(e),e.preventDefault();break;case Ns.ENTER:i?.(e),e.preventDefault();break;case Ns.BACKSPACE:a?.(e);break;case Ns.ESC:case Ns.TAB:o?.(e);break;case Ns.LEFT:l?.(e);break;case Ns.RIGHT:s?.(e);break}}function GIt(e){var t=e.scrollHeight,r=e.clientHeight;return t>r}function KIt(e,t,r){if(!GIt(t))return!0;var n=e.getBoundingClientRect(),i=n.top,a=n.bottom,o=n.height,s=t.getBoundingClientRect(),l=s.top,c=s.bottom;return r==="top"?i+o>l:a-o<c}function YIt(e,t,r){var n=e.scrollTop;e.scrollTop=t==="top"?n-r:n+r}var ctr=function(t,r){var n=r.valueKey,i=n===void 0?"value":n,a=r.focusableQueryKey,o=a===void 0?'[data-key][aria-disabled="false"]':a,s=r.defaultLayer,l=s===void 0?0:s,c=r.data,d=r.target,f=r.rtl,h=r.callback,p=x.useState(t),g=p[0],_=p[1],b=x.useState(l),E=b[0],S=b[1],P=x.useState([]),O=P[0],I=P[1],N=x.useCallback(function(){var Q=cR(d)?d():d,ie=Q?.querySelector('[data-layer="'+E+'"]');return ie||Q?.querySelector('[role="listbox"]')},[E,d]),M=x.useCallback(function(){if(!d)return[];var Q=O;if(E<1){var ie=cR(d)?d():d,le=ie?.querySelector('[data-layer="0"]');if(le){var fe;
221Q=Array.from((fe=le.querySelectorAll(o))!==null&&fe!==void 0?fe:[]).map(function(ge){var Ae;return(Ae=ge.dataset)===null||Ae===void 0?void 0:Ae.key})}else{var de;Q=Array.from((de=ie?.querySelectorAll(o))!==null&&de!==void 0?de:[]).map(function(ge){var Ae;return(Ae=ge.dataset)===null||Ae===void 0?void 0:Ae.key})}}return Q.map(function(ge){return qIt(c,function(Ae){return""+Ae[i]===ge})})},[c,o,O,d,i,E]),F=x.useCallback(function(Q){for(var ie=M(),le=0;le<ie.length;le+=1){var fe;if(Kf(g,(fe=ie[le])===null||fe===void 0?void 0:fe[i])){Q(ie,le);return}}Q(ie,-1)},[g,M,i]),B=x.useCallback(function(Q,ie,le){var fe=N(),de=fe?.querySelector('[data-key="'+ie+'"]');if(le&&fe){var ge=fe.scrollHeight,Ae=fe.clientHeight;fe.scrollTop=Q==="top"?ge-Ae:0;return}if(de&&fe&&!KIt(de,fe,Q)){var Fe=TOt(de);YIt(fe,Q,Fe)}},[N]),V=x.useCallback(function(Q){F(function(ie,le){var fe=le+2>ie.length,de=fe?0:le+1,ge=ie[de];Vg(ge)||(_(ge[i]),h?.(ge[i],Q),B("bottom",ge[i],fe))})},[h,F,B,i]),W=x.useCallback(function(Q){F(function(ie,le){var fe=le===0,de=fe?ie.length-1:le-1,ge=ie[de];Vg(ge)||(_(ge[i]),h?.(ge[i],Q),B("top",ge[i],fe))})},[h,F,B,i]),$=x.useCallback(function(Q){var ie=cR(d)?d():d,le=ie?.querySelector('[data-layer="'+Q+'"]');if(le){var fe;return(fe=Array.from(le.querySelectorAll(o)))===null||fe===void 0?void 0:fe.map(function(de){var ge;return(ge=de.dataset)===null||ge===void 0?void 0:ge.key})}return null},[o,d]),X=x.useCallback(function(Q){var ie=E+1,le=$(ie);le&&(I(le),S(ie),_(le[0]),h?.(le[0],Q))},[h,$,E]),re=x.useCallback(function(Q){var ie=E-1,le=$(ie);if(le){var fe;I(le),S(ie);var de=hK(c,function(Ae){return Ae[i]===g}),ge=de==null||(fe=de.parent)===null||fe===void 0?void 0:fe[i];ge&&(_(ge),h?.(ge,Q))}},[h,c,g,$,E,i]),ae=x.useCallback(function(Q){var ie;WIt(Q,(ie={down:V,up:W},ie[f?"left":"right"]=X,ie[f?"right":"left"]=re,ie))},[X,V,re,W,f]);return{focusItemValue:g,setFocusItemValue:_,layer:E,setLayer:S,keys:O,setKeys:I,onKeyDown:ae}},XIt=function(t){var r=t.toggle,n=r===void 0?!0:r,i=t.triggerRef,a=t.targetRef,o=t.overlayRef,s=t.searchInputRef,l=t.active,c=t.onExit,d=t.onOpen,f=t.onClose,h=t.onKeyDown,p=t.onMenuKeyDown,g=t.onMenuPressEnter,_=t.onMenuPressBackspace,b=x.useCallback(function(){var O,I;(O=i.current)===null||O===void 0||(I=O.close)===null||I===void 0||I.call(O),f?.()},[f,i]),E=x.useCallback(function(){var O,I;(O=i.current)===null||O===void 0||(I=O.open)===null||I===void 0||I.call(O),d?.()},[d,i]),S=x.useCallback(function(){if(l){b();return}E()},[l,E,b]),P=x.useCallback(function(O){if(O.target===a?.current&&(n&&O.key===Ns.ENTER&&S(),O.key===Ns.BACKSPACE&&c?.(O)),o!=null&&o.current&&(p?.(O),O.key===Ns.ENTER&&g?.(O),O.key===Ns.BACKSPACE&&O.target!==s?.current&&_?.(O),O.key.length===1&&/\w/.test(O.key))){var I;if(((I=O.target)===null||I===void 0?void 0:I.tagName)!=="INPUT"){var N;s==null||(N=s.current)===null||N===void 0||N.focus()}}(O.key===Ns.ESC||O.key===Ns.TAB)&&b(),h?.(O)},[b,S,o,c,h,p,_,g,n,a,s]);return P};function utr(e){var t=e.labelKey,r=e.data,n=e.searchBy,i=e.callback,a=x.useState(""),o=a[0],s=a[1],l=x.useCallback(function(g,_){var b=g?.[t],E=Vg(_)?o:_;return typeof n=="function"?n(E,b,g):MOe(b,E)},[t,n,o]),c=x.useCallback(function(g){h(hF(g,function(_){return l(_)}))},[l]),d=x.useState(hF(r,function(g){return l(g)})),f=d[0],h=d[1],p=function(_,b){var E=hF(r,function(S){return l(S,_)});h(E),s(_),i?.(_,E,b)};return{searchKeyword:o,filteredData:f,updateFilteredData:c,setSearchKeyword:s,checkShouldDisplay:l,handleSearch:p}}function ZIt(e,t){var r=t.triggerRef,n=t.overlayRef,i=t.targetRef,a=t.rootRef,o=t.listRef,s=t.inline,l=x.useCallback(function(){var f;r==null||(f=r.current)===null||f===void 0||f.open()},[r]),c=x.useCallback(function(){var f;r==null||(f=r.current)===null||f===void 0||f.close()},[r]),d=x.useCallback(function(){var f;r==null||(f=r.current)===null||f===void 0||f.updatePosition()},[r]);x.useImperativeHandle(e,function(){return s?{get root(){var f,h;return a!=null&&a.current?a?.current:(f=r==null||(h=r.current)===null||h===void 0?void 0:h.root)!==null&&f!==void 0?f:null},get list(){if(!(o!=null&&o.current))throw new Error("The list is not found, please set `virtualized` for the component.");return o?.current}}:{get root(){var f,h;return(f=a?.current||(r==null||(h=r.current)===null||h===void 0?void 0:h.root))!==null&&f!==void 0?f:null},get overlay(){var f;if(!(n!=null&&n.current))throw new Error("The overlay is not found. Please confirm whether the picker is open.");return(f=n?.current)!==null&&f!==void 0?f:null},get target(){var f;return(f=i?.current)!==null&&f!==void 0?f:null},get list(){if(!(o!=null&&o.current))throw new Error(`
222            The list is not found.
223            1.Please set virtualized for the component.
224            2.Please confirm whether the picker is open.
225          `);return o?.current},updatePosition:d,open:l,close:c}})}var LOe=ve({},uOe,{classPrefix:xe.string,className:xe.string,style:xe.object,locale:xe.any,appearance:xe.oneOf(["default","subtle"]),block:xe.bool,containerPadding:xe.number,container:xe.oneOfType([xe.any,xe.func]),disabled:xe.bool,menuClassName:xe.string,menuStyle:xe.object,placeholder:xe.node,placement:xe.oneOf(eTt),preventOverflow:xe.bool,open:xe.bool,defaultOpen:xe.bool,cleanable:xe.bool,renderExtraFooter:xe.func,renderValue:xe.func,onOpen:xe.func,onClose:xe.func,onClean:xe.func,listProps:xe.any}),dtr=ve({},LOe,{data:xe.array.isRequired,valueKey:xe.string,labelKey:xe.string,childrenKey:xe.string,disabledItemValues:xe.array,value:xe.any,defaultValue:xe.any,onChange:xe.func});function QIt(e,t){e===void 0&&(e=[]),t===void 0&&(t=[]);var r=$C(e,t);return r.length===t.length}function FOe(e,t,r){t===void 0&&(t="children");var n=[],i=function a(o,s){S4(o)&&o.forEach(function(l,c){var d=typeof r=="function"?r(l,c):l;n.push(qRe(d,s)),l[t]&&a(l[t],l)})};return i(e,null),n}function JIt(e,t,r){var n=[],i=function a(o){var s;if(o!=null&&(s=o.parent)!==null&&s!==void 0&&s.refKey){var l;a(e[o.parent.refKey]),n.push(o==null||(l=o.parent)===null||l===void 0?void 0:l[r])}};return i(t),n}function ftr(e,t){return Array.isArray(e[t])?e[t].some(function(r){return r.visible}):!1}function htr(e,t){var r=t.valueKey,n=t.defaultExpandAll,i=t.childrenKey,a=t.defaultExpandItemValues,o=a===void 0?[]:a;return n?FOe(e,i).filter(function(s){return Array.isArray(s[i])&&s[i].length>0}).map(function(s){return s[r]}):o}function hK(e,t){var r=function n(i){i===void 0&&(i=[]);for(var a=0;a<i.length;a+=1){var o=i[a];if(S4(o.children)){var s=n(o.children);if(s)return s}if(t(o))return o}};return r(e)}function hF(e,t){var r=function n(i){i===void 0&&(i=[]);for(var a=[],o=0;o<i.length;o+=1){if(S4(i[o].children)){var s=n(i[o].children);if(s.length){var l=Pz(i[o]);l.children=s,a.push(l);continue}}t(i[o])&&a.push(i[o])}return a};return r(e)}var ptr=function(t,r,n){var i=r.disabledItemValues,a=r.valueKey,o=r.childrenKey,s=r.expandItemValues,l=[],c=function d(f){f.forEach(function(h){var p=i.some(function(_){return Kf(_,h[a])});!p&&h.visible&&l.push(h);var g=n?!0:s.includes(h[a]);h[o]&&g&&d(h[o])})};return c(t),l},BOe=function(t,r,n){var i=-1;return r.forEach(function(a,o){Kf(a[n],t)&&(i=o)}),i},mtr=function(t,r,n){var i=null,a=Object.values(r).find(function(o){return Kf(o[n],t)});return a&&(i=a),i},e3t=function(t,r,n){var i=r[t];return i instanceof Element?i.querySelector(n):null},zOe=function(t,r,n){var i,a=e3t(t,r,n);a==null||(i=a.focus)===null||i===void 0||i.call(a)},vtr=function(t){var r=t.focusItemValue,n=t.focusableItems,i=t.treeNodesRefs,a=t.selector,o=t.valueKey,s=t.callback,l=BOe(r,n,o);if(n.length!==0){var c=l===n.length-1?0:l+1,d=n[c][o];s?.(d),zOe(n[c].refKey,i,a)}},gtr=function(t){var r=t.focusItemValue,n=t.focusableItems,i=t.treeNodesRefs,a=t.selector,o=t.valueKey,s=t.callback,l=BOe(r,n,o);if(n.length!==0){var c=l===0?n.length-1:l-1;c=c>=0?c:0;var d=n[c][o];s?.(d),zOe(n[c].refKey,i,a)}};function ytr(e){var t=e.focusItem,r=e.expand,n=e.onExpand,i=e.onFocusItem;JG(t)||(r?n(ve({},t,{expand:r})):t!=null&&t.parent&&i())}function _tr(e){var t=e.focusItem,r=e.expand,n=e.childrenKey,i=e.onExpand,a=e.onFocusItem;JG(t)||!Array.isArray(t[n])||(r?a():i(ve({},t,{expand:r})))}var t3t=function(t,r,n){return t.filter(function(i){return i.visible}).findIndex(function(i){return i[n]===r})};function btr(e,t){return UOe(e)?!0:t}function Etr(e){var t=e.node,r=e.isExpand,n=e.expandItemValues,i=e.valueKey,a=new Set(n);return r?a.add(t[i]):a.delete(t[i]),Array.from(a)}
225function HOe(e,t){return!li(t.refKey)&&li(e[t.refKey])?[]:Object.values(e).filter(function(r){var n;return(r==null||(n=r.parent)===null||n===void 0?void 0:n.refKey)===t.refKey&&r.refKey&&!e[r.refKey].uncheckable})}function wtr(e){var t=e.data,r=e.labelKey,n=e.valueKey,i=e.childrenKey,a=e.uncheckableItemValues,o=a===void 0?[]:a,s=e.callback,l=x.useState(Object.create(null)),c=l[1],d=x.useCallback(function(){c(Object.create(null))},[c]),f=x.useRef({}),h=x.useCallback(function(b,E,S){if(S===void 0&&(S=1),!Array.isArray(b)||b.length===0)return[];b.map(function(P){var O,I=P[n],N=VOe(I);P.refKey=N,f.current[N]=ve((O={layer:S},O[r]=P[r],O[n]=P[n],O.uncheckable=o.some(function(M){return Kf(P[n],M)}),O),P),E&&(f.current[N].parent=Em(E,"parent","children")),h(P[i],P,S+1)}),s?.(f.current)},[i,n,r,s,o]),p=x.useCallback(function(b,E){var S=[];return Object.keys(b).forEach(function(P){var O=b[P];if(!li(O.parent)&&!li(O.parent.refKey)){var I=b[O.parent.refKey];O[E]&&(I!=null&&I.checkAll?I!=null&&I.uncheckable&&S.push(b[P][n]):S.push(b[P][n]))}else O[E]&&S.push(b[P][n])}),S},[n]),g=x.useCallback(function(b){var E=b.nodes,S=b.key,P=b.value,O=P===void 0?[]:P,I=b.cascade,N=b.uncheckableItemValues;
225Object.keys(E).forEach(function(M){var F=E[M];I&&!li(F.parent)&&!li(F.parent.refKey)?F[S]=E[F.parent.refKey][S]:F[S]=!1,O.forEach(function(B){Kf(E[M][n],B)&&!N.some(function(V){return Kf(B,V)})&&(E[M][S]=!0)})})},[n]),_=function(E,S,P,O){var I=O.cascade,N=O.searchKeyword;return FOe(S,i,function(M){var F={},B=E?.[M.refKey],V=JIt(E,B,n),W=B!=null&&B.parent?QIt(P,V):!0;if(UOe(N)&&(W=M.visible),B){var $=Vg(I)?void 0:WRe({node:B,cascade:I,nodes:E,childrenKey:i});F=ve({},M,{check:B.check,uncheckable:B.uncheckable,hasChildren:!!M[i],layer:B.layer,parent:B.parent,checkState:$,visible:W})}return F})};return x.useEffect(function(){f.current={},h(t)},[t]),{forceUpdate:d,flattenNodes:f.current,flattenTreeData:h,serializeListOnlyParent:p,unSerializeList:g,formatVirtualizedTreeData:_}}function Str(){var e=x.useRef({}),t=function(n,i){li(i)||(e.current[i]=n)};return{treeNodesRefs:e.current,saveTreeNodeRef:t}}function Ctr(e){var t=e.labelKey,r=e.childrenKey,n=e.searchKeyword,i=e.data,a=e.searchBy,o=e.callback,s=x.useCallback(function(b,E){var S=function(O){return O.forEach(function(I){I.visible=a?a(E,I[t],I):MOe(I[t],E),S4(I[r])&&(s(I[r],E),I[r].forEach(function(N){N.visible&&(I.visible=N.visible)}))})};return S(b),b},[r,t,a]),l=x.useState(function(){return n??""}),c=l[0],d=l[1],f=x.useState(function(){return s(i,c)}),h=f[0],p=f[1],g=x.useCallback(function(b,E){p(s(b,E))},[s]),_=function(E,S){var P=s(i,E);p(P),d(E),o?.(E,P,S)};return{searchKeywordState:c,filteredData:h,setFilteredData:g,setSearchKeyword:d,handleSearch:_}}function xtr(e,t,r){var n=x.useState([]),i=n[0],a=n[1],o=x.useState(e),s=o[0],l=o[1],c=x.useCallback(function(f,h){var p=f[t];f=hK(s,function(_){return p===_[t]}),f[r]=h;var g=s.concat([]);return l(g),g},[s,t,r]),d=x.useCallback(function(f,h){a(function(g){return g.concat(f[t])});var p=h(f);p instanceof Promise?p.then(function(g){var _=c(f,g);l(_),a(function(b){return b.filter(function(E){return!Kf(E,f[t])})})}):(l(c(f,p)),a(function(g){return g.filter(function(_){return!Kf(_,f[t])})}))},[c,t]);return{data:s,setData:l,loadingNodeValues:i,loadChildren:d}}function Ttr(e){var t,r=e.list,n=e.valueKey,i=e.activeNode,a=e.virtualized,o=e.container,s=e.selector,l=e.formattedNodes;if(o){if(a&&i){var c,d=t3t(l,i?.[n],n);(c=r.scrollToRow)===null||c===void 0||c.call(r,d);return}var f=o.querySelector(s);f&&(f==null||(t=f.focus)===null||t===void 0||t.call(f))}}function UOe(e){return!JG(e)}function Atr(e,t,r){var n;r===void 0&&(r=!1);var i=t*tTt+rTt;if(r){var a;return a={},a[e?"right":"left"]=i,a}return n={},n[e?"paddingRight":"paddingLeft"]=i,n}function VOe(e){return(typeof e=="number"?"Number_":"String_")+e}function qOe(e,t){return t===void 0&&(t=!1),typeof e=="string"?(t&&(e=e.replace(/left|right/,function(r){return r==="left"?"right":"left"})),e.replace(/Left|Top/,"Start").replace(/Right|Bottom/,"End")):e}var r3t=function(t){return t&&("current"in t?t.current:t)};function Qf(e){var t=e?.root||e?.child||r3t(e);return t!=null&&t.nodeType&&typeof t?.nodeName=="string"?t:vo.findDOMNode(t)}var rfe=function(t){return!t||typeof t=="function"?t:function(r){t.current=r}};function kd(e,t){var r=rfe(e),n=rfe(t);return function(i){typeof r=="function"&&r(i),typeof n=="function"&&n(i)}}const W1=(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduce(function(i,a){return a(i)},n)}});function n3t(e,t,r,n){r===void 0&&(r=!0);var i=Xf(e),a=function o(){Xf(e,i>t?t:i),i<=t&&Mde(o),i+=20};r?Mde(a):Xf(e,t)}function BS(e){var t=e.date,r=e.formatStr,n=ef("Calendar"),i=n.formatDate;return u.createElement(u.Fragment,null,i(t,r))}var i3t=parseInt(u.version),pF=M7e;function a3t(e,t){var r=document.createElement("div");r.className="rs-mount-element";var n=t||document.body;if(n.appendChild(r),i3t>=18){vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint=!0;var i=pF.createRoot,a=n.__root||i(r,{identifierPrefix:"rs-root-"});return a.render(e),n.__root=a,a}return pF.render(e,r),{unmount:function(){pF.unmountComponentAtNode(r),n.removeChild(r)}}}function Ya(e){var t=x.useContext(lK)||{},r=t.classPrefix,n=r===void 0?"rs":r,i=Zy(n,e),a=x.useCallback(function(){var l=arguments.length?Id.apply(void 0,arguments).split(" ").map(function(c){return Zy(i,c)}):[];return l.filter(function(c){return c}).join(" ")},[i]),o=x.useCallback(function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=a(c);return f?i+" "+f:i},[i,a]),s=function(){var c=arguments.length?Id.apply(void 0,arguments).split(" ").map(function(d){return Zy(n,d)}):[];return c.filter(function(d){return d}).join(" ")};return{withClassPrefix:o,merge:Id,prefix:a,rootPrefix:s}}function jOe(e,t){var r=x.useRef();x.useEffect(function(){if(!r.current){var n=typeof e=="function"?e():e;
225n&&(r.current=new iOe(t),r.current.observe(n))}return function(){var i;(i=r.current)===null||i===void 0||i.disconnect()}},[e,t])}var o3t=u.memo(function(e){var t=e.children,r=e.container,n=x.useState(!1),i=n[0],a=n[1];return x.useEffect(function(){return a(!0)},[]),r&&i?vo.createPortal(t,r):null});function $Oe(e){e===void 0&&(e={});var t=e,r=t.container,n=t.waitMount,i=n===void 0?!1:n,a=x.useRef(Ih?document.body:null);x.useEffect(function(){var l=typeof r=="function"?r():r,c=l||document.body;a.current=c},[a,r]);var o=x.useCallback(function(l){var c=l.children;return a.current!=null?vo.createPortal(c,a.current):null},[]),s=x.useCallback(function(l){return u.createElement(o3t,ve({container:a.current},l))},[]);return{target:a.current,Portal:i?s:o}}function WOe(e,t){var r=x.useRef(!1);r.current=e!==void 0;var n=x.useState(t),i=n[0],a=n[1],o=r.current?e:i,s=x.useCallback(function(l){r.current||a(l)},[r]);return[o,s,r.current]}function s3t(e){return e?.button===0}function l3t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e!=null&&e.shiftKey)}function c3t(e,t){var r=t.disabled,n=t.triggerTarget,i=t.overlayTarget,a=t.listenEscape,o=a===void 0?!0:a,s=x.useCallback(function(c){o&&c.key===Ns.ESC&&e?.(c)},[o,e]),l=x.useCallback(function(c){var d=Qf(n),f=Qf(i);d&&TI(d,c.target)||f&&TI(f,c.target)||l3t(c)||!s3t(c)||e?.(c)},[e,n,i]);x.useEffect(function(){var c=Qf(n);if(!(r||!c)){var d=j1(c),f=$1(d,"mousedown",l,!0),h=$1(d,"keyup",s);return function(){f?.off(),h?.off()}}},[n,r,e,l,s])}var GOe=function(t,r){var n=x.useRef(!0);x.useEffect(function(){if(n.current){n.current=!1;return}t()},r)},u3t=function(t){var r=x.useRef(t);r.current=t,x.useEffect(function(){var n;(n=r.current)===null||n===void 0||n.call(r)},[])},d3t=u.createContext(null);function nfe(e){return!e||e.trim()==="#"}var pK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"a":r,i=e.href,a=e.disabled,o=e.onClick,s=Yr(e,["as","href","disabled","onClick"]),l=x.useCallback(function(d){if((a||nfe(i))&&d.preventDefault(),a){d.stopPropagation();return}o?.(d)},[a,i,o]),c=nfe(i)?{role:"button",href:"#"}:null;return a&&(s.tabIndex=-1,s["aria-disabled"]=!0),u.createElement(n,ve({ref:t,href:i},c,s,{onClick:l}))});pK.displayName="SafeAnchor";pK.propTypes={href:xe.string,disabled:xe.bool,as:xe.elementType};var f3t=function(t,r){var n=Yf(t),i=(r.pageX||0)-n.left,a=(r.pageY||0)-n.top,o=Math.max(n.width-i,i),s=Math.max(n.height-a,a),l=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));return{width:l*2,height:l*2,left:i-l,top:a-l}},mK=u.forwardRef(function(e,t){var r=ef(),n=r.disableRipple,i=e.as,a=i===void 0?"span":i,o=e.className,s=e.classPrefix,l=s===void 0?"ripple":s,c=e.onMouseDown,d=Yr(e,["as","className","classPrefix","onMouseDown"]),f=Ya(l),h=f.merge,p=f.prefix,g=f.withClassPrefix,_=h(o,p("pond")),b=x.useRef(null),E=x.useState(!1),S=E[0],P=E[1],O=x.useState(),I=O[0],N=O[1],M=function(){P(!1)},F=x.useCallback(function(B){if(b.current){var V=f3t(b.current,B);P(!0),N(V),c?.(V,B)}},[c]);return x.useEffect(function(){var B,V=(B=b.current)===null||B===void 0?void 0:B.parentNode;if(V){var W=$1(V,"mousedown",F);return function(){W?.off()}}},[F]),n?null:u.createElement(a,ve({},d,{className:_,ref:kd(b,t)}),u.createElement($_,{in:S,enteringClassName:p("rippling"),onEntered:M},function(B,V){var W=B.className,$=Yr(B,["className"]);return u.createElement("span",ve({},$,{ref:V,className:h(g(),W),style:I}))}))});mK.displayName="Ripple";mK.propTypes={classPrefix:xe.string,className:xe.string,onMouseDown:xe.func};var ife,Jf=u.forwardRef(function(e,t){var r=e.as,n=e.active,i=e.appearance,a=i===void 0?"default":i,o=e.block,s=e.className,l=e.children,c=e.classPrefix,d=c===void 0?"btn":c,f=e.color,h=e.disabled,p=e.loading,g=e.ripple,_=g===void 0?!0:g,b=e.size,E=e.type,S=Yr(e,["as","active","appearance","block","className","children","classPrefix","color","disabled","loading","ripple","size","type"]),P=x.useContext(d3t),O=b??P?.size,I=Ya(d),N=I.withClassPrefix,M=I.prefix,F=I.merge,B=F(s,N(a,f,O,{active:n,disabled:h,loading:p,block:o})),V=_&&!Sf(a,["link","ghost"])?u.createElement(mK,null):null,W=u.createElement("span",{className:M(ife||(ife=fV(["spin"])))});if(S.href)return u.createElement(pK,ve({},S,{as:r,ref:t,"aria-disabled":h,disabled:h,className:B}),p&&W,l,V);var $=r||"button",X=E||($==="button"?"button":void 0),re=S.role||($!=="button"?"button":void 0);return u.createElement($,ve({},S,{role:re,type:X,ref:t,disabled:h,"aria-disabled":h,className:B}),p&&W,l,V)});Jf.displayName="Button";
225Jf.propTypes={as:xe.elementType,active:xe.bool,appearance:xe.oneOf(["default","primary","link","subtle","ghost"]),block:xe.bool,children:xe.node,color:xe.oneOf(["red","orange","yellow","green","cyan","blue","violet"]),disabled:xe.bool,href:xe.string,loading:xe.bool,ripple:xe.bool,size:xe.oneOf(["lg","md","sm","xs"]),type:xe.oneOf(["button","reset","submit"])};var RI=u.forwardRef(function(e,t){var r=e.icon,n=e.placement,i=n===void 0?"left":n,a=e.children,o=e.circle,s=e.classPrefix,l=s===void 0?"btn-icon":s,c=e.className,d=Yr(e,["icon","placement","children","circle","classPrefix","className"]),f=Ya(l),h=f.merge,p=f.withClassPrefix,g=h(c,p("placement-"+i,{circle:o,"with-text":typeof a<"u"}));return u.createElement(Jf,ve({},d,{ref:t,className:g}),r,a)});RI.displayName="IconButton";RI.propTypes={className:xe.string,icon:xe.any,classPrefix:xe.string,circle:xe.bool,children:xe.node,placement:xe.oneOf(["left","right"])};var mF,afe;function h3t(){if(afe)return mF;afe=1;var e=kOe(),t=NOe(),r=DOe(),n=e0();function i(a){return function(o){o=n(o);var s=t(o)?r(o):void 0,l=s?s[0]:o.charAt(0),c=s?e(s,1).join(""):o.slice(1);return l[a]()+c}}return mF=i,mF}var vF,ofe;function p3t(){if(ofe)return vF;ofe=1;var e=h3t(),t=e("toUpperCase");return vF=t,vF}var gF,sfe;function KOe(){if(sfe)return gF;sfe=1;var e=e0(),t=p3t();function r(n){return t(e(n).toLowerCase())}return gF=r,gF}var m3t=KOe();const Nd=et(m3t);var yF,lfe;function v3t(){if(lfe)return yF;lfe=1;var e=n_e(),t=MRe(),r=Qj(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return yF=i,yF}var _F,cfe;function vK(){if(cfe)return _F;cfe=1;var e=J3(),t=E4(),r=eK(),n=e5(),i=v3t(),a=Qj(),o=200;function s(l,c,d){var f=-1,h=t,p=l.length,g=!0,_=[],b=_;if(d)g=!1,h=r;else if(p>=o){var E=c?null:i(l);if(E)return a(E);g=!1,h=n,b=new e}else b=c?[]:_;e:for(;++f<p;){var S=l[f],P=c?c(S):S;if(S=d||S!==0?S:0,g&&P===P){for(var O=b.length;O--;)if(b[O]===P)continue e;c&&b.push(P),_.push(S)}else h(b,P,d)||(b!==_&&b.push(P),_.push(S))}return _}return _F=s,_F}var bF,ufe;function g3t(){if(ufe)return bF;ufe=1;var e=vK();function t(r){return r&&r.length?e(r):[]}return bF=t,bF}var y3t=g3t();const gK=et(y3t);var EF={},dfe;function _3t(){return dfe||(dfe=1,(function(e){function t(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(f){return typeof f}:t=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(Dt());function n(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return n=function(){return c},c}function i(c){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var d=n();if(d&&d.has(c))return d.get(c);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var g=h?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(f,p,g):f[p]=c[p]}return f.default=c,d&&d.set(c,f),f}function a(){return a=Object.assign||function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(c[h]=f[h])}return c},a.apply(this,arguments)}function o(c,d){return r.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",ref:d},c),r.createElement("path",{d:"M1 4v8.5a.5.5 0 00.5.5H8c0-.128.049-.256.146-.354.555-.555.854-1.6.854-3.146a.5.5 0 01.621-.485l.119.03A2.623 2.623 0 0012.999 6.5V4h-12zm3-2h6V0h1v2h1.5A1.5 1.5 0 0114 3.5v3a3.623 3.623 0 01-4.015 3.603c-.064 1.245-.335 2.212-.831 2.898H12.5a.5.5 0 00.5-.5v-2a.5.5 0 011 0v2a1.5 1.5 0 01-1.5 1.5h-11a1.5 1.5 0 01-1.5-1.5v-9a1.5 1.5 0 011.5-1.5H3v-2h1v2zm5 4V5h1v1h2v1h-2v1H9V7H7v2h1v1H7v2H6v-2H4v2H3v-2H1V9h2V7H1V6h2V5h1v1h2V5h1v1h2zM6 9V7H4v2h2z"}))}var s=r.forwardRef(o),l=s;e.default=l})(EF)),EF}var b3t=_3t();const E3t=et(b3t);var w3t=j_({as:E3t,ariaLabel:"calendar",category:"",displayName:"Calendar"}),YOe=u.createContext({}),S3t=YOe.Provider,y0=function(){return x.useContext(YOe)||{}},yK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-month-dropdown-cell":a,s=e.active,l=e.disabled,c=e.month,d=c===void 0?0:c,f=e.year,h=Yr(e,["as","className","classPrefix","active","disabled","month","year"]),p=y0(),g=p.date,_=p.onChangeMonth,b=x.useCallback(function(N){if(!l&&f&&d&&g){var M=W1(function(F){return cPt(F,f)},function(F){return eRe(F,d-1)})(g);
225_?.(M,N)}},[g,l,d,_,f]),E=Ya(o),S=E.prefix,P=E.merge,O=E.withClassPrefix,I=P(i,O({active:s}),{disabled:l});return u.createElement(n,ve({},h,{ref:t,className:I,onClick:b,key:d,tabIndex:-1}),u.createElement("span",{className:S("content")},d))});yK.displayName="MonthDropdownItem";yK.propTypes={month:xe.number,year:xe.number,className:xe.string,classPrefix:xe.string,active:xe.bool,disabled:xe.bool};var C3t=[0,1,2,3,4,5,6,7,8,9,10,11];function x3t(e,t,r){for(var n=JPe(new Date(e,t)),i=1;i<=n;i++)if(!r(new Date(e,t,i)))return!1;return!0}var _K=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-month-dropdown":a,s=e.limitStartYear,l=e.limitEndYear,c=l===void 0?5:l,d=e.show,f=e.height,h=f===void 0?221:f,p=e.width,g=p===void 0?256:p,_=e.disabledMonth,b=Yr(e,["as","className","classPrefix","limitStartYear","limitEndYear","show","height","width","disabledMonth"]),E=y0(),S=E.date,P=S===void 0?new Date:S,O=Ya(o),I=O.prefix,N=O.merge,M=O.withClassPrefix,F=UL(new Date),B=s?F-s:1900,V=x.useMemo(function(){var ie=F+c;return ie-B},[c,B,F]),W=x.useCallback(function(ie,le){return _?x3t(ie,le,_):!1},[_]),$=x.useCallback(function(ie){var le=ie.index,fe=ie.style,de=cAt(P),ge=UL(P),Ae=B+le,Fe=Ae===ge,Pe=I("year",{"year-active":Fe}),ce=N(I("row"),{"first-row":le===0,"last-row":le===V-1});return u.createElement("div",{className:ce,role:"row",style:fe},u.createElement("div",{className:Pe,role:"rowheader"},Ae),u.createElement("div",{className:I("list"),role:"gridcell"},C3t.map(function(pe,Ne){return u.createElement(yK,{disabled:W(Ae,Ne),active:Fe&&Ne===de,key:Ne+"_"+pe,month:Ne+1,year:Ae})})))},[P,W,N,I,V,B]),X=N(i,M(),{show:d}),re=75,ae=UL(P)-B,Q=re*ae;return u.createElement(n,ve({role:"menu"},b,{ref:t,className:X}),u.createElement("div",{className:I("content")},u.createElement("div",{className:I("scroll")},d&&u.createElement(AOt,{defaultHeight:h,defaultWidth:g},function(ie){var le=ie.height,fe=ie.width;return u.createElement(BOt,{className:I("row-wrapper"),width:fe||g,height:le||h,itemSize:re,itemCount:V,initialScrollOffset:Q},$)}))))});_K.displayName="MonthDropdown";_K.propTypes={limitEndYear:xe.number,className:xe.string,classPrefix:xe.string,show:xe.bool,disabledMonth:xe.func};var wF,ffe;function T3t(){if(ffe)return wF;ffe=1;var e=bm(),t=VRe(),r=QG(),n=w4(),i=32,a=e(function(o,s){var l=n(s,r(a));return t(o,i,void 0,s,l)});return a.placeholder={},wF=a,wF}var A3t=T3t();const bK=et(A3t);var SF,hfe;function P3t(){if(hfe)return SF;hfe=1;var e=KOe(),t=lOe(),r=t(function(n,i,a){return i=i.toLowerCase(),n+(a?e(i):i)});return SF=r,SF}var R3t=P3t();const pfe=et(R3t);function O3t(e){return{hours:{start:0,end:e?11:23},minutes:{start:0,end:59},seconds:{start:0,end:59}}}function I3t(e){return e>=12?e-12:e}var mfe=function(t){var r=t.format,n=t.date,i=t.showMeridian,a=n||new Date,o={};if(!r)return o;if(/(H|h)/.test(r)){var s=_2(a);o.hours=i?I3t(s):s}return/m/.test(r)&&(o.minutes=jG(a)),/s/.test(r)&&(o.seconds=$G(a)),o},k3t=function(t,r){r&&Object.entries(t).forEach(function(n){var i=n[0],a=n[1],o=r.querySelector('[data-type="'+i+'"]'),s=o?.querySelector('[data-key="'+i+"-"+a+'"]');if(s&&o){var l=cOe(s,o);l&&n3t(o,l.top,Xf(o)!==0)}})},EK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-time-dropdown":a,s=e.show,l=e.showMeridian,c=l===void 0?!1:l,d=Yr(e,["as","className","classPrefix","show","showMeridian"]),f=y0(),h=f.locale,p=f.format,g=f.date,_=f.onChangeTime,b=x.useRef(null);x.useEffect(function(){var B=mfe({format:p,date:g,showMeridian:c});s&&b.current&&k3t(B,b.current)},[g,p,s,c]);var E=function(V,W,$){var X=g||new Date;switch(V){case"hours":X=QPe(g,c&&_2(X)>=12?W+12:W);break;case"minutes":X=sPt(g,W);break;case"seconds":X=lPt(g,W);break}_?.(X,$)},S=Ya(o),P=S.prefix,O=S.rootPrefix,I=S.merge,N=function(V,W){if(!yOe(W))return null;for(var $=O3t(c)[V],X=$.start,re=$.end,ae=[],Q=e[pfe("hide_"+V)],ie=e[pfe("disabled_"+V)],le=X;le<=re;le+=1)if(!(Q!=null&&Q(le,g))){var fe=ie?.(le,g),de=P("cell",{"cell-active":W===le,"cell-disabled":fe});ae.push(u.createElement("li",{key:le,role:"menuitem"},u.createElement("a",{role:"button",className:de,tabIndex:-1,"data-key":V+"-"+le,onClick:fe?void 0:bK(E,V,le)},c&&V==="hours"&&le===0?"12":le)))}return u.createElement("div",{className:P("column"),role:"listitem"},u.createElement("div",{className:P("column-title")},h?.[V]),u.createElement("ul",{"data-type":V,role:"menu"},ae))},M=mfe({format:p,date:g,showMeridian:c}),F=I(i,O(o));return u.createElement(n,ve({role:"list"},TRe(d),{ref:t,className:F}),u.createElement("div",{className:P("content")},u.createElement("div",{className:P("row"),ref:b},N("hours",M.hours),N("minutes",M.minutes),N("seconds",M.seconds))))});EK.displayName="TimeDropdown";EK.propTypes={show:xe.bool,showMeridian:xe.bool,className:xe.string,classPrefix:xe.string,disabledDate:xe.func,disabledHours:xe.func,disabledMinutes:xe.func,disabledSeconds:xe.func,hideHours:xe.func,hideMinutes:xe.func,hideSeconds:xe.func};var wK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-table":a,s=e.weekendDate,l=s===void 0?new Date:s,c=Yr(e,["as","className","classPrefix","weekendDate"]),d=y0(),f=d.date,h=f===void 0?new Date:f,p=d.dateRange,g=d.disabledDate,_=d.hoverRangeValue,b=d.inSameMonth,E=d.isoWeek,S=d.onMouseMove,P=d.onSelect,O=d.renderCell,I=d.locale,N=d.showWeekNumbers,M=ef("Calendar",I),F=M.locale,B=M.formatDate,V=Ya(o),W=V.prefix,$=V.merge,X=x.useCallback(function(Q,ie,le){ie||P?.(Q,le)},[P]),re=function(){for(var ie=F.formattedDayPattern,le=[],fe=p||[],de=fe[0],ge=fe[1],Ae=_??[],Fe=Ae[0],Pe=Ae[1],ce=typeof p<"u",pe=new Date,Ne=0;Ne<7;Ne+=1){var De=Od(l,Ne),Ve=g?.(De,p,Zv.CALENDAR),Ke=Ff(De,pe),Qe=!(b!=null&&b(De)),Ue=!Qe&&de&&Ff(De,de),ut=!Qe&&ge&&Ff(De,ge),We=ce?Ue||ut:Ff(De,h),ke=!1;de&&ge&&(zv(De,ge)&&Bv(De,de)&&(ke=!0),zv(De,de)&&Bv(De,ge)&&(ke=!0)),!We&&Fe&&Pe&&(!Bv(De,Pe)&&!zv(De,Fe)&&(ke=!0),!Bv(De,Fe)&&!zv(De,Pe)&&(ke=!0));var Le=W("cell",{"cell-un-same-month":Qe,"cell-is-today":Ke,"cell-selected":We,"cell-selected-start":Ue,"cell-selected-e
225nd":ut,"cell-in-range":!Qe&&ke,"cell-disabled":Ve}),Be=B?B(De,ie):pV(De,ie);le.push(u.createElement("div",{role:"gridcell",key:Be,"aria-label":Be,"aria-selected":We||void 0,className:Le},u.createElement("div",{role:"button",className:W("cell-content"),tabIndex:-1,title:Ke?Be+" ("+F?.today+")":Be,onMouseEnter:!Ve&&S?S.bind(null,De):void 0,onClick:bK(X,De,Ve)},u.createElement("span",{className:W("cell-day")},lAt(De)),O&&O(De))))}return le},ae=$(i,W("row"));return u.createElement(n,ve({},c,{ref:t,role:"row",className:ae}),N&&u.createElement("div",{className:W("cell-week-number"),role:"rowheader"},pV(l,E?"I":"w")),re())});wK.displayName="CalendarTableRow";wK.propTypes={weekendDate:xe.instanceOf(Date),className:xe.string,classPrefix:xe.string};var vfe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],SK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-table":a,s=Yr(e,["as","className","classPrefix"]),l=y0(),c=l.locale,d=l.showWeekNumbers,f=l.isoWeek,h=Ya(o),p=h.merge,g=h.prefix,_=p(i,g("row","header-row")),b=vfe;return f&&(b=vfe.filter(function(E){return E!=="sunday"}),b.push("sunday")),u.createElement(n,ve({role:"row"},s,{ref:t,className:_}),d&&u.createElement("div",{className:g("header-cell"),role:"columnheader"}),b.map(function(E){return u.createElement("div",{key:E,className:g("header-cell"),role:"columnheader"},u.createElement("span",{className:g("header-cell-content")},c?.[E]))}))});SK.displayName="CalendarTableHeaderRow";SK.propTypes={as:xe.elementType,className:xe.string,classPrefix:xe.string};var CK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-table":a,s=e.rows,l=s===void 0?[]:s,c=Yr(e,["as","className","classPrefix","rows"]),d=Ya(o),f=d.merge,h=d.withClassPrefix,p=f(i,h());return u.createElement(n,ve({role:"grid"},c,{ref:t,className:p}),u.createElement(SK,null),l.map(function(g,_){return u.createElement(wK,{key:_,weekendDate:g})}))});CK.displayName="CalendarTable";CK.propTypes={rows:xe.array,className:xe.string,classPrefix:xe.string};var xK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-body":a,s=Yr(e,["as","className","classPrefix"]),l=y0(),c=l.date,d=c===void 0?new Date:c,f=l.isoWeek,h=l.locale,p=ef("Calendar",h),g=p.locale,_=p.formatDate,b=wRe(d,1),E=Ya(o),S=E.merge,P=E.withClassPrefix,O=S(i,P());return u.createElement(n,ve({},s,{ref:t,className:O}),u.createElement(CK,{rows:yPt(b,f),"aria-label":_(b,g.formattedMonthPattern)}))});xK.displayName="CalendarBody";xK.propTypes={as:xe.elementType,className:xe.string,classPrefix:xe.string};var TK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar-header":a,s=e.disabledBackward,l=e.disabledForward,c=e.showDate,d=e.showMeridian,f=e.showMonth,h=e.showTime,p=e.disabledTime,g=e.onMoveBackward,_=e.onMoveForward,b=e.onToggleMeridian,E=e.onToggleMonthDropdown,S=e.onToggleTimeDropdown,P=e.renderTitle,O=e.renderToolbar,I=Yr(e,["as","className","classPrefix","disabledBackward","disabledForward","showDate","showMeridian","showMonth","showTime","disabledTime","onMoveBackward","onMoveForward","onToggleMeridian","onToggleMonthDropdown","onToggleTimeDropdown","renderTitle","renderToolbar"]),N=y0(),M=N.locale,F=N.date,B=F===void 0?new Date:F,V=N.format,W=N.inline,$=N.disabledDate,X=Ya(o),re=X.prefix,ae=X.withClassPrefix,Q=X.merge,ie={appearance:"subtle",size:W?"sm":"xs"},le=x.useCallback(function(){var De=[];return V?(/([Hh])/.test(V)&&De.push(d?"hh":"HH"),/m/.test(V)&&De.push("mm"),/s/.test(V)&&De.push("ss"),De.join(":")):""},[V,d]),fe=x.useCallback(function(){return f?M?.formattedMonthPattern||"yyyy-MM":"yyyy"},[M,f]),de=x.useCallback(function(){var De;return(De=P?.(B))!==null&&De!==void 0?De:B&&u.createElement(BS,{date:B,formatStr:fe()})},[B,fe,P]),ge=re("title","title-date",{error:$?.(B)}),Ae=re("title","title-time",{error:p?.(B)}),Fe=re("backward",{"btn-disabled":s}),Pe=re("forward",{"btn-disabled":l}),ce=u.createElement("div",{className:re("month-toolbar")},u.createElement(RI,ve({},ie,{className:Fe,onClick:s?void 0:g,icon:u.createElement(gV,null)})),u.createElement(Jf,ve({},ie,{className:ge,onClick:E}),de()),u.createElement(RI,ve({},ie,{className:Pe,onClick:l?void 0:_,icon:u.createElement(yV,null)}))),pe=c||f,Ne=Q(i,ae({"has-month":pe,"has-time":h}));return u.createElement(n,ve({},I,{ref:t,className:Ne}),pe&&ce,h&&u.createElement("div",{className:re("time-toolbar")},u.createElement(Jf,ve({},ie,{className:Ae,onClick:S}),B&&u.createElement(BS,{date:B,formatStr:le()})),d&&u.createElement(Jf,ve({},ie,{className:re("meridian"),onClick:b}),B&&u.createElement(BS,{date:B,formatStr:"a"}))),O?.(B))});
225TK.displayName="CalendarHeader";TK.propTypes={className:xe.string,classPrefix:xe.string,disabledBackward:xe.bool,disabledForward:xe.bool,disabledTime:xe.func,onMoveBackward:xe.func,onMoveForward:xe.func,onToggleMeridian:xe.func,onToggleMonthDropdown:xe.func,onToggleTimeDropdown:xe.func,renderTitle:xe.func,renderToolbar:xe.func,showDate:xe.bool,showMeridian:xe.bool,showMonth:xe.bool,showTime:xe.bool};var pd;(function(e){e.TIME="TIME",e.MONTH="MONTH"})(pd||(pd={}));var N3t=function(t){var r=x.useState(t),n=r[0],i=r[1],a=x.useCallback(function(){i(void 0)},[]),o=x.useCallback(function(){i(pd.MONTH)},[]),s=x.useCallback(function(){i(pd.TIME)},[]);return{calendarState:n,reset:a,openMonth:o,openTime:s}},AK=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?"div":r,i=e.className,a=e.classPrefix,o=a===void 0?"calendar":a,s=e.dateRange,l=e.disabledBackward,c=e.defaultState,d=e.disabledDate,f=e.disabledForward,h=e.format,p=e.hoverRangeValue,g=e.inSameMonth,_=e.isoWeek,b=_===void 0?!1:_,E=e.limitEndYear,S=e.locale,P=e.onChangeMonth,O=e.onChangeTime,I=e.onMouseMove,N=e.onMoveBackward,M=e.onMoveForward,F=e.onSelect,B=e.onToggleMeridian,V=e.onToggleMonthDropdown,W=e.onToggleTimeDropdown,$=e.calendarDate,X=e.renderCell,re=e.renderTitle,ae=e.renderToolbar,Q=e.showMeridian,ie=e.showWeekNumbers,le=e.inline,fe=Yr(e,["as","className","classPrefix","dateRange","disabledBackward","defaultState","disabledDate","disabledForward","format","hoverRangeValue","inSameMonth","isoWeek","limitEndYear","locale","onChangeMonth","onChangeTime","onMouseMove","onMoveBackward","onMoveForward","onSelect","onToggleMeridian","onToggleMonthDropdown","onToggleTimeDropdown","calendarDate","renderCell","renderTitle","renderToolbar","showMeridian","showWeekNumbers","inline"]),de=Ya(o),ge=de.withClassPrefix,Ae=de.merge,Fe=de.prefix,Pe=N3t(c),ce=Pe.calendarState,pe=Pe.reset,Ne=Pe.openMonth,De=Pe.openTime,Ve=x.useCallback(function(dt){var bt;return(bt=d?.(dt))!==null&&bt!==void 0?bt:!1},[d]),Ke=function(bt){return mPt(e,bt)},Qe=x.useCallback(function(){M?.(Ou($,1))},[M,$]),Ue=x.useCallback(function(){N?.(Ou($,-1))},[N,$]),ut=x.useCallback(function(){ce===pd.MONTH?pe():Ne(),V?.(ce!==pd.MONTH)},[ce,V,Ne,pe]),We=x.useCallback(function(){ce===pd.TIME?pe():De(),W?.(ce!==pd.TIME)},[ce,W,De,pe]),ke=x.useCallback(function(){return pe()},[pe]),Le=gPt(h),Be=xI(h),Ze=vPt(h),Et=Be&&!Le&&!Ze,Yt=Ze&&!Le&&!Be,sr=ce===pd.TIME||Et,Kt=ce===pd.MONTH||Yt,Qt=x.useCallback(function(dt){return W1(function(bt){return wRe(bt,1)},function(bt){return GG(bt,dt)})(dt)},[]),qt=Ae(i,ge({"time-view":sr,"month-view":Kt,"show-week-numbers":ie})),hr=qc(fe,xRe),rr=x.useCallback(function(dt,bt){pe(),P?.(dt,bt)},[P,pe]),tr=x.useMemo(function(){return{date:$,dateRange:s,disabledDate:Ve,format:h,hoverRangeValue:p,inSameMonth:g??Qt,isoWeek:b,locale:S,onChangeMonth:rr,onChangeTime:O,onMouseMove:I,onSelect:F,renderCell:X,showWeekNumbers:ie,inline:le}},[$,s,h,rr,p,g,Qt,le,Ve,b,S,O,I,F,X,ie]);return u.createElement(S3t,{value:tr},u.createElement(n,ve({},TRe(fe),{className:qt,ref:t}),u.createElement(TK,{showMonth:Ze,showDate:Le,showTime:Be,showMeridian:Q,disabledTime:Ke,onMoveForward:Qe,onMoveBackward:Ue,onToggleMonthDropdown:ut,onToggleTimeDropdown:We,onToggleMeridian:B,renderTitle:re,renderToolbar:ae,disabledBackward:l,disabledForward:f}),Le&&u.createElement(xK,null),Ze&&u.createElement(_K,{show:Kt,limitEndYear:E,disabledMonth:Ve}),Be&&u.createElement(EK,ve({},hr,{show:sr,showMeridian:Q})),(Kt||sr)&&Le&&u.createElement("button",{className:Fe("btn-close"),onClick:ke,"aria-label":"Collapse "+(Kt?"month":"time")+" view"},u.createElement(xOe,null))))});AK.displayName="CalendarContainer";AK.propTypes={className:xe.string,classPrefix:xe.string,disabledDate:xe.func,disabledHours:xe.func,disabledMinutes:xe.func,disabledSeconds:xe.func,format:xe.string,hideHours:xe.func,hideMinutes:xe.func,hideSeconds:xe.func,inSameMonth:xe.func,isoWeek:xe.bool,limitEndYear:xe.number,locale:xe.object,onChangeMonth:xe.func,onChangeTime:xe.func,onMoveBackward:xe.func,onMoveForward:xe.func,onSelect:xe.func,onToggleMeridian:xe.func,onToggleMonthDropdown:xe.func,onToggleTimeDropdown:xe.func,calendarDate:xe.instanceOf(Date),renderCell:xe.func,renderTitle:xe.func,renderToolbar:xe.func,showMeridian:xe.bool,showWeekNumbers:xe.bool};function XOe(e){var t=new Date;return e instanceof Array?[{label:"today",value:[Xy(t),oR(t)]},{label:"yesterday",value:[Xy(WA(t,1)),oR(WA(t,1))]},{label:"last7Days",value:[Xy(WA(t,6)),oR(t)]}]:[{label:"today",value:t},{label:"yesterday",value:WA(t,1)}]}var D3t=function(t){var r=t.calendarDate;return function(n){var i=n.value,a=Yr(n,["value"]);return ve({value:typeof i=="function"?i(r):i},a)}},gfe=function(t){var r=t.ranges,n=t.calendarDate;return typeof r>"u"?XOe(n):r.map(D3t({calendarDate:n}))},ZOe=u.forwardRef(function(e,t){var r=e.className,n=e.disabledShortcut,i=e.onClickShortcut,a=e.calendarDate,o=e.ranges,s=e.locale,l=Yr(e,["className","disabledShortcut","onClickShortcut","calendarDate","ranges","locale"]),c=x.useState(gfe(e)),d=c[0],f=c[1];GOe(function(){f(gfe({ranges:o,calendarDate:a}))},[a,o]);var h=x.useCallback(function(p){return XOe(a).some(function(g){return g.label===p})},[a]);return d.length===0?null:u.createElement(Zf,ve({className:r,ref:t,alignItems:"flex-start",spacing:4},l),d.map(function(p,g){var _=p.value,b=p.closeOverlay,E=p.label,S=Yr(p,["value","closeOverlay","label"]),P=n?.(_),O=function(N){P||i?.(_,b!==!1,N)};return u.createElement(Jf,ve({appearance:"link",size:"sm",key:g,disabled:P,onClick:O},S),h(E)&&typeof E=="string"?s?.[E]:E)}))}),M3t=function(t){var r=t.hide,n=t.disabledOkBtn,i=t.calendarDate,a=t.onOk,o=t.children;if(r)return null;var s=n?.(i);return u.createElement(Jf,{appearance:"primary",size:"sm",disabled:s,onClick:s?void 0:a},o)},PK=u.forwardRef(function(e,t){var r=e.className,n=e.classPrefix,i=n===void 0?"picker-toolbar":n,a=e.disabledOkBtn,o=e.disabledShortcut,s=e.hideOkBtn,l=e.onOk,c=e.onClickShortcut,d=e.calendarDate,f=e.ranges,h=e.locale,p=Yr(e,["className","classPrefix","disabledOkBtn","disabledShortcut","hideOkBtn","onOk","onClickShortcut","calendarDate","ranges","locale"]),g=Ya(i),_=g.merge,b=g.prefix,E=g.withClassPrefix;if(s&&f?.length===0)return null;var S=_(r,E());return u.createElement(Zf,ve({ref:t,className:S,justifyContent:"space-between",alignItems:"flex-start"},p),u.createElement(ZOe,{wrap:!0,className:b("ranges"),ranges:f,calendarDate:d,locale:h,disabledShortcut:o,onClickShortcut:c}),u.createElement("div",{className:b("right")},u.createElement(M3t,{disabledOkBtn:a,hide:s,calendarDate:d,onOk:l},h?.ok)))});PK.displayName="Toolbar";PK.propTypes={ranges:xe.array,className:xe.string,classPrefix:xe.string,calendarDate:xe.oneOfType([xe.instanceOf(Date),xe.arrayOf(xe.instanceOf(Date))]).isRequired,onClickShortcut:xe.func,onOk:xe.func,disabledShortcut:xe.func,disabledOkBtn:xe.func,hideOkBtn:xe.bool};var OI=u.forwardRef(function(e,t){var r=e.as,n=r===void 0?AK:r,i=e.calendarDate,a=i===void 0?[new Date,Ou(new Date,1)]:i,o=e.format,s=o===void 0?"yyyy-MM-dd":o,l=e.disabledDate,c=e.index,d=c===void 0?0:c,f=e.limitEndYear,h=e.onChangeCalendarMonth,p=e.onChangeCalendarTime,g=e.onToggleMeridian,_=e.onSelect,b=e.value,E=b===void 0?[]:b,S=Yr(e,["as","calendarDate","format","disabledDate","index","limitEndYear","onChangeCalendarMonth","onChangeCalendarTime","onToggleMeridian","onSelect","value"]),P=x.useCallback(function(re){h?.(d,re)},[d,h]),O=x.useCallback(function(re){h?.(d,re)},[d,h]),I=x.useCallback(function(re,ae){_?.(d,re,ae)},[d,_]),N=x.useCallback(function(re){h?.(d,re)},[d,h]),M=x.useCallback(function(re){p?.(d,re)},[d,p]),F=x.useCallback(function(re){g(d,re)},[d,g]),B=x.useCallback(function(re){return GG(re,a[d])},[a,d]),V=x.useCallback(function(){return a[d]},[a,d]),W=x.useCallback(function(){P?.(Ou(V(),1))},[V,P]),$=x.useCallback(function(){O?.(Ou(V(),-1))},[V,O]),X=x.useCallback(function(re){return l?.(re,E,Zv.CALENDAR)},[l,E]);return u.createElement(n,ve({},S,{format:s,dateRange:E,disabledDate:X,inSameMonth:B,index:d,limitEndYear:f,onChangeMonth:N,onChangeTime:M,onMoveBackward:$,onMoveForward:W,onToggleMeridian:F,onSelect:I,calendarDate:V(),ref:t}))});OI.displayName="DateRangePicker.Calendar";OI.propTypes={value:xe.arrayOf(xe.instanceOf(Date)),hoverValue:xe.arrayOf(xe.instanceOf(Date)),calendarDate:xe.arrayOf(xe.instanceOf(Date)),index:xe.number,format:xe.string,isoWeek:xe.bool,limitEndYear:xe.number,classPrefix:xe.string,disabledDate:xe.func,onSelect:xe.func,onMouseMove:xe.func,onChangeCalendarMonth:xe.func};function RK(e,t){return Bv(new Date(e.getFullYear(),e.getMonth(),e.getDate()),new Date(t.getFullYear(),t.getMonth(),t.getDate()))}function OK(e,t){return zv(new Date(e.getFullYear(),e.getMonth(),e.getDate()),new Date(t.getFullYear(),t.getMonth(),t.getDate()))}function L3t(e){return function(t,r,n,i){var a=!1,o=!1;if(r!=null&&r[0]){var s=r[0];a=W1(function(l){return Od(l,-e+1)},function(l){return RK(l,t)})(s),o=W1(function(l){return Od(l,e-1)},function(l){return OK(l,t)})(s)}return!!(i==="CALENDAR"&&!n&&(a||o))}}function F3t(e){return function(t,r,n,i){var a=!1,o=!1;if(r!=null&&r[0]){var s=r[0];a=W1(function(l){return Od(l,-e+1)},function(l){return!Ff(l,t)})(s),o=W1(function(l){return Od(l,e-1)},function(l){return!Ff(l,t)})(s)}return!!(i==="CALENDAR"&&!n&&a&&o)}}function B3t(e,t){return function(r){return!!(OK(r,new Date(e))||RK(r,new Date(t)))}}function QOe(e){return e===void 0&&(e=new Date),function(t){return!!OK(t,new Date(e))}}function JOe(e){return e===void 0&&(e=new Date),function(t){return!!RK(t,new Date(e))}}function z3t(){return QOe()}function H3t(){return JOe()}function U3t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.reduce(function(o,s){return o.apply(void 0,i)||s.apply(void 0,i)})}}function CF(e){var t,r=e.value,n=e.calendarKey,i=n===void 0?"start":n;if(r=(t=r)!==null&&t!==void 0?t:[],r[0]&&r[1]){var a=fPt(r[1],r[0]);if(i==="start")return[r[0],a<=0?Pf({from:r[1],to:Ou(r[0],1)}):r[1]];if(i==="end")return[a<=0?Pf({from:r[0],to:Ou(r[1],-1)}):r[0],r[1]]}else if(r[0])return[r[0],Ou(r[0],1)];var o=new Date;return[o,Ou(o,1)]}var V3t=function(t,r,n){if(t===null&&r===null)return!0;
225if(t===null||r===null)return!1;var i=Ff(t[0],r[0])&&Ff(t[1],r[1]);return xI(n)&&i&&(i=Zce(t[0],r[0])&&Zce(t[1],r[1])),i},q3t=function(t){return[dPt(t),vTt(t)]},j3t=function(t,r){return t?[uPt(r),mTt(r)]:[SRe(r),tRe(r)]},Qc=u.forwardRef(function(e,t){var r,n,i,a=e.as,o=a===void 0?"div":a,s=e.classPrefix,l=s===void 0?"picker":s,c=e.className,d=e.appearance,f=d===void 0?"default":d,h=e.editable,p=h===void 0?!0:h,g=e.cleanable,_=g===void 0?!0:g,b=e.character,E=b===void 0?" ~ ":b,S=e.defaultCalendarValue,P=e.defaultValue,O=e.disabled,I=e.disabledDate,N=e.format,M=N===void 0?"yyyy-MM-dd":N,F=e.hoverRange,B=e.isoWeek,V=B===void 0?!1:B,W=e.limitEndYear,$=W===void 0?1e3:W,X=e.locale,re=e.menuClassName,ae=e.menuStyle,Q=e.oneTap,ie=e.placeholder,le=ie===void 0?"":ie,fe=e.placement,de=fe===void 0?"bottomStart":fe,ge=e.ranges,Ae=e.renderValue,Fe=e.showOneCalendar,Pe=Fe===void 0?!1:Fe,ce=e.showWeekNumbers,pe=e.showMeridian,Ne=e.style,De=e.toggleAs,Ve=e.caretAs,Ke=e.value,Qe=e.onChange,Ue=e.onClean,ut=e.onClose,We=e.onEnter,ke=e.onEntered,Le=e.onExited,Be=e.onOk,Ze=e.onOpen,Et=e.onSelect,Yt=e.renderTitle,sr=Yr(e,["as","classPrefix","className","appearance","editable","cleanable","character","defaultCalendarValue","defaultValue","disabled","disabledDate","format","hoverRange","isoWeek","limitEndYear","locale","menuClassName","menuStyle","oneTap","placeholder","placement","ranges","renderValue","showOneCalendar","showWeekNumbers","showMeridian","style","toggleAs","caretAs","value","onChange","onClean","onClose","onEnter","onEntered","onExited","onOk","onOpen","onSelect","renderTitle"]),Kt=Ya(l),Qt=Kt.merge,qt=Kt.prefix,hr=ef("DateRangePicker",X),rr=hr.locale,tr=hr.formatDate,dt=hr.parseDate,bt=""+M+E+M,nr=WOe(Ke,P??null),Ee=nr[0],Oe=nr[1],Re=x.useRef(!0),pt=x.useState((r=Ke??P)!==null&&r!==void 0?r:[]),mt=pt[0],st=pt[1],ze=x.useState(null),it=ze[0],Je=ze[1],Jt=x.useState(CF({value:(n=Ee??S)!==null&&n!==void 0?n:null})),pr=Jt[0],Fr=Jt[1],Or=x.useState(),vn=Or[0],cn=Or[1],Xr=x.useRef(null),Zr=x.useCallback(function(gt){var tt=gt==="start"?0:1;return pr?.[tt]||S?.[tt]},[pr,S]),fn=x.useCallback(function(gt){var tt=gt.dateRange,ft=gt.calendarKey,Tt=gt.eventName,vr=tt;if(xI(M)&&tt!==null&&tt!==void 0&&tt.length&&Tt!=="changeTime"){var Pn=Pf({from:Zr("start"),to:tt[0]}),rn=Pf({from:Zr("end"),to:tt.length===1?Ou(Pn,1):tt[1]});vr=[Pn,rn]}else tt===null&&typeof S<"u"&&(vr=S);Fr(CF({value:vr,calendarKey:ft}))},[M,S,Zr]);x.useEffect(function(){st(Ke??[]),Je(Ke??null)},[Ke]);var vs=x.useState(!1),Ar=vs[0],Ir=vs[1],Ln=x.useRef(null),Wn=x.useRef(null),wr=x.useRef(null),jt=x.useRef(null),gn=x.useCallback(function(){var gt,tt;(gt=jt.current)===null||gt===void 0||(tt=gt.close)===null||tt===void 0||tt.call(gt)},[]);ZIt(t,{triggerRef:jt,overlayRef:Wn,targetRef:wr,rootRef:Ln});var Xa=x.useCallback(function(gt,tt){var ft,Tt,vr=(ft=gt?.[0])!==null&&ft!==void 0?ft:null,Pn=(Tt=gt?.[1])!==null&&Tt!==void 0?Tt:null;if(vr&&Pn){var rn=[vr,Pn].sort(hTt);return tt?tr(rn[0],M)+E+tr(rn[1],M):Ae?Ae(rn,M):u.createElement(u.Fragment,null,u.createElement(BS,{date:rn[0],formatStr:M}),E,u.createElement(BS,{date:rn[1],formatStr:M}))}return tt?"":le||bt},[E,tr,M,le,bt,Ae]),la=x.useCallback(function(gt){function tt(){return F==="week"?bK(j3t,V):F==="month"?q3t:F}var ft=tt();if(li(ft))return null;var Tt=ft(gt),vr=Tt instanceof Array&&Tt.length===2;return vr?(Bv(Tt[0],Tt[1])&&(Tt=eue(Tt)),Tt):null},[F,V]),si=x.useCallback(function(gt,tt,ft){ft===void 0&&(ft=!0),st(tt??[]),V3t(tt,Ee,M)||(Oe(tt),Qe?.(tt,gt)),ft!==!1&&gn()},[M,gn,Qe,Oe,Ee]),Ho=x.useCallback(function(gt){var tt=la(gt);if(Re.current)li(tt)||Je(tt);else if(!li(tt)&&!li(Xr.current)){var ft=[Xr.current[0],tt[1]];zv(tt[0],Xr.current[0])&&(ft=[tt[0],Xr.current[1]]),st(ft)}else Je(function(Tt){return li(Tt)?null:[Tt[0],gt]})},[la]),gs=x.useCallback(function(gt,tt,ft){var Tt=gt===0?"start":"end",vr=it??[],Pn=la(tt),rn=li(Pn);if(Re.current&&Q){si(ft,rn?[Xy(tt),oR(tt)]:Pn),Re.current=!1;return}rn?Re.current?vr=[tt]:vr[1]=tt:Re.current?(vr=Pn,Xr.current=Pn):(vr=mt,Xr.current=null),vr.length===2?(Bv(vr[0],vr[1])&&(vr=eue(vr)),xI(M)&&(vr=[Pf({from:Zr("start"),to:vr[0]}),Pf({from:Zr("end"),to:vr[1]})]),Je(vr)):Je([vr[0],vr[0]]),st(vr),fn({dateRange:vr,calendarKey:Tt,eventName:"changeDate"}),Et?.(tt,ft),Re.current=!Re.current},[M,Zr,la,si,it,Et,Q,mt,fn]);x.useEffect(function(){var gt=mt.length,tt=gt===0||gt===2;tt&&Je(null)},[mt]);var ga=x.useCallback(function(gt,tt){var ft=gt===0?"start":"end",Tt=Array.from(pr);Tt[gt]=tt,fn({dateRange:Tt,calendarKey:ft,eventName:"changeMonth"})},[pr,fn]),ya=x.useCallback(function(gt,tt){var ft=gt===0?"start":"end",Tt=Array.from(pr);Tt[gt]=tt,fn({dateRange:Tt,calendarKey:ft,eventName:"changeTime"}),st(function(vr){var Pn=[].concat(vr);return Pn[gt]=Pn[gt]?Pf({from:tt,to:Pn[gt]}):new Date(tt.valueOf()),Pn})},[pr,fn]),Ui=x.useCallback(function(gt){var tt=Array.from(pr);if(tt[gt]=tue(tt[gt]),Fr(tt),mt.length===2){var ft=Array.from(mt);ft[gt]=tue(ft[gt]),st(ft)}},[pr,mt]),rs=x.useCallback(function(gt,tt,ft){tt===void 0&&(tt=!1),fn({dateRange:gt}),tt?si(ft,gt,tt):st(gt??[]),Re.current=!0},[si,fn]),Za=x.useCallback(function(gt){si(gt,mt),Be?.(mt,gt)},[si,Be,mt]),Io=x.useCallback(function(gt){fn({dateRange:null}),si(gt,null)},[si,fn]),hl=x.useCallback(function(gt){cn("Typing");var tt=gt.split(E);if(!Jce(tt[0],M,{locale:rr.dateLocale})||!Jce(tt[1],M,{locale:rr.dateLocale})){cn("Error");return}var ft=dt(tt[0],M),Tt=dt(tt[1],M),vr=[ft,Tt];if(!wI(ft)||!wI(Tt)){cn("Error");return}if(wo(ft,vr,!0,Zv.CALENDAR)){cn("Error");return}Je(vr),st(vr),fn({dateRange:vr})},[E,bt,fn]),pl=x.useCallback(function(gt){vn==="Typing"&&si(gt,mt.length===2?mt:null),cn("Initial")},[si,mt,vn]),Hl=x.useCallback(function(){var gt;if(Ee&&Ee.length){var tt=Ee[0],ft=Ee[1];gt=[tt,GG(tt,ft)?Ou(ft,1):ft]}else gt=CF({value:S??null});st(Ee??[]),fn({dateRange:gt})},[S,fn,st,Ee]),Ul=x.useCallback(function(){Ze?.(),Ir(!0)},[Ze]),qu=x.useCallback(function(){Ir(!1),Re.current=!0,ut?.()},[ut]),wo=x.useCallback(function(gt,tt,ft,Tt){var vr;return(vr=I?.(gt,tt,ft,Tt))!==null&&vr!==void 0?vr:!1},[I]),Uo=x.useCallback(function(gt,tt,ft){for(;zv(gt,tt)||Ff(gt,tt);){if(wo(gt,mt,Re.current,ft))return!0;gt=Od(gt,1)}return!1},[wo,mt]),ju=x.useCallback(function(){var gt=mt[0],tt=mt[1];return!gt||!tt||!Re.current?!0:Uo(gt,tt,Zv.TOOLBAR_BUTTON_OK)},[Uo,mt]),Vl=x.useCallback(function(gt){gt===void 0&&(gt=[]);var tt=gt,ft=tt[0],Tt=tt[1];return!ft||!Tt?!0:Uo(ft,Tt,Zv.TOOLBAR_SHORTCUT)},[Uo]),ql=x.useCallback(function(gt,tt,ft){return wo(gt,tt,Re.current,ft)}
225,[wo]),_c=XIt(ve({triggerRef:jt,targetRef:wr,active:Ar,onExit:Io},sr)),js=function(tt,ft){var Tt=tt.left,vr=tt.top,Pn=tt.className,rn=Qt(Pn,re,qt("daterange-menu")),Pi=qt("daterange-panel",{"daterange-panel-show-one-calendar":Pe}),_a=ve({},ae,{left:Tt,top:vr}),Ri={calendarDate:pr,disabledDate:ql,format:M,hoverRangeValue:it??void 0,isoWeek:V,limitEndYear:$,locale:rr,showWeekNumbers:ce,value:mt,showMeridian:pe,onChangeCalendarMonth:ga,onChangeCalendarTime:ya,onMouseMove:Ho,onSelect:gs,onToggleMeridian:Ui,renderTitle:Yt},Un=ge?.filter(function(Gn){return Gn?.placement==="left"})||[],Xn=ge?.filter(function(Gn){return Gn?.placement==="bottom"||Gn?.placement===void 0});return u.createElement(wOe,{role:"dialog",className:rn,ref:kd(Wn,ft),target:jt,style:_a},u.createElement("div",{className:Pi},u.createElement(Zf,{alignItems:"flex-start"},Un.length>0&&u.createElement(ZOe,{direction:"column",spacing:0,className:qt("daterange-predefined"),ranges:Un,calendarDate:pr,locale:rr,disabledShortcut:Vl,onClickShortcut:rs}),u.createElement(u.Fragment,null,u.createElement("div",{className:qt("daterange-content")},u.createElement("div",{className:qt("daterange-header")},Xa(mt)),u.createElement("div",{className:qt("daterange-calendar-"+(Pe?"single":"group"))},u.createElement(OI,ve({index:0},Ri)),!Pe&&u.createElement(OI,ve({index:1},Ri)))),u.createElement(PK,{locale:rr,calendarDate:mt,disabledOkBtn:ju,disabledShortcut:Vl,hideOkBtn:Q,onOk:Za,onClickShortcut:rs,ranges:Xn})))))},ys=!li(Ee)&&Ee.length>1,hn=$It(ve({},e,{classPrefix:l,name:"daterange",appearance:f,hasValue:ys,cleanable:_})),fi=hn[0],Ai=hn[1];return u.createElement(vOe,{pickerProps:qc(e,mOe),ref:jt,placement:de,onEnter:Os(Hl,We),onEntered:Os(Ul,ke),onExited:Os(qu,Le),speaker:js},u.createElement(o,{ref:Ln,className:Qt(c,fi,(i={},i[qt("error")]=vn==="Error",i)),style:Ne},u.createElement(fK,ve({},Em(sr,[].concat(pOe,Ai,xRe)),{as:De,ref:wr,appearance:f,editable:p,inputMask:_Pt(bt),inputValue:Ee?Xa(Ee,!0):"",inputPlaceholder:typeof le=="string"&&le?le:bt,onInputChange:hl,onInputBlur:pl,onInputPressEnter:pl,onKeyDown:_c,onClean:Os(Io,Ue),cleanable:_&&!O,hasValue:ys,active:Ar,placement:de,disabled:O,caretAs:Ve||w3t}),Xa(Ee))))});Qc.after=JOe;Qc.afterToday=H3t;Qc.allowedDays=F3t;Qc.allowedMaxDays=L3t;Qc.allowedRange=B3t;Qc.before=QOe;Qc.beforeToday=z3t;Qc.combine=U3t;Qc.displayName="DateRangePicker";Qc.propTypes=ve({},LOe,{ranges:xe.array,value:xe.arrayOf(xe.instanceOf(Date)),defaultValue:xe.arrayOf(xe.instanceOf(Date)),defaultCalendarValue:xe.arrayOf(xe.instanceOf(Date)),hoverRange:xe.oneOfType([xe.oneOf(["week","month"]),xe.func]),format:xe.string,isoWeek:xe.bool,oneTap:xe.bool,limitEndYear:xe.number,onChange:xe.func,onOk:xe.func,disabledDate:xe.func,onSelect:xe.func,showWeekNumbers:xe.bool,showMeridian:xe.bool,showOneCalendar:xe.bool});var $3t=fEe();const C4=et($3t);var W3t={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},G3t=function(t,r,n){var i,a=W3t[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+i:"há "+i:i},K3t={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Y3t={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},X3t={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z3t={date:Gf({formats:K3t,defaultWidth:"full"}),time:Gf({formats:Y3t,defaultWidth:"full"}),dateTime:Gf({formats:X3t,defaultWidth:"full"})},Q3t={lastWeek:function(t){var r=t.getUTCDay(),n=r===0||r===6?"último":"última";return"'"+n+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},J3t=function(t,r,n,i){var a=Q3t[t];return typeof a=="function"?a(r):a},e5t={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},t5t={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},r5t={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","març
225o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},n5t={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},i5t={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},a5t={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},o5t=function(t,r){var n=Number(t);return r?.unit==="week"?n+"ª":n+"º"},s5t={ordinalNumber:o5t,era:gd({values:e5t,defaultWidth:"wide"}),quarter:gd({values:t5t,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:gd({values:r5t,defaultWidth:"wide"}),day:gd({values:n5t,defaultWidth:"wide"}),dayPeriod:gd({values:i5t,defaultWidth:"wide",formattingValues:a5t,defaultFormattingWidth:"wide"})},l5t=/^(\d+)[ºªo]?/i,c5t=/\d+/i,u5t={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},d5t={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},f5t={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},h5t={any:[/1/i,/2/i,/3/i,/4/i]},p5t={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},m5t={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},v5t={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},g5t={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},y5t={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(d
225a) (manhã|tarde|noite))/i},_5t={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},b5t={ordinalNumber:hRe({matchPattern:l5t,parsePattern:c5t,valueCallback:function(t){return parseInt(t,10)}}),era:yd({matchPatterns:u5t,defaultMatchWidth:"wide",parsePatterns:d5t,defaultParseWidth:"any"}),quarter:yd({matchPatterns:f5t,defaultMatchWidth:"wide",parsePatterns:h5t,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:yd({matchPatterns:p5t,defaultMatchWidth:"wide",parsePatterns:m5t,defaultParseWidth:"any"}),day:yd({matchPatterns:v5t,defaultMatchWidth:"wide",parsePatterns:g5t,defaultParseWidth:"any"}),dayPeriod:yd({matchPatterns:y5t,defaultMatchWidth:"any",parsePatterns:_5t,defaultParseWidth:"any"})},E5t={code:"pt-BR",formatDistance:G3t,formatLong:Z3t,formatRelative:J3t,localize:s5t,match:b5t,options:{weekStartsOn:0,firstWeekContainsDate:1}},xF={sunday:"Do",monday:"Se",tuesday:"Te",wednesday:"Qu",thursday:"Qu",friday:"Se",saturday:"Sá",ok:"OK",today:"Hoje",yesterday:"Ontem",hours:"Horas",minutes:"Minutos",seconds:"Segundos",formattedMonthPattern:"MMM, yyyy",formattedDayPattern:"dd MMM, yyyy",dateLocale:E5t};const w5t={common:{loading:"Carregando...",emptyMessage:"Nenhum dado encontrado"},Plaintext:{unfilled:"sin llenar",notSelected:"Não selecionado",notUploaded:"Não carregado"},Pagination:{more:"Mais",prev:"Anterior",next:"Próximo",first:"Primeiro",last:"Último",limit:"{0} / página",total:"Total: {0}",skip:"Ir{0}"},Calendar:xF,DatePicker:ve({},xF),DateRangePicker:ve({},xF,{last7Days:"Últimos 7 dias"}),Picker:{noResultsText:"Nenhum resultado encontrado",placeholder:"Selecionar",searchPlaceholder:"Pesquisar",checkAll:"Todos"},InputPicker:{newItem:"Novo item",createOption:'Criar opção "{0}"'},Uploader:{inited:"Inicializado",progress:"Em progresso",error:"Erro",complete:"Finalizado",emptyFile:"Em branco",upload:"Upload"},CloseButton:{closeLabel:"Apagar"},Breadcrumb:{expandText:"Mostrar caminho"},Toggle:{on:"Ligado",off:"Desligado"}},{combine:S5t,allowedMaxDays:yfe,afterToday:_fe}=Qc;function Ptr({allowFuture:e,maxDaysAllowed:t,...r}){const n=yc("(max-width:600px)"),i=u.useMemo(()=>e?t!==null?yfe(t||100):void 0:t!==null?S5t(yfe(t||100),_fe()):_fe(),[e,t]);return u.createElement(vIt,{locale:w5t},u.createElement(Qc,{placeholder:"Selecione o período",format:"dd/MM/yyyy",showOneCalendar:n,cleanable:!1,disabledDate:i,className:"min-w-256",ranges:[{label:"Hoje",value:[new Date,new Date]},{label:"Últimos 7 dias",value:[qe().subtract(6,"day").toDate(),new Date]},{label:"Últimos 15 dias",value:[qe().subtract(14,"day").toDate(),new Date]},{label:"Últimos 30 dias",value:[qe().subtract(29,"day").toDate(),new Date]}],preventOverflow:!0,...r}))}var $b={},bfe;function C5t(){if(bfe)return $b;bfe=1;var e=$t(),t=Wt();Object.defineProperty($b,"__esModule",{value:!0}),$b.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31c.39-.39.39-1.02 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z"}),"ArrowForwardIosRounded");return $b.default=i,$b}var x5t=C5t();const qg=et(x5t);qe.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%
225d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});function Ao(e,t){return t?[qe().subtract(t,e).startOf(e).toDate(),qe().subtract(t,e).endOf(e).toDate()]:[qe().startOf(e).toDate(),qe().endOf(e).toDate()]}Ao("day"),Ao("day",1),Ao("day",-1),Ao("week"),Ao("week",1),Ao("week",-1),Ao("month"),Ao("month",1),Ao("month",-1),Nd(qe().subtract(2,"months").format("MMMM/YYYY")),Ao("month",2),Nd(qe().subtract(3,"months").format("MMMM/YYYY")),Ao("month",3),Nd(qe().subtract(4,"months").format("MMMM/YYYY")),Ao("month",4);const Rtr=[{label:"Hoje",value:Ao("day"),placement:"left"},{label:"Ontem",value:Ao("day",1),placement:"left"},{label:"Anteontem",value:Ao("day",2),placement:"left"},{label:"Ontem e hoje",value:[qe().subtract(1,"day").startOf("day").toDate(),qe().endOf("day").toDate()],placement:"left"},{label:"Semana passada",value:Ao("week",1),placement:"left"},{label:"Esta semana",value:Ao("week"),placement:"left"},{label:"Mês passado",value:Ao("month",1),placement:"left"},{label:"Este mês",value:Ao("month"),placement:"left"},{label:Nd(qe().subtract(2,"months").format("MMMM/YYYY")),value:Ao("month",2),placement:"left"},{label:"Últimos 7 dias",value:[qe().subtract(7,"days").startOf("day").toDate(),qe().endOf("day").toDate()],placement:"left"},{label:"Últimos 15 dias",value:[qe().subtract(15,"days").startOf("day").toDate(),qe().endOf("day").toDate()],placement:"left"},{label:"Últimos 30 dias",value:[qe().subtract(30,"days").startOf("day").toDate(),qe().endOf("day").toDate()],placement:"left"}],Otr=([e,t])=>{const r=qe(e),n=qe(t),i=r.date(),a=r.month();return r.isSame(n,"day")?r.format("DD/MM/YYYY"):i===1&&qe(t).isSame(qe(e).endOf("month"),"day")?Nd(qe(e).format("MMMM [de] YYYY")):i===1&&a===0&&qe(t).isSame(qe(e).endOf("year"),"day")?Nd(qe(e).format("YYYY")):`${qe(e).format("DD/MM/YYYY")} ~ ${qe(t).format("DD/MM/YYYY")}`};function Itr(e,t,r){const n=qe(t),i=qe(r);if(n.date()===1&&qe(i).endOf("month").date()===i.date()){const o=i.diff(n,"months");if(e==="forward")return[n.add(o+1,"months").toDate(),i.add(o+1,"months").endOf("month").toDate()];if(e==="backward")return[n.subtract(o+1,"months").toDate(),i.subtract(o+1,"months").endOf("month").toDate()]}const a=i.diff(n,"days")+1;return e==="forward"?[n.add(a,"days").toDate(),i.add(a,"days").toDate()]:e==="backward"?[n.subtract(a,"days").toDate(),i.subtract(a,"days").toDate()]:[n.toDate(),i.toDate()]}const Efe={red:"bg-red-lightest text-red-dark",green:"bg-green-lightest text-green-dark",blue:"bg-blue-lightest text-blue-dark",grey:"bg-grey-lightest text-grey-dark",indigo:"bg-indigo-lightest text-indigo-dark",orange:"bg-orange-lightest text-orange-dark",pink:"bg-pink-lightest text-pink-dark",purple:"bg-purple-lightest text-purple-dark",teal:"bg-teal-lightest text-teal-dark"};function Qs({color:e,className:t,children:r,...n}){return u.createElement("div",{...n,className:Ft(Efe?.[e]||Efe.gray,t,"inline-block whitespace-nowrap rounded-6 px-12 py-4 text-center text-14 font-medium")},r)}const ktr=u.forwardRef(({title:e,subtitle:t,action:r,keepActionsOnFirstLine:n,loading:i,children:a,className:o,contentClassName:s,launch:l},c)=>u.createElement(Qd,{ref:c,variant:"outlined",className:Ft("relative overflow-hidden rounded-8",o)},i&&u.createElement("div",{className:"absolute left-0 right-0 z-20 rounded-t-8"},u.createElement(V_,{color:"primary",className:"w-full"})),u.createElement("div",{className:"space-y-20 p-20 sm:space-y-24 sm:p-24"},u.createElement("div",{className:Ft("flex flex-wrap text-gray-700",n||"flex-col justify-between space-y-20 sm:flex-row sm:items-center sm:space-y-0")},u.createElement("div",{className:"flex-1 flex-shrink-0 space-y-4"},u.createElement("div",{className:"space-x-12 text-18 font-bold"},u.createElement("span",null,e)," ",l&&u.createElement(Qs,{color:"green"},"Novidade")),t&&u.createElement("div",{className:"text-16 font-light text-gray-500"},t)),r&&u.createElement("div",{className:"flex-shrink-0"},r)),a&&u.createElement("div",{className:Ft(s)},a))));var Wb={},wfe;function T5t(){if(wfe)return Wb;wfe=1;var e=$t(),t=Wt();
225Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1zM14 4c0 .55.45 1 1 1h2.59l-9.13 9.13c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1h-5c-.55 0-1 .45-1 1z"}),"OpenInNewRounded");return Wb.default=i,Wb}var A5t=T5t();const P5t=et(A5t);var Gb={},Sfe;function R5t(){if(Sfe)return Gb;Sfe=1;var e=$t(),t=Wt();Object.defineProperty(Gb,"__esModule",{value:!0}),Gb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"EditRounded");return Gb.default=i,Gb}var O5t=R5t();const ps=et(O5t);var Kb={},Cfe;function I5t(){if(Cfe)return Kb;Cfe=1;var e=$t(),t=Wt();Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),"PersonAddRounded");return Kb.default=i,Kb}var k5t=I5t();const N5t=et(k5t);var Yb={},xfe;function D5t(){if(xfe)return Yb;xfe=1;var e=$t(),t=Wt();Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),"PersonRounded");return Yb.default=i,Yb}var M5t=D5t();const hm=et(M5t);var TF,Tfe;function L5t(){if(Tfe)return TF;Tfe=1;var e=gEe(),t=qs(),r="Expected a function";function n(i,a,o){var s=!0,l=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(s="leading"in o?!!o.leading:s,l="trailing"in o?!!o.trailing:l),e(i,a,{leading:s,maxWait:a,trailing:l})}return TF=n,TF}var F5t=L5t();const B5t=et(F5t),z5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFF",d:"M0 0h512v342H0z"}),x.createElement("path",{fill:"#338AF3",d:"M0 0h512v114H0zM0 228h512v114H0z"}),x.createElement("circle",{fill:"#FFDA44",stroke:"#d6ab00",strokeWidth:5,cx:256.5,cy:171,r:40})),H5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#d52b1e",d:"M0 0h513v114H0z"}),x.createElement("path",{fill:"#f9e300",d:"M0 114h513v114H0z"}),x.createElement("path",{fill:"#007934",d:"M0 228h513v114H0z"})),U5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#009b3a",d:"M0 0h513v342H0z"}),x.createElement("path",{fill:"#fedf00",d:"m256.5 19.3 204.9 151.4L256.5 322 50.6 170.7z"}),x.createElement("circle",{fill:"#FFF",cx:256.5,cy:171,r:80.4}),x.createElement("path",{fill:"#002776",d:"M215.9 165.7c-13.9 0-27.4 2.1-40.1 6 .6 43.9 36.3 79.3 80.3 79.3 27.2 0 51.3-13.6 65.8-34.3-24.9-31-63.2-51-106-51zM334.9 186c.9-5 1.5-10.1 1.5-15.4 0-44.4-36-80.4-80.4-80.4-33.1 0-61.5 20.1-73.9 48.6 10.9-2.2 22.1-3.4 33.6-3.4 46.8.1 89 19.5 119.2 50.6z"})),V5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFDA44",d:"M0 85.337h512v341.326H0z"}),x.createElement("path",{fill:"#D80027",d:"M0 343.096h512v83.567H0z"}),x.createElement("path",{fill:"#0052B4",d:"M0 256h512v87.096H0z"})),q5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFF",d:"M0 85.331h512v341.326H0z"}),x.createElement("g",{fill:"#D80027"},x.createElement("path",{d:"M0 85.331h170.663v341.337H0zM341.337 85.331H512v341.337H341.337z"}))),j5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),x.createElement("path",{fill:"#D80027",d:"M0 85.337h512v113.775H0z"}),x.createElement("path",{fill:"#0052B4",d:"M0 312.888h512v113.775H0z"}),x.createElement("path",{fill:"#6DA544",d:"m289.579 216.738-12.592 12.592c5.37 5.372 8.693 12.792 8.693 20.988 0 16.392-13.289 29.68-29.68 29.68-16.392 0-29.68-13.289-29.68-29.68 0-8.195 3.322-15.616 8.693-20.988l-12.592-12.592c-8.594 8.594-13.91 20.466-13.91 33.579 0 26.228 21.261 47.489 47.489 47.489s47.489-21.261 47.489-47.489c0-13.112-5.316-24.985-13.91-33.579z"}),x.createElement("path",{fill:"#FFDA44",d:"m256 232.51 4.421 13.605h14.304l-11.573 8.408 4.421 13.604L256 259.719l-11.573 8.408 4.421-13.604-11.573-8.408h14.304z"})),$5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),x.createElement("g",{fill:"#0038a8"},x.createElement("path",{d:"M0 38h513v38H0zM0 114h513v38H0zM0 190h513v38H0zM0 266h513v38H0z"})),x.createElement("path",{fill:"#FFF",d:"M0 0h256.5v190H0z"}),x.createElement("path",{fill:"#FED443",d:"m128.3 138.7-15.1 22.6-3.8-26.9L86 148.2l8.2-25.9-27.2 2.2 18.6-19.8L60.3 95l25.4-9.7L67 65.5l27.1 2.3-8.2-25.9 23.4 13.8 3.9-26.9 15.1 22.6 15.1-22.6 3.8 26.9 23.4-13.8-8.2 25.9 27.1-2.2-18.6 19.8 25.4 9.7-25.4 9.7 18.6 19.8-27.1-2.2 8.2 25.9-23.4-13.8-3.9 26.9-15-22.7zm0-.5c23.9.9 44-17.6 44.9-41.5.9-23.9-17.6-44-41.5-44.9h-3.4c-23.9.8-42.6 20.8-41.8 44.6.6 22.8 19 41.1 41.8 41.8zm0-10.6c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.3 34-34 34z"})),W5t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15",width:"1em",height:"1em",...e},x.createElement("path",{fill:"#FFCE00",d:"M0 0h22.5v5H0z"}),x.createElement("path",{fill:"#203899",d:"M0 5h22.5v5H0z"}),x.createElement("path",{fill:"#D82B2B",d:"M0 10h22.5v5H0z"}),x.createElement("path",{fill:"#FFF",d:"m12.13 5.38.14.46.45.14-.39.27.01.48-.38-.29-.45.15.15-.44-.28-.38h.47zM10.36 5.38l.27.39h.47l-.28.38.15.45-.45-.16-.38.28.01-.47-.39-.28.45-.13zM13.8 5.94l-.01.48.39.27-.46.14-.14.45-.27-.38h-.48l.29-.38-.15-.45.45.16zM8.69 5.96l.4.27.44-.18-.13.46.3.36-.47.02-.26.4-.16-.44-.46-.12.37-.3zM15.24 7.13l-.2.44.25.4-.47-.05-.31.36-.1-.46-.43-.18.41-.24.03-.47.35.31zM15.43 8.25l.21.43.47.07-.34.33.08.46-.42-.22-.42.22.08-.46-.34-.33.47-.07zM7 8.2l.21.43.47.06-.34.33.08.47L7 9.27l-.42.22.08-.47-.34-.33.47-.06zM7.31 7.05l.45.14.38-.29v.48l.39.26-.45.15-.13.46-.28-.38-.47.01.27-.38z"}));var uR={exports:{}},G5t=uR.exports,Afe;function K5t(){return Afe||(Afe=1,(function(e,t){(function(r,n){e.exports=n(Dt())})(G5t,function(r){return(function(n){function i(o){if(a[o])return a[o].exports;var s=a[o]={exports:{},id:o,loaded:!1};return n[o].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}var a={};return i.m=n,i.c=a,i.p="",i(0)})([function(n,i,a){function o(N){return N&&N.__esModule?N:{default:N}}function s(N,M){var F={};for(var B in N)M.indexOf(B)>=0||Object.prototype.hasOwnProperty.call(N,B)&&(F[B]=N[B]);return F}function l(N,M){if(!(N instanceof M))throw new TypeError("Cannot call a class as a function")}function c(N,M){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!M||typeof M!="object"&&typeof M!="function"?N:M}function d(N,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);N.prototype=Object.create(M&&M.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(N,M):N.__proto__=M)}Object.defineProperty(i,"__esModule",{value:!0}),i.conformToMask=void 0;var f=Object.assign||function(N){for(var M=1;M<arguments.length;M++){var F=arguments[M];for(var B in F)Object.prototype.hasOwnProperty.call(F,B)&&(N[B]=F[B])}return N},h=(function(){function N(M,F){for(var B=0;B<F.length;B++){var V=F[B];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(M,V.key,V
225)}}return function(M,F,B){return F&&N(M.prototype,F),B&&N(M,B),M}})(),p=a(3);Object.defineProperty(i,"conformToMask",{enumerable:!0,get:function(){return o(p).default}});var g=a(11),_=o(g),b=a(9),E=o(b),S=a(5),P=o(S),O=a(2),I=(function(N){function M(){var F;l(this,M);for(var B=arguments.length,V=Array(B),W=0;W<B;W++)V[W]=arguments[W];var $=c(this,(F=M.__proto__||Object.getPrototypeOf(M)).call.apply(F,[this].concat(V)));return $.setRef=$.setRef.bind($),$.onBlur=$.onBlur.bind($),$.onChange=$.onChange.bind($),$}return d(M,N),h(M,[{key:"setRef",value:function(F){this.inputElement=F}},{key:"initTextMask",value:function(){var F=this.props,B=this.props.value;this.textMaskInputElement=(0,P.default)(f({inputElement:this.inputElement},F)),this.textMaskInputElement.update(B)}},{key:"componentDidMount",value:function(){this.initTextMask()}},{key:"componentDidUpdate",value:function(F){var B=this.props,V=B.value,W=B.pipe,$=B.mask,X=B.guide,re=B.placeholderChar,ae=B.showMask,Q={guide:X,placeholderChar:re,showMask:ae},ie=typeof W=="function"&&typeof F.pipe=="function"?W.toString()!==F.pipe.toString():(0,O.isNil)(W)&&!(0,O.isNil)(F.pipe)||!(0,O.isNil)(W)&&(0,O.isNil)(F.pipe),le=$.toString()!==F.mask.toString(),fe=Object.keys(Q).some(function(ge){return Q[ge]!==F[ge]})||le||ie,de=V!==this.inputElement.value;(de||fe)&&this.initTextMask()}},{key:"render",value:function(){var B=this.props,V=B.render,W=s(B,["render"]);return delete W.mask,delete W.guide,delete W.pipe,delete W.placeholderChar,delete W.keepCharPositions,delete W.value,delete W.onBlur,delete W.onChange,delete W.showMask,V(this.setRef,f({onBlur:this.onBlur,onChange:this.onChange,defaultValue:this.props.value},W))}},{key:"onChange",value:function(F){this.textMaskInputElement.update(),typeof this.props.onChange=="function"&&this.props.onChange(F)}},{key:"onBlur",value:function(F){typeof this.props.onBlur=="function"&&this.props.onBlur(F)}}]),M})(_.default.PureComponent);i.default=I,I.propTypes={mask:E.default.oneOfType([E.default.array,E.default.func,E.default.bool,E.default.shape({mask:E.default.oneOfType([E.default.array,E.default.func]),pipe:E.default.func})]).isRequired,guide:E.default.bool,value:E.default.oneOfType([E.default.string,E.default.number]),pipe:E.default.func,placeholderChar:E.default.string,keepCharPositions:E.default.bool,showMask:E.default.bool},I.defaultProps={render:function(N,M){return _.default.createElement("input",f({ref:N},M))}}},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.placeholderChar="_",i.strFunction="function"},function(n,i,a){function o(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.placeholderChar;if(!s(_))throw new Error("Text-mask:convertMaskToPlaceholder; The mask property must be an array.");if(_.indexOf(b)!==-1)throw new Error(`Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.
226
227`+("The placeholder character that was received is: "+JSON.stringify(b)+`
228
229`)+("The mask that was received is: "+JSON.stringify(_)));return _.map(function(E){return E instanceof RegExp?b:E}).join("")}function s(_){return Array.isArray&&Array.isArray(_)||_ instanceof Array}function l(_){return typeof _=="string"||_ instanceof String}function c(_){return typeof _=="number"&&_.length===void 0&&!isNaN(_)}function d(_){return typeof _>"u"||_===null}function f(_){for(var b=[],E=void 0;E=_.indexOf(g),E!==-1;)b.push(E),_.splice(E,1);return{maskWithoutCaretTraps:_,indexes:b}}Object.defineProperty(i,"__esModule",{value:!0}),i.convertMaskToPlaceholder=o,i.isArray=s,i.isString=l,i.isNumber=c,i.isNil=d,i.processCaretTraps=f;var h=a(1),p=[],g="[]"},function(n,i,a){function o(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!(0,l.isArray)(p)){if((typeof p>"u"?"undefined":s(p))!==c.strFunction)throw new Error("Text-mask:conformToMask; The mask property must be an array.");p=p(h,g),p=(0,l.processCaretTraps)(p).maskWithoutCaretTraps}var _=g.guide,b=_===void 0||_,E=g.previousConformedValue,S=E===void 0?f:E,P=g.placeholderChar,O=P===void 0?c.placeholderChar:P,I=g.placeholder,N=I===void 0?(0,l.convertMaskToPlaceholder)(p,O):I,M=g.currentCaretPosition,F=g.keepCharPositions,B=b===!1&&S!==void 0,V=h.length,W=S.length,$=N.length,X=p.length,re=V-W,ae=re>0,Q=M+(ae?-re:0),ie=Q+Math.abs(re);if(F===!0&&!ae){for(var le=f,fe=Q;fe<ie;fe++)N[fe]===O&&(le+=O);h=h.slice(0,Q)+le+h.slice(Q,V)}for(var de=h.split(f).map(function(Be,Ze){return{char:Be,isNew:Ze>=Q&&Ze<ie}}),ge=V-1;ge>=0;ge--){var Ae=de[ge].char;if(Ae!==O){var Fe=ge>=Q&&W===X;Ae===N[Fe?ge-re:ge]&&de.splice(ge,1)}}var Pe=f,ce=!1;e:for(var pe=0;pe<$;pe++){var Ne=N[pe];if(Ne===O){if(de.length>0)for(;de.length>0;){var De=de.shift(),Ve=De.char,Ke=De.isNew;if(Ve===O&&B!==!0){Pe+=O;continue e}if(p[pe].test(Ve)){if(F===!0&&Ke!==!1&&S!==f&&b!==!1&&ae){for(var Qe=de.length,Ue=null,ut=0;ut<Qe;ut++){var We=de[ut];if(We.char!==O&&We.isNew===!1)break;if(We.char===O){Ue=ut;break}}
229Ue!==null?(Pe+=Ve,de.splice(Ue,1)):pe--}else Pe+=Ve;continue e}ce=!0}B===!1&&(Pe+=N.substr(pe,$));break}Pe+=Ne}if(B&&ae===!1){for(var ke=null,Le=0;Le<Pe.length;Le++)N[Le]===O&&(ke=Le);Pe=ke!==null?Pe.substr(0,ke+1):f}return{conformedValue:Pe,meta:{someCharsRejected:ce}}}Object.defineProperty(i,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};i.default=o;var l=a(2),c=a(1),d=[],f=""},function(n,i){function a(l){var c=l.previousConformedValue,d=c===void 0?s:c,f=l.previousPlaceholder,h=f===void 0?s:f,p=l.currentCaretPosition,g=p===void 0?0:p,_=l.conformedValue,b=l.rawValue,E=l.placeholderChar,S=l.placeholder,P=l.indexesOfPipedChars,O=P===void 0?o:P,I=l.caretTrapIndexes,N=I===void 0?o:I;if(g===0||!b.length)return 0;var M=b.length,F=d.length,B=S.length,V=_.length,W=M-F,$=W>0,X=F===0,re=W>1&&!$&&!X;if(re)return g;var ae=$&&(d===_||_===S),Q=0,ie=void 0,le=void 0;if(ae)Q=g-W;else{var fe=_.toLowerCase(),de=b.toLowerCase(),ge=de.substr(0,g).split(s),Ae=ge.filter(function(Et){return fe.indexOf(Et)!==-1});le=Ae[Ae.length-1];var Fe=h.substr(0,Ae.length).split(s).filter(function(Et){return Et!==E}).length,Pe=S.substr(0,Ae.length).split(s).filter(function(Et){return Et!==E}).length,ce=Pe!==Fe,pe=h[Ae.length-1]!==void 0&&S[Ae.length-2]!==void 0&&h[Ae.length-1]!==E&&h[Ae.length-1]!==S[Ae.length-1]&&h[Ae.length-1]===S[Ae.length-2];!$&&(ce||pe)&&Fe>0&&S.indexOf(le)>-1&&b[g]!==void 0&&(ie=!0,le=b[g]);for(var Ne=O.map(function(Et){return fe[Et]}),De=Ne.filter(function(Et){return Et===le}).length,Ve=Ae.filter(function(Et){return Et===le}).length,Ke=S.substr(0,S.indexOf(E)).split(s).filter(function(Et,Yt){return Et===le&&b[Yt]!==Et}).length,Qe=Ke+Ve+De+(ie?1:0),Ue=0,ut=0;ut<V;ut++){var We=fe[ut];if(Q=ut+1,We===le&&Ue++,Ue>=Qe)break}}if($){for(var ke=Q,Le=Q;Le<=B;Le++)if(S[Le]===E&&(ke=Le),S[Le]===E||N.indexOf(Le)!==-1||Le===B)return ke}else if(ie){for(var Be=Q-1;Be>=0;Be--)if(_[Be]===le||N.indexOf(Be)!==-1||Be===0)return Be}else for(var Ze=Q;Ze>=0;Ze--)if(S[Ze-1]===E||N.indexOf(Ze)!==-1||Ze===0)return Ze}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a;var o=[],s=""},function(n,i,a){function o(M){return M&&M.__esModule?M:{default:M}}function s(M){var F={previousConformedValue:void 0,previousPlaceholder:void 0};return{state:F,update:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M,W=V.inputElement,$=V.mask,X=V.guide,re=V.pipe,ae=V.placeholderChar,Q=ae===void 0?E.placeholderChar:ae,ie=V.keepCharPositions,le=ie!==void 0&&ie,fe=V.showMask,de=fe!==void 0&&fe;if(typeof B>"u"&&(B=W.value),B!==F.previousConformedValue){(typeof $>"u"?"undefined":f($))===O&&$.pipe!==void 0&&$.mask!==void 0&&(re=$.pipe,$=$.mask);var ge=void 0,Ae=void 0;if($ instanceof Array&&(ge=(0,b.convertMaskToPlaceholder)($,Q)),$!==!1){var Fe=c(B),Pe=W.selectionEnd,ce=F.previousConformedValue,pe=F.previousPlaceholder,Ne=void 0;if((typeof $>"u"?"undefined":f($))===E.strFunction){if(Ae=$(Fe,{currentCaretPosition:Pe,previousConformedValue:ce,placeholderChar:Q}),Ae===!1)return;var De=(0,b.processCaretTraps)(Ae),Ve=De.maskWithoutCaretTraps,Ke=De.indexes;Ae=Ve,Ne=Ke,ge=(0,b.convertMaskToPlaceholder)(Ae,Q)}else Ae=$;var Qe={previousConformedValue:ce,guide:X,placeholderChar:Q,pipe:re,placeholder:ge,currentCaretPosition:Pe,keepCharPositions:le},Ue=(0,_.default)(Fe,Ae,Qe),ut=Ue.conformedValue,We=(typeof re>"u"?"undefined":f(re))===E.strFunction,ke={};We&&(ke=re(ut,d({rawValue:Fe},Qe)),ke===!1?ke={value:ce,rejected:!0}:(0,b.isString)(ke)&&(ke={value:ke}));var Le=We?ke.value:ut,Be=(0,p.default)({previousConformedValue:ce,previousPlaceholder:pe,conformedValue:Le,placeholder:ge,rawValue:Fe,currentCaretPosition:Pe,placeholderChar:Q,indexesOfPipedChars:ke.indexesOfPipedChars,caretTrapIndexes:Ne}),Ze=Le===ge&&Be===0,Et=de?ge:S,Yt=Ze?Et:Le;F.previousConformedValue=Yt,F.previousPlaceholder=ge,W.value!==Yt&&(W.value=Yt,l(W,Be))}}}}}function l(M,F){document.activeElement===M&&(I?N(function(){return M.setSelectionRange(F,F,P)},0):M.setSelectionRange(F,F,P))}
229function c(M){if((0,b.isString)(M))return M;if((0,b.isNumber)(M))return String(M);if(M==null)return S;throw new Error(`The 'value' provided to Text Mask needs to be a string or a number. The value received was:
230
231 `+JSON.stringify(M))}Object.defineProperty(i,"__esModule",{value:!0});var d=Object.assign||function(M){for(var F=1;F<arguments.length;F++){var B=arguments[F];for(var V in B)Object.prototype.hasOwnProperty.call(B,V)&&(M[V]=B[V])}return M},f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M};i.default=s;var h=a(4),p=o(h),g=a(3),_=o(g),b=a(2),E=a(1),S="",P="none",O="object",I=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),N=typeof requestAnimationFrame<"u"?requestAnimationFrame:setTimeout},function(n,i){function a(s){return function(){return s}}var o=function(){};o.thatReturns=a,o.thatReturnsFalse=a(!1),o.thatReturnsTrue=a(!0),o.thatReturnsNull=a(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(s){return s},n.exports=o},function(n,i,a){function o(s,l,c,d,f,h,p,g){if(!s){var _;if(l===void 0)_=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var b=[c,d,f,h,p,g],E=0;
231_=new Error(l.replace(/%s/g,function(){return b[E++]})),_.name="Invariant Violation"}throw _.framesToPop=1,_}}n.exports=o},function(n,i,a){var o=a(6),s=a(7),l=a(10);n.exports=function(){function c(h,p,g,_,b,E){E!==l&&s(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function d(){return c}c.isRequired=c;var f={array:c,bool:c,func:c,number:c,object:c,string:c,symbol:c,any:c,arrayOf:d,element:c,instanceOf:d,node:c,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d};return f.checkPropTypes=o,f.PropTypes=f,f}},function(n,i,a){n.exports=a(8)()},function(n,i){var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";n.exports=a},function(n,i){n.exports=r}])})})(uR)),uR.exports}var Y5t=K5t();const x4=et(Y5t),X5t=e=>e.replace(/\D/g,"")?.[2]==="9"?["(",/[1-9]/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]:["(",/[1-9]/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/];function Z5t(e){const{inputRef:t,mask:r,...n}=e;return u.createElement(x4,{...n,ref:i=>t(i?i.inputElement:null),mask:r||X5t,guide:!1,keepCharPositions:!1,placeholderChar:" "})}const eg={55:{ddi:55,country:"Brasil",Flag:U5t,mask:e=>e.replace(/\D/g,"")?.[2]==="9"?["(",/[1-9]/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]:["(",/[1-9]/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],placeholder:"(00) 90000-0000",validation:/^([14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])9[0-9]{8}$/,formatter:[/^(?:55)?(\d{2})(\d{4,5})(\d{4})$/,"($1) $2-$3"]},51:{ddi:51,country:"Peru",Flag:q5t,mask:[/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/],placeholder:"900 000 000",validation:/^9\d{8}$/,formatter:[/^(?:51)?(\d{3})(\d{3})(\d{3})$/,"+51 $1 $2 $3"]},54:{ddi:54,country:"Argentina",Flag:z5t,mask:[/\d/," ",/\d/,/\d/," ",/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],placeholder:"9 00 0000-0000",validation:/^9[1-9][0-9][0-9]{8}$/,formatter:[/^(?:54)?(\d)(\d{2})(\d{4})(\d{4})$/,"+54 $1 $2 $3-$4"]},57:{ddi:57,country:"Colômbia",Flag:V5t,mask:[/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],placeholder:"300-000-0000",validation:/^3(0[0-5]|1\d|2[0-4]|5[01]|70)\d{7}$/,formatter:[/^(?:57)?(\d{3})(\d{3})(\d{3})$/,"+57 $1-$2-$3"]},58:{ddi:58,country:"Venezuela",Flag:W5t,mask:[/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/],placeholder:"000 0000000",validation:/^4(1[24-8]|2[46])\d{7}$/,formatter:[/^(?:58)?(\d{3})(\d{7})$/,"+58 $1 $2"]},591:{ddi:591,country:"Bolívia",Flag:H5t,mask:[/\d/," ",/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/,/\d/],placeholder:"0 000 0000",validation:/^[67]\d{7}$/,formatter:[/^(?:591)?(\d{1})(\d{3})(\d{4})$/,"+591 $1 $2 $3"]},595:{ddi:595,country:"Paraguai",Flag:j5t,mask:[/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/],placeholder:"900 000 000",validation:/^9\d{8}$/,formatter:[/^(?:595)?(\d{3})(\d{3})(\d{3})$/,"+595 $1 $2 $3"]},598:{ddi:598,country:"Uruguai",Flag:$5t,mask:[/\d/,/\d/," ",/\d/,/\d/,/\d/," ",/\d/,/\d/,/\d/],placeholder:"90 000 000",validation:/^9[1-9]\d{6}$/,formatter:[/^(?:598)?(\d{2})(\d{3})(\d{3})$/,"+598 $1 $2 $3"]}};function YC(e,t=55){const r=parseInt(t);if(!t||!r||!e||!eg[r]?.validation)return!1;const n=e.replace(/\D/g,"");return!!eg[r].validation?.test(n)}function zd(e,t=55){const r=parseInt(t);return!t||!r||!e||!eg[r]?.formatter?null:e.replace(/\D/g,"").replace(...eg[r].formatter)}function eIe({name:e,label:t,ddi:r,setDdi:n,value:i,onChange:a,error:o,helperText:s,required:l=!1}){const c=at(({globalCompany:g})=>g.company.ddi_allowed),d=u.useRef(null),f=parseInt(r),h=u.useMemo(()=>(c||[55]).map(g=>eg[g]),[c]),p=u.useRef(!0);return u.useEffect(()=>{p.current?p.current=!1:r&&d.current&&d.current.focus()},[r]),u.createElement(Tr,{name:e,label:t||"Telefone",value:i,onChange:a,error:o,helperText:s,placeholder:eg[f].placeholder,inputRef:d,required:l,InputProps:{inputComponent:Z5t,startAdornment:h.length>1&&u.createElement(Fg,{position:"start"},u.createElement(Bd,{value:f,onChange:g=>n(g.target.value),disableUnderline:!0},h.map(g=>u.createElement(ln,{value:g.ddi,key:g.ddi},u.createElement("div",{className:"flex items-center space-x-8"},u.createElement(g.Flag,{className:"w-28"}),u.createElement("span",{className:"text-14 text-gray-400"},"+",g.ddi))))))},inputProps:{inputMode:"tel",mask:eg[f].mask},variant:"outlined",fullWidth:!0})}var Xb={},Pfe;function Q5t(){if(Pfe)return Xb;Pfe=1;var e=$t(),t=Wt();
231Object.defineProperty(Xb,"__esModule",{value:!0}),Xb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");return Xb.default=i,Xb}var J5t=Q5t();const e4t=et(J5t),t4t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function tIe(e){return!e||typeof e!="string"?!1:e.match(t4t)}function rIe(e){return!e||typeof e!="string"?!1:qe(e,"DD/MM/YYYY",!0).isValid()}function r4t(e){const t=e.replace(/\D/g,"");return t.length!==10?!1:/^\d{2}[2-5]\d{7}$/.test(t)}function nIe(e,t=55,r=!1){return r?YC(e,t)||r4t(e):YC(e,t)}var Zb={},Rfe;function n4t(){if(Rfe)return Zb;Rfe=1;var e=$t(),t=Wt();Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 010-1.41L10.59 12 7.7 9.11a.9959.9959 0 010-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");return Zb.default=i,Zb}var i4t=n4t();const a4t=et(i4t);var Qb={},Ofe;function o4t(){if(Ofe)return Qb;Ofe=1;var e=$t(),t=Wt();Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7a.9959.9959 0 010-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"}),"CheckCircleRounded");return Qb.default=i,Qb}var s4t=o4t();const T4=et(s4t);var Jb={},Ife;function l4t(){if(Ife)return Jb;Ife=1;var e=$t(),t=Wt();Object.defineProperty(Jb,"__esModule",{value:!0}),Jb.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");return Jb.default=i,Jb}var c4t=l4t();const u4t=et(c4t),d4t=({src:e,alt:t,width:r,height:n,noImageIcon:i,className:a})=>{const[o,s]=u.useState(!0),[l,c]=u.useState(!0),d=()=>{c(!1),s(!1)},f=()=>{c(!0),s(!1)},h=Ft("flex-shrink-0 bg-gray-100 text-5xl text-gray-400",r||"w-80",n||"h-80",!a?.includes("rounded")&&"rounded-xl",!a?.includes("object-")&&"object-cover"),p=()=>{if(e){if(o)return u.createElement(ai,{fontSize:"inherit",color:"inherit"});if(!l)return u.createElement(Lg,{fontSize:"inherit"},"broken_image")}else return u.createElement(Lg,{fontSize:"inherit"},i||"image")},g=!!e&&!o&&l;return u.createElement(u.Fragment,null,u.createElement("img",{src:e,alt:t,className:Ft(h,a,g?"flex":"hidden"),onError:d,onLoad:f}),(!e||o||!l)&&u.createElement("div",{className:Ft("flex items-center justify-center",h)},p()))},E2=u.memo(d4t);function f4t({children:e,onDragDropChange:t,onDrop:r,...n}){const i=u.useRef(0),a=d=>{d.preventDefault(),d.stopPropagation(),i.current++,d.dataTransfer.items&&d.dataTransfer.items.length>0&&t(!0)},o=d=>{d.preventDefault(),d.stopPropagation(),i.current--,i.current===0&&t(!1)},s=d=>{d.preventDefault(),d.stopPropagation()},l=d=>{d.preventDefault(),d.stopPropagation();const f=[...d.dataTransfer.files];f&&f.length>0&&(r({target:{files:f}}),d.dataTransfer.clearData(),i.current=0,t(!1))},c=()=>{};return u.createElement("div",{onDrop:l,onDragEnter:a,onDragLeave:o,onDragOver:s,onChange:c,...n},e)}var eE={},kfe;function h4t(){if(kfe)return eE;kfe=1;var e=$t(),t=Wt();Object.defineProperty(eE,"__esModule",{value:!0}),eE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"}),"RotateLeft");return eE.default=i,eE}var p4t=h4t();const m4t=et(p4t);var tE={},Nfe;function v4t(){if(Nfe)return tE;Nfe=1;var e=$t(),t=Wt();Object.defineProperty(tE,"__esModule",{value:!0}),tE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"}),"RotateRight");return tE.default=i,tE}var g4t=v4t();const y4t=et(g4t);var AF,Dfe;function _4t(){if(Dfe)return AF;Dfe=1;var e=!1,t,r,n,i,a,o,s,l,c,d,f,h,p,g,_;function b(){if(!e){e=!0;var S=navigator.userAgent,P=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
231weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(S),O=/(Mac OS X)|(Windows)|(Linux)/.exec(S);if(h=/\b(iPhone|iP[ao]d)/.exec(S),p=/\b(iP[ao]d)/.exec(S),d=/Android/i.exec(S),g=/FBAN\/\w+;/i.exec(S),_=/Mobile/i.exec(S),f=!!/Win64/.exec(S),P){t=P[1]?parseFloat(P[1]):P[5]?parseFloat(P[5]):NaN,t&&document&&document.documentMode&&(t=document.documentMode);var I=/(?:Trident\/(\d+.\d+))/.exec(S);o=I?parseFloat(I[1])+4:t,r=P[2]?parseFloat(P[2]):NaN,n=P[3]?parseFloat(P[3]):NaN,i=P[4]?parseFloat(P[4]):NaN,i?(P=/(?:Chrome\/(\d+\.\d+))/.exec(S),a=P&&P[1]?parseFloat(P[1]):NaN):a=NaN}else t=r=n=a=i=NaN;if(O){if(O[1]){var N=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(S);s=N?parseFloat(N[1].replace("_",".")):!0}else s=!1;l=!!O[2],c=!!O[3]}else s=l=c=!1}}var E={ie:function(){return b()||t},ieCompatibilityMode:function(){return b()||o>t},ie64:function(){return E.ie()&&f},firefox:function(){return b()||r},opera:function(){return b()||n},webkit:function(){return b()||i},safari:function(){return E.webkit()},chrome:function(){return b()||a},windows:function(){return b()||l},osx:function(){return b()||s},linux:function(){return b()||c},iphone:function(){return b()||h},mobile:function(){return b()||h||p||d||_},nativeApp:function(){return b()||g},android:function(){return b()||d},ipad:function(){return b()||p}};return AF=E,AF}var PF,Mfe;function b4t(){if(Mfe)return PF;Mfe=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement),t={canUseDOM:e,canUseWorkers:typeof Worker<"u",canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};return PF=t,PF}var RF,Lfe;function E4t(){if(Lfe)return RF;Lfe=1;var e=b4t(),t;e.canUseDOM&&(t=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function r(n,i){if(!e.canUseDOM||i&&!("addEventListener"in document))return!1;var a="on"+n,o=a in document;if(!o){var s=document.createElement("div");s.setAttribute(a,"return;"),o=typeof s[a]=="function"}return!o&&t&&n==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}return RF=r,RF}var OF,Ffe;function w4t(){if(Ffe)return OF;Ffe=1;var e=_4t(),t=E4t(),r=10,n=40,i=800;function a(o){var s=0,l=0,c=0,d=0;return"detail"in o&&(l=o.detail),"wheelDelta"in o&&(l=-o.wheelDelta/120),"wheelDeltaY"in o&&(l=-o.wheelDeltaY/120),"wheelDeltaX"in o&&(s=-o.wheelDeltaX/120),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(s=l,l=0),c=s*r,d=l*r,"deltaY"in o&&(d=o.deltaY),"deltaX"in o&&(c=o.deltaX),(c||d)&&o.deltaMode&&(o.deltaMode==1?(c*=n,d*=n):(c*=i,d*=i)),c&&!s&&(s=c<1?-1:1),d&&!l&&(l=d<1?-1:1),{spinX:s,spinY:l,pixelX:c,pixelY:d}}return a.getEventType=function(){return e.firefox()?"DOMMouseScroll":t("wheel")?"wheel":"mousewheel"},OF=a,OF}var IF,Bfe;function S4t(){return Bfe||(Bfe=1,IF=w4t()),IF}var C4t=S4t();const x4t=et(C4t);function T4t(e,t,r,n,i,a){a===void 0&&(a=0);var o=G1(e,t,a),s=o.width,l=o.height,c=Math.min(s,r),d=Math.min(l,n);return c>d*i?{width:d*i,height:d}:{width:c,height:c/i}}function A4t(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function rE(e,t,r,n,i){i===void 0&&(i=0);var a=G1(t.width,t.height,i),o=a.width,s=a.height;return{x:zfe(e.x,o,r.width,n),y:zfe(e.y,s,r.height,n)}}function zfe(e,t,r,n){var i=Math.abs(t*n/2-r/2);return A4(e,-i,i)}function Hfe(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Ufe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function P4t(e,t,r,n,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!0);var s=o?R4t:O4t,l=G1(t.width,t.height,a),c=G1(t.naturalWidth,t.naturalHeight,a),d={x:s(100,((l.width-r.width/i)/2-e.x/i)/l.width*100),y:s(100,((l.height-r.height/i)/2-e.y/i)/l.height*100),width:s(100,r.width/l.width*100/i),height:s(100,r.height/l.height*100/i)},f=Math.round(s(c.width,d.width*c.width/100)),h=Math.round(s(c.height,d.height*c.height/100)),p=c.width>=c.height*n,g=p?{width:Math.round(h*n),height:h}:{width:f,height:Math.round(f/n)},_=Rt(Rt({},g),{x:Math.round(s(c.width-g.width,d.x*c.width/100)),y:Math.round(s(c.height-g.height,d.y*c.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:_}}function R4t(e,t){return Math.min(e,Math.max(0,t))}function O4t(e,t){return t}function I4t(e,t,r,n,i,a){var o=G1(t.width,t.height,r),s=A4(n.width/o.width*(100/e.width),i,a),l={x:s*o.width/2-n.width/2-o.width*s*(e.x/100),y:s*o.height/2-n.height/2-o.height*s*(e.y/100)};return{crop:l,zoom:s}}function k4t(e,t,r){var n=A4t(t);return r.height>r.width?r.height/(e.height*n):r.width/(e.width*n)}function N4t(e,t,r,n,i,a){r===void 0&&(r=0);
231var o=G1(t.naturalWidth,t.naturalHeight,r),s=A4(k4t(e,t,n),i,a),l=n.height>n.width?n.height/e.height:n.width/e.width,c={x:((o.width-e.width)/2-e.x)*l,y:((o.height-e.height)/2-e.y)*l};return{crop:c,zoom:s}}function Vfe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function D4t(e){return e*Math.PI/180}function G1(e,t,r){var n=D4t(r);return{width:Math.abs(Math.cos(n)*e)+Math.abs(Math.sin(n)*t),height:Math.abs(Math.sin(n)*e)+Math.abs(Math.cos(n)*t)}}function A4(e,t,r){return Math.min(Math.max(e,t),r)}function ZA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(r){return typeof r=="string"&&r.length>0}).join(" ").trim()}var M4t=`.reactEasyCrop_Container {
232  position: absolute;
233  top: 0;
234  left: 0;
235  right: 0;
236  bottom: 0;
237  overflow: hidden;
238  user-select: none;
239  touch-action: none;
240  cursor: move;
241  display: flex;
242  justify-content: center;
243  align-items: center;
244}
245
246.reactEasyCrop_Image,
247.reactEasyCrop_Video {
248  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
249}
250
251.reactEasyCrop_Contain {
252  max-width: 100%;
253  max-height: 100%;
254  margin: auto;
255  position: absolute;
256  top: 0;
257  bottom: 0;
258  left: 0;
259  right: 0;
260}
261.reactEasyCrop_Cover_Horizontal {
262  width: 100%;
263  height: auto;
264}
265.reactEasyCrop_Cover_Vertical {
266  width: auto;
267  height: 100%;
268}
269
270.reactEasyCrop_CropArea {
271  position: absolute;
272  left: 50%;
273  top: 50%;
274  transform: translate(-50%, -50%);
275  border: 1px solid rgba(255, 255, 255, 0.5);
276  box-sizing: border-box;
277  box-shadow: 0 0 0 9999em;
278  color: rgba(0, 0, 0, 0.5);
279  overflow: hidden;
280}
281
282.reactEasyCrop_CropAreaRound {
283  border-radius: 50%;
284}
285
286.reactEasyCrop_CropAreaGrid::before {
287  content: ' ';
288  box-sizing: border-box;
289  position: absolute;
290  border: 1px solid rgba(255, 255, 255, 0.5);
291  top: 0;
292  bottom: 0;
293  left: 33.33%;
294  right: 33.33%;
295  border-top: 0;
296  border-bottom: 0;
297}
298
299.reactEasyCrop_CropAreaGrid::after {
300  content: ' ';
301  box-sizing: border-box;
302  position: absolute;
303  border: 1px solid rgba(255, 255, 255, 0.5);
304  top: 33.33%;
305  bottom: 33.33%;
306  left: 0;
307  right: 0;
308  border-left: 0;
309  border-right: 0;
310}
311`,L4t=1,F4t=3,B4t=1,z4t=(function(e){Hq(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.cropperRef=x.createRef(),r.imageRef=x.createRef(),r.videoRef=x.createRef(),r.containerPosition={x:0,y:0},r.containerRef=null,r.styleRef=null,r.containerRect=null,r.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},r.dragStartPosition={x:0,y:0},r.dragStartCrop={x:0,y:0},r.gestureZoomStart=0,r.gestureRotationStart=0,r.isTouching=!1,r.lastPinchDistance=0,r.lastPinchRotation=0,r.rafDragTimeout=null,r.rafPinchTimeout=null,r.wheelTimer=null,r.currentDoc=typeof document<"u"?document:null,r.currentWindow=typeof window<"u"?window:null,r.resizeObserver=null,r.previousCropSize=null,r.isInitialized=!1,r.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},r.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!r.containerRef)){var n=!0;r.resizeObserver=new window.ResizeObserver(function(i){if(n){n=!1;return}r.computeSizes()}),r.resizeObserver.observe(r.containerRef)}},r.preventZoomSafari=function(n){return n.preventDefault()},r.cleanEvents=function(){r.currentDoc&&(r.currentDoc.removeEventListener("mousemove",r.onMouseMove),r.currentDoc.removeEventListener("mouseup",r.onDragStopped),r.currentDoc.removeEventListener("touchmove",r.onTouchMove),r.currentDoc.removeEventListener("touchend",r.onDragStopped),r.currentDoc.removeEventListener("gesturechange",r.onGestureChange),r.currentDoc.removeEventListener("gestureend",r.onGestureEnd),r.currentDoc.removeEventListener("scroll",r.onScroll))},r.clearScrollEvent=function(){r.containerRef&&r.containerRef.removeEventListener("wheel",r.onWheel),r.wheelTimer&&clearTimeout(r.wheelTimer)},r.onMediaLoad=function(){var n=r.computeSizes();n&&(r.previousCropSize=n,r.emitCropData(),r.setInitialCrop(n),r.isInitialized=!0),r.props.onMediaLoaded&&r.props.onMediaLoaded(r.mediaSize)},r.setInitialCrop=function(n){if(r.props.initialCroppedAreaPercentages){var i=I4t(r.props.initialCroppedAreaPercentages,r.mediaSize,r.props.rotation,n,r.props.minZoom,r.props.maxZoom),a=i.crop,o=i.zoom;r.props.onCropChange(a),r.props.onZoomChange&&r.props.onZoomChange(o)}else if(r.props.initialCroppedAreaPixels){var s=N4t(r.props.initialCroppedAreaPixels,r.mediaSize,r.props.rotation,n,r.props.minZoom,r.props.maxZoom),a=s.crop,o=s.zoom;r.props.onCropChange(a),r.props.onZoomChange&&r.props.onZoomChange(o)}},r.computeSizes=function(){var n,i,a,o,s,l,c=r.imageRef.current||r.videoRef.current;if(c&&r.containerRef){r.containerRect=r.containerRef.getBoundingClientRect(),r.saveContainerPosition();var d=r.containerRect.width/r.containerRect.height,f=((n=r.imageRef.current)===null||n===void 0?void 0:n.naturalWi
311dth)||((i=r.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((a=r.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((o=r.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,p=c.offsetWidth<f||c.offsetHeight<h,g=f/h,_=void 0;if(p)switch(r.state.mediaObjectFit){default:case"contain":_=d>g?{width:r.containerRect.height*g,height:r.containerRect.height}:{width:r.containerRect.width,height:r.containerRect.width/g};break;case"horizontal-cover":_={width:r.containerRect.width,height:r.containerRect.width/g};break;case"vertical-cover":_={width:r.containerRect.height*g,height:r.containerRect.height};break}else _={width:c.offsetWidth,height:c.offsetHeight};r.mediaSize=Rt(Rt({},_),{naturalWidth:f,naturalHeight:h}),r.props.setMediaSize&&r.props.setMediaSize(r.mediaSize);var b=r.props.cropSize?r.props.cropSize:T4t(r.mediaSize.width,r.mediaSize.height,r.containerRect.width,r.containerRect.height,r.props.aspect,r.props.rotation);return(((s=r.state.cropSize)===null||s===void 0?void 0:s.height)!==b.height||((l=r.state.cropSize)===null||l===void 0?void 0:l.width)!==b.width)&&r.props.onCropSizeChange&&r.props.onCropSizeChange(b),r.setState({cropSize:b},r.recomputeCropPosition),r.props.setCropSize&&r.props.setCropSize(b),b}},r.saveContainerPosition=function(){if(r.containerRef){var n=r.containerRef.getBoundingClientRect();r.containerPosition={x:n.left,y:n.top}}},r.onMouseDown=function(n){r.currentDoc&&(n.preventDefault(),r.currentDoc.addEventListener("mousemove",r.onMouseMove),r.currentDoc.addEventListener("mouseup",r.onDragStopped),r.saveContainerPosition(),r.onDragStart(t.getMousePoint(n)))},r.onMouseMove=function(n){return r.onDrag(t.getMousePoint(n))},r.onScroll=function(n){r.currentDoc&&(n.preventDefault(),r.saveContainerPosition())},r.onTouchStart=function(n){r.currentDoc&&(r.isTouching=!0,!(r.props.onTouchRequest&&!r.props.onTouchRequest(n))&&(r.currentDoc.addEventListener("touchmove",r.onTouchMove,{passive:!1}),r.currentDoc.addEventListener("touchend",r.onDragStopped),r.saveContainerPosition(),n.touches.length===2?r.onPinchStart(n):n.touches.length===1&&r.onDragStart(t.getTouchPoint(n.touches[0]))))},r.onTouchMove=function(n){n.preventDefault(),n.touches.length===2?r.onPinchMove(n):n.touches.length===1&&r.onDrag(t.getTouchPoint(n.touches[0]))},r.onGestureStart=function(n){r.currentDoc&&(n.preventDefault(),r.currentDoc.addEventListener("gesturechange",r.onGestureChange),r.currentDoc.addEventListener("gestureend",r.onGestureEnd),r.gestureZoomStart=r.props.zoom,r.gestureRotationStart=r.props.rotation)},r.onGestureChange=function(n){if(n.preventDefault(),!r.isTouching){var i=t.getMousePoint(n),a=r.gestureZoomStart-1+n.scale;if(r.setNewZoom(a,i,{shouldUpdatePosition:!0}),r.props.onRotationChange){var o=r.gestureRotationStart+n.rotation;r.props.onRotationChange(o)}}},r.onGestureEnd=function(n){r.cleanEvents()},r.onDragStart=function(n){var i,a,o=n.x,s=n.y;r.dragStartPosition={x:o,y:s},r.dragStartCrop=Rt({},r.props.crop),(a=(i=r.props).onInteractionStart)===null||a===void 0||a.call(i)},r.onDrag=function(n){var i=n.x,a=n.y;r.currentWindow&&(r.rafDragTimeout&&r.currentWindow.cancelAnimationFrame(r.rafDragTimeout),r.rafDragTimeout=r.currentWindow.requestAnimationFrame(function(){if(r.state.cropSize&&!(i===void 0||a===void 0)){var o=i-r.dragStartPosition.x,s=a-r.dragStartPosition.y,l={x:r.dragStartCrop.x+o,y:r.dragStartCrop.y+s},c=r.props.restrictPosition?rE(l,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):l;r.props.onCropChange(c)}}))},r.onDragStopped=function(){var n,i;r.isTouching=!1,r.cleanEvents(),r.emitCropData(),(i=(n=r.props).onInteractionEnd)===null||i===void 0||i.call(n)},r.onWheel=function(n){if(r.currentWindow&&!(r.props.onWheelRequest&&!r.props.onWheelRequest(n))){n.preventDefault();var i=t.getMousePoint(n),a=x4t(n).pixelY,o=r.props.zoom-a*r.props.zoomSpeed/200;r.setNewZoom(o,i,{shouldUpdatePosition:!0}),r.state.hasWheelJustStarted||r.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=r.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),r.wheelTimer&&clearTimeout(r.wheelTimer),r.wheelTimer=r.currentWindow.setTimeout(function(){return r.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=r.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},r.getPointOnContainer=function(n,i){var a=n.x,o=n.y;if(!r.containerRect)throw new Error("The Cropper is not mounted");return{x:r.containerRect.width/2-(a-i.x),y:r.containerRect.height/2-(o-i.y)}},r.getPointOnMedia=function(n){var i=n.x,a=n.y,o=r.props,s=o.crop,l=o.zoom;return{x:(i+s.x)/l,y:(a+s.y)/l}},r.setNewZoom=function(n,i,a){var o=a===void 0?{}:a,s=o.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!r.state.cropSize||!r.props.onZoomChange)){var c=A4(n,r.props.minZoom,r.props.maxZoom);if(l){var d=r.getPointOnContainer(i,r.containerPosition),f=r.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=r.props.restrictPosition?rE(h,r.mediaSize,r.state.cropSize,c,r.props.rotation):h;r.props.onCropChange(p)}r.props.onZoomChange(c)}},r.getCropData=function(){if(!r.state.cropSize)return null;var n=r.props.restrictPosition?rE(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop;return P4t(n,r.mediaSize,r.state.cropSize,r.getAspect(),r.props.zoom,r.props.rotation,r.props.restrictPosition)},r.emitCropData=function(){var n=r.getCropData();if(n){var i=n.croppedAreaPercentages,a=n.croppedAreaPixels;r.props.onCropComplete&&r.props.onCropComplete(i,a),r.props.onCropAreaChange&&r.props.onCropAreaChange(i,a)}},r.emitCropAreaChange=function(){var n=r.getCropData();if(n){var i=n.croppedAreaPercentages,a=n.croppedAreaPixels;r.props.onCropAreaChange&&r.props.onCropAreaChange(i,a)}},r.recomputeCropPosition=function(){var n,i;if(r.state.cropSize){var a=r.props.crop;if(r.isInitialized&&(!((n=r.previousCropSize)===null||n===void 0)&&n.width)&&(!((i=r.previousCropSize)===null||i===void 0)&&i.height)){var o=Math.abs(r.previousCropSize.width-r.state.cropSize.width)>1e-6||Math.abs(r.previousCropSize.height-r.state.cropSize.height)>1e-6;if(o){var s=r.state.cropSize.width/r.previousCropSize.width,l=r.state.cropSize.height/r.previousCropSize.height;a={x:r.props.crop.x*s,y:r.props.crop.y*l}}}var c=r.props.restrictPosition?rE(a,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):a;r.previousCropSize=r.state.cropSize,r.props.onCropChange(c),r.emitCropData()}},r.onKeyDown=function(n){var i,a,o=r.props,s=o.crop,l=o.onCropChange,c=o.keyboardStep,d=o.zoom,f=o.rotation,h=c;
311if(r.state.cropSize){n.shiftKey&&(h*=.2);var p=Rt({},s);switch(n.key){case"ArrowUp":p.y-=h,n.preventDefault();break;case"ArrowDown":p.y+=h,n.preventDefault();break;case"ArrowLeft":p.x-=h,n.preventDefault();break;case"ArrowRight":p.x+=h,n.preventDefault();break;default:return}r.props.restrictPosition&&(p=rE(p,r.mediaSize,r.state.cropSize,d,f)),n.repeat||(a=(i=r.props).onInteractionStart)===null||a===void 0||a.call(i),l(p)}},r.onKeyUp=function(n){var i,a;switch(n.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":n.preventDefault();break;default:return}r.emitCropData(),(a=(i=r.props).onInteractionEnd)===null||a===void 0||a.call(i)},r}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=M4t,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var r,n;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(r=this.resizeObserver)===null||r===void 0||r.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((n=this.styleRef.parentNode)===null||n===void 0||n.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(r){var n,i,a,o,s,l,c,d,f;r.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):r.aspect!==this.props.aspect?this.computeSizes():r.objectFit!==this.props.objectFit?this.computeSizes():r.zoom!==this.props.zoom?this.recomputeCropPosition():((n=r.cropSize)===null||n===void 0?void 0:n.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((a=r.cropSize)===null||a===void 0?void 0:a.width)!==((o=this.props.cropSize)===null||o===void 0?void 0:o.width)?this.computeSizes():(((s=r.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=r.crop)===null||c===void 0?void 0:c.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),r.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),r.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var r=this.props,n=r.cropSize,i=r.aspect;return n?n.width/n.height:i},t.prototype.getObjectFit=function(){var r,n,i,a;if(this.props.objectFit==="cover"){var o=this.imageRef.current||this.videoRef.current;if(o&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((r=this.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=this.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,d=l/c;return d<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(r){var n=t.getTouchPoint(r.touches[0]),i=t.getTouchPoint(r.touches[1]);this.lastPinchDistance=Hfe(n,i),this.lastPinchRotation=Ufe(n,i),this.onDragStart(Vfe(n,i))},t.prototype.onPinchMove=function(r){var n=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(r.touches[0]),a=t.getTouchPoint(r.touches[1]),o=Vfe(i,a);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=Hfe(i,a),l=n.props.zoom*(s/n.lastPinchDistance);n.setNewZoom(l,o,{shouldUpdatePosition:!1}),n.lastPinchDistance=s;var c=Ufe(i,a),d=n.props.rotation+(c-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(d),n.lastPinchRotation=c})}},t.prototype.render=function(){var r=this,n,i=this.props,a=i.image,o=i.video,s=i.mediaProps,l=i.cropperProps,c=i.transform,d=i.crop,f=d.x,h=d.y,p=i.rotation,g=i.zoom,_=i.cropShape,b=i.showGrid,E=i.roundCropAreaPixels,S=i.style,P=S.containerStyle,O=S.cropAreaStyle,I=S.mediaStyle,N=i.classes,M=N.containerClassName,F=N.
311cropAreaClassName,B=N.mediaClassName,V=(n=this.state.mediaObjectFit)!==null&&n!==void 0?n:this.getObjectFit();return x.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function($){return r.containerRef=$},"data-testid":"container",style:P,className:ZA("reactEasyCrop_Container",M)},a?x.createElement("img",Rt({alt:"",className:ZA("reactEasyCrop_Image",V==="contain"&&"reactEasyCrop_Contain",V==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",V==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",B)},s,{src:a,ref:this.imageRef,style:Rt(Rt({},I),{transform:c||"translate(".concat(f,"px, ").concat(h,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),onLoad:this.onMediaLoad})):o&&x.createElement("video",Rt({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ZA("reactEasyCrop_Video",V==="contain"&&"reactEasyCrop_Contain",V==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",V==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",B)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Rt(Rt({},I),{transform:c||"translate(".concat(f,"px, ").concat(h,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map(function(W){return x.createElement("source",Rt({key:W.src},W))})),this.state.cropSize&&x.createElement("div",Rt({ref:this.cropperRef,style:Rt(Rt({},O),{width:E?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:E?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:ZA("reactEasyCrop_CropArea",_==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",F)},l)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:F4t,minZoom:L4t,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:B4t},t.getMousePoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},t.getTouchPoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},t})(x.Component);const H4t=e=>new Promise((t,r)=>{const n=new Image;n.addEventListener("load",()=>t(n)),n.addEventListener("error",i=>r(i)),n.setAttribute("crossOrigin","anonymous"),n.src=e});function U4t(e){return e*Math.PI/180}const V4t=2897;async function q4t(e,t,r,n,i=0){const a=await H4t(e),o=document.createElement("canvas"),s=o.getContext("2d"),l=document.createElement("canvas"),c=l.getContext("2d");let d;/iPhone|iPad|iPod|Mac/i.test(navigator.userAgent)?d=Math.min(Math.max(a.width,a.height),V4t):d=Math.max(a.width,a.height);const f=2*(d/2*Math.sqrt(2));o.width=f,o.height=f,s.translate(f/2,f/2),s.rotate(U4t(i)),s.translate(-f/2,-f/2),s.drawImage(a,f/2-a.width*.5,f/2-a.height*.5);const h=s.getImageData(0,0,f,f);o.width=n.width,o.height=n.height,s.putImageData(h,Math.round(0-f/2+a.width*.5-n.x),Math.round(0-f/2+a.height*.5-n.y));let p=r.maxWidth,g=r.maxHeight,_=n.height,b=n.width;const E=b/_;return p<1/0&&g<1/0?g*E>p?g=p/E:p=g*E:p<1/0?g=p/E:g<1/0&&(p=g*E),_*E>b?_=b/E:b=_*E,b=Math.round(Math.min(b,p)),_=Math.round(Math.min(_,g)),l.width=b,l.height=_,c.fillStyle="#FFFFFF",c.fillRect(0,0,l.width,l.height),c.drawImage(o,0,0,b,_),new Promise(S=>{l.toBlob(P=>{const O=new File([P],t,{type:r.mimeType});S(O)},r.mimeType,r.quality)})}const j4t=u.forwardRef(({imageSrc:e,cropOptions:t},r)=>{const[n,i]=x.useState({x:0,y:0}),[a,o]=x.useState(0),[s,l]=x.useState(1),[c,d]=x.useState(null),f=u.useCallback(async _=>await q4t(e,_,t,c,a),[e,t,c,a]);u.useImperativeHandle(r,()=>({getCroppedImage:f}),[f]);const h=u.useCallback((_,b)=>{d(b)},[]),p=u.useCallback(()=>{o(_=>(_-90+360)%360)},[]),g=u.useCallback(()=>{o(_=>(_+90+360)%360)},[]);return u.createElement(u.Fragment,null,u.createElement("div",{className:"relative h-288 w-full sm:h-400"},u.createElement(z4t,{image:e,crop:n,rotation:a,zoom:s,minZoom:.5,aspect:t.aspect,onCropChange:i,onRotationChange:o,onCropComplete:h,onZoomChange:l,restrictPosition:!1})),u.createElement("div",{className:"mt-16 flex items-center space-x-16 pl-16"},u.createElement($St,{value:s,min:.5,max:3,step:.05,onChange:(_,b)=>l(b),color:"primary"}),u.createElement(cr,{onClick:p,color:"primary"},u.createElement(m4t,null)),u.createElement(cr,{onClick:g,color:"primary"},u.createElement(y4t,null))))});function $4t({imageSrc:e,imageName:t,onCropCancel:r,onCropSave:n,onError:i,cropOptions:a}){const[o,s]=u.useState(!1),l=yc("(max-width:600px)"),c=u.useRef(),d=u.useCallback(()=>{r()},[r]),f=u.useCallback(async()=>
311{if(c.current.getCroppedImage){s(!0);try{const h=me.generateGUID()+t,p=await c.current.getCroppedImage(h||"croppedImage");n(p)}catch{i("Erro ao cortar a imagem")}s(!1)}},[t,n,i]);return u.createElement(Eo,{open:!!e,onClose:d,fullWidth:!0,fullScreen:l,className:"relative",PaperProps:{className:"max-w-680"}},u.createElement("div",{className:"flex w-full"},u.createElement("div",{className:"flex-1 overflow-x-hidden"},u.createElement(fo,{variant:"h6",className:"px-20 py-12"},"Cortar imagem")),u.createElement(cr,{onClick:d,className:"mx-8"},u.createElement(Dm,null))),u.createElement(Xc,{dividers:!0,className:"p-12 sm:p-20"},u.createElement(j4t,{imageSrc:e,cropOptions:a,ref:c})),u.createElement(VC,{className:"p-12 sm:px-20 sm:py-16"},u.createElement(fr,{onClick:d,variant:"outlined"},"Cancelar"),u.createElement(fr,{onClick:f,variant:"contained",color:"primary"},"Salvar")),o&&u.createElement("div",{className:"absolute inset-0 z-999 flex items-center justify-center bg-white opacity-75"},u.createElement(ai,null)))}const W4t=u.memo($4t),qfe=yr(e=>({root:{height:4,borderRadius:2},colorPrimary:{backgroundColor:e.palette.grey[300]},bar:{borderRadius:2,backgroundColor:e.palette.primary.main}}))(V_),QA={file:null,uploading:!1,preview:null,progress:0,uploaded:!1,error:!1,url:null},G4t={aspect:1,quality:.9,maxWidth:700,maxHeight:700,mimeType:"image/jpeg"};function Ntr({imageURL:e,endpoint:t,endpointFieldName:r,requestMethod:n,onUploaded:i,onError:a,onLoading:o,cropOptions:s,dropzoneClasses:l,hideDropzoneText:c,noCrop:d,NewUploadIcon:f=u4t}){const[h,p]=u.useState(null),[g,_]=u.useState({...QA}),[b,E]=u.useState(!1),S=u.useMemo(()=>({...G4t,...s}),[s]),P=u.useRef(null),O=u.useCallback(B=>{_(V=>({...V,...B}))},[]);u.useEffect(()=>{e?(_(B=>({...QA,file:B.file,url:e,uploaded:B.uploaded})),p(null)):(_(B=>({...QA,file:B.file,uploaded:B.uploaded})),p(null))},[e,O,g.uploaded]),u.useEffect(()=>{o&&o(g.uploading)},[g.uploading,o]);const I=u.useCallback(()=>{p(null),_(()=>({...QA,url:e||null}))},[e]),N=u.useCallback(B=>{const V=new FormData;return B&&V.append(r||"image",B,B.name),(n==="post"?ht.post:ht.put)(t,V,{onUploadProgress:$=>{const X=Math.round($.loaded*100/$.total);O({progress:X})}}).then($=>{$.status===200&&$.data.status!==500?(O({uploaded:!0,url:URL.createObjectURL(B)}),i($.data)):O({error:!0,url:URL.createObjectURL(B)})}).catch(()=>{O({error:!0,url:URL.createObjectURL(B)})})},[t,r,i,n,O]),M=u.useCallback(B=>{p(null);const V=URL.createObjectURL(B);t?(O({uploading:!0,preview:V}),N(B).then(()=>{O({uploading:!1})})):(O({uploaded:!0,url:V}),i({image:B,image_url:V}))},[t,i,N,O]),F=B=>{if(B.target.files&&B.target.files.length>0){let V=B.target.files[0];if(d)M(V);else if(["image/jpg","image/png","image/jpeg","image/webp"].includes(V.type)){if(V.type==="image/webp"){const $=V.slice(0,V.size,"image/png");V=new File([$],V.name.replace(".webp",".png"),{type:V.type.replace("/webp","/png")})}O({file:V,url:e});const W=new FileReader;W.addEventListener("load",()=>{p(W.result),P.current.value=""},!1),V&&W.readAsDataURL(V)}else a("Tipo de arquivo não suportado")}};return u.createElement(u.Fragment,null,g.uploading?u.createElement("div",{className:Ft("h-full w-full overflow-hidden rounded-6 p-4 transition-colors duration-500","border-2 border-dashed border-gray-300 bg-gray-50 hover:border-cardapio-web",l)},c?u.createElement("div",{className:"relative flex h-full w-full cursor-pointer flex-col items-center justify-center text-center text-gray-600"},u.createElement("img",{src:g.preview,alt:"Preview",className:"h-56 w-56 rounded-full"}),u.createElement("div",{className:"absolute inset-0 z-999 flex items-center justify-center"},g.progress<100?u.createElement(ai,{variant:"determinate",value:g.progress,size:"7rem",thickness:1.6}):u.createElement(ai,{variant:"indeterminate",size:"7rem",thickness:1.6}))):u.createElement("div",{className:"flex h-full w-full cursor-pointer flex-col items-center justify-center text-center text-gray-600"},u.createElement("img",{src:g.preview,alt:"Preview",className:"mb-12 h-auto w-92 rounded-6"}),u.createElement("span",null,"Enviando..."),u.createElement("div",{className:"w-full max-w-192 px-16 py-12"},g.progress<100?u.createElement(qfe,{variant:"determinate",value:g.progress}):u.createElement(qfe,{variant:"indeterminate"})))):u.createElement(f4t,{onDrop:F,onDragDropChange:E,className:Ft("relative flex h-full w-full items-center justify-center overflow-hidden rounded-6 p-4","border-2 border-dashed border-gray-300 bg-gray-50 transition-colors duration-300 hover:border-cardapio-web",g.error&&"border-red-light",g.uploaded&&"animate-passingThroughBorderSuccess",b&&"border-cardapio-web",l)},u.createElement("input",{id:"upload-image"+t+r,ref:P,type:"file",accept:"image/*",className:"sr-only",onChange:F}),!g.url&&u.createElement("label",{htmlFor:"upload-image"+t+r,className:Ft("flex h-full w-full cursor-pointer flex-col items-center justify-center text-center text-gray-600 transition-opacity duration-300",b&&"opacity-20")},u.createElement(f,{className:"text-72 text-gray-300"}),!c&&u.createElement(u.Fragment,null,u.createElement("strong",{className:"mt-12"},"Selecione uma imagem"),u.createElement("span",null,"ou arraste e solte"))),g.url&&u.createElement("label",{htmlFor:"upload-image"+t+r,className:Ft("relative flex h-full w-full cursor-pointer flex-col items-center justify-center overflow-hidden text-center text-gray-600",l)},u.createElement(E2,{src:g.url,alt:"Preview",width:"max-w-full",height:"max-h-full",className:Ft("transition-opacity duration-300",(g.error||b)&&"opacity-10")}),u.createElement(T4,{className:Ft("absolute z-99 text-72 text-green-light opacity-0",g.uploaded&&"animate-passingThrough")}),g.error&&u.createElement("div",{className:"absolute z-99 flex flex-col items-center justify-center"},u.createElement(a4t,{className:"text-72 text-red-light"}),!c&&u.createElement(u.Fragment,null,u.createElement("strong",{className:"mt-12 font-bold text-red"},"Erro ao enviar"),u.createElement("strong",{className:"font-bold text-red"},"Tente novamente"))))),h&&!d&&u.createElement(W4t,{imageSrc:h,imageName:g.file?.name,onCropCancel:I,onCropSave:M,onError:a,cropOptions:S}))}const jfe=(e,t=!1)=>{const n=((typeof e=="number"?Math.round(e*100):e)??"").toString().replace(/\D/g,"");return n.length>2?(parseInt(n)/100).toFixed(2).replace(".",","):t&&n.length>0?`${n},00`:n},K4t=u.forwardRef(({label:e,name:t,value:r,onChange:n,InputProps:i,...a},o)=>{const s=u.useCallback(d=>{d.target.value=jfe(d.target.value),n(d)},[n]),l=u.useCallback(()=>{n({target:{name:t,value:jfe(r,!0)},persist:()=>{}})},[t,n,r]),c=typeof r=="number"?me.formatCurrencyString(r):r||"";return u.createElement(Tr,{ref:o,name:t,label:e,value:c,onChange:s,InputProps:{startAdornment:u.createElement(Fg,{position:"start"},"R$"),...i||{}},onFocus:d=>{d.target.select()},inputProps:{inputMode:"numeric"},onBlur:l,placeholder:"0,00",size:"small",variant:"outlined",fullWidth:!0,...a})}),pm=u.memo(K4t),Y4t=u.forwardRef(({name:e,label:t,value:r,onChange:n,options:i,optionValueKey:a,optionLabelKey:o,helperText:s,selectProps:l,...c},d)=>u.createElement(um,{variant:"outlined",size:"small",fullWidth:!0,...c},u.createElement(dm,{id:`${e}-label`},t),u.createElement(Bd,{ref:d,labelId:`${e}-label`,name:e,value:r,onChange:n,label:t,...l},(i||[]).map(f=>
311u.createElement(ln,{key:f[a],value:f[a]},f[o]))),s&&u.createElement(h4,null,s))),X4t=u.memo(Y4t),Z4t=({name:e,label:t,value:r,onChange:n,options:i,optionValueKey:a,optionLabelKey:o,renderValue:s,helperText:l,...c})=>u.createElement(um,{variant:"outlined",size:"small",color:"primary",fullWidth:!0,...c},u.createElement(dm,{id:`${e}-label`},t),u.createElement(Bd,{labelId:`${e}-label`,name:e,value:r,onChange:n,label:t,renderValue:s,multiple:!0},(i||[]).map(d=>u.createElement(ln,{key:d[a],value:d[a]},u.createElement(f4,{checked:d.checked||!1,color:"primary",className:"p-0 pr-12"}),u.createElement(oV,{primary:d[o]})))),l&&u.createElement(h4,null,l)),Dtr=u.memo(Z4t),Q4t=u.forwardRef(({label:e,name:t,sublabel:r,checked:n,onChange:i,noWrap:a,...o},s)=>u.createElement(Mg,{control:u.createElement(bI,{ref:s,name:t,checked:n||!1,onChange:i,color:"primary",size:"small"}),label:u.createElement("div",{className:Ft("ml-4 text-16 text-gray-600",a&&"whitespace-nowrap")},e,r&&u.createElement("div",{className:"text-14 font-light text-gray-500"},r)),className:"m-0",...o})),Mtr=u.memo(Q4t),J4t=({label:e,name:t,value:r,onChange:n,...i})=>u.createElement(Tr,{name:t,label:e,value:r===null?"":r,onChange:n,size:"small",variant:"outlined",fullWidth:!0,...i}),Ltr=u.memo(J4t),ekt=u.forwardRef(({label:e,name:t,value:r,onChange:n,...i},a)=>{const o=u.useCallback(s=>{const l=(s.target.value||"").toString().replace(/\D/g,"");s.target.value=l,n(s)},[n]);return u.createElement(Tr,{ref:a,name:t,label:e,value:r===null?"":r,onChange:o,onFocus:s=>{s.target.select()},type:"tel",inputMode:"numeric",size:"small",variant:"outlined",fullWidth:!0,...i})}),iIe=u.memo(ekt),tkt=u.forwardRef(({label:e,name:t,value:r,onChange:n,...i},a)=>{const o=u.useCallback(s=>{/^([0-9]+[.|,])?[0-9]*$/.test(s.target.value)&&(s.target.value=s.target.value.replace(",","."),n(s))},[n]);return u.createElement(Tr,{ref:a,name:t,label:e,value:r?r.toString().replace(".",","):"",onChange:o,inputMode:"numeric",size:"small",variant:"outlined",fullWidth:!0,...i})}),aIe=u.memo(tkt);var nE={},$fe;function rkt(){if($fe)return nE;$fe=1;var e=$t(),t=Wt();Object.defineProperty(nE,"__esModule",{value:!0}),nE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");return nE.default=i,nE}var nkt=rkt();const oIe=et(nkt);function sIe(e){const{inputRef:t,...r}=e;return u.createElement(x4,{...r,ref:n=>{t(n?n.inputElement:null)},guide:!1,keepCharPositions:!1,mask:[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],placeholderChar:" "})}function lIe(e){const{inputRef:t,...r}=e;return u.createElement(x4,{...r,ref:n=>{t(n?n.inputElement:null)},guide:!1,keepCharPositions:!1,mask:[/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/],placeholderChar:" "})}const ikt={border:"none",padding:0,borderRadius:10,background:"none",cursor:"pointer",width:"0px",height:"0px"},Ftr=u.memo(u.forwardRef(({label:e,error:t,helperText:r,variant:n,fullWidth:i,required:a,className:o,...s},l)=>{const c={label:e,error:t,helperText:r,variant:n,fullWidth:i,required:a,className:o},d=s.id||s.name||"picker-color",f=s.value||"#000000";return u.createElement(Tr,{type:"text",...c,...s,InputProps:{startAdornment:u.createElement(Fg,{position:"start"},u.createElement("label",{htmlFor:d},u.createElement("div",{style:{width:24,height:24,backgroundColor:f,border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer"}})),u.createElement("input",{id:d,type:"color",ref:l,style:ikt,...s}))}})}));async function akt(e){const t=await ht.get("/api/v1/company/client/search",{params:e});return t.status===200&&t.data.status!==500?t.data:[]}async function okt(e){const t=await ht.get(`/api/v1/company/clients/${e}`);if(t.status===200&&t.data.status!==500)return t.data;throw Error()}async function skt(e){const t={...e,telephone:e.telephone?e.telephone.replace(/\D/g,""):null},r=await ht.post("/api/v1/company/clients",{client:t});if(r.status===201&&r.data.status!==500)return r.data;throw Error(r.data.message)}async function IK(e,t){const r={...t};Object.prototype.hasOwnProperty.call(t,"telephone")&&(r.telephone=t.telephone?t.telephone.replace(/\D/g,""):null);const n=await ht.put(`/api/v1/company/clients/${e}`,{client:r});if(n.status===200&&n.data.status!==500)return n.data;throw Error(n.data.message)}const Wfe={name:"",ddi:55,telephone:"",email:"",birth_date:"",gender:"",internal_observation:""};function Gfe({open:e,initClientData:t,onClose:r,onClientCreatedOrUpdated:n}){const i=Lr(),{form:a,handleChange:o,setForm:s,setInForm:l}=g_(Wfe),[c,d]=u.useState(!1),[f,h]=u.useState({}),[p,g]=u.useState(!1),_=u.useRef(null),b=u.useCallback(()=>{t&&(s({...Wfe,...t.data,birth_date:t.data?.birth_date?qe(t.data.birth_date).format("DD/MM/YYYY"):""}),_.current=t.mode)},[t,s]);u.useEffect(()=>{e&&b()},[e,b]);const E=u.useCallback(I=>{f[I.target.name]&&h(N=>({...N,[I.target.name]:""})),o(I)},[f,o]),S=u.useCallback(()=>{const I={};return sc(a.name)||(I.name="Informe seu nome e sobrenome"),a.telep
311hone&&!nIe(a.telephone,a.ddi,!0)&&(I.telephone="Informe um número válido"),a.email&&!tIe(a.email)&&(I.email="Informe um e-mail válido"),a.birth_date&&!rIe(a.birth_date)&&(I.birth_date="Informe uma data válida"),Object.keys(I).length>0?(h(I),!1):!0},[a.birth_date,a.ddi,a.email,a.name,a.telephone]),P=u.useCallback(()=>{r&&!c&&r()},[c,r]),O=u.useCallback(async I=>{if(I.preventDefault(),I.stopPropagation(),S()&&!c){d(!0);let N;_.current==="edit"?N=IK(a.id,a):N=skt(a);try{const M=await N;M&&n&&n(M),P()}catch(M){i.error(M.message||"Não foi possível concluir a operação")}d(!1)}},[i,a,P,c,n,S]);return u.createElement(oi,{open:e,title:_.current==="edit"?"Atualizar cliente":"Cadastrar cliente",loading:c,onClose:P,onSubmit:O},u.createElement("div",{className:"space-y-28"},u.createElement(Tr,{name:"name",label:"Nome do cliente",value:a.name||"",onChange:E,error:!!f.name,helperText:f.name,variant:"outlined",required:!0,fullWidth:!0,autoFocus:!0}),u.createElement(eIe,{name:"telephone",ddi:a.ddi,setDdi:I=>{l("telephone",""),l("ddi",I)},value:a.telephone||"",onChange:E,error:!!f.telephone,helperText:f.telephone}),u.createElement("div",{className:"flex flex-col"},u.createElement("div",{className:"flex cursor-pointer select-none items-center font-semibold text-gray-600",onClick:()=>g(I=>!I)},u.createElement(e4t,{className:Ft("transform transition-transform duration-500",p&&"rotate-180")}),u.createElement("span",{className:"ml-12"},"Cadastro completo"),u.createElement("hr",{className:"m-0 ml-20 flex-1 border-0 border-t-1 border-solid border-gray-300"})),u.createElement(Oh,{in:p},u.createElement("div",{className:"mt-16 space-y-20"},u.createElement(Tr,{name:"email",label:"E-mail",type:"email",value:a.email||"",onChange:E,error:!!f.email,helperText:f.email,placeholder:"Informe o seu e-mail",variant:"outlined",fullWidth:!0}),u.createElement(Tr,{name:"birth_date",label:"Data de nascimento",value:a.birth_date||"",onChange:E,error:!!f.birth_date,helperText:f.birth_date,placeholder:"00/00/0000",InputProps:{inputComponent:sIe},inputProps:{inputMode:"tel"},variant:"outlined",fullWidth:!0}),u.createElement(um,{variant:"outlined",fullWidth:!0},u.createElement(dm,{id:"gender-label"},"Gênero"),u.createElement(Bd,{labelId:"gender-label",name:"gender",value:a.gender||"",onChange:E,label:"Gênero"},u.createElement(ln,{value:""},"Não informado"),u.createElement(ln,{value:"female"},"Feminino"),u.createElement(ln,{value:"male"},"Masculino"),u.createElement(ln,{value:"non-binary"},"Não binário"),u.createElement(ln,{value:"other"},"Outro")))))),u.createElement(Tr,{name:"internal_observation",label:"Anotações internas",value:a.internal_observation||"",onChange:E,error:!!f.internal_observation,helperText:f.internal_observation,variant:"outlined",fullWidth:!0,multiline:!0,rows:4})))}function Kfe(e){return!e||typeof e!="string"?"":e.split(" ").map(t=>t.length>2?Nd(t):t).join(" ")}const lkt=({params:e,loading:t,textFieldProps:r})=>{const{InputProps:n,inputProps:i,...a}=e||{};return u.createElement("div",{ref:n?.ref,className:"flex w-full items-center space-x-12 px-12 py-8"},u.createElement(hm,{className:"text-gray-400"}),u.createElement(Hu,{...a,className:"pr-36",placeholder:"Pesquisar cliente...",inputProps:{...i,className:"text-gray-600"},endAdornment:u.createElement("div",{className:"flex items-center"},t?u.createElement(ai,{color:"inherit",size:18}):null,n.endAdornment),...r}))};function cIe({selectedClient:e,onClientSelected:t,resetClient:r,allowEditClient:n,allowCreateClient:i,blockRemoveClient:a,textFieldProps:o,dense:s,InputComponent:l,onClick:c,showSelected:d=!0,showInternalObservation:f=!1}){const h=Lr(),[p,g]=u.useState(null),[_,b]=u.useState(""),[E,S]=u.useState(!1),[P,O]=u.useState([]),[I,N]=u.useState(!1),[M,F]=u.useState(!1),B=u.useRef(null);u.useEffect(()=>{g(e)},[e]);const V=()=>{O([]),b(""),N(!1)},W=fe=>{if(!t)return;const de=t(fe);me.isPromise(de)&&(N(!0),de.catch(()=>g(null)).finally(()=>V()))},$=fe=>{d&&g(fe),N(!0),okt(fe?.id).then(de=>{d&&g(de),W(de)}).catch(()=>{g(null),h.error("Erro ao pegar as informações do cliente")}).finally(()=>V())},X=fe=>{g(fe),W(fe),V()},re=()=>{const fe=r();me.isPromise(fe)?(N(!0),fe.then(()=>{g(null),V()}).catch(()=>N(!1))):g(null)},ae=fe=>{B.current={data:fe,mode:"new"},F(!0)},Q=fe=>{B.current={data:fe,mode:"edit"},F(!0)},ie=()=>{B.current=null,V(),F(!1)},le=u.useMemo(()=>B5t((fe,de)=>{akt({search_text:fe,limit:10}).then(ge=>de(ge)).catch(()=>de([]))},600),[]);return u.useEffect(()=>{let fe=!0;if(_===""){S(!1),O([]);return}return S(!0),le(_,de=>{fe&&(O(de),S(!1))}),()=>{fe=!1}},[_,le]),p?u.createElement(u.Fragment,null,u.createElement("div",{className:Ft((c||p&&n&&
311!["Balcão","Pedido de mesa"].includes(p.name))&&"cursor-pointer hover:bg-gray-50"),onClick:c||(p&&n&&!["Balcão","Pedido de mesa"].includes(p.name)?fe=>{Q(p),fe.stopPropagation()}:void 0)},u.createElement("div",{className:"flex items-center space-x-12 px-12 py-8"},u.createElement("div",{className:"flex h-full items-center"},u.createElement(hm,{className:"text-gray-400"})),u.createElement("div",{className:"flex-1 truncate"},u.createElement("div",{className:"truncate font-semibold text-gray-600"},p.name),!s&&p.telephone&&u.createElement("div",{className:"truncate text-14 font-light text-gray-500"},zd(p.telephone,p.ddi))),u.createElement("div",{className:"flex-shrink-0 space-x-8"},n&&!I&&u.createElement(cr,{onClick:fe=>{Q(p),fe.stopPropagation()},size:"small"},u.createElement(ps,{fontSize:"small",className:"text-gray-400"})),!a&&u.createElement(cr,{onClick:I?void 0:fe=>{fe.stopPropagation(),re()},size:"small"},I?u.createElement(ai,{color:"inherit",className:"text-gray-400",size:18}):u.createElement(Aa,{fontSize:"small",className:"text-gray-400"})))),f&&!I&&u.createElement("div",{className:"px-12 pb-12 font-light text-gray-500"},u.createElement("div",{className:"line-clamp-2 hover:line-clamp-none"},u.createElement("span",{className:"font-semibold"},"Anotações: "),p?.internal_observation||"Sem anotações"))),n&&u.createElement(Gfe,{open:M,initClientData:B.current,onClose:ie,onClientCreatedOrUpdated:X})):u.createElement(u.Fragment,null,u.createElement(MPe,{getOptionLabel:fe=>typeof fe=="string"?fe:fe.name||fe.title,options:P,fullWidth:!0,clearOnBlur:!0,freeSolo:!0,autoHighlight:!0,clearText:"Limpar",PaperComponent:({children:fe,className:de,...ge})=>fe.some(Boolean)&&u.createElement("div",{...ge,className:Ft("mt-8 rounded-6 border-1 border-solid border-gray-200 bg-white shadow-sm",de)},fe),onChange:(fe,de)=>{typeof de=="string"&&i?setTimeout(()=>{/^\d+$/.test(de.replace(/[\s\-\\(\\)\\]/g,""))?ae({telephone:de}):ae({name:Kfe(de)})}):de&&de.inputValue&&i?/^\d+$/.test(de.inputValue.replace(/[\s\-\\(\\)\\]/g,""))?ae({telephone:de.inputValue}):ae({name:Kfe(de.inputValue)}):de?.id&&$&&$(de)},inputValue:_,onInputChange:(fe,de,ge)=>{b(ge==="input"||ge==="clear"?de:"")},filterOptions:(fe,de)=>{const ge=[...fe];return(ge.length>0||!E)&&de.inputValue!==""&&i&&ge.unshift({title:"Novo cliente",inputValue:de.inputValue}),ge},renderInput:fe=>l?u.createElement(l,{params:fe,loading:E,textFieldProps:o}):u.createElement(lkt,{params:fe,loading:E,textFieldProps:o}),renderOption:fe=>fe.title?u.createElement("div",{className:"flex items-center space-x-16"},u.createElement("div",{className:"flex h-full items-center"},u.createElement(N5t,{className:"text-green-dark"})),u.createElement("div",null,u.createElement("div",{className:"font-bold text-green-dark"},fe.title),u.createElement("div",null,fe.inputValue))):u.createElement("div",{className:"flex min-h-44 w-full items-center space-x-16"},u.createElement("div",{className:"flex h-full items-center"},u.createElement(hm,{className:"text-gray-400"})),u.createElement("div",{className:"flex-1 truncate"},u.createElement("div",{className:"font-semibold text-gray-600"},fe.name),u.createElement("div",{className:"truncate text-14 font-light text-gray-500"},zd(fe.telephone,fe.ddi))),u.createElement(B1,{label:`${fe.orders_quantity} pedido${fe.orders_quantity===1?"":"s"}`,className:"text-12",variant:"outlined",size:"small"}))}),i&&u.createElement(Gfe,{open:M,initClientData:B.current,onClose:ie,onClientCreatedOrUpdated:X}))}var iE={},Yfe;function ckt(){if(Yfe)return iE;Yfe=1;var e=$t(),t=Wt();Object.defineProperty(iE,"__esModule",{value:!0}),iE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.5
3117 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64l2.64 2.64z"}),"VisibilityOffRounded");return iE.default=i,iE}var ukt=ckt();const dkt=et(ukt);var kF,Xfe;function uIe(){if(Xfe)return kF;Xfe=1;var e=J3(),t=E4(),r=eK(),n=qd(),i=Jg(),a=e5(),o=200;function s(l,c,d,f){var h=-1,p=t,g=!0,_=l.length,b=[],E=c.length;if(!_)return b;d&&(c=n(c,i(d))),f?(p=r,g=!1):c.length>=o&&(p=a,g=!1,c=new e(c));e:for(;++h<_;){var S=l[h],P=d==null?S:d(S);if(S=f||S!==0?S:0,g&&P===P){for(var O=E;O--;)if(c[O]===P)continue e;b.push(S)}else p(c,P,f)||b.push(S)}return b}return kF=s,kF}var NF,Zfe;function fkt(){if(Zfe)return NF;Zfe=1;var e=uIe(),t=x_(),r=ms(),n=bm(),i=jx(),a=r$(),o=n(function(s,l){var c=a(l);return i(c)&&(c=void 0),i(s)?e(s,t(l,1,i,!0),r(c,2)):[]});return NF=o,NF}var hkt=fkt();const Btr=et(hkt);var DF,Qfe;function pkt(){if(Qfe)return DF;Qfe=1;var e=x_(),t=ms(),r=bm(),n=vK(),i=jx(),a=r$(),o=r(function(s){var l=a(s);return i(l)&&(l=void 0),n(e(s,1,i,!0),t(l,2))});return DF=o,DF}var mkt=pkt();const ztr=et(mkt),vkt=e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,n.refreshInterval=0,e(t,r,n)),Jc=AEe(Ll,vkt);var aE={},Jfe;function gkt(){if(Jfe)return aE;Jfe=1;var e=$t(),t=Wt();Object.defineProperty(aE,"__esModule",{value:!0}),aE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");return aE.default=i,aE}var ykt=gkt();const _kt=et(ykt);var oE={},ehe;function bkt(){if(ehe)return oE;ehe=1;var e=$t(),t=Wt();Object.defineProperty(oE,"__esModule",{value:!0}),oE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm-1 14H5c-.55 0-1-.45-1-1v-5h16v5c0 .55-.45 1-1 1zm1-10H4V6h16v2z"}),"CreditCardRounded");return oE.default=i,oE}var Ekt=bkt();const As=et(Ekt);var sE={},the;function wkt(){if(the)return sE;the=1;var e=$t(),t=Wt();Object.defineProperty(sE,"__esModule",{value:!0}),sE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M21.9 5H18V2c0-.55-.45-1-1-1s-1 .45-1 1v3h-3.9c-.59 0-1.05.51-1 1.1l.12 1.21C14.9 8.16 18 10.77 18 15l.02 8h1.7c.84 0 1.53-.65 1.63-1.47L22.89 6.1c.06-.59-.4-1.1-.99-1.1zM15 21H2c-.55 0-1 .45-1 1s.45 1 1 1h13c.55 0 1-.45 1-1s-.45-1-1-1zM2.1 15h12.8c.62 0 1.11-.56.99-1.16-.65-3.23-4.02-4.85-7.39-4.85s-6.73 1.62-7.39 4.85c-.12.6.38 1.16.99 1.16zM15 17H2c-.55 0-1 .45-1 1s.45 1 1 1h13c.55 0 1-.45 1-1s-.45-1-1-1z"}),"FastfoodRounded");return sE.default=i,sE}var Skt=wkt();const MF=et(Skt);var lE={},rhe;function Ckt(){if(rhe)return lE;rhe=1;var e=$t(),t=Wt();Object.defineProperty(lE,"__esModule",{value:!0}),lE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 13c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v10zm-6-7c.55 0 1-.45 1-1s-.45-1-1-1h-1v-.01c0-.55-.45-1-1-1s-1 .45-1 1V8h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1h-3c-.55 0-1 .45-1 1s.45 1 1 1h1c0 .55.45 1 1 1s1-.45 1-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h3z"}),"LocalAtmRounded");return lE.default=i,lE}var xkt=Ckt();const Tkt=et(xkt);var cE={},nhe;function Akt(){if(nhe)return cE;nhe=1;var e=$t(),t=Wt();Object.defineProperty(cE,"__esModule",{value:!0}),cE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement(r.Fragment,null,r.createElement("path",{d:"M17.5 4.5c-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5-1.45 0-2.99.22-4.28.79C1.49 5.62 1 6.33 1 7.14v11.28c0 1.3 1.22 2.26 2.48 1.94.98-.25 2.02-.36 3.02-.36 1.56 0 3.22.26 4.56.92.6.3 1.28.3 1.87 0 1.34-.67 3-.92 4.56-.92 1 0 2.04.11 3.02.36 1.26.33 2.48-.63 2.48-1.94V7.14c0-.81-.49-1.52-1.22-1.85-1.28-.57-2.82-.79-4.27-.79zM21 17.23c0 .63-.58 1.09-1.2.98-.75-.14-1.53-.2-2.3-.2-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5.92 0 1.83.09 2.7.28.46.1.8.51.8.98v9.47z"}
311),r.createElement("path",{d:"M13.98 11.01c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.54-.5 3.53-.66 5.36-.45.41.05.71.42.66.83-.05.41-.42.71-.83.66-1.62-.19-3.39-.04-4.73.39-.08.01-.16.03-.23.03zM13.98 13.67c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.53-.5 3.53-.66 5.36-.45.41.05.71.42.66.83-.05.41-.42.71-.83.66-1.62-.19-3.39-.04-4.73.39-.08.02-.16.03-.23.03zM13.98 16.33c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.53-.5 3.53-.66 5.36-.45.41.05.71.42.66.83-.05.41-.42.7-.83.66-1.62-.19-3.39-.04-4.73.39-.08.02-.16.03-.23.03z"})),"MenuBookRounded");return cE.default=i,cE}var Pkt=Akt();const Rkt=et(Pkt);var uE={},ihe;function Okt(){if(ihe)return uE;ihe=1;var e=$t(),t=Wt();Object.defineProperty(uE,"__esModule",{value:!0}),uE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 1H9c-1.1 0-2 .9-2 2v2c0 .55.45 1 1 1s1-.45 1-1V4h10v16H9v-1c0-.55-.45-1-1-1s-1 .45-1 1v2c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zM7.01 13.47l-1.92-1.92c-.35-.35-.92-.35-1.27 0s-.35.92 0 1.27l2.47 2.47c.39.39 1.02.39 1.41 0l5.85-5.85c.35-.35.35-.92 0-1.27s-.92-.35-1.27 0l-5.27 5.3z"}),"MobileFriendlyRounded");return uE.default=i,uE}var Ikt=Okt();const LF=et(Ikt);var dE={},ahe;function kkt(){if(ahe)return dE;ahe=1;var e=$t(),t=Wt();Object.defineProperty(dE,"__esModule",{value:!0}),dE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M21 2.21c-.13 0-.26.05-.35.15l-.79.79c-.2.2-.51.2-.71 0l-.79-.79c-.2-.2-.51-.2-.71 0l-.79.79c-.2.2-.51.2-.71 0l-.79-.79c-.2-.2-.51-.2-.71 0l-.79.79c-.2.2-.51.2-.71 0l-.79-.79c-.2-.2-.51-.2-.71 0l-.79.79c-.2.2-.51.2-.71 0l-.8-.8c-.2-.2-.51-.2-.71 0l-.79.8c-.2.2-.51.2-.71 0l-.79-.8c-.2-.2-.51-.2-.71 0l-.79.8c-.2.2-.51.2-.71 0l-.79-.8c-.09-.09-.22-.14-.35-.14V21.8c.13 0 .26-.05.35-.15l.79-.79c.2-.2.51-.2.71 0l.79.79c.2.2.51.2.71 0l.79-.79c.2-.2.51-.2.71 0l.79.79c.2.2.51.2.71 0l.79-.79c.2-.2.51-.2.71 0l.79.79c.2.2.51.2.71 0l.79-.79c.2-.2.51-.2.71 0l.79.79c.2.2.51.2.71 0l.79-.79c.2-.2.51-.2.71 0l.79.79c.2.2.51.2.71 0l.79-.79c.2-.2.51-.2.71 0l.79.79c.1.1.23.15.35.15V2.21zM17 17H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-4H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-4H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1z"}),"ReceiptRounded");return dE.default=i,dE}var Nkt=kkt();const tS=et(Nkt);var fE={},ohe;function Dkt(){if(ohe)return fE;ohe=1;var e=$t(),t=Wt();Object.defineProperty(fE,"__esModule",{value:!0}),fE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M6.14 11.86l-2.78 2.79c-.19.2-.19.51 0 .71l2.78 2.79c.31.32.85.09.85-.35V16H13c.55 0 1-.45 1-1s-.45-1-1-1H6.99v-1.79c0-.45-.54-.67-.85-.35zm14.51-3.21l-2.78-2.79c-.31-.32-.85-.09-.85.35V8H11c-.55 0-1 .45-1 1s.45 1 1 1h6.01v1.79c0 .45.54.67.85.35l2.78-2.79c.2-.19.2-.51.01-.7z"}),"SwapHorizRounded");return fE.default=i,fE}var Mkt=Dkt();const dIe=et(Mkt),Lkt=e=>x.createElement("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},x.createElement("title",null,"Aiqfome"),x.createElement("path",{fill:"#7B1FA2",d:"M5.748 9.195c.607.277.992 1.139 1.04 2.342.033.797-.06 1.399-.303 1.925-.564 1.209-1.578 1.252-2.163.092-.25-.488-.358-1.025-.358-1.778.006-.803.092-1.274.347-1.795.363-.742.895-1.035 1.437-.786zm9.768.076c.591.39.998 1.627.916 2.776-.092 1.371-.699 2.358-1.436 2.358-.407 0-.824-.358-1.095-.943-.45-.976-.423-2.613.065-3.567.363-.716 1.024-.981 1.55-.624zM12.388.029c.223.032.255.06.38.292.184.336.298.456.64.678.314.2.314.211.206.726-.093.434-.039.862.162 1.247.293.58 1.111 1.187 1.86 1.377.281.076.395.081.737.022.222-.033.439-.049.482-.033.049.022.163.2.26.401.217.467.76 1.025 1.193 1.226.705.33 1.47.314 2.206-.05.206-.102.412-.167.461-.151.043.016.168.14.276.271.109.136.326.309.478.385.249.13.341.146.753.14.325-.005.488.012.526.06.157.19.59 2.201.775 3.584.163 1.241.179 4.017.027 5.23-.2 1.644-.498 3.053-.91 4.321-.293.9-.553 1.491-1.09 2.456C20.997 23.675 20.682 24 20.086 24a2.01 2.01 0 0 1-.493-.06c-.353-.119-.895-.536-1.73-1.328-.986-.932-1.404-1.257-1.924-1.512-.634-.315-1.258-.342-1.8-.076-.13.065-.498.358-.807.656-.65.618-.9.753-1.47.791-.704.044-1.1-.135-2.206-.992-.471-.363-.818-.526-1.203-.558-.466-.038-.808.081-1.561.537-.743.45-1.139.59-1.654.59-1.073 0-2.006-.66-2.965-2.097C1.205 18.34.424 16.
31109.17 13.863c-.098-.84-.114-2.537-.033-3.367.428-4.266 2.494-7.53 5.828-9.193C7.005.783 8.149.419 9.455.197c.976-.163 2.413-.244 2.933-.168zm-2.239 1.48C7.64 1.758 5.2 3.113 3.731 5.065c-1.529 2.033-2.38 5.399-2.07 8.19.2 1.85.964 3.947 1.989 5.487.52.78.72.997 1.084 1.176.553.271 1.122.174 1.827-.309.629-.434 1.28-.623 1.978-.585.71.043.982.184 2.055 1.1.634.542 1.182.602 1.794.195.136-.092.44-.325.678-.52.764-.634 1.35-.857 2.277-.862 1.16-.006 1.913.428 2.981 1.73.868 1.05 1.204 1.268 1.68 1.089.781-.298 1.567-2.082 2.082-4.716.683-3.48.553-6.522-.352-8.37-.293-.608-.645-.998-.976-1.095-.206-.06-.27-.055-.704.086-.418.136-.564.158-1.106.158-.51 0-.689-.028-.992-.13-.58-.196-.84-.434-1.486-1.356-.298-.428-.558-.569-1.263-.71-1.3-.25-1.832-.477-2.293-.976-.434-.466-.71-1.09-.91-2.054-.055-.282-.152-.591-.212-.689-.222-.357-.759-.488-1.643-.395z"})),Fkt=e=>x.createElement("svg",{"aria-label":"99app Logo",viewBox:"0 0 47 32",fill:"#FFDD00",xmlns:"http://www.w3.org/2000/svg",className:"object-cover w-12 w-full h-auto h-full text-black text-graydark99-primary",width:"1em",height:"1em",...e},x.createElement("g",null,x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0977 0C14.7501 0 17.9896 1.76474 20.0121 4.48772C21.3093 6.23433 22.1029 8.37536 22.1954 10.6979V11.0977C22.1954 13.3607 21.5242 15.4698 20.3609 17.224L10.8386 31.7531C10.7375 31.9072 10.5658 32 10.3816 32H2.82712C2.46339 32 2.24518 31.5961 2.44448 31.2919L8.5945 21.9084C3.6716 20.7729 0 16.3654 0 11.0977L0.0102291 10.6979C0.0922128 8.3814 0.882449 6.24549 2.17373 4.50151C4.19543 1.77079 7.43928 0 11.0977 0ZM11.0977 14.7651C12.4268 14.7651 13.6029 14.1235 14.3436 13.1364L14.6534 12.6638C14.9742 12.0827 15.1577 11.4156 15.1574 10.6979C15.1535 8.45904 13.3376 6.64516 11.0977 6.64516C8.85779 6.64516 7.04206 8.45904 7.03772 10.705C7.03772 12.9474 8.85547 14.7651 11.0977 14.7651Z",fill:"#FFDD00"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.9592 4.48772C41.9369 1.76474 38.6973 0 35.045 0C31.3865 0 28.1425 1.77079 26.121 4.50151C24.8297 6.24549 24.0394 8.3814 23.9573 10.6979L23.9472 11.0977C23.9472 16.3654 27.6188 20.7729 32.5417 21.9084L26.3917 31.2919C26.1924 31.5961 26.4106 32 26.7742 32H34.3288C34.5129 32 34.6846 31.9072 34.7857 31.7531L44.308 17.224C45.4715 15.4698 46.1427 13.3607 46.1427 11.0977V10.6979C46.0502 8.37536 45.2564 6.23433 43.9592 4.48772ZM35.0449 14.7651C36.374 14.7651 37.5502 14.1235 38.2908 13.1365L38.6006 12.6638C38.9212 12.0828 39.1049 11.4156 39.1046 10.6979C39.1007 8.45904 37.2848 6.64517 35.0449 6.64517C32.805 6.64517 30.9893 8.45904 30.9848 10.705C30.9848 12.9474 32.8027 14.7651 35.0449 14.7651Z",fill:"#FFDD00"}))),Bkt=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",zoomAndPan:"magnify",viewBox:"0 0 384 191.999996",preserveAspectRatio:"xMidYMid meet",height:"1em",...e},x.createElement("path",{fill:"#000000",d:"M 275.207031 6.300781 L 255.664062 6.300781 L 255.664062 35.847656 L 239.816406 35.847656 L 239.820312 54.335938 L 255.664062 54.335938 L 255.664062 110.78125 C 255.800781 120.460938 259.761719 128.921875 266.820312 134.613281 C 271.542969 138.417969 276.667969 140.777344 282.058594 141.625 C 284.40625 141.992188 287.027344 142.355469 288.855469 142.375 L 290.355469 142.375 L 290.355469 122.683594 C 290.355469 122.683594 289.371094 122.695312 288.933594 122.664062 C 285.660156 122.441406 281.113281 121.238281 278.019531 117.042969 L 277.914062 116.902344 C 277.105469 115.808594 276.1875 114.570312 275.457031 111.414062 C 275.433594 111.3125 275.210938 110.046875 275.210938 109.035156 L 275.207031 54.335938 L 290.355469 54.335938 L 290.355469 35.847656 L 275.207031 35.847656 Z M 275.207031 6.300781 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 118.5 74.441406 C 118.5 66.914062 120.585938 61.078125 124.371094 58.015625 C 125.503906 57.101562 127.859375 55.195312 132.296875 55.195312 L 132.316406 55.195312 C 138.46875 55.351562 142.574219 60.042969 143.449219 64.597656 C 143.96875 67.292969 143.789062 72.558594 136.773438 77.5 C 129.425781 82.675781 122.875 87.007812 119.679688 88.808594 L 118.5 89.472656 Z M 103.035156 123.015625 C 108.582031 135.148438 118.941406 142.105469 131.457031 142.105469 C 131.851562 142.105469 132.246094 142.097656 132.648438 142.082031 C 152.523438 141.382812 160.988281 129.039062 166.074219 118.09375 L 150.414062 108.945312 C 148.332031 113.097656 142.933594 122.660156 131.609375 122.660156 L 131.207031 122.65625 C 126.007812 122.554688 121.238281 119.273438 119.332031 114.46875 C 118.859375 113.222656 118.667969 112.152344 118.742188 111.195312 L 118.777344 110.773438 L 119.144531 110.5625 C 122.066406 108.902344 145.804688 94.414062 150.851562 90.710938 C 157.628906 85.734375 160.953125 80.15625 162.332031 71.453125 C 162.546875 70.070312 162.65625 68.597656 162.65625 66.949219 C 162.65625 49.878906 148.898438 35.894531 132 35.777344 L 131.78125 35.769531 C 120.878906 35.769531 110.996094 41.402344 105.339844 50.847656 C 101.246094 57.484375 99.171875 65.683594 99.171875 75.21875 L 99.027344 98.667969 C 99.027344 102.785156 99.386719 107.996094 99.730469 110.648438 C 100.058594 113.164062 100.671875 117.847656 103.035156 123.015625 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 191.027344 74.441406 C 191.027344 66.914062 193.109375 61.078125 196.898438 58.015625 C 198.027344 57.101562 200.386719 55.195312 204.824219 55.195312 L 204.84375 55.195312 C 210.996094 55.351562 215.097656 60.042969 215.972656 64.597656 C 216.492188 67.292969 216.316406 72.558594 209.300781 77.5 C 201.953125 82.675781 195.402344 87.007812 192.203125 88.808594 L 191.027344 89.472656 Z M 175.558594 123.015625 C 181.109375 135.148438 191.46875 142.105469 203.980469 142.105469 C 204.375 142.105469 204.773438 142.097656 205.171875 142.082031 C 225.175781 141.378906 233.695312 128.789062 238.816406 117.625 L 222.957031 108.902344 C 220.886719 
311113.054688 215.480469 122.660156 204.132812 122.660156 L 203.730469 122.65625 C 198.53125 122.554688 193.761719 119.273438 191.855469 114.46875 C 191.386719 113.222656 191.195312 112.152344 191.269531 111.195312 L 191.300781 110.773438 L 191.667969 110.5625 C 194.59375 108.902344 218.332031 94.414062 223.375 90.710938 C 230.15625 85.734375 233.480469 80.15625 234.855469 71.453125 C 235.074219 70.070312 235.179688 68.597656 235.179688 66.949219 C 235.179688 49.878906 221.425781 35.894531 204.523438 35.777344 L 204.304688 35.769531 C 193.40625 35.769531 183.523438 41.402344 177.867188 50.847656 C 173.773438 57.484375 171.695312 65.683594 171.695312 75.21875 L 171.550781 98.667969 C 171.550781 102.785156 171.910156 107.996094 172.257812 110.648438 C 172.585938 113.164062 173.195312 117.84375 175.558594 123.015625 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 342.320312 109.464844 C 342.320312 114.363281 339.546875 118.742188 335.070312 120.898438 L 334.851562 121 C 333.167969 121.785156 331.375 122.179688 329.519531 122.179688 C 329.496094 122.179688 329.179688 122.175781 329.128906 122.171875 C 325.257812 122.089844 321.667969 120.316406 319.257812 117.296875 L 319.167969 117.179688 C 318.339844 116.082031 317.480469 114.945312 316.765625 111.902344 C 316.746094 111.816406 316.527344 110.613281 316.527344 109.648438 C 316.527344 109.582031 316.542969 108.386719 316.554688 108.207031 C 316.769531 104.691406 318.5625 101.519531 321.878906 98.78125 C 322.347656 98.394531 322.847656 98.011719 323.363281 97.640625 C 327.5625 94.640625 333.433594 92.203125 340.804688 90.398438 L 342.335938 90.011719 Z M 330.269531 34.609375 C 322.582031 34.609375 315.136719 37.324219 309.304688 42.253906 C 309.070312 42.457031 308.503906 42.957031 308.453125 43.003906 C 303.179688 47.789062 299.738281 54.054688 298.496094 61.113281 C 298.375 61.820312 298.277344 62.632812 298.214844 63.277344 L 318.148438 67.433594 C 318.410156 66.03125 318.609375 64.972656 318.640625 64.777344 C 319.996094 58.578125 324.125 56.105469 324.292969 56.007812 C 326.144531 54.898438 328.273438 54.3125 330.449219 54.3125 C 331.089844 54.3125 331.742188 54.367188 332.386719 54.46875 C 338.242188 55.441406 342.332031 60.238281 342.332031 66.132812 L 342.332031 70.625 L 341.726562 70.785156 C 341.667969 70.804688 335.414062 72.480469 331.675781 73.648438 L 331.289062 73.769531 C 329.410156 74.363281 325.222656 75.894531 324.902344 76.019531 C 323.484375 76.585938 322.328125 77.070312 321.277344 77.546875 C 316.472656 79.722656 312.351562 82.136719 309.019531 84.726562 L 307.789062 85.714844 C 306.972656 86.402344 306.203125 87.101562 305.5 87.796875 C 300.238281 93 297.4375 98.957031 296.679688 106.542969 C 295.539062 117.992188 299.464844 127.917969 307.742188 134.488281 C 310.285156 136.507812 315.664062 140.097656 323.109375 141.449219 C 326.289062 142.023438 328.421875 142.027344 329.125 142.027344 L 329.40625 142.023438 C 330.347656 142.023438 332.113281 141.945312 332.773438 141.875 C 337.460938 141.363281 342.75 140.261719 349.640625 135.675781 C 351.054688 134.738281 352.375 133.613281 353.945312 132.007812 C 359.613281 126.210938 362.484375 118.082031 362.484375 107.855469 L 362.484375 66.351562 C 362.480469 48.847656 348.03125 34.609375 330.269531 34.609375 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 146.148438 162.667969 C 135.917969 160.414062 128.425781 156.988281 125.316406 155.636719 C 122.773438 154.527344 111.929688 149.582031 100.3125 138.878906 C 97.609375 136.386719 95.679688 134.605469 92.632812 131.273438 C 92.632812 131.273438 90.515625 129.105469 85.898438 122.941406 C 80.605469 115.867188 73.625 103.898438 69.34375 86.949219 C 69.289062 86.742188 68.777344 84.460938 68.773438 84.4375 C 68.625 83.714844 68.464844 83.054688 68.296875 82.421875 C 81.347656 69.039062 91.390625 53.6875 98.15625 36.746094 L 98.5625 35.847656 L 76.242188 35.847656 L 75.835938 36.746094 C 67.878906 54.226562 53.753906 68.382812 43.257812 77.203125 L 41.886719 78.359375 L 41.886719 5.9375 L 22.261719 5.9375 L 22.261719 142.050781 L 41.886719 
311142.050781 L 41.886719 103.820312 L 42.28125 103.574219 C 44.71875 102.050781 47.199219 100.371094 49.664062 98.582031 L 50.121094 98.25 C 55.667969 115.460938 71.582031 154.328125 116.066406 174.671875 C 133.183594 182.5 147.722656 185.976562 167.03125 186.253906 C 170.488281 186.304688 172.894531 186.257812 173.796875 186.222656 C 181.3125 185.949219 187.511719 184.917969 191.898438 183.984375 C 190.828125 179.664062 189.761719 175.347656 188.691406 171.03125 C 188.066406 168.496094 187.4375 165.960938 186.808594 163.421875 C 176.300781 165.257812 162.082031 166.183594 146.148438 162.667969 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 243.546875 136.199219 C 240.5625 136.199219 237.867188 137.402344 235.921875 139.339844 C 235.6875 139.53125 235.453125 139.722656 235.226562 139.914062 C 234.050781 140.90625 232.933594 141.863281 232.730469 142.007812 C 231.234375 143.097656 229.3125 144.6875 228.667969 145.164062 C 224.890625 147.964844 221.027344 150.375 219.519531 151.296875 L 228.945312 170.40625 C 234.035156 167.496094 237.804688 164.902344 240.296875 163.070312 C 242.125 161.726562 243.695312 160.507812 244.578125 159.773438 C 246.769531 157.953125 247.894531 156.765625 250.148438 155.035156 C 250.667969 154.632812 251.316406 154.0625 251.945312 153.277344 C 252.328125 152.800781 252.835938 152.082031 253.28125 151.128906 C 253.90625 149.792969 254.265625 148.308594 254.265625 146.742188 C 254.265625 140.917969 249.46875 136.199219 243.546875 136.199219 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#000000",d:"M 198.527344 160.472656 C 200.285156 167.324219 202.039062 174.175781 203.792969 181.027344 C 205.945312 180.394531 208.214844 179.652344 210.578125 178.777344 C 213.214844 177.800781 215.660156 176.773438 217.910156 175.742188 C 214.84375 169.382812 211.777344 163.023438 208.710938 156.664062 C 207.378906 157.242188 205.988281 157.8125 204.539062 158.367188 C 202.464844 159.164062 200.457031 159.863281 198.527344 160.472656 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#ffe41f",d:"M 186.824219 163.4375 L 191.914062 183.996094 C 193.671875 183.644531 195.488281 183.242188 197.351562 182.785156 C 199.605469 182.234375 201.757812 181.648438 203.808594 181.039062 C 202.054688 174.191406 200.300781 167.339844 198.546875 160.488281 C 196.785156 161.027344 194.9375 161.550781 193 162.042969 C 190.863281 162.585938 188.800781 163.046875 186.824219 163.4375 ",fillOpacity:1,fillRule:"nonzero"}),x.createElement("path",{fill:"#ffe41f",d:"M 208.710938 156.664062 C 211.777344 163.023438 214.84375 169.382812 217.910156 175.742188 C 219.648438 174.941406 221.40625 174.109375 223.179688 173.257812 C 225.140625 172.308594 227.0625 171.359375 228.945312 170.40625 C 225.804688 164.039062 222.667969 157.667969 219.527344 151.296875 C 217.925781 152.160156 216.269531 153.019531 214.554688 153.875 C 212.566406 154.867188 210.617188 155.796875 208.710938 156.664062 ",fillOpacity:1,fillRule:"nonzero"})),II=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1004 530.58",width:"1em",height:"1em",...e},x.createElement("title",null,"iFood"),x.createElement("path",{d:"M-4,529.31H72.41l42.46-211.2H38.45ZM42.66,292.92h76.73L132,229.73H55.3Zm59.47,295.82h76.42l46.69-228.18h57.31L291,318.11H234.79l2.13-9.55c3.18-18,9.55-38.21,38.2-38.21,17,0,32.91,1.06,48.82,8.49l8.5-44.57a167.8,167.8,0,0,0-55.19-9.56c-61.56,0-104,36.09-119.93,93.4H130.79l-8.49,42.45h26.53Z",transform:"translate(4 -224.71)",fill:"#ea1d2c"}),x.createElement("path",{d:"M344.11,533.56c90.21,0,152.83-81.73,152.83-148.59,0-49.88-45.64-71.11-90.21-71.11C308,313.86,253.9,402,253.9,462.45c0,49.88,46.7,71.11,90.21,71.11m242,0c90.21,0,152.83-81.73,152.83-148.59,0-49.88-46.7-71.11-91.28-71.11-98.7,0-152.82,88.09-152.82,148.59,0,49.88,47.76,71.11,91.27,71.11m277-4.25h75.35L1000,229H923.59l-18.05,89.15-31.84-3.18c-74.29,0-142.21,95.51-142.21,163.44,0,27.59,18,55.19,48.82,55.19,43.51,0,74.29-21.23,87-42.46h4.24ZM627.48,687.45a295,295,0,0,1-212.26,66.86c-100.83-6.37-173-83.85-185.73-165.57h4.24c23.35,51,79.6,98.71,148.59,106.13,70,8.49,153.89-23.34,199.52-66.86L530.9,588.74H684.79l-34,163.45-22.29-63.68Z",transform:"translate(4 -224.71)",fill:"#ea1d2c"})),zkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{d:"M21 0H3C1.34315 0 0 1.34315 0 3V15C0 16.6569 1.34315 18 3 18H21C22.6569 18 24 16.6569 24 15V3C24 1.34315 22.6569 0 21 0Z",fill:"#007455"}),x.createElement("path",{d:"M12.756 10.0262C12.522 10.2505 12.2066 10.3932 11.8505 10.383C11.6064 10.383 11.3825 10.3117 11.1994 10.1893L10.7314 10.9334C11.057 11.1373 11.4334 11.2596 11.8404 11.2596C12.4304 11.2698 12.9798 11.0354 13.3766 10.648L12.756 10.0262Z",fill:"white"}),x.createElement("path",{d:"M11.9023 6.96834C10.7222 6.94795 9.7455 7.89591 9.72516 9.0885C9.71498 9.537 9.84724 9.94472 10.
3110711 10.2913L13.9573 8.62981C13.7437 7.69205 12.9095 6.98873 11.9023 6.96834ZM10.6204 9.25159C10.6103 9.20062 10.6103 9.14966 10.6103 9.09869C10.6204 8.39537 11.1901 7.84495 11.8921 7.85514C12.2685 7.86533 12.6043 8.03861 12.8383 8.30363L10.6204 9.25159Z",fill:"white"}),x.createElement("path",{d:"M15.1772 6V10.1486L15.8995 10.4442L15.5638 11.2596L14.8516 10.964C14.6888 10.8927 14.5871 10.7907 14.5057 10.6684C14.4243 10.5461 14.3633 10.383 14.3633 10.1588V6H15.1772Z",fill:"white"}),x.createElement("path",{d:"M8.9213 6V10.1486L9.64362 10.4442L9.3079 11.2596L8.59575 10.964C8.43298 10.8927 8.33124 10.7907 8.24985 10.6684C8.16846 10.5461 8.10742 10.383 8.10742 10.1588V6H8.9213Z",fill:"white"}),x.createElement("path",{d:"M18.7079 7.97743C19.3386 8.28322 19.6031 9.03751 19.2979 9.66948L20.0915 10.0568C20.6001 8.98654 20.1525 7.70221 19.0843 7.19256C18.2704 6.80522 17.3345 6.96831 16.7139 7.53912L17.3039 8.19148C17.6803 7.84491 18.2297 7.74298 18.7079 7.97743Z",fill:"#C7D540"}),x.createElement("path",{d:"M17.6207 10.2607C16.9899 9.95487 16.7254 9.20058 17.0306 8.56861L16.2371 8.18127C15.7284 9.25155 16.176 10.5359 17.2443 11.0455C18.0581 11.4329 18.9941 11.2698 19.6147 10.699L19.0246 10.0466C18.6482 10.3932 18.0988 10.4849 17.6207 10.2607Z",fill:"white"}),x.createElement("path",{d:"M7.29322 10.3219V9.11912C7.29322 9.11912 7.29322 9.11912 7.29322 9.10893C7.29322 8.15078 6.66247 7.34553 5.79772 7.07031C5.59425 7.00916 5.3806 6.96838 5.14661 6.96838C4.9228 6.96838 4.70915 6.99896 4.50568 7.06012C4.16995 7.16205 3.87492 7.34553 3.63076 7.59016C3.24416 7.9775 3 8.51773 3 9.10893C3 10.2913 3.95631 11.2495 5.13644 11.2495C5.48234 11.2495 5.80789 11.1679 6.09275 11.0252L5.7672 10.2302C5.58407 10.3321 5.3806 10.3831 5.15679 10.3831C4.45481 10.3831 3.89527 9.81225 3.89527 9.11912C3.89527 8.90507 3.94614 8.70121 4.04787 8.52793C4.22082 8.21194 4.51585 7.9775 4.8821 7.88576C4.97366 7.86537 5.06522 7.85518 5.16696 7.85518C5.35008 7.85518 5.53321 7.89595 5.68581 7.96731C6.12327 8.17117 6.42848 8.60947 6.42848 9.11912C6.42848 9.1599 6.42848 10.3117 6.42848 10.3117C6.42848 10.536 6.48952 10.7092 6.5709 10.8214C6.65229 10.9437 6.7642 11.0456 6.9168 11.117L7.31357 11.2801L7.6493 10.4646L7.29322 10.3219Z",fill:"white"})),Hkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{y:3,width:24,height:18,rx:3,fill:"#007ECD"}),x.createElement("path",{d:"M7.02783 15H5.92725L5.48975 13.8618H3.48682L3.07324 15H2L3.95166 9.98926H5.02148L7.02783 15ZM5.16504 13.0176L4.47461 11.1582L3.79785 13.0176H5.16504ZM7.5542 15V9.98926H9.06836L9.97754 13.4072L10.8765 9.98926H12.394V15H11.4541V11.0557L10.4595 15H9.48535L8.49414 11.0557V15H7.5542ZM13.3989 15V9.98926H17.1143V10.8369H14.4106V11.9478H16.9263V12.792H14.4106V14.1558H17.21V15H13.3989ZM17.5586 15L19.271 12.3853L17.7192 9.98926H18.9019L19.9067 11.5991L20.8911 9.98926H22.0635L20.5049 12.4229L22.2173 15H20.9971L19.8862 13.2671L18.772 15H17.5586Z",fill:"white"})),Ukt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 51 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},x.createElement("rect",{x:.444336,width:50.1111,height:33,fill:"url(#pattern0)"}),x.createElement("defs",null,x.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},x.createElement("use",{xlinkHref:"#image0",transform:"translate(0 -0.00617284) scale(0.00277778 0.00421811)"})),x.createElement("image",{id:"image0",width:360,height:240,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADwCAYAAAAtp/5PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAxMi8xOS8xN4L/NA8AAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAV2ElEQVR4nO3d63XbxtqG4Sff2v/pXYG4G4CRCkRXYKUCMw0wTAVBKojMBgJXsOUKQlUQiA2EqmBbFfj7gYEEgjjMADPUULyvtbx8IgHwoAeDwTszP3z//l0AgPj832sfAACgHQENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKQIaACIFAENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKQIaACIFAENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKQIaACI1L9e+wDOSZJuUknvPG5yvytWe4/bA/CG/PD9+/egOxgZagvHx7+TlDo+Zy7pyvE5oTxK2kvaSiokFZcc3Em6eSdpqfJ7MPTd2UvKLvn9wttlHdBJullLWiueUHvrHiXdSbrbFavtKx/LySTpZinpVtLM4Wm/7orVbZgjAl6PUws6STe3kn4Jdzjo8Cgpl3S7K1bfXvlYgknSzY2k/4546uOuWM09Hw7w6py7OEwL588gR4MhTypbl28yqJN0s9f4K7Qfd8Wq8Hg4wKtzruLYFatc0o8qwwKnNZP0m6R9km6yVz4Wr0y/85Tus6WnQwGiMarMzrRU5pIevB4NbM0k/Zakm32SbhavfTCeuN7kbVr6OAggJqProM0l9kLSF29HA1dXkv56a63pkWamDxt4MyYNVNkVq2+7YrWU9Kufw8FIvyXpZmu6Cc7V3sM2CGi8Kd7qoE3rJZdbeRT8epC0PNebZUm6cf0yPqisHX++YborVpnHQwJeldeBKmZQyp2olX5NT5IW5xjSSbrZSrq2fPj9rlgtwh3NOC0Ds5p//0bNNmx5nYvDhEIq6d7nduFkJmlrguLc3Dk8dh/qICZaS/qr9usPlZU31a8/3tCNXQQWbKi3GdTSFhJ7jf/hKlS7nLWUqvwhuTSPktJzqpdO0s1c0j+WD3+SNI/t9Vm+hihb/4hP8Lk4YjCib3OqB9mdSOYK2x30sCtWZ9WSTtLNnaSPlg//2dTlR8XyNTCwBoMuZTa7e9n3bbp62hWr0dUTpvLiRmUdr+9jfJ+km9tdsVp73m5IuewDOjOPj82thl/DWtRuY8CltKDXCtvN8cHHhEamb/JW0vup22rwcnyn4jjkO8rXZnnD8z+xzMJnvntFs8vIor98vytWfSNb77hSGO9SWtDbwNtf+NjHrlhtzQ9ELvtWpI27JN1E11/b41b2J9RM7tPTnkKu4YDOZNGKNv3aa71UhHSdwB9V3qep
311ZkE8+ryTdFP0PP9Ly/Fk6n8d9yrf/0XH46r/wwgX0YKWpCTdfFO4Gm3vN32SdJNL+uRxk7+fS42w6fbZy/7zGtUSrXUvLVTeD5DKEOza773KewuFLFqGHVcCT3q52b0dKrmbMINk68RapgHwV8/zDt5Ly5ueH8zvXduN8irnHFxSQLvcfBrj3z5bqCY8tvLb3TE2yBYqQ6xqwc3lfnOzHm7boR9YxxPUFzOi1Zq5JF9r2kn7UeViAXnHPhYq37NCZf2z06W+RZjaeJB00wjdrbpbxV93xepgRKbFZ3G/K1aLnu1StTLSJQX0UmGnSf1pV6xc6ngHmdZLIX8tf+sgM3XUa/ltxdc9qbwUz9vC2rHkTnI4QQY4WQcZwenxKuqgJNEi+A9avLSiX88lLRq7Dbz9he8NmlbP0uMmP5kftl7msvpvhQtnqTzpfFI52dO2eVzmtbsMeLKqVDEnat9XUu8VZnDQ3NN2qsFL76TyXof639us/hfzWXwe2Ec2sN2s49/R42IC2nzJHgPuYhFio6ZV/tXjJnuDzLTaTr1qzrWkf0x41rkMiW4+t8vCYZsuYh/B+V6HIZm1P0ySdN0yM2Cm/jngr2s3uPv+Hw4uJqANr10QDe8Dzia3lr8FEpZd/2ECMmSrecif5gQh6fnkZHtSvWoJ+DZz98OydtBStZGkm3dJull0XNnsLTbxVeVskh/M730t41+qkLRoRR+cHE33yNAJs+qP7/rMsoHno+HSAnobePtBprs0rX9fE+zMeoIs87SPKT6ZLpaKy+v2NSDnSeUl/YfGr581vEjFTC2tSBPC6yTdZKZLpzAjXP+nst/26Dmy+74ud8Xqdlestub3hfrnaM86/tzUdsK7lV0rumu7tKIdEdB+LQJue+iHw8XRicS04KYOO39U2Spr/nL1Sy0ccofnvfcUAOtdsVqb0Kv/ys3Q+aFFKj52dBFUEydd67g657qle+ROw5/5ovkP5kbwV/Pr98avbe1xW/V3n93WrwZoRZ/exVRxVAYK9acKurq051XVD6oeJpR0PaoMtN7uIxNYmezf++dpUx2rGY7KxBrHYfMeDlbkWIx2PJisynLF8qMqG1MO+FvPcyaVsFlUaBzVz1u89g8qu5K6qqao6LB0aS1oKWw/9JVNlcQEucdt+eiOeVIZQoPv6a5Y3Vm2PiszvbTWXLo5Pg58BnuLbSwsHrMc+P8r1bpcLPvT26psbLoVRnftmO6zvs9k3dKnng1slla0J5cY0NvA2w/SDy09z7ftqxJl4WEbR3M3DDEtRNvFhq+TdLM2r3t0yV3jJtzW4vmLoQdY3GSTjsMts9j3wbFbdiv8Yfq1syTd3JjXu3CoKOk7rvqJsjqmXP3fQ/qiPbm4gD7BpdUi8Pa3nraz8LSdMVxafJkJudzhOUsTWN/Njbjnm3CWJ7n3lldCQ8E50+EJ26ZPednSYrW5/3Ctsivkv3pZLODv6j1IyhXg75J0c7R9i1Z0W8t+6DOkFe3BxQW04bOuuGkRcNtSObLQh2Z3zJhh6qOmR7VsfVZmKvu4c9lfPcx0fGz1VptNN9fgScSy2yKrPd6mNTxr7ts8L2t9tL0rlQN0/pS0b+kWGdp+sxV9p/7PkFa0B5ca0NuA254FHqzgczjx83GOHaY84bVmDo9dj2hFt1ma320CunqsknQzr3Ub1MvlMg33aTfL1Wz6049ODmZSJV9Lyc1UdosUtdGFe/W3oj+2BGo2sB9a0RNZV3Ek3UtYnYO8PqGNCZW/A+7v11ALg3qaQKdycId+YBKdLp/HLgjgWFHzs8pg/d+YfdX8x8xfvNfpFjc+qLSwrEo5Wi0m0ARa9WqZufrnfjmqGLH4zvykMje6KlFGV3SceSatbRpFLvNBpwq3Kklo2/pfzJfxSeGmH72Rv4ElIS0afy/k/hk3t+HiVvYTWGW7YpUn6eaLpo12XOplJZa+8jWfrpNyPu69+Xum4deQqXHFsCtW30y53p38hfRM5XzhqTlx3ar7fblO0s2yceLI1N9gqEJ0rfaft1zjR3eecyZZjTa91C4OKWy5XcgvzTzgtse8J+8ndHO47O8qeVlxZoqqtZ9P3M7Y/dpOBNU6dN08d6HhyYtcXOnl/Ri6IZk1jmer/q6RK/U3WGyH6F+kS1lRpc1WAeedSNLNIlDFyCLANiU9r+gy5spiqbKfeFH7t3c6vPyc6/Dkko7Zz65YLZN0M2WNyVnVCkzSzVeFnSO8bpmkm6xWlphpuKtqqZYTidnG2rR2M5XfiandNR+r7+xAK/rKlD7WAzdX/89Spv5WdGa6nKSXOcelw+9QMbYr7ZxdekCHdON7HyYAQ09mdDdiH78k6eYUM+Dd1G4WTrlKycw2coUP6GoFFak8QRXS88nwQf1dFdd9J/r6dLSm/3iuw1Cr/9nmhJipDPtb9S9mkCXlCkWF2Uc2sN0rs/+u4L/S8MnqOikXQN4PPO5NudiANv1tQz8gUyx8bsxcBvru1963/NuYgD6VmcrVQXLTynNpgVdBWci87l2xukvSzaPcW5+PennvCr2UKD7/2fLqyaYPfi2LE70JruqYjrqOzIntTv0ntmvLVvRM7otfLFW+lr7gH3Iu93a8udiANrYKF9Dvk3TzbuwyWOYHKlUZ9EuFqTg4uotsQivkDdSp1ipbvn0B0tQ3P8edhufm+KyyEshniaPMiSZT/2f7sXGDcey+qhuMxcD+qhPCUCva1dwcg8vn1nZsBHSHXOG7BULZ9vx7yEvzpSklq8x1fJNv0fj7mL7ZsbYd/x5zK7oa5ZfL/ge9L+RuNfwdSH2Hc02u4deRycPKOiYgM/W3fp/fq4lh2jQ3v08J/neNzzHX+WbS3uZBFzebXZ1ppU6tqz1XnTPvnaBOfKrPu2K1dpzlrrNe27L+e9SCu0MS+xXMvezfcla95xpsj/Xiz1cxFjP0NbujCo2Y9+UtuOguDtOimFIRcM7yrv8wdeJj+mZ9aevjrW5KqfZ/uewDullFUZdr+DtQ9Z8OMi38hV5ajfXKhGvVpjM130GbK5alHEfe1apqqu6yVHY3Ree1P681HOg28tqfq5Z59TlffBB3ueiANra6vIB+0nBfnk3frKuq9nevlgB27UawrISoVBMX5S3bsekL7gv4phuVk/P3/X/9Rl6m4YBem5Z+Za6XIF3U/t3rd9nck5gyOOhB5SCj59dr3sMffBzfW0dAlwF9qhFlsbi1CJpc4wL6SWWra2/+HrpFZFMJUcnUfeWQq/97UE1ilFnsZ+hEc3DD0vT3DoXgTP6G+DsxteffNPx9uFetJSxaw5NddB90xXz5Yq1a8O3BTJw/yHGujLog/bVdHD+/1rkfHPqCfxxq6Vv28x5sx/McK1O1fn6m6+ZGh8OUqyA+ejymowVd2up0I8pe05PcFhTI1X+p3mWp085U5lJt0FpX7FACVtUIH12FmJC3rdWth1zVXRPD/ZCfu8J253fxYlggoEtbvf2AflA5VHrv8Jw7RRTQtdFyUtnvujfVBrn8ldwt1d8XPTP7+s30f1ch7VoeudDxiSLX6wT0vcpjyWkJx4UuDp1FWdlUoxezHTkFqWTRFdCxv7nKkKwqD6Se8NsVqx/M83LZ38g6Wgi1tn+b7gkfWo8h8DSoD3rpI96qPMHtA+0LHtCCVhRlZaFdmf7k5YjQzDUuoNcaN7jimxxu2tbmqshlH9CdN/tM1cIpJlHq+hxuNe6qpa4qX9ua34uAA20QEC1ow7EFdir38j+y0HkxgZE3UZ9khvc6Pk9JuY6greeWqOsCAM0J8Wv7f6ew0wBI0r/b3huHm5XSYYu4UNkiJojfEFrQL7YKG9D1Wc2+dfz5aJId0/2ylb+Q/sNUDCwdwnPMkN+Zylaq1eCOSnK8YOqQee3PLiV3a3WU3Jkbhkv5fd/rPne99x03K6vytb0I4otCC9o4wbDvL7titRzzxAAhLZWXwTc2P+imX/ifkfvpbKl27CuX24nyeRkmx9anNLDcknnf7+S362vwe1CbKIs+4gtHQNdMqPu1MfpGnRQspJ9UtqTvhh44sQvoq8oKgYP91IJobn6/kXsYNtf7u5X9ABvbsMw1vU/6XuWIuu3E7eCCENA1jj/cY4yqbKgErDAYbOWOaJ12qZZT8nWiaQb0XG6t/da+4KaqW0jlSWTo2Js36ba0hDEGAV1zghKryat9m75R18nSbXSWntX2nSm+YfFHcz2byYdsW7yDr7vJXM2808t8GKPnEwH6ENANjhUErvomjrcWMKRtLvlDdgONcXTScxw2PanrCQjpklf17jK02vIUCx8bMd0RP/vYVsMn09fcZ
311xlgv2M9qX12uq3KbgYbrCqNaBHQx7YBtz1rrHw92muFtLmED7HfMfqm/8wctrOcfiiAfwT0scGKhokWvjb0iiGdq1yn7zV9GejPv9PLDckh16ZfGYgKAd1gWoi2P9hjTO6Drgsc0p2DTMzyUa/Rkn5SuSLJsu9BpmWdO2zXaUANcAoEdLttwG2/HzFarpcJ6S8+t2n80dc/a/b7k8Ke0CqPkn5VOXzc9irHpWLmxvfnAkxFQLfbBt7+wvcGTYsyREj/acoPu/Z7p7LU7Hf5DepHlQNcflVZPz7fFSublWDqx7Y327AxE33RiAxldi0mDm220bnC9FSBJn16krSwWEmkmrB+YX7ZjAqs5lTeysw34XO0nWNtOyV3iAoB3SHwvLxBgyBgSDvPTtdTtXKy9eocP8ufHLpQgKCYza7bVuFmt7vqWdVjMrPIp+T3+Gcq3xOnaodI5p5wmWN5rfCVPIAV+qC7bQNvfxFy44H6pN9bDGSJUS63krt5uEMB7BHQ3c6mHrqLCWnbm2R97lWG/e9yK12LgulKcfk8KblDFOiD7hF43omnXbEKXtblsDpItaBAocOJ4fcBD+9kHG/8jl4NBvCJgO4R+/Sjthoh3ZwK02vVRMwcF8B1WmgACIGbhP3uFDagF+pePNQb0xJkKHN5s9A2oDOdYXcO3hb6oHucoGXpddg3+pnyOZdZ7hYBDwcYREAPCzn9qG1rDv64DP/mZiFeFQE9LGg1B620k8tlX3L3kZI7vCYCetg20Har0jWcECV3OCdUcVhI0s03jVvk9E2Xrp0rM/fz35YPP0k5JNCGgLZgsQhpWxCfbK4JuKPkDueAMjs7VUBfbA3xG5TLPqDXouQOr4AWNC6W4yx3HzgZ49S4SYhLljs8dhnoGIBOBDQumUtN9CdK7nBqBDQulrmJ61LquAx0KEArAhqXzqUVvQx1EEAbAhoXzcwmaDuc/6pvlXPANwIa4GYhIkWZHSDnkruTzOMN0IIGSrnDY5mfAydBQAOl3OGxn8wqNUBQBDQgyUxgRckdokJAAy9yh8fSzYHgCGjAMHNtPFg+/CpJNyxZhqCYzQ44dCvpz47/a5tWFgiGMjugwcwVLTGtLF4ZAQ0AkaIPGgAiRUADQKQIaACIFAENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKQIaACIFAENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKQIaACIFAENAJEioAEgUgQ0AESKgAaASBHQABApAhoAIkVAA0CkCGgAiBQBDQCRIqABIFIENABEioAGgEgR0AAQKQIaACJFQANApAhoAIgUAQ0AkSKgASBSBDQARIqABoBIEdAAECkCGgAiRUADQKT+H6tAq5P2EDerAAAAAElFTkSuQmCC"}))),Vkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{x:.25,y:3.25,width:23.5,height:17.5,rx:2.75,fill:"#F7F7F7",stroke:"#C4C4C4",strokeWidth:.5}),x.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:6,y:9,width:13,height:9},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 9.5484H18.7583V17.9786H6V9.5484Z",fill:"white"})),x.createElement("g",{mask:"url(#mask0)"},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3219 17.9783L12.3097 17.9786H12.3219V17.9783ZM12.3219 14.6486V14.9926L10.5001 17.8081C10.4197 17.9223 10.2756 17.9787 10.1696 17.9787H5.99995C6.1095 17.9787 6.30077 17.9184 6.38509 17.7964L8.22691 14.9499C8.29105 14.8438 8.32233 14.7429 8.33026 14.6486H12.3219ZM12.3218 11.6213L12.3088 11.6414L11.4873 12.922L9.43883 12.9218H9.37714C9.27711 12.9218 9.19884 12.8982 9.12706 12.8491C9.23459 12.9212 9.43739 12.9051 9.58816 12.7155L11.5081 9.89851C11.5792 9.78007 11.6119 9.66222 11.6129 9.5484H12.3219V11.6189C12.3174 11.6263 12.313 11.6338 12.3088 11.6414L12.3218 11.6213L12.3219 11.6211L12.3218 11.6213ZM12.3219 14.9926L12.3516 14.9468C12.4081 14.8604 12.442 14.7561 12.4502 14.6486H12.3219V14.9926ZM12.3219 17.9787V17.9784C12.4369 17.9737 12.6334 17.904 12.6952 17.7936L14.5369 14.9469C14.5961 14.8471 14.6278 14.746 14.6365 14.6486H18.7583C18.7502 14.76 18.7139 14.8663 18.6552 14.9533L16.8104 17.8049C16.7342 17.9196 16.5788 17.9787 16.4783 17.9787H12.3219ZM12.3219 9.5484H15.7348C15.7345 9.66828 15.7034 9.78657 15.6429 9.88062L14.773 11.2254H12.9257C12.6562 11.2254 12.4865 11.3513 12.3349 11.5993L12.3219 11.6211L12.3349 11.5993C12.3306 11.6056 12.3261 11.6121 12.3219 11.6189V9.5484Z",fill:"#0072B9"})),x.createElement("mask",{id:"mask1","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:6,y:6,width:13,height:9},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.0228 6.16864H18.7601V14.6485H6.0228V6.16864Z",fill:"white"})),x.createElement("g",{mask:"url(#mask1)"},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3936 11.5108C12.3736 11.5384 12.3541 11.5678 12.335 11.5993C12.3527 11.574 12.3724 11.5524 12.3936 11.5341V11.5108ZM12.3936 6.16864V9.54839H11.6128C11.6141 9.42232 11.5764 9.30157 11.5086 9.19136L9.67184 6.35242C9.59069 6.23009 9.39596 6.16864 9.28699 6.16864H12.3936ZM6.0228 11.2263L7.96911 11.2254C8.82717 12.4901 8.82717 12.4909 8.82717 12.4909C8.94104 12.6635 9.02767 12.7809 9.12698 12.8491C9.19876 12.8983 9.27703 12.9218 9.37706 12.9218H9.43876L11.4874 12.922L12.3546 14.2599C12.3693 14.2822 12.3822 14.3055 12.3936 14.3293V14.6486H8.33018C8.34243 14.5017 8.2976 14.3704 8.23 14.2586L6.37983 11.3994C6.31915 11.3026 6.1358 11.2348 6.0228 11.2263ZM12.3936 9.54839V6.16864H13.4552C13.5506 6.16864 13.6962 6.21148 13.7923 6.34939L15.6411 9.20665C15.7041 9.30648 15.7351 9.42809 15.7348 9.54839H12.3936ZM12.3936 11.5341C12.5305 11.4158 12.7283 11.4438 12.8492 11.6486L14.5374 14.2578C14.6113 14.3681 14.6493 14.504 14.6364 14.6486H18.7584C18.7682 14.5141 18.7369 14.3723 18.6543 14.249L16.8121 11.402C16.7286 11.2838 16.585 11.2254 16.4784 11.2254H14.7731H12.9258C12.6903 11.2254 12.5311 11.3215 12.3936 11.5109V11.5341ZM12.3936 14.3293C12.4406 14.4289 12.4585 14.5402 12.4503 14.6486H12.3936V14.3293Z",fill:"#50BCEA"}))),qkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},x.createElement("rect",{width:20,height:16,fill:"url(#pattern0_144_5938)"}),x.createElement("defs",null,x.createElement("pattern",{id:"pattern0_144_5938",patternContentUnits:"objectBoundingBox",width:1,height:1},x.createElement("use",{xlinkHref:"#image0_144_5938",transform:"matrix(0.0029715 0 0 0.00368061 -3.73756 -1.
31107955)"})),x.createElement("image",{id:"image0_144_5938",width:2e3,height:565,preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAI1CAMAAAC5V5HdAAAC/VBMVEVHcExhNCbwdDPPMTXOMTXPMTXtMTbtMTbtMTbtMTbtMTbtMTbrMjjtMjftMTbtMjdZRlHqni/5pTD7sC/5pTD5pjD5pTD5pTD5pTE8SFkMYZ4VcKsOZZ0fissBltcAltcAltcRkNERntsAltcAl9gJaZj6qDEUl9UAg2UAg2UAg2UAg2UoJCMAg2UAg2UAhGYAg2SaMjTzYjT4kDIWldNXcYy+RlfWPz4aj85kW4HLQEz1ejIhhcd1a3LvTDYmf8KsWF4oISEdHBwcGxs2MzQ2MzQ2MzQ2fLs2MzQ2MzQ2MzQ2MzQ2MzQ2MzQ2MzQ3NDU1MjM2MzRIc64jgsUfiMkLXqELXaEMXaENXaENXaENXaELXaEQXKEKXqEKXqELX6IJXaEdjMwYktEofMCgjFvimjAlaY6skFbsozfBnUiQfGYWjnGCw7RYqJ4xm3hEpY/x+Pv///+129L5+/z+/v79/f1NTEywr6/38/OXlpbUrD6f0MXL3efW6vLi7/br8/hrsZ55r3KayFy+2FpFPjuEg4PJyclnRjN9aTDw5uaihS7juzjxxDD8xyrn19j/zCn/yyj/0CZfXl4QndkrSlcgb6oAp+ENodwSmtejQ0SbMjSaMDKeODo0g8I0dLeaMTMjVJ8mV6AzW6Q0YqlViLtnk8ElVqAiVJ80aK6NsNGgvtm0zOJ2ocn+8Tj44DeaMTP+3SH+3SH/8jibMjTuryzhmi//3SD/2C2JzfF5yPByx+9qxO56yfCAy/FiwexZvutQu+lGuOg8tOYyseQmreMZqOANpN6n2/WHzPKMzvMzqt+R0fPHvVBDY6OjtWxEo9JNr90+QJRDUZhltN6IyOZPTIt4v+Obz+mu1+uY1PUzueozpNozndZGobgzl9Azkcwzi8ctd7yo3PQzb7K7c3TAf4DRoaLatLXLlZa0ZmfGiovjxsepT1DB5fYqeb4jntgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcHBz9uS39uS6AkRiaAAAA/nRSTlMAChclOU5jf5q2zeDv9fj/BTNTbZa60eb1Ag0ZJExiharM1en/Mf//S26SsRLR6///dv//////+////P///////xsmMUBYcf+Mpcvc6fP6//+7////QFNrgZaqvczd7///////yf///////////////////////////////////v/////////////////+/////f/////////////9///c4vP//////////////29jpH/8/7fx7//+TtT/////////////////Hv////////////////////////////////////////////////////9Ncp7J6j1eiNuz9v///pg/fO8AAQ6aSURBVHgB7NmHjuI6FMZxpxeXOJAKk0bC7Pu/4Y2J2lwtIyCOA6vvp1EftaOIv31M3geAZTuu5wdhFMWUMsZFIjhjlMZRFAa+5zqWJKZI204PxyzL8qIoy7JSylmR51l2PBxS26rJP+R0/mratuv74TLOptk4uwxD33Vtcz2fjM7+9h2Ey3fAOOdsdvsO1IfgvOvsAQBAWo7nq99vxpO/EfMfpzQOA991LLIt65byvFAZv6csinzuemrLz5/9aU551w+q4veosvddO2edbKq2HNcPlg+BCyH4D2LG+a3sYeC57zV7AACQjheEMeUq279a/oHRKPRdu94mKHPLVcqr6rt6RFnkc9Wtz539V6NSPj1ozrqq+lazd9WZji3d/p0QXGU98Jy3mD0AANSOF0Sq5U9icRi4NtHLTo+Zavlzvssyzz4x6rWK+fhnetY49O31RPRSMY+pajl/grid7naOOgAAWK4f/oj501H3Hant2faQ5WX1siI/pjb5HKdr21+ml41D13xJfSuaJeb8BUJFXR3uAABgr5oHEUvWEYJGOpqual5UK32XRXawP6PmTTeM01qXvtXQdOn4YcwEF3wNFgcemg4AsGvN1zc99J2arLDUXItPaPrp+qPma5u+6kG9VjXnquarCRYHrkUAAMCc2vZVzfURNPQs8horVTXXqMyPqXzf2Z/bfpx0unTN6fVjnaq5NoJF6mwHAABGSDeIRaLZ7af8pct5Xlbave01XTbdZdJu7NszeZ7jR1QIrlmsznabAwAAywtZsg0auJI8JT0W1TbK/A2Tfmr6cdrGpbvWT76cL5dz7QRnkb/x7AEAwPYjnmyHhk88okq1a99QcXTIOzm3w59pO2PXyCe2NCHlgm9lWddsBwAAOY9Fsi0WedajOS8rxXzS98r5tLGxb+TDORd8Q0LwOPjYpAMAIOeKYOEDi/faQM6XpNtvnnPzSV9yvr14i8U7AABYXiQSM1jo1uRXRnKufL9F0k9mcq6M/ZX8qnZM5FwRSDoAgH7SjXhiDvt132ofi8qg/GDtO/umnwwauzO5zw6o4OaoBxgAANDHCVli1v3LmXXIK7PKPJVkN9dunMwa2tO92fsxN0os2xoAANDC8mkiEsNE5Ml723bjyszebds+Tub1zd8qWrsRE9wwQQM9swcAADcSyR5Y4NzbtptXHCTZwf1tu/m9+7JtN2852gEAwEp2QJO9xP/7Ja/TvNpLmaXEtHM3TnsZmp+zl17EdyJo6BAAAFilVtfz/bDQ+XE9Lyvz9rukN8P0H3t3oeWoEgRguMj4TKTXt4H1sBcJsMq6xAXpWXn/Z7kjnevCzAS6gPqO5Q3+013VRBF5SEdwPJcO6ZBOLowxXWeMASFkPT1X63CHg6TweK5ikq4rPJ6vD+l/GLt0uh2V2jkm6YQw3TBt23HcE97ayW/HsW3L0Bk0FSF8a7/bU229E6Vdv31XuVvXOZTEethX7olcd9d2lR7P5SR9Gwj5V2xg2Y7reX4QhH/1LHz2LAwC3/dcxzYHDBqHEL5z2EOge7AFAC253K7YnRsalIHdf9zH4KF5/mixo173aFeDvyOEG5bteH5wEu7/dRJ233NtU4cmIUTba/dwONyR23AY3GwpvW5XcO1+ct2OQ3u/BZJEiG457rrl+QW+61iNiToh8rodhfb+7bto3LoGRTMf9tF48lxetyPQpmt38kfMtE9jfgky6rbBoAkIPT7v4fHi5cu7aDyV2+4KttsVePU6etNBo7vekSSEmY4nT+aX53uOyaDeCNk5wtVzLEWXg3QGxeHy23AovH0XRdH7Np6iH+0yIOeo5hvhe7bJobYIYbuYev7h5UtsRS9wkK5j6vnHT1GEpehSe0+DhiOG7frh5jzzXVsHQmgdrnCfZc9l0eu+Gqc/+KWPxpevkXSFa3dajePacDgaT6bT6ezcya/JeDQcaBzIhXHT8cNNCzyHjum1RLT9Lq6eYyz6ra1iev6wj8f8a7T2HtMgvTJF54PhZDpbLFerOEnTTAhxLM5kWZom8erbcjGbjocX6DphthuERXjmuxYDQmqmhbHn0t2aL7sbCHsuYSr6wVYFWj6ezparOM2OxX84Flkaf1vOpqM8VScD2wvCwgReCTfvhFDPMZ7Rr9W7599lz1EVXcJddDacnLQ8yURe2XGWrBbT8YAD+Q+6vGunpBNS/Z7Xvegm1p7TGT0/bTxbxqm4sEyI9CTqIw3IP9NtLyyWTLoGhNQCb+338Pj8UkKa9NvXmtBzKnp+g8niWyKuIv42G2tA/kaTOS8l6QwIqQHZc1znc/xn9Prft1PRc9V8lYqrS/7WdMLk7LwcgWtB1RHC0e6317/oWPfhaI6ejzbOX/NcTR9xIGumG4SlChwDCkAIvVdDXfRWzd+rSaher0l4Xq/x4XSZiExsUBYvJwNYo1240vnVHqUTwvbw97yuRdcf9PH48TX6V4i+AovlPTobLVaZ2Lz022zIofGY5YVKuCZUFyG7HXzfe8Vf9JsaXB3H1POfnyIJbdElDF+B1SaLWB
311QkixeNv3k3nCBUxHd0qChCdtrY/o+lGkXfxD+1oPo/lk/Rf3nfwaO9y5XnfJmI4mQiXowZNJjth+oEngWVRMj2UXV6juy/1+Cq7iHq+at3kYS/6N2jXdU5T0XRksWYN3d6HoRK+Q6D6iFk6xB/z7E+R78OV2M97uPxOpIqcUY/2gZlmMx54ZKmXrxbXqha4BpASNVo6D8og/jS/fa1mj9Ap8drf8dHy0SUJZ4NoXE0xw8R8G0gpAC04I52Ma5VlwX3j1+jHNqY/npNAxWGs1iUaTXV6O25GkHFrt0J2W3jX3BHXXTWiIW4tfeIit7e41A6bboSJcu+TRg0B7/cNhxduxPCt5AvxOFfjLte8YU4SS7EVWuMvqPgtj0V5UsWQ3qspsSzCm27E9I6wD9Ar+sY3XiEaYAe5YXpq+6HW1CqwSwWaqymjLbhVHhGg3RSHXtd/BfuyIv+9JLfl2GovijzNcqt3cGj1DE6H3/LhCppIw7pzPFDbAKbAyH0RZnieo7s+zLVf4Geb4CO8fsyUBptFguVVhgn6VwbGKZpWpZpGsZA15iibThajSOkdViFC3f8Y/TLXLqbjyt54Y7u0n0bSiKn5woliwGgwQzLdhzX83zfD874JzzPdWzbNBhcArP9ZyFGgasDIdjxvd6v7J31n9tIEkdbXub2cEs6Pg3P2AdLx6HhsSY/CC1aZub968+ZxYkCKnW1XOpPv2NI7BzsN1X9qor+xJqmZ1pINdz/+7CGu5ld44hyu4TufoNIls+SfG9WTI/vGcCzbN/Z3vRsQbw8B9C7RDdw23G9IAjCMIxmhDMCz3Vsm7OuMSvc9W+6/5Zcwx3UdCfE493YcGc+BU7n7sbtelt3svyhpfR4f29WrDsdH0o1iW4QthtEcZJOs7woivJXFEWeZ9M0jkLPtRkBjOFO1nTX2XA3pvu144lPg/N5tt2Fs7m9tw9oi89CfdMRjbrtOyPSjLd3GXkMjhfGaZYXZVU+kCKfJlGoWaoTaLgDjDjqpru2hjv9pjtnirl54lNhMjmel+1+J81HYC4znT0Yy9veH4+I00GiDxcxWFgYDgecoRFEAIJa5yVqTCiYDLYXJVlRNqYq76S6Z6M/SLlBGEYPx9b9xlqva/QF/VfKkDXdFa+XEbdOfUqc3GDdwz1Yml9hlukPSEN7cwf+eK5l131pHYWZpruyvDgcMBScrAQQsbsImkdswloj3PAyzOEUWRK6nCHhBHGaXfb5q4d+cKD/TZY+N90HrDk2pZssh4ACnWbT/akBUwg/OPNpcXpTsG5xYJkL6L1b3tZPP7VJ9OV1RNZWFh9hCISQnMyc2g9vXjHHrV+CwiQvJcjTyONMGuHGkN9URMaI08WL++2f+2LEGS/OOjr3qXHWrRrnoPhql5Kc+2v13XIAaU6BbYspZWUdl9XFAZOFJ1XZnHomx2VjQtYGu5bmLTNdtk53gd8jMUYc/WF0zYw448XtHk98epwfWKwrXDz9fLy/v7O9vbW1OWPrx8m3XqF4w8xwYWllbR2T5SGTxIWkVOHVqta0rIHZg3aiaVHikCcOaw8PsxLG1GaIPE5/56u2Z9coGXGvARrudDfAPiGU6e3+xCfI+ZFFpDqHM77yN71if4spRYjBcHF5dR2PlQUmR1QCSHmtfp42D1SXARFenJV45J5EnscF+ONchoYYPE2/4a5BiU5/R9yLLwGg2nR//hk1++LELM8B6Jfo1tU4N+xvMsVwYaEW6tCJ2nogAwgBBb50xSq8JC8xyZwu87wsAjOypkWJTnpkDRDo+o+uXb/tk2UiP5AOHw437HlMPUIM8DJ9ecAk8CSUOOCPTxkIN85LXKactQWW5/hW3CP0C3RtL6O7f9KgQCd3Gf1RJXl+4RNGcaILp76K1TDec1kn8Fmm4/Tel5gEcSmlxLEQ8qMBOFFeYpNITQLASUyBTrxEt9jDET0p0M12mWu3fdoo7brzzb2Roc64qyWwQuBkOkDXrSHsDKbE1YirsiFVCDHQpqUE2BWzm5VtmNqmQO9/ie5RLtBNiU4gzwFdd8uU550z3hKss0i3hovyrfcl0U3pmXJWI1HxpOwkRYlPEbae7CtbkbumQO//KzrdAh3Oc5RKdIE9r+ZP6Cc6Z0oQuIdMjRgngXyZvjpgbUnggahccucBvCAGNBjgBEXZjoDhoIviTi3R11eHGijuAF7WtkQX1rFPn8n5gWAK2N0y5Tm2GCcBlyzT1xaQhtDhkriTN//hNmuEAxLQoN9fokCHE5kZdOoluujTkrhX4AU65Vl0hgg/mvh94OwWw8c1cvuD2bFZt4jBwvJa9z13EYKVOAnJnbMmuGmpiCnvuEAvU4FTfGiwJI7sGVUdlsSZdXHi4NzvB2c3GTLCe6gNZ57RWedwic77yqDlZ6aya1nQJXf8drusdC6Ssi2ZjbPF/TmdCnRiG9112OJuNrrfOvPh6HF7TWxSaLebZ/Q61rBtpK8NOxhCTzirE+H2n0WYl/hINcCFm6OupoPD6Z9Z0+LoGv0zay/dG3N07eap3x9uX2OIcPN83oQdh80B3jbSF1gr4krWEceV3HlUlOoIWSsi3I+E8wj9O+ja3kXvwx10cxf92onfJ44thobdcFrNTKMLNheGi6td7ZYR9lR2qJqjSu5CaZ4Xnuy5eDixmVmjHujLXIOzLACe1W9yDSK4E2AyORB4eT4yUGq61xFtqvRlrtz2iiTTLrPnm+dl7rA2hKUEKac/sybfcdf3RIvzR62UOHKTa4/gCHEAwV0v1X23cZ4bdnYZMoDG+1onVlwivSQFU3LnIX6ey+9t46n8pJxR4uhrcfSVuNfrSpzR4uBCHAUmp9cZBg4gzw1bbG5YgCG29lacA7G9EsHuQYDomNfznILk7hW4bX44uilx1AL9AceNOCUl7g14x52+Fmcxaa6f+P3jeNf027tm32NzjXTVVpwI5U+BIkruQV6qJWYtEDGuiAfnEQ077rQSfdjjO2tmobt1fOH3j8mBMHneuRfH2fwQj7z5llorjqfy/eoEbQ2qOy0VE0qv0oNTxfIdd622xJHcFqf/ELp8oJPdFgd4QNdrvww3eU7Yi6vDk7ffeVelFefl0jPcPMVqPttJqZjC63pmDcWKE2Q77vr33DmpIfR7dNxNz13cAEygazWNLsz8OYENsMAsefE9hVZcBFfiZCR3B/xlCEju9lT6U03Hnf4R1b523E3Pffe231eOBJPB7Icj4MWBday3329YpK8OlWZVIt2QnnLoAB0ByV1If68iMB136oG+vtgTx9303AENd82b7pt7IzCGPYfNDzsry6pxkb6gcgi9CKR/jgS/EFZ/KEUkpSwRXccdjnyO0+y5W+xeCEod9//Kd9xJjqI/xaUM91O/v9yWMN1dCufPzZEW+Jh4VZXNivQlsL5dSVe3gEZ5FYEb7gQkdy/HHZaDY5HtuOu/W4b6VhmzWwZuuNMy3VlbLHMvtR17LsMGvqPsxfcUWHFOhlBmxgDHHKCSk5HcY+ROP5xHn6W/x13X3TKk9rjfo+Nu9rnfOvf7zOmN1kLcyEDrFR1QH1ZVXXeXt+JCBLNLIEnuSameIsBf4w7VCeGIx8ntcddycI1T3+P+CqDjDtjnToAntbnJAueYayPEmRIdoK1V5b/fQrbieIrQrbYzedsbsIyt82AN8X4jYS6n0r+hSv9yqo6Da08P2htxfs85b+fFOcSEOPOKDu/4vv0OqhUn3Fw+k0CSu62mQK/K6ue/W1Uyt2FqCJ7iXmGHI6gdZtH6EV3/oTVAoNMfXBMAI04rL87aHneRfFch8BHkRXdAhdhggG1R2RB6yhm+5C7/gl7kWZrEcRSFl0RxnKTTvChAvwj1s3SJeULv5yP6b/5M+QndHGjhR37vmRxQbbiPP/jwV3w0Giv4iI/xP4LuK3o96h7Sdl8WqobQQ4Rl8DGyeZYlUeDagl0i7nD5d2zHC6JkmmNI7iKu8OffzRM6zUd0bZ/Q6R9FbzuJfvPM7z8n11pMrHXSmv7k089+4XMlgf7JF798wpfwj6C5Lg7w0P3ie2hWXFDAToDKS+6Y5lmehI5g90EIZrthPC0kOt+Y7n3umktrfXxE56Sm0F+6C7P9lR/7OnBAZYV7PdC//BllgQ7/CAQ22dy4q0Z8+x0sKy6uMIprDMldhOCEjF3BHga3vSjNpdy0qMQhYG0RJKfQ9X9Epz+FbibRxc1zXwMmp9fADXctA/2r7gJ9hzN8gIV0g4f0tQX5eSxYFttTBMkdap4VscuaIATjbpgW0DoZ8KtTb8U98oweT+j0S/T6/3k8Sk7cqy9dxUyiW6oK9IsapEp0e2dsKnTqd9EBwfvvdzGsuLCQUOJQJXfh5CWELBAMAPfirGgnuYcF9s5ZOI89p9kTOn0rjv7pVGPFAQp0+oEOK9H55giAqdCJTa6Jevn64lsyVhx8RXkRYsyPpziz3tXUZVDsMMlbSO48KZHIbNYWak6cxlacoO7E6WvFPUnpBf3i62/u4t+KI/1AagTdVOhw9nbneUK1nujSVpybSyhxyJJ7AspGl7WAe3EeY61xh5N75jIL+YNr9fsslJy4N2QCnf59FouQ4n7x728/++oK311c0BHdt0amQu+FFgcogl/8XtaKiwA1cYxi1oUojnsesHYI15X0EWUIWUusp6g6cfpbcfYf6DpxZlecOPLVBfqXV/hMdaBPbkkV6KZCh7PN5oSws3rEVm+/J2fF2alceQlv3BcBytrXuFN7AQr+1ya1J+6v9PNcPtDp74kzu+KULom7qAX6l/KBjrYuTmyNTIXe
311i21xsI702+9JWXGevBIHldxdlBsxbvdL+jBIuZHce6e5/4aw5G409yNfnwrdP78lWaCbCp1+z732Tt1gIH1JsEbEKEocc3IpLwze2U5YZ9hpiUfmkJfcTaAvEl78ujGT3I3mDjyzRr9Chx9d2xqZCh2FbUHpEb1eo4OsODvDySKvkJ/cEpDgDLtfAIBC4RnJnb7mTnhq7fX/vYTOc31e/nprolOF7p9dZ43Y3RuZCr3nPXd7WjZJdIAVJyBhFeF0pWOAIyCfiwgkVaNvVKj9ncgTJtA7Y/lqlSQoTa29diXQzdyadexrU6EDJtcE1gy6qdDHmxROqNYTvZUVlyC9WkcIvy9wc3JP6ICvFWdlI2KzyZ1+oFvs1whSm9zlA532NnfOQNw487Wq0P2TRlqctYNyplRloI+vAq7Q9ffcWVg2T/RF7CH0RLD7gyO5kwz0qGHLIFVqxQn6gS4J3fMsgtLU2uFL9ANdBuDcGj+40KZCB2hxwttvG+ajDz74+ONPPvn44w8++PGfgAc65JMuP+qHf0ZFhX75IZe/mNbs2TROqNaPr4GtuLCUCGJsyT0o5L8NLoBfWspjwCZ7M4ZO+97asCdj6CbQd098zSp0///sXYd/2+a1pZydLnYXkt5+6rDT8HvDGb9WaaazQ3SIpGTLT28pdcAFAp+GOaVSy0ORFdnd/+vjJ8ohcQiQ99Jg9AUPp1OD+Ay0ycG599xz3zEI931xLDpPFQv5aq3eaHbQqNcq+ULRInA6l9BPybyUr1bUSeVy56hKtVWy1PdDVehWcWt7e/t3p+j8l62i9SXLc08GkcvKykDCzHcvUPzb4azyNqZDMLkbC/qNodNj3LOJzERfRfTftRa9ZBn9d63F+9Ygxj0CCp0U6M6fWVNs3qo0HNdWEviMOF2nUcmXFKfzCJ1wUr3s2vbpWdKVrm3Lcr1aUJwekkIX1paickCH1DXOc6cPdq10GP23fFfc3HI4ljiWyT0Zyrj31ZlzWUMfXHcgP4NMnCujf7JM9HNl6HNrWhP6O+kIKXR6WtyP2XRuFaoNabvSBdhus9ICSucSOtB5qdpwbHcA0nXq+SJS+ngK3Sr22Bw5vWjpt0OVJGKB0ed/y3XFGdmQmtbGQhgD5FnW+Ff2XEcFEUtJ8gTgYpwro71C9/y1Y8SE/gXiq4/zK+7RUugfvTuy5m5cZNN5RXGs9KNZ13ZqitLHJnSg80oTT+qdZTerSOlshS7EIJ2DTNd/cI2S3/IJ1xU3fZVviQvZ5A4XmfyakwnFuGfoY/TYuyAS+ldjQj+vqDgdg+LiqDiouEdAodNr7ryKuyLZMohz4FlZKyDPjkPoQhSrnZMC0KX5Zh5fHrgK3ZfOQaXzmug+g2s6FIA/9rri+Hqf3/nlT78tkAidAP72VD6MmWt0p1tukgb9x2NCP4eoOAiK0wHzUSf0JydUcTf7oLNCJ9TcjR/z5Hm+6UPnQOnlalEIPqHDSa2GiychbFu9PHAUOpyx9TsCtll1959osUIVseINgYVhWjoN82VlcikMYZ3hxqLPnO/zxjL6wiRdcTGhI2JCj7Nfp37JIfN0uq1w9uUXotDNHjg+9xA97kKUKtKXZFE714FnKYSO8txxfYEvDyDSKQod5TlJpOs/iT5MVMM4+vcfC3GJWDasK12bCW8HytKkNbqRvErnaIM61J+NCT0m9BCi3GOFbrzxAZFU22vzO5vru12sb+7Mr51+e5IKXV2+3d7b29vf39/bO3uPoGbLhBb7KlKFhu1KMs+OT+hClGrqMpSjZAXKAUSFLoSS50RsaTuJTqdOZXUnu+IyHEtcWPk0V5MhZqZfW9Ajxv3aDMeSsDgWoX8t0smvMaEjYoVOwBUSra7Nb+4ebLi27doKrmvLjYPdzS6pT0ihm+29/Vs3bt6+c+fu3bt37ty5ffPmrf29dpr0+Q/fGOHUfZ7O562m7dIgXadqCSah45sD8SS7VhJiDIVO4HNgdJ0n0Qll8nl0xfHr5HQOojTj6Vcy0FBOwHJ2eqIKfZE1FL9Ib1/Ey9Z0JnT4S0er3SwxofdgjMpxVyJ5fv3Qsc+Gr7t8ruBId+Nwfb4NlB6WQm/funnn7qdHp1D/oXDv0zsdUm+nR1/BvBLaJvR8eTjJgnIGRicQOvnNARi9rhidqdCFsLY5jL6t+wpVQlP3Y3TF8WU1v+2bXaHX7gkWfm3K7rPLrMeTDaHcoR+hxwr9byOn0BFfUkJ/7f1R6nxtc3fDDioE2+7G7s4aUnoYCt3cu3PvjMo/PcXR2Zf37t6+tQeUzt6hmrxE1ud5h87np48JGZ1I6EIUmrZ06UBGpyl0IYosRt/SP1pmlIxdvUF0xXGG0JeGa0qDscg8Q5+io+Ha5ES6keVJbmqhYiEmdM0Vur4l95eirtC//mRYQ2uKzg8hSwVhy8PNDqWHrdBN88anXpwRu6L2Ozf20yZ9cI03tAaqGfU5X6OTCF2kSg0en7vSrhUFv4cuir9jMbq+rjgC60Eb/fsX+BfiyWr+IvPrc/R2AhVLC8nJGRYIWMkyax7ZR++hxyX3uIcel9yvmMM4tb3jS+dY+3UOd9qmGXIP3dxXDO6Po6ORlP7hm+O20EE1u9I3SeYUAX30fErwCb1Yt31P6h7V/e8Iu2IJukKfLKNfmtKxiQ5t9B98k+73ojvT+YvMyZdCQUzF9cXZ84xxvz7HfEdaMvjFAg1c7rEpLu6h60Xo7w7j8+P1jUA6B0rfnU+b4fbQzb3bQwj906M7t/bMsZeiU1vovizr2k6zVumg1ii7g90I6TYLQjAJ
311XVgV2++9QTbrtSEnudWUYM6hCx9G3z5FEKMXNc2Ko3vTVz8mueJyK5xFKJM1uUM7gY/l3My5xLhDOv3iI+6nicfWYkKPFXoYua9meueA4bnegLp7CHPoWHPHAvztoSL9XYM/hU5gWdcu1/KF7q5Rq1jKV5oonrEUTiF0kcpLn9ekutqw1jmq869Sq9IYPMktF4SgKHRg9C3PMhart3mNkDCjl82dNu28+r/giqOVk+llckQoJndQuPxW+sw5xLhDBT07qdTamNARMaHHc+jBU+hme3OUPAexuHtsmnyFzqq5A6PfvdU2x5lEN5KXiA10xycOrnC6h0WcUaNVqg7MmtlKOPMIvQSlfem6Kh4+JbpIqQ8U8/UB1rfrRcFS6MDo271ceHWMKG4Riu6ahb9SWG8HXXEUoU9QoCFcK8sPTqfiamb6XGLcl2fZbzaZL1WWe5zl/iMds9zjLPe3Pgpi07V1lrtbcd3hvGmGqdCh5u5H6TeDy+4fvD6eJw7a2tAer5S8K8nVF6Vq2UXhXGIRuioFIJ/XW9ZgXT6PLw/dojs3y10xei8LTvQRvUj5UXpRu/BXAs9ABOxIV1ySWB2m0I+RC+FaQIgaUDp1im7RYH8kF29b05rPgdDnNFrO8tlDQo+3rRlXgvmcEHaKjH6wkzbHVuimeXIy4HM/GsHoR7f3gxj9ozcf0RMnUlUouNu+W1GESLWAZ6Vyq9EJXYiWg8Y6lQvvZ4WvuN6T3GZJUBS6EML71TYo796vDc61bWtN6ASrVmc3+v+iK47Z9gYf26RM7ohpvBIT18Ok9CzxzAxWT/g1DwIuxOtT433o8T50QqwMnc+h/rsBjM5R6ObJL+6fmIyau8IRMDoxWubHNIHe8D4DOzCqXZRqoJydlhB0QrdqtpelMaq9LxemCpUTu5oSBIUukNKtraJvvI3wm1Qv6jm3RufilZVP0BVHZyvESi7ELazLI/zyqnivAaXDXdHfdxapn+ET+rMaEfor0eZzJPSZf9SI0H81AUJ/UaMxdDKhG1PvBfTP18F+RWX0g3nTJCt05PMHD+5TfO5gd7+zb7L3s/xE8AW6hBwXSGupuC5IdDKhQ69e8XkrsGCuGB3KBiXhr9ChWp+3+ildKPifgGlyRIl+yUhotEIVsfIfN8AVR2Ervqjmm9ynCZPfGlA6lP/J7zsZ/jMlYuqZqBE6QmNC/4eY0L8wPEtW6K+/7+9v32Trc2R0vkLv8Dkyetq/5g5l9yCN/supYEKnCXRb9t9aA/gcGL3mrc87BTKhQwcdB9nhoJ71HiQ6KnQ8X9bzfWV84PNRjF7UehDdIAStrlz+Lbri+AZuanl4gXExfp2bj+thJM0kFzmpuJN3xSW/OEKPFfr3vOaTpE6E/nbEFfqzF7g5cTivtoF8Tmf0wzVzLIV+/8EpVik1d2T0PZOXFZe8SMmUyQcOiPlX3YH/Fc0SCB1+piB7HwWcuerhmTeKwl+hQ7lBKkpPwV0Qs2e2NN23RmeNlW6m+/cu8I11fO7JTLx8z0+amTPCb2wQag4zy/znQMTT39AI/88I/e8jTuhf1YjQn5l6JJO7eXyAaSqYkGYPqcivt80xFPrqgy5+vxrscz8KovSbbZNgcycnufsbz0E1I9DYZjeKREKH2r60a1ZwLbxVKQ/my7SEGKHQhVW31ceIlK5c8DiLrnOyDK0uvfq/4IoLb385gm1y51v++JSee8TwuNw4c3gGP4uGjKd0Uug/izahfzfprYn9nUaE/ptXo03oT9NN7n5E2N61g9jc2TjcXV9f3z08cJDTe/XizbTJVOimufr7Bw8Z/cTjc7/XmTbvbE693VmiehRE6kf3brU54a/GNIXQS2VkWd4bgGxRFboi2x7sZq9Yj/bzfM2xXYRUlxul0AvO2SSC26gSKF254Lk19+eRLyYMvqv8E3TFjceaOfqOUUp9mlDqphQPCLiWmQ77pYmwOS3HNwcS8aROCj3ihP4dqO/oROgvRZzQn0pQ8Y5vA91x/WA7h+s7x2uKOtvt4531AyX4fNvoxyZToZsn//Xgc/zzidlXc79949b+3l673d7b2+/sU/WhdPWdu/tpH7z1KGPo3Yo7utYRGA4DNXcCocOP8HNQawcvfa8YAIQeWASQrpSNaikluEX3LT2j4qDRTFi79h06BdNDzfhVcvriUMOYJVIpoZU+F27ALkFqGxn+mw0RT3w9JvRzWLam60L0eNna1LvEgruKdl3fWUubCt1/b69tHgSI9N22SVTo0EDv4qUeo5vt9udnqq/2bt0+UgROa6NfYRE6wmM9Q4FOsMXbdYtE6ELkPc33cslv0l3V2gMbHU5phEJXc3H9+17UD0cAJfq2pTWh0yxt8+iK49vSkbD4ASz8EHODWD4gYDk7HfYkASIzptswE2e/6p/8Gv2oOA2j3MlBcT5Ta2Z63faj89359imvprs4Jdlj3zA56To7pslS6Krg3off9Bjd87vqzPatm0d+Iv1GmzG3NhuUKwNN5z7kAwU61LV7KJdohA6vDhV8dXhYaw9aSV+utKxRCr3YHGy6jwBKdK0Jnbrd7EaQKy5LV7mjicegchh1zdg0sWxNOnBuMr5DcBjwS/WLcVScxlNrKihO12SZP1yOg+IUjOfeD1imgnzuux7V7Ma9+zvd6QrdNE9eeuDFL4audL11Z0CkHx3d3TfJ61kMReisFrrdLA5nQNDBClLRJoHQsYWuPkWstatvNVW2/AiXO75qNAh3MzC6VtQ3zJ2eX3IZXXE0+Qke7smb3BEzS+Ex+nImOUlL3CL/2eKDpWIq2sky+ubKRD9Z5sUvZVDcawOEbrZ3bYmsIXtrV1DOzx/YfiVgRdpkhW6uAp/jODpi/+Ygo38KTncYRGcnv4qCBNnMjaKRdp5E6KCem0VvUnxwrV269plpHYJlfKv6Lv6MW3Pf0prQaZ3aFdVF/9ajDaFn6WPx1MsRQG+jU+zuM+HNrBFa4Tm+m4CG5NMxoZ/L1Fr059Ze1Glq7QJ31xoIdOTzdZDnnt+HjjtIdIpCP/l3oHMYR0eY6fYNH42+bxL2rVEJHRvbVSEoWTStvs/YdjVFUuglB5r1Hl973QmcOVC19pQg7EPH7n5ekAh9i+mKO1eFPkcinJXL4IqjcA6fdrgmdwIWiIRKwtJsaK5Dgs6enCvuKa1s7hGfWgNoN7cWT61hrky3g478rPh8SAXcV6NLxdpUhQ4CveuLSw8FMrq/RH/vtUdQ6FU7cASNWqevWCSF3sLYN0+tXQbX2kuW8LrlHVKbHkPsiE30bb1L7tNXqRL9u0n+h3GR2ORN7pNl9GtE8uTfUi6MJepEGHrZ3CM9tZYAGNrY3BVejbLJnTy1Zrz5kY/FHT1Xu2uBfH5qjNsI7KIHK3TooCP+/QSORJgdRgeoLjoxKs4IJHTQtGAjJ6XF9in0GoXQhWj1nWQr9ezxtfvvtXMwIMZPoUNzH8LfCU10JHSdFTox6W1lHl1xaPiiy8gJm9wRmTAZfTljhG+Jw0h2risutrlrvQ0dbO7/pJnNPTa5J94aIOjN4KlyhBpdm18/cKX066LvEBU6dtBxEj2Q0W8OSPQb5Kg4CqFXbH/DOt0ab9dphJ6Hcngqxam1ExQ6ELrbLBLvZlt7hc4v7K7e8HHFLYZqiePGwp+LRl/OGiHEuJPuxyC74jTdtxYTOnri9F+gGqHlqfRt6Ejo6QFLnCf3DcT52s7uRlBenL3bNok99Pu0Bjpi746X0Y+O7uyZQOhvMFzuiAqfApE4xyL0Vi+vPaDW3sBaO12hU03uCkILQg/ftTUPrjieos7S3y3oFWoijAWi1CXhetYI26GAz4ftiovXs+jriUNM67+eJSK71i4kqLgyUHHfCJ5Ag4Hw481DabuB2Dg2SQrdPPlnosUdcesu2uJumZD9+sbYc+giBELnK3SFFvraIa6v39eumUKfS5wnppeIEv3md/gOeR7n8E3uRMxdPSdGz63wnw//BSd2xenvidPfFRc5T5wxHqFjxR0H0LDWDqPR0ORVvE3qoa/SC+5YdEeJftMbLvNRUJi7MUPuoUN62+QJ3a6e1tplcK0dxTlfoTeL/B66/oROJZ2VT76bHHcIfQUtcZM2uSNml8Jk9EwYMe4Ey+As3RUXh79qmxOH0MoVNx/dFvqTCTqhm+Bxx4o7CvQunXdr7bYbTOfO4eaaaZJ66PfHFOimuY8SXdXcSdtZnvsp0+XuFCZD6GCKU3DkiFo7gu1yJzsCijoQevi+rVWsH84th8u/00th5sJjZtz1EPvoC/Qhf/4rAinGD1Lz4qw4fT1xiDmdsuJejnPifJatrR3aXvK116GD3q21g10LdeTG7s6amab00HEInS7QFbwS/UiNotMIfZqQ5e7RzTI/MUKHFLcAOodaO0uhK1SxT0+4GSR0Tbet8TvhH4PDJxuuJS7cTayIZJhm92tz/G4G/3bIrrhr/Ky46DbRtWqhoydOuyb6ryIbKwMtdJZCP0bylTsms9buugfr822TmhRnnvyeLNAR/RJdMfu9e7eIhD4VvD41eDp8EoQOP0FgrT0Y9KQ43OdGD5bRdB860AYBl7/FGbHm14RnuSb38yu7L83wax/8HFsjy69X0GBEdyW6ToTuu9AoqVMT/eevRraFnhxfoe8AUauZNai1g68dYMvDzWP1m9Rta4MtdLpAT7dv99fbO4tW94gL0ROBhA7
3115bWBYD5/QcXid5mtn99BTLUlYHQcQ20xCfy5xnqAr7dV/odMVWr7o/McfvaZiOhueSM8l+Z4AfkciM7GFa098LapNdN1b6Lo10eMWOip008RFa/0Rrt1a+1Bxbju7m2u9BWkkhb46kCmTpuNGj8v399qqyE8k9IuCkBHjYhM9fELHDxF97XSFDqdjE53eQicsZ7mEBVNNm+gr9z262MiFPWNGN7mvZMcqRSQWliZvjMOBQH5Hgn+FHH/hmv6T6FFZtab1JPqPLkeT0L+OU+issTUgdFtNk/fX2t1hdC4frlhVICp0M/1zTsUdsd/h8puKy2HP6khC/4mgczO9Sk0ndAxaD3isQb52fg8dlsHC3RAq7oR96JeSifMF0Xu1snJtBjvedAFKtdvTB7XOSaTTu/hkj0GWHhwbVgfCePobGiH6U+jR2s8Sgc0sQOi4aQ1jX9Mmpdau9n4drB+3TRDJBJc75r6ummkyzLbicjiTMoee+DFrc5pCsxQyocNKF3qtna/QFSq2ZEbLIKGP/GNcTJwvDINcGp4bKwVmiVKCwCk4+h+Eh9nFkOzuOXaMO78jYSxOyiNoPBnRSXStgtxh+kDHSfT/CrGJrlHB/RsY5M6Jfm0fIqGv99Xah5aFoXVOVugn/8xroSOG/vYHwYRO2Z/qeOgVRG2IhJ4qNv0fao1Qa6cpdCHy3mvnR3fkhbC2trGFriWh86VkZiz6zfALBXwCIyO5sHQ93Nk1cgOcr6+zE3vBeVzLwbXoD63pF+cezaG1J8YndHPNh9DB1x44pgZsTlToA4T+ewqhEwBZ7ogZwiB6sb9KLVXfWUyI0K2K7e9rxxPHV+ii1PRcn1BwUK8SfZRujfz9nyTOG3PX2arUmF0Oi33xigRcRQrkwJjOhhIFu5jkDw8wX3iSC3RXXJz+ql3F/bEEIAKDaxEcWsNta4OELneh1j5qTI2v0D/jT6ETgNvWEM8RbO7emru0a8WwCR3lM73WzlfolqfmLu2KRWH0nkrfTmm9bA2Lw3QtmeXXps/P5I6YyfFb6VxrwNwy/4Vnkq44RDRr7lpV3PGNT8ua+0uvRn8XOm8furk2sDv1wM/XDpFwx2BI4yn030+E0HEfOsK4SODHAsyHVy0xAULHwTX5ea09kGfpCh0b9fTJeqT0rZSOQXGIRTb3TF/l97v5hX+2i4yMWaT00CV6Loy3E7orLq6561hxj0LNPfoVd+P1D4YTugRfOwBr7XyFnkZCp0+tUQg9cDDa+AmB0EHUuk7eEuEROhQDsNYeeJKgZ7lDBwHvJpjRe8eLU2xto8ddk6A4RIZNziin+VzDZECsMGtA6ctz3Ng7vtBfJP5RZhJxWJyGHvcI1NyjWHFHvP6+h3zRFIcAqldjauBr5yj0yZfcfzmV4NncgdVajveWnaolRGiEDh1uSau1C1GCSgFRoaewrl/OB92NsEq9DwuFVHG0nv8peMA1XaEKTJoLnXyNyZvcwdw/96iUnqPHuPOH0HmuuIW45q6rx11/n3v0Ku5PJVh47n3chu4ieGNqj+xy/yxMQn/XSARhlpDmnurQswRGLwrhK5r5hC4EzsiBr10I4XdSq4G1f19Cd+EIlOjB7ydCWNVmy9sToHjtL+LT1rmJnkP9Sa/S803ufD3KhDG3SKd0OheznuhKjmAsIDYh4gUtGlfccUGLPrgc7cUsBEy9N3wOPTgS7hAj4egKPcyxteG//M6QO79EkeiFMt55rTBAtEKwCd0tKx0u+n/asKHWLizL56RitYzd/ABCb1ZL8NaQlwN30/0VKLYXaq7dLAgBryz6m9wZmS5LSRzJ4qtYfpWAQaR8Sr8evi0OiZhft8enMhGbYPSyZbTKcR9W9TW0ypZ5NUoCXeGZKebIx7sedoSkOMI2NQBboXODZRDttmf6HXAlASCEv6LRXUJloqx4UqFH5sWWJUYQOgybS1cCe6fyDS/HC6tSa1lCoVf4tvJ115XSlX6MLkSp7DmiWSmoC2DBAe8GzihVy7Yr7QZM6Wltcgf+oettY5FRHdfL5I5IztHH0unq2ljkWwzoSp//jqN/nvu/Rj3HHWxx+ue5RznHHfGOl303CbV2HFNDMJPifvMI0a/m3osv/vFPe+10AKu/lUgwm+iIYsMekLXNSuu0Ln7GsYVqo1zyJXS30RPAmA3vSqivW+q/exv46jdKVurzk0r5erfRHsTocASW8FXBYcTdFFuVZvcIuw6MrqXJHWHMLFP5mamm6fbrDL93HQ6SGSRNMpa4Iez8WvkiP22OigtRs8XpxOff/+bwwUl9bXERsMQ9luDBuAJqWtVs6ZFwISh08z4Q+ktpBv74igKwOkS5+8MgRMsotBwfm7/TqORbhVKp0MpX6o7dPwLWHxEjZVd197ge342aVaWhfava3Y63bNaqnaPUSdVa+cyMiIyOge092J4jlC9ukNHt7t2cnlFpOL3QAZi71315Ki33DSxuWc4OE/1M7gh60gyVRrOsK4TjiottcXoOoetvi/vPVyM2hM62Jb3lTZY5xrk1eiQcgr9tjR0VZ7ZffKWLLqv/ea9NC4pTSFKiZZRbDTlQfa2Y0imXHfWf6qfNM+4TXkJ3pV2uKS85rmDpm1FTdfXAJPnuSdIpO9K2FdV6HW0DH6oEHJESAZF0fWc40vUc4doVYHQdV7MgjOwKQxxPL00go3UphNb1RBPe6X8Sg27wWzRCSvHLJmJbnM6L1hCz+tviIr5oDZJlwBUnh2xTo9fa6T30kweAVUbF/RXAX4hBcQqESfQ+DkRIiEYXosfDEL3z0F7Wkn6XGYxsw+q4xAODGF2MPqLndEdI6QLs7ueoQE+cjk10LKHP8S1xdKM9XdWGW3cfS6RnmTHu/ArGDN8VR8dTEZDomlriRtmyDJ0k+s9fjZRAx2fPHkQ3N+1hY2oEXzu7h65s7jCJzqi4A/5s0sbQFeaeT5FQHLatHOxvQiClSrtmCc/YGEC2/KbT0L+G8M+5Edjy78JpiX43vXRpkOCm19wTB3NoJMmdW6FbuDU2uaNIp51OoNFkiBWM5BL9oUQiLS76M2v6p8VFPSUOYUy958++CGd36Jga6HZODz39C4ZER4GO2DNpU2v0mjuN0aVsCfCyg3jvJbvgqwDUteFXESOy3nw/5zHb0xkdO/W658QRbNngimMUlJPsBTEELBmTGcbP8svuSwb9Xog2eUQunLKF/pNrr0R2Zk3/reh/fTVCm9CnEmwY7w7sW5O+rXOstcPHOuKdqdCxid7DSyfmmAL9xbbnyjC1NmbNXZwyeiAJ4q4TbGM3ijikHhypDsFxfEIXRVT2uCpVpAoNuBvCEQRcmkrogSzZkGYs8AvKfJM7nQVDLLsvhxItY9AqGAqL2ZGgqv2xjAWPfzU6El3/mTV9JfqP5qMj0Nkza2hzV3p50/artSOdozlt/WBzzTS5Ch3S3FGi8wX6XzwX/ujNEaXJ51NEFCvuKA50Hk6uwRb1fsJW9W4X4LfGVGDf3h/lQbIVPiV16T1CiFKNyOjShdk1jZeh81VljjRJxS8D51bOweSOWOAy+rUZfvuCj8ktrElGR6JrH+OOmNYrXCYyAh2fPd/mrnzuHvoN2qaGbwGOLXfn0yZfoWO0DNXoDhZ3rLijyZ1fc8cs1HIgCQJxAxk7BdF3HVTHEhLXIUN+ONe28KP+AhyPEKJYIfK5rGDSrfYtdHodfcngz1hTsHguJncEV6Mvz/CLHTxMthFh6CrRoy/QNeuiz0dYoBPwxgdpjHOXnG1qis93Nmzp2iDSiQoda+5YdKcX3LHijrvWeNkyiFZ9OKPbzaLoGcnBEtej21JNfdfPr4Yj6CMQzLVwhFQue6wA5JsjRbp07SZsb9F/Cp3DqNemMww3uvYmdwSzj748S7+VCePadHQkevQ76HpL9OgLdMRz7wEB7zgPW+fDI+GAz10XRDpZoWOcu8KvT0ae+idgc/C4w2oWX6hsGSpEEUW6f6dakXa/Rs5DJLqVr8vej7t8DxCF0XTb8DjcQYDnG666AL5SeF4sKg6egc4Jp6JWrlFxyUjoggzVFbcU1ow1fToLmEuDhB0gdJgAPAfAREEEuuhRF+g6S/ToC3RE1xUHo+iqde6JhDPNoBZ5e7PL5+6pSG+bJluhpyEsTuH+qNm1QT5Hgf7RlZFlup+IFAMFRYIBkP3B7aXPA9ukssShxS5fU9eRPQs8ohun7srAfJ9mdUgpXHiPkL5HCKtVkx5KR+dEvWUJrabQw54bu55bDr80zjO5JyfqJVjmEzrOC4SKCVsLDK0k+s+iKtD1N
3117r/96sRmEFHizsdV0wgYCXRsdZumsf+9XTzeLcvG9V2dpXdnaLQUaIjVun6HFNlCMGv1B2qQIKFSvmMUxHdTWmfa+RqU/Gpr4ddCHWdZvcywPc9Si51fsP2z6hTG9MxJzb4CDvwCOuU9XuADHikc/2D3LmV4mW+JU7jJHciH9N76GgxmDDguUQgLi6iIXH6b1F9OQohcbwZdMyKgy76xu68d9W5ubZ7OJ8GZd3B2uZBT+aBSA9S6Pb6Gs6tD0r035wM9cNh/9xPoGNO3CAM42KKAyGsUr5WdjEw3XXqfZns3ZJ2VVXW3XLJTx2famjIgFdAIY8nqaPKlXzRn87xiNKoI4TaK+PYeDe206h6trRpP7SGyJ2n7TrLv+6EkOG53Cf+GPmVi+jHxemd4k7/i1qruLjfvBqBkLixq3evvT/Q9D4dU4O9qq7dTYo7/YF5ivTx5qEEEQki3cc3r4r56gBcik52xZnpPfC3d/En+Mi7hEdCSYtDYVvKV+oqxV1BJbrXK/mCBRzb3VtWHpadanV+Xi6IIWf1Tuo7qkSlWiG6R5TEMNYvtqq1ZvcIBek0atVWEZek678Lnc9k/Gq0/iZ3fjcfqxAY434OwJcLOi48++X3xem1Zo2O2X/UeOma/o44BKa4M6NlgDDTpk/ZXLodIp5fe0jm7eOd9QOJReFBkW4OLHxRH1IV/f5TVjH9NTh4Lr2H8hwFOi5DD4aRRIlO0+lWqZDP56vVzr8VSpaVEr4q2CpV0WCOhD0sh+1sZWqr1TmoUq2eHtX9JoJ7BNB+sXR6hDqjVSpa/8feGf22bV1h/DpunbVYCu4tl9KKbYO2IkGGPTjQYsxYljaGuyURC1SSKJG014e8C64s+12yoBc/uN6DPaN/6yy56WeppMijS5DnEPwBcYSAFBG/fDzf/c45UHNZjjtI2St2FQEr75A7IClyz6K+FtEhrp6ns/WIU4kuvkDXisDnjAT9b7vS96A/VOuzFyKaizjHH4JyJ+fD0/Etp8OzKRZtLtE/2b1ffh/fF3Ts7LxfpjuXC1vRf3i/bO3//GEUKufoQQdvv1TxaEqJDhGcg09/jbrs9kfM18Q8aXbVgsDH3EB/xMIFs494orhNa/SAd/qFdMVLtxA1wOoZNH9r/BK5p+LABqtcnPSZMpuKQuV3wkt02S1rQL9604gAhjvWgfb7s71cs78i6Q9HzuKZfOjQku+nszL9g6L/cG+uzHt49s5ktup8dPdFo8kNzPbIRBy60EklOl0p4xU2RhuTm+fzS+lKS3gEfgJ5GXf6sDa6GS0k5E4UdJfwH+GailNa7I4W/ok40Tta5G9lIbDxTfwC1JAB71EM+mfHzuLrAO5e+oojXPr+fsDdWRwfU6/vXF1d1SHm8YY7NrPQT9FLqDyrKlY0g7wicZrwaFcxstzbhDHubFNxSm99Jtl0f8yHPyERlxROubj/vJSXiANIxK3FfiMSGO5JGfSnF87SqJqou/v9YcP5RdL9vzHzXcOoT5b1/N1rlYwnpR4b80QrViAOZo5XVRTahwQNZRQlaNFvpkPvoaPy4BNOprtkw/03ikrl95xMd8GG+6ebCpg3rgEk3Al6fjKGtuIQPZyTXVx7+S30PHoBS8wBOkDTGr0XvYTGX75QzOjmZv8Smr+bjML+QY3FGHfEFopvusufEcd669qLIs6Io09/DZ/FPqDo+S/Hvw77Ueb8yMFzLr/D0NcFxz2e68Yy7xbnvpK3qJYQeGorZrQPc9IWq5tCltuuZD5YxquwGONubl7oh2JNd6Et6Eyb0f/+UqzhvqEM2acb7hQ9dy6m4V9xtFDMO5fbaEAnOe7XeGZixx3YWLpWIjkSB3R6ia6urbIOueuW16lmPPq1Z9GjAHSyiBdsiDXdhRruQNucTPcfhbag0wx3uuc+/D4etKAv6jnWq4YU+YP++fHixZfb25cO0XGHnhPHxIEvylxcMSJxwPZy6qCq+lQNDZ9053eqWhlhuYf0gwXcfJAr6CyQPwFWfsJdaNL9uUjDnTTzle65w3BPoufn9xvQgTMaYqLcyqHul3ErUkOYQM/BvlaAfy5ONE8UO7Sbz9CyVELuem7b+27TUuujW4HBewuq+3wwmLmj+Y+X4W+4W4oA1/Ey3+4m1XNOhvtDrYzRe6kY7kdnF1DoeEVfiMMDouNeD9Xzt68VgUppuhPgPSUu3UzXYUeBbCa54/w66LYqal2aRrvW0LMmJhUHLP5r1+QvWZO/Gb14I2XAl2+iEnGnCeUcE1/DmS1ZXZJ09KxF4UwI/Wr0qTKl6V60njVQDfIZQtpJwcyHbR947aql1kA3fYPGbyQBBKbi+PeuyT9Al9+7VsgDdLDxdSMUrFNbzQA7WSLZPTvqR/SsAarjfjMK39K+p4D4pHvZs0bH7uUy4UQTQ+7xY3H8dcp0u+0b6WfrIG9cZcLmp9KO0eUfoLNcpPpc9AG6Aa/fNaK4ODuJbUPvH52PR44T45+P5980QM8a1XGPsdvBm1eKgEnSveSJpRiiO7kMFbc90+EpIXLqdZq2olDrEv0Jv6buY+O1RGIqTmn98a/ZKjr/DnStjPj8j0y3tBS/Ax38c0UsbrQbJenYmDo+XiXn+KbhdPCh4D8ax94yWS3n1yN8AX1zajlepoAn6KCVQySOFnK3k9v2wa2mV7RKhFXr+AZGBCwCeak4oLcecTpGF9yBTsdi340uvwOdvnJtWdKnAxTXi2vT5jtWsN18FXcr1I/66Flb33Gv38ASWDsSB3QxjtHLAh3SmseSEFrInTBs7jDw3HbN1ioGu+n6xkaEe5A/TTNR2Xj4GStFL34gDlicgnH/WK3oO5wCcb96oNLCevXvOCE+Oxn051KM3Sr9/mB6dootqEkkfe68o2dtTcd953q04sT+G0TiCnyMXhbo9FVjZCeaSIuenycc/wdet9OqVmwVjlVtdXqBkRGBdyGRqTigH7CMuvPXc3ogjvkm1R9fSgnEfbKp0kPvx+iwM7oYD8+nM1W/Y3AyPR+O52ruNJIzu/pieD6I7lmDoF/VI4rzSUR1jilxdLBItURuxB10so/E0UPu9M0yQeD13E671azVqhX7JyrVWrPtdv10xLN9wICuVmZsMou6Fz/gDqr8o+4MV7J8pNLkqzexQuw0Rhe749PhjNPT8e7x6O5fyTiN4/FpI8GNk8nNTn1By+tX/5vEOQL/wpS4MhjHf0gc2xWqATQ3g5A7cRF5EPi+793S63me7wdG59VsxrgDz1agEFH34gfcQe0PIqLuO4z0PJ2AO7C+TiTFc34utddldquT8LrRZDK5vr65ub6+/TBKYgjsKVDOl5E8xd0AXfEzjcRBC81D7hnTWXp+cMAAv6ZM+UiCoj8ukp6D3zJS9D8/l9+wRkd/9ZYg6EZyTnodmD/v7k8SPwBj3OloYtS95FlFscXqpiF0OYTc24f5BMrxe2NBSxVf0bnV51rRETDVffuF5PrcYLgMTxz8TMSegVNUKrrwmTJAtw8z75wiLHnrKpBvxrzNa4w7/XVKynJ07npOb0AXvRydVX2+pejQT9HFgRP0DBS95OmGAoU7RHe1yiHkjnh+RvQqqYcJcxjSF47+mJWiM9dzS6miKvp3LzhuZEF9vqUVHfopukj2lMpE0Uue1RRnKp75fpA8Qu7eQZYErVwfb55gkOy6y9dzsa77ziPuel6W6OYFutKloktPxAE38+GjrvnrAmz7bHCtnCN59DYACpqzoss/PxebjCvw+Tmw9hviebenDKmWWfdkPLUVb9pZTzaxe2YH9DmEzL2qWnuMu9deCzcgeBgFrtEfy9dzSYq+/Vx+vp2Ixrg4kWBInAFal4ouekYcqJk3Z9Oo+Cm0Wf+fvfPQchtH1vDPoCzroPMtkuogHR4rtPr2A2xydtuTZxSotP1m+6oLqI+ztS2BBAjM8JvonPmxqn4UploT7uMUwYMpSAJEK/mUgf0bZszcJ3MINcRXRp5HN+rC1BKUQa9t9/mPL5Ge62Jn3A70QTCbYKErEicRcmdGhNynKb71VaT2l2XOkAUEr2rgXvf/s3A/nATRpUk74/5l3n64mg+FPHtnecP9jiE9FPSLm1psb7gLEr2ROEzSH8rSegz8PgnkD9LLCzeRX70jh2uW0W3d327/Xvc3/zKtPq96UMqrH60W+vsXyATWszIaV+x8zSzgtQjUnnyfmhByX4Tf/Ah0bH6Zyr9TScIqTZOMbth9qS5UElx0DTL63405riZoVl2oxbmzPBGXDcTi9IP0YqWMxVeoTgHNIXf9V50tojRDimWoekHAFPKYfCC9dWrUcTUHamHnBhn9j/80TVon40A1z9/bn4jLAgoHRdvdtlvQJfyU5XyYZRByJ2E7PSzjVAn7RPl7VoIM8Y2JxjWr3tGZOXE4gnLaxkTjuhdRpWnM9Wolgnpe/2Stz394iQxhvdHt921WMLyGFcykI3GA7SF3CZ+zubqQgcR71iJAhrjVJ0b4XJRldHhq4fjc/kF695yBlestG64/L5ruP70lZAlFthXpxQBdvuJMbyuKsgi5z/LzOeK1nkVuSYo2hjxO2YC2+4dbrw+OTWi3H7vQQ2BE2/0yhsCvmbBNpuJCC+zFe1sb7s+QMUGRjZMZoNs/RF8EijN4Sd4h90WU7mVic0pcdyoufdu9lXe7/eNj3M2/7X56yKALal/l324P8YBbabRyP33OoIvXPxYN9+2T9IKbPmyBzTVG4pBFyD3QE3JPQnxLtJTvYehMxcnj5px2r5cZPsAOTnJOtx9AJ2HOaferNsMHqFTPtTxvVj3og91ZmnBXAcXDQulfcNtnsIbZvYZ7QawLua9nQYrCOf18O8wjFbeBSjkW6V8dOib3OMci/fTIgV5Y+yrXNBw+x6s2W/ml4coOdPLcxvUydw7UwHqF0j9nEMAe5DLjM9XtgHUs/x1Oz2rCUp8JmEIeYnmk4j61W3Mrzx1sMKBIPzs+gHZIFOm5l+cfKNVyO3zuQTOv7Lt27d1zKILoulccSv/A7TCERYRLXZE48W1l0AKYqC/P5zEo1btE+rzaTP5bSQ3lM0n/7mOc3KPTfKbnDvKA2lf5Ts83SEzS9U7Pi7NrYoCuELrOskq/GY1Gw+Fgy
311BmNbCv+hxGsQmaIPg8gwx4h90V+IffVNMB3oWSfnyKm5R68MVTglOvaw+21LY9xdqC/73567CIvwvOO9otTL9u05dVOf99dhNv1Q86dbQN0gkqIgt7g5ja1ym9Gg34vjsKAEYgxFoRxbzC8KQ6sGXWF6kR5ez/BFmiuvDzPZHo/0XMP3hQqIPIqDe3d9m04hye6u+0EQl5QpLnvfnUeYBtOuaY5DOcDhBx49msxQP8KFvdHKVrV/z8a9ntR8NWfJSKCE/dtcfoohmXEa12ROEzTT6DFHFsly0mALdBUYpGe6lTcnKAGUZzpWyVT8fC/0Np3Pzl0kCtE7Ut9Su9chI9EKupPWrp0Lto0efHyvbUn0FUO0wdyTr8ZDnohw1ZYPBgVPleAzDGwmfq1dJNcQu7LaQjKJG2QaDpOuAygCqdUa+rSOUFggtJPDl3kT9C+fKo/274Fr1LXpPMds+1FMO7dC2iCWMidfrPnyHzQi5xHOy3RYHRb+NyAK1TXMaSgLELusTqhr2ZRVjfTrSdIB+2aiouhDsZzzup1XvUJj0FEng6lnxy5EJivdF06FzCv0njSUq9zFztR7Jd5/xLaIBJO37VFfstL834vBBF2IP2m2cLn0qJKn/cKsgi5B+Nkpag6jyizFTzLUNevygQC/VW6Pp1/gB0cnVqnc3koUN1471zEtHumQjTe9etcK+ztT3YE3F9BNxREXOq8Ur/dqnLu8s3Q3MEemHxn661dPpcfok/SrJlNfb6aWDRdZHwW/X49nzyiYIrXCocS8t/cDGphfrWhbm27aLbvDnOPTtRF4USz3SRIrdKvzqO9yjSvXFeUeG+1GtWSgx0prmn58TUhB4hYGPf6A3Hy7EYI/AGRZOcmH4owe0D7/x7vj4rzavleoboMle+wuU8e+V0QzzJ0+nqZjINM76Vbj7XtB5gzKIbx6kzFuXSposw9PDlTc1DtwIF5UHzRUdJrvzwPQdgLcsu1RquVuc6f1Ku+AxAM4PrOBp8z5AdBnDyLe73+Az3O5lQaQDK/iJRxkV74HDSTj8RpDrl/gIAgns5XWUh9mUxCkmgvSDQYlKTiQqiGNo/yjIvzhniKE7ajsfN+dnJ0wGAmFJ5nXqZ3LtoBZHD8SrZlekv02j2CMTy7M97nbx0YAhHAaPPfNLC+ieG4QQh5bBqir2LoDblvgcDC8Syd1NfC5gqO60/1Ldlfx9ABiUd5djbfPMVJ+v3i8Pg0y+L80IXJsPjiqpttcS4NeeVqRgE5YfN6xXewB8Vx9J+Ez23H/En6TT+AtUTL9R4kDJKkCrlvl/o0Wa7WUjKfxiFJzCVURs9lU3EacDJyurA5QyqIHWTkdGFzgtkQELQzcbqwecSQDscr19I7Xdi8WnJBMAsy3OiG+1y+SDfM5wz2QlG8ByEkofFkV8YBdoQeEpjc6vPlev3v+x1dPk+m+yU4gvFkd8YM6QknuxFpbLC5foWPUdN12su+AyKkhRzh9LN0nXZ5m+snTOv0p52NzSmTWEW5Wm9KS50P4hu1Smnvn/uiRv/p7TVUUxTpt6MerIZgOQSAhdF4wr2+WK3Wa56r427f6P3h3/f8w+v1arXgKh/HIZP6URcQnM2zXLLRXil5DJlBzD08OjmVk/kpn5u7BIJFBPH5ZUdO6t2ri3bIQJm92zluqVJrNFut1t4y56V52XdhKIRnd8X8XD/OV0V6EYcrINpkMKOYm306myXJfD5f8H+SJJnNppPxpzRmgTQEcv1ylXdd97nofCNzB5lDzoGQ+tl+Mj8+OnQZCPZBYft8z0q927m8aEcBssfxuNRFpb6T1cVnazY2MmeQoEjG6fB5UaTfDAIUmNp3IEaflRWZUeB6JWH15iMNeN5crdcqZd9j6n7+ibm8/c6tfrZDXc5dLipzEGyFWBC1zy+vHq/Vn3avLi/O2yFTmXL2/DK3eoNrXfB9j4uyvNmoVSsl3yUL/iBe3/1UnFfTT9A3YHHcqMdQUPCXxHH9UrlSrdXrjU33dWP3h+d3o1Gv8yd4ueRpqIWJCHAPeLF+fHJyenr2hdrPOKcnJ8dC5QcOgf4kragw5sX6pRB7t/ulxrudDjc5V3kUMuiAuULr1Zr4jdDkfHB5s/np94HvOQRbcN7+aOB+OAbVFEX6IEJBwV8achzX8/wSpyzg//V9z3Mdpr12Bchx3QOuds4RR/yXf9DdfGfoz9iBEiOmtuBc0ObEURgGTP+RZDCHi933/8veHeU2qoNRAP59V+DXP/CKZDDm3i0YABGAoOx/Mzc1o+lMRrQTFCDB52srVUghyEE6OjYQdxo47kT4R4j3W96QdT++lq5kOjw+xRnuVgN4kXihV8DTL/8MGvZh/Pnu/30xv/tSV9X59/1q+2NWO5Z0HREAABxOeR1fxuVsyRfBXiXdoJ4DAByTfZlL44ZakD/kLiU9w+o5AMBhiRdZSO8qSV45KbP1s2S0kgQAAEclq3bc3eVakG842PQLW/4zcUpMAABwXPY87D7dnpJ/mKMkw2w7AKxAVLX7KZl8AizqbtxT6+0pJ5XOtmjnWRIxeQMA2Hajc2byDBQ7Xhs3NJb8xWr9lu5dnAOAv4EOnO5V0i9tJclrcuWJd5NEkrwBAGjokO+ykt43Fo+r4igx6914HjL5BADQ0EFU7WXc1nCeVs8hjNdYTM90HBDT4wBApBN5kIaOT5LJK3bjefe2EjQBPqln13STKEHLAEDdOW2Bhv7eZNM515T8wnnTj1vpaku/guCJ17wbrQJaDACa8eYyDiUa+nuT53G8fESOJc+wLDdaSu+anOk3IFlGT5l6NzoOJTEtBgDN6AwlGvrbB7rTWfLPJpHez8Q5sIhibf5d/gi5zCQqlAQATwn0Hg0dgf7ORHnuV27nBdMskIFKdLYg1DOjYxXwTDcHADR0BLp3ZNF06914Xn/TzoGJRKhibbKHmnmsAkkAcAcN3WcIdGaZ16vcxDZca0t/A5g5iFScfBfrWWZ0EqswZZoHAGjoCHRvsa2ePvPeNaWgBwCzFB+xHidaG2OyT8YYrZMkVir0o5cDCFuUZZ4yfUrzoizcpvlXFJa/3KnbhU350YbOaV5OxzOP3QFacbdxOqz0q72S89Ce3Tb32p0burD5/cAI60ZZzoXuNCKSvvJj2MTsgOTlx3sIXhLowuZ/nknytnF6ywOQRd0O47P019ouXt4Flqc0CKMbdfsLwzA4CXnw8QTI64n9n71zz24dVdY4zIB/aw5MQghYvB3mP5nbtuwKSCW3T9b2Tm66fufZgkJAZfnjkxEWYHzPtdaS0BdIG1K5XYqOEEBYrxFYbP0NJ0cb60LPtyZyisHelV/7K/3u0IN/YCfH4yPefFaKxW8YAfcO5r4KRLstsOYU7L7bOKQeViWUwxvvZkNhy+YYm66xf1nQNQ5aLL7nMmVFPTKRo6dUdfHxloUc3TKOckS7kHK9DdmvijKgqTwy6a2GIRXpLkHBP9gmbZje5fGn4gWizCPFuf8OLwrahlT/jJqvUrD8/BlAAM8k85/AtU1V7fibkDWax3HV7bLRuoX9R3woj4BWuxXh4NP07ovFuq0VwGDgTBglKH+Gtuz1cGNbt9acxh5UO91z6Pa0vlC2V2y0hEWn8cY4G8Uu4VGvmOP7Se1SwvJ3BR3W+1AdDEeO1i0rQyYuLTlJ/pIIFgPmfDrItNdBT6KB/aFo+0zeRN+2C4m73Vg+phdcetw/fI5o7HWr0SrxG9A29NIuX6flTc0ZhmG+JugutMtAtkLYPJsGryaZsGkqzu4g6KY34jhqLcSZoHtsHRt/MFrwh6D7iMXZYGDb33DBQBnKrlFa0KvrWCfdw6Xfxdq/69Dvgt68r/usmD4LQtBz5JyG6v1R0JdYd6Li1NhEOmayBHkq6B/uFvYQ9OjrIPU4n7/2d0GlcfFrRr2VFJxRgmEY5uuCvtfebNd8makeBAKu7IpLulxpKOhLvxxpXf67QweH90ay3Tv0NqhM2jRMYeAAPjTXcS8/qdCCPtjRLrfYsI/N9VsEvc9z16pb0mEeR39n8yFRe0EHc0xV9fKzOJHZghcdesvYZ7zpgrmYV22/AlAAi/Uxlfa/OfPgVg2CYRjm64JOkdLRk9khjtbkwaFDoEqbE88d+mnjeZ0c+kxUW+BcMptsGS7EYClBH+vFRyzNXxZ0gtwPw6p+iMt02CjouCSgG5GRCi9WvOrQEfwGQ0cyF2kVvwltnI/9uvL7uJzzcWkl9+CtkSzmDMO8Q9ApIpo2k899xnJQoFrbaKXPHTplCJGu0aHTkWhGaZnwGPZU0Gc+/O2Wrv5YQT9fwtCPSZBqCcH++Dg8E1Gf892GTEb56nfoI0k/XR/1RfwyQC7W+RB7yqXUdvm4c2mtlpJTj8G7dZG8AftPwjAs6K2UcjB7pdSjBKg41silEQ7df+DZGNY6F3pumwl/7tDHxksMPsSCxZRDr7W2e5Huw1Ay9rubvVVtNedKC/rc8vZEYV6/YOz3CXqr/5Kohu46zImqlKDjqGsK3sfc5m8bIDyKo7PW+S2TzYmXHfqwGOjqWuAbmSl81PKrgE3X9WJW6/7BX3H/cHuZ88+7coZhWNBrdMasrrfRT/nVGBcrSurBI+dgzTJUQYcO8fMLXdheOXaxZHMt0o5+bW2d9Lr1VW0709F37u/eurfWutDtXSbw8rosq7/qSYtblAqXfWl7Iuj10fKKkjbG9vZ9gt46ZgXJ3hpjQ5l1cVyJlGuisMog
3116IDroOy0AAG4w784Ma6TmlcCHnu+StLH19Y8YvYOPYfbYiCG+RF/Ce7Wq4wX7K99dWp7dwoAVZ5hGOY9gl79TXhBxwvy0EKPZlftPPT2ehMI5fLOocu7DJR1eBvUWBD4oRawAjI13vX+sbHfOfQa9K3PQsqr8KTh8vUmV2mqQe+krXp9KxQ6oCQGYja2fkp1Hvstgo6b2KVv476/Wx5sxiTsDHqyNzUGtfa9Q3dtt+1QhTYuC5aMbT4AudoXDpaRab8xUd1Mv//s1V3eTGzjk3yGYRjmy4LeAhx2SOEXmuhuk57EsfXlsJm67QS9utGmAH30K3FGehuE3hYUmMmhB0UPBS+D90rM3wA0DyhEKImBnA3EX9CjjrHfIuioeCDj4aU94du89+yRy4Q1hEk7hx6nx/ToybGVJZ+a5+eCDpK4/UmvdPwjFp1hGIYFPS9H+XI7NcFaGDSaaz+3hEY7B7vI189yR/8d4EwxbCW9fRicPQLYBOEAdacFfSdNQMd+j6AP0+Xq3H1cjWEtDHLEBFc7yWsaxuzwL2DU3+zXOZMvO3RPZnjSbjPWZRiGYb4q6G2QJVuPR76l6VK4HDQXtaQdnva2mnv0xzdsA2nJMM5J/UD6UYLwPfQ+GXTdUYWOoM1slhj9IOiESINOsyyinH6HoCc9j2nWeIjTJY/b20bf3Mc6mO6oP3ncLGCbG1smjYbXHTo6fQQ8uQEO+6oEwzAM82VB//ACMfmgAqqPH9mKls6AdVCBBhqeEf/coaN85PRJbnjD0cOTkp2Xp3q4UDGBmg3EFKrlJX+LoEegl1nkpIYLNR4/1XHEfKeKN5v3/rfWMJOvO/SsqQw3d75iYRiGYb76yN0TSqUEMn1k68l4If4DHTr5rjEePf7UocuO4nHyXhvQgr6WoxtFMCYq6mbPBZ2OVf1bBD3AofdpocX6TDptJVw8ResSn33M1Lj+Dw69a2ri6iqo5yDZCIZhGObrgu5eF3TCGY5W7+nRr8Wrpw4dVYrGTwLraQur6HFS8qsi/cidFvQ5FuL3CPpxqpI+EXQVySleXxR0XBxRJ/1kBy879C6pDBcjTi7/CRiGYVjQgRB0eF3Q2+dVfKF5oLqnDh3tIE144tBtefIdLNhxrwAiTwTdTar//0jQ4QVBh0nQ1TNBT/LxVtkxk8W+7tCfCzpWZkH/qzAMww4djVdd94/csc6GtHjsGJLNmxy6OXvkjjGEtqTXHDqtSz/eoeN+BEf/ZC6m7QwcsXTHnwRN+msOXfU58fQeCIZhmPfDDl2ROqEiOnQElHGhp1LHw9GfOnRcO7Tgj5gnDn3JTxwekBvb8Crp0BGMNfPVn+7QcYoxiFhJ4Zi7P2Jh/EnQ0POYyea+5tCxV57c5YCjYRiGeTfs0Oe3oeh31QeUNtaF1C7Y7DOHjo17cQbt0GWnA+cd4c0T93ru0DH2QsaioMPiQnD6Bzl0HE8ac6Lpd9WpI9oAxv8PcjHWx3y5E3aCXsxTh4548sCAsJtP7XxwCwiGYd4Hww79rqitOoHIcEGHPgPXEFjCQ1zk7nPdkXLdOiWNhENHAnEsmdR7vUjL8QW95w6dbtmknQBJl9u12xZ+jkPHAXoQiG/kwTJlFc9AhQcT90uziA2+4tBxKNWPSS3zisv2azezl4JhmHfBsEPHGnj893jeOwq6NEA9Ekf58TtdAA2nXlqt8olDx8sbUeM9Y1xwoETp5RWHPsYu+1gUdPAV5+SnOHSscSkO9r9kj/obholBzOTpF3j6PkHAacRMnjt0uldrmvdY2PwQfRAMw7wHhh36eApc3h4xK9zQPjh0l4OB801rYB9O0atbE76vU+PFKfyuO5SgaIdObafrVt0u2I4/hv55RH0bS19z6Dp9tiwxdhJ02FQO9fX7Hfq8FCl+E2Xty2Un6PZxJWA72ue+DI3mLZqef9xX1zaBVib05ZlDx0P2GvbKZUzFdqG//+fXGIZh2KGPv8rZUnAOv1fFOvfP5BzdIuEmPmvciScq/KVEvzURYGq8BquVktqGjFbtzKHjdWzRhV7HF6b9ZSr1HZXt1KEjvp3FokMPHzgl7mc4dFyKbKTgncetDFhn/O287haplDS+t82wY7ZbDnbLJOBi5sMfJr5Et2XSnzt07Dj2yg29ygYTgblhGOYtMOzQ0UVvNPyv2aHDreXWco/hH1ACq9ufKf7ZQDboMjdqirGneg+E5w4dZLwQtOIVahuC8vuKQ0fDSMVG2GlUCz/HoYOrFwTThHXQomPyeoypbDmNekp23TIZMZNlHZeA8x3SQjv0+Y4Ygx1rfhwGBjMMw7wDduiocDR5QW9I0TXhe2dh1fGDiizuxKEjS6cV3c4qgrzs0MFmKowW9I/wQxw6/vItDdYBX8l5CxIfxyANczb+fYRDrDt36PjQnb7lvsHEgv5GGIZhh06dBtomh+4vJHdxJTUfY00/XwsQDh2Bdd/iZDWPutXac4eOgCtnsRFwhtBl/hiHLoBYerVdHSFDO88V7NWa2vKfqVydO3SQvj7LlHCXcd3AMMx7YNih06Kb+lhHnWiEA/rJ66yFJhLRycKJQ0eAWArUoM9UucV87tBn1GlshJ3nzObHOPRxPz6SY9vXIfU1e/KnWTAbTx13taRDR6QrdKb2D/GrEwzDvBGGHTrAEuuob92EqY72aS/Kh5e0weVZ7gM+0g95Ly9YRjl07JUOZb7l+CazsqnNt0v/7tDxrn2MrRh7F3QZaYP+bQ4d2U1Jsu4g6KDcPls1rnAXV5+PmYzrNDnKlzmT/tyh43zWucnkFBZ+Pk2JGMswDMM8w9WNyaHXK21y6O12KS2jabW9fsqmFmFXR7uY6/gh370+yFQcNmQFO9zRhCG4pmBgMPb1CqmcACbkNuzBN1PpsMyo3Smdtj4HejZmrrEfx9j40L3YNimTbxL0bdCToG89mBx6vVEsPcsth0U4qs7iUx2WQdHKoczFUdNbie4wyEGfWw4Gxg4eBB3Phx8y7PVU6G9lLS7iFRiGYRhtN7RA1GpvTC+R2xurEiPS+thT6tsRncuhjlqsD7Ffq8TgVimOqNXHe/kCszIvNtyLvNVjmb53cBEEAGpxgWoTz2ftKaUYrkOGXUvSUi0j2oWYUuq3WGXu0/QpUDElXJT8aeRx0PDogcJLmAQ9z7K5z7I3SsA95/t86HsqbvOmZgMut0ymbVbxhtQfQwz2PuuAUwRnY/Jha9NbLWaUDSnhwoFhGIZ5N0pqLeF5DamlVALOasG1ggIhDuIr1C0UDhGvdUudFmLZyy0SsUANFcSbwNvB4RK8FLxPFDXfcJs2oBpQQsh7JjGVxPi3crrPdPKxX0SRwsj/MP/HXl1bWQxDARR0CQpNqToyY/9VLDPvZ5g5SpUI3v0BANle9spPlu3hkgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAMZMUHIQEAzk05Ts/muzVPMQEAzk1c1neWOgEABB0AEHQA2EYWQr4PIWSCDgD7lhexabu+H4ZxnPZgHIa+79omFrmgA8At+3as2yYQx3EcN85OpsqQjtm68Ah9BSQAY6/Z+YtD6gDwHnYkcwAQg9ukddr28SpSqerUJsARO/594AYvXr/6nWwBZNWw54uEp5mu53nxKM91PUvLqqrKR2nPp/2GFufJwrHNSxlBHw4AAMBMNSwn4bd5sa2bMI5d1/OJ+Z7rxlHY1LtCz8qqat/Hp+p4yrI9f/DEsQ1VRtCHAAAAoBjzhGf5tgldnxERo7+1n/w4bHa/oz4wnsxNFUHvCQAAQLmyl1zfNaHL6B985rtBXdyKaPrSNhQEvTsAAADFdHhWNJFPjP6HEflhnWfDJ73kC0tF0LsBAABQzQXP69AjRk/FvGCrlwKSvuySdAQdAABAtZZp3sTkM3oGRiyqRSS9fHbSEXQAAADFbHPuUidxnYtJuiK9qNnlUQUdAADgyuFtzhl1FAtZ6dwxZljoTwQAAKDaiV7H1Eu0zapycImtSi/oeBY6AADAzFiku5BRP8wLCiH37qaMhQ4wrotPJ+XzG+lAyZMPZ9NzTdPujhdMpfEoVqI3HvXHPta6gKJzW8FCBxjV/Zevp+TthXR4JmdTTbvbbzar9Xq9Ol5wMx2xWXO+i2gYLBDy4zjnCgsdYNygn1LRH75dHFzMz7X95mb1GsDmbLzr9mVWuzSYeJsKKHpiyljoAOO5/346Rf/xcH1YQX8/1fab1XrVvq8A7CfSOGQr0QOfBuQ1Qq7dLQVBBxg16KdS9IfrQwr6ZKrtX9cyhztpHBOLFxENirEgr8rh2Qr+h94XyD+Fe/eLnbPGbiQIAuhiPqExdrqMxiuYtZl1Ao05si9g5miZmUHMcKvtrimNqqX2gntGnifV79o15v/96n7GUQ5OU+k2FDoavR36PEBCHwGbc5m3Fpeb9Bxu+tHbVXve9piVZ899INTNhc4Y0v0rGo1Fq8RdEvHE3xC/UyUajyKxaMwhCaSQdFqMJANkgVyVPFCQFF0Oi4eS3cNd5Ajok1yThK+Fw+Fb4VvAjMs40g+MIUOCXg+E/qMt+jwwQrfOX37A9uM3cSejsyv06FXE9pz5BX+Mfq+bC90MpvSrXuWqycvy1EjIUbWuszoqnUrdMXoGjJ7NgM+zis1R5wcgcwBlTm2OOu9DnwO3EPS5GKB/vF9xurnQweif2qLPAyL0FtU582CkKbUSevxqzvaF5bfBNDoXOhe6JC6Pg0xvBPwNGseDn4vRhHpUHKx0mukpMU6k642eR6XnwegFUudE6Ue74HN5MNBdo99ylD4jpproitLH+kHnYsyFDo3e2qDPgyD0cwY6Z/hNXFfo8es52yeWXwXS6FzoXOigcw
311QM7cocRgOROhpdu3h3C10a/fidu2NzdeOOOpcHnH5EEh2MDmChywNKdwqd+hyE3u9VoYPRt7dOm82tTToNbK0bsB0UoVsXv5xcGAxfoVvT2Of+EPGl0UNdXOiMWaGDz6Ogc3m0u3a91DWRHlev0huW7hkxstBriZ5Xt+400OnW/YheoZNLdLQ56rym9H40+pib6MZCB4TQN+nBD7r/TpNtOco5ZvCjy3pAhD7yweBhO8NCt6Ye+enz+fnlZ8+D99adC50LnQZ6nMS5QgXm70aPKkZP4tIdja5P9Hw+5yZ6sQop9PqdO71ER6NTpTcWOt6heyf0VmQd/wuI0C9wnvObOCNTTT16G7F9ZeWpL38G1uJCZwwKndyeu6g+r4DOxf9wdE5Ho0fjDdfoSQf1XRxeomOi65fuNNHpzv2IJnqd0RFUer+rdAfPVu6bLU0QhG6Z3Z4z/CZu8uGzVdtf5v0x+iQXOmNS6HE0unp5/pu9c4ut6rz2PSTkfQVImrmWX336kpdIRQoS6FCdB79bWldfjss5OxSkSljYEkJcuh+6pQioXG0pO5VDLraprxIP+2nTkKbQbhETCjghTmNq053m3u73xz2H57Dnf63hMdf8/DHX/AjfmAvn7LCWoTkPP//G+H/j22R5RPLoRU8z1On9YpAuFZ2Brig6EP0///ga9NxDkmMqjnlOFbXcf8ShOEjFQSiOcU4Ptty9oevlhqHvfMm327/fmbhC5uLZP3V2OOMaGT3dm8UW2G5v6NsvD3TAOfMccR4hnblO1SzqBH+uZkdHolOhoUeKDoa+KGLucogOhg45dxmKg567uaF7oDswQw92XrHaI+PLj9CLjZnTwx2ouSz2uveVvKH72nbLvanf3kpzBjjXJtUR6fQQzulBRceeu6LoTHQeorOiy6C77LkjzyNBPyxScYRzSMX5GXq6Gssd6C9e8cTzQLer6sTcyHAHajSTqHsnx+hdA98zoHtDh3w7+DmouSjuw3PFg3TsuuMYHZLuqOh4cg1z7lFFOBexODiJrg3RxTn0A36G/vi03Hd+33nu661dmQ/QF06k4vG5UfUKlnMjqe5ee9zH6N1PGNCDJwbo6OfcYWea39KQLqJxjHNsuuMU/X1uugtFv8EzdBmKQ55jyz0aorccXANH5xk6K7rrhu4NHfJw33ueeaA/lXHbMd0A/fjpBT04d2Zq9nSaHwqyGaN3eUN/lFUodXVXqrVavV5v1Ou1WrVaKXcVC99noDfxvKnNfotet6IXPTHS6YWOHn4XLRcHik4F2+KogOhhCaJv5OLkbhncFSfOrRHRo3p8Uu7e0H0ezmfiLCuoTc6nwPn85YnpXhXopyenJxfSIH0uk/0ynYJNkAD0YGf6MhbfYkIFMYlTvCm5glK5Wmv0D1BUAGtwoL9Rq5a7tvUfOtj67+XKDF3Mz9HO6cVP+AKmwygd5uhbER0UnZfLaDl3jMUp21/F9Sxo6ErP/XEOxY3xr0y/vzuGvsvyvJovP0LvTtFwP3E6xPlvEoB+ZnJ6mpA+6n7TPStD3/2cQe3ds/upwOCPbfSpBdvyKuqbUi3JLXZX6/1NKBdYb9TKJROoB6VKrb71X77R5YqhhyAGngPOid4s52FtQB09HR1dEv0qrnQHQ4dtcZBz/yMH3XGILlJxOESXu2Vw+euBmOgH3Ae6htuxC6cu0j8zw/nFUxfcMfQff//3yfgafybjhHvvmeE2dWZhkjCcbOjh70/PzPI71Bqhd7qXdLc39GDP/zKqF57f+2z61GICZWvx22rqm/pLbfvs3dU+hLkO9XqlFKTs3XfXBwaHtO9UcQTocBML85xpHps5Ix1673HfHXNxMdCVnjsoOuOcc+5o6FLQmehwP8sPwdBfphculqEHDf1xBXq4uP3Dn90+dt6e6CrPzx/bf96ZGXrgB+i25ffEVd6Za6fn873TBOFkQ4/e8ZupdpJ+IpOkezV/Q3927/MvmDH9+T2FlGBsJAA2Pocf6G9rtPmTipWGTnNRA/WudNfrJ37PmiuGvgF09PMNFZfVQnRw9HZNdyq4c03JuSsn0UUqDg2dSx5El0B3f4aOev6nO3dv39t/9GJWE/Oj+5cQ6PkaesE33H0m7hGslDmerNTnFjZPjycbOlXYd59t8/3OurxexsLQgx1PPbvnuR8YWXpKonfrYERUF/vUd9WTJ8kp5Nw8C1jSfr6Av7kDM/RrW/GcYQ5Eh8JZOifjYAksJN1R0fFadOa5yLlTLI4MPaoY54x0DMXB8lccogtDJ6K7b+ianv/87kcf9967d99e0hU9v397331nDH2nb7g/CXWlkOkR9MnTbdrtU8zMFIYeSfrC2WSiZ5KLq7mRcg+e3r3XgOkv7N6RpmpDOhYr6l8Oq5po5/3/17AGUhh6UeM5jgEcMHQcoDPModWuFubdcWncxmF0Ltzojvvc1ytOxS0KQ0dHb14twzzH5a/ixjVUdPcNXdfzT5Y/nboXFkn6I0X6WKTnl+cQ6PkaevCMh53PxNlVUOq/nJiIw3Wt7Q2dJX3qTHIuzs2jaxaGjlUomHj684ntF8W8FSoGusgP6vPqoKzbuVr9xRTX97XV/G4XgA5+zufPJc+Xb/15/VkGnAPR1wsMHRQdz6KLG1rggha8cY2vUGVDD6ul5/46xtzjKbo0dKI589x1Q5e8jfT8009/e71niZBuJ+mKns+enrvXUUP3gu7rmWx3xM0n2vQ8wjfZ0PF9ydbvvqJbnkMPmZ52nr5nR/sqD6YbRFe2wc6SPue265aXlXYBVMUVoDPR+fx58/D8z/DQF4F0nKMj0aWh40l0OUSPid4i6C3n1kTM/WVxJzrE3OEguvtAl3q+/P5nn31257atpCt6Pn/m46l7zhj6M/4Iut8TZ1ntBH1+BjjdztChkol+1n1Ft10sEzy1O52mP7dzR9uqJ/S+idQWIfeyLv92ebZC3eC75A30m1zxMpkY50h0xjoXROPkBliYosPBNeUOVRJ0cRI9prl+bg0NnYiuH0R33dCFnt8hPb/6WVT2ki70/F6o56c/Wul1xtALT8bOVw/0F/MT9NPI8/aGju9M7LrPuqro9kBHTU8zTf/Bs+1/6hpIp8qBztC+rVvkQQW/tUFVzXJ8SvUVHAE6CjrifBPiUdH/IZiORAekK/tflWVxIdEXdUX/Vy71SnS+bo0eAfQY6W7P0BU952JJP3LBAumg50ciPb+zgkDP2dB9xN1n4iwrKPZNHTfY09ruHDrW1NlOK3p/yRWg40m2tkRvG4sLlE66mI0bh9yLVZ26liH3AHN8Wg2UHAA6TtCpYHy+4eXM8QjpQHTCeRPR8Wp0PIqunESPDV203HG1DOx+Vba5E8/pFx5EF+fWHDd04C3q+UbxJP3gKSS6rZ6vPHjgjqH7M+i25TNx5cQz6Gd5qZuBoUMtHE8Yzc9KoNtXxcFd7k/taYf0vTaH0PtLqUx+aEujLsD43BDoXab/nfSfC9wBOgbikOdg6KDpXC0r48DQ2dH55BoYuui5t1nnzh13+gUpd9jm/nLb+9bcN3TU87+gnltKusT5hQ09f0DliqH7SJx9+UxcvVf36BHcAGNu6NMTs6MJ2fmJDIDeKDgH9KCw49k9yY335womF7zprW8ZcoeqGPLc+sBZ1bxznyPQm4+sYRpuw8pjmgPPI/bjYXRU9KtS0eVJdDyIToU455h79DDOmegy5o6hOLwRHQ6iu2/oUs+xboCkW+j5wUjPH1CtdtbQfcfd11tPZxmJWxhNzKKbAx3enHDAfeT4lPuxOCugQwU0S7c4uFZNexzcLOQeGPfbcXJvcdAOqu6MoTPPUdDRzpfZ0ZeB6ThGh6XuDHQqfVkc9txVQ4dVcVzQcseYO9+3RqWvinMY6FCanqOk30dJt9Hz1bDcMHT7jrsvn4kLKu/M68w90zutA12+e1K+e+pch2NxVaeAjvG4oz/Vd8s8u3021oMmQg+ZDKsrOs+tQRzoB+1kVi9noEPHHQNxnGpnmAPTcZAOh9E5FifvRYdlcdLQf8+GjkN0XCyDQ3ROucuD6O1XxR1wHehKuN1S0iXPT7GeM83X1tZmHDH0wGfcn4y6EmR3TqLRqyP3xOVpK0OnlXGzI/r+uUyuaCm6CfSgUD94arupOJWNYl2MUcgdG/nGVbU9swYdBgeAToUrX5nn4OQA8+XNOfoWin5N5tzlHaqYc6diQV+MDV25nwWuZwFDV1fFcc/d/Rm6nJ5rdV1Iupme32c9X6Vao7rthqEHO33H3WfibOH09mzCCXSYchsBHWrmjD6gv+z+Qnd7oEPb/JVjP91WKi6oJQtuupB7IM43NCx4PlixGPs7kYoDoLOgw4k1OLCmFBBdHEaHIbokOrbc2dBxiK4qeouhg6BvpOLopRi6SzN0Cz2/Qc+NzxY3JD38xDb0
311/Mzpj5jmVA8fumLou/xWGcvymbjKxHz7a8vNU+7w/oUTnV3oXnUV6JRX23d0O6m4Un+CKKc9rl4zC61Z7mzVN9zI9L1Lhs5XpopEHJaUdPpEHItruhY9wjnG3N/b+n6W9RLb3MHQuecOhh4Juui5twj6Y3QOHfRcwTk/11dR0s31fBPnD6kmXTB0P0K3L5+JC2p6xn10nhFpYeiJubiRTHLu9cBRoBcJyyzpZqm4SuqGtUnIHf5nZBBylz+E6K0DRwz9g2ZDZ5oTuZVCRUdDFwfXhKGLc2t8JfoibHN/rfm+Na60M3S4nGUjFee0oaOeazhf13P6FUv6fk3SFT3vZT1fW93E+aVLky4Yuh+h25fPxBX79LWvkEI3Bzoq+mhHb2hB0rgCdJxvHzxluiuu0EhNw7KBUdcT1r7Yb3irGFzy4gDQo4KIu95vB5hj0p2JruxzR0MXq2XUbe5yiP46HkTH3a+wKy7CORLdeaCjnv9OlXN+RbUh6cd0SVf0HOX84aWwJtww9Bf9CN2ufCYuwBG6PkE3BzrWpDpFH13IAOjvlF0EOjDulSOGqThNpfGPbh9y71LvjNNrYKC/b736BwbNQu4wn3c7FYeGLs6gJyJ9GRUdeu5g6HBsjZCOq+IgEweGfgOWucsb0ZVVcbDL/TDzXBq6k7vcUc/Ph3oe8vxdTc7BzhnpG5J+9GJaPZ8jPV+jYjmPqjUU96vsgO5H6L7GX8pyhH46KeJuAXSo2c5euVZ1EOjwOW67G6TiqmkjcdK68Z2GM+6BRrXcVSoWi4XwV6nUXa7W+wZw8m2Yy9er4oqhE5Ex4s7U1guH6Fun4q4y0tXVMlRg6FHpN6LDhegMdEA6lzB0h2foqOcffQx6jm7OKOezfVAs6eLCFkXPT5+Zu9NC855LPT09nTR0P0L39Uwua+LOzDwqoJt/wn5ZnHtAxwj6wVaiv4CpOIND6NXUzflGYDTj7qt2FXYErX+Trkq9fzAVheuG17Y5AHQ4spau5c6GjkF3DsXdRENnnIOhU0U4f59n6NqN6GjoXKqhQ8edke66oUs9v75Fl50qQjrUIj0o6TrSUc83cX4pxvlfe5YQ6FT5AN2P0C3LZ+IKOELX7dkS6BPznR2iF50COlR8Wcm+U0oqzkx2B7rSUnqoZjLjHqiq/w2L5dqAHMlbBe4aBYeAfgsNXdR/NffcbyHSo4Jt7tfQ0K/qq2XSzdAZ6sLQORUnY+5wIbrjhn5R6PmN+GFDFzSnZ3GxraSjnq+2tNp71nH+5pstQP9VpobuF7n7TFyWe1/bHxK3Bvr0rNrWz377q0tAh8VsrxxNnYqrpd/W1pUQcjdQ6P4yyblSQVCqNAYHShZr3N1IxQHQ47UyYOgs4RLmWER+2CxDDwn6TeK5Zujv4UF0XObOm2W2MvTwpV63Bh33w64buqLnlIb7+PdEcnw25Rza7YuIc/qFkp6s51vSnMoNQ3/aZ+J8Js56rcxc+467PdD1+1kdSsVlD3T4oCT6bvPzX/gHKzIPb03fcR/g9+pIL5arRfs17hjAzxno15om6Gjoy0mSzoaORMcLWqjg3FpY7WbosFhGHkRvIroAumLocN+amyl31PMb/IrEnH5dbzZzQXMqlHRNz8/ORTSXOP/888+XXJihBz4TZ1k+ExeU9UXueAjdFuj6UfTsr1B1B+g44pZh9z3JWp8u6JY+5N49mOX9Z4Y74iuuGHoL0ampDhynXwLn9IiT6MxzcWxNMXRQdNlyh2XuiReivwzXp4pVce4ZutTzGwBzeiHMpZpjrTRP0qWev3p6AWnOMGecfz5jb+g+E+fLhUxcNQm1lkDHMvmxwb5qbgIdu+eS6FoqLqgbkLeWuq1dsbkX1fz29uSqOQL0my08Ty7Wd7hxLTb0m0j0qNSU+/VmQ8eWOwo6rJaRho7H0OWF6O6m3EHPb0AODlgOOEeaI84jSaeKJR30fIH0HHFOxTQnnM/MuGDoPhPnM3H2BXvi9BG6vaFPz+ofyWJXnLNAx5Z4KNNHlFSc/ocp5DUPudey29xmfulLo+BOyx0ycch08HOwdH4X4Rx77tdw+WvyDJ1KCvofxOrXNufQYZk7GnpUbs7QpZ7DMXMsJPmWOF9ZCV9C0un7nzq4tKHn2GkHOaeaXOrYOXSfifP17zuza7nXYbqt5s/tDX1azdKfnXH8wjV7oOuTa3B0PRVXNRDbYvqQeyNLX64ps/KG/pOJK6E4uAqdia1O0Jfp9/RNcWjo+gxdXoguQ3Fg6K/LGXqToktDP+CqoYOeM875l2y0P1xV5Zyf8LUWSfrBWNIv0vT8X86Qnkc0RzmPcT55297QfSbOifJ3p06d0O82Nwe68WdGz/U+UUAPEGnNRH9ht+HGNfxj2y9/q6Zf5GbZ4NADd32VQfdScdLQ14nOp9CXkeT6ZhmcoYtz6OtE1w29+SC6PkPnSjB0Lpyhu2fooOf/zHrOIAeUY5/9xp3ee0s91FfXYR4VS/rmhS0Xjt2/v2/fvl6U87+2yPkk8Tz8UP4zdJ+J83enZngMXdybYgf0sw4cRHcA6OjbmHXHVFzq8FqjuMM85I4x9Kx8uaJ1CdS74Cq5Gzqk3D9Q9spgwx2RrtyIjtetUXEoThj6dTT0RcXQgeltUu4/ESn3A06m3C9+GOn5e00b2q/LFNzDdUzfXkWYA8uhWNLvHzwVEp1eF4/uX/9sD/TaQc4n12uJr3hJPofuM3G+3M/E7ey7PNL+pjV7oOsx9+NZAP3tjDu4pe0bevegSvS9BcND6BWD9vxgV8tV6P3Zhc6LfZqHF/B3sOp5L5ZBostV7vpiGXrCFxi6WCzDNI9vZ6FCQxeb4uiRhg43ouspd+dn6FLPCeYS5RuJ9ge996JiSZdmjvUAJZ2gfv7g+md7ieY9ra12qoklvN9FN3SfifPlfiauqO6VGZ6btgU61oQK9CmHgZ6BoUuQ7vsnmYrD95uIdC3hzQaLX/vtOuDlQfWQXd3FVBxsioNUXLpl7nHHPXyJxTJihp5s6ER03dAZ50mGvmXK/YBzu9zHSM/XL0p9rzkHh0tdo3n5w9vrgN7Pkp5A8wcrD8LX5iT9VER0mqOvfxZycEDziaUluIE1pxm6z8T5TFz2i+IeKdCnJ+bVML3Dq+IyMHREGmfd9/1UT8UFCWtfa/qEXiem/oMCVl+XVdJSH+NrLYSBkhO3rd1s5rnJ9akfQMtdzcThbWuM8+ZNcfTwCF0aeprb1qgcvm1N6rl6OI1eK728Meb8sVjSAeUA8+jLg7AiSb/fKum3W3E+ERbqec6G/mOfifOZONsq6ZenzloA3eAgejZA73bQ0PX58rGEVFzdYL1aEqXrZqvc+rqt/+tIaHfriYDBsistdzy4Jvvt+vWp4YuvT6WCGTpslsH70FnQWdHbb4rDjruecgegu3bbGk7Pf8Z63lJs5oxz1vPoJNrGNHwtIvhiK83X9ZyrVdIvsKTPNMs56/lR1HN9hu4zcb6cz8QFnQK6fj3LqMNAz8DQt0baES0Vh3CUzm3y7qoq88m3s5hXUE34C6upuGruhg7n1rjYv5cTHB0OrWHIPSoU9KjA0EHR8T70xbYpdxyhw9UscB/6y9LQmee5G7qi57AFjlm+rudLm7tiSLRZ0h9INV+vlc0vUtJPsaSjnOt6nqGh+0ycr11Zkslyhm4P9Cer5S7VGINxewPd52VVjK5lK+vjdqX6yoF9JA6rmrT5pu6godMjChNxwtAjQb8Ggk5MVwwdQnFihi6ADh13vD810nM2dFjlDoZ+QBh6jkAfGxN6Drtj+BUhfe02XLkSTcNZ0qWa0xPXKkj6WJOkLwHOIz2/KHGuG7oHui+nM3FBp0Jx02oo7uRjGIoLbIAebEFSHqPLVFyxYRKJQ/zLdndzBdp74TO1kuUad7lMPqipW+nzBbocoiPSlzVDxzNrhHM09A2avyvWyhDOoeNOLfcbbOhJt6eiodNDPGeiI89VQ88N6KDnF0DPIdHOX8R2dtgSw9PwSNJBzaOviHP6tapJ+kSMc7jNJX9DL/hMnM/EWVcRjq2JJes+5Z6BoSvUPbZ1Kq7bJBKH1q2Hzky2s/ZXS3Zr3OVC2Yp6d0zeQF8vkXMXmg5+Hr2Q6DhCx82vuFgmXCsDM3S4nA
311UUnXjOSBen1oShH6aHeH5YGPpPnEq5j21Ozz/SO+14fxrjmEpKegRzxHlEcvpCTzSA5wg7SLrQcycMPXjRZ+KejLqyAyqDxTKjGtC3tVhGQ+yMA4tlHDB0ZdA9FDXdRSouSLg8rdvoGpe+wvYuOO2rGP6n1GNvFTyH71QqDgydFR2J3px1R2G/hTiXe1+vybtT0dBhUZxouItV7kx0PIaOLffD0tCpWNDpIZjnaOhSz5HlWKjnp7a8O40lnZ4tYR6+qFjSeUxOz6n96//3ktBzBwzdZ+J8Ji6D1a9Q21v9avxDgOOrXzMw9C2XqwytN933KNBVEmYGjK4b7Ii3Q3pNHREkn3+v5gz0lil6XHwrOr2g0M+R6GKEDkSnGTqP0N8HQ8dQnJyht66JC1/KDP1lNHTc/OqEoY+NjcV6Lu411/UcCyPrDzU1pxczPZJ0UnH+7LH7EdLj2bwzhv6MR53PxNlXQ72c5WzvowS6ujL+7MwTBXREnmy679UPoUvf1f9asoaqBgF6caNKuWDQf9CAXWvbkc/b0OEGVczFgaAT1cNHJtzpSbqZBa5Dlw335rtZcIT+2gbQMRQnUu6xoiPPYa8Mj9BzMXTQ8z9Fen4XYU44T6fnUtJXJcyJ5Fgs6WzjG6tgQc+dMfTgpXHPOp+Js66aSucTU48S6AsGY3f7qgcuAx0x3Zx0f64lFVcfSrzd3GDiXjFwaSukV9vtklcNvuiCocMVqlwUfIu5DiyHTBz7OVyGru2ViQ39fTR0FHRcLCNn6CjoMERHQwegwww9D6Ajz1nPP7lxQ9IcF7SznsvjZIqkM8wB51BrQtLPk6Tr0/PsN8X5TJzPxGVY1ckzw0ot2AIda25Yzd5lULUdDgM9UET6IKbisD2dukFdSV5CY6zo8Pl6d2BxZg1T7C6l4hDocc4dxuhUcXu9+f91C3COI3S4aU0foeNda3hobREb7s09d+C5vvn1MOEcDR0UPQ+gSz1nikuYRxebXyKlltteFEmP3VzQfI0eKinpoOfOGPpTPhP3RNT4lR2ZVvmdeR21dkDXQ+5Yc1kAveIy0NWu81FMxens0+lX0yN0pbQ2rdRQyjNs6pCg2raNUMm95Y45dxyji6vRYeUrE136OVy1xkR/D0Lu78tj6JuG/kdE+r/BdehRyc2vGIpDQ3ch5Q56vvzpJ+zmMgq3wnreqzbEFUlnlEua0xN9QUkfo8/i9NwVoP8fn4nzmTj7Crrf1tx5FFJx1kDXPyL7APb1Ttk9oGNhdr05F7dHgN9k4JwQci8aXLVusWgmqLf9CURtO9TyNnQYoqOhR07O/+RHzs8R6IjzJEMHnOtrZUDQ6cvmobXX0dAx5K5ctkY476yhg57/5e4nH4d6jhiXF6Eubuq5JK4q6b2rsjZgTiUkfYw+7h7QfSbuyag3OBOXwzL3k1OWQMcR+ogri+IcALqisUPhBti9ektc/nl2IXc9wabVoC7p4q+sh/KDhvqWnGfoTbk4OUhveeJaD9HdhI47XJ0qMnG/wzVxcGqNDR03uSPPMeYuTq3B6lcgOrTcQdA7CXTQ809Iz+NdcILmtJ091HMqXc8VSUeWx17eVJdQ0vH7uJJyL/hM3JNRb/04W0OHg+iiZq2BDlezdPQYeslpoCuSOhQq+nM78RC6gXDD38rAfgtl+RGbK1v0v3IFBwOupOIQ6O+Cosc4h7Xu/PALuu30Ug6hM86loOMid+y4S0OPac4Zd065K4vixGVrcGoth9vWWM/DNNwy6vmW95oTdEHPDSR9DcScYY5If0i/3lzCnxZcMHR/d6rPxGVQ9cS9b1ZAh0+cHTY47W5djYKzQMfeuCT6kR88LYRbGUhbhNyhAm1Pq1L9ZeOfVMQMv6IG9/JuuWPUPSoiNhTgfBka7ohzemCpzLtihI4Z9zgUx4a+qN21hoKesCjuMAk6LIqDza9wOUvWM3SE7oc/v3M30nNJc36iuhNJ9BEduLqkXxJ9doD5Q3piST+Ckm6fcvd3p/oax8phTxxWoTKp5NXgqnJrQ1c77qPOh9wVcNkBXRHZUNF3i8a8MpC2CLlDBUHVjOiD1YLZVlvZ8u9yLxVX+o9I0AXPm5AOao40Z56DoCsZd+Y5TtDh7lRWdOU2dEy5i2PoiqG3dtw7fdsa6rmgOX1trrVePK9mLOn0aDR/GJaQdKcMXe6JQ15oxDD/gPiX9uV5/uu/xfXr8RwycViQihNEnzP1bQXok6fVPyL7TJxrQJcujVN0SMXVDCJxkLUzPRJWGbAmOqb42s/8i86k4sDQQ6XeStFvRQ/UMuAcGu6Mc5ygw03ocq0MIF2uifsDCjoYugA6ZuJgkzuE3DET11GgK3oOXs5fuejetB7MxJlK+hoW4jx6UW1K+gW3jq0lX7XWCl+FGPobxuFbvXHoiy+/+vLrQ/gmy/JA/+LkyRP8nPxmPJ9MHNy3dnk0ccBtD/TpyyfUP8Htq1mUCmyBXuzTFH2v3r6Wf5pNyB3W0fUbEj1Qj0wMploa40wqDoEe8fwmHkYHpouifxUZvIpz5LnouOMpdDZ0zMQR0V8DnmPIXRxDh0wcCDrgPOq4dxzoqOe6meNdqHhqLXXmblPSoYjg/AWLJV3ZQgc11mmgX0ngxaGvoL59Y7wtz7/FD3y9/gH+nW++Ozk6PDI88uoXnuiPDuhfD4+MDEfPq38fzycTpw/RseZsDF2/Cx0+kM0I3XVD19g79Mr/3wntawM8J59yayT3C/rMiF4x2mkr3buqbnvPE+ig6ODohGx+AOURzrfot4uOO0bc8cwa9NyB53omLt77qofcYU+cOIbe0Rm61HOkOeTggOV81Uos6WPblnSGucS5lHRXUu6YiZMCGDJ4o0a/QhIrHeBfxu8fhg+MhyoZ/s5o+G+HXz3kgf7IJuhfDY9wDf/y1+O5ZOIwFiWXvuA+dyugs6AfH+7oWpnqDueBXlGAPvSLpzbwrPt2NfkvZd7MLtUGjYheNjmzJkb4hbL6thxn6Ex0VnSQdKA6J9/pkTSXgk48V0bov4OMO2TiYkEXmbjNUBwcQ4eUO/P8MGfiwNDzabmjnjPM6QuAHFm+Et1qTl/WbquSDlY+Rl+lpEdddn4Eyx9eCl9C0p1ouT/9VgIvvhweievb9h33v7/a/IFx+I1R/rlg+Gs/Rn9UQH/juxjo+PNWJzNxUN3yJDoC1xro0/oEfXj0ciYjdMeBLtkHir4L32E0EO8yDrlDNLLfKOvepUT9lGoU04G/kqOhg6KzpIu+e4xzGJ4z0yXP4Qy6siVOronjkDusiWvaEyda7shzejXP0NeJfiB8dejYGhIX9HyFcS5oTiCPmE4vLpR07dq2ix/+AnAM16iRpCtmTk/4j5DpPbfvwWVuTrTcC7uSePEVCDfPaBOF8ZuTI/ID9Btfj8Sm/x227n1ZFHZE6OekRPa/1IFuD1y4piyXsQH69G8WTgxrdSabu1PdB3qxT51QIx1NlsQUMBVv/NfrqptIer2Q+n+TbCkE6htreQJdJzpSHUiOLNf77b+lR2yJo0KcM9Gh4c6GjjN0GXKX16GDoW8KOi6K+9+dADroOZs5whxxziDnf3A91CWdb1Vf7WEcS0nXYE4PGToVSrobhv7SeCpeiBmt0qIfER/gb7T5O8P2QPclOyIn/pZXJg6qqvTcYchtAXR4d4c67oAFZ4Gur12vCzrqdLYPuePPA32WY/TyYNo/vq6FAwo5Aj1uuiPRUdLhn0h04eeYcAdBB0OHTJyyyF3wHEboIuRusMk9+xk66nm8Bk6gnGHOo3Oo1fClSTovnntw9zLhGP4KIOk9zUi/FD/0ir4ISc95hh5cSceL4TYcZhGn90twjx/ib4S9YV/2QD8Ud0ROHsorEwfV9fbCiN4UnzVA9IgE+rRIxEEdz2Tva/fjAPTKYHLiDQPjev8aK6gZ3LUqKwiKVdl3N8jlFeppT9kF1SFt/UyeM3QmOig6WjoW2jnm23GJe/MZdMlzHKHf2GqR+2tNp9ATR+hUiHNlhJ6xoYOe31nXc8Y4MV2YucJyfqSko56vfPTJ7BL+Lv/W0f0s6QBzJjqjPK7PNyQ9/FyioeeficMOus5hCLlDi34UPjD+txPw77+05bkv+O+aOhPXCWUJ6kkSfQ6ha27o2HDvUMa96D7QlTky6GwtORJnGHIPUv6laqnPpEtF7x5IrfOayw+WczV0Jjow/QMmOpo6qjnG4W6Cn1OJI2vYcceL1sQidxB02Pwq98T9SIzQMRMnb0PPboaOxD2/oefAcoFzCXO815yqV0o66zk18+eXxGp2lHRQc6Q5VrKkd9jQd72VwItvR0TELbE4o8Xkhkzc1ziLh96wLzugfzs8Cv2QvNbKQFXgClVRozDnbg/0idYB+tS5Yb1m3c+42wPdeAcL/AHK2S7rkLs90hvF1EOE/lLqn2aq+QH9KhAd2+4x0pHl/CDOmecwPxeCHh1CB0OHhnvEcwI6j9BFxx2uWuMCQxcddzR0iMRlBXTQ8xXS84+2GJp
311HD78UNV/lF0g64Jy+O93z8o+Pp4joQtIvbkg6NNpl9UQvlvT9UtLR0PO8ak2G3E98YxhyhxAdAH0UVdKXXfH/B3HfIz+gIwouJ2j0yDx4tCnQe88M63WuN6ub1twHuj7xrkJH3gTOkpI6J+2RPtid9ueJoVr6+Fw9t5b7VSA6rJhBpsf/5C9MdOR5rOfccE8v6MBzcQpdGjqO0H+09aI4Kgi5M9IznKGjniuB9geKmMcwh+pl4Lbo+fI/Pg1/XFiDA+Ug6ec3JR1m5g8FzulhSYdls3ml3IOXkg9F6Zk4faQrP4CqP+pPrT26glNrXyT/Z31rV2ciGVV5sgxrDoneHuj4zuTvm4Wg14PHAuiBGiGr47XiBme1bULuUEEhRLo6jdd/SKiY/Ol1dTSfl6FfRaILpCPLQc5hfL61oKOfo6DjThm5VYbXxMnFr3EkTh+h4xAdN7lzZTlDH7sY6zkWJuAkzVHNm5B+6TbjFvT87rqe312h6pFZdZR00WWPQU4PFUs6NPbzMfTClZRrYhSxliNdzMThMH5Ufh9f9qfWoB+SZyYOYnGs6NpO94np7QB9emZ+eCRB0Kcyi8S5D3RptAg13bYbBYMLX2Asb4T07oZ+hk2ZyxcbJnvtqurfND9Dp0eVdAR7U10TPIdAHD14EXqroV9XblpT9rhTyRH6hp/Lxa/Nm18PZNtyBz2/o6j5CjKdSU4gDx9Za/EQfYyj87GeR8UKf1+TdNFnZ6jz8//CL2+ypEPrPoeU+4tvJQq3UTYdQu5U/IGIPKSSkbd/k4Gg+1Nr0A/JIxMHVUtW9BPo6MlAx/n5zDzgvEMXrdUDp4EO1UiAWtV8RYweo9ND7jaLZvpLen9AqryrqTgwdFoEwzxnovMwXeBcpzn4OSTiuPAI+vtC0Jv3uCPQYZE71w/lWhl6KBNHT1MmjgU983PoUs+TD6eFD3o5Qp2uTWuJubOef0x6Dt+dJB6z6kLSuXqY6D3rKP/vHnpxgaSP5WXo8qo1Tbj1GS2G3EfjD+BiufFD350cGR458epX9jz3hY0PZzJxcHJtdDihRpHo7YGu99uhjmcq6O4Dvaq3qAuNlBiFCvAz9peelOqDRvtf68ntAUdTcWDoYYGjczauNR8nca76OSTcfwsN9/CFh9bYz/HQmrw6FRRdnEKHu1O5hKFvIp0EPRNDF3ou1FxJtAPKkeZNes7ffRX0PM7YURgewS8lHafm/8PeucS2caV73sGd7LWlpNUFvOtNgAyQAXIRDTBA9rqxnpavnSx6NQCJqgKIgUnOLIVBawL0YqKWko5jK+0X0ItZjR60JD9ajxtYsDySCPnaCaO3xNZ+N9/5n6PDf7lKxxWLVEkX+leZkor1IoPgV//vfOf71C9/lx9qFaT/giVk0lMZQ884c+L2OGd9E8BInOQecBKdnGt4Y29nb+Ng9ILnDdMI1/F5RwBl5MNLUMoWHXpgE9j+4piHTkD/yx33Gf0HPzTDoLecB6C7Z5p3462kKXHclLSRqWYtXQOJJ645xwhaY9TW756yno5Dl8UwnZ261RyvWLiSjNa41YQRuXOGubXns7E0Z4POMGeec8A9gnMjW1SmqVnuX7M9Z3MOmrsS2qMwlzViz/8QZ8/Xqawcz2DDD2vSQXGswDhwLq9WiuhxJv1Ugf5RglnlUD5xknt8DPiiGXqjhVkIluh76deJ41F0pwp3JIie0KGj4Ct2Ou0RdID17APdSeBezABzpMQ1M8md0/bcRO9KOIDfHyd3n9U0HDo0WalUqnoxWpxarEZVmTOIr9Q31RfWYmVRi0q+a5kHgPK0QnqZ2A8jP6t4/uzpk9mZ6bCWj5al5aVXH6/Lj/qKl+c3buDXkN40Nynuf/6P18+X791/+Tw8Qc091zyMcrUannOdOGvPV4w9XwhfAmXlXCb9O+3N8fKL/DQ4/+XIn6tFTDqE/DvHPPQ0ysqEZpUnT3I3ukh+a762c0kL7f8ZnbdOQ5lMt6OiG+Tn75mwu9uhm13ue9hyynPQezLnBuiOVG/2r47guXtYmuS8OYfcRO8Oz0NrjAba03LoUNXzjQItvzBVwx9+4JOylSlovqh39GQHFp8EPyAfi92AH162VKg8mi34QUi56rOnM5PVQjGb9byA5ekFJ1j9eMVXv3oetovkR+31q6JsDWvZ5MQ1Cej/+h9f/CRL5xtrzRnnYWtOo+aEc6Dc2nNR1J6b0nPsz8MmnZPjYNJfvIBJVzz/in35L3jVLFev2qIjoT4Nh/6fXTlxw2y490cTJLkHfgoFXi+S3BPkxP215RQ9Sj9KwLgU3NQm3e3QUe51rODn3Lp5twkGHV3Azg3Qu46DWvc1tytOfjZogG19Q4b5eXo5F7JtgLpSdeiFaD5opZaLUW0Kqnq5BsgvVYqRC0zUsn7uHSourUQ3eiuvImfzAfQmhtzRGkXo+blNZXdYc7wwzQ3LRVF7LuZ/QdWSWVsJj56r1WbXGZMuyXHcj/3f3jx/eO/+vaNAuzXmiuW/fAd3Lr+IP6eQewpj6JQT5zbcwW9Pct+54HmzRUMcQ8Op58Rxubh7fs4p38/f7xSkOx06qsM98HLvkNeUvqkwjecD6I5aqdeSV4lzJ7nzUcmV1Hj3hBPyGqSelBz6hCoCs5iNGWqKBXppEaPnhVxjFERSUj0vl0CrL+MGx5aiQG+qQ0fV1d//J1Dxp59jy8A5YI4l1p6jUeq/vTL2nErPhew/zP7PL/6f0u//QDXf32DW+j0E3E0SnJICuYa5sFxexZ7zNVNw6B8lnlW+N5Kwkjs1/2qyLiq55xPHQ04vJw69Ne7efLeXKCqk33U4dMH5/RJmnzuFjLj0q7inB3TgsnG0A1Mb38Os2+HQu0OPJo1SX0s6Dn1CeD4ex+5s0Y8jcE1lwle8XLrKrsXcnL9WigG61meNBjoPWmuT3vk6RPNjE9p51NyI7fnXxp6vW3tueM72/OgxAc8BOM7a8/96uCBZevfHjDPHKv8Mzr/DKiJ7juNSmIfe8lFCwx0k4fNoqNlqR3OBfiGehRAgHpJqnThSRvLiSu8melC8f8fh0DvHHuAkbvnFzvQz4lIHeuZYU/0esfPW/oYmubsH5qFujg40TFdbU3PoE3Mw6L53pMDHn/qVt4qKc5LSVtNwp/fUrvibRG/FbCYi2z1ZPp+AzxB7c74+D91WQED/rEkhd8osh0mPg3lExpSTfu58EbLnptSrGT1f4N6r4Ti+Pu6fcJwpKmftuVCcrLksLNhzzqhLw6E7c+J4Vnku35E0yf2EBeFGWO9zFPQ+13O8m+jkjl0bfiP8HyhJPOTPv7sEnWLQPcglkFc41piU+C1329T0u7KkCXSoq4HutX0ggZVu1NQ6qIu/jYbp2uW0HPrEeBU4LFWOVAXgIa+exq63BtXJSR2h92oVq4KCZ42T29E9XWW3K/hnVaA+3C19cr5aOLpMVSe4F+j/tOrcRNlMdqtiaH16aWlalqWllZLdrbQsf0uCu7zU7Ea/tqw2La8x0Jvk0CmznEy6pbn9RyznOHvYnv9eWWVQ2drzhQXKhlt/y//DnlO9OG3P12HP7RQ1tuZ6idjz1Gq5IyfOPavczWdHs9XRETekeStvGR0+6Njd3e04GB5NhkRzBjnu4KBD/uG42AOjt6F+GT3okIvh1/jzyvu7Smq34VFs5734lKPQsJLcx2+8keGO+BvRVxxV96n2wC1gy9nMiUPFz97bDxLl8AT+8e8lOv7+j+kH3NMGugPCidqQJkdvVxMcOn/kDB5MznVW3N8U0CcRePKr4KxaJutozc5PWmloFqYma9qrT41bQNdwAj3/nDqsicDj7MRMTBv02Ymah1NO6T5rR1DOVh890ZPQv1FaVYQvyyz0j6WkjAikhoqv7Bz0pazduvYFhs1XCejNGUMnpFuT/q1rqrle3tLPbLNlDdvzcLydaI5Za1zRHUXlXsGe34E1p9lpCuek8Oh5akB35sQd/NYk901Oct+pY1qYWNefLMHqW/W5Fcw7Nrf2hwbzeS+fHxza39kdfhfS8QhwsLu3tS3HQXLc1l5H+MDoFXEbssvB3rZcTw7a3jsIDUPj0cKcNy/y5JZw8u2dTbmtehxjGMDf2Nzb2dre3hcNQdh1azN0I3SQVfhG8nIjm+Eb4e9F6ei8ocKvaeXEOTLd0Ryt6X
311pwO/0M9/SB7mih+h6dS7qa4nm73RPMuIx7o9STmkOvICqenRuHFKIrXhzQK9qYV6aKeKtm3TYDnSu+QgropQmuKmOY/kSWiqeBDtUMpsvPQo3WKrKtsP6Nbcyy5IWBrpG+SkBX+nT1lBx6uCW5zGBjW27Eo+aEcvXvc7bZuhML2fOFUII7G/Q3fByONfb8wZgZNbeOHK+Qw56nMIb+UbJZ5WjOmbCXZ7Sw3Mjo1pDVdp08O3bj7giotbuzn9fDNErKfuWHdg5cRFe2dmNrf1Afpo8NxPTJgVsd6l3WCF1xR/6SdXdrMMj5cj11NEERDN3ZHrK3I2/7ODmuw5O+R7cHFWg9vI+9/PrNhG+EYhn8fajLHciN4EK4kXCNvdFd+YSBejMQ+ea8Av49j+cgpF8njpW5jGH0EymtAfRbp1oFvLUhQEcBmeTqfr9TDbS9FRe43NKIJ47+1pCNP9dZcXDo4wXDZwhE18hmoENmx2qg39HwDwO9zA4dgXTj0ENNWSAQvRpx6IXZcGcWOPSXyqqbMnGHNQK6bZ36qhAC+qcEdPC8qUCH7Aw2wjmPmcsaQbrYc7LZ1Ch1dUnTnKefkz+HPeeW5mzPrTP/xabAke5GR89TGkP/a1LDTXxOluSOMXeeLh3IQk6fy9YIH6U07CaqvdM11e85f3BnOIp0Yt1QHsFZtasIL/pag9sdfCBdEfED0fDOIG4MCujWlF/G3eRwSlakMWzHoL04ycBZMVhuhB5KKJvNfh8jo5uDPt2IfHdcMnc7z6fHtXDeIB9wPMQ5hP4Pl05bme5b95qeuFtqzgB65tI5c+hAYcNqrvQmTnLvvtZ3pfXk99eb4Us3TlfbUnHo5fKiBz4vYgKbUdUnoI9bi673LEUM+oQFuqG5WkSqY6p26DOQ4Tn1TZ0uaaA/kwUnyU4zzYXnyqEXFzTONdJXghiHfmPFCwP9tELuPIPNmPSf3xlo/1lWWeLs+ZKx5+thf/6Kkf6mk/uZm6Jy1p4bZ/6Lfgnr10hye2ohd2dO3MiOu/Crs9lqMGjtLoeGA2rxMmy2go/De0OBhStJue39MA8Z52HWsQJ13k0gOuYGvQ3h+e5+ELqicbny2rE1GHs3FODmuX1OBWr/DTbQ8rst2aq+j5GD7Tw9ydDp5SNu7HvH3EmAj34mc+Kglp6mEz3/sClN1oCo8+bQ25IPooOgDUly75Hb7etqSzLv4ao7XkCZAOc5Kw4OvTxhjPE4JrBVdeB9qmSBbgbKMbhe4MIz3FpNAx3mfIIqu0+IkBRXnoFsYfcZ8FypZoBuHHowZeu4/++nh08PRULmqo63l9fRmGW9EHHoojc1AvqnDPTPmhlyJxaySWeacw4c0dxhz5cF5uzPw+PnaJhO9WBQVO5Q23OXN//1u1/vRkfPU3Po//DnpEnuxOfEY+6ULMdOf4Qj+gZgwFYQD0R5n6w28bxDOOgkac7bYqLTDebljBuD9pJcDR3GHYcfK/pwIxhncCvgnrEcKjDfR8d+6GqBzSck1DvEcwTTz4kjtfb+cD/INVHevaYkxIFP586huwuyuC+R+NGgJ/aaV3veGXlv77/ujhfwOHvj1JWOQ58yI+PCc5UfV63H0CmwPic0F0xTgbiCpvaUbn4OFlfLiujjxWy2pBalrKyCVQ302SlsK8paqD4yQF8E0J8dhdwLTwzPZxZrooIspVx2CQZ9vbDyMfQy7NDROfWTL5ZKNinubYf+WVND7jyDTZeZefHTz8Rylka5w56/XFt7CXfOxdup7JyE22mSW5w9Z5YzzMP2HErVof+X0QSzyiGNMLdCSe5b1pNyRVg9+szWFnzccmALRI/kcCNM/dZBueiRARFdLDk9QoDnRuxyrXF3iMIMxGaHAv4EFCpA5GN36O3PsXM0LW1z8B13cmZz4kyG0210MW+SgvR5nrpDJ3U3KCUuWZI7e3nY9HYH01u7ria6HRSeb6R60nHoVc3G8QlF9KqvQT0xnzVAn0NkvVoB13U+fD0nfmKqqnBuHbrSeDY65cMAfY7eKMzoPmtzCujPrEOf1zh/Os9nqR0C6CvyC4Au6GagP399A1o9AroQPQWH/laZGQCdrTnBPGLPQWXY87U12HPQPFIejiermZA523OTAhfnzeVfAnsum08P6B+NJDHchDB3mRNGmC0sx7F7Jo/dHWPBgX7bKEJ0k0rHTKSHAIy1B3klOUXoyDwozY8QJodsd9DGH2jUHxAlvgb6no5uDRvg5eO+JbMHuivYfRnSfJD9PjqY5xw/HxndwUfkz4jeCfwZ064T51Zb393mET24L6XkGq5+uMWUgd7sQXSEuBuQ5M4R8oG+7sutx+C8z31r3Q0v485j/inUci/mKEO9oKz6OBWPM7nv1dqk/hnktEpTgnO1HWF17dAt0MMyDn02DHRvQgN9HkAXAejZGQ30SR7/CsrIiDusiVX/GFpjoN9YWbkBvS5QyP2fQ0AXfdV8oIfLzHx7jDXHGrLnoj9Ye760IDqmPJys9Bxga77Dnj+EMY+x5lh+dY6ep+DQHTlx7GchZ04cDwxT8y96g51+ZGtwlDGXH5QJWVsyUWwwPG4c8POB4fm2PsSE1ge39zZ2O2T22KYkyTGQc/vDI5SKZvEqGA0ssCG0kwNEmeaeTCPb2tnb29lRt5X3wNJgg4cTDMs9dffb0vJdtLmHvHS+Dx52Nwfh9g7g8LFnDtI1fPARPR5Y94ZkvtzGhsyP25GT40bOaE4cj5z2330QNCve3gyeXz31UddMo4CO8zSiDVn3ddeBjmeIa/293Vfa21ozdFNtV3r6ryW6HSTCN1gDbWk49EoAPk+qPqbw5TXwfKLihYCeXcRPm/6OvSRCX5uAwg49olJZGfQYoD99ogIEk9ahm4j7Ag3W2zlraqr5qm6Fvpxlh/6y8Er3Qtd5cWvKoKeQ5R4tM/Mzw5xwXrfnAmRqlAp7vkCzzyPl4cK1ZFDz3dpzzoALBdqVvnPY83TG0Dknzp3kLnw+0rEVUjj4zHng9EYg5IluNVAe2to90NPDRw82tgdDROfzadjhbX1kfn/jwNwIprExCJH+Fhnu9jZxcTk2EArvKFoP5YdGZc+9PNn+YHBrQ833PqrjMtyxAZby08pOLucr6u/InnL3VqMHm/sB3Qcdw6MNW9s5eprZVpPePbCfPiI+4/bGsD27+oLkwYU8/WaqOXEOtffdRvPThivbFJ73g+fn06EnzxDvfd/zIDbu9vLXBq729/X29HSLenp6+wfebbp7KNbfYF27koZDN1PRZPRbViSwTQHRk4UQ0P1aKP09O49IeyXQQC/XHfqj8ULJSI+XeybkPhsGemEWQH9cUEC3Dr36DEAvBznSSxh0TF8rrgPohzV26C9zqxrob9biHDpw3nygs8ImnXAOue35OpBuFaoP/7nbnsd7c7y47XkKDj3jyIkD/jjpalTE/A4Lrb94zJ0MKY0Yk7cNbRUk7W+gAot6GydUGW9E9CAUsh7dCizPg6GNUdyBrPrg4T1zKM/Q5keI3KBhfjC006EojBoyG39CopyFaDC4cxCuCmdAvS1p9/ZOtgf3d0B97DdidtP3sZUnj26Zy2MQwb7sgmtt7crzgH6Ykc8TDkHIbruyzcY2RpSGd+vPSfl35cRl0gJ6pq3vh2bkupce/tgEnvfBK55Dhw51N4ZyLccPZPcl7cp2/fq/XE9eVZ5O12h1pwF0T2O7rHg+WTTRd0XraqDfgRWv+ibGPnU0Z03tI3F5BXTzJOBXMFmtDNTbmnHjRTj0WTUFfSp7pGLtEXj+dMILAb2ip6xVciQzZ21dnShYAdC/XAlCQM8uaaIvleIc+mdAehND7o4yM2FnrtVJc8gtlbU9f9ufR0bPabIaar7Dnt+/c7w1hxz2PLUx9A+TzyofGtoXA7m1taO0Z7QDbUHiLr34QV0uaGbJw1sDPcEsXE8VSW/xIWvy0YHvbQ9Howab+Zh8MU5Fk+PVVXf0Q4TVgQ7EmxMf8C1xEVbBtwV6x8FoJHLBzx0UmxiJfrUBqJ3Lb6E4HM6CV3UozUtX9xm9ka0zWyeO9bveW/eyuQarOHam8+FScOjJDS75bHfWvbttecNmjffQhRut670phNxvartchioakxrIk6Wc9uvjSJYTzo+bfHbkxJsIfU1jG1srevo5NG0086gIh46SMjO2gtzMY8Tbn84WciGgz2ugV3kAvqpryrz0dX4ciP6qEAK6X3sjPBdnvmqS4sihg+inCnRQ2sxg++lzgjn0bRjLulHqct2eU3p7mOhHHdm+tp1YyJ5HnbnI
311/LjrTm5PqVLcRwlnlQM6VvU0MWy1r9iNB3V5mJnJw1u19jvi0LmR50F5HrcG6nXS287oSAxJNTHZvfIjRACS+kO7bz1EDNc9r69mvMVTMmLajXd25xVyiAGhAvrCBje4lhws+J5X5/ngJl+ARzJ4Gp07Jy5FtfbcGivkGin/5p0m4PxWL3h+fh16a38jXGum/bckuZ9cV5s2Z40fXk4T6EXwWVAskpQ4Q2uoZoAOu+7nipMTtjNb0abC1RCqNw7d1m9XC3B+BPRHs6EScVrCc1yDgK5noavfrMycNRNlzy5//KWy6KshoOe8FQX0G1+8Lmighx1684HuKjPzbYjnnRbLUXtONOcJa1xLhiarRew5WXOsDnue/hh65q/JZpUnEO/KAebwYDx3bOGtXDmGubYThKeKEckIu442MTx4TRtxaKReDVPUD3CnJxFZce4nz89KUMCT1PmRxb69EV9XB4V5uFpPijlx7kYt3d93NjI1zrt/txkNU7tbcbvn06FDvQ1IiXNly/OdJa9lk7RLjOvx4NrAO5Zr7g97qkAvAYy6vtucHm6C6xZNZe2IugJ6UOe8yYlX4feaNt0G6NC0rNCMrAC6n31EJeKeqAUGvSz4DQN9EiVlGOh+7RApccvm5tYUzr/8ZKkUAnqu8Fzx/AvJi1Mhd3bon6UB9HCZmXh7Luvb9lxWzoej0fNvX7DHxqx1sueRUXMrtufE8/TH0H/nzIlj/CUX2+LorDWOOyMn3tFqHeCjoDtcqJ6dbbmbi8fuCCMTZ9eB+CBUHObtMDYH3JEc3wDRR98MVYt18Fw0vF8P/edRisddan/zHUD/4FK6utJ/u3Fh9+LDpqS3X0GewXl16FBXI1LiMgmS3BuYxNbbkmDaXV/7u9R1Lf2sOAa6X32EYHm1pFWcLAPpNQY6asmZOHtpEgPkamOtDFUZ6Eao3s4OnWq4a00U/DrQ4cvndMi9xtnwuurrfLFYLMi/2vqXiuhfrjHQRasK6KI1AF2UxrS1iEk3ZWa+NTjvtFj+WlP5bXtO/pyrvb7hWjL4h6JysOe/WpTjB+Nc9JPbnqfn0F05cXDQ7y0UlmObynDlre7WnyN7QShvnrhL5VpYjmvygwUfSrPrGLIN4DkmyhF046vFeta6853Y4wKq0MPicj353fRz4txq6701djNoiD2XcHsTeN7bfilz6bw79PaBRiR+915PnuR+YvXbYY5Mr6vgW8atYz/69e50gF4afyQqSzabkQ6jTyx6Buia3d7iBIRMOJ3uFuvQF0nz8xVcAUDneDsy4p4+rgZhoC/qNmvVnBb1WTs88q0K56JlzwD9hgZ6dglA/3SpBKBzlnsKDj1SZkZobu15uFGqnXvO+e3h+nDf2qx4I9OSzdpzzXKIU+Hco+fpOvQPE7dOS6y4Qd3RuGxs8tCc0uUYgwa1wGUHC3nqOw++M+S177W2mH1zYCMJf2oM0HfinmXoOYWDDHwnCUIFcu6An3XcOXFpS8Lud++VGtBd7eHt9MPt6Tn0Bgyi97W+d1e0vkzSCeu/PcM9AyQn77GSNDW/N5MK0GvguaxqsZrAmHoWbh1AF47j98XSHIBfCQB0dZQBOuz5REmNEdaVg0MHzmcU+5VmZlVGnOhJzQDdjJxXdRn3qdCcNdOTBRKca6If1tihi2pvTNvUsENHjnsKQKcyMzDpnx9vz1ci9pxoHq0lYx8EYM/Do+YMc7c9T9uhO+vE8TRxLuMWI7sPUQq45LFeRjexmjPi3TcBInIcHpnvrjl3ZF/5ZFDE93KhGyZkY8bQUYeObs4RC+CUvgBT3t3nPss5caz23lt3Hni5Eyl7v/Mvjef5rb7Lablzt0NvSgtVTmxLO8l94EqiSXe9J8gfuNqaBtCzU48gEF2tVtVAgA54A+jZKWwdr0yYFDoAHUTXIXekw03EFZZ5hAH0yfq0teoMiP7sUTanRs6PHHrtKbqszWTtkWrOmkG6hvqX0CefrPghh+57K9qiv34ZcuhHOE8D6KEyM6BrxJ6vrkmjVIjLt7ND51oy1p4vHdnzXznMzjS/6x49T9uhu3PiwolbeaVBrSGl/SGjQd0NnMuiIQOMx3p5HDxah87Val1Di/PsYG85cdwJdO5bggcLCrhHowEBn7gB4uDE4EFcSZ2crXnPsfT69HW87f4PhCeis5kTx8pkPujq/+FhIThJtH2sGdH2q13p2fPGOvSMYxg6sdt1OOXuZK44Oc+7EjxHJPtCMl3pZ8UR0GuKw1aM9PEigC6qwCJVAXf8Q9dVAP1R3aEjtz0O6NlHj1VC3BQZrdrjpwroTwoa6Mahlx7rzqk25l5VMP/G8lynuAPorwoMdFHxubbob6JAT8mhs0nn0HeoUaqlOYkmq/Gkdar5LvYcLI+35rK67XnqDh05cQlbp+2quqoHouGIDg46dqUe6R77Xy9cQZ3QzUnuTOoEcf+9ETboPKndZe2tjeckMq4kG42DN8qgI3bOLppQTI8bDoOOtx3/gaj8nkP/h3Pi0lRbz/d3H9703hvnTYm292D0/Pw7dDeM2WU3LMn9auP8OY/HJzfZSW67KwWge4vT04boLG3RDdDh0FEgtq5azgBdBIceVNSJpsuxDh0J7pNc+rVsm6Cr3PZnALps/SM0W/DtnDXDcwg0N0RffQvo/iqADpwT0EH0tBw6lZkRxdtz1/h5uJaMLSq3uvbwcwTaieWE87uyvkhuz92FZdKoE7cRap1GNeFkseLarxZDjClYajbZPLrMZd/jpffiDHm6r0BqtR6n0SEmKSWR2ZC6I6M+YMebWCNR8dQ8nJNQHD+CzrEL951gt2TN0P966czocs/3t98H6b73YOyHJkTbv+/laPu5B3pL38k7hHPou6lJ7v2XE955z4nawfekAPRieVqBuDw3L1qcX4SmEEgvT2XJodtq7Rhsx6Q2M/5uHbpSueSFFCguTwvOGeiiRWXQnz2tskNXMXcA/ZuFuZrKaa8egubry8vTy1brGuhLWQH6DRGAjjnq6LMGRRz6V6kAncrM2Mw0apRq7Hm0+znVksGB1ChV23NKgCOWY1E8T27PU3LoHybMz4730COxnphcsXsc2Z3kzmnuBHQa6cZVNo/VXt7aVxO05oeDY+LcRtyhLZlsrXeJVnTsQiqeMYzZZ3T3jOJ4FtMndKev88NCvuNs58SxWhTSxx6U/NxvUFBUOP+xGThvuXT2gd7I6q99Le8ch3c7ZbcpTq5rve0JHw6uXT7Rs0xfy+kDvToNVbxAFlmVguK49ug1BfRHALqesG4S54BwDXR26BA6pxuZyW8lAP0JgO4HAY6sCM8t0HU5GaBfIu6K6H88PBTMHWqDPu+Rgtqh4Fy0phy6NEI/AnqAvDggnR16mmPoNION7Pl/Z3seHj7n6nBvfgpDme054u0xNIc9v+1Kbk9/DJ1z4tyt0zg5PXEdGrjiCOkDmswWjom7qcVI5Arw+L8lfg0CitSP0CNEPCfxbuC6IYdQDLZjY0c1VhnMizxZ8nmVbEDk5iR3Vx9zLonryHZTWQIBf60O/YdLZ0mZ9p7vf+i8dzObS6jSzYedPzYl2M7u/PwD3c3YpAHoTJ/7YcA9YT2xBsLzCjI9109S7A1nSDkrjoBemtC+muoj0hS0eZnSpvBtgO7Z6q7jJQt0FWev4pj67HN0S4Ueq7eyBPTs1GQWo+NP0WONgY4TLiieA+kK5tqgF2zhT5xh+RMQfbnADl0keXHWoKfh0N1D6YB5jD1nf/5KL1DdnteLyi1Yex4dNpcFctvztB26OyfOYbgT1qHhsXIeMQafCFsUdXZMhqdx7/AU7sC1Bo4kd/48fJd894kl+6rWZ4OeDqCZpH+kCFKDUx6EGNlyXIo+srOJmrvwa/o5cU61dfV9f/vO/Zul4J3evHTz3p2mxNr7utoZ5+cf6O5hbWdKnONuWD0JJqwn07U+R2P19+yv0uU2+KcJ9JogWIQqcaRCWWe918bxs+LzZmXJfQt04bnOcl8EzgF0InrVOPQnR0CfQYc1vyo0Z4d+VB+uemhwbiRIR1tU0pp26K/XAHQ4dMhHXlwY6AbnKQMdSOZGqbDn8f4cQqlX0T/V7fm/ant+rzMuo12thujw9e7R87QdesaVE8dOOGy43V7aKIgmuXP0m7e6+UlmFnF/ikcnUw4BfU5y5/uIfR5B4brkOB/d3UZzcqfwDEEopks5QgW+uXd3knsOX+CZz4ljZS61tHf337rd+fD+zWzggPn9sc5m0PxWf7fE2s+KWvsbB/SW3gQpcY1Kcu97X5z3X2lJOFSQPE09c/msZMX9rTApPJcVMCV5c8aio+iMBXrWbC7bvugK58ahL85ME83ZoSPk/oSALqrCoEccei6oLoDokK4pgzdIpeefQMuvyaFDq0cpcQx0ED09oDMu/0D2nP15JN7+7QuerMb2/Lg4eyPsOTv0FOvEdcQbbnezVUfvb2iPktw9BvXxSXGhzHnCWFJxkjudyXH7iXPcgfON/TyMuEucE8co5ku5I+7u/0B75yYnjpn+weXu3qsC9bF7928WSp4X+KaoQeB5pcLN+/fGOm//2Hia37ra1325Va7/7w3oDjKyW21ckntLz8D74byLvn76ChyB/hMFJ3pOG+hrGsHjWZ3OqRTg15rNfGegw5HLO4ve0d/TkAE6m3NIOK6B/kTJAP2JcehQ2KF
311DxalZy3OlJbo5fd2XnxjdYIeOaLzm+VkEurbnC7DnUur1sbXnnN4eV0sGNd8lLZ7tOfOcdJvtOXQ2HborJw4YdkZ+Hf3NmFNc2C3wdjnJnbe6stxpIJ8xBuXeJYlH/8kmuTswKulrPFk+Kc9V03YnzXlivj3IUVJnhL94F6mxH9v8M5wT52iWfkWg/v2tH+523hkbe3hP6eHDsbE7nbd/EJY3Gua3vheYX2nLME7SV6ahQIdPPQEcM13Oqm6sjAqz4HLJdX2g90prsvnzbLDPVVbc316Wda12HVCfmhRVAE3pf05ChN30RxdN2hH3GhLfkPmmW7aUrR5pYQx9AsPriwT0XBWlYNFvbfExfrUn9Uu1+fKSndG1qq+0pKSj74Wl5yS8HyB31b9ptz5IG+gOez4LnEenq2HhWjK2qJy252NxLMer256fOYf+UcKape4saradriR3Bim2OuuW8sF8dGhMnUrdDA6R5M8jyS6mRgxXSrXEZr+b82lWdyKhY7sPUY9ZP4B4CF1ETy2UT8+X4lw3DnQ4/gPR8LxDo8iJO7NqaW2/3NXd29fff/X7Zulqf39fb3fXlfbWlAPtzXforVeTdDZzqOc3jL9nMq2Xu/sG/uV64qHz+KGOTO8JI+5Qj/u+TzHknoWAyWBxhvLjsiyVdePrF/wtv+Vg5X17vH6LRW9ltRjoXv1t2lPL93MBnwEJb5isdohjg2yJliwuvlrCkWoL5DHQhed/TxHo3CgV9jw+3L5O9pwbn7M951Fz/CS94NHzs+vQHTlxDFzmc/Ikd6S5udPZR7mSuzvzi2edc+W4/CbVuolKvdMhMmdXhzoy0cgXJx5CH90ie64AHgwObW/tbG5Aeztb+x49jVCSu2sGPn1i+mYcEZGcYzfsiZy4M62MqKVV1NbeDLW1tbZ+0PzpaekDHeo9UUqcK8m9P5bF4tO7evoGrr0T5nqoI1aXB9xlX89TVhymrVlhRrpCOuLrUQUFL0fya9ncbxYBHdg+ulJ8CJNDm4VXukjcS9qP5S1H32Ggp+zQqVGqtucQwu2M83Vrz8Vkc813bc/Dk83Dup3cnqfu0H/358RJ7s4YNBORiemq2U5bA2x1+X7aD7dFDd3c0hVwYk61OeIISHD9Obc/3woI5zlvaHuzY5jLy3B1W3kaYQ/uHkJ3VHR1zB04NzlxDq7Lv0YrBY6nCvT2ruN1OUkJ1e7j5LitVhk76em7ekxb8msD/b0Y6jhO7d3Hqz15hr/jFKkBvapy1GWdoI2koFpgVGYX3xPoswD6cfK8+O0vTZW458XjgP6mcBzQv0rFoTvsORv0BYNzpMNFa8n8L7LnMjstHue3ZXHb83QdurtOnIMrAddaT5KOzsTkJHeUeotWQ8NWx21wRt0w/Z3kMWMkdCrHrPqks9CZ554fWJzn9zc0zOUdKJz4TxXf3PPN+Ivh792VE4dzp58Td6H0gZ6qMhg86enB8IlSvxrp6OnuutwGZ56e0gN6dnzGEL0Wn+NTCVn32njjgY7T1rIxVru0dFT3de04oH+67B3n0L9K1aGHG6U+dqW3cy0ZW1RODnwwBpQb4TeG+Vv2XJazPYb+YcJZ5UBp0rZiNPbrqNlOW51l2fg2cFJgzN22xH0q5yz05PEI0Dpf57k/tKGq0DryEPYoVDDIsX/Xg9GmOyeOS+KmmRN3oQugs1paWmT0RA10tLSkEB9JH+jFnG+UkxnpRpNZu5W1WC7V9/amJmiv5NJAP/7t6h8Pl6aqhVLWC21e+/hL05VlOf6yAvQ3a5F3gmVt0NNz6AiaW3sOnMfnt6/Xa8n8XptsHj0HxW24nWmOF7bnCAigmcuZdeiuOnEMXIz0Jm8rxpFkzkVjzjPrsLMryZ0xDIwl5Fi09woRO2Gg2yE5wvI82D6IvZdtnm/O3toR+6fZf96uI1twJ5dsDsLIaebEXegC6Bf62/+dm5qD5ufKM9C0rFOmpntYE7Ldam760dy8lRyuNaUWo8mpSa3xSSoFW37ydFq1VderebG/TyyhpMzhwtL0cnmlvLI8sbyysryyvPCl1fJKZFHrG+mcil+x3jPrHRj09Bw6d2LR9vzxseXbX5taMv8tYs8F47FxdrzcvvuWPVfj9T8hRf6MOnR3Thy44kKug4gJk9wdhpgP5iH0SJ2Z5OKRa/bFDFl+2y0qcAOeD9MhbPs5EZ28tbsCrU8HOXLi6Dnp7NSJu9AF0C+A/o+zVjJ93C2wPrpVDmSpvmoQisNpPZXV6JkR+rFAfzT6BjI/qQV6uG3ql2YCOvQFZKq3f6Hnn4Pg6sc/fyW/6T9Tc+jcKHWZcM7+HO6ca8lQzXdrz6M0xyIK2/OvdUDg+U/uwfRUu61lPnDnxG2foPAre1wuaLZvzsNbA2fkHLtx8Tly7G6OObL89JnC2g05/2R9UQP7ceO+H55vzl+hOzjxVtZfopw4PkvKOXEXugD6hdr+UQAMzWCJEByLWvWPo01WOIoqt2OxOGeka5zLEiE6WqBbaZwz0yHbNRW6I
311avRFxrr1JbFqN4JPR2gR+25LFzsldufu+15bJxdFrWG7LkN0/9kE+XPoEN358QRSZnP7hD9eyS5w2iPOB8TGFtis92T452fiCPZjttn3rv9vqtlOVtxDkNwcGJo9P+zd26xbVxpng93u9/5yplZ7L4s/KKXATKAFxijTfJBjwnc6ct0T087zkNjB2hABElHCURqAsQGhHQEbwJPnLbkBjLSYHQB8pCXReIkTmw3pu2oJZhqkVk5kixb8kWWxfvNfthz/uew9C+dKqsSiKrIqH8VGamqeFhyA/2r/3e+830Ok/legM4hBX7eCnLi/FcA9MChC/yySQeevetLvHY36GJTQHdy6BbPuYS77oJu5/lhRjrxnHEuNuDcf6Bzo9Scxjn7c06HG+XG55gFZ3tuwhyS/2F7rgICy4u5/NSMOojh/Ae69zpxbC6Zz54Apxjt0FY97dxAlI22Oaq9Cir3XPcKdIOABGDu0uopFc0xdEBz+a53v+60fI7T0/lJxwOpUfbOLGwX5MT5rwDogUO/TEQno+5BuNIN5oLlYtcSNGee/6vGOd7eVUF38WKeH4LIn+906BbPX9JIZ6Jrh8489wHoNnt++bLz/PlN+POlY7xYTReVgz3f4c3FCyBXTHez54WpaQxIht9noHuvEwdzyXz2HNAmRnMVFfck98Qu/UfSHCcnd+sZ6PwXmZykMDjdpofR7KED938TTnJnZHNan3egOz4s8JyF/3XiAgVADxw6iA6ms1FXgXRXlDvSHDy34u2C59esaDuQTtF28SKDLncCOuy5DrgrMc4tpCs5GXTg3Geg2xulgudsz2391VZ4sZqLPedJc0vG7Ll6Dpgcu3DhthiTpuQ96v+8vQ9AD3/oeVU5+OzdsTLiuOJcGuMQj4hau0/MY0xmZNor0AnZFP42+Ujw9T6ae10cZjPP93NbN1qwRx/i0ngepkQSeFhw1R+iz+2rAgVADxy6kMn0L9SOzSQ5TtnFNGd7TuF27c4h+HPOiWOeQ2zQkRHHOXHw59DuBt0foFOjVNhz8NypervNnkNkz+3WnJnuaM/f+u2SfA6Y7r0gdNsy6ZL2/jt0r3Xi2Akznz1M6TKjGcE8jrde3twqFTaU7svjc4ZTKVsnAjPQE/e8d6IxDT27eJfCrxxjcEq244l3D4866bUgJ24PewrH4hGvz8Ti2lAA9ECODl2BWDKZxFjfcQBvhj23aE65cM7pcDuy4fAGmrv7cyUHe84GnVPiTIO+zw59uxML3Lmd5xxwX57hxueqqBzbc1CcMO5sz9VzwM05Zc+h27dBfEqO8zfLnerEeVlVDhGfPYXomZic/YZxjDKsGyZe6bPs7hno3kuum5bWSAkgx+1x2RqNhjvb5RGCk9xpJZ5Dkjs/GdGnjLGNDi5ec+IChXpisXg0FLYO9EQjWPYRjRdL5Uq1vBvQcWmt3ihXmpVYAPRAzg4dTDdsOkOcQ+wO5hwbu3PGOflzk+iOBv1QR8RzZ6IrmjPRmed+AZ0bpc4JmFM2nNGNpXd7sZpulKrs+TTBXJlzQrppz/GNIhuuMNGraC632/9xg5n/fXHoP/z2nVa8hKA5A4yspHuSe4KAbgyatjcG56Q4z4Vl6BvdV63BNvN9eh6NzLd5DXttb8EJduhmljuP7bX0/A+f+x6op1br+V7APFZvtCrNarVZaTVK9VpUYD3WKoefC5XK4nD7sVBp11GKuFSqFTj0QA4OXbhplgl11uerq5vGJo+Rrl/G3LnQpVVTX+Pt6z99/Pnlq++9d9G8IC/2+YW5RQHz3OpqYTVfWC2oV0G+eF94+aXlWZFzpk9BU3n5tvDjH42KM5P5qakCdqn/ux9AJ3ueQ6PUy8D5ZSoPx7PnSzOcu4Y15LNzAsuTYwrnHGJnfcD2XNeS2RK+fnL8AvFcSJt0+H//KsV5rxPHldY9OVZ2zrwQjcuZA8DU83t3h04pcaI87HkOjfPktRfxNzo5e9ym94gE+WiirnNlOshjVxqc9lBYhsdO4wb2t05cpCe6Uz09Yffr4612uxV/zm9F663mY1a12Wo0Ko8bgvSNsj7Xru06TrzRKFdxcSOYQw/k4NCloSaaW17dUaLaq10pse1Q8rr25pcy25dZQp9meSA5uPnxlU10cCbhnBwkW1jYup5Al2d5TH1GjWXtm0sLm31peQ9p+YLEYfE2sJwrDCZVh2j5hfja/QE6d2KBPbdoblR7XSR7Dp6fEUnqsgjN1DQ8OTYnmjvY8zeWpa+fQLgdug3BpPN3eHfo/tSJY76Bz94D2kaS+7pjkvsDw7y6G3S+yBYa3x28jECn26M56aTnnAFcvjvQOUOfggn0UTpqAt05aY7H5sXs+5wTFxJ2tlnhTahVLhVjYcfLW+xm/VKs1GxLYDelN68LRy5/g+ro9BaK4Tabnv7BwnWMVQyAHsjBoV+RRGeoA+cUgSe2Xyagu6vvIoD+xeYu16XSm9mEu9KbmV0+n81ImjspO5A0D+6XQ0ejVMuec3r7junz5WPKZb9+huw5ktQ7OXCGPpC73Z7LTdnzPOy5NuhiB89h0lUU4Mz3w6H3fOS58KsTAN0xxECkADOBlLLd3LHMxdLT+qO8/Bo35n0S3SxAa0a6vT/BnHdbtcZfyAbdXLDH9d3dH404NmI+6riHOEgfhbvR5lTMNreUR4WeiE2q3SwXexxQ2oQd9tWi99QruIlyMRrWR4oAOHnykvyt7O0fLF51h38A9MChW0QH1Bns9Kb++5mnBmuDnwl//iXx/LvKmdbs+7/NYN0HuoM9ty8/5/lzlHrlWjJkzyXK9YtpDp5/YLfneA5Y3poje37b8ue6RZs26fiAZ4fuU504s9OKZ8fKiObOYmaSOz8vuCeS0yy+kU3vOebO38i358jRtPV1npvAuZeGVTIX7JlJ7nyjbrdKY3tsOne+O2VlZOPyYofoR149LfTqa+9Iqrcr9ZAj/GBnfVO8BUfdqoWfi2xDvgGT3oxp1132NoUOFduu8A+AHjh0SMCcmc5Yxzt+8OLQoeylq5c3Uwlf5YtDx1w223O7O8emcG6vJSMl1pBre05xdrs1lzgne25Vr3leZMPlp3vJnuMlaQ6iC5NOlt5nh+5cJ47x5j2yzUuxDM46VyilruYJApJ9yP5U2qytyndGC9ud5VSANsExfiMl3UPxOiMX/Z5jXxbism3J/C5PFgx89vDm2BzO96VOXKileZ7Usb7k8GsvSmqWAUhStEnc9EPhoooRlHp2/AkNnguIVuQ1NU8jRkpPhX8A9MChQ9dg1MW7E9Px1nHofdlMRuxOGkxAm5dWFc/7nC/LZvvSFDk3Tg/24ePuI2Q751N92az9jDWuvE1W14HOjVIvqcVq9vlzEteSwd6x58eI53ZrLmn+bzcMe/7nFRlup9lzhNvJn0O8gs1nh+6eE6d8MAGdAOhhwTiS3B0m43kc4iHj2p6Wt+1Ck1RmjbPv0tTtxQm950fwje7J9s4pbDyuOaaRM+9YeO79u+lU2gxy8Ced/2H5X4xvhD38Oo2NcL4PdeII6K/SDN3wO/JIZScUS23B+VLEt9z2EkIEzaJxB9GW9Nn6l5q8qtLj/Y8H/PdA4WcN6IFDJwHpajNEQM8YC9f+X6fs6+eap4NJReOPr1x11LUvPlnVUE5/snVVbKxFwbbNPoXlgj62JLcTS2IXenkhjbPJzYW5pWVoZXkFmk9AfYWJ2eWVUVZ3l61xqVfYc/bnRvX2Y9z4XGxkz12tuSD6jDl7/tsTIhsO9pzz2y1/LndMyHdMOpLjfJ1D/9DjqnIPSe5sO6E1IyeOx+HUd4ipxTy3LqDzVHMVbpv7lvLnJc0fPrh79LzFa8eIAAmgtcTjMs3fX4N5twXG0/d4QFz3UPIcmaDkxY0nC74RM4EeSutr+FlhPclj75JJ8If/0r1Z6Qp4/uIQJ+P2g+jNHaQL1cvlesg3nuvIuhN+6234bJpCj3jLsGsq+O+FIs8c0AOHftUg+jX9cgP65pdcPYYkxuoQHUp+SsXhUMCdm6tdu47Rkp+dk+I16M8Lbc2poH2e6r1aReJeygHoWdkE3VqArqrELeAxYCA3KhegQ4/EGvRHtx7d6hrQ2Z7PSXueu7zTny/iRfacasmgUaq25844B8zFu92eq94vh2YX8qglQ/F2AjpVjqXkuDM+OXQPOXH3Etx8bFeg00w5B6yNcub2VevUTvwhf4WE8QMMyA6eE7zpoxtHJbz5XqCRow82hlAulh4sKLfcOebO497/PY+rB703jD+OetEgZe+BOEAXvr82nJLMTabZi7MBN0u2ckCdb6T/3oh1FT8rpKmuzH7mxJFiag79nXSClBp6Ux40Cq6EcR9+8rzqOIUfbVpz+5EyMt69T6G7LFoLHHoAdFVp/YqzUcdOWwfouEadY5zLjabZk3/S1WSuci0ZarD22aAFdOgQt1g7sbipgC5k0VxuUgB6ZtZe9BVVXycSQgPLP5KykC7UZaA72HPn7HZjsRpmz68Z9vwDirTjxfbcqiVzeGsO9ryX/bmV3275c7nBpNMX++TQ3evEmXFtLwXZyFXak+iI9BiHxmeiD98R2LI0cmcjaZ0UDtRO+7X+FAEvNXTvKH9WXDvy8M76Rn86QRzlEELSKUQN68wgTQyt3x/hQd+/f08Oij+OYxig7vpDkFwHBoaTCTB3o5+i/ObkRPqOhxT2VPLuUT02IgQPhvCs0G+NjTvyYwodTBN6LWFT8lUcLZMf91eREu6z7ULqxuNqjCIOHlPxI5h8LzqfDBx6AHTwnJlOc+r6ZW2fK6Cb5rwzhhjt4w7R019rnl+5eBXmnO25eBP6OElAB8+5gvtcVgPdaMkCoPflNM+hThX3BZCei8QJdRvo1IkF9pyy241yr8tcS0ZheRYV2I+ZPAfI8W7Y8zOy1KvIhpufHCecX7C7c+3QreXslBznm0P3khPnvakZ443iyxQ/5nF4/DR4LuLGG2sPR+Q5Ac4HG/0CiBbQKKBN2e/0+aG7D+4/fP/9kZGR9x8evfPg7sZQEiUPKMhPIQTT0RJqSQlxT+tr948K3b/zYH1jqF8Mij/ODBTIe1g7+vCh+Pp7d4fSCfU3baz1b882OC/jcy94y2Ov33
311k4gr/uzjqeFeR6Nnu3Ol/qxDXUirXTCbtg0Ymffksn4zfCbo8llZ5vP4UO+Ltn+QUOPQA6M93U5W22W0DfCXOb/jOpeL7a8eermavszhXNoa3NbaBzuVfdkiWvgH7YIDpC7gXFcy75qhx6ep54Dph3GejcKBX2nHEOoLM9p8VqQm+b9lxbczLnjvb8jcOcDUcRd0Y69WnDyLyCzZ859L/1uqqcC5E5i8u9QJYv5gAzj8Pj9yfV2XRyaPiu0MawsMGMs3WMxno4zN+Gikf9Q8PDwxvDw0P9yXTCCPLDfu/apO38znExcP9Qfz8GTVBxN/hoe4whLe5hSHx9KtG5q+GHa2kGuqeasUaJOeBb/NtsbGyIvy4FnMux7yV4ft6XnDg1hf5mf2KHTuF45XvS5C3efPrtxKza7SVw3+Oo1d0q5QQOPQC6Qjo2dxHQ8cunn1789CKE/3x8WQ91Hf8ntHpF8/zrlAb6Fx9//Am2zy5d1UT/JN0B+tZnC1q5uS1N9FxSAh08zy3YVEglkjmNc9HTbG56LpebzU2L/06JjLxZxfMfLY9P58anp6fHxTY93pUsd9OeC+3slrqdD7d0TGP5jGnPGeZa+MHZnn+l7XnvhVvuMNdEt8Qm3SXuzkD3OyeO+OwlRE++2D51veGcck4zxgkBTCGOqCdNnp9HERhcQ0oopfk4rf5eS3sokO4wri6KaNSPB/7NayXaNYU3HiITofMpTyXmaFkah93l3ikDpbIK7qOmvYf/ff7Q0z1SKud7KrFTpx9/jyx6T2uXu4lWGrwK3eNd17cXrYWjsXg8Gt4rhw799BmgWgB0L1Q3gL6asCu1eVm1Vbu6mhK/gOdCf0omNNCvJ1JqS/VtfoluLOeuDWqgH1octMbpK9yU/vzEibk+AF1oaVN8yu6NsksK6AvZvmSyT2z6Xcygj4Lno5OD8kBfn3pPdgnoyGm7qRqlfgGeGwF3y56P8uIxXfMd9hwUJ5p3/LmjPUf+3cuHZsme2/PbrfR2w6DTQnbE/Hdz6D7kxJmryr0nuT9wyInjcXjVeuLBWpLhRUIk/t6I45K2YXl2FyUom45y2BiA5rhMUhYlAtBcvvuNJ0WaPEH3Af/pbiXj6YnlqfeR7r/D/7BPLRT3YbhrU9N1XrTGGn7CfUt8Vkk3UelxhWk8Rovlm3FvBC53CsxF6+VKtVptlmt75NChnwVQPNhAl21NNc0tpOs3d6DjAgCdlYYpF4F2cQo8l4ntnyYT20Df1uYWiL6YYaBbAy2oHmuzfR2HfsKsO5dZhj+fzSYg8koFZdCnk/tSKc6w59jIn5v2/G2rUeqsapTa4bkFc5Zhz1FLRmTDzcOe93Zw7mjQeVG7GBibkRy3nw5915y4NHtSz73HiHk8dc3j8Gw1TPTIXUd44djQmiN8Zap3/27o5WC0+WDhRtKNtDkug5oSAUbWk243nh6WN05xCwvo4tjuTxa4DwxEonS9Nc5CSNw9f35f68QR02jRGqkPk+j29LJwD3vYSCgasn6MxaIR13bj0VDEPkqk07UcP+HHaExf1ROLOKwu81qkrtbmpxA1Mo/HiupFaz0ljC/VrEf2zKEf/3kAxQMOdEl0MJ11hbftHzXQcUwDnZW+rqfNL399WfMcKXIK6O8S0FPZawLnmEQH0A8dEl59W3nw3O7QdyiVWYZBn+0zziigP8qlulopjhulsj03eN4x6KM7asmgUSrZc2t1mjPOedH6igy3C3sOmpvl24noxHN8C48pTDoeLZwduu85cUgK9957jOeoKcBM9U+AV55HfrjhzK5Ev301GwuJ8IldDDoRk/4ip2X1tMj73hCo6TxkKslL4gXRTfqn5R+1Lm+cG5+vcba9O9B5sXl/wuUpZ/j++fM8Fb/+tMKvXcuJA9OE3jH7NSRPEkQjAstoHV4OaYDLX1sVTftYqdKsVhpRB+OMfqbNSimqCY6PNcIgt/hUsxRCCTh1VblUjMdb5bCZjO41WhDhKXR50yXrnvWdlkqNepjg33guWm5T57bi3oXcf/lXARUPONCFmOlYx+bM9KuXOkCXYqC7LTzHIjYCuiUJdAFyAB3J7ezQE/MnIFk+Ji957uzQAfTlArjNKqiMuLFM9x36GdUo1bLnXL5dT59r6Voyf1FYFrLsOVlzaHd7fmJLRASmhT23eM757UxzuVniOXnX5DgGui85cZY8tWZZ46XInOS+lrIOJ++7FEuD3QarGIoib1wuG3vKU8fahsgnpw9aHxUSaWQbdx+I9V7ble8suUccYKGPrtOwPGi6f1ikm7O9H1kbTtuvlDc+vC7XmcmhNhJaWKBm/NOasXK+j/tIlzf/WfCwwH/QvadNof9gfxetQWnUlgEcQ6Vyq9Jsd1AZK0pKt61k8lBdG1yQkxSulavtF46celMtaS82ynqUkqrLjgcG8bMkarvSaJTFavJqFd/haNDrHku/tYtAd0PdNI9nT5kr4VrZne3JyVOvHREFb3Gjewb0X/1NQMWDD3Qw3TDqRijeDvRPVlmbSVUaroNyrDz/HJQG0EVquz3kfk4KIfdDUuzQM4snoEKiA/SX5ws2ZWXqm8pwXxZUFNocyKBhqlBmBSlxryxPyH7ohQF5Zm8dOtvzRbbnTu3VrlEtGZq4/s3MzLFjx/5uRvGcmL67Pb/pZs8hmj0nmquvYKRz/N/RofuQE/fw3jptHiq531+nDzygJHc+gXE0Xrlqm7Tbd0VqO6lfrER7CCq6ShWPuSty4lMJUkomvG/IdWwj8hL6i6wbcU5y59Ita3JYG6L68XzwPtewUeM+2LBdKa5b277xtXX9rQLC5j/t+p2nAF2OIf68oaT9NjbuqdF5nKM+5MSZi9ZIqSOa0hHR/aTVqlp+Pdyodhxtg3qjqLOsWKP6+MlrQym1BK4cLpUbGEZNW9cq2naHe8qS6z3CXscwVGknKEFhb03RwH4sRIuLh5A23RWVxSsS/Js18X7ydL98hlUxicaeAf3ZmEQPgA6kY5M7wxzvSgx0SH5A60sF5MHPqSzcpWzCGeipzJwqDScwroG+WNjsaH72hBVxT+SpQJzUS1BBTrSLijIvddar/b2o+rqcy2dS8qlCZLl3SsSJd1H1dWx6anDP+6HDnt9kew6W4wUtsj03Zq1/95u/AKk3PnDVDdOev/Xbw4dmYc97b5n2HCin8nDk0K01cET0G1JiAd0+OvTQR7sQmgVeeL0ecj7juJYNk8uKzWJZltTwxrrAMdHYTarQilh4vn53Q+nu3fUHd8SSdLCcaSl+9v73YNj7a3LUYSEx7L01PB8IOT1VrOk7HxYXiuvoMYJEn/B6JyhSI/46eRcYfX0NJXTMsf3IiQPTeNEa6ch2nDsSDtWaFlOj8VqpaqEyWn7cbNTVOCXGW7EiBj6NVQOnsOIsHAGbMQrWoUGVULFtLRwPNWwApm4rHsu5Fq0pdPFl4taAd55hpwOAf0tcc0TEmnQeIO5uD4D+LMXcA6CzURebKQPof7Q2ArrotKYMulymBp4D6Kow3KpW/uNreu05lq0dgrY6QoK70E1VKQ44Z6ILpr9ckEn1y1bVVyW5UK2QlJ8BzyFUfZVkHx/YW6AjaE72nCLu5gT62A1Bc8FzKroqfnj9iCK6RLo5dW7Yc5UVL7LhFibGURvOsug0fS7kGG9nd47h//2DmenJienZb9743T7OoaNOnG+itWxWPF/VYnsoJHDshboMapSjERrBOMTy7yxdHI5GdRvzvHXn8kr8tjfi0YXMpxRP+ttuL1o7knAFuoXaitVlPCLU6KCvp4y2bIAjm9semZh+ctha0w6MdnLWws/FKu2GcvblHu6sIsapxk1Ie+7b2rDdRn3HzHu4wQcwrgjKH+nv5AIf8fw9TooA6M+eRQ+A/q92o275ddYfO0Dfvsj6OICuzuqycFcyVnz9KleTETqntVVIWEBXK9Ug/HcWPO+E3LdpDo8uzyXnrZKvFtJ/NFqQFj1HPJe6JbbRvQb6V98sz+YW5vPbpV6xEc1pvdqM4dDPSJP+v5xM+g25/7sxe45SryIbDvZcbGa43b76nDLcEdbnLxDDj00W5nNz33zFIffuO/Qf+shzLvXGtVXOW7YTP38r7
311Fkg9048z8Pih6eKnHIXpAb2/gX7VCfOedEalGKgd4hdInDCMoca7VLIimXX7T3KXxim6XgxDiCKUULldikcrjdlElq8ygxuGA45UqaIu8cpdAPvnALYoLNC72wnRKh6t409cejQP/51wMWDDPT3tqHMRt0iu3hZ+xcK6PiZxA49eRE4FxIVZdihWzCXW8egJwF0q3476sPpDHc8DpBDB87FC0Qv4Kvyy52ar6C54LmYOM/KwP/EKHAu9g7Qb/UilrR3QD/z+t/dkJpZcfbnhPPF7fbnr9tN+lv/bJl0oq3gLdtzqiUj7PnCeO8tmz23cE4r1jB/TuntFG/H8DdmpqfyC3Ozb7yF++m+Q+feqb6Jl1yZS7H38M4C/eG/PtcFESufDCeck+LIz4LE1RrVl0OSWqlaCnd4T966p8wz86efWAHzkgJuvd0Iq8S1GkXJpeLtSsihPit8vaeIA8XYw4R3qN5WB3hcPHXwjSIMsQcOHfo5xjqgCoAOohPT1c5+Hbt8I6DjlAPQk/8JnkOywIwGuoFzCHPsyRzVbxfqBNwXsqZDt3z6pkpDyizMrljuXCM9j9sYmB4btfy5Uu9P9hDoWID+z2oW/NhNojnnt1tEvyn2lRmq+WoR/e3/TSYd1hzxcKfZ8zdeltlw02O9vTaam9lwELdVt2fDybdjyp7/+e19Xoce+dBPyqAgG68JD9QtdS8nLloxF63xsjXiaMly65x7VquWLd6Thw7B/L6WIq+vl7+VcVm82cKlMnr/XPExPypEm+WIAWmo5C3iQOSP6rtk/4675HE5OjH0onqE2ROHDv3TAQ66B0AX4BVMJ6gT3A3ZgP7Jpsht396SeiU6VW2/sslAVzzfxvniPJ4BUjlbAXcIDVmUR89j+lxmuW/qXb7wSaHUYKaQnxflYnO5ZUlzoem0PjMwNTkxMSFqvo7egh79bC+BDsh2ZsFHrzkE3DsFZW7KTUib9CPojMIm/S8g/Q3LPRv2HIvVvjnx/GxO23P37ufO8+diY91Q9vxfyJ7vj0OPhD7yk+fbhWXTWBMeqGv6EITrhmrmojWGG1RWLCzrnzn3LByrAMzgPQ5wYbeT/ex7QUnlils9rWqNbqLKS94ircZOSH/bKfQSjUx4xu90l3X1MNO/F0Bnh/7sFHQPgA6RTzf8uhvQv06QrAZrtq5q1xTRM1u6F4vcBNJF5tu1S9czirzJ3PPSn2/N5yGB5zndMTWHLHfwfFkNlMLOwiFZxzqZzSmg2yvNyJIcA2O3oH/Y82VrVqr6saXLDuXhiOdQx6S/5WzSb8CbC6ID59T3XJV6ldlw0p7LzezGwjyHOXemuRzesOf759B9zYnjTi7caj2Qd/mfE1cyF61R6Vc2xrDk7boNnPVQqxnn2H2JO6M9eTWRUpSUVh8XaldcEgH3iC1MwGNHow43iXi+x+5p7Zq56JwnzUt0y/S3E9DDe+TQoV/9NBKw8QADnaDuynXsuwA9tXpVsfzq51cV0r/MUJ3XzzZX4enFArVMFmvGlUPH/PnioKQv6mP05bdkLRlVHi4vw+2HBdB3U0qVcP/xeJ9xKg+eX/gfewd0M1W9l3nOE+hi14JJ58XfbNKlBG3N2XPxErVkDh++mVuYFvbczZ9j44y4bdmnz2fGhT3PkT3fR4ce/oGvPEcBNU5yD9Qt/bDLi9ZeYJPKCWLKGNMUeow/WI2XqkWDpCA0xfFTQ+9InqsLI3Wgu1KJGsXd3Au6UE6ctyn0qK1Ue5HXqLvcpX0OvbEnWe4UdT/oi9cCoEOIvot3Z71nAf09R6CvXtGjXO+7qPuef5Hdduh57ahZcOhSVCkulVxQHVPzlkPHpPku2lxhh86a6oJDN1LVZ5Y6SAfNGeca6UtiI5NOSFcmHXF3w57LC34jzbsoRMM4Z3cOoruVbyeci2FmJgr5BWHPf3fGj37oqBPnZ04cJ7kfMAU5cVSB7Qj/Hwm3T6VV3NZ6L2o7Wms2wk4kLZH1TZ9GmbgaueJmuV13ao1a7nFP3PPY4ryOcdym0PWDQ5SnG1516DBX2ossd9YvfhKkxh1ooP9xG+r4GQC30ZyALn82gb55RcfaRUf0vk/0QrXPByXQkQ133dlZA+gnbKVfC6oD+rwE+stSHhx6ckH1TFU9WViD08qh//e9BbqRqt67qHmOjRPiLJ4vLZFJ5zE6CXaGPYc6cYAZe7TdMOjAucFzzm4fnyrMC3v+FQ++j1nu/ubEPRwyktwPmIKcuHrbfdFakpLcYcmN9d2NlmW0I4qkEeIzZtDTQ6eE58VCdeqG0mz1OPZSK0Ucwwgegc6Bf6NPCz2+UN903CUpdYrz87697EBnk/4P//Ogu/TAobNAcKUO0m1Af+/ipl2rlwXL5X6xDyXjOi3P+7RDZ6C7O3QoswSgLwDoUH5zc0Dt2LKyf2qhkBf7VGFKvPKTuVHVZG1CfHyKlJ8cv6X0024AnWfBZ5bt6e03gXOtJbGD6KZJ5wQ7tufmZP0NIH2X9udu6XA3tD2fFfZcjOmDQ/c1Jw4NW7g9yQFUkBNHi9Z2mUKPV4313e1WtWgnad0KdKunhOTwqRfldcWwDbFVfM6h27lxnMYDmT0l7VedptBpLr5uLWkz0gH7T9KTw16E3Anpv/zZT/7mr/9qzxWoq0AXRtoR59uCPcdmAR2Hr9qlcA6CS2W/0IntF5Nw6Od2AD2VzGRS7NBV0noSQL+JtWoE9OWXl5fF28oy9Pdo24J6Mkrw5qoL+kAiMfkKpNesiRfU+zddATrPgt+4cPOamQ8HLcGiQ2zSzxjMlmesAjTmZP3MbfbnTHTn8nBM9PFJac9/+xXjvPsO3dc6cSzuCB6sWuuCuts7lRdin0wmHPSaLeJe17PY/MF2OWQbqRong/7i8OnX3nkiDpaLIZ4td0ZzrWpFw015d+i1Nl9nX4UeiTcrbdwl+XV+lsEUOjn8PXLoxPRf/eMv91qBftFloEsOexMBnZPZxY7/CIkCrx2rnbn2rtJ13YlFzaFnM1Kbq/O5rQUJ9CQDff5mwQI6O3TUk1FCvdecAHqBeS523QW9TwL9EdWI6+jnkS4BnWfBZ1a2cS52xjnJNOnM7CN82MGku/tzxNvdysNpe/6Gtud+OPQfjHw/Cr+m0fjs4CnIiQNGyaWy+t98DDUi21At04w5EtdpJJCUM+fffPK43SzX42F7Eh4z1gy6W3PyrIZnoJcopM59WlTkvtLgYYpt81nmFP1Ze+zQA3VJ/9RNoIPFavv2QH9X/wcv7O/qhiy47ppaer71CQE9ubC1uCUka8ksGA594XDe2aErngPoYpNATxe4RJzG+SvLmQQc+iMD6NNdaJ/qNAt+bMk54I5NanlJxBhcTbphzzkOQCad7TlF3F3bsdwY0/ZcJM1jPB8cur914tARnNuE+6ggJ64Li9Ze5bVi2pKX7B9sGE1JKXO+0mrUa9GwkYRnkpk+5Tx9Xfea5R7BIHWjTwvOFat121L6hvEskxp6kR5hvoPCvwj4+mwBHfZa0Zih7tmhE9utrPaOVre4MhxC7igM1ykNZzn0EwC6EAOdHTo6snR4rh163sGgjw8kUuLMI+3QbxHPs90EOs+Cz4xaOGeaW1rGJqu7Cxkm/TevM84dMuph0l3LyUAO/nxmusClXn1y6P7nxGkFq9a6qo96urxobcjJoL9DBh0OnGgbLhPraX0YQbsZC7sm4XFI28h0DzsG0r3lqkWt8rNmIXdRAkfdWd36441nmddojuG7KBIAff/1qy47dDBdB82f6tXfNYH+rl1fZvT8eEqtS1fWHDp0Lk9AB9EB9HROlXq1OfQlVHvtAP0lkqreLoCeKlg41xqdzatw/+QjJWv2fHR6qi/VRaAbZWY00Xn2/OY2z6GVXgeTTu8kI6P+xo3/0EDnBWv2Yq/Mc9SSQScWjO2XQ/e3ThznxAWr1rqqD7u+aM3ZoNOkNtd9BTiJvbQ+jPDrmMEWabgTMwLYE47N7ql1T61TcZdGn5ZIuRqv8RR6vKqeZdigvyA/UOIRA4cehNz1CyTXU+Fqc3bo2U8vuimjg+2fKKOeXL14cUHu2DYtoAt3bjn0dGFBKt9HQB+cx7GCHEr+MI8dL/U2lRLUX1iY2N7m84VMn16cOjAhDlianJr
311KJsX3dBPoRpkZM95O9lzLyaS7izPqYdKFdtaSYYdOmjFKvfrj0H3unYpm6Ad51VqQE1d0X7Q2/ILNFIfNuq9ApdP6sKJy9u5JeGzCY/XQjkz3uvtC9IarM471sCV3mkIvVku6Om2I4vjvpI0ZdF5RFzj0AOhK7NPxBr3LGxw6lLLJ+tXqrvYllp8L4RCJe7EA6CQCOolLvqb0z8bQ9Ku7ug508LZTZmbZoDlwDppDK4ZJ9yDOqLe6qzHSDYNudGLxz6FHfM+JSx/oVWtBTly44bZoLTWoAu7teoQcONV9tfw6J6+XeMa75JyEx8PgYrLrxbZJbT7jPolebDYiliXXa+fsU+hxsfQ9zEvpI+WdU+jp4SdGRlzg0AOgkyhnHQS3hOA6gL67sl+IafOPzUu5dDvkDPQuqdshd6PMzNKiQ7x9mYm+sgKTTnntHkQm3bU8HIfbjVKv/jl0f3unUk5c4m6Q5H7QcuJ40Vq/OYF+RPG8FLYtH4/BDIe4yAwXgq2BnFFnoGOkkhFxLymfz/6dzrJ5t1htKFJsNms7OrjGGlH26z2y5jyeSvB94VpUfdlpe9aAuRI+cOgB0AnnhHUhirzLN29Az15Cbvt80g3o4Hl3gJ7N+ufQjTIzK0+Jt6/ITQom3TW1/ekZ9Tf+TSB9l+5qx7jUqz8O3f+cOAiFX5XS9wKed1Efhbq7aO2U2WZN8RyNzqkOHMxurRJ/Ls4ZchZJ4Z/jlTrgj7VjzNxy1ArcR2xBgpLRKc3dojsuUw+XqsAwB/5DZRhy8Btf067r080YHH0NfzwHJ9KnOCThrsChH+/Ih9H8A7qJdWuDPDr0wc/PQVv5tKtD7w7Q09mp2UkXe96Xmew+0I0yM2zOAfMltueK6J2Z9Ne/FdFP3bowNj49bvlztudc8LVT6pXsuW8O3ec6cUf7Ux2l73QV6EFOXKSLi9bMVeip0ydxvFmMmKiNVkQxmTpF3LmXqjjdakVjTYO9oRK6pseURWYCtjAO31DdvVic4zL1aLndLPLaOTC+GVeGH/yOlNrlEDV4jTcb6pcXhygL8AmFJJ5Fh37c0PbR3S61nfr12d6x8bGxs+JnvtyUecrhpn59e2x8fKz3LJ2lQc0j+wt0LCxzZLqpc19msrsp89k5pXe3Vh0vmNvufZ4zTuYOz2e/kzKZgcnp5VdemXA8NTUhmqL/ty4DndUx6aM7ib7ToH8Hky7Y/Na/HF7MzRcmjnE9GfECzsmfUycWjOyvQ/e5Thxy4oJVaweydyrHsRF2Zg3L4utcfp3zxaPlSkxPP/Ncd2cKvafcrOmSqm2qyx4rt8s9mvtALEfZ2zXOgefTrGiLggakcK1iNX4JW6vQ61XxHu/UugnXq2jk1rntWKUzn/6mNduQkjzH6M+qQz/+694xoXGBT6WxX0s4npW/X9iBydt8pdDZ49tQPTs+mRlMppLC1GEEXA6N80fwKXEeJyBAWw/Do2X7kunk4MD0bdvZ42flJ8UQJD6yT0AX6AXRTaoT3C2ffm13nbO0tWh1KpG71hZgjrXnWzfRioz7ix5e4lyyWclBvClx4Jol4Shqv4oCcaMrY/ZtdGy09xYWsO0b0DkofmyZ7ppwbmlUbjNA+hFPJv3Mmbf//M3zswv5qXG39moQ7DmXevXdofueE7c/q9YC/aB7EXcjyb3/tCy+jvLrIYf13dFyU1KdO6VyIfeecrVuxcerdT1CtN6slvBzg3PcrYHLIYvufNquSFxN+LcbUQZovFF93Irb7rKGHLkQbgOBgmijjSn2kOZ9TM6nx5q2JPe05DlCEs+mQwfQp9KCnHIXSqcTU+LQ8ePT8uD4Dic8oS7SV6YyFkUFoAeSCRmVk/vgpEQ0LsewGB9Ki09lb4tzZwdwUBwAtAnHNBqUHhDPB3QP0+JTfePH6dDZjBijd7+BDgHdJtQ9end8VmysQ/Jl6XmrmgykgA4dVpslXUhGFZPhajI/FrssC4e3UbmPitLtcnv0aPQVrUePxItKxJH206FzmZmd/nwFm53oF0D0v7ibdBr4d2+8vDXH9tyYPwfTjU4s/jp09E71OSfO0gFctRbkxMHzQidP9yfTyf7+odOvnjoJd15t1XvMBevtUrEFYNc0KYXYGrfqLYSsI7o7WrtcjEVjtVKlQ8pQxQipx6s0b11vGz3R+dJWG6NWSvGQ/EAkFCuWq+Jbova7LIoHiHKPlW3faojvr1HOXb1SLeKLaQW+aAlHIYlndA79bCaRYk1KoP96UhzsG9tBySn7lQPgMAz1ZB+dSqcHLoggOF1OSshPHb8wyMeS4gmATfjEoFxPJcbBmq7BaRC981CR0GNY6u1LJbK3/QA6mK43L2gnjjPKWaA53hXLHWkOHbZ4jt7nWi8ppHPBV6UfQ1Tz9RWxa3GJON+AfkbsXGZmuUNzC+l2mkNeTDp4/tVvn1/M5aemOxnusOdUvr2jTqlXGs5nh/6hv0Bf39i4q/d7B23VWpATF4rVAWHoyQsnT55884UXBcxB81KNvpJ7sbSrpQhPVbND56z4mB67XW1W24+rICXoTSF1zp4v9SB43kTbdFf1lKp61Fa50WiUW035AIA4AN9ls9luRam+nB4UDh3CQ0moIQd78bTgSHLotTcft2mgZ9ShX8imAM6OpgWKAeNE1h5yF7Y6weum4eUB2QtT0pgnUslBEXTHjxMC6LgcSvM3IAIwlsQheRCnJ4jZZyflqezk9Pj4xIC8rm+b6PopgWMHx8eTILxPQIc0od2Rfs76r7XJ3bDnAuZiY5wfYpxb9ly7c7y/DINOSMdGPAfOxU40V0R/xRKXiLPpQpeBTjPcWITGZWYoH479+ajcNdM9mHTY8z+vbM0tFCbHnIq3UzacUerVZ4fuf07c70d+P6L3EflroINUJy7cEDBktaWqTVl/PR5ybY/SrIdpQt2o6Nq0mBgT1lmrWq6F6SquIAcXXa1U2+1Ko1QqVzX63VUrN+me4dajO9bV/3/2zh82juvq4ibwuWe75dezCeDCBmwEXBbTKz30YBWBAxigIG635MK1E8AIsFWsNWDNAtrlACnSO47YehHZYrgBpMgmtpe4pERSRoq8e+fO4eV9zxgz0c6I6zk7YTajNzOb6jfn/nsSlddpd9x0Lv8nWnnynX7jv//4wQc+KuFDEnzNEjt059JNj9TeRTHU0Am7QUnl5bGSNJL6uQGR+/Zmd5QmyXC07Xm+k3BYvcfa2SQE4zpit8v8ou2MNOp6nqt3B9ff9cs3x0leZ5f1bndu91KnXyr8+t0+zrjM/9Tdm7UBHVDWtPaSP3yYD64x3hzmHEDX9lz7c2F5jnNt0L1DhzsHzz3NFc+BdNCceQ6DXodD9xnuGzmV9ez1H8Bz7c8Z5VBSZtLZnn9I1XDZjfh4OBS3p2rUa/0OHTVxtRKd5P/Sl4bn16omjml2SjqSg78fvdxYX2P2hqLk+fnJWTu/+IiWk6lWVewn/l1go6UecHZy7i95NVebrW3QczYuF9qfbKy1j+bHtFivtULOfM6+nH36ybH8CKhNv/LiBWIj/58rcPD5ryzc9MrG6bH8yJe40VI6dBjcrZ10RuqTCI1uthNS0iU98saykuSEwMTY7rDvWP3R5taIXf5MNPb32k5wGS0a+VNj+sKXe6RnrrDgI3ohGHKpPP1Jd26D3/LDtEWn7ADdq0agG3qjXC7/ywcoHyc5HSHNdbAd4XYk0IF0xjmAzky38XbgXDv00J+D59UBHfb8k6dJQWU9ZqbAObersWDPoTKT7qvhvD2fjlPg3I6T0aNeYc/rd+ioiWvU1MRVpNV2O4Qe1HprZT0I06/7S8oI3W5zT15rrd1eX+Wv5cmCo9P52fz0aGMtXL7Kt2ExstfbahE9Br8SK/AjlxzozFby4qTL7N4am/aw1KO/l2Bl8a/jTp4FB5IzsfZONOaXAzSsceDcU7ow+MMOnkV+mzLiqbvg9XBT8ZviCR226CA4ZwcyVy3QOTQeCsiGN8d3DXMbaA9oDpyD5saeI3tOn8CfC9Dhz3XAHbI4B82rAzoK0L/51+P9FFTWY2bu6vZz4BxK6AOTDhKbZjVVDYf0ueG5HfVav0NHTdwvVk1NXKOW1+u4Db4tNdBhcIFHze6tzBS5Zz6wjsp2nGbgcg4ct+zr2xG9YaEROAeEmdH4dzfzYX0UsRc/MOc36L+5qQr2HCUCAPzKHDojmCgMsIekDs+F4px5QPM4zmHP+bDhdlTEBf486tBvBQF3qLIcOuz59w+n+6kKnesxMyp9Dp4L0pMC6bNJaNLxrkDVcONhbO9z5M/DUa/1Ax01cY2amrhq1GgJQu4at5DLKKydOuvlOyqvrtjcMdc7Z1cUdjyEsAPQ84D7FirkCiW9vD4P8YTdXY34pAe8V+rQhcT04T9XEa+mi03eHOa8DOdh+hyxdsVz+HPgHNI4B88rdujIcD85+OfB3t5TUNmadIVz8JyViEWPmnQ0qx1MyZ7rca+6Ii4c9Vo/0K9eE9eoqYlr1AAduA3YzdH1Ui/vuLwNlLdC2hs5cgXhxCGJX/wCl+xE7rbrr/f0h9sfpbDoHExA11qFQAeJQfTnPw/rgv8Q5uU4163ncXuu/bkI/jzMn9sEeqVAB3LJnk8f7vnhOo8TbdLVmJli3KsJuCdCdFZo0tGsNh3OLnAe8+eTcNRr/UBHTVyjpiZu0WrUWmktB9AZt0MX2vYwuh5Df79rQuShks3A7QPC8p7Adl1eJO7YfLjLOvxcFLlnN5VFdxn60qsEOsQ2nQ75PCdGP5cJMTiKP3D2+Rkr0DzAOey5bT9/V/NcuXN/wJ+D5mhBDw36s4odOpD7/NH04MGex7kfffeDprIaM5Mg3g6eFzC/xcdhkgxyk/4eTLo0q01H6X0l68/vWXtePdCbmrhGn9dWE9dolQvwX7WXA+hJ7nZFcpLZ3TVmnCfQZK4QitQYrSVl9GzHIUBYbts
311RuhOvI1n6ZBMheXr9uJNylJ562RCEv1kT0IF0MF1QHXwU0kNfDpqX4zxeDRdPn/+GDpU9h0OPN6BXmUNHf/jj/enXbM9529TvbxiT/lsx6br5XOfP4dAHMOm/45i9T81//OGTR/tTmiUzUzS39XCTVOw5rH3VQG9q4hp9EemPbrSG4vVFyaP87PiER9esLwPQHeO2N3A4gY5zm1h3A+5aUyvFXneMpYbQJ25i4qh7L9rUwGt6PRgFcPYUp9V4/Ui41Y2uQQ2Aqxzo7wRA1qF0kBsfrImhHGVwJTi3s17fjaTP4+PhNM3jBe6VOnT0hz8key48f0pd53cnas8VPWYmVuB+eJfN+SE7dC8x6R/5K2V0+zjVOI9nz82o16vrs/8N6E1NXKO/BD1VjVZPT7gnfpGanxejd46XJOSe8RgXUXbTIcdto+tsi+/syspRH5aaYV1SRt/th3Xvuc8f9miuTCLhc/bfQZp/G0CnqXDbM3kN8RehBqDi7VOJvkRiPqykeD2w6ArrGualNLfuPBwn449YeXswUIZxHuP5s2qBjvFtB9O/7lG4HTz32DYm/Q/FmBlNc23OD/nPIPGfAUz6p59Qs9o0uwGch+Ph7qlRr8B5tQ69qYlrtIAUOubCaG1cK5pj4tzaQp/hG9Rf5gNtT5egKI4NsrfYW8UUVg9ZdK2pxDo6xvxHVnZzwMI8l5TRqzWYQ5eRxp7n3PUm7A9fDwB03TTf74pFRw1AtUBnnjOILdWtA7ewl/1WMKedb1SKc50+B8pt93kYb4c7B8+Bczshrlqg5xHxh/v7D3KePyGeE84J2gOdSVdjZgZAesJEf5YkdxXNWTMx6dKsNgPPAXM1Hg6jXmHP3zSgr/8yauIavf36UXV8/kKPTz2fXzOey/asRwt9CGbPv9hYCqCbHVQy3e2dhpXvEGLkd/hraRm9XsMQxrsBfRn3XbEUXj4KdBTas1XnAbOoeK8S6P9P2AWLGc3YG019gynHKVloYW5pbnFu7flPd6vpeHu0/RxANwVx1eXQMb7t0f5Xewi3E88Z58TniTHpH4lJT5RBF6RLvD0ZFLrPrwPvo1ltJji3Bh2jXj/+htvkQtUfcm81NXG/DH3++sfKtFbXN+YvCpwfv1y/PkF97MFCWvh7iOy/urYUQGfcYt8Ucrpgt7bKSJcXKyUez1yNpdANvWW5Gh8vojtirzWQG0KTm2TJUWiP1wQ37KBLvXqgC87VF4G1P/BV/uqTwvIozemwONez2wFz2HMVbiekA+eXxsPx3zjPoYU4dJYGuoxve3yw/zfF8++F5888zwez+7nPViZdiuMUzaGc5vwHJv3v+7Dn0fFw4ajX2hx6UxPX6IvFBJZbcwH62fWiud417XThD5pzCn05+tC5dL3T3c01Hrh42htefntXlDp0lFmghzhWbegIAHQ69Me76+6QER4FOsrk+Qa8IH+eKyw6T7vZ7lcK9JYCusCZP7DtILeBPFbwUU5z1Xeu+s+1wHLLc50+Z6YH/WrgeXVAB9F9wdrD/a8e6PQ5/Dkh2YO4MOl0oRozIyad6+FusT8f0IGI+2DmD3/xaJTCnsOg6/y5HfVan0NvauIa/Xkx1dytI2YiKrivl+bsnNvVhPZPlwDo2HAlVdiOp71RfXZppSsHOvec20q3jLrcs+EujaMb9S8u73szHwCdmM1BdWwP49TPQRC+WodO9A1UBNSNNOnB9TKaxyvbQfOYPTe7qyl/Ht0wFTyvHuifTn79aP/rvSJ9/hTp81tsz2czMtRC9N/zFXrMjLLnh3QIzEF00iQdAOfB9mp59tyOeq3LoTc1cY3+tKixMqdi0K80Pb0ugNtnr535rdleLvyh6+ecQl8KoGPDldC2m1YwW33mMPOlLIeebZknoGstwZZueG6YQ9eZdRS3F+8SO4ObyNBX69DB81AIusOiy/c4yE3eHEKgHTRH8jxuzxXP9TgZ/jDNrxBvhwaLCLl/+o9v0wfR9HmS23OiLhw6S4+ZGUjU/ZDW0wf+nD4i0Bz2XOGc7Pn0APa8Xofe1MQ1entx0WSiVTkVFUWPauO5fXZrvV3BhPuXpSn0UG8q0OMbrrjBTmQDsySsPnNcFKeQHC+j9+Dtu9j4+BG1zOEdITZXBs3pzsnLAd8L2f9RfxtdaxU7dP4wkMsElIcsj1tzRNv1ULiwuN0WxEGM88Cgx3leR8jdA/1+PH1e8PzLcEtUNWZmkiTP0IB+KX1OAs9nJn8OnN/jUa+w51U49GZOXPVqtlpb5Y6sq9Bq5ezHGqrh8ezTOiL7iGEsg0OXPrAAoUE/OCbQmIh9aPBtGb19gisg7Abb2O4Fa/FcfVIi7sjtw6JvD3tosKvSoRNzyVMLjv3nauLr8Ddg+U+3nUOMcwizXk05HPrP4dBN/ryOkPtnDHSkzxFuTwYFz3WVO0TfYdITlrbnyqDf50+s/ZwOO+q1EodefU1co2artfWTK0bcV+c/ws5XKDy76l55vPQcvbUcDj2+4cqwozCtQ+faPiubbILzdgWegAAAl8n5c1mHc+JOvV5gUhx+DIbLmtw+b9nWRYa+UodewPedguogdKgwvs6X8Pq4NbdIL82eB5uxiEBzwDwcKFOPQ5/Y9PldsefE89CeK5NedLAdSvt5orLnkJndTgcK4oZ21Gu9Dr2piWv0q0VGk8tbuRVTX8DOV6Dan40U+nl7ORy6iw5ONXF4JL7NeHdMUt8e6LOG7sEUWQQAmPaw6Iiub8/UWnbxMrYduX210RsXyveSWhw6JGNgikx4ceiPP3AKrl5L0TwUcB7ac+BckA6cw6Brfx7G2+vKoU8ey/B21X0et+daeszMjP35Iey5NejxeHs46rV+oDc1cQ3QF9e1dgVarcx/hJ2vRvU/u8UvPa9WrujQ3RtKdNlwxVAake1Y4hsCnDu7WOsvnqWyCEH5jmlD57E1iWMme4ONWfCuKF1Xi/t4bHGvzKkf39lC3CBQBQ4dAqjpv+TQHzroC1x5KCmBA9MB87g7hz23e5+/r3Gu2s/jPK/Nof9k+vy777Q9t9JjZmDPWTDnl/y5LYdLx2qj1Nemz/57oDd7pzb64v8W2sn9avXn1qR5tlWaxq7/2UihL0XIHRuuXIhOFuyG1Mx0pcLi86g3PkH/SbqgdzBFFq5eb6+GNvIC8D3E4D3hx7Td+szhXty1hhttkRA3qMuhW2mOK7LHBWuO5HmQPY/w/LJBv5DhuTbosfx5XUB/79vJE5M+l261L609t9JjZu5f6lZTSFfj4e7pBPpkFI56rd+hNzVxzViZhWjjPDJrrbWqvrb0asb/i6idXy1WQjixyveD1N3Nv4T/gB/T4mcjlGCfYi+Pnm3pH1v6YHxbecVJieUAupPBqf1Csz7YPb4417/pis1TL59kyPaI6N20z4gfjHaMHc+2THE8StuKDPlWJ78CgN8ZFi8TyS71phVX5/dKcC83I4sOA1+pQ2cjzSTWksh6XPHzwnELcm3O37U4h4K91cxmLCX58zqBrtLnyUX6fBLY8zjUC5M+E5yD57q63Y6HM6Ne33yg/4e984eNHMnOuOi7zZnSzjMmGxiwgVVAMrhwBdiBHRg24OBgRzvok1o67OgSSYDgWwUCJtrFbDAj4GZHwASb58lNMrBDGzA2B8jivyK7Axf5sV+/6kcPVq2htkdTrxtCs8hikRPMr773Xr1yOXGurMx9rGrtRWtBGJeZGg6DJFONSj0c+XEG+udxaIw/kJdUtbmyLv2hoxeVVV1HiEBnSlXDPfr2bLgqqupGZXJ24CfmRFNXoYnwZ7WqQzm2HIUsiNJMNY2qq9jfY6+V0mv51mtZr9H1rNNwz+8HHq6IEUJ/HEBHzbbZU7LT2x7op13l13Vj51FHwTfWCIp2a89mKPj26vb21evTQywx42n0LMiNHkiTWyv8ddgc84Mnf3j1vDt4fvvU4BqCnUIBrCIt1r1hwAdW6J1rvOewoLoA+DjH0a/78J1XJM65jeOcZ8N9IbdL3d7fPmEM3QD9f8bC57T2XABXJMfZIp3kuUhvX+vz0VKvO5Dl7nLiXAh9GmOL1vwwSbN+4++iBBnrHqItwBabI1iRG1Mh3SOsmqI9+HJpzhj49ndpdNEOd03z7h6ZH8aGvqZ95Q7wqry/e75BSr9UerH88uigzZNeGzeeG
311NvDJuU0Cu9d63Z5dn20XLS6Z30Q0Wsl4HNd4LX8DZynTbFYnpmBmzjSbLfUtEVQ4nEodFOz7fCQNlzpF58jVG3sEI2Ab+/uNm2rxidMFv+AfVaedO2Mr0yO8yA332wdBO+69Ed4oq861X1qtmntZgcG4Dc0kFgB1697Q1nYB1boq2g3PvT9GYarQPEB6sJkyXYRPJfyHKvPpT4Hzrfk+TTL1v5ogE48/1/iOeT5v4/Jc2lUZoZVkxHL1aQ8/+8/o5bMrih0lxPn7LtfT79orcoNHtmi9BLnBm9z2LTGcGxsDTg/bdrF0fzy+GLZ++6rPNe4Tg2J6Z3ptFndHdOFSLULWG05H2JlqHp+cXx8OV/mqe4fTo4d1Hp1u9rqXaP3bHZ13b2IQXim8QRDWluA15K1dBLzQAcnV2bgk2WTtqzUa42gxKMAOnDLDAFqsJsM8DXubm4c289efYW7YBJw+pLOwIfOIcw3W6dHwL5pRPTT1XYx5u/sa7obvP6Q9qxqDRLmH16hw0hhg+tEdnxg7AyRnC9Nw18OdkTOxwrJcJYTzCXP7XIyW/IcNpVCNzgHzyl8jv1YhDwXJsrMAOiyPhxbrPaClXrdJaC7nDhn3061Cr0EFdP+d1Y37ZqRBqZ5s+a9V6ZpmnXndZUaSzhCT467/4rP+7lAGIeRuQ5A9LMVxdMqU3o9XYibhW4wHJPYwO3RxWH/f/u87S5o07GxwzipNF9wR6L/rO99+LvLs95DT68FJgdV0eaNTBzwUtN2fWU0p+l7UjSs1GvYHbTlXQnwj/+8o/a656YhMazzjRt2UyOs397sld04Q2o6sHrz9aw/af6c/vAbRlxUc+UQxnyh604V6E4PZ4cQ7Ljby9dfDXebPb19hmGgx7twvb3G7vkpHvrBFTrBGF/CONPqaGCMB8h5GTj+ByCXJAfNpTq3d2IR8lzsriZ5/ovF0DuFPrjbwfM7yXNZZuZPgDkPoL+wAuijpV53Isvd5cQ5ezNh/jaLD/v1YgWvtNBZFMQ9+lTAdxFVPnWHjF/ODUKNndCtwnwAYlVoQ1McBOaeq+lB3LQq8T1Fo8O8Ts8fXT6BXX7Zn47k2LB6o3eoWtP76slg88Wqg1fjEXqe6yoKErwWz6A3A+8fG5x3drXkE42kwFM8FoV+czvYze1NZ896l/tG4/Muf/2lvLI3JKPf/PD10z+cPn19a3C+OgGgd11IZYPLt+YObLH5S3O31VI33O1ld7enX7++Ac75vW5+Y92+74y+wqZX6FxUk+jmIt0W5wPg133FAjUgXdCcq3Ppbf87e2+1rfT5w8fQ+Wo1kuf/9s37cS5WsK3KzDCiS4+7LPW6Owrd5cQ5+2zaRWuk/6vVxmulzjusBw33agebzucg1R3PgcFeoQN8UQ4gJlqXPaQxRKwHSR01ReV3eOXghJ5nRJ5dsxV1Ph8bLY397LEyh2d9b2D5gGR2thonLfIEopvfDCvirlcTid8dn/G3rjAxeDQK/V+Y9UcbrTjauJLaYOj3zKQaPxvuIO8v2zaO5d1+6pPrxzvKvg9bKQ5AF1xmtCa8czHOrxH7qOGvNBk7B87JuDwXu6sRzQXPf2GFbu+VCnn+Hz9XnssyM38S7nYyWep1d4DucuKcff8Xe5NYvOl7rgdBHud5QsSnYHKY26HnoOpYfX44COoz4mtc9AI4bHSJLDeVQGRjuuCpogoItMrnPD9YE/mwB3omx+bx/4zepXvU5UUnsmFfHZGfXQ2ATnQT083alFWIHxwDsOMzflrhNo9DoXMobt/IwS218tj1skneDSbbxzs8vEIHf7k6l5gGyiXCIdQFzXucjya226vOBc5Jnsvd1cyX1Lnk+S+ZFEfFXn9i8vyuxsvM2NuxmA+T56KWzC5nubucOLd16gSL1mjFtSFxQsRfx4+TwhLUQdodXx8/gZ2swTfklK12UvFCMBv83guyIgvWNdJra3Pz+ROy4yMMLsaGlQWdJtF9gp4Q2iTwwxxXRk2erG9WJJznZipAdnmw9uVT57vaL6DQnU2q0A16BwjbTnfxi4NcVmi3PsIQOpfqnNEcH0Zzoc9JnjOe74BCR/h8a3kuy8wA6aTPpTzH7SdW6LuRE+fMlYkL2KI1vuI6qIuUJc3pyHI+B0RUDU1MAp0omPW8TAvlrUYifhvGp0Xt7wmhjAj7/oxzlQ1eUdRbhAcA5QWbXMCuVy+HyUDkKV2yeHwe8mnNOZT9OoYOXwN13m2F7mx6hW4w2+GcYfluhj7kZx+FOWXCSXX+94znTJ1zpP8r1qvdl+fPp1LoK3f7i7c8er6dQaSb5Dipz294qdePCujBJ5ET5+yNvzeFBQaohGieeFYVWcCg2Xic/xXRP+eaeHYOWlN0O48h88UeJ7FuQjZ/KBJ2OzjcYYc9V5Uvx6aW9emq5ZML9D9CTh1NRLJi1T9jr40MOTjcYbMLOA7EtZ+yQncKHcwFii2xPW5SktNv3EcuUiNfu/S3c3VuvnLxOXB+f30+pUIfeI6dWLaU56LMzNsNfS53Ytl5oPOcuG8d7h69fTdNShyc1qAwD6FXiVaeWILNctdhSFH/cgDh7AS1WtagVlmbjayRU2GjYz5/aDx2uxNO5LkIoScihF7xCrb7iOazSDiArnpHQAnHALn6K+6rn/Oe5/31YhYz6eYsu29OoVPIG1xmXEeD/OAUvwr93kdzm+V2IRmEz8eT26HOJc9hOwD0d334nOT5fWPYVGbmBdPnVOq
311VcL5bMXSXE+fs2zfe1IvWeAi9KBVaRPy4tMLYacsIfHm+NBdmHjtV5xDiZH4/XFYVRMd6rYSDvs/BJY+B7/dPI8dm04MiIeoKgX55AJc73kInDfnNI+4Z6J/q6JiNOzvCv4q41il0p9AJxWA6U+lCqhPo8aWu3ATNN/zt3Jg6t/dWg/FsOM7zHQL6h5HnsswMKfS3t2Inlp1U6C4nzlWJm37RGsLFTQbiyiXYGfjLhS0IfHjRI7DyGaiLpkhHhisqyH+Wgsdud44cdbYMPQ/l2NSC08A9j7/DLpZIisNZlRUpmwtQ11hDoIsQui+uvSPQnUJ/dAqd299Yip2pdqsZch4d7khzSHPmbJfe9p8hz0H0nYihvwPPIc+3B64sM/Pu3Qtbnn+DnVh2GOguJ85F0KdftIZYM4jLGixHdUop6SBwF3LeNwQsVLzHWV8UjTcyXA6Hu5guIAZ+JTzuKpBjs9lIvXLXg8qWnfSNNdDfKl37I9uhBhkCB6Jjds8Quu8U+iNV6ALpgur4EMe5SZiP05xnwsFsnI/Lc8nznVLoP724vzwXIv1vB5FOpV7lTiy7UynO1Ylz9v2v9qZctMZWZCHWXCCVTcaPI20t5oKTe3Y1v16aZmy0xkAt9xtN257zld3Q+OuA+DWPgWMVeiXHhlGRGhoQVOYee7ydj9fKqbcPzwDdBvOSjdVyKV2Lp3Aud6fQtzCJc2I5pLmgOYzUOUyocxk9vxfPpwf6NwbokOe//SDyXJSZeStLvX50Cv1zlxLnisRtbaj7xlZkhTlX7CITrUQKG4+gH5z3u5o1Wezb68noSmY1mkN7/IzNLeacx1dLDC7GZg+gY1LZoDLrTyH0SNupfwGfHWQi+H54scRpkYi/85XinE2p0A11u8+9jStzcHy0xOv/m9pONMdf6W7nPN8loPe2/4HkuSgz85ZKve480F1OnHO4T2Bi0VpZEOBlJhp3VEPMQ/eqOiWac13fpqPDFSVroGNfUUCep5q/L4RerycNXjPmcZ9jdgL0YyIhk+vDnKfE8YKznlyxfjf7h39y9uA2rUKHlr4n1IFv/ByJm0txLnGOP2LtueD5lvZ8OqD/12//+CF5zsvMvP1PWer148pyD1xO3OO3H4HX6RatMXdyxgW6wChzVBOdqzj0x7dklRBMCgKlqP0Wa+Fxv+oFthJjwwKP6r6iNw/Aw/ZXGfw1CXS5Fg//Bucyly6Tifh3s+Av/8rZg9ukCt0W1UDyz2M4udhtlqNBprVzmuMj1DmZXetVuNt3S6Hv/55w/sFF+jsmz3dYobucOBdAn3TRWsFDy3agGsHn1K4ix+k8rlzLlojIreK6nRqUWALHBfqikmOzB2hLNiCX2bRjWgb9zv0OaBi6ZkLbQ6C3qUzEv6MFe84ejwUG6AzIIDLkOj70pQ87psupp4A5c7VbOBcr1YjpE7jbpwT6/gTynJeZ+WuS5x8t0D9zwHM1X7c2nxat8dDyohaV3UQKGzFUJn9TRLtIRsvM5iFrIOHsy0g2dHKRyLFF3dcA04F9O4R+gguAfmt+Ees14JXQ9vMlm9YEcYE5z6duzqDQGYbJfw5oE9LJGNutSQBaxmlu41xuqiYrt5M853ulwnYM6FPIc15m5s+4/c4C3eXEOZ4jIW7yRWs8C73kUptjtOZXg6H1+Or20ZS4SKM/D6FTVpvg6vG11uC/GBum2ISiWgh9j0XsbYWz9vwibakrnvXsmPU7yws7hI4DZ06hkwHJ7LcNb3CfN8qOHOSS5iTOpTof97Zb4rz7wHYphv77ieQ5iXS423cd6C4nzunzCYx0bVvKNDMutYFRz+OO6sgTQBcThWrUEc+5WhI4/ajZXHZ2UmSasGuNzbZ1wSD+APS5XIRe+5gsWOo+qKlrGCEnbkbdDs91VtCbsRC6M6fQYTadidysgWOdneEma7uC5hzogubAOf6InVKFu32XFDqAOz1vP26ghy4n7lHbj7+aNA6LVWQ64sqay2CGUa+ue07j6qSJVy73DRFehbSeLJER+4HfMuOuavINoXyxzNJ2eJogLWNseIaxN/Y/9eo0FWvekFLXRBz9ci1eqOrNZLz5sspWUXO/KnkI3ZlT6MII8AzZIDi+/ApphuJcl8sdUmUuHBnRXC4+B893Aeh3MAd03+XEPWL79rs3QO3Ei9YgXTkjySJCeFZUWCmufNPc1L7Bu0yKS/I8ggDmt5XTBR5CT/vdzhSVkYVdHDRhvUJpqqvVtq0Y215NlukSUfI5r8a+351OyBHA8+niYujqZ7piq9awBL321PDPEJg7r5Pxwiz6xJHmFPoX0NPSBLnpx3th3uNcGED+xfvUOWA+mgwHlu8Y0B3QXU6cC59PHLiFxoZE5julyhA69i9XA5BD1YTgs61dvUrnyZgitgu0SKEc501k761ydZbHfjOgNNU1bY6GsS15n+pseJgTBvQ5eI4r8RYyhF4VGXour9hEIszBez8rsnUI3a9zB3Sn0JGGLqHO+f1+mH9hp7OPF3gV4hwcJ5FOON/O3T59DN0BfQsLPn+8OHPyfLrlaiySzDVzoPghh2apm5D2XfNqXXZXG/xzz3oQq7bpDgIh9GHVgEaxCj1qdIKhFte9Uj6cf2mGiJAT51eF8sB+GpvXpC37wvNZ33vGHOfguSjdyhPsUnNnHAy7uhzPl3mM51K+lxW1vw6hV/pT97s7hY4V4vTZwjAZwF3wtQ1xcynObXXOeS53VnMK/aMFusuJe6z249TyvCPhwlboEYi9ST4VVzqPB0d1WyWqSOlyY7or+uqHSa3bOhKxcmbKGoxC7WXZ6BR0N3Z9cXl5sb/U5TCeTlXbRDhLY68xnYWVbqLVw0DgQ2gvWiVLt9JcAK9VdF3TFkS/uDQ16ftJAHZXMwOrkJ46SHX9qS8rdwqdEEw0p1/WD3LMs9/oi48xoctHXe09zMdxPho8hzx3QP9IgR66ELrD+ZYWpvkCptNQbhPKgN7qNk9onVpRFFVAMwKcb1STFwtdeUCtEPpyY3Xm8tfmhujV23LZaetyvcHLoonk2MaaviVv83j9MGfwnB+fLOlpxtadqeG1mhgbw2HgAzNwgxfFwCpcuTF0rYruyJlT6MDy+teK1KS5V0btOEfxcjTbspxy2gXNAXSGc5ELJ3i+O0B3QHd14px99+az0KzEmtQSlUOYgooq80S1dGIhMEcauqh8Op0vyHQdUyYdX8wuqsKLZfAakI6bBQzaujuNg2hsbDytsWY1bNKYhz04ubi6ODlqC5XIMq9kldU1obco4GIoAfQ6pECBMRU5ojmFDpMKm4gNdrNj4Jw64KeEOY+bc2c7gZzhHDzfAucuhr7bQPcfX06cC51///mvISYnBrptHbyCTBmzQByqom3zDCzzssIwrykDhuQsL9pF22+2FlAjbiiAroxVvCWotOm6Qm8Q1eZw0RZNOij9uh88XI3dbozdmIs1TqN/1ZgbGIWv8yxZg9/vXyvh40aqaAvc2RztJUq3nWJXqc/euvJw0PTnXIa7MwZ0Ms5vRnguxRn5x2HefUmaywKv9i4s0tkuee4U+keq0F1O3OMyQ3MjzoOHUBuBH6zN9wO0GrOv85KyjAI6qKrEs+8TJmlVlbHVGnQmh5TNflyWMav3EpdVlWIEjJdi8PGxo7RKcZo6xGVq7hDzf8PRxwmTMgHO2cCxzwem02H3gpGLn/9fe+dx5UYMBFHas7yZBHTnXV4hIIQNR+4sn8H6zUcKBHgC+rWmFmysIzlagKyPHnp7+iw4JpjQnVQRVbc2LaXcy9635yabq9IBtnm9LJ63LHQKfbxNc+IYzQ8WM0imFrrydTCs6bobvhXMfdXjLnvlrvStCRO66w0ca1Wg8lRyGJ33Y+bunM3t4LnZ6bU2oX+ugHb+PnXS/hA6+fYtBvOTKPPJXXqDkKoTunNSCNY3MbuTZ6DJiQWr1AB0Xu5uRzyvaQz96OOWs2Ghv/v+lbTL9++/kskX89lkzBTYAIQJ3fV/mPIcDReWcFo6VG5zuRk3RzCXi7B5ls4LS9UqTOhHH/z/JqyPvwlnGxX67IQ0xoGwiMzns+k0mvzuiJAmYEJ3Eeg8E/tz3CRlGlSuDzSbwcHmAAvV7Lbtyp86hX4UfR6GM7cPtobCX8zpJoXe3SXt0Y1Gd+9iAhohpJ2EDuB1+BpNb4C99QKwMnfSgA3nms73YHPovDKhb8TnoVDhVvDp0PLg6SmETgghpLWEXiCfto4rZhL781zluc1Bvk4N9DpXoPO6xtDF54lrCDs0ik88O21P6IQQwoQu+gVQNPit5z+eu8t5pZXL3J
3110P51L5NjJLOgeVJXTJ52GLgdRPmxM6IYQwoauCpV3B88tcnjfYvDStHTqXZgbPqxR68vlukHrdWxM6IYQwob96pUaHlFNdU+aI46nkkllwDpsPqPPhhf7R7w7BP25M6IQQwoSO9WR67pDZf0DtPxyIN/cHfg0Yhwt7/YXhdT7oGPq9BzvF/cmIENIWhAldcam06cUILsP5cnnpsf9OFWdmwRW2kDE6VypI6KQbEUII2Tx/AfYS2o03cLLiAAAAAElFTkSuQmCC"}))),jkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{y:3,width:24,height:18,rx:3,fill:"#2D2D2D"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.92924 11.3641L4.78503 13.1267C4.7786 13.0562 4.77504 12.9849 4.77504 12.9128C4.77504 11.619 5.83771 10.5701 7.1486 10.5701C7.85782 10.5701 8.49434 10.8773 8.92924 11.3641ZM7.14863 8.81818C9.10417 8.81818 10.7434 10.1536 11.1818 11.951L9.50973 12.6726L9.50934 12.6691L7.7987 13.4109L3.69505 15.1818C3.25605 14.5323 3 13.752 3 12.9128C3 10.6513 4.85737 8.81818 7.14863 8.81818Z",fill:"#FFFFFE"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36363 15.6821C8.05946 17.247 6.33417 17.4005 4.81818 16.237L5.67471 14.5907C6.53735 15.2425 7.40394 15.1368 8.27455 14.2727L9.36363 15.6821Z",fill:"#FFFFFE"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1917 14.9842L11.1818 7H12.5872V14.7686C12.5872 14.8431 12.5957 14.9088 12.6866 14.9467L13.9091 15.4585L13.3583 17L11.9262 16.3478C11.3831 16.1005 11.1927 15.7421 11.1917 14.9842Z",fill:"#FFFFFE"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6364 14.5994C16.0782 14.189 15.7189 13.5484 15.7189 12.828C15.7189 12.1875 16.0032 11.6102 16.4583 11.2014L15.4966 9.72729C14.5299 10.4517 13.9091 11.5709 13.9091 12.828C13.9091 14.1829 14.6298 15.3783 15.7281 16.0909L16.6364 14.5994Z",fill:"#2191C3"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.3811 10.937C17.6237 10.839 17.8853 10.7853 18.158 10.7853C19.1411 10.7853 19.9795 11.4793 20.3069 12.4545L22.0909 12.2872C21.6603 10.2966 20.0634 8.81818 18.158 8.81818C17.6196 8.81818 17.1062 8.93722 16.6364 9.15144L17.3811 10.937Z",fill:"#FAEC32"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.2902 13.3636C20.2305 14.4872 19.1973 15.3817 17.9313 15.3817C17.7329 15.3817 17.5403 15.3594 17.3562 15.3181L16.6364 16.8147C17.0441 16.9343 17.4791 17 17.9313 17C20.1736 17 22.001 15.4082 22.0909 13.4146L20.2902 13.3636Z",fill:"#D0362B"})),$kt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{y:3,width:24,height:18,rx:3,fill:"#CA0018"}),x.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:8,y:8,width:8,height:9},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00002 8H15.9309V16.9056H8.00002V8Z",fill:"white"})),x.createElement("g",{mask:"url(#mask0)"},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5197 8C14.3463 9.21559 14.151 10.4075 13.9552 11.5988C12.6979 11.6131 11.4143 11.666 10.2014 11.5683C10.4306 10.4029 10.5949 9.16716 10.8224 8H9.46764C8.98271 10.9731 8.5415 13.9936 8.00002 16.9056H9.38293C9.59991 15.4117 9.80276 13.9027 10.0885 12.4833C11.2677 12.4519 12.6809 12.3972 13.8142 12.5139C13.5805 13.9896 13.2981 15.4127 13.0802 16.9056H14.4633C14.9076 13.8886 15.3758 10.8974 15.9309 8H14.5197Z",fill:"#FEFEFE"}))),Wkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{y:3,width:24,height:18,rx:3,fill:"#353A48"}),x.createElement("circle",{cx:9,cy:12,r:5,fill:"#ED0006"}),x.createElement("circle",{cx:15,cy:12,r:5,fill:"#F9A000"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 16.0004C13.2144 15.0882 14 13.6359 14 12C14 10.3642 13.2145 8.9119 12 7.99969C10.7856 8.9119 10 10.3642 10 12.0001C10 13.6359 10.7855 15.0882 12 16.0004Z",fill:"#FF5E00"})),Gkt=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 320",width:"1em",height:"1em",...e},x.createElement("defs",null,x.createElement("style",null,"      .cls-1 {        fill: #00eb5e;      }      .cls-2 {        fill: #221c46;      }    ")),x.createElement("g",{id:"BG"},x.createElement("rect",{className:"cls-1",width:320,height:320})),x.createElement("g",{id:"X"},x.createElement("polygon",{className:"cls-2",points:"160 108.284834 131.715166 80 80 80 80 131.715166 108.284834 160 80 188.284834 80 240 131.715166 240 160 211.715166 188.284834 240 240 240 240 188.284834 211.715166 160 240 131.715166 240 80 188.284834 80 160 108.284834"}))),Kkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("rect",{x:.25,y:3.25,width:23.5,height:17.5,rx:2.75,fill:"#F7F7F7",stroke:"#C4C4C4",strokeWidth:.5}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4282 13.9103L13.1731 14.8606H11.4153C10.8578 14.8606 10.1774 14.6324 9.82778 14.1763C9.47819 13.7204 9.26084 12.8745 9.76166 11.535C10.2625 10.1951 11.4437 9.74835 12.5115 9.74835H14.4205C14.4205 9.74835 14.3731 10.0905 14.2599 10.3184C14.1466 10.5466 13.9954 10.7461 13.6739 10.7461H12.5778C12.228 10.7461 11.5288 10.8028 11.2737 11.5822C11.0184 12.3615 10.9431 12.9696 11.0374 13.3116C11.1319 13.6537 11.4143 13.9009 11.8217 13.9009C12.2292 13.9009 13.4282 13.9103 13.4282 13.9103Z",fill:"#0060AB"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.076 8.00006L16.284 11.4638C16.5907 11.4196 17.094 11.2942 17.5864 10.9363C18.3707 10.3662 18.5503 9.76744 18.5503 9.76744H20.2324C20.2324 9.76744 19.996 10.5559 19.0699 11.2592C18.1438 11.9623 17.4446 12.0765 17.4446 12.0765C17.4446 12.0765 18.1156 12.7415 18.5407 13.3403C18.966 13.9388 19.5709 14.8605 19.5709 14.8605H17.7848C17.7848 14.8605 17.4729 14.2904 16.925 13.5873C16.4952 13.036 16.2805 12.8001 16.0209 12.6138L15.5072 14.8605H14.0992C14.0992 14.8605 15.4978 8.66511 15.564 8.37064C15.6301 8.07598 15.8001 8.00006 15.9419 8.00006H17.076Z",fill:"#0060AB"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.28351 8.00946L5.00004 9.05471C5.00004 9.05471 6.03699 9.05287 7.21271 9.05082L5.8978 14.8701L7.41925 14.8604L8.74395 9.04795C9.67947 9.04632 10.4427 9.04529 10.5189 9.04529C10.7268 9.04529 10.8591 9.02
311626 10.9158 8.80751C10.9723 8.58918 11.0668 8.00946 11.0668 8.00946H5.28351Z",fill:"#0060AB"})),Ykt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 18V19C0 20.1046 0.895431 21 2 21H22C23.1046 21 24 20.1046 24 19V18H0Z",fill:"#EBAA3E"}),x.createElement("rect",{y:6,width:24,height:12,fill:"#F7F7F7"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90288 15.3501H5.2057L3.93302 10.3852C3.87261 10.1568 3.74435 9.95487 3.55568 9.85971C3.08484 9.62057 2.566 9.43024 2 9.33426V9.14311H4.73403C5.11136 9.14311 5.39436 9.43024 5.44153 9.76372L6.10187 13.3451L7.79822 9.14311H9.44824L6.90288 15.3501ZM10.3916 15.3501H8.78873L10.1086 9.14311H11.7114L10.3916 15.3501ZM13.7851 10.8627C13.8323 10.5284 14.1153 10.3372 14.4454 10.3372C14.9643 10.2892 15.5294 10.3852 16.0011 10.6235L16.2841 9.28714C15.8124 9.09599 15.2936 9 14.8228 9C13.2671 9 12.1351 9.85976 12.1351 11.053C12.1351 11.9608 12.9369 12.4374 13.5029 12.7245C14.1153 13.0108 14.3511 13.202 14.3039 13.4883C14.3039 13.9178 13.8323 14.1089 13.3614 14.1089C12.7954 14.1089 12.2294 13.9658 11.7114 13.7266L11.4284 15.0638C11.9944 15.3022 12.6068 15.3982 13.1728 15.3982C14.9171 15.4453 16.0011 14.5864 16.0011 13.2972C16.0011 11.6736 13.7851 11.5785 13.7851 10.8627ZM21.6107 15.3501L20.338 9.14311H18.971C18.688 9.14311 18.405 9.33426 18.3107 9.62057L15.954 15.3501H17.604L17.9333 14.4432H19.9607L20.1493 15.3501H21.6107ZM19.2068 10.8147L19.6777 13.154H18.3578L19.2068 10.8147Z",fill:"#575DC1"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 3C0.89543 3 0 3.89543 0 5V6H24V5C24 3.89543 23.1046 3 22 3H2Z",fill:"#575DC1"})),Xkt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"-2 -2 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{d:"M4.26644 19C2.34725 19 0.763916 17.4167 0.763916 15.4975V9.21212V3.50253C0.763916 2.59091 1.14775 1.67929 1.77149 1.00758C2.44321 0.383838 3.35483 0 4.26644 0H16.2614C18.1806 0 19.7639 1.58333 19.7639 3.50253V9.5V15.4975C19.7639 16.4091 19.3801 17.3207 18.7563 17.9924C18.0846 18.6641 17.221 19 16.2614 19H4.26644Z",fill:"white"}),x.createElement("path",{d:"M4.26669 0.479736C2.63537 0.479736 1.24396 1.87115 1.24396 3.50246V9.21206V15.4974C1.24396 17.1287 2.58739 18.5201 4.26669 18.5201H16.2616C17.8929 18.5201 19.2844 17.1767 19.2844 15.4974V9.49994V3.50246C19.2844 1.87115 17.9409 0.479736 16.2616 0.479736H4.26669Z",fill:"#00A513"}),x.createElement("path",{d:"M19.2893 14.25H1.23932V15.525C1.23932 17.1819 2.58247 18.525 4.23932 18.525H16.2893C17.9462 18.525 19.2893 17.1819 19.2893 15.525V14.25Z",fill:"#9F8D5F"}),x.createElement("path",{d:"M5.12999 16.1692C5.32191 16.0732 5.41787 15.9293 5.41787 15.7374C5.41787 15.4975 5.22595 15.2096 4.74615 15.2096H3.83453V17.2727H4.84211C5.46585 17.2727 5.56181 16.8889 5.56181 16.649C5.56181 16.4571 5.41787 16.2651 5.12999 16.1692ZM4.31433 15.6414H4.60221C4.79413 15.6414 4.84211 15.7374 4.84211 15.8813C4.84211 15.9773 4.74615 16.1212 4.60221 16.1212H4.31433V15.6414ZM4.60221 16.9369H4.31433V16.4571H4.65019C4.84211 16.4571 4.98605 16.553 4.98605 16.697C4.98605 16.8889 4.89009 16.9369 4.60221 16.9369ZM6.5214 15.8813C6.08958 15.8813 5.80171 16.1692 5.80171 16.601C5.80171 17.0328 6.13756 17.3207 6.61736 17.3207C6.71332 17.3207 7.0012 17.3207 7.2411 17.1288V16.8409C7.04918 16.9848 6.90524 17.0328 6.71332 17.0328C6.42544 17.0328 6.2815 16.8889 6.23352 16.649H7.2411C7.28908 16.1692 6.95322 15.8813 6.5214 15.8813ZM6.2815 16.4571C6.2815 16.2651 6.42544 16.1692 6.56938 16.1692C6.7613 16.1692 6.85726 16.2651 6.85726 16.4571H6.2815ZM8.44059 15.8813C8.24867 15.8813 8.10474 15.9293 8.00878 16.1212V15.9293H7.57696V17.3207H7.9608V16.4091C8.05676 16.2172 8.15272 16.1692 8.24867 16.1692C8.39261 16.1692 8.48857 16.2651 8.48857 16.4571V17.3207H8.92039V16.4571C8.92039 16.0253 8.63251 15.8813 8.44059 15.8813ZM9.87999 15.9293C9.49615 15.9293 9.25625 16.2172 9.25625 16.601C9.25625 16.9848 9.49615 17.3207 9.92797 17.3207C10.1679 17.3207 10.3118 17.2727 10.4557 17.1768V16.9369C10.3118 17.0328 10.1679 17.0808 9.97595 17.0808C9.73605 17.0808 9.54413 16.9369 9.49615 16.649H10.4557C10.4557 16.1692 10.2638 15.9293 9.87999 15.9293ZM9.54413 16.505C9.59211 16.3131 9.68807 16.1692 9.92797 16.1692C10.1199 16.1692 10.2158 16.3131 10.2638 16.505H9.54413ZM10.9835 15.3535C10.8876 15.4495 10.7916 15.5934 10.7916 15.8333V15.9293H10.5997V16.1692H10.7916V17.2727H11.0795V16.1692H11.3194V15.9293H11.0795V15.8333C11.0795 15.6414 11.1275 15.4975 11.3674 15.4975C11.4153 15.4975 11.4633 15.4975 11.5113 15.5455V15.2576C11.2234 15.2096 11.0795 15.2576 10.9835 15.3535ZM11.5113 15.7854H11.6552L11.9911 15.3535H11.7032L11.5113 15.7854ZM11.5113 17.3207H11.7992V15.9773H11.5113V17.3207ZM12.3749 16.649C12.3749 16.3611 12.5669 16.1692 12.8068 16.1692C12.9027 16.
3111692 13.0467 16.2172 13.1906 16.3131V16.0253C13.0467 15.9773 12.9507 15.9293 12.8068 15.9293C12.3749 15.9293 12.135 16.2172 12.135 16.649C12.135 17.0328 12.4229 17.3207 12.8068 17.3207C12.9507 17.3207 13.1426 17.2727 13.1906 17.2247V16.9369C13.0467 16.9848 12.9507 17.0328 12.8547 17.0328C12.5669 17.0808 12.3749 16.9369 12.3749 16.649ZM13.6224 15.4015C13.5265 15.4015 13.4785 15.4495 13.4785 15.5455C13.4785 15.6414 13.5744 15.6894 13.6224 15.6894C13.7184 15.6894 13.7664 15.5934 13.7664 15.5455C13.8143 15.4495 13.7184 15.4015 13.6224 15.4015ZM13.5265 17.3207H13.8143V15.9773H13.5265V17.3207ZM14.8219 15.9293C14.4381 15.9293 14.1022 16.2172 14.1022 16.601C14.1022 17.0328 14.3901 17.3207 14.8219 17.3207C15.2537 17.3207 15.5416 17.0328 15.5416 16.601C15.5416 16.2172 15.2057 15.9293 14.8219 15.9293ZM14.7739 17.1288C14.534 17.1288 14.3421 16.9369 14.3421 16.649C14.3421 16.4091 14.534 16.2172 14.7739 16.2172C15.0618 16.2172 15.2537 16.4091 15.2537 16.649C15.2537 16.9369 15.0618 17.1288 14.7739 17.1288ZM16.3573 16.553C16.1174 16.4091 16.0214 16.3611 16.0214 16.2652C16.0214 16.1692 16.0694 16.1212 16.2133 16.1212C16.3093 16.1212 16.4532 16.1692 16.5972 16.2652V15.9773C16.4532 15.8813 16.3093 15.8813 16.2133 15.8813C15.9254 15.8813 15.7815 16.0253 15.7815 16.2652C15.7815 16.649 16.4052 16.7449 16.4052 16.9369C16.4052 17.0328 16.3093 17.0808 16.2133 17.0808C16.1174 17.0808 15.9254 17.0328 15.7815 16.8889V17.1768C15.9734 17.2727 16.0694 17.3207 16.2613 17.3207C16.5012 17.3207 16.6931 17.1768 16.6931 16.9369C16.6931 16.7929 16.5972 16.697 16.3573 16.553Z",fill:"white"}),x.createElement("path",{d:"M9.73642 5.46973L7.86521 10.9874H7.81723L6.76167 7.53286H3.78693C4.93844 10.2197 5.17834 10.9394 6.13794 13.4824H9.49652C10.3122 11.5152 11.1758 9.50004 12.0395 7.53286H12.7112C13.3349 7.53286 13.7667 7.6768 13.7667 8.25256C13.7667 8.92428 12.999 8.97226 12.4233 8.97226C12.2314 8.97226 12.1834 8.92428 12.0395 8.92428L13.4309 13.4824H16.5975C16.0698 12.3308 15.6859 11.2273 15.2541 10.0758C16.2137 9.596 16.6455 8.82832 16.6455 7.96468C16.6455 6.42933 15.6379 5.42175 13.6708 5.42175H9.73642V5.46973Z",fill:"white"})),Zkt=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"#1f9d55",width:"1em",height:"1em",...e},x.createElement("path",{fillRule:"evenodd",d:"M5.02 11.419L4.691 10H2.808l-.327 1.419a.75.75 0 1 1-1.462-.338L2.407 5.07a1.379 1.379 0 0 1 2.686 0l1.388 6.012a.75.75 0 1 1-1.462.338m-1.27-5.5l.597 2.58H3.155zM14.5 4.75a.75.75 0 0 0-1.5 0v6.5a.75.75 0 0 0 1.5 0zM8.25 4a.75.75 0 0 0-.75.75v6.5a.75.75 0 0 0 1.5 0V9.5h.5a2.75 2.75 0 0 0 0-5.5zM9.5 8H9V5.5h.5a1.25 1.25 0 0 1 0 2.5",clipRule:"evenodd"})),kK=e=>x.createElement("svg",{className:"MuiSvgIcon-root",focusable:"false",viewBox:"0 0 24 24","aria-hidden":"true",width:"1em",height:"1em",...e},x.createElement("g",{id:"surface1"},x.createElement("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(29.411765%,72.156863%,66.27451%)",fillOpacity:1},d:"M 5.277344 18.335938 C 6.21875 18.335938 7.101562 17.972656 7.765625 17.304688 L 11.363281 13.710938 C 11.613281 13.457031 12.054688 13.457031 12.304688 13.710938 L 15.914062 17.320312 C 16.582031 17.984375 17.464844 18.351562 18.40625 18.351562 L 19.113281 18.351562 L 14.558594 22.902344 C 13.136719 24.324219 10.832031 24.324219 9.410156 22.902344 L 4.84375 18.335938 Z M 18.40625 5.621094 C 17.464844 5.621094 16.582031 5.984375 15.914062 6.652344 L 12.308594 10.261719 C 12.046875 10.519531 11.621094 10.519531 11.363281 10.257812 L 7.765625 6.664062 C 7.101562 6 6.21875 5.632812 5.277344 5.632812 L 4.84375 5.632812 L 9.410156 1.066406 C 10.832031 -0.355469 13.136719 -0.355469 14.558594 1.066406 L 19.113281 5.621094 Z M 18.40625 5.621094 "}),x.createElement("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(29.411765%,72.156863%,66.27451%)",fillOpacity:1},d:"M 1.066406 9.410156 L 3.785156 6.691406 L 5.277344 6.691406 C 5.925781 6.691406 6.558594 6.953125 7.019531 7.410156 L 10.613281 11.007812 C 10.949219 11.34375 11.390625 11.511719 11.835938 11.511719 C 12.277344 11.511719 12.71875 11.34375 13.054688 11.007812 L 16.664062 7.398438 C 17.121094 6.941406 17.757812 6.675781 18.40625 6.675781 L 20.171875 6.675781 L 22.902344 9.410156 C 24.324219 10.832031 24.324219 13.136719 22.902344 14.558594 L 20.171875 17.292969 L 18.40625 17.292969 C 17.757812 17.292969 17.121094 
31117.03125 16.664062 16.570312 L 13.054688 12.960938 C 12.402344 12.3125 11.265625 12.3125 10.613281 12.964844 L 7.019531 16.558594 C 6.558594 17.015625 5.925781 17.28125 5.277344 17.28125 L 3.785156 17.28125 L 1.066406 14.558594 C -0.355469 13.136719 -0.355469 10.832031 1.066406 9.410156 "}))),Htr={1:{orderBy:"created_at",order:"desc"},2:{orderBy:"created_at",order:"desc"},3:{orderBy:"created_at",order:"asc"},4:{orderBy:["scheduled_date","scheduled_period","created_at"],order:["desc","desc","desc"]},5:{orderBy:["scheduled_date","scheduled_period","created_at"],order:["desc","desc","desc"]},6:{orderBy:["scheduled_date","scheduled_period","created_at"],order:["desc","desc","desc"]},7:{orderBy:["updated_at","created_at"],order:["asc","asc"]},8:{orderBy:["updated_at","created_at"],order:["asc","asc"]},9:{orderBy:["updated_at","created_at"],order:["asc","asc"]}},Bt={waiting_confirmation:{name:"Pendente",status:"waiting_confirmation",alwaysVisible:!0,option:1,color:"#a0c4ff",textColor:"#002f7c",twColor:"blue",priority:1,module:At.DELIVERY_MODULE},pending_payment:{name:"Pagamento pendente",status:"pending_payment",alwaysVisible:!0,option:1,color:"#a0c4ff",textColor:"#002f7c",twColor:"blue",priority:1},pending_online_payment:{name:"Aguardando pagamento",status:"pending_online_payment",alwaysVisible:!0,option:1,color:"#a0c4ff",textColor:"#002f7c",twColor:"blue",priority:2},ready:{name:"Pronto",status:"ready",alwaysVisible:!0,option:1,color:"#ffd6a5",textColor:"#7e4500",twColor:"orange",priority:3},confirmed:{name:"Em preparação",status:"confirmed",alwaysVisible:!0,option:1,color:"#ffd6a5",textColor:"#7e4500",twColor:"orange",priority:4},released:{name:"Saiu para entrega",status:"released",alwaysVisible:!0,option:2,color:"#f9dc5c",textColor:"#635104",twColor:"teal",priority:5,module:At.DELIVERY_MODULE},delivered:{name:"Entregue",status:"delivered",alwaysVisible:!0,option:2,color:"#f9dc5c",textColor:"#635104",twColor:"teal",priority:5,module:At.DELIVERY_MODULE},waiting_to_catch:{name:"Esperando retirada",status:"waiting_to_catch",alwaysVisible:!0,option:2,color:"#bef264",textColor:"#3f6212",twColor:"indigo",priority:5},scheduled_confirmed:{name:"Agendado",status:"scheduled_confirmed",alwaysVisible:!1,option:1,color:"#BDB2FF",textColor:"#130082",twColor:"purple",priority:6},closed:{name:"Concluído",status:"closed",alwaysVisible:!1,option:2,color:"#6ee7b7",textColor:"#065f46",twColor:"green",priority:7},canceling:{name:"Cancelando",status:"canceling",alwaysVisible:!0,option:2,color:"#fc7979",textColor:"#6d0202",twColor:"red",priority:8},waiting_cancellation_approval:{name:"Cancelamento solicitado",status:"waiting_cancellation_approval",alwaysVisible:!1,option:2,color:"#FFBF00",textColor:"#CD7F32",twColor:"red",priority:1},canceled:{name:"Cancelado",status:"canceled",alwaysVisible:!1,option:2,color:"#ffadad",textColor:"#800000",twColor:"red",priority:9}},Lm=["refunded","cancelled","refunding","abandoned","denied"],mr={money:{id:"money",name:"Dinheiro",shortName:"Dinheiro",order:0,icon:Tkt},credit_card:{id:"credit_card",name:"Cartão de crédito",shortName:"Crédito",order:1,icon:As},debit_card:{id:"debit_card",name:"Cartão de débito",shortName:"Débito",order:2,icon:As},pix:{id:"pix",name:"Pix",shortName:"Pix",order:3,icon:LF},pix_auto:{id:"pix_auto",name:"Pix automático",shortName:"Pix auto",order:3,icon:kK},meal_voucher:{id:"meal_voucher",name:"Vale Refeição",shortName:"Vale Ref",order:4,icon:MF},food_voucher:{id:"food_voucher",name:"Vale Alimentação",shortName:"Vale Ali",order:5,icon:MF},bank_transfer:{id:"bank_transfer",name:"Transferência",shortName:"Transf",order:6,icon:dIe},bank_slip:{id:"bank_slip",name:"Boleto",shortName:"Boleto",order:7,icon:tS},picpay:{id:"picpay",name:"PicPay",shortName:"PicPay",order:8,icon:LF},debt_book:{id:"debt_book",name:"Fiado",shortName:"Fiado",order:9,icon:Rkt},online_credit_card:{id:"online_credit_card",name:"Cartão de crédito online",shortName:"Crédito online",order:10,icon:As},ifood:{id:"ifood",name:"Pago via iFood",shortName:"iFood",order:11,icon:As},ifood_voucher:{id:"ifood_voucher",name:"Pago via iFood (Voucher)",shortName:"iFood Voucher",order:12,icon:As},food99:{id:"food99",name:"Pago via 99Food",shortName:"99Food",order:13,icon:As},food99_voucher:{id:"food99_voucher",name:"Pago via 99Food (Voucher)",shortName:"99Food Voucher",order:14,icon:As},keeta:{id:"keeta",name:"Pago via Keeta",shortName:"Keeta",order:15,icon:As},keeta_voucher:{id:"keeta_voucher",name:"Pago via Keeta (Voucher)",shortName:"Keeta Voucher",order:16,icon:As},aiqfome:{id:"aiqfome",name:"Pago via Aiqfome",shortName:"Aiqfome",order:17,icon:As},pos_credit_card:{id:"pos_credit_card",name:"Cartão de crédito POS",shortName:"Crédito POS",order:18,icon:As,displayFeeField:!1,displayObservationField:!1},pos_debit_card:{id:"pos_debit_card",name:"Cartão de débito POS",shortName:"Débito POS",order:19,icon:As,displayFeeField:!1,displayObservationField:!1},pos_pix:{id:"pos_pix",name:"Pix POS",shortName:"Pix POS",order:20,icon:LF,displayFeeField:!1,displayObservationField:!1},pos_voucher:{id:"pos_voucher",name:"Vale Refeição POS",shortName:"Vale Ref POS",order:21,icon:MF,displayFeeField:!1,displayObservationField:!1}},P4=[mr.online_credit_card.id,mr.pix_auto.id,mr.ifood.id,mr.ifood_voucher.id,mr.food99.id,mr.food99_voucher.id,mr.keeta.id,mr.keeta_voucher.id,mr.aiqfome.id,mr.pos_credit_card.id,mr.pos_debit_card.id,mr.pos_pix.id,mr.pos_voucher.id],XC=[mr.pos_credit_card.id,mr.pos_debit_card.id,mr.pos_voucher.id],Utr=[mr.ifood.id,mr.ifood_voucher.id,mr.food99.id,mr.food99_voucher.id,mr.keeta.id,mr.keeta_voucher.id,mr.aiqfome.id,mr.pos_credit_card.id,mr.pos_debit_card.id,mr.pos_pix.id,mr.pos_voucher.id],EV={catalog:"Site",portal:"Portal",import:"Importação",ifood:"iFood",food99:"99Food",keeta:"Keeta",aiqfome:"Aiqfome",whatsapp_extension:"Extensão",chatbot:"Chatbot",integration:"Integração",totem:"Totem"},Bc={ifood:"iFood",food99:"99Food",aiqfome:"Aiqfome",keeta:"Keeta",integration:"Integração"},kI={visa:Ykt,master:Wkt,elo:jkt,amex:Hkt,hiper:$kt,diners:qkt,banrisul:Vkt,alelo:zkt,ticket:Kkt,vr:Xkt,pluxee:Gkt,banricard:Ukt},Qkt={visa:"Visa",master:"Mastercard",elo:"Elo",amex:"American Express",hiper:"Hi
311percard",diners:"Diners Club",banrisul:"Banrisul",alelo:"Alelo",ticket:"Ticket",vr:"VR",pluxee:"Pluxee (Sodexo)",banricard:"Banricard"},Vtr=Object.keys(kI).map(e=>({key:e,name:Qkt[e],Icon:kI[e]})),she={ifood:{icon:II,iconSizeClass:"w-32 h-auto",textColorClass:"text-red",borderColorClass:"border-red"},food99:{icon:Fkt,iconSizeClass:"w-24 h-auto",textColorClass:"text-orange",borderColorClass:"border-orange"},aiqfome:{icon:Lkt,iconSizeClass:"w-24 h-auto",textColorClass:"text-purple-dark",borderColorClass:"border-purple-dark"},keeta:{icon:Bkt,iconSizeClass:"w-40 h-auto",textColorClass:"text-gray-700",borderColorClass:"border-gray-700"},integration:{icon:Zkt,iconSizeClass:"w-24 h-auto",textColorClass:"text-green-dark",borderColorClass:"border-green-dark"}};var FF,lhe;function Jkt(){if(lhe)return FF;lhe=1;var e=JTe(),t=co();function r(n,i,a,o){return n==null?[]:(t(i)||(i=i==null?[]:[i]),a=o?void 0:a,t(a)||(a=a==null?[]:[a]),e(n,i,a))}return FF=r,FF}var eNt=Jkt();const Nu=et(eNt);function tNt(e,t){const r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+r+", "+n+", "+i+", "+t+")"}var hE={},che;function rNt(){if(che)return hE;che=1;var e=$t(),t=Wt();Object.defineProperty(hE,"__esModule",{value:!0}),hE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.42 0 2.13.54 2.39 1.4.12.4.45.7.87.7h.3c.66 0 1.13-.65.9-1.27-.42-1.18-1.4-2.16-2.96-2.54V4.5c0-.83-.67-1.5-1.5-1.5S10 3.67 10 4.5v.66c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-1.65 0-2.5-.59-2.83-1.43-.15-.39-.49-.67-.9-.67h-.28c-.67 0-1.14.68-.89 1.3.57 1.39 1.9 2.21 3.4 2.53v.67c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-.65c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}),"AttachMoneyRounded");return hE.default=i,hE}var nNt=rNt();const jg=et(nNt);var pE={},uhe;function iNt(){if(uhe)return pE;uhe=1;var e=$t(),t=Wt();Object.defineProperty(pE,"__esModule",{value:!0}),pE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.88-11.71L10 14.17l-1.88-1.88a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l2.59 2.59c.39.39 1.02.39 1.41 0L17.3 9.7c.39-.39.39-1.02 0-1.41-.39-.39-1.03-.39-1.42 0z"}),"CheckCircleOutlineRounded");return pE.default=i,pE}var aNt=iNt();const NK=et(aNt);var mE={},dhe;function oNt(){if(dhe)return mE;dhe=1;var e=$t(),t=Wt();Object.defineProperty(mE,"__esModule",{value:!0}),mE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM17 14H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-3H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-3H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1z"}),"CommentRounded");return mE.default=i,mE}var sNt=oNt();const fIe=et(sNt);var vE={},fhe;function lNt(){if(fhe)return vE;fhe=1;var e=$t(),t=Wt();Object.defineProperty(vE,"__esModule",{value:!0}),vE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");return vE.default=i,vE}var cNt=lNt();const uNt=et(cNt);var gE={},hhe;function dNt(){if(hhe)return gE;hhe=1;var e=$t(),t=Wt();Object.defineProperty(gE,"__esModule",{value:!0}),gE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");return gE.default=i,gE}var fNt=dNt();const hIe=et(fNt);var yE={},phe;function hNt(){if(phe)return yE;phe=1;var e=$t(),t=Wt();Object.defineProperty(yE,"__esModule",{value:!0}),yE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm10 15H5c-.55 0-1-.45-1-1v-1h16v1c0 .55-.45 1-1 1zm1-5H4V9c0-.55.45-1 1-1h4.08L7.6 10.02c-.33.45-.23 1.08.22 1.4.44.32 1.07.22 1.39-.22L12 7.4l2.79 3.8c.32.44.95.54 1.39.22.45-.32.55-.95.22-1.4L14.92 8H19c.55 0 1 .45 1 1v5z"}),"RedeemRounded");return yE.default=i,yE}var pNt=hNt();const mNt=et(pNt);var _E={},mhe;function vNt(){if(mhe)return _E;mhe=1;var e=$t(),t=Wt();Object.defineProperty(_E,"__esModule",{value:!0}),_E.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H8V2c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6c-.55 0-1-.45-1-1V8h14v10c0 .55-.45 1-1 1zM8 10h3c.55 0 1 .45 1 1v3c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1z"}),"TodayRounded");return _E.default=i,_E}var gNt=vNt();const wV=et(gNt);var bE={},vhe;function yNt(){if(vhe)return bE;vhe=1;var e=$t(),t=Wt();Object.defineProperty(bE,"__esModule",{value:!0}),bE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L3.71 8.71C3.08 8.08 2 8.52 2 9.41V15c0 .55.45 1 1 1h5.59c.89 0 1.34-1.08.71-1.71l-1.91-1.91c1.39-1.16 3.16-1.88 5.12-1.88 3.16 0 5.89 1.84 7.19 4.5.27.56.91.84 1.5.64.71-.23 1.07-1.04.75-1.72C20.23 10.42 16.65 8 12.5 8z"}),"UndoRounded");return bE.default=i,bE}var _Nt=yNt();const BF=et(_Nt);function R4(){const{data:e,error:t,mutate:r,isLoading:n}=Jc("/api/v2/company/delivery_men?q[active_true]=1",wm,{dedupingInterval:15e3,revalidateOnFocus:!1,revalidateOnReconnect:!1});return{data:e,isLoading:n,isError:t,mutate:r}}const bNt={},ghe=e=>{let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(g=>g(t,p))}},i=()=>t,l={setState:n,getState:i,getInitialState:()=>c,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(bNt?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},c=t=e(n,i,l);return l},ENt=e=>e?ghe(e):ghe;var zF={exports:{}},HF={},yhe;function wNt(){if(yhe)return HF;yhe=1;var e=Dt(),t=yEe();
311function r(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return HF.useSyncExternalStoreWithSelector=function(c,d,f,h,p){var g=a(null);if(g.current===null){var _={hasValue:!1,value:null};g.current=_}else _=g.current;g=s(function(){function E(N){if(!S){if(S=!0,P=N,N=h(N),p!==void 0&&_.hasValue){var M=_.value;if(p(M,N))return O=M}return O=N}if(M=O,n(P,N))return M;var F=h(N);return p!==void 0&&p(M,F)?(P=N,M):(P=N,O=F)}var S=!1,P,O,I=f===void 0?null:f;return[function(){return E(d())},I===null?void 0:function(){return E(I())}]},[d,f,h,p]);var b=i(c,g[0],g[1]);return o(function(){_.hasValue=!0,_.value=b},[b]),l(b),b},HF}var _he;function SNt(){return _he||(_he=1,zF.exports=wNt()),zF.exports}var CNt=SNt();const xNt=et(CNt),DK={},{useDebugValue:TNt}=u,{useSyncExternalStoreWithSelector:ANt}=xNt;let bhe=!1;const PNt=e=>e;function RNt(e,t=PNt,r){(DK?"production":void 0)!=="production"&&r&&!bhe&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),bhe=!0);const n=ANt(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return TNt(n),n}const Ehe=e=>{(DK?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?ENt(e):e,r=(n,i)=>RNt(t,n,i);return Object.assign(r,t),r},kh=e=>e?Ehe(e):Ehe;var qtr=e=>((DK?"production":void 0)!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`."),kh(e));const ONt=kh(e=>({open:!1,data:{},setOpen:t=>e(()=>({open:!0,data:t})),setClose:()=>e(()=>({open:!1}))}));function MK(){return ONt(t=>t.setOpen)}const jtr=[{id:"monday",label:"Segunda"},{id:"tuesday",label:"Terça"},{id:"wednesday",label:"Quarta"},{id:"thursday",label:"Quinta"},{id:"friday",label:"Sexta"},{id:"saturday",label:"Sábado"},{id:"sunday",label:"Domingo"}],$tr=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Wtr=[.5,1,1.5,2,2.5,3,3.5,4,4.5,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],Gtr={DELETE_ALL:"exclude",TRANSFER:"convert"},Ktr=[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80],Ytr=[1,2,3,4,5,6,7,8,9,10],_p={LOYALTY:"loyalty",CASHBACK:"cashback"};var pIe=Symbol.for("immer-nothing"),whe=Symbol.for("immer-draftable"),Hs=Symbol.for("immer-state");function Cu(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lc=Object,K1=lc.getPrototypeOf,NI="constructor",O4="prototype",SV="configurable",DI="enumerable",dR="writable",ZC="value",mm=e=>!!e&&!!e[Hs];function Hd(e){return e?mIe(e)||k4(e)||!!e[whe]||!!e[NI]?.[whe]||N4(e)||D4(e):!1}var INt=lc[O4][NI].toString(),She=new WeakMap;function mIe(e){if(!e||!LK(e))return!1;const t=K1(e);if(t===null||t===lc[O4])return!0;const r=lc.hasOwnProperty.call(t,NI)&&t[NI];if(r===Object)return!0;if(!py(r))return!1;let n=She.get(r);return n===void 0&&(n=Function.toString.call(r),She.set(r,n)),n===INt}function I4(e,t,r=!0){w2(e)===0?(r?Reflect.ownKeys(e):lc.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function w2(e){const t=e[Hs];return t?t.type_:k4(e)?1:N4(e)?2:D4(e)?3:0}var UF=(e,t,r=w2(e))=>r===2?e.has(t):lc[O4].hasOwnProperty.call(e,t),CV=(e,t,r=w2(e))=>r===2?e.get(t):e[t],MI=(e,t,r,n=w2(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function kNt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var k4=Array.isArray,N4=e=>e instanceof Map,D4=e=>e instanceof Set,LK=e=>typeof e=="object",py=e=>typeof e=="function",VF=e=>typeof e=="boolean";function NNt(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Tf=e=>e.copy_||e.base_,FK=e=>e.modified_?e.copy_:e.base_;function xV(e,t){if(N4(e))return new Map(e);if(D4(e))return new Set(e);if(k4(e))return Array[O4].slice.call(e);const r=mIe(e);if(t===!0||t==="class_only"&&!r){const n=lc.getOwnPropertyDescriptors(e);delete n[Hs];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[dR]===!1&&(s[dR]=!0,s[SV]=!0),(s.get||s.set)&&(n[o]={[SV]:!0,[dR]:!0,[DI]:s[DI],[ZC]:e[o]})}return lc.create(K1(e),n)}else{const n=K1(e);if(n!==null&&r)return{...e};const i=lc.create(n);return lc.assign(i,e)}}function BK(e,t=!1){return M4(e)||mm(e)||!Hd(e)||(w2(e)>
3111&&lc.defineProperties(e,{set:JA,add:JA,clear:JA,delete:JA}),lc.freeze(e),t&&I4(e,(r,n)=>{BK(n,!0)},!1)),e}function DNt(){Cu(2)}var JA={[ZC]:DNt};function M4(e){return e===null||!LK(e)?!0:lc.isFrozen(e)}var LI="MapSet",TV="Patches",Che="ArrayMethods",vIe={};function $g(e){const t=vIe[e];return t||Cu(0,e),t}var xhe=e=>!!vIe[e],QC,gIe=()=>QC,MNt=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:xhe(LI)?$g(LI):void 0,arrayMethodsPlugin_:xhe(Che)?$g(Che):void 0});function The(e,t){t&&(e.patchPlugin_=$g(TV),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function AV(e){PV(e),e.drafts_.forEach(LNt),e.drafts_=null}function PV(e){e===QC&&(QC=e.parent_)}var Ahe=e=>QC=MNt(QC,e);function LNt(e){const t=e[Hs];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Phe(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Hs].modified_&&(AV(t),Cu(4)),Hd(e)&&(e=Rhe(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Hs].base_,e,t)}else e=Rhe(t,r);return FNt(t,e,!0),AV(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pIe?e:void 0}function Rhe(e,t){if(M4(t))return t;const r=t[Hs];if(!r)return FI(t,e.handledSet_,e);if(!L4(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);bIe(r,e)}return r.copy_}function FNt(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BK(t,r)}function yIe(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var L4=(e,t)=>e.scope_===t,BNt=[];function _Ie(e,t,r,n){const i=Tf(e),a=e.type_;if(n!==void 0&&CV(i,n,a)===t){MI(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;I4(i,(l,c)=>{if(mm(c)){const d=s.get(c)||[];d.push(l),s.set(c,d)}})}const o=e.draftLocations_.get(t)??BNt;for(const s of o)MI(i,s,r,a)}function zNt(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!L4(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=FK(a);_Ie(e,a.draft_??a,o,r),bIe(a,i)})}function bIe(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}yIe(e)}}function HNt(e,t,r){const{scope_:n}=e;if(mm(r)){const i=r[Hs];L4(i,n)&&i.callbacks_.push(function(){fR(e);const o=FK(i);_Ie(e,r,o,t)})}else Hd(r)&&e.callbacks_.push(function(){const a=Tf(e);e.type_===3?a.has(r)&&FI(r,n.handledSet_,n):CV(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&FI(CV(e.copy_,t,e.type_),n.handledSet_,n)})}function FI(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||mm(e)||t.has(e)||!Hd(e)||M4(e)||(t.add(e),I4(e,(n,i)=>{if(mm(i)){const a=i[Hs];if(L4(a,r)){const o=FK(a);MI(e,n,o,e.type_),yIe(a)}}else Hd(i)&&FI(i,t,r)})),e}function UNt(e,t){const r=k4(e),n={type_:r?1:0,scope_:t?t.scope_:gIe(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=BI;r&&(i=[n],a=JC);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var BI={get(e,t){if(t===Hs)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Tf(e);if(!UF(i,t,e.type_))return qNt(e,i,t);const a=i[t];if(e.finalized_||!Hd(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&NNt(t))return a;if(a===qF(e.base_,t)||VNt(e,t,a)){fR(e);const o=e.type_===1?+t:t,s=OV(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in Tf(e)},ownKeys(e){return Reflect.ownKeys(Tf(e))},set(e,t,r){const n=EIe(Tf(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=qF(Tf(e),t),a=i?.[Hs];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(kNt(r,i)&&(r!==void 0||UF(e.base_,t,e.type_)))return!0;fR(e),RV(e)}return e.copy_[t]===r&&(r!==void 0||UF(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),HNt(e,t,r)),!0},deleteProperty(e,t){return fR(e),qF(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),RV(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Tf(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[dR]:!0,[SV]:e.type_!==1||t!=="length",[DI]:n[DI],[ZC]:r[t]}},defineProperty(){Cu(11)},getPrototypeOf(e){return K1(e.base_)},setPrototypeOf(){Cu(12)}},JC={};for(let e in BI){let t=BI[e];JC[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}JC.deleteProperty=function(e,t){return JC.set.call(this,e,t,void 0)};JC.set=function(e,t,r){return BI.set.call(this,e[0],t,r,e[0])};function qF(e,t){const r=e[Hs];return(r?Tf(r):e)[t]}function VNt(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Hd(r)||r[Hs]?!1:e.baseRefs_.has(r)}function qNt(e,t,r){const n=EIe(t,r);return n?ZC in n?n[ZC]:n.get?.call(e.draft_):void 0}function EIe(e,t){if(!(t in e))return;let r=K1(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=K1(r)}}function RV(e){e.modified_||(e.modified_=!0,e.parent_&&RV(e.parent_))}function fR(e){e.copy_||(e.assigned_=new Map,e.copy_=xV(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jNt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(py(t)&&!py(r)){const a=r;r=t;const o=this;return function(l=a,...c){return o.produce(l,d=>r.call(this,d,...c))}}py(r)||Cu(6),n!==void 0&&!py(n)&&Cu(7);let i;if(Hd(t)){const a=Ahe(this),o=OV(a,t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?AV(a):PV(a)}return The(a,n),Phe(i,a)}else if(!t||!LK(t)){if(i=r(t),i===void 0&&(i=t),i===pIe&&(i=void 0),this.autoFreeze_&&BK(i,!0),n){const a=[],o=[];$g(TV).generateReplacementPatches_(t,i,{patches_:a,inversePatches_:o}),n(a,o)}return i}else Cu(1,t)},this.produceWithPatches=(t,r)=>{if(py(t))return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},VF(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),VF(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),VF(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Hd(e)||Cu(8),mm(e)&&(e=$Nt(e));const t=Ahe(this),r=OV(t,e,void 0);return r[Hs].isManual_=!0,PV(t),r}finishDraft(e,t){const r=e&&e[Hs];(!r||!r.isManual_)&&Cu(9);const{scope_:n}=r;return The(n,t),Phe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];
311if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=$g(TV).applyPatches_;return mm(e)?n(e,t):this.produce(e,i=>n(i,t))}};function OV(e,t,r,n){const[i,a]=N4(t)?$g(LI).proxyMap_(t,r):D4(t)?$g(LI).proxySet_(t,r):UNt(t,r);return(r?.scope_??gIe()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?zNt(r,a,n):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:c}=l;a.modified_&&c&&c.generatePatches_(a,[],l)}),i}function $Nt(e){return mm(e)||Cu(10,e),wIe(e)}function wIe(e){if(!Hd(e)||M4(e))return e;const t=e[Hs];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=xV(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=xV(e,!0);return I4(r,(i,a)=>{MI(r,i,wIe(a))},n),t&&(t.finalized_=!1),r}var WNt=new jNt,Ud=WNt.produce;qe.locale("pt-BR");const GNt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],KNt=["domingo","segunda","terça","quarta","quinta","sexta","sábado"],YNt=(e,{predefinedMinDate:t,predefinedMaxDate:r,disableQuantityOfOrdersPerInterval:n,disableBlockScheduleForTheSameDay:i,disableOrderScheduleOnlyForNextAvailableDay:a}={})=>{if(e){const o=e.quantity_of_orders_grouped,s={},l=t||qe().add(e.hours_in_advance_for_scheduling,"hours"),c=r||qe().add(e.maximum_days_for_scheduling||45,"day").startOf("day"),d=qe(l);for(;d.isBefore(c);){const f=()=>{d.add(1,"day").startOf("day")},h=GNt[d.day()],p=e.delivery_period.custom_dates?.[d.format("YYYY-MM-DD")]?.intervals||e.delivery_period[h];if(p.length>0){const g=[];p.forEach(E=>{let S=null;const P=qe(E[0],"HH:mm"),O=qe(E[1],"HH:mm");for(;P.isBefore(O);){S=P.format("HH:mm"),P.add(e.time_interval,"minutes");const I=P.isBefore(O)?P.format("HH:mm"):O.format("HH:mm");g.push(S+"-"+I)}});const _=qe(d.format("HH:mm"),"HH:mm"),b=g.filter(E=>{const S=qe(E.split("-")[0],"HH:mm");if(_.isAfter(S))return!1;if(!n&&e.quantity_of_orders_per_interval){const P=o[d.format("YYYY-MM-DD")];if((P?P[E]:0)>=e.quantity_of_orders_per_interval)return!1}return!0});b.length>0&&(s[d.format("YYYYMMDD")]={timeOptions:b})}f()}if(!i&&e.block_schedule_for_the_same_day&&delete s[qe().format("YYYYMMDD")],!a&&e.order_schedule_only_for_next_available_day){const h=Object.keys(s);for(let p=1;p<h.length;p++)delete s[h[p]]}return s}else return{}};function SIe({open:e,onClose:t,onSubmit:r,schedulingData:n,orderInEdit:i}){const[a,o]=u.useState(null),[s,l]=u.useState([]),[c,d]=u.useState(""),[f,h]=u.useState(""),[p,g]=u.useState(!1),_=at(({globalCompany:P})=>P.company.schedule_setting);u.useEffect(()=>{const P=n?.selectedDate,O=n?.selectedTime;P&&O?(d(qe(P,"DD/MM/YYYY").format("YYYYMMDD")),h(O)):a&&d(Object.keys(a)[0])},[a,n]),u.useEffect(()=>{if(c&&a){const P=a[c];P&&((!f||!P.timeOptions.includes(f))&&h(P.timeOptions[0]),l([...P.timeOptions]))}},[a,c,f]),u.useEffect(()=>{let P=null,O=null,I=!1,N=!1,M=!1,F=_;if(F){if(i&&(P=qe(i.created_at),O=qe(i.created_at).add(2*_.maximum_days_for_scheduling||45,"day").startOf("day"),I=!1,N=!0,M=!0,!I)){const B=i.scheduled_date,V=i.scheduled_period;F=Ud(F,W=>{W.quantity_of_orders_grouped&&W.quantity_of_orders_grouped[B]&&W.quantity_of_orders_grouped[B][V]>0&&(W.quantity_of_orders_grouped[B][V]-=1)})}o(YNt(F,{predefinedMinDate:P,predefinedMaxDate:O,disableQuantityOfOrdersPerInterval:I,disableBlockScheduleForTheSameDay:N,disableOrderScheduleOnlyForNextAvailableDay:M}))}},[i,_]);const b=u.useCallback(()=>{t&&t()},[t]),E=u.useCallback(async P=>{g(!0),await r(P),g(!1)},[r]),S=u.useCallback(async P=>{P.preventDefault(),await E({orderTiming:"scheduling",selectedDate:qe(c,"YYYYMMDD").format("DD/MM/YYYY"),selectedTime:f})},[E,c,f]);return u.createElement(oi,{open:e,title:"Agendar pedido",loading:p,onClose:b,onSubmit:S,maxWidth:"xs"},u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement(um,{variant:"outlined",fullWidth:!0},u.createElement(dm,{id:"selectedDate-label"},"Data"),u.createElement(Bd,{labelId:"selectedDate-label",id:"selectedDate",value:c,onChange:P=>d(P.target.value),label:"Data",MenuProps:{style:{maxHeight:400}}},Object.keys(a||{}).map(P=>{const O=qe(P,"YYYYMMDD");return u.createElement(ln,{key:O,value:P},`${KNt[O.day()]}, ${O.format("DD/MM/YYYY")}`)}))),u.createElement(um,{variant:"outlined",disabled:!c,fullWidth:!0},u.createElement(dm,{id:"selectedTime-label"},"Hora"),u.createElement(Bd,{labelId:"selectedTime-label",id:"selectedTime",value:f,onChange:P=>h(P.target.value),label:"Hora",MenuProps:{style:{maxHeight:400}}},s?.map(P=>u.createElement(ln,{key:P,value:P},P.replace("-"," - "))))),u.createElement(fr,{variant:"text",className:"text-gray-500",onClick:()=>{E({orderTiming:"now"})}},"É um pedido para agora? Clique aqui")))}function Ohe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ihe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
311t%2?Ohe(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ohe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ps(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 khe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),jF=function(){return Math.random().toString(36).substring(7).split("").join(".")},zI={INIT:"@@redux/INIT"+jF(),REPLACE:"@@redux/REPLACE"+jF(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+jF()}};function XNt(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zK(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ps(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ps(1));return r(zK)(e,t)}if(typeof e!="function")throw new Error(Ps(2));var i=e,a=t,o=[],s=o,l=!1;function c(){s===o&&(s=o.slice())}function d(){if(l)throw new Error(Ps(3));return a}function f(_){if(typeof _!="function")throw new Error(Ps(4));if(l)throw new Error(Ps(5));var b=!0;return c(),s.push(_),function(){if(b){if(l)throw new Error(Ps(6));b=!1,c();var S=s.indexOf(_);s.splice(S,1),o=null}}}function h(_){if(!XNt(_))throw new Error(Ps(7));if(typeof _.type>"u")throw new Error(Ps(8));if(l)throw new Error(Ps(9));try{l=!0,a=i(a,_)}finally{l=!1}for(var b=o=s,E=0;E<b.length;E++){var S=b[E];S()}return _}function p(_){if(typeof _!="function")throw new Error(Ps(10));i=_,h({type:zI.REPLACE})}function g(){var _,b=f;return _={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(Ps(11));function P(){S.next&&S.next(d())}P();var O=b(P);return{unsubscribe:O}}},_[khe]=function(){return this},_}return h({type:zI.INIT}),n={dispatch:h,subscribe:f,getState:d,replaceReducer:p},n[khe]=g,n}function ZNt(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:zI.INIT});if(typeof n>"u")throw new Error(Ps(12));if(typeof r(void 0,{type:zI.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ps(13))})}function F4(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),o;try{ZNt(r)}catch(s){o=s}return function(l,c){if(l===void 0&&(l={}),o)throw o;for(var d=!1,f={},h=0;h<a.length;h++){var p=a[h],g=r[p],_=l[p],b=g(_,c);if(typeof b>"u")throw c&&c.type,new Error(Ps(14));f[p]=b,d=d||b!==_}return d=d||a.length!==Object.keys(l).length,d?f:l}}function CIe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function QNt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ps(15))},o={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=t.map(function(l){return l(o)});return a=CIe.apply(void 0,s)(i.dispatch),Ihe(Ihe({},i),{},{dispatch:a})}}}function xIe(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(o){return function(s){return typeof s=="function"?s(i,a,e):o(s)}}};return t}var TIe=xIe();TIe.withExtraArgument=xIe;const pv={success:!1,error:{login:null,password:null},billing_error:{login:null,password:null,billing:null},otp_info:{login:null,password:null,otp:null},loading:!1,signInLoading:!1},JNt=function(e=pv,t){switch(t.type){case KTe:return{...pv,success:!0};case qTe:return{...pv,error:t.payload};case jTe:return{...pv,billing_error:t.payload};case $Te:return{...pv,otp_info:t.payload};case WTe:return{...pv,billing_error:{login:null,password:null,billing:null}};case GTe:return{...pv,billing_error:{login:null,password:null,otp:{}}};case YTe:return{...e,loading:!0};case jvt:return{...e,loading:!1};case XTe:return{...e,signInLoading:!0};case ZTe:return{...e,signInLoading:!1};default:return e}},eP={role:null,user:null,activeCompany:null,layout:null},eDt=function(e=eP,t){switch(t.type){case eAe:return{...eP,user:{...t.user},activeCompany:{...t.activeCompany},role:t.user.profile};case hgt:return{...eP};case tAe:return{...eP,layout:e.layout};case pgt:return{...e,activeCompany:e.user.companies.filter(r=>r.id===t.payload)[0]};case aR:return{...e,layout:t.payload};case rAe:return{...e,user:{...e.user,...t.payload||{}}};default:return e}},tDt=F4({user:eDt,login:JNt}),rDt={company:{},allPaymentMethods:mr,companyPaymentMethods:[]},nDt=function(e=rDt,t){return t.type===Pbe?{...e,company:t.payload,companyPaymentMethods:t.payload.payment_methods.map(r=>({...r,label:r.name,icon:mr[r.kind]?.icon||As,short_name:mr[r.kind]?.shortName||r.name.substring(0,9)}))}:e},iDt={state:!1,options:{variant:"info",title:"",description:""}},aDt=function(e=iDt,t){switch(t.type){case Dbe:return{...e,state:!0,options:{...e.options,...t.options}};case Mbe:return{...e,state:!1};default:return e}},oDt={state:!1},sDt=function(e=oDt,t){switch(t.type){case DKe:return{state:!0};case MKe:return{state:!1};default:return e}},Nhe={state:null,options:{anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:2e3,message:"Hi",variant:null}},lDt=function(e=Nhe,t){switch(t.type){case kbe:return{state:!0,options:{...Nhe.options,...t.options}};case Ibe:return{...e,state:null};default:return e}},cDt={foldedOpen:!1,mobileOpen:!1},uDt=function(e=cDt,t){switch(t.type){case OKe:return{...e,foldedOpen:!e.foldedOpen};case PKe:return{...e,foldedOpen:!0};case RKe:return{...e,foldedOpen:!1};case Obe:return{...e,mobileOpen:!e.mobileOpen};case IKe:return{...e,mobileOpen:!0};case kKe:return{...e,mobileOpen:!1};default:return e}},dDt={id:"affiliate-partner",title:"Parceiros",type:"group",icon:"group",auth:Ye.affiliatePartner,children:[{id:"affiliate-partner-profile",title:"Minha conta",type:"item",url:"/parceiro/perfil",auth:Ye.affiliatePartner,icon:"account_box"},{id:"affiliate-partner-companies",title:"Indicações",type:"item",url:"/parceiro/estabelecimentos",auth:Ye.affiliatePartner,icon:"store"},{id:"affiliate-partner-payments",title:"Pagamentos",type:"item",url:"/parceiro/pagamentos",auth:Ye.affiliatePartner,icon:"monetization_on"}]},fDt={id:"client-navigation",title:"",type:"group",icon:"apps",auth:Ye.companyUsers,children:[{id:"latest-orders",title:"Gestão de pedidos",type:"item",url:"/latest-orders",auth:Ye.companyUsers,userPermissions:[Te.LAST_ORDERS_PAGE],icon:"list_alt"},{id:"order-sessions",title:"Mesas/Comandas",type:"item",url:"/mesas",auth:Ye.companyUsers,showToUpselling:!0,userPermissions:[Te.TABLE_MANAGEMENT_PAGE],modules:[At.TABLE_MODULE],icon:"room_service"},{id:"kds",title:"KDS",type:"item",url:"/kds",auth:Ye.companyUsers,userPermissions:[Te.KDS],modules:[At.KDS],icon:"apps"},{id:"caixa",title:"Caixa",type:"item",auth:Ye.companyUsers,modules:[At.CASH_CONTROL_MODULE],userPermissions:[Te.CASH_FLOW_PAGE],url:"/caixa",icon:"monetization_on"},{id:"performance",title:"Desempenho",type:"collapse",auth:Ye.companyUsers,userPermissions:[Te.P
311ERFORMANCE_PAGES],url:"/analise-vendas",icon:"timeline",children:[{id:"sales-performance",title:"Vendas",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/analise-vendas"},{id:"customers-performance",title:"Clientes",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],modules:[At.DELIVERY_MODULE],url:"/analise-clientes"},{id:"customers-base-analysis",title:"Base de clientes",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/analise-base-clientes"},{id:"products-performance-new",title:"Catálogo",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/relatorio-produtos/categorias"},{id:"products-performance",title:"Produtos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/relatorio-vendas"},{id:"delivery-performance",title:"Entregas",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],modules:[At.DELIVERY_MANAGEMENT_MODULE],url:"/analise-entregas"},{id:"benefits-performance",title:"Descontos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/analise-descontos"},{id:"cancellation-performance",title:"Cancelamentos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/analise-cancelamento"},{id:"multicompany-performance",title:"Visão geral estabelecimentos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],url:"/analise-estabelecimentos"}]},{id:"order-list",title:"Histórico de pedidos",type:"item",url:"/pedidos",auth:Ye.companyUsers,userPermissions:[Te.ORDER_HISTORY_PAGE],icon:"view_list"},{id:"my-company",title:"Minha empresa",type:"collapse",icon:"store",auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],url:"/profile",children:[{id:"profile",title:"Perfil",type:"item",auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],modules:[At.DELIVERY_MODULE,At.TABLE_MODULE],url:"/profile"},{id:"opening-hours",title:"Horários",type:"item",userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],auth:Ye.companyUsers,url:"/horarios"},{id:"payment-methods",title:"Formas de pagamento",type:"item",auth:Ye.companyUsers,userPermissions:[Te.PAYMENT_METHODS_PAGE],url:"/formas-pagamento"},{id:"notices",title:"Avisos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],modules:[At.DELIVERY_MODULE,At.TABLE_MODULE],url:"/avisos"},{id:"custom-fields",title:"Campos personalizados",type:"item",auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],modules:[At.CUSTOM_FIELDS_MODULE],url:"/campos_personalizados"}]},{id:"menu",title:"Catálogo",type:"collapse",icon:"view_quilt",auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],url:"/cardapio/produtos",children:[{id:"menu-products",title:"Produtos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],url:"/cardapio/produtos"},{id:"menu-addons",title:"Complementos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],url:"/cardapio/complementos"},{id:"menu-subitems",title:"Opções",type:"item",auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],url:"/cardapio/opcoes"},{id:"advanced-filters",title:"Filtros avançados",type:"item",auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],url:"/cardapio/filtros_avancados"}]},{id:"cw_apps",title:"CW App Store",type:"item",auth:Ye.companyUsers,launch:!0,url:"/cw-apps",icon:"apps"},{id:"financial",title:"Financeiro",type:"collapse",showToUpselling:!0,modules:[At.FINANCIAL_MANAGEMENT_MODULE],auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL],url:"/financeiro/lancamentos",icon:"attach_money_rounded",children:[{id:"financial-transactions",title:"Lançamentos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_REVENUE_TRANSACTIONS,Te.FINANCIAL_EXPENSE_TRANSACTIONS],url:"/financeiro/lancamentos"},{id:"financial-flow",title:"Fluxo de caixa",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_CASH_FLOW],url:"/financeiro/fluxo-caixa/tabela"},{id:"financial-expense-analysis",title:"Análise de pagamentos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_EXPENSE_ANALYSIS],url:"/financeiro/analise-pagamentos/categorias"},{id:"financial-revenue-analysis",title:"Análise de recebimentos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_REVENUE_ANALYSIS],url:"/financeiro/analise-recebimentos/categorias"},{id:"financial-settings",title:"Configurações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_ACCOUNTS_MANAGEMENT,Te.FINANCIAL_CATEGORIES_MANAGEMENT,Te.FINANCIAL_COST_CENTERS_MANAGEMENT,Te.FINANCIAL_SUPPLIERS_MANAGEMENT,Te.FINANCIAL_PAYMENT_METHODS_MANAGEMENT],url:"/financeiro/configuracoes"}]},{id:"stock",title:"Estoque",type:"collapse",icon:"all_inbox",auth:Ye.companyUsers,userPermissions:[Te.STOCK_PAGES],showToUpselling:!0,modules:[At.ADVANCED_STOCK_CONTROL_MODULE],url:"/estoque/meu_estoque",children:[{id:"stock-management",title:"Meu estoque",type:"item",auth:Ye.companyUsers,userPermissions:[Te.STOCK_PAGES],modules:[At.ADVANCED_STOCK_CONTROL_MODULE],url:"/estoque/meu_estoque"},{id:"stock-history",title:"Movimentações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.STOCK_PAGES],modules:[At.ADVANCED_STOCK_CONTROL_MODULE],url:"/estoque/movimentacoes"}]}
311,{id:"delivery",title:"Delivery",type:"collapse",icon:"motorcycle",auth:Ye.companyUsers,userPermissions:[Te.DELIVERY_MANAGEMENT_PAGES],modules:[At.DELIVERY_MODULE],url:"/entrega-taxas",children:[{id:"delivery-settings",title:"Áreas de entrega",type:"item",auth:Ye.companyUsers,userPermissions:[Te.DELIVERY_MANAGEMENT_PAGES],modules:[At.DELIVERY_MODULE],url:"/entrega-taxas"},{id:"deliveryman-management",title:"Entregadores",type:"item",auth:Ye.companyUsers,userPermissions:[Te.DELIVERY_MANAGEMENT_PAGES],modules:[At.DELIVERY_MODULE],url:"/entregadores"}]},{id:"coupons",title:"Cupons e descontos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.DISCOUNT_COUPONS_PAGE],url:"/cupons",icon:"money_off"},{id:"fidelity",title:"Fidelidade",type:"collapse",showToUpselling:!0,modules:[At.LOYALTY_PROGRAM],auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],url:"/fidelidade/dashboard",icon:"redeem_rounded",children:[{id:"fidelity-choose-mode",title:"Escolher modalidade",type:"item",auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],url:"/fidelidade/escolher-modalidade"},{id:"fidelity-general",title:"Visão geral",type:"item",auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],url:"/fidelidade/dashboard"},{id:"fidelity-rewards",title:"Configurações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],url:"/fidelidade/recompensas"},{id:"fidelity-activity",title:"Atividades",type:"item",auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],url:"/fidelidade/atividades"}]},{id:"my-clients",title:"Clientes",type:"item",auth:Ye.companyUsers,userPermissions:[Te.CLIENT_MANAGEMENT_PAGE],modules:[At.CLIENT_MANAGEMENT_MODULE],url:"/clientes",icon:"account_box"},{id:"feedback",title:"Avaliações",type:"item",modules:[At.DELIVERY_MODULE],userPermissions:[Te.FEEDBACK_PAGE],auth:Ye.companyUsers,url:"/avaliacoes",icon:"star_rounded"},{id:"marketing",title:"Food marketing",type:"collapse",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/marketing/whatsapp",icon:"record_voice_over",children:[{id:"whatsapp",title:"Campanhas WhatsApp",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/marketing/whatsapp",icon:"send_rounded"},{id:"segmentation",title:"Segmentação de clientes",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/marketing/segmentacao",icon:"people"},{id:"analytics",title:"Site Analytics",type:"item",auth:Ye.companyUsers,userPermissions:[Te.MARKETING_PAGES],url:"/marketing/analytics",icon:"timeline"}]},{id:"whatsapp-menu",title:"Gerenciar WhatsApp",type:"collapse",launch:!0,auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/whatsapp/conexao",icon:"forum",children:[{id:"whatsapp-connection",title:"Gestão de números",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/whatsapp/conexao"},{id:"whatsapp-templates",title:"Modelos de mensagem",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/whatsapp/templates"},{id:"whatsapp-order-status",title:"Notificações de pedido",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/whatsapp/status-pedido"},{id:"whatsapp-bot-personality",title:"Personalize ChatBot",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/whatsapp/personalize-chatbot"},{id:"whatsapp-campaigns",title:"Campanhas WhatsApp",type:"item",auth:Ye.companyUsers,modules:[At.ZAPZAP],userPermissions:[Te.MARKETING_PAGES],url:"/marketing/whatsapp"}]},{id:"debt-book",title:"Fiado",type:"collapse",modules:[At.DEBT_BOOK],userPermissions:[Te.DEBT_BOOK_PAGES],auth:Ye.companyUsers,url:"/fiado",icon:"menu_book",children:[{id:"debt-book-dashboard",title:"Visão geral",type:"item",auth:Ye.companyUsers,userPermissions:[Te.DEBT_BOOK_PAGES],url:"/fiado/dashboard"},{id:"debt-book-control",title:"Controle das dívidas",type:"item",auth:Ye.companyUsers,userPermissions:[Te.DEBT_BOOK_PAGES],url:"/fiado/controle"}]},{id:"fiscal",title:"Fiscal",type:"collapse",auth:Ye.companyUsers,showToUpselling:!1,modules:[At.FISCAL],userPermissions:[Te.FISCAL_PAGES],url:"/fiscal/configuracoes",icon:"account_balance",children:[{id:"fiscal-settings",title:"Configurações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],url:"/fiscal/configuracoes"},{id:"fiscal-products",title:"Produtos",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],url:"/fiscal/produtos"},{id:"fiscal-invoices",title:"Notas fiscais",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],url:"/fiscal/notas"},{id:"invoices-invalidation",title:"Inutilizações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],url:"/fiscal/inutilizacao"}]},{id:"administrative",title:"Administrativo",type:"collapse",icon:"supervisor_account",auth:Ye.owner,url:"/usuarios",children:[{id:"owner-users",title:"Usuários",type:"item",auth:Ye.owner,url:"/usuarios"},{id:"owner-subscriptions",title:"Assinaturas",type:"item",auth:Ye.owner,url:"/assinaturas"},{id:"owner-multistore-links",title:"Link multilojas",type:"item",auth:Ye.owner,url:"/links-multilojas"}]},{id:"settings",title:"Configurações",type:"item",auth:Ye.companyUsers,userPermissions:[Te.SETTINGS_PAGES,Te.SETTINGS_PAGES_PRINTING],url:"/configuracoes",icon:"settings"},{id:"knowledge-base",title:"Dúvidas?",type:"item",fixed:!0,hideFromResellerClients:!0,url:"?ajuda=1",auth:Ye.staff,color:"rgba(237, 149, 33)",icon:"help"},{id:"talk-to-support",title:"Falar com o suporte",type:"item",fixed:!0,hideFromResellerClients:!0,url:"?ajuda=1",auth:Ye.staff,icon:"chat"},{id:"my-links",title:"Ver meus links",type:"item",fixed:!0,auth:Ye.staff,url:"?links=1",icon:"web"}]},hDt={id:"manager",title:"Administração",type:"group",icon:"apps",auth:Ye.internalUserCreator,children:[{id:"manager-admin-dashboard",title:"Dashboard",type:"item",url:"/admin-dashboard",auth:Ye.admin,icon:"dashboard"},{id:"manager-client-map",title:"Mapa de clientes",type:"item",url:"/mapa-clientes",auth:Ye.admin,icon:"map"},{id:"organization-profile",title:"Minha Organização",type:"item",url:"/minha-organizacao",auth:Ye.admin,icon:"home_work"},{id:"organizations",title:"Organizações",type:"item",auth:Ye.internalUserCreator,userRolePermissions:[Kn.ORGANIZATIONS],url:"/organizacoes",icon:"apartment"},{id:"accounts",title:"Contas",type:"item",url:"/contas",auth:Ye.internalUserCreator,userRolePermissions:[Kn.ACCOUNTS],icon:"people"},{id:"companies",title:"Estabelecimentos",type:"item",url:"/estabelecimentos",auth:Ye.internalUserCreator,userRolePermissions:[Kn.ACCOUNTS],icon:"store"},{id:"coupons",title:"Cupons",type:"item",url:"/organizacao-cupons",auth:Ye.internalUserCreator,userRolePermissions:[Kn.SUBSCRIPTION_COUPONS],icon:"money_off"},{id:"subscription-custom-fields",title:"Campos personalizados",type:"item",url:"/campos-personalizados-assinatura",auth:Ye.internalUserCreator,userRolePermissions:[Kn.SUBSCRIPTION_CUSTOM_FIELDS],icon:"list"},{id:"plans-and-add-ons",title:"Planos e Módulos",type:"collapse",icon:"dashboard",auth:Ye.internalUserCreator,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/planos",children:[{id:"plans",title:"Planos",type:"item",auth:Ye.internalUserCreator,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/planos"},{id:"add-ons",title:"Módulos",type:"item",auth:Ye.internalUserCreator,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/modulos"}]},{id:"client-billings",title:"Faturas",type:"item",auth:Ye.cwManager,url:"/faturas-clientes",icon:"receipt"},{id:"events-historic",title:"Histórico de atividades",type:"item",url:"/historico-atividades",userRolePermissions:[Kn.SUBSCRIPTION_EVENTS],auth:Ye.internalUserCreator,icon:"timeline"},{id:"seller-revenue",title:"Análise de closer",type:"item",url:"/recebimentos",auth:Ye.internalUserCreator,userRolePermissions:[Kn.SELLER_ANALYSIS],icon:"insert_chart"},{id:"notifications",title:"Notificações",type:"item",url:"/notificacoes",userRolePermissions:[Kn.NOTIFICATIONS],auth:Ye.internalUserCreator,icon:"notifications"},{id:"affiliate-partners",title:"Parceiros",type:"item",auth:Ye.internalUserCreator,url:"/parceiros",userRolePermissions:[Kn.AFFILIATE_PARTNER],icon:"record_voice_over"},{id:"integrators",title:"Integradoras",type:"item",auth:Ye.cwManager,url:"/integradoras",userRolePermissions:[Kn.INTEGRATORS],icon:"settings_input_component"},{id:"organization-users",title:"Funcionários",type:"item",auth:Ye.admin,url:"/funcionarios",icon:"people"},{id:"manager-space",type:"space"}]},pDt={id:"reseller",title:"Revendedor",type:"group",icon:"apps",auth:Ye.reseller,children:[{id:"reseller-admin-dashboard",title:"Dashboard",type:"item",url:"/admin-dashboard",auth:Ye.reseller,icon:"dashboard"},{id:"organization-profile",title:"Minha Organização",type:"item",url:"/minha-organizacao",auth:Ye.reseller,icon:"home_work"},{id:"reseller-invoices",title:"Minhas faturas",type:"item",auth:Ye.reseller,url:"/faturas-organizacao",icon:"monetization_on"},{id:"accounts",title:"Contas",type:"item",url:"/contas",auth:Ye.reseller,userRolePermissions:[Kn.ACCOUNTS],icon:"people"},{id:"companies",title:"Estabelecimentos",type:"item",url:"/estabelecimentos",auth:Ye.reseller,userRolePermissions:[Kn.ACCOUNTS],icon:"store"},{id:"coupons",title:"Cupons",type:"item",url:"/organizacao-cupons",auth:Ye.reseller,userRolePermissions:[Kn.SUBSCRIPTION_COUPONS],icon:"money_off"},{id:"plans-and-add-ons",title:"Planos e módulos",type:"collapse",icon:"dashboard",auth:Ye.reseller,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/planos",children:[{id:"plans",title:"Planos",type:"item",auth:Ye.reseller,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/planos"},{id:"add-ons",title:"Módulos",type:"item",auth:Ye.reseller,userRolePermissions:[Kn.PLANS_AND_MODULES],url:"/planos-modulos/modulos"}]},{id:"client-billings",title:"Faturas dos clientes",type:"item",auth:Ye.reseller,url:"/faturas-clientes",icon:"receipt"},{id:"events-historic",title:"Histórico de atividades",type:"item",url:"/historico-atividades",userRolePermissions:[Kn.SUBSCRIPTION_EVENTS],auth:Ye.reseller,icon:"timeline"},{id:"notifications",title:"Notificações",type:"item",url:"/notificacoes",userRolePermissions:[Kn.NOTIFICATIONS],auth:Ye.reseller,icon:"notifications"},{id:"reseller-space",type:"space"}]},mDt=[fDt,pDt,hDt,dDt],Dhe=mDt,vDt=function(e=Dhe,t){switch(t.type){case TKe:return[...e];case Rbe:return[...t.navigation];case AKe:return[...Dhe];default:return e}},gDt=F4({navbar:uDt,navigation:vDt,message:lDt,dialogMessage:aDt,dialogNewReleases:sDt}),AIe=e=>F4({auth:tDt,globalCompany:nDt,fuse:gDt,...e}),yDt=CIe,Ap=zK(AIe(),yDt(QNt(TIe)));Ap.asyncReducers={};const _Dt=(e,t)=>
311{if(!Ap.asyncReducers[e])return Ap.asyncReducers[e]=t,Ap.replaceReducer(AIe(Ap.asyncReducers)),Ap},B4=(e,t)=>r=>class extends u.PureComponent{constructor(n){super(n),_Dt(e,t)}render(){return u.createElement(r,{...this.props})}};var EE={},Mhe;function bDt(){if(Mhe)return EE;Mhe=1;var e=$t(),t=Wt();Object.defineProperty(EE,"__esModule",{value:!0}),EE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined");return EE.default=i,EE}var EDt=bDt();const wDt=et(EDt),tP=()=>me.generateGUID()+me.generateGUID()+me.generateGUID();function SDt(){const e=at(({globalCompany:f})=>f.company.print_setting),t=e?.print_areas,r=u.useMemo(()=>t?.find(f=>f.default_area&&f.kind==="kitchen")?.id,[t]),n=u.useMemo(()=>{if(t){const f=t.filter(h=>h.kind==="general");if(f.length>0&&f[0]?.printer?.name)return f[0].printer.name}return null},[t]),i=u.useMemo(()=>{const f=t?.find(h=>h.kind==="kitchen"&&h.default_area===!0);return f?{...f}:null},[t]),a=u.useCallback(f=>{if(f){const h=t.find(p=>p.id===parseInt(f));if(h?.name)return h.name}return"Cozinha"},[t]),o=u.useCallback(f=>{if(f){const h=t.find(p=>p.id===parseInt(f));if(h?.printer?.name)return h?.printer?.name}return i?.printer?.name},[i,t]),s=u.useCallback(f=>{const h={};return f.order_items.forEach(p=>{let g=p.print_area_id;const _=p.second_print_area_id;!g&&!p.item_id&&(g=r),g&&(h[g]?h[g].order_items.push(p):h[g]={order_items:[p]}),_&&_!==g&&(h[_]?h[_].order_items.push(p):h[_]={order_items:[p]})}),Object.keys(h).forEach(p=>{h[p]={...f,...h[p]}}),h},[r]),l=u.useCallback((f,h)=>{const g=`${h==="temporary_order"?"closed_table":h}_${f}_print_quantity`;return e?.[g]??1},[e]),c=u.useCallback(f=>{const p=`${f==="temporary_order"?"closed_table":f}_standard_print_printer_id`,g=e?.[p];if(g){const b=(e?.printers).find(E=>E.id===g)?.name;if(b)return b}return n||null},[n,e]);return u.useCallback((f,h,p)=>{let g=1;if(p&&["standard","kitchen"].includes(f)&&(g=l(f,h.order_type),!g))return[];if(["kitchen","canceledItem"].includes(f)){const _=s(h),b=Object.keys(_).length;return Object.keys(_).map(E=>{const S=tP(),P=_[E],O=a(E),I={...P,printAreaName:O,quantityOfPrintAreas:b};return{printer:o(E),template:f,data:I,copies:g,localKey:S,automatic:p}})}else if(f==="standard"){const _=tP();return[{printer:c(h.order_type),template:f,data:h,copies:g,localKey:_,automatic:p}]}else if(f==="test"){const _=tP();return[{printer:h&&typeof h=="string"?h:"Impressora em Teste",template:f,copies:g,localKey:_,automatic:p}]}else{const _=tP();return[{printer:n,template:f,data:h,copies:g,localKey:_,automatic:p}]}},[n,a,o,l,c,s])}var $F={exports:{}};const CDt={},xDt=Object.freeze(Object.defineProperty({__proto__:null,default:CDt},Symbol.toStringTag,{value:"Module"})),TDt=zq(xDt);var Lhe;function ADt(){return Lhe||(Lhe=1,(function(e,t){var r=(function(){Array.isArray||(Array.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"}),Number.isInteger||(Number.isInteger=function(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}),Array.from||(Array.from=function(o){return[].slice.call(o)}),String.prototype.padStart||(String.prototype.padStart=function(s,l){if(s=s>>0,l=String(typeof l<"u"?l:" "),this.length>=s)return String(this);for(var c=s-this.length,d="";d.length<c;)d+=l;return d.slice(0,c)+String(this)});var n={TITLE:"QZ Tray",VERSION:"2.2.6",DEBUG:!1,log:{trace:function(){n.DEBUG&&console.log.apply(console,arguments)},info:function(){console.info.apply(console,arguments)},warn:function(){console.warn.apply(console,arguments)},allay:function(){n.DEBUG&&console.warn.apply(console,arguments)},error:function(){console.error.apply(console,arguments)}},streams:{serial:"SERIAL",usb:"USB",hid:"HID",printer:"PRINTER",file:"FILE",socket:"SOCKET"},websocket:{connection:null,shutdown:!1,connectConfig:{host:["localhost","localhost.qz.io"],hostIndex:0,usingSecure:!0,usingSurf:!0,surfDomain:"qz.surf",protocol:{secure:"wss://",insecure:"ws://"},port:{secure:[8181,8282,8383,8484],insecure:[8182,8283,8384,8485],portIndex:0},keepAlive:60,retries:0,delay:0},setup:{findConnection:function(o,s,l){if(n.websocket.shutdown){l(new Error("Connection attempt cancelled by user"));return}if(o.port.secure.length)!o.port.insecure.length&&!o.usingSecure&&(n.log.trace("No insecure ports specified - forcing secure connection"),o.usingSecure=!0);else if(o.port.insecure.length)o.usingSecure&&(n.log.error("No secure ports specified - forcing insecure connection"),o.usingSecure=!1);else{l(new Error("No ports have been specified to connect over"));return}var c=function(){if(n.websocket.shutdown){l(new Error("Connection attempt cancelled by user"));return}if(o.port.portIndex++,o.usingSecure&&o.port.portIndex>=o.port.secure.length||!o.usingSecure&&o.port.portIndex>=o.port.insecure.length)if(o.hostIndex>=o.host.length-1){l(new Error("Unable to establish connection with "+n.TITLE));return}else o.hostIndex++,o.port.portIndex=0;n.websocket.setup.findConnection(o,s,l)},d;o.usingSecure?d=o.protocol.secure+o.host[o.hostIndex]+":"+o.port.secure[o.port.portIndex]:d=o.protocol.insecure+
311o.host[o.hostIndex]+":"+o.port.insecure[o.port.portIndex];try{n.log.trace("Attempting connection",d),n.websocket.connection=new n.tools.ws(d)}catch(f){n.log.error(f),c();return}n.websocket.connection!=null?(n.websocket.connection.established=!1,n.websocket.connection.onopen=function(f){if(!n.websocket.connection.established&&(n.log.trace(f),n.log.info("Established connection with "+n.TITLE+" on "+d),n.websocket.setup.openConnection({resolve:s,reject:l}),o.keepAlive>0)){var h=setInterval(function(){if(!n.tools.isActive()||n.websocket.connection.interval!==h){clearInterval(h);return}n.websocket.connection.send("ping")},o.keepAlive*1e3);n.websocket.connection.interval=h}},n.websocket.connection.onclose=function(){n.websocket.connection&&typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1&&n.websocket.connection.onerror()},n.websocket.connection.onerror=function(f){n.log.trace(f),n.websocket.connection=null,c()}):l(new Error("Unable to create a websocket connection"))},openConnection:function(o){n.websocket.connection.established=!0,n.websocket.connection.onclose=function(l){n.log.trace(l),n.websocket.connection=null,n.websocket.callClose(l),n.log.info("Closed connection with "+n.TITLE);for(var c in n.websocket.pendingCalls)n.websocket.pendingCalls.hasOwnProperty(c)&&n.websocket.pendingCalls[c].reject(new Error("Connection closed before response received"));this.promise!=null&&this.promise.resolve()},n.websocket.connection.onerror=function(l){n.websocket.callError(l)},n.websocket.connection.sendData=function(l){n.log.trace("Preparing object for websocket",l),l.timestamp==null&&(l.timestamp=Date.now(),typeof l.timestamp!="number"&&(l.timestamp=new Date().getTime())),l.promise!=null&&(l.uid=n.websocket.setup.newUID(),n.websocket.pendingCalls[l.uid]=l.promise),l.position={x:typeof screen<"u"?(screen.availWidth||screen.width)/2+(screen.left||screen.availLeft||0):0,y:typeof screen<"u"?(screen.availHeight||screen.height)/2+(screen.top||screen.availTop||0):0};try{if(l.call!=null&&l.signature==null&&n.security.needsSigned(l.call)){var c={call:l.call,params:l.params,timestamp:l.timestamp},d=n.tools.hash(n.tools.stringify(c));d.then||(d=n.tools.promise(function(f){f(d)})),d.then(function(f){return n.security.callSign(f)}).then(function(f){n.log.trace("Signature for call",f),l.signature=f||"",l.signAlgorithm=n.security.signAlgorithm,n.signContent=void 0,n.websocket.connection.send(n.tools.stringify(l))}).catch(function(f){n.log.error("Signing failed",f),l.promise!=null&&(l.promise.reject(new Error("Failed to sign request")),delete n.websocket.pendingCalls[l.uid])})}else n.log.trace("Signature for call",l.signature),n.websocket.connection.send(n.tools.stringify(l))}catch(f){n.log.error(f),l.promise!=null&&(l.promise.reject(f),delete n.websocket.pendingCalls[l.uid])}},n.websocket.connection.onmessage=function(l){var c=JSON.parse(l.data);if(c.uid==null){if(c.type==null)n.websocket.connection.close(4003,"Connected to incompatible "+n.TITLE+" version");else switch(c.type){case n.streams.serial:c.event||(c.event=JSON.stringify({portName:c.key,output:c.data})),n.serial.callSerial(JSON.parse(c.event));break;case n.streams.socket:n.socket.callSocket(JSON.parse(c.event));break;case n.streams.usb:c.event||(c.event=JSON.stringify({vendorId:c.key[0],productId:c.key[1],output:c.data})),n.usb.callUsb(JSON.parse(c.event));break;case n.streams.hid:n.hid.callHid(JSON.parse(c.event));break;case n.streams.printer:n.printers.callPrinter(JSON.parse(c.event));break;case n.streams.file:n.file.callFile(JSON.parse(c.event));break;default:n.log.allay("Cannot determine stream type for callback",c);break}return}n.log.trace("Received response from websocket",c);var d=n.websocket.pendingCalls[c.uid];d==null?n.log.allay("No promise found for returned response"):c.error!=null?d.reject(new Error(c.error)):d.resolve(c.result),delete n.websocket.pendingCalls[c.uid]};function s(l){l===void 0&&(l=null),a.api.getVersion().then(function(c){n.websocket.connection.version=c,n.websocket.connection.semver=c.toLowerCase().replace(/-rc\./g,"-rc").split(/[\\+\\.-]/g);for(var d=0;d<n.websocket.connection.semver.length;d++){try{if(d==3&&n.websocket.connection.semver[d].toLowerCase().indexOf("rc")==0){n.websocket.connection.semver[d]=-n.websocket.connection.semver[d].replace(/\D/g,"");continue}n.websocket.connection.semver[d]=parseInt(n.websocket.connection.semver[d])}catch{}n.websocket.connection.semver.length<4&&(n.websocket.connection.semver[3]=0)}n.compatible.algorithm(!0)}).then(function(){n.websocket.connection.sendData({certificate:l,promise:o})})}n.security.callCert().then(s).catch(function(l){n.log.warn("Failed to get certificate:",l),n.security.rejectOnCertFailure?o.reject(l):s(null)})},newUID:function(){var o=6;return(new Array(o+1).join("0")+(Math.random()*Math.pow(36,o)<<0).toString(36)).slice(-o)}},dataPromise:function(o,s,l,c){return n.tools.promise(function(d,f){var h={call:o,promise:{resolve:d,reject:f},params:s,signature:l,timestamp:c};n.websocket.connection.sendData(h)})},pendingCalls:{}
311,errorCallbacks:[],callError:function(o){if(Array.isArray(n.websocket.errorCallbacks))for(var s=0;s<n.websocket.errorCallbacks.length;s++)n.websocket.errorCallbacks[s](o);else n.websocket.errorCallbacks(o)},closedCallbacks:[],callClose:function(o){if(Array.isArray(n.websocket.closedCallbacks))for(var s=0;s<n.websocket.closedCallbacks.length;s++)n.websocket.closedCallbacks[s](o);else n.websocket.closedCallbacks(o)}},printing:{defaultConfig:{bounds:null,colorType:"color",copies:1,density:0,duplex:!1,fallbackDensity:null,interpolation:"bicubic",jobName:null,legacy:!1,margins:0,orientation:null,paperThickness:null,printerTray:null,rasterize:!1,rotation:0,scaleContent:!0,size:null,units:"in",forceRaw:!1,encoding:null,spool:null}},serial:{serialCallbacks:[],callSerial:function(o){if(Array.isArray(n.serial.serialCallbacks))for(var s=0;s<n.serial.serialCallbacks.length;s++)n.serial.serialCallbacks[s](o);else n.serial.serialCallbacks(o)}},socket:{socketCallbacks:[],callSocket:function(o){if(Array.isArray(n.socket.socketCallbacks))for(var s=0;s<n.socket.socketCallbacks.length;s++)n.socket.socketCallbacks[s](o);else n.socket.socketCallbacks(o)}},usb:{usbCallbacks:[],callUsb:function(o){if(Array.isArray(n.usb.usbCallbacks))for(var s=0;s<n.usb.usbCallbacks.length;s++)n.usb.usbCallbacks[s](o);else n.usb.usbCallbacks(o)}},hid:{hidCallbacks:[],callHid:function(o){if(Array.isArray(n.hid.hidCallbacks))for(var s=0;s<n.hid.hidCallbacks.length;s++)n.hid.hidCallbacks[s](o);else n.hid.hidCallbacks(o)}},printers:{printerCallbacks:[],callPrinter:function(o){if(Array.isArray(n.printers.printerCallbacks))for(var s=0;s<n.printers.printerCallbacks.length;s++)n.printers.printerCallbacks[s](o);else n.printers.printerCallbacks(o)}},file:{fileCallbacks:[],callFile:function(o){if(Array.isArray(n.file.fileCallbacks))for(var s=0;s<n.file.fileCallbacks.length;s++)n.file.fileCallbacks[s](o);else n.file.fileCallbacks(o)}},security:{certHandler:function(o,s){s()},callCert:function(){return typeof n.security.certHandler.then=="function"?n.security.certHandler:n.security.certHandler.constructor.name==="AsyncFunction"?n.security.certHandler():n.tools.promise(n.security.certHandler)},signatureFactory:function(){return function(o){o()}},callSign:function(o){return n.security.signatureFactory.constructor.name==="AsyncFunction"?n.security.signatureFactory(o):n.tools.promise(n.security.signatureFactory(o))},signAlgorithm:"SHA1",rejectOnCertFailure:!1,needsSigned:function(o){const s=["printers.getStatus","printers.stopListening","usb.isClaimed","usb.closeStream","usb.releaseDevice","hid.stopListening","hid.isClaimed","hid.closeStream","hid.releaseDevice","file.stopListening","getVersion"];return o!=null&&s.indexOf(o)===-1}},tools:{promise:function(o){if(typeof RSVP<"u")return new RSVP.Promise(o);if(typeof Promise<"u")return new Promise(o);n.log.error("Promise/A+ support is required.  See qz.api.setPromiseType(...)")},reject:function(o){return n.tools.promise(function(s,l){l(o)})},stringify:function(o){var s=Array.prototype.toJSON;delete Array.prototype.toJSON;function l(d,f){if(d!=="promise")return f}var c=JSON.stringify(o,l);return s&&(Array.prototype.toJSON=s),c},hash:function(o){return typeof Sha256<"u"?Sha256.hash(o):n.SHA.hash(o)},ws:typeof WebSocket<"u"?WebSocket:null,appendSurf:function(o){return n.tools.isQualified(o)?o:o+"."+n.websocket.connectConfig.surfDomain},isQualified:function(o){return o.toLowerCase()==="localhost"||o.indexOf(".")!==-1||o.indexOf(":")!==-1},absolute:function(o){if(typeof window<"u"&&typeof document.createElement=="function"){var s=document.createElement("a");return s.href=o,s.href}else TDt.resolve(o);return o},relative:function(o){for(var s=0;s<o.length;s++)if(o[s].constructor===Object){var l=!1;o[s].data&&o[s].data.search&&o[s].data.search(/data:image\/\w+;base64,/)===0?(o[s].flavor="base64",o[s].data=o[s].data.replace(/^data:image\/\w+;base64,/,"")):o[s].flavor?["FILE","XML"].indexOf(o[s].flavor.toUpperCase())>-1&&(l=!0):(o[s].format&&["HTML","IMAGE","PDF","FILE","XML"].indexOf(o[s].format.toUpperCase())>-1||o[s].type&&(["PIXEL","IMAGE","PDF"].indexOf(o[s].type.toUpperCase())>-1&&!o[s].format||["HTML","PDF"].indexOf(o[s].type.toUpperCase())>-1&&(!o[s].format||o[s].format.toUpperCase()==="FILE")))&&(l=!0),l&&(o[s].data=n.tools.absolute(o[s].data)),o[s].options&&typeof o[s].options.overlay=="string"&&(o[s].options.overlay=n.tools.absolute(o[s].options.overlay))}},extend:function(o){typeof o!="object"&&(o={});for(var s=1;s<arguments.length;s++){var l=arguments[s];if(l){for(var c in l)if(l.hasOwnProperty(c)){if(o===l[c])continue;if(l[c]&&l[c].constructor&&l[c].constructor===Object){var d;Array.isArray(l[c])?d=o[c]||[]:d=o[c]||{},o[c]=n.tools.extend(d,l[c])}else l[c]!==void 0&&(o[c]=l[c])}}}return o},versionCompare:function(o,s,l,c){if(n.tools.assertActive()){var d=n.websocket.connection.semver;if(Array.isArray(d)){if(o!=null&&d.length>0&&d[0]!=o)return d[0]-o;if(s!=null&&d.length>1&&d[1]!=s)return d[1]-s;if(l!=null&&d.length>2&&d[2]!=l)return d[2]-l;if(c!=null&&d.length>3&&d[3]!=c)return Number.isInteger(d[3])&&Number.isInteger(c)?d[3]-c:d[3].toString().localeCompare(c.toString())}return 0}},isVersion:function(o,s,l,c){return n.tools.versionCompare(o,s,l,c)==0},isActive:function(){return!n.websocket.shutdown&&n.websocket.connection!=null&&(n.websocket.connection.readyState===n.tools.ws.OPEN||n.websocket.connection.readyState===n.tools.ws.CONNECTING)},assertActive:function(){if(n.tools.isActive())return!0;throw new Error("A connection to "+n.TITLE+" has not been established yet")},uint8ArrayToHex:function(o){return Array.from(o).map(function(s){return s.toString(16).padStart(2,"0")}).join("")},uint8ArrayToBase64:function(o){var s=["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","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","0","1","2","3","4","5","6","7","8","9","+","/"],l="",c,d=o.length;for(c=2;c<d;c+=3)l+=s[o[c-2]>>2],l+=s[(o[c-2]&3)<<4|o[c-1]>>4],l+=s[(o[c-1]&15)<<2|o[c]>>6],l+=s[o[c]&63];return c===d+1&&(l+=s[o[c-2]>>
3112],l+=s[(o[c-2]&3)<<4],l+="=="),c===d&&(l+=s[o[c-2]>>2],l+=s[(o[c-2]&3)<<4|o[c-1]>>4],l+=s[(o[c-1]&15)<<2],l+="="),l}},compatible:{data:function(o){for(var s=0;s<o.length;s++)if(o[s].constructor===Object&&o[s].data instanceof Uint8Array&&o[s].flavor){var l=o[s].flavor.toString().toUpperCase();switch(l){case"BASE64":o[s].data=n.tools.uint8ArrayToBase64(o[s].data);break;case"HEX":o[s].data=n.tools.uint8ArrayToHex(o[s].data);break;default:throw new Error("Uint8Array conversion to '"+l+"' is not supported.")}}if(n.tools.versionCompare(2,2,4)<0)for(var s=0;s<o.length;s++)o[s].constructor===Object&&o[s].options&&typeof o[s].options.dotDensity=="string"&&(o[s].options.dotDensity=o[s].options.dotDensity.toLowerCase().replace("-legacy",""));if(n.tools.isVersion(2,0)){n.log.trace("Converting print data to v2.0 for "+n.websocket.connection.version);for(var s=0;s<o.length;s++)o[s].constructor===Object&&(o[s].type&&o[s].type.toUpperCase()==="RAW"&&o[s].format&&o[s].format.toUpperCase()==="IMAGE"&&(o[s].flavor&&o[s].flavor.toUpperCase()==="BASE64"&&(o[s].data="data:image/compat;base64,"+o[s].data),o[s].flavor="IMAGE"),(o[s].type&&o[s].type.toUpperCase()==="RAW"||o[s].format&&o[s].format.toUpperCase()==="COMMAND")&&(o[s].format="RAW"),o[s].type=o[s].format,o[s].format=o[s].flavor,delete o[s].flavor)}},config:function(o,s){return n.tools.isVersion(2,0)&&(s.rasterize||(o.rasterize=!0)),n.tools.versionCompare(2,2)<0&&o.forceRaw!=="undefined"&&(o.altPrinting=o.forceRaw,delete o.forceRaw),n.tools.versionCompare(2,1,2,11)<0&&o.spool&&(o.spool.size&&(o.perSpool=o.spool.size,delete o.spool.size),o.spool.end&&(o.endOfDoc=o.spool.end,delete o.spool.end),delete o.spool),o},networking:function(o,s,l,c,d){return n.tools.isVersion(2,0)?n.tools.promise(function(f,h){n.websocket.dataPromise("websocket.getNetworkInfo",{hostname:o,port:s},l,c).then(function(p){f(typeof d<"u"?d(p):p)},h)}):n.tools.promise(function(f,h){n.websocket.dataPromise("networking.device",{hostname:o,port:s},l,c).then(function(p){f({ipAddress:p.ip,macAddress:p.mac})},h)})},algorithm:function(o){return n.tools.isActive()&&n.websocket.connection.semver&&n.tools.isVersion(2,0)?(o||n.log.warn("Connected to an older version of "+n.TITLE+", alternate signature algorithms are not supported"),!1):!0}},SHA:{hash:function(o){o=n.SHA._utf8Encode(o)+"€";for(var s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],c=o.length/4+2,d=Math.ceil(c/16),f=new Array(d),h=0;h<d;h++){f[h]=new Array(16);for(var p=0;p<16;p++)f[h][p]=o.charCodeAt(h*64+p*4)<<24|o.charCodeAt(h*64+p*4+1)<<16|o.charCodeAt(h*64+p*4+2)<<8|o.charCodeAt(h*64+p*4+3)}f[d-1][14]=(o.length-1)*8/Math.pow(2,32),f[d-1][14]=Math.floor(f[d-1][14]),f[d-1][15]=(o.length-1)*8&4294967295;for(var g=new Array(64),_,b,E,S,P,O,I,N,h=0;h<d;h++){for(var M=0;M<16;M++)g[M]=f[h][M];for(var M=16;M<64;M++)g[M]=n.SHA._dev1(g[M-2])+g[M-7]+n.SHA._dev0(g[M-15])+g[M-16]&4294967295;_=l[0],b=l[1],E=l[2],S=l[3],P=l[4],O=l[5],I=l[6],N=l[7];for(var M=0;M<64;M++){var F=N+n.SHA._sig1(P)+n.SHA._ch(P,O,I)+s[M]+g[M],B=n.SHA._sig0(_)+n.SHA._maj(_,b,E);N=I,I=O,O=P,P=S+F&4294967295,S=E,E=b,b=_,_=F+B&4294967295}l[0]=l[0]+_&4294967295,l[1]=l[1]+b&4294967295,l[2]=l[2]+E&4294967295,l[3]=l[3]+S&4294967295,l[4]=l[4]+P&4294967295,l[5]=l[5]+O&4294967295,l[6]=l[6]+I&4294967295,l[7]=l[7]+N&4294967295}return n.SHA._hexStr(l[0])+n.SHA._hexStr(l[1])+n.SHA._hexStr(l[2])+n.SHA._hexStr(l[3])+n.SHA._hexStr(l[4])+n.SHA._hexStr(l[5])+n.SHA._hexStr(l[6])+n.SHA._hexStr(l[7])},_rotr:function(o,s){return s>>>o|s<<32-o},_sig0:function(o){return n.SHA._rotr(2,o)^n.SHA._rotr(13,o)^n.SHA._rotr(22,o)},_sig1:function(o){return n.SHA._rotr(6,o)^n.SHA._rotr(11,o)^n.SHA._rotr(25,o)},_dev0:function(o){return n.SHA._rotr(7,o)^n.SHA._rotr(18,o)^o>>>3},_dev1:function(o){return n.SHA._rotr(17,o)^n.SHA._rotr(19,o)^o>>>10},_ch:function(o,s,l){return o&s^~o&l},_maj:function(o,s,l){return o&s^o&l^s&l},_hexStr:function(o){for(var s="",l,c=7;c>=0;c--)l=o>>>c*4&15,s+=l.toString(16);return s},_unescape:function(o){return o.replace(/%(u[\da-f]{4}|[\da-f]{2})/gi,function(s){if(s.length-1)return String.fromCharCode(parseInt(s.substring(s.length-3?2:1),16));var l=s.charCodeAt(0);return l<256?"%"+(0+l.toString(16)).slice(-2).toUpperCase():"%u"+("000"+l.toString(16)).slice(-4).toUpperCase()})},_utf8Encode:function(o){return n.SHA._unescape(encodeURIComponent(o))}}};function i(o,s){this.config=n.tools.extend({},n.printing.defaultConfig),this._dirtyOpts={},this.setPrinter=function(l){typeof l=="string"&&(l={name:l}),this.printer=l},this.getPrinter=function(){return this.printer},this.reconfigure=function(l){for(var c in l)l[c]!==void 0&&(this._dirtyOpts[c]=!0);n.tools.extend(this.config,l)},this.getOptions=function(){return n.compatible.config(this.config,this._dirtyOpts)},this.setPrinter(o),this.reconfigure(s)}i.prototype.print=function(o,s,l){a.print(this,o,s,l)};var a={websocket:{isActive:function(){return n.tools.isActive()},connect:function(o){return n.tools.promise(function(s,l){if(n.websocket.connection){const f=n.websocket.connection.readyState;if(f===n.tools.ws.OPEN){l(new Error("An open connection with "+n.TITLE+" already exists"));return}else if(f===n.tools.ws.CONNECTING){l(new Error("The current connection attempt has not returned yet"));return}else if(f===n.tools.ws.CLOSING){l(new Error("Waiting for previous disconnect request to complete"));return}}if(n.tools.ws){if(!n.tools.ws.CLOSED||n.tools.ws.CLOSED==2){l(new Error("Unsupported WebSocket version detected: HyBi-00/Hixie-76"));return}}else{l(new Error("WebSocket not supported by this browser"));return}if(o==null&&(o={}),(typeof location>"u"||location.protocol!=="https:")&&typeof o.usingSecure>"u"&&(n.log.trace("Disabling secure ports due to insecure page"),o.usingSecure=!1),typeof o.host<"u"&&!Array.isArray(o.host)&&(o.host=[o.host],n.websocket.connectConfig.usingSurf))for(var c=0;c<o.host.length;c++)o.host[c]=n.tools.appendSurf(o.host[c]);n.websocket.shutdown=!1;var d=function(f){var h=!1,p=function(){h||(h=!0,o&&f<o.retries?d(f+1):(n.websocket.connection=null,l.apply(null,arguments)))},g=function(){var _=n.tools.extend({},n.websocket.connectConfig,o);n.websocket.setup.findConnection(_,s,p)};f==0?g():setTimeout(g,o.delay*1e3)};d(0)})},disconnect:function(){return n.tools.promise(function(o,s){n.websocket.connection!=null?n.tools.isActive()?(n.websocket.shutdown=!0,n.websocket.connection.promise={resolve:o,reject:s},n.websocket.connection.close()):s(new Error("Current connection is still closing")):s(new Error("No open connection with "+n.TITLE))})},setErrorCallbacks:function(o){n.websocket.errorCallbacks=o},setClosedCallbacks:function(o){n.websocket.closedCallbacks=o},setUsingSurf:function(o){n.websocket.connectConfig.usingSurf=o},setSurfDomain:function(o){o.indexOf(".")===0&&(o=o.substring(1)),n.websocket.connectConfig.surfDomain=o},getNetworkInfo:n.compatible.networking,getConnectionInfo:function(){if(n.tools.assertActive()){var o=n.websocket.connection.url.split(/[:\/]+/g);return{socket:o[0],host:o[1],port:+o[2]}}}},printers:{getDefault:function(o,s){return n.websocket.dataPromise("printers.getDefault",null,o,s)},find:function(o,s,l){return n.websocket.dataPromise("printers.find",{query:o},s,l)},details:function(){return n.websocket.dataPromise("printers.detail")},startListening:function(o,s){Array.isArray(o)||(o=[o]);var l={printerNames:o};return s&&s.jobData==!0&&(l.jobData=!0),s&&s.maxJobData&&(l.maxJobData=s.maxJobData),s&&s.flavor&&(l.flavor=s.flavor),n.websocket.dataPromise("printers.startListening",l)},clearQueue:function(o){return typeof o!="object"&&(o={printerName:o}),n.websocket.dataPromise("printers.clearQueue",o)},stopListening:function(){return n.websocket.dataPromise("printers.stopListening")},getStatus:function(){return n.websocket.dataPromise("printers.getStatus")},setPrinterCallbacks:function(o){n.printers.printerCallbacks=o}},configs:{setDefaults:function(o){n.tools.extend(n.printing.defaultConfig,o)},create:function(o,s){return new i(o,s)}},print:function(o,s){var l=!1,c=[],d=[];arguments.length>=3&&(typeof arguments[2]=="boolean"?(l=arguments[2],arguments.length>=5&&(c=arguments[3],d=arguments[4])):arguments.length>=4&&(c=arguments[2],d=arguments[3]),c&&!Array.isArray(c)&&(c=[c]),d&&!Array.isArray(d)&&(d=[d])),Array.isArray(o)||(o=[o]),Array.isArray(s[0])||(s=[s]);for(var f=0;f<s.length;f++)n.tools.relative(s[f]),n.compatible.data(s[f]);for(var h=function(S){var P={printer:S.config.getPrinter(),options:S.config.getOptions(),data:S.data};return n.websocket.dataPromise("print",P,S.signature,S.timestamp)},p=[],g=0;g<o.length||g<s.length;g++)(function(S){var P={config:o[Math.min(S,o.length-1)],data:s[Math.min(S,s.length-1)],signature:c[S],timestamp:d[S]};p.push(function(){return h(P)})})(g);var _=null;if(l){var b=[];_=function(S){b.push(S)},p.push(function(){return n.tools.promise(function(S,P){b.length?P(b):S()})})}var E=null;return p.reduce(function(S,P){return E=S.catch(_).then(P),E},n.tools.promise(function(S){S()})),E},serial:{findPorts:function(){return n.websocket.dataPromise("serial.findPorts")},setSerialCallbacks:function(o){n.serial.serialCallbacks=o},openPort:function(o,s){var l={port:o,options:s};return n.websocket.dataPromise("serial.openPort",l)},sendData:function(o,s,l){n.tools.versionCompare(2,1,0,12)>=0&&(typeof s!="object"&&(s={data:s,type:"PLAIN"}),s.type&&s.type.toUpperCase()=="FILE"&&(s.data=n.tools.absolute(s.data)));var c={port:o,data:s,options:l};return n.websocket.dataPromise("serial.sendData",c)},closePort:function(o){return n.websocket.dataPromise("serial.closePort",{port:o})}},socket:{open:function(o,s,l){var c={host:o,port:s,options:l};return n.websocket.dataPromise("socket.open",c)},close:function(o,s){var l={host:o,port:s};return n.websocket.dataPromise("socket.close",l)},sendData:function(o,s,l){typeof l!="object"&&(l={data:l,type:"PLAIN"});var c={host:o,port:s,data:l};return n.websocket.dataPromise("socket.sendData",c)},setSocketCallbacks:function(o){n.socket.socketCallbacks=o}},usb:{listDevices:function(o){return n.websocket.dataPromise("usb.listDevices",{includeHubs:o})},listInterfaces:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("usb.listInterfaces",o)},listEndpoints:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],interface:arguments[2]}),n.websocket.dataPromise("usb.listEndpoints",o)},setUsbCallbacks:function(o){n.usb.usbCallbacks=o},claimDevice:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],interface:arguments[2]}),n.websocket.dataPromise("usb.claimDevice",o)},isClaimed:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("usb.isClaimed",o)},sendData:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],endpoint:arguments[2],data:arguments[3]}),n.tools.versionCompare(2,1,0,12)>=0&&(typeof o.data!="object"&&(o.data={data:o.data,type:"PLAIN"}),o.data.type&&o.data.type.toUpperCase()=="FILE"&&(o.data.data=n.tools.absolute(o.data.data))),n.websocket.dataPromise("usb.sendData",o)},readData:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],endpoint:arguments[2],responseSize:arguments[3]}),n.websocket.dataPromise("usb.readData",o)},openStream:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],endpoint:arguments[2],responseSize:arguments[3],interval:arguments[4]}),n.websocket.dataPromise("usb.openStream",o)},closeStream:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],endpoint:arguments[2]}),n.websocket.dataPromise("usb.closeStream",o)},releaseDevice:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("usb.releaseDevice",o)}},hid:{listDevices:function(){return n.websocket.dataPromise("hid.listDevices")},startListening:function(){return n.websocket.dataPromise("hid.startListening")},stopListening:function(){return n.websocket.dataPromise("hid.stopListening")},setHidCallbacks:function(o){n.hid.hidCallbacks=o},claimDevice:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("hid.claimDevice",o)},isClaimed:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("hid.isClaimed",o)}
311,sendData:function(o){if(typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],data:arguments[2],endpoint:arguments[3]}),n.tools.versionCompare(2,1,0,12)>=0)typeof o.data!="object"&&(o.data={data:o.data,type:"PLAIN"}),o.data.type&&o.data.type.toUpperCase()=="FILE"&&(o.data.data=n.tools.absolute(o.data.data));else if(typeof o.data=="object"){if(o.data.type.toUpperCase()!=="PLAIN"||typeof o.data.data!="string")return n.tools.reject(new Error("Data format is not supported with connected "+n.TITLE+" version "+n.websocket.connection.version));o.data=o.data.data}return n.websocket.dataPromise("hid.sendData",o)},readData:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],responseSize:arguments[2]}),n.websocket.dataPromise("hid.readData",o)},sendFeatureReport:function(o){return n.websocket.dataPromise("hid.sendFeatureReport",o)},getFeatureReport:function(o){return n.websocket.dataPromise("hid.getFeatureReport",o)},openStream:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1],responseSize:arguments[2],interval:arguments[3]}),n.websocket.dataPromise("hid.openStream",o)},closeStream:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("hid.closeStream",o)},releaseDevice:function(o){return typeof o!="object"&&(o={vendorId:arguments[0],productId:arguments[1]}),n.websocket.dataPromise("hid.releaseDevice",o)}},file:{list:function(o,s){var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.list",l)},read:function(o,s){var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.read",l)},write:function(o,s){var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.write",l)},remove:function(o,s){var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.remove",l)},startListening:function(o,s){s&&typeof s.include<"u"&&!Array.isArray(s.include)&&(s.include=[s.include]),s&&typeof s.exclude<"u"&&!Array.isArray(s.exclude)&&(s.exclude=[s.exclude]);var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.startListening",l)},stopListening:function(o,s){var l=n.tools.extend({path:o},s);return n.websocket.dataPromise("file.stopListening",l)},setFileCallbacks:function(o){n.file.fileCallbacks=o}},networking:{device:function(o,s){return n.tools.isVersion(2,0)?n.compatible.networking(o,s,null,null,function(l){return{ip:l.ipAddress,mac:l.macAddress}}):n.websocket.dataPromise("networking.device",{hostname:o,port:s})},hostname:function(o,s){return n.tools.versionCompare(2,2,2)<0?n.tools.promise(function(l,c){n.websocket.dataPromise("networking.device",{hostname:o,port:s}).then(function(d){console.log(d),l(d.hostname)})}):n.websocket.dataPromise("networking.hostname")},devices:function(o,s){return n.tools.isVersion(2,0)?n.compatible.networking(o,s,null,null,function(l){return[{ip:l.ipAddress,mac:l.macAddress}]}):n.websocket.dataPromise("networking.devices",{hostname:o,port:s})}},security:{setCertificatePromise:function(o,s){n.security.certHandler=o,n.security.rejectOnCertFailure=!!(s&&s.rejectOnFailure)},setSignaturePromise:function(o){n.security.signatureFactory=o},setSignatureAlgorithm:function(o){n.compatible.algorithm()&&(["SHA1","SHA256","SHA512"].indexOf(o.toUpperCase())<0?n.log.error("Signing algorithm '"+o+"' is not supported."):n.security.signAlgorithm=o)},getSignatureAlgorithm:function(){return n.security.signAlgorithm}},api:{showDebug:function(o){return n.DEBUG=o},getTitle:function(){return n.TITLE},getVersion:function(){return n.websocket.dataPromise("getVersion")},isVersion:n.tools.isVersion,isVersionGreater:function(o,s,l,c){return n.tools.versionCompare(o,s,l,c)>0},isVersionLess:function(o,s,l,c){return n.tools.versionCompare(o,s,l,c)<0},setPromiseType:function(o){n.tools.promise=o},setSha256Type:function(o){n.tools.hash=o},setTitle:function(o){n.TITLE=o},setWebSocketType:function(o){n.tools.ws=o}},version:n.VERSION};return a})();(function(){e.exports=r})()})($F)),$F.exports}var PDt=ADt();
311const Wo=et(PDt),PIe="[PRINT MANAGEMENT] SET QZTRAY CONNECTED",RIe="[PRINT MANAGEMENT] SET QZTRAY LOADING",OIe="[PRINT MANAGEMENT] SET DEFAULT PRINTER",IIe="[PRINT MANAGEMENT] SET PRINTERS AVAILABLE",kIe="[PRINT MANAGEMENT] RESET QZTRAY PRINTERS INFO",NIe="[PRINT MANAGEMENT] SET ONLINE PRINTERS",DIe="[PRINT MANAGEMENT] SET ACTIVE LOCAL PRINTERS",MIe="[PRINT MANAGEMENT] SET DATA FOR MANUAL PRINT",RDt="[PRINT MANAGEMENT] RESET DATA FOR MANUAL PRINT";function mv(e){return{type:PIe,payload:e}}function ty(e){return{type:RIe,payload:e}}function ODt(e){return{type:OIe,payload:e}}function IDt(e){return{type:IIe,payload:e}}function ry(){return{type:kIe}}function kDt(e){return(t,r)=>{const n=r().printManager.onlinePrinters;r0(e,n)||t({type:NIe,payload:e})}}function NDt(e){return(t,r)=>{const n=r().printManager.sharedLocalPrinters;r0(e,n)||t({type:DIe,payload:e})}}function DDt(e){return{type:MIe,payload:e}}function MDt(){const e=An(),{hasModule:t}=Ah(),r=at(({printManager:c})=>c.qzTrayConnected),n=at(({printManager:c})=>c.printersAvailable),i=u.useCallback(()=>{e(ty(!0)),Promise.all([Wo.printers.find(),Wo.printers.getDefault()]).then(([c,d])=>{c?.length>0&&d?(e(IDt([...c,"Impressora Padrão"])),e(ODt(d))):e(ry())}).catch(()=>{e(ry())}).finally(()=>e(ty(!1)))},[e]),a=u.useCallback(()=>{Wo.websocket.isActive()?(e(mv(!0)),i()):(e(ty(!0)),Wo.websocket.connect({retries:2,delay:1,host:"localhost"}).then(()=>{e(mv(!0)),i()}).catch(()=>{e(mv(!1)),e(ry())}).finally(()=>e(ty(!1))))},[e,i]),o=u.useCallback(()=>{Wo.websocket.isActive()?(e(ty(!0)),Wo.websocket.disconnect().then(function(){nl.track("QZ Tray (endConnection)"),e(mv(!1)),e(ry())}).finally(()=>e(ty(!1)))):(e(mv(!1)),e(ry()))},[e]);u.useEffect(()=>{let c=null,d=null;return t(At.AUTOMATIC_PRINTING_MODULE)&&(c=setTimeout(()=>a(),1500)),Wo.websocket.setClosedCallbacks(()=>{e(mv(!1)),e(ry()),d=setTimeout(()=>a(),6e3)}),Wo.websocket.setErrorCallbacks(()=>{nl.track("QZ Tray (setErrorCallbacks)")}),()=>{clearTimeout(c),clearTimeout(d),Wo.websocket.isActive()&&Wo.websocket.disconnect().then(()=>{e(mv(!1))})}},[e,t,a]);const s=u.useCallback((c,d,f)=>{if(!r||!Wo.websocket.isActive())return Promise.reject(new Error("QZ Tray desconectado"));const h=Wo.configs.create(c,{encoding:"Cp850",copies:f});if(d?.[0]?.type==="pixel"&&d?.[0]?.format==="pdf"){const p=Wo.configs.create(c,{copies:f,colorType:"grayscale",interpolation:"nearest-neighbor"});return Wo.print(p,d)}return Wo.print(h,d)},[r]),l=r&&n?.length>0?o:a;return[s,l,i]}var WF,Fhe;function LDt(){if(Fhe)return WF;Fhe=1;var e=uIe(),t=x_(),r=bm(),n=jx(),i=r(function(a,o){return n(a)?e(a,t(o,1,n,!0)):[]});return WF=i,WF}var FDt=LDt();const Bhe=et(FDt);var GF,zhe;function BDt(){if(zhe)return GF;zhe=1;var e=Math.floor,t=Math.random;function r(n,i){return n+e(t()*(i-n+1))}return GF=r,GF}var KF,Hhe;function zDt(){if(Hhe)return KF;Hhe=1;var e=BDt(),t=n5(),r=a$(),n=parseFloat,i=Math.min,a=Math.random;function o(s,l,c){if(c&&typeof c!="boolean"&&t(s,l,c)&&(l=c=void 0),c===void 0&&(typeof l=="boolean"?(c=l,l=void 0):typeof s=="boolean"&&(c=s,s=void 0)),s===void 0&&l===void 0?(s=0,l=1):(s=r(s),l===void 0?(l=s,s=0):l=r(l)),s>l){var d=s;s=l,l=d}if(c||s%1||l%1){var f=a();return i(s+f*(l-s+n("1e-"+((f+"").length-1))),l)}return e(s,l)}return KF=o,KF}var HDt=zDt();const UDt=et(HDt);function LIe(){const[e,t]=u.useState(Rc.getAuthStatus());return u.useEffect(()=>Rc.subscribeAuthStatus(t),[]),{status:e,isReady:e===Rs.READY,isSyncing:e===Rs.SYNCING,isFailed:e===Rs.FAILED}}const VDt=600*1e3;class qDt{constructor(t=100){this.limit=t,this.recordsSet=new Set,this.recordsArray=[]}add(t){if(!this.recordsSet.has(t)&&(this.recordsArray.push(t),this.recordsSet.add(t),this.recordsArray.length>this.limit)){const r=this.recordsArray.shift();this.recordsSet.delete(r)}}has(t){return this.recordsSet.has(t)}}const FIe=new qDt;function jDt(e){const t=An(),{hasModule:r}=Ah(),{isReady:n}=LIe(),[i,a]=u.useState(0),o=at(({globalCompany:O})=>O.company.print_setting?.printers),s=at(({printManager:O})=>O.printersAvailable),l=at(({printManager:O})=>O.sharedLocalPrinters),c=at(({printManager:O})=>O.onlinePrinters),d=at(({globalCompany:O})=>O.company.id),f=at(({printManager:O})=>O.automaticPrintingAvailable),h=at(({auth:O})=>O.user?.user?.profile),p=u.useMemo(()=>o?.map(O=>O.name)||[],[o]),g=u.useCallback(async(O,I)=>{await Rc.addTaskToQueue(O,I)},[]),_=u.useCallback(async(O,I)=>{await Rc.removeTaskFromQueue(O,I)},[]),b=u.useCallback((O,I)=>{new Date().getTime()+i-I.timestamp<VDt&&!FIe.has(I.key)?e(I):_(O,I.key)},[e,_,i]),E=u.useCallback(()=>{const O=$C(p,s);nl.track("Remote printer sharing forced manually",{printers:O,printerCount:O.length}),Rc.forceSharePrintersFromThisSession(O,b).catch(I=>console.error("Failed to force printer sharing:",I))},[b,s,p]),S=n&&Yhe.includes(h)&&r(At.AUTOMATIC_PRINTING_MODULE)&&d?String(d):null,P=u.useRef(null);return u.useEffect(()=>{if(!S){P.current?.(),P.current=null;return}const O=5e3+UDt(-2500,1500),I=setTimeout(()=>{const N=`${S}/remotePrinting`;P.current?.(),P.current=Rc.watchPrintersStatus(N,a,(M,F)=>
311{t(kDt(M)),t(NDt(F))})},O);return()=>{clearTimeout(I),P.current?.(),P.current=null}},[t,S]),u.useEffect(()=>{if(!Yhe.includes(h)||!r(At.AUTOMATIC_PRINTING_MODULE))return;if(!f){Rc.stopSharingAllLocalPrinters();return}if(!c||!l||!p||!s)return;const O=$C(p,s),I=Bhe(O,c),N=Bhe(l,O);I.forEach(M=>Rc.startPrinterSharing(M,b)),N.forEach(M=>Rc.stopPrinterSharing(M))},[f,r,b,c,s,p,l,h]),[g,_,E]}const $Dt=3,WDt=3e3,Jy={ADD:"ADD",REMOVE:"REMOVE",REQUEUE:"REQUEUE"},GDt=(e,t)=>{switch(t.type){case Jy.ADD:return[...e,t.task];case Jy.REMOVE:return e.filter(r=>r.localKey!==t.localKey);case Jy.REQUEUE:return[...e.filter(n=>n.localKey!==t.task.localKey),t.task];default:return e}};function KDt(e){return new Promise(t=>setTimeout(t,e))}function rP(e){return{taskKey:e?.key||null,localKey:e?.localKey||null,printerName:e?.printer||null,template:e?.template||null,automatic:!!e?.automatic,orderId:e?.data?.id||null,retries:e?.retries||0}}function YDt(e){const{enqueueSnackbar:t,closeSnackbar:r}=KPe(),[n,i]=u.useReducer(GDt,[]),[a,o]=u.useState(!1),s=at(({printManager:B})=>B.defaultPrinter),l=at(({printManager:B})=>B.onlinePrinters),c=at(({globalCompany:B})=>B.company.print_setting?.printers),d=at(({printManager:B})=>B.printersAvailable),f=u.useMemo(()=>c?.map(B=>B.name)||[],[c]),h=SDt(),p=u.useCallback(B=>u.createElement(cr,{size:"small",onClick:()=>r(B),className:"mr-12 text-white"},u.createElement(wDt,null)),[r]),g=u.useCallback(B=>{i({type:Jy.ADD,task:B})},[]),_=u.useCallback(B=>{i({type:Jy.REMOVE,localKey:B})},[]),b=u.useCallback(B=>{i({type:Jy.REQUEUE,task:B})},[]),[E,S,P]=MDt(),[O,I,N]=jDt(g),M=u.useCallback(B=>B==="Impressora Padrão"&&s||B,[s]);return u.useEffect(()=>{(async()=>{if(n.length>0&&!a){o(!0);const V=n[0],{printer:W,template:$,data:X,copies:re,automatic:ae}=V,Q=V.retries||0;try{Q>0&&await KDt(WDt*Q);const ie=e($,X,W,ae);if(await E(M(W),ie,re),V.key&&FIe.add(V.key),_(V.localKey),V.key)try{await I(W,V.key)}catch(le){nl.track("Print job remote cleanup failed",{...rP(V),error:le?.message})}}catch(ie){const le=Q+1;le>=$Dt?(_(V.localKey),t(`Problema durante impressão (${W})`,{variant:"error",persist:!0,action:p,style:{fontSize:"16px"}}),nl.track("Print job dead",{...rP(V),error:ie?.message,retries:le})):b({...V,retries:le})}finally{o(!1)}}})()},[p,e,M,t,a,n,E,_,I,b]),[u.useCallback(async(B,V,W)=>{const $=h(B,V,W);for(const X of $)X.printer?$C(f,d)?.includes(X.printer)?(g(X),t(`Impressão enviada para ${X.printer}`,{variant:"success",action:p,style:{fontSize:"16px"}})):l?.includes(X.printer)?(await O(X.printer,X),t(`Impressão enviada para ${X.printer}`,{variant:"success",action:p,style:{fontSize:"16px"}})):(nl.track("Print job discarded - printer unavailable",rP(X)),t(`Impressora ${X.printer} indisponível`,{variant:"error",persist:!0,action:p,style:{fontSize:"16px"}})):(nl.track("Print job discarded - printer unavailable",{...rP(X),error:"missing_printer"}),t("Problema durante a impressão",{variant:"error",persist:!0,action:p,style:{fontSize:"16px"}}))},[p,g,O,h,t,l,d,f]),S,P,N]}function HK(){const e=at(({printManager:a})=>a.onlinePrinters),t=at(({globalCompany:a})=>a.company.print_setting?.printers),r=at(({printManager:a})=>a.printersAvailable),n=u.useMemo(()=>t?.map(a=>a.name)||[],[t]);return $C(n,r)?.length>0||e?.length>0}var YF={exports:{}},Uhe;function XDt(){return Uhe||(Uhe=1,(function(e,t){(function(n,i){e.exports=i()})(window,function(){return(function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(o&1&&(a=i(a)),o&8||o&4&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),o&2&&typeof a!="string")for(var l in a)i.d(s,l,(function(c){return a[c]}).bind(null,l));return s},i.n=function(a){var o=a&&a.__esModule?(function(){return a.default}):(function(){return a});return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=0)})({
311"./src/index.js":(function(r,n,i){i.r(n),i("./src/sass/index.scss");var a=i("./src/js/init.js"),o=a.default.init;typeof window<"u"&&(window.printJS=o),n.default=o}),
311"./src/js/browser.js":(function(r,n,i){i.r(n);var a={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!a.isIE()&&!!window.StyleMedia},isChrome:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!s.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};n.default=a}),
311"./src/js/functions.js":(function(r,n,i){i.r(n),i.d(n,"addWrapper",function(){return l}),i.d(n,"capitalizePrint",function(){return c}),i.d(n,"collectStyles",function(){return d}),i.d(n,"addHeader",function(){return h}),i.d(n,"cleanUp",function(){return p}),i.d(n,"isRawHTML",function(){return g});var a=i("./src/js/modal.js"),o=i("./src/js/browser.js");function s(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(E){return typeof E}:s=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},s(_)}function l(_,b){var E="font-family:"+b.font+" !important; font-size: "+b.font_size+" !important; width:100%;";return'<div style="'+E+'">'+_+"</div>"}function c(_){return _.charAt(0).toUpperCase()+_.slice(1)}function d(_,b){for(var E=document.defaultView||window,S="",P=E.getComputedStyle(_,""),O=0;O<P.length;O++)(b.targetStyles.indexOf("*")!==-1||b.targetStyle.indexOf(P[O])!==-1||f(b.targetStyles,P[O]))&&P.getPropertyValue(P[O])&&(S+=P[O]+":"+P.getPropertyValue(P[O])+";");return S+="max-width: "+b.maxWidth+"px !important; font-size: "+b.font_size+" !important;",S}function f(_,b){for(var E=0;E<_.length;E++)if(s(b)==="object"&&b.indexOf(_[E])!==-1)return!0;return!1}function h(_,b){var E=document.createElement("div");if(g(b.header))E.innerHTML=b.header;else{var S=document.createElement("h1"),P=document.createTextNode(b.header);S.appendChild(P),S.setAttribute("style",b.headerStyle),E.appendChild(S)}_.insertBefore(E,_.childNodes[0])}function p(_){_.showModal&&a.default.close(),_.onLoadingEnd&&_.onLoadingEnd(),(_.showModal||_.onLoadingStart)&&window.URL.revokeObjectURL(_.printable);var b="mouseover";(o.default.isChrome()||o.default.isFirefox())&&(b="focus");var E=function S(){window.removeEventListener(b,S),_.onPrintDialogClose();var P=document.getElementById(_.frameId);P&&P.remove()};window.addEventListener(b,E)}function g(_){var b=new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>");return b.test(_)}}),
311"./src/js/html.js":(function(r,n,i){i.r(n);var a=i("./src/js/functions.js"),o=i("./src/js/print.js");function s(d){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(h){return typeof h}:s=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},s(d)}n.default={print:function(f,h){var p=c(f.printable)?f.printable:document.getElementById(f.printable);if(!p){window.console.error("Invalid HTML element id: "+f.printable);return}f.printableElement=l(p,f),f.header&&Object(a.addHeader)(f.printableElement,f),o.default.send(f,h)}};function l(d,f){for(var h=d.cloneNode(),p=Array.prototype.slice.call(d.childNodes),g=0;g<p.length;g++)if(f.ignoreElements.indexOf(p[g].id)===-1){var _=l(p[g],f);h.appendChild(_)}switch(f.scanStyles&&d.nodeType===1&&h.setAttribute("style",Object(a.collectStyles)(d,f)),d.tagName){case"SELECT":h.value=d.value;break;case"CANVAS":h.getContext("2d").drawImage(d,0,0);break}return h}function c(d){return s(d)==="object"&&d&&(d instanceof HTMLElement||d.nodeType===1)}}),
311"./src/js/image.js":(function(r,n,i){i.r(n);var a=i("./src/js/functions.js"),o=i("./src/js/print.js"),s=i("./src/js/browser.js");n.default={print:function(c,d){c.printable.constructor!==Array&&(c.printable=[c.printable]),c.printableElement=document.createElement("div"),c.printable.forEach(function(f){var h=document.createElement("img");if(h.setAttribute("style",c.imageStyle),h.src=f,s.default.isFirefox()){var p=h.src;h.src=p}var g=document.createElement("div");g.appendChild(h),c.printableElement.appendChild(g)}),c.header&&Object(a.addHeader)(c.printableElement,c),o.default.send(c,d)}}}),
311"./src/js/init.js":(function(r,n,i){i.r(n);var a=i("./src/js/browser.js"),o=i("./src/js/modal.js"),s=i("./src/js/pdf.js"),l=i("./src/js/html.js"),c=i("./src/js/raw-html.js"),d=i("./src/js/image.js"),f=i("./src/js/json.js");function h(g){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(b){return typeof b}:h=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},h(g)}var p=["pdf","html","image","json","raw-html"];n.default={init:function(){var _={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",maxWidth:800,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(N){throw N},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:function(){},onIncompatibleBrowser:function(){},modalMessage:"Retrieving Document...",frameId:"printJS",printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1,onPdfOpen:null,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,imageStyle:"max-width: 100%;"},b=arguments[0];if(b===void 0)throw new Error("printJS expects at least 1 attribute.");switch(h(b)){case"string":_.printable=encodeURI(b),_.fallbackPrintable=_.printable,_.type=arguments[1]||_.type;break;case"object":_.printable=b.printable,_.fallbackPrintable=typeof b.fallbackPrintable<"u"?b.fallbackPrintable:_.printable,_.fallbackPrintable=_.base64?"data:application/pdf;base64,".concat(_.fallbackPrintable):_.fallbackPrintable;for(var E in _)E==="printable"||E==="fallbackPrintable"||(_[E]=typeof b[E]<"u"?b[E]:_[E]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+h(b))}if(!_.printable)throw new Error("Missing printable information.");if(!_.type||typeof _.type!="string"||p.indexOf(_.type.toLowerCase())===-1)throw new Error("Invalid print type. Available types are: pdf, html, image and json.");_.showModal&&o.default.show(_),_.onLoadingStart&&_.onLoadingStart();var S=document.getElementById(_.frameId);S&&S.parentNode.removeChild(S);var P=document.createElement("iframe");switch(a.default.isFirefox()?P.setAttribute("style","width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0"):P.setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute; border: 0"),P.setAttribute("id",_.frameId),_.type!=="pdf"&&(P.srcdoc="<html><head><title>"+_.documentTitle+"</title>",_.css&&(Array.isArray(_.css)||(_.css=[_.css]),_.css.forEach(function(I){P.srcdoc+='<link rel="stylesheet" href="'+I+'">'})),P.srcdoc+="</head><body></body></html>"),_.type){case"pdf":if(a.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var O=window.open(_.fallbackPrintable,"_blank");O.focus(),_.onIncompatibleBrowser()}catch(I){_.onError(I)}finally{_.showModal&&o.default.close(),_.onLoadingEnd&&_.onLoadingEnd()}else s.default.print(_,P);break;case"image":d.default.print(_,P);break;case"html":l.default.print(_,P);break;case"raw-html":c.default.print(_,P);break;case"json":f.default.print(_,P);break}}}}),
311"./src/js/json.js":(function(r,n,i){i.r(n);var a=i("./src/js/functions.js"),o=i("./src/js/print.js");function s(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(f){return typeof f}:s=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},s(c)}n.default={print:function(d,f){if(s(d.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof d.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!d.properties||!Array.isArray(d.properties))throw new Error("Invalid properties array for your JSON data.");d.properties=d.properties.map(function(h){return{field:s(h)==="object"?h.field:h,displayName:s(h)==="object"?h.displayName:h,columnSize:s(h)==="object"&&h.columnSize?h.columnSize+";":100/d.properties.length+"%;"}}),d.printableElement=document.createElement("div"),d.header&&Object(a.addHeader)(d.printableElement,d),d.printableElement.innerHTML+=l(d),o.default.send(d,f)}};function l(c){var d=c.printable,f=c.properties,h='<table style="border-collapse: collapse; width: 100%;">';c.repeatTableHeader&&(h+="<thead>"),h+="<tr>";for(var p=0;p<f.length;p++)h+='<th style="width:'+f[p].columnSize+";"+c.gridHeaderStyle+'">'+Object(a.capitalizePrint)(f[p].displayName)+"</th>";h+="</tr>",c.repeatTableHeader&&(h+="</thead>"),h+="<tbody>";for(var g=0;g<d.length;g++){h+="<tr>";for(var _=0;_<f.length;_++){var b=d[g],E=f[_].field.split(".");if(E.length>1)for(var S=0;S<E.length;S++)b=b[E[S]];else b=b[f[_].field];h+='<td style="width:'+f[_].columnSize+c.gridStyle+'">'+b+"</td>"}h+="</tr>"}return h+="</tbody></table>",h}}),
311"./src/js/modal.js":(function(r,n,i){i.r(n);var a={show:function(s){var l="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",c=document.createElement("div");c.setAttribute("style",l),c.setAttribute("id","printJS-Modal");var d=document.createElement("div");d.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var f=document.createElement("div");f.setAttribute("class","printClose"),f.setAttribute("id","printClose"),d.appendChild(f);var h=document.createElement("span");h.setAttribute("class","printSpinner"),d.appendChild(h);var p=document.createTextNode(s.modalMessage);d.appendChild(p),c.appendChild(d),document.getElementsByTagName("body")[0].appendChild(c),document.getElementById("printClose").addEventListener("click",function(){a.close()})},close:function(){var s=document.getElementById("printJS-Modal");s&&s.parentNode.removeChild(s)}};n.default=a}),
311"./src/js/pdf.js":(function(r,n,i){i.r(n);var a=i("./src/js/print.js"),o=i("./src/js/functions.js");n.default={print:function(c,d){if(c.base64){var f=Uint8Array.from(atob(c.printable),function(p){return p.charCodeAt(0)});s(c,d,f);return}c.printable=/^(blob|http|\/\/)/i.test(c.printable)?c.printable:window.location.origin+(c.printable.charAt(0)!=="/"?"/"+c.printable:c.printable);var h=new window.XMLHttpRequest;h.responseType="arraybuffer",h.addEventListener("error",function(){Object(o.cleanUp)(c),c.onError(h.statusText,h)}),h.addEventListener("load",function(){if([200,201].indexOf(h.status)===-1){Object(o.cleanUp)(c),c.onError(h.statusText,h);return}s(c,d,h.response)}),h.open("GET",c.printable,!0),h.send()}};function s(l,c,d){var f=new window.Blob([d],{type:"application/pdf"});f=window.URL.createObjectURL(f),c.setAttribute("src",f),a.default.send(l,c)}}),
311"./src/js/print.js":(function(r,n,i){i.r(n);var a=i("./src/js/browser.js"),o=i("./src/js/functions.js"),s={send:function(h,p){document.getElementsByTagName("body")[0].appendChild(p);var g=document.getElementById(h.frameId);g.onload=function(){if(h.type==="pdf"){a.default.isFirefox()?setTimeout(function(){return l(g,h)},1e3):l(g,h);return}var _=g.contentWindow||g.contentDocument;if(_.document&&(_=_.document),_.body.appendChild(h.printableElement),h.type!=="pdf"&&h.style){var b=document.createElement("style");b.innerHTML=h.style,_.head.appendChild(b)}var E=_.getElementsByTagName("img");E.length>0?c(Array.from(E)).then(function(){return l(g,h)}):l(g,h)}}};function l(f,h){try{if(f.focus(),a.default.isEdge()||a.default.isIE())try{f.contentWindow.document.execCommand("print",!1,null)}catch{f.contentWindow.print()}else f.contentWindow.print()}catch(p){h.onError(p)}finally{a.default.isFirefox()&&(f.style.visibility="hidden",f.style.left="-1px"),Object(o.cleanUp)(h)}}function c(f){var h=f.map(function(p){if(p.src&&p.src!==window.location.href)return d(p)});return Promise.all(h)}function d(f){return new Promise(function(h){var p=function g(){!f||typeof f.naturalWidth>"u"||f.naturalWidth===0||!f.complete?setTimeout(g,500):h()};p()})}n.default=s}),
311"./src/js/raw-html.js":(function(r,n,i){i.r(n);var a=i("./src/js/print.js");n.default={print:function(s,l){s.printableElement=document.createElement("div"),s.printableElement.setAttribute("style","width:100%"),s.printableElement.innerHTML=s.printable,a.default.send(s,l)}}}),
311"./src/sass/index.scss":(function(r,n,i){})
311,0:(function(r,n,i){r.exports=i("./src/index.js")})}).default})})(YF)),YF.exports}var ZDt=XDt();const Vhe=et(ZDt);function QDt(){const e=at(({printManager:t})=>t.dataForManualPrint);return e?u.createElement("div",{id:"printJS-div",className:"fixed z-0"},e.map((t,r)=>u.createElement("pre",{key:r,style:{fontSize:16,lineHeight:1.35,marginTop:0,marginBottom:0}},t))):null}function JDt(e){const t=An(),r=at(({printManager:i})=>i.dataForManualPrint),n=u.useCallback((i,a)=>{if(i==="pdf")Vhe({printable:a,type:"pdf",showModal:!0,modalMessage:"Buscando nota fiscal"});else{const s=e(i,a,null);t(DDt(s))}},[e,t]);return u.useEffect(()=>{r&&Vhe({printable:"printJS-div",type:"html",scanStyles:!1})},[r,t]),n}function e6t(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const qhe=48,IV={};function t6t(e){const t=new XMLHttpRequest;t.onload=function(){const r=new FileReader;r.onloadend=function(){IV[e]=r.result},r.readAsDataURL(t.response)},t.open("GET",e),t.responseType="blob",t.send()}class tf{init(t=qhe,r=!0,n=!0){this.printWidth=t||qhe,this.printerAcceptSpecialCharacters=r,this.useESCPOSCommands=n,this.currentAlignment="left",this.lineBreakCharacter=`
312`,this.template=[],this.useESCPOSCommands?(this.template.push("\x1B@"),this.template.push("���\0�"),this.template.push("\x1Bt�")):this.lineBreak(1)}handleSpecialCharacters=t=>this.printerAcceptSpecialCharacters?t:e6t(t);handleAlignment=t=>{if(this.useESCPOSCommands)return t;if(this.currentAlignment==="center"){const r=Math.floor((this.printWidth-t.length)/2)+t.length,n=this.printWidth;return t.padStart(r," ").padEnd(n," ")}else return t};breakIntoMultipleLines=(t,r=!1,n=0,i=0)=>{if(typeof t!="string")return"";const o=Math.floor(this.printWidth/(this.useESCPOSCommands&&r?2:1))-n;if(t=t.replace(/[\n\r\t\v]/g,""),t.length>o){if(o>0){const s=" ".repeat(n)+t.substring(0,o),l=t.substring(o),c=new RegExp(".{1,"+(o-i)+"}","g"),f=l.match(c).map(h=>" ".repeat(n+i)+h.trimStart());return[s,...f]}return t}else return" ".repeat(n)+t};printContent=t=>{if(typeof t=="string"){const r=this.handleAlignment(this.handleSpecialCharacters(t));this.template.push(r+this.lineBreakCharacter)}else Array.isArray(t)?t.forEach(r=>this.printContent(r)):typeof t=="object"&&this.template.push(t)};image=t=>{this.useESCPOSCommands&&(IV[t]?this.printContent({type:"raw",format:"image",flavor:"base64",data:IV[t],options:{language:"ESCPOS",dotDensity:"double"}}):(this.printContent({type:"raw",format:"image",flavor:"file",data:t,options:{language:"ESCPOS",dotDensity:"double"}}),t6t(t)))};bold=t=>{this.useESCPOSCommands?(this.template.push("\x1BE\r"),this.printContent(t),this.template.push(`\x1BE
313`)):this.printContent(t)};boldMedium=t=>{this.useESCPOSCommands?(this.template.push("\x1B! "),this.printContent(t),this.template.push("\x1B!\0")):this.printContent(t)};small=t=>{this.useESCPOSCommands?(this.template.push("\x1BM1"),this.printContent(t),this.template.push("\x1BM0")):this.printContent(t)};emMode=t=>{this.useESCPOSCommands?(this.template.push("\x1B!0"),this.printContent(t),this.template.push(`\x1B!
314\x1BE
315`)):this.printContent(t)};reverseMode=t=>{this.useESCPOSCommands?(this.template.push("\x1BE\r"),this.template.push("�B�"),this.printContent(t),this.template.push("�B\0"),this.template.push(`\x1BE
316`)):this.printContent(t)};twoColumns=(t,r,n=!1,i=" ",a=!1)=>{const o=this.useESCPOSCommands&&n;let s="";const c=(o?this.printWidth/2:this.printWidth)-r.length;if(t.length>c-2){if(s=t.substring(0,c-2)+"  "+r,a){const d="   "+t.substring(c-2);s+=d}}else s=t.padEnd(c,i)+r;return n?this.emMode(s):s};centerAlign=()=>{this.useESCPOSCommands?this.template.push("\x1Ba1"):this.currentAlignment="center"};leftAlign=()=>{this.useESCPOSCommands?this.template.push("\x1Ba0"):this.currentAlignment="left"};lineBreak=(t=1)=>{this.template.push(this.lineBreakCharacter.repeat(t))};horizontalDivision=(t=!1,r=!1,n="-")=>{t&&this.lineBreak(),this.printContent("".padEnd(this.printWidth,n)),r&&this.lineBreak()};finishPrinting=()=>(this.useESCPOSCommands&&(this.template.push("\x1Bi"),this.template.push("���\0�")),this.template);qrCode=t=>{if(this.useESCPOSCommands){const n=t.length+3,i=String.fromCharCode(n%256),a=String.fromCharCode(Math.floor(n/256));["�(k�\x001A2\0","�(k�\x001C�","�(k�\x001E0","�(k"+i+a+"1P0"+t,"�(k�\x001Q0","�(k�\x001R0"].forEach(s=>this.template.push(s))}}}function r6t(e,t,r){const n=new tf;if(n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),t.name&&(n.printContent(t.name),n.lineBreak()),e.order_type==="closed_table"||e.order_type==="temporary_order"?(e.order_session?n.emMode(`${e.order_session.mode?.toUpperCase()} ${e.order_session.number?.toString().padStart(2,"0")}`):e.table_number?n.emMode(`MESA ${e.table_number?.toString().padStart(2,"0")}`):n.emMode("PEDIDO DE MESA"),n.printContent(`Pedido Nº ${e.order_number||e.id}`),n.printContent(qe().format("DD/MM/YYYY HH:mm"))):(n.emMode(`Pedido Nº ${e.order_number||e.id}`),n.printContent(qe().format("DD/MM/YYYY HH:mm"))),e.order_number&&n.printContent(`Cód. interno: #${e.id}`),n.lineBreak(),n.emMode("+--------------+"),n.emMode("| CANCELAMENTO |"),n.emMode("+--------------+"),n.lineBreak(),n.leftAlign(),e.order_type==="temporary_order"){const i=e?.order_items?.length>0?gK(e.order_items.map(s=>s.user_name)).join(", "):null,a=e?.user?e.user:null,o=i||a;o&&n.bold(`Atendente: ${o}`)}else e.client&&n.bold(`Cliente: ${e.client.name}`);return n.lineBreak(),n.centerAlign(),n.bold("ITENS CANCELADOS"),n.leftAlign(),n.horizontalDivision(!1,!0),e.order_items.forEac
316h(i=>{const a=i.quantity.toString(),o=(i.kitchen_print_name||i.name)+(r.item_number_in_receipt&&(i.custom_code||i.number)?` (Cód.: ${i.custom_code||i.number})`:"");n.boldMedium(n.breakIntoMultipleLines(a+" "+o,!0)),i.kind==="combo"?i.combo_items.forEach(s=>{const l=s.kitchen_print_name||s.name;n.printContent(`  * ${l}`),s.order_subitems&&s.order_subitems.forEach(c=>{c.quantity>1?n.boldMedium(n.breakIntoMultipleLines(`${c.quantity} ${c.name}`,!0,4)):n.boldMedium(n.breakIntoMultipleLines(`- ${c.name}`,!0,4))}),s.observation&&n.boldMedium(n.breakIntoMultipleLines(`OBS: ${s.observation}`,!0,4))}):(i.order_subitems&&i.order_subitems.forEach(s=>{s.quantity>1?n.boldMedium(n.breakIntoMultipleLines(`${s.quantity} ${s.name}`,!0,2)):n.boldMedium(n.breakIntoMultipleLines(`- ${s.name}`,!0,2))}),i.observation&&n.boldMedium(`  OBS: ${i.observation}`)),n.horizontalDivision(!0,!0)}),e.printAreaName&&e.quantityOfPrintAreas>1&&n.boldMedium(`SETOR: ${e.printAreaName}`),n.lineBreak(4),n.finishPrinting()}function n6t(e,t,r){const n=new tf;return n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),n.printContent(t.name),n.lineBreak(),e.kind==="outflow"?n.emMode("SANGRIA"):e.kind==="supply"?n.emMode("SUPRIMENTO"):n.emMode("OPERAÇÃO"),n.lineBreak(),n.printContent(`Feita em ${qe(e.created_at).format("DD/MM/YYYY HH:mm")}`),n.printContent(`Operação Nº ${e.id}`),n.printContent(`Caixa Nº ${e.cash_flow_id}`),n.lineBreak(),n.leftAlign(),n.bold(n.breakIntoMultipleLines(`Descrição: ${e.description}`)),n.lineBreak(),n.twoColumns("Valor",me.formatMonetaryValue(e.value),!0),n.lineBreak(),e.user?.name&&n.printContent(n.breakIntoMultipleLines(`Operador: ${e.user.name}`)),n.printContent(`Emitido em ${qe().format("DD/MM/YYYY HH:mm")}`),n.lineBreak(4),n.centerAlign(),n.printContent("____________________________"),n.printContent("Assinatura"),n.lineBreak(4),n.finishPrinting()}function i6t({title:e}){return u.createElement("div",{className:"relative mt-40"},u.createElement(zs,{className:"mb-24"}),u.createElement("span",{className:"absolute z-10 whitespace-nowrap bg-white px-8 text-12 font-bold text-gray-700",style:{to
316p:-6,left:"50%",transform:"translateX(-50%)"}},e))}function a6t({label:e,value:t}){return!t&&t!==0?null:u.createElement("div",{className:"mb-8 flex items-center justify-between"},u.createElement("span",null,e),u.createElement("span",null,me.formatMonetaryValue(t,!0)))}function Xtr({label:e}){return u.createElement("div",{className:"mb-8 font-bold"},u.createElement("span",null,e))}function o6t({label:e,value:t,size:r="medium"}){return!t&&t!==0?null:u.createElement("div",{className:Ft("mb-8 flex items-center justify-between font-bold",r==="medium"&&"text-16")},u.createElement("span",null,e),u.createElement("span",null,me.formatMonetaryValue(t,!0)))}function Ztr(){return u.createElement("div",{className:"flex items-center"},"NÃO HÁ REGISTROS")}function s6t(){return u.createElement(zs,{className:"mb-8"})}const BIe={pick_up_store:"RETIRADA",takeout:"RETIRADA",onsite:"NO LOCAL",delivery:"DELIVERY",service_desk:"BALCÂO",cash_desk:"BALCÂO",closed_table:"MESA"};function Qtr({data:e}){return e?.order_types?.length>0?u.createElement(u.Fragment,null,u.createElement(i6t,{title:"PEDIDOS CANCELADOS"}),Nu(e.order_types,"total","desc").map(t=>{const r=t.quantity?` (${t.quantity} PEDIDO${t.quantity>1?"S":""})`:"",n=`${BIe[t.order_type]?.toUpperCase()||"INDEFINIDO"}${r}`;return u.createElement(a6t,{key:t.order_type,label:n,value:t.total})}),u.createElement(s6t,null),u.createElement(o6t,{label:"TOTAL",value:e.details.total_value||null})):null}function l6t(e,t,r){if(r){e.horizontalDivision(!0,!1,"="),e.bold(t),e.horizontalDivision(!1,!1,"=");const n=z_(r.payment_methods,"payment_type");n.online?.length>0&&(e.printContent("PAGAMENTOS ONLINE"),Nu(n.online,"total","desc").map(i=>{const a=mr[i.payment_method]?.shortName?.toUpperCase()||i.payment_method_name?.toUpperCase()||"INDEFINIDO",o=i.card_brand?.toUpperCase(),s=o?`- ${a} (${o})`:`- ${a}`;return e.printContent(e.twoColumns(s,me.formatMonetaryValue(i.total,!0),!1,"."))})),n.offline?.length>0&&(e.printContent("PAGAMENTOS OFFLINE"),Nu(n.offline,"total","desc").map(i=>{const a=mr[i.payment_method]?.shortName?.toUpperCase()||i.payment_method_name?.toUpperCase()||"INDEFINIDO",o=i.card_brand?.toUpperCase(),s=o?`- ${a} (${o})`:`- ${a}`;return e.printContent(e.twoColumns(s,me.formatMonetaryValue(i.total,!0),!1,"."))})),e.horizontalDivision(!1,!1,"-"),r.details?.items_value&&e.printContent(e.twoColumns("VALOR DOS PRODUTOS ",` ${me.formatMonetaryValue(r.details?.items_value,!0)}`,!1,".")),r.details?.total_delivery_fee&&e.printContent(e.twoColumns("TAXAS DE ENTREGA ",` ${me.formatMonetaryValue(r.details?.total_delivery_fee,!0)}`,!1,".")),r.details?.total_service_fee&&e.printContent(e.twoColumns("TAXAS DE SERVIÇO ",` ${me.formatMonetaryValue(r.details?.total_service_fee,!0)}`,!1,".")),r.details?.total_additional_fee&&e.printContent(e.twoColumns("TAXAS ADICIONAIS ",` ${me.formatMonetaryValue(r.details?.total_additional_fee,!0)}`,!1,".")),r.details?.total_payment_fee&&e.printContent(e.twoColumns("ACRÉSCIMOS MAQUINETA ",` ${me.formatMonetaryValue(r.details?.total_payment_fee,!0)}`,!1,".")),r.details?.total_discount_merchant&&e.printContent(e.twoColumns("DESCONTOS (LOJA) ",` ${me.formatMonetaryValue(r.details?.total_discount_merchant,!0)}`,!1,".")),r.details?.total_discount_ifood&&e.printContent(e.twoColumns("DESCONTOS (IFOOD) ",` ${me.formatMonetaryValue(r.details?.total_discount_ifood,!0)}`,!1,".")),e.horizontalDivision(!1,!1,"-"),e.twoColumns("TOTAL ",` ${me.formatMonetaryValue(r.details?.total_value,!0)}`,!0,"."),e.lineBreak()}}function wE(e,t,r,n=!1){r&&(e.horizontalDivision(!0,!1,"="),e.bold(t),e.horizontalDivision(!1,!1,"="),Nu(r.payment_methods,"total","desc").map(i=>e.printContent(e.twoColumns(`${i.payment_method_name?.toUpperCase()} `,` ${me.formatMonetaryValue(i.total,!0)}`,!1,"."))),n||(e.horizontalDivision(!1,!1,"-"),r.details?.items_value&&e.printContent(e.twoColumns("VALOR DOS PRODUTOS ",` ${me.formatMonetaryValue(r.details?.items_value,!0)}`,!1,".")),r.details?.total_delivery_fee&&e.printContent(e.twoColumns("TAXAS DE ENTREGA ",` ${me.formatMonetaryValue(r.details?.total_delivery_fee,!0)}`,!1,".")),r.details?.total_service_fee&&e.printContent(e.twoColumns("TAXAS DE SERVIÇO ",` ${me.formatMonetaryValue(r.details?.total_service_fee,!0)}`,!1,".")),r.details?.total_additional_fee&&e.printContent(e.twoColumns("TAXAS ADICIONAIS ",` ${me.formatMonetaryValue(r.details?.total_additional_fee,!0)}`,!1,".")),r.details?.total_payment_fee&&e.printContent(e.twoColumns("ACRÉSCIMOS MAQUINETA ",` ${me.formatMonetaryValue(r.details?.total_payment_fee,!0)}`,!1,".")),r.details?.total_discount&&e.printContent(e.twoColumns("DESCONTOS ",` ${me.formatMonetaryValue(r.details?.total_discount,!0)}
316`,!1,"."))),e.horizontalDivision(!1,!1,"-"),e.twoColumns("TOTAL ",` ${me.formatMonetaryValue(r.details?.total_value,!0)}`,!0,"."),e.lineBreak())}function c6t(e,t,r){const n=Oo(e.operations_summary,"kind"),i=Oo(e.sales_by_payment_method,"payment_method"),a=e?.initial_value||0,o=n.sale&&n.sale.total||0,s=n.supply&&n.supply.total||0,l=n.outflow&&n.outflow.total||0,c=i.money&&i.money.total||0,d=e?.ifood_payment_summary?.details?.total_in_cash||0,f=e?.close_outflow?.value||0,h=e?.final_value||0;let p=0;r?.has_debt_book_module&&(p=e.debt_book_payment_summary?.details?.total_in_cash||0);const g=a+s+l+c+d+p,_=xi(g-(h+(e?.closed_at?f||0:void 0)),2),b=new tf;return b.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),b.centerAlign(),b.printContent(t.name),b.lineBreak(),b.emMode("RELATÓRIO DE CAIXA"),b.bold(`SESSÃO ${e.id?e.id.toString().padStart(6,"0"):"000000"}`),b.lineBreak(),e.closed_at?(b.bold(b.twoColumns("ABERTO EM","FECHADO EM")),b.printContent(b.twoColumns(qe(e.open_at).format("DD/MM/YYYY HH:mm"),qe(e.closed_at).format("DD/MM/YYYY HH:mm")))):(b.bold("ABERTO EM"),b.printContent(qe(e.open_at).format("DD/MM/YYYY HH:mm"))),b.leftAlign(),b.horizontalDivision(!0,!1,"="),b.bold("RESUMO DO CAIXA"),b.horizontalDivision(!1,!1,"="),b.printContent(b.twoColumns("SALDO INICIAL ",` ${me.formatMonetaryValue(a,!0)}`,!1,".")),b.printContent(b.twoColumns("SUPRIMENTOS ",` ${me.formatMonetaryValue(s,!0)}`,!1,".")),b.printContent(b.twoColumns("SANGRIAS ",` ${me.formatMonetaryValue(l,!0)}`,!1,".")),b.printContent(b.twoColumns("VENDAS EM DINHEIRO ",` ${me.formatMonetaryValue(c,!0)}`,!1,".")),r?.has_ifood_module&&b.printContent(b.twoColumns("VENDAS EM DINHEIRO IFOOD ",` ${me.formatMonetaryValue(d,!0)}`,!1,".")),r?.has_debt_book_module&&b.printContent(b.twoColumns("RECEBIMENTOS FIADO EM DINHEIRO ",` ${me.formatMonetaryValue(p,!0)}`,!1,".")),b.printContent(b.twoColumns("VALOR EM CAIXA ",` ${me.formatMonetaryValue(g,!0)}`,!0,".")),e.status==="close"&&(b.horizontalDivision(!1,!1,"-"),b.printContent(b.twoColumns("RETIRADO NO FECHAMENTO ",` ${me.formatMonetaryValue(f,!0)}`,!1,".")),b.printContent(b.twoColumns("FICOU NO CAIXA ",` ${me.formatMonetaryValue(h,!0)}`,!0,".")),_&&b.printContent(b.twoColumns(_<=0?"SOBROU NO CAIXA":"FALTOU NO CAIXA",` ${me.formatMonetaryValue(Math.abs(_),!0)}`,!1,"."))),b.lineBreak(),r?.has_debt_book_module&&e.debt_book_payment_summary?.payment_methods?.length&&wE(b,"RECEBIMENTOS DO FIADO",e.debt_book_payment_summary,!0),b.horizontalDivision(!0,!1,"="),b.bold("RESUMO DAS VENDAS"),b.horizontalDivision(!1,!1,"="),e.sales_by_payment_method?.length>0?(Nu(e.sales_by_payment_method,"total","desc").map(E=>b.printContent(b.twoColumns(`${E.payment_method_name?.toUpperCase()} `,` ${me.formatMonetaryValue(E.total,!0)}`,!1,"."))),b.twoColumns("TOTAL ",` ${me.formatMonetaryValue(o,!0)}`,!0,".")):b.printContent("NÃO HÁ REGISTROS"),b.lineBreak(),e.ifood_payment_summary?.payment_methods?.length>0&&l6t(b,"VENDAS IFOOD",e.ifood_payment_summary),e.delivery_summary?.payment_methods?.length>0&&wE(b,"VENDAS DELIVERY",e.delivery_summary),e.takeout_summary?.payment_methods?.length>0&&wE(b,"VENDAS RETIRADA",e.takeout_summary),e.onsite_summary?.payment_methods?.length>0&&wE(b,"VENDAS CONSUMO NO LOCAL",e.onsite_summary),e.table_summary?.payment_methods?.length>0&&wE(b,"VENDAS MESAS",e.table_summary),e.sales_by_user?.length>0&&(b.horizontalDivision(!0,!1,"="),b.bold("VENDAS POR ATENDENTE (MESAS)"),b.horizontalDivision(!1,!1,"="),Nu(e.sales_by_user,"total","desc").forEach(E=>b.printContent(b.twoColumns(`${E.name?E.name.toUpperCase():"INDEFINIDO"} `,` ${me.formatMonetaryValue(E.total,!0)}`,!1,".")))),e.canceled_orders_summary?.order_types?.length>0&&(b.horizontalDivision(!0,!1,"="),b.bold("PEDIDOS CANCELADOS"),b.horizontalDivision(!1,!1,"="),Nu(e.canceled_orders_summary.order_types,"total","desc").forEach(E=>{const S=E.quantity?` (${E.quantity} PEDIDO${E.quantity>1?"S":""})`:"",P=`${BIe[E.order_type]?.toUpperCase()||"INDEFINIDO"}${S}`;b.printContent(b.twoColumns(`${P} `,` ${me.formatMonetaryValue(E.total,!0)}`,!1,"."))}),b.horizontalDivision(!1,!1,"-"),b.twoColumns("TOTAL ",` ${me.formatMonetaryValue(e.canceled_orders_summary?.details?.total_value,!0)}`,!0,".")),b.lineBreak(4),b.finishPrinting()}function u6t(e,t,r){const n=new tf;return n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),r.has_logo_on_receipt&&t.logo?n.image(t.logo):t.name&&n.printContent(t.name),n.lineBreak(),n.emMode("EXTRATO DA CONTA"),n.lineBreak(),n.leftAlign(),n.bold(n.breakIntoMultipleLines(`Cliente: ${e.name}`)),e.telephone&&n.printContent(`Telefone: ${zd(e.telephone,e.ddi)}`),e.balance>0?n.printContent("Situação: saldo positivo"):e.balance<0&&n.printContent("Situação: saldo negativo"),n.lineBreak(),n.twoColumns("SALDO",me.formatMonetaryValue(e.balance),!0),n.lineBreak(),n.centerAlign(),e.operations.length<10?n.bold("Últimas operações"):n.bold(`Últimas ${e.operations.length} operações`),n.lineBreak(),n.leftAlign(),n.printContent(n.twoColumns("Data","Valor ")),n.horizontalDivision(!1,!1),e.operations.forEach(i=>
316{n.printContent(n.twoColumns(qe(i.created_at).format("DD/MM/YYYY HH:mm"),me.formatMonetaryValue(i.value))),i.observation&&n.printContent(`${i.observation}`),n.lineBreak()}),n.lineBreak(),n.printContent(n.breakIntoMultipleLines(`Emitido por ${e.user_name} no dia ${qe().format("DD/MM/YYYY [às] HH:mm")}`)),n.lineBreak(4),n.finishPrinting()}function d6t(e){const t=e?.brand?.payment_method_name,r=e?.brand?.name;return t&&r?`${t} (${r})`:t||null}function f6t(e,t,r){const n=new tf;n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),r.has_logo_on_receipt&&t.logo?n.image(t.logo):t.name&&n.printContent(t.name),n.lineBreak(),e.kind==="payment"?n.emMode("COMPROVANTE DE PAGAMENTO"):n.emMode("COMPROVANTE DE DÍVIDA"),n.printContent(`Operação Nº ${e.id}`),n.printContent(`Feita em ${qe(e.created_at).format("DD/MM/YYYY HH:mm")}`),n.leftAlign(),n.lineBreak(),n.bold(n.breakIntoMultipleLines(`Cliente: ${e.client_name}`)),e.client_telephone&&n.printContent(`Telefone: ${zd(e.client_telephone,e.client_ddi)}`),n.lineBreak(),n.twoColumns("VALOR",me.formatMonetaryValue(e.value),!0),n.lineBreak(),n.printContent(`Saldo anterior: ${me.formatMonetaryValue(e.previous_balance||0)}`),n.printContent(`Saldo posterior: ${me.formatMonetaryValue(e.final_balance||0)}`);const i=d6t(e);return i&&n.printContent(`Forma de pagamento: ${i}`),e.observation&&n.printContent(n.breakIntoMultipleLines(`Observação: ${e.observation}`)),n.lineBreak(),n.printContent(n.breakIntoMultipleLines(`Operador: ${e.user_name}`)),n.printContent(`Emitido em ${qe().format("DD/MM/YYYY HH:mm")}`),n.lineBreak(4),n.finishPrinting()}function z4(e){return e?.sales_channel==="ifood"&&e.delivery_description&&e.delivery_description!=="Padrão"}function Jtr({order:e}){return z4(e)?u.createElement("div",{className:"flex animate-pulse items-center rounded-4 bg-red px-6 py-1 text-11 font-bold text-white"},u.createElement("span",{style:{lineHeight:1.5}},e.delivery_description.toUpperCase())):null}const h6t=e=>e&&e.charAt(0).toUpperCase()+e.slice(1).toLowerCase();function kV(e){if(!e)return[""];const t=/\[QRCode\(([^)]+)\)\]/,r=e.match(t);if(r){const n=r[1];return[e.split(t)[0].trim(),n.trim()]}return[e]}function up(e){const t=kV(e);return{text:t[0],qrCode:t[1]||""}}function err({inputLabel:e,typeReceipt:t,onClick:r,value:n}){const[i,a]=u.useState(up(n).text),[o,s]=u.useState(up(n).qrCode),l=u.useCallback(()=>{a(up(n).text),s(up(n).qrCode)},[n]),c=u.useCallback(()=>{let d=i;o.trim()!==""?d=`${i} [QRCode(${o})]`:s(""),r(t,d)},[o,t,r,i]);return u.useEffect(()=>{a(up(n).text),s(up(n).qrCode)},[n]),u.createElement("div",{className:"flex w-full flex-col space-y-24"},u.createElement(Tr,{variant:"outlined",value:i,multiline:!0,label:e,rows:5,className:"w-full",onChange:d=>a(d.target.value)}),u.createElement(Tr,{variant:"outlined",value:o,placeholder:"Informe o conteúdo do QR Code",helperText:"O QR Code é opcional e pode ser utilizado para direcionar o cliente a um link ou facilitar o acesso a informações, como a chave Pix",multiline:!0,label:h6t(`QR Code na ${e}`),rows:2,className:"w-full",onChange:d=>s(d.target.value)}),u.createElement(Oh,{in:i!==up(n).text||o!==up(n).qrCode},u.createElement("div",{className:"flex w-full space-x-12"},u.createElement(fr,{onClick:()=>l(),variant:"outlined"},"Cancelar"),u.createElement(fr,{className:"flex-1",onClick:()=>c(),variant:"contained",color:"primary"},"Salvar mensagem"))))}function zIe(e){return e?e4(z_(e,"sponsorship"),t=>t.reduce((r,n)=>r+n.value,0)):null}const UK=e=>{const t=e?.filter(({category:r})=>r==="loyalty");return t?.length?t.reduce((r,n)=>({value:r.value+n.value,total_points:r.total_points+n.total_points}),{value:0,total_points:0}):null},p6t=e=>{const t=e?.filter(({category:r})=>r==="cashback");return t?.length?t.reduce((r,n)=>r+(n.value??0),0):0},ex=e=>{const t=e?.filter(({category:r})=>r!=="loyalty"&&r!=="cashback");return t?.length?t.reduce((r,n)=>r+n.value,0):null};function m6t(e,t){const r=Math.max(qe.duration(qe(t).diff(qe(e))).asMinutes(),0),n=Math.floor(r/1440),i=Math.floor(r%1440/60);let o=`${Math.floor(r%1440%60)}min`;return i>0&&(o=`${i}h `+o),n>0&&(o=`${n}d `+o),o}function H4(e,t){e.reverseMode(e.breakIntoMultipleLines(t()))}function v6t(e,t,r){r?H4(e,()=>t):e.bold(e.breakIntoMultipleLines(t))}function hR(e,{prefix:t,name:r,price:n,highlighted:i,bold:a=!0,wrapLines:o=!0}){const s=e.twoColumns(t+r,n||"",!1," ",!0);if(i){H4(e,()=>s);return}if(o){const l=e.breakIntoMultipleLines(s);a?e.bold(l):e.printContent(l);return}a?e.bold(s):e.printContent(s)}function g6t(e,t,{itemNumberInReceipt:r,mutiplyItemsQuantityByProduct:n}){const i=t.quantity.toString().padEnd(Math.max(t.quantity.toString().length+1,3)," "),a=t.name+(r&&(t.custom_code||t.number)?` (Cód ${t.custom_code||t.number})`:"");v6t(e,a,t.print_highlight),t.kind==="combo"?t.combo_items.forEac
316h(o=>{o.print_highlight?H4(e,()=>`* ${o.name}`):e.printContent(`* ${o.name}`),o.order_subitems&&o.order_subitems.forEach(s=>{const l=n?t.quantity*s.quantity:s.quantity;l>1?e.printContent(e.breakIntoMultipleLines(`${l} ${s.name}`,!1,2)):e.printContent(e.breakIntoMultipleLines(`- ${s.name}`,!1,2))}),o.observation&&e.printContent(e.breakIntoMultipleLines(`OBS: ${o.observation}`,!1,2))}):(t.order_subitems&&t.order_subitems.forEach(o=>{const s=n?t.quantity*o.quantity:o.quantity;s>1?e.printContent(e.breakIntoMultipleLines(`${s} ${o.name}`,!1,1)):e.printContent(e.breakIntoMultipleLines(`- ${o.name}`,!1,1))}),t.observation&&e.printContent(e.breakIntoMultipleLines(`OBS: ${t.observation}`,!1))),e.printContent(`QUANT: ${i}`),e.printContent(`VALOR TOTAL: ${t.paid_with_points?"PRÊMIO":me.formatMonetaryValue(t.price)}`),e.horizontalDivision(!1,!1)}function jhe(e,t,r,n,i=!1,a=!1,o=!1,s){i?r.forEach(l=>{const c=t*l.quantity;e.printContent(e.twoColumns(`${n}${c>1?c:"-"} ${l.name}`,me.formatMonetaryValue(l.price),!1," ",!0))}):r.forEach(l=>{const c=t*l.quantity;o?e.boldMedium(e.breakIntoMultipleLines(`${c>1?c:"-"} ${l.name}`,!1,2+(a?2:0)+(s?1:0),2)):e.printContent(e.breakIntoMultipleLines(`${c>1?c:"-"} ${l.name}`,!1,3+(a?2:0)+(s?1:0),2))})}function Y1(e,t,r,n,i=!1,a=!1,o=!1){const s=a?"  ":"   ";if(n){const l=z_(r,"add_on_name");Object.keys(l).forEach(c=>{const d=l[c];e.printContent(e.breakIntoMultipleLines(`${o?"  ":""}${s}${c||""}`,!1)),jhe(e,t,d,s,i,o,a,n)})}else jhe(e,t,r,s,i,o,a,n)}function y6t(e,t,{itemNumberInReceipt:r,includeDividerBelowProduct:n,printOrderItemsWithAddonName:i,mutiplyItemsQuantityByProduct:a}){const o=t.quantity.toString().padEnd(Math.max(t.quantity.toString().length+1,3)," "),s=t.name+(r&&(t.custom_code||t.number)?` (Cód ${t.custom_code||t.number})`:"");hR(e,{prefix:o,name:s,price:t.paid_with_points?"PRÊMIO":me.formatMonetaryValue(t.price),highlighted:t.print_highlight}),t.kind==="combo"?t.combo_items.forEach(l=>{l.print_highlight?H4(e,()=>`   * ${l.name}`):e.printContent(`   * ${l.name}`),l.order_subitems&&Y1(e,a?l.quantity*t.quantity:1,l.order_subitems,i,!1,!1,!0),l.observation&&e.printContent(e.breakIntoMultipleLines(`  OBS: ${l.observation}`,!1,3))}):(t.order_subitems&&Y1(e,a?t.quantity:1,t.order_subitems,i,!1),t.observation&&e.printContent(e.breakIntoMultipleLines(`OBS: ${t.observation}`,!1,3))),n&&e.lineBreak()}function _6t(e,t,{itemNumberInReceipt:r,includeDividerBelowProduct:n,printOrderItemsWithAddonName:i,mutiplyItemsQuantityByProduct:a}){const o=t.quantity.toString().padEnd(Math.max(t.quantity.toString().length+1,3)," "),s=t.name+(r&&(t.custom_code||t.number)?` (Cód.: ${t.custom_code||t.number})`:"");if(t.kind==="combo"){const l=t.price/t.quantity;hR(e,{prefix:o,name:s,price:me.formatMonetaryValue(l),highlighted:t.print_highlight}),t.combo_items.forEach(c=>{const d=c.order_subitems?.reduce((h,p)=>h+p.quantity*(p.price||0),0)||0,f=c.price/c.quantity-d;hR(e,{prefix:"   * ",name:c.name,price:me.formatMonetaryValue(f),highlighted:c.print_highlight,bold:!1,wrapLines:!1}),c.order_subitems&&Y1(e,a?c.quantity:1,c.order_subitems,i,!0),c.observation&&e.printContent(e.breakIntoMultipleLines(`  OBS: ${c.observation}`,!1,3))}),(t.order_subitems?.length>0||t.quantity>1)&&e.printContent(e.twoColumns("Total do combo",t.paid_with_points?"PRÊMIO":me.formatMonetaryValue(t.price)))}else{const l=t.order_subitems?.reduce((d,f)=>d+f.quantity*(f.price||0),0)||0,c=t.price/t.quantity-l;hR(e,{prefix:o,name:s,price:me.formatMonetaryValue(c),highlighted:t.print_highlight}),t.order_subitems&&Y1(e,a?t.quantity:1,t.order_subitems,i,!0),t.observation&&e.printContent(e.breakIntoMultipleLines(`OBS: ${t.observation}`,!1,3)),(t.order_subitems?.length>0||t.quantity!==1)&&e.printContent(e.twoColumns(t.order_subitems?.length>0?"Total do item com complementos":"Total do item",t.paid_with_points?"PRÊMIO":me.formatMonetaryValue(t.price),!1," ",!0))}n&&e.horizontalDivision(!1,!1,"-")}const ny=33,nP=(e,t)=>e.payment_values?.filter(r=>!Lm?.includes(r.status))?.reduce((r,n)=>r+(parseFloat(n[t])||0),0);function $he(e,t,r){const n=new tf,i=e?.order_items?.filter(s=>
316s.status!=="canceled"||s.cancellation_reason==="Pedido cancelado")||[],a=e.payment_values?.filter(s=>!Lm?.includes(s.status))||[];if(n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),r.has_logo_on_receipt&&t.logo?n.image(t.logo):t.name&&n.printContent(t.name),n.lineBreak(),e.order_type==="closed_table"||e.order_type==="temporary_order"){const s=Bc[e.sales_channel]?` (${Bc[e.sales_channel]})`:"";e.order_session?n.emMode(`${e.order_session.mode?.toUpperCase()} ${e.order_session.number?.toString().padStart(2,"0")}`+s):e.table_number?n.emMode(`MESA ${e.table_number?.toString().padStart(2,"0")}`+s):n.emMode("PEDIDO DE MESA"+s),n.printContent(`Pedido Nº ${e.order_number||e.id}`),e.order_type==="closed_table"?n.printContent(`Aberta em ${qe(e.created_at).format("DD/MM/YYYY HH:mm")}`):e.tableSummary?n.printContent("Resumo da mesa"):n.printContent(qe().format("DD/MM/YYYY HH:mm"))}else{const s=Bc[e.sales_channel];if(s){const l=e.external_display_id||e.ifood_display_id;n.emMode(`Pedido Nº ${e.order_number||e.id}`),n.emMode(`${s} Nº ${l}`)}else n.emMode(`Pedido Nº ${e.order_number||e.id}`);n.printContent(qe(e.created_at).format("DD/MM/YYYY HH:mm"))}if(e.order_number&&n.printContent(`Cód. interno: #${e.id}`),z4(e)){n.lineBreak();const s="ENTREGA "+e.delivery_description.toUpperCase(),l=Math.floor((r.quantity_of_columns_on_printer-s.length)/2);n.reverseMode(`${" ".repeat(l)}${s}${" ".repeat(l)}`)}if(n.lineBreak(),e?.invalidOrderDueModification?(n.bold("= PEDIDO INVÁLIDO (MODIFICADO) ="),n.lineBreak()):e?.change_logs&&e.change_logs?.length>0&&(n.bold("*** PEDIDO MODIFICADO ***"),n.lineBreak()),e.scheduled_date&&(n.bold("AGENDADO PARA"),n.printContent(`${qe(e.scheduled_date).format("DD/MM/YYYY")} (${e.scheduled_period?.replace("-"," - ")})`),n.lineBreak()),n.leftAlign(),e.order_type==="closed_table"||e.order_type==="temporary_order"){const s=i.length>0&&i[0]?.user?i[0].user.name:null,l=e?.order_session?.user_name||null,c=e?.user?e.user:null,d=l||c||s;e.client?.name&&n.bold(n.breakIntoMultipleLines(`Cliente: ${e.client.name}`)),e.client?.name&&d&&n.lineBreak(),d&&n.bold(n.breakIntoMultipleLines(`Atendente: ${d}`)),e.order_session?.location&&n.printContent(`Localização: ${e.order_session.location}`),n.lineBreak()}else if(e.client){if(e.client.name&&n.bold(n.breakIntoMultipleLines(`Cliente: ${e.client.name}`)),e.client.telephone&&n.bold(`Telefone: ${zd(e.client.telephone,e.client.ddi)}`),e.client.orders_count===1)if(r.highlight_first_order_on_receipt!==!1){const s="1 PEDIDO NA LOJA",l=Math.floor((r.quantity_of_columns_on_printer-s.length)/2);n.reverseMode(`${" ".repeat(l)}${s}${" ".repeat(l)}`)}else n.printContent("1 pedido na loja");else e.client.orders_count>1&&n.printContent(`${e.client.orders_count} pedidos na loja`);n.lineBreak()}if(e.order_type!=="closed_table"&&e.order_type!=="temporary_order"){if(e.order_type==="takeout")n.bold("RETIRAR NO LOCAL");else if(e.order_type==="onsite")n.bold("CONSUMIR NO LOCAL");else if(e.delivery_address){n.bold("ENDEREÇO PARA ENTREGA:");const l=[e.delivery_address?.address_block?`Quadra ${e.delivery_address.address_block} `:null,e.delivery_address?.address_lot?`Lote ${e.delivery_address.address_lot} `:null].filter(c=>c!==null);n.printContent(n.breakIntoMultipleLines(`${e.delivery_address.street}, ${e.delivery_address.house_number}`)),e.delivery_address.address_complement&&n.printContent(n.breakIntoMultipleLines(`Comp: ${e.delivery_address.address_complement}`)),l.length>0&&n.printContent(n.breakIntoMultipleLines(l.join(", "))),e.delivery_address.landmark&&n.printContent(n.breakIntoMultipleLines(`Ref: ${e.delivery_address.landmark}`)),n.printContent(n.breakIntoMultipleLines(`${e.delivery_address.neighborhood} - ${e.delivery_address.city}`))}if(e.order_timing!=="scheduled"&&e.estimated_time>0){const l=qe(e.created_at),c=l.clone().add(parseInt(e.estimated_time),"minute").format("HH:mm"),d=l.clone().add(parseInt(e.estimated_time+10),"minute").format("HH:mm");n.printContent(`Previsão: ${c} - ${d}`)}e.delivered_by==="merchant"&&(n.lineBreak(),n.bold("ENTREGA PRÓPRIA"));const s=Bc[e.delivered_by];s&&(n.lineBreak(),n.bold(`ENTREGA ${s.toUpperCase()}`)),n.lineBreak()}if(e.delivery_man?.name&&(n.bold("ENTREGADOR:"),n.printContent(n.breakIntoMultipleLines(e.delivery_man?.name)),n.lineBreak()),e?.internal_observation?.includes("{{print}}")){const s="OBSERVAÇÃO",l=Math.floor((r.quantity_of_columns_on_printer-s.length)/2);n.centerAlign(),n.reverseMode(`${" ".repeat(l)}${s}${" ".repeat(l)}`),n.leftAlign(),e.internal_observation.replace("{{print}}","")?.split(`
317`).forEach(d=>
317{n.printContent(n.breakIntoMultipleLines(d))}),n.lineBreak()}if(n.centerAlign(),n.bold("ITENS DO PEDIDO"),n.leftAlign(),n.horizontalDivision(!1,!1),r.quantity_of_columns_on_printer>=ny&&r.print_order_items_with_addon_prices&&(n.printContent(n.twoColumns("Qtd Nome","Valor Unit")),n.horizontalDivision(!1,!1)),i.forEach((s,l)=>{r.quantity_of_columns_on_printer<ny?g6t(n,s,{itemNumberInReceipt:r.item_number_in_receipt,mutiplyItemsQuantityByProduct:r.multiply_order_subitem_quantity_by_order_item_quantity}):r.print_order_items_with_addon_prices?_6t(n,s,{itemNumberInReceipt:r.item_number_in_receipt,includeDividerBelowProduct:l!==i.length-1,printOrderItemsWithAddonName:r.print_order_items_with_addon_name,mutiplyItemsQuantityByProduct:r.multiply_order_subitem_quantity_by_order_item_quantity}):y6t(n,s,{itemNumberInReceipt:r.item_number_in_receipt,includeDividerBelowProduct:l!==i.length-1,printOrderItemsWithAddonName:r.print_order_items_with_addon_name,mutiplyItemsQuantityByProduct:r.multiply_order_subitem_quantity_by_order_item_quantity})}),i.length>1){const s=i.reduce((l,c)=>{const d=c.unit_type==="UN"?c.quantity:1;return l+d},0);r.quantity_of_columns_on_printer>=ny&&n.horizontalDivision(!1,!1),n.printContent(n.twoColumns("Quantidade de itens",me.formatNumber(s))),r.quantity_of_columns_on_printer<ny&&n.horizontalDivision(!1,!1)}r.quantity_of_columns_on_printer>=ny&&n.horizontalDivision(!1,!1);const o=i.reduce((s,l)=>s+l.price,0);if(e.order_type!=="closed_table"&&e.order_type!=="temporary_order"){const s=UK(e.benefits),l=ex(e.benefits),c=e.sales_channel==="ifood",d=c&&zIe(e.benefits);n.printContent(n.twoColumns("Subtotal",me.formatMonetaryValue(o))),e.order_type==="delivery"&&!e.delivery_info_only_by_whatsapp&&n.printContent(n.twoColumns("Taxa de entrega",me.formatMonetaryValue(e.delivery_fee))),e.additional_fee>0&&n.printContent(n.twoColumns("Taxa adicional",me.formatMonetaryValue(e.additional_fee))),nP(e,"payment_fee")>0&&n.printContent(n.twoColumns("Acréscimo da maquineta",me.formatMonetaryValue(nP(e,"payment_fee")))),c&&d?.ifood>0&&n.printContent(n.twoColumns("Desconto (iFood)",me.formatMonetaryValue(-d.ifood))),c&&d?.merchant>0&&n.printContent(n.twoColumns("Desconto (Loja)",me.formatMonetaryValue(-d.merchant))),!c&&l>0&&n.printContent(n.twoColumns("Desconto",me.formatMonetaryValue(-l))),!c&&s?.value>0&&n.printContent(n.twoColumns(`Prêmios (${s.total_points} pontos)`,me.formatMonetaryValue(-s.value))),n.lineBreak(),n.twoColumns("Total",me.formatMonetaryValue(typeof e.final_value=="number"?e.final_value:o),!0),e.earned_points&&(n.lineBreak(),n.printContent(n.twoColumns("Pontos ganhos",`${e.earned_points} pontos`)))}else{const s=ex(e.benefits);n.printContent(n.twoColumns("Subtotal",me.formatMonetaryValue(o))),e.service_fee&&n.printContent(n.twoColumns("Taxa de serviço",me.formatMonetaryValue(e.service_fee))),nP(e,"payment_fee")>0&&n.printContent(n.twoColumns("Acréscimo da maquineta",me.formatMonetaryValue(nP(e,"payment_fee")))),s>0&&n.printContent(n.twoColumns("Desconto",me.formatMonetaryValue(-s))),n.lineBreak(),n.twoColumns("Total",me.formatMonetaryValue(e.final_value),!0)}if(Array.isArray(e.custom_fields_data)&&e.custom_fields_data.length>0&&e.custom_fields_data.forEach(s=>{s.value&&(n.lineBreak(),n.printContent(n.breakIntoMultipleLines(s.title)),n.printContent(n.breakIntoMultipleLines(`Resposta: ${s.value}${s.additional_fee?` (+ ${me.formatMonetaryValue(s.additional_fee)})`:""}`)))}),a.length>0)if(e.order_type!=="closed_table"&&e.order_type!=="temporary_order")n.horizontalDivision(!0,!0,"="),n.bold("FORMAS DE PAGAMENTO"),a?.forEach(s=>{const l=s?.brand?.payment_method_name,c=s?.brand?.name||s.card_brand;if(l){const d=l+(c?` (${c})`:"")+`${s.status==="paid"&&s.payment_method!==mr.debt_book.id?" (PAGO)":""}`;n.printContent(n.twoColumns(d,me.formatMonetaryValue(s.total))),s.payment_method===mr.online_credit_card.id&&c&&s.card_number&&n.bold(`(${Nd(c)}) **** ${s.card_number}`),s.change_of&&parseFloat(s.change_of)>0&&(r.quantity_of_columns_on_printer<ny?(n.bold(` Troco para ${me.formatMonetaryValue(s.change_of)}`),n.bold(` Valor do troco: ${me.formatMonetaryValue(s.change_of-s.total)}`)):n.bold(`Troco para ${me.formatMonetaryValue(s.change_of)} (${me.formatMonetaryValue(s.change_of-s.total)})`)),s.observation&&n.printContent(`OBS: ${s.observation}`)}}),n.centerAlign(),a.every(s=>P4.includes(s.payment_method)&&["paid","authorized"].includes(s.status))&&(n.lineBreak(),n.emMode("PAGO ONLINE")),n.leftAlign();else{n.lineBreak();const s=a?.reduce((c,d)=>c+d.total,0),l=e.final_value-s;n.bold("Pagamentos"),a.forEach(c=>{const d=c?.brand?.payment_method_name;d&&n.printContent(n.twoColumns(d,me.formatMonetaryValue(c.total)))}),l>0&&(n.lineBreak(),n.printContent(n.twoColumns("Total pago",me.formatMonetaryValue(s))),n.bold(n.twoColumns("Falta pagar",me.formatMonetaryValue(l))))}if((e.observation||e.ifood_merchant_name)&&(n.lineBreak(),n.bold("OBSERVAÇÕES"),e.observation?.split(`
318`).forEach(s=>
318{n.printContent(n.breakIntoMultipleLines(s))}),e.ifood_merchant_name&&n.printContent(`Loja do iFood: ${e.ifood_merchant_name}`),e.external_merchant_name&&n.printContent(`Loja: ${e.external_merchant_name}`)),e.order_session&&(n.lineBreak(),n.printContent(`Tempo de permanência: ${m6t(e.order_session.opened_at,new Date)}`),e.order_session.amount_of_people>0&&(n.printContent(`Qtd de pessoas: ${e.order_session.amount_of_people}`),n.printContent(`Valor por pessoa: ${me.formatMonetaryValue(e.final_value/e.order_session.amount_of_people)}`))),t.personalizedMessageTable&&["closed_table","temporary_order"].includes(e.order_type)){n.lineBreak(),n.centerAlign();const s=kV(t.personalizedMessageTable);s.length>0&&(s[0].split(`
319`).forEach(l=>n.printContent(l)),s[1]&&(n.lineBreak(),n.qrCode(s[1])))}else if(t.personalizedMessage&&!["closed_table","temporary_order"].includes(e.order_type)){n.lineBreak(),n.centerAlign();const s=kV(t.personalizedMessage);s.length>0&&(s[0].split(`
320`).forEach(l=>n.printContent(l)),s[1]&&(n.lineBreak(),n.qrCode(s[1])))}return n.lineBreak(),n.centerAlign(),r.print_feedback_qr_code&&r.printer_accepts_esc_pos_commands&&!["closed_table","temporary_order"].includes(e.order_type)&&(n.lineBreak(),n.bold("Conte-nos como foi sua experiência"),n.bold("através do QR Code abaixo"),n.qrCode(`https://app.${r.provided_domain||"cardapioweb.com"}/${t.urlName}/pedidos?p=${e.uid}&a=1`),n.lineBreak(2)),n.printContent(`Fornecido por ${r.provided_by?r.provided_by:"Cardápio Web"}`),!r.is_manual_printing&&!r.is_automatic&&n.printContent("IMPRESSO MANUALMENTE"),n.printContent("NÃO É DOCUMENTO FISCAL"),n.lineBreak(4),n.finishPrinting()}function b6t(e,t,r){const n=new tf,i=qe(e?.date?.start_date).format("DD/MM/YYYY HH:mm"),a=qe(e?.date?.end_date).format("DD/MM/YYYY HH:mm"),o=e?.paymentInfo?Nu(e?.paymentInfo,"total","desc"):[];n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),n.printContent(t.name),n.lineBreak(),n.bold("RELATÓRIO DE ENTREGADORES"),n.lineBreak(),n.leftAlign(),n.bold(`Entregador: ${e?.deliveryman?.name}`),n.printContent(`De: ${i}`),n.printContent(`Até: ${a}`),n.printContent(`Impresso em: ${qe().format("DD/MM/YYYY HH:mm")}`),n.lineBreak(),n.centerAlign(),n.bold("RESUMO DOS PEDIDOS"),n.horizontalDivision(!1,!1,"-");let s=0,l=0,c=0,d=0;return e?.deliveryman?.summary_by_order_status?.forEach(f=>{f.status!=="canceled"&&(s+=f.quantity,l+=f.total_orders,c+=f.total_delivery_fee,d+=f.total_delivery_man_fee)}),n.leftAlign(),n.printContent(n.twoColumns("Quantidade de entregas",me.formatNumber(s).toString())),n.printContent(n.twoColumns("Taxas do entregador",me.formatMonetaryValue(d))),n.printContent(n.twoColumns("Taxas de entrega",me.formatMonetaryValue(c))),n.printContent(n.twoColumns("Valor dos pedidos",me.formatMonetaryValue(l))),n.lineBreak(),o?.length>0&&(n.centerAlign(),n.bold("RESUMO POR FORMA DE PAGAMENTO"),n.horizontalDivision(!1,!1,"-"),o?.forEach(f=>{const h=f.payment_method_name||mr[f.payment_method]?.name||"Indefinido";n.leftAlign(),n.printContent(n.twoColumns(h,me.formatMonetaryValue(f.total)))})),n.lineBreak(4),n.finishPrinting()}function Whe(e,t,r){const n=e.quantity.toString(),i=r.larger_font_size_kitchen_print,a=(e.kitchen_print_name||e.name)+(r.item_number_in_receipt&&(e.custom_code||e.number)?` (Cód.: ${e.custom_code||e.number})`:"");i?t.boldMedium(t.breakIntoMultipleLines(n+" "+a,!0)):t.bold(t.breakIntoMultipleLines(n+" "+a)),e.kind==="combo"?e.combo_items.forEach(o=>{const s=o.kitchen_print_name||o.name;i?t.boldMedium(t.breakIntoMultipleLines(`* ${s}`,!0,2)):t.bold(t.breakIntoMultipleLines(`* ${s}`,!1,2)),o.order_subitems&&Y1(t,r.multiply_order_subitem_quantity_by_order_item_quantity?o.quantity*e.quantity:1,o.order_subitems,r.print_order_items_with_addon_name,!1,i),o.observation&&t.boldMedium(t.breakIntoMultipleLines(`OBS: ${o.observation}`,!0,4))}):(e.order_subitems&&Y1(t,r.multiply_order_subitem_quantity_by_order_item_quantity?e.quantity:1,e.order_subitems,r.print_order_items_with_addon_name,!1,i),e.observation&&t.boldMedium(`  OBS: ${e.observation}`))}function E6t(e,t,r){const n=new tf,i=e?.order_items?.filter(o=>
320o.status!=="canceled"||o.cancellation_reason==="Pedido cancelado")||[];if(n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),t.name&&(n.printContent(t.name),n.lineBreak()),e.order_type==="closed_table"||e.order_type==="temporary_order"){const o=Bc[e.sales_channel]?` (${Bc[e.sales_channel]})`:"";e.order_session?n.emMode(`${e.order_session.mode?.toUpperCase()} ${e.order_session.number?.toString().padStart(2,"0")}`+o):e.table_number?n.emMode(`MESA ${e.table_number?.toString().padStart(2,"0")}`+o):n.emMode("PEDIDO DE MESA"+o),n.printContent(`Pedido Nº ${e.order_number||e.id}`),n.printContent(qe().format("DD/MM/YYYY HH:mm"))}else{const o=Bc[e.sales_channel];if(o){const s=e.external_display_id||e.ifood_display_id;n.emMode(`Pedido Nº ${e.order_number||e.id}`),n.emMode(`${o} Nº ${s}`)}else n.emMode(`Pedido Nº ${e.order_number||e.id}`);n.printContent(qe(e.created_at).format("DD/MM/YYYY HH:mm"))}if(n.lineBreak(),e.order_type!=="closed_table"&&e.order_type!=="temporary_order"&&(e.order_type==="takeout"?n.bold("RETIRADA"):e.order_type==="onsite"?n.bold("CONSUMIR NO LOCAL"):n.bold("ENTREGA"),n.lineBreak()),z4(e)){const o="ENTREGA "+e?.delivery_description?.toUpperCase(),s=Math.floor((r.quantity_of_columns_on_printer-o.length)/2);n.reverseMode(`${" ".repeat(s)}${o}${" ".repeat(s)}`),n.lineBreak()}if(e?.invalidOrderDueModification?(n.bold("= PEDIDO INVÁLIDO (MODIFICADO) ="),n.lineBreak()):e?.change_logs?.length>0&&(n.bold("*** PEDIDO MODIFICADO ***"),n.lineBreak()),e.scheduled_date&&(n.bold("AGENDADO PARA"),n.printContent(`${qe(e.scheduled_date).format("DD/MM/YYYY")} (${e.scheduled_period?.replace("-"," - ")})`),n.lineBreak()),n.leftAlign(),e.order_type==="temporary_order"){const o=i.length>0?gK(i.map(c=>c.user_name)).join(", "):null,s=e?.user?e.user:null,l=o||s;l&&n.bold(`Atendente: ${l}`),e.order_session?.name&&n.printContent(`Identificação: ${e.order_session.name}`),e.order_session?.location&&n.printContent(`Localização: ${e.order_session.location}`),e.order_session?.amount_of_people>0&&n.printContent(`Qtd de pessoas: ${e.order_session.amount_of_people}`)}else e.client&&n.bold(`Cliente: ${e.client.name}`),e.order_type==="delivery"&&e.delivery_address?.neighborhood&&n.printContent(`Bairro: ${e.delivery_address.neighborhood}`);const a=e?.changed_order_items;return n.lineBreak(),a?.length>0?(n.centerAlign(),n.emMode("+--------------+"),n.emMode("|  MODIFICADO  |"),n.emMode("+--------------+"),n.lineBreak(),n.centerAlign(),n.horizontalDivision(!1,!1),n.bold("ANTES DA MODIFICAÇÃO"),n.horizontalDivision(!1,!0),n.leftAlign(),a.forEach(o=>{Whe(o,n,r)}),n.centerAlign(),n.horizontalDivision(!0,!1),n.bold("DEPOIS DA MODIFICAÇÃO"),n.horizontalDivision(!1,!0),n.leftAlign()):(n.centerAlign(),n.bold("ITENS DO PEDIDO"),n.leftAlign(),n.horizontalDivision(!1,!0)),i.forEac
320h(o=>{Whe(o,n,r),n.horizontalDivision(!0,!0)}),e.printAreaName&&e.quantityOfPrintAreas>1&&n.bold(`SETOR: ${e.printAreaName}`),!r.is_manual_printing&&!r.is_automatic?n.printContent(`Impresso manualmente em ${qe().format("DD/MM [às] HH:mm:ss")}`):r.is_automatic&&n.printContent(`Impresso em ${qe().format("DD/MM [às] HH:mm:ss")}`),n.lineBreak(4),n.finishPrinting()}function Ghe(e){return!e||(e=e.replace(/\D/g,""),e.length!==14)?null:e.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,"$1.$2.$3/$4-$5")}function w6t(e){const t=e?.brand?.payment_method_name,r=e?.brand?.name||e?.card_brand,n=e?.card_number?`(**** ${e.card_number})`:"";if(!t)return null;const i=r?`${t} (${r})`:t;return n?`${i} ${n}`:i}function S6t(e,t,r){const n=new tf,i=e.order,a=e.paymentValue,o=e.razaoSocial;n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),n.printContent(o||t.name),Ghe(t.cnpj)&&n.printContent(Ghe(t.cnpj)),n.lineBreak(),a?.status==="refunded"&&(n.emMode("+--------------+"),n.emMode("|   DEVOLVIDO  |"),n.emMode("+--------------+"),n.lineBreak()),n.bold("COMPROVANTE DE PAGAMENTO"),i.order_type==="closed_table"||i.order_type==="temporary_order"?(i.order_session?n.printContent(`${i.order_session.mode?.toUpperCase()} ${i.order_session.number?.toString().padStart(2,"0")}`):i.table_number?n.printContent(`MESA ${i.table_number?.toString().padStart(2,"0")}`):n.printContent("PEDIDO DE MESA"),n.printContent(`Pedido Nº ${i.order_number||i.id}`)):n.printContent(`Pedido Nº ${i.order_number||i.id}`),n.lineBreak();const s=w6t(a);return n.leftAlign(),s&&n.printContent(s),n.printContent(n.twoColumns("Autorização",a.authorization_code||"")),n.printContent(n.twoColumns("Operação",a?.provider_payment_id||"")),n.printContent(n.twoColumns("Data",a.payed_at?qe(a.payed_at).format("DD/MM/YYYY HH:mm"):"")),n.lineBreak(),n.bold(n.twoColumns("Total",me.formatMonetaryValue(a.total))),n.lineBreak(),a?.provider_device_id&&n.printContent(a?.provider_device_id),n.lineBreak(4),n.finishPrinting()}function C6t(e,t,r){const n=new tf;return n.init(r.quantity_of_columns_on_printer,r.printer_accept_special_characters,r.printer_accepts_esc_pos_commands),n.centerAlign(),n.printContent(t.name),n.lineBreak(),n.emMode("Pedido Nº 0001"),n.lineBreak(),n.bold("IMPRESSÃO TESTE"),n.lineBreak(),n.leftAlign(),n.bold("Cliente: Nome do cliente"),n.bold("Telefone: (99) 99999-9999"),n.lineBreak(),n.bold("RETIRAR NO LOCAL"),n.lineBreak(),n.centerAlign(),n.bold("ITENS DO PEDIDO"),n.leftAlign(),n.horizontalDivision(!1,!1),n.printContent(n.twoColumns("1  Macaxeira","R$ 2,94")),n.printContent(n.twoColumns("1  Alface Crespa","R$ 2,50")),n.printContent(n.twoColumns("1  Coentro ","R$ 2,50")),n.printContent(n.twoColumns("1  Banana pacovan  ","R$ 5,00")),n.printContent(n.twoColumns("1  Batata doce ","R$ 3,80")),n.printContent(n.twoColumns("1  Salsa","R$ 3,00")),n.printContent(n.twoColumns("1  Manjericão","R$ 2,21")),n.printContent(n.twoColumns("2  Abacaxi","R$ 7,60")),n.printContent(n.twoColumns("1  Goma de tapioca 1kg","R$ 6,00")),n.printContent(n.twoColumns("1  Tomate Cereja 500 gramas","R$ 5,00")),n.printContent(n.twoColumns("1  Mamão havaí","R$ 4,00")),n.horizontalDivision(!1,!1),n.printContent(n.twoColumns("Subtotal","R$ 44,55")),n.printContent(n.twoColumns("Desconto","R$ 0,00")),n.printContent(n.twoColumns("Entrega","Grátis")),n.lineBreak(),n.twoColumns("Total","R$ 44,55",!0),n.horizontalDivision(!0,!0,"="),n.bold("Formas de pagamento"),n.printContent(n.twoColumns("Cartão de débito","R$ 14,55")),n.printContent(n.twoColumns("Dinheiro","R$ 30,00")),n.bold("Troco para R$50,00 (R$20,00)"),n.lineBreak(),n.centerAlign(),n.printContent("NÃO É DOCUMENTO FISCAL"),n.lineBreak(4),n.finishPrinting()}const Khe=e=>{switch(e){case"kitchen":return E6t;case"canceledItem":return r6t;case"test":return C6t;case"standard":return $he;case"cashSummary":return c6t;case"deliveryMan":return b6t;case"cashFlowOperation":return n6t;case"debtBookOperationProof":return f6t;case"debtBookAccountStatement":return u6t;case"paymentReceipt":return S6t;default:return $he}};function x6t(){const{hasModule:e}=Ah(),{organization:t}=$x(),r=at(({globalCompany:b})=>b.company.name),n=at(({globalCompany:b})=>b.company.cnpj),i=at(({globalCompany:b})=>b.company.logo),a=at(({globalCompany:b})=>b.company.thumbnail),o=at(({globalCompany:b})=>b.company.service_fee),s=at(({globalCompany:b})=>b.company.print_setting),l=at(({globalCompany:b})=>b.company.print_setting?.printers),c=at(({globalCompany:b})=>b.company.print_setting?.personalized_message_general_receipt),d=at(({globalCompany:b})=>
320b.company.print_setting?.personalized_message_table_receipt),f=at(({globalCompany:b})=>b.company.url_name),h=u.useMemo(()=>({name:r,cnpj:n,logo:a||i,serviceFee:o,personalizedMessage:c,personalizedMessageTable:d,urlName:f}),[i,a,r,o,c,d,f,n]),p=u.useCallback(b=>{if(b){const S=l.find(P=>P.name===b);if(S){const{printer_accept_special_characters:P,printer_accepts_esc_pos_commands:O,quantity_of_columns_on_printer:I,is_thermal_printer:N}=S;return{printer_accept_special_characters:P,printer_accepts_esc_pos_commands:O,quantity_of_columns_on_printer:I,is_thermal_printer:N}}}return{printer_accept_special_characters:!0,printer_accepts_esc_pos_commands:!1,quantity_of_columns_on_printer:l?.find(S=>S.name==="Impressora Padrão")?.quantity_of_columns_on_printer||40,is_thermal_printer:!0}},[l]),g=u.useCallback(b=>`<html><body><div style="margin: 4px">${b.reduce((S,P)=>S+(P===`
321`?"<br/>":`<pre style="font-size: 14px; line-height: 1.25; margin-top: 0; margin-bottom: 0;">${P}</pre>`),"")}</div></body></html>`,[]);return u.useCallback((b,E,S,P=!1)=>{let O;const{has_logo_on_receipt:I,item_number_in_receipt:N,print_order_items_with_addon_prices:M,print_order_items_with_addon_name:F,larger_font_size_kitchen_print:B,multiply_order_subitem_quantity_by_order_item_quantity:V,print_feedback_qr_code:W,highlight_first_order_on_receipt:$}=s||{},X={has_logo_on_receipt:I,item_number_in_receipt:N,print_order_items_with_addon_prices:M,print_order_items_with_addon_name:F,larger_font_size_kitchen_print:B,multiply_order_subitem_quantity_by_order_item_quantity:V,print_feedback_qr_code:W,highlight_first_order_on_receipt:$,...p(S),provided_by:t?.name,provided_domain:t?.enterprise_domain,is_manual_printing:!S,is_automatic:!!P};return b==="cashSummary"&&(e(At.DEBT_BOOK)&&(X.has_debt_book_module=!0),e(At.IFOOD)&&(X.has_ifood_module=!0)),b==="pdf"?O=[{type:"pixel",format:"pdf",flavor:"file",data:E}]:X.is_thermal_printer?O=Khe(b)(E,h,X):O=[{type:"pixel",format:"html",flavor:"plain",data:g(Khe(b)(E,h,{...X,printer_accepts_esc_pos_commands:!1}))}],O},[s,p,t,e,h,g])}const HIe=x.createContext(),T6t={automaticPrintingAvailable:!1,qzTrayConnected:!1,qzTrayLoading:!1,defaultPrinter:null,printersAvailable:null,onlinePrinters:null,sharedLocalPrinters:null,dataForManualPrint:null},A6t=function(e=T6t,t){switch(t.type){case PIe:return{...e,qzTrayConnected:!!t.payload,automaticPrintingAvailable:!!t.payload&&e.printersAvailable?.length>0};case RIe:return{...e,qzTrayLoading:!!t.payload};case OIe:return{...e,defaultPrinter:t.payload};case IIe:return{...e,printersAvailable:t.payload,automaticPrintingAvailable:e.qzTrayConnected&&t.payload?.length>0};case kIe:return{...e,defaultPrinter:null,printersAvailable:null,automaticPrintingAvailable:!1};case NIe:return{...e,onlinePrinters:t.payload};case DIe:return{...e,sharedLocalPrinters:t.payload};case MIe:return{...e,dataForManualPrint:t.payload};case RDt:return{...e,dataForManualPrint:null};default:return e}},Yhe=["OWNER","MANAGER","EMPLOYEE","WAITER"];function P6t({children:e}){const t=HK(),r=x6t(),[n,i,a,o]=YDt(r),s=JDt(r),l=u.useCallback((c,d,f=!1)=>{t?n(d,c,f):f||s(d,c)},[n,t,s]);return u.createElement(HIe.Provider,{value:{print:l,qzTray:{toggleConnection:i,getPrinters:a},printerSharing:{forceSharePrintersFromThisSession:o}}},e,u.createElement(QDt,null))}const R6t=B4("printManager",A6t)(P6t),Uu=()=>x.useContext(HIe).print,O6t="[LAST ORDERS] SET SEARCH TEXT",I6t="[LAST ORDERS] SET LAYOUT",k6t="[LAST ORDERS] GET LAYOUT",N6t="[LAST ORDERS] SET SELECTED ORDER ID",D6t="[LAST ORDERS] SET LOADING",M6t="[LAST ORDERS] RESET LOADING";function trr(e){return{type:O6t,payload:e}}function rrr(){return(e,t)=>{const{status:r}=t().lastOrders,n=window.localStorage.getItem("cardapio_web_layout_order");if(n){const i=JSON.parse(n);Object.entries(i).forEach(([a,o])=>r[a]&&(r[a].option=o)),e({type:k6t,payload:r})}}}function nrr(e,t){return{type:I6t,status:e,option:t}}function irr(e){return e?ac.push(`/latest-orders/${e}`):ac.push("/latest-orders"),{type:N6t}}function NV(e,t,r={}){return n=>(n(L6t()),ht.put(`/api/v1/company/order/last_orders/${e}`,{order:{status:t,...r}}).then(a=>{if(a.status===200&&a.data&&a.data.status!==500)return a.data;a.data.message?n(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:3e3,message:a.data.message,variant:"error"})):n(oh())}).catch(()=>
321n(oh())).finally(()=>n(F6t())))}function L6t(){return{type:D6t}}function F6t(){return{type:M6t}}const B6t="[ORDER LISTENER] SET LAST ORDERS",UIe="[ORDER LISTENER] SET RAW LAST ORDERS",arr="[ORDER LISTENER] GET TABLE SESSIONS",z6t="[ORDER LISTENER] GET ORDER SESSIONS",orr="[ORDER LISTENER] UPDATE TABLE SESSIONS",H6t="[ORDER LISTENER] UPDATE ORDER SESSIONS",U6t="[ORDER LISTENER] UPDATE SOUND ALLOWED",V6t="[ORDER LISTENER] UPDATE NOW TIME",q6t="[ORDER LISTENER] SET LAST UPDATED AT",srr="[ORDER LISTENER] SET TABLE LAST UPDATED AT",j6t="[ORDER LISTENER] SET ORDER SESSIONS LAST UPDATED AT",$6t="[ORDER LISTENER] SET DIFF SERVER TIMESTAMP";function lrr(){return(e,t)=>{const{lastUpdatedAt:r}=t().orderListener;return ht.get("/api/v1/company/orders",{params:{updated_at_gt:r}}).then(i=>{if(i.headers.servertimestamp){const o=qe(),s=qe(i.headers.servertimestamp),c=qe.duration(o.diff(s)).asSeconds();e(W6t(c))}const a=i.headers.lastupdatedat;e(G6t(a)),e({type:UIe,payload:i.data})}).catch(()=>{})}}function crr(e){return{type:B6t,payload:e}}function urr(){return(e,t)=>{const{orderSessionsLastUpdatedAt:r,orderSessions:n}=t().orderListener;return ht.get("/api/v2/orders/order_sessions",{params:{updated_at_gt:r}}).then(a=>{const o=a.headers.lastupdatedat;e(K6t(o));const s={...Oo(n,"id"),...Oo(a.data,"id")},l=Object.values(s);e({type:z6t,payload:l})}).catch(()=>{})}}function fl(e){return{type:H6t,payload:e}}function HI(e,t){return(r,n)=>{const{rawLastOrders:i}=n().orderListener;if(e&&i[e]){const a={...i,[e]:{...i[e],...t}};r({type:UIe,payload:a})}}}function drr(){return{type:V6t}}function W6t(e){return{type:$6t,payload:e}}function G6t(e){return{type:q6t,payload:e}}function K6t(e){return{type:j6t,payload:e}}function frr(e){return{type:U6t,payload:e}}const Y6t=e=>ht.get(e).then(t=>{if(t.status>=400||t.data.status===500)throw Error(t.data.message);return t.data});function hs(e){return e?`/api/v1/company/orders/${e}`:null}function X6t(e){const{data:t,error:r,isValidating:n,mutate:i}=Ll(hs(e),Y6t,{dedupingInterval:6e4,errorRetryCount:3,errorRetryInterval:2e4,revalidateOnFocus:!1,revalidateOnReconnect:!1});return{data:t,isLoading:e&&!r&&!t,isError:r,isValidating:n,mutate:i}}async function VIe(e,t){return(await ht.post(`/api/v2/orders/${e}/order_items/add_items`,{order_items:t})).data}async function Z6t(e,t){return(await ht.put(`/api/v2/orders/${e}/order_items/remove_items`,{order_items:t})).data}async function Q6t(e,t,r){return(await ht.put(`/api/v2/orders/${e}/order_items/${t}/update_item`,{order_item:r})).data}async function J6t(e,t,r){return(await ht.put(`/api/v2/orders/${e}/order_items/${t}/change_item`,{order_items:r})).data}async function eMt(e,t){return(await ht.post(`/api/v2/orders/${e}/payment_values`,t)).data}async function qIe(e,t,r){return(await ht.put(`/api/v2/orders/${e}/payment_values/${t}`,r)).data}async function tMt(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}`)).data}async function jIe(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/order_type`,{order_type:t})).data}async function rMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/order_timing`,{order_timing:t})).data}async function nMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/add_client`,{client:{client_id:t}})).data}async function iMt(e){return(await ht.put(`/api/v2/orders/edit/${e}/remove_client`)).data}async function aMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/custom_fields`,{custom_fields:t})).data}async function oMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/additional_fee`,{additional_fee:t})).data}async function sMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/internal_observation`,{internal_observation:{internal_observation:t?.trim()==="{{print}}"?"":t}})).data}async function $Ie(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/order_benefits`,{order_benefits:t})).data}async function lMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/redeem_loyalty_reward`,{redeem_loyalty_reward:t})).data}async function cMt(e){return(await ht.put(`/api/v2/orders/edit/${e}/reopen_order`)).data}async function uMt(e,t){return(await ht.post(`/api/v2/company/cashback/order/${e}/use_cashback`,{cashback:{amount:t}})).data}async function dMt(e){return(await ht.delete(`/api/v2/company/cashback/order/${e}/remove_cashback`)).data}async function fMt(e,t){return(await ht.post(`/api/v2/orders/edit/${e}/apply_coupon`,{order_benefits:{code:t}})).data}async function hMt(e){return(await ht.delete(`/api/v2/orders/edit/${e}/remove_coupon`)).data}const WIe=u.createContext({});function pMt({order:e,onlyRead:t,children:r}){const{hasUserPermissions:n}=d0(),{hasModule:i}=Ah(),a=u.useMemo(()=>Object.keys(Bc).includes(e.sales_channel),[e]),o=u.useMemo(()=>!e||t||e.order_invoice&&!["Negada","Cancelada"].includes(e.order_invoice.status)?!1:[Bt.waiting_confirmation.status,Bt.pending_payment.status,Bt.confirmed.status,Bt.ready.status,Bt.released.status,Bt.delivered.status,Bt.waiting_to_catch.status,Bt.scheduled_confirmed.status].includes(e.status),[t,e]),s=u.useMemo(()=>({addPayment:o&&n(Te.EDIT_ORDER),removePayment:o&&n(Te.REMOVE_PAYMENT),editPayment:o&&n(Te.EDIT_ORDER),editCustomFields:o&&!a&&n(Te.EDIT_ORDER),addOrderItem:o&&!a&&n(Te.EDIT_ORDER),editOrderItem:o&&!a&&n(Te.EDIT_ORDER),removeOrderItem:o&&!a&&n(Te.REMOVE_ORDER_ITEM
321),editOrderType:o&&!a&&n(Te.EDIT_ORDER),editOrderTiming:o&&!a&&n(Te.EDIT_ORDER),editDiscountsAndFees:o&&!a&&n(Te.EDIT_DISCOUNTS_AND_FEES),editClient:o&&!a&&n(Te.EDIT_CLIENT),backToPreviousStatus:o&&!a&&n(Te.BACK_TO_PREVIOUS_STATUS),redeemLoyaltyReward:o&&!a&&i(At.LOYALTY_PROGRAM)&&n(Te.REDEEM_LOYALTY_REWARD),cancelOrder:n(Te.CANCEL_ORDER),closeOrder:n(Te.CLOSE_ORDER),reopenOrder:n(Te.REOPEN_ORDER)}),[o,i,n,a]),l=u.useMemo(()=>({order:e,orderPermissions:s}),[s,e]);return u.createElement(WIe.Provider,{value:l},r)}const gi=()=>{const e=u.useContext(WIe);if(!e)throw new Error("useOrder must be used within an OrderProvider");return e};var SE={},Xhe;function mMt(){if(Xhe)return SE;Xhe=1;var e=$t(),t=Wt();Object.defineProperty(SE,"__esModule",{value:!0}),SE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}),"NotInterested");return SE.default=i,SE}var vMt=mMt();const gMt=et(vMt);var CE={},Zhe;function yMt(){if(Zhe)return CE;Zhe=1;var e=$t(),t=Wt();Object.defineProperty(CE,"__esModule",{value:!0}),CE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement(r.Fragment,null,r.createElement("path",{d:"M12 11.39c0-.65-.39-1.23-.98-1.48L5.44 7.55c-1.48 1.68-2.32 3.7-2.8 5.45h7.75c.89 0 1.61-.72 1.61-1.61z"}),r.createElement("path",{d:"M21.96 11.22c-.41-4.41-4.56-7.49-8.98-7.2-2.51.16-4.44.94-5.93 2.04l4.74 2.01c1.33.57 2.2 1.87 2.2 3.32 0 1.99-1.62 3.61-3.61 3.61H2.21C2 16.31 2 17.2 2 17.2v.8c0 1.1.9 2 2 2h10c4.67 0 8.41-4.01 7.96-8.78z"})),"SportsMotorsports");return CE.default=i,CE}var _Mt=yMt();const UI=et(_Mt);async function hrr(e){return(await ht.post("/api/v2/company/delivery_men",e)).data}async function prr(e){return(await ht.get(`/api/v2/company/delivery_men/orders_report?${e}`)).data}async function mrr(e){return(await ht.get(`/api/v2/company/delivery_men/orders_summary_report?${e}`)).data}async function vrr(e,t){return(await ht.put(`/api/v2/company/delivery_men/${e}`,t)).data}async function grr(e,t){return(await ht.put(`/api/v2/company/delivery_men/${e}`,{active:t})).data}async function bMt(e,t){return(await ht.put(`/api/v2/orders/edit/${e}/delivery_man`,{delivery_man:t})).data}async function yrr(e){return(await ht.delete(`/api/v2/company/delivery_men/${e}`)).data}const EMt={delivery_man:"",delivery_man_fee:""};function VK({orderId:e,open:t,deliverymanID:r=null,deliveryFee:n=0,onClose:i}){const a=Lr(),{mutate:o}=di(),{form:s,handleChange:l,setForm:c}=g_(EMt),{data:d,isLoading:f}=R4(),[h,p]=u.useState([]),[g,_]=u.useState(!1),[b,E]=u.useState({});u.useEffect(()=>{d&&p(F1(d,[function(N){return N.name.trim()}]))},[d]);const S=u.useCallback(()=>{c({delivery_man_fee:me.formatCurrencyString(n),delivery_man:h.find(N=>N.id===r)||null})},[c,n,h,r]);u.useEffect(()=>{t&&S()},[t,S]);const P=u.useCallback(N=>{b[N.target.name]&&E(M=>({...M,[N.target.name]:""})),l(N)},[b,l]),O=u.useCallback(()=>{!g&&i&&i()},[g,i]),I=u.useCallback(async(N,M)=>{if(N.preventDefault(),N.stopPropagation(),!g){_(!0);const F={delivery_man_fee:M?me.convertNumberToFloat(s.delivery_man_fee):null,delivery_man_id:M};try{if(M||r){const B=await bMt(e,F);await o(hs(e),B,!1)}O()}catch(B){a.error(B.response?.data?.message||"Não foi possível concluir a operação")}_(!1)}},[a,s,O,e,g,o,r]);return u.createElement(Eo,{open:t,maxWidth:"xs",fullWidth:!0,disableEnforceFocus:!0,disableRestoreFocus:!0,PaperProps:{className:"shadow-md rounded-12"},loading:g||f,onClose:O},u.createElement(p0,{className:"px-20 py-12"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",null,"Associar entregador"),u.createElement(cr,{style:{padding:9},onClick:i},u.createElement(Aa,null)))),u.createElement(zs,null),u.createElement(Xc,{className:"space-y-4 overflow-auto px-0 pt-24"},u.createElement("div",{className:"px-20"},u.createElement(pm,{name:"delivery_man_fee",label:"Taxa do entregador",value:s.delivery_man_fee||"",onChange:P,error:!!b.delivery_man_fee,helperText:b.delivery_man_fee,variant:"outlined",size:"medium",fullWidth:!0,autoFocus:!0})),u.createElement(YAe,null,u.createElement(aV,{button:!0,onClick:N=>I(N,null),selected:!r},u.createElement(Rle,null,u.createElement(UC,{className:"ml-4 bg-grey-light text-grey-darkest"},u.createElement(gMt,null))),u.createElement(oV,{primary:"Sem entregador"})),h.map(N=>u.createElement(aV,{button:!0,onClick:M=>I(M,N.id),key:N.id,selected:r===N.id},u.createElement(Rle,null,u.createElement(UC,{className:"ml-4 bg-grey-light text-grey-darkest"},u.createElement(UI,null))),u.createElement(oV,{primary:N.name})))),g&&u.createElement("div",{className:"absolute inset-0 flex items-center justify-center",style:{zIndex:5e3,backgroundColor:"rgba(255,255,255,0.7)"}},u.createElement(ai,{color:"primary"}))))}const wMt=["Este pedido possui pagamento online e sua edição requer atenção.","Se o valor do pedido aumentar após a edição, a diferença deve ser cobrada do cliente por outro método de pagamento, pois não é possível mudar o valor do pagamento online.","Por outro lado, se a edição resultar em uma diminuição no valor do pedido, a diferença deve ser reembolsada ao cliente por outros meios, pois não é possível realizar estornos parciais de pagamentos online."].join(`
322
323`);function qK(){const e=Bl(),{order:t}=gi(),r=u.useMemo(()=>t.payment_values.some(i=>i.payment_type==="online"),[t.payment_values]);return u.useCallback(i=>async()=>
323{if(!r){i();return}try{await e({title:"Atenção ao editar este pedido",description:wMt,cancellationText:"Voltar",confirmationText:"Continuar"}),i()}catch{}},[e,r])}var xE={},Qhe;function SMt(){if(Qhe)return xE;Qhe=1;var e=$t(),t=Wt();Object.defineProperty(xE,"__esModule",{value:!0}),xE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}),"WarningRounded");return xE.default=i,xE}var CMt=SMt();const GIe=et(CMt),xMt=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data});function TMt(e){const{data:t,error:r,isLoading:n,isValidating:i,mutate:a}=Ll(e?`/api/v2/orders/ifood/${e}/cancellation_reasons`:null,xMt,{keepPreviousData:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:3e4});return{data:t,isLoading:n||i,isError:r,mutate:a}}const AMt=[{description:"Outro",cancelCodeId:"501"},{description:"Pedido em duplicidade",cancelCodeId:"502"},{description:"Item indisponível",cancelCodeId:"503"},{description:"Estabelecimento sem entregador",cancelCodeId:"504"},{description:"Catálogo desatualizado",cancelCodeId:"505"},{description:"Pedido fora da área de entrega",cancelCodeId:"506"},{description:"Suspeita de golpe / Trote",cancelCodeId:"507"},{description:"Fora do horário de entrega",cancelCodeId:"508"},{description:"Dificuldades internas do estabelecimento",cancelCodeId:"509"},{description:"Área de risco",cancelCodeId:"511"},{description:"Estabelecimento abrirá mais tarde",cancelCodeId:"512"},{description:"Estabelecimento fechou mais cedo",cancelCodeId:"513"},{description:"Cliente solicitou cancelamento",cancelCodeId:"580"}],PMt=e=>[{description:"Item indisponível",cancelCodeId:"1010"},{description:"Estabelecimento fechado",cancelCodeId:"1020"},{description:"Loja muito ocupada para preparar o pedido",cancelCodeId:"1030"},{description:"Não foi possível preparar o pedido por falta de energia ou água",cancelCodeId:"1040"},{description:"Cancelamento feito/pedido pelo cliente",cancelCodeId:"1050"},e.delivered_by==="merchant"&&{description:"Sem entregador disponível",cancelCodeId:"1060"},{description:"Outro",cancelCodeId:"1080"}].filter(Boolean),RMt=()=>[{description:"Problemas sistêmicos",cancelCodeId:"SYSTEMIC_ISSUES"},{description:"Pedido em duplicidade",cancelCodeId:"DUPLICATE_APPLICATION"},{description:"Item indisponível",cancelCodeId:"UNAVAILABLE_ITEM"},{description:"Estabelecimento sem entregador",cancelCodeId:"RESTAURANT_WITHOUT_DELIVERY_PERSON"},{description:"Catálogo desatualizado",cancelCodeId:"OUTDATED_MENU"},{description:"Pedido fora da área de entrega",cancelCodeId:"ORDER_OUTSIDE_THE_DELIVERY_AREA"},{description:"Cliente bloqueado",cancelCodeId:"BLOCKED_CUSTOMER"}
323,{description:"Fora do horário de entrega",cancelCodeId:"OUTSIDE_DELIVERY_HOURS"},{description:"Dificuldades internas do estabelecimento",cancelCodeId:"INTERNAL_DIFFICULTIES_OF_THE_RESTAURANT"},{description:"Área de risco",cancelCodeId:"RISK_AREA"},{description:"Problema na entrega",cancelCodeId:"DELIVERY_PROBLEM"}],Jhe=["501","1080"];function OMt({reason:e,setReason:t,mode:r,smartPosBlocksCancel:n,requiresManualPosRefundAck:i,manualPosRefundAcknowledged:a,setManualPosRefundAcknowledged:o}){const{order:s}=gi(),l=s?.sales_channel==="ifood",c=s?.sales_channel==="aiqfome",d=s?.sales_channel==="keeta",f=s?.sales_channel==="food99",h=s?.delivered_by==="ifood_shipping",p=r==="order"&&l||r==="shipping"&&h,{data:g,isLoading:_,isError:b}=TMt(p&&s?.id),E=u.useMemo(()=>p?g:f?PMt(s):d?RMt():AMt,[p,f,d,g,s]),S=P=>{const O=E.find(I=>I.cancelCodeId===P.target.value);Jhe.includes(O?.cancelCodeId)?t({cancelCodeId:O.cancelCodeId,description:""}):t(O)};return b?u.createElement(Jd,{title:"Não foi possível obter os motivos de cancelamento"}):_?u.createElement(v0,null):!_&&!b&&!E?.length?u.createElement(dl,{title:"Cancelamento não disponível"}):u.createElement("div",{className:"flex flex-col space-y-20"},r==="order"&&n&&u.createElement(DS,{severity:"warning",className:"text-16 font-light"},"Há um pagamento na maquininha ainda não resolvido. Cancele ou estorne o pagamento na maquininha antes de cancelar o pedido."),r==="order"&&i&&u.createElement("div",{role:"checkbox","aria-checked":a,onClick:()=>o(P=>!P),className:"flex cursor-pointer space-x-16 rounded-8 border border-solid border-orange bg-orange-lightest px-16 pb-12 pt-16"},u.createElement(GIe,{className:"mt-2 flex-shrink-0 text-orange-dark"}),u.createElement("div",{className:"space-y-8 text-16 text-orange-darker"},u.createElement("div",{className:"font-bold"},"Estorno manual necessário"),u.createElement("div",null,"Pagamentos via cartão recebidos pelo totem"," ",u.createElement("strong",null,"não são estornados automaticamente")," pelo sistema. O estorno deve ser feito ",u.createElement("strong",null,"manualmente na maquininha")," ou no"," ",u.createElement("strong",null,"portal do banco")," que recebeu o pagamento."," "),u.createElement(Mg,{onClick:P=>P.stopPropagation(),control:u.createElement(f4,{color:"primary",checked:a,onChange:P=>o(P.target.checked),tabIndex:-1,disableRipple:!0}),label:"Para continuar, confirme que está ciente da necessidade de estorno manual.",classes:{label:"text-16 font-bold text-orange-darker"}}))),r==="shipping"&&u.createElement("div",{className:"text-16 text-gray-500"},"Selecione o motivo do cancelamento desta entrega:"),r==="order"&&l&&u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Cancelar muitos pedidos pode afetar o desempenho da sua loja no iFood. Assim que possível, ajuste sua operação para não cancelar novos pedidos pelo mesmo motivo."),r==="order"&&c&&u.createElement("div",{className:"text-16 font-bold leading-10 text-red"},"O cancelamento deste pedido será realizado apenas no nosso sistema, pois o Aiqfome não permite o cancelamento de pedidos via integração."),r==="order"&&(l?u.createElement("div",{className:"text-16 leading-10 text-gray-500"},"Selecione o motivo pelo qual você não pode aceitar este pedido:"):u.createElement("div",{className:"text-16 leading-10 text-gray-500"},"Se você quiser, informe o motivo pelo qual você vai cancelar este pedido:")),r==="shipping"&&u.createElement(DS,{severity:"error",className:"text-16 font-light"},"Atenção pois pode ser cobrada uma taxa de cancelamento pelo iFood."),u.createElement("div",{className:"max-h-384 overflow-auto p-1"},u.createElement(qC,{value:e?.cancelCodeId||"",className:"grid grid-cols-1 gap-4 sm:grid-cols-2"},E.map(({description:P,cancelCodeId:O})=>u.createElement(Mg,{key:O,value:O,onClick:S,label:P,control:u.createElement(Bg,{color:"primary"}),classes:{label:"text-16 text-gray-600 font-medium"}})))),Jhe.includes(e?.cancelCodeId)&&u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Qual o motivo?"),u.createElement(Tr,{value:e?.description||"",onChange:P=>{const O=P.target.value;t(I=>({...I,description:O}))},placeholder:"Escreva aqui outro motivo que não esteja listado acima",multiline:!0,rows:3,variant:"outlined",fullWidth:!0,inputProps:{className:"text-16"},autoFocus:!0})),r==="order"&&u.createElement(DS,{severity:"info",className:"text-16 font-light"},"O seu cliente conseguirá ver o motivo do cancelamento do pedido direto pelo cardápio, na tela de acompanhamento de pedido."))}const KIe=["pending","pending_online_payment"],jK=e=>e?.payment_type==="online"&&e?.payment_method===mr.pix_auto.id,$K=e=>!!e?.with_payment_point,ll=e=>!!e?.with_smart_pos,IMt=["pending","sent_to_payment_point","refunding"],YIe=e=>ll(e)&&IMt.includes(e?.status),kMt=["cancelled","refunded"],NMt=e=>(e?.payment_values??[]).some(t=>ll(t)&&!kMt.includes(t.status)),DMt=e=>(e?.payment_values??[]).some(t=>t.status==="paid"&&XC.includes(t.payment_method)&&!$K(t)&&!ll(t)),XIe=(e=[],t=!1)=>e.reduce((r,n)=>ll(n)||t&&jK(n)?n.status==="paid"?r+n.total:r:r+n.total,0),Af=async(e,t,r,n)=>await e(t(r),i=>
323{if(!i)return i;const a=Array.isArray(i.payment_values)?i.payment_values:[];return{...i,payment_values:a.map(o=>o.id===n.id?n:o)}},{revalidate:!1});function ZIe({open:e,onClose:t,handleCancel:r,mode:n="order"}){const i=Lr(),a=Uu(),{order:o}=gi(),[s,l]=u.useState(!1),[c,d]=u.useState(null),[f,h]=u.useState(!1),p=at(({globalCompany:O})=>O.company.print_setting?.print_exclusion_receipt),g=n==="order"&&DMt(o),_=n==="order"&&NMt(o);u.useEffect(()=>{e&&(d(null),h(!1))},[e]);const b=u.useCallback(()=>{t&&!s&&t()},[s,t]),E=u.useCallback(async O=>{if(O.preventDefault(),_){i.info("Cancele ou estorne o pagamento na maquininha antes de cancelar o pedido.");return}if(g&&!f){i.info("Confirme que está ciente do estorno manual antes de cancelar o pedido.");return}l(!0);try{const I=c?{reason:c.description,cancellationCode:c.cancelCodeId}:null,N=await r(I);if(N){if(n==="order"&&p){const M=N.order_items?.filter(B=>B.status!=="canceled"||B.cancellation_reason==="Pedido cancelado")||[],F={...N,order_items:M};a(F,"canceledItem",!0)}t()}}catch(I){const N=I?.message;i.error(N||"Não foi possível cancelar o pedido")}l(!1)},[_,g,f,c,r,n,p,t,a,i]),S=n==="shipping"?"Cancelar entrega":"Cancelar pedido",P=u.createElement("div",{className:"flex w-full items-center justify-end space-x-12"},u.createElement(fr,{onClick:b,color:"primary",variant:"outlined",disableElevation:!0,disabled:s},"Voltar"),u.createElement(fr,{type:"submit",color:"primary",variant:"contained",className:"min-w-88",disabled:s,disableElevation:!0},S));return u.createElement(oi,{open:e,title:n==="shipping"?"Cancelar solicitação":"Cancelar pedido",loading:s,onClose:b,onSubmit:E,maxWidth:"md",Actions:P},u.createElement("div",{className:"flex min-h-224 items-center"},u.createElement(OMt,{reason:c,setReason:d,mode:n,smartPosBlocksCancel:_,requiresManualPosRefundAck:g,manualPosRefundAcknowledged:f,setManualPosRefundAcknowledged:h})))}function QIe({internalObservation:e,updateInternalObservation:t}){const r=e?.replace("{{print}}","")||"",n=e?.includes("{{print}}"),i=o=>{const s=o?`{{print}}${r}`:r.replace("{{print}}","");t(s||"")},a=o=>{const s=n?`{{print}}${o.target.value}`:o.target.value;t(s)};return u.createElement(u.Fragment,null,u.createElement(Tr,{value:r,onChange:a,variant:"outlined",size:"small",fullWidth:!0,multiline:!0,rows:4,placeholder:"Digite uma observação para o pedido",autoFocus:!0}),u.createElement("div",{className:"flex cursor-pointer items-center space-x-4",onClick:()=>i(!n)},u.createElement(f4,{checked:n,size:"small",color:"primary",className:"p-4 pl-0",disableRipple:!0}),u.createElement("span",{className:"text-gray-700"},"Mostrar observação na impressão do pedido")))}function JIe({open:e,onClose:t}){const r=Lr(),{mutate:n}=di(),{order:i}=gi(),[a,o]=u.useState(!1),[s,l]=u.useState(i?.internal_observation||""),c=u.useCallback(async d=>{d.preventDefault();try{o(!0);const f=await sMt(i?.id,s);await n(hs(i?.id),f,{revalidate:!1}),r.success("Observação atualizada com sucesso!"),t()}catch{r.error("Erro ao atualizar observação adicional")}o(!1)},[s,n,i?.id,r,t]);return u.createElement(oi,{open:e,title:i?.internal_observation?"Editar observação":"Adicionar observação",loading:a,onClose:t,maxWidth:"xs",onSubmit:c,keepMounted:!1},u.createElement("div",{className:"space-y-6"},u.createElement(QIe,{internalObservation:s,updateInternalObservation:l})))}const MMt=e=>ht.get(e).then(t=>{if(t.status>=400||t.data.status===500)throw Error(t.data.message);return t.data});function qn(e){return e?`/api/v1/company/orders/${e}`:null}function _rr(e){const{data:t,error:r,isValidating:n,mutate:i}=Ll(qn(e),MMt,{dedupingInterval:2e4});return{data:t,isLoading:!r&&!t,isError:r,isValidating:n,mutate:i}}function LMt(e){const t=me.queryParamsObjectToString(e),{data:r,error:n,mutate:i}=Ll(`/api/v1/company/loyalty_program/loyalty_program_rewards?${t}`,wm,{dedupingInterval:3e4,revalidateOnFocus:!1});return{data:r,isLoading:!n&&!r,isError:n,mutate:i}}const FMt=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data});function U4(e){const{data:t,error:r,isLoading:n,mutate:i}=Jc(e?`/api/v1/company/clients/${e}`:null,FMt);return{data:t,isLoading:n,isError:r,mutate:i}}qe.locale("pt-BR");function epe({children:e}){return u.createElement("div",{className:"flex space-x-16 rounded-lg border border-solid border-gray-200 p-12 text-16 text-gray-600"},u.createElement("div",{className:"flex max-h-52 flex-col items-center justify-center"},u.createElement(hm,{fontSize:"large",className:"text-gray-400"})),u.createElement("div",{className:"flex-1"},e))}function BMt({client:e}){const{data:t,isLoading:r,isError:n}=U4(e?.id);if(!e)return null;if(e.created_by_system)return u.createElement(epe,null,u.createElement("div",{className:"font-bold"},"Nenhum cliente informado"),u.createElement("div",{className:"mt-1 font-light"},"Informe um cliente para poder realizar um resgate"));const i=t?.loyalty_points_expires_at,a=i?`, válidos até ${qe(i).format("DD/MM/YYYY")}.`:", válidos por tempo indeterminado.";return u.createElement(epe,null,u.createElement("div",{className:"font-bold"},e.name),e.telephone&&u.createElement("div",{className:"mt-1 font-light"},zd(e.telephone,e.ddi)),!r&&!n&&u.createElement("div",{className:"mt-8"},u.createElement("span",{className:"font-bold"},t?.loyalty_score," pontos"),u.createElement("span",{className:"font-light"},t?.total_earned_points_pending>0&&u.createElement(u.Fragment,null," ","(+",t.total_earned_points_pending,t.total_earned_points_pending===1?" ponto pendente":" pontos pen
323dentes",")",a))),r&&u.createElement("div",{className:"mt-8"},u.createElement("div",{className:"h-24 w-1/2 animate-pulse rounded-8 bg-gray-200"})),n&&u.createElement("div",{className:"mt-8"},u.createElement("span",{className:"font-bold text-red"},"Erro ao carregar os pontos")))}var XF,tpe;function zMt(){if(tpe)return XF;tpe=1;var e=ms(),t=vK();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return XF=r,XF}var HMt=zMt();const e3e=et(HMt),UMt={free_delivery:"bg-yellow-lighter",item:"bg-green-lighter",discount:"bg-blue-lighter"};function VMt({reward:e,redeemLoyaltyReward:t,cancelRewardRedemption:r}){const n=Lr(),{order:i}=gi(),{data:a}=U4(i?.client?.id),o=a?.loyalty_score,s=i?.benefits.filter(({category:f})=>f==="loyalty"),l=o&&e.pointsQuantity?Math.min(o/e.pointsQuantity*100,100):0,c=u.useCallback(()=>{if(e.canBeRedeemed){if(s.length>0){n.info("Só é permitido um resgate por pedido");return}if(e.kind==="free_delivery"&&e.pointsQuantity===0){n.info("O pedido já tem entrega grátis");return}if(l<100){n.info("O cliente não possui pontos suficientes");return}t({value:e.value,total_points:e.pointsQuantity,order_item_id:e.orderItemId,loyalty_program_reward_id:e.id})}},[e,s.length,l,n,t]),d=u.useCallback(()=>{!e.isBeingRedeemed||!e.orderBenefitId||r(e.orderBenefitId)},[r,e.isBeingRedeemed,e.orderBenefitId]);return u.createElement("div",{className:"overflow-hidden rounded-lg border border-solid border-gray-200 border-opacity-80"},u.createElement(V_,{variant:"determinate",value:l,className:"bg-gray-100",classes:{barColorPrimary:UMt[e.kind]}}),u.createElement("div",{className:"flex space-x-20 p-12"},e.Image,u.createElement("div",{className:"flex flex-1 items-center space-x-16 text-16 text-gray-600"},u.createElement("div",{className:"flex flex-1 flex-col space-y-0.5"},u.createElement("span",{className:"font-bold"},e.name),e.value&&e.kind!=="discount"?u.createElement("span",null,me.formatMonetaryValue(e.value)):null,e.pointsQuantity>0?u.createElement("span",{className:"font-light text-gray-500"},"Resgate por ",e.pointsQuantity," pontos"):u.createElement("span",{className:"font-light text-gray-500"},e.points_per_currency_unit," pontos para cada R$ 1,00")),e.isBeingRedeemed&&u.createElement("div",{className:"flex flex-col items-center"},u.createElement("div",{className:"text-16 font-bold text-green-dark"},"RESGATADO!"),u.createElement(fr,{variant:"text",className:"text-16 font-bold normal-case text-gray-400",size:"small",onClick:d},"Cancelar resgate")),!e.isBeingRedeemed&&e.canBeRedeemed&&u.createElement("div",{onClick:c},u.createElement(fr,{variant:"text",color:"default",className:"font-bold text-gray-600",disabled:l<100||s.length>0}
323,"Resgatar")))))}const rpe=u.memo(VMt);var TE={},npe;function qMt(){if(npe)return TE;npe=1;var e=$t(),t=Wt();Object.defineProperty(TE,"__esModule",{value:!0}),TE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12.5 6.9c1.42 0 2.13.54 2.39 1.4.13.43.56.7 1.01.7h.06c.7 0 1.22-.71.97-1.36-.44-1.15-1.41-2.08-2.93-2.45V4.5c0-.83-.67-1.5-1.5-1.5S11 3.67 11 4.5v.66c-.39.08-.75.21-1.1.36l1.51 1.51c.32-.08.69-.13 1.09-.13zM4.77 4.62c-.39.39-.39 1.02 0 1.41L7.5 8.77c0 2.08 1.56 3.22 3.91 3.91l3.51 3.51c-.34.49-1.05.91-2.42.91-1.65 0-2.5-.59-2.83-1.43-.15-.39-.49-.67-.9-.67H8.6c-.72 0-1.24.74-.95 1.39.59 1.33 1.89 2.12 3.36 2.44v.67c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-.65c.96-.18 1.83-.55 2.46-1.12l1.51 1.51c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L6.18 4.62a.9959.9959 0 00-1.41 0z"}),"MoneyOffRounded");return TE.default=i,TE}var jMt=qMt();const tx=et(jMt);var AE={},ipe;function $Mt(){if(ipe)return AE;ipe=1;var e=$t(),t=Wt();Object.defineProperty(AE,"__esModule",{value:!0}),AE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19.44 9.03L17.31 6.9l-1.6-1.6c-.19-.19-.45-.3-.71-.3h-3c-.55 0-1 .45-1 1s.45 1 1 1h2.59l2 2H5c-2.8 0-5 2.2-5 5s2.2 5 5 5c2.46 0 4.45-1.69 4.9-4h.82c.53 0 1.04-.21 1.41-.59l2.18-2.18c-.2.54-.31 1.14-.31 1.77 0 2.8 2.2 5 5 5s5-2.2 5-5c0-2.65-1.97-4.77-4.56-4.97zM5 15h2.82C7.4 16.15 6.28 17 5 17c-1.63 0-3-1.37-3-3s1.37-3 3-3c1.28 0 2.4.85 2.82 2H5c-.55 0-1 .45-1 1s.45 1 1 1zm14 2c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"}),"MotorcycleRounded");return AE.default=i,AE}var WMt=$Mt();const WK=et(WMt),rx=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 491 491",width:"1em",height:"1em",...e},x.createElement("path",{d:"M489.658 189.942l-45.205-85.169a11.48 11.48 0 0 0-7.108-5.693c-.02-.005-.032-.012-.053-.018L248.97 48.229c-1.958-.527-4.021-.53-5.98-.004L53.721 99.058l-.057.019c-2.966.814-5.583 2.804-7.118 5.696L1.342 189.942c-1.473 2.776-1.746 6.034-.756 9.016s3.158 5.43 5.999 6.772l39.331 18.592v116.344c0 4.414 2.526 8.439 6.502 10.356l188.557 91.002c1.584.765 3.293 1.143 4.997 1.143 1.691 0 3.372-.389 4.927-1.127.025-.006.049-.005.072-.017l188.557-91.002c3.976-1.918 6.502-5.942 6.502-10.356V224.332c0-.15-.017-.297-.022-.445l38.408-18.156a11.5 11.5 0 0 0 5.999-6.772 11.51 11.51 0 0 0-.757-9.017zM245.965 71.241l150.587 40.647L245.5 167.87 94.52 111.916l151.445-40.675zM62.144 124.445l167.892 62.223-36.977 81.771-165.753-78.354 34.838-65.64zm6.772 209.002v-98.252l124.887 59.035c1.552.734 3.232 1.104 4.915 1.104a11.49 11.49 0 0 0 3.968-.706 11.5 11.5 0 0 0 6.511-6.056l25.276-55.896v180.673L68.916 333.447zm354.113 0l-165.557 79.902V234.767l24.331 53.805c1.271 2.81 3.616 4.991 6.511 6.056a11.49 11.49 0 0 0 3.968.706c1.684 0 3.363-.369 4.915-1.104l125.832-59.482v98.699zm-125.088-65.009l-36.978-81.771 167.892-62.223 34.839 65.64-165.753 78.354z"})),GMt={free_delivery:u.createElement(WK,{fontSize:"inherit",color:"inherit"}),item:u.createElement(rx,{className:"h-32 w-32 fill-current"}),discount:u.createElement(tx,{fontSize:"inherit",color:"inherit"})},KMt={free_delivery:"text-yellow-dark bg-yellow-lighter bg-opacity-50",discount:"text-blue-dark bg-blue-lighter bg-opacity-50",item:"text-green-dark bg-green-lighter bg-opacity-50"};function YMt({kind:e,item:t}){return e==="item"&&t?.thumbnail_url||t?.image_url?u.createElement("div",{className:"h-60 w-60 overflow-hidden rounded-md"},u.createElement(E2,{src:t?.thumbnail_url||t?.image_url,alt:t?.name,className:"h-full w-full object-cover object-center"})):u.createElement("div",{className:Ft("flex h-60 w-60 items-center justify-center overflow-hidden rounded-lg text-36",KMt[e])},GMt[e])}const iP=u.memo(YMt);function XMt({data:e,redeemLoyaltyReward:t,cancelRewardRedemption:r}){const{order:n}=gi(),i=n?.order_type,a=n?.delivery_fee,o=n?.order_items,s=u.useMemo(()=>n?.benefits.filter(({category:_})=>_==="loyalty"),[n?.benefits]),l=u.useCallback((_,b)=>{const E=s.find(S=>S.loyalty_program_reward_id===_&&(!b||S.value===b));return{isBeingRedeemed:!!E,orderBenefitId:E?.id}},[s]),c=u.useCallback(_=>{const{id:b,name:E,kind:S,item:P,item_id:O,points_per_currency_unit:I,points_quantity_required:N,fixed_discount_value:M}=_;if(S==="free_delivery"&&i==="delivery")return{..._,name:E,value:a,pointsQuantity:Math.floor(I*a||0),canBeRedeemed:!0,Image:u.createElement(iP,{kind:_.kind,item:_.item}),...l(b)};if(S==="discount")return{..._,name:E,value:M,pointsQuantity:N||0,canBeRedeemed:!0,Image:u.createElement(iP,{kind:_.kind,item:_.item}),...l(b)};
323if(S==="item"){const F=e3e(o.filter(B=>B.item_id===O).map(B=>({...B,price:xi((B.price||0)/B.quantity,2)})),"price");return F?.length>0?F.map(B=>{const V=B.price;return{..._,name:P?.name||E,value:V,pointsQuantity:Math.floor(I*V),canBeRedeemed:!0,Image:u.createElement(iP,{kind:_.kind,item:_.item}),orderItemId:B.id,...l(b,V)}}):{..._,name:P?.name||E,value:0,pointsQuantity:0,isBeingRedeemed:!1,canBeRedeemed:!1,Image:u.createElement(iP,{kind:_.kind,item:_.item})}}return{}},[i,l,o,a]),d=u.useMemo(()=>e?e.reduce((_,b)=>{const E=c(b),S=Array.isArray(E)?E:[E];return[..._,...S]},[]).filter(_=>_.pointsQuantity>=0).sort((_,b)=>b.canBeRedeemed-_.canBeRedeemed||_.pointsQuantity-b.pointsQuantity):[],[c,e]),f=d.findIndex(_=>!_.canBeRedeemed),h=f!==-1?f:d.length,p=d.slice(0,h),g=d.slice(h);return u.createElement("div",{className:"space-y-16"},p.map(_=>u.createElement(rpe,{key:`${_.id}-${_.value}`,reward:_,redeemLoyaltyReward:t,cancelRewardRedemption:r})),g.length>0&&u.createElement(u.Fragment,null,u.createElement("div",{className:"py-3 text-16 text-gray-600"},"Os produtos abaixo não podem ser resgatados pois não estão no pedido."),g.map(_=>u.createElement(rpe,{key:_.id,reward:_,redeemLoyaltyReward:t,cancelRewardRedemption:r}))))}const ZMt=u.memo(XMt);function QMt({open:e,setLoading:t,redemptionApi:r}){const n=r?.redeemLoyaltyReward??lMt,i=r?.updateOrderBenefits??$Ie,a=Lr(),o=Bl(),{mutate:s}=di(),{order:l}=gi(),{data:c,isLoading:d,isError:f}=LMt(e),{mutate:h}=U4(l?.client?.id),p=u.useCallback(async _=>{o({title:"Confirmar resgate",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{t(!0);try{const b={loyalty_program_reward_id:_.loyalty_program_reward_id,order_item_id:_.order_item_id||null,total_points:_.total_points,value:_.value},E=await n(l?.id,b);s(qn(l?.id),E,{revalidate:!1}),h(),a.success("Resgate feito com sucesso!")}catch(b){a.error(b.response?.data?.message||"Não foi possível fazer a atualização")}t(!1)}).catch(()=>{})},[a,o,s,h,l?.id,n,t]),g=u.useCallback(_=>{o({title:"Confirmar exclusão",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{t(!0);try{const b={order_benefits:[{id:_,_destroy:!0}]},E=await i(l?.id,b);s(qn(l?.id),E,{revalidate:!1}),h(),a.success("Cancelamento de resgate feito com sucesso!")}catch(b){a.error(b.response?.data?.message||"Não foi possível fazer a atualização")}t(!1)}).catch(()=>{})},[a,o,s,h,l?.id,t,i]);return u.createElement("div",{className:"space-y-24"},u.createElement(BMt,{client:l?.client}),c?.length===0&&!d&&!f&&u.createElement(dl,{title:"Nenhuma recompensa disponível para resgate"}),f&&u.createElement(Jd,{title:"Não foi possível carregar as recompensas"}),d&&u.createElement("div",{className:"space-y-20"},u.createElement("div",{className:"text-18 font-bold text-gray-600"},"Recompensas disponíveis para resgates"),[1,2,3].map(_=>u.createElement("div",{key:_,className:"h-80 w-full animate-pulse rounded-8 bg-gray-200"}))),c?.length>0&&!d&&!f&&u.createElement("div",{className:"space-y-20"},u.createElement("div",{className:"text-18 font-bold text-gray-600"},"Recompensas disponíveis para resgates"),u.createElement(ZMt,{data:c,redeemLoyaltyReward:p,cancelRewardRedemption:g})))}function JMt({open:e,onClose:t,redemptionApi:r}){const[n,i]=u.useState(!1);return u.createElement(oi,{open:e,title:"Resgatar recompensa de fidelidade",loading:n,onClose:t,maxWidth:"xs",keepMounted:!0},u.createElement(QMt,{open:e,setLoading:i,redemptionApi:r}))}function e8t(){const e=Lr(),t=An(),{mutate:r}=di(),{order:n,orderPermissions:i}=gi(),[a,o]=u.useState(!1),s=u.useCallback(async()=>{try{o(!0);const l=await cMt(n?.id);r(hs(n?.id),l,{revalidate:!1}),t(HI(n?.id,{status:l.status,updated_at:l.updated_at}))}catch(l){e.error(l.response?.data?.message||"Não foi possível fazer a atualização")}o(!1)},[e,t,r,n?.id]);return!n||!i.reopenOrder?null:u.createElement(u.Fragment,null,u.createElement(zs,null),u.createElement("div",{className:"flex w-full flex-shrink-0 items-center space-x-12 p-12"},u.createElement(fr,{className:"flex-1",color:"primary",variant:"outlined",disabled:a,onClick:s,disableElevation:!0},a?u.createElement(ai,{size:22}):"Reabrir pedido")))}const t8t=u.memo(e8t);var ZF,ape;
323function r8t(){if(ape)return ZF;ape=1;function e(t,r){for(var n,i=-1,a=t.length;++i<a;){var o=r(t[i]);o!==void 0&&(n=n===void 0?o:n+o)}return n}return ZF=e,ZF}var QF,ope;function n8t(){if(ope)return QF;ope=1;var e=ms(),t=r8t();function r(n,i){return n&&n.length?t(n,e(i,2)):0}return QF=r,QF}var i8t=n8t();const tg=et(i8t);var PE={},spe;function a8t(){if(spe)return PE;spe=1;var e=$t(),t=Wt();Object.defineProperty(PE,"__esModule",{value:!0}),PE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zM18 4h-2.5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z"}),"DeleteRounded");return PE.default=i,PE}var o8t=a8t();const $p=et(o8t),lpe=(e,t=!1)=>{const n=((typeof e=="number"?e.toFixed(2):e)||"").toString().replace(/\D/g,"");return n.length>2?(parseInt(n)/100).toFixed(2).replace(".",","):t&&n.length>0?`${n},00`:n},s8t=({label:e,name:t,value:r,onChange:n,inputProps:i,...a})=>{const o=Lr(),s=u.useCallback(d=>{d.target.value=lpe(d.target.value),n(d)},[n]),l=u.useCallback(()=>{n({target:{name:t,value:lpe(r,!0)},persist:()=>{}}),a.onBlur&&a.onBlur()},[t,n,a,r]),c=typeof r=="number"?me.formatCurrencyString(r):r||"";return u.createElement(Hu,{name:t,label:e,value:c,onChange:s,onClick:()=>a.readOnly&&o.info("Este valor não pode ser editado"),onFocus:d=>{d.target.select()},inputProps:{inputMode:"numeric",...i||{}},placeholder:"0,00",size:"small",variant:"outlined",fullWidth:!0,...a,onBlur:l})},rg=u.memo(s8t);function l8t({title:e,subtitle:t,footnote:r,baseAmount:n,currentValue:i,onUpdate:a,onDelete:o,autoFocus:s,readOnly:l}){const[c,d]=u.useState(!1),[f,h]=u.useState({value:"",percentage:""}),[p,g]=u.useState(i);u.useEffect(()=>{c&&h({value:"",percentage:""})},[c,h]);const _=u.useCallback(O=>{l||!a||(g(O),a(O))},[a,l]),b=O=>{l||g(O.target.value)},E=O=>{const I=O.target.value,N=n?xi(me.convertNumberToFloat(I)*me.convertNumberToFloat(n)/100,2):0;h(M=>({value:I?N:M.value,percentage:I||null}))},S=O=>{O.preventDefault(),O.stopPropagation(),_(f.value),d(!1)},P=O=>{O.keyCode===13&&O.target.blur()};return u.createElement(u.Fragment,null,u.createElement("div",{className:"flex h-full w-full flex-col space-y-8 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("div",{className:"space-y-4"},u.createElement("div",{className:"text-16 font-semibold"},e),u.createElement("div",{className:"text-16 font-light"},t)),u.createElement("div",{className:"flex space-x-8"},!l&&u.createElement(Ma,{tooltip:"Calculadora percentual",padding:"p-1",tooltipProps:{placement:"top-end"},onClick:()=>d(!0)},u.createElement("span",{className:"px-4 text-20 font-semibold text-gray-500"},"%")),o&&u.createElement(Ma,{tooltip:"Remover desconto",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:o},u.createElement($p,null)))),u.createElement("div",{className:"flex items-center space-x-16"},u.createElement("span",{className:Ft("text-20 font-semibold sm:text-24",p?"text-gray-600":"text-gray-400")},"R$"),u.createElement(rg,{value:p||"",onChange:b,onBlur:()=>_(p),onKeyDown:P,className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"},readOnly:l,autoFocus:s})),r&&u.createElement("div",{className:"text-16 font-light"},r)),!l&&u.createElement(oi,{open:c,title:"Aplicar valor percentual",onClose:()=>d(!1),onSubmit:S,confirmText:"Aplicar",fullScreen:!1,keepMounted:!1,maxWidth:"xs"},u.createElement("div",{className:"space-y-20 text-gray-600"},u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-18 font-semibold"}
323,"Informe abaixo o valor percentual, ele será aplicado sobre o valor de"," ",u.createElement("span",{className:"font-bold"},me.formatMonetaryValue(n)),"."),u.createElement("div",{className:"flex space-x-16"},u.createElement("div",{className:"flex h-full w-full flex-col space-y-12 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"text-16 font-bold"},"Percentual (%)"),u.createElement(rg,{value:f.percentage||"",onChange:E,className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"},autoFocus:!0})),u.createElement(Yn,{title:"Este campo não pode ser editado, utilize o campo ao lado para informar o valor percentual",placement:"top",classes:{tooltip:"text-14"},arrow:!0},u.createElement("div",{className:"flex h-full w-full flex-col space-y-12 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"text-16 font-bold"},"Valor (R$)"),u.createElement(rg,{value:f.value||"",onChange:()=>{},className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"},readOnly:!0}))))))))}const aP=u.memo(l8t);function c8t({open:e,onClose:t}){const r=Lr(),n=Bl(),{mutate:i}=di(),{order:a}=gi(),[o,s]=u.useState(!1),[l,c]=u.useState({additionalFee:0,otherDiscounts:0}),[d,f]=u.useState(""),[h,p]=u.useState(!1),[g,_]=u.useState(""),b=u.useMemo(()=>{const F=z_(a?.benefits,"category");return{additionalFee:a?.additional_fee||0,otherDiscounts:F.other,otherDiscountsValue:tg(F.other,"value"),couponDiscounts:F.coupon,couponDiscountsValue:tg(F.coupon,"value"),loyaltyDiscounts:F.loyalty,loyaltyDiscountsValue:tg(F.loyalty,"value")}},[a?.additional_fee,a?.benefits]),E=u.useMemo(()=>a.order_items?.filter(F=>F.status!=="canceled")?.reduce((F,B)=>F+B.price,0),[a.order_items]);u.useEffect(()=>{e&&(c({additionalFee:b.additionalFee,otherDiscounts:b.otherDiscountsValue}),f(""),_(""))},[b.additionalFee,b.otherDiscountsValue,e]);const S=u.useCallback(async F=>{try{const B={additional_fee:me.convertNumberToFloat(F||0)},V=await oMt(a?.id,B);i(qn(a?.id),V,{revalidate:!1})}catch(B){throw r.error(B.response?.data?.message||"Não foi possível fazer a atualização"),B}},[r,i,a?.id]),P=u.useCallback(async F=>{try{const B={};if("otherDiscounts"in F&&(B.other_discounts=me.convertNumberToFloat(F.otherDiscounts||0)),"benefits"in F&&(B.order_benefits=F.benefits.map(W=>({...qc(W,["id","value","_destroy"]),value:me.convertNumberToFloat(W.value||0)}))),Object.keys(B).length===0)return null;const V=await $Ie(a?.id,B);i(qn(a?.id),V,{revalidate:!1})}catch(B){throw r.error(B.response?.data?.message||"Não foi possível fazer a atualização"),B}},[r,i,a?.id]),O=u.useCallback(F=>{n({title:"Confirmar exclusão",description:"Esta operação não pode ser desfeita.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{await P({benefits:[{id:F,_destroy:!0}]})}finally{s(!1)}}).catch(()=>{})},[n,P]),I=u.useCallback(async()=>{if(d.trim()){p(!0),_("");try{const F=await fMt(a?.id,d.trim().toUpperCase());i(qn(a?.id),F,{revalidate:!1}),f(""),r.success("Cupom aplicado com sucesso!")}catch(F){throw _(F.response?.data?.message||"Não foi possível aplicar o cupom"),F}finally{p(!1)}}},[d,a?.id,i,r]),N=u.useCallback(()=>{n({title:"Remover cupom",description:"Deseja remover o cupom aplicado?",cancellationText:"Voltar",confirmationText:"Remover"}).then(async()=>{s(!0);try{const F=await hMt(a?.id);i(qn(a?.id),F,{revalidate:!1})}catch(F){r.error(F.response?.data?.message||"Não foi possível remover o cupom")}s(!1)}).catch(()=>{})},[n,i,a?.id,r]),M=u.useCallback(async F=>{F.preventDefault(),s(!0);const B=[];b.additionalFee!==me.convertNumberToFloat(l.additionalFee||0)&&B.push(()=>S(l.additionalFee));const V={};b.otherDiscountsValue!==l.otherDiscounts&&(V.otherDiscounts=l.otherDiscounts),Object.keys(V).length>0&&B.push(()=>P(V)),d.trim()&&!b.couponDiscounts?.length&&B.push(()=>I());let W=!1;for(const $ of B)try{await $()}catch{W=!0}s(!1),W||t()},[l,b,d,I,S,P,t]);return u.createElement(oi,{open:e,title:"Descontos, acréscimos e cupons",loading:o,onClose:t,maxWidth:"xs",onSubmit:M,keepMounted:!1},u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-16 text-gray-600"},"Informe nos campos abaixo o ",u.createElement("strong",null,"valor em R$")," dos descontos e acréscimos que deseja aplicar ao pedido."),u.createElement("div",{className:"flex space-x-16"},u.createElement(aP,{key:"additionalFee",title:"Acréscimo",baseAmount:E,currentValue:l.additionalFee,onUpdate:F=>c(B=>({...B,additionalFee:F})),autoFocus:!0}),u.createElement(aP,{key:"otherDiscounts",title:"Desconto",baseAmount:E,currentValue:l.otherDiscounts,onUpdate:F=>c(B=>({...B,otherDiscounts:F}
323))})),!b.couponDiscounts?.length&&u.createElement("div",{className:"flex flex-col gap-4 space-y-8"},u.createElement("div",{className:"text-16 font-semibold text-gray-600"},"Cupom de desconto"),u.createElement("div",{className:"flex space-x-8"},u.createElement(Tr,{id:"couponCodeInput",label:"Código do cupom",value:d,onChange:F=>{f(F.target.value.toUpperCase()),_("")},error:!!g,helperText:g,size:"small",fullWidth:!0,disabled:h,inputProps:{style:{textTransform:"uppercase"},autoComplete:"off"},variant:"outlined"}))),b.couponDiscounts?.map(F=>u.createElement(aP,{key:F.id,title:"Cupom de desconto",subtitle:`Cupom: ${F.coupon_name||"Nome do cupom indisponível"}`,baseAmount:E,currentValue:F.value,onDelete:N,readOnly:!0})),b.loyaltyDiscounts?.map(F=>u.createElement(aP,{key:F.id,title:"Desconto de fidelidade",subtitle:`Prêmio: ${F.loyalty_program_reward_name||F.item_name||"Nome do prêmio indisponível"}`,footnote:F.total_points>0&&`${F.total_points} pontos`,currentValue:F.value,onDelete:()=>O(F.id),readOnly:!0}))))}var RE={},cpe;function u8t(){if(cpe)return RE;cpe=1;var e=$t(),t=Wt();Object.defineProperty(RE,"__esModule",{value:!0}),RE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");return RE.default=i,RE}var d8t=u8t();const f8t=et(d8t);function h8t(e){return e?`/api/v2/company/cashback/client/${e}/summary`:null}function t3e(e){const{data:t,error:r,mutate:n,isLoading:i}=Ll(h8t(e),wm,{dedupingInterval:6e4,revalidateOnFocus:!1,keepPreviousData:!0});return{data:t,isLoading:i,isError:r,mutate:n}}function p8t(e=!0){const{data:t,error:r,mutate:n,isValidating:i}=Ll(e?"/api/v2/company/cashback/settings":null,wm,{dedupingInterval:3e4,revalidateOnFocus:!1,shouldRetryOnError:!1});return{data:t,isLoading:!r&&!t,isError:r,mutate:n,isValidating:i}}const r3e={name:"Cliente não identificado",created_by_system:!0};function m8t({client:e,cashbackBalance:t,cashbackExpiresAt:r,isLoading:n,onAssociateClient:i,canAssociateClient:a,onClear:o}){const s=e||r3e;return s.created_by_system?u.createElement("div",{className:"flex space-x-16 rounded-lg border border-solid border-gray-200 p-12 text-16 text-gray-600"},u.createElement("div",{className:"flex max-h-52 flex-col items-center justify-center"},u.createElement(hm,{fontSize:"large",className:"text-gray-400"})),u.createElement("div",{className:"flex-1"},u.createElement("div",{className:"font-bold"},"Nenhum cliente informado"),u.createElement("div",{className:"mt-1 font-light"},"Informe um cliente para poder usar cashback neste pedido."),a&&i&&u.createElement(fr,{variant:"contained",color:"primary",size:"small",className:"mt-12",disableElevation:!0,onClick:i},"Associar cliente"))):u.createElement("div",{className:"relative flex space-x-16 rounded-lg border border-solid border-gray-200 p-12 text-16 text-gray-600"},o&&u.createElement(cr,{size:"small",className:"absolute right-8 top-8 text-gray-500 hover:text-gray-700",onClick:o,"aria-label":"Desmarcar cliente"},u.createElement(Aa,{fontSize:"small"})),u.createElement("div",{className:"flex max-h-52 flex-col items-center justify-center"},u.createElement(hm,{fontSize:"large",className:"text-gray-400"})),u.createElement("div",{className:"flex flex-1 flex-col"},u.createElement("div",{className:"font-bold"},s.name),s.telephone&&u.createElement("div",{className:"mt-1 font-light"},zd(s.telephone,s.ddi)),u.createElement("div",{className:"mt-8"},n?u.createElement("div",{className:"h-24 w-3/4 animate-pulse rounded-8 bg-gray-200"}):u.createElement("div",{className:"mt-1"},u.createElement("strong",null,me.formatMonetaryValue(t??0))," de cashback",r?` válidos até ${qe(r).format("DD/MM/YYYY")}`:""))))}function n3e({open:e,onClose:t,orderId:r,client:n}){const i=Lr(),a=Bl(),{mutate:o}=di(),[s,l]=u.useState(!1),[c,d]=u.useState(null),f=e&&(!n||n.created_by_system);u.useEffect(()=>{e&&d(null)},[e]);const h=u.useCallback(async E=>{l(!0);try{const S=await nMt(r,E);o(qn(r),S,{revalidate:!1}),t()}catch(S){i.error(S.response?.data?.message||"Não foi possível fazer a atualização")}l(!1)},[i,o,t,r]),p=u.useCallback(async()=>
323{l(!0);try{const E=await iMt(r);o(qn(r),E,{revalidate:!1}),t()}catch(E){i.error(E.response?.data?.message||"Não foi possível fazer a atualização")}l(!1)},[i,o,t,r]),g=u.useCallback(()=>{a({title:"Confirmar desvinculação do cliente",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(p).catch(()=>{})},[a,p]),_=u.useCallback(async E=>{E.preventDefault(),h(c?.id)},[h,c?.id]),b=u.useCallback(E=>{d(E)},[]);return u.createElement(oi,{open:e,title:"Editar cliente",loading:s,onClose:t,maxWidth:"xs",onSubmit:f?_:void 0,keepMounted:!1},u.createElement("div",{className:"space-y-24"},f?u.createElement(u.Fragment,null,u.createElement("div",{className:"text-16 font-semibold text-gray-600"},"Informe abaixo um cliente para ser associado ao pedido."),u.createElement("div",{className:"overflow-hidden rounded-8 border-1 border-solid border-grey-border-dark p-4"},u.createElement(cIe,{selectedClient:c,onClientSelected:b,resetClient:()=>d(null),allowCreateClient:!0,allowEditClient:!1,showInternalObservation:!1,textFieldProps:{autoFocus:!0,size:"large",className:"text-16"}}))):u.createElement(u.Fragment,null,u.createElement("div",{className:"text-16 font-semibold text-gray-600"},"Para trocar o cliente de um pedido é necessário primeiro removê-lo."),u.createElement(fr,{variant:"outlined",color:"primary",size:"large",onClick:g,fullWidth:!0},"Remover cliente"))))}const v8t=[Bt.waiting_confirmation.status,Bt.pending_payment.status,Bt.confirmed.status,Bt.ready.status,Bt.released.status,Bt.delivered.status,Bt.waiting_to_catch.status,Bt.scheduled_confirmed.status];function g8t({open:e,onClose:t,redemptionApi:r,associateClientMode:n}){const i=Lr(),a=Bl(),{mutate:o}=di(),{order:s,orderPermissions:l}=gi(),c=r?.applyCashbackOnOrder??uMt,d=r?.removeCashbackFromOrder??dMt,f=n==="session",[h,p]=u.useState(!1),[g,_]=u.useState(!1),b=s?.client?.id,{data:E,isLoading:S,mutate:P}=t3e(e?b:null),{data:O,isLoading:I}=p8t(e),N=E?.cashback_balance,M=u.useMemo(()=>{if(N==null||N==="")return 0;const ce=Number.parseFloat(String(N));return Number.isFinite(ce)?ce:0},[N]),F=E?.cashback_expires_at??null,B=O?.minimum_balance_value_to_use,V=B!=null&&B!==""?parseFloat(String(B)):NaN,W=O!=null&&Number.isFinite(V)?V:null,$=!!b&&W!=null&&Number.isFinite(W)&&M>=W,X=e&&(I||!!b&&S);u.useEffect(()=>{e?p(!1):_(!1)},[e]);const ae=(s?.benefits?.filter(ce=>ce.category==="cashback")??[]).length>0,Q=!!b&&!ae&&!X&&W!=null&&Number.isFinite(W)&&M<W,ie=s?.status,le=ae&&v8t.includes(ie)&&ie!==Bt.closed.status&&ie!==Bt.canceled.status&&ie!==Bt.canceling.status,fe=u.useCallback(async ce=>{if(ce&&ce.preventDefault&&ce.preventDefault(),!$)return;if(!s?.client?.id||s.client.created_by_system){i.info("Informe um cliente no pedido para usar cashback.");return}if(!Number.isFinite(M)||M<=0){i.info("O cliente não possui saldo de cashback disponível.");return}const pe=typeof s?.final_value=="number"?s.final_value:parseFloat(s?.final_value)||0,Ne=Math.min(M,pe);if(Ne<=0){i.info("O valor total do pedido não permite aplicar cashback.");return}p(!0);try{const De=await c(s.id,Ne);o(qn(s.id),De,{revalidate:!1}),P(),i.success("Cashback aplicado com sucesso!"),t()}catch(De){i.error(De.response?.data?.message||"Não foi possível aplicar o cashback.")}finally{p(!1)}},[$,s?.id,s?.final_value,s?.client?.id,s?.client?.created_by_system,M,i,o,P,t,c]),de=u.useCallback(()=>{le&&a({title:"Remover cashback",cancellationText:"Voltar",confirmationText:"Remover"}).then(async()=>{p(!0);try{const ce=await d(s.id);o(qn(s.id),ce,{revalidate:!1}),P(),i.success("Cashback removido do pedido."),t()}catch(ce){i.error(ce.response?.data?.message||"Não foi possível remover o cashback.")}finally{p(!1)}}).catch(()=>{})},[le,s?.id,a,o,P,i,t,d]),ge=u.useCallback(()=>{if(f){i.info("Associe um cliente à mesa/comanda nas configurações da sessão.",{autoHideDuration:5e3});return}_(!0)},[i,f]),Ae=h||X,Fe=Ae||!$||!s?.client?.id||s?.client?.created_by_system,Pe=u.createElement("div",{className:"flex w-full items-center justify-end space-x-12"},u.createElement(fr,{onClick:t,color:"primary",variant:"outlined",disableElevation:!0,disabled:Ae},"CANCELAR"),ae?le&&u.createElement(fr,{color:"primary",variant:"contained",className:"min-w-88",disabled:Ae,disableElevation:!0,onClick:de},"Cancelar resgate"):u.createElement(fr,{type:"button",color:"primary",variant:"contained",className:"min-w-88",disabled:Fe,disableElevation:!0,onClick:fe},"Resgatar cashback"));return u.createElement(oi,{open:e,title:"Resgatar cashback",loading:Ae,onClose:t,maxWidth:"sm",keepMounted:!0,Actions:Pe},u.createElement("div",{className:"space-y-24"},Q&&u.createElement("div",{className:"flex gap-12 rounded-8 border border-solid border-blue-light bg-blue-lightest p-16"},u.createElement(f8t,{className:"mt-2 flex-shrink-0 text-blue-dark",fontSize:"small"}),u.createElement("div",{className:"text-16 text-blue-darker"},u.createElement("div",{className:"font-bold"},"Valor mínimo de cashback não atingido"),u.createElement("div",null,"Para o uso de cashback é necessário possuir pelo menos o valor mínimo (valor mínimo de ",me.formatMonetaryValue(W),")."))),u.createElement(m8t,{client:s?.client??r3e,cashbackBalance:M,cashbackExpiresAt:F,isLoading:!!b&&S,onAssociateClient:ge,canAssociateClient:f||l?.editClient}),ae&&u.createElement("div",{className:"text-16 font-bold text-green-dark"}
323,"Cashback já aplicado neste pedido."),!f&&l?.editClient&&e&&u.createElement(n3e,{open:g,onClose:()=>_(!1),orderId:s?.id,client:s?.client})))}function y8t({order:e,onlyRead:t}){const r=Lr(),n=An(),i=Uu(),{mutate:a}=di(),{hasUserPermissions:o}=d0(),[s,l]=u.useState(!1),[c,d]=u.useState(!1),[f,h]=u.useState(!1),[p,g]=u.useState(!1),[_,b]=u.useState(!1),[E,S]=u.useState(!1),[P,O]=u.useState(!1),[I,N]=u.useState(null),M=at(({globalCompany:Ue})=>Ue.company?.benefit_mode),F=at(({globalCompany:Ue})=>Ue.company.emissao_nfce_liberada),B=at(({globalCompany:Ue})=>Ue.company?.flags?.work_with_scheduled_order),V=MK(),{data:W}=R4(),{orderPermissions:$}=gi(),X=qK(),{id:re,status:ae,order_type:Q,delivered_by:ie,delivery_man:le,delivery_route:fe}=e,de=e.order_timing==="scheduled"&&e.scheduled_date&&e.scheduled_period,ge=Object.keys(Bc).includes(e.sales_channel),Ae=u.useRef(!1),Fe=u.useCallback(async Ue=>{if(!Ae.current){Ae.current=!0;try{const ut=await n(NV(re,Ue));ut&&(n(HI(re,{status:ut.status,updated_at:ut.updated_at})),await a(hs(re),ut,!1),F&&!e.order_invoice&&Ue===Bt.closed.status&&o(Te.ISSUE_TAX_INVOICE)&&V(ut))}catch{}Ae.current=!1}},[n,F,re,a,o,V,e.order_invoice]),Pe=u.useCallback(async Ue=>{const{reason:ut,cancellationCode:We}=Ue||{};if(ge&&!Ue)throw new Error("Para esse pedido é obrigatório informar o motivo do cancelamento");if(["501","1080"].includes(Ue?.cancellationCode)&&ut?.length<4)throw new Error("O motivo não pode ter menos que 4 caracteres");const ke=await n(NV(e?.id,Bt.canceled.status,Ue&&{cancellation_code:We,cancellation_reason:ut}));if(ke)return n(HI(e?.id,{status:ke.status,updated_at:ke.updated_at})),await a(hs(e?.id),ke,!1),r.success("Solicitação enviada com sucesso!"),ke},[ge,e?.id,n,r,a]),ce=u.useMemo(()=>{const Ue=e?.scheduled_date?.replace(/(\d{4})-(\d{2})-(\d{2})/,"$3/$2/$1"),ut=e?.scheduled_period;return{selectedDate:Ue,selectedTime:ut}},[e]),pe=u.useCallback(async Ue=>{try{const ut={order_timing:Ue.orderTiming==="scheduling"?"scheduled":"immediate",scheduled_date:Ue.selectedDate,scheduled_period:Ue.selectedTime},We=await rMt(re,ut);a(hs(re),We,{revalidate:!1}),h(!1)}catch(ut){r.error(ut.response?.data?.message||"Não foi possível fazer a atualização")}},[r,re,a]),Ne=u.useMemo(()=>[{key:"finalizar-1",label:"Finalizar",onClick:()=>{Fe(Bt.closed.status)},visible:$.closeOrder&&!ge&&![Bt.released.status,Bt.delivered.status,Bt.waiting_to_catch.status,Bt.canceling.status].includes(ae)},{key:"finalizar-2",label:"Concluído",variant:"contained",fullWidth:!0,onClick:()=>{Fe(Bt.closed.status)},visible:$.closeOrder&&[Bt.released.status,Bt.delivered.status,Bt.waiting_to_catch.status].includes(ae)},{key:"pronto",label:"Pronto",variant:"outlined",onClick:()=>{Fe(Bt.ready.status)},visible:Q==="delivery"&&Bt.confirmed.status===ae},{key:"pronto-saiu-para-entrega",label:(()=>{if(Q==="delivery")return"Saiu para entrega";if(Q==="takeout"||Q==="onsite")return"Pedido pronto"})(),variant:"contained",fullWidth:!0,onClick:()=>{Q==="takeout"||Q==="onsite"?Fe(Bt.waiting_to_catch.status):W?.length&&(!ie||ie==="merchant")&&!le?.id?l(!0):Fe(Bt.released.status)},visible:fe&&Q==="delivery"?Bt.ready.status===ae:[Bt.ready.status,Bt.confirmed.status].includes(ae)},{key:"em-preparacao",label:"Em preparação",variant:"contained",fullWidth:!0,onClick:()=>{i(e,"kitchen",!0),Fe(Bt.confirmed.status)},visible:ae===Bt.scheduled_confirmed.status},{key:"aceitar",label:ae===Bt.pending_payment.status?"Confirmar pagamento":de?"Aceitar agendamento":"Aceitar o pedido",variant:"contained",fullWidth:!0,onClick:()=>{i(e,"standard",!0),de||i(e,"kitchen",!0),Fe(de?Bt.scheduled_confirmed.status:Bt.confirmed.status)},visible:[Bt.waiting_confirmation.status,Bt.pending_payment.status].includes(ae)}].filter(({visible:Ue})=>Ue),[fe,ie,le?.id,W?.length,ge,e,$.closeOrder,Q,i,de,ae,Fe]),De=B&&$.editOrderTiming,Ve=u.useMemo(()=>[{key:"observacao",label:"Adicionar observação",icon:u.createElement(fIe,null),onClick:()=>O(!0),visible:!0},{key:"fidelidade",label:M===_p.CASHBACK?"Resgatar cashback e aplicar desconto":"Resgatar recompensa de fidelidade",icon:u.createElement(mNt,null),onClick:X(()=>
323{M===_p.CASHBACK?S(!0):b(!0)}),visible:$.redeemLoyaltyReward&&(M===_p.LOYALTY||M===_p.CASHBACK)},{key:"descontos",label:"Descontos, acréscimos e cupons",icon:u.createElement(jg,null),onClick:X(()=>g(!0)),visible:$.editDiscountsAndFees},{key:"agendamento",label:de?"Editar agendamento":"Agendar pedido",icon:u.createElement(wV,null),onClick:()=>h(!0),visible:De},{key:"saiu-para-entrega",label:"Saiu para entrega",icon:u.createElement(hIe,null),onClick:()=>Fe(Bt.released.status),visible:fe&&Q==="delivery"&&Bt.confirmed.status===ae},{key:"voltar-preparacao",label:"Voltar para Em preparação",icon:u.createElement(BF,null),onClick:()=>{Fe(Bt.confirmed.status)},visible:!ge&&[Bt.ready.status,Bt.waiting_to_catch.status,Bt.released.status].includes(ae)&&$.backToPreviousStatus},{key:"voltar-saiu-entrega",label:"Voltar para Saiu para entrega",icon:u.createElement(BF,null),onClick:()=>{Fe(Bt.released.status)},visible:!ge&&ae===Bt.delivered.status&&$.backToPreviousStatus},{key:"voltar-agendamento",label:"Voltar para Agendamento confirmado",icon:u.createElement(BF,null),onClick:()=>{Fe(Bt.scheduled_confirmed.status)},visible:!ge&&ae===Bt.confirmed.status&&de&&$.backToPreviousStatus},{key:"finalizar-3",label:"Concluir pedido",icon:u.createElement(NK,null),onClick:()=>{Fe(Bt.closed.status)},visible:$.closeOrder&&ge&&[Bt.confirmed.status,Bt.ready.status].includes(ae)},{key:"cancelar",label:ae===Bt.waiting_confirmation.status?"Rejeitar pedido":"Cancelar pedido",icon:u.createElement(Aa,null),onClick:()=>d(!0),visible:$.cancelOrder&&(!ge||[Bt.scheduled_confirmed.status,Bt.waiting_confirmation.status,Bt.confirmed.status,Bt.ready.status,Bt.waiting_to_catch.status,Bt.released.status,Bt.delivered.status].includes(ae))}].filter(({visible:Ue})=>Ue),[M,Q,fe,X,De,ge,$,de,ae,Fe]),Ke=Ue=>{N(Ue.currentTarget)},Qe=()=>{N(null)};return[Bt.canceled.status,Bt.pending_online_payment.status].includes(ae)?null:ae===Bt.closed.status?u.createElement(t8t,{orderId:re}):t||ae===Bt.waiting_cancellation_approval.status?null:ae===Bt.canceled.status?u.createElement(u.Fragment,null,u.createElement(zs,null),u.createElement("div",{className:"w-full px-16 py-20 text-center text-16 font-bold"},"O cancelamento está sendo processado, aguarde alguns instantes")):!Ne.length&&!Ve.length?null:u.createElement(u.Fragment,null,u.createElement(zs,null),u.createElement("div",{className:"flex w-full flex-shrink-0 items-center space-x-12 p-12"},Ve.length>0&&u.createElement(u.Fragment,null,u.createElement(Yn,{title:"Mais ações",placement:"top",arrow:!0,classes:{tooltip:"text-14"}},u.createElement(fr,{variant:"outlined",color:"primary",className:"min-w-0 rounded-6 bg-white px-20",onClick:Ke,"data-testid":"more-options-button"},u.createElement(uNt,null))),u.createElement(Zc,{anchorEl:I,open:!!I,onClose:Qe,getContentAnchorEl:null,elevation:0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},classes:{paper:"border-1 border-solid border border-grey-border-dark -mt-8 text-gray-600"}},Ve.map(Ue=>u.createElement(ln,{key:Ue.key,className:"flex items-center space-x-12 py-12 text-16",onClick:()=>{Qe(),Ue.onClick()}},Ue.icon,u.createElement("span",null,Ue.label))))),Ne.map(Ue=>u.createElement(fr,{key:Ue.key,color:"primary",variant:Ue.variant||"outlined",onClick:Ue.onClick,fullWidth:!!Ue.fullWidth,className:"min-w-136",disableElevation:!0},Ue.label)),$.editDiscountsAndFees&&u.createElement(c8t,{open:p,onClose:()=>g(!1)}),$.redeemLoyaltyReward&&M===_p.LOYALTY&&u.createElement(JMt,{open:_,onClose:()=>b(!1)}),$.redeemLoyaltyReward&&M===_p.CASHBACK&&u.createElement(g8t,{open:E,onClose:()=>S(!1)}),u.createElement(JIe,{open:P,onClose:()=>O(!1)}),De&&u.createElement(SIe,{open:f,onClose:()=>h(!1),onSubmit:pe,schedulingData:ce,orderInEdit:e}),u.createElement(ZIe,{order:e,open:c,onClose:()=>d(!1),handleCancel:Pe,mode:"order"}),e.order_type==="delivery"&&W?.length>0&&u.createElement(VK,{open:s,deliveryFee:e.delivery_man_fee??e.delivery_fee??0,deliverymanID:le?.id,orderId:e.id,onClose:()=>{l(!1),Fe(Bt.released.status)}})))}var OE={},upe;function _8t(){if(upe)return OE;upe=1;var e=$t(),t=Wt();Object.defineProperty(OE,"__esModule",{value:!0}),OE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92c-.5.51-.86.97-1.04 1.69-.08.32-.13.68-.13 1.14h-2v-.5c0-.46.08-.9.22-1.31.2-.58.53-1.1.95-1.52l1.24-1.26c.46-.44.68-1.1.55-1.8-.13-.72-.69-1.33-1.39-1.53-1.11-.31-2.14.32-2.47 1.27-.12.37-.43.65-.82.65h-.3C8.4 9 8 8.44 8.16 7.88c.43-1.47 1.68-2.59 3.23-2.83 1.52-.24 2.97.55 3.87 1.8 1.18 1.63.83 3.38-.19 4.4z"}),"HelpRounded");return OE.default=i,OE}var b8t=_8t();const E8t=et(b8t),V4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgEAYAAAAj6qa3AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABgAAAAYADwa0LPAAAAB3RJTUUH5QgOFDYQ1XaW3gAABytJREFUaN7tWWtQlOcVfs63gNwMxgtovIzIWLwtqLsgZFJFa6Z1iKAD1WC9RWRXkVoTWiTNivFCAYlBK1lYg1ZCARtoKyPTIKOiNUEit3F34z1oQ1VABRGEALvf6Y+6Xx2YHVSm2aTl+XnmnPOc57zve7533o/wjFDu0rtqv/X25jfo77KWHTswFEPxblAQBaKWPmVGJGoxq7
323QUCVhnuqTRVDnLJ0e31Nc/a/7+oJj9Vbguc8IEZHMRliYm0gLOJc+FCyUHJ9zioDNnqNz8BuVv3145buY0ldu1a/3lpf4c/L0NxzKzlEoxBHNp/5kzKMNtxLi4WA14H8Mxp6VFPCo+FOJCQ2v+6Ds9qvTcuRcV7vdn/YHML+bO5VphB6mKilDCZdg8bJjVgHjch197OyeJ01E5b151ta+7Wl1TY83drr8CzDVoo5NaLc37t3DeQzq8fuoU7xFvCGkaDTXJXMXpdnb0ATdjW2oq4ng/dgcECEbZVj514oTiij47c3FERGupU2V3T0mJm+rbxUOOJyTgGOXhyooV0koUsz3W5eZ2hAgPX/71zp0uw8RNDxXBweJo/JWT8vIoicuw2dGRy2HGqfJyDuF4wSM2VnZVmMteZjNHs8BOKSlIRjAq58+nVNmb0Hz0ERYAQGDgc+8An9SLsRmvu7s7/ElYK4Q3NsIeXkBPT1c73zCbPTwMBh+f6OiWFot/QP35sR8GODmZfFxfcnE/ehRe+BTBISH8MW1DpdlMLXiEospKS4OsdnwP/Qqaigp+GS8h1M+PongX/GQyTKEUSi8qsktqK2t3iYioGB94+52Kzk5pp/zz8oF0vxEjxHvmU/a+jY2WOBYdvgCPGlVd471BveH+/d50grU6HKbSGl7q6ioZaimcok2mKVOuXBk58tGj3v6Wglya71+6UxQWhlB8TUcPHZIE9BLOIuUDUVHkQKNIplJJiZ74SXG5SAeysjy7LoUM2xYW1lu4Bc5jG2LuXWhthYwngHt6pC1e3aEW1U/peNYGuAQ/kDdu/OYbJFMgApqaMINTWOvkdDNt6t2H5+PirMWdpfm0g0ymqm0zQqNOR0VhCvYjKzGxz9ZzRQ/yfH3FJbxJXDxzZp9EaQikit27q7xnZKpUKlVBwbJly5aZzdZ42w+Nyh1THh9P6xAFf0dH/AOX6e2GhgnLrheMKLA+jKUjoGADZ3BQEIzkIDRFRtJsTMfG0aPxGW5gu48P4vk8Ktzdpcj78Ka4ujrcJn/+SV0d+kM+p0ETEIBkjESl9RWxDDFE0NvYXVHRX1q+CTNcvLxoCefhNU9PyX4Ujjjf2EhT6ed4ZDBwDb5CRkMDgX9K72dlVcnlxaqMs2fJr9RQdvDG0qVcj1J+WFiIDKxAtSD0R/yDxUbkQSGKrMUJVIeFkXKTcZxOp9fjS/4MkMvRhckoPHyY7fkqwkpKBspHW4Tx+J27O37Pt/Feejq24Esou7r4Q/ZD5apVkt87VAm/nBzswxxUDRmCzTQWiTExvE+sx2+bmgYsPE/YjLBFi2glp+Mvb72FrRiBnXo9KWqNS3TrTSZparKdP/DKK9XVUzvV6rt3B8rrv/hi7Mc/8vQU7wprxdi6OszHWKQ/flyVKh+uNvznKCh/Y2jWydvbLfcMYYx4RNg7adKF4757o67dvDnQOhSKy0463ZgxRKYLwJ07lq+TIE3bJ+h5sztaLLQ+bH6o6K3Lovt/96w/I/rcBB3cZH+TDdFolMXG4wcjOjoGSiBe4zn8wM0NeWgEAHwOR8Q4OCiLjccPnklOlhwT2ZGDHBykuPnCVp4YF6dUG4MOKlpbB6z0DuLQ5uwM8Fp+ykzKQEOHTtfdjR58Ddjb/3f7/T3Cq+iAtrvbjvdSPV9dswajUUCaoCCahioatWqV5eKDWVhAusJCfpc28snm5ufloX1cQT8bOhTl2MuRERGopSW0wWTi6/gFPzh8WPKbjFwasW4dZvExzrSzw6uIpUP5+byFArikre25eZM4gxYOH45anGZ1eDiMtJWiOzv5EpR8LyeHElBH6WVlfQKVJ42uuouNjUqlwaDTMStm6zW6TLn8RRtt+QpY8knTvjfvE7vFzxL3oryWuiXeJ7p6+/3fD8HBBti6AFtjsAG2LsDWGGyArQuwNQYbYOsCbI3BBti6AFtjsAG9DTyRa5HG/CLJvs+wpqvPgwgdxnIE3roFIBvw8KBp1IBDy5crd+r1Wu3jx89N3IWzZt9x45AEkBHAAVpJlwRBWazXa7WTJkmO4bSSfikImMEpDIDX0kTzH8aPV6r1eu1F6vcfZh/eW8Jr/OOICBzh5fQ5gOvkg/eePN8feUpv70DFaWNM5s7VqymO1eSRnf1drM53gtHwpA9Wr64qlruqrufkWMx9jkD1ghnpGxI++YR3kT93rl+PTkogjdFoeUW1tY7+INU5hxYBBgOccY4SIyN7C7fgX8bgPTKtBebbAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA4LTE0VDIwOjU0OjE2KzAwOjAwdyplQgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wOC0xNFQyMDo1NDoxNiswMDowMAZ33f4AAAAASUVORK5CYII=";function dpe(e,t){return e.payment_values.filter(r=>!Lm.includes(r.status)).reduce((r,n)=>r+(parseFloat(n[t])||0),0)}function w8t({order:e}){const t=UK(e.benefits),r=ex(e.benefits),n=p6t(e.benefits),i=e.sales_channel==="ifood",a=i&&zIe(e.benefits);if(!e)return null;const o=e.order_items?.filter(s=>s.status!=="canceled"||s.cancellation_reason==="Pedido cancelado")?.reduce((s,l)=>s+l.price,0);return u.createElement("div",{className:"w-full space-y-16 px-12 pb-12 pt-4 text-16 sm:px-16 sm:pb-16 sm:pt-4"},u.createElement("div",{className:"space-y-8"},u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Subtotal"),u.createElement("span",null,me.formatMonetaryValue(o))),e.order_type==="delivery"&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Taxa de entrega"),e.delivery_info_only_by_whatsapp?u.createElement("span",null,"Definir pelo whatsapp"):u.createElement("span",null,"+ "+me.formatMonetaryValue(e.delivery_fee))),e.service_fee>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Taxa de serviço"),u.createElement("span",null,"+ "+me.formatMonetaryValue(e.service_fee))),e.additional_fee>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Taxa adicional"),u.createElement("span",null,"+ "+me.formatMonetaryValue(e.additional_fee))),dpe(e,"payment_fee")>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Acréscimo da maquineta"),u.createElement("span",null,"+ "+me.formatMonetaryValue(dpe(e,"payment_fee")))),i&&a?.ifood>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Desconto (iFood)"),u.createElement("span",null,"- "+me.formatMonetaryValue(a.ifood))),i&&a?.merchant>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Desconto (Loja)"),u.createElement("span",null,"- "+me.formatMonetaryValue(a.merchant))),!i&&r>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Descontos"),u.createElement("span",null,"- "+me.formatMonetaryValue(r))),!i&&t?.value>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("div",{className:"inline-flex items-center space-x-8"},u.createElement("span",null,"Prêmios"),u.createElement("img",{src:V4,alt:"",className:"h-16 w-16"}),u.createElement("span",null,`(${t.total_points} pontos)`)),u.createElement("span",null,"- "+me.formatMonetaryValue(t.value))),n>0&&u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement("span",null,"Cashback"),u.createElement("span",null,"- "+me.formatMonetaryValue(n))),u.createElement("div",{className:"flex w-full items-center justify-between text-18 font-bold"},u.createElement("span",null,"Total"),u.createElement("span",null,me.formatMonetaryValue(e.final_value)))),e.earned_points&&e.status!=="c
323anceled"?u.createElement("div",{className:"flex w-full items-center justify-between text-green"},u.createElement("span",{className:"inline-flex items-center space-x-8"},u.createElement("span",null,"Pontos ganhos nesse pedido"),u.createElement(Yn,{title:"Calculado com base no Subtotal - Descontos",placement:"top",classes:{tooltip:"text-14"},enterTouchDelay:20,arrow:!0},u.createElement(E8t,{className:"text-18 text-green"}))),u.createElement("span",null,e.earned_points)):null,e.earned_cashback!==null&&e.status==="closed"?u.createElement("div",{className:"flex w-full items-center justify-between text-green"},u.createElement("span",{className:"inline-flex items-center space-x-8"},u.createElement("span",null,"Cashback ganho nesse pedido")),u.createElement("span",null,me.formatMonetaryValue(e.earned_cashback))):null,e.benefits?.filter(({category:s})=>s==="coupon").map(({coupon_id:s,coupon_name:l})=>u.createElement("div",{key:s},"Cliente usou o cupom ",u.createElement("strong",null,l))))}var IE={},fpe;function S8t(){if(fpe)return IE;fpe=1;var e=$t(),t=Wt();Object.defineProperty(IE,"__esModule",{value:!0}),IE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");return IE.default=i,IE}var C8t=S8t();const X1=et(C8t);var kE={},hpe;function x8t(){if(hpe)return kE;hpe=1;var e=$t(),t=Wt();Object.defineProperty(kE,"__esModule",{value:!0}),kE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M16.75 13.96c.25.13.41.2.46.3.06.11.04.61-.21 1.18-.2.56-1.24 1.1-1.7 1.12-.46.02-.47.36-2.96-.73-2.49-1.09-3.99-3.75-4.11-3.92-.12-.17-.96-1.38-.92-2.61.05-1.22.69-1.8.95-2.04.24-.26.51-.29.68-.26h.47c.15 0 .36-.06.55.45l.69 1.87c.06.13.1.28.01.44l-.27.41-.39.42c-.12.12-.26.25-.12.5.12.26.62 1.09 1.32 1.78.91.88 1.71 1.17 1.95 1.3.24.14.39.12.54-.04l.81-.94c.19-.25.35-.19.58-.11l1.67.88M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10c-1.97 0-3.8-.57-5.35-1.55L2 22l1.55-4.65A9.969 9.969 0 0 1 2 12 10 10 0 0 1 12 2m0 2a8 8 0 0 0-8 8c0 1.72.54 3.31 1.46 4.61L4.5 19.5l2.89-.96A7.95 7.95 0 0 0 12 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8z"}),"WhatsApp");return kE.default=i,kE}var T8t=x8t();const q4=et(T8t);var NE={},JF,ppe;function A8t(){return ppe||(ppe=1,JF=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),JF}var eB,mpe;function P8t(){if(mpe)return eB;mpe=1;var e=A8t(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,o)}function i(a,o){var s,l,c,d,f,h,p=!1;o||(o={}),s=o.debug||!1;try{c=e(),d=document.createRange(),f=document.getSelection(),h=document.createElement("span"),h.textContent=a,h.ariaHidden="true",h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",function(_){if(_.stopPropagation(),o.format)if(_.preventDefault(),typeof _.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var b=t[o.format]||t.default;window.clipboardData.setData(b,a)}else _.clipboardData.clearData(),_.clipboardData.setData(o.format,a);o.onCopy&&(_.preventDefault(),o.onCopy(_.clipboardData))}),document.body.appendChild(h),d.selectNodeContents(h),f.addRange(d);var g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");p=!0}catch(_){s&&console.error("unable to copy using execCommand: ",_),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(o.format||"text",a),o.onCopy&&o.onCopy(window.clipboardData),p=!0}catch(b){s&&console.error("unable to copy using clipboardData: ",b),s&&console.error("falling back to prompt"),l=n("message"in o?o.message:r),window.prompt(l,a)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(d):f.removeAllRanges()),h&&document.body.removeChild(h),c()}return p}return eB=i,eB}var vpe;function R8t(){if(vpe)return NE;vpe=1,Object.defineProperty(NE,"__esModule",{value:!0}),NE.CopyToClipboard=void 0;
323var e=n(P8t()),t=n(Dt()),r=["text","onCopy","options","children"];function n(M){return M&&M.__esModule?M:{default:M}}function i(M){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},i(M)}function a(M,F){var B=Object.keys(M);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(M);F&&(V=V.filter(function(W){return Object.getOwnPropertyDescriptor(M,W).enumerable})),B.push.apply(B,V)}return B}function o(M){for(var F=1;F<arguments.length;F++){var B=arguments[F]!=null?arguments[F]:{};F%2?a(Object(B),!0).forEach(function(V){P(M,V,B[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(B)):a(Object(B)).forEach(function(V){Object.defineProperty(M,V,Object.getOwnPropertyDescriptor(B,V))})}return M}function s(M,F){if(M==null)return{};var B,V,W=l(M,F);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(M);for(V=0;V<$.length;V++)B=$[V],F.indexOf(B)===-1&&{}.propertyIsEnumerable.call(M,B)&&(W[B]=M[B])}return W}function l(M,F){if(M==null)return{};var B={};for(var V in M)if({}.hasOwnProperty.call(M,V)){if(F.indexOf(V)!==-1)continue;B[V]=M[V]}return B}function c(M,F){if(!(M instanceof F))throw new TypeError("Cannot call a class as a function")}function d(M,F){for(var B=0;B<F.length;B++){var V=F[B];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(M,O(V.key),V)}}function f(M,F,B){return F&&d(M.prototype,F),Object.defineProperty(M,"prototype",{writable:!1}),M}function h(M,F,B){return F=b(F),p(M,_()?Reflect.construct(F,B||[],b(M).constructor):F.apply(M,B))}function p(M,F){if(F&&(i(F)=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(M)}function g(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function _(){try{var M=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_=function(){return!!M})()}function b(M){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},b(M)}function E(M,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(F&&F.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),Object.defineProperty(M,"prototype",{writable:!1}),F&&S(M,F)}function S(M,F){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,V){return B.__proto__=V,B},S(M,F)}function P(M,F,B){return(F=O(F))in M?Object.defineProperty(M,F,{value:B,enumerable:!0,configurable:!0,writable:!0}):M[F]=B,M}function O(M){var F=I(M,"string");return i(F)=="symbol"?F:F+""}function I(M,F){if(i(M)!="object"||!M)return M;var B=M[Symbol.toPrimitive];if(B!==void 0){var V=B.call(M,F);if(i(V)!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(M)}var N=NE.CopyToClipboard=(function(M){function F(){var B;c(this,F);for(var V=arguments.length,W=new Array(V),$=0;$<V;$++)W[$]=arguments[$];return B=h(this,F,[].concat(W)),P(B,"onClick",function(X){var re=B.props,ae=re.text,Q=re.onCopy,ie=re.children,le=re.options,fe=t.default.Children.only(ie),de=(0,e.default)(ae,le);Q&&Q(ae,de),fe!=null&&fe.props&&typeof fe.props.onClick=="function"&&fe.props.onClick(X)}),B}return E(F,M),f(F,[{key:"render",value:function(){var V=this.props;V.text,V.onCopy,V.options;var W=V.children,$=s(V,r),X=t.default.Children.only(W);return t.default.cloneElement(X,o(o({},$),{},{onClick:this.onClick}))}}])})(t.default.PureComponent);return P(N,"defaultProps",{onCopy:void 0,options:void 0}),NE}var tB,gpe;function O8t(){if(gpe)return tB;gpe=1;var e=R8t(),t=e.CopyToClipboard;return t.CopyToClipboard=t,tB=t,tB}var GK=O8t();const I8t=et(GK);function cd({text:e,children:t,placement:r="top"}){const n=Lr();return u.createElement(I8t,{text:e,classes:{tooltip:"text-14"},onCopy:()=>n.success("Copiado para área de transferência!")},u.createElement(Yn,{title:"Copiar",placement:r,arrow:!0},u.createElement("span",{className:"cursor-pointer"},t||e)))}
323function Fm({title:e,subtitle:t,Icon:r,Action:n,className:i}){return u.createElement("div",{className:Ft("flex items-center space-x-16",i)},u.createElement(r,null),u.createElement("div",{className:"flex-1"},u.createElement("div",{className:"text-18 font-bold"},e),u.createElement("div",null,t)),n)}const k8t={name:"Cliente não identificado",telephone:null,ddi:"55",created_by_system:!0};function N8t({client:e}){const{hasModule:t}=Ah(),{order:r,orderPermissions:n}=gi(),[i,a]=u.useState(!1),o=e||k8t,s=o.telephone?.replace(/\D/g,"");return u.createElement("div",{className:"flex flex-shrink-0 flex-col p-16"},u.createElement(Fm,{title:"Cliente",Icon:hm,Action:u.createElement("div",{className:"space-x-12"},t(At.CLIENT_MANAGEMENT_MODULE)&&!o.created_by_system&&u.createElement(jbe,{to:o.id?`/clientes/${o.id}`:void 0},u.createElement(Ma,{tooltip:"Ver perfil do cliente",padding:"p-4",tooltipProps:{placement:"top-end"}},u.createElement(X1,null))),n.editClient&&u.createElement(Ma,{tooltip:"Editar cliente",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>a(!0)},u.createElement(ps,null))),className:"mb-16"}),u.createElement("div",{className:"text-16"},u.createElement("div",{className:"grid grid-cols-1 gap-8 sm:grid-cols-2"},u.createElement("div",null,u.createElement(cd,{text:o.name},u.createElement("span",{className:"truncade font-semibold"},o.name)),o.telephone&&o.telephone.match(/\d+/g)&&u.createElement("div",{className:"flex items-center font-light leading-relaxed"},o.telephone_verified&&u.createElement(Yn,{title:"Telefone verificado",className:"mr-8"},u.createElement(BG,{className:"text-20 text-green"})),u.createElement(cd,{text:o.telephone},zd(o.telephone,o.ddi)),YC(o.telephone,o.ddi)&&u.createElement("a",{href:`https://${me.isMobile()?"api":"web"}.whatsapp.com/send?phone=${o.ddi||"55"}${s}`,target:"_blank",rel:"noopener noreferrer"},u.createElement(cr,{size:"small",className:"ml-12"},u.createElement(q4,null))))),!o.created_by_system&&u.createElement("div",{className:"font-light sm:text-right",title:`Cliente desde ${qe(o.created_at).format("DD/MM/YYYY")}`},o.orders_count>1?`Cliente ${qe(o.created_at).fromNow()}`:"Novo Cliente",u.createElement("br",null),o.orders_count===1?`${o.orders_count} pedido`:`${o.orders_count} pedidos`)),o.internal_observation&&u.createElement("div",{className:"line-clamp-2 hover:line-clamp-none mt-8 font-light"},u.createElement("span",{className:"font-semibold"},"Anotações: "),o.internal_observation),n.editClient&&u.createElement(n3e,{open:i,onClose:()=>a(!1),orderId:r?.id,client:o})))}const D8t=u.memo(N8t);var DE={},ype;function M8t(){if(ype)return DE;ype=1;var e=$t(),t=Wt();Object.defineProperty(DE,"__esModule",{value:!0}),DE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M13 10H3c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zm0-4H3c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zM3 16h6c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1s.45 1 1 1zm19.21-3.79l.09.09c.39.39.39 1.02 0 1.41l-5.58 5.59c-.39.39-1.02.39-1.41 0l-3.09-3.09a.9959.9959 0 010-1.41l.09-.09c.39-.39 1.02-.39 1.41 0l2.3 2.3 4.78-4.79c.38-.4 1.02-.4 1.41-.01z"}),"PlaylistAddCheckRounded");return DE.default=i,DE}var L8t=M8t();const KK=et(L8t);var i3e=x.createContext(null),F8t=function(t){var r=t.utils,n=t.children,i=t.locale,a=t.libInstance,o=x.useMemo(function(){return new r({locale:i,instance:a})},[r,a,i]);return x.createElement(i3e.Provider,{value:o,children:n})},B8t=function(t){if(!t)throw new Error("Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports.  Recommendation: use named imports from the module index.")};function Vu(){var e=x.useContext(i3e);return B8t(e),e}function a3e(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=a3e(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Us(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=a3e(e))&&(n&&(n+=" "),n+=t);return n}function DV(e,t){return Array.isArray(t)?t.every(function(r){return e.indexOf(r)!==-1}):e.indexOf(t)!==-1}var YK=310,o3e=325,z8t=305,H8t=Fl(function(e){return{staticWrapperRoot:{overflow:"hidden",minWidth:YK,display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper}}},{name:"MuiPickersStaticWrapper"}),U8t=function(t){var r=t.children,n=H8t();return x.createElement("div",{className:n.staticWrapperRoot,children:r})},s3e=function(t){var r=t.children,n=t.classes,i=t.onAccept,a=t.onDismiss,o=t.onClear,s=t.onSetToday,l=t.okLabel,c=t.cancelLabel,d=t.clearLabel,f=t.todayLabel,h=t.clearable,p=t.showTodayButton;t.showTabs;var g=t.wider,_=Mt(t,["children","classes","onAccept","onDismiss","onClear","onSetToday","okLabel","cancelLabel","clearLabel","todayLabel","clearable","showTodayButton","showTabs","wider"]);return x.createElement(Eo,ve({role:"dialog",onClose:a,classes:{paper:Us(n.dialogRoot,g&&n.dialogRootWider)}},_),x.createElement(Xc,{children:r,className:n.dialog}),x.createElement(VC,{classes:{root:Us((h||p)&&n.withAdditionalAction)}},h&&x.createElement(fr,{color:"primary",onClick:o},d),p&&x.createElement(fr,{color:"primary",onClick:s},f),c&&x.createElement(fr,{color:"primary",onClick:a},c),l&&x.createElement(fr,{color:"primary",onClick:i},l)))};s3e.displayName="ModalDialog";var V8t=s4({dialogRoot:{minWidth:YK},dialogRootWider:{minWidth:o3e},dialog:{"&:first-child":{padding:0}},withAdditionalAction:{justifyContent:"flex-start","& > *:first-child":{marginRight:"auto"}}}),q8t=yr(V8t,{name:"MuiPickersModal"})(s3e),l3e=typeof window>"u"?x.useEffect:x.useLayoutEffect;function c3e(e,t){var r=t[e.key];r&&(r(),e.preventDefault())}function u3e(e,t){var r=x.useRef(t);r.current=t,l3e(function(){if(e){var n=function(a){c3e(a,r.current)};return window.addEventListener("keydown",n),function(){window.removeEventListener("keydown",n)}}},[e])}var d3e=function(t){var r=t.open,n=t.children,i=t.okLabel,a=t.cancelLabel,o=t.clearLabel,s=t.todayLabel,l=t.showTodayButton,c=t.clearable,d=t.DialogProps,f=t.showTabs,h=t.wider,p=t.InputComponent,g=t.DateInputProps,_=t.onClear,b=t.onAccept,E=t.onDismiss,S=t.onSetToday,P=Mt(t,["open","children","okLabel","cancelLabel","clearLabel","todayLabel","showTodayButton","clearable","DialogProps","
323showTabs","wider","InputComponent","DateInputProps","onClear","onAccept","onDismiss","onSetToday"]);return u3e(r,{Enter:b}),x.createElement(x.Fragment,null,x.createElement(p,ve({},P,g)),x.createElement(q8t,ve({wider:h,showTabs:f,open:r,onClear:_,onAccept:b,onDismiss:E,onSetToday:S,clearLabel:o,todayLabel:s,okLabel:i,cancelLabel:a,clearable:c,showTodayButton:l,children:n},d)))};d3e.defaultProps={okLabel:"OK",cancelLabel:"Cancel",clearLabel:"Clear",todayLabel:"Today",clearable:!1,showTodayButton:!1};var j8t=function(t){var r=t.open;t.wider;var n=t.children,i=t.PopoverProps;t.onClear;var a=t.onDismiss;t.onSetToday;var o=t.onAccept;t.showTabs;var s=t.DateInputProps,l=t.InputComponent,c=Mt(t,["open","wider","children","PopoverProps","onClear","onDismiss","onSetToday","onAccept","showTabs","DateInputProps","InputComponent"]),d=x.useRef();return u3e(r,{Enter:o}),x.createElement(x.Fragment,null,x.createElement(l,ve({},c,s,{inputRef:d})),x.createElement(m4,ve({open:r,onClose:a,anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n},i)))};function $8t(e){switch(e){case"inline":return j8t;case"static":return U8t;default:return d3e}}var XK=x.createContext(null),W8t=function(t){var r=t.variant,n=Mt(t,["variant"]),i=$8t(r);return x.createElement(XK.Provider,{value:r||"dialog"},x.createElement(i,n))},G8t=(function(e){Qo(t,e);function t(n){var i;return i=e.call(this,n)||this,i._state=null,i._del=!1,i._handleChange=function(a){var o=i.state.value,s=a.target.value,l=a.target,c=s.length>o.length,d=i._del,f=o===i.props.format(s);i.setState({value:s,local:!0},function(){var h=l.selectionStart,p=i.props.refuse||/[^\d]+/g,g=s.substr(0,h).replace(p,"");if(i._state={input:l,before:g,op:c,di:d&&f,del:d},i.props.replace&&i.props.replace(o)&&c&&!f){for(var _=-1,b=0;b!==g.length;++b)_=Math.max(_,s.toLowerCase().indexOf(g[b].toLowerCase(),_+1));var E=s.substr(_+1).replace(p,"")[0];_=s.indexOf(E,_+1),s=""+s.substr(0,_)+s.substr(_+1)}var S=i.props.format(s);o===S?i.setState({value:s}):i.props.onChange(S)})},i._hKD=function(a){a.code==="Delete"&&(i._del=!0)},i._hKU=function(a){a.code==="Delete"&&(i._del=!1)},i.state={value:n.value,local:!0},i}t.getDerivedStateFromProps=function(i,a){return{value:a.local?a.value:i.value,local:!1}};var r=t.prototype;return r.render=function(){var i=this._handleChange,a=this.state.value,o=this.props.children;return o({value:a,onChange:i})},r.componentWillUnmount=function(){document.removeEventListener("keydown",this._hKD),document.removeEventListener("keyup",this._hKU)},r.componentDidMount=function(){document.addEventListener("keydown",this._hKD),document.addEventListener("keyup",this._hKU)},r.componentDidUpdate=function(){var i=this._state;if(i){for(var a=this.state.value,o=-1,s=0;s!==i.before.length;++s)o=Math.max(o,a.toLowerCase().indexOf(i.before[s].toLowerCase(),o+1));if(this.props.replace&&(i.op||i.del&&!i.di))for(;a[o+1]&&(this.props.refuse||/[^\d]+/).test(a[o+1]);)o+=1;i.input.selectionStart=i.input.selectionEnd=o+1+(i.di?1:0)}this._state=null},t})(x.Component),K8t=Fl(function(e){return{day:{width:36,height:36,fontSize:e.typography.caption.fontSize,margin:"0 2px",color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium,padding:0},hidden:{opacity:0,pointerEvents:"none"},current:{color:e.palette.primary.main,fontWeight:600},daySelected:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{backgroundColor:e.palette.primary.main}},dayDisabled:{pointerEvents:"none",color:e.palette.text.hint}}},{name:"MuiPickersDay"}),ZK=function(t){var r=t.children,n=t.disabled,i=t.hidden,a=t.current,o=t.selected,s=Mt(t,["children","disabled","hidden","current","selected"]),l=K8t(),c=Us(l.day,i&&l.hidden,a&&l.current,o&&l.daySelected,n&&l.dayDisabled);return x.createElement(cr,ve({className:c,tabIndex:i||n?-1:0},s),x.createElement(fo,{variant:"body2",color:"inherit"},r))};ZK.displayName="Day";ZK.defaultProps={disabled:!1,hidden:!1,current:!1,selected:!1};var Y8t=function(t){var r=t.date,n=t.utils,i=t.minDate,a=t.maxDate,o=t.disableFuture,s=t.disablePast,l=t.shouldDisableDate,c=n.startOfDay(n.date());s&&n.isBefore(i,c)&&(i=c),o&&n.isAfter(a,c)&&(a=c);var d=r,f=r;for(n.isBefore(r,i)&&(d=n.date(i),f=null),n.isAfter(r,a)&&(f&&(f=n.date(a)),d=null);d||f;
323){if(d&&n.isAfter(d,a)&&(d=null),f&&n.isBefore(f,i)&&(f=null),d){if(!l(d))return d;d=n.addDays(d,1)}if(f){if(!l(f))return f;f=n.addDays(f,-1)}}return n.date()},f3e=function(t){return t.length===1&&t[0]==="year"},h3e=function(t){return t.length===2&&DV(t,"month")&&DV(t,"year")},X8t=function(t,r){return f3e(t)?r.yearFormat:h3e(t)?r.yearMonthFormat:r.dateFormat},Z8t=function(t){var r=t.children,n=t.value,i=t.disabled,a=t.onSelect,o=t.dayInCurrentMonth,s=Mt(t,["children","value","disabled","onSelect","dayInCurrentMonth"]),l=x.useCallback(function(){return a(n)},[a,n]);return x.createElement("div",ve({role:"presentation",onClick:o&&!i?l:void 0,onKeyPress:o&&!i?l:void 0},s),r)},p3e=350,Q8t=Fl(function(e){var t=e.transitions.create("transform",{duration:p3e,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{transitionContainer:{display:"block",position:"relative","& > *":{position:"absolute",top:0,right:0,left:0}},"slideEnter-left":{willChange:"transform",transform:"translate(100%)"},"slideEnter-right":{willChange:"transform",transform:"translate(-100%)"},slideEnterActive:{transform:"translate(0%)",transition:t},slideExit:{transform:"translate(0%)"},"slideExitActiveLeft-left":{willChange:"transform",transform:"translate(-200%)",transition:t},"slideExitActiveLeft-right":{willChange:"transform",transform:"translate(200%)",transition:t}}},{name:"MuiPickersSlideTransition"}),m3e=function(t){var r=t.children,n=t.transKey,i=t.slideDirection,a=t.className,o=a===void 0?null:a,s=Q8t(),l={exit:s.slideExit,enterActive:s.slideEnterActive,enter:s["slideEnter-"+i],exitActive:s["slideExitActiveLeft-"+i]};return x.createElement(d4,{className:Us(s.transitionContainer,o),childFactory:function(d){return x.cloneElement(d,{classNames:l})}},x.createElement(EG,{mountOnEnter:!0,unmountOnExit:!0,key:n+i,timeout:p3e,classNames:l,children:r}))},J8t=function(t){return u.createElement(HC,t,u.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))},e9t=function(t){return u.createElement(HC,t,u.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))},t9t=Fl(function(e){return{switchHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:e.spacing(.5),marginBottom:e.spacing(1)},transitionContainer:{width:"100%",overflow:"hidden",height:23},iconButton:{zIndex:1,backgroundColor:e.palette.background.paper},daysHeader:{display:"flex",justifyContent:"center",alignItems:"center",maxHeight:16},dayLabel:{width:36,margin:"0 2px",textAlign:"center",color:e.palette.text.hint}}},{name:"MuiPickersCalendarHeader"}),QK=function(t){var r=t.currentMonth,n=t.onMonthChange,i=t.leftArrowIcon,a=t.rightArrowIcon,o=t.leftArrowButtonProps,s=t.rightArrowButtonProps,l=t.disablePrevMonth,c=t.disableNextMonth,d=t.slideDirection,f=Vu(),h=t9t(),p=ts(),g=p.direction==="rtl",_=function(){return n(f.getNextMonth(r),"left")},b=function(){return n(f.getPreviousMonth(r),"right")};return x.createElement("div",null,x.createElement("div",{className:h.switchHeader},x.createElement(cr,ve({},o,{disabled:l,onClick:b,className:h.iconButton}),g?a:i),x.createElement(m3e,{slideDirection:d,transKey:r.toString(),className:h.transitionContainer},x.createElement(fo,{align:"center",variant:"body1"},f.getCalendarHeaderText(r))),x.createElement(cr,ve({},s,{disabled:c,onClick:_,className:h.iconButton}),g?i:a)),x.createElement("div",{className:h.daysHeader},f.getWeekdays().map(function(E,S){return x.createElement(fo,{key:S,variant:"caption",className:h.dayLabel},E)})))};QK.displayName="CalendarHeader";QK.defaultProps={leftArrowIcon:x.createElement(J8t,null),rightArrowIcon:x.createElement(e9t,null),disablePrevMonth:!1,disableNextMonth:!1};var r9t=function(){return function(t){var r=function(i){var a=Vu();return x.createElement(t,ve({utils:a},i))};return r.displayName="WithUtils(".concat(t.displayName||t.name,")"),r}},n9t=function(t){var r=t.onKeyDown;return x.useEffect(function(){return window.addEventListener("keydown",r),function(){window.removeEventListener("keydown",r)}},[r]),null},JK=(function(e){ri(t,e);function t(){var r,n;Hn(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=g4(this,(r=zg(t)).call.apply(r,[this].concat(a))),n.state={slideDirection:"left",currentMonth:n.props.utils.startOfMonth(n.props.date),loadingQueue:0},n.pushToLoadingQueue=function(){var s=n.state.loadingQueue+1;n.setState({loadingQueue:s})},n.popFromLoadingQueue=function(){var s=n.state.loadingQueue;s=s<=0?0:s-1,n.setState({loadingQueue:s})},n.handleChangeMonth=function(s,l){if(n.setState({currentMonth:s,slideDirection:l}),n.props.onMonthChange){var c=n.props.onMonthChange(s);c&&(n.pushToLoadingQueue(),c.then(function(){n.popFromLoadingQueue()}))}},n.validateMinMaxDate=function(s){var l=n.props,c=l.minDate,d=l.maxDate,f=l.utils,h=l.disableFuture,p=l.disablePast,g=f.date();return!!(h&&f.isAfterDay(s,g)||p&&f.isBeforeDay(s,g)||c&&f.isBeforeDay(s,f.date(c))||d&&f.isAfterDay(s,f.date(d)))},n.shouldDisablePrevMonth=function(){var s=n.props,l=s.utils,c=s.disablePast,d=s.minDate,f=l.date(),h=l.startOfMonth(c&&l.isAfter(f,l.date(d))?f:l.date(d));return!l.isBefore(h,n.state.currentMonth)},n.shouldDisableNextMonth=function(){var s=n.props,l=s.utils,c=s.disableFuture,d=s.maxDate,f=l.date(),h=l.startOfMonth(c&&l.isBefore(f,l.date(d))?f:l.date(d));return!l.isAfter(h,n.state.currentMonth)},n.shouldDisableDate=function(s){var l=n.props.shouldDisableDate;return n.validateMinMaxDate(s)||!!(l&&l(s))},n.handleDaySelect=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=n.props,d=c.date,f=c.utils;n.props.onChange(f.mergeDateAndTime(s,d),l)},n.moveToDay=function(s){var l=n.props.utils;s&&!n.shouldDisableDate(s)&&(l.getMonth(s)!==l.getMonth(n.state.currentMonth)&&n.handleChangeMonth(l.startOfMonth(s),"left"),n.handleDaySelect(s,!1))},n.handleKeyDown=function(s){var l=n.props,c=l.theme,d=l.date,f=l.utils;c3e(s,{ArrowUp:function(){return n.moveToDay(f.addDays(d,-7))},ArrowDown:function(){return n.moveToDay(f.addDays(d,7))},ArrowLeft:function(){return n.moveToDay(f.addDays(d,c.direction==="ltr"?-1:1))},ArrowRight:function(){return n.moveToDay(f.addDays(d,c.direction==="ltr"?1:-1))}})},n.renderWeeks=function(){var s=n.props,l=s.utils,c=s.classes,d=l.getWeekArray(n.state.currentMonth);return d.map(function(f){return x.createElement("div",{key:"week-".concat(f[0].toString()),className:c.week},n.renderDays(f))})},n.renderDays=function(s){var l=n.props,c=l.date,d=l.renderDay,f=l.utils,h=f.date(),p=f.startOfDay(c),g=f.getMonth(n.state.currentMonth);return s.map(function(_){var b=n.shouldDisableDate(_),E=f.getMonth(_)===g,S=x.createElement(ZK,{disabled:b,current:f.isSameDay(_,h),hidden:!E,selected:f.isSameDay(p,_)},f.getDayText(_));return d&&(S=d(_,p,E,S)),x.createElement(Z8t,{value:_,key:_.toString(),disabled:b,dayInCurrentMonth:E,onSelect:n.handleDaySelect},S)})},n}
323return kn(t,[{key:"componentDidMount",value:function(){var n=this.props,i=n.date,a=n.minDate,o=n.maxDate,s=n.utils,l=n.disablePast,c=n.disableFuture;if(this.shouldDisableDate(i)){var d=Y8t({date:i,utils:s,minDate:s.date(a),maxDate:s.date(o),disablePast:!!l,disableFuture:!!c,shouldDisableDate:this.shouldDisableDate});this.handleDaySelect(d,!1)}}},{key:"render",value:function(){var n=this.state,i=n.currentMonth,a=n.slideDirection,o=this.props,s=o.classes,l=o.allowKeyboardControl,c=o.leftArrowButtonProps,d=o.leftArrowIcon,f=o.rightArrowButtonProps,h=o.rightArrowIcon,p=o.loadingIndicator,g=p||x.createElement(ai,null);return x.createElement(x.Fragment,null,l&&this.context!=="static"&&x.createElement(n9t,{onKeyDown:this.handleKeyDown}),x.createElement(QK,{currentMonth:i,slideDirection:a,onMonthChange:this.handleChangeMonth,leftArrowIcon:d,leftArrowButtonProps:c,rightArrowIcon:h,rightArrowButtonProps:f,disablePrevMonth:this.shouldDisablePrevMonth(),disableNextMonth:this.shouldDisableNextMonth()}),x.createElement(m3e,{slideDirection:a,transKey:i.toString(),className:s.transitionContainer},x.createElement(x.Fragment,null,this.state.loadingQueue>0&&x.createElement("div",{className:s.progressContainer},g)||x.createElement("div",null,this.renderWeeks()))))}}],[{key:"getDerivedStateFromProps",value:function(n,i){var a=n.utils,o=n.date;if(!a.isEqual(o,i.lastDate)){var s=a.getMonth(o),l=i.lastDate||o,c=a.getMonth(l);return{lastDate:o,currentMonth:n.utils.startOfMonth(o),slideDirection:s===c?i.slideDirection:a.isAfterDay(o,l)?"left":"right"}}return null}}]),t})(x.Component);JK.contextType=XK;JK.defaultProps={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),disablePast:!1,disableFuture:!1,allowKeyboardControl:!0};var i9t=function(t){return{transitionContainer:{minHeight:216,marginTop:t.spacing(1.5)},progressContainer:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},week:{display:"flex",justifyContent:"center"}}},v3e=yr(i9t,{name:"MuiPickersCalendar",withTheme:!0})(r9t()(JK)),MV;(function(e){e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds"})(MV||(MV={}));var Bf=MV,g3e=(function(e){ri(t,e);function t(){var r,n;Hn(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=g4(this,(r=zg(t)).call.apply(r,[this].concat(a))),n.state={toAnimateTransform:!1,previousType:void 0},n.getAngleStyle=function(){var s=n.props,l=s.value,c=s.isInner,d=s.type,f=d===Bf.HOURS?12:60,h=360/f*l;return d===Bf.HOURS&&l>12&&(h-=360),{height:c?"26%":"40%",transform:"rotateZ(".concat(h,"deg)")}},n}return kn(t,[{key:"render",value:function(){var n=this.props,i=n.classes,a=n.hasSelected;return x.createElement("div",{style:this.getAngleStyle(),className:Us(i.pointer,this.state.toAnimateTransform&&i.animateTransform)},x.createElement("div",{className:Us(i.thumb,a&&i.noPoint)}))}}]),t})(x.Component);g3e.getDerivedStateFromProps=function(e,t){return e.type!==t.previousType?{toAnimateTransform:!0,previousType:e.type}:{toAnimateTransform:!1,previousType:e.type}};var a9t=function(t){return s4({pointer:{width:2,backgroundColor:t.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},animateTransform:{transition:t.transitions.create(["transform","height"])},thumb:{width:4,height:4,backgroundColor:t.palette.primary.contrastText,borderRadius:"100%",position:"absolute",top:-21,left:-15,border:"14px solid ".concat(t.palette.primary.main),boxSizing:"content-box"},noPoint:{backgroundColor:t.palette.primary.main}})},o9t=yr(a9t,{name:"MuiPickersClockPointer"})(g3e),nx={x:260/2,y:260/2},y3e={x:nx.x,y:0},s9t=y3e.x-nx.x,l9t=y3e.y-nx.y,c9t=function(t){return t*57.29577951308232},_3e=function(t,r,n){var i=r-nx.x,a=n-nx.y,o=Math.atan2(s9t,l9t)-Math.atan2(i,a),s=c9t(o);s=Math.round(s/t)*t,s%=360;var l=Math.floor(s/t)||0,c=Math.pow(i,2)+Math.pow(a,2),d=Math.sqrt(c);return{value:l,distance:d}},u9t=function(t,r,n){var i=_3e(30,t,r),a=i.value,o=i.distance;return a=a||12,n?a%=12:o<90&&(a+=12,a%=24),a},d9t=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=n*6,a=_3e(i,t,r),o=a.value;return o=o*n%60,o},f9t=function(t,r){return r.getHours(t)>=12?"pm":"am"},h9t=function(t,r,n,i){if(n){var a=i.getHours(t)>=12?"pm":"am";if(a!==r){var o=r==="am"?i.getHours(t)-12:i.getHours(t)+12;return i.setHours(t,o)}}return t},b3e=(function(e){ri(t,e);function t(){var r,n;Hn(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=g4(this,(r=zg(t)).call.apply(r,[this].concat(a))),n.isMoving=!1,n.handleTouchMove=function(s){n.isMoving=!0,n.setTime(s)},n.handleTouchEnd=function(s){n.isMoving&&(n.setTime(s,!0),n.isMoving=!1)},n.handleMove=function(s){s.preventDefault(),s.stopPropagation();var l=typeof s.buttons>"u"?s.nativeEvent.which===1:s.buttons===1;l&&n.setTime(s.nativeEvent,!1)},n.handleMouseUp=function(s){n.isMoving&&(n.isMoving=!1),n.setTime(s.nativeEvent,!0)},n.hasSelected=function(){var s=n.props,l=s.type,c=s.value;return l===Bf.HOURS?!0:c%5===0},n}return kn(t,[{key:"setTime",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=n.offsetX,o=n.offsetY;if(typeof a>"u"){var s=n.target.getBoundingClientRect();a=n.changedTouches[0].clientX-s.left,o=n.changedTouches[0].clientY-s.top}var l=this.props.type===Bf.SECONDS||this.props.type===Bf.MINUTES?d9t(a,o,this.props.minutesStep):u9t(a,o,!!this.props.ampm);this.props.onChange(l,i)}},{key:"render",value:function(){var n=this.props,i=n.classes,a=n.value,o=n.children,s=n.type,l=n.ampm,c=!l&&s===Bf.HOURS&&(a<1||a>12);return x.createElement("div",{className:i.container},x.createElement("div",{className:i.clock}
323,x.createElement("div",{role:"menu",tabIndex:-1,className:i.squareMask,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onMouseUp:this.handleMouseUp,onMouseMove:this.handleMove}),x.createElement("div",{className:i.pin}),x.createElement(o9t,{type:s,value:a,isInner:c,hasSelected:this.hasSelected()}),o))}}]),t})(x.Component);b3e.defaultProps={ampm:!1,minutesStep:1};var p9t=function(t){return s4({container:{display:"flex",justifyContent:"center",alignItems:"flex-end",margin:"".concat(t.spacing(2),"px 0 ").concat(t.spacing(1),"px")},clock:{backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:260,width:260,position:"relative",pointerEvents:"none"},squareMask:{width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:"none",touchActions:"none",userSelect:"none","&:active":{cursor:"move"}},pin:{width:6,height:6,borderRadius:"50%",backgroundColor:t.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})},m9t=yr(p9t,{name:"MuiPickersClock"})(b3e),v9t={0:[0,40],1:[55,19.6],2:[94.4,59.5],3:[109,114],4:[94.4,168.5],5:[54.5,208.4],6:[0,223],7:[-54.5,208.4],8:[-94.4,168.5],9:[-109,114],10:[-94.4,59.5],11:[-54.5,19.6],12:[0,5],13:[36.9,49.9],14:[64,77],15:[74,114],16:[64,151],17:[37,178],18:[0,188],19:[-37,178],20:[-64,151],21:[-74,114],22:[-64,77],23:[-37,50]},g9t=Fl(function(e){var t=e.spacing(4);return{clockNumber:{width:t,height:32,userSelect:"none",position:"absolute",left:"calc((100% - ".concat(typeof t=="number"?"".concat(t,"px"):t,") / 2)"),display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:e.palette.type==="light"?e.palette.text.primary:e.palette.text.hint},clockNumberSelected:{color:e.palette.primary.contrastText}}},{name:"MuiPickersClockNumber"}),ec=function(t){var r=t.selected,n=t.label,i=t.index,a=t.isInner,o=g9t(),s=Us(o.clockNumber,r&&o.clockNumberSelected),l=x.useMemo(function(){var c=v9t[i];return{transform:"translate(".concat(c[0],"px, ").concat(c[1],"px")}},[i]);return x.createElement(fo,{component:"span",className:s,variant:a?"body2":"body1",style:l,children:n})},y9t=function(t){for(var r=t.ampm,n=t.utils,i=t.date,a=n.getHours(i),o=[],s=r?1:0,l=r?12:23,c=function(g){return r?g===12?a===12||a===0:a===g||a-12===g:a===g},d=s;d<=l;d+=1){var f=d.toString();d===0&&(f="00");var h={index:d,label:n.formatNumber(f),selected:c(d),isInner:!r&&(d===0||d>12)};o.push(x.createElement(ec,ve({key:d},h)))}return o},_pe=function(t){var r=t.value,n=t.utils,i=n.formatNumber;return[x.createElement(ec,{label:i("00"),selected:r===0,index:12,key:12}),x.createElement(ec,{label:i("05"),selected:r===5,index:1,key:1}),x.createElement(ec,{label:i("10"),selected:r===10,index:2,key:2}),x.createElement(ec,{label:i("15"),selected:r===15,index:3,key:3}),x.createElement(ec,{label:i("20"),selected:r===20,index:4,key:4}),x.createElement(ec,{label:i("25"),selected:r===25,index:5,key:5}),x.createElement(ec,{label:i("30"),selected:r===30,index:6,key:6}),x.createElement(ec,{label:i("35"),selected:r===35,index:7,key:7}),x.createElement(ec,{label:i("40"),selected:r===40,index:8,key:8}),x.createElement(ec,{label:i("45"),selected:r===45,index:9,key:9}),x.createElement(ec,{label:i("50"),selected:r===50,index:10,key:10}),x.createElement(ec,{label:i("55"),selected:r===55,index:11,key:11})]},ng=function(t){var r=t.type,n=t.onHourChange,i=t.onMinutesChange,a=t.onSecondsChange,o=t.ampm,s=t.date,l=t.minutesStep,c=Vu(),d=x.useMemo(function(){switch(r){case Bf.HOURS:return{value:c.getHours(s),children:y9t({date:s,utils:c,ampm:!!o}),onChange:function(g,_){var b=f9t(s,c),E=h9t(c.setHours(s,g),b,!!o,c);n(E,_)}};case Bf.MINUTES:var f=c.getMinutes(s);return{value:f,children:_pe({value:f,utils:c}),onChange:function(g,_){var b=c.setMinutes(s,g);i(b,_)}};case Bf.SECONDS:var h=c.getSeconds(s);return{value:h,children:_pe({value:h,utils:c}),onChange:function(g,_){var b=c.setSeconds(s,g);a(b,_)}};default:throw new Error("You must provide the type for TimePickerView")}},[o,s,n,i,a,r,c]);return x.createElement(m9t,ve({type:r,ampm:o,minutesStep:l},d))};ng.displayName="TimePickerView";
323ng.defaultProps={ampm:!0,minutesStep:1};x.memo(ng);function bpe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _9t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bpe(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bpe(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}Av.oneOfType([Av.object,Av.string,Av.number,Av.instanceOf(Date)]);Av.oneOf(["year","month","day"]);var b9t={ampm:!0,invalidDateMessage:"Invalid Time Format"},eY={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),invalidDateMessage:"Invalid Date Format",minDateMessage:"Date should not be before minimal date",maxDateMessage:"Date should not be after maximal date",allowKeyboardControl:!0};_9t({},b9t,{},eY,{showTabs:!0});function E9t(e,t,r){var n=x.useState(t&&DV(e,t)?t:e[0]),i=Zo(n,2),a=i[0],o=i[1],s=x.useCallback(function(l,c){var d=e[e.indexOf(a)+1];if(c&&d){r(l,!1),o(d);return}r(l,!!c)},[r,a,e]);return{handleChangeAndOpenNext:s,openView:a,setOpenView:o}}var w9t=Fl(function(e){return{root:{height:40,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none","&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},yearSelected:{margin:"10px 0",fontWeight:e.typography.fontWeightMedium},yearDisabled:{pointerEvents:"none",color:e.palette.text.hint}}},{name:"MuiPickersYear"}),E3e=function(t){var r=t.onSelect,n=t.forwardedRef,i=t.value,a=t.selected,o=t.disabled,s=t.children,l=Mt(t,["onSelect","forwardedRef","value","selected","disabled","children"]),c=w9t(),d=x.useCallback(function(){return r(i)},[r,i]);return x.createElement(fo,ve({role:"button",component:"div",tabIndex:o?-1:0,onClick:d,onKeyPress:d,color:a?"primary":void 0,variant:a?"h5":"subtitle1",children:s,ref:n,className:Us(c.root,a&&c.yearSelected,o&&c.yearDisabled)},l))};E3e.displayName="Year";var S9t=x.forwardRef(function(e,t){return x.createElement(E3e,ve({},e,{forwardedRef:t}))}),C9t=Fl({container:{height:300,overflowY:"auto"}},{name:"MuiPickersYearSelection"}),w3e=function(t){var r=t.date,n=t.onChange,i=t.onYearChange,a=t.minDate,o=t.maxDate,s=t.disablePast,l=t.disableFuture,c=t.animateYearScrolling,d=Vu(),f=C9t(),h=x.useContext(XK),p=x.useRef(null);x.useEffect(function(){if(p.current&&p.current.scrollIntoView)try{p.current.scrollIntoView({block:h==="static"?"nearest":"center",behavior:c?"smooth":"auto"})}catch{p.current.scrollIntoView()}},[]);var g=d.getYear(r),_=x.useCallback(function(b){var E=d.setYear(r,b);i&&i(E),n(E,!0)},[r,n,i,d]);return x.createElement("div",{className:f.container},d.getYearRange(a,o).map(function(b){var E=d.getYear(b),S=E===g;return x.createElement(S9t,{key:d.getYearText(b),selected:S,value:E,onSelect:_,ref:S?p:void 0,disabled:!!(s&&d.isBeforeYear(b,d.date())||l&&d.isAfterYear(b,d.date()))},d.getYearText(b))}))},x9t=Fl(function(e){return{root:{flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none",height:75,transition:e.transitions.create("font-size",{duration:"100ms"}),"&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},monthSelected:{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium},monthDisabled:{pointerEvents:"none",color:e.palette.text.hint}}},{name:"MuiPickersMonth"}),S3e=function(t){var r=t.selected,n=t.onSelect,i=t.disabled,a=t.value,o=t.children,s=Mt(t,["selected","onSelect","disabled","value","children"]),l=x9t(),c=x.useCallback(function(){n(a)},[n,a]);return x.createElement(fo,ve({role:"button",component:"div",className:Us(l.root,r&&l.monthSelected,i&&l.monthDisabled),tabIndex:i?-1:0,onClick:c,onKeyPress:c,color:r?"primary":void 0,variant:r?"h5":"subtitle1",children:o},s))};S3e.displayName="Month";var T9t=Fl({container:{width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch"}},{name:"MuiPickersMonthSelection"}),C3e=function(t){var r=t.disablePast,n=t.disableFuture,i=t.minDate,a=t.maxDate,o=t.date,
323s=t.onMonthChange,l=t.onChange,c=Vu(),d=T9t(),f=c.getMonth(o),h=function(_){var b=c.date(),E=c.date(i),S=c.date(a),P=c.startOfMonth(r&&c.isAfter(b,E)?b:E),O=c.startOfMonth(n&&c.isBefore(b,S)?b:S),I=c.isBefore(_,P),N=c.isAfter(_,O);return I||N},p=x.useCallback(function(g){var _=c.setMonth(o,g);l(_,!0),s&&s(_)},[o,l,s,c]);return x.createElement("div",{className:d.container},c.getMonthArray(o).map(function(g){var _=c.getMonth(g),b=c.format(g,"MMM");return x.createElement(S3e,{key:b,value:_,selected:_===f,onSelect:p,disabled:h(g)},b)}))},Epe=function(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"};function A9t(e){var t=x.useState(Epe()),r=Zo(t,2),n=r[0],i=r[1],a=x.useCallback(function(){return i(Epe())},[]);l3e(function(){return window.addEventListener("orientationchange",a),function(){return window.removeEventListener("orientationchange",a)}},[a]);var o=e||n;return o==="landscape"}function wpe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function P9t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wpe(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wpe(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var R9t={year:w3e,month:C3e,date:v3e,hours:ng,minutes:ng,seconds:ng},O9t=Fl({container:{display:"flex",flexDirection:"column"},containerLandscape:{flexDirection:"row"},pickerView:{overflowX:"hidden",minHeight:z8t,minWidth:YK,maxWidth:o3e,display:"flex",flexDirection:"column",justifyContent:"center"},pickerViewLandscape:{padding:"0 8px"}},{name:"MuiPickersBasePicker"}),x3e=function(t){var r=t.date,n=t.views,i=t.disableToolbar,a=t.onChange,o=t.openTo,s=t.minDate,l=t.maxDate,c=t.ToolbarComponent,d=t.orientation,f=Mt(t,["date","views","disableToolbar","onChange","openTo","minDate","maxDate","ToolbarComponent","orientation"]),h=Vu(),p=O9t(),g=A9t(d),_=E9t(n,o,a),b=_.openView,E=_.setOpenView,S=_.handleChangeAndOpenNext,P=x.useMemo(function(){return h.date(s)},[s,h]),O=x.useMemo(function(){return h.date(l)},[l,h]);return x.createElement("div",{className:Us(p.container,g&&p.containerLandscape)},!i&&x.createElement(c,ve({},f,{views:n,isLandscape:g,date:r,onChange:a,setOpenView:E,openView:b})),x.createElement("div",{className:Us(p.pickerView,g&&p.pickerViewLandscape)},b==="year"&&x.createElement(w3e,ve({},f,{date:r,onChange:S,minDate:P,maxDate:O})),b==="month"&&x.createElement(C3e,ve({},f,{date:r,onChange:S,minDate:P,maxDate:O})),b==="date"&&x.createElement(v3e,ve({},f,{date:r,onChange:S,minDate:P,maxDate:O})),(b==="hours"||b==="minutes"||b==="seconds")&&x.createElement(ng,ve({},f,{date:r,type:b,onHourChange:S,onMinutesChange:S,onSecondsChange:S}))))};x3e.defaultProps=P9t({},eY,{views:Object.keys(R9t)});var I9t=Fl(function(e){var t=e.palette.type==="light"?e.palette.primary.contrastText:e.palette.getContrastText(e.palette.background.default);return{toolbarTxt:{color:$gt(t,.54)},toolbarBtnSelected:{color:t}}},{name:"MuiPickersToolbarText"}),k9t=function(t){var r=t.selected,n=t.label,i=t.className,a=i===void 0?null:i,o=Mt(t,["selected","label","className"]),s=I9t();return x.createElement(fo,ve({children:n,className:Us(s.toolbarTxt,a,r&&s.toolbarBtnSelected)},o))},T3e=function(t){var r=t.classes,n=t.className,i=n===void 0?null:n,a=t.label,o=t.selected,s=t.variant,l=t.align,c=t.typographyClassName,d=Mt(t,["classes","className","label","selected","variant","align","typographyClassName"]);return x.createElement(fr,ve({variant:"text",className:Us(r.toolbarBtn,i)},d),x.createElement(k9t,{align:l,className:c,variant:s,label:a,selected:o}))};T3e.defaultProps={className:""};var N9t=s4({toolbarBtn:{padding:0,minWidth:"16px",textTransform:"none"}}),rB=yr(N9t,{name:"MuiPickersToolbarButton"})(T3e),D9t=Fl(function(e){return{toolbar:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",height:100,backgroundColor:e.palette.type==="light"?e.palette.primary.main:e.palette.background.default},toolbarLandscape:{height:"auto",maxWidth:150,padding:8,justifyContent:"flex-start"}}},{name:"MuiPickersToolbar"}),M9t=function(t){var r=t.children,n=t.isLandscape,i=t.className,a=i===void 0?null:i,o=Mt(t,["children","isLandscape","className"]),s=D9t();return x.createElement(APe,ve({className:Us(s.toolbar,a,n&&s.toolbarLandscape)},o),r)};function Spe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function L9t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
323t%2?Spe(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Spe(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var A3e=function(t){var r=t.inputValue,n=t.inputVariant,i=t.validationError,a=t.InputProps,o=t.openPicker,s=t.TextFieldComponent,l=s===void 0?Tr:s,c=Mt(t,["inputValue","inputVariant","validationError","InputProps","openPicker","TextFieldComponent"]),d=x.useMemo(function(){return L9t({},a,{readOnly:!0})},[a]);return x.createElement(l,ve({error:!!i,helperText:i},c,{onClick:o,value:r,variant:n,InputProps:d,onKeyDown:function(h){h.keyCode===32&&(h.stopPropagation(),o())}}))};A3e.displayName="PureDateInput";var F9t=function(t){return u.createElement(HC,t,u.createElement("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))},P3e=function(t,r,n,i,a){var o=a.invalidLabel,s=a.emptyLabel,l=a.labelFunc,c=n.date(t);return l?l(i?null:c,o):i?s||"":n.isValid(c)?n.format(c,r):o},Cpe=function(t,r,n){return r?n:t.endOfDay(n)},xpe=function(t,r,n){return r?n:t.startOfDay(n)},B9t=function(t,r,n){var i=n.maxDate,a=n.minDate,o=n.disablePast,s=n.disableFuture,l=n.maxDateMessage,c=n.minDateMessage,d=n.invalidDateMessage,f=n.strictCompareDates,h=r.date(t);return t===null?"":r.isValid(t)?i&&r.isAfter(h,Cpe(r,!!f,r.date(i)))||s&&r.isAfter(h,Cpe(r,!!f,r.date()))?l:a&&r.isBefore(h,xpe(r,!!f,r.date(a)))||o&&r.isBefore(h,xpe(r,!!f,r.date()))?c:"":d};function z9t(e,t){return e.replace(/[a-z]/gi,t)}var H9t=function(t,r,n){return function(i){var a="",o=i.replace(n,"");if(o==="")return o;for(var s=0,l=0;s<t.length;){var c=t[s];if(c===r&&l<o.length){var d=o[l];a+=d,l+=1}else a+=c;s+=1}return a}};function Tpe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function U9t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tpe(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tpe(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var R3e=function(t){var r=t.inputValue,n=t.inputVariant,i=t.validationError,a=t.KeyboardButtonProps,o=t.InputAdornmentProps,s=t.openPicker,l=t.onChange,c=t.InputProps,d=t.mask,f=t.maskChar,h=f===void 0?"_":f,p=t.refuse,g=p===void 0?/[^\d]+/gi:p,_=t.format,b=t.keyboardIcon,E=t.disabled,S=t.rifmFormatter,P=t.TextFieldComponent,O=P===void 0?Tr:P,I=Mt(t,["inputValue","inputVariant","validationError","KeyboardButtonProps","InputAdornmentProps","openPicker","onChange","InputProps","mask","maskChar","refuse","format","keyboardIcon","disabled","rifmFormatter","TextFieldComponent"]),N=d||z9t(_,h),M=x.useMemo(function(){return H9t(N,h,g)},[N,h,g]),F=o&&o.position?o.position:"end",B=function(W){var $=W===""||W===N?null:W;l($)};return x.createElement(G8t,{key:N,value:r,onChange:B,refuse:g,format:S||M},function(V){var W=V.onChange,$=V.value;return x.createElement(O,ve({disabled:E,error:!!i,helperText:i},I,{value:$,onChange:W,variant:n,InputProps:U9t({},c,Nt({},"".concat(F,"Adornment"),x.createElement(Fg,ve({position:F},o),x.createElement(cr,ve({disabled:E},a,{onClick:s}),b))))}))})};R3e.defaultProps={keyboardIcon:x.createElement(F9t,null)};function V9t(e){var t=e.open,r=e.onOpen,n=e.onClose,i=null;if(t==null){var a=x.useState(!1),o=Zo(a,2);t=o[0],i=o[1]}var s=x.useCallback(function(l){return i&&i(l),l?r&&r():n&&n()},[r,n,i]);return{isOpen:t,setIsOpen:s}}var q9t=function(t,r){var n=r.value,i=r.initialFocusedDate,a=x.useRef(t.date()),o=t.date(n||i||a.current);return o&&t.isValid(o)?o:a.current};function j9t(e,t){var r=Vu(),n=q9t(r,e),i=e.format||t.getDefaultFormat();return{date:n,format:i}}function O3e(e,t){var r=e.autoOk,n=e.disabled,i=e.readOnly,a=e.onAccept,o=e.onChange,s=e.onError,l=e.value,c=e.variant,d=Vu(),f=V9t(e),h=f.isOpen,p=f.setIsOpen,g=j9t(e,t),_=g.date,b=g.format,E=x.useState(_),S=Zo(E,2),P=S[0],O=S[1];x.useEffect(function(){!h&&!d.isEqual(P,_)&&O(_)},[_,h,P,d]);var I=x.useCallback(function($){o($),a&&a($),p(!1)},[a,o,p]),N=x.useMemo(function(){return{format:b,open:h,onClear:function(){return I(null)},onAccept:function(){return I(P)},onSetToday:function(){return O(d.date())},onDismiss:function(){p(!1)}}},[I,b,h,P,p,d]),M=x.useMemo(function(){return{date:P,onChange:function(X){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(O(X),re&&r){I(X);return}(c==="inline"||c==="static")&&(o(X),a&&a(X))}}},[I,r,a,o,P,c]),F=B9t(l,d,e);x.useEffect(function(){s&&s(F,l)},[s,F,l]);var B=P3e(_,b,d,l===null,e),V=x.useMemo(function(){return{inputValue:B,val
323idationError:F,openPicker:function(){return!i&&!n&&p(!0)}}},[n,B,i,p,F]),W={pickerProps:M,inputProps:V,wrapperProps:N};return x.useDebugValue(W),W}function Ape(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ppe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ape(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ape(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $9t(e,t,r){try{return t.parse(e,r)}catch{return null}}function W9t(e,t){var r=e.format,n=r===void 0?t.getDefaultFormat():r,i=e.inputValue,a=e.onChange,o=e.value,s=Vu(),l=P3e(o,n,s,o===null,e),c=x.useState(l),d=Zo(c,2),f=d[0],h=d[1],p=i?$9t(i,s,n):o;x.useEffect(function(){(o===null||s.isValid(o))&&h(l)},[l,h,s,o]);var g=x.useCallback(function(O){a(O,O===null?null:s.format(O,n))},[n,a,s]),_=O3e(Ppe({},e,{value:p,onChange:g}),t),b=_.inputProps,E=_.wrapperProps,S=_.pickerProps,P=x.useMemo(function(){return Ppe({},b,{format:E.format,inputValue:i||f,onChange:function(I){h(I||"");var N=I===null?null:s.parse(I,E.format);a(N,I)}})},[b,f,i,a,s,E.format]);return{inputProps:P,wrapperProps:E,pickerProps:S}}function I3e(e){var t=e.Input,r=e.useState,n=e.useOptions,i=e.getCustomProps,a=e.DefaultToolbarComponent;function o(s){var l=s.allowKeyboardControl,c=s.ampm,d=s.animateYearScrolling;s.autoOk;var f=s.dateRangeIcon,h=s.disableFuture,p=s.disablePast,g=s.disableToolbar;s.emptyLabel,s.format,s.forwardedRef;var _=s.hideTabs;s.initialFocusedDate,s.invalidDateMessage,s.invalidLabel,s.labelFunc;var b=s.leftArrowButtonProps,E=s.leftArrowIcon,S=s.loadingIndicator,P=s.maxDate;s.maxDateMessage;var O=s.minDate;s.minDateMessage;var I=s.minutesStep;s.onAccept,s.onChange,s.onClose;var N=s.onMonthChange;s.onOpen;var M=s.onYearChange,F=s.openTo,B=s.orientation,V=s.renderDay,W=s.rightArrowButtonProps,$=s.rightArrowIcon,X=s.shouldDisableDate,re=s.strictCompareDates,ae=s.timeIcon,Q=s.ToolbarComponent,ie=Q===void 0?a:Q;s.value;var le=s.variant,fe=s.views,de=Mt(s,["allowKeyboardControl","ampm","animateYearScrolling","autoOk","dateRangeIcon","disableFuture","disablePast","disableToolbar","emptyLabel","format","forwardedRef","hideTabs","initialFocusedDate","invalidDateMessage","invalidLabel","labelFunc","leftArrowButtonProps","leftArrowIcon","loadingIndicator","maxDate","maxDateMessage","minDate","minDateMessage","minutesStep","onAccept","onChange","onClose","onMonthChange","onOpen","onYearChange","openTo","orientation","renderDay","rightArrowButtonProps","rightArrowIcon","shouldDisableDate","strictCompareDates","timeIcon","ToolbarComponent","value","variant","views"]),ge=i?i(s):{},Ae=n(s),Fe=r(s,Ae),Pe=Fe.pickerProps,ce=Fe.inputProps,pe=Fe.wrapperProps;return x.createElement(W8t,ve({variant:le,InputComponent:t,DateInputProps:ce},ge,pe,de),x.createElement(x3e,ve({},Pe,{allowKeyboardControl:l,ampm:c,animateYearScrolling:d,dateRangeIcon:f,disableFuture:h,disablePast:p,disableToolbar:g,hideTabs:_,leftArrowButtonProps:b,leftArrowIcon:E,loadingIndicator:S,maxDate:P,minDate:O,minutesStep:I,onMonthChange:N,onYearChange:M,openTo:F,orientation:B,renderDay:V,rightArrowButtonProps:W,rightArrowIcon:$,shouldDisableDate:X,strictCompareDates:re,timeIcon:ae,ToolbarComponent:ie,views:fe})))}return o}var G9t=Fl({toolbar:{flexDirection:"column",alignItems:"flex-start"},toolbarLandscape:{padding:16},dateLandscape:{marginRight:16}},{name:"MuiPickersDatePickerRoot"}),k3e=function(t){var r=t.date,n=t.views,i=t.setOpenView,a=t.isLandscape,o=t.openView,s=Vu(),l=G9t(),c=x.useMemo(function(){return f3e(n)},[n]),d=x.useMemo(function(){return h3e(n)},[n]);return x.createElement(M9t,{isLandscape:a,className:Us(!c&&l.toolbar,a&&l.toolbarLandscape)},x.createElement(rB,{variant:c?"h3":"subtitle1",onClick:function(){return i("year")},selected:o==="year",label:s.getYearText(r)}),!c&&!d&&x.createElement(rB,{variant:"h4",selected:o==="date",onClick:function(){return i("date")},align:a?"left":"center",label:s.getDatePickerHeaderText(r),className:Us(a&&l.dateLandscape)}),d&&x.createElement(rB,{variant:"h4",onClick:function(){return i("month")},selected:o==="month",label:s.getMonthText(r)}))};function Rpe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K9t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
323t%2?Rpe(r,!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rpe(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N3e=K9t({},eY,{openTo:"date",views:["year","date"]});function D3e(e){var t=Vu();return{getDefaultFormat:function(){return X8t(e.views,t)}}}var tY=I3e({useOptions:D3e,Input:A3e,useState:O3e,DefaultToolbarComponent:k3e}),Y9t=I3e({useOptions:D3e,Input:R3e,useState:W9t,DefaultToolbarComponent:k3e});tY.defaultProps=N3e;Y9t.defaultProps=N3e;function X9t({open:e,onClose:t,orderId:r,customFieldsData:n}){const i=Lr(),{mutate:a}=di(),[o,s]=u.useState(!1),l=at(({globalCompany:g})=>g.company.custom_fields),[c,d]=u.useState([]);u.useEffect(()=>{if(e){const g=Oo(l?.map(b=>({...b,options:typeof b.options=="string"?JSON.parse(b.options):b.options})),"id"),_=Oo(n.map(b=>({...b,options:typeof b.options=="string"?JSON.parse(b.options):b.options})),"id");d(Object.values(Pc(g,_))?.sort((b,E)=>b.id-E.id))}},[l,n,e]);const f=(g,_)=>{d(b=>b.map(E=>E.id===_.id?{...E,value:g}:E))},h=(g,_)=>{const b=_.options.find(E=>E.option===g)?.additional_fee;d(E=>E.map(S=>S.id===_.id?{...S,value:g,additional_fee:b}:S))},p=u.useCallback(async g=>{g.preventDefault(),s(!0);try{const _=await aMt(r,c.map(({id:b,value:E})=>({id:b,value:E||""})));a(qn(r),b=>({...b,custom_fields_data:_})),t()}catch(_){i.error(_.response?.data?.message||"Não foi possível fazer a atualização")}s(!1)},[i,c,a,t,r]);return u.createElement(oi,{open:e,title:"Editar campos personalizados",loading:o,onClose:t,maxWidth:"xs",onSubmit:p,keepMounted:!1},u.createElement("div",{className:"space-y-20"},c.map(g=>u.createElement(u.Fragment,{key:g.id},g.kind==="text"&&u.createElement(Tr,{label:g.title,value:g.value,onChange:_=>f(_.target.value,g),required:g.required,placeholder:g.placeholder,variant:"outlined",fullWidth:!0}),g.kind==="select"&&u.createElement(Tr,{select:!0,label:g.title,value:g.value||"",onChange:_=>h(_.target.value,g),variant:"outlined",required:g.required,fullWidth:!0},u.createElement(ln,{value:""},"Nenhuma opção selecionada"),g.options.map((_,b)=>u.createElement(ln,{key:`${_.option}-${b}`,value:_.option},u.createElement("div",{className:"space-x-8"},u.createElement("span",null,_.option),_.additional_fee&&u.createElement("strong",null,"(+ ",me.formatMonetaryValue(_.additional_fee),")"))))),g.kind==="date"&&u.createElement(tY,{label:g.title,value:g.value?qe(g.value,"DD/MM/YYYY"):null,onChange:_=>f(_?.format("DD/MM/YYYY"),g),disablePast:!0,maxDate:g.options?.days_limit>0?qe().add(parseInt(g.options.days_limit),"day"):void 0,autoOk:!0,clearable:!0,format:"DD/MM/YYYY",variant:"dialog",inputVariant:"outlined",clearLabel:"LIMPAR",cancelLabel:"CANCELAR",fullWidth:!0})))))}function Z9t({customFields:e}){const t=at(({globalCompany:s})=>s.company.custom_fields),[r,n]=u.useState(!1),{order:i,orderPermissions:a}=gi(),o=Array.isArray(e)?e.filter(s=>s.value):[];return!t?.length||o?.length===0&&!a.editCustomFields?null:u.createElement(u.Fragment,null,a.editCustomFields&&u.createElement(X9t,{open:r,onClose:()=>n(!1),customFieldsData:e,orderId:i?.id}),u.createElement("div",{className:"flex flex-shrink-0 flex-col p-16"},u.createElement(Fm,{title:"Campos personalizados",Icon:KK,Action:a.editCustomFields&&u.createElement(Ma,{tooltip:"Editar campos personalizados",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>n(!0)},u.createElement(ps,null)),className:"mb-16"}),!o.length&&a.editCustomFields&&u.createElement("div",null,u.createElement(fr,{startIcon:u.createElement(ps,{color:"inherit"}),className:"text-gray-500",onClick:()=>n(!0)},"Editar campos personalizados")),u.createElement("div",{className:"space-y-16 text-16"},o.map((s,l)=>u.createElement("div",{key:l},u.createElement("div",{className:"font-semibold text-gray-600"},s.title),u.createElement("div",{className:"font-light text-gray-500"},s.value," ",s.additional_fee>0&&u.createElement("strong",null,"(+ ",me.formatMonetaryValue(s.additional_fee),")")))))))}var ME={},Ope;function Q9t(){if(Ope)return ME;Ope=1;var e=$t(),t=Wt();Object.defineProperty(ME,"__esModule",{value:!0}),ME.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"}),"DirectionsWalk");return ME.default=i,ME}var J9t=Q9t();const ix=et(J9t);var LE={},Ipe;function eLt(){if(Ipe)return LE;Ipe=1;var e=$t(),t=Wt();Object.defineProperty(LE,"__esModule",{value:!0}),LE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print");return LE.default=i,LE}var tLt=eLt();const rLt=et(tLt);var FE={},kpe;function nLt(){if(kpe)return FE;kpe=1;var e=$t(),t=Wt();Object.defineProperty(FE,"__esModule",{value:!0}),FE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"}),"RestaurantMenu");return FE.default=i,FE}var iLt=nLt();const aLt=et(iLt);var BE={},Npe;function oLt(){if(Npe)return BE;Npe=1;var e=$t(),t=Wt();Object.defineProperty(BE,"__esModule",{value:!0}),BE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"}),"Store");return BE.default=i,BE}var sLt=oLt();const lLt=et(sLt),cLt=e=>x.createElement("svg",{className:"MuiSvgIcon-root",focusable:"false",viewBox:"0 0 24 24","aria-hidden":"true",width:"1em",height:"1em",...e},x.createElement("path",{d:"m21.96 9.73-1.43-5c-.12-.43-.51-.73-.96-.73H4.43c-.45 0-.84.3-.96.73l-1.43 5c-.18.63.3 1.27.96 1.27h2.2l-1.05 7.88c-.08.59.38 1.12.98 1.12.5 0 .92-.37.98-.86L6.67 15h10.67l.55 4.14c.07.49.49.86.98.86.6 0 1.06-.53.98-1.
32312L18.8 11H21c.66 0 1.14-.64.96-1.27zM6.93 13l.27-2h9.6l.27 2H6.93z"})),uLt=e=>ht.get(e).then(t=>t.data?.custom_domain);function dLt(){const{data:e}=Jc("/api/v1/company/integrations/custom_domain",uLt,{keepPreviousData:!0,errorRetryCount:3});return e}function fLt(){const{organization:e}=$x(),t=at(({globalCompany:a})=>a.company?.url_name),r=at(({auth:a})=>a.user.user.company_group_url),n=dLt();return u.useCallback((a="app",o=!1)=>{let s="";if(n&&a==="app")s=`https://${n}`;else{const c=e?.enterprise_domain||"cardapioweb.com";s=`https://${a}.${c}`}return o?s:`${s}/${a==="estabelecimentos"?r:t}`},[r,t,n,e?.enterprise_domain])}var zE={},Dpe;function hLt(){if(Dpe)return zE;Dpe=1;var e=$t(),t=Wt();Object.defineProperty(zE,"__esModule",{value:!0}),zE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z"}),"ShareRounded");return zE.default=i,zE}var pLt=hLt();const mLt=et(pLt);var nB,Mpe;function vLt(){if(Mpe)return nB;Mpe=1;var e=r5(),t=qd(),r=ms(),n=bm(),i=Jg(),a=n$();function o(s){return a(function(l){return l=t(l,i(r)),n(function(c){var d=this;return s(l,function(f){return e(f,d,c)})})})}return nB=o,nB}var iB,Lpe;function gLt(){if(Lpe)return iB;Lpe=1;var e=qd(),t=vLt(),r=t(e);return iB=r,iB}var yLt=gLt();const _Lt=et(yLt);function bLt(e){const t=Bc[e.sales_channel]?` (${Bc[e.sales_channel]})`:"";return[`#️⃣  Pedido Nº ${e.order_number}${t}`,`feito em ${qe(e.created_at).format("DD/MM/YYYY HH:mm")}`].join(`
324`)}function ELt(e){if(!e.client)return;const t=[`👤  ${e.client.name}`];return e.client.telephone&&t.push(`📞  ${zd(e.client.telephone,e.client.ddi)}`),t.join(`
325`)}function wLt(e){const t=[];return e.scheduled_date&&e.scheduled_period?(t.push("🕐   Agendado para"),t.push(`${qe(e.scheduled_date).format("DD/MM/YYYY")} (${e.scheduled_period.replace("-"," - ")})`)):e.estimated_time&&(e.order_type==="takeout"?t.push(`🕐   Prazo para retirada: ${e.estimated_time} min`):e.order_type==="onsite"?t.push(`🕐   Prazo para consumo: ${e.estimated_time} min`):t.push(`🕐   Prazo para entrega: ${e.estimated_time} min`)),t.join(`
326`)}function SLt(e){const t=[];if(e.order_type==="takeout")t.push("📍  Retirar na loja");else if(e.order_type==="onsite")t.push("📍  Consumir no local");else if(e.delivery_address)t.push("🛵  Endereço de entrega"),t.push(`${e.delivery_address.street}, ${e.delivery_address.house_number||"S/N"}`),(e.delivery_address.address_block||e.delivery_address.address_lot)&&t.push([e.delivery_address.address_block&&`Quadra ${e.delivery_address.address_block}`,e.delivery_address.address_lot&&`Lote ${e.delivery_address.address_lot}`].filter(Boolean).join(", ")),e.delivery_address.address_complement&&t.push(`Complemento: ${e.delivery_address.address_complement}`),e.delivery_address.landmark&&t.push(`Referência: ${e.delivery_address.landmark}`),t.push(`${e.delivery_address.neighborhood}, ${e.delivery_address.city}/${e.delivery_address.state}`);else return;return t.join(`
327`)}function Fpe(e){return e?.map(t=>t.quantity>1?`${t.quantity} ${t.name}`:t.name).join(", ")}function CLt(e){const t=["------ ITENS DO PEDIDO ------"];return e.order_items.filter(r=>r.status!=="canceled").forEach(r=>{const n=parseFloat(r.quantity),i=String(r.quantity).replace(".",","),a=parseFloat(r.price),o=xi(a/n,2),s=r.name?.trim();if(t.push(`
328${i} x ${s}`),r.kind==="combo")r.combo_items.forEach(l=>{t.push(`➡️ ${l.name}`);const c=Fpe(l.order_subitems);c&&t.push(`- ${c}`),l.observation&&t.push(`❗ OBS: ${l.observation}`)});else{const l=Fpe(r.order_subitems);l&&t.push(`➡️ ${l}`),r.observation&&t.push(`❗ OBS: ${r.observation}`)}r.paid_with_points?t.push(`💵 PRÊMIO (${me.formatMonetaryValue(o)})`):t.push(`💵 ${i} x ${me.formatMonetaryValue(o)} = ${me.formatMonetaryValue(a)}`)}),t.push(`
329-----------------------------`),t.filter(Boolean).join(`
330`)}
330function xLt(e){if(!e?.custom_fields_data?.filter(r=>r.value)?.length)return;const t=["➕  INFORMAÇÕES ADICIONAIS"];return e.custom_fields_data.filter(r=>r.value).forEach(r=>{t.push(`
331${r.title}`),t.push(`Resposta: ${r.value}`),r.additional_fee&&t.push(`Valor adicional: ${me.formatMonetaryValue(r.additional_fee)}`)}),t.push(`
332-----------------------------`),t.join(`
333`)}function TLt(e){const t=(i,a)=>a||a===0?`${i}: ${me.formatMonetaryValue(a)}`:"",r=[],n=e.order_items.filter(i=>i.status!=="canceled").reduce((i,a)=>i+(a.price||0),0);if(r.push(t("SUBTOTAL",n)),e.order_type==="delivery"&&(e.delivery_fee>0?r.push(t("ENTREGA",e.delivery_fee)):e.delivery_info_only_by_whatsapp?r.push("TAXA DE ENTREGA A NEGOCIAR"):r.push("ENTREGA GRATUITA")),r.push(t("TAXA DA MAQUINETA",e.payment_fee||void 0)),r.push(t("TAXA ADICIONAL",e.additional_fee||void 0)),e.benefits?.length){const i=e.benefits.reduce((a,o)=>a+o.value,0);r.push(t("DESCONTOS",i||void 0))}return r.push(t(`
334VALOR FINAL`,e.final_value)),e.earned_points&&e.status!=="canceled"&&r.push(`
335PONTOS GANHOS: ${e.earned_points}`),r.filter(Boolean).join(`
336`)}function ALt(e){if(!e.payment_values?.length)return;const t=[];return t.push("💲  FORMA DE PAGAMENTO"),e.payment_values.forEach(r=>{const n=r.brand?.payment_method_name||"INDEFINIDO";t.push(`
337${n}${[mr.credit_card.id,mr.debit_card.id,mr.ifood.id].includes(r.payment_method)&&r.card_brand?` (${r.card_brand})`:""}: ${me.formatMonetaryValue(r?.total||0)}`),r.payment_method===mr.online_credit_card.id&&r.card_brand&&r.card_number&&t.push(`(${Nd(r.card_brand)}) **** ${r.card_number}`),r?.change_of&&t.push(`Troco para ${me.formatMonetaryValue(r.change_of)} (${me.formatMonetaryValue(r.change_of-r?.total)})`)}),t.join(`
338`)}function PLt(e){const t=_Lt([bLt,ELt,wLt,SLt,CLt,xLt,TLt,ALt]);return e?t(e).filter(Boolean).join(`
339
340`):""}const RLt={waiting_confirmation:"Recebemos o seu pedido! Em breve começaremos a preparação dele.",pending_payment:"Dirija-se ao caixa para realizar o pagamento!",confirmed:"Seu pedido foi confirmado e já está sendo preparado!",ready:"Seu pedido está pronto!",released:"Um de nossos entregadores já está a caminho do endereço de entrega!",waiting_to_catch:"Você já pode retirar o seu pedido no estabelecimento!",delivered:"Seu pedido já foi entregue!",scheduled_confirmed:"O agendamento do seu pedido foi confirmado para a data escolhida!",closed:"Seu pedido foi concluído! Agradecemos a preferência e esperamos te reencontrar em breve!",canceling:"Seu pedido foi cancelado!",canceled:"Seu pedido foi cancelado!"};function OLt(e){if(!e)return"";const t=[];return e.client?.name?.split(" ")?.length&&e.client.name!=="Balcão"&&t.push(`Olá, ${e.client.name.split(" ")[0]}! 😃`),t.push(RLt?.[e.status]||""),t.filter(Boolean).join(`
341
342`)}function ILt(e,t="55",r){const i=`https://${me.isMobile()?"api":"web"}.whatsapp.com/send?phone=${t}${e}&text=${r}`;navigator.userAgent.match(/(iPhone|iPod|iPad)/i)?window.location.assign(i):window.open(i,"webWhatsApp")}function kLt({order:e,onClose:t}){const r=Lr(),n=fLt(),i=o=>{const s=e.client.telephone?.replace(/\D/g,"");ILt(s,e.client.ddi,encodeURIComponent(o)),t()},a=u.useMemo(()=>[{label:"Status do pedido",value:OLt(e)},{label:"Detalhes do pedido",value:PLt(e)},{label:"Link de acompanhamento",value:`${n()}/pedidos?p=${e.uid}`},{label:"Link de avaliação",value:`${n()}/pedidos?p=${e.uid}&a=1`}],[n,e]);return u.createElement(u.Fragment,null,a.map(({label:o,value:s})=>u.createElement(ln,{key:o,className:"py-12 pl-16 pr-12 text-16 text-gray-600"},u.createElement("div",{className:"flex w-full items-center space-x-24"},u.createElement(GK.CopyToClipboard,{text:s,onCopy:()=>{r.success("Copiado para área de transferência!"),t()}},u.createElement("div",{className:"flex-1"},u.createElement(Yn,{title:"Copiar para área de transferência",arrow:!0,placement:"top"},u.createElement("span",null,o)))),e.client?.telephone&&YC(e.client.telephone,e.client.ddi)&&u.createElement(Yn,{title:"Enviar pelo WhatsApp",arrow:!0,placement:"top"},u.createElement(cr,{size:"small",className:"rounded-8 p-4 text-gray-600",onClick:l=>{l.stopPropagation(),i(s)}},u.createElement(q4,null)))))))}function NLt({order:e}){const[t,r]=u.useState(null),n=a=>{r(a.currentTarget)},i=()=>{r(null)};return u.createElement(u.Fragment,null,u.createElement(Yn,{title:"Compartilhar pedido",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:n},u.createElement(mLt,null))),u.createElement(m4,{open:!!t,onClose:i,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{className:"border-1 border-solid border-grey-border mt-8 shadow rounded-8",elevation:0},keepMounted:!1},u.createElement(kLt,{order:e,onClose:i})))}function DLt(e){switch(e){case"delivery":return u.createElement(UI,null);case"takeout":return u.createElement(ix,null);case"onsite":return u.createElement(lLt,null);case"closed_table":return u.createElement(cLt,null);default:return u.createElement(UI,null)}}function MLt({order:e}){const t=Lr(),{hasModule:r}=Ah(),n=MK(),{hasUserPermissions:i}=d0(),a=[Bt.pending_online_payment.status,Bt.canceling.status,Bt.waiting_cancellation_approval.status,Bt.canceled.status].includes(e.status);return!r(At.FISCAL)||!e?null:e.order_invoice?e.order_invoice.status==="Autorizada"&&e.order_invoice.link_danfe?u.createElement(Yn,{title:"Ver nota",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>window.open(e.order_invoice.link_danfe,"_blank"),className:"mr-8"},u.createElement(tS,{className:"text-green"}))):e.order_invoice.status==="Negada"?u.createElement(Yn,{title:"Nota negada",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>t.info("Acesse a tela Fiscal > Notas fiscais para mais informações"),className:"mr-8"},u.createElement(tS,{className:"text-orange"}))):e.order_invoice.status==="Cancelada"?u.createElement(Yn,{title:"Nota cancelada",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>t.info("Acesse a tela Fiscal > Notas fiscais para mais informações"),className:"mr-8"},u.createElement(tS,{className:"text-red"}))):null:a?null:u.createElement(Yn,{title:"Emitir nota",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>i(Te.ISSUE_TAX_INVOICE)?n(e):t.warning("Você não tem permissão para emitir notas fiscais"),className:"mr-8"},u.createElement(tS,null)))}function LLt({order:e}){if(!e||!Object.keys(she).includes(e.sales_channel))return null;const t=she[e.sales_channel];if(!t)return null;const{icon:r,iconSizeClass:n,textColorClass:i,borderColorClass:a}=t,o=e.external_display_id||e.ifood_display_id;return u.createElement("div",{className:Ft("flex items-center space-x-8 rounded-4 border border-solid px-6 py-4",a)},r&&u.createElement(r,{className:n}),u.createElement("div",{className:Ft("font-bold",i)},o))}function FLt({order:e}){const t=Uu(),[r,n]=u.useState(!1),i=at(({orderListener:o})=>o?.serverDiffTimestamp),{data:a}=R4();return u.createElement("div",{className:"flex w-full items-center justify-between p-8 sm:h-72 sm:p-12"},u.createElement("div",{className:"flex items-center space-x-12"},u.createElement(UC,null,DLt(e.order_type)),u.createElement("div",{className:"flex flex-col space-y-1 text-gray-600"},u.createElement("span",{className:"text-16 font-bold"},"Pedido Nº ",e.order_number,e.table_number&&u.createElement(u.Fragment,null," ",u.createElement("span",{className:"m-4 text-14"},"•")," Mesa ",e.table_number)),u.createElement("span",{className:"font-light"},me.correctTime(e.created_at,i).isAfter(qe().startOf("day"))?`Feito às ${me.correctTime(e.created_at,i).format("HH:mm")}`:me.correctTime(e.created_at,i).format("DD/MM [às] HH:mm"),u.createElement("span",{className:"m-4 text-14"},"•")," #",e.id))),u.createElement("div",{className:"flex items-center space-x-12"},u.createElement(LLt,{order:e}),u.createElement(NLt,{order:e}),u.createElement(MLt,{order:e}),e.order_type==="delivery"&&!!a?.length&&u.createElement(Yn,{title:e.delivery_man?.name?e.delivery_man.name:"Sem entregador",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>n(!0),className:`mr-8 ${e.delivery_man?"text-green":""}`},u.createElement(UI,null))),u.createElement(Yn,{title:"Imprimir pedido",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>t(e,"standard"),className:"mr-8"},u.createElement(rLt,null))),u.createElement(Yn,{title:"Imprimir versão para cozinha",placement:"top",arrow:!0},u.createElement(cr,{size:"small",onClick:()=>t(e,"kitchen")},u.createElement(aLt,null))),u.createElement(VK,{open:r,deliveryFee:e.delivery_man_fee??e.delivery_fee??0,deliverymanID:e.delivery_man?.id,orderId:e.id,onClose:()=>n(!1)})))}async function BLt(e,t){return(await ht.post(`/api/v2/orders/ifood/${e}/accept_dispute`,t)).data}async function zLt(e,t){return(await ht.post(`/api/v2/orders/ifood/${e}/reject_dispute`,t)).data}async function HLt(e,t,r){return(await ht.post(`/api/v2/orders/ifood/${e}/dispute_alternative/${t}`,r)).data}async function ULt(e,t){return(await ht.get(`/api/v2/orders/ifood/${e}/dispute_evidence`,{params:{evidence_id:t},responseType:"arraybuffer"})).data}const zS=[{key:"HIGH_STORE_DEMAND",label:"Alta demanda na loja"},{key:"STORE_SYSTEM_ISSUES",label:"Problemas de sistema na loja"},{key:"LACK_OF_DRIVERS",label:"Falta de entregadores"},{key:"OPERATIONAL_ISSUES",label:"Problemas operacionais"},{key:"ORDER_OUT_FOR_DELIVERY",label:"Pedido saiu para entrega"},{key:"DRIVER_IS_ALREADY_AT_THE_ADDRESS",label:"Entregador já está no endereço"},{key:"OTHER_REASONS",label:"Outros motivos"}],Bpe=250;function VLt({open:e,onClose:t,orderId:r,eventData:n}){const i=Lr(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(null),[d,f]=u.useState(null);u.useEffect(()=>{e&&(c(null),f(null),s(!1))},[e]);const h=u.useCallback(()=>{t&&!o&&t()},[o,t]),p=u.useCallback(async b=>{if(b.preventDefault(),n?.metadata?.acceptCancellationReasons?.length>0&&!l){i.error("Selecione um motivo para aceitar o cancelamento");return}s(!0);try{const S=await BLt(r,l?{reason:l,detailReason:d||null}:null);a(qn(r),S,{revalidate:!1}),i.success("Cancelamento aceito com sucesso!"),h()}catch(E){const S=E.response?.data?.message;
342i.error(S||"Não foi possível aceitar a solicitação de cancelamento")}s(!1)},[n?.metadata?.acceptCancellationReasons?.length,l,i,d,r,a,h]),g=n?.metadata?.acceptCancellationReasons,_=g?.length>0;return u.createElement(oi,{open:e,title:"Aceitar cancelamento",loading:o,onClose:h,onSubmit:p,confirmText:"Aceitar",cancelText:"Voltar",dividers:_,maxWidth:_?"md":"xs"},_&&u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement("div",{className:"text-16 font-semibold leading-10 text-gray-600"},"Informe abaixo a razão pela qual o cancelamento do pedido foi aceito:"),u.createElement("div",{className:"max-h-384 overflow-auto p-1"},u.createElement(qC,{value:l||"",className:"grid grid-cols-1 gap-4 sm:grid-cols-2"},g.filter(b=>zS.find(E=>E.key===b)).map(b=>u.createElement(Mg,{key:b,value:b,onClick:()=>c(b),label:zS.find(E=>E.key===b).label,control:u.createElement(Bg,{color:"primary"}),classes:{label:"text-16 text-gray-600 font-medium"}})))),u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Informações adicionais (opcional):"),u.createElement(Tr,{value:d||"",onChange:b=>f(b.target.value.slice(0,Bpe)),placeholder:"Explique o motivo pelo qual o cancelamento foi aceito pela loja",inputProps:{className:"text-16"},variant:"outlined",multiline:!0,rows:4,fullWidth:!0}),u.createElement("div",{className:"text-14 text-gray-500"},d?.length||0,"/",Bpe))))}const qLt={REFUND:"Reembolso",BENEFIT:"Benefício (voucher ou desconto)",ADDITIONAL_TIME:"Tempo adicional"};function jLt({open:e,onClose:t,orderId:r,eventData:n}){const i=Lr(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(null),[d,f]=u.useState(""),[h,p]=u.useState(""),[g,_]=u.useState(""),b=n.alternatives||[];u.useEffect(()=>{e&&(f(""),p(""),_(""),s(!1),n?.alternatives?.length===1?c(n.alternatives[0]):c(null))},[e]);const E=u.useCallback(()=>{t&&!o&&t()},[o,t]),S=u.useCallback(async P=>{if(P.preventDefault(),!l){i.error("Selecione uma alternativa para propor");return}if(["REFUND","BENEFIT"].includes(l.type)&&(!d||Math.round(me.currencyStringToFloat(d)*100)>(l.metadata?.maxAmount?.value||l.maxAmount.value))){i.error("Informe um valor válido para a proposta");return}if(l.type==="ADDITIONAL_TIME"){if(!h){i.error("Selecione o tempo adicional que deseja propor");return}if(!g){i.error("Selecione a razão pela qual deseja propor esse tempo adicional");return}}s(!0);try{const O=l.id,I={type:l.type,metadata:{}};["REFUND","BENEFIT"].includes(l.type)&&(I.metadata.amount={value:Math.round(me.currencyStringToFloat(d)*100).toString(),currency:"BRL"}),l.type==="ADDITIONAL_TIME"&&(I.metadata={additionalTimeInMinutes:h,additionalTimeReason:g});const N=await HLt(r,O,I);a(qn(r),N,{revalidate:!1}),i.success("Proposta enviada com sucesso!"),E()}catch(O){const I=O.response?.data?.message;i.error(I||"Não foi possível enviar a proposta")}s(!1)},[l,d,i,h,g,r,a,E]);return u.createElement(oi,{open:e,title:"Propor alternativa",loading:o,onClose:E,onSubmit:l?S:void 0,confirmText:"Enviar",cancelText:"Voltar",maxWidth:"sm"},!l&&u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-bold text-gray-600"},"Selecione a alternativa que deseja propor:"),b.map(P=>u.createElement("div",{key:P.id,className:"cursor-pointer space-y-4 rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600 hover:bg-gray-50",onClick:()=>c(P)},u.createElement("div",{className:"text-16 font-bold"},qLt[P.type]),["REFUND","BENEFIT"].includes(P.type)&&u.createElement("div",{className:"font-light"},"Valor menor ou igual a"," ",me.formatMonetaryValue((P.metadata?.maxAmount?.value||P.maxAmount.value)/100)),P.type==="ADDITIONAL_TIME"&&u.createElement("div",{className:"font-light"},P.metadata.allowedsAdditionalTimeInMinutes.join(", ")," minutos")))),["REFUND","BENEFIT"].includes(l?.type)&&u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-semibold leading-10 text-gray-600"},"Qual o valor que deseja propor?"),u.createElement(pm,{value:d,onChange:P=>f(P.target.value),size:"medium",autoFocus:!0,required:!0}),u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Você pode oferecer um valor"," ",u.createElement("strong",null,"menor ou igual a"," ",me.formatMonetaryValue((l.metadata?.maxAmount?.value||l.maxAmount.value)/100)),".")),l?.type==="ADDITIONAL_TIME"&&u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement("div",{className:"text-16 font-semibold leading-10 text-gray-600"},"Informe abaixo o tempo adicional que deseja propor:"),u.createElement("div",{className:"max-h-384 overflow-auto p-1"},u.createElement(qC,{value:h,className:"grid grid-cols-1 gap-4 sm:grid-cols-2"},l.metadata.allowedsAdditionalTimeInMinutes.map(P=>u.createElement(Mg,{key:P,value:P,onClick:()=>p(P),label:`${P} minutos`,control:u.createElement(Bg,{color:"primary"}),classes:{label:"text-16 text-gray-600 font-medium"}})))),u.createElement("div",{className:"text-16 font-semibold leading-10 text-gray-600"},"Informe abaixo a razão pela qual deseja propor esse tempo adicional:"),u.createElement("div",{className:"max-h-384 overflow-auto p-1"},u.createElement(qC,{value:g,className:"grid grid-cols-1 gap-4 sm:grid-cols-2"},(l.metadata.allowedsAdditionalTimeReasons||zS.map(P=>P.key)).filter(P=>zS.find(O=>O.key===P)).map(P=>u.createElement(Mg,{key:P,value:P,onClick:()=>_(P),label:zS.find(O=>O.key===P).label,control:u.createElement(Bg,{color:"primary"}),classes:{label:"text-16 text-gray-600 font-medium"}}))))))}function $Lt({createdAt:e,expiresAt:t,hide:r}){const n=at(({globalCompany:s})=>s.company.timeCorrection),[i,a]=u.useState({minutes:0,seconds:0,progress:0});u.useEffect(()=>{const s=setInterval(()=>{const l=qe().subtract(n,"seconds"),c=qe(t).diff(l),d=qe.duration(c),f=qe(t)-qe(e),h=Math.max(0,d.minutes()),p=Math.max(0,d.seconds()),g=100-Math.max(0,c/f)*100;
342c<=0&&(clearInterval(s),r()),a({minutes:h,seconds:p,progress:g})},1e3);return()=>{clearInterval(s)}},[e,t,r,n]);const o=(()=>{const s=i.minutes===1?"minuto":"minutos",l=i.seconds===1?"segundo":"segundos";return i.minutes>0&&i.seconds>0?`${i.minutes} ${s} e ${i.seconds} ${l}`:i.minutes>0?`${i.minutes} ${s}`:`${i.seconds} ${l}`})();return u.createElement("div",{className:"text-grey-600 space-y-8"},u.createElement("div",null,u.createElement("div",{className:"text-16 font-semibold"},"Você tem ",o," para responder"),u.createElement("div",{className:"text-15 font-light"},"Caso não responda, o cliente pode recorrer ao iFood")),u.createElement(V_,{variant:"determinate",value:i.progress}))}function WLt({selectedImageUrl:e,setSelectedImageUrl:t}){const[r,n]=u.useState(null),i=()=>t(null);return u.useEffect(()=>{e&&n(e)},[e]),u.createElement(Eo,{open:!!e,onClose:i,PaperProps:{className:"h-full shadow-lg rounded-12"},maxWidth:"xl",fullWidth:!0},u.createElement(p0,{className:"px-20 py-12"},u.createElement("div",{className:"flex items-center justify-end"},u.createElement(cr,{style:{padding:9},onClick:i},u.createElement(Aa,null)))),u.createElement(Xc,{className:"flex items-center justify-center px-20 pb-20"},u.createElement("img",{src:r,alt:"Evidência da disputa",className:"h-full w-auto max-w-full rounded-12 object-scale-down"})))}function GLt({orderId:e,medias:t}){const[r,n]=u.useState([]),[i,a]=u.useState(null);return u.useEffect(()=>{async function o(){const s=(t||[])?.filter(f=>f.contentType.includes("image"))?.map(f=>f.url.split("/").pop());if(!s?.length){n([]);return}const l=s.map(f=>ULt(e,f)),d=(await Promise.all(l)).map(f=>{const h=new Blob([f],{type:"image/jpeg"});return URL.createObjectURL(h)});n(d)}o()},[e,t]),r.length?u.createElement("div",{className:"flex items-center justify-center space-x-16"},r.map(o=>u.createElement("div",{key:o,className:"cursor-pointer",onClick:()=>a(o)},u.createElement(E2,{src:o,alt:"Evidência da disputa",width:"w-80",height:"h-80"}))),u.createElement(WLt,{selectedImageUrl:i,setSelectedImageUrl:a})):null}const KLt=u.memo(GLt);function YLt(e,t){return e.find(n=>n.external_item_id===t.id)?.name||"Nome do item não encontrado"}function XLt(e,t){let r="Nome da opção não encontrado";return e.some(n=>{const i=n.order_subitems?.find(a=>a.external_subitem_id===t.id);return i?(r=i.name,!0):!1}),r}function ZLt({order:e,eventData:t}){if(!t?.metadata?.items?.length&&!t?.metadata?.garnishItems?.length)return null;const r=(t.metadata?.items?.length||0)+(t.metadata?.garnishItems?.length||0),n=(t.metadata?.items?.reduce((i,a)=>i+a.quantity*(a.amount.value/100),0)||0)+(t.metadata?.garnishItems?.reduce((i,a)=>i+a.quantity*(a.amount.value/100),0)||0);return u.createElement("div",{className:"space-y-20 rounded-8 bg-gray-100 p-16 text-16 text-gray-600"},u.createElement("div",{className:"text-center font-semibold"},r>1?`${r} itens apresentaram problemas`:`${r} item apresentou problema`),u.createElement(KLt,{orderId:e?.id,medias:t.metadata?.evidence
342s}),u.createElement("div",null,u.createElement("div",{className:"flex flex-col space-y-12 text-16 text-gray-600"},t.metadata?.items?.map(i=>u.createElement("div",{key:i.id,className:"flex space-x-12"},u.createElement("div",{className:"min-w-28"},i.quantity,"x"),u.createElement("div",{className:"flex-1"},u.createElement("div",null,YLt(e.order_items,i)),i.reason&&u.createElement("div",null,u.createElement("strong",null,"Motivo: "),i.reason)),u.createElement("div",null,me.formatMonetaryValue(i.quantity*(i.amount.value/100))))),t.metadata?.garnishItems?.map(i=>u.createElement("div",{key:i.id,className:"flex space-x-12"},u.createElement("div",{className:"min-w-28"},i.quantity,"x"),u.createElement("div",{className:"flex-1"},u.createElement("div",null,XLt(e.order_items,i)),i.reason&&u.createElement("div",null,u.createElement("strong",null,"Motivo: "),i.reason)),u.createElement("div",null,me.formatMonetaryValue(i.quantity*(i.amount.value/100))))),r>1&&u.createElement("div",{className:"flex justify-end"},u.createElement("strong",null,me.formatMonetaryValue(n))))))}const zpe=250;function QLt({open:e,onClose:t,orderId:r}){const n=Lr(),{mutate:i}=di(),[a,o]=u.useState(!1),[s,l]=u.useState(null);u.useEffect(()=>{e&&(l(null),o(!1))},[e]);const c=u.useCallback(()=>{t&&!a&&t()},[a,t]),d=u.useCallback(async f=>{if(f.preventDefault(),!s){n.error("Informe o motivo para recusar o cancelamento");return}o(!0);try{const p=await zLt(r,{reason:s});i(qn(r),p,{revalidate:!1}),n.success("Cancelamento recusado com sucesso!"),c()}catch(h){const p=h.response?.data?.message;n.error(p||"Não foi possível recusar a solicitação de cancelamento")}o(!1)},[s,n,r,i,c]);return u.createElement(oi,{open:e,title:"Recusar cancelamento",loading:a,onClose:c,onSubmit:d,confirmText:"Recusar",cancelText:"Voltar",maxWidth:"sm"},u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-semibold leading-10 text-gray-600"},"Informe abaixo a razão pela qual o cancelamento do pedido não pode ser aceito:"),u.createElement(Tr,{value:s||"",onChange:f=>l(f.target.value.slice(0,zpe)),placeholder:"Explique o motivo pelo qual o cancelamento não pode ser aceito",inputProps:{className:"text-16"},variant:"outlined",multiline:!0,rows:4,fullWidth:!0}),u.createElement("div",{className:"text-14 text-gray-500"},s?.length||0,"/",zpe)))}function JLt({order:e}){const[t,r]=u.useState(!1),[n,i]=u.useState(!1),[a,o]=u.useState(!1),[s,l]=u.useState(!0),c=e.ifood_handshake_dispute;return!c||!s?null:c.disputeStatus?u.createElement("div",{className:"p-16"},u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-green-light bg-green-lightest p-12"},u.createElement("div",{className:"text-center text-18 font-bold text-green-darker"},"Solicitação de cancelamento já respondida!"))):u.createElement("div",{className:"p-16"},u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-gray-300 p-16"},u.createElement("div",{className:"text-18 font-bold text-red"},"Pedido de cancelamento #",e.ifood_display_id),u.createElement($Lt,{createdAt:c.createdAt,expiresAt:c.expiresAt,hide:()=>l(!1)}),c.message&&u.createElement("div",{className:"rounded-8 bg-gray-100 p-12 text-16 text-gray-600"},u.createElement("strong",null,"Motivo: "),c.message==="Handshake Order Late"?"Pedido atrasado":c.message),u.createElement(ZLt,{order:e,eventData:c}),c.action!=="CANCELLATION"&&u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-grey-600 text-16 font-semibold"},"Escolha uma das opções pra responder:"),u.createElement(fr,{variant:"outlined",color:"primary",onClick:()=>i(!0),fullWidth:!0,disableElevation:!0},"Recusar cancelamento parcial"),c.alternatives?.length>0&&u.createElement(fr,{variant:"outlined",color:"primary",onClick:()=>o(!0),fullWidth:!0,disableElevation:!0},"Propor alternativa"),u.createElement(fr,{variant:"contained",color:"primary",onClick:()=>r(!0),fullWidth:!0,disableElevation:!0},"Aceitar cancelamento parcial")),c.action==="CANCELLATION"&&u.createElement("div",{className:"flex space-x-12"},(c.handshakeType!=="DELAY"||!c.alternatives?.length)&&u.createElement(fr,{variant:"outlined",color:"primary",onClick:()=>i(!0),fullWidth:!0,disableElevation:!0},"Recusar cancelamento"),c.alternatives?.length>0&&u.createElement(fr,{variant:"outlined",color:"primary",onClick:()=>o(!0),fullWidth:!0,disableElevation:!0},"Propor alternativa"),u.createElement(fr,{variant:"contained",color:"primary",onClick:()=>r(!0),fullWidth:!0,disableElevation:!0},"Aceitar cancelamento")),u.createElement(VLt,{open:t,onClose:()=>r(!1),orderId:e?.id,eventData:c}),u.createElement(jLt,{open:a,onClose:()=>o(!1),orderId:e?.id,eventData:c}),u.createElement(QLt,{open:n,onClose:()=>i(!1),orderId:e?.id})))}var HE={},Hpe;function e7t(){if(Hpe)return HE;Hpe=1;var e=$t(),t=Wt();Object.defineProperty(HE,"__esModule",{value:!0}),HE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-3 12H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-3H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1zm0-3H7c-.55 0-1-.45-1-1s.45-1 1-1h10c.55 0 1 .45 1 1s-.45 1-1 1z"}),"MessageRounded");return HE.default=i,HE}var t7t=e7t();const rY=et(t7t);function r7t({order:e}){const{internal_observation:t}=e,[r,n]=u.useState(!1),i=t?.replace("{{print}}","")||"";return i?u.createElement("div",{className:"m-12 pt-12"},u.createElement("div",{className:"space-y-8 rounded-6 bg-gray-100 p-12"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement(Fm,{title:"Observação adicional",Icon:rY}),u.createElement(Ma,{tooltip:"Editar observação",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>n(!0)},u.createElement(ps,null))),u.createElement("div",{className:"whitespace-pre-wrap text-16"},i),u.createElement(JIe,{open:r,onClose:()=>n(!1)}))):null}const n7t=u.memo(r7t);function i7t(e){const t=e?.replace(/\D/g,"");return t?t.length===11?t.replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/,"$1.$2.$3-$4"):t.length===14?t.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,"$1.$2.$3/$4-$5"):null:null}function a7t({order:e}){const{observation:t,invoice_document:r,ifood_merchant_name:n,external_merchant_name:i}=e;return!t&&!r&&!n&&!i?null:u.createElement("div",{className:"flex flex-shrink-0 flex-col p-16"},u.createElement(Fm,{title:"Observações",Icon:rY,className:"mb-16"}),u.createElement("div",{className:"space-y-4 text-16"},t&&u.createElement("div",{className:"whitespace-pre"},t),r&&u.createElement("div",null,u.createElement("strong",null,"Incluir CPF na nota fiscal:")," ",i7t(r)),n&&u.createElement("div",null,u.createElement("strong",null,"Loja do iFood:")," ",n),i&&u.createElement("div",null,u.createElement("strong",null,"Loja:")," ",i)))}const o7t=u.memo(a7t);var UE={},Upe;function s7t(){if(Upe)return UE;Upe=1;var e=$t(),t=Wt();Object.defineProperty(UE,"__esModule",{value:!0}),UE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M9 16.17L5.53 12.7a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 00-1.41 0L9 16.17z"}),"CheckRounded");return UE.default=i,UE}var l7t=s7t();const _h=et(l7t);var VE={},Vpe;function c7t(){if(Vpe)return VE;Vpe=1;var e=$t(),t=Wt();Object.defineProperty(VE,"__esModule",{value:!0}),VE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 7c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1zm-.01-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm1-3h-2v-2h2v2z"}),"ErrorOutlineRounded");return VE.default=i,VE}var u7t=c7t();const M3e=et(u7t);var qE={},qpe;function d7t(){if(qpe)return qE;qpe=1;var e=$t(),t=Wt();Object.defineProperty(qE,"__esModule",{value:!0}),qE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M4 14h2c.55 0 1-.45 1-1v-2c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1zm0 5h2c.55 0 1-.45 1-1v-2c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1zM4 9h2c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1zm5 5h10c.55 0 1-.45 1-1v-2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1zm0 5h10c.55 0 1-.45 1-1v-2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1zM8 6v2c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1z"}),"ViewListRounded");return qE.default=i,qE}var f7t=d7t();const h7t=et(f7t);var jE={},jpe;function p7t(){if(jpe)return jE;jpe=1;var e=$t(),t=Wt();Object.defineProperty(jE,"__esModule",{value:!0}),jE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddRounded");return jE.default=i,jE}var m7t=p7t();const bh=et(m7t);var $E={},$pe;function v7t(){if($pe)return $E;$pe=1;var e=$t(),t=Wt();Object.defineProperty($E,"__esModule",{value:!0}),$E.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),"RemoveRounded");return $E.default=i,$E}var g7t=v7t();const VI=et(g7t),pR={icon:{created:bh,updated:ps,removed:VI,status:dIe},background:{created:"bg-green-lightest",updated:"bg-blue-lightest",removed:"bg-red-lightest",status:"bg-purple-lightest"},text:{created:"text-green-dark",updated:"text-blue-dark",removed:"text-red-dark",status:"text-purple-dark"}};function y7t({changeType:e}){const t=pR.icon[e];return u.createElement("div",{className:Ft("flex items-center justify-center rounded-lg p-4",pR.background[e])},u.createElement(t,{className:pR.text[e]}))}function _7t({logs:e}){return u.createElement("div",{className:"whitespace-normal"},e.map((t,r,n)=>u.createElement(u.Fragment,{key:r},r%2===0?t:u.createElement("strong",{className:"font-semibold"},t),r!==n.length-1&&" ")))}function b7t({log:e,showLine:t=!0}){const r=at(({orderListener:a})=>a?.serverDiffTimestamp);if(!e)return null;const n=e.user_name||"Sistema",i=me.correctTime(e.created_at,r);return u.createElement("div",{className:"flex space-x-20 text-16"},u.createElement("div",{className:"flex flex-col items-center"},u.createElement(y7t,{changeType:e.change_type}),t&&u.createElement("div",{className:Ft("h-full w-4",pR.background[e.change_type])})),u.createElement("div",{className:"flex-1 space-y-4 truncate pb-28 font-light"},u.createElement(_7t,{logs:e.description}),u.createElement("div",{className:"truncate"},"em"," ",u.createElement("strong",{className:"font-semibold",title:i.format("DD/MM/YYYY HH:mm:ss")},i.format("DD/MM/YYYY HH:mm"))),u.createElement("div",{className:"truncate"},"por"," ",u.createElement("strong",{className:"font-semibold",title:n},n))))}const E7t=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data});function w7t(e,t){const{data:r,error:n,isLoading:i,mutate:a}=Jc(e?[`/api/v2/orders/${e}/changelogs`,t]:null,([o])=>E7t(o));return{data:r,isLoading:i,isError:n,mutate:a}}const S7t={...Bt,changed:{name:"Modificado",status:"changed"}};function C7t(){const{order:e}=gi(),[t,r]=u.useState(!1),{data:n,isLoading:i,isError:a}=w7t(t&&e?.id,e?.updated_at),o=u.useMemo(()=>{const s=[...n||[]];return e?.status_changes?.forEach(l=>{const c=l.status==="created"?"Criado":S7t[l.status]?.name||"Desconhecido";s.push({id:`status-${l.id}`,change_type:"status",created_at:l.created_at,user_name:l.user_name,description:["Status alterado para",c]})}),s.sort((l,c)=>c.created_at>l.created_at?1:-1)},[n,e?.status_changes]);return o?.length?u.createElement("div",{className:"flex-shrink-0 p-16"},u.createElement(Fm,{title:"Histórico",Icon:h7t,className:"mb-16"}),(!n?.length||i||a)&&u.createElement("div",{className:"flex space-x-20 text-16"},u.createElement("div",{className:"flex flex-col items-center"},u.createElement("div",{className:Ft("flex items-center justify-center rounded-lg p-4",a?"bg-red-lightest":"bg-gray-100")},!n&&!i&&!a&&u.createElement(_kt,{className:"text-gray-500"}),n?.length===0&&!i&&!a&&u.createElement(_h,{className:"text-gray-500"}),i&&u.createElement(ai,{size:20,className:"p-1 text-gray-500"}),a&&u.createElement(M3e,{className:"text-red-dark"})),u.createElement("div",{className:Ft("h-full w-4",a?"bg-red-lightest":"bg-gray-100")})),u.createElement("div",{className:"flex-1 truncate pb-32 font-light"},a&&u.createElement("div",{className:"flex h-32 items-center font-semibold text-red-dark"},"Não foi possível carregar o histórico de alterações"),!a&&!n&&u.createElement(fr,{color:"inherit",className:"flex min-h-32 items-center p-0 text-16 normal-case",disabled:i,onClick:()=>r(!0)},"Ver histórico completo de modificações"),!a&&n?.length===0&&u.createElement("div",{className:"flex h-32 items-center font-semibold text-gray-500"},"Todo o histórico foi carregado"))),u.createElement("div",{className:"text-16"},o.map((s,l,c)=>u.createElement(b7t,{key:s.id,log:s,showLine:l<c.length-1})))):null}const x7t=u.memo(C7t);var WE={},Wpe;function T7t(){if(Wpe)return WE;Wpe=1;var e=$t(),t=Wt();Object.defineProperty(WE,"__esModule",{value:!0}),WE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM8 19h12c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1s.45 1 1 1zm0-6h12c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1s.45 1 1 1zM7 6c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1z"}),"FormatListBulletedRounded");return WE.default=i,WE}var A7t=T7t();const P7t=et(A7t);var GE={},Gpe;function R7t(){if(Gpe)return GE;Gpe=1;var e=$t(),t=Wt();Object.defineProperty(GE,"__esModule",{value:!0}),GE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"VisibilityRounded");return GE.default=i,GE}var O7t=R7t();const I7t=et(O7t);var aB,Kpe;function k7t(){if(Kpe)return aB;Kpe=1;function e(t,r,n,i,a){return a(t,function(o,s,l){n=i?(i=!1,o):r(n,o,s,l)}),n}return aB=e,aB}var oB,Ype;function N7t(){if(Ype)return oB;Ype=1;var e=oOe(),t=t5(),r=ms(),n=k7t(),i=co();function a(o,s,l){var c=i(o)?e:n,d=arguments.length<3;return c(o,r(s,4),l,d,t)}return oB=a,oB}var D7t=N7t();const M7t=et(D7t);function j4(e,t){return Object.values(e.add_ons).reduce((r,n)=>{if(t[n.id]){let i=[];
342if(Object.values(n.subitems).forEach(a=>{if(t[n.id][a.id]>0){const o=a.price||0,s=t[n.id][a.id];i=i.concat(Array(s).fill(o))}}),i.length>0)switch(n.price_calculation_type){case"SUM":return r+i.reduce((a,o)=>a+o,0);case"MEAN":return r+xi(i.reduce((a,o)=>a+o,0)/i.length,2);case"MIN":return r+Math.min.apply(null,i);case"MAX":return r+Math.max.apply(null,i);default:return r+i.reduce((a,o)=>a+o,0)}}return r},0)}function L7t(e,t){if(!e||!t)return 0;const r=e.combo_steps.reduce((i,a)=>i+(a.price||0),0),n=Oo(C4(e.combo_steps.map(i=>i.combo_step_items.map(a=>({...a,key:`${i.id}-${a.item_id}`})))),"key");return r+M7t(t,(i,a,o)=>i+(n[`${o}-${a.product.id}`]?.additional_price||0)+(e.combo_steps.find(s=>s.id===parseInt(o))?.remove_add_on_prices?0:j4(a.product,a.addons)),0)}function F7t(e,t,r=0){const n=qe().subtract(r,"seconds");return!e||!t?0:parseFloat(me.getSpecialOfferItem(e,n)??e.price??0)+j4(e,t)}const L3e=u.createContext({});function B7t(e){const t=e.slice(1).split(/&|=/),r={};for(let n=0;n<t.length;n+=2){const i=t[n],a=t[n+1];r[i]=a}return r}const Bm=u.createContext({}),{Provider:z7t}=Bm;function S2({children:e,dialogPathname:t,dialogSearch:r,loading:n,dialogProps:i,...a}){const[o,s]=u.useState(!0),l=yc("(max-width:600px)"),c=vc(),d=Z3(),{search:f,pathname:h}=d,p=u.useMemo(()=>B7t(f),[f]);u.useEffect(()=>{p[r]||h.includes(t)?o||s(!0):o&&s(!1)},[t,r,o,h,p]);const g=u.useCallback(()=>{n||c.goBack()},[c,n]);return u.createElement(Eo,{open:o,fullScreen:l,onClose:g,maxWidth:"xs",BackdropProps:{style:{backgroundColor:"rgba(0,0,0,0.45)"}},fullWidth:!0,...i,PaperProps:!l&&(i?.PaperProps||{className:"shadow-lg rounded-12"}),...a},u.createElement(z7t,{value:{handleClose:g,searchParams:p,open:o}},e),n&&u.createElement("div",{className:"absolute inset-0 z-9999 flex items-center justify-center bg-white opacity-75"},u.createElement(ai,null)))}const F3e=ht.create();F3e.defaults.headers.common={};async function H7t(e){const t=[`https://viacep.com.br/ws/${e}/json/`,`https://opencep.com/v1/${e.replace("-","")}`],r=async a=>{try{const o=await F3e.get(a,{timeout:6e3});return o.status===200&&!o.data.erro?o.data:null}catch{return null}},n=await r(t[0]);return n||await r(t[1])}var sB,Xpe;function U7t(){if(Xpe)return sB;Xpe=1;var e=x_(),t=aEe();function r(n,i){return e(t(n,i),1)}return sB=r,sB}var V7t=U7t();const B3e=et(V7t),q7t=e=>e.minimum_quantity>0&&!e.subitems?.filter(t=>t.status==="ACTIVE").length,j7t=e=>e.status==="ACTIVE"&&e.add_ons.find(t=>q7t(t)),$7t=(e,t)=>!e.combo_step_items?.length||!e.combo_step_items?.filter(r=>t?.[r.item_id]?.status==="ACTIVE").length,W7t=(e,t)=>e.status==="ACTIVE"&&(!e.combo_steps?.length||e.combo_steps.find(r=>$7t(r,t)));function G7t(e){return e?Ud(e,t=>{const r=Oo(B3e(t,"items"),"id");t.forEach(n=>{n.items.forEach(i=>{i.kind!=="combo"&&j7t(i)&&(i.status="MISSING")}),n.items.forEach(i=>{i.kind==="combo"&&W7t(i,r)&&(i.status="MISSING")})})}):[]}function Zpe(e,t){if(!e?.length)return!0;const r=t.format("HH:mm"),i=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][t.day()];return e.some(o=>o.weekday.toLowerCase()===i&&o.start_at<=r&&o.end_at>=r)}function K7t(e,t){return e?e.filter(n=>Zpe(n.allowed_times,t)?(n.items=n.items.filter(i=>Zpe(i.allowed_times,t)),!0):!1):[]}const z3e="[CATALOG] SET CATALOG",H3e="[CATALOG] SET SELECTED CATEGORY",Y7t="[CATALOG] SET PRODUCTS",U3e="[CATALOG] SET CATALOG SEARCHED TEXT",V3e="[CATALOG] SET CATALOG LOADING",q3e="[CATALOG] RESET CATALOG LOADING";function X7t(){return{type:V3e}}function Z7t(){return{type:q3e}}function j3e(e){return{type:U3e,payload:e}}function Q7t(e){return t=>{t(j3e("")),t({type:H3e,payload:e})}}function $3e(e="service_desk",t=!0,r=!0){return(n,i)=>{const{categories:a}=i().placeOrder.catalog,{company:o}=i().globalCompany,s=o.timeCorrection,l=qe().subtract(s,"seconds");if(Object.keys(a||{}).length>0&&!r)return;const c={only_available_for:e};r&&(c.force_refresh=!0);const d=ht.get("/api/v1/company/categories/menu",{params:c});return t&&n(X7t()),d.then(f=>{if(f.status===200&&f.data.status!==500){const h=K7t(f.data,l);return n({type:z3e,payload:G7t(h)}),f.data}}).catch(()=>{}).finally(()=>{t&&n(Z7t())})}}function ig(e="service_desk"){return t=>{t($3e(e,!1,!0))}}var qI="NOT_FOUND";function J7t(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:qI},put:function(n,i){t={key:n,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function eFt(e,t){var r=[];function n(s){var l=r.findIndex(function(d){return t(s,d.key)});if(l>-1){var c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return qI}function i(s,l){n(s)===qI&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function a(){return r}function o(){r=[]}return{get:n,put:i,getEntries:a,clear:o}}var tFt=function(t,r){return t===r};function rFt(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var i=r.length,a=0;a<i;a++)if(!e(r[a],n[a]))return!1;return!0}}function nFt(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,i=n===void 0?tFt:n,a=r.maxSize,o=a===void 0?1:a,s=r.resultEqualityCheck,l=rFt(i),c=o===1?J7t(l):eFt(o,l);function d(){var f=c.get(arguments);
342if(f===qI){if(f=e.apply(null,arguments),s){var h=c.getEntries(),p=h.find(function(g){return s(g.value,f)});p&&(f=p.value)}c.put(arguments,f)}return f}return d.clearCache=function(){return c.clear()},d}function iFt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function aFt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];var c=0,d,f={memoizeOptions:void 0},h=s.pop();if(typeof h=="object"&&(f=h,h=s.pop()),typeof h!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof h+"]");var p=f,g=p.memoizeOptions,_=g===void 0?r:g,b=Array.isArray(_)?_:[_],E=iFt(s),S=e.apply(void 0,[function(){return c++,h.apply(null,arguments)}].concat(b)),P=e(function(){for(var I=[],N=E.length,M=0;M<N;M++)I.push(E[M].apply(null,arguments));return d=S.apply(null,I),d});return Object.assign(P,{resultFunc:h,memoizedResultFunc:S,dependencies:E,lastResult:function(){return d},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),P};return i}var zl=aFt(nFt);function nY(e,t,r="position"){return typeof e[r]=="number"&&typeof t[r]=="number"&&e[r]-t[r]!==0?e[r]-t[r]:e.id-t.id}const Qpe=["id","name","custom_code","print_area_id","second_print_area_id","price","position","promotional_price","promotional_price_active","promotional_price_availability","promotional_price_schedules","thumbnail_url","active_stock_control","status","stock","kind","category_id","category_name"],oFt=["id","name","position"],sFt=["id","name","custom_code","price","position","quantity","warning"],bp={PRODUCT_UNAVAILABLE:"Produto indisponível",OPTION_UNAVAILABLE:"Opção indisponível",INSUFFICIENT_PRODUCT_STOCK:"Estoque insuficiente",INSUFFICIENT_OPTION_STOCK:"Opção com estoque insuficiente",COMBO_STEPS_HAVE_CHANGED:"As etapas do combo mudaram"},lFt=({placeOrder:e})=>e.catalog.products,cFt=({placeOrder:e})=>e.cart,uFt=({globalCompany:e})=>e?.company?.timeCorrection||0,dFt=(e,t,r)=>{if(!e&&!t)return!1;const n=e||t;let i=[];const a=[];let o=null;Hg(r,(l,c)=>{if(!l||l<=0)return;let d=e?.subitems.find(f=>String(f.id)===c);if(!d){if(d=t?.subitems.find(f=>String(f.id)===c),!d)return;o||(o=bp.OPTION_UNAVAILABLE,d={...d,warning:o})}!o&&(d.status==="MISSING"||d.active_stock_control&&!d.stock)&&(o=bp.INSUFFICIENT_OPTION_STOCK,d={...d,warning:o}),i=i.concat(Array(l).fill(d.price||0)),a.push({...qc(d,sFt),quantity:l})});let s=0;if(i.length>0)switch((e||t).price_calculation_type){case"SUM":s=i.reduce((l,c)=>l+c,0);break;case"MEAN":s=xi(i.reduce((l,c)=>l+c,0)/i.length,2);break;case"MIN":s=Math.min.apply(null,i);break;case"MAX":s=Math.max.apply(null,i);break;default:s=i.reduce((l,c)=>l+c,0);break}return(e||t).price_calculation_type!=="SUM"?a.forEach(l=>{l.total_price=xi(s/a.length,4),l.price=xi(l.total_price/l.quantity,4),l.add_on_selected_subitems_count=i.length}):a.forEach(l=>{l.total_price=xi(l.price*l.quantity,4)}),a.sort(nY),{...qc(n,oFt),subitems:a,addonPrice:s,warning:o}},fFt=(e,t,r)=>{const n=[];let i=null,a=0;return Hg(e,(o,s)=>{const l=t?.add_ons.find(f=>String(f.id)===s),c=r?.add_ons.find(f=>String(f.id)===s),d=dFt(l,c,o);d&&(i||(i=d.warning),a+=d.addonPrice,n.push(d))}),n.sort(nY),{addOns:n,addOnsPrice:a,warning:i}},hFt=(e,t)=>{if(e?.active_stock_control){if(!e.stock)return!0;if(t.reduce((n,i)=>i.productId===e.id?n+i.quantity:n,0)>e.stock)return!1}return!0},iY=(e,t,r,n=0)=>{const{quantity:i,observation:a,productId:o,addons:s,steps:l,cartProductId:c,paid_with_points:d,kind:f}=r;let h=null;if(e[o])h=qc(e[o],Qpe);else if(r.product)h=qc(r.product,Qpe),h.warning=bp.PRODUCT_UNAVAILABLE;else return;let p=null;if(f==="combo"){const g=e[o]||r.product,_=Oo(C4(g.combo_steps.map(E=>E.combo_step_items.map(S=>({...S,key:`${E.id}-${S.item_id}`})))),"key");let b=0;r0(g.combo_steps?.map(E=>
342String(E.id)).sort(),Object.keys(l).sort())||(p=bp.COMBO_STEPS_HAVE_CHANGED),h.comboSteps=g.combo_steps?.map(E=>{if(l[E.id]){const S=iY(e,t,l[E.id],n);return S.warning?p||(p=S.warning):E.combo_step_items.find(O=>O.item_id===l[E.id].productId)||p||(p=bp.COMBO_STEPS_HAVE_CHANGED),Ud(S,O=>{O.price=E.price+(_[`${E.id}-${l[E.id].productId}`]?.additional_price||0);const I=O.addOn.reduce((N,M)=>E.remove_add_on_prices?(M.addonPrice=0,0):N+M.addonPrice,0);O.removeAddOnPrices=E.remove_add_on_prices,O.baseItemPrice=O.price,O.fullUnitPrice=O.price+I,b+=O.fullUnitPrice})}return p||(p=bp.COMBO_STEPS_HAVE_CHANGED),null}).filter(Boolean),h.fullUnitPrice=b,h.quantity=i,h.observation=a,h.cartProductId=c}else{const g=qe().subtract(n,"seconds"),_=parseFloat(me.getSpecialOfferItem(h,g)??h.price??0),{addOns:b,addOnsPrice:E,warning:S}=fFt(s,e[o],r.product);p=S,h.addOn=b,h.hasActivePromotion=_<h.price,h.baseItemPrice=_,h.fullUnitPrice=_+E,h.priceWithoutDiscounts=h.price+E,h.quantity=i,h.observation=a,h.cartProductId=c}return h.paid_with_points=d,h.warning||(h.status!=="ACTIVE"&&(h.warning=bp.PRODUCT_UNAVAILABLE),hFt(h,t)?p&&(h.warning=p):h.warning=bp.INSUFFICIENT_PRODUCT_STOCK),h},C2=zl(lFt,cFt,uFt,(e,t,r)=>{const n=[],i=C4(t.map(a=>a.steps?[...Object.values(a.steps),a]:a));return e&&Object.keys(e).length>0&&t.forEach(a=>{n.push(iY(e,i,a,r))}),n}),x2=zl(C2,e=>e?xi(e.reduce((t,r)=>t+xi(r.quantity*r.fullUnitPrice,2),0),2):0),W3e=zl(({placeOrder:e})=>e.placeOrder.checkout.payment.loyaltyDiscount,e=>e?me.currencyStringToFloat(e.value):null),G3e=zl(({placeOrder:e})=>e.placeOrder.checkout.payment.discount,e=>me.currencyStringToFloat(e)),aY=zl(({placeOrder:e})=>e.placeOrder.checkout.deliveryFeeDetails.value,({placeOrder:e})=>e.placeOrder.checkout.orderType,(e,t)=>t==="delivery"?me.currencyStringToFloat(e):null),oY=zl(({placeOrder:e})=>e.placeOrder.checkout.payment.additional_fee,e=>me.currencyStringToFloat(e)),pFt=zl(({placeOrder:e})=>e.placeOrder.checkout.payment.service_fee,e=>me.currencyStringToFloat(e)),K3e=zl(({placeOrder:e})=>e.placeOrder.checkout.payment.payments,e=>me.currencyStringToFloat(e?.reduce((t,r)=>t+r.payment_fee,0)||0)),sY=zl(x2,aY,G3e,W3e,oY,pFt,K3e,(e,t,r,n,i,a,o)=>Math.max(0,(e||0)+(t||0)-(r||0)-(n||0)+(i||0)+(a||0)+(o||0)).toFixed(2)),Np={emptyCart:"emptyCart",missingClient:"missingClient",missingClientAddress:"missingClientAddress",missingSchedulingDate:"missingSchedulingDate"},Jpe={[Np.emptyCart]:"Carrinho vazio",[Np.missingClient]:"Informe o cliente",[Np.missingClientAddress]:"Informe o endereço para entrega",[Np.missingSchedulingDate]:"Informe a data de agendamento"};function ax(e){if(e&&Jpe[e])return{id:e,message:Jpe[e]}}const mFt=zl(C2,e=>{if(!e?.length)return ax("emptyCart")}),vFt=zl(({placeOrder:e})=>e.placeOrder.checkout.orderType,({placeOrder:e})=>e.placeOrder.checkout.client,({placeOrder:e})=>e.placeOrder.checkout.payment,(e,t,r)=>{const n=[];if(e==="delivery"&&!t?.id&&n.push(ax("missingClient")),e==="delivery"&&!r.delivery_fee&&r.delivery_fee!==0&&n.push(ax("missingClientAddress")),n.length>0)return n}),gFt=zl(({placeOrder:e})=>e.placeOrder.checkout.deliveryTime,({placeOrder:e})=>e.placeOrder.checkout.client,({placeOrder:e})=>e.placeOrder.checkout.schedulingInfo,(e,t,r)=>{const n=[];if(e==="scheduling"&&!t?.id&&n.push(ax("missingClient")),e==="scheduling"&&(!r.selectedDate||!r.selectedTime)&&n.push(ax("missingSchedulingDate")),n.length>0)return n}),yFt=zl(mFt,vFt,gFt,(...e)=>
342C4(e).filter(Boolean)),lY=e=>{const t={item_id:e.id,kind:e.kind,name:e.name,custom_code:e.custom_code,description:e.description,quantity:e.quantity,observation:e.observation,unit_price:e.baseItemPrice,price:xi(e.quantity*e.fullUnitPrice,2),price_without_discounts:xi(e.quantity*e.priceWithoutDiscounts,2),print_area_id:e.print_area_id,second_print_area_id:e.second_print_area_id,paid_with_points:e.paid_with_points,category_id:e.category_id,category_name:e.category_name};return e.kind==="combo"?{...t,combo_items_attributes:e.comboSteps.reduce((r,n)=>[...r,lY(n)],[])}:{...t,order_subitems_attributes:e.addOn.reduce((r,n)=>(n.subitems.forEach(i=>{r.push({subitem_id:i.id,quantity:i.quantity,price:e.removeAddOnPrices?0:i.price,total_price:e.removeAddOnPrices?0:i.total_price,add_on_selected_subitems_count:i.add_on_selected_subitems_count,name:i.name,custom_code:i.custom_code,add_on_id:n.id,add_on_name:n.name})}),r),[])}};function _Ft(e){let t=[];return e.discount&&e.discount!==ex(e.benefits)?t.push({category:"other",kind:"discount",value:me.currencyStringToFloat(e.discount)}):t=t.concat(e.benefits?.filter(({category:r})=>r!=="loyalty")),t=t.concat(e.benefits?.filter(({category:r})=>r==="loyalty")),t}const Y3e=zl(({globalCompany:e})=>e.company.id,({globalCompany:e})=>e.company.preparation_time,({placeOrder:e})=>e.placeOrder.checkout,C2,sY,aY,oY,(e,t,r,n,i,a,o)=>{const{deliveryAddress:s,client:l,invoiceDocument:c,internalObservation:d,payment:f,orderType:h,customFieldsData:p,deliveryTime:g,schedulingInfo:_,deliveryFeeDetails:b}=r,E=g==="scheduling"&&_?.selectedDate&&_?.selectedTime,S=h==="delivery",P=S?(b?.estimated_time||0)+(t||0)||null:t||null;return{final_value:i,estimated_time:P,delivery_fee:S?a:null,delivery_man_fee:S?b.delivery_man_fee:null,additional_fee:o||null,custom_fields_data:p?JSON.stringify(p.filter(O=>O.value)):null,company_id:e,confirmation:!1,order_type:h,payment_values_attributes:f.payments,scheduled_date:E?_.selectedDate:null,scheduled_period:E?_.selectedTime:null,client_id:l?.id||null,invoice_document:c?c.replace(/\D/g,""):null,internal_observation:d,delivery_address:S?{street:s.street,neighborhood:s.neighborhood,address_complement:s.address_complement,house_number:s.house_number,city:s.city,state:s.state,landmark:s.landmark,address_block:s.address_block,address_lot:s.address_lot,latitude:s.latitude,longitude:s.longitude,zip_code:s.zip_code?.replace(/\D/g,"")}:null,benefits:_Ft(f),order_items:n.map(O=>lY(O))}}),X3e="[PLACE ORDER] SET LOADING",Z3e="[PLACE ORDER] RESET LOADING",Q3e="[PLACE ORDER] SET ORDER TYPE",bFt="[PLACE ORDER] SET CURRENT STEP",J3e="[PLACE ORDER] SET DELIVERY TIME",e5e="[PLACE ORDER] SET INVOICE DOCUMENT",t5e="[PLACE ORDER] SET INTERNAL OBSERVATION",r5e="[PLACE ORDER] SET CLIENT",n5e="[PLACE ORDER] SET CLIENT ADDRESSES",i5e="[PLACE ORDER] SET DELIVERY ADDRESS",a5e="[PLACE ORDER] RESET DELIVERY ADDRESS",EFt="[PLACE ORDER] SET ORDER IN EDIT",o5e="[PLACE ORDER] SET ERRORS IN REPEAT",s5e="[PLACE ORDER] LOAD CHECKOUT",l5e="[PLACE ORDER] RESET CHECKOUT",c5e="[PLACE ORDER] ADD SAVED ORDER",u5e="[PLACE ORDER] REMOVE SAVED ORDER",d5e="[PLACE ORDER] SET CUSTOM FIELDS DATA",f5e="[PLACE ORDER] SET SCHEDULING INFO",h5e="[PLACE ORDER] SET PAYMENT INFO",p5e="[PLACE ORDER] ADD PAYMENT",m5e="[PLACE ORDER] REMOVE PAYMENT",v5e="[PLACE ORDER] SET DELIVERY FEE",wFt="[PLACE ORDER] SET DELIVERY FEE LOADING",SFt="[PLACE ORDER] RESET DELIVERY FEE LOADING",g5e="[PLACE ORDER] RESET DELIVERY FEE DETAILS",CFt="[PLACE ORDER] RESET PAYMENT DELIVERY FEE";function xFt(e,t=null){return async r=>{r($4());try{const n=await ht.post("/api/v2/company/orders",{order:e});return r(Nbe()),t&&(t(n.data,"standard",!0),n.data.status===Bt.confirmed.status&&t(n.data,"kitchen",!0)),n.data}catch(n){return r(ig()),r(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:8e3,message:n.response?.data?.message,variant:"error"})),!1}finally{r(W4())}}}function TFt(e,t){const r=ht.put(`/api/v1/company/orders/${e}`,{order:t});return n=>(n($4()),r.then(i=>i.status===200&&i.data.status!==500&&i.data.success!==!1?(n(Nbe()),i.data):(!i.data.success&&i.data.error?(n(ig()),n(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:8e3,message:i.data.error,variant:"error"}))):(n(ig()),n(oh())),null)).catch(()=>{n(ig()),n(oh())}).finally(()=>n(W4())))}function AFt(){return(e,t)=>{if(t().placeOrder.placeOrder.savedOrders.length>=3)e(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:2500,message:"Você não pode ter mais de 3 pedidos salvos",variant:"info"}));else return e({type:c5e,payload:{id:me.generateGUID(),cart:t().placeOrder.cart,checkout:t().placeOrder.placeOrder.checkout,total:x2(t())}}),!0}}function PFt(e){return{type:u5e,id:e}}function brr(e){return(t,r)=>{const i=r().placeOrder.placeOrder.savedOrders.find(a=>a.id===e);if(i)return t(y5e(i.checkout)),t(C5e(i.cart)),t(PFt(e)),!0}}function RFt(e,t,r,n){if(!e||!t||!r)return!1;const i=e.add_ons.find(o=>o.id===t);let a=!1;if(i){const o=i.subitems.find(s=>s.id===r);if(o.active_stock_control){const s=n;a=o.active_stock_control&&(e.stock||0)<=s}if(o&&o.status!=="MISSING"&&!a)return!0}return!1}function eme(e,t){let r=[],n=!1;
342return t.order_subitems.forEach(i=>{RFt(e,i.add_on_id,i.subitem_id,i.quantity)?n=!0:r=[...r,{quantity:i.quantity,name:i.name}]}),n?r:[]}function tme(e,t){let r=!1;if(e.active_stock_control){const n=t.reduce((i,a)=>a.id===e.id?i+a.quantity:i,0);r=e.active_stock_control&&(e.stock||0)<=n}return!r&&e.status!=="MISSING"}function OFt(e){return(t,r)=>{const{products:n}=r().placeOrder.catalog,i={...e,paid_with_points:!1};let a=null;const o=n[i.item_id],s=[i],l=[];let c=null;if(o)if(i.kind==="combo")c={quantity:i.quantity,kind:i.kind,productId:i.item_id,product:{...i,combo_steps:[]},steps:Oo(i.combo_items.reduce((d,f,h)=>{const p=cY(o,f,h);if(a=null,p&&n[f.item_id]){const g=tme(n[f.item_id],[n[f.item_id]]),_=g?eme(n[f.item_id],f):[];g?_.length>0&&(a={product:n[f.item_id],addOns:_,message:"As seguintes opções estão em falta"}):a={product:n[f.item_id],addOns:[],message:`${n[f.item_id].name} não disponível`},a&&l.push(a);const b=jI(n[f.item_id],f);if(b)return[...d,{...b,step_id:p}]}else a={product:f.name,addOns:[],message:`${f.name} não disponível`},l.push(a);return d},[]),"step_id")},!l.length>0?t(ox(c,i.kind)):(a=[{product:o,addOns:[],comboErrors:l,message:`${o.name} não disponível`}],t(LV(a)));else{const d=tme(o,s),f=d?eme(o,i):[];d?f.length>0?a=[{product:o,addOns:f,message:"As seguintes opções estão em falta"}]:(c=jI(o,i),t(ox(c))):a=[{product:o,addOns:[],message:`${o.name} não disponível`}]}else a=[{product:o,addOns:[],message:"Produto não encontrado"}];return a&&t(LV(a)),a}}function LV(e){return{type:o5e,errors:e}}function oP(e){return{type:Q3e,orderType:e}}function lB(e){return{type:J3e,deliveryTime:e}}function cB(e){return{type:d5e,customFields:e}}function IFt(e){return{type:e5e,document:e}}function kFt(e){return{type:t5e,observation:e}}function rme(e){return{type:r5e,client:e}}function nme(e){return{type:n5e,addresses:e}}function NFt(e){return{type:i5e,address:e}}function ime(e){return{type:a5e,address:e}}function DFt(e){return{type:f5e,schedulingInfo:e}}function e1(e){return{type:h5e,payment:e}}function ame(e){return t=>t({type:p5e,payment:e})}function MFt(e){return{type:m5e,paymentIndex:e}}function LFt(e){return{type:v5e,deliveryFeeDetails:e}}function y5e(e){return{type:s5e,checkout:e}}function HS(){return{type:l5e}}function ome(){return{type:g5e}}function $4(){return{type:X3e}}function W4(){return{type:Z3e}}const FFt=e=>{const t=/(\d{4})-(\d{2})-(\d{2})/;if(e)return e.replace(t,"$3/$2/$1")};function cY(e,t,r){return!e||!t?null:e.combo_steps?.[r]?.combo_step_items?.find(i=>i.item_id===t.item_id)?e.combo_steps[r].id:null}function BFt(e,t,r){if(!e||!t||!r)return!1;const n=e.add_ons.find(i=>i.id===t);return!!(n&&n.subitems.find(a=>a.id===r))}function jI(e,t){const r={};let n=!1;return t.order_subitems.forEach(i=>{BFt(e,i.add_on_id,i.subitem_id)?r[parseInt(i.add_on_id)]={...r[parseInt(i.add_on_id)]||{},[parseInt(i.subitem_id)]:i.quantity}:n=!0}),n?null:{quantity:t.quantity,addons:r,observation:t.observation,paid_with_points:t.paid_with_points,productId:t.item_id,product:{...t,add_ons:[]}}}function zFt(e,t){const r=Oo(e?.map(i=>({...i,options:typeof i.options=="string"?JSON.parse(i.options):i.options})),"id"),n=Oo(t.map(i=>({...i,options:typeof i.options=="string"?JSON.parse(i.options):i.options})),"id");return Object.values(Pc(r,n))}function HFt(e){return(t,r)=>{const{checkout:{currentStep:n}}=r().placeOrder.placeOrder,{products:i}=r().placeOrder.catalog,{custom_fields:a}=r().globalCompany.company,o=e.order_items.filter(d=>d.status!=="canceled"),s=o.reduce((d,f)=>{const h=i[f.item_id];if(h)if(f.kind==="combo"){const p={quantity:f.quantity,kind:f.kind,productId:f.item_id,product:{...f,combo_steps:[]},steps:Oo(f.combo_items.reduce((g,_,b)=>{const E=cY(h,_,b);if(E){const S=jI(i[_.item_id],_);if(S)return[...g,{...S,step_id:E}]}return g},[]),"step_id")};if(Object.values(p.steps).length===f.combo_items.length)return[...d,p]}else{const p=jI(h,f);if(p)return[...d,{...p,kind:f.kind}]}return d},[]),l=s.map(d=>{const f=d.kind==="combo"?uY(d):G4(d);return{...d,cartProductId:f}});o.length!==s.length&&t(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:6e3,message:"Alguns itens não estão mais disponíveis no cardápio e não puderam ser carregados",variant:"info"}));const c={currentStep:n,orderType:e.order_type,deliveryTime:e.scheduled_date&&e.scheduled_period?"scheduling":"now",clientSearchLoading:!1,customFieldsData:zFt(a||[],e.custom_fields_data||[]),client:e.client,deliveryAddress:{street:e.delivery_address?.street||"",house_number:e.delivery_address?.house_number||"",address_complement:e.delivery_address?.address_complement||"",neighborhood:e.delivery_address?.neighborhood||"",city:e.delivery_address?.city||"",state:e.delivery_address?.state||"",landmark:e.delivery_address?.landmark||"",address_block:e.delivery_address?.address_block||"",address_lot:e.delivery_address?.address_lot||"",latitude:e.delivery_address?.latitude||"",longitude:e.delivery_address?.longitude||""},deliveryFeeDetails:{loading:!1,estimated_time:e.estimated_time,value:e.delivery_fee,status:"ok"},schedulingInfo:{selectedDate:e.scheduled_date?FFt(e.scheduled_date):null,selectedTime:e.scheduled_period},payment:{total_order:e.final_value,benefits:e.benefits,discount:ex(e.benefits),loyaltyDiscount:UK(e.benefits),service_fee:e.service_fee,delivery_fee:e.delivery_fee,additional_fee:e.additional_fee,payments:e.payment_values.map(d=>({...d}))}};t(C5e(l)),t(y5e(c))}}const _5e="[CART] SET ORDER TO CART",b5e="[CART] ADD PRODUCT TO CART",E5e="[CART] REMOVE PRODUCT FROM CART",w5e="[CART] UPDATE CART PRODUCT",S5e="[CART] EMPTY CART";function G4(e){let t="";
342return t+=e.productId,Hg(e.addons,(r,n)=>{t+=n,Hg(r,(i,a)=>{t+=`${i}${a}`})}),e.observation&&(t+=e.observation),e.product?.unit_type&&e.product.unit_type!=="UN"&&(t+=me.generateGUID()),t}function uY(e){let t="";return t+=e.productId,Hg(e.steps,(r,n)=>{t+=n,t+=G4(r)}),t}function C5e(e){return{type:_5e,payload:e}}function ox(e,t="regular_product"){const r=t==="combo"?uY(e):G4(e);return{type:b5e,product:{...e,cartProductId:r,kind:t}}}function x5e(e,t,r){const n=r==="combo"?uY(e):G4(e);return{type:w5e,product:{...e,cartProductId:n,kind:r},prevCartProductId:t}}function UFt(e){return{type:E5e,cartProductId:e}}function t1(){return{type:S5e}}var KE={},sme;function VFt(){if(sme)return KE;sme=1;var e=$t(),t=Wt();Object.defineProperty(KE,"__esModule",{value:!0}),KE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");return KE.default=i,KE}var qFt=VFt();const T5e=et(qFt);var YE={},lme;function jFt(){if(lme)return YE;lme=1;var e=$t(),t=Wt();Object.defineProperty(YE,"__esModule",{value:!0}),YE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 13H5v-2h14v2z"}),"Remove");return YE.default=i,YE}var $Ft=jFt();const A5e=et($Ft);function WFt({quantity:e,minQuantity:t,maxQuantity:r,onChange:n,disablePlusButton:i,disableMinusButton:a}){return u.createElement("div",{className:"flex items-center space-x-4"},u.createElement(cr,{size:"small",color:"primary",disabled:a||t?e<=t:e<=0,onClick:()=>n(Math.max(0,(parseInt(e)||0)-1))},u.createElement(A5e,null)),u.createElement(iIe,{value:e,onChange:o=>n(o.target.value),className:"w-48",onFocus:o=>{o.target.select()},placeholder:"0",inputProps:{className:"p-8 text-center"}}),u.createElement(cr,{size:"small",color:"primary",disabled:i||r!=null&&e>=r,onClick:()=>n((parseInt(e)||0)+1)},u.createElement(T5e,null)))}const P5e=u.memo(WFt),R5e="[PRODUCT DETAILS] LOAD PRODUCT DETAILS",O5e="[PRODUCT DETAILS] UPDATE PRODUCT DETAILS STATE",I5e="[PRODUCT DETAILS] RESET PRODUCT DETAILS STATE",dY="[PRODUCT DETAILS] LOAD PRODUCT DETAILS STATE",k5e="[PRODUCT DETAILS] SET COMBO STEP DETAILS",N5e="[PRODUCT DETAILS] RESET COMBO STEP DETAILS",D5e="[PRODUCT DETAILS] ADD SUBITEM",M5e="[PRODUCT DETAILS] SUBTRACT SUBITEM";function GFt(e){return(t,r)=>{const{products:n}=r().placeOrder.catalog,i=n[parseInt(e)];t({type:R5e,payload:i||null})}}function L5e(){return{type:I5e}}function F5e(e,t){return{type:O5e,field:e,value:t}}function KFt(e){return{type:k5e,payload:e}}function YFt(){return{type:N5e}}function B5e(e){return(t,r)=>{const{products:n}=r().placeOrder.catalog,i=n[e.productId];if(i){const a=Ud(e,o=>{Object.entries(o.addons||{}).forEach(([s,l])=>{const c=i.add_ons.find(d=>String(d.id)===s);c?Object.keys(l).forEach(d=>{const f=c.subitems.find(h=>String(h.id)===d);(!f||f.status==="MISSING"||f.active_stock_control&&!f.stock)&&delete o.addons[s][d]}):delete o.addons[s]})});t({type:dY,payload:a||null})}}}function XFt(e){return t=>{t(B5e(e))}}function ZFt(e){return(t,r)=>{const i=r().placeOrder.cart.find(a=>a.cartProductId===e);t(B5e(i))}}function QFt(e,t,r=!1){return{type:D5e,addOnId:e,subitemId:t,resetOthers:r}}function JFt(e,t){return{type:M5e,addOnId:e,subitemId:t}}function eBt(e,t,r){if(!e||!t||!r)return!1;const n=e.add_ons.find(i=>i.id===t);return!!(n&&n.subitems.find(a=>a.id===r))}function z5e(e,t){const r=[],n={};
342for(const i of t.order_subitems){const{add_on_id:a,subitem_id:o,quantity:s}=i;if(eBt(e,a,o)){const l=parseInt(a),c=parseInt(o);n[l]={...n[l]||{},[c]:s}}else r.push(i.name)}return[{quantity:t.quantity,observation:t.observation,addons:n,productId:t.item_id,product:{...e}},r]}function tBt(e,t){return(r,n)=>{const{products:i}=n().placeOrder.catalog,a=i[e.item_id];if(!a)return{editingAllowed:!1,missing:[]};const[o,s]=z5e(a,e);return r({type:dY,payload:o,onUpdateCallback:t}),{editingAllowed:!0,missing:s.map(l=>({type:"subitem",name:l}))}}}const H5e="[COMBO DETAILS] LOAD COMBO DETAILS",U5e="[COMBO DETAILS] UPDATE COMBO DETAILS STATE",V5e="[COMBO DETAILS] RESET COMBO DETAILS STATE",fY="[COMBO DETAILS] LOAD COMBO DETAILS STATE",q5e="[COMBO DETAILS] SET COMBO STEP OPTION";function rBt(e){return(t,r)=>{const{products:n}=r().placeOrder.catalog,i=n[parseInt(e)];t({type:H5e,payload:i||null})}}function nBt(){return{type:V5e}}function iBt(e,t){return{type:U5e,field:e,value:t}}function aBt(e){return(t,r)=>{const n=r().placeOrder.cart,{products:i}=r().placeOrder.catalog,a=n.find(s=>s.cartProductId===e),o=i[a.productId];if(o){const s=Ud(a,l=>{Hg(l.steps,(c,d)=>{const f=o.combo_steps?.find(h=>String(h.id)===d&&h.combo_step_items.find(p=>p.item_id===c.productId))&&i[c.productId].status==="ACTIVE"&&(!i[c.productId].active_stock_control||i[c.productId].stock)&&i[c.productId];f?Hg(c.addons,(h,p)=>{const g=f.add_ons.find(_=>String(_.id)===p);g?Object.keys(h).forEach(_=>{const b=g.subitems.find(E=>String(E.id)===_);(!b||b.status==="MISSING"||b.active_stock_control&&!b.stock)&&delete c.addons[p][_]}):delete c.addons[p]}):delete l.steps[d]})});t({type:fY,payload:s||null})}}}function FV(e,t){return{type:q5e,comboStepId:e,payload:{...t,cartProductId:me.generateGUID()}}}function oBt(e,t){return(r,n)=>{const{products:i}=n().placeOrder.catalog,a=i[e.item_id],o=[];if(!a)return{editingAllowed:!1,missing:[]};const s=e.combo_items.reduce((c,d,f)=>{const h=i[d.item_id];if(h){const p=cY(a,d,f);if(p){const[g,_]=z5e(h,d);return o.push(..._.map(b=>({type:"subitem",name:b}))),[...c,{...g,step_id:p}]}else o.push({type:"step",name:d.name})}else o.push({type:"item",name:d.name});return c},[]),l={quantity:e.quantity,kind:e.kind,productId:e.item_id,product:{...a},steps:Oo(s,"step_id")};return r({type:fY,payload:l,onUpdateCallback:t}),{editingAllowed:!0,missing:o}}}function sBt({setHighlightError:e}){const t=An(),r=Lr(),{searchParams:n,handleClose:i}=u.useContext(Bm),a=at(({comboDetails:O})=>O.comboDetails),o=at(({placeOrder:O})=>O.cart),s=at(({comboDetails:O})=>O.state),l=at(({comboDetails:O})=>O.onUpdateCallback),{quantity:c,steps:d}=s,f=u.useContext(L3e),h=u.useMemo(()=>{if(a?.active_stock_control){const O=o.reduce((I,N)=>n.editCombo?N.productId===a.id&&N.cartProductId!==s.cartProductId?I+N.quantity:I:N.productId===a.id?I+N.quantity:I,0);return o.length===0&&n.editCombo?Math.max((a.stock||0)+s.quantity,0):Math.max((a.stock||0)-O,0)}},[o,a,s.cartProductId,s.quantity,n.editCombo]),p=u.useCallback(O=>{t(iBt("quantity",O))},[t]),g=u.useCallback(()=>{if(parseFloat(c)){if(h!==void 0&&parseFloat(c)>h)return r.info(`Só há ${h} em estoque`),!1}else return r.info("Informe uma quantidade válida"),!1;return!0},[r,c,h]),_=u.useCallback(()=>{if(a){const O=a.combo_steps.find(I=>!d[I.id]);if(O)return f(O.id),!0}return!1},[a,d,f]),b=u.useCallback(()=>{!_()&&g()?(t(ox({...s,productId:a.id,product:a},"combo")),i()):e(!0)},[_,g,i,t,s,a,e]),E=u.useCallback(()=>{if(!_()&&g()){if(l){if(!l({...s,productId:a.id,product:a}))return}else t(x5e({...s,productId:a.id,product:a},s.cartProductId,"combo"));i()}else e(!0)},[_,g,l,i,s,a,t,e]),S=L7t(a,d),P=c*S;return u.createElement(u.Fragment,null,h!==void 0&&(h<5||parseFloat(c)>h)?u.createElement("div",{className:"text-red-500 textt-center flex w-full items-center justify-start pb-2 text-xs font-medium"},h===0?"Esgotado":null,h===1?"Apenas 1 unidade restante":null,h>1?`Últimas ${h} unidades`:null,h<0?`Apenas ${h} em estoque`:null):null,u.createElement("div",{className:"flex items-center justify-between space-x-16"},u.createElement(P5e,{quantity:c,minQuantity:1,maxQuantity:h!==void 0?h:null,onChange:p}),u.createElement(fr,{color:"primary",variant:"contained",size:"large",onClick:n.editCombo?E:b,disabled:h!==void 0&&c>h,className:"flex flex-1 items-center justify-between",disableRipple:!0,disableElevation:!0},u.createElement("div",null,n.editCombo?"Atualizar":"Adicionar"),u.createElement("div",null,me.formatMonetaryValue(P)))))}const lBt=u.memo(sBt);function K4(e){const t=e?.split(/(\*.*?\*|~.*?~|_.*?_)/g);return t?.length>1?t.map(r=>{const n=r.slice(1,-1),i=K4(n);return r.startsWith("*")&&r.endsWith("*")?u.createElement("strong",{className:"font-bold",key:r},i):r.startsWith("_")&&r.endsWith("_")?u.createElement("i",{key:r},i):r.startsWith("~")&&r.endsWith("~")?u.createElement("s",{key:r},i):r}):e}const cBt=(e,t)=>
342{const r=[];return(e?.add_ons||[]).forEach(n=>{t[n.id]&&(n.subitems||[]).forEach(i=>{const a=t[n.id][i.id];a===1?r.push(i.name):a>1&&r.push(`${a}x ${i.name}`)})}),r.join(", ")};function uBt({product:e,comboId:t,comboStepDetails:r,comboStepOption:n}){const i=An(),a=vc(),o=at(({comboDetails:h})=>h.state.steps),{id:s,remove_add_on_prices:l}=r||{},c=o[s]?.productId===e?.id,d=u.useCallback(()=>{if(e.status==="MISSING")return null;const{add_ons:h}=e||{};h?.length?(i(KFt(r)),i(c?XFt(o[s]):L5e()),a.push({search:`?comboId=${t}&productId=${e.id}&editProduct=true`})):i(FV(s,{productId:e.id,product:e}))},[t,r,s,i,a,e,c,o]);if(!e)return null;const f=Object.keys(o[s]?.addons||{}).length&&c&&!l?j4(e,o[s]?.addons):0;return u.createElement("div",{className:Ft("flex items-center justify-between p-16 hover:bg-gray-50","border-0 border-b-1 border-solid border-gray-200",e.status==="MISSING"?"cursor-not-allowed":"cursor-pointer"),onClick:d},e.thumbnail_url&&u.createElement("div",{className:"mr-12 flex h-60 w-60 overflow-hidden rounded-8"},u.createElement(E2,{src:e.thumbnail_url,alt:"",className:"h-full w-full object-contain object-center"})),u.createElement("div",{className:"flex-1"},u.createElement("div",{className:Ft("flex items-center text-16 text-gray-700",c&&"font-bold")},e.name),c&&Object.keys(o[s]?.addons).length?u.createElement("div",{className:"line-clamp-2 mt-1 text-14 text-gray-500"},cBt(e,o[s]?.addons)):e.description&&u.createElement("div",{className:"line-clamp-2 mt-1 text-14 text-gray-500"},K4(e.description)),n.additional_price||f?u.createElement("div",{className:"mt-1 text-14 font-medium text-gray-500"},n.additional_price&&f?`+ ${me.formatMonetaryValue(n.additional_price)} (+ ${me.formatMonetaryValue(f)})`:`+ ${me.formatMonetaryValue(n.additional_price||f)}`):null),u.createElement("div",null,e.status==="MISSING"?u.createElement("span",{className:"ml-12 mr-8 font-semibold text-orange-dark"},"EM FALTA"):u.createElement(Bg,{checked:c,color:"primary",className:"ml-12 p-8"})))}const dBt=u.memo(uBt),fBt=u.forwardRef(({title:e,product:t,Footer:r,children:n},i)=>{const{handleClose:a}=u.useContext(Bm);return t?u.createElement("div",{className:"flex h-full flex-col overflow-hidden"},u.createElement("div",{className:"flex items-center justify-between px-16 py-12"},u.createElement("span",{className:"text-20 font-medium"},e),u.createElement(cr,{style:{padding:9},onClick:a},u.createElement(Aa,null))),u.createElement(zs,null),u.createElement("div",{className:"thin-scrollbar flex w-full flex-1 flex-col overflow-y-auto",ref:i},u.createElement("div",{className:"flex justify-between space-x-16 border-0 border-b-1 border-solid border-gray-200 p-16"},t.thumbnail_url&&u.createElement("div",{className:"relative h-92 w-92 flex-shrink-0 overflow-hidden rounded-8"},u.createElement("img",{src:t.thumbnail_url,alt:"",className:"h-auto w-full object-contain object-center"})),u.createElement("div",{className:"flex-1 space-y-8"},u.createElement("div",{className:"text-16 font-medium text-gray-700"},t.name),t.description&&u.createElement("div",{className:"line-clamp-2 text-14 text-gray-500"},K4(t.description)))),n),u.createElement(zs,null),r&&u.createElement("div",{className:"px-16 py-12"},r)):null}),j5e=u.memo(fBt);function hBt(){const e=An(),{searchParams:t,handleClose:r}=u.useContext(Bm),n=at(({placeOrder:g})=>g.catalog.products),i=at(({comboDetails:g})=>g.comboDetails),[a,o]=u.useState(!1),s=at(({comboDetails:g})=>g.state.steps),l=u.useRef(null),c=u.useRef([]),d=u.useCallback((g,_=!1)=>{if(g){let b=null;if(_){const E=i.add_ons.findIndex(P=>P.id===g),S=E!==-1&&E+1<i.add_ons.length?E+1:null;S&&(b=c.current?.find(P=>parseInt(P.getAttribute("data-combostep-id"))===i.add_ons[S].id))}else b=c.current?.find(E=>parseInt(E.getAttribute("data-combostep-id"))===g);b&&l.current?.scrollTo&&l.current.scrollTo({top:b.offsetTop-59,behavior:"smooth"})}},[i]),f=u.useCallback(g=>{g&&!c.current.includes(g)&&c.current.push(g)},[]),h=u.useRef(!1);u.useEffect(()=>{if(t.comboId&&!h.current){if(t.editCombo!=="true"&&e(nBt()),t.editCombo==="true"&&!Object.keys(s).length){r();return}if(n){const g=n[parseInt(t.comboId)];g?.status==="ACTIVE"||g&&t.editCombo==="true"?(e(rBt(t.comboId)),h.current=!0):r()}}},[e,r,n,t.editCombo,t.comboId,s]);const p=u.useMemo(()=>u.createElement(lBt,{setHighlightError:o}),[]);return i?u.createElement(L3e.Provider,{value:d},u.createElement(j5e,{ref:l,title:"Detalhes do combo",product:i,Footer:p},i?.combo_steps.map(g=>u.createElement("ul",{key:g.id,"data-combostep-id":g.id,ref:f,className:"m-0 p-0"},u.createElement(PG,{className:"border-0 border-b-1 border-solid border-gray-200 bg-gray-100 p-16 pb-12 leading-8 text-gray-700"},u.createElement("div",{className:"flex items-center justify-between space-x-12"},u.createElement("div",{className:"flex flex-col space-y-8"},u.createElement("div",{className:"text-16 font-bold"},g.name),u.createElement("span",{className:Ft("text-14 font-light",a&&!s[g.id]&&"font-bold text-red-dark")},"Escolha uma das opções abaixo")),s[g?.id]&&u.createElement("div",{className:"flex"},u.createElement(T4,{className:"mr-8 text-24 text-green-dark"})))),u.createElement("div",null,g?.combo_step_items?.map(_=>u.createElement(dBt,{key:_.id,comboId:i.id,comboStepDetails:g,comboStepOption:_,product:n?.[_?.item_id]}))))))):null}const pBt={quantity:1,addons:{},observation:""},cme={comboDetails:null,onUpdateCallback:null,state:{quantity:1,steps:{}}},mBt=Ud((e,t)=>{switch(t.type){case H5e:e.comboDetails=t.payload;break;case U5e:e.state[t.field]=t.value;break;case V5e:e.state={...cme.state},e.onUpdateCallback=null;break;case fY:e.state=t.payload,e.onUpdateCallback=t.onUpdateCallback||null;break;case q5e:t.comboStepId&&t.payload&&(e.state.steps[t.comboStepId]={...pBt,...t.payload});break}},cme);function vBt(){return u.createElement(S2,{dialogSearch:"comboId"},u.createElement(hBt,null))}const $5e=B4("comboDetails",mBt)(u.memo(vBt));function gBt({quantity:e,minQuantity:t,maxQuantity:r,onMinusClick:n,onPlusClick:i,disablePlusButton:a,disableMinusButton:o}){return u.createElement("div",{className:"ml-12 flex items-center"},u.createElement(cr,{disabled:o||t?e<=t:e<=0,onClick:s=>{s.stopPropagation(),n()},size:"small",color:"primary",className:Ft("p-8",e===0&&"hidden")},u.createElement(A5e,null)),u.createElement("div",{className:Ft("min-w-32 text-center text-16 text-gray-700",e===0&&"hidden")},e||0),u.createElement(cr,{onClick:s=>{s.stopPropagation(),i()},size:"small",color:"primary",className:"p-8",disabled:a||r!=null&&e>=r},u.createElement(T5e,null)))}const yBt=u.memo(gBt);function W5e(){const e=at(({productDetails:i}
342)=>i.comboStepDetails),{id:t,remove_add_on_prices:r}=e||{};return x.useMemo(()=>({isComboOption:!!e,comboStepId:t,noChargeAddons:r}),[e,t,r])}const hY=u.createContext({});function _Bt(e,t){return Object.values(e).reduce((r,n)=>n[t]>0?r+(n[t]||0):r,0)}function G5e(e,t){return e.reduce((r,n)=>n.kind==="combo"?r+n.quantity*G5e(Object.values(n.steps),t):r+n.quantity*_Bt(n.addons,t),0)}function bBt({addon:e,subitem:t,totalSubitems:r,addonQtds:n={},marked:i}){const a=An(),o=at(({placeOrder:b})=>b.cart),s=at(({productDetails:b})=>b.state),l=u.useContext(hY),{searchParam:c}=u.useContext(Bm),{noChargeAddons:d}=W5e(),f=u.useCallback((b=!1)=>{Object.values(n).reduce((E,S)=>E+S,0)===e.maximum_quantity-1&&l(e.id,!0),a(QFt(e.id,t.id,b))},[e.id,e.maximum_quantity,n,a,l,t.id]),h=u.useCallback(()=>a(JFt(e.id,t.id)),[e.id,a,t.id]),p=u.useMemo(()=>{const b=c?.editProduct&&!c?.comboId;if(t.active_stock_control){const E=b?o.filter(P=>s.cartProductId!==P.cartProductId):o,S=G5e(E,t.id);return t.active_stock_control&&(t.stock||0)<=S+(n[t.id]||0)}return!1},[n,o,s,c,t]),g=u.useCallback(()=>{if(!(p||t.status==="MISSING"))switch(e.choice_type){case"SINGLE":n[t.id]?h():f(!0);break;case"MULTIPLE":n[t.id]>0?h():r<e.maximum_quantity&&f();break;case"SUMMABLE":r<e.maximum_quantity&&(!t.max_quantity||t.max_quantity&&(n[t.id]||0)<t.max_quantity)&&(!t.active_stock_control||(n[t.id]||0)<(t.stock||0))&&f();break;default:return null}},[f,e.choice_type,e.maximum_quantity,n,p,t.id,t.max_quantity,t.status,t.active_stock_control,t.stock,h,r]),_=()=>{switch(e.choice_type){case"SINGLE":return u.createElement(Bg,{checked:n[t.id]>0,onChange:b=>{b.stopPropagation(),f(!0)},onClick:()=>{n[t.id]>0&&h()},value:t.id.toString(),color:"primary",className:"ml-12 p-8"});case"MULTIPLE":return u.createElement(f4,{disabled:r>=e.maximum_quantity&&!(n[t.id]>0),checked:n[t.id]>0,onChange:b=>{b.stopPropagation(),n[t.id]>0?h():f()},color:"primary",className:"ml-12 p-8"});case"SUMMABLE":return u.createElement(yBt,{quantity:n[t.id]>0?n[t.id]:0,maxQuantity:e.maximum_quantity,onPlusClick:f,onMinusClick:h,disablePlusButton:!!(r>=e.maximum_quantity||t.max_quantity&&(n[t.id]||0)>=t.max_quantity||p)});default:return null}};return u.createElement("div",{className:Ft("flex items-center justify-between border-0 border-b-1 border-solid border-gray-200 hover:bg-gray-50",t.status!=="MISSING"&&"cursor-pointer")},u.createElement("div",{className:"flex-1 p-16",onClick:g},u.createElement("div",{className:"flex items-center text-16 text-gray-700"},i&&u.createElement("div",{className:"mr-8 h-8 w-8 rounded-full bg-orange-dark"}),t.name),t.description&&u.createElement("div",{className:"text-14 text-gray-500"},K4(t.description)),t.price&&!d?t.price_before_discount!=null&&t.price_before_discount>t.price?u.createElement("div",{className:"mt-1 flex flex-wrap items-center gap-8 text-14"},u.createElement("span",{className:"font-bold text-green-dark"},"+ ",me.formatMonetaryValue(t.price)),u.createElement("span",{className:"font-medium text-gray-400 line-through"},me.formatMonetaryValue(t.price_before_discount))):u.createElement("div",{className:"mt-1 text-14 font-medium text-gray-500"},`+ ${me.formatMonetaryValue(t.price)}`):null),u.createElement("div",{className:"p-12 pl-0"},p&&!n[t.id]||t.status==="MISSING"?u.createElement("span",{className:"mr-8 font-semibold text-orange-dark"},"EM FALTA"):_()))}const EBt=u.memo(bBt);function wBt({addon:e,highlightError:t}){const[r,n]=u.useState(""),[i,a]=u.useState(null),o=at(({productDetails:_})=>_.state.addons),s=u.useRef(),l=u.useMemo(()=>F1(e.subitems,"position"),[e.subitems]),c=u.useCallback(a5(_=>{const b=F1(e.subitems.map(E=>({...E,move_up:_&&E.name.toLowerCase().includes(_.toLowerCase())?0:1})),["move_up","position"]);a(b)},400),[e.subitems]),d=u.useRef(!0);u.useEffect(()=>(d.current?(d.current=!1,a(l)):c(r),()=>c?.cancel()),[c,l,r]);function f(_,b){return _===b?`Escolha ${b} opç${b===1?"ão":"ões"}`:_===0?b===1?`Escolha até ${b} opção`:`Escolha até ${b} opções`:`Escolha de ${_} a ${b} opções`}const h=u.useCallback(()=>{if(!o||e.subitems&&e.subitems.length===0)return!0;
342if(o[e.id]){const _=Object.values(o[e.id]).reduce((b,E)=>b+E,0);return e.minimum_quantity>_}return e.minimum_quantity>0},[o,e]),p=u.useMemo(()=>{switch(e.price_calculation_type){case"MEAN":return"O valor final será a média dos preços das opções escolhidas";case"MIN":return"O valor final será baseado na opção de menor valor";case"MAX":return"O valor final será baseado na opção de maior valor";default:return null}},[e.price_calculation_type]),g=Object.values(o[e.id]||{}).reduce((_,b)=>_+b,0);return!e.subitems||Object.values(e.subitems).length===0?null:u.createElement("ul",{className:"m-0 p-0"},u.createElement(PG,{className:"border-0 border-b-1 border-solid border-gray-200 bg-gray-100 p-16 pb-12 leading-8 text-gray-700"},u.createElement("div",{className:"w-full space-y-8"},u.createElement("div",{className:"text-16 font-bold"},e.name),u.createElement("div",{className:"flex items-center justify-between space-x-2"},u.createElement("div",{className:Ft("text-14",t&&h()&&"font-bold text-red-dark")},f(e.minimum_quantity,e.maximum_quantity)),u.createElement("div",{className:"flex items-center"},e.minimum_quantity>0&&(h()?u.createElement("div",{className:"flex items-center space-x-8"},u.createElement("span",{className:Ft("rounded-4 px-6 py-1 text-11 text-white",t?"bg-red-dark":"bg-gray-500")},`${g} / ${e.minimum_quantity}`),u.createElement("span",{className:Ft("rounded-4 px-6 py-1 text-11 text-white",t?"bg-red-dark":"bg-gray-500")},"OBRIGATÓRIO")):u.createElement("div",{className:"flex items-center space-x-8"},u.createElement("span",{className:"rounded-4 bg-green-dark px-6 py-1 text-11 text-white"},`${g} / ${e.maximum_quantity}`),u.createElement(T4,{className:"text-24 text-green-dark"})))))),p&&u.createElement("div",{className:"mt-8 text-14 text-gray-500"},p),l.length>=8&&u.createElement("div",{className:"mt-12 flex w-full items-center space-x-8 rounded-8 bg-gray-200 px-8 py-4"},u.createElement(oIe,{className:"text-24 text-gray-500"}),u.createElement(Hu,{value:r,onChange:_=>n(_.target.value),placeholder:"Procure por uma opção",size:"small",className:"w-full text-14 text-gray-700",inputRef:s}),r&&u.createElement(cr,{onClick:()=>n(""),size:"small",disableRipple:!0},u.createElement(Dm,{className:"text-24 text-gray-500"})))),u.createElement("div",null,(i||l).map(_=>u.createElement(EBt,{key:_.id,subitem:_,addon:e,totalSubitems:g,addonQtds:o[e.id],marked:_.move_up===0}))))}const SBt=u.memo(wBt);function CBt({quantity:e,label:t,onChange:r}){return u.createElement("div",{className:"flex items-center space-x-8"},u.createElement(aIe,{value:e,onChange:n=>r(n.target.value),className:"w-68",onFocus:n=>{n.target.select()},inputProps:{className:"p-8 text-center"}}),u.createElement("span",{className:"font-semibold"},t))}const ume=u.memo(CBt);var XE={},dme;function xBt(){if(dme)return XE;dme=1;var e=$t(),t=Wt();Object.defineProperty(XE,"__esModule",{value:!0}),XE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");return XE.default=i,XE}var TBt=xBt();const ABt=et(TBt);var ZE={},fme;function PBt(){if(fme)return ZE;fme=1;var e=$t(),t=Wt();Object.defineProperty(ZE,"__esModule",{value:!0}),ZE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}),"PauseRounded");return ZE.default=i,ZE}var RBt=PBt();const OBt=et(RBt);var QE={},hme;function IBt(){if(hme)return QE;hme=1;var e=$t(),t=Wt();Object.defineProperty(QE,"__esModule",{value:!0}),QE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}),"RefreshRounded");return QE.default=i,QE}var kBt=IBt();const Wg=et(kBt),NBt=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 924 558",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e}
342,x.createElement("rect",{width:924,height:558,fill:"white"}),x.createElement("path",{d:"M880.737 24C891.375 24 900 32.6986 900 43.4286C900 54.1587 891.376 62.8571 880.737 62.8571H785.865V117.846H831.617C844.914 117.846 856.192 127.613 858.255 140.798L858.346 141.429L898.658 444.427C900.828 460.741 888.247 475.245 871.928 475.245H853.306L843.573 513.553C840.515 525.585 829.765 534 817.449 534H713.493C704.33 534 695.793 529.307 690.827 521.54L661.23 475.245H273.572L248.105 520.277C243.306 528.762 234.364 534 224.679 534H104.965C92.8813 534 82.2718 525.893 79.0021 514.16L68.158 475.245H51.9836C35.1939 475.245 22.4847 459.938 25.4335 443.267L79.0303 140.269L79.1441 139.664C81.675 127.002 92.7163 117.846 105.579 117.846H143.914V62.8571H43.2633C32.6245 62.8571 24 54.1587 24 43.4286C24 32.6985 32.6245 24 43.2633 24H880.737ZM719.792 495.143H808.478L813.535 475.245H707.071L719.792 495.143ZM113.723 495.143H217.966L229.219 475.245H108.177L113.723 495.143ZM65.7858 436.388H858.716L821.507 156.703H115.258L65.7858 436.388ZM369.549 233.9C383.399 233.9 394.998 244.482 396.382 258.381L405.911 354.036C407.506 370.053 395.037 383.955 379.077 383.955H179.401C163.441 383.955 150.972 370.053 152.568 354.036L162.096 258.381L162.168 257.732C163.843 244.154 175.295 233.9 188.929 233.9H369.549ZM565.781 345.098C576.42 345.098 585.044 353.797 585.045 364.527C585.045 375.257 576.42 383.955 565.781 383.955H527.255C516.616 383.955 507.991 375.257 507.991 364.527C507.991 353.797 516.616 345.098 527.255 345.098H565.781ZM665.951 345.098C676.589 345.098 685.214 353.797 685.214 364.527C685.214 375.257 676.589 383.955 665.951 383.955H626.461C615.822 383.955 607.197 375.257 607.197 364.527C607.197 353.797 615.822 345.098 626.461 345.098H665.951ZM766.601 345.098C777.24 345.098 785.865 353.797 785.865 364.527C785.865 375.257 777.24 383.955 766.601 383.955H732.891C722.252 383.955 713.627 375.257 713.627 364.527C713.627 353.797 722.252 345.098 732.891 345.098H766.601ZM192.179 345.098H366.299L359.094 272.757H199.385L192.179 345.098ZM565.781 233.9C576.42 233.9 585.044 242.598 585.045 253.328C585.045 264.058 576.42 272.757 565.781 272.757H534.96C524.321 272.757 515.697 264.058 515.697 253.328C515.697 242.598 524.321 233.9 534.96 233.9H565.781ZM665.951 233.9C676.589 233.9 685.214 242.598 685.214 253.328C685.214 264.058 676.589 272.757 665.951 272.757H636.574C625.935 272.757 617.311 264.058 617.311 253.328C617.311 242.598 625.935 233.9 636.574 233.9H665.951ZM766.601 233.9C777.24 233.9 785.865 242.598 785.865 253.328C785.865 264.058 777.24 272.757 766.601 272.757H732.891C722.252 272.757 713.627 264.058 713.627 253.328C713.627 242.598 722.252 233.9 732.891 233.9H766.601ZM182.441 117.846H747.338V62.8571H182.441V117.846Z",fill:"black"}));function DBt({connecting:e,error:t,hasWebSerialSupport:r,readState:n,onStart:i,onStop:a}){const o=u.useMemo(()=>r?e?"Conectando balança":n==="reading"?"Pesando...":n==="read"?"Peso lido da balança":n==="empty"?"Sem peso na balança":n==="paused"?"Balança pausada":t?"Erro ao conectar":"Balança desconectada":"Web Serial indisponível",[e,t,r,n]),s=e||n==="reading",l=!e&&["read","empty"].includes(n),c=!e&&n!=="paused"&&n!=="error"&&r&&!t,d=r&&!e&&!s;return u.createElement("div",{className:"flex items-center justify-between rounded-8 border border-solid border-gray-200 bg-gray-50 px-16 py-12"},u.createElement("div",{className:"flex min-w-0 items-center space-x-8"},s?u.createElement(ABt,{fontSize:"small",className:"flex-shrink-0 animate-spin text-gray-500"}):l?u.createElement(_h,{fontSize:"small",className:"flex-shrink-0 text-green-dark"}):u.createElement(NBt,{className:"h-20 w-20 flex-shrink-0 text-gray-500"}),u.createElement("div",{className:"min-w-0"},u.createElement("div",{className:Ft("truncate text-16 font-semibold text-gray-700",l&&"text-green-dark")},o),t?u.createElement("div",{className:"text-red-500 truncate text-12 font-medium"},t):null)),u.createElement("div",{className:"ml-8 flex flex-shrink-0 items-center space-x-8"},c?u.createElement(Yn,{title:"Parar pesagem"},u.createElement(cr,{size:"small",onClick:a},u.createElement(OBt,{fontSize:"small"}))):u.createElement(Yn,{title:t?"Tentar novamente":"Iniciar pesagem"},u.createElement("span",null,u.createElement(cr,{size:"small",onClick:i,disabled:!d},t?u.createElement(Wg,{fontSize:"small"}):u.createElement(hIe,{fontSize:"small"}))))))}const K5e=u.memo(DBt),pY="cardapio_web_scale_settings",MBt=[2400,4800,9600,19200,38400,57600,115200],ky={enabled:!1,baudRate:2400,portInfo:null},LBt={dataBits:8,stopBits:1,parity:"none",flowControl:"none"};function Y5e(e){const t=Number(e);return MBt.includes(t)?t:ky.baudRate}function Y4(){if(typeof window>"u"||!window.localStorage)return ky;try{const e=window.localStorage.getItem(pY);if(!e)return ky;const t=JSON.parse(e);return{...ky,...t,enabled:t?.enabled===!0,baudRate:Y5e(t?.baudRate),portInfo:mY(t?.portInfo)}}catch{return ky}}function FBt(e){const t={...ky,...e,enabled:e?.enabled===!0,baudRate:Y5e(e?.baudRate),portInfo:mY(e?.portInfo)};try{typeof window<"u"&&window.localStorage&&window.localStorage.setItem(pY,JSON.stringify(t))}catch{}return t}function mY(e){if(!e||typeof e!="object")return null;const t={};return e.usbVendorId!==void 0&&(t.usbVendorId=e.usbVendorId),e.usbProductId!==void 0&&(t.usbProductId=e.usbProductId),Object.keys(t).length?t:null}function uB(e){const t=Y4();return FBt({...t,portInfo:mY(e)})}function BBt(){try{return typeof window<"u"&&!!window.localStorage&&!!window.localStorage.getItem(pY)}catch{return!1}}function pme(){return BBt()&&Y4().enabled===!0}function zBt(){return{...LBt,baudRate:Y4().baudRate}}const HBt=.001,UBt=5,VBt="�",qBt="�",jBt=5,$Bt=3,WBt=["baudRate","dataBits","stopBits","parity","flowControl"];function GBt(e,t){return WBt.every(r=>e?.[r]===t?.[r])}function KBt(e,t){if(!e||!t)return!1;const r=e.getInfo?.();return r?.usbVendorId===t.usbVendorId&&r?.usbProductId===t.usbProductId}function X5e(){return typeof navigator<"u"&&!!navigator.serial}function YBt(e){if(!e)return null;const t=e.lastIndexOf(VBt),r=e.indexOf(qBt,t+1);if(t===-1||r===-1||r<=t)return null;const n=e.slice(t+1,r);if(!new RegExp(`^\\d{${jBt}}$`).test(n))return null;const i=Number(n)/10**$Bt;return Number.isFinite(i)?i:null}function XBt(e=zBt){const t=typeof e=="function"?e:()=>e;let r=null,n=null;const i=async()=>
342{if(!navigator.serial.getPorts)return null;const c=await navigator.serial.getPorts();if(!c.length)return null;const d=Y4().portInfo;return c.find(h=>KBt(h,d))||c[0]},a=async()=>{const c=await navigator.serial.requestPort();return uB(c.getInfo?.()),c};return{connect:async()=>{if(!X5e())throw new Error("WEB_SERIAL_NOT_SUPPORTED");r||(r=await i()||await a());const c=t();if(r.readable&&!GBt(n,c)){if(r.readable.locked||r.writable?.locked)throw new Error("SCALE_RECONNECT_REQUIRED");await r.close(),n=null}if(!r.readable)try{await r.open(c),n=c,uB(r.getInfo?.())}catch{r=null,r=await a(),await r.open(c),n=c,uB(r.getInfo?.())}},readOnce:async({timeoutMs:c=3e3}={})=>{if(!r?.readable||!r?.writable)throw new Error("SCALE_NOT_CONNECTED");const d=r.writable.getWriter();try{await d.write(new Uint8Array([UBt]))}finally{d.releaseLock()}const f=r.readable.getReader(),h=new TextDecoder,p=Date.now();let g="";try{for(;Date.now()-p<c;){const _=Math.max(c-(Date.now()-p),1);let b=null;const E=new Promise(S=>{b=setTimeout(()=>{S(null)},_)});try{const S=f.read(),P=await Promise.race([S,E]);if(!P){try{await f.cancel()}catch{}break}const{value:O,done:I}=P;if(I)break;g+=h.decode(O,{stream:!0});const N=YBt(g);if(N!==null&&N>=0)return Math.abs(N)<HBt?0:N}finally{clearTimeout(b)}}}finally{f.releaseLock()}throw new Error("SCALE_WEIGHT_NOT_FOUND")},disconnect:async()=>{if(!r)return;let c=!1;try{if(r.readable&&r.readable.locked)return;await r.close(),c=!0}finally{c&&(r=null,n=null)}},isConnected:()=>!!r?.readable,getPortInfo:()=>r?.getInfo?.()||null}}const ZBt=XBt();function QBt(){return ZBt}const JBt=500,mme=200;function vme(e){return new Promise(t=>{setTimeout(t,e)})}function ezt(){const e=u.useRef(QBt()),t=u.useRef(0),r=u.useRef(!1),n=u.useRef(!1),[i,a]=u.useState(e.current.isConnected()),[o,s]=u.useState(!1),[l,c]=u.useState(null),d=u.useCallback(async()=>{await e.current.connect(),a(!0)},[]),f=u.useCallback(()=>{const _=e.current.isConnected();return a(_),_},[]),h=u.useCallback(()=>{t.current+=1,r.current=!1,s(!1)},[]),p=u.useCallback(()=>{t.current+=1,r.current=!1,n.current=!0,c(null)},[]),g=u.useCallback(async()=>{if(r.current)return;const _=t.current;try{if(e.current.isConnected()||await e.current.connect(),_!==t.current)return null;if(!e.current.isConnected())throw a(!1),new Error("SCALE_NOT_CONNECTED");for(a(!0),r.current=!0,s(!0);r.current&&_===t.current;){let b=null;try{b=await e.current.readOnce({timeoutMs:JBt})}catch(E){if(E?.message==="SCALE_WEIGHT_NOT_FOUND"){await vme(mme);continue}throw E}if(!r.current||_!==t.current)return null;if(n.current){n.current=!1;continue}c(b),await vme(mme)}}catch(b){throw(b?.message==="SCALE_NOT_CONNECTED"||!e.current.isConnected())&&a(!1),b}finally{_===t.current&&(r.current=!1,s(!1))}return null},[]);return{isConnected:i,isCapturing:o,currentWeight:l,connect:d,syncConnectionState:f,startCapture:g,stopCapture:h,resetWeightSession:p}}const tzt=500;function Z5e({active:e,unitType:t,resetKey:r,onWeightChange:n}){const{currentWeight:i,connect:a,startCapture:o,stopCapture:s,resetWeightSession:l,syncConnectionState:c}=ezt(),d=X5e(),[f,h]=u.useState(!1),[p,g]=u.useState(""),[_,b]=u.useState(()=>pme()),[E,S]=u.useState("paused"),P=t==="KG"&&_,O=u.useCallback(async()=>{if(!(!e||!d||!P)){h(!0),g("");try{await a(),h(!1),S("reading"),o().catch(()=>{g("Não foi possível conectar a balança."),S("error")})}catch{g("Não foi possível conectar a balança."),S("error"),h(!1)}finally{h(!1)}}},[e,a,d,P,o]),I=u.useCallback(()=>{s(),l(),S("paused")},[l,s]);return u.useEffect(()=>{if(!e){s(),l();return}return g(""),S("paused"),b(pme()),c(),s(),l(),()=>{s(),l()}},[e,r,l,s,c]),u.useEffect(()=>{!e||!P||O()},[e,P,O]),u.useEffect(()=>{if(!e||i===null)return;S("reading"),n(i);const N=setTimeout(()=>{S(Number(i)===0?"empty":"read")},tzt);return()=>{clearTimeout(N)}},[e,i,n]),{scaleEnabled:_,hasWebSerialSupport:d,scaleConnecting:f,scaleError:p,scaleReadState:E,startScaleCapture:O,stopScaleCapture:I,shouldShowScaleStatus:P}}function rzt({setHighlightError:e}){const t=An(),r=Lr(),n=at(({productDetails:ie})=>ie.productDetails),i=at(({productDetails:ie})=>ie.state),a=at(({productDetails:ie})=>ie.onUpdateCallback),o=at(({placeOrder:ie})=>ie.cart),{searchParams:s,handleClose:l}=u.useContext(Bm),{quantity:c,addons:d}=i,{isComboOption:f,comboStepId:h,noChargeAddons:p}=W5e(),g=u.useContext(hY),_=at(({globalCompany:ie})=>ie?.company?.timeCorrection||0),b=u.useMemo(()=>
342{if(n?.active_stock_control){const ie=o.reduce((le,fe)=>s.editProduct?fe.productId===n.id&&fe.cartProductId!==i.cartProductId?le+fe.quantity:le:fe.productId===n.id?le+fe.quantity:le,0);return o.length===0&&s.editProduct?Math.max((n.stock||0)+i.quantity,0):Math.max((n.stock||0)-ie,0)}},[o,n,i.cartProductId,i.quantity,s.editProduct]),E=u.useCallback(ie=>{t(F5e("quantity",ie))},[t]),S=u.useCallback(ie=>{E(`${ie}`)},[E]),P=u.useCallback(()=>{if(me.convertNumberToFloat(c)){if(b!==void 0&&me.convertNumberToFloat(c)>b)return r.info(`Só há ${b} em estoque`),!1}else return r.info("Informe uma quantidade válida"),!1;return!0},[r,c,b]),{hasWebSerialSupport:O,scaleConnecting:I,scaleError:N,scaleReadState:M,startScaleCapture:F,stopScaleCapture:B,shouldShowScaleStatus:V}=Z5e({active:!!n?.id,unitType:n?.unit_type,resetKey:n?.id,onWeightChange:S}),W=u.useCallback(()=>{if(n){const ie=n.add_ons.find(le=>Object.values(d[le.id]||{}).reduce((fe,de)=>fe+de,0)<le.minimum_quantity);if(ie&&ie.subitems.length>0)return g(ie.id),!0}return!1},[d,n,g]),$=u.useCallback(()=>{!W()&&P()?(t(f?FV(h,{...i,productId:n.id,product:n}):ox({...i,quantity:me.convertNumberToFloat(i.quantity),productId:n.id,product:n})),l()):e(!0)},[P,h,t,W,l,f,n,i,e]),X=u.useCallback(()=>{if(!W()&&P()){if(a){if(!a({...i,quantity:me.convertNumberToFloat(i.quantity),productId:n.id,product:n}))return}else t(f?FV(h,{...i,productId:n.id,product:n}):x5e({...i,quantity:me.convertNumberToFloat(i.quantity),productId:n.id,product:n},i.cartProductId));l()}else e(!0)},[P,h,t,W,l,f,n,a,i,e]),re=(f?!p&&j4(n,d):F7t(n,d,_))||0,ae=me.convertNumberToFloat(c)*re,Q=u.useMemo(()=>{const{unit_type:ie}=n;switch(ie){case"KG":return u.createElement(ume,{quantity:c,label:"Kg",onChange:E});case"L":return u.createElement(ume,{quantity:c,label:"L",onChange:E});default:return u.createElement(P5e,{quantity:c,minQuantity:1,maxQuantity:b!==void 0?b:null,onChange:E})}},[c,E,n,b]);return u.createElement(u.Fragment,null,b!==void 0&&(b<5||me.convertNumberToFloat(c)>b)?u.createElement("div",{className:"text-red-500 textt-center flex w-full items-center justify-start pb-2 text-xs font-medium"},b===0?"Esgotado":null,b===1?"Apenas 1 unidade restante":null,b>1?`Últimas ${b} unidades`:null,b<0?`Apenas ${b} em estoque`:null):null,V?u.createElement("div",{className:"mb-8"},u.createElement(K5e,{connecting:I,error:N,hasWebSerialSupport:O,readState:M,onStart:F,onStop:B})):null,u.createElement("div",{className:"flex items-center justify-between space-x-16"},!f&&Q,u.createElement(fr,{color:"primary",variant:"contained",size:"large",onClick:s.editProduct?X:$,disabled:b!==void 0&&me.convertNumberToFloat(c)>b,className:"flex flex-1 items-center justify-between",disableRipple:!0,disableElevation:!0},f?u.createElement(u.Fragment,null,u.createElement("div",{className:Ft(!ae&&"w-full text-center")},"Confirmar"),ae?u.createElement("div",null,"+ ",me.formatMonetaryValue(ae)):null):u.createElement(u.Fragment,null,u.createElement("div",null,s.editProduct?"Atualizar":"Adicionar"),u.createElement("div",null,me.formatMonetaryValue(ae))))))}const nzt=u.memo(rzt),dB=140;function izt(){const e=An(),t=at(({productDetails:a})=>a),r=at(({productDetails:a})=>a.state.observation),n=u.useCallback(a=>{a.target.value.length<=dB&&e(F5e("observation",a.target.value))},[e]);if(t.hide_observation_field)return null;const i=r?.length||0;return u.createElement("div",{className:"mb-8 w-full"},u.createElement("div",{className:"flex items-center justify-between px-16 py-20 pb-12"},u.createElement("span",{className:"text-16 font-medium text-gray-500"},"Alguma observação?"),u.createElement("span",{className:Ft("text-14 text-gray-500",i>=dB&&"font-medium text-red-dark")},i," / ",dB)),u.createElement("div",{className:"px-16 py-20 pt-0"},u.createElement(RG,{value:r||"",onChange:n,color:"primary",margin:"dense",multiline:!0,rows:3,fullWidth:!0,className:"p-16 text-16"})))}const azt=u.memo(izt);function ozt(){const e=An(),t=u.useRef(null),[r,n]=u.useState(!1),i=at(({productDetails:h})=>h.productDetails),a=at(({placeOrder:h})=>h.catalog.products),{searchParams:o,handleClose:s}=u.useContext(Bm),l=u.useRef([]),c=u.useCallback((h,p=!1)=>
342{if(h){let g=null;if(p){const _=i.add_ons.findIndex(E=>E.id===h),b=_!==-1&&_+1<i.add_ons.length?_+1:null;b&&(g=l.current?.find(E=>E.getAttribute("data-addon-id")===`${i.id}_${i.add_ons[b].id}`))}else g=l.current?.find(_=>_.getAttribute("data-addon-id")===`${i.id}_${h}`);g&&t.current?.scrollTo&&t.current.scrollTo({top:g.offsetTop-59,behavior:"smooth"})}},[i]),d=u.useCallback(h=>{h&&!l.current.includes(h)&&l.current.push(h)},[]);u.useEffect(()=>{if(o.productId&&(o.editProduct!=="true"&&e(L5e()),o.comboId||e(YFt()),a)){const h=a[parseInt(o.productId)];h?.status==="ACTIVE"||h&&o.editProduct==="true"?e(GFt(o.productId)):s()}},[e,s,a,o.comboId,o.editProduct,o.productId]);const f=u.useMemo(()=>u.createElement(nzt,{setHighlightError:n}),[]);return i?u.createElement(hY.Provider,{value:c},u.createElement(j5e,{ref:t,title:"Detalhes do produto",product:i,Footer:f},u.createElement("div",{key:i.id},i.add_ons.map(h=>u.createElement("div",{key:`${i.id}_${h.id}`,"data-addon-id":`${i.id}_${h.id}`,ref:d},u.createElement(SBt,{addon:h,highlightError:r})))),u.createElement(azt,null))):null}const gme={productDetails:null,comboStepDetails:null,onUpdateCallback:null,state:{quantity:1,addons:{},observation:""}},szt=Ud((e,t)=>{switch(t.type){case R5e:e.productDetails=t.payload;break;case O5e:e.state[t.field]=t.value;break;case I5e:e.state={...gme.state},e.onUpdateCallback=null;break;case dY:e.state=t.payload,e.onUpdateCallback=t.onUpdateCallback||null;break;case k5e:e.comboStepDetails=t.payload;break;case N5e:e.comboStepDetails=null;break;case D5e:e.state.addons[t.addOnId]||(e.state.addons[t.addOnId]={}),t.resetOthers?e.state.addons[t.addOnId]={[t.subitemId]:1}:e.state.addons[t.addOnId][t.subitemId]=(e.state.addons[t.addOnId][t.subitemId]||0)+1;break;case M5e:e.state.addons[t.addOnId][t.subitemId]===1?delete e.state.addons[t.addOnId][t.subitemId]:e.state.addons[t.addOnId][t.subitemId]-=1;break}},gme);function lzt(){return u.createElement(S2,{dialogSearch:"productId"},u.createElement(ozt,null))}const Q5e=B4("productDetails",szt)(u.memo(lzt));function czt(){const e=Lr(),t=An(),r=vc(),n=Bl();return u.useCallback(async(a,o)=>{const{item_id:s}=a;let l=[],c=!1;if(a.kind==="combo"){const f=t(oBt(a,o));l=f.missing||[],c=f.editingAllowed}else{const f=t(tBt(a,o));l=f.missing||[],c=f.editingAllowed}if(!c){e.error("Esse item não pode ser editado pois não está mais disponível no catálogo.");return}const d=e4(z_(l,"type"),f=>gK(f.map(({name:h})=>h)));if(l?.length>0)try{const f=d.step?.length>0&&[d.step.length>1?`Os seguintes produtos serão removidos da edição pois as etapas do combo não estão mais disponíveis:
343`:`O seguinte produto será removido da edição pois a etapa do combo não está mais disponível:
344`].concat(d.step.map(g=>`- ${g}`)).join(`
345`),h=d.item?.length>0&&[d.item.length>1?`Os seguintes produtos serão removidos da edição pois não estão mais disponíveis:
346`:`O seguinte produto será removido da edição pois não está mais disponível:
347`].concat(d.item.map(g=>`- ${g}`)).join(`
348`),p=d.subitem?.length>0&&[d.subitem.length>1?`As seguintes opções serão removidas da edição pois não estão mais disponíveis:
349`:`A seguinte opção será removida da edição pois não está mais disponível:
350`].concat(d.subitem.map(g=>`- ${g}`)).join(`
351`);await n({title:"Atenção!",description:[f,h,p].filter(Boolean).join(`
352
353`),cancellationText:"Voltar",confirmationText:"Continuar"})}catch{return}r.push({search:a.kind==="combo"?`?comboId=${s}&editCombo=true`:`?productId=${s}&editProduct=true`})},[e,n,t,r])}function uzt(){return u.createElement("div",null,u.createElement(Q5e,null),u.createElement($5e,null))}function dzt({category:e,selected:t,onClick:r}){return e?u.createElement("div",{className:Ft("cursor-pointer px-16 py-20 transition-colors duration-300 hover:bg-gray-50","border-0 border-b-1 border-solid border-gray-200",t&&"font-bold text-gray-700"),style:t?{backgroundColor:"#F4F5F7"}:void 0,onClick:r},u.createElement("div",{className:"line-clamp-2 text-gray-600"},e.name)):null}const fzt=u.memo(dzt);function hzt(){return u.createElement("div",{className:"animate-pulse cursor-pointer border-0 border-b-1 border-solid border-gray-200 px-16 py-20"},u.createElement("div",{className:"h-20 w-5/6 rounded-4 bg-gray-200"}))}function pzt({closeCategories:e}){const t=An(),r=at(({placeOrder:s})=>s.catalog.categories),n=at(({placeOrder:s})=>s.catalog.selectedCategory),i=at(({placeOrder:s})=>s.catalog.loading),a=s=>{e&&e(),t(Q7t(s))},o=u.useMemo(()=>r?Object.values(r).filter(s=>s.items?.length>0).sort(nY):[],[r]);return!i&&!o?.length?u.createElement("div",{className:"flex h-full w-full items-center justify-center"},u.createElement(dl,{title:"Nenhuma categoria encontrada"})):u.createElement("div",{className:"flex-1 overflow-auto"},i&&[1,2,3,4,5,6,7,8,9].map(s=>u.createElement(hzt,{key:s})),!i&&o.map(s=>u.createElement(fzt,{key:s.id,category:s,selected:s.id===n,onClick:()=>
353a(s.id)})))}const mzt=u.memo(pzt);function BV({closeCategories:e}){return u.createElement(u.Fragment,null,u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between border-0 border-b-1 border-solid border-gray-200 px-16 text-18 font-bold text-gray-700"},u.createElement("span",null,"Categorias"),e&&u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:e},u.createElement(Aa,{color:"inherit"}))),u.createElement(mzt,{closeCategories:e}))}function vzt({openCategories:e}){const t=at(({placeOrder:a})=>a.catalog.categories),r=at(({placeOrder:a})=>a.catalog.selectedCategory),n=at(({placeOrder:a})=>a.catalog.catalogSearchedText),i=u.useMemo(()=>n?"Busca no catálogo":r&&t?.[r]?t[r].name:"Catálogo",[t,n,r]);return u.createElement("div",{className:"flex h-64 w-full flex-shrink-0 items-center justify-between space-x-12 border-0 border-b-1 border-solid border-gray-200 pl-20 pr-12"},u.createElement("span",{className:"max-w-160 truncate text-16 font-bold text-gray-600"},i),u.createElement(fr,{variant:"text",color:"default",className:"flex-shrink-0 normal-case",onClick:e},"Ver categorias"))}const gzt=e=>{switch(e){case"KG":return"quilograma(s)";case"L":return"litro(s)";default:return"unidade(s)"}};function yzt({open:e,data:t,onConfirm:r,onCancel:n,onClose:i}){const[a,o]=u.useState([]),[s,l]=u.useState("");u.useEffect(()=>{e&&(o([]),l(""))},[e]);const c=u.useCallback(M=>{/^\d+([,.]\d*)?$/.test(M.target.value)?l(M.target.value):M.target.value===""&&l("")},[]),d=u.useCallback(()=>{const M=[];return parseFloat(s?.toString().replace(",","."))||M.push("quantity"),o(M),M.length===0},[s]),f=u.useCallback(M=>{l(`${M}`),o(F=>F.filter(B=>B!=="quantity"))},[]),{scaleEnabled:h,hasWebSerialSupport:p,scaleConnecting:g,scaleError:_,scaleReadState:b,startScaleCapture:E,stopScaleCapture:S,shouldShowScaleStatus:P}=Z5e({active:e,unitType:t?.unit_type,resetKey:t?.id,onWeightChange:f}),O=u.useCallback(()=>{l(""),i()},[i]),I=u.useCallback(()=>{n(),O()},[O,n]),N=u.useCallback(M=>{M.preventDefault(),d()&&(r(parseFloat(s?.toString().replace(",","."))),O())},[O,r,s,d]);return u.createElement(Eo,{open:e,onClose:O,PaperProps:{className:`shadow-lg rounded-12 ${h?"w-384":"w-320"}`}},u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between border-0 border-b-1 border-solid border-gray-200 px-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},"Quantidade de"),u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:O},u.createElement(Yn,{title:"Fechar janela"},u.createElement(Aa,{color:"inherit"})))),u.createElement("form",{onSubmit:N,className:"flex flex-col items-center justify-center space-y-16 p-16"},u.createElement("span",{className:"text-16 font-semibold text-gray-800"},t?.name),u.createElement(aIe,{value:s,onChange:c,inputProps:{className:"text-18 text-center font-semibold"},error:a.includes("quantity"),size:"small",className:"max-w-136",autoFocus:!0}),u.createElement("span",{className:"text-16 font-semibold text-gray-800"},gzt(t?.unit_type)),P?u.createElement(K5e,{connecting:g,error:_,hasWebSerialSupport:p,readState:b,onStart:E,onStop:S}):null),u.createElement("div",{className:"flex items-center justify-end space-x-16 p-16"},u.createElement(fr,{onClick:I,variant:"outlined"},"Cancelar"),u.createElement(fr,{onClick:N,variant:"contained",color:"primary"},"Confirmar")))}const _zt=(e,t)=>!e||!e.add_ons?0:(me.getSpecialOfferItem(e,t)??e.price)+Object.values(e.add_ons).reduce((n,i)=>n+(((i.minimum_quantity||0)>0?i.minimum_price:0)||0),0);function bzt({product:e}){const t=An(),r=vc(),n=at(({globalCompany:E})=>E?.company?.timeCorrection||0),{basePathname:i,dialogPathname:a}=u.useContext(R2),o=at(({placeOrder:E})=>E.cart),[s,l]=u.useState({open:!1,data:null,onConfirm:null}),c=u.useCallback(E=>S=>{t(ox({product:E,productId:E.id,quantity:S,addons:{},observation:""}))},[t]),d=u.useCallback(()=>{e.kind==="combo"?r.push(`/${i}/${a}?comboId=${e.id}`):Object.values(e.add_ons).length===0?e.unit_type!=="UN"?l(E=>({...E,open:!0,data:e,onConfirm:c(e)})):c(e)(1):r.push(`/${i}/${a}?productId=${e.id}`)},[c,i,a,r,e]),f=qe().subtract(n,"seconds"),h=_zt(e,f);let p=me.formatMonetaryValue(e.price);const g=me.getSpecialOfferItem(e,f);let _=!1;if(e.active_stock_control){const E=o.reduce((S,P)=>P.id===e.id?S+P.quantity:S,0);_=e.active_stock_control&&(e.stock||0)<=E}if(e.kind==="combo"){const E=e.combo_steps.reduce((S,P)=>S+(P.price||0),0);p=me.formatMonetaryValue(E)}else h>e.price?p=`A partir de ${me.formatMonetaryValue(h)}`:typeof g=="number"&&(p=`${me.formatMonetaryValue(g)} (${p})`);const b=!_&&e.status!=="MISSING";return u.createElement(u.Fragment,null,u.createElement("div",{className:Ft("flex space-x-8 rounded-6 border border-solid border-gray-200 bg-white p-8",b?"cursor-pointer hover:bg-gray-50":"cursor-not-allowed"),onClick:b?d:void 0},e.thumbnail_url&&u.createElement("div",{className:Ft("flex h-64 w-64 flex-shrink-0 items-center justify-center overflow-hidden",!b&&"opacity-50")},u.createElement(E2,{src:e.thumbnail_url,alt:"",className:"h-full w-full rounded-6 object-contain object-center"})),u.createElement("div",{className:Ft("flex flex-col space-y-8 px-4",!b&&"opacity-50")},u.createElement("div",{title:e.name,className:"line-clamp-2 font-bold uppercase text-gray-600"},e.name),u.createElement("div",{className:"text-gray-500"},b?p:"EM FALTA"))),u.createElement(yzt,{open:!!s?.open,data:s?.data,onConfirm:s.onConfirm,onCancel:()=>l(E=>({...E,open:!1,onConfirm:null})),onClose:()=>l(E=>({...E,open:!1,onConfirm:null}))}))}function Ezt(){return u.createElement("div",{className:"flex animate-pulse space-x-8 rounded-6 border border-solid border-gray-200 bg-white p-8"},u.createElement("div",{className:"h-64 w-64 flex-shrink-0 rounded-6 bg-gray-200"}),u.createElement("div",{className:"flex flex-1 flex-col space-y-8 px-4"},u.createElement("div",{className:"h-20 w-5/6 rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-1/3 rounded-4 bg-gray-200"})))}function zm(e){return Array.isArray?Array.isArray(e):e4e(e)==="[object Array]"}function wzt(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function zV(e){return e==null?"":wzt(e)}function Ds(e){return typeof e=="string"}function mR(e){return typeof e=="number"}function Szt(e){return e===!0||e===!1||Czt(e)&&e4e(e)=="[object Boolean]"}function J5e(e){return typeof e=="object"}function Czt(e){return J5e(e)&&e!==null}function ic(e){return e!=null}function sP(e){return!e.trim().length}
353function e4e(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const xzt="Incorrect 'index' type",HV="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Tzt=e=>`Invalid value for key ${e}`,Azt=e=>`Pattern length exceeds max of ${e}.`,Pzt=e=>`Missing ${e} property in key`,Rzt=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ozt="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",yme=Object.prototype.hasOwnProperty;var Izt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{const n=t4e(r);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function t4e(e){let t=null,r=null,n=null,i=1,a=null;if(Ds(e)||zm(e))n=e,t=_me(e),r=vR(e);else{if(!yme.call(e,"name"))throw new Error(Pzt("name"));const o=e.name;if(n=o,yme.call(e,"weight")&&e.weight!==void 0&&(i=e.weight,i<=0))throw new Error(Rzt(vR(o)));t=_me(o),r=vR(o),a=e.getFn??null}return{path:t,id:r,weight:i,src:n,getFn:a}}function _me(e){return zm(e)?e:e.split(".")}function vR(e){return zm(e)?e.join("."):e}function kzt(e,t){const r=[];let n=!1;const i=(a,o,s,l)=>{if(ic(a))if(!o[s])r.push(l!==void 0?{v:a,i:l}:a);else{const c=a[o[s]];if(!ic(c))return;if(s===o.length-1&&(Ds(c)||mR(c)||Szt(c)||typeof c=="bigint"))r.push(l!==void 0?{v:zV(c),i:l}:zV(c));else if(zm(c)){n=!0;for(let d=0,f=c.length;d<f;d+=1)i(c[d],o,s+1,d)}else o.length&&i(c,o,s+1,l)}};return i(e,Ds(t)?t.split("."):t,0),n?r:r[0]}const Nzt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Dzt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Mzt={location:0,threshold:.6,distance:100},Lzt={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:kzt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},sn=Object.freeze({...Dzt,...Nzt,...Mzt,...Lzt});function Fzt(e){return e>=9&&e<=13||e===32||e===160}function Bzt(e=1,t=3){const r=new Map,n=Math.pow(10,t);return{get(i){let a=0,o=!1;for(let l=0;l<i.length;l++)Fzt(i.charCodeAt(l))?o=!1:o||(a++,o=!0);if(a===0&&(a=1),r.has(a))return r.get(a);const s=Math.round(n/Math.pow(a,.5*e))/n;return r.set(a,s),s},clear(){r.clear()}}}var vY=class{constructor({getFn:e=sn.getFn,fieldNormWeight:t=sn.fieldNormWeight}={}){this.norm=Bzt(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,r)=>{this._keysMap[t.id]=r})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(Ds(this.docs[0]))for(let r=0;r<e;r++){const n=this._createStringRecord(this.docs[r],r);n&&(this.records[t++]=n)}else for(let r=0;r<e;r++)this.records[t++]=this._createObjectRecord(this.docs[r],r);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(HV);if(Ds(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const r=this._createObjectRecord(e,t);return this.records.push(r),r}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(HV);for(let t=0,r=this.records.length;t<r;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,r=this.records.length;t<r;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(n=>!t.has(n.i));const r=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,a=r.length;for(;i<a;){const o=i+a>>>1;r[o]<n.i?i=o+1:a=o}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!ic(e)||sP(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const r={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const a=this.keys[n],o=a.getFn?a.getFn(e):this.getFn(e,a.path);if(ic(o)){if(zm(o)){const s=[];for(let l=0,c=o.length;l<c;l+=1){const d=o[l];if(ic(d)){if(Ds(d)){if(!sP(d)){const f={v:d,i:l,n:this.norm.get(d)};s.push(f)}}else if(ic(d.v)){const f=Ds(d.v)?d.v:zV(d.v);
353if(!sP(f)){const h={v:f,i:d.i,n:this.norm.get(f)};s.push(h)}}}}r.$[n]=s}else if(Ds(o)&&!sP(o)){const s={v:o,n:this.norm.get(o)};r.$[n]=s}}}return r}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function r4e(e,t,{getFn:r=sn.getFn,fieldNormWeight:n=sn.fieldNormWeight}={}){const i=new vY({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(t4e)),i.setSources(t),i.create(),i}function zzt(e,{getFn:t=sn.getFn,fieldNormWeight:r=sn.fieldNormWeight}={}){const{keys:n,records:i}=e,a=new vY({getFn:t,fieldNormWeight:r});return a.setKeys(n),a.setIndexRecords(i),a}function Hzt(e=[],t=sn.minMatchCharLength){const r=[];let n=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){const s=e[a];s&&n===-1?n=a:!s&&n!==-1&&(i=a-1,i-n+1>=t&&r.push([n,i]),n=-1)}return e[a-1]&&a-n>=t&&r.push([n,a-1]),r}function Uzt(e,t,r,{location:n=sn.location,distance:i=sn.distance,threshold:a=sn.threshold,findAllMatches:o=sn.findAllMatches,minMatchCharLength:s=sn.minMatchCharLength,includeMatches:l=sn.includeMatches,ignoreLocation:c=sn.ignoreLocation}={}){if(t.length>32)throw new Error(Azt(32));const d=t.length,f=e.length,h=Math.max(0,Math.min(n,f));let p=a,g=h;const _=(B,V)=>{const W=B/d;if(c)return W;const $=Math.abs(h-V);return i?W+$/i:$?1:W},b=s>1||l,E=b?Array(f):[];let S;for(;(S=e.indexOf(t,g))>-1;){const B=_(0,S);if(p=Math.min(B,p),g=S+d,b){let V=0;for(;V<d;)E[S+V]=1,V+=1}}g=-1;let P=[],O=1,I=0,N=d+f;const M=1<<d-1;for(let B=0;B<d;B+=1){let V=0,W=N;for(;V<W;)_(B,h+W)<=p?V=W:N=W,W=Math.floor((N-V)/2+V);N=W;let $=Math.max(1,h-W+1);const X=o?f:Math.min(h+W,f)+d,re=Array(X+2);re[X+1]=(1<<B)-1;for(let ae=X;ae>=$;ae-=1){const Q=ae-1,ie=r[e[Q]];if(re[ae]=(re[ae+1]<<1|1)&ie,B&&(re[ae]|=(P[ae+1]|P[ae])<<1|1|P[ae+1]),re[ae]&M&&(O=_(B,Q),O<=p)){if(p=O,g=Q,I=B,g<=h)break;$=Math.max(1,2*h-g)}}if(_(B+1,h)>p)break;P=re}if(b&&g>=0){const B=Math.min(f-1,g+d-1+I);for(let V=g;V<=B;V+=1)r[e[V]]&&(E[V]=1)}const F={isMatch:g>=0,score:Math.max(.001,O)};if(b){const B=Hzt(E,s);B.length?l&&(F.indices=B):F.isMatch=!1}return F}function Vzt(e){const t={};for(let r=0,n=e.length;r<n;r+=1){const i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}function gY(e){if(e.length<=1)return e;e.sort((r,n)=>r[0]-n[0]||r[1]-n[1]);const t=[e[0]];for(let r=1,n=e.length;r<n;r+=1){const i=t[t.length-1],a=e[r];a[0]<=i[1]+1?i[1]=Math.max(i[1],a[1]):t.push(a)}return t}const n4e={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},qzt=new RegExp("["+Object.keys(n4e).join("")+"]","g"),sx=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D
3537F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(qzt,t=>n4e[t]):e=>e;var yY=class{constructor(e,{location:t=sn.location,threshold:r=sn.threshold,distance:n=sn.distance,includeMatches:i=sn.includeMatches,findAllMatches:a=sn.findAllMatches,minMatchCharLength:o=sn.minMatchCharLength,isCaseSensitive:s=sn.isCaseSensitive,ignoreDiacritics:l=sn.ignoreDiacritics,ignoreLocation:c=sn.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:l,ignoreLocation:c},e=s?e:e.toLowerCase(),e=l?sx(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(h,p)=>{this.chunks.push({pattern:h,alphabet:Vzt(h),startIndex:p})},f=this.pattern.length;if(f>32){let h=0;const p=f%32,g=f-p;for(;h<g;)d(this.pattern.substr(h,32),h),h+=32;if(p){const _=f-32;d(this.pattern.substr(_),_)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?sx(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:l,ignoreLocation:c}=this.options,d=[];let f=0,h=!1;this.chunks.forEach(({pattern:g,alphabet:_,startIndex:b})=>{const{isMatch:E,score:S,indices:P}=Uzt(e,g,_,{location:i+b,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});E&&(h=!0),f+=S,E&&P&&d.push(...P)});const p={isMatch:h,score:h?f/this.chunks.length:1};return h&&n&&(p.indices=gY(d)),p}};const jzt=new Set(["fuzzy","include"]);function $zt(e){return e.startsWith("inverse")}const UV=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const r=t===e;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let r=0,n;const i=[],a=e.length;for(;(n=t.indexOf(e,r))>-1;)r=n+a,i.push([n,r-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const r=t.startsWith(e);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const r=!t.startsWith(e);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const r=!t.endsWith(e);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const r=t.endsWith(e);return{isMatch:r,score:r?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const r=t.indexOf(e)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const r=new yY(e,{location:t.location??sn.location,threshold:t.threshold??sn.threshold,distance:t.distance??sn.distance,includeMatches:t.includeMatches??sn.includeMatches,findAllMatches:t.findAllMatches??sn.findAllMatches,minMatchCharLength:t.minMatchCharLength??sn.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??sn.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??sn.ignoreDiacritics,ignoreLocation:t.ignoreLocation??sn.ignoreLocation});return{type:"fuzzy",search(n){return r.searchIn(n)}}}}],bme=UV.length,Wzt="\0",Gzt="|";function Kzt(e){const t=[],r=e.length;let n=0;for(;n<r;){for(;n<r&&e[n]===" ";)n++;if(n>=r)break;let i=n;for(;i<r&&e[i]!==" "&&e[i]!=='"';)i++;if(i<r&&e[i]==='"'){for(i++;i<r;){if(e[i]==='"'){const a=i+1;if(a>=r||e[a]===" "){i++;break}if(e[a]==="$"&&(a+1>=r||e[a+1]===" ")){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<r&&e[i]!==" ";)i++;t.push(e.substring(n,i)),n=i}}return t}function Eme(e,t){const r=e.match(t);return r?r[1]:null}function Yzt(e,t={}){return e.replace(/\\\|/g,Wzt).split(Gzt).map(r=>{const n=Kzt(r.replace(/\u0000/g,"|").trim()).filter(a=>a&&!!a.trim()),i=[];for(let a=0,o=n.length;a<o;a+=1){const s=n[a];let l=!1,c=-1;for(;!l&&++c<bme;){const d=UV[c],f=Eme(s,d.multiRegex);f&&(i.push(d.create(f,t)),l=!0)}if(!l)for(c=-1;++c<bme;){const d=UV[c],f=Eme(s,d.singleRegex);if(f){i.push(d.create(f,t));break}}}return i})}var Xzt=class{constructor(e,{isCaseSensitive:t=sn.isCaseSensitive,ignoreDiacritics:r=sn.ignoreDiacritics,includeMatches:n=sn.includeMatches,minMatchCharLength:i=sn.minMatchCharLength,ignoreLocation:a=sn.ignoreLocation,findAllMatches:o=sn.findAllMatches,location:s=sn.location,threshold:l=sn.threshold,distance:c=sn.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:l,distance:c},e=t?e:e.toLowerCase(),e=r?sx(e):e,this.pattern=e,this.query=Yzt(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?sx(e):e;let a=0;const o=[];let s=0,l=!1;for(let c=0,d=t.length;c<d;c+=1){const f=t[c];o.length=0,a=0,l=!1;for(let h=0,p=f.length;h<p;h+=1){const g=f[h],{isMatch:_,indices:b,score:E}=g.search(e);if(_)a+=1,s+=E,$zt(g.type)&&(l=!0),r&&(jzt.has(g.type)?o.push(...b):o.push(b));else{s=0,a=0,o.length=0,l=!1;break}}if(a){const h={isMatch:!0,score:s/a};return l&&(h.hasInverse=!0),r&&(h.indices=gY(o)),h}}return{isMatch:!1,score:1}}};const VV=[];function _Y(...e){VV.push(...e)}function $I(e,t){for(let r=0,n=VV.length;r<n;r+=1){const i=VV[r];if(i.condition(e,t))return new i(e,t)}return new yY(e,t)}const WI={AND:"$and",OR:"$or"},qV={PATH:"$path",PATTERN:"$val"},jV=e=>
353!!(e[WI.AND]||e[WI.OR]),Zzt=e=>!!e[qV.PATH],Qzt=e=>!zm(e)&&J5e(e)&&!jV(e),wme=e=>({[WI.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function i4e(e,t,{auto:r=!0}={}){const n=i=>{if(Ds(i)){const l={keyId:null,pattern:i};return r&&(l.searcher=$I(i,t)),l}const a=Object.keys(i),o=Zzt(i);if(!o&&a.length>1&&!jV(i))return n(wme(i));if(Qzt(i)){const l=o?i[qV.PATH]:a[0],c=o?i[qV.PATTERN]:i[l];if(!Ds(c))throw new Error(Tzt(l));const d={keyId:vR(l),pattern:c};return r&&(d.searcher=$I(c,t)),d}const s={children:[],operator:a[0]};return a.forEach(l=>{const c=i[l];zm(c)&&c.forEach(d=>{s.children.push(n(d))})}),s};return jV(e)||(e=wme(e)),n(e)}function $V(e,{ignoreFieldNorm:t=sn.ignoreFieldNorm}){let r=1;return e.forEach(({key:n,norm:i,score:a})=>{const o=n?n.weight:null;r*=Math.pow(a===0&&o?Number.EPSILON:a,(o||1)*(t?1:i))}),r}function Jzt(e,{ignoreFieldNorm:t=sn.ignoreFieldNorm}){e.forEach(r=>{r.score=$V(r.matches,{ignoreFieldNorm:t})})}var eHt=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const r=e-1>>1;if(this.comparator(t[e],t[r])<=0)break;const n=t[e];t[e]=t[r],t[r]=n,e=r}}_sinkDown(e){const t=this.heap,r=t.length;let n=e;do{e=n;const i=2*e+1,a=2*e+2;if(i<r&&this.comparator(t[i],t[n])>0&&(n=i),a<r&&this.comparator(t[a],t[n])>0&&(n=a),n!==e){const o=t[e];t[e]=t[n],t[n]=o}}while(n!==e)}};function tHt(e){const t=[];return e.matches.forEach(r=>{if(!ic(r.indices)||!r.indices.length)return;const n={indices:r.indices,value:r.value};r.key&&(n.key=r.key.id),r.idx>-1&&(n.refIndex=r.idx),t.push(n)}),t}function rHt(e,t,{includeMatches:r=sn.includeMatches,includeScore:n=sn.includeScore}={}){return e.map(i=>{const{idx:a}=i,o={item:t[a],refIndex:a};return r&&(o.matches=tHt(i)),n&&(o.score=i.score),o})}const nHt=/[\p{L}\p{M}\p{N}_]+/gu,Sme=new WeakSet;function iHt(e){Sme.has(e)||(Sme.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function aHt(e){if(typeof e=="function"){let t=!1;return r=>{const n=e(r);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>typeof i!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||iHt(e),t=>t.match(e)||[]):t=>t.match(nHt)||[]}function WV({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:r}={}){const n=aHt(r);return{tokenize(i){return e||(i=i.toLowerCase()),t&&(i=sx(i)),n(i)}}}var oHt=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=WV({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const r=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const a of r){this.termSearchers.push(new yY(a,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const o=n.get(a)||0,s=Math.log(1+(i-o+.5)/(o+.5));this.idfWeights.push(s)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let r=0,n=0,i=0,a=0;const o=this.combineAll&&!this.useMask?new Set:null;for(let c=0;c<this.termSearchers.length;c++){const d=this.termSearchers[c].searchIn(e),f=this.idfWeights[c];n+=f,d.isMatch&&(i++,r+=f*(1-d.score),d.indices&&t.push(...d.indices),this.combineAll&&(this.useMask?a|=1<<c:o.add(c)))}if(i===0)return{isMatch:!1,score:1};const s=n>0?1-r/n:0,l={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(l.indices=gY(t)),this.combineAll&&(this.useMask?l.matchedMask=a:l.matchedTerms=o,l.termCount=this.numTerms),l}};function fB(e,t,r,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(r,(e.docFieldCount.get(r)||0)+1);const a=new Set(i);let o=e.docTermFieldHits.get(r);o||(o=new Map,e.docTermFieldHits.set(r,o));for(const s of a)o.set(s,(o.get(s)||0)+1),e.df.set(s,(e.df.get(s)||0)+1)}function a4e(e,t,r,n){const{i,v:a,$:o}=t;if(a!==void 0){fB(e,a,i,n);return}if(o)for(let s=0;s<r;s++){const l=o[s];if(l)if(Array.isArray(l))for(const c of l)fB(e,c.v,i,n);else fB(e,l.v,i,n)}}function sHt(e,t,r){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)a4e(n,i,t,r);return n}function lHt(e,t,r,n){a4e(e,t,r,n)}function cHt(e,t){const r=e.docFieldCount.get(t);if(r===void 0)return;e.fieldCount-=r,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,a]of n){const o=(e.df.get(i)||0)-a;o<=0?e.df.delete(i):e.df.set(i,o)}e.docTermFieldHits.delete(t)}}function Cme(e,t){if(t.length===0)return;const r=Array.from(new Set(t)).sort((s,l)=>s-l);for(const s of r)cHt(e,s);const n=s=>{let l=0,c=r.length;for(;l<c;){const d=l+c>>>1;r[d]<s?l=d+1:c=d}return s-l},i=r[0],a=new Map;for(const[s,l]of e.docFieldCount)a.set(s>i?n(s):s,l);e.docFieldCount=a;const o=new Map;for(const[s,l]of e.docTermFieldHits)o.set(s>i?n(s):s,l);e.docTermFieldHits=o}var Hm=class{constructor(e,t,r){this.options={...sn,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Izt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=$I(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof vY))throw new Error(xzt);if(this._myIndex=t||r4e(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const r=WV({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=sHt(this._myIndex.records,this._myIndex.keys.length,r)}this._invalidateSearcherCache()}add(e){if(!ic(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const r=WV({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});lHt(this._invertedIndex,t,this._myIndex.keys.length,r)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],r=[];for(let n=0,i=this._docs.length;n<i;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),r.push(n));if(r.length){this._invertedIndex&&Cme(this._invertedIndex,r);const n=new Set(r);this._docs=this._docs.filter((i,a)=>!n.has(a)),this._myIndex.removeAll(r),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(HV);this._invertedIndex&&Cme(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}
353_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:r=-1}=t||{},{includeMatches:n,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(Ds(e)&&!e.trim()){let h=this._docs.map((p,g)=>({item:p,refIndex:g}));return mR(r)&&r>-1&&(h=h.slice(0,r)),h}const l=a&&mR(r)&&r>0&&Ds(e),c=o,d=(h,p)=>c(h,p)||h.idx-p.idx;let f;if(l){const h=new eHt(r,d);Ds(this._docs[0])?this._searchStringList(e,{heap:h,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:h,ignoreFieldNorm:s}),f=h.extractSorted()}else f=Ds(e)?Ds(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Jzt(f,{ignoreFieldNorm:s}),a&&f.sort(Ds(e)?d:c),mR(r)&&r>-1&&(f=f.slice(0,r));return rHt(f,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){const n=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:s,i:l,n:c})=>{if(!ic(s))return;const d=n.searchIn(s);if(d.isMatch){const f={score:d.score,value:s,norm:c,indices:d.indices};i&&(f.matchedMask=d.matchedMask,f.matchedTerms=d.matchedTerms,f.termCount=d.termCount);const h=[f];if(!i||this._coversAllTokens(h)){const p={item:s,idx:l,matches:h};t?(p.score=$V(p.matches,{ignoreFieldNorm:r}),t.insert(p)):o.push(p)}}}),o}_searchLogical(e){const t=i4e(e,this.options),r=this._normalizedKeys(),n=(s,l,c)=>{if(!("children"in s)){const{keyId:p,searcher:g}=s;let _;return p===null?(_=[],r.forEach((b,E)=>{_.push(...this._findMatches({key:b,value:l[E],searcher:g}))})):_=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(l,p),searcher:g}),_&&_.length?[{idx:c,item:l,matches:_}]:[]}const{children:d,operator:f}=s,h=[];for(let p=0,g=d.length;p<g;p+=1){const _=d[p],b=n(_,l,c);if(b.length)h.push(...b);else if(f===WI.AND)return[]}return h},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:s,i:l})=>{if(ic(s)){const c=n(t,s,l);c.length&&(a.has(l)||(a.set(l,{idx:l,item:s,matches:[]}),o.push(a.get(l))),c.forEach(({matches:d})=>{a.get(l).matches.push(...d)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){const n=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:l,i:c})=>{if(!ic(l))return;const d=[];let f=!1,h=!1;if(o.forEach((p,g)=>{const _=this._findMatches({key:p,value:l[g],searcher:n});_.length?(d.push(..._),_[0].hasInverse&&(h=!0)):f=!0}),!(h&&f)&&d.length&&(!i||this._coversAllTokens(d))){const p={idx:c,item:l,matches:d};t?(p.score=$V(p.matches,{ignoreFieldNorm:r}),t.insert(p)):s.push(p)}}),s}_findMatches({key:e,value:t,searcher:r}){if(!ic(t))return[];const n=[];if(zm(t))t.forEach(({v:i,i:a,n:o})=>{if(!ic(i))return;const s=r.searchIn(i);if(s.isMatch){const l={score:s.score,key:e,value:i,idx:a,norm:o,indices:s.indices,hasInverse:s.hasInverse};s.termCount!==void 0&&(l.matchedMask=s.matchedMask,l.matchedTerms=s.matchedTerms,l.termCount=s.termCount),n.push(l)}});else{const{v:i,n:a}=t,o=r.searchIn(i);if(o.isMatch){const s={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(s.matchedMask=o.matchedMask,s.matchedTerms=o.matchedTerms,s.termCount=o.termCount),n.push(s)}}return n}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let i=0;i<e.length;i++)n|=e[i].matchedMask||0;return n===2**t-1}const r=new Set;for(let n=0;n<e.length;n++){const i=e[n].matchedTerms;if(i)for(const a of i)r.add(a)}return r.size===t}};Hm.version="7.5.0";Hm.createIndex=r4e;Hm.parseIndex=zzt;Hm.config=sn;Hm.match=function(e,t,r){if(r&&r.useTokenSearch)throw new Error(Ozt);return $I(e,{...sn,...r}).searchIn(t)};Hm.parseQuery=i4e;_Y(Xzt);_Y(oHt);Hm.use=function(...e){e.forEach(t=>_Y(t))};var o4e=Hm,uHt=sOe();const dHt=et(uHt),fHt={includeScore:!0,ignoreLocation:!0,threshold:.3,keys:["name"],getFn:(e,t)=>{const r=o4e.config.getFn(e,t);return dHt(r)}};function hHt(){const e=at(({placeOrder:s})=>s.catalog.catalogSearchedText),t=at(({placeOrder:s})=>s.catalog.products),[r,n]=u.useState(null),[i,a]=u.useState(null),o=u.useMemo(()=>Object.values(t||{}),[t]);return u.useEffect(()=>{o?.length>0&&n(new o4e(o,fHt))},[o]),u.useEffect(()=>{if(r&&e){const s=o.filter(l=>l.custom_code===e);if(s?.length>0)a(s);else{const l=r.search(e,{limit:21});a(l.map(({item:c})=>c))}}else e||a(null)},[r,o,e]),i}function pHt(){const e=at(({placeOrder:a})=>a.catalog.categories),t=at(({placeOrder:a})=>a.catalog.selectedCategory),r=at(({placeOrder:a})=>a.catalog.loading),n=hHt(),i=u.useMemo(()=>t&&e[t]?e[t].items:[],[e,t]);return!r&&(!i?.length&&!n||n&&!n.length)?u.createElement("div",{className:"flex h-full w-full items-center justify-center",style:{backgroundColor:"#F4F5F7"}},u.createElement(dl,{title:"Nenhum produto encontrado"})):u.createElement("div",{className:"flex-1 overflow-auto p-8 sm:p-12 md:p-16",
353style:{backgroundColor:"#F4F5F7"}},u.createElement("div",{className:"grid grid-cols-1 gap-8 sm:gap-12 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},r&&[1,2,3,4,5,6,7,8,9].map(a=>u.createElement(Ezt,{key:a})),!r&&(n||i).map(a=>u.createElement(bzt,{key:a.id,product:a}))))}function mHt(){const e=An(),t=at(({placeOrder:c})=>c.catalog.catalogSearchedText),[r,n]=u.useState(""),i=u.useRef(null),a=u.useCallback(()=>{i.current&&(i.current.focus(),i.current.select())},[]);i5("b",a);const o=u.useRef(!0);u.useEffect(()=>{if(o.current){o.current=!1;return}t===""&&n("")},[t]);const s=u.useRef(a5(c=>{e(j3e(c))},500)).current;u.useEffect(()=>{s(r)},[s,r]);const l=u.useCallback(()=>{n("")},[]);return u.createElement("div",{className:"flex h-64 w-full items-center space-x-12 border-0 border-b-1 border-solid border-gray-200 p-12"},u.createElement("div",{className:"flex p-8 text-gray-400"},u.createElement(oIe,null)),u.createElement(Hu,{inputRef:i,value:r,onChange:c=>n(c.target.value),onFocus:c=>c.target.select(),placeholder:`Encontre produtos por nome ou código PDV${me.isMobile()?"":" (Ctrl + b)"}`,className:"w-full text-16 text-gray-600 md:text-18"}),r&&u.createElement(cr,{onClick:l,className:"text-gray-400 transition-colors hover:text-gray-700"},u.createElement(Aa,{color:"inherit"})))}function s4e({openCategories:e}){return u.createElement(u.Fragment,null,u.createElement(Py,{mdUp:!0},u.createElement(vzt,{openCategories:e})),u.createElement(mHt,null),u.createElement(pHt,null))}function vHt(){const e=vc(),[t,r]=u.useState(!1),n=at(C2),i=at(sY),a=u.useRef(0),o=n.reduce((s,l)=>s+l.quantity,0);return u.useEffect(()=>{o>a.current&&r(!0),a.current=o},[o]),u.createElement("div",{className:"border-0 border-t-1 border-solid border-gray-200 p-12"},u.createElement(fr,{variant:"contained",color:"primary",onAnimationEnd:()=>r(!1),onClick:()=>e.goBack(),className:Ft("flex items-center justify-between rounded-8 px-16 py-12 text-16 font-bold shadow-none",t&&"bounce"),fullWidth:!0},u.createElement("div",{className:"flex items-center"},"VER CARRINHO"),u.createElement("span",null,me.formatMonetaryValue(i))))}const gHt=u.memo(vHt);function yHt(){const[e,t]=u.useState(!1),r=u.useCallback(()=>t(!0),[]),n=u.useCallback(()=>t(!1),[]);return u.createElement(S2,{dialogSearch:"catalogo",dialogProps:{PaperProps:{className:"shadow-lg rounded-12 h-full"}}},u.createElement("div",{className:"flex h-full flex-col"},u.createElement(s4e,{openCategories:r}),u.createElement(qAe,{anchor:"right",open:e,onClose:()=>t(!1)},u.createElement("div",{className:"flex h-full w-288 flex-col border-0 border-l-1 border-solid border-gray-200"},u.createElement(BV,{closeCategories:n}))),u.createElement(gHt,null)))}const l4e=x.createContext(),_Ht=l4e.Provider,X4=()=>x.useContext(l4e);var JE={},xme;function bHt(){if(xme)return JE;xme=1;var e=$t(),t=Wt();Object.defineProperty(JE,"__esModule",{value:!0}),JE.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");return JE.default=i,JE}var EHt=bHt();const bY=et(EHt);function Tme({product:e}){const t=(e.addOn||[]).reduce((r,n)=>[...r,...n.subitems],[]);return!t.length&&!e.observation?null:u.createElement("div",null,t.length>0&&u.createElement("div",{className:"flex w-full flex-wrap text-14 font-light text-gray-600"},t.map(({id:r,name:n,quantity:i,warning:a},o,s)=>u.createElement("span",{key:r,className:Ft(a&&"font-medium text-red-dark",o<s.length-1&&"mr-4")},i>1?`${i}x ${n}`:n,o<s.length-1&&", "))),e.observation&&u.createElement("div",{className:"mt-4 text-14 font-semibold text-gray-600"},"OBS: ",e.observation))}function wHt({product:e}){const t=An(),r=Lr(),n=vc(),i=u.useCallback(l=>{const{id:c,cartProductId:d}=l;n.push({search:e.kind==="combo"?`?comboId=${c}&editCombo=true`:`?productId=${c}&editProduct=true`}),e.kind==="combo"?t(aBt(d)):t(ZFt(d))},[t,n,e.kind]),a=u.useCallback(l=>{t(UFt(l))},[t]),o=me.formatMonetaryValue(e.fullUnitPrice),s=me.formatMonetaryValue(xi(e.quantity*e.fullUnitPrice,2));return u.createElement("div",{className:"mt-12 flex flex-1 cursor-pointer flex-col space-y-4 rounded-6 p-12",style:{backgroundColor:"#F4F5F7"},onClick:()=>{e.paid_with_points?r.info("Prêmios não podem ser editados"):i(e)}},u.createElement("div",{className:"flex items-center justify-between text-14 font-semibold text-gray-600"},u.createElement("div",{className:"flex-1"},e.name),u.createElement(cr,{size:"small",onClick:l=>{l.stopPropagation(),e.paid_with_points?r.info("Prêmios não podem ser removidos"):a(e.cartProductId)}},u.createElement(Yn,{title:"Remover este produto",placement:"top",arrow:!0},u.createElement(bY,{fontSize:"inherit",color:"inherit",className:"text-18 text-gray-400"})))),e.kind==="combo"?e.comboSteps.map(l=>u.createElement("div",{key:l.cartProductId},u.createElement("div",{className:Ft("text-14 font-semibold",l.warning?"font-medium text-red-dark":"text-gray-600")},"- ",l.name),u.createElement("div",{className:"px-12"},u.createElement(Tme,{product:l})))):u.createElement(Tme,{product:e}),u.createElement("div",{className:"flex items-center justify-between pt-4 text-14 text-gray-600"},u.createElement("div",null,e.quantity.toString().replace(".",",")," x ",o),u.createElement("div",{className:Ft("inline-flex flex-shrink-0 items-center justify-end space-x-8 font-bold",e.paid_with_points&&"line-through")},e.paid_with_points&&u.createElement("img",{src:V4,alt:"",className:"h-16 w-16"}),u.createElement("span",null,s))))}function SHt(){const e=An(),t=at(C2),r=X4();return u.createElement("div",{className:"flex-1"},u.createElement("div",{className:"flex min-h-36 items-center justify-between pl-4 pt-4"},u.createElement("div",{className:"text-16 font-bold text-gray-600"},"Carrinho"),t.length>0&&u.createElement(fr,{variant:"text",color:"default",size:"small",className:"text-gray-500",onClick:()=>e(t1())},"Limpar")),t.length===0&&u.createElement("div",{className:"flex items-center justify-center"},u.createElement(dl,{title:"Carrinho vazio",className:Ft(r(Np.emptyCart)&&"text-red-light")})),t.map(n=>u.createElement(wHt,{key:n.cartProductId,product:n})))}const CHt=e=>e.replace(/\D/g,"")?.length>11?[/\d/,/\d/,".",/\d/,/\d/,/\d/,".",/\d/,/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/]:[/\d/,/\d/,/\d/,".",/\d/,/\d/,/\d/,".",/\d/,/\d/,/\d/,"-",/\d/,/\d/];function xHt(e){const{inputRef:t,mask:r,...n}=e;return u.createElement(x4,{...n,ref:i=>{t(i?i.inputElement:null)},mask:r||CHt,guide:!1,keepCharPositions:!1,placeholderChar:" "})}var ew={},Ame;function THt(){if(Ame)return ew;Ame=1;var e=$t(),t=Wt();Object.defineProperty(ew,"__esModule",{value:!0}),ew.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15.88 9.29L12 13.17 8.12 9.29a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"}),"ExpandMoreRounded");return ew.default=i,ew}var AHt=THt();const uc=et(AHt);var tw={},Pme;function PHt(){if(Pme)return tw;Pme=1;var e=$t(),t=Wt();Object.defineProperty(tw,"__esModule",{value:!0}),tw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 9h4c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1s.45 1 1 1zm0 4h4c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1s.45 1 1 1zm0 4h4c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1s.45 1 1 1zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7zM20 3H4c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 16H5V5h14v14z"}),"ListAltRounded");return tw.default=i,tw}var RHt=PHt();const c4e=et(RHt),Js=u.forwardRef(({primary:e,secondary:t,tertiary:r,className:n,Icon:i,Action:a,onClick:o,error:s,disabled:l},c)=>{const d=f=>{o&&o(f)};return u.createElement("div",{ref:c,className:Ft(n,"flex w-full items-center space-x-12 px-12 py-8",s&&"bg-red-lightest",o&&"cursor-pointer hover:bg-gray-50",l&&"cursor-default opacity-50"),onClick:d},u.createElement("div",{className:"flex h-full flex-1 items-center space-x-16 truncate"},u.createElement("div",{className:Ft("flex items-center",s?"text-red-dark":"text-gray-400")},i),u.createElement("div",{className:"flex flex-col truncate"},u.createElement("span",{className:Ft("truncate font-semibold",s?"text-red-dark":"text-gray-600")},e),t&&u.createElement("span",{className:Ft("truncate text-14 font-light",s?"text-red-light":"text-gray-500")},t),r&&u.createElement("span",{className:Ft("truncate text-14 font-light",s?"text-red-light":"text-gray-500")},r))),a)});function OHt(){const e=An(),t=at(({globalCompany:f})=>f.company.custom_fields),r=at(({globalCompany:f})=>f.company.flags?.document_on_order_invoice),n=at(({placeOrder:f})=>f.placeOrder.checkout.customFieldsData),i=at(({placeOrder:f})=>f.placeOrder.checkout.invoiceDocument),[a,o]=u.useState(!1);u.useEffect(()=>{t?.some(f=>f.required)&&o(!0)},[t]);const s=u.useRef(!0);u.useEffect(()=>{if(s.current){s.current=!1;const f=Oo(t?.map(p=>({...p,options:typeof p.options=="string"?JSON.parse(p.options):p.options})),"id"),h=Oo(n.map(p=>({...p,options:typeof p.options=="string"?JSON.parse(p.options):p.options})),"id");e(cB(Object.values(Pc(f,h))?.sort((p,g)=>p.id-g.id)))}},[t,n,e]);const l=(f,h)=>{e(cB(n.map(p=>p.id===h.id?{...p,value:f}:p)))},c=u.useCallback(f=>{e(IFt(f.target.value))},[e]),d=(f,h)=>{const p=h.options.find(b=>
353b.option===f)?.additional_fee,g=n.map(b=>b.id===h.id?{...b,value:f,additional_fee:p}:b);e(cB(g));const _=g.reduce((b,E)=>b+(E.additional_fee||0),0);e(e1({additional_fee:_||null}))};return t?.length?u.createElement("div",{className:"overflow-hidden rounded-8 border-1 border-solid border-gray-200"},u.createElement(Js,{primary:"Informações adicionais",Icon:u.createElement(c4e,{className:"text-gray-400"}),Action:u.createElement(cr,{size:"small"},u.createElement(uc,{className:Ft("transform text-gray-400 transition-transform duration-500",a&&"rotate-180")})),onClick:()=>o(f=>!f)}),u.createElement(Oh,{in:a},u.createElement("div",{className:"space-y-16 border-0 border-t-1 border-dashed border-gray-200 px-12 py-16"},n.map(f=>u.createElement(u.Fragment,{key:f.id},f.kind==="text"&&u.createElement(Tr,{label:f.title,value:f.value,onChange:h=>l(h.target.value,f),required:f.required,placeholder:f.placeholder,variant:"outlined",size:"small",fullWidth:!0}),f.kind==="select"&&u.createElement(Tr,{select:!0,label:f.title,value:f.value||"",onChange:h=>d(h.target.value,f),variant:"outlined",required:f.required,size:"small",fullWidth:!0},u.createElement(ln,{value:""},"Nenhuma opção selecionada"),f.options.map((h,p)=>u.createElement(ln,{key:`${h.option}-${p}`,value:h.option},u.createElement("div",{className:"space-x-8"},u.createElement("span",null,h.option),h.additional_fee&&u.createElement("strong",null,"(+ ",me.formatMonetaryValue(h.additional_fee),")"))))),f.kind==="date"&&u.createElement(tY,{label:f.title,value:f.value?qe(f.value,"DD/MM/YYYY"):null,onChange:h=>l(h?.format("DD/MM/YYYY"),f),disablePast:!0,maxDate:f.options?.days_limit>0?qe().add(parseInt(f.options.days_limit),"day"):void 0,autoOk:!0,clearable:!0,format:"DD/MM/YYYY",variant:"dialog",inputVariant:"outlined",clearLabel:"LIMPAR",cancelLabel:"CANCELAR",fullWidth:!0,size:"small"}))),r&&u.createElement(Tr,{id:"cpf",label:"CPF na nota",value:i,onChange:c,InputProps:{inputComponent:xHt},size:"small",variant:"outlined",fullWidth:!0})))):null}var rw={},Rme;function IHt(){if(Rme)return rw;Rme=1;var e=$t(),t=Wt();Object.defineProperty(rw,"__esModule",{value:!0}),rw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M6 19h12v2H6z"}),"Minimize");return rw.default=i,rw}var kHt=IHt();const NHt=et(kHt);function DHt(){const e=An(),t=vc(),{basePathname:r,simplifiedVersion:n}=u.useContext(R2),i=at(({placeOrder:s})=>s.placeOrder.orderInEdit);function a(){t.push(`/${r}`),e(HS()),e(t1())}function o(){e(AFt())&&a()}return u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between border-0 border-b-1 border-solid border-gray-200 px-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},i?"Editando pedido":"Novo pedido"),u.createElement("div",{className:"space-x-8"},!n&&!i&&u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:o},u.createElement(Yn,{title:"Minimizar janela"},u.createElement(NHt,{color:"inherit"}))),u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:a},u.createElement(Yn,{title:"Fechar janela"},u.createElement(Dm,{color:"inherit"})))))}function MHt({internalObservation:e,updateInternalObservation:t}){const[r,n]=u.useState(e);return u.createElement("div",{className:"cursor-pointer overflow-hidden rounded-8 border-1 border-solid border-gray-200"},u.createElement(Js,{primary:"Observação do pedido",Icon:u.createElement(fIe,{className:"text-gray-400"}),Action:u.createElement(cr,{size:"small"},u.createElement(uc,{className:Ft("transform text-gray-400 transition-transform duration-500",r&&"rotate-180")})),onClick:()=>n(i=>!i)}),u.createElement(Oh,{in:r},u.createElement("div",{className:"space-y-8 border-0 border-t-1 border-dashed border-gray-200 px-12 py-16"},u.createElement(QIe,{internalObservation:e,updateInternalObservation:t}))))}var nw={},Ome;function LHt(){if(Ome)return nw;Ome=1;var e=$t(),t=Wt();Object.defineProperty(nw,"__esModule",{value:!0}),nw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"}),"ExpandLessRounded");return nw.default=i,nw}var FHt=LHt();const BHt=et(FHt);function zHt(){const[e,t]=u.useState(!1),r=at(({placeOrder:c})=>c.placeOrder.checkout.orderType),n=at(x2),i=at(aY),a=at(oY),o=at(G3e),s=at(K3e),l=at(W3e);return u.createElement(u.Fragment,null,u.createElement("div",{onClick:()=>t(c=>
353!c),className:Ft("flex cursor-pointer items-center justify-center px-16 text-gray-600 hover:bg-gray-50","border-0 border-t-1 border-solid border-gray-200")},u.createElement(BHt,{className:Ft("transform text-gray-400 transition-transform duration-500",e&&"rotate-180")})),u.createElement(Oh,{in:e},u.createElement("div",{className:"mx-12 space-y-4 pb-4"},u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("span",null,"Subtotal"),u.createElement("span",null,me.formatMonetaryValue(n))),r==="delivery"&&u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("span",null,"Taxa de entrega"),!i&&i!==0&&u.createElement("span",null,"A definir"),i===0&&u.createElement("span",{className:"text-green-500 font-medium"},"Grátis"),i>0&&u.createElement("span",null,me.formatMonetaryValue(i))),s?u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("span",null,"Taxa da maquineta"),u.createElement("span",null,me.formatMonetaryValue(s))):null,a?u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("span",null,"Taxa adicional"),u.createElement("span",null,me.formatMonetaryValue(a))):null,l?.value?u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("div",{className:"flex flex-1 items-center space-x-4"},u.createElement("span",null,"Prêmios"),u.createElement("img",{src:V4,alt:"",className:"h-3.5 w-3.5"}),u.createElement("span",{className:"text-14"},`(${l.total_points} pontos)`)),u.createElement("span",null,me.formatMonetaryValue(-l.value))):null,o?u.createElement("div",{className:"flex items-center justify-between p-4 text-gray-600"},u.createElement("span",null,"Desconto"),u.createElement("span",null,me.formatMonetaryValue(-o))):null)))}var iw={},Ime;function HHt(){if(Ime)return iw;Ime=1;var e=$t(),t=Wt();Object.defineProperty(iw,"__esModule",{value:!0}),iw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M14.94 10.11l-4.4 4.42-1.6-1.6c-.29-.29-.77-.29-1.06 0-.29.29-.29.77 0 1.06L10 16.11c.29.29.77.29 1.06 0L16 11.17c.29-.29.29-.77 0-1.06-.29-.29-.77-.29-1.06 0zm6.24-5.1L18.1 2.45c-.42-.35-1.05-.3-1.41.13-.35.42-.29 1.05.13 1.41l3.07 2.56c.42.35 1.05.3 1.41-.13.36-.42.3-1.05-.12-1.41zM4.1 6.55l3.07-2.56c.43-.36.49-.99.13-1.41-.35-.43-.98-.48-1.4-.13L2.82 5.01c-.42.36-.48.99-.12 1.41.35.43.98.48 1.4.13zM12 4c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"}),"AlarmOnRounded");return iw.default=i,iw}var UHt=HHt();const GV=et(UHt);qe.locale("pt-BR");const VHt=["dom","seg","ter","qua","qui","sex","sáb"],qHt=Rh({menu:{width:"min(calc(100% - 2.4rem), calc(38.4rem - 2.4rem))"}});function jHt(){const e=An(),t=qHt(),r=at(({globalCompany:S})=>S.company.flags),n=at(({placeOrder:S})=>S.placeOrder.checkout.deliveryTime),i=at(({placeOrder:S})=>S.placeOrder.checkout.schedulingInfo.selectedDate),a=at(({placeOrder:S})=>S.placeOrder.checkout.schedulingInfo.selectedTime),o=at(({placeOrder:S})=>S.placeOrder.orderInEdit),[s,l]=u.useState(!1),[c,d]=u.useState(null),f=X4(),h=u.useRef(null),p=u.useMemo(()=>({selectedDate:i,selectedTime:a}),[i,a]);u.useEffect(()=>{r&&!o&&!r.work_with_normal_ordering&&r.work_with_scheduled_order&&e(lB("scheduling"))},[r,e,o]);const g=u.useCallback(S=>{S.orderTiming&&e(lB(S.orderTiming)),S.selectedDate&&S.selectedTime&&e(DFt({selectedDate:S.selectedDate,selectedTime:S.selectedTime})),l(!1)},[e]),_=()=>{d(null)};if(!r?.work_with_scheduled_order)return null;const b=i&&a?`${VHt[qe(i,"DD/MM/YYYY").day()]}, ${i} (${a})`:"Informe a data de agendamento",E=[n==="scheduling"&&u.createElement(ln,{key:"delivery",classes:{root:"p-0"}},u.createElement(Js,{primary:i&&a?"Editar agendamento":"Realizar agendamento",secondary:i&&a?"Modifique a data de agendamento":"Informe a data de agendamento",Icon:u.createElement(ps,{color:"inherit"}),onClick:()=>{_(),l(!0)}})),n==="now"&&u.createElement(ln,{key:"now",classes:{root:"p-0"}},u.createElement(Js,{primary:"Agendar pedido",secondary:"Informe a data de agendamento",Icon:u.createElement(wV,{color:"inherit"}),onClick:()=>{_(),l(!0)}})),n==="scheduling"&&u.createElement(ln,{key:"scheduling",classes:{root:"p-0"}},u.createElement(Js,{primary:"Pedido para agora",secondary:"O pedido será entregue assim que possível",Icon:u.createElement(GV,{color:"inherit"}),onClick:()=>{_(),e(lB("now"))}}
353))].filter(Boolean);return u.createElement(u.Fragment,null,u.createElement("div",{ref:h,className:"overflow-hidden rounded-8 border-1 border-solid border-gray-200"},n==="scheduling"?u.createElement(Js,{primary:i&&a?"Agendado para":"Agendar pedido",secondary:b,Icon:u.createElement(wV,{color:"inherit"}),Action:u.createElement(cr,{size:"small"},u.createElement(uc,{className:"text-gray-400"})),onClick:S=>{S.stopPropagation(),E.length>0?d(h.current):l(!0)},error:f(Np.missingSchedulingDate)}):u.createElement(Js,{primary:"Pedido para agora",Icon:u.createElement(GV,{color:"inherit"}),Action:u.createElement(cr,{size:"small"},u.createElement(uc,{className:"text-gray-400"})),onClick:()=>d(h.current)})),u.createElement(Zc,{anchorEl:c,open:!!c,onClose:_,getContentAnchorEl:null,autoFocus:!1,classes:{paper:Ft("shadow-sm rounded-6 mt-4 border-1 border-solid border-gray-200",t.menu),list:"p-0"},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},E.map(S=>S)),u.createElement(SIe,{open:s,onClose:()=>l(!1),onSubmit:g,schedulingData:p,orderInEdit:o}))}var aw={},kme;function $Ht(){if(kme)return aw;kme=1;var e=$t(),t=Wt();Object.defineProperty(aw,"__esModule",{value:!0}),aw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"}),"HomeRounded");return aw.default=i,aw}var WHt=$Ht();const EY=et(WHt);var ow={},Nme;function GHt(){if(Nme)return ow;Nme=1;var e=$t(),t=Wt();Object.defineProperty(ow,"__esModule",{value:!0}),ow.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12.72 11l-2 2h-.77l-.25-.69c-.18-.48-.42-.92-.72-1.31h3.74m2.69-6H11v2h3.59l2 2H5c-2.8 0-5 2.2-5 5s2.2 5 5 5c2.46 0 4.45-1.69 4.9-4h1.65l2.77-2.77c-.21.54-.32 1.14-.32 1.77 0 2.8 2.2 5 5 5s5-2.2 5-5c0-2.65-1.97-4.77-4.56-4.97L15.41 5zM19 17c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zM5 17c-1.63 0-3-1.37-3-3s1.37-3 3-3c1.28 0 2.4.85 2.82 2H5v2h2.82C7.4 16.15 6.28 17 5 17z"}),"MotorcycleOutlined");return ow.default=i,ow}var KHt=GHt();const GI=et(KHt);var sw={},Dme;function YHt(){if(Dme)return sw;Dme=1;var e=$t(),t=Wt();Object.defineProperty(sw,"__esModule",{value:!0}),sw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20.16 7.8c-.09-.46-.5-.8-.98-.8H4.82c-.48 0-.89.34-.98.8L3 12v1c0 .55.45 1 1 1v5c0 .55.45 1 1 1h8c.55 0 1-.45 1-1v-5h4v5c0 .55.45 1 1 1s1-.45 1-1v-5c.55 0 1-.45 1-1v-1l-.84-4.2zM12 18H6v-4h6v4zM5 6h14c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),"StoreMallDirectoryRounded");return sw.default=i,sw}var XHt=YHt();const KI=et(XHt);async function ZHt(e,t){const r=await ht.post(`/api/v1/company/client/${e}/addresses`,t);if(r.status===201&&r.data.status!==500)return r.data;throw Error(r.data.message)}async function wY(e,t){const{id:r}=t,n=await ht.put(`/api/v1/company/client/${e}/addresses/${r}`,t);if(n.status===200&&n.data.status!==500)return n.data;throw Error(n.data.message)}async function QHt(e,t){const r=await ht.delete(`/api/v1/company/client/${e}/addresses/${t}`);if(r.status===200&&r.data.status!==500)return r.data;throw Error(r.data.message)}async function Err(e){const t=me.queryParamsObjectToString(e);await ht.get(`/api/v2/reports/company/clients?${t}`)}async function JHt(e){const t=await ht.delete(`/api/v1/company/clients/${e}`);if(t.status===200&&t.data.status!==500)return t.data;throw Error(t.data.message)}const YI={AC:"Acre",AL:"Alagoas",AP:"Amapá",AM:"Amazonas",BA:"Bahia",CE:"Ceará",DF:"Distrito Federal",ES:"Espírito Santo",GO:"Goiás",MA:"Maranhão",MT:"Mato Grosso",MS:"Mato Grosso do Sul",MG:"Minas Gerais",PA:"Pará",PB:"Paraíba",PR:"Paraná",PE:"Pernambuco",PI:"Piauí",RJ:"Rio de Janeiro",RN:"Rio Grande do Norte",RS:"Rio Grande do Sul",RO:"Rondônia",RR:"Roraima",SC:"Santa Catarina",SP:"São Paulo",SE:"Sergipe",TO:"Tocantins"},eUt=Object.keys(YI);function KV(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}const u4e=6e4,d4e=36e5;function tUt(e){const t=KV(e);return t.setHours(23,59,59,999),t}function rUt(e,t){const r=KV(e),n=KV(t);return r.getTime()>n.getTime()}function nUt(e,t){const n=sUt(e);let i;if(n.date){const l=lUt(n.date,2);i=cUt(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let o=0,s;if(n.time&&(o=uUt(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(s=dUt(n.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(a+o),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return new Date(a+o+s)}
353const lP={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},iUt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,aUt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,oUt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sUt(e){const t={},r=e.split(lP.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],lP.timeZoneDelimiter.test(t.date)&&(t.date=e.split(lP.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const i=lP.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function lUt(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function cUt(e,t){if(t===null)return new Date(NaN);const r=e.match(iUt);if(!r)return new Date(NaN);const n=!!r[4],i=lw(r[1]),a=lw(r[2])-1,o=lw(r[3]),s=lw(r[4]),l=lw(r[5])-1;if(n)return vUt(t,s,l)?fUt(t,s,l):new Date(NaN);{const c=new Date(0);return!pUt(t,a,o)||!mUt(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,o)),c)}}function lw(e){return e?parseInt(e):1}function uUt(e){const t=e.match(aUt);if(!t)return NaN;const r=hB(t[1]),n=hB(t[2]),i=hB(t[3]);return gUt(r,n,i)?r*d4e+n*u4e+i*1e3:NaN}function hB(e){return e&&parseFloat(e.replace(",","."))||0}function dUt(e){if(e==="Z")return 0;const t=e.match(oUt);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return yUt(n,i)?r*(n*d4e+i*u4e):NaN}function fUt(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const hUt=[31,null,31,30,31,30,31,31,30,31,30,31];function f4e(e){return e%400===0||e%4===0&&e%100!==0}function pUt(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(hUt[t]||(f4e(e)?29:28))}function mUt(e,t){return t>=1&&t<=(f4e(e)?366:365)}function vUt(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function gUt(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function yUt(e,t){return t>=0&&t<=59}const _Ut=tUt(nUt("2026-05-20"));function bUt(){return!rUt(new Date,_Ut)}const pB={zip_code:"",street:"",house_number:"",address_complement:"",neighborhood:"",city:"",state:"",landmark:"",address_block:"",address_lot:"",latitude:"",longitude:""},EUt=["zip_code","street","house_number","neighborhood","city","state"],wUt=e=>e==null?"":typeof e=="object"?String(e.name??"").trim():String(e).trim();function XI(e){return e?EUt.map(t=>`${t}:${wUt(e[t])}`).join("|"):""}function Mme(e){return{estimated_time:null,status:"ok",value:e,delivery_man_fee:null}}async function SUt(e){const t=await H7t(e);if(t)return{street:t.logradouro||"",neighborhood:t.bairro||"",city:t.localidade||"",state:t.uf||"",zip_code:t.cep||""};throw Error("Não foi possível encontrar o CEP")}function h4e(e,t){return t?XI(e)!==XI(t):!0}function p4e(e){if(!e)return!1;const t=e.latitude,r=e.longitude;if(t==null||r==null||!String(t).trim()||!String(r).trim())return!1;const n=Number(t),i=Number(r);return Number.isFinite(n)&&Number.isFinite(i)}async function m4e(e){const{street:t,house_number:r,address_block:n,address_lot:i,neighborhood:a,city:o,state:s,zip_code:l,latitude:c,longitude:d}=e,f=await ht.post("/api/v1/company/order/calculate_tax",{calculate_tax:{street:t,house_number:r,address_block:n,address_lot:i,neighborhood:a?.name||a,city:o,state:s,zip_code:l,latitude:c,longitude:d}});if(f.status===200&&f.data.status!==500)return f.data;throw Error("Não foi possível calcular a taxa de entrega")}const Lme=e=>e!=null&&!Number.isNaN(Number(e))&&Number(e)!==0;async function CUt(e,t){const n=h4e(e,t)?Em(e,["latitude","longitude"]):e,i=await m4e(n),{status:a,estimated_time:o,value:s,delivery_man_fee:l,debug_info:c}=i;if(a!=="ok")return{ok:!1,reason:"out_of_range"};const d={estimated_time:o,value:s||s===0?me.currencyStringToFloat(s):null,delivery_man_fee:l??null,status:a},f=c?.destination?.latitude,h=c?.destination?.longitude,p={};return Lme(f)&&Lme(h)&&(p.latitude=f,p.longitude=h),{ok:!0,deliveryFeeDetails:d,coordsPatch:p}}async function xUt(e,t){try{return await CUt(e,t)}catch{return{ok:!1,reason:"error"}}}const TUt=e=>{const t=parseInt(e,10);if(!t)return null;const r=Math.floor(t/60),n=t%60;return r>0&&n>0?`${r}h ${n}min`:r>0?`${r}h`:`${t} min`},v4e=u.forwardRef(({error:e,helperText:t,size:r,className:n,required:i=!0,...a},o)=>u.createElement(um,{variant:"outlined",fullWidth:!0,required:i,error:e,className:n,size:r},u.createElement(dm,{id:"state-label"},"Estado"),u.createElement(Bd,{...a,ref:o,labelId:"state-label",label:"Estado"},Object.keys(YI).map(s=>u.createElement(ln,{key:s,value:s},YI[s]))),t&&u.createElement(h4,null,t)));var cw={},Fme;function AUt(){if(Fme)return cw;Fme=1;var e=$t(),t=Wt();Object.defineProperty(cw,"__esModule",{value:!0}),cw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M14.65 4.98l-5-1.75c-.42-.15-.88-.15-1.3-.01L4.36 4.56C3.55 4.84 3 5.6 3 6.46v11.85c0 1.41 1.41 2.37 2.72 1.86l2.93-1.14c.22-.09.47-.09.69-.01l5 1.75c.42.15.88.15 1.3.01l3.99-1.34c.81-.27 1.36-1.04 1.36-1.9V5.69c0-1.41-1.41-2.37-2.72-1.86l-2.93 1.14c-.22.08-.46.09-.69.01zM15 18.89l-6-2.11V5.11l6 2.11v11.67z"}),"MapRounded");return cw.default=i,cw}var PUt=AUt();const T2=et(PUt);function RUt({zipCode:e,onZipCodeChange:t,form:r,onFieldChange:n,errors:i,showAddressBlockAndLot:a,neighborhoodOptionsForDelivery:o,neighborhoodGetOptionLabel:s,neighborhoodRenderOption:l,onNeighborhoodChange:c,isCheckoutAddressEdit:d,deliveryFee:f,onCheckoutDeliveryFeeChange:h,onCalculateDeliveryFee:p,preparationTime:g,locationUnlocked:_,onOpenEditLocationMap:b}){const E=p4e(r)&&_,S=bUt()&&!d;return u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement("div",{className:"flex w-full space-x-12"}
353,u.createElement(Tr,{name:"zipcode",label:"CEP",value:e,onChange:t,onFocus:P=>P.target.select(),placeholder:"00000-000",variant:"outlined",autoFocus:!0,size:"small",fullWidth:!0,inputProps:{inputMode:"numeric"}})),u.createElement("div",{className:"flex w-full space-x-12"},u.createElement(Tr,{name:"street",label:"Rua",value:r.street,onChange:n,error:!!i.street,helperText:i.street,variant:"outlined",size:"small",fullWidth:!0,required:!0}),u.createElement(Tr,{name:"house_number",label:"Número",value:r.house_number,onChange:n,className:"max-w-128",variant:"outlined",size:"small"})),a&&u.createElement("div",{className:"flex w-full space-x-12"},u.createElement(Tr,{name:"address_block",label:"Quadra",value:r.address_block,onChange:n,variant:"outlined",size:"small",fullWidth:!0}),u.createElement(Tr,{name:"address_lot",label:"Lote",value:r.address_lot,onChange:n,variant:"outlined",size:"small",fullWidth:!0})),u.createElement(MPe,{name:"neighborhood",getOptionLabel:s,options:o,value:r.neighborhood,onChange:c,blurOnSelect:!0,autoHighlight:!0,autoSelect:!0,freeSolo:!0,fullWidth:!0,renderOption:l,renderInput:P=>u.createElement(Tr,{...P,label:"Bairro",variant:"outlined",size:"small",error:!!i.neighborhood,helperText:i.neighborhood,required:!0})}),u.createElement(Tr,{name:"address_complement",label:"Complemento",value:r.address_complement,onChange:n,variant:"outlined",size:"small",fullWidth:!0}),u.createElement(Tr,{name:"landmark",label:"Referência",value:r.landmark,onChange:n,variant:"outlined",size:"small",fullWidth:!0}),u.createElement("div",{className:"flex w-full space-x-12"},u.createElement(Tr,{name:"city",label:"Cidade",value:r.city,onChange:n,error:!!i.city,helperText:i.city,variant:"outlined",size:"small",fullWidth:!0,required:!0}),u.createElement(v4e,{name:"state",label:"UF",value:r.state,onChange:n,error:!!i.state,helperText:i.state,className:"w-full max-w-192",fullWidth:!1,size:"small",required:!0})),E&&u.createElement("div",{className:"flex items-center space-x-12"},u.createElement(fr,{startIcon:u.createElement(T2,null),onClick:b,variant:"outlined",fullWidth:!0},"Ajustar localização no mapa")),S&&u.createElement(DS,{severity:"info",className:"text-14"},"Agora, a taxa de entrega e o tempo estimado são calculados automaticamente ao clicar em"," ",u.createElement("strong",null,"Salvar"),". Caso seja necessário ajustá-los, basta editar o endereço após o salvamento."),d&&u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"flex w-full items-start justify-start space-x-16 pt-12"},u.createElement(pm,{name:"deliveryFee",label:"Taxa de entrega",value:f?.value??"",onChange:h,error:!!i.deliveryFee,helperText:i.deliveryFee,fullWidth:!1,className:"max-w-128"}),u.createElement(fr,{variant:"outlined",onClick:p},"Calcular taxa")),(f?.estimated_time>0||f?.delivery_man_fee&&f.delivery_man_fee>=0)&&u.createElement("div",{className:"space-y-4 text-gray-600"},f?.estimated_time&&u.createElement("div",null,u.createElement("strong",null,"Previsão:")," ",TUt(f.estimated_time+(g||0))),f?.delivery_man_fee!==null&&f.delivery_man_fee>=0&&u.createElement("div",null,u.createElement("strong",null,"Taxa do entregador:")," ",me.formatMonetaryValue(f.delivery_man_fee)))))}const OUt=u.memo(RUt);function IUt({open:e,onClose:t,errorMessage:r,manualFeeValue:n,onManualFeeChange:i,onConfirm:a}){const o=s=>{s.preventDefault(),a()};return u.createElement(oi,{title:"Não foi possível calcular a entrega",open:e,onClose:t,onSubmit:o,confirmText:"Continuar com este valor"},u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement("div",{className:"flex flex-col space-y-4"},u.createElement("div",{className:"text-16 font-semibold text-gray-700"},r),u.createElement("div",{className:"text-15 font-light text-gray-600"},"Caso deseje continuar, informe a taxa de entrega manualmente abaixo.")),u.createElement(pm,{label:"Taxa de entrega",value:n,onChange:s=>i(s.target.value),autoFocus:!0,fullWidth:!0,required:!0})))}const kUt=u.memo(IUt);function NUt({open:e,onClose:t,onSubmit:r,initData:n,clientId:i}){const a=Lr(),{companyCity:o,companyState:s,neighborhoodOptionsForDelivery:l,showAddressBlockAndLot:c,preparationTime:d}=at(({globalCompany:Be})=>{const Ze=Be.company;return{companyCity:Ze.city,companyState:Ze.state,neighborhoodOptionsForDelivery:Ze.delivery_only_for_neighborhoods,showAddressBlockAndLot:Ze?.flags?.show_address_block_and_lot,preparationTime:Ze.preparation_time}},LP),{form:f,handleChange:h,setForm:p,setInForm:g}=g_(pB),[_,b]=u.useState({}),[E,S]=u.useState(null),[P,O]=u.useState(""),[I,N]=u.useState(!1),[M,F]=u.useState(!1),[B,V]=u.useState(!1),[W,$]=u.useState(!1),[X,re]=u.useState(""),[ae,Q]=u.useState(""),ie=u.useRef(!1),le=u.useRef(null),fe=u.useMemo(()=>!!(n&&Object.prototype.hasOwnProperty.call(n,"deliveryFee")),[n]),de=u.useCallback(()=>{const Be=n?.deliveryAddress||{};p({...pB,city:o,state:s,...Be}),O(Be.zip_code),V(p4e(Be)),S(n?.deliveryFee??null),$(!1),re(""),Q(""),ie.current=!1,le.current=null},[o,s,n,p]);u.useEffect(()=>{e&&de()},[e,de]);const ge=Be=>{b(Ze=>Ze[Be]?{...Ze,[Be]:""}:Ze)},Ae=({requireFee:Be=!1}={})=>{const Ze={};return sc(f.street)||(Ze.street="Informe a rua"),sc(f.neighborhood)||(Ze.neighborhood="Informe o bairro"),sc(f.city)||(Ze.city="Informe a cidade"),sc(f.state)||(Ze.state="Informe o estado"),YI[f.state]||(Ze.state="Informe um estado válido"),Be&&(!E||E.value===void 0||E.value===null)&&(Ze.deliveryFee="Informe a taxa de entrega"),Object.keys(Ze).length?(b(Ze),!1):!0},Fe=Be=>Be==="out_of_range"?"Esse endereço está fora da área de entrega.":Be==="out_of_time_range"?"A entrega para esse endereço não está disponível no momento.":Be==="info_by_whatsapp"?"Taxa de entrega negociada via WhatsApp, informe o valor manualmente.":"Não foi possível calcular a taxa de entrega. Verifique o endereço informado e tente novamente.",Pe=async(Be,Ze)=>{const Et=me.currencyStringToFloat(Be?.value??0),Yt={deliveryAddress:{...Ze,neighborhood:Ze.neighborhood?.name||Ze.neighborhood},deliveryFee:Be,deliveryFeeValue:Et};
353if(i&&Yt.deliveryAddress?.id)try{await wY(i,Yt.deliveryAddress)}catch(sr){a.error(sr.message||"Não foi possível atualizar o endereço");return}r(Yt),t?.()},ce=Be=>!Be||!fe||!ie.current?Be:{...Be,value:E?.value},pe=async()=>{const Be=await xUt(f,n?.deliveryAddress);if(!Be.ok)return re(Fe(Be.reason)),Q(""),$(!0),le.current=null,null;const Ze={...f,...Be.coordsPatch};Be.coordsPatch.latitude!=null&&(g("latitude",Be.coordsPatch.latitude),g("longitude",Be.coordsPatch.longitude),V(!0));const Et=ce(Be.deliveryFeeDetails);return S(Et),le.current=XI(Ze),{finalFee:Et,mergedForm:Ze}},Ne=()=>le.current?le.current===XI(f):!1,De=()=>fe?!(!h4e(f,n?.deliveryAddress)||Ne()):!0,Ve=async()=>{if(Ae()){ie.current=!1,N(!0);try{await pe()}finally{N(!1)}}},Ke=async Be=>{if(Be.preventDefault(),!!Ae({requireFee:fe})){N(!0);try{if(!De()){await Pe(E,f);return}const Ze=await pe();if(!Ze)return;await Pe(Ze.finalFee,Ze.mergedForm)}finally{N(!1)}}},Qe=async Be=>{const Ze=Be.target.value;if(Ze.length===9){N(!0),O(Ze);try{const Et=await SUt(Ze.replace("-",""));p({...pB,...Et})}catch{a.info("Não foi possível encontrar o CEP")}N(!1);return}Ze.length===5&&P.length===6?O(Ze.substring(0,4)):Ze.length===5?O(`${Ze}-`):O(Ze)},Ue=async()=>{if(!ae){a.info("Informe a taxa");return}const Be=me.currencyStringToFloat(ae);if(Number.isNaN(Be)){a.info("Valor inválido");return}const Ze=Mme(Be);S(Ze),$(!1),await Pe(Ze,f)},ut=Be=>{ie.current=!0,ge("deliveryFee"),S(Mme(Be.target.value))},We=u.useMemo(()=>l?.length?e3e(l,"city").filter(({city:Be})=>Be).length>1:!1,[l]),ke=Be=>typeof Be=="string"?Be:Be.name,Le=Be=>u.createElement("div",null,ke(Be),Be.city&&We&&`, ${Be.city} - ${Be.state}`);return u.createElement(u.Fragment,null,u.createElement(oi,{open:e,title:"Endereço para entrega",loading:I,onClose:t,onSubmit:Ke},u.createElement(OUt,{zipCode:P,onZipCodeChange:Qe,form:f,onFieldChange:Be=>{ge(Be.target.name),h(Be)},errors:_,showAddressBlockAndLot:c,neighborhoodOptionsForDelivery:l,neighborhoodGetOptionLabel:ke,neighborhoodRenderOption:Le,onNeighborhoodChange:(Be,Ze)=>g("neighborhood",Ze),isCheckoutAddressEdit:fe,deliveryFee:E,onCheckoutDeliveryFeeChange:ut,onCalculateDeliveryFee:Ve,preparationTime:d,locationUnlocked:B,onOpenEditLocationMap:()=>F(!0)}),u.createElement(VY,{open:M,onClose:()=>F(!1),value:{latitude:f.latitude,longitude:f.longitude},onConfirm:({latitude:Be,longitude:Ze})=>{g("latitude",Be),g("longitude",Ze)},title:"Ajustar localização"})),u.createElement(kUt,{open:W,onClose:()=>$(!1),errorMessage:X,manualFeeValue:ae,onManualFeeChange:Q,onConfirm:Ue}))}const g4e=u.memo(NUt),DUt=Rh({menu:{width:"min(calc(100% - 2.4rem), calc(38.4rem - 2.4rem))"}});function MUt(){const e=An(),t=DUt(),{hasModule:r}=Ah(),n=at(({placeOrder:M})=>M.placeOrder.checkout.orderType),i=at(({globalCompany:M})=>M.company.flags),a=at(({placeOrder:M})=>M.placeOrder.checkout.deliveryAddress),o=at(({placeOrder:M})=>M.placeOrder.checkout.deliveryFeeDetails),s=at(({placeOrder:M})=>M.placeOrder.checkout.payment.delivery_fee),l=at(({placeOrder:M})=>M.placeOrder.checkout.clientAddresses),c=at(({placeOrder:M})=>M.placeOrder.checkout.client),d=at(x2),[f,h]=u.useState(null),p=u.useRef(null),[g,_]=u.useState(!1),b=X4(),E=u.useRef(null);u.useEffect(()=>{i&&n==="delivery"&&(!i.work_with_delivery||r(At.DELIVERY_MODULE)!==null&&!r(At.DELIVERY_MODULE))&&(e(oP("takeout")),e(ome()),e(ime()),e(e1({delivery_fee:null})))},[i,e,r,n]),u.useEffect(()=>{["takeout","onsite"].includes(n)&&(e(ome()),e(ime()),e(e1({delivery_fee:null})))},[e,n]);const S=u.useCallback(M=>{e(oP("delivery")),e(NFt(M.deliveryAddress)),e(LFt({...M.deliveryFee,value:M.deliveryFeeValue})),e(e1({delivery_fee:M.deliveryFeeValue}))},[e]),P=()=>{h(null)},O=i?.work_with_delivery&&r(At.DELIVERY_MODULE),I=O&&l?.map(M=>u.createElement(ln,{key:M.id,classes:{root:"p-0"}},u.createElement(Js,{primary:`${M.street}, ${M.house_number||"S/N"}`,secondary:`${M.neighborhood}, ${M.city}/${M.state}`,Icon:u.createElement(EY,{color:"inherit"}),onClick:()=>{P(),p.current={deliveryAddress:M},_(!0)}}))),N=[n==="delivery"&&a?.street&&u.createElement(ln,{key:"delivery",classes:{root:"p-0"}},u.createElement(Js,{primary:"Editar endereço",secondary:"Modifique o endereço atual",Icon:u.createElement(ps,{color:"inherit"}),onClick:()=>{P(),p.current={deliveryAddress:a,deliveryFee:o},_(!0)}})),n!=="takeout"&&u.createElement(ln,{key:"takeout",classes:{root:"p-0"}},u.createElement(Js,{primary:"Retirada",secondary:"O cliente retira no estabelecimento",Icon:u.createElement(ix,{color:"inherit"}),onClick:()=>{P(),e(oP("takeout"))}})),n!=="onsite"&&u.createElement(ln,{key:"onsite",classes:{root:"p-0"}},u.createElement(Js,{primary:"Consumo no local",secondary:"O cliente vai consumir no estabelecimento",Icon:u.createElement(KI,{color:"inherit"}),onClick:()=>{P(),e(oP("onsite"))}})),O&&(n!=="delivery"||a?.street)&&u.createElement(ln,{key:"delivery2",classes:{root:"p-0"}},u.createElement(Js,{primary:"Entrega",secondary:a?.street?"Informe um outro endereço":"Informe um endereço de entrega",Icon:u.createElement(GI,{color:"inherit"}),onClick:()=>
353{P(),p.current=null,_(!0)}})),...I||[]].filter(Boolean);return u.createElement(u.Fragment,null,u.createElement("div",{ref:E,className:"overflow-hidden rounded-8 border-1 border-solid border-gray-200"},n==="takeout"&&u.createElement(Js,{primary:"Retirada",Icon:u.createElement(ix,{color:"inherit"}),onClick:()=>{h(E.current)},Action:N.length>0&&u.createElement(cr,{size:"small"},u.createElement(uc,{className:"text-gray-400"}))}),n==="onsite"&&u.createElement(Js,{primary:"Consumo no local",Icon:u.createElement(KI,{color:"inherit"}),onClick:()=>{h(E.current)},Action:N.length>0&&u.createElement(cr,{size:"small"},u.createElement(uc,{className:"text-gray-400"}))}),n==="delivery"&&u.createElement(Js,{primary:a?.street?`${a.street}, ${a.house_number||"S/N"}`:"Informar endereço",secondary:a.neighborhood?`${a.neighborhood}, ${a.city}/${a.state}`:"Clique e adicione um endereço",tertiary:s||s===0?me.formatMonetaryValue(s):null,Icon:u.createElement(GI,{color:"inherit"}),Action:N.length>0&&u.createElement(cr,{size:"small"},u.createElement(uc,{className:"text-gray-400"})),onClick:M=>{M.stopPropagation(),N.length>0?h(E.current):(p.current={deliveryAddress:a,deliveryFee:o},_(!0))},error:b(Np.missingClientAddress)})),u.createElement(Zc,{anchorEl:f,open:!!f,onClose:P,getContentAnchorEl:null,autoFocus:!1,classes:{paper:Ft("shadow-sm rounded-6 mt-4 border-1 border-solid border-gray-200 max-h-360",t.menu),list:"p-0"},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},N.map(M=>M)),u.createElement(g4e,{open:g,onClose:()=>_(!1),onSubmit:S,initData:p.current,totalProducts:d,clientId:c?.id}))}function LUt(){return u.createElement("div",{className:"flex flex-col items-center space-y-12 p-20 pt-32"},u.createElement(UC,{className:"h-56 w-56 bg-gray-100 text-gray-400"}),u.createElement("div",{className:"flex flex-col items-center"},u.createElement("div",{className:"text-18 font-bold text-gray-600"},"Cliente não encontrado")))}function FUt(){return u.createElement("div",{className:"flex w-full animate-pulse flex-col items-center space-y-12 p-20 pt-32"},u.createElement("div",{className:"flex h-56 w-56 items-center justify-center rounded-full bg-gray-200"}),u.createElement("div",{className:"flex w-full flex-col items-center space-y-8"},u.createElement("span",{className:"h-24 w-3/5 rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-16 w-2/5 rounded-4 bg-gray-200"})))}function BUt(e){return e?`/api/v1/company/clients/${e}`:null}function A2(e){const{data:t,error:r,mutate:n}=Ll(BUt(e),wm,{dedupingInterval:6e4,revalidateOnFocus:!1});return{data:t,isLoading:!r&&!t,isError:r,mutate:n}}const y4e=x.createContext(),zUt=y4e.Provider,rf=()=>x.useContext(y4e);qe.locale("pt-BR");function HUt(){const e=rf(),{data:t,isLoading:r,isError:n}=A2(e);if(r)return u.createElement(FUt,null);if(n)return u.createElement(LUt,null);const{name:i,created_at:a}=t||{};return u.createElement("div",{className:"flex flex-col items-center space-y-12 p-20 pt-32"},u.createElement(UC,{className:"h-56 w-56 bg-gray-100 text-gray-400"}),u.createElement("div",{className:"flex flex-col items-center space-y-1"},u.createElement("div",{className:"text-18 font-bold text-gray-600"},i),u.createElement("div",{className:"text-14 text-gray-400"},"cliente desde ",qe(a).format("DD [de] MMM [de] YYYY"))))}const UUt=u.memo(HUt);function VUt({order_number:e,order_id:t,className:r,showIcon:n=!0}){const i=Gbe(),a=o=>{o.stopPropagation(),t&&i(t)};return!t&&e?e:!t&&!e?null:u.createElement(Yn,{title:"Ver pedido",placement:"top",enterTouchDelay:50,arrow:!0},u.createElement("span",{className:Ft("inline-flex cursor-pointer items-center space-x-8 rounded-8 border-1 border-solid border-gray-200 bg-white px-8 py-1 font-semibold hover:bg-gray-50",r),onClick:a},u.createElement("span",null,e)," ",n&&u.createElement(P5t,{fontSize:"small"})))}var uw={},Bme;function qUt(){if(Bme)return uw;Bme=1;var e=$t(),t=Wt();Object.defineProperty(uw,"__esModule",{value:!0}),uw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"}),"Chat");return uw.default=i,uw}var jUt=qUt();const $Ut=et(jUt);var dw={},zme;function WUt(){if(zme)return dw;zme=1;var e=$t(),t=Wt();Object.defineProperty(dw,"__esModule",{value:!0}),dw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 17.27l4.15 2.51c.76.46 1.69-.22 1.49-1.08l-1.1-4.72 3.67-3.18c.67-.58.31-1.68-.57-1.75l-4.83-.41-1.89-4.46c-.34-.81-1.5-.81-1.84 0L9.19 8.63l-4.83.41c-.88.07-1.24 1.17-.57 1.75l3.67 3.18-1.1 4.72c-.2.86.73 1.54 1.49 1.08l4.15-2.5z"}),"StarRounded");return dw.default=i,dw}var GUt=WUt();const ZI=et(GUt),KUt=yr({iconEmpty:{color:"#e5e7eb"},iconFilled:{color:"#fcd34d"},iconHover:{color:"#fcd34d"}})(Jxt);function YUt(e){return u.createElement(KUt,{icon:u.createElement(ZI,{fontSize:"inherit"}),size:"large",...e})}function XUt({feedback:e,open:t,onClose:r}){const[n,i]=u.useState(null);u.useEffect(()=>{e?.id&&i(e)},[e]);function a(){r&&r()}if(!n)return null;const o=qe(n.created_at).format("DD/MM/YYYY");return u.createElement(Eo,{open:t,classes:{paper:"w-full m-12"},maxWidth:"xs",onClose:a},u.createElement("div",{className:"relative flex flex-col overflow-hidden p-16 text-gray-700 sm:p-24"},u.createElement("div",{className:"mb-32 flex flex-shrink-0 items-center justify-between"},u.createElement("div",{className:"mr-32"},u.createElement("div",{className:"text-20 font-bold"},"Avaliação do pedido de N°"," ",u.createElement(VUt,{order_number:n.order_number,order_id:n.order_id,className:"text-16"})),u.createElement("div",{className:"mt-4 text-16 font-light"},"Feita por ",u.createElement("strong",{className:"font-medium"},n.client)," em"," ",o)),u.createElement(cr,{className:"absolute right-6 top-6",onClick:a},u.createElement(Aa,{className:"text-gray-500"}))),u.createElement("div",{className:"overflow-auto"},u.createElement("div",{className:"space-y-12"},n.answers?.map(({id:s,question:l,answer:c})=>u.createElement("div",{key:s,className:"flex items-center justify-between text-17"},u.createElement("span",null,l),u.createElement(YUt,{value:c,readOnly:!0})))),n.general_comment&&u.createElement("div",{className:"mt-32 space-y-5"},u.createElement("div",{className:"flex items-center space-x-3"},u.createElement($Ut,{fontSize:"inherit",className:"text-xl"}),u.createElement("span",{className:"text-18 font-bold"},"Comentário")),u.createElement("p",{className:"text-17"},n.general_comment)))))}function Um({Icon:e,children:t,Action:r,onClick:n,className:i}){return u.createElement("div",{className:Ft("flex w-full items-center space-x-16 rounded-8 border-1 border-solid border-gray-200 p-12",n&&"cursor-pointer hover:bg-gray-50",i),onClick:n},e,u.createElement("div",{className:"flex flex-1 flex-col space-y-1 truncate"},t),r)}function ZUt(){return u.createElement(Um,{Icon:u.createElement("div",{className:"h-44 w-44 animate-pulse rounded-full bg-gray-200"})},u.createElement("span",{className:"h-9 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"flex w-full items-center justify-between pt-6"},u.createElement("span",{className:"h-7 w-2/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-7 w-2/5 animate-pulse rounded-4 bg-gray-200"})))}function QUt({feedback:e,onClick:t}){if(!e)return null;const{order_number:r,created_at:n,average_rating:i}=e,a=i?.toFixed(1).toString().replace(".",",")||"-,-";return u.createElement(Um,{Icon:u.createElement("div",{className:"flex items-center justify-center rounded-full p-8",style:{color:"#fcd34d",backgroundColor:"#fff9e3"}},u.createElement(ZI,{className:"h-28 w-28"})),Action:u.createElement(qg,{className:"text-xl",style:{color:"#fcd34d"}}),onClick:t},u.createElement("div",{className:"text-16 font-bold text-gray-700"},"Avaliação do pedido N° ",r),u.createElement("div",{className:"flex items-center text-15 text-gray-400"},u.createElement("strong",{className:"font-bold text-gray-500"},a),u.createElement(ZI,{className:"ml-4 h-28 w-28 text-gray-400",style:{color:"#fcd34d"}}),u.createElement("div",{className:"mx-8 h-2 w-2 rounded-full bg-gray-300"}),u.createElement("div",null,"Feita em ",qe(n).format("DD/MM/YYYY"))))}const JUt=e=>
353f1(e?e(0,null):null)[0],mB=Promise.resolve(),eVt=e=>(t,r,n)=>{const i=x.useRef(!1),{cache:a,initialSize:o=1,revalidateAll:s=!1,persistSize:l=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:f=!1}=n,[,,,h]=Ic.get(l$);let p;try{p=JUt(t),p&&(p=CEe+p)}catch{}const[g,_,b]=vp(a,p),E=x.useCallback(()=>en(g()._l)?o:g()._l,[a,p,o]);jz.useSyncExternalStore(x.useCallback(F=>p?b(p,()=>{F()}):()=>{},[a,p]),E,E);const S=x.useCallback(()=>{const F=g()._l;return en(F)?o:F},[p,o]),P=x.useRef(S());Kw(()=>{if(!i.current){i.current=!0;return}p&&_({_l:l?P.current:S()})},[p,a]);const O=d&&!i.current,I=e(p,async F=>{const B=g()._i,V=g()._r,W=Ic.get(a),$=W[8],X=()=>W[8]!==$;_({_r:ca});const re=[],ae=S(),[Q]=vp(a,F),ie=Q().data,le=[];let fe=null;for(let de=0;de<ae;++de){const[ge,Ae]=f1(t(de,f?null:fe));if(!ge)break;const[Fe,Pe]=vp(a,ge);let ce=Fe().data;const pe=s||B||en(ce)||c&&!de&&!en(ie)||O||ie&&!en(ie[de])&&!n.compare(ie[de],ce);if(r&&(typeof V=="function"?V(ce,Ae):pe)){const Ne=async()=>{if(!(ge in h))ce=await r(Ae);else{const Ve=h[ge];delete h[ge],ce=await Ve}X()||Pe({data:ce,_k:Ae}),re[de]=ce};f?le.push(Ne):await Ne()}else re[de]=ce;f||(fe=ce)}return f&&await Promise.all(le.map(de=>de())),X()||_({_i:ca}),re},n),N=x.useCallback(function(F,B){const V=typeof B=="boolean"?{revalidate:B}:B||{},W=V.revalidate!==!1;return p?(W&&(en(F)?_({_i:!0,_r:V.revalidate}):_({_i:!1,_r:V.revalidate})),arguments.length?I.mutate(F,{...V,revalidate:W}):I.mutate()):mB},[p,a]),M=x.useCallback(F=>{if(!p)return mB;const[,B]=vp(a,p);let V;if(bu(F)?V=F(S()):typeof F=="number"&&(V=F),typeof V!="number")return mB;B({_l:V}),P.current=V;const W=[],[$]=vp(a,p);let X=null;for(let re=0;re<V;++re){const[ae]=f1(t(re,X)),[Q]=vp(a,ae),ie=ae?Q().data:ca;if(en(ie))return N($().data);W.push(ie),X=ie}return N(W)},[p,a,N,S]);return{size:S(),setSize:M,mutate:N,get data(){return I.data},get error(){return I.error},get isValidating(){return I.isValidating},get isLoading(){return I.isLoading}}},SY=AEe(Ll,eVt),_4e=10,tVt=(e,t=0)=>`/api/v1/company/client/${e}/satisfaction_surveys?page=${t+1}&per_page=${_4e}&order_by=id&order=desc`,rVt=e=>ht.get(e).then(t=>t.status!==200||t.data.status===500?[]:t.data);function nVt(e){const{data:t,error:r,mutate:n,size:i,setSize:a,isValidating:o}=SY(g=>e?tVt(e,g):null,rVt,{dedupingInterval:6e4,revalidateOnFocus:!1,registerOnReconnect:!1}),s=x.useCallback(()=>a(i+1),[a,i]),l=x.useMemo(()=>{try{return t?[].concat(...t):[]}catch{return[]}},[t]),c=!t&&!r,d=c||i>0&&t&&typeof t[i-1]>"u",f=t?.[0]?.length===0,h=f||t&&t[t.length-1]?.length<_4e,p=o&&t&&t.length===i;return{feedbacks:l,isLoading:c,isLoadingMore:d,isEmpty:f,isReachingEnd:h,isRefreshing:p,loadMore:s,mutate:n}}function iVt(){const e=rf(),{feedbacks:t,isLoading:r,isLoadingMore:n,loadMore:i,isEmpty:a,isError:o,isReachingEnd:s}=nVt(e),[l,c]=u.useState(!1),d=u.useRef(null),f=u.useCallback(p=>{d.current=p,c(!0)},[]),h=u.useCallback(()=>{c(!1)},[]);return r?u.createElement("div",{className:"space-y-12"},[1,2,3,4].map(p=>u.createElement(ZUt,{key:p}))):o?u.createElement(Jd,{title:"Problema ao buscar as avaliações"}):a?u.createElement(dl,{title:"Nenhuma avaliação encontrada"}):u.createElement("div",{className:"space-y-12"},t.map(p=>u.createElement(QUt,{key:p.id,feedback:p,onClick:()=>f(p)})),t?.length>0&&!s&&u.createElement(fr,{fullWidth:!0,onClick:i,disabled:n,className:"text-gray-500"},n?u.createElement(ai,{color:"primary",size:20}):"Carregar mais"),u.createElement(XUt,{open:l,feedback:d.current,onClose:h}))}var fw={},Hme;function aVt(){if(Hme)return fw;Hme=1;var e=$t(),t=Wt();Object.defineProperty(fw,"__esModule",{value:!0}),fw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M9.84 16.47l1.91-1.91 1.91 1.91c.29.29.77.29 1.06 0 .29-.29.29-.77 0-1.06l-1.91-1.91 1.91-1.91c.29-.29.29-.77 0-1.06-.29-.29-.77-.29-1.06 0l-1.91 1.91-1.91-1.91c-.29-.29-.77-.29-1.06 0-.29.29-.29.77 0 1.06l1.91 1.91-1.91 1.91c-.29.29-.29.77 0 1.06.29.29.77.29 1.06 0zM19 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H8V2c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6c-.55 0-1-.45-1-1V8h14v10c0 .55-.45 1-1 1z"}),"EventBusyRounded");return fw.default=i,fw}var oVt=aVt();const sVt=et(oVt);function lVt(e){const{kind:t,order_number:r}=e,n=!!r;return t==="expiration"?"Expiração":t==="credit"?n?"Ganho":"Ganho manual":t==="debit"?n?"Resgate":"Resgate manual":t==="loyalty_to_cashback_migration"?"Migração de pontos":t==="cashback_to_loyalty_migration"?"Migração para pontos":"Operação"}function cVt(e){const{kind:t,order_number:r}=e;return t==="expiration"?"Saldo expirou":r?`Pedido N° ${r}`:e.kind==="loyalty_to_cashback_migration"||e.kind==="cashback_to_loyalty_migration"?"Migração de programa":"Operação pelo portal"}const Dp=40;function uVt(e){if(e==="expiration")return u.createElement("div",{className:"z-10 flex flex-shrink-0 items-center justify-center rounded-full border border-solid border-gray-200 bg-white text-gray-500",style:{width:Dp,height:Dp}},u.createElement(sVt,{style:{fontSize:20}}));const t=e==="credit"||e==="loyalty_to_cashback_migration";return u.createElement("div",{className:Ft("z-10 flex flex-shrink-0 items-center justify-center rounded-full border border-solid border-gray-200 bg-white",t?"text-green-dark":"text-red-dark"),style:{width:Dp,height:Dp}},t?u.createElement(bh,{style:{fontSize:20}}):u.createElement(VI,{style:{fontSize:20}}))}function dVt(e){return e==="expiration"?"debit":e==="credit"||e==="loyalty_to_cashback_migration"?"credit":"debit"}
353function fVt(){return u.createElement("div",{className:"flex items-start gap-16 pl-8"},u.createElement("div",{className:"flex-shrink-0 animate-pulse rounded-full bg-gray-200",style:{width:Dp,height:Dp}}),u.createElement("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-12 py-4"},u.createElement("div",{className:"space-y-4"},u.createElement("div",{className:"h-20 w-256 animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-16 w-128 animate-pulse rounded-4 bg-gray-100"})),u.createElement("div",{className:"h-24 w-68 animate-pulse rounded-4 bg-gray-200"})))}function hVt({transaction:e,isLast:t}){if(!e)return null;const{kind:r,amount:n,confirmed_at:i}=e,a=lVt(e),o=cVt(e),l=dVt(r)==="credit",c=n!=null?Math.abs(n):0;return u.createElement("div",{className:Ft("relative flex items-center gap-16",!t&&"pb-8")},!t&&u.createElement("div",{className:"absolute w-px bg-gray-200",style:{left:Dp/2-1,top:Dp,height:"calc(100% + 4px)"}}),uVt(r),u.createElement("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-12 py-4"},u.createElement("div",{className:"flex min-w-0 flex-col"},u.createElement("span",{className:"text-16 font-semibold text-gray-600"},a),u.createElement("span",{className:"mt-2 text-14 text-gray-500"},o)),u.createElement("div",{className:"flex flex-shrink-0 flex-col gap-8"},u.createElement("span",{className:Ft("text-right text-16 font-bold",l?"text-green-dark":"text-red-dark")},l?"+":"-"," ",me.formatMonetaryValue(c)),u.createElement("span",{className:"text-14 text-gray-500"},i?qe(i).format("DD/MM/YYYY [às] HH:mm"):""))))}function pVt(e,t,r){return e?`/api/v2/company/cashback/client/${e}/transactions?page=${t}&per_page=${r}`:null}function mVt(e,{page:t=1,per_page:r=20}={}){const{data:n,error:i,mutate:a,isLoading:o,isValidating:s}=Ll(pVt(e,t,r),wm,{dedupingInterval:3e4,revalidateOnFocus:!1,keepPreviousData:!0});return{transactions:n?.transactions||[],meta:n?.meta||null,totalRecords:n?.meta?.total??0,isLoading:o,isValidating:s,isError:i,mutate:a}}const vVt=10,gVt=[10,20,50];function yVt(){const e=rf(),[t,r]=u.useState(0),[n,i]=u.useState(vVt),{transactions:a,totalRecords:o,isLoading:s,isError:l}=mVt(e,{page:t+1,per_page:n});u.useEffect(()=>{r(0)},[e]),u.useEffect(()=>{const f=Math.max(0,Math.ceil(o/n)-1);t>f&&r(f)},[t,n,o]);const c=(f,h)=>{r(h)},d=f=>{i(parseInt(f.target.value,10))};return s?u.createElement("div",{className:"space-y-12"},[1,2,3,4,5,6].map(f=>u.createElement(fVt,{key:f}))):l?u.createElement(Jd,{title:"Problema ao buscar transações"}):a.length===0?u.createElement(dl,{title:"Nenhuma transação encontrada"}):u.createElement("div",{className:"overflow-hidden"},u.createElement("div",{className:"space-y-4 p-16"},a.map((f,h)=>u.createElement(hVt,{key:f.id,transaction:f,isLast:h===a.length-1}))),o>0&&u.createElement(u.Fragment,null,u.createElement(zs,null),u.createElement(PPe,{className:"w-full flex-shrink-0 justify-end overflow-x-auto overflow-y-hidden",labelRowsPerPage:me.isMobile()?"Por página":"Registros por página",labelDisplayedRows:({from:f,to:h,count:p})=>`${f}-${h} de ${p}`,rowsPerPageOptions:gVt,component:"div",count:o,rowsPerPage:n,page:t,onChangePage:c,onChangeRowsPerPage:d})))}const YV=e=>x.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{d:"M12.15 16.15C12.7 16.15 13.171 16.021 13.563 15.763C13.955 15.505 14.1507 15.1007 14.15 14.55C14.15 14.0667 13.946 13.675 13.538 13.375C13.13 13.075 12.4007 12.7333 11.35 12.35C10.3667 12 9.646 11.5833 9.188 11.1C8.73 10.6167 8.50067 9.98333 8.5 9.2C8.5 8.51667 8.73767 7.896 9.213 7.338C9.68833 6.78 10.334 6.41733 11.15 6.25V5.875C11.15 5.64167 11.2377 5.43767 11.413 5.263C11.5883 5.08833 11.7923 5.00067 12.025 5C12.2577 4.99933 12.462 5.087 12.638 5.263C12.814 5.439 12.9013 5.643 12.9 5.875V6.25C13.3833 6.28333 13.8293 6.446 14.238 6.738C14.6467 7.03 14.9757 7.384 15.225 7.8C15.3417 7.98333 15.35 8.17933 15.25 8.388C15.15 8.59667 14.9833 8.74233 14.75 8.825C14.5333 8.90833 14.3167 8.91667 14.1 8.85C13.8833 8.78333 13.7083 8.65833 13.575 8.475C13.4083 8.275 13.2 8.11267 12.95 7.988C12.7 7.86333 12.4 7.80067 12.05 7.8C11.4667 7.8 11.0207 7.925 10.712 8.175C10.4033 8.425 10.2493 8.76667 10.25 9.2C10.2507 9.63333 10.4423 9.975 10.825 10.225C11.2077 10.475 11.8993 10.7667 12.9 11.1C14.1 11.5333 14.9 12.0417 15.3 12.625C15.7 13.2083 15.9 13.85 15.9 14.55C15.9 15.0333 15.8167 15.4583 15.65 15.825C15.4833 16.1917 15.2623 16.5043 14.987 16.763C14.7117 17.0217 14.391 17.23 14.025 17.388C13.659 17.546 13.2673 17.6667 12.85 17.75V18.125C12.85 18.3583 12.7623 18.5627 12.587 18.738C12.4117 18.9133 12.2077 19.0007 11.975 19C11.7423 18.9993 11.5383 18.912 11.363 18.738C11.1877 18.564 11.1 18.3597 11.1 18.125V17.7C10.4667 17.5667 9.925 17.3167 9.475 16.95C9.025 16.5833 8.66667 16.1167 8.4 15.55C8.3 15.3167 8.30433 15.0917 8.413 14.875C8.52167 14.6583 8.69233 14.5083 8.925 14.425C9.14167 14.3417 9.35833 14.3457 9.575 14.437C9.79167 14.5283 9.95833 14.6743 10.
353075 14.875C10.3083 15.3083 10.6043 15.629 10.963 15.837C11.3217 16.045 11.7173 16.1493 12.15 16.15ZM12 23C10.1333 23 8.41667 22.575 6.85 21.725C5.28333 20.875 4 19.7417 3 18.325V20C3 20.2833 2.904 20.521 2.712 20.713C2.52 20.905 2.28267 21.0007 2 21C1.71733 20.9993 1.48 20.9033 1.288 20.712C1.096 20.5207 1 20.2833 1 20V16C1 15.7167 1.096 15.4793 1.288 15.288C1.48 15.0967 1.71733 15.0007 2 15H6C6.28333 15 6.521 15.096 6.713 15.288C6.905 15.48 7.00067 15.7173 7 16C6.99933 16.2827 6.90333 16.5203 6.712 16.713C6.52067 16.9057 6.28333 17.0013 6 17H4.525C5.325 18.2 6.37933 19.1667 7.688 19.9C8.99667 20.6333 10.434 21 12 21C14.35 21 16.371 20.2167 18.063 18.65C19.755 17.0833 20.7173 15.1583 20.95 12.875C20.9833 12.6083 21.1 12.3957 21.3 12.237C21.5 12.0783 21.7333 11.9993 22 12C22.2833 12 22.525 12.0877 22.725 12.263C22.925 12.4383 23.0083 12.6507 22.975 12.9C22.8583 14.3167 22.4917 15.6373 21.875 16.862C21.2583 18.0867 20.4583 19.1533 19.475 20.062C18.4917 20.9707 17.3627 21.6873 16.088 22.212C14.8133 22.7367 13.4507 22.9993 12 23ZM12 3C9.65 3 7.62933 3.78333 5.938 5.35C4.24667 6.91667 3.284 8.84167 3.05 11.125C3.01667 11.3917 2.9 11.6043 2.7 11.763C2.5 11.9217 2.26667 12.0007 2 12C1.71667 12 1.475 11.9127 1.275 11.738C1.075 11.5633 0.991667 11.3507 1.025 11.1C1.14167 9.68333 1.50833 8.36267 2.125 7.138C2.74167 5.91333 3.54167 4.84667 4.525 3.938C5.50833 3.02933 6.63767 2.31267 7.913 1.788C9.18833 1.26333 10.5507 1.00067 12 1C13.8667 1 15.5833 1.425 17.15 2.275C18.7167 3.125 20 4.25833 21 5.675V4C21 3.71667 21.096 3.47933 21.288 3.288C21.48 3.09667 21.7173 3.00067 22 3C22.2827 2.99933 22.5203 3.09533 22.713 3.288C22.9057 3.48067 23.0013 3.718 23 4V8C23 8.28333 22.904 8.521 22.712 8.713C22.52 8.905 22.2827 9.00067 22 9H18C17.7167 9 17.4793 8.904 17.288 8.712C17.0967 8.52 17.0007 8.28267 17 8C16.9993 7.71733 17.0953 7.48 17.288 7.288C17.4807 7.096 17.718 7 18 7H19.475C18.675 5.8 17.621 4.83333 16.313 4.1C15.005 3.36667 13.5673 3 12 3Z",fill:"currentColor"}));function b4e(){return u.createElement("div",{className:"overflow-hidden rounded-12 border border-solid border-gray-200"},u.createElement("div",{className:"p-16"},u.createElement("div",{className:"flex items-center justify-between gap-12"},u.createElement("div",{className:"h-20 w-3/5 max-w-full animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-48 animate-pulse rounded-4 bg-gray-200"})),u.createElement("div",{className:"mt-12 flex items-center justify-between gap-12"},u.createElement("div",{className:"h-20 w-2/5 max-w-full animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-60 animate-pulse rounded-4 bg-gray-200"})),u.createElement("div",{className:"mt-12 flex items-center justify-between gap-12"},u.createElement("div",{className:"h-20 w-2/3 max-w-full animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-48 animate-pulse rounded-4 bg-gray-200"}))),u.createElement("div",{className:"flex items-center justify-between gap-12 border-0 border-t border-solid border-gray-200 bg-gray-50 px-16 py-12"},u.createElement("div",{className:"h-20 w-1/2 max-w-full animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-60 animate-pulse rounded-4 bg-gray-200"})))}function _Vt({cashbackBalance:e,totalRedeemed:t,expiresAt:r,loading:n,error:i}){if(n)return u.createElement(b4e,null);if(i)return u.createElement("div",{className:"overflow-hidden rounded-12 border border-solid border-gray-200"},u.createElement("div",{className:"flex items-center space-x-16 p-16"},u.createElement(YV,{className:"text-red-400 h-44 w-44 flex-shrink-0"}),u.createElement("div",{className:"text-red-600 text-16"},"Erro ao carregar informações de cashback")));const a=qe(r),o=a.isValid()?a.format("DD/MM/YYYY"):"—";return u.createElement("div",{className:"overflow-hidden rounded-12 border border-solid border-gray-200"},u.createElement("div",{className:"flex items-center space-x-16 p-16"},u.createElement("div",{className:"flex h-44 w-44 flex-shrink-0 items-center justify-center text-gray-500"},u.createElement(YV,{className:"h-28 w-28 text-gray-500"})),u.createElement("div",{className:"flex-1"},u.createElement("div",{className:"flex items-center justify-between gap-12"},u.createElement("span",{className:"text-16 text-gray-500"},"Saldo atual"),u.createElement("span",{className:"text-18 font-bold text-gray-600"},me.formatMonetaryValue(e||0))),u.createElement("div",{className:"mt-4 flex items-center justify-between gap-12"},u.createElement("span",{className:"text-16 text-gray-500"},"Válidos até"),u.createElement("span",{className:"text-16 text-gray-600"},o)))),u.createElement("div",{className:"flex items-center justify-between border-0 border-t border-solid border-gray-200 bg-gray-50 px-16 py-12"},u.createElement("span",{className:"text-16 text-gray-500"},"Você já resgatou"),u.createElement("span",{className:"text-16 font-bold text-gray-600"},me.formatMonetaryValue(t||0))))}const Ume={redeem:u.createElement("div",{className:"flex h-32 w-32 items-center justify-center rounded-full bg-red-lightest text-red-dark"},u.createElement(VI,null)),earn:u.createElement("div",{className:"flex h-32 w-32 items-center justify-center rounded-full bg-green-lightest text-green-dark"},u.createElement(bh,null)),redeem_canceled:u.createElement("div",{className:"flex h-32 w-32 items-center justify-center rounded-full bg-gray-100 text-gray-400"},u.createElement(VI,null)),earn_canceled:u.createElement("div",{className:"flex h-32 w-32 items-center justify-center rounded-full bg-gray-100 text-gray-400"},u.createElement(bh,null))},bVt={redeem:"text-red-dark",earn:"text-green-dark"};function EVt(){return u.createElement(Um,{Icon:u.createElement("div",{className:"h-44 w-44 animate-pulse rounded-full bg-gray-200"})},u.createElement("span",{className:"h-9 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"flex w-full items-center justify-between pt-6"},u.createElement("span",{className:"h-7 w-2/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-7 w-2/5 animate-pulse rounded-4 bg-gray-200"})))}function wVt({operation:e}){if(!e)return null;const{kind:t,status:r,created_at:n,order_number:i,points_quantity:a,signup_bonus:o=!1,expiration:s}=e;function l(){return i?`Pedido Nº ${i}`:o?"Cadastro concluído":"Operação pelo portal"}return u.createElement(Um,{Icon:r==="canceled"?Ume[`${t}
353_canceled`]:Ume[t],className:Ft(t==="earn"&&r==="canceled"&&"opacity-75")},u.createElement("div",{className:Ft("flex items-center justify-between text-16 font-bold",r==="canceled"?"text-gray-400":bVt[t])},t==="earn"?`Ganhou ${a} pontos`:s?`Expirou ${Math.abs(a)} pontos`:`Resgatou ${Math.abs(a)} pontos`," ",t==="earn"&&r==="pending"&&u.createElement(Qs,{color:"blue"},"Pendente"),r==="canceled"&&u.createElement(Qs,{color:"grey"},"Cancelado")),u.createElement("div",{className:"flex items-center justify-between text-15 text-gray-400"},u.createElement("div",null,l()),u.createElement("div",null,qe(n).format("DD/MM/YYYY HH:mm"))))}const E4e=10,SVt=(e,t=0)=>`/api/v1/company/client/${e}/loyalty_program_operations?page=${t+1}&per_page=${E4e}&order_by=id&order=desc`,CVt=e=>ht.get(e).then(t=>t.status!==200||t.data.status===500?[]:t.data);function xVt(e){const{data:t,error:r,mutate:n,size:i,setSize:a,isValidating:o}=SY(g=>e?SVt(e,g):null,CVt,{dedupingInterval:6e4,revalidateOnFocus:!1,registerOnReconnect:!1}),s=x.useCallback(()=>a(i+1),[a,i]),l=x.useMemo(()=>{try{return t?[].concat(...t):[]}catch{return[]}},[t]),c=!t&&!r,d=c||i>0&&t&&typeof t[i-1]>"u",f=t?.[0]?.length===0,h=f||t&&t[t.length-1]?.length<E4e,p=o&&t&&t.length===i;return{operations:l,isLoading:c,isLoadingMore:d,isEmpty:f,isReachingEnd:h,isRefreshing:p,loadMore:s,mutate:n}}function TVt(){const e=rf(),{operations:t,isLoading:r,isLoadingMore:n,loadMore:i,isEmpty:a,isError:o,isReachingEnd:s}=xVt(e);return r?u.createElement("div",{className:"space-y-12"},[1,2,3,4].map(l=>u.createElement(EVt,{key:l}))):o?u.createElement(Jd,{title:"Problema ao buscar operações"}):a?u.createElement(dl,{title:"Nenhuma operação encontrada"}):u.createElement("div",{className:"space-y-12"},t.map(l=>u.createElement(wVt,{key:l.id,operation:l})),t?.length>0&&!s&&u.createElement(fr,{fullWidth:!0,onClick:i,disabled:n,className:"text-gray-500"},n?u.createElement(ai,{color:"primary",size:20}):"Carregar mais"))}var hw={},Vme;function AVt(){if(Vme)return hw;Vme=1;var e=$t(),t=Wt();Object.defineProperty(hw,"__esModule",{value:!0}),hw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V9c0-.55.45-1 1-1h4.08L7.6 10.02c-.33.45-.23 1.08.22 1.4.44.32 1.07.22 1.39-.22L12 7.4l2.79 3.8c.32.44.95.54 1.39.22.45-.32.55-.95.22-1.4L14.92 8H19c.55 0 1 .45 1 1v5z"}),"CardGiftcardRounded");return hw.default=i,hw}var PVt=AVt();const RVt=et(PVt);qe.locale("pt-BR");function OVt({availablePoints:e,pendingPoints:t,expiresAt:r,totalRedeemedPoints:n,totalRewardsQuantity:i,loading:a,error:o}){if(a)return u.createElement(b4e,null);if(o)return u.createElement("div",{className:"overflow-hidden rounded-12 border border-solid border-gray-200"},u.createElement("div",{className:"flex items-center space-x-12 p-16"},u.createElement(RVt,{className:"text-red-400 h-40 w-40 flex-shrink-0"}),u.createElement("div",{className:"text-red-600 text-16"},"Erro ao carregar informações de pontos")));const s=r?qe(r):null,l=s?s.format("DD/MM/YYYY"):"Sem data de validade",c=me.formatNumber(n??0),d=i??0,f=d===1?"resgate":"resgates";return u.createElement("div",{className:"overflow-hidden rounded-8 border border-solid border-gray-200"},u.createElement("div",{className:"flex flex-col gap-6 p-12"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",{className:"text-16 font-bold text-gray-600"},"Pontos disponíveis"),u.createElement("div",{className:"text-16 font-bold text-gray-600"},me.formatNumber(e??0))),u.createElement("div",{className:"flex items-center justify-between gap-4"},u.createElement("span",{className:"text-16 text-gray-500"},"Válidos até"),u.createElement("span",{className:"text-16 text-gray-600"},l)),u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",{className:"text-16 text-gray-500"}
353,"Pontos pendentes"),u.createElement("span",{className:"text-16 text-gray-600"},me.formatNumber(t??0)))),u.createElement("div",{className:"flex items-center justify-between border-0 border-t border-solid border-gray-200 bg-gray-50 p-12"},u.createElement("span",{className:"text-16 text-gray-500"},"Pontos resgatados"),u.createElement("span",{className:"text-16 font-bold text-gray-600"},c," (",d," ",f,")")))}function IVt(){const e=rf(),n=at(({globalCompany:b})=>b.company)?.benefit_mode===_p.CASHBACK,{data:i,isLoading:a,isError:o}=A2(e),{data:s,isLoading:l,isError:c}=t3e(e),d=u.useMemo(()=>({loading:l,error:c}),[c,l]),{loyalty_score:f,total_earned_points_pending:h,total_redeemed_points:p,total_rewards_quantity:g,loyalty_points_expires_at:_}=i||{};if(n){const{cashback_balance:b,cashback_expires_at:E,total_redeemed_amount:S}=s||{};return u.createElement("div",{className:"space-y-24"},u.createElement(_Vt,{cashbackBalance:b||0,totalRedeemed:S||0,expiresAt:E,...d}),u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-16 font-bold text-gray-700"},"Histórico de atividades"),u.createElement(yVt,null)))}return u.createElement("div",{className:"space-y-24"},u.createElement(OVt,{availablePoints:f||0,pendingPoints:h||0,expiresAt:_,totalRedeemedPoints:Math.abs(p||0),totalRewardsQuantity:g||0,loading:a,error:o}),u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-16 font-bold text-gray-700"},"Histórico de operações"),u.createElement(TVt,null)))}var pw={},qme;function kVt(){if(qme)return pw;qme=1;var e=$t(),t=Wt();Object.defineProperty(pw,"__esModule",{value:!0}),pw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M16 10.53c-.29-.29-.77-.29-1.06 0l-4.35 4.35L9 13.29c-.29-.29-.77-.29-1.06 0-.29.29-.29.77 0 1.06l1.94 1.94c.39.39 1.02.39 1.41 0l4.7-4.7c.3-.29.3-.77.01-1.06zM19 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H8V2c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6c-.55 0-1-.45-1-1V8h14v10c0 .55-.45 1-1 1z"}),"EventAvailableRounded");return pw.default=i,pw}var NVt=kVt();const w4e=et(NVt);var mw={},jme;function DVt(){if(jme)return mw;jme=1;var e=$t(),t=Wt();Object.defineProperty(mw,"__esModule",{value:!0}),mw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M13.89 8.7L12 10.59 10.11 8.7a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 8.7 13.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l1.89 1.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l1.89-1.89c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.38-1.41 0zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"HighlightOffRounded");return mw.default=i,mw}var MVt=DVt();const QI=et(MVt);var vw={},$me;function LVt(){if($me)return vw;$me=1;var e=$t(),t=Wt();Object.defineProperty(vw,"__esModule",{value:!0}),vw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zM7.02 5l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.26-.33-.35-.76-.25-1.17l1-4.36h1.97zm11.89-.01l1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5l1.93-.01zm-3.4 4.53c.05.39-.07.78-.33 1.07-.23.26-.55.41-.96.41-.67 0-1.22-.59-1.22-1.31V5h1.96l.55 4.52zM11 9.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41-.25-.29-.37-.68-.33-1.07L9.04 5H11v4.69zM18 19H6c-.55 0-1-.45-1-1v-5.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V18c-.01.55-.46 1-1.01 1z"}),"StorefrontRounded");return vw.default=i,vw}var FVt=LVt();const JI=et(FVt),BVt="[ORDERS] UPDATE FILTERS",zVt="[ORDERS] UPDATE ADVANCED FILTERS",HVt="[ORDERS] SET ADVANCED FILTERS APPLIED",UVt="[ORDERS] RESET ADVANCED FILTERS APPLIED",VVt="[ORDERS] OPEN ADVANCED FILTERS DRAWER",qVt="[ORDERS] CLOSE ADVANCED FILTERS DRAWER",e3={delivery:"Delivery",takeout:"Retirada",onsite:"No local",closed_table:"Mesa/Comanda"}
353,jVt={immediate:"Imediata",scheduled:"Agendada"},XV={catalog:"Site",store_front_catalog:"Site Balcão",portal:"Portal",ifood:"iFood",food99:"99Food",keeta:"Keeta",aiqfome:"Aiqfome",whatsapp_extension:"Extensão",integration:"Integração",totem:"Totem"},wrr={merchant:"Entrega própria",ifood:"iFood",ifood_shipping:"iFood Entrega",foody_delivery:"Foody Delivery",bee_delivery:"Bee Delivery",mottu:"Mottu",food99:"99Food",aiqfome:"Aiqfome",keeta:"Keeta"},Srr={order_type:[],order_timing:Object.keys(jVt),sales_channel:Object.keys(XV),status:void 0,delivery_men_ids:void 0,payment_methods:void 0,created_from:"",created_to:"",scheduled_from:"",scheduled_to:"",external_order_number:""};function Crr(e){return{type:BVt,payload:e}}function xrr(e){return{type:zVt,payload:e}}function Trr(e){return{type:HVt,payload:e}}function Arr(){return{type:UVt}}function Prr(){return{type:VVt}}function Rrr(){return{type:qVt}}const $Vt={waiting_confirmation:KK,pending_payment:jg,scheduled_confirmed:w4e,confirmed:rx,ready:rx,released:WK,delivered:_h,wait_for_pick_up:JI,waiting_to_catch:JI,closed:NK,canceled:QI,canceling:QI},WVt=e=>e==="closed"?{textColor:"#9CA3AF",bgColor:"#F3F4F6"}:e==="canceled"||e==="canceling"?{textColor:"#F87171",bgColor:"#FEE2E2"}:{textColor:"#6CC51D",bgColor:"#EFF8E3"};function GVt(){return u.createElement(Um,{Icon:u.createElement("div",{className:"h-52 w-52 animate-pulse rounded-full bg-gray-200"})},u.createElement("span",{className:"h-9 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-16 w-3/5 animate-pulse rounded-4 bg-gray-200",style:{marginTop:"0.6rem"}}),u.createElement("span",{className:"h-16 w-2/3 animate-pulse rounded-4 bg-gray-200",style:{marginTop:"0.6rem"}}))}function KVt({order:e,onClick:t}){if(!e)return null;const{order_number:r,status:n,final_value:i,order_type:a,created_at:o}=e,s=$Vt[n],l=WVt(n);return u.createElement(Um,{Icon:u.createElement("div",{className:"flex items-center justify-center rounded-full p-12",style:{color:l.textColor,backgroundColor:l.bgColor}},s&&u.createElement(s,{className:"h-28 w-28 fill-current"})),Action:u.createElement(qg,{className:"text-xl",style:{color:l.textColor}}),onClick:t},u.createElement("div",{className:"text-16 font-bold text-gray-700"},"Pedido Nº ",r),u.createElement("div",{className:"flex items-center text-14 text-gray-400"},"Feito dia ",qe(o).format("DD/MM/YYYY [às] HH:mm")),u.createElement("div",{className:"flex items-center space-x-8 text-14 text-gray-400"},u.createElement("span",null,"Total:"," ",u.createElement("strong",{className:"font-bold text-gray-600"},me.formatMonetaryValue(i))),u.createElement("span",null,"Tipo: ",u.createElement("strong",{className:"font-bold text-gray-600"},e3[a]))))}const S4e=10,YVt=(e,t=0)=>`/api/v1/company/client/${e}/orders?page=${t+1}&per_page=${S4e}&order_by=id&order=desc`,XVt=e=>ht.get(e).then(t=>t.status!==200||t.data.status===500?[]:t.data);function C4e(e){const{data:t,error:r,mutate:n,size:i,setSize:a,isValidating:o}=SY(g=>e?YVt(e,g):null,XVt,{dedupingInterval:6e4,revalidateOnFocus:!1,registerOnReconnect:!1}),s=x.useCallback(()=>a(i+1),[a,i]),l=x.useMemo(()=>{try{return t?[].concat(...t):[]}catch{return[]}},[t]),c=!t&&!r,d=c||i>0&&t&&typeof t[i-1]>"u",f=t?.[0]?.length===0,h=f||t&&t[t.length-1]?.length<S4e,p=o&&t&&t.length===i;return{orders:l,isLoading:c,isLoadingMore:d,isEmpty:f,isReachingEnd:h,isRefreshing:p,loadMore:s,mutate:n}}function ZVt(){const e=rf(),t=Gbe(),{orders:r,isLoading:n,isLoadingMore:i,loadMore:a,isEmpty:o,isError:s,isReachingEnd:l}=C4e(e);return n?u.createElement("div",{className:"space-y-12"},[1,2,3,4].map(c=>u.createElement(GVt,{key:c}))):s?u.createElement(Jd,{title:"Problema ao buscar os pedidos"}):o?u.createElement(dl,{title:"Nenhum pedido encontrado"}):u.createElement("div",{className:"space-y-12"},r.map(c=>u.createElement(KVt,{key:c.id,order:c,onClick:()=>t(c.id)})),r?.length>0&&!l&&u.createElement(fr,{fullWidth:!0,onClick:a,disabled:i,className:"text-gray-500"},i?u.createElement(ai,{color:"primary",size:20}):"Carregar mais"))}var gw={},Wme;function QVt(){if(Wme)return gw;Wme=1;var e=$t(),t=Wt();Object.defineProperty(gw,"__esModule",{value:!0}),gw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09v.58c0 .73-.6 1.33-1.33 1.33h-.01c-.73 0-1.33-.6-1.33-1.33v-.6c-1.33-.28-2.51-1.01-3.01-2.24-.23-.55.2-1.16.8-1.16h.24c.37 0 .67.25.81.6.29.75 1.05 1.27 2.51 1.27 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21v-.6c0-.73.6-1.33 1.33-1.33h.01c.73 0 1.33.6 1.33 1.33v.62c1.38.34 2.25 1.2 2.63 2.26.2.55-.22 1.13-.81 1.13h-.26c-.37 0-.67-.26-.77-.62-.23-.76-.86-1.25-2.12-1.25-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.02 1.83-1.39 2.83-3.13 3.16z"}),"MonetizationOnRounded");return gw.default=i,gw}var JVt=QVt();const x4e=et(JVt);var yw={},Gme;
353function eqt(){if(Gme)return yw;Gme=1;var e=$t(),t=Wt();Object.defineProperty(yw,"__esModule",{value:!0}),yw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M22 9h-4.79l-4.39-6.57c-.4-.59-1.27-.59-1.66 0L6.77 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1zM11.99 4.79L14.8 9H9.18l2.81-4.21zM12 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"ShoppingBasketRounded");return yw.default=i,yw}var tqt=eqt();const rqt=et(tqt);var _w={},Kme;function nqt(){if(Kme)return _w;Kme=1;var e=$t(),t=Wt();Object.defineProperty(_w,"__esModule",{value:!0}),_w.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 4.17 4.42 9.92 6.24 12.11.4.48 1.13.48 1.53 0C14.58 18.92 19 13.17 19 9c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),"RoomRounded");return _w.default=i,_w}var iqt=nqt();const aqt=et(iqt);function T4e(){return u.createElement("div",{className:"flex items-center justify-center rounded-full bg-gray-100 p-8 text-gray-400"},u.createElement(aqt,{className:"h-28 w-28"}))}function oqt(){return u.createElement(Um,{Icon:u.createElement(T4e,null)},u.createElement("span",{className:"mb-4 h-9 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-16 w-3/5 animate-pulse rounded-4 bg-gray-200"}))}function sqt({address:e,onClick:t,onDelete:r}){const n=Lr(),[i,a]=u.useState(!1);if(!e)return null;const{street:o,house_number:s,neighborhood:l,city:c,state:d,address_complement:f}=e,h=`${o}, ${s||"S/N"}`,p=`${l}, ${c}/${d}`,g=async _=>{_.stopPropagation();try{a(!0),await r()}catch(b){n.error(b.message||"Não foi possível concluir a operação")}a(!1)};return u.createElement(Um,{Icon:u.createElement(T4e,null),Action:i?u.createElement("div",{className:"flex items-center",style:{padding:9}},u.createElement(ai,{color:"primary",size:20})):r&&u.createElement(Yn,{title:"Excluir endereço",placement:"top",arrow:!0,enterTouchDelay:20},u.createElement(cr,{style:{padding:9},className:"text-gray-400",onClick:!i&&g},u.createElement($p,null))),onClick:t},u.createElement("span",{className:"truncate text-16 font-semibold text-gray-700"},h),u.createElement("span",{className:"truncate text-14 text-gray-400"},p),f&&u.createElement("span",{className:"truncate text-14 text-gray-400"},f))}const Yme={street:"",house_number:"",neighborhood:"",city:"",state:"",address_complement:"",landmark:"",zip_code:"",latitude:"",longitude:""};function vB(e){if(!e)return!1;const t=e.latitude,r=e.longitude;if(t==null||r==null||!String(t).trim()||!String(r).trim())return!1;const n=Number(t),i=Number(r);return Number.isFinite(n)&&Number.isFinite(i)}function lqt({open:e,initAddressData:t,onClose:r,onAddressUpdated:n}){const i=Lr(),a=rf(),{form:o,handleChange:s,setForm:l,setInForm:c}=g_(Yme),[d,f]=u.useState(!1),[h,p]=u.useState({}),[g,_]=u.useState(!1),[b,E]=u.useState(!1),S=u.useRef(null),P=u.useCallback(()=>{if(t){const B=t.data||{};l({...Yme,...B}),S.current=t.mode,E(vB(B))}},[t,l]),O=B=>B!=null&&!Number.isNaN(Number(B))&&Number(B)!==0;u.useEffect(()=>{if(!e||t?.mode!=="edit"||vB(t?.data))return;let B=!1;return(async()=>{try{const V=await m4e(t.data||{});if(B||V?.status!=="ok")return;const{debug_info:W}=V,$=W?.destination?.latitude,X=W?.destination?.longitude;O($)&&O(X)&&(c("latitude",$),c("longitude",X),E(!0))}catch{}})(),()=>{B=!0}},[e,t,c]),u.useEffect(()=>{e&&P()},[e,P]);const I=u.useCallback(B=>{h[B.target.name]&&p(V=>({...V,[B.target.name]:""})),s(B)},[h,s]),N=u.useCallback(()=>{const B={};return sc(o.street)||(B.street="Informe o nome da rua"),sc(o.neighborhood)||(B.neighborhood="Informe o nome do bairro"),sc(o.city)||(B.city="Informe o nome da cidade"),sc(o.state)||(B.state="Informe o nome do estado"),o.zip_code&&o.zip_code.replace(/\D/g,"").length!==8&&(B.zip_code="Informe um CEP válido"),Object.keys(B).length>0?(p(B),!1):!0},[o.city,o.neighborhood,o.state,o.street,o.zip_code]),M=u.useCallback(()=>{r&&!d&&r()},[d,r]),F=u.useCallback(async B=>{if(B.preventDefault(),N()&&!d){f(!0);let V;S.current==="edit"?V=wY(a,o):V=ZHt(a,o);try{const W=await V;W&&n&&n(W),M()}catch(W){i.error(W.message||"Não foi possível concluir a operação")}f(!1)}},[i,a,o,M,d,n,N]);return u.createElement(oi,{open:e,title:S.current==="edit"?"Atualizar endereço":"Cadastrar endereço",loading:d,onClose:M,onSubmit:F},u.createElement("div",{className:"space-y-20"},u.createElement("div",{className:"flex justify-between space-x-16"},u.createElement(Tr,{name:"street",label:"Rua",value:o.street||"",onChange:I,error:!!h.street,helperText:h.street,variant:"outlined",className:"flex-1",required:!0,fullWidth:!0,autoFocus:!0}),u.createElement(Tr,{name:"house_number",label:"Número",value:o.house_number||"",onChange:I,error:!!h.house_number,helperText:h.house_number,className:"w-1/5",variant:"outlined",fullWidth:!0})),u.createElement(Tr,{name:"neighborhood",label:"Bairro",value:o.neighborhood||"",onChange:I,error:!!h.neighborhood,helperText:h.neighborhood,variant:"outlined",required:!0,fullWidth:!0}),u.createElement("div",{className:"flex justify-between space-x-16"},u.createElement(Tr,{name:"city",label:"Cidade",value:o.city||"",onChange:I,error:!!h.city,helperText:h.city,variant:"outlined",className:"flex-1",required:!0,fullWidth:!0}),u.createElement(Tr,{name:"state",label:"Estado",value:o.state||"",onChange:I,error:!!h.state,helperText:h.state,variant:"outlined",className:"w-2/5",required:!0,fullWidth:!0})),u.createElement(Tr,{name:"address_complement",label:"Complemento",value:o.address_complement||"",onChange:I,error:!!h.address_complement,helperText:h.address_complement,variant:"outlined",fullWidth:!0}),u.createElement(Tr,{name:"landmark",label:"Ponto de referência",value:o.landmark||"",onChange:I,error:!!h.landmark,helperText:h.landmark,variant:"outlined",fullWidth:!0}),u.createElement(Tr,{name:"zip_code",label:"CEP",value:o.zip_code||"",onChange:I,error:!!h.zip_code,helperText:h.zip_code,placeholder:"00000-000",InputProps:{inputComponent:lIe},inputProps:{inputMode:"tel"},variant:"outlined",fullWidth:!0}),vB(o)&&b&&u.createElement("div",{className:"flex items-center"},u.createElement(fr,{startIcon:u.createElement(T2,null),onClick:()=>_(!0),variant:"outlined",fullWidth:!0},"Ajustar localização no mapa"))),u.createElement(VY,{open:g,onClose:()=>_(!1),value:{latitude:o.latitude,longitude:o.longitude},onConfirm:({latitude:B,longitude:V})=>{c("latitude",B),c("longitude",V)},title:"Ajustar localização"}))}const A4e=x.createContext(),cqt=A4e.Provider,P4e=()=>x.useContext(A4e);function uqt(){const e=rf(),t=P4e(),{data:r,isLoading:n,isError:i,mutate:a}=A2(e),[o,s]=u.useState(!1),l=u.useRef(null),c=u.useCallback((g,_)=>{l.current={mode:g,data:_},s(!0)},[]),d=u.useCallback(()=>{s(!1)},[]),f=u.useCallback(async g=>{await QHt(e,g),a(_=>({..._,addresses:_.addresses.filter(({id:b})=>b!==g)}),!1)},[e,a]),{addresses:h}=r||{},p=u.useMemo(()=>n?u.createElement("div",{className:"space-y-12"},u.createElement(oqt,null)):i?u.createElement(Jd,{title:"Problema ao buscar os endereços"}):h?.length?u.createElement("div",{className:"space-y-12"},h.sort((g,_)=>_.id-g.id).map(g=>u.createElement(sqt,{key:g.id,address:g,onClick:t?void 0:()=>c("edit",g),onDelete:t?void 0:()=>f(g.id)}))):u.createElement(dl,{title:"Nenhum endereço cadastrado"}),[h,f,c,i,n,t]);return u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("div",{className:"text-18 font-bold text-gray-700"},"Endereços"),!t&&u.createElement(Yn,{title:"Adicionar endereço",placement:"top",arrow:!0,enterTouchDelay:20},u.createElement(cr,{style:{padding:9},onClick:()=>c("new"),disabled:n||i},u.createElement(bh,null)))),p,!t&&u.createElement(lqt,{open:o,initAddressData:l.current,onClose:d,onAddressUpdated:g=>{a(_=>{let b=!1;const E=_.addresses.map(S=>S.id===g.id?(b=!0,{...S,...g}):S);return b?{..._,addresses:E}:{..._,addresses:[...E,g]}},!1)}}))}const Xme={name:"",ddi:55,telephone:"",email:"",birth_date:"",gender:"",internal_observation:""};function dqt({open:e,initClientData:t,onClose:r,onClientUpdated:n}){const i=Lr(),{form:a,handleChange:o,setForm:s,setInForm:l}=g_(Xme),[c,d]=u.useState(!1),[f,h]=u.useState({}),p=u.useCallback(()=>{t&&s({...Xme,...t,birth_date:t.birth_date?qe(t.birth_date).format("DD/MM/YYYY"):""})},[t,s]);u.useEffect(()=>{e&&p()},[e,p]);const g=u.useCallback(S=>{f[S.target.name]&&h(P=>({...P,[S.target.name]:""})),o(S)},[f,o]),_=u.useCallback(()=>{const S={};return sc(a.name)||(S.name="Informe seu nome e sobrenome"),a.telep
353hone&&!nIe(a.telephone,a.ddi,!0)&&(S.telephone="Informe um número válido"),a.email&&!tIe(a.email)&&(S.email="Informe um e-mail válido"),a.birth_date&&!rIe(a.birth_date)&&(S.birth_date="Informe uma data válida"),Object.keys(S).length>0?(h(S),!1):!0},[a.birth_date,a.ddi,a.email,a.name,a.telephone]),b=u.useCallback(()=>{r&&!c&&r()},[c,r]),E=u.useCallback(async S=>{if(S.preventDefault(),_()&&!c){d(!0);try{const P=await IK(a.id,a);P&&n&&n(P),b()}catch(P){i.error(P.message||"Não foi possível concluir a operação")}finally{d(!1)}}},[i,a,b,c,n,_]);return u.createElement(oi,{open:e,title:"Atualizar cliente",loading:c,onClose:b,onSubmit:E},u.createElement("div",{className:"space-y-20"},u.createElement(Tr,{name:"name",label:"Nome do cliente",value:a.name||"",onChange:g,error:!!f.name,helperText:f.name,variant:"outlined",required:!0,fullWidth:!0,autoFocus:!0}),u.createElement(eIe,{name:"telephone",ddi:a.ddi,setDdi:S=>{l("telephone",""),l("ddi",S)},value:a.telephone||"",onChange:g,error:!!f.telephone,helperText:f.telephone}),u.createElement(Tr,{name:"email",label:"E-mail",type:"email",value:a.email||"",onChange:g,error:!!f.email,helperText:f.email,placeholder:"Informe o seu e-mail",variant:"outlined",fullWidth:!0}),u.createElement(Tr,{name:"birth_date",label:"Data de nascimento",value:a.birth_date||"",onChange:g,error:!!f.birth_date,helperText:f.birth_date,placeholder:"00/00/0000",InputProps:{inputComponent:sIe},inputProps:{inputMode:"tel"},variant:"outlined",fullWidth:!0}),u.createElement(um,{variant:"outlined",fullWidth:!0},u.createElement(dm,{id:"gender-label"},"Gênero"),u.createElement(Bd,{labelId:"gender-label",name:"gender",value:a.gender||"",onChange:g,label:"Gênero"},u.createElement(ln,{value:""},"Não informado"),u.createElement(ln,{value:"female"},"Feminino"),u.createElement(ln,{value:"male"},"Masculino"),u.createElement(ln,{value:"non-binary"},"Não binário"),u.createElement(ln,{value:"other"},"Outro"))),u.createElement(Tr,{name:"internal_observation",label:"Anotações internas",value:a.internal_observation||"",onChange:g,error:!!f.internal_observation,helperText:f.internal_observation,variant:"outlined",fullWidth:!0,multiline:!0,rows:4})))}function iy({title:e,value:t,className:r,loading:n,error:i}){const a=n?u.createElement("span",{className:"h-24 w-4/5 animate-pulse rounded-4 bg-gray-200"}):i?u.createElement("strong",{className:"text-16 font-bold text-red"},"Houve um erro"):u.createElement("div",{className:"text-16 font-bold text-gray-500"},t);return u.createElement("div",{className:Ft("flex w-full flex-col space-y-1",r)},u.createElement("span",{className:"text-15 text-gray-400"},e),a)}const fqt={A:{key:"A",name:"Campeão",color:"green"},B:{key:"B",name:"Fiel",color:"blue"},C:{key:"C",name:"Em potencial",color:"purple"},D:{key:"D",name:"Novo",color:"purple"},E:{key:"E",name:"Promissor",color:"purple"}
353,F:{key:"F",name:"Precisa de atenção",color:"orange"},G:{key:"G",name:"Quase dormente",color:"orange"},H:{key:"H",name:"Não posso perder",color:"orange"},I:{key:"I",name:"Em risco",color:"orange"},J:{key:"J",name:"Hibernando",color:"orange"},K:{key:"K",name:"Perdido",color:"red"},null:{key:"null",name:"Sem classificação",color:"grey"}},ZV={female:"Feminino",male:"Masculino",non_binary:"Não binário",other:"Outro"},hqt=[{field:"orders_count",label:"Total de pedidos",type:"number_required"},{field:"total_orders_value",label:"Total gasto em pedidos",type:"number_required"},{field:"mean_ticket",label:"Ticket médio",type:"number_required"},{field:"created_at",label:"Data do cadastro",type:"date"},{field:"first_order_date",label:"Data do primeiro pedido",type:"date"},{field:"last_visit_date",label:"Data do último acesso ao site",type:"date"},{field:"last_order_date",label:"Data do último pedido",type:"date"},{field:"next_birthday",label:"Data do próximo aniversário",type:"date"},{field:"rfv_class",label:"Classificação RFV",type:"list_in_required",valueOptions:Object.values(fqt),valueOptionKey:"key",valueOptionLabel:"name"},{field:"gender",label:"Gênero",type:"list_in_required",valueOptions:Object.keys(ZV).map(e=>({key:e,label:ZV[e]})),valueOptionKey:"key",valueOptionLabel:"label"}],pqt={field:"loyalty_score",label:"Pontos de fidelidade",type:"number_required"},mqt={field:"loyalty_points_expires_at",label:"Vencimento dos pontos",type:"date"},vqt={field:"cashback_balance",label:"Valor de cashback",type:"number_required"},gqt={field:"cashback_expires_at",label:"Vencimento do cashback",type:"date"},yqt=[{field:"signup_source",label:"Canal de cadastro do cliente",type:"list_in_required",valueOptions:Object.keys(EV).map(e=>({key:e,label:EV[e]})),valueOptionKey:"key",valueOptionLabel:"label"},{field:"email",label:"E-mail do cliente",type:"string"},{field:"blocked",label:"Cliente bloqueado",type:"list_in_required",valueOptions:[{key:"true",label:"Sim"},{key:"false",label:"Não"}],valueOptionKey:"key",valueOptionLabel:"label"},{field:"be_notificated",label:"Aceita disparos via WhatsApp",type:"list_in_required",valueOptions:[{key:"true",label:"Sim"},{key:"false",label:"Não"}],valueOptionKey:"key",valueOptionLabel:"label"}];function Orr(e){const t=e==="cashback"?vqt:pqt,r=e==="cashback"?[gqt]:[mqt];return[...hqt,t,...r,...yqt]}const _qt="/api/v2/company/clients";function QV(e){const t=me.queryParamsObjectToString(e);return`${_qt}?${t}`}function Irr(e){const{data:t,error:r,mutate:n,isLoading:i}=Ll(QV(e),IZe,{dedupingInterval:2e4,revalidateOnFocus:!1,keepPreviousData:!0});return{data:t?.data,isLoading:i,isError:r,mutate:n}}const bqt=kh(e=>({filters:{page:1,per_page:10,order:"desc",order_by:"orders_count",search_text:"",query:{}},updateFilter:(t,r)=>e(n=>({...n,filters:t==="page"?{...n.filters,[t]:r}:{...n.filters,[t]:r,page:1}}))}));function Eqt(){const e=bqt(d=>d.filters),{page:t,per_page:r,order:n,order_by:i,search_text:a,query:o}=e,s={...o};let l=null,c=null;return Object.prototype.hasOwnProperty.call(o,"next_birthday_blank")&&(delete s.next_birthday_blank,s.next_birthday_null=!0),Object.prototype.hasOwnProperty.call(o,"next_birthday_present")&&(delete s.next_birthday_present,s.next_birthday_null=!1),Object.prototype.hasOwnProperty.call(o,"rfv_class_in")&&(l=o.rfv_class_in,delete s.rfv_class_in),Object.prototype.hasOwnProperty.call(o,"rfv_class_not_in")&&(c=o.rfv_class_not_in,delete s.rfv_class_not_in),{formattedFilters:{page:t,per_page:r,order:n,order_by:i,search_text:a,rfv_class_in:l,rfv_class_not_in:c,q:s}}}const wqt=({ddi:e,telephone:t,telephone_verified:r})=>{if(!t)return"Não informado";const n=t.replace(/\D/g,"");return u.createElement("div",{className:"inline-flex items-center space-x-8"},u.createElement("span",null,zd(t,e)),r&&u.createElement(Yn,{title:"Telefone verificado",placement:"top",enterTouchDelay:20,arrow:!0},u.createElement(BG,{className:"text-20 text-green"})),YC(t,e)&&u.createElement("a",{href:`https://${me.isMobile()?"api":"web"}.whatsapp.com/send?phone=${e||"55"}${n}`,target:"_blank",rel:"noopener noreferrer"},u.createElement(cr,{size:"small"},u.createElement(q4,null))))};function Sqt(){const{mutate:e}
353=di(),t=rf(),r=P4e(),n=Bl(),i=vc(),a=Lr(),{formattedFilters:o}=Eqt(),{data:s,isLoading:l,isError:c,mutate:d}=A2(t),[f,h]=u.useState(!1),[p,g]=u.useState(!1),_=u.useRef(null),b=u.useCallback(X=>{_.current=X,h(!0)},[]),E=u.useCallback(()=>{h(!1)},[]),S=u.useCallback(async X=>{X.persist();const re=X.target.checked;try{await IK(t,{[X.target.name]:re}),d(ae=>({...ae,[X.target.name]:re}),!1),a.success("Preferência alterada com sucesso")}catch(ae){a.error(ae.message||"Não foi possível concluir a operação")}},[t,d,a]),P=u.useCallback(()=>n({title:"Deseja realmente excluir este cliente?",description:"Esta operação não poderá ser desfeita.",cancellationText:"Cancelar",confirmationText:"Excluir"}).then(()=>{g(!0),JHt(t).then(()=>{e(QV(o),X=>({...X,data:X.data.filter(re=>re.id!==parseInt(t)),total:X.total-1})),i.replace("/clientes")}).catch(X=>a.error(X.message||"Não foi possível excluir o cliente")).finally(()=>g(!1))}).catch(()=>{}),[a,t,n,o,e,i]),O=u.useMemo(()=>({loading:l,error:c}),[c,l]),{ddi:I,telephone:N,telephone_verified:M,email:F,gender:B,birth_date:V,internal_observation:W,signup_source:$}=s||{};return u.createElement("div",{className:"space-y-32"},u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("div",{className:"text-18 font-bold text-gray-700"},"Informações pessoais"),!r&&u.createElement("div",{className:"space-x-8"},u.createElement(Yn,{title:"Excluir cliente",placement:"top",arrow:!0,enterTouchDelay:20},u.createElement(cr,{style:{padding:9},onClick:P,disabled:l||c},p?u.createElement(ai,{size:18}):u.createElement(bY,null))),u.createElement(Yn,{title:"Editar cliente",placement:"top",arrow:!0,enterTouchDelay:20},u.createElement(cr,{style:{padding:9},onClick:()=>b(s),disabled:l||c},u.createElement(ps,null))))),u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"flex flex-col space-y-12 sm:flex-row sm:space-y-0"},u.createElement("div",{className:"flex-1 space-y-12"},u.createElement(iy,{title:"Telefone",value:u.createElement(wqt,{ddi:I,telephone:N,telephone_verified:M}),className:"min-h-56",...O}),u.createElement(iy,{title:"E-mail",value:F||"Não informado",...O}),$&&u.createElement(iy,{title:"Origem do cliente",value:EV?.[$]||"Outra",...O})),u.createElement("div",{className:"min-w-160 space-y-12"},u.createElement(iy,{title:"Sexo",value:B?ZV[B]:"Não informado",...O,className:"min-h-56"}),u.createElement(iy,{title:"Data de nascimento",value:V?qe(V).format("DD/MM/YYYY"):"Não informado",...O}))),u.createElement(iy,{title:"Anotações internas",value:W||"Sem anotações",...O})),!r&&u.createElement(dqt,{open:f,initClientData:s,onClose:E,onClientUpdated:X=>{const{id:re,birth_date:ae,email:Q,gender:ie,ddi:le,telephone:fe,name:de}=X;d(ge=>({...ge,birth_date:ae,email:Q,gender:ie,telephone:fe,ddi:le,name:de}),!1),e(QV(o),ge=>({...ge,data:ge.data.map(Ae=>Ae.id===re?{...Ae,ddi:le,name:de,telephone:fe,birth_date:ae,gender:ie}:Ae)}),!1)}})),u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-18 font-bold text-gray-700"},"Preferências de notificações"),u.createElement("div",{className:"flex items-center space-x-12"},u.createElement(bI,{color:"primary",name:"be_notificated",size:"small",checked:!!s?.be_notificated,onChange:S}),u.createElement("div",{className:"text-16 text-gray-500"},"Deseja receber disparos via WhatsApp"))),u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-18 font-bold text-gray-700"},"Preferências gerais"),u.createElement("div",{className:"flex items-center space-x-12"},u.createElement(bI,{color:"primary",name:"blocked",size:"small",checked:!!s?.blocked,onChange:S}),u.createElement("div",{className:"text-16 text-gray-500"},s?.blocked?"Cliente bloqueado":"Bloquear cliente"," "))))}function cP({Icon:e,value:t,description:r,loading:n,error:i}){const a=n?u.createElement("span",{className:"h-24 w-4/5 animate-pulse rounded-4 bg-gray-200"}):i?u.createElement("strong",{className:"text-16 font-bold text-red"},"Houve um erro"):u.createElement("strong",{className:"text-18 font-bold text-gray-700"},t);return u.createElement("div",{className:"flex w-full items-center space-x-20 rounded-8 border-1 border-solid border-gray-200 p-12"},e,u.createElement("div",{className:"flex flex-1 flex-col"},a,u.createElement("span",{className:"text-15 text-gray-400"},r)))}function Cqt(){const e=rf(),{data:t,isLoading:r,isError:n}=A2(e),i=u.useMemo(()=>({loading:r,error:n}),[n,r]),{total_order_size:a,mean_ticket:o,last_order_date:s,satisfaction_surveys_average_rating:l}=t||{};return u.createElement("div",{className:"space-y-24"},u.createElement("div",{className:"grid grid-cols-1 gap-12 sm:grid-cols-2"},u.createElement(cP,{Icon:u.createElement(c4e,{fontSize:"large",color:"inherit",className:"text-gray-400"}),description:"pedidos feitos",...i,value:a}),u.createElement(cP,{Icon:u.createElement(x4e,{fontSize:"large",color:"inherit",className:"text-gray-400"}),description:"ticket médio",...i,value:me.formatMonetaryValue(o)}),u.createElement(cP,{Icon:u.createElement(rqt,{fontSize:"large",color:"inherit",className:"text-gray-400"}),description:"último pedido",...i,value:s?qe(s).format("DD/MM/YYYY"):"Sem dados"}),u.createElement(cP,{Icon:u.createElement(ZI,{fontSize:"large",color:"inherit",className:"text-gray-400"}),description:"avaliação média",...i,value:parseFloat(l)?l.toFixed(1).toString().replace(".",","):"Sem dados"})),u.createElement(UY,null,u.createElement(Sqt,null)),u.createElement(uqt,null))}function xqt({open:e,onClose:t,clientId:r,readOnly:n}){const i=yc("(max-width:600px)"),[a,o]=u.useState(0),{hasModule:s}=Ah();u.useEffect(()=>{e&&o(0)},[e]);const l=u.useMemo(()=>[Cqt,ZVt,iVt,IVt][a],[a]);return u.createElement(Eo,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,fullScreen:i,disableEnforceFocus:!0,PaperProps:{className:"shadow-md rounded-12 h-full"}},u.createElement(cqt,{value:n},u.createElement(zUt,{value:r},u.createElement("div",{className:"relative flex h-full w-full flex-col"},u.createElement(cr,{className:"absolute right-12 top-12",style:{padding:9},onClick:t},u.createElement(Aa,null)),u.createElement(UUt,null),u.createElement("div",{className:"flex w-full flex-shrink-0"},u.createElement(OPe,{value:a,onChange:(c,d)=>o(d),variant:"fullWidth",classes:{root:"border-0 border-b-1 border-solid border-gray-200 min-h-auto font-normal w-full text-gray-400",indicator:"bg-gray-700"}},["Perfil","Pedidos","Avaliações",s(At.LOYALTY_PROGRAM)&&"Fidelidade"].filter(c=>c).map(c=>u.createElement(wPe,{key:c,label:c,classes:{root:"normal-case min-w-0 min-h-auto py-8 font-normal",selected:"text-gray-700"}})))),u.createElement("div",{className:"overflow-auto p-16 sm:p-24"},u.createElement(l,null))))))}function Tqt({open:e,onClose:t,errors:r}){const n=yc("(max-width:600px)"),[i,a]=u.useState(null);return u.useEffect(()=>{r&&a(r)},[r]),u.createElement(Eo,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,fullScreen:n,disableEnforceFocus:!0,PaperProps:{className:"shadow-md rounded-12"}},u.createElement("div",{className:"relative flex h-full w-full flex-col overflow-hidden"},u.createElement("div",{className:"flex flex-row items-center"},u.createElement("div",{className:"p-20 text-18 font-bold text-gray-600"}
353,"Alguns itens não foram adicionados"),u.createElement(cr,{className:"absolute right-12",onClick:t},u.createElement(Aa,null))),u.createElement("div",{className:"flex w-full flex-col space-y-12 overflow-auto p-20 pt-0"},i&&Object.keys(i).map(function(o,s){const l=i[o];return u.createElement("div",{key:s,className:"flex w-full flex-col space-y-6 rounded-8 border border-solid border-orange-light bg-orange-lightest px-16 py-8 text-14 text-orange-dark"},l.addOns.length>0?u.createElement(u.Fragment,null,u.createElement("span",{className:"text-16 font-bold"},l.product.name),u.createElement("span",{className:"text-14 font-semibold"},l.message),u.createElement("div",{className:"flex flex-col space-y-6"},l.addOns.map(c=>u.createElement("div",{key:c.id},"-",c.name)))):u.createElement(u.Fragment,null,u.createElement("span",{className:"text-16 font-bold"},l.message),l.comboErrors&&l.comboErrors.map(c=>c.addOns.length>0?u.createElement(u.Fragment,null,u.createElement("span",{className:"text-15 font-bold"},"*",c.product.name),u.createElement("span",{className:"text-14 font-semibold"},c.message),u.createElement("div",{className:"flex flex-col space-y-6"},c.addOns.map(d=>u.createElement("div",{key:d.id},"-",d.name)))):u.createElement("span",{className:"text-15 font-bold"},"*",c.message))))}))))}function R4e({Icon:e,children:t,Action:r,onClick:n,className:i,Collapse:a=null}){return u.createElement("div",{className:Ft("flex w-full flex-col items-center overflow-hidden rounded-8 border-1 border-solid border-gray-200",i)},u.createElement("div",{className:"flex w-full cursor-pointer items-center space-x-16 p-12 hover:bg-gray-50",onClick:n},e,u.createElement("div",{className:"flex flex-1 flex-col space-y-1 truncate"},t),r),a&&a)}function Zme({product:e}){const t=e.order_subitems;return!t.length&&!e.observation?null:u.createElement("div",{className:"text-14"},t.length>0&&u.createElement("div",{className:"mt-4 w-full text-gray-600"},t.map(({id:r,name:n,quantity:i})=>u.createElement("div",{key:r,className:"flex items-center justify-between"},i>1?u.createElement("div",{className:"flex-grow"},`${i}  ${n}`):u.createElement("div",{className:"flex-grow"},`- ${n}`)))),e.observation&&u.createElement("div",{className:"mt-4 flex flex-grow text-red"},u.createElement("div",{className:"font-bold"},"OBS: ",e.observation)))}function Aqt({key:e}){return u.createElement("div",{key:e,className:"my-6 flex space-x-12 rounded-6 border-1 border-solid border-gray-200 bg-gray-50 px-12 py-16"},u.createElement("div",{className:"flex w-full flex-col justify-center"},u.createElement("div",{className:"flex space-x-12"},u.createElement("div",{className:"h-20 w-24 animate-pulse rounded-4 bg-gray-200"}),u.createElement("div",{className:"flex flex-1 flex-col space-y-6"},u.createElement("span",{className:"h-20 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-16 w-2/3 animate-pulse rounded-4 bg-gray-200"})),u.createElement("div",{className:"h-20 w-56 animate-pulse rounded-4 bg-gray-200"}))))}function Pqt({orderItem:e,onClick:t}){const[r,n]=u.useState(!1);return u.createElement("div",{onAnimationEnd:()=>{n(!1)},className:Ft("flex space-x-12 rounded-6 border-1 border-solid border-gray-200 bg-gray-50 px-16 py-12 text-gray-600",r&&"animate-passingThroughSuccess")},u.createElement("div",{className:"flex w-full flex-col justify-center"},u.createElement("div",{className:"flex items-center justify-between text-16 font-bold"},u.createElement("div",{className:"mr-8 flex min-w-24 items-start whitespace-nowrap"},e.quantity.toString().replace(".",",")),u.createElement("div",{className:"flex-grow"},e.name," ",e.custom_code&&u.createElement("span",{className:"mr-12 text-red"},"(Cód. ",e.custom_code,")")),u.createElement("div",{className:"ml-8 inline-flex flex-shrink-0 items-center justify-end space-x-8"},u.createElement("span",null,me.formatMonetaryValue(e.price)))),u.createElement("div",{className:"ml-32"},e.kind==="combo"?e.combo_items.map(i=>u.createElement("div",{key:i.id},u.createElement("div",{className:"text-14 font-bold"},"- ",i.name),u.createElement("div",{className:"px-12"},u.createElement(Zme,{product:i})))):u.createElement(Zme,{product:e})),u.createElement(fr,{onClick:i=>{t(i)||n(!0)},size:"small",disabled:r,className:"mt-12 cursor-pointer rounded-6 border-1 border-solid border-gray-300 bg-white px-12 py-8 text-center font-bold text-gray-600 hover:bg-gray-100"},"Adicionar ao carrinho")))}function Rqt({order:e}){const{data:t,isLoading:r}=X6t(e.id),n=An(),[i,a]=u.useState(!1),o=u.useCallback(l=>{let c;return l.forEach(d=>{c=n(OFt(d))}),c},[n]),s=u.useMemo(()=>t?.order_items,[t]);return r||!t?u.createElement("div",{className:"flex flex-1 flex-col overflow-hidden px-12 pb-12 pt-8"},[1,2].map(l=>u.createElement(Aqt,{key:l}))):s?u.createElement("div",{className:"flex w-full flex-1 flex-col space-y-12 overflow-hidden px-12 pb-12 pt-8"},s?.length>1&&u.createElement(fr,{onClick:l=>{l.stopPropagation(),o(s),a(!0)},onAnimationEnd:()=>{a(!1)},size:"small",disabled:i,className:Ft("cursor-pointer rounded-6 border-1 border-solid border-gray-300 bg-white px-12 py-8 text-center font-bold text-gray-600 hover:bg-gray-100",i&&"animate-passingThroughSuccess")},"Repetir todo o pedido"),u.createElement("div",{className:"flex flex-1 flex-col space-y-12 overflow-auto"}
353,e&&s&&s.map(l=>u.createElement(Pqt,{key:l.id,orderItem:l,onClick:()=>o([l])})))):u.createElement(dl,{title:"Nenhum item encontrado"})}const Oqt={waiting_confirmation:KK,pending_payment:jg,scheduled_confirmed:w4e,confirmed:rx,ready:rx,released:WK,delivered:_h,wait_for_pick_up:JI,waiting_to_catch:JI,closed:NK,canceled:QI,canceling:QI},Iqt=e=>e==="closed"?{textColor:"#9CA3AF",bgColor:"#F3F4F6"}:e==="canceled"||e==="canceling"?{textColor:"#F87171",bgColor:"#FEE2E2"}:{textColor:"#6CC51D",bgColor:"#EFF8E3"};function kqt(){return u.createElement(R4e,{Icon:u.createElement("div",{className:"h-52 w-52 animate-pulse rounded-full bg-gray-200"})},u.createElement("span",{className:"h-9 w-4/5 animate-pulse rounded-4 bg-gray-200"}),u.createElement("span",{className:"h-16 w-3/5 animate-pulse rounded-4 bg-gray-200",style:{marginTop:"0.6rem"}}),u.createElement("span",{className:"h-16 w-2/3 animate-pulse rounded-4 bg-gray-200",style:{marginTop:"0.6rem"}}))}function Nqt({order:e,onClick:t}){const[r,n]=u.useState(!1),i=u.useRef(!0);if(u.useEffect(()=>{i.current&&r&&(i.current=!1)},[r]),!e)return null;const{order_number:a,status:o,final_value:s,order_type:l,created_at:c}=e,d=Oqt[o],f=Iqt(o);return u.createElement(R4e,{Icon:u.createElement("div",{className:"flex items-center justify-center rounded-full p-12",style:{color:f.textColor,backgroundColor:f.bgColor}},d&&u.createElement(d,{className:"h-28 w-28 fill-current"})),Action:u.createElement(qg,{className:Ft("transform text-xl transition-transform duration-500",r?"-rotate-90":"rotate-90"),style:{color:f.textColor}}),onClick:h=>{t(h),n(!r)},Collapse:u.createElement(Oh,{className:"w-full",in:r},(r||!i.current)&&u.createElement(Rqt,{order:e}))},u.createElement("div",{className:"flex flex-col"},u.createElement("div",{className:"text-16 font-bold text-gray-700"},"Pedido Nº ",a),u.createElement("div",{className:"flex items-center text-14 text-gray-400"},"Feito dia ",qe(c).format("DD/MM/YYYY [às] HH:mm")),u.createElement("div",{className:"flex items-center space-x-8 text-14 text-gray-400"},u.createElement("span",null,"Total:"," ",u.createElement("strong",{className:"font-bold text-gray-600"},me.formatMonetaryValue(s))),u.createElement("span",null,"Tipo:"," ",u.createElement("strong",{className:"font-bold text-gray-600"},e3[l])))))}function Dqt({client:e}){const{orders:t,isLoading:r,isEmpty:n,isError:i}=C4e(e.id);return i?u.createElement(Jd,{title:"Problema ao buscar os pedidos"}):n?u.createElement(dl,{title:"Nenhum pedido encontrado"}):r?u.createElement("div",{className:"w-full flex-1 space-y-16 overflow-auto p-16"},[1,2,3,4].map(a=>u.createElement(kqt,{key:a}))):u.createElement("div",{className:"w-full flex-1 space-y-16 overflow-auto p-16"},t?.filter(a=>!Object.keys(Bc).includes(a.sales_channel)).map(a=>u.createElement(Nqt,{key:a.id,order:a,onClick:()=>{}})))}function Mqt({open:e,onClose:t,client:r}){const n=An(),i=yc("(max-width:600px)"),a=at(({placeOrder:l})=>l.placeOrder.errorsInRepeat),o=u.useCallback(()=>{n(LV(null))},[n]),s=!!a;return u.createElement(Eo,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,fullScreen:i,disableEnforceFocus:!0,PaperProps:{className:"shadow-md rounded-12 h-full"}},u.createElement("div",{className:"relative flex h-full w-full flex-col overflow-hidden"},u.createElement("div",{className:"flex flex-col space-y-8 p-16"},u.createElement("div",{className:"flex flex-row items-center"},u.createElement("div",{className:"text-18 font-bold text-gray-600"},"Pedidos Anteriores"),u.createElement(cr,{className:"absolute right-6",onClick:t},u.createElement(Aa,null))),u.createElement("div",{className:"text-16 font-light text-gray-600"},"Selecione um pedido e clique nos produtos que deseja adicionar ao carrinho")),u.createElement(zs,null),u.createElement("div",{className:"flex w-full overflow-hidden"},u.createElement(Dqt,{client:r}))),u.createElement(Tqt,{open:s,onClose:o,errors:a}))}const Lqt=({params:e,loading:t})=>{const{InputProps:r,inputProps:n,...i}=e||{};return u.createElement("div",{ref:r?.ref,className:"flex w-full items-center space-x-12 px-12 py-8"},u.createElement(hm,{className:"text-gray-400"}),u.createElement(Hu,{...i,className:"pr-36",placeholder:"Pesquisar cliente...",inputProps:{...n,className:"text-gray-600"},endAdornment:u.createElement("div",{className:"flex items-center"},t?u.createElement(ai,{color:"inherit",size:18}):null,r.endAdornment)}))};
353function Fqt({autoFocus:e}){const t=An(),r=Lr(),n=at(({placeOrder:S})=>S.placeOrder.checkout.client),i=at(({placeOrder:S})=>S.placeOrder.checkout.orderType),a=at(({placeOrder:S})=>S.placeOrder.checkout.deliveryTime),o=at(({placeOrder:S})=>S.placeOrder.checkout.payment),s=at(({placeOrder:S})=>S.placeOrder.orderInEdit),l=o.payments.find(S=>S.payment_method===mr.debt_book.id),[c,d]=u.useState(!1),[f,h]=u.useState(!1),p=X4(),g=u.useCallback(S=>{S&&(t(rme(S)),S?.addresses?.length>0&&t(nme(S.addresses.sort((P,O)=>O.id-P.id))))},[t]),_=u.useCallback(()=>{h(!1)},[]),b=u.useCallback(()=>l?(r.info("Remova o pagamento fiado para poder remover o cliente",{autoHideDuration:4e3}),Promise.reject()):(t(nme([])),t(rme(null))),[r,t,l]),E=p(Np.missingClient);return u.createElement(u.Fragment,null,u.createElement("div",{className:Ft("overflow-hidden rounded-8 border-1 border-solid",n&&"cursor-pointer",E?"border-red-dark":"border-gray-200")},u.createElement(cIe,{selectedClient:n,onClientSelected:g,resetClient:b,allowCreateClient:!0,allowEditClient:!s,blockRemoveClient:s&&(o.loyaltyDiscount||l),textFieldProps:{autoFocus:e,required:i==="delivery"||a==="scheduling",error:!n&&(i==="delivery"||a==="scheduling")},InputComponent:Lqt,showInternalObservation:!0}),n&&!["Balcão","Pedido de mesa"].includes(n.name)&&u.createElement("div",{className:"flex divide-x-1 divide-y-0 divide-solid divide-gray-200 border-0 border-t-1 border-dashed border-gray-200 bg-gray-50 text-12 font-semibold text-gray-500"},u.createElement("span",{onClick:()=>{d(!0)},className:"flex-1 py-8 text-center hover:bg-gray-100"},"DETALHES DO CLIENTE"),u.createElement("span",{onClick:()=>{h(!0)},className:"flex-1 py-8 text-center hover:bg-gray-100"},"PEDIDOS ANTERIORES"))),u.createElement(xqt,{open:c,onClose:()=>d(!1),clientId:n?.id,readOnly:!0}),n&&u.createElement(Mqt,{client:n,open:f,onClose:_}))}async function Bqt(e){return ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data})}function zqt(){const e=at(({globalCompany:o})=>o.company.id),{data:t,error:r,mutate:n}=Jc("/api/v2/company/company_users",Bqt,{dedupingInterval:15e3}),i=t?.filter(o=>o.company_ids?.includes(e));return{data:F1(i||[],"name"),isLoading:!r&&!t,isError:r,mutate:n}}const gB="selectedUserId",O4e=kh(e=>({selectedUserId:sessionStorage.getItem(gB)?parseInt(sessionStorage.getItem(gB)):null,setSelectedUserId:t=>e(r=>(sessionStorage.setItem(gB,t),{...r,selectedUserId:t}))}));function I4e(){const e=at(({auth:n})=>n.user.user),t=O4e(n=>n.selectedUserId),{hasUserPermissions:r}=d0();return r(Te.ALLOW_ORDER_WITH_OTHER_USER)&&t||e?.id}function Hqt({size:e="small",label:t="Atendente"}){const r=at(({auth:s})=>s.user.user),n=I4e(),i=O4e(s=>s.setSelectedUserId),{data:a}=zqt();u.useEffect(()=>{r?.id&&(!n||!a.find(s=>s.id===n))&&i(r.id)},[a,r,n,i]);const o=u.useCallback(s=>{const l=parseInt(s.target.value);l&&i(l)},[i]);return u.createElement("div",{className:"py-8"},u.createElement(Tr,{id:"user_id",value:n||"",onChange:o,size:e,label:t,variant:"outlined",select:!0,fullWidth:!0},a.map(s=>u.createElement(ln,{key:s.id,value:s.id},s.name))))}function Uqt(){const e=An(),t=Lr(),r=Uu(),[n,i]=u.useState(!1),a=at(yFt),o=at(sY),{basePathname:s,dialogPathname:l,simplifiedVersion:c,tableSession:d,sendTableOrder:f,showEmployeeSelector:h}=u.useContext(R2),p=at(Y3e),g=I4e(),_=vc(),{hasUserPermissions:b}=d0(),E=at(({placeOrder:M})=>M.placeOrder.checkout.internalObservation),S=M=>{e(kFt(M))},P=u.useCallback(()=>{const{order_items:M}=p||{},F={order_items:M};h&&g&&(F.order_items=F.order_items.map(B=>({...B,user_id:g}))),e($4()),e(f(F,{...d},r)).then(B=>{B&&(e(HS()),e(t1()),_.push(`/${s}`))}).finally(()=>e(W4()))},[p,h,g,e,f,d,r,_,s]),O=u.useCallback(()=>{if(a.length>0){i(!0),t.info(a[0].message);return}else n||i(!1),c?P():_.push(`/${s}/${l}?pagamento=v`)},[t,s,l,P,_,a,n,c]),I=u.useCallback(()=>{O()},[O]);i5("p",I);const N=u.useCallback(M=>!!(n&&a.find(F=>F.id===M)),[a,n]);return u.createElement(_Ht,{value:N},u.createElement("div",{className:"flex h-full flex-col"},u.createElement(DHt,null),u.createElement("div",{className:"flex-1 space-y-12 overflow-auto p-12"},!c&&u.createElement(u.Fragment,null,u.createElement(Fqt,null),u.createElement(MUt,null),u.createElement(jHt,null),u.createElement(MHt,{internalObservation:E,updateInternalObservation:S}
353),u.createElement(OHt,null)),u.createElement(SHt,null)),!c&&u.createElement(zHt,null),u.createElement("div",{className:Ft("space-y-12 px-12 pb-12 pt-8",c&&"border-0 border-t-1 border-solid border-gray-200")},h&&b(Te.ALLOW_ORDER_WITH_OTHER_USER)&&u.createElement(Hqt,null),c?u.createElement(fr,{variant:"contained",color:"primary",onClick:O,className:"flex items-center justify-between rounded-8 px-16 py-12 text-18 font-bold normal-case shadow-none",fullWidth:!0},u.createElement("div",{className:"flex items-center"},"ENVIAR PEDIDO"," ",!me.isMobile()&&u.createElement("span",{className:"ml-8 text-14 opacity-75"},"(Ctrl + p)")),u.createElement("span",null,me.formatMonetaryValue(o))):u.createElement(fr,{variant:"contained",color:"primary",onClick:O,className:"flex items-center justify-between rounded-8 px-16 py-12 text-18 font-bold normal-case shadow-none",fullWidth:!0},u.createElement("div",{className:"flex items-center"},"PAGAR"," ",!me.isMobile()&&u.createElement("span",{className:"ml-8 text-14 opacity-75"},"(Ctrl + p)")),u.createElement("span",null,me.formatMonetaryValue(o))),u.createElement(Py,{smUp:!0},u.createElement(fr,{variant:"outlined",color:"primary",onClick:()=>_.push(`/${s}/${l}?catalogo=v`),classes:{label:"flex justify-center"},className:"flex items-center justify-between rounded-8 px-16 py-12 text-16 font-bold shadow-none",fullWidth:!0},"ADICIONAR PRODUTO")))))}const Vqt=u.memo(Uqt);function qqt(){const{handleClose:e}=u.useContext(Bm);return u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between border-0 border-b-1 border-solid border-gray-200 px-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},"Pagamento do pedido"),u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:e},u.createElement(Yn,{title:"Fechar janela"},u.createElement(Dm,{color:"inherit"}))))}var bw={},Qme;function jqt(){if(Qme)return bw;Qme=1;var e=$t(),t=Wt();Object.defineProperty(bw,"__esModule",{value:!0}),bw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8.75 13.68c-.13.43-.62.63-1.02.45a.749.749 0 01-.4-.9c.12-.41.18-.83.17-1.24-.01-.41-.06-.8-.17-1.18-.1-.36.06-.75.4-.9.42-.19.91.04 1.04.49.15.51.22 1.03.23 1.57 0 .56-.08 1.14-.25 1.71zm3.14 1.59c-.17.41-.67.57-1.06.35-.33-.19-.46-.59-.32-.94.33-.77.49-1.63.49-2.56 0-.96-.18-1.89-.53-2.78-.14-.36.02-.76.36-.94.39-.2.87-.02 1.03.39.42 1.06.63 2.18.63 3.33.02 1.13-.19 2.19-.6 3.15zM15 16.6c-.17.4-.64.58-1.02.39-.35-.17-.52-.59-.37-.95.59-1.39.89-2.75.89-4.06 0-1.31-.3-2.65-.88-4.01-.16-.36.01-.78.36-.95.39-.2.85-.02 1.02.38.66 1.54 1 3.08 1 4.58s-.34 3.06-1 4.62z"}),"ContactlessRounded");return bw.default=i,bw}var $qt=jqt();const CY=et($qt);function k4e({imageKey:e,name:t}){if(!t&&!e)return null;const r=e?kI[e]:null,n=t||e;return u.createElement("span",{className:"flex items-center space-x-8 text-14 text-gray-500"},r&&u.createElement(r,{className:"h-auto w-24 flex-shrink-0"}),u.createElement("span",null,n))}var Ew={},Jme;function Wqt(){if(Jme)return Ew;Jme=1;var e=$t(),t=Wt();Object.defineProperty(Ew,"__esModule",{value:!0}),Ew.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertRounded");return Ew.default=i,Ew}var Gqt=Wqt();const lx=et(Gqt);var ww={},eve;function Kqt(){if(eve)return ww;eve=1;var e=$t(),t=Wt();Object.defineProperty(ww,"__esModule",{value:!0}),ww.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v4c0 1.1.9 2 2 2h2v2c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-2h2c1.1 0 2-.9 2-2v-4c0-1.66-1.34-3-3-3zm-4 11H9c-.55 0-1-.45-1-1v-4h8v4c0 .55-.45 1-1 1zm4-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-2-9H7c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"}),"PrintRounded");return ww.default=i,ww}var Yqt=Kqt();const N4e=et(Yqt);async function krr(e,t,r){return(await ht.post(`/api/v2/orders/${e}/payment_values/${t}/pay_with_payment_point`,{payment_point_id:r})).data}async function Nrr(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}/cancel_payment_with_payment_point`)).data}async function D4e(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}/refund_payment_with_payment_point`)).data}async function M4e(e,t){return(await ht.put(`/api/v2/orders/${e}/payment_values/${t}/refresh_pix_auto_payment`)).data}async function t3(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}/cancel_pix_auto_payment`)).data}async function L4e(e,t){return(await ht.put(`/api/v2/orders/${e}/payment_values/${t}/refresh_payment_with_smart_pos`)).data}async function F4e(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}/cancel_payment_with_smart_pos`)).data}async function B4e(e,t){return(await ht.delete(`/api/v2/orders/${e}/payment_values/${t}/refund_payment_with_smart_pos`)).data}function Xqt(){const{data:e,error:t,mutate:r}=Jc("/api/v2/company/tax/taxpayer",wm,{dedupingInterval:2e4});return{data:e,isLoading:!t&&!e,isError:t,mutate:r}}function z4e(){const e=Uu(),{data:t}=Xqt();return u.useCallback((n,i)=>{e({order:n,paymentValue:i,razaoSocial:t?.razao_social},"paymentReceipt")},[t?.razao_social,e])}function Zqt({payment:e,order:t}){const r=z4e(),n=Lr(),i=Bl(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(null),d=F=>{c(F.currentTarget)},f=()=>{c(null)},h=jK(e),p=$K(e),g=ll(e),_=u.useCallback(async F=>{await Af(a,hs,t?.id,F)},[a,t?.id]),b=u.useCallback(()=>{i({title:"Reembolsar pagamento?",description:h?"Tem certeza que deseja reembolsar o pagamento Pix? Essa ação é irreversível.":"O estorno será feito no cartão do cliente. Essa ação é irreversível.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{const B=await(h?t3:D4e)(t?.id,e?.id);await Af(a,hs,t?.id,B),n.success("Pagamento reembolsado com sucesso!")}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao reembolsar pagamento")}s(!1)}).catch(()=>{})},[n,i,a,h,t?.id,e?.id]),E=u.useCallback(()=>{i({title:"Cancelar pagamento Pix?",description:"O pagamento Pix será cancelado e não poderá mais ser realizado. Essa ação é irreversível.",cancellationText:"Voltar",confirmationText:"Cancelar pagamento"}).then(async()=>{s(!0);try{const F=await t3(t?.id,e?.id);await Af(a,hs,t?.id,F),n.success("Pagamento Pix cancelado com sucesso!")}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao cancelar pagamento Pix")}s(!1)}).catch(()=>{})},[n,i,a,t?.id,e?.id]),S=u.useCallback(()=>{r(t,e)},[t,e,r]),P=u.useCallback(async()=>{s(!0);try{const F=await M4e(t?.id,e?.id);await _(F),n.success("Status atualizado com sucesso!")}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao atualizar status")}s(!1)},[n,t?.id,e?.id,_]),O=u.useCallback(async()=>{s(!0);try{const F=await L4e(t?.id,e?.id);await _(F),n.success("Status atualizado com sucesso!")}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao atualizar status")}s(!1)},[n,t?.id,e?.id,_]),I=u.useCallback(()=>{i({title:"Cancelar pagamento na maquininha?",description:"A solicitação será cancelada na maquininha. O status só muda após a confirmação da maquininha.",cancellationText:"Voltar",confirmationText:"Cancelar pagamento"}).then(async()=>{s(!0);try{const F=await F4e(t?.id,e?.id);await _(F),n.success("Cancelamento solicitado. Aguarde a confirmação da maquininha.")}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao cancelar pagamento")}s(!1)}).catch(()=>{})},[n,i,t?.id,e?.id,_]),N=u.useCallback(()=>{i({title:"Estornar pagamento na maquininha?",description:"O estorno será solicitado na maquininha. O cliente precisa estar presente e passar o mesmo cartão usado no pagamento. O status só muda após a confirmação na maquininha.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{const F=await B4e(t?.id,e?.id);await _(F),n.success('Estorno solicitado na maquininha. Peça ao cliente para passar o mesmo cartão do pagamento e use "Atualizar status" para acompanhar.')}catch(F){const B=F.response?.data?.message||F?.message;n.error(B||"Erro ao estornar pagamento")}s(!1)}).catch(()=>{})},[n,i,t?.id,e?.id,_]),M=u.useMemo(()=>[e?.status==="paid"&&(p||h)&&{id:"refund-payment",name:"Reembolsar",icon:u.createElement(tx,null),onClick:b},h&&e?.status==="pending"&&{id:"cancel-pix-payment",name:"Cancelar pagamento",icon:u.createElement($p,null),onClick:E},(p||g)&&["paid","refunded"].includes(e?.status)&&{id:"print-payment-receipt",name:"Imprimir",icon:u.createElement(N4e,null),onClick:S},h&&KIe.includes(e?.status)&&e?.pix_expires_at&&qe().isAfter(qe(e.pix_expires_at))&&{id:"update-pix-status",name:"Atualizar status",icon:u.createElement(Wg,null),onClick:P},g&&["sent_to_payment_point","refunding","paid"].includes(e?.status)&&{id:"refresh-smart-pos",name:"Atualizar status",icon:u.createElement(Wg,null),onClick:O},g&&e?.status==="sent_to_payment_point"&&{id:"cancel-smart-pos",name:"Cancelar pagamento",icon:u.createElement($p,null),onClick:I},g&&["paid","refunding"].includes(e?.status)&&{id:"refund-smart-pos",name:"Reembolsar",icon:u.createElement(tx,null),onClick:N}
353].filter(Boolean),[p,g,e?.status,e?.pix_expires_at,h,b,E,S,P,O,I,N]);if(!M.length)return null;if(o)return u.createElement(cr,{disabled:!0,className:"rounded-6 p-6 text-gray-400"},u.createElement(ai,{size:16,color:"inherit"}));if(M.length===1){const F=M[0];return u.createElement(Ma,{tooltip:F.name,onClick:F.onClick,color:"text-gray-400",padding:"p-8"},F.icon)}return u.createElement(u.Fragment,null,u.createElement(cr,{onClick:d,className:"rounded-6 p-8 text-gray-400"},u.createElement(lx,null)),u.createElement(Zc,{anchorEl:l,open:!!l,onClose:f,getContentAnchorEl:null,elevation:0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:"border-1 border-solid border-grey-border shadow rounded-8 text-gray-600"},keepMounted:!1},M.map(F=>u.createElement(ln,{key:F.id,className:"flex items-center space-x-12 py-12 text-16",disabled:!!F.disabled,onClick:()=>{f(),F.onClick()}},F.icon,u.createElement("span",null,F.name)))))}const H4e={pending:u.createElement(Qs,{color:"blue"},"Pendente"),paid:u.createElement(Qs,{color:"green"},"Pago"),authorized:u.createElement(Qs,{color:"green"},"Pré-aprovado"),refunded:u.createElement(Qs,{color:"red"},"Devolvido"),denied:u.createElement(Qs,{color:"red"},"Negado"),cancelled:u.createElement(Qs,{color:"red"},"Cancelado"),abandoned:u.createElement(Qs,{color:"red"},"Expirado"),chargeback:u.createElement(Qs,{color:"purple"},"Chargeback"),sent_to_payment_point:u.createElement(Qs,{color:"orange"},"Solicitado"),refunding:u.createElement(Qs,{color:"red"},"Devolvendo")};function Qqt({order:e,payment:t}){const r=Lr(),{mutate:n}=di(),[i,a]=u.useState(!1);if(t.payment_method===mr.debt_book.id||!t.status)return null;if(e?.status===Bt.closed.status||ll(t)||[mr.pix_auto.id,mr.online_credit_card.id,mr.ifood_voucher.id,mr.food99_voucher.id,mr.keeta_voucher.id].includes(t.payment_method)||t.payment_method===mr.ifood.id&&t.payment_type==="online"||t.payment_method===mr.food99.id&&t.payment_type==="online"||t.payment_method===mr.aiqfome.id&&t.payment_type==="online"||t.payment_method===mr.keeta.id&&t.payment_type==="online"||!["pending","paid"].includes(t.status))return H4e[t.status];if(e?.status===Bt.canceled.status)return null;const o=async s=>{a(!0);try{const l=await qIe(e?.id,t?.id,{status:s});n(qn(e.id),c=>({...c,payment_values:c.payment_values.map(d=>d.id===l.id?l:d)}))}catch(l){r.error(l.response?.data?.message||"Não foi possível fazer a atualização")}a(!1)};return u.createElement("div",{className:Ft("inline-flex cursor-pointer items-center space-x-8 rounded-8 px-8 text-14 font-medium transition-all hover:opacity-80",t.status==="paid"?"bg-green-lightest text-green-dark":"bg-grey-lightest text-grey-dark"),onClick:()=>o(t.status==="pending"?"paid":"pending")},i&&u.createElement(ai,{color:"inherit",size:12}),u.createElement("span",{className:"p-4"}," ",t.status==="paid"?"Pago":"Marcar como pago"))}const Jqt=e=>ht.get(e).then(t=>t.data);function U4e(){const{data:e,error:t,isLoading:r,mutate:n}=Jc("api/v2/company/payment_points",Jqt,{dedupingInterval:1e4});return{data:e,isLoading:r,isError:t,mutate:n}}const P2=kh(e=>({open:!1,orderId:null,paymentValueIds:[],selectedPaymentPoint:void 0,openDialog:(t,r=[])=>e({open:!0,orderId:t,paymentValueIds:Array.isArray(r)?r:[r]}),closeDialog:()=>e({open:!1}),setSelectedPaymentPoint:t=>e({selectedPaymentPoint:t})})),V4e=[mr.credit_card.id,mr.debit_card.id,mr.meal_voucher.id,mr.food_voucher.id],Drr=["pending","paid","sent_to_payment_point"],ejt=["pending","sent_to_payment_point"];function Mrr(e){return e?.filter(t=>t.payment_method===mr.pix_auto.id)?.sort((t,r)=>t.id-r.id)||[]}const tjt=[Bt.waiting_confirmation.status,Bt.confirmed.status,Bt.scheduled_confirmed.status,Bt.waiting_to_catch.status,Bt.released.status,Bt.delivered.status,Bt.ready.status,Bt.pending_payment.status];function q4e({order:e,payment:t}){const{data:r}=U4e(),n=P2(a=>a.openDialog),i=e?.id;return!i||!t||!tjt.includes(e.status)||!V4e.includes(t.payment_method)||!ejt.includes(t.status)||!r?.length?null:u.createElement(cr,{onClick:()=>n(i,t?.id),tooltip:"Pagar com maquininha",className:"rounded-6 p-6 text-gray-500"},u.createElement(CY,{color:"inherit"}))}const rjt=["sent_to_payment_point","refunded","cancelled","refunding","abandoned"],njt=e=>ll(e)?e.status!=="paid":rjt.includes(e?.status);function ijt({payments:e,removePayment:t,readOnly:r,order:n}){const i=P2(d=>d.openDialog),a=at(({globalCompany:d})=>d.companyPaymentMethods),o=d=>{const f=a?.find(h=>h.id===d?.payment_method_id);return d?.brand?.payment_method_name??f?.name??"—"},s=d=>
353{if(d?.brand?.kind||d?.brand?.name)return{imageKey:d.brand.kind,name:d.brand.name};const h=a?.find(p=>p.id===d?.payment_method_id)?.brands?.find(p=>p.id===d?.payment_method_brand_id);return h?{imageKey:h.kind,name:h.name}:null},l=d=>{const f=!d?.id,h=d?.payment_type==="online"||P4.includes(d?.payment_method);return!r&&(f||!h)},c=d=>()=>{n?.id&&d?.id&&i(n.id,d.id)};return u.createElement("div",{className:"flex flex-col space-y-16 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"text-16 font-semibold sm:text-18"},"Pagamentos registrados"),!e?.length&&u.createElement("div",{className:"flex min-h-136 w-full flex-1 flex-col items-center justify-center space-y-8"},u.createElement("div",{className:"text-24 font-semibold text-gray-400"},"Sem pagamentos"),u.createElement("div",{className:"text-16 font-light text-gray-400"},"Clique em uma forma de pagamento para adicionar")),e?.length>0&&u.createElement("div",{className:"space-y-16"},e.map((d,f)=>u.createElement("div",{key:`${d.payment_method_id??d.payment_method}-${f}`,className:"flex items-center justify-between space-x-8 text-16 text-gray-600"},u.createElement("span",{className:"flex flex-1 items-center space-x-8 truncate"},u.createElement("span",{className:"truncate font-medium"},u.createElement("span",{className:"flex flex-col"},u.createElement("span",{className:"truncate"},o(d)," "),d.observation&&u.createElement("span",{className:"truncate font-light"}," (",d.observation,")"),u.createElement(k4e,{...s(d)??{}}))),d.payment_method===mr.pix_auto.id&&d.status==="pending"&&d.id&&u.createElement(B1,{label:"Ver QRCode",variant:"outlined",size:"small",deleteIcon:u.createElement(X1,null),onDelete:c(d),onClick:c(d)}),YIe(d)&&d.id&&u.createElement(B1,{label:"Acompanhar",variant:"outlined",size:"small",deleteIcon:u.createElement(X1,null),onDelete:c(d),onClick:c(d)})),u.createElement("div",{className:"flex items-center space-x-4"},u.createElement(q4e,{order:n,payment:d}),(d?.with_payment_point||mr.pix_auto.id===d?.payment_method||ll(d))&&d?.status==="paid"&&u.createElement(Qs,{color:"green"},u.createElement("span",{className:"flex items-center space-x-6"},(d?.with_payment_point||ll(d))&&u.createElement(CY,{fontSize:"small"}),mr.pix_auto.id===d?.payment_method&&u.createElement(kK,{className:"h-16",color:"inherit"}),u.createElement("span",null,"Pago"))),u.createElement("div",null,njt(d)&&H4e[d?.status])),u.createElement("div",{className:"whitespace-nowrap"},me.formatMonetaryValue(d.total)),(d?.with_payment_point||mr.pix_auto.id===d?.payment_method||ll(d))&&u.createElement(Zqt,{order:n,payment:d}),l(d)&&u.createElement(Ma,{tooltip:"Remover pagamento",onClick:()=>t(f),color:"text-gray-400"},u.createElement(bY,{color:"inherit"}))))))}function ajt({open:e,onClose:t,onConfirm:r,title:n,payment:i,showCloseOrderButton:a,showConfirmAndReceiveButton:o}){const s=(l,c=!1,d=!1)=>{l.preventDefault(),r(c,d)};return u.createElement(Eo,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{className:"shadow-lg rounded-12"}},u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between px-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},n),u.createElement(cr,{className:"p-8",onClick:t},u.createElement(Dm,{color:"inherit"}))),u.createElement("div",{className:"flex items-center justify-center p-16"},i.payments.length>0&&i.payments[i.payments.length-1].change_of&&u.createElement("div",{className:"flex w-full max-w-200 flex-1 flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"mb-4 text-14 font-medium sm:text-16"},"Troco"),u.createElement("div",{className:"text-20 font-semibold sm:text-24"},me.formatMonetaryValue(i.payments[i.payments.length-1].change_of-i.payments[i.payments.length-1].total,!0)))),u.createElement("div",{className:"flex flex-wrap-reverse items-center justify-end gap-12 p-16"},u.createElement(fr,{onClick:t,variant:"outlined"},"Voltar"),a&&u.createElement(fr,{onClick:l=>s(l,!0,!1),variant:"outlined"},"Concluir pedido"),o&&u.createElement(fr,{onClick:l=>s(l,!1,!0),variant:"outlined"},"Confirmar e receber"),u.createElement(fr,{onClick:l=>s(l,!1,!1),color:"primary",variant:"contained",disableElevation:!0,autoFocus:!0},"Confirmar")))}function xY(e){const r=(e.payments?.filter(n=>!Lm.includes(n.status))||[]).reduce((n,i)=>n+i.payment_fee,0);return parseFloat(Math.max(0,me.currencyStringToFloat(e.total_order||0)+me.currencyStringToFloat(r||0)+me.currencyStringToFloat(e.service_fee||0)+me.currencyStringToFloat(e.additional_fee||0)+me.currencyStringToFloat(e.delivery_fee||0)-me.currencyStringToFloat(e.discount||0)-me.currencyStringToFloat(e.loyaltyDiscount?.value||0)-me.currencyStringToFloat(e.couponValue||0)-me.currencyStringToFloat(e.cashbackDiscount||0)).toFixed(2))}var Sw={},tve;function ojt(){if(tve)return Sw;tve=1;var e=$t(),t=Wt();Object.defineProperty(Sw,"__esModule",{value:!0}),Sw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"}),"MonetizationOn");return Sw.default=i,Sw}var sjt=ojt();const ljt=et(sjt);var yB,rve;function cjt(){if(rve)return yB;rve=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var s=-1,l=t(e((i-n)/(a||1)),0),c=Array(l);l--;)c[o?l:++s]=n,n+=a;return c}return yB=r,yB}var _B,nve;function ujt(){if(nve)return _B;nve=1;var e=cjt(),t=n5(),r=a$();function n(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),s=s===void 0?a<o?1:-1:r(s),e(a,o,s,i)}}return _B=n,_B}var bB,ive;function djt(){if(ive)return bB;ive=1;var e=ujt(),t=e();return bB=t,bB}var fjt=djt();const j4e=et(fjt),hjt=mr.pix_auto.icon,pjt=qe("2026-04-30","YYYY-MM-DD").endOf("day");function mjt(){return qe().isSameOrBefore(pjt)?u.createElement(DS,{severity:"info",icon:u.createElement(hjt,null),className:"text-16"},"Agora você pode receber via ",u.createElement("strong",null,"Pix automático")," por aqui! Veja abaixo."):null}function vjt({brand:e,index:t,onClick:r}){const n=kI[e.kind],i=e.name||e.kind||"Bandeira";return u.createElement("div",{className:"hover:border-blue-500 flex cursor-pointer items-center space-x-8 rounded-6 border border-solid border-gray-200 p-8 text-14 text-gray-600 transition-colors hover:bg-gray-50 sm:text-16",onClick:r},n&&u.createElement("div",{className:"flex h-auto w-40 flex-shrink-0 items-center justify-center"},u.createElement(n,{className:"h-auto w-40"})),u.createElement("div",{className:"flex min-w-0 flex-col"},u.createElement("span",{className:"truncate font-medium"},i),!me.isMobile()&&t!=null&&u.createElement("span",{className:"text-12 text-gray-500"},"Ctrl + ",t+1)))}function gjt({open:e,paymentMethod:t,onClose:r,onSelectBrand:n}){const i=u.useMemo(()=>(t?.brands??[]).filter(s=>!s.system_default),[t]),a=u.useCallback(s=>{if(!e)return;const l=parseInt(s)-1;!isNaN(l)&&i[l]&&n(i[l])},[i,n,e]),o=u.useMemo(()=>j4e(1,(i.length||0)+1).map(String),[i.length]);return i5(o,a),u.createElement(oi,{open:e,title:t?`${t.name}: selecione a bandeira`:"",onClose:r,maxWidth:"sm",keepMounted:!1},u.createElement("div",{className:"grid grid-cols-3 gap-8"},i.map((s,l)=>u.createElement(vjt,{key:s.id,brand:s,index:l,onClick:()=>n(s)}))))}const yjt=e=>ht.get(e).then(t=>t.data),_jt=[];function $4e(){const{data:e,error:t,isLoading:r,mutate:n}=Jc("/api/v2/company/smart_pos",yjt,{dedupingInterval:1e4});return{terminals:e||_jt,isLoading:r,isError:t,mutate:n}}const ave={[mr.pos_credit_card.id]:1.5,[mr.pos_debit_card.id]:2.5,[mr.pos_voucher.id]:3.5}
353;function ove(e,t){return t&&ave[e]!=null?ave[e]:mr[e]?.order??99}function W4e(){const e=at(({globalCompany:i})=>i.companyPaymentMethods),{terminals:t}=$4e(),r=t.length>0;return u.useMemo(()=>e.filter(o=>XC.includes(o.kind)?r:!P4.includes(o.kind)||o.kind===mr.pix_auto.id).sort((o,s)=>{const l=ove(o.kind,r),c=ove(s.kind,r);return l-c}),[e,r])}function bjt(e=[]){const t=e.filter(i=>XC.includes(i.kind)),r=e.filter(i=>!XC.includes(i.kind));if(e.length<=9)return{highlightMethods:e,othersMethods:[]};const n=Math.max(0,8-t.length);return{highlightMethods:[...r.slice(0,n),...t],othersMethods:r.slice(n)}}function Ejt({handlePaymentMethodSelection:e,disableKeyboardShortcuts:t}){const[r,n]=u.useState(null),[i,a]=u.useState(null),o=W4e(),{highlightMethods:s,othersMethods:l}=u.useMemo(()=>bjt(o),[o]),c=u.useCallback(E=>{const S=o.find(O=>O.id===E);(S?.brands?.filter(O=>!O.system_default)??[]).length>0?a(S):e(E,void 0)},[o,e]),d=u.useCallback(E=>{!t&&!i&&E&&parseInt(E)&&s[parseInt(E)-1]&&c(s[parseInt(E)-1].id)},[c,s,t,i]),f=u.useMemo(()=>j4e(1,(s?.length||0)+1).map(String),[s]);i5(f,d);const h=E=>{n(E.currentTarget)},p=()=>{n(null)},g=E=>{p(),c(E)},_=u.useCallback(E=>{a(null),e(E.payment_method_id,E.id)},[e]),b=o.some(E=>E.kind===mr.pix_auto.id);return u.createElement("div",{className:"grid grid-cols-3 gap-8"},b&&u.createElement("div",{className:"col-span-3"},u.createElement(mjt,null)),s.map((E,S)=>{const P=E.icon;return u.createElement("div",{key:E.id,className:"flex cursor-pointer items-center space-x-8 rounded-6 p-8 text-14 text-gray-600 sm:text-16",style:{backgroundColor:"#F4F5F7"},onClick:()=>g(E.id)},u.createElement(P,{fontSize:"large"}),u.createElement("div",{className:"flex flex-col"},u.createElement("span",{title:E.name},E.short_name||E.name),!me.isMobile()&&u.createElement("span",{className:"text-12 text-gray-500"},"Ctrl + ",S+1)))}),l.length>0&&u.createElement("div",{className:"flex cursor-pointer items-center space-x-8 rounded-6 p-8 text-14 text-gray-600 sm:text-16",style:{backgroundColor:"#F4F5F7"},onClick:h},u.createElement(ljt,{fontSize:"large"}),u.createElement("span",null,"Outras")),u.createElement(Zc,{anchorEl:r,keepMounted:!0,open:!!r,onClose:p},l.map(E=>u.createElement(ln,{key:E.id,onClick:()=>g(E.id)},E.name))),u.createElement(gjt,{open:!!i,paymentMethod:i,onClose:()=>a(null),onSelectBrand:_}))}const G4e=u.memo(Ejt);var Cw={},sve;function wjt(){if(sve)return Cw;sve=1;var e=$t(),t=Wt();Object.defineProperty(Cw,"__esModule",{value:!0}),Cw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm6.5-5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z"}),"DeleteOutlineRounded");return Cw.default=i,Cw}var Sjt=wjt();const Cjt=et(Sjt),K4e=x.createContext(),Lrr=K4e.Provider,xjt=()=>x.useContext(K4e);function Frr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.put(`/api/v2/orders/order_sessions/${e}/open`,t),o=i.map(s=>s.id===a.data.id?a.data:s);r(fl(o))}}function Brr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.put(`/api/v2/orders/order_sessions/${e}`,t),o=i.map(s=>s.id===a.data.id?a.data:s);r(fl(o))}}function zrr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.put(`/api/v2/orders/order_sessions/${e}/cancel`,t),o=i.map(s=>s.id===a.data.id?a.data:s);r(fl(o))}}function Hrr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.put(`/api/v2/orders/order_sessions/${e}/transfer_all`,{target_order_session_id:t}),o=i.map(s=>s.id===a.data.id?a.data:s.id===e?{...s,status:"closed",updated_at:new Date().toISOString()}:s);r(fl(o))}}function Urr(e,t,r){return async(n,i)=>{const{orderSessions:a}=i().orderListener,o=await ht.put(`/api/v2/orders/order_sessions/${e}/transfer_items`,{target_order_session_id:t,order_items:r}
353),s=a.map(l=>{const{source_order_session:c,target_order_session:d}=o.data;return l.id===c.id?c:l.id===d.id?d:l});n(fl(s))}}function Vrr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.put(`/api/v2/orders/order_sessions/${e}/remove_items`,{order_items:t}),o=i.map(s=>s.id===a.data.id?a.data:s);r(fl(o))}}function qrr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.post(`/api/v2/orders/order_sessions/${e}/add_items`,{order_items:t}),o=i.map(s=>s.id===a.data.order_session.id?a.data.order_session:s);return r(fl(o)),a.data.added_order_items}}function jrr(e,t,r){return async(n,i)=>{const{orderSessions:a}=i().orderListener,o=await ht.put(`/api/v2/orders/order_sessions/${e}/order_items/${t}/change_item`,{order_items:r}),s=a.map(l=>l.id===o.data.order_session.id?o.data.order_session:l);return n(fl(s)),{canceled_order_item:o.data.canceled_order_item,added_order_item:o.data.added_order_item}}}function $rr(e,t,r){return async(n,i)=>{const{orderSessions:a}=i().orderListener,o=await ht.put(`/api/v2/orders/order_sessions/${e}/order_items/${t}/update_item`,{order_item:r}
353),s=a.map(l=>l.id===o.data.order_session.id?o.data.order_session:l);return n(fl(s)),o.data.updated_order_item}}function Wrr(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.post(`/api/v2/orders/order_sessions/${e}/add_payment`,t),o=i.map(s=>s.id===a.data.order_session?.id?a.data.order_session:s);return r(fl(o)),a.data}}function Grr(e,t,r){return async(n,i)=>{const{orderSessions:a}=i().orderListener,o=r?.payment_values?.[t];if(!o?.id){n(oh("Não foi possível excluir o pagamento, atualize a página!"));return}const s=await ht.delete(`/api/v2/orders/order_sessions/${e}/remove_payment`,{data:{payment_id:o.id}}),l=a.map(c=>c.id===s.data.id?s.data:c);return n(fl(l)),o}}function Krr(e){return async(t,r)=>{const{orderSessions:n}=r().orderListener,i=await ht.put(`/api/v2/orders/order_sessions/${e}/close`),a=n.map(o=>o.id===i.data.order_session.id?i.data.order_session:o);return t(fl(a)),i.data.order}}function Yrr(e,t,r){return async(n,i)=>{const{orderSessions:a}=i().orderListener,o=await ht.put(`/api/v2/orders/order_sessions/${e}/approve_order_items`,{order_item_ids:t,user_id:r}
353),s=a.map(l=>l.id===o.data.order_session.id?o.data.order_session:l);return n(fl(s)),o.data.approved_order_items}}function Tjt(e,t){return async(r,n)=>{const{orderSessions:i}=n().orderListener,a=await ht.post(`/api/v2/orders/order_sessions/${e}/apply_coupon`,{code:t}),o=i.map(s=>s.id===a.data.id?a.data:s);return r(fl(o)),a.data}}function Ajt(e){return async(t,r)=>{const{orderSessions:n}=r().orderListener,i=await ht.delete(`/api/v2/orders/order_sessions/${e}/remove_coupon`),a=n.map(o=>o.id===i.data.id?i.data:o);return t(fl(a)),i.data}}function Pjt({title:e,payment:t,readOnly:r}){const n=Lr(),i=An(),a=xjt(),[o,s]=x.useState(!1),[l,c]=x.useState(""),[d,f]=x.useState(!1),[h,p]=x.useState(!1),g=async b=>{if(b&&b.preventDefault(),!(!l.trim()||r)){s(!0);try{await i(Tjt(a.id,l.trim())),n.success("Cupom aplicado com sucesso!"),c(""),f(!1)}catch(E){n.error(E.response?.data?.message||"Não foi possível aplicar o cupom")}finally{s(!1)}}},_=u.useCallback(async b=>{if(b&&b.preventDefault(),!r){s(!0);try{await i(Ajt(a.id)),n.success("Cupom removido com sucesso!"),p(!1)}catch(E){n.error(E.response?.data?.message||"Não foi possível remover o cupom")}finally{s(!1)}}},[r,i,a?.id,n]);return u.createElement(u.Fragment,null,u.createElement("div",{className:"relative flex h-full w-full flex-col space-y-4 overflow-hidden rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"flex items-center justify-between space-x-16"},u.createElement("p",{className:"text-14 font-medium sm:text-16"},e),t.couponCode&&u.createElement("p",{className:"m-0 truncate text-14 font-medium text-blue-dark sm:text-16",title:t.couponCode},t.couponCode)),u.createElement("div",{className:"flex flex-1 items-center justify-between space-x-16"},t.couponCode?u.createElement(u.Fragment,null,u.createElement("div",{className:"text-20 font-semibold text-gray-600 sm:text-24"},me.formatMonetaryValue(t.couponValue,!0)),!r&&u.createElement(cr,{size:"small",className:"hover:text-red-600 rounded-8 text-gray-400",onClick:()=>p(!0),"aria-label":"Remover cupom"},u.createElement(Cjt,{fontSize:"small"}))):u.createElement(u.Fragment,null,u.createElement("div",{className:"text-20 font-semibold text-gray-400 sm:text-24"},"0,00"),!r&&u.createElement(cr,{size:"small",className:"rounded-8 text-gray-400",onClick:()=>f(!0),"aria-label":"Adicionar cupom"},u.createElement(ps,{color:"inherit"}))))),!r&&u.createElement(oi,{open:d,title:"Adicionar Cupom",onClose:()=>{c(""),f(!1)},onSubmit:g,confirmText:"Aplicar",fullScreen:!1,keepMounted:!1,maxWidth:"xs",loading:o},u.createElement("div",{className:"pt-8 text-gray-600"},u.createElement("div",{className:"mb-16 text-18 font-semibold"},"Informe abaixo o código do seu cupom."),u.createElement(Tr,{variant:"outlined",size:"small",placeholder:"Código do cupom",value:l,onChange:b=>c(b.target.value.toUpperCase()),fullWidth:!0,inputProps:{className:"uppercase text-14"},autoFocus:!0}))),!r&&u.createElement(oi,{open:h,title:"Remover cupom",onClose:()=>p(!1),onSubmit:_,confirmText:"Remover",cancelText:"Voltar",fullScreen:!1,keepMounted:!1,maxWidth:"xs",loading:o},u.createElement("div",{className:"pb-16 pt-8 text-16 text-gray-600"},"Deseja remover o cupom aplicado?")))}const Rjt=u.memo(Pjt);function lve(e,t){const r=me.convertNumberToFloat(e),n=me.convertNumberToFloat(t);return r.toFixed(2)===n.toFixed(2)&&r!==n}function Ojt({title:e,name:t,valueFieldName:r,percentageFieldName:n,baseAmount:i,payment:a,updatePaymentInfo:o,readOnly:s}){const[l,c]=u.useState(!1),[d,f]=u.useState({value:"",percentage:""}),[h,p]=u.useState({value:a[r],percentage:a[n]});u.useEffect(()=>{l&&f(h)},[l,h,f]),u.useEffect(()=>{p(O=>{const I=me.convertNumberToFloat(O.value),N=O.percentage||O.percentage===0?me.convertNumberToFloat(O.percentage):null,M=me.convertNumberToFloat(a[r]),F=a[n]||a[n]===0?me.convertNumberToFloat(a[n]):null;return I!==M||N!==F?{value:M,percentage:F}:O})},[a,n,r]);const g=u.useCallback(O=>{me.convertNumberToFloat(a[r])!==me.convertNumberToFloat(O.value)&&o(r,O.value||O.value===0?me.convertNumberToFloat(O.value):null),(me.convertNumberToFloat(a[n])!==me.convertNumberToFloat(O.percentage)||!a[n]&&!O.percentage&&a[n]!==O.percentage)&&o(n,O.percentage?me.convertNumberToFloat(O.percentage):null)},[a,n,o,r]);u.useEffect(()=>{const O=a[r],I=a[n],N=I?i?xi(I*me.convertNumberToFloat(i)/100,2):0:O;O!==N&&g({value:N,percentage:I})},[i,a,n,g,r]);const _=O=>{if(s)return;const I=O.target.value,N=i?xi(me.convertNumberToFloat(I)/me.convertNumberToFloat(i)*100,4):0;p(M=>({value:I,percentage:M.percentage||M.percentage===0?N:M.percentage}))},b=O=>{const I=O.target.value,N=i?xi(me.convertNumberToFloat(I)/me.convertNumberToFloat(i)*100,4):0;f(M=>lve(M.value,I)?M:{value:I,percentage:M.percentage||M.percentage===0?N||null:M.percentage})},E=O=>{const I=O.target.value,N=i?xi(me.convertNumberToFloat(I)*me.convertNumberToFloat(i)/100,2):0;f(M=>lve(M.percentage,I)?M:{value:I?N:M.value,percentage:I||null})},S=O=>{O.preventDefault(),g(d),c(!1)},P=O=>{O.keyCode===13&&O.target.blur()};return u.createElement(u.Fragment,null,u.createElement("div",{className:"flex h-full w-full flex-col space-y-4 rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"flex items-center justify-between space-x-16"},u.createElement("div",{className:"text-14 font-medium sm:text-16"},e),(h.percentage||h.percentage===0)&&u.createElement("div",{className:"text-14 font-light sm:text-16"},me.formatNumber(h.percentage),"%")),u.createElement("div",{className:"flex items-center justify-between space-x-16"},u.createElement(rg,{value:h.value||"",onChange:_,onBlur:()=>g(h),onKeyDown:P,className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"},readOnly:s}),!s&&u.createElement(cr,{size:"small",className:"rounded-8 text-gray-400",onClick:()=>c(!0),tabIndex:"-1"},u.createElement(ps,{color:"inherit"})))),!s&&u.createElement(oi,{open:l,title:`Alterar ${t}`,onClose:()=>c(!1),onSubmit:S,confirmText:"Aplicar",fullScreen:!1,keepMounted:!1,maxWidth:"xs"},u.createElement("div",{className:"space-y-20 text-gray-600"},u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"text-18 font-semibold"}
353,"O percentual será aplicado sobre o valor de"," ",u.createElement("span",{className:"font-bold"},me.formatMonetaryValue(i)),"."),u.createElement("div",{className:"flex space-x-16"},u.createElement("div",{className:"flex h-full w-full flex-col space-y-12 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"text-16 font-bold"},"Percentual (%)"),u.createElement(rg,{value:d.percentage||"",onChange:E,className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"},autoFocus:!0})),u.createElement("div",{className:"flex h-full w-full flex-col space-y-12 rounded-6 border border-solid border-gray-200 p-12 text-gray-600"},u.createElement("div",{className:"text-16 font-bold"},"Valor (R$)"),u.createElement(rg,{value:d.value||"",onChange:b,className:"text-20 font-semibold text-gray-600 placeholder-gray-400 sm:text-24",inputProps:{className:"p-0"}}))),u.createElement("div",{className:"text-16 font-light"},"Se um valor percentual for informado o Valor (R$) será sempre atualizado com base nesse percentual.")))))}const EB=u.memo(Ojt);function Ijt({payment:e,showAdditionalFee:t,showServiceFeeInput:r,showServiceCupomInput:n,serviceFeeBaseAmount:i,updatePaymentInfo:a,readOnlyFees:o,readOnlyDiscounts:s}){const l=at(({placeOrder:p})=>p.placeOrder.checkout.orderType),c=xY(e),f=(e.payments?.filter(p=>!Lm.includes(p.status))||[]).reduce((p,g)=>p+g.payment_fee,0),h=[];return h.push({title:"Subtotal",value:me.formatMonetaryValue(e.total_order,!0)}),e.delivery_fee!==null&&l==="delivery"&&h.push({title:"Entrega",value:me.formatMonetaryValue(e.delivery_fee,!0)}),r&&h.push({title:"Serviço",value:null}),f&&h.push({title:"Taxa da maquineta",value:me.formatMonetaryValue(f,!0)}),h.push({title:"Desconto",value:null,fieldName:"discount"}),n&&h.push({title:"Cupom",value:null,fieldName:"coupon"}),t&&h.push({title:"Taxa adicional",value:null,fieldName:"additional_fee"}),e.loyaltyDiscount&&h.push({title:"Prêmio fidelidade",value:me.formatMonetaryValue(e.loyaltyDiscount.value,!0),total_points:e.loyaltyDiscount.total_points}),e.cashbackDiscount>0&&h.push({title:"Cashback",value:me.formatMonetaryValue(e.cashbackDiscount,!0)}),h.push({title:"Total",value:me.formatMonetaryValue(c,!0)}),u.createElement("div",{className:"grid grid-cols-2 gap-8 sm:gap-12"},h.map(p=>p.title==="Desconto"?u.createElement(EB,{key:p.title,title:p.title,name:"Desconto",valueFieldName:"discount",percentageFieldName:"percentage_discount",baseAmount:e.total_order,payment:e,updatePaymentInfo:a,readOnly:s}):p.title==="Cupom"?u.createElement(Rjt,{key:p.title,title:p.title,payment:e,baseAmount:Math.max(0,me.currencyStringToFloat(e.total_order||0)-me.currencyStringToFloat(e.discount||0)),readOnly:s}):p.title==="Taxa adicional"?u.createElement(EB,{key:p.title,title:p.title,name:"Taxa adicional",valueFieldName:"additional_fee",percentageFieldName:"percentage_additional_fee",baseAmount:e.total_order,payment:e,updatePaymentInfo:a,readOnly:o}):p.title==="Serviço"?u.createElement(EB,{key:p.title,title:p.title,name:"Taxa de serviço",valueFieldName:"service_fee",percentageFieldName:"percentage_service_fee",baseAmount:i??e.total_order,payment:e,updatePaymentInfo:a,readOnly:o}):p.title==="Prêmio fidelidade"?u.createElement("div",{className:"h-full w-full",key:p.title},u.createElement("div",{className:"flex h-full flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"mb-4 flex items-center justify-between text-14 font-medium sm:text-16"},u.createElement("span",null,p.title)),u.createElement("div",{className:"flex items-end justify-between text-20 font-semibold sm:text-24"},u.createElement("span",null,p.value),u.createElement("span",{className:"text-14 font-medium sm:text-16"},p.total_points," pontos")))):p.title==="Cashback"?u.createElement("div",{className:"h-full w-full",key:p.title},u.createElement("div",{className:"flex h-full flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"mb-4 text-14 font-medium sm:text-16"},p.title),u.createElement("div",{className:"text-20 font-semibold sm:text-24"},p.value))):u.createElement("div",{className:"h-full w-full",key:p.title},u.createElement("div",{className:"flex h-full flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-gray-600"},u.createElement("div",{className:"mb-4 text-14 font-medium sm:text-16"},p.title),u.createElement("div",{className:"text-20 font-semibold sm:text-24"},p.value)))))}function JV(e){return e?.brands?.[0]?.id}function kjt({smartPos:e,onClick:t,isSelected:r}){return e?u.createElement("div",{className:Ft("flex cursor-pointer items-center justify-between rounded-8 border border-solid px-16 py-12 text-16 text-gray-600 hover:bg-gray-50",r?"border-purple-light":"border-gray-200"),onClick:t},u.createElement("div",{className:"min-w-0 space-y-1"},u.createElement("div",{className:"truncate text-16 font-bold text-gray-600"},e.name),e.serial_number&&u.createElement("div",{className:"truncate font-light"},"Série: ",e.serial_number)),r&&u.createElement(T4,{className:"flex-shrink-0 text-purple-light"})):null}function Njt(){return u.createElement("div",{className:"flex animate-pulse items-center justify-between rounded-8 border border-solid border-gray-200 px-16 py-12"},u.createElement("div",{className:"min-w-0 flex-1 space-y-8"},u.createElement("div",{className:"h-20 w-2/5 rounded-4 bg-gray-200"}),u.createElement("div",{className:"h-20 w-3/4 rounded-4 bg-gray-200"})))}function Djt({selectedId:e,onSelect:t}){const{terminals:r,isLoading:n,isError:i}=$4e();return u.useEffect(()=>{if(n||e&&r.some(o=>o.id===e))return;const a=r.length===1?r[0].id:null;a!==e&&t(a)},[n,r,e,t]),u.useEffect(()=>()=>t(null),[t]),n?u.createElement(Njt,null):i?u.createElement(Jd,{title:"Problema ao buscar as maquininhas"}):r?.length?u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-semibold text-gray-600"},"Escolha a maquininha que deseja utilizar"),u.createElement("div",{className:"space-y-12"},r.map(a=>u.createElement(kjt,{key:a.id,smartPos:a,onClick:()=>t(a.id),isSelected:a.id===e}
353)))):u.createElement(dl,{title:"Nenhuma maquininha disponível"})}const Mjt={total:0,payment_fee:null,change_of:null};function Y4e({open:e,onClose:t,selectedPaymentMethodId:r,selectedAmount:n,payment:i,addPayment:a,onConfirmed:o,paymentMethodBrandId:s,shouldConsiderOnlyPaidPixAuto:l=!1}){const c=Lr(),d=at(({globalCompany:ae})=>ae.companyPaymentMethods),[f,h]=u.useState(!1),[p,g]=u.useState(""),[_,b]=u.useState(""),[E,S]=u.useState(null),P=u.useRef(null),O=u.useMemo(()=>d.find(ae=>ae.id===r),[d,r]),I=XC.includes(O?.kind),N=u.useMemo(()=>{if(!O?.brands)return null;const ae=s??JV(O);return O.brands.find(Q=>Q.id===ae)?.name??null},[O,s]),M=xY(i),F=xi(XIe(i.payments?.filter(ae=>!Lm.includes(ae.status))||[],l),2),B=xi(Math.max(M-F,0),2);u.useEffect(()=>{if(e){if(n){const ae=B>0?Math.min(n,B):n;b(ae)}else b(B||"");g("")}},[e,n,B]);const V=u.useCallback(ae=>{if(O?.fixed_fee)return parseFloat(O.fixed_fee);if(O?.percentual_fee){const Q=parseFloat(O.percentual_fee);return xi(Math.min(ae,B)*Q/100,2)}return null},[O,B]),W=async()=>{const ae=me.currencyStringToFloat(_),Q=V(ae);let ie;if(!O)return;const le=s??JV(O),fe=O.kind,de={...Mjt,payment_method_id:r,payment_method:fe,payment_method_brand_id:le,payment_fee:Q,observation:p,...I?{smart_pos_id:E}:{}};if(ae<=B?ie=a({...de,total:ae+(Q||0)}):fe===mr.money.id&&B?ie=a({...de,total:B+(Q||0),change_of:ae}):B&&(ie=a({...de,total:B+(Q||0)})),ie){h(!0);try{const ge=await ie;o&&o(ge)}catch{}h(!1),t()}},$=u.useRef(!0),X=async ae=>{if(ae.preventDefault(),!!$.current){if($.current=!1,!r||!O){c.info("Selecione uma forma de pagamento",{autoHideDuration:4e3}),$.current=!0;return}if(I&&!E){c.info("Selecione uma maquininha para continuar",{autoHideDuration:4e3}),$.current=!0;return}_&&me.currencyStringToFloat(_)?Number(i.discount)>i.total_order+i.additional_fee+i.delivery_fee?c.info("O valor do desconto é maior que o valor do pedido, diminua o desconto",{autoHideDuration:4e3}):F>=M?c.info("O valor pago é maior que o valor do pedido, exclua um pagamento",{autoHideDuration:4e3}):(B&&_&&me.currencyStringToFloat(_)||M===0)&&await W():c.info(`Informe o valor pago em ${O.name}`,{autoHideDuration:4e3}),$.current=!0}},re=me.formatMonetaryValue(Math.min(me.currencyStringToFloat(_),B)+V(me.currencyStringToFloat(_)));return u.createElement(Eo,{open:e,onClose:t,PaperProps:{className:"shadow-lg rounded-12 w-320 relative"}},u.createElement("div",{className:"flex h-64 flex-shrink-0 items-center justify-between border-0 border-b-1 border-solid border-gray-200 px-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},"Registrar pagamento"),u.createElement(cr,{disableRipple:!0,className:"p-8",onClick:t},u.createElement(Yn,{title:"Fechar janela"},u.createElement(Dm,{color:"inherit"})))),u.createElement("form",{onSubmit:X},O&&u.createElement("div",{className:"p-16 text-18 text-gray-600"},"Valor pago em"," ",u.createElement("strong",null,O.name,N?` (${N})`:"")),u.createElement("div",{className:"flex items-center space-x-16 p-16 text-gray-500"},u.createElement("span",{className:"text-24 font-semibold text-gray-400"},"R$"),u.createElement(rg,{inputRef:P,value:_,onChange:ae=>{b(ae.target.value)},className:"max-w-96 text-28 font-semibold text-gray-600",fullWidth:!1,autoFocus:!0})),O?.kind===mr.money.id&&B&&!n?u.createElement("div",{className:"flex flex-col items-center p-16 text-center text-16 font-medium text-gray-600"},u.createElement("span",null,"Se o valor for superior a ",u.createElement("strong",null,me.formatMonetaryValue(B)),", o sistema calculará o troco")):null,I&&u.createElement("div",{className:"p-16"},u.createElement(Djt,{selectedId:E,onSelect:S})),u.createElement("div",{className:"p-16"},u.createElement(Tr,{name:"observation",label:"Observação",value:p,onChange:ae=>g(ae.target.value),variant:"outlined",size:"small",fullWidth:!0})),V(me.currencyStringToFloat(_))>0&&u.createElement("div",{className:"flex flex-col items-center p-16 text-16 font-medium text-gray-600"},u.createElement("span",null,`Taxa ${me.formatMonetaryValue(V(me.currencyStringToFloat(_)))}`),u.createElement("strong",null,`Valor com a taxa ${re}`)),u.createElement("div",{className:"p-16"},u.createElement(fr,{type:"submit",color:"primary",variant:"contained",size:"large",fullWidth:!0},"Confirmar"))),f&&u.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-white bg-opacity-70"},u.createElement(ai,{color:"primary"})))}function Ljt({payment:e,addPayment:t,removePayment:r,updatePaymentInfo:n,onPaymentCompleted:i,onGoBack:a,showServiceFeeInput:o,showServiceCupomInput:s,serviceFeeBaseAmount:l,closingDialoguePhrase:c,openSplitDialog:d,disableKeyboardShortcuts:f=!1,checkOrderSessionPermissions:h,showCloseOrderButton:p,showConfirmAndReceiveButton:g,order:_}){const b=Lr(),E=at(({globalCompany:ge})=>ge.companyPaymentMethods),[S,P]=u.useState(!1),[O,I]=u.useState(!1),[N,M]=u.useState(null),[F,B]=u.useState(null),{hasUserPermissions:V}=d0(),W=xY(e),$=e.payments?.filter(ge=>!Lm.includes(ge.status))||[],X=!!h,re=xi(XIe($,X),2),ae=xi(Math.max(W-re,0),2),Q=(ge,Ae)=>{P(!1),i(ge,Ae)},ie=u.useMemo(()=>({completePayment:!h||V(Te.CLOSE_ORDER_SESSION),editFees:V(h?Te.EDIT_SESSION_FEES:Te.EDIT_DISCOUNTS_AND_FEES),editDiscounts:V(h?Te.EDIT_SESSION_DISCOUNTS:Te.EDIT_DISCOUNTS_AND_FEES),editPayment:!h||V(Te.EDIT_PAYMENT)}),[V,h]),le=u.useCallback(()=>{Number(e.discount)>e.total_order?b.info("O valor do desconto é maior que o valor do pedido, diminua o desconto"):re>W?b.info("O valor pago é maior que o valor do pedido, exclua um pagamento"):ae>0?b.info("Pedido não pago"):ie.completePayment&&P(!0)},[e.discount,e.total_order,re,W,ae,ie.completePayment,b]),fe=u.useRef(!0);u.useEffect(()=>{fe.current?fe.current=!1:ae===0&&re>0&&re===W&&!O&&ie.completePayment&&P(!0)},[O,ie.completePayment,ae,W,re]);const de=(ge,Ae)=>{if(!ae){b.info("O valor total do pedido já foi pago");return}M(ge),B(Ae??null),I(!0)};return E?.length?u.createElement(u.Fragment,null,u.createElement("div",{className:"flex max-h-full flex-1 flex-col space-y-16 overflow-auto p-12 sm:space-y-20"},u.createElement(Ijt,{payment:e,updatePaymentInfo:n,showAdditionalFee:!o,showServiceFeeInput:o,showServiceCupomInput:s,serviceFeeBaseAmount:l,readOnlyFees:!ie.editFees,readOnlyDiscounts:!ie.editDiscounts}),u.createElement("div",{className:"grid grid-cols-2 gap-8 sm:gap-12"},u.createElement("div",{className:"flex flex-1 flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-blue-dark"},u.createElement("div",{className:"mb-4 text-14 font-medium sm:text-16"},"Total pago"),u.createElement("div",{className:"text-20 font-bold sm:text-24"},me.formatMonetaryValue(re,!0))),u.createElement("div",{className:"flex flex-1 flex-col rounded-6 border border-solid border-gray-200 px-12 py-8 text-red-dark"},u.createElement("div",{className:"mb-4 text-14 font-medium sm:text-16"},"Falta pagar"),u.createElement("div",{className:"text-20 font-bold sm:text-24"},me.formatMonetaryValue(ae,!0)))),ie.editPayment&&u.createElement(G4e,{handlePaymentMethodSelection:de,disableKeyboardShortcuts:f}),u.createElement(ijt,{payments:e.payments,removePayment:r,readOnly:!ie.editPayment,order:_}),u.createElement(Y4e,{open:O,onClose:()=>I(!1),payment:e,selectedPaymentMethodId:N,paymentMethodBrandId:F,addPayment:t,shouldConsiderOnlyPaidPixAuto:X}),u.createElement(ajt,{open:S,onClose:()=>P(!1),onConfirm:Q,title:c||"Gostaria de confirmar o pedido?",payment:e,showCloseOrderButton:p,showConfirmAndReceiveButton:g})),u.createElement(zs,null),u.createElement("div",{className:"flex items-center space-x-12 p-12"},u.createElement(fr,{variant:"outlined",color:"primary",onClick:a},"VOLTAR"),d&&u.createElement(fr,{variant:"outlined",color:"primary",onClick:d},"DIVIDIR CONTA"),u.createElement(fr,{variant:"contained",disabled:!ie.completePayment,color:"primary",className:"flex-1",disableElevation:!0,onClick:()=>le()},"FINALIZAR"))):null}function Z4(){const e=An(),{mutate:t}=di();return u.useCallback(async(n,i)=>{const a=await e(NV(n,i));if(a)e(HI(n,{status:a.status,updated_at:a.updated_at})),await t(hs(n),a,{revalidate:!1});else throw new Error("Não foi possível atualizar o status do pedido")},[e,t])}function Fjt(){const e=An(),t=Lr(),r=Uu(),n=Bl(),i=vc(),{basePathname:a}=u.useContext(R2),o=at(({placeOrder:V})=>V.placeOrder.loading),s=at(({placeOrder:V})=>V.placeOrder.checkout.payment),l=at(({placeOrder:V})=>V.placeOrder.checkout.client),c=at(Y3e),d=at(({placeOrder:V})=>V.placeOrder.orderInEdit),f=at(({globalCompany:V})=>V.company.emissao_nfce_liberada),h=MK(),{hasUserPermissions:p}=d0(),g=HK(),_=at(x2),b=Z4(),E=P2(V=>V.openDialog),{data:S}=U4e(),P=u.useMemo(()=>S?.length>0&&s.payments?.some(V=>V4e.includes(V.payment_method)),[s.payments,S?.length]),O=u.useMemo(()=>{const V=["takeout","onsite"].includes(c?.order_type),W=s.payments?.some($=>
353$.payment_method===mr.pix_auto.id);return V&&!W},[c?.order_type,s.payments]);u.useEffect(()=>{e(e1({total_order:_||0}))},[e,_]);const I=u.useCallback(async V=>V.payment_method===mr.debt_book.id?s.payments.find(W=>W.payment_method===mr.debt_book.id)?(t.info("Só é permitido um pagamento fiado por pedido",{autoHideDuration:4e3}),Promise.reject()):l?.id?n({title:"Confirmar fiado?",description:u.createElement("span",null,"Pagamento de ",u.createElement("strong",null,me.formatMonetaryValue(V.total))," na conta de ",u.createElement("strong",null,l.name)),cancellationText:"Cancelar",confirmationText:"Confirmar"}).then(()=>e(ame(V))):(t.info("Informe um cliente para adicionar um pagamento fiado",{autoHideDuration:4e3}),Promise.reject()):e(ame(V)),[t,l,n,e,s.payments]),N=u.useCallback(V=>{e(MFt(V))},[e]),M=u.useCallback((V,W)=>{e(e1({[V]:W}))},[e]),F=u.useCallback(V=>{if(!V.payment_values_attributes?.length&&me.currencyStringToFloat(V.final_value)>0)return t.info("Nenhuma forma de pagamento selecionada"),!1;const W=V.payment_values_attributes.filter($=>$.payment_method===mr.debt_book.id);return W.length>1?(t.info("Só é permitido um pagamento fiado por pedido"),!1):W.length===1&&!V.client_id?(t.info("Não pode ter pagamento fiado sem um cliente associado ao pedido"),!1):!0},[t]);function B(V,W){o||!F(c)||(d?e(TFt(d.id,c)).then($=>{if($){if(g)return n({title:"Gostaria de reimprimir o pedido?",cancellationText:"Não imprimir",confirmationText:"Imprimir"}).then(()=>{r($,"standard",!0),$.status===Bt.confirmed.status&&r($,"kitchen",!0)}).catch(()=>{}).finally(()=>{e(HS()),e(t1()),i.replace(`/${a}`)});e(HS()),e(t1()),i.replace(`/${a}`)}}):e(xFt(c,r)).then(async $=>{if($){let X=`/${a}`;if(V){e($4());try{await b($.id,Bt.closed.status),f&&!$.order_invoice&&p(Te.ISSUE_TAX_INVOICE)&&h($)}catch{t.error("Pedido criado com sucesso, mas não foi possível concluí-lo")}e(W4())}else if(W)E($.id),a==="latest-orders"&&(X=`/${a}/${$.id}`);else{const re=$.payment_values?.filter(ae=>ae.payment_method===mr.pix_auto.id||ll(ae))?.map(ae=>ae.id)??[];re.length>0&&(E($.id,re),a==="latest-orders"&&(X=`/${a}/${$.id}`))}e(HS()),e(t1()),i.replace(X)}}))}return u.createElement(S2,{dialogSearch:"pagamento",disableEnforceFocus:!1,loading:o,dialogProps:{PaperProps:{className:"shadow-lg rounded-12 h-full"}},onClose:void 0},u.createElement(qqt,null),u.createElement(Ljt,{payment:s,addPayment:I,removePayment:N,updatePaymentInfo:M,onPaymentCompleted:B,onGoBack:()=>i.goBack(),showCloseOrderButton:O,showConfirmAndReceiveButton:P}))}function Bjt({dialogPathname:e}){const t=at(({placeOrder:o})=>o.placeOrder.loading),[r,n]=u.useState(!1),i=u.useCallback(()=>n(!0),[]),a=u.useCallback(()=>n(!1),[]);return u.createElement(S2,{dialogPathname:e,dialogProps:{maxWidth:"xl",PaperProps:{className:"h-full shadow-lg rounded-12"}},onClose:void 0,loading:t},u.createElement("div",null),u.createElement(Xc,{className:"flex p-0"},u.createElement(Py,{xsDown:!0},u.createElement("div",{className:"flex flex-1"},u.createElement(Py,{smDown:!0},u.createElement("div",{className:"flex h-full w-256 flex-col border-0 border-r border-solid border-gray-200 lg:w-288"},u.createElement(BV,null))),u.createElement(Py,{mdUp:!0},u.createElement(qAe,{anchor:"left",open:r,onClose:()=>n(!1)},u.createElement("div",{className:"flex h-full w-288 flex-col border-0 border-r-1 border-solid border-gray-200"},u.createElement(BV,{closeCategories:a})))),u.createElement("div",{className:"flex h-full flex-1 flex-col border-0 border-r border-solid border-gray-200"},u.createElement(s4e,{openCategories:i})))),u.createElement(Py,{smUp:!0},u.createElement(yHt,null)),u.createElement("div",{className:"h-full w-full flex-shrink-0 sm:w-360 lg:w-384"},u.createElement(Vqt,null))),u.createElement(Q5e,null),u.createElement($5e,null),u.createElement(Fjt,{open:!0}))}const zjt=u.memo(Bjt),Hjt=[],Ujt=Ud((e,t)=>{switch(t.type){case _5e:return t.payload;case b5e:{const r=e.findIndex(n=>n.cartProductId===t.product.cartProductId);r===-1?e.push(t.product):e[r].quantity+=t.product.quantity;break}case E5e:{if(t.cartProductId.startsWith("reward_")){const r=t.cartProductId.split("reward_")[1],n=e.findIndex(i=>i.cartProductId===r);n!==-1&&(e[n].quantity>1?e[n].quantity-=1:e.splice(n,1))}else{const r=e.findIndex(n=>n.cartProductId===t.cartProductId);e.splice(r,1)}break}case w5e:{const r=e.findIndex(n=>n.cartProductId===t.prevCartProductId);r!==-1&&(e[r]=t.product);break}case S5e:return[]}}
353,Hjt),Vjt={categories:null,selectedCategory:null,catalogSearchedText:"",products:{},loading:!1},qjt=Ud((e,t)=>{switch(t.type){case z3e:{const r=Ud(t.payload,n=>{n.forEach(i=>{i.items.forEach(a=>{a.category_id=i.id,a.category_name=i.name})})});r.length>0&&(e.selectedCategory=r[0].id),e.categories=Oo(r,"id"),e.products=Oo(B3e(r,"items"),"id");break}case H3e:t.payload&&e.categories[t.payload]&&(e.selectedCategory=t.payload);break;case Y7t:e.products=t.payload;break;case U3e:e.catalogSearchedText=t.payload;break;case V3e:e.loading=!0;break;case q3e:e.loading=!1;break}},Vjt),uP={loading:!1,orderInEdit:null,errorsInRepeat:null,savedOrders:[],checkout:{orderType:"takeout",deliveryTime:"now",client:null,clientAddresses:[],customFieldsData:[],invoiceDocument:"",internalObservation:"",deliveryAddress:{zip_code:"",street:"",house_number:"",address_complement:"",neighborhood:"",city:"",state:"",landmark:"",address_block:"",address_lot:"",latitude:"",longitude:""},deliveryFeeDetails:{loading:!1,estimated_time:null,value:null,status:null},schedulingInfo:{selectedDate:"",selectedTime:""},payment:{total_order:0,discount:null,service_fee:null,delivery_fee:null,additional_fee:null,benefits:[],payments:[]}}},jjt=function(e=uP,t){switch(t.type){case bFt:return{...e,checkout:{...e.checkout,currentStep:t.currentStep}};case Q3e:return{...e,checkout:{...e.checkout,orderType:t.orderType}};case c5e:return{...e,savedOrders:[...e.savedOrders,t.payload]};case u5e:return{...e,savedOrders:e.savedOrders.filter(r=>r.id!==t.id)};case J3e:return{...e,checkout:{...e.checkout,deliveryTime:t.deliveryTime}};case r5e:return{...e,checkout:{...e.checkout,client:t.client}};case n5e:return{...e,checkout:{...e.checkout,clientAddresses:t.addresses}};case i5e:return{...e,checkout:{...e.checkout,deliveryAddress:{...e.checkout.deliveryAddress,...t.address}}};case a5e:return{...e,checkout:{...e.checkout,deliveryAddress:{...uP.checkout.deliveryAddress}}};case d5e:return{...e,checkout:{...e.checkout,customFieldsData:t.customFields}};case e5e:return{...e,checkout:{...e.checkout,invoiceDocument:t.document}};case t5e:return{...e,checkout:{...e.checkout,internalObservation:t.observation}};case h5e:return{...e,checkout:{...e.checkout,payment:{...e.checkout.payment,...t.payment}}};case p5e:return{...e,checkout:{...e.checkout,payment:{...e.checkout.payment,payments:[...e.checkout.payment.payments,t.payment]}}};case m5e:return{...e,checkout:{...e.checkout,payment:{...e.checkout.payment,payments:e.checkout.payment.payments.filter((r,n)=>n!==t.paymentIndex)}}};case f5e:return{...e,checkout:{...e.checkout,schedulingInfo:{...e.checkout.schedulingInfo,...t.schedulingInfo}}};case v5e:return{...e,checkout:{...e.checkout,deliveryFeeDetails:{...e.checkout.deliveryFeeDetails,...t.deliveryFeeDetails}}};case EFt:return{...e,orderInEdit:{...t.order}};case o5e:return{...e,errorsInRepeat:t.errors?{...e.errorsInRepeat,...t.errors}:null};case s5e:return{...e,checkout:t.checkout};case l5e:return{...e,checkout:{...uP.checkout,orderType:["takeout","onsite"].includes(e.checkout.orderType)?e.checkout.orderType:uP.checkout.orderType},orderInEdit:null};case wFt:return{...e,checkout:{...e.checkout,deliveryFeeDetails:{...e.checkout.deliveryFeeDetails,loading:!0}}};case SFt:return{...e,checkout:{...e.checkout,deliveryFeeDetails:{...e.checkout.deliveryFeeDetails,loading:!1}}};case g5e:return{...e,checkout:{...e.checkout,deliveryFeeDetails:{loading:!1,estimated_time:null,value:null,status:null}}};case CFt:return{...e,checkout:{...e.checkout,payment:{...e.checkout.payment,delivery_fee:null}}};case X3e:return{...e,loading:!0};case Z3e:return{...e,loading:!1};default:return e}},$jt=F4({placeOrder:jjt,cart:Ujt,catalog:qjt}),R2=u.createContext({});function Wjt({basePathname:e,tableSession:t,sendTableOrder:r,showEmployeeSelector:n,dialogPathname:i="fazer-pedido",onlyItemsFor:a="service_desk",forceCatalogRefresh:o=!0}){const s=An(),l=at(({placeOrder:f})=>f.catalog.categories),c=at(({placeOrder:f})=>f.placeOrder.orderInEdit);u.useEffect(()=>{s($3e(a,!0,o))},[s,a,o]),u.useEffect(()=>{c&&l&&s(HFt(c))},[l,s,c]);const d=u.useMemo(()=>({basePathname:e,dialogPathname:i,simplifiedVersion:!!t,tableSession:t,sendTableOrder:r,showEmployeeSelector:n}),[e,i,r,n,t]);return u.createElement(UY,null,u.createElement(R2.Provider,{value:d},u.createElement(zjt,{dialogPathname:i})))}const Gjt=B4("placeOrder",$jt)(u.memo(Wjt)),gR=kh(e=>({open:!1,order:null,setOpen:t=>e({open:!0,order:t}),setClose:()=>e({open:!1,order:null})})),_0=()=>{const{setOpen:e}=gR(),t=HK();return n=>{t&&e(n)}};qe.locale("pt-BR");function Kjt({orderItem:e}){const t=at(({orderListener:c})=>c?.serverDiffTimestamp),r=me.correctTime(e?.created_at,t),n=me.correctTime(e?.canceled_at,t),i=r.isAfter(qe().startOf("day"))?" hoje às ":r.format(" [em] DD/MM [às] "),a=r.isAfter(qe().startOf("day"))?" hoje às ":r.format(" [em] DD/MM [às] "),o=e?.user_name,s=e?.canceled_by_user_name,l=(c,d,f)=>c?u.createElement(u.Fragment,null,d||null,u.createElement("strong",{className:"max-w-80 truncate rounded-4 px-1 font-semibold",title:c},f||c)):null;return u.createElement("div",{className:"mt-8 space-y-8 text-gray-500"},u.createElement("div",{className:"border-0 border-t-1 border-solid border-gray-200 pt-8 text-14 font-light"},"Lançado ",l(o,"por ",o?.split(" ")[0])," ",i," ",l(r.format("HH:mm"))),e?.canceled_at&&u.createElement("div",{className:"text-14 font-light"},"Cancelado ",l(s,"por ",s?.split(" ")[0])," ",a," ",l(n.format("HH:mm"))),e?.cancellation_reason&&u.createElement("div",{className:"text-14 font-light"},u.createElement("strong",null,"Motivo:")," ",e.cancellation_reason))}var xw={},cve;function Yjt(){if(cve)return xw;cve=1;var e=$t(),t=Wt();Object.defineProperty(xw,"__esModule",{value:!0}),xw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchRounded");return xw.default=i,xw}var Xjt=Yjt();const uve=et(Xjt);async function Zjt(e){const t=await ht.get("/api/v1/company/order/search/items",{params:{q:e}});if(t.status===200&&t.data.status!==500)return t.data;throw Error(t.data.message)}async function Qjt(e){const t=await ht.get("/api/v1/company/order/search/subitems",{params:{q:e}});if(t.status===200&&t.data.status!==500)return t.data;throw Error(t.data.message)}async function Jjt(e,t){const r=await ht.put(`/api/v1/company/order/product_association/${e}/order_item`,{order_item:{item_id:t}}
353);if(r.status===200&&r.data.status!==500)return r.data;throw Error(r.data.message)}async function e$t(e,t){const r=await ht.put(`/api/v1/company/order/product_association/${e}/order_subitem`,{order_subitem:{subitem_id:t}});if(r.status===200&&r.data.status!==500)return r.data;throw Error(r.data.message)}const X4e={ACTIVE:"bg-green",INACTIVE:"bg-red",MISSING:"bg-orange"};function t$t({data:e,onClick:t}){return u.createElement("div",{className:"mb-12 flex cursor-pointer items-center justify-between space-x-28 rounded-6 border-1 border-solid border-gray-200 px-12 py-8 hover:bg-gray-50",onClick:t},u.createElement("div",{className:"flex-1 space-y-4 truncate"},u.createElement("div",{className:"flex items-center justify-between space-x-20 text-15"},u.createElement("div",{className:"flex items-center space-x-12"},u.createElement("div",{className:Ft("h-12 w-12 rounded-full",X4e[e.status]||"bg-gray-400")}),u.createElement("div",{className:"flex-1 truncate font-semibold text-gray-600"},e.name)),u.createElement("div",{className:"text-gray-600"},me.formatMonetaryValue(e.price))),u.createElement("div",{className:"truncate text-gray-500"},u.createElement("span",{className:"font-semibold"},"Categoria:")," ",e.category_name)),u.createElement(qg,{fontSize:"small",className:"text-gray-400"}))}function r$t({data:e,onClick:t}){return u.createElement("div",{className:"mb-12 flex cursor-pointer items-center justify-between space-x-28 rounded-6 border-1 border-solid border-gray-200 px-12 py-8 hover:bg-gray-50",onClick:t},u.createElement("div",{className:"flex-1 space-y-4"},u.createElement("div",{className:"flex items-center space-x-12 text-15"},u.createElement("div",{className:Ft("h-12 w-12 rounded-full",X4e[e.status]||"bg-gray-400")}),u.createElement("div",{className:"flex-1 truncate font-semibold text-gray-600"},e.name)),u.createElement("div",{className:"line-clamp-2 text-gray-500"},u.createElement("span",{className:"font-semibold"},"Usado em ",e.used_on_items.length||0," produto",e.used_on_items.length===1?"":"s",e.used_on_items.length>0?":":"")," ",e.used_on_items.join(", "))),u.createElement(qg,{fontSize:"small",className:"text-gray-400"}))}function n$t({orderId:e,item:t,onClose:r}){const n=Lr(),{mutate:i}=di(),[a,o]=u.useState(null),[s,l]=u.useState(""),[c,d]=u.useState(!1),[f,h]=u.useState([]),[p,g]=u.useState(!1),_=yc("(max-width:600px)"),b=u.useMemo(()=>a5(async O=>{if(!O){h([]),d(!1);return}try{if(a?.type==="subitem"){const I=await Qjt(O);h(I)}else{const I=await Zjt(O);h(I)}}catch{h([]),n.error("Não foi possível fazer a pesquisa")}d(!1)},600),[n,a]);u.useEffect(()=>{s?d(!0):h([]),b(s)},[s,b]),u.useEffect(()=>{t&&(l(""),d(!1),h([]),g(!1),o(t))},[t]);const E=u.useCallback(()=>{r&&r()},[r]),S=u.useCallback(async(O,I)=>{g(!0);try{a?.type==="subitem"?await e$t(O,I):await Jjt(O,I),await i(hs(e)),E()}catch{n.error("Não foi possível fazer a associação")}g(!1)},[n,a,E,i,e]),P=a?.type==="subitem"?r$t:t$t;return u.createElement(Eo,{open:!!t,onClose:r,maxWidth:"xs",fullWidth:!0,fullScreen:_,disableEnforceFocus:!0,PaperProps:{className:_?"":"shadow-md rounded-12"}},u.createElement(p0,{className:"px-24 pb-0 pt-16"},u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",null,a?.type==="subitem"?"Associar complemento":"Associar produto"),u.createElement(cr,{style:{padding:9},onClick:r},u.createElement(Aa,null)))),u.createElement(Xc,{className:"flex flex-1 flex-col overflow-hidden px-16 pb-24 pt-16"},u.createElement("div",{className:"mb-16 space-y-16 px-8"},u.createElement("div",{className:"text-gray-600s text-16"},"Procure e selecione o ",a?.type==="subitem"?"complemento":"produto"," do seu catálogo que corresponde ao"," ",a?.type==="subitem"?"complemento":"produto"," ",u.createElement("strong",{className:"cursor-pointer",onClick:()=>l(a?.name)},a?.name),"."),u.createElement(Qd,{variant:"outlined",className:"flex min-w-224 items-center space-x-8 border-grey-border-dark pl-4 pr-8"},u.createElement(cr,{className:"p-8 text-gray-500"},u.createElement(uve,null)),u.createElement(Hu,{placeholder:`Buscar por ${a?.type==="subitem"?"complemento":"produto"}`,className:"w-full text-16 text-gray-600",value:s,onChange:O=>l(O.target.value),autoFocus:!0}),c&&u.createElement("div",{className:"flex h-full items-center"},u.createElement(ai,{color:"primary",size:18})),s&&u.createElement(Yn,{title:"Limpar",placement:"top",arrow:!0},u.createElement(cr,{className:"p-8 text-gray-500",onClick:()=>l("")},u.createElement(Aa,{fontSize:"small"}))))),u.createElement("div",{className:"min-h-400 flex-1 overflow-auto px-8"},!f?.length&&s&&!c&&u.createElement(dl,{title:"Nada encontrado"}),!f?.length&&(!s||c)&&u.createElement("div",{className:"flex h-400 w-full items-center justify-center"},u.createElement(uve,{className:"text-gray-200",style:{fontSize:"16rem"}})),f?.map(O=>u.createElement(P,{key:O.id,data:O,onClick:()=>S(t.id,O.id)}
353))),u.createElement("div",{className:"border-0 border-t-1 border-solid border-gray-200 px-8 pt-12 text-center text-14 text-gray-400"},"Para evitar esse processo de associação, informe corretamente o"," ",u.createElement("strong",null,"Código interno")," dos seus"," ",a?.type==="subitem"?"complementos":"produtos"," no campo"," ",u.createElement("strong",null,"Código PDV")," no sistema integrado.")),p&&u.createElement("div",{className:"absolute inset-0 flex items-center justify-center",style:{zIndex:5e3,backgroundColor:"rgba(255,255,255,0.7)"}},u.createElement(ai,{color:"primary"})))}function i$t(e){const t=e.order_subitems?.map(n=>n.warning_message);return[e.warning_message,...t||[]].filter(Boolean)}function a$t({orderId:e,orderStatus:t,item:r}){const[n,i]=u.useState(null);if(t===Bt.canceled.status)return null;const a=r.order_subitems?.filter(o=>!o.subitem_id);return u.createElement("div",null,t===Bt.waiting_confirmation.status&&i$t(r).map((o,s)=>u.createElement("div",{key:s,className:"mt-12 flex items-center space-x-12 rounded-6 bg-white p-8 text-orange"},u.createElement(GIe,{color:"inherit"})," ",u.createElement("span",null,o))),!r.item_id&&u.createElement("div",{className:"mt-12 flex cursor-pointer items-center space-x-12 rounded-6 bg-white p-8 text-blue",onClick:()=>i({id:r.id,name:r.name,type:"item"})},u.createElement(jC,{color:"inherit"})," ",u.createElement("div",{className:"flex-1"},"Produto não associado no pedido")," ",u.createElement(qg,{fontSize:"small"})),a.map(o=>u.createElement("div",{key:o.id,className:"mt-12 flex cursor-pointer items-center space-x-12 rounded-6 bg-white p-8 text-blue",onClick:()=>i({id:o.id,name:o.name,itemId:r.id,type:"subitem"})},u.createElement(jC,{color:"inherit"})," ",u.createElement("div",{className:"flex-1"},`Opção "${o.name}" não associada no pedido`)," ",u.createElement(qg,{fontSize:"small"}))),(!r.item_id||a?.length>0)&&u.createElement(n$t,{orderId:e,item:n,onClose:()=>i(null)}))}function o$t({orderItem:e,openCancelDialog:t,openAddMoreDialog:r,openEditObservationDialog:n,submitEditOrderItem:i}){const{orderPermissions:a}=gi(),[o,s]=u.useState(null),[l,c]=u.useState(!1),d=czt(),f=qK(),h=u.useCallback(b=>async E=>{c(!0),await i(b,E),c(!1)},[i]),p=b=>{s(b.currentTarget)},g=()=>{s(null)},_=u.useMemo(()=>[a.addOrderItem&&e.unit_type==="UN"&&{id:"transfer-session",name:"Adicionar mais",icon:u.createElement(bh,null),onClick:f(()=>r(e))},a.editOrderItem&&!e.paid_with_points&&{id:"edit-order-item",name:"Editar item",icon:u.createElement(ps,null),onClick:f(()=>d(e,h(e?.id)))},a.editOrderItem&&{id:"edit-observation",name:"Editar observação",icon:u.createElement(rY,null),onClick:()=>n(e)},a.removeOrderItem&&!e.paid_with_points&&{id:"cancel-items",name:"Cancelar",icon:u.createElement($p,null),onClick:f(()=>t(e))}].filter(Boolean),[f,h,r,t,n,d,e,a.addOrderItem,a.editOrderItem,a.removeOrderItem]);return!_.length||e.status==="canceled"?null:l?u.createElement(cr,{className:"rounded-6 p-4 text-gray-400"},u.createElement(ai,{color:"inherit",size:16})):u.createElement("div",null,u.createElement(cr,{onClick:p,className:"rounded-6 p-4 text-gray-400"},u.createElement(lx,null)),u.createElement(Zc,{anchorEl:o,open:!!o,onClose:g,getContentAnchorEl:null,elevation:0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:"border-1 border-solid border-grey-border shadow rounded-8 text-gray-600"},keepMounted:!1},_.map(b=>u.createElement(ln,{key:b.id,className:"flex items-center space-x-12 py-12 text-16",disabled:!!b.disabled,onClick:()=>{g(),b.onClick()}},b.icon,u.createElement("span",null,b.name)))))}function dve({product:e}){const t=e.order_subitems;return!t.length&&!e.observation?null:u.createElement("div",{className:"space-y-8 text-16"},t.length>0&&u.createElement("div",{className:"w-full text-gray-600"},t.map(({id:r,name:n,quantity:i})=>u.createElement("div",{key:r,className:"flex items-center justify-between"},i>1?u.createElement("div",{className:"flex-grow"},`${i}  ${n}`):u.createElement("div",{className:"flex-grow"},`- ${n}`)))),e.observation&&u.createElement("div",{className:"mt-1 flex flex-grow text-red"},u.createElement("div",{className:"font-bold"},"OBS: ",e.observation)))}function s$t(){return u.createElement(Yn,{title:"Esse produto não gera cashback",placement:"top",arrow:!0},u.createElement("div",{className:"bg-red-100 text-red-600 relative flex h-20 w-20 flex-shrink-0 items-center justify-center rounded-full"},u.createElement(YV,{className:"h-24 w-24 text-red-dark"}),u.createElement("div",{className:"absolute inset-0 flex items-center justify-center","aria-hidden":!0},u.createElement("div",{className:"bg-red-600 h-24 w-px rotate-45 transform rounded-full"}))))}function Z4e({orderItem:e,openAddMoreDialog:t,openCancelDialog:r,openEditObservationDialog:n,submitEditOrderItem:i,showAdditionalInfo:a}){const{order:o}=gi(),c=at(({globalCompany:h})=>
353h?.company?.benefit_mode)===_p.CASHBACK&&!e.generates_cashback&&o.status===Bt.closed.status,d=e.order_subitems?.filter(h=>!h.subitem_id),f=!e.item_id||d?.length>0;return u.createElement("div",{className:"w-full rounded-6 bg-gray-100 p-8 text-16"},u.createElement("div",{className:"flex min-h-28 pl-4 font-bold"},u.createElement("div",{className:"flex flex-1 space-x-12 pt-1"},u.createElement("div",{className:"min-w-28 pl-1"},e.quantity.toString().replace(".",",")),u.createElement("div",{className:"flex-1"},e.name," ",e.custom_code&&u.createElement("span",{className:"mr-12 text-red"},"(Cód. ",e.custom_code,")")),u.createElement("div",{className:Ft("inline-flex flex-shrink-0 items-center justify-end space-x-8 pt-1",e.paid_with_points&&"line-through")},e.paid_with_points&&u.createElement("img",{src:V4,alt:"Pago com pontos",className:"h-16 w-16"}),c&&u.createElement(s$t,null),u.createElement("span",null,me.formatMonetaryValue(e.price)))),u.createElement(o$t,{orderItem:e,openAddMoreDialog:t,openCancelDialog:r,openEditObservationDialog:n,submitEditOrderItem:i})),e.kind==="combo"&&e.combo_items.map(h=>u.createElement("div",{key:h.id,className:"space-y-4 space-y-8 pb-4 pl-44 pr-12 pt-1 text-16"},u.createElement("div",{className:"font-bold"},"- ",h.name),u.createElement("div",{className:"pl-16"},u.createElement(dve,{product:h})))),e.kind!=="combo"&&(e.order_subitems.length>0||e.observation)&&u.createElement("div",{className:"space-y-8 pb-4 pl-44 pr-12 pt-1 text-16"},u.createElement(dve,{product:e})),f&&u.createElement(a$t,{orderId:o.id,orderStatus:o.status,item:e}),a&&u.createElement(Kjt,{orderItem:e}))}function l$t({canceledOrderItems:e}){const[t,r]=u.useState(!1);if(!e.length)return null;const n=tg(e.map(a=>({...a,quantity:a.unit_type!=="UN"?1:a.quantity})),"quantity"),i=tg(e,"price");return u.createElement("div",{className:"w-full rounded-6 border border-solid border-red-lighter p-8"},u.createElement("div",{className:"flex min-h-28 cursor-pointer pl-4 text-16 font-bold text-red-light",onClick:()=>r(a=>!a)},u.createElement("div",{className:"flex flex-1 space-x-12 pr-8 pt-4"},u.createElement("div",{className:"min-w-28 pl-1"},n),u.createElement("div",{className:"flex-1"},n>1?"Itens cancelados":"Item cancelado"),u.createElement("div",{className:"whitespace-nowrap"},me.formatMonetaryValue(i))),u.createElement(cr,{color:"inherit",className:"rounded-6 p-4"},u.createElement(uc,{className:Ft("transform transition-transform duration-500",t&&"rotate-180")}))),u.createElement(Oh,{in:t},u.createElement("div",{className:"space-y-12 pt-8"},e.map(a=>u.createElement(Z4e,{key:a.id,orderItem:a,showAdditionalInfo:!0})))))}function Q4e(e,t=1){const r=qc(e,["item_id","kind","quantity","observation","price","unit_price","price_without_discounts","paid_with_points","category_id","category_name"]);return r.order_subitems_attributes=e.order_subitems?.map(n=>qc(n,["subitem_id","quantity","price","add_on_id","add_on_name"]))||[],r.combo_items_attributes=e.combo_items?.map(n=>Q4e(n))||[],r.price=r.price/r.quantity*t,r.price_without_discounts=r.price_without_discounts/r.quantity*t,r.quantity=t,r}const c$t=[{value:1,label:"1 unidade"},{value:2,label:"2 unidades"},{value:3,label:"3 unidades"},{value:4,label:"4 unidades"},{value:5,label:"5 unidades"}];function u$t({open:e,onClose:t,selectedOrderItem:r}){const n=Lr(),i=An(),a=Uu(),{mutate:o}=di(),[s,l]=u.useState(!1),[c,d]=u.useState(1),{order:f}=gi(),h=_0();u.useEffect(()=>{e&&(d(1),l(!1))},[e]);const p=async g=>{if(g.preventDefault(),!r?.id){n.info("Nenhum produto selecionado");return}l(!0);try{const _=Q4e(r,c),b=await VIe(f?.id,[_]),E=await o(qn(f.id)),S={...f,order_items:b};h&&h(E),a(S,"kitchen",!0),n.success("Produto adicionado com sucesso!")}catch(_){i(ig()),n.error(_.response?.data?.message||"Não foi possível concluir a operação")}l(!1),t()};return u.createElement(oi,{open:e,title:"Adicionar mais",loading:s,onClose:t,onSubmit:p,confirmText:"Adicionar",cancelText:"Voltar",fullScreen:!1},u.createElement("div",{className:"space-y-20 text-gray-600"},u.createElement("div",{className:"text-18",style:{lineHeight:2.5}},c>1?u.createElement("span",null,"Serão adicionadas"):u.createElement("span",null,"Será adicionada"),u.createElement(Tr,{id:"quantity",value:c,onChange:g=>d(g.target.value),className:"mx-12",variant:"outlined",size:"small",select:!0},c$t.map(g=>u.createElement(ln,{key:g.value,value:g.value},g.label))),u.createElement("span",null,"do produto ",u.createElement("strong",null,r?.name)," ao pedido."))))}const fve=[{reason:"Outro",cancellationCode:"501"},{reason:"O cliente desistiu do produto",cancellationCode:"801"},{reason:"O cliente recusou o produto",cancellationCode:"802"},{reason:"Produto veio errado",cancellationCode:"804"},{reason:"Produto lançado duplicado",cancellationCode:"803"},{reason:"Produto lançado errado",cancellationCode:"805"}],d$t=(e,t)=>{let r="";switch(e){case"KG":r="quilograma";break;case"L":r="litro";break;default:r="unidade";break}return((e==="KG"||e==="L")&&t>=2||t>1)&&(r+="s"),r},dP=e=>{switch(e){case"KG":return[{key:0,label:"quilogramas (kg)",multi:1},{key:1,label:"gramas (g)",multi:.001}];case"L":return[{key:0,label:"litros (l)",multi:1},{key:1,label:"mililitros (ml)",multi:.001}];default:return[{key:0,label:"Unidade(s)",multi:1}]}};function f$t({open:e,onClose:t,unitType:r,currentQuantity:n,updateQuantity:i}){const[a,o]=u.useState(""),[s,l]=u.useState(0),c=u.useRef(null);u.useEffect(()=>{e&&o(n.toString().replace(".",","))},[n,e]);const d=p=>{if(["KG","L"].includes(r))/^([0-9]+[.|,])?[0-9]*$/.test(p.target.value)&&o(p.target.value.replace(".",","));else{const g=(p.target.value||"").toString().replace(/\D/g,"");o(g)}},f=u.useCallback(p=>{const g=dP(r)[s].multi,_=dP(r)[p.target.value].multi,b=g/_;o(E=>(me.convertNumberToFloat(E)*b).toString().replace(".",",")),l(p.target.value),setImmediate(()=>{c.current&&(c.current.focus(),c.current.select())})},[s,r]),h=p=>{p.preventDefault(),p.stopPropagation();const g=parseFloat(dP(r)[s].multi*me.convertNumberToFloat(a));i(g)};return u.createElement(oi,{open:e,title:"Quantidade",onClose:t,onSubmit:h,confirmText:"Confirmar",cancelText:"Voltar",fullScreen:!1,fullWidth:!1,classes:{scrollPaper:"sm:items-center items-start"}},u.createElement("div",{className:"w-256 space-y-16"},u.createElement(Hu,{inputRef:c,value:a,onChange:d,onFocus:p=>p.target.select(),inputProps:{className:"w-full text-36 font-semibold text-center placeholder-gray-300 text-gray-600"},placeholder:r==="UN"?"0":"0,000",inputMode:"numeric",type:"tel",required:!0,autoFocus:!0}),(r==="KG"||r==="L")&&u.createElement(X4t,{name:"unit_type",value:s,variant:"outlined",onChange:f,options:dP(r),optionValueKey:"key",optionLabelKey:"label"})))}function h$t({open:e,onClose:t,selectedOrderItem:r}){const n=Lr(),i=Uu(),{mutate:a}=di(),o=at(({globalCompany:F})=>F.company.print_setting),[s,l]=u.useState(!1),c=_0(),[d,f]=u.useState(null),[h,p]=u.useState(1),[g,_]=u.useState(!1),[b,E]=u.useState(""),{order:S}=gi();u.useEffect(()=>{e&&(f(null),E(""),p(r?.quantity||1))},[e,r]);const P=F=>{const B=fve.find(V=>V.cancellationCode===F.target.value);d?.cancellationCode===B?.cancellationCode?f(null):B&&f(B),b&&E("")},O=F=>typeof F!="number"?(n.info("Informe um número válido!"),!1):F<=0?(n.info("Informe um número maior ou igual a 0!"),!1):F>r.quantity?(n.info(`A quantidade máxima permitida é ${r.quantity.toString().replace(".",",")}!`),!1):r.unit_type==="UN"&&!Number.isInteger(F)?(n.info("Informe um número inteiro!"),!1):!0,I=()=>d?.cancellationCode==="501"&&b?.length<4?(n.info("O motivo não pode ter menos que 4 caracteres",{autoHideDuration:5e3}),!1):!!O(h),N=u.useCallback(()=>{t&&!s&&t()},[s,t]),M=async F=>
353{if(F.preventDefault(),I()&&!s){l(!0);try{const{reason:B,cancellationCode:V}=d||{},W=V==="501"?b:B;await Z6t(S?.id,[{id:r.id,quantity:h,reason:W}]);const $=await a(qn(S.id));if(c&&c($),o?.print_exclusion_receipt){const X={...S,order_items:[{...r,quantity:h}]};i(X,"canceledItem",!0)}n.success("Produto cancelado com sucesso!"),t()}catch(B){n.error(B.response?.data?.message||"Não foi possível concluir a operação")}l(!1)}};return u.createElement(oi,{open:e,title:"Remover produto do pedido",loading:s,onClose:N,onSubmit:M,confirmText:"Remover",cancelText:"Voltar",fullScreen:!1,maxWidth:"sm",classes:{scrollPaper:"sm:items-center items-start"}},u.createElement("div",{className:"flex flex-col space-y-20"},u.createElement("div",{className:"text-18 font-medium leading-10 text-gray-600"},h>1?"Serão removidas":"Será removida"," ",u.createElement("strong",null,h.toString().replace(".",",")," ",d$t(r?.unit_type,h))," ","do produto ",u.createElement("strong",null,r?.name)," do pedido."),(r?.quantity>1||r?.unit_type!=="UN")&&u.createElement("div",null,u.createElement(fr,{color:"primary",startIcon:u.createElement(ps,null),onClick:()=>_(!0)},"Editar quantidade a ser removida"),u.createElement(f$t,{open:g,onClose:()=>_(!1),unitType:r?.unit_type,currentQuantity:h,updateQuantity:F=>{O(F)&&(p(F),_(!1))}})),u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Informe abaixo o motivo deste cancelamento"),u.createElement("div",{className:"max-h-384 overflow-auto p-1"},u.createElement(qC,{value:d?.cancellationCode||"",className:"grid grid-cols-1 gap-4 sm:grid-cols-2"},fve.map(({reason:F,cancellationCode:B})=>u.createElement(Mg,{key:B,value:B,onClick:P,label:F,control:u.createElement(Bg,{color:"primary"}),classes:{label:"text-16 text-gray-600 font-medium"}})))),d?.cancellationCode==="501"&&u.createElement("div",{className:"space-y-12"},u.createElement("div",{className:"text-16 font-medium leading-10 text-gray-600"},"Qual o motivo?"),u.createElement(Tr,{value:b,onChange:F=>E(F.target.value),placeholder:"Escreva aqui outro motivo que não esteja listado acima",multiline:!0,rows:3,variant:"outlined",fullWidth:!0,inputProps:{className:"text-16"},autoFocus:!0}))))}function p$t({open:e,onClose:t,selectedOrderItem:r}){const n=Lr(),i=Uu(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(1),{order:d}=gi();u.useEffect(()=>{e&&(c(r?.observation||""),s(!1))},[e,r?.observation]);const f=async h=>{if(h.preventDefault(),!r?.id){n.info("Nenhum produto selecionado");return}s(!0);try{const p=await Q6t(d?.id,r?.id,{observation:l});a(qn(d.id),_=>({..._,order_items:_.order_items.map(b=>b.id===p.id?p:b)}));const g={...d,order_items:[p],changed_order_items:[r]};i(g,"kitchen",!0),n.success("Observação atualizada com sucesso!")}catch(p){n.error(p.response?.data?.message||"Não foi possível concluir a operação")}s(!1),t()};return u.createElement(oi,{open:e,title:"Atualizar observação",loading:o,onClose:t,onSubmit:f,confirmText:"Atualizar",cancelText:"Cancelar",fullScreen:!1},u.createElement("div",{className:"space-y-20 text-gray-600"},u.createElement(Tr,{id:"observation",label:"Observação do produto",value:l,onChange:h=>c(h.target.value),variant:"outlined",autoFocus:!0,fullWidth:!0,multiline:!0,rows:4})))}function m$t({orderItems:e}){const t=Lr(),r=An(),n=Uu(),i=vc(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(!1),[d,f]=u.useState(!1),h=_0(),[p,g]=u.useState(!1),_=at(({placeOrder:$})=>$?.catalog?.products),b=u.useRef(null),{order:E,orderPermissions:S}=gi(),P=qK(),O=u.useCallback($=>{b.current=$,c(!0)},[]),I=u.useCallback($=>{b.current=$,s(!0)},[]),N=u.useCallback($=>{b.current=$,f(!0)},[]),M=u.useCallback(({order_items:$})=>async()=>{try{const X=await VIe(E.id,$),re=await a(qn(E.id)),ae={...E,order_items:X};return h&&h(re),n(ae,"kitchen",!0),t.success("Produtos adicionados com sucesso!"),!0}catch(X){r(ig()),t.error(X.response?.data?.message||"Não foi possível concluir a operação")}return!1},[t,r,a,h,E,n]),F=u.useCallback(async($,X)=>{try{const ae=iY(_,[],X),Q=lY(ae),{canceled_order_item:ie,added_order_item:le}=await J6t(E.id,$,Q),fe=await a(qn(E.id));h&&h(fe);const de={...E,order_items:[le],changed_order_items:[ie]};return n(de,"kitchen",!0),t.success("Produto atualizado com sucesso!"),!0}catch(re){r(ig()),t.error(re.response?.data?.message||"Não foi possível concluir a operação")}return!1},[t,_,r,a,h,E,n]);if(!e)return null;const B=Nu(e.filter(({status:$,cancellation_reason:X})=>$!=="canceled"||X==="Pedido cancelado"),["id"],["asc"]),V=Nu(e.filter(({status:$,cancellation_reason:X})=>$==="canceled"&&X!=="Pedido cancelado"),["canceled_at","id"],["asc","asc"]);if(!B.length&&!V.length)return u.createElement("div",{className:"flex h-full w-full flex-col items-center justify-center space-y-12 pb-12 pt-28"},u.createElement(kPe,{className:"h-80 w-80 fill-current text-gray-300"}),u.createElement("div",{className:"text-center text-18 font-semibold text-gray-400"},"Pedido sem nenhum produto"));const W=B.length>0||V.length>0;return u.createElement("div",{className:"space-y-12 p-12 sm:p-16"},u.createElement(Fm,{title:"Itens do pedido",Icon:P7t,Action:u.createElement("div",{className:"space-x-12"},u.createElement(Ma,{tooltip:p?"Esconder detalhes":"Mostrar detalhes",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>g($=>!$)},p?u.createElement(dkt,null):u.createElement(I7t,null)),S.addOrderItem&&u.createElement(Ma,{tooltip:"Adicionar item",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:P(()=>i.push(`/latest-orders/${E?.id}/adicionar-produto`))},u.createElement(bh,null))),className:"mb-16"}),B.map($=>u.createElement(Z4e,{key:$.id,orderItem:$,openAddMoreDialog:O,openCancelDialog:I,openEditObservationDialog:N,submitEditOrderItem:F,showAdditionalInfo:p})),u.createElement(l$t,{canceledOrderItems:V}),W&&S.addOrderItem&&u.createElement(u.Fragment,null,u.createElement(Gjt,{basePathname:`latest-orders/${E?.id}`,sendTableOrder:M,dialogPathname:"adicionar-produto",forceCatalogRefresh:!1,tableSession:!0}),u.createElement(u$t,{open:l,selectedOrderItem:b.current,onClose:()=>{c(!1),b.current=null}})),W&&S.removeOrderItem&&u.createElement(h$t,{open:o,selectedOrderItem:b.current,onClose:()=>{s(!1),b.current=null}}),W&&S.editOrderItem&&u.createElement(uzt,null),W&&S.editOrderItem&&u.createElement(p$t,{open:d,selectedOrderItem:b.current,onClose:()=>{f(!1),b.current=null}}))}const v$t=u.memo(m$t),g$t=[{code:"default",name:"Padrão"},{code:"wpp",name:"WhatsApp"},{code:"diswpp",name:"Disparo via WhatsApp"},{code:"cb",name:"ChatBot"},{code:"insta",name:"Instagram"},{code:"fb",name:"Facebook"},{code:"google",name:"Google"},{code:"pub",name:"Tráfego Pago"}];function y$t(){const e=at(({globalCompany:r})=>r.company.customer_origins);return u.useMemo(()=>{const r=JSON.parse(e||"[]");return g$t.concat(r)},[e])}function wB({label:e,value:t}){return u.createElement("div",{className:"flex rounded-6 border border-solid border-gray-300 text-14"},u.createElement("div",{className:"bg-grey-50 rounded-l-6 border-0 border-r-1 border-solid border-gray-300 bg-gray-100 px-12 py-4 font-semibold"},e),u.createElement("div",{className:"px-16 py-4"},t))}function _$t({order:e}){const t=y$t(),r=e.customer_origin&&(t.find(n=>n.code===e.customer_origin)?.name||e.customer_origin);return u.createElement("div",{className:"flex flex-shrink-0 space-x-12 overflow-auto px-12 pt-16 sm:px-16"},e3[e.order_type]&&u.createElement(wB,{label:"Tipo",value:e3[e.order_type]}),XV[e.sales_channel]&&u.createElement(wB,{label:"Canal",value:XV[e.sales_channel]}),r&&u.createElement(wB,{label:"Origem",value:r}))}const b$t=e=>ht.get(e).then(t=>{if(t.status!==200||t.data.status===500)throw Error(t.data.message);return t.data});function J4e(e=!0){const{data:t,isLoading:r,error:n,mutate:i}=Jc(e?"/api/v1/company/integrations/ifood":null,b$t,{dedupingInterval:6e4});return{data:t,isLoading:r,isError:n,mutate:i}}const hve={open:!1,loading:!1,quoteData:null,quoteError:null,selectedPayment:null},Po=kh(e=>({...hve,selectedMerchant:null,setOpen:()=>e(t=>({...t,...hve,open:!0})),setClose:()=>e(t=>({...t,open:!1})),setSelectedMerchant:t=>e(r=>({...r,selectedMerchant:t})),setQuoteData:t=>e(r=>({...r,quoteData:t})),setQuoteError:t=>e(r=>({...r,quoteError:t})),setSelectedPayment:t=>e(r=>({...r,selectedPayment:t}
353)),setLoading:t=>e(r=>({...r,loading:t}))})),TY="/assets/beeDelivery-sc5g_CXr.png",eke="/assets/foodyDelivery-DfMX04tM.png",E$t=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1004 530.58",width:"1em",height:"1em",...e},x.createElement("title",null,"iFood"),x.createElement("path",{d:"M-4,529.31H72.41l42.46-211.2H38.45ZM42.66,292.92h76.73L132,229.73H55.3Zm59.47,295.82h76.42l46.69-228.18h57.31L291,318.11H234.79l2.13-9.55c3.18-18,9.55-38.21,38.2-38.21,17,0,32.91,1.06,48.82,8.49l8.5-44.57a167.8,167.8,0,0,0-55.19-9.56c-61.56,0-104,36.09-119.93,93.4H130.79l-8.49,42.45h26.53Z",transform:"translate(4 -224.71)",fill:"#ea1d2c"}),x.createElement("path",{d:"M344.11,533.56c90.21,0,152.83-81.73,152.83-148.59,0-49.88-45.64-71.11-90.21-71.11C308,313.86,253.9,402,253.9,462.45c0,49.88,46.7,71.11,90.21,71.11m242,0c90.21,0,152.83-81.73,152.83-148.59,0-49.88-46.7-71.11-91.28-71.11-98.7,0-152.82,88.09-152.82,148.59,0,49.88,47.76,71.11,91.27,71.11m277-4.25h75.35L1000,229H923.59l-18.05,89.15-31.84-3.18c-74.29,0-142.21,95.51-142.21,163.44,0,27.59,18,55.19,48.82,55.19,43.51,0,74.29-21.23,87-42.46h4.24ZM627.48,687.45a295,295,0,0,1-212.26,66.86c-100.83-6.37-173-83.85-185.73-165.57h4.24c23.35,51,79.6,98.71,148.59,106.13,70,8.49,153.89-23.34,199.52-66.86L530.9,588.74H684.79l-34,163.45-22.29-63.68Z",transform:"translate(4 -224.71)",fill:"#ea1d2c"})),AY="/assets/mottu-DuHTJOSc.png";var O2=e=>e.type==="checkbox",Q4=e=>e.type==="file",Mp=e=>e instanceof Date,ss=e=>e==null;const PY=e=>typeof e=="object";var Da=e=>!ss(e)&&!Array.isArray(e)&&PY(e)&&!Mp(e),eq=e=>Da(e)&&e.target?O2(e.target)?e.target.checked:Q4(e.target)?e.target.files:e.target.value:e,tke=(e,t)=>t.split(".").some((r,n,i)=>!isNaN(Number(r))&&e.has(i.slice(0,n).join("."))),rke=e=>{const t=e.constructor&&e.constructor.prototype;return Da(t)&&t.hasOwnProperty("isPrototypeOf")},J4=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Li(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(J4&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Da(e)&&rke(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Li(e[i]));return n}const Ep={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Dc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},nke="root",RY=["__proto__","constructor","prototype"],w$t=/^\w*$/;var I2=e=>w$t.test(e),ji=e=>e===void 0;const S$t=/[.[\]'"]/;var ek=e=>
vendor: 5,413 bytes, line 353
353e.split(S$t).filter(Boolean),ar=(e,t,r)=>{if(!t||!Da(e))return r;const n=I2(t)?[t]:ek(t);if(n.some(a=>RY.includes(a)))return r;const i=n.reduce((a,o)=>ss(a)?void 0:a[o],e);return ji(i)||i===e?ji(e[t])?r:e[t]:i},Tl=e=>typeof e=="boolean",Ms=e=>typeof e=="function",bi=(e,t,r)=>{let n=-1;const i=I2(t)?[t]:ek(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const c=e[s];l=Da(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(RY.includes(s))return;e[s]=l,e=e[s]}};const OY=u.createContext(null);OY.displayName="HookFormControlContext";const tk=()=>u.useContext(OY);var ike=(e,t,r,n=!0)=>{const i={};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Dc.all&&(t._proxyFormState[o]=!n||Dc.all),r&&(r[o]=!0),e[o]}});return i};const rk=J4?u.useLayoutEffect:u.useEffect;function C$t(e){const t=tk(),{control:r=t,disabled:n,name:i,exact:a}=e||{},[o,s]=u.useState(()=>({...r._formState,defaultValues:r._defaultValues})),l=u.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return rk(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:c=>{!n&&s({...r._formState,...c,defaultValues:r._defaultValues})}}),[i,n,a]),u.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),u.useMemo(()=>ike(o,r,l.current,!1),[o,r])}var ls=e=>typeof e=="string",tq=(e,t,r,n,i)=>ls(e)?(n&&t.watch.add(e),ar(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),ar(r,a))):(n&&(t.watchAll=!0),r),rq=e=>ss(e)||!PY(e);const pve=(e,t)=>t.length===0&&!Array.isArray(e)&&!rke(e);function nc(e,t,r=new WeakMap){if(e===t)return!0;if(rq(e)||rq(t))return Object.is(e,t);if(Mp(e)&&Mp(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(pve(e,n)||pve(t,i))return Object.is(e,t);if(!n.length&&Array.isArray(e)!==Array.isArray(t))return!1;const a=r.get(e);if(a&&a.has(t))return!0;if(a)a.add(t);else{const o=new WeakSet;o.add(t),r.set(e,o)}for(const o of n){const s=e[o];if(!(o in t))return!1;if(o!=="ref"){const l=t[o];if(Mp(s)&&Mp(l)||(Da(s)||Array.isArray(s))&&(Da(l)||Array.isArray(l))?!nc(s,l,r):!Object.is(s,l))return!1}}return!0}function x$t(e){const t=tk(),{control:r=t,name:n,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},l=u.useRef(i),c=u.useRef(s),d=u.useRef(void 0),f=u.useRef(r),h=u.useRef(n);c.current=s;const[p,g]=u.useState(()=>{const O=r._getWatch(n,l.current);return c.current?c.current(O):O}),_=u.useCallback(O=>{const I=tq(n,r._names,O||r._formValues,!1,l.current);return c.current?c.current(I):I},[r._formValues,r._names,n]),b=u.useCallback(O=>{if(!a){const I=tq(n,r._names,O||r._formValues,!1,l.current);if(c.current){const N=c.current(I);nc(N,d.current)||(g(N),d.current=N)}else g(I)}},[r._formValues,r._names,a,n]);rk(()=>((f.current!==r||!nc(h.current,n))&&(f.current=r,h.current=n,b()),r._subscribe({name:n,formState:{values:!0},exact:o,callback:O=>{b(O.values)}})),[r,o,n,b]),u.useEffect(()=>r._removeUnmounted());const E=f.current!==r,S=h.current,P=u.useMemo(()=>{if(a)return null;const O=!E&&!nc(S,n);return E||O?_():null},[a,E,n,S,_]);return P!==null?P:p}function T$t(e){const t=tk(),{name:r,disabled:n,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,l=tke(i._names.array,r),c=u.useMemo(()=>ar(i._formValues,r,ar(i._defaultValues,r,o)),[i,r,o]),d=x$t({control:i,name:r,defaultValue:c,exact:s}),f=C$t({control:i,name:r,exact:s}),h=u.useRef(e),p=u.useRef(null),g=u.useRef(i.register(r,{...e.rules,value:d,...Tl(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const _=u.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ar(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!ar(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ar(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ar(f.validatingFields,r)},error:{enumerable:!0,get:()=>ar(f.errors,r)}}),[f,r]),b=u.useCallback(O=>{const I=eq(O);return ar(i._fields,r)||(g.current=i.register(r,{...h.current.rules,value:I})),g.current.onChange({target:{value:eq(O),name:r},type:Ep.CHANGE})},[r,i]),E=u.useCallback(()=>g.current.onBlur({target:{value:ar(i._formValues,r),name:r},type:Ep.BLUR}),[r,i._formValues]),S=u.useCallback(O=>{O&&(p.current={focus:()=>Ms(O.focus)&&O.focus(),select:()=>Ms(O.select)&&O.select(),setCustomValidity:N=>Ms(O.setCustomValidity)&&O.setCustomValidity(N),reportValidity:()=>Ms(O.reportValidity)&&O.reportValidity()});const I=ar(i._fields,r);I&&I._f&&O&&(I._f.ref=p.current)},[i._fields,r]),P=u.useMemo(()=>({name:r,value:d,...Tl(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:E,ref:S}),[r,n,f.disabled,b,E,S,d]);return u.useEffect(()=>{const O=i._options.shouldUnregister||a;g.current=i.register(r,{...h.current.rules,...Tl(h.current.disabled)?{disabled:h.current.disabled}:{}});const I=(N,M)=>{const F=ar(i._fields,N);F&&F._f&&(F._f.mount=M)};if(I(r,!0),O){const N=Li(ar(a?i._defaultValues:i._options.values||i._defaultValues,r,ar(i._options.defaultValues,r,h.current.defaultValue)));bi(i._defaultValues,r,N),ji(ar(i._formValues,r))&&bi(i._formValues,r,N)}if(!l&&i.register(r),p.current){const N=ar(i._fields,r);N&&N._f&&(N._f.ref=p.current)}return()=>{(l?O&&!i._state.action:O)?i.unregister(r):I(r,!1)}},[r,i,l,a]),u.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),u.useMemo(()=>({field:P,formState:f,fieldState:_}),[P,f,_])}const tc=e=>e.render(T$t(e));var dp=()=>
353{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},SB=(e,t,r={})=>r.shouldFocus||ji(r.shouldFocus)?r.focusName||`${e}.${ji(r.focusIndex)?t:r.focusIndex}.`:"",Lp=e=>({isOnSubmit:!e||e===Dc.onSubmit,isOnBlur:e===Dc.onBlur,isOnChange:e===Dc.onChange,isOnAll:e===Dc.all,isOnTouch:e===Dc.onTouched}),yR=(e,t,r)=>{if(r)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===".")return!0;return!1};const r1=(e,t,r,n)=>{for(const i of r||Object.keys(e)){if(i==="_f")continue;const a=r?ar(e,i):e[i];if(a){const{_f:o}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(r1(a,t))break}else if((Da(a)||Array.isArray(a))&&r1(a,t))break}}};var r3=(e,t,r)=>{const n=ar(e,r),i=Array.isArray(n)?n:[];return bi(i,nke,t[r]),bi(e,r,i),e},Go=e=>Da(e)&&!Object.keys(e).length,n3=e=>{if(!J4)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},IY=e=>e.type==="radio",i3=e=>e instanceof RegExp,ake=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{};const mve={value:!1,isValid:!1},vve={value:!0,isValid:!0};var oke=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ji(e[0].attributes.value)?ji(e[0].value)||e[0].value===""?vve:{value:e[0].value,isValid:!0}:vve:mve}return mve};const gve={isValid:!1,value:null};var ske=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,gve):gve;function yve(e,t,r="validate"){if(ls(e)||Array.isArray(e)&&e.every(ls)||Tl(e)&&!e)return{type:r,message:ls(e)?e:"",ref:t}}var ay=e=>Da(e)&&!i3(e)?e:{value:e,message:""},nq=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:d,min:f,max:h,pattern:p,validate:g,name:_,valueAsNumber:b,mount:E}=e._f,S=ar(r,_);if(!E||t.has(_))return{};const P=s?s[0]:o,O=$=>{if(i&&P.reportValidity){const X=Tl($)?"":$||"";s?s.forEach(re=>re.setCustomValidity(X)):P.setCustomValidity(X),P.reportValidity()}},I={},N=IY(o),M=O2(o),F=N||M,B=(b||Q4(o))&&ji(o.value)&&ji(S)||n3(o)&&o.value===""||S===""||Array.isArray(S)&&!S.length,V=ake.bind(null,_,n,I),W=($,X,re,ae=pu.maxLength,Q=pu.minLength)=>{const ie=$?X:re;I[_]={type:$?ae:Q,message:ie,ref:o,...V($?ae:Q,ie)}};if(a?!Array.isArray(S)||!S.length:l&&(!F&&(B||ss(S))||Tl(S)&&!S||M&&!oke(s).isValid||N&&!ske(s).isValid)){const{value:$,message:X}=ls(l)?{value:!!l,message:l}:ay(l);if($&&(I[_]={type:pu.required,message:X,ref:P,...V(pu.required,X)},!n))return O(X),I}if(!B&&(!ss(f)||!ss(h))){let $,X;const re=ay(h),ae=ay(f);if(!ss(S)&&!isNaN(S)){const Q=o.valueAsNumber||S&&+S;ss(re.value)||($=Q>re.value),ss(ae.value)||(X=Q<ae.value)}else{const Q=o.valueAsDate||new Date(S),ie=de=>new Date(new Date().toDateString()+" "+de),le=o.type=="time",fe=o.type=="week";ls(re.value)&&S&&($=le?ie(S)>ie(re.value):fe?S>re.value:Q>new Date(re.value)),ls(ae.value)&&S&&(X=le?ie(S)<ie(ae.value):fe?S<ae.value:Q<new Date(ae.value))}if(($||X)&&(W(!!$,re.message,ae.message,pu.max,pu.min),!n))return O(I[_].message),I}if((c||d)&&!B&&(ls(S)||a&&Array.isArray(S))){const $=ay(c),X=ay(d),re=!ss($.value)&&S.length>+$.value,ae=!ss(X.value)&&S.length<+X.value;if((re||ae)&&(W(re,$.message,X.message),!n))return O(I[_].message),I}if(p&&!B&&ls(S)){const{value:$,message:X}=ay(p);if(i3($)&&!S.match($)&&(I[_]={type:pu.pattern,message:X,ref:o,...V(pu.pattern,X)},!n))return O(X),I}if(g){if(Ms(g)){const $=await g(S,r),X=yve($,P);if(X&&(I[_]={...X,...V(pu.validate,X.message)},!n))return O(X.message),I}else if(Da(g)){let $={};for(const X in g){if(!Go($)&&!n)break;const re=yve(await g[X](S,r),P,X);re&&($={...re,...V(X,re.message)},O(re.message),n&&(I[_]=$))}if(!Go($)&&(I[_]={ref:P,...$},!n))return I}}return O(!0),I},cc=e=>Array.isArray(e)?e:[e],CB=(e,t)=>[...e,...cc(t)],xB=e=>Array.isArray(e)?e.map(()=>{}):void 0;function TB(e,t,r){return[...e.slice(0,t),...cc(r),...e.slice(t)]}var AB=(e,t,r)=>Array.isArray(e)?(ji(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],PB=(e,t)=>[...cc(t),...cc(e)],kY=e=>Array.isArray(e)?e.filter(Boolean):[];function A$t(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return kY(n).length?n:[]}var RB=(e,t)=>ji(t)?[]:A$t(e,cc(t).sort((r,n)=>r-n)),OB=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function P$t(e,t){const r=t.length-1;let n=0;for(;n<r;){if(ss(e)){e=void 0;break}e=e[t[n]],n++}return e}function R$t(e){for(const t in e)if(e.hasOwnProperty(t)&&!ji(e[t]))return!1;return!0}function io(e,t){if(ls(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:I2(t)?[t]:ek(t);if(r.some(o=>RY.includes(String(o))))return e;const n=r.length===1?e:P$t(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Da(n)&&Go(n)||Array.isArray(n)&&R$t(n))&&io(e,r.slice(0,-1)),e}var _ve=(e,t,r)=>(e[t]=r,e);function Xrr(e){const t=tk(),{control:r=t,name:n,keyName:i="id",disabled:a,shouldUnregister:o,rules:s}=e,[l,c]=u.useState(r._getFieldArray(n)),d=u.useRef(r._getFieldArray(n).map(dp)),f=u.useRef(!1);a||r._names.array.add(n),u.useMemo(()=>!a&&s&&l.length>=0&&r.register(n,s),[r,n,l.length,s,a]),rk(()=>
353{if(!a)return r._subjects.array.subscribe({next:({values:I,name:N})=>{if(N===n||!N){const M=ar(I,n);Array.isArray(M)?(c(M),d.current=M.map(dp)):N||(c([]),d.current=[])}}}).unsubscribe},[r,n,a]);const h=u.useCallback(I=>{f.current=!0,r._setFieldArray(n,I)},[r,n]),p=(I,N)=>{if(a)return;const M=cc(Li(I)),F=CB(r._getFieldArray(n),M);r._names.focus=SB(n,F.length-1,N),d.current=CB(d.current,M.map(dp)),h(F),c(F),r._setFieldArray(n,F,CB,{argA:xB(I)})},g=(I,N)=>{if(a)return;const M=cc(Li(I)),F=PB(r._getFieldArray(n),M);r._names.focus=SB(n,0,N),d.current=PB(d.current,M.map(dp)),h(F),c(F),r._setFieldArray(n,F,PB,{argA:xB(I)})},_=I=>{if(a)return;const N=RB(r._getFieldArray(n),I);d.current=RB(d.current,I),h(N),c(N),!Array.isArray(ar(r._fields,n))&&bi(r._fields,n,void 0),r._setFieldArray(n,N,RB,{argA:I})},b=(I,N,M)=>{if(a)return;const F=cc(Li(N)),B=TB(r._getFieldArray(n),I,F);r._names.focus=SB(n,I,M),d.current=TB(d.current,I,F.map(dp)),h(B),c(B),r._setFieldArray(n,B,TB,{argA:I,argB:xB(N)})},E=(I,N)=>{if(a)return;const M=r._getFieldArray(n);OB(M,I,N),OB(d.current,I,N),h(M),c(M),r._setFieldArray(n,M,OB,{argA:I,argB:N},!1)},S=(I,N)=>{if(a)return;const M=r._getFieldArray(n);AB(M,I,N),AB(d.current,I,N),h(M),c(M),r._setFieldArray(n,M,AB,{argA:I,argB:N},!1)},P=(I,N)=>{if(a)return;const M=Li(N),F=_ve(r._getFieldArray(n),I,M);d.current=[...F].map((B,V)=>!B||V===I?dp():d.current[V]),h(F),c([...F]),r._setFieldArray(n,F,_ve,{argA:I,argB:M},!0,!1)},O=I=>{if(a)return;const N=cc(Li(I));d.current=N.map(dp),h([...N]),c([...N]),r._setFieldArray(n,[...N],M=>M,{},!0,!1)};return u.useEffect(()=>{if(a)return;r._state.action=!1,yR(n,r._names)&&r._subjects.state.next({...r._formState});const I=Lp(r._options.mode);if(f.current&&(!I.isOnSubmit||r._formState.isSubmitted)&&!Lp(r._options.reValidateMode).isOnSubmit&&!I.isOnBlur)if(r._options.resolver)r._runSchema([n]).then(N=>{var M,F;r._updateIsValidating([n]);const B=ar(N.errors,n),V=ar(r._formState.errors,n),W=V&&(V.type||((M=V.root)===null||M===void 0?void 0:M.type)),$=V&&(V.message||((F=V.root)===null||F===void 0?void 0:F.message));(V?!B&&W||B&&(W!==B.type||$!==B.message):B&&B.type)&&(B?Da(B)&&!Object.keys(B).some(X=>!Number.isNaN(+X))?r3(r._formState.errors,{[n]:B},n):bi(r._formState.errors,n,B):io(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const N=ar(r._fields,n);N&&N._f&&!(Lp(r._options.reValidateMode).isOnSubmit&&Lp(r._options.mode).isOnSubmit)&&nq(N,r._names.disabled,r._formValues,r._options.criteriaMode===Dc.all,r._options.shouldUseNativeValidation,!0).then(M=>!Go(M)&&r._subjects.state.next({errors:r3(r._formState.errors,M,n)}))}f.current&&r._subjects.state.next({name:n,values:Li(r._formValues)}),r._names.focus&&r1(r._fields,(N,M)=>{if(r._names.focus&&M.startsWith(r._names.focus)&&N.focus)return N.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[l,n,r,a]),u.useEffect(()=>(a||!ar(r._formValues,n)&&r._setFieldArray(n),()=>{if(a)return;const I=!(r._options.shouldUnregister||o),N=(M,F)=>{const B=ar(r._fields,M);B&&B._f&&(B._f.mount=F)};f.current&&I&&r._subjects.state.next({name:n,values:Li(r._formValues)}),I?N(n,!1):r.unregister(n)}),[n,r,i,o,a]),{swap:u.useCallback(E,[h,n,r,a]),move:u.useCallback(S,[h,n,r,a]),prepend:u.useCallback(g,[h,n,r,a]),append:u.useCallback(p,[h,n,r,a]),remove:u.useCallback(_,[h,n,r,a]),insert:u.useCallback(b,[h,n,r,a]),update:u.useCallback(P,[h,n,r,a]),replace:u.useCallback(O,[h,n,r,a]),fields:u.useMemo(()=>l.map((I,N)=>({...I,...Tl(a)?{disabled:a}:{},[i]:d.current[N]||dp()})),[l,i,a])}}const lke=e=>{const t={};for(const r of Object.keys(e))if(PY(e[r])&&e[r]!==null&&!Mp(e[r])){const n=lke(e[r]);for(const i of Object.keys(n))t[`${r}.${i}`]=n[i]}else t[r]=e[r];return t},NY=u.createContext(null);NY.displayName="HookFormContext";const Zrr=()=>u.useContext(NY),Qrr=({children:e,watch:t,getValues:r,getFieldState:n,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:l,formState:c,resetField:d,reset:f,resetDefaultValues:h,handleSubmit:p,unregister:g,control:_,register:b,setFocus:E,subscribe:S})=>{const P=u.useMemo(()=>({watch:t,getValues:r,getFieldState:n,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:l,formState:c,resetField:d,reset:f,resetDefaultValues:h,handleSubmit:p,unregister:g,control:_,register:b,setFocus:E,subscribe:S}),[a,_,c,n,r,p,b,f,h,d,i,E,o,s,S,l,g,t]);return u.createElement(NY.Provider,{value:P},u.createElement(OY.Provider,{value:P.control},e))};var bve=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function cke(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&Da(i)&&a){const o=cke(i,a);Da(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var uke=e=>e.type==="select-multiple",O$t=e=>IY(e)||O2(e),IB=e=>n3(e)&&e.isConnected;function Eve(e){return Array.isArray(e)||Da(e)}function dke(e,t,r="",n=[]){for(const i in e){const a=r?`${r}.${i}`:i,o=e[i];Eve(o)&&Eve(ar(t,a))?dke(o,t,a,n):n.push(a)}return n}var I$t=e=>{for(const t in e)if(Ms(e[t]))return!0;return!1};function fke(e){return Array.isArray(e)||Da(e)&&!I$t(e)}function hke(e){return!!(e&&"_f"in e)}function pke(e){return Array.isArray(e)?!e.some(t=>!ji(t)):!Object.keys(e).length}function iq(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function aq(e,t={},r){for(const n in e){const i=e[n],a=r&&r[n];fke(i)&&(!Array.isArray(i)||!hke(a))?(t[n]=Array.isArray(i)?[]:{},aq(i,t[n],a),pke(t[n])&&iq(t,n)):ji(i)||(t[n]=!0)}return t}function Cv(e,t,r,n){r||(r=aq(t,{},n));for(const i in e){const a=e[i],o=n&&n[i];fke(a)&&(!Array.isArray(a)||!hke(o))?(ji(t)||rq(r[i])?r[i]=aq(a,Array.isArray(a)?[]:{},o):Cv(a,ss(t)?{}:t[i],r[i],o),pke(r[i])&&iq(r,i)):nc(a,t[i])?iq(r,i):r[i]=!0}return r}var mke=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ji(e)?e:t?e===""?NaN:e&&+e:r&&ls(e)?new Date(e):n?n(e):e;function wve(e){const t=e.ref;return Q4(t)?t.files:IY(t)?ske(e.refs).value:uke(t)?[...t.selectedOptions].map(({value:r})=>r):O2(t)?oke(e.refs).value:mke(t.value,e)}var k$t=(e,t,r,n)=>{const i={};for(const a of e){const o=ar(t,a);o&&bi(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Tw=e=>ji(e)?e:i3(e)?e.source:Da(e)?i3(e.value)?e.value.source:e.value:e;const Sve="AsyncFunction";var N$t=e=>{if(!e||!e.validate)return!1;if(Ms(e.validate))return e.validate.constructor.name===Sve;if(Da(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Sve)return!0}return!1},D$t=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Cve(e,t,r){const n=ar(e,r);if(n||I2(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=ar(t,a),s=ar(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};
353if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var M$t=(e,t,r,n)=>{r(e);const i=Object.keys(e).filter(a=>a!=="name");return!i.length||n&&i.length>=Object.keys(t).length||i.find(a=>t[a]===(!n||Dc.all))},L$t=(e,t,r)=>!e||!t||e===t||cc(e).some(n=>n&&(r?n===t||n.startsWith(t+"."):n.startsWith(t)||t.startsWith(n))),F$t=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,B$t=(e,t)=>!kY(ar(e,t)).length&&io(e,t);const z$t={mode:Dc.onSubmit,reValidateMode:Dc.onChange,shouldFocusError:!0},kB="form",H$t=(e,t)=>{for(const r in e)r in t||delete e[r];Object.assign(e,t)},vke={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function U$t(e={}){let t={...z$t,...e},r={...Li(vke),isLoading:Ms(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},n={},i=Da(t.defaultValues)||Da(t.values)?Li(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Li(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const l={},c={};let d=0,f=Lp(t.mode),h=Lp(t.reValidateMode);const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={...p};let _={...g};const b={array:bve(),state:bve()};let E=0;const S=t.criteriaMode===Dc.all,P=(Ee,Oe)=>Re=>{clearTimeout(c[Ee]),c[Ee]=setTimeout(Oe,Re)},O=async Ee=>{if(!o.keepIsValid&&!t.disabled&&(g.isValid||_.isValid||Ee)){const Oe=++E;let Re;t.resolver?(Re=Go((await re()).errors),Oe===E&&I()):Re=await ie({fields:n,onlyCheckValid:!0,eventType:Ep.VALID}),Oe===E&&Re!==r.isValid&&b.state.next({isValid:Re})}},I=(Ee,Oe)=>{!t.disabled&&(g.isValidating||g.validatingFields||_.isValidating||_.validatingFields)&&((Ee||Array.from(s.mount)).forEach(Re=>{Re&&(Oe?bi(r.validatingFields,Re,Oe):io(r.validatingFields,Re))}),b.state.next({validatingFields:r.validatingFields,isValidating:!Go(r.validatingFields)}))},N=()=>{r.dirtyFields=Cv(i,a,void 0,n)},M=(Ee,Oe=[],Re,pt,mt=!0,st=!0)=>{if(pt&&Re&&!t.disabled){if(o.action=!0,st&&Array.isArray(ar(n,Ee))){const ze=Re(ar(n,Ee),pt.argA,pt.argB);mt&&bi(n,Ee,ze)}if(st&&Array.isArray(ar(r.errors,Ee))){const ze=Re(ar(r.errors,Ee),pt.argA,pt.argB);mt&&bi(r.errors,Ee,ze),B$t(r.errors,Ee)}if((g.touchedFields||_.touchedFields)&&st&&Array.isArray(ar(r.touchedFields,Ee))){const ze=Re(ar(r.touchedFields,Ee),pt.argA,pt.argB);mt&&bi(r.touchedFields,Ee,ze)}(g.dirtyFields||_.dirtyFields)&&N(),b.state.next({name:Ee,isDirty:fe(Ee,Oe),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else bi(a,Ee,Oe)},F=(Ee,Oe)=>{bi(r.errors,Ee,Oe),r.errors={...r.errors},b.state.next({errors:r.errors})},B=Ee=>{r.errors=Ee,b.state.next({errors:r.errors,isValid:!1})},V=Ee=>{const Oe=I2(Ee)?[Ee]:ek(Ee);let Re=a,pt=i;for(let mt=0;mt<Oe.length-1;mt++){const st=Oe[mt];if(Re=ss(Re)?Re:Re[st],pt=ss(pt)?pt:pt[st],Re===null&&pt!==null)return!0}return!1},W=(Ee,Oe,Re,pt)=>{const mt=ar(n,Ee);if(mt){if(V(Ee))return;const st=ji(ar(a,Ee)),ze=ar(a,Ee,ji(Re)?ar(i,Ee):Re);ji(ze)||pt&&pt.defaultChecked||Oe?bi(a,Ee,Oe?ze:wve(mt._f)):Ae(Ee,ze),o.mount&&!o.action&&(O(),st&&r.isDirty&&(g.isDirty||_.isDirty)&&(fe()||(r.isDirty=!1,b.state.next({...r}))),e.shouldUnregister&&st&&!ji(ar(a,Ee))&&yR(Ee,s)&&(o.watch=!0))}},$=(Ee,Oe,Re,pt,mt)=>{let st=!1,ze=!1;const it={name:Ee};if(!t.disabled||pt===!0){if(!Re||pt){const Je=nc(ar(i,Ee),Oe);(g.isDirty||_.isDirty)&&(ze=r.isDirty,r.isDirty=it.isDirty=!Je||fe(),st=ze!==it.isDirty),ze=!!ar(r.dirtyFields,Ee),Je!==r.isDirty?H$t(r.dirtyFields,Cv(i,a,void 0,n)):Je?io(r.dirtyFields,Ee):bi(r.dirtyFields,Ee,!0),it.dirtyFields=r.dirtyFields,st=st||(g.dirtyFields||_.dirtyFields)&&ze!==!Je}if(Re){const Je=ar(r.touchedFields,Ee);Je||(bi(r.touchedFields,Ee,Re),it.touchedFields=r.touchedFields,st=st||(g.touchedFields||_.touchedFields)&&Je!==Re)}st&&mt&&b.state.next(it)}return st?it:{}},X=(Ee,Oe,Re,pt)=>{const mt=ar(r.errors,Ee),st=(g.isValid||_.isValid)&&Tl(Oe)&&r.isValid!==Oe;if(t.delayError&&Re?(l[Ee]=P(Ee,()=>F(Ee,Re)),l[Ee](t.delayError)):(clearTimeout(c[Ee]),delete l[Ee],Re?bi(r.errors,Ee,Re):io(r.errors,Ee),r.errors={...r.errors}),(Re?!nc(mt,Re):mt)||!Go(pt)||st){const ze={...pt,...st&&Tl(Oe)?{isValid:Oe}:{},errors:r.errors,name:Ee};r={...r,...ze},b.state.next(ze)}},re=async Ee=>(I(Ee,!0),await t.resolver(a,t.context,k$t(Ee||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),ae=async Ee=>{const{errors:Oe}=await re(Ee);if(I(Ee),Ee){for(const Re of Ee){const pt=ar(Oe,Re);pt?s.array.has(Re)&&Da(pt)&&!Object.keys(pt).some(mt=>!Number.isNaN(Number(mt)))?r3(r.errors,{[Re]:pt},Re):bi(r.errors,Re,pt):io(r.errors,Re)}r.errors={...r.errors}}else r.errors=Oe;return Oe},Q=async({name:Ee,eventType:Oe})=>{if(e.validate){const Re=await e.validate({formValues:a,formState:r,name:Ee,eventType:Oe});if(Da(Re))for(const pt in Re){const mt=Re[pt];mt&&ut(`${kB}.${pt}`,{message:ls(mt.message)?mt.message:"",type:mt.type||pu.validate})}else ls(Re)||!Re?ut(kB,{message:Re||"",type:pu.validate}):Ue(kB);return Re}return!0},ie=async({fields:Ee,onlyCheckValid:Oe,name:Re,eventType:pt,context:mt={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(mt.runRootValidation=!0,!await Q({name:Re,eventType:pt})&&(mt.valid=!1,Oe)))return mt.valid;for(const st in Ee){const ze=Ee[st];if(ze){const{_f:it,...Je}=ze;if(it){const Jt=s.array.has(it.name),pr=ze._f&&N$t(ze._f),Fr=g.validatingFields||g.isValidating||_.validatingFields||_.isValidating;
353pr&&Fr&&I([it.name],!0);const Or=await nq(ze,s.disabled,a,S,t.shouldUseNativeValidation&&!Oe,Jt);if(pr&&Fr&&I([it.name]),Or[it.name]&&(mt.valid=!1,Oe)||(!Oe&&(ar(Or,it.name)?Jt?r3(r.errors,Or,it.name):bi(r.errors,it.name,Or[it.name]):io(r.errors,it.name)),e.shouldUseNativeValidation&&Or[it.name]))break}!Go(Je)&&await ie({context:mt,onlyCheckValid:Oe,fields:Je,name:st,eventType:pt})}}return mt.valid},le=()=>{for(const Ee of s.unMount){const Oe=ar(n,Ee);Oe&&(Oe._f.refs?Oe._f.refs.every(Re=>!IB(Re)):!IB(Oe._f.ref))&&Be(Ee)}s.unMount=new Set},fe=(Ee,Oe)=>(Ee&&Oe&&bi(a,Ee,Oe),!nc(o.mount?a:i,i)),de=(Ee,Oe,Re)=>tq(Ee,s,{...o.mount?a:ji(Oe)?i:ls(Ee)?{[Ee]:Oe}:Oe},Re,Oe),ge=Ee=>kY(ar(o.mount?a:i,Ee,t.shouldUnregister?ar(i,Ee,[]):[])),Ae=(Ee,Oe,Re={},pt=!1,mt=!1)=>{const st=ar(n,Ee);let ze=Oe;if(st){const it=st._f;it&&(!it.disabled&&bi(a,Ee,mke(Oe,it)),ze=n3(it.ref)&&ss(Oe)?"":Oe,uke(it.ref)?[...it.ref.options].forEach(Je=>Je.selected=ze.includes(Je.value)):it.refs?O2(it.ref)?it.refs.forEach(Je=>{(!Je.defaultChecked||!Je.disabled)&&(Array.isArray(ze)?Je.checked=!!ze.find(Jt=>Jt===Je.value):Je.checked=ze===Je.value||!!ze)}):it.refs.forEach(Je=>Je.checked=Je.value===ze):Q4(it.ref)?it.ref.value="":(it.ref.value=ze,!it.ref.type&&!mt&&b.state.next({name:Ee,values:pt?a:Li(a)})))}(Re.shouldDirty||Re.shouldTouch)&&$(Ee,ze,Re.shouldTouch,Re.shouldDirty,!mt),Re.shouldValidate&&Ve(Ee,{delayError:Re.delayError})},Fe=(Ee,Oe,Re,pt=!1,mt=!1)=>{s.array.has(Ee)&&b.array.next({name:Ee,values:pt?a:Li(a)});for(const st in Oe){if(!Oe.hasOwnProperty(st))return;const ze=Oe[st],it=Ee+"."+st,Je=ar(n,it);(s.array.has(Ee)||Da(ze)||Je&&!Je._f)&&!Mp(ze)?Fe(it,ze,Re,pt,mt):Ae(it,ze,Re,pt,mt)}},Pe=(Ee,Oe,Re,pt,mt=!1)=>{const st=ar(n,Ee),ze=s.array.has(Ee),it=pt?Oe:Li(Oe),Je=ar(a,Ee),Jt=nc(Je,it);if(Jt||bi(a,Ee,it),ze)b.array.next({name:Ee,values:pt?a:Li(a)}),(g.isDirty||g.dirtyFields||_.isDirty||_.dirtyFields)&&Re.shouldDirty&&(N(),mt||b.state.next({name:Ee,dirtyFields:r.dirtyFields,isDirty:fe(Ee,it)}));else{const pr=Array.isArray(it)&&!it.length||Go(it);!st||st._f||ss(it)||pr?Ae(Ee,it,Re,pt,mt):Fe(Ee,it,Re,pt,mt)}if(!Jt&&!mt){const pr=yR(Ee,s),Fr=pt?a:Li(a);b.state.next({...pr&&r,name:o.mount||pr?Ee:void 0,values:Fr})}},ce=(Ee,Oe,Re={})=>Pe(Ee,Oe,Re,!1),pe=(Ee,Oe={})=>{const Re=Ms(Ee)?Ee(a):Ee;if(!nc(a,Re)){a={...a,...Re};const pt=lke(Re);for(const mt of s.mount)mt in pt&&Pe(mt,pt[mt],Oe,!0,!0);b.state.next({...r,name:void 0,type:void 0,...d?{values:a}:{}}),Oe.shouldValidate&&O()}},Ne=async Ee=>{o.mount=!0;const Oe=Ee.target;let Re=Oe.name,pt=!0;const mt=ar(n,Re),st=ze=>{pt=Number.isNaN(ze)||Mp(ze)&&isNaN(ze.getTime())||nc(ze,ar(a,Re,ze))};if(mt){let ze,it;const Je=Oe.type?wve(mt._f):eq(Ee),Jt=Ee.type===Ep.BLUR||Ee.type===Ep.FOCUS_OUT,pr=!D$t(mt._f)&&!e.validate&&!t.resolver&&!ar(r.errors,Re)&&!mt._f.deps,Fr=pr||F$t(Jt,ar(r.touchedFields,Re),r.isSubmitted,h,f),Or=yR(Re,s,Jt);if(bi(a,Re,Je),Jt){if(!Oe||!Oe.readOnly){mt._f.onBlur&&mt._f.onBlur(Ee);const Xr=l[Re];Xr&&Xr(0)}}else mt._f.onChange&&mt._f.onChange(Ee);const vn=$(Re,Je,Jt),cn=!Go(vn)||Or;if(!Jt&&b.state.next({name:Re,type:Ee.type,...d?{values:Li(a)}:{}}),Fr)return(!pr||!r.isValid)&&(g.isValid||_.isValid)&&(t.mode==="onBlur"?Jt&&O():Jt||O()),cn&&b.state.next({name:Re,...Or?{}:vn});if(!t.resolver&&e.validate&&await Q({name:Re,eventType:Ee.type}),!Jt&&Or&&b.state.next({...r}),t.resolver){const{errors:Xr}=await re([Re]);if(I([Re]),st(Je),!pt){!Go(vn)&&b.state.next(vn);return}const Zr=Cve(r.errors,n,Re),fn=Cve(Xr,n,Zr.name||Re);ze=fn.error,Re=fn.name,it=Go(Xr)}else I([Re],!0),ze=(await nq(mt,s.disabled,a,S,t.shouldUseNativeValidation))[Re],I([Re]),st(Je),pt&&(ze?it=!1:(g.isValid||_.isValid)&&(it=await ie({fields:n,onlyCheckValid:!0,name:Re,eventType:Ee.type})));pt&&(mt._f.deps&&(!Array.isArray(mt._f.deps)||mt._f.deps.length>0)&&Ve(mt._f.deps),X(Re,it,ze,vn))}},De=(Ee,Oe)=>{if(ar(r.errors,Oe)&&Ee.focus)return Ee.focus(),1},Ve=async(Ee,Oe={})=>{let Re,pt;const mt=cc(Ee);if(t.resolver){const st=await ae(ji(Ee)?Ee:mt);Re=Go(st),pt=Ee?!mt.some(ze=>ar(st,ze)):Re}else Ee?(pt=(await Promise.all(mt.map(async st=>{const ze=ar(n,st);return await ie({fields:ze&&ze._f?{[st]:ze}:ze,eventType:Ep.TRIGGER})}))).every(Boolean),!(!pt&&!r.isValid)&&O()):pt=Re=await ie({fields:n,name:Ee,eventType:Ep.TRIGGER});if(Oe.delayError&&t.delayError&&ls(Ee)){const st=ar(r.errors,Ee);st?(io(r.errors,Ee),l[Ee]=P(Ee,()=>F(Ee,st)),l[Ee](t.delayError)):(clearTimeout(c[Ee]),delete l[Ee])}return b.state.next({...!ls(Ee)||(g.isValid||_.isValid)&&Re!==r.isValid?{}:{name:Ee},...t.resolver||!Ee?{isValid:Re}:{},errors:r.errors}),Oe.shouldFocus&&!pt&&r1(n,De,Ee?mt:s.mount),pt},Ke=(Ee,Oe)=>{let Re={...o.mount?a:i};return Oe&&(Re=cke(Oe.dirtyFields?r.dirtyFields:r.touchedFields,Re)),ji(Ee)?Re:ls(Ee)?ar(Re,Ee):Ee.map(pt=>ar(Re,pt))},Qe=(Ee,Oe)=>({invalid:!!ar((Oe||r).errors,Ee),isDirty:!!ar((Oe||r).dirtyFields,Ee),error:ar((Oe||r).errors,Ee),isValidating:!!ar(r.validatingFields,Ee),isTouched:!!ar((Oe||r).touchedFields,Ee)}),Ue=Ee=>{const Oe=Ee?cc(Ee):void 0;Oe?.forEach(Re=>io(r.errors,Re)),Oe?Oe.forEach(Re=>{b.state.next({name:Re,errors:r.errors})}):(r.errors={},b.state.next({errors:r.errors}))},ut=(Ee,Oe,Re)=>{const pt=(ar(n,Ee,{_f:{}})._f||{}).ref,mt=ar(r.errors,Ee)||{},{ref:st,message:ze,type:it,...Je}=mt;bi(r.errors,Ee,{...Je,...Oe,ref:pt}),b.state.next({name:Ee,errors:r.errors,isValid:!1}),Re&&Re.shouldFocus&&pt&&pt.focus&&pt.focus()},We=(Ee,Oe)=>{if(Ms(Ee)){d++;const{unsubscribe:Re}=b.state.subscribe({next:mt=>"values"in mt&&Ee(mt.values||de(void 0,Oe),mt)});let pt=!1;return{unsubscribe:()=>{pt||(pt=!0,d--,Re())}}}return de(Ee,Oe,!0)},ke=Ee=>{var Oe;const Re=!!(!((Oe=Ee.formState)===null||Oe===void 0)&&Oe.values);Re&&d++;const{unsubscribe:pt}=b.state.subscribe({next:st=>{if(L$t(Ee.name,st.name,Ee.exact)&&M$t(st,Ee.formState||g,tr,Ee.reRenderRoot)){const ze={...a};Ee.callback({values:ze,...r,...st,defaultValues:i})}}});if(!Re)return pt;let mt=!1;return()=>{mt||(mt=!0,d--,pt())}},Le=Ee=>(o.mount=!0,_={..._,...Ee.formState},ke({...Ee,formState:{...p,...Ee.formState}})),Be=(Ee,Oe={})=>{for(const Re of Ee?cc(Ee):s.mount)s.mount.delete(Re),s.array.delete(Re),Oe.keepValue||(io(n,Re),io(a,Re)),!Oe.keepError&&io(r.errors,Re),!Oe.keepDirty&&io(r.dirtyFields,Re),!Oe.keepTouched&&io(r.touchedFields,Re),!Oe.keepIsValidating&&io(r.validatingFields,Re),!t.shouldUnregister&&!Oe.keepDefaultValue&&io(i,Re);b.state.next({values:Li(a)}),b.state.next({...r,...Oe.keepDirty?{isDirty:fe()}:{}}),!Oe.keepIsValid&&O()}
vendor: 4,451 bytes, line 353
353,Ze=({disabled:Ee,name:Oe})=>{if(Tl(Ee)&&o.mount||Ee||s.disabled.has(Oe)){const mt=s.disabled.has(Oe)!==!!Ee;Ee?s.disabled.add(Oe):s.disabled.delete(Oe),mt&&o.mount&&!o.action&&O()}},Et=(Ee,Oe={})=>{let Re=ar(n,Ee);const pt=Tl(Oe.disabled)||Tl(t.disabled),mt=!s.registerName.has(Ee)&&Re&&Re._f&&!Re._f.mount;return bi(n,Ee,{...Re||{},_f:{...Re&&Re._f?Re._f:{ref:{name:Ee}},name:Ee,mount:!0,...Oe}}),s.mount.add(Ee),Re&&!mt?Ze({disabled:Tl(Oe.disabled)?Oe.disabled:t.disabled,name:Ee}):W(Ee,!0,Oe.value),{...pt?{disabled:Oe.disabled||t.disabled}:{},...t.progressive?{required:!!Oe.required,min:Tw(Oe.min),max:Tw(Oe.max),minLength:Tw(Oe.minLength),maxLength:Tw(Oe.maxLength),pattern:Tw(Oe.pattern)}:{},name:Ee,onChange:Ne,onBlur:Ne,ref:st=>{if(st){s.registerName.add(Ee),Et(Ee,Oe),s.registerName.delete(Ee),Re=ar(n,Ee);const ze=ji(st.value)&&st.querySelectorAll&&st.querySelectorAll("input,select,textarea")[0]||st,it=O$t(ze),Je=Re._f.refs||[];if(it?Je.find(pr=>pr===ze):ze===Re._f.ref)return;const Jt={...Re._f};it?(Jt.refs=[...Je.filter(IB),ze,...Array.isArray(ar(i,Ee))?[{}]:[]],Jt.ref={type:ze.type,name:Ee}):(Jt.ref=ze,delete Jt.refs),bi(n,Ee,{_f:Jt}),W(Ee,!1,void 0,ze)}else Re=ar(n,Ee,{}),Re._f&&(Re._f.mount=!1),(t.shouldUnregister||Oe.shouldUnregister)&&!(tke(s.array,Ee)&&o.action)&&s.unMount.add(Ee)}}},Yt=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&r1(n,De,s.mount),sr=Ee=>{Tl(Ee)&&(b.state.next({disabled:Ee}),r1(n,(Oe,Re)=>{const pt=ar(n,Re);pt&&(Oe.disabled=pt._f.disabled||Ee,Array.isArray(pt._f.refs)&&pt._f.refs.forEach(mt=>{mt.disabled=pt._f.disabled||Ee}))},0,!1))},Kt=(Ee,Oe)=>async Re=>{let pt,mt;Re&&(Re.preventDefault&&Re.preventDefault(),Re.persist&&Re.persist());let st=Li(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:ze,values:it}=await re();I(),r.errors=ze,st=Li(it)}else await ie({fields:n,eventType:Ep.SUBMIT});if(s.disabled.size)for(const ze of s.disabled)io(st,ze);if(io(r.errors,nke),Go(r.errors)){b.state.next({errors:{}});try{pt=await Ee(st,Re)}catch(ze){mt=ze}}else Oe&&await Oe({...r.errors},Re),Yt(),setTimeout(Yt);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Go(r.errors)&&!mt,submitCount:r.submitCount+1,errors:r.errors}),mt)throw mt;return pt},Qt=(Ee,Oe={})=>{ar(n,Ee)&&(ji(Oe.defaultValue)?ce(Ee,Li(ar(i,Ee))):(ce(Ee,Oe.defaultValue),bi(i,Ee,Li(Oe.defaultValue))),Oe.keepTouched||io(r.touchedFields,Ee),Oe.keepDirty||(io(r.dirtyFields,Ee),r.isDirty=Oe.defaultValue?fe(Ee,Li(ar(i,Ee))):fe()),Oe.keepError||(io(r.errors,Ee),g.isValid&&O()),b.state.next({...r}))},qt=(Ee,Oe={})=>{const Re=Ee?Li(Ee):i,pt=Li(Re),mt=Go(Ee),st=pt,ze=n;if(Oe.keepDefaultValues||(i=Re),!Oe.keepValues){if(Oe.keepDirtyValues){const it=new Set([...s.mount,...dke(Cv(i,a,void 0,ze),r.dirtyFields)]);for(const Je of Array.from(it)){const Jt=ar(r.dirtyFields,Je),pr=ar(a,Je),Fr=ar(st,Je);Jt&&!ji(pr)?bi(st,Je,pr):!Jt&&!ji(Fr)&&ce(Je,Fr)}}else{if(J4&&ji(Ee))for(const it of s.mount){const Je=ar(n,it);if(Je&&Je._f){const Jt=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(n3(Jt)){const pr=Jt.closest("form");if(pr){pr.reset();break}}}}if(Oe.keepFieldsRef)for(const it of s.mount)ce(it,ar(st,it));else n={}}if(t.shouldUnregister){if(a=Oe.keepDefaultValues?Li(i):{},Oe.keepFieldsRef)for(const it of s.mount)bi(a,it,ar(st,it))}else a=Li(st);b.array.next({values:{...st}}),b.state.next({name:void 0,type:void 0,values:{...st}})}s={mount:Oe.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!g.isValid||!!Oe.keepIsValid||!!Oe.keepDirtyValues||!t.shouldUnregister&&!Go(st),o.watch=!!t.shouldUnregister,o.keepIsValid=!!Oe.keepIsValid,o.action=!1,Oe.keepErrors||(r.errors={}),b.state.next({submitCount:Oe.keepSubmitCount?r.submitCount:0,isDirty:mt?!1:Oe.keepDirty?r.isDirty:Oe.keepValues?fe():!!(Oe.keepDefaultValues&&!nc(Ee,i)),isSubmitted:Oe.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:mt?{}:Oe.keepDirtyValues?Oe.keepDefaultValues&&a?Cv(i,a,void 0,ze):r.dirtyFields:Oe.keepDefaultValues&&Ee?Cv(i,Ee,void 0,ze):Oe.keepDirty?r.dirtyFields:{},touchedFields:Oe.keepTouched?r.touchedFields:{},errors:Oe.keepErrors?r.errors:{},isSubmitSuccessful:Oe.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},hr=(Ee,Oe)=>qt(Ms(Ee)?Ee(a):Ee,{...t.resetOptions,...Oe}),rr=(Ee,Oe={})=>{const Re=ar(n,Ee),pt=Re&&Re._f;if(pt){const mt=pt.refs?pt.refs[0]:pt.ref;mt.focus&&setTimeout(()=>
353{mt.focus(),Oe.shouldSelect&&Ms(mt.select)&&mt.select()})}},tr=Ee=>{const{name:Oe,type:Re,values:pt,...mt}=Ee;r={...r,...mt}},nr={control:{register:Et,unregister:Be,getFieldState:Qe,handleSubmit:Kt,setError:ut,_subscribe:ke,_runSchema:re,_updateIsValidating:I,_focusError:Yt,_getWatch:de,_getDirty:fe,_setValid:O,_setFieldArray:M,_setDisabledField:Ze,_setErrors:B,_getFieldArray:ge,_reset:qt,_resetDefaultValues:()=>Ms(t.defaultValues)&&t.defaultValues().then(Ee=>{hr(Ee,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:le,_disableForm:sr,_subjects:b,_proxyFormState:g,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(Ee){o=Ee},get _defaultValues(){return i},get _names(){return s},set _names(Ee){s=Ee},get _formState(){return r},get _options(){return t},set _options(Ee){t={...t,...Ee},f=Lp(t.mode),h=Lp(t.reValidateMode)}},subscribe:Le,trigger:Ve,register:Et,handleSubmit:Kt,watch:We,setValue:ce,setValues:pe,getValues:Ke,reset:hr,resetField:Qt,resetDefaultValues:(Ee,Oe={})=>{if(i=Li(Ee),!Oe.keepDirty){const Re=Cv(i,a,void 0,n);r.dirtyFields=Re,r.isDirty=!Go(Re)}Oe.keepIsValid||O(),b.state.next({...r,defaultValues:i})},clearErrors:Ue,unregister:Be,setError:ut,setFocus:rr,getFieldState:Qe};return{...nr,formControl:nr}}function gke(e={}){const t=u.useRef(void 0),r=u.useRef(void 0),n=u.useRef(e.formControl),[i,a]=u.useState(()=>({...Li(vke),isLoading:Ms(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ms(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&n.current!==e.formControl)if(n.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Ms(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...l}=U$t(e);t.current={...l,formState:i}}const o=t.current.control;return o._options=e,rk(()=>{const s=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),o._formState.isReady=!0,s},[o]),u.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),u.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),u.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),u.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),u.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==i.isDirty&&o._subjects.state.next({isDirty:s})}},[o,i.isDirty]),u.useEffect(()=>{var s;e.values&&!nc(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((s=o._options.resetOptions)===null||s===void 0)&&s.keepIsValid||o._setValid(),r.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),u.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=u.useMemo(()=>ike(i,o),[o,i]),t.current}const xve=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ar(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},yke=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?xve(n.ref,r,e):n.refs&&n.refs.forEach(i=>xve(i,r,e))}},V$t=(e,t)=>{t.shouldUseNativeValidation&&yke(e,t);const r={};for(const n in e){const i=ar(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(q$t(t.names||Object.keys(e),n)){const o=Object.assign({},ar(r,n));bi(o,"root",a),bi(r,n,o)}else bi(r,n,a)}return r},q$t=(e,t)=>e.some(r=>r.startsWith(t+"."));function _ke(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve((function(o,s){try{var l=(t.context,Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(c){return a.shouldUseNativeValidation&&yke({},a),{values:r.raw?n:c,errors:{}}}))}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l}
353)(0,function(o){if(!o.inner)throw o;return{values:{},errors:V$t((s=o,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(c,d){if(c[d.path]||(c[d.path]={message:d.message,type:d.type}),l){var f=c[d.path].types,h=f&&f[d.type];c[d.path]=ake(d.path,l,c,d.type,h?[].concat(h,d.message):d.message)}return c},{})),a)};var s,l}))}catch(o){return Promise.reject(o)}}}var NB,Tve;function j$t(){if(Tve)return NB;Tve=1;function e(E){this._maxSize=E,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(E){return this._values[E]},e.prototype.set=function(E,S){return this._size>=this._maxSize&&this.clear(),E in this._values||this._size++,this._values[E]=S};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),l=new e(o),c=new e(o);NB={Cache:e,split:f,normalizePath:d,setter:function(E){var S=d(E);return l.get(E)||l.set(E,function(O,I){for(var N=0,M=S.length,F=O;N<M-1;){var B=S[N];if(B==="__proto__"||B==="constructor"||B==="prototype")return O;F=F[S[N++]]}F[S[N]]=I})},getter:function(E,S){var P=d(E);return c.get(E)||c.set(E,function(I){for(var N=0,M=P.length;N<M;)if(I!=null||!S)I=I[P[N++]];else return;return I})},join:function(E){return E.reduce(function(S,P){return S+(p(P)||r.test(P)?"["+P+"]":(S?".":"")+P)},"")},forEach:function(E,S,P){h(Array.isArray(E)?E:f(E),S,P)}};function d(E){return s.get(E)||s.set(E,f(E).map(function(S){return S.replace(a,"$2")}))}function f(E){return E.match(t)||[""]}function h(E,S,P){var O=E.length,I,N,M,F;for(N=0;N<O;N++)I=E[N],I&&(b(I)&&(I='"'+I+'"'),F=p(I),M=!F&&/^\d+$/.test(I),S.call(P,I,F,M,N,E))}function p(E){return typeof E=="string"&&E&&["'",'"'].indexOf(E.charAt(0))!==-1}function g(E){return E.match(n)&&!E.match(r)}function _(E){return i.test(E)}function b(E){return!p(E)&&(g(E)||_(E))}return NB}var ag=j$t(),DB,Ave;function $$t(){if(Ave)return DB;Ave=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=d=>d.match(e)||[],r=d=>d[0].toUpperCase()+d.slice(1),n=(d,f)=>t(d).join(f).toLowerCase(),i=d=>t(d).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return DB={words:t,upperFirst:r,camelCase:i,pascalCase:d=>r(i(d)),snakeCase:d=>n(d,"_"),kebabCase:d=>n(d,"-"),sentenceCase:d=>r(n(d," ")),titleCase:d=>t(d).map(r).join(" ")},DB}var MB=$$t(),fP={exports:{}},Pve;function W$t(){if(Pve)return fP.exports;Pve=1,fP.exports=function(i){return e(t(i),i)},fP.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),l={},c=o,d=r(a),f=n(i);
353for(a.forEach(function(p){if(!f.has(p[0])||!f.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||h(i[c],c,new Set);return s;function h(p,g,_){if(_.has(p)){var b;try{b=", node was:"+JSON.stringify(p)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!f.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!l[g]){l[g]=!0;var E=d.get(p)||new Set;if(E=Array.from(E),g=E.length){_.add(p);do{var S=E[--g];h(S,f.get(S),_)}while(g);_.delete(p)}s[--o]=p}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var l=i[o];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var l=i[o];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return fP.exports}var G$t=W$t();const K$t=et(G$t),Y$t=Object.prototype.toString,X$t=Error.prototype.toString,Z$t=RegExp.prototype.toString,Q$t=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",J$t=/^Symbol\((.*)\)(.*)$/;function eWt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Rve(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return eWt(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Q$t.call(e).replace(J$t,"Symbol($1)");const n=Y$t.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+X$t.call(e)+"]":n==="RegExp"?Z$t.call(e):null}function eh(e,t){let r=Rve(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Rve(this[n],t);return a!==null?a:i},2)}function bke(e){return e==null?[]:[].concat(e)}let Eke,wke,Ske,tWt=/\$\{\s*(\w+)\s*\}/g;Eke=Symbol.toStringTag;class Ove{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Eke]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],bke(t).forEach(a=>{if(el.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}wke=Symbol.hasInstance;Ske=Symbol.toStringTag;class el extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(tWt,(i,a)=>eh(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new Ove(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ske]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,el)}static[wke](t){return Ove[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let dd={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${eh(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${eh(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${eh(r,!0)}\``+i}},El={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},mp={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},oq={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},sq={isValue:"${path} field must be ${value}"},_R={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path}
353 object contains unknown properties: ${properties}"},bR={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},rWt={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${eh(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${eh(r,!0)}\``}return el.formatError(dd.notType,e)}};Object.assign(Object.create(null),{mixed:dd,string:El,number:mp,date:oq,object:_R,array:bR,boolean:sq,tuple:rWt});const nk=e=>e&&e.__isYupSchema__;class a3{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new a3(t,(s,l)=>{var c;let d=o(...s)?i:a;return(c=d?.(l))!=null?c:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r?.value,r?.parent,r?.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!nk(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const hP={context:"$",value:"."};function Jrr(e,t){return new Vm(e,t)}class Vm{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===hP.context,this.isValue=this.key[0]===hP.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?hP.context:this.isValue?hP.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&ag.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Vm.prototype.__isYupRef=!0;const Iu=e=>e==null;function oy(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:c,test:d,params:f,message:h,skipAbsent:p}=e;let{parent:g,context:_,abortEarly:b=o.spec.abortEarly,disableStackTrace:E=o.spec.disableStackTrace}=i;const S={value:r,parent:g,context:_};function P(W={}){const $=Cke(Object.assign({value:r,originalValue:a,label:o.spec.label,path:W.path||n,spec:o.spec,disableStackTrace:W.disableStackTrace||E},f,W.params),S),X=new el(el.formatError(W.message||h,$),r,$.path,W.type||c,$.disableStackTrace);return X.params=$,X}const O=b?s:l;let I={path:n,parent:g,type:c,from:i.from,createError:P,resolve(W){return xke(W,S)},options:i,originalValue:a,schema:o};const N=W=>{el.isError(W)?O(W):W?l(null):O(P())},M=W=>{el.isError(W)?O(W):s(W)};if(p&&Iu(r))return N(!0);let B;try{var V;if(B=d.call(I,r,I),typeof((V=B)==null?void 0:V.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${I.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(B).then(N,M)}}catch(W){M(W);return}N(B)}return t.OPTIONS=e,t}function Cke(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=xke(e[r],t);return e}function xke(e,t){return Vm.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function nWt(e,t,r,n=r){let i,a,o;return t?(ag.forEach(t,(s,l,c)=>{let d=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",h=c?parseInt(d,10):0;if(e.innerType||f){if(f&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[d],e=e.fields[d]}a=d,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class o3 extends Set{describe(){const t=[];for(const r of this.values())t.push(Vm.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new o3(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>
353n.add(i)),r.forEach(i=>n.delete(i)),n}}function Ny(e,t=new Map){if(nk(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Ny(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Ny(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Ny(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Ny(i,t)}else throw Error(`Unable to clone ${e}`);return r}function iWt(e){if(!(e!=null&&e.length))return;const t=[];let r="",n=!1,i=!1;for(let a=0;a<e.length;a++){const o=e[a];if(o==="["&&!i){r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(o==="]"&&!i){r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(o==='"'){i=!i;continue}if(o==="."&&!n&&!i){r&&(t.push(r),r="");continue}r+=o}return r&&t.push(...r.split(".").filter(Boolean)),t}function aWt(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(n=>({message:n,path:iWt(r)}))}function Tke(e,t){var r;if(!((r=e.inner)!=null&&r.length)&&e.errors.length)return aWt(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(i=>Tke(i,n))}class Dl{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new o3,this._blacklist=new o3,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(dd.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Ny(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({},r,{value:t})),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Iu(a))return a;let o=eh(t),s=eh(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". 
354
355attempted value: ${o} 
356`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this,r),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:a,value:l,originalValue:o,options:r,tests:c},n,d=>{if(d.length)return i(d,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:c}=t,d=_=>{i||(i=!0,r(_,o))},f=_=>{i||(i=!0,n(_,o))},h=a.length,p=[];if(!h)return f([]);let g={value:o,originalValue:s,path:l,options:c,schema:this};for(let _=0;_<a.length;_++){const b=a[_];b(g,d,function(S){S&&(Array.isArray(S)?p.push(...S):p.push(S)),--h<=0&&f(p)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;
356if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let c=n[s];const d=Object.assign({},o,{strict:!0,parent:n,value:c,originalValue:a[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(f,h,p)=>this.resolve(d)._validate(c,d,h,p)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,c)=>{el.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new el(l,c,void 0,void 0,a)):o(c)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw el.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new el(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(el.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(el.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Ny(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=oy({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=oy({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=dd.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=dd.notNull){return this.nullability(!1,t)}required(t=dd.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=dd.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=oy(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=bke(t).map(a=>new Vm(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new a3(i,r):a3.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=oy({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=dd.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=oy({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=dd.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=oy({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),t
356ype:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((l,c,d)=>d.findIndex(f=>f.OPTIONS.name===l.OPTIONS.name)===c).map(l=>{const c=l.OPTIONS.params&&t?Cke(Object.assign({},l.OPTIONS.params),t):l.OPTIONS.params;return{name:l.OPTIONS.name,params:c}})}}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(i){if(i instanceof el)return{issues:Tke(i)};throw i}}}}}Dl.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Dl.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=nWt(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Dl.prototype[e]=Dl.prototype.oneOf;for(const e of["not","nope"])Dl.prototype[e]=Dl.prototype.notOneOf;const oWt=()=>!0;function sWt(e){return new Ake(e)}class Ake extends Dl{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:oWt},t))}}sWt.prototype=Ake.prototype;function lWt(){return new Pke}class Pke extends Dl{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r)=>{if(this.spec.coerce&&!this.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=sq.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Iu(r)||r===!0}})}isFalse(t=sq.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Iu(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}lWt.prototype=Pke.prototype;const cWt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function uWt(e){const t=lq(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function lq(e){var t,r;const n=cWt.exec(e);return n?{year:bf(n[1]),month:bf(n[2],1)-1,day:bf(n[3],1),hour:bf(n[4]),minute:bf(n[5]),second:bf(n[6]),millisecond:n[7]?bf(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:bf(n[10]),minuteOffset:bf(n[11])}:null}function bf(e,t=0){return Number(e)||t}let dWt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fWt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,hWt=/^(?:[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,pWt="^\\d{4}-\\d{2}-\\d{2}",mWt="\\d{2}:\\d{2}:\\d{2}
356",vWt="(([+-]\\d{2}(:?\\d{2})?)|Z)",gWt=new RegExp(`${pWt}T${mWt}(\\.\\d+)?${vWt}$`),yWt=e=>Iu(e)||e===e.trim(),_Wt={}.toString();function ud(){return new Rke}class Rke extends Dl{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce||this.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===_Wt?t:n})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||dd.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=El.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=El.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=El.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||El.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=El.email){return this.matches(dWt,{name:"email",message:t,excludeEmptyString:!0})}url(t=El.url){return this.matches(fWt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=El.uuid){return this.matches(hWt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(gWt,{name:"datetime",message:r||El.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||El.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=lq(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||El.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=lq(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=El.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:yWt})}lowercase(t=El.lowercase){return this.transform(r=>Iu(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Iu(r)||r===r.toLowerCase()})}uppercase(t=El.uppercase){return this.transform(r=>Iu(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Iu(r)||r===r.toUpperCase()})}}ud.prototype=Rke.prototype;let bWt=e=>e!=+e;function rS(){return new Oke}class Oke extends Dl{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!bWt(t)}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)||n===null?n:parseFloat(n)})})}min(t,r=mp.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=mp.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=mp.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=mp.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=mp.positive){return this.moreThan(0,t)}negative(t=mp.negative){return this.lessThan(0,t)}integer(t=mp.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Iu(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for roun
356d() are: "+n.join(", "));return this.transform(i=>Iu(i)?i:Math[t](i))}}rS.prototype=Oke.prototype;let Ike=new Date(""),EWt=e=>Object.prototype.toString.call(e)==="[object Date]";function kke(){return new k2}class k2 extends Dl{constructor(){super({type:"date",check(t){return EWt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r)=>!this.spec.coerce||this.isType(t)||t===null?t:(t=uWt(t),isNaN(t)?k2.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Vm.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=oq.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=oq.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}k2.INVALID_DATE=Ike;kke.prototype=k2.prototype;kke.INVALID_DATE=Ike;function wWt(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=ag.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Vm.isRef(s)&&s.isSibling?a(s.path,o):nk(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return K$t.array(Array.from(n),r).reverse()}function Ive(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function Nke(e){return(t,r)=>Ive(e,t)-Ive(e,r)}const Dke=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function ER(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=ER(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ER(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ER)}):"optional"in e?e.optional():e}const SWt=(e,t)=>{const r=[...ag.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=ag.getter(ag.join(r),!0)(e);return!!(i&&n in i)};let kve=e=>Object.prototype.toString.call(e)==="[object Object]";function Nve(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const CWt=Nke([]);function DY(e){return new Mke(e)}class Mke extends Dl{constructor(t){super({type:"object",check(r){return kve(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=CWt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),l={},c=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),d=!1;for(const f of s){let h=a[f],p=f in i,g=i[f];if(h){let _;c.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:l});let b=h instanceof Dl?h.spec:void 0,E=b?.strict;if(b!=null&&b.strip){d=d||f in i;continue}_=!r.__validating||!E?h.cast(g,c):g,_!==void 0&&(l[f]=_)}else p&&!o&&(l[f]=g);(p!==f in l||l[f]!==g)&&(d=!0)}return d?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,c)=>{if(!s||!kve(c)){i(l,c);return}o=o||c;let d=[];for(let f of this._nodes){let h=this.fields[f];!h||Vm.isRef(h)||d.push(h.asNestedTest({options:r,key:f,parent:c,parentPath:r.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:r},n,f=>{i(f.sort(this._sortErrors).concat(l),c)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};
356return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=wWt(t,r),n._sortErrors=Nke(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return ER(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=ag.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return SWt(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Dke)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||_R.exact,test(r){if(r==null)return!0;const n=Nve(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=_R.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Nve(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=_R.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(MB.camelCase)}snakeCase(){return this.transformKeys(MB.snakeCase)}constantCase(){return this.transformKeys(t=>MB.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}DY.prototype=Mke.prototype;function xWt(e){return new Lke(e)}class Lke extends Dl{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const a=n.map((o,s)=>{const l=this.innerType.cast(o,Object.assign({},r,{path:`${r.path||""}[${s}]`,parent:n,originalValue:o,value:o,index:s}));return l!==o&&(i=!0),l});return i?a:n}_validate(t,r={},n,i){var a;let o=this.innerType,s=(a=r.recursive)!=null?a:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,c)=>{var d;if(!s||!o||!this._typeCheck(c)){i(l,c);return}let f=new Array(c.length);for(let p=0;p<c.length;p++){var h;f[p]=o.asNestedTest({options:r,index:p,parent:c,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:c,tests:f,originalValue:(d=r.originalValue)!=null?d:t,options:r},n,p=>i(p.concat(l),c))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Dke)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!nk(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+eh(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=bR.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||bR.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||bR.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,i,a)=>!t(n,i,a):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var i;let a=t;
356(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),n.innerType=r.innerType.describe(a)}return n}}xWt.prototype=Lke.prototype;function TWt(e,t){return t?typeof t=="string"?t.replace(/\D/g,""):t:""}const s3=DY().shape({zip_code:ud().transform(TWt).length(8,"O CEP deve ter 8 dígitos").required("Você deve informar o CEP"),street:ud().trim().max(50,"No máximo 50 caracteres").required("Você deve informar a endereço"),house_number:ud().trim().required("Você deve informar o número"),neighborhood:ud().trim().max(50,"No máximo 50 caracteres").required("Você deve informar o bairro"),address_complement:ud().trim().max(50,"No máximo 50 caracteres").optional().nullable(),landmark:ud().trim().max(70,"No máximo 70 caracteres").optional().nullable(),city:ud().trim().min(2,"No mínimo 2 caracteres").max(50,"No máximo 50 caracteres").required("Você deve informar o Cidade"),state:ud().trim().oneOf(eUt,"Informe um estado válido").uppercase().required("Você deve informar o estado")}),Dve={zip_code:"",street:"",house_number:"",neighborhood:"",address_complement:"",landmark:"",city:"",state:""};function Fke({open:e,onClose:t,afterSubmit:r}){const n=Lr(),{order:i}=gi(),{mutate:a}=di(),[o,s]=u.useState(!1),{handleSubmit:l,reset:c,formState:d,control:f}=gke({mode:"onSubmit",defaultValues:Dve,resolver:_ke(s3)});u.useEffect(()=>{e&&i&&c(qc(i?.delivery_address,Object.keys(Dve)))},[e,i,c]);const h=u.useCallback(async g=>{s(!0);try{const _={delivery_address:g},b=await jIe(i?.id,_);a(qn(i?.id),b,{revalidate:!1}),r&&r(),t()}catch(_){n.error(_.response?.data?.message||"Não foi possível atualizar a endereço de entrega")}s(!1)},[r,n,a,t,i?.id]),{errors:p}=d;return u.createElement(oi,{open:e,title:"Completar endereço de entrega",loading:o,onClose:t,onSubmit:l(h)},u.createElement("div",{className:"space-y-20"},u.createElement(tc,{name:"zip_code",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"zip_code",label:"CEP",error:!!p.zip_code,helperText:p?.zip_code?.message,InputProps:{inputComponent:lIe},variant:"outlined",autoFocus:!0,fullWidth:!0,required:!0})}),u.createElement("div",{className:"flex space-x-12"},u.createElement(tc,{name:"street",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"street",label:"Endereço",error:!!p.street,helperText:p?.street?.message,variant:"outlined",fullWidth:!0,required:!0})}),u.createElement(tc,{name:"house_number",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"house_number",label:"Número",error:!!p.house_number,helperText:p?.house_number?.message,variant:"outlined",className:"w-128",required:!0})})),u.createElement("div",{className:"flex space-x-12"},u.createElement(tc,{name:"neighborhood",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"neighborhood",label:"Bairro",error:!!p.neighborhood,helperText:p?.neighborhood?.message,variant:"outlined",fullWidth:!0,required:!0})}),u.createElement(tc,{name:"address_complement",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"address_complement",label:"Complemento",error:!!p.address_complement,helperText:p?.address_complement?.message,variant:"outlined",fullWidth:!0})})),u.createElement(tc,{name:"landmark",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"landmark",label:"Referência",error:!!p.landmark,helperText:p?.landmark?.message,variant:"outlined",fullWidth:!0})}),u.createElement("div",{className:"flex space-x-12"},u.createElement(tc,{name:"city",control:f,render:({field:g})=>u.createElement(Tr,{...g,id:"city",label:"Cidade",error:!!p.city,helperText:p?.city?.message,variant:"outlined",fullWidth:!0,required:!0})}),u.createElement(tc,{name:"state",control:f,render:({field:g})=>u.createElement(v4e,{...g,error:!!p.state,helperText:p?.state?.message})}))))}async function AWt(e){return(await ht.post(`/api/v2/orders/bee_delivery/${e}/request_driver`)).data}async function PWt(e,t){return(await ht.post(`/api/v2/orders/bee_delivery/${e}/cancel_request_driver`,{reason:t})).data}var Aw={},Mve;function RWt(){if(Mve)return Aw;Mve=1;var e=$t(),t=Wt();Object.defineProperty(Aw,"__esModule",{value:!0}),Aw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M19 8v3H5.83l2.88-2.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 00-1.41 0L2.71 11.3c-.39.39-.39 1.02 0 1.41L7.3 17.3c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L5.83 13H20c.55 0 1-.45 1-1V8c0-.55-.45-1-1-1s-1 .45-1 1z"}),"KeyboardReturnRounded");return Aw.default=i,Aw}
356var OWt=RWt();const IWt=et(OWt);var Pw={},Lve;function kWt(){if(Lve)return Pw;Lve=1;var e=$t(),t=Wt();Object.defineProperty(Pw,"__esModule",{value:!0}),Pw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M16.85 6.85l1.44 1.44-4.88 4.88-3.29-3.29a.9959.9959 0 00-1.41 0l-6 6.01c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L9.41 12l3.29 3.29c.39.39 1.02.39 1.41 0l5.59-5.58 1.44 1.44c.31.31.85.09.85-.35V6.5c.01-.28-.21-.5-.49-.5h-4.29c-.45 0-.67.54-.36.85z"}),"TrendingUpRounded");return Pw.default=i,Pw}var NWt=kWt();const DWt=et(NWt);function xu({Icon:e,title:t,value:r,className:n}){return u.createElement("div",{className:Ft("flex items-center space-x-16",n)},u.createElement("div",null,u.createElement("div",{className:"inline-flex rounded-full bg-gray-50 p-8"},e)),u.createElement("div",{className:"truncate"},u.createElement("div",{className:"truncate text-16 font-bold",title:t},t),u.createElement("div",{className:"truncate text-16",title:r},r)))}const Fve={selectedExternalDelivery:null,open:!1,loading:!1,canBeRequested:!0},xd=kh(e=>({...Fve,setOpen:t=>e(r=>({...r,...Fve,open:!0,selectedExternalDelivery:t})),setClose:()=>e(t=>({...t,open:!1})),setLoading:t=>e(r=>({...r,loading:t})),setCanBeRequested:t=>e(r=>({...r,canBeRequested:t}))})),MWt=e=>ht.get(e).then(t=>t.data);function LWt(e){const{data:t,error:r,isLoading:n,mutate:i}=Ll(`/api/v2/orders/bee_delivery/${e}/calculate_fee`,MWt,{dedupingInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,errorRetryCount:1});return{data:t,isLoading:n,isError:r,mutate:i}}function FWt(){const{order:e}=gi(),{data:t,isLoading:r,isError:n}=LWt(e?.id),i=xd(a=>a.setCanBeRequested);return u.useEffect(()=>{i(t&&!r&&!n&&!t.data)},[t,n,r,i]),r?u.createElement("div",{className:"flex items-center justify-center space-y-20 rounded-8 border border-solid border-grey-border-dark px-16 py-44 text-gray-600"},u.createElement(ai,{color:"primary",size:44})):n||t?.data?u.createElement("div",{className:"flex flex-col items-center justify-center space-y-12 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement(jC,{className:"h-60 w-60 text-red-lighter"}),u.createElement("h3",{className:"text-center text-18 font-semibold leading-normal text-red-lighter"},t?.data||"Erro ao buscar as informações")):u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement("div",{className:"grid grid-cols-1 gap-20 sm:grid-cols-2"},u.createElement(xu,{Icon:u.createElement(jg,null),title:"Taxa base",value:me.formatMonetaryValue(t?.baseFee)}),u.createElement(xu,{Icon:u.createElement(IWt,null),title:"Taxa de retorno",value:me.formatMonetaryValue(t?.returnFee)}),u.createElement(xu,{Icon:u.createElement(DWt,null),title:"Taxa de dinâmica",value:me.formatMonetaryValue(t?.dynamicFee)}),u.createElement(xu,{Icon:u.createElement(jg,null),title:"Taxa de entrega",value:me.formatMonetaryValue(t?.deliveryFee)})))}async function BWt(e){return(await ht.post(`/api/v2/orders/foody_delivery/${e}`)).data}async function zWt(e){return(await ht.put(`/api/v2/orders/foody_delivery/${e}/cancel`)).data}async function HWt(e){return(await ht.put(`/api/v2/orders/foody_delivery/${e}/refresh`)).data}async function UWt(e){return(await ht.post(`/api/v2/orders/mottu/${e}/request_driver`)).data}async function VWt(e,t){return(await ht.post(`/api/v2/orders/mottu/${e}/cancel_request_driver`,{reason:t})).data}var Rw={},Bve;function qWt(){if(Bve)return Rw;Bve=1;var e=$t(),t=Wt();Object.defineProperty(Rw,"__esModule",{value:!0}),Rw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15.87 15.25l-3.37-2V8.72c0-.4-.32-.72-.72-.72h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l3.65 2.19c.34.2.78.1.98-.24.21-.35.1-.8-.25-1zm5.31-10.24L18.1 2.45c-.42-.35-1.05-.3-1.41.13-.35.42-.29 1.05.13 1.41l3.07 2.56c.42.35 1.05.3 1.41-.13.36-.42.3-1.05-.12-1.41zM4.1 6.55l3.07-2.56c.43-.36.49-.99.13-1.41-.35-.43-.98-.48-1.4-.13L2.82 5.01c-.42.36-.48.99-.12 1.41.35.43.98.48 1.4.13zM12 4c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"}),"AccessAlarmRounded");return Rw.default=i,Rw}var jWt=qWt();const $Wt=et(jWt),WWt=e=>ht.get(e).then(t=>t.data);function GWt(e){const{data:t,error:r,isLoading:n,mutate:i}=Ll(`/api/v2/orders/mottu/${e}/calculate_fee`,WWt,{dedupingInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,errorRetryCount:0});return{data:t,isLoading:n,isError:r,error:r,mutate:i}}function KWt(){const{order:e}=gi(),{data:t,isLoading:r,error:n,isError:i}=GWt(e?.id),a=xd(o=>o.setCanBeRequested);return u.useEffect(()=>{a(t&&!r&&!i)},[t,i,r,a]),r?u.createElement("div",{className:"flex items-center justify-center space-y-20 rounded-8 border border-solid border-grey-border-dark px-16 py-44 text-gray-600"},u.createElement(ai,{color:"primary",size:44})):i?u.createElement("div",{className:"flex flex-col items-center justify-center space-y-12 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement(jC,{className:"h-60 w-60 text-red-lighter"}),u.createElement("h3",{className:"text-center text-18 font-semibold leading-normal text-red-lighter"},n.response?.data?.message||"Erro ao buscar as informações")):u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement("div",{className:"grid grid-cols-1 gap-20 sm:grid-cols-2"},t?.expectedPickup&&u.createElement(xu,{Icon:u.createElement($Wt,null),title:"Previsão de coleta",value:qe(t?.expectedPickup).format("DD/MM HH:mm")}
356),t?.expectedDelivery&&u.createElement(xu,{Icon:u.createElement(GV,null),title:"Previsão de entrega",value:qe(t?.expectedDelivery).format("DD/MM HH:mm")}),t?.totalDistance&&u.createElement(xu,{Icon:u.createElement(T2,null),title:"Distância total",value:`${xi(t?.totalDistance,2)?.toString()?.replace(".",",")} km`}),u.createElement(xu,{Icon:u.createElement(jg,null),title:"Taxa de entrega",value:me.formatMonetaryValue(t?.deliveryFee)}),u.createElement(xu,{Icon:u.createElement(As,null),title:"Pago online",value:t?.onlinePayment?"Sim":"Não"})))}var Ow={},zve;function YWt(){if(zve)return Ow;zve=1;var e=$t(),t=Wt();Object.defineProperty(Ow,"__esModule",{value:!0}),Ow.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{fillRule:"evenodd",d:"M6 20h12c.55 0 1 .45 1 1s-.45 1-1 1H6c-.55 0-1-.45-1-1s.45-1 1-1zm6-13c-1.1 0-2 .9-2 2s.9 2 2 2a2 2 0 100-4zm0-5c3.27 0 7 2.46 7 7.15 0 2.98-2.13 6.12-6.39 9.39-.36.28-.86.28-1.22 0C7.13 15.26 5 12.13 5 9.15 5 4.46 8.73 2 12 2z"}),"PinDropRounded");return Ow.default=i,Ow}var XWt=YWt();const Bke=et(XWt);var Iw={},Hve;function ZWt(){if(Hve)return Iw;Hve=1;var e=$t(),t=Wt();Object.defineProperty(Iw,"__esModule",{value:!0}),Iw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z"}),"ScheduleRounded");return Iw.default=i,Iw}var QWt=ZWt();const zke=et(QWt);function JWt(){const{order:e}=gi(),t=at(({orderListener:l})=>l?.serverDiffTimestamp),r=`${e.delivery_address.street}, ${e.delivery_address.house_number||"S/N"}`;let n=`${e.delivery_address.neighborhood}, ${e.delivery_address.city}`;e.delivery_address.zip_code&&(n=`${n} (${e.delivery_address.zip_code.replace(/^(\d{5})(\d{3})$/,"$1-$2")})`);const i=me.correctTime(e.created_at,t),a=i.clone().add(parseInt(e.estimated_time),"minute").format("HH:mm"),o=i.clone().add(parseInt(e.estimated_time+10),"minute").format("HH:mm"),s=`${a} - ${o}`;return u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement("div",{className:"grid grid-cols-1 gap-20 sm:grid-cols-5"},u.createElement(xu,{Icon:u.createElement(Bke,null),title:r,value:n,className:"sm:col-span-3"}),e.order_timing!=="scheduled"&&e.estimated_time>0&&u.createElement(xu,{Icon:u.createElement(zke,null),title:"Previsão entrega",value:s,className:"sm:col-span-2"})))}const eGt={foodyDelivery:{id:"foodyDelivery",image:u.createElement("img",{src:eke,alt:"Foody Delivery",className:"h-auto w-40 rounded-8"}),label:"Foody Delivery",QuoteCard:null,requestDriver:BWt,validateAddress:!1},beeDelivery:{id:"beeDelivery",image:u.createElement("img",{src:TY,alt:"Bee Delivery",className:"h-auto w-40 rounded-8"}),label:"Bee Delivery",QuoteCard:FWt,requestDriver:AWt,validateAddress:!1},mottu:{id:"mottu",image:u.createElement("img",{src:AY,alt:"Mottu",className:"h-auto w-40 rounded-8"}),label:"Mottu",QuoteCard:KWt,requestDriver:UWt,validateAddress:!0}};function tGt({onClose:e}){const t=Lr(),{order:r}=gi(),{mutate:n}=di(),i=xd(_=>_.setLoading),a=xd(_=>_.loading),o=xd(_=>_.canBeRequested),s=xd(_=>_.selectedExternalDelivery),[l,c]=u.useState(!1),[d,f]=u.useState(!1),h=eGt[s];u.useEffect(()=>{async function _(){const b=r?.delivery_address;try{await s3.validate(b),f(!0)}catch{c(!0)}}d||(h.validateAddress?_():f(!0))},[d,h.validateAddress,r?.delivery_address]);const p=u.useCallback(async()=>{i(!0);try{await h.requestDriver(r?.id),await n(hs(r?.id)),t.success("Entregador solicitado com sucesso!"),e()}catch(_){const b=_?.response?.data?.message||"Erro ao solicitar entregador";t.error(b)}i(!1)},[t,h,n,e,r?.id,i]),g=u.useCallback(async()=>{try{const _=r?.delivery_address;await s3.validate(_),p()}catch{c(!0)}},[r?.delivery_address,p]);return u.createElement("div",{className:"space-y-32"},u.createElement("div",{className:"space-y-16"},u.createElement("div",{className:"flex w-full items-center space-x-16 rounded-6 border-1 border-solid border-grey-border-dark px-16 py-12 text-16"},u.createElement("div",{className:"flex items-center"},h.image),u.createElement("span",{className:"text-18 font-bold text-gray-600"},h.label)),u.createElement(JWt,null),d&&h.QuoteCard&&u.createElement(h.QuoteCard,null)),u.createElement(fr,{onClick:h.validateAddress?g:p,variant:"contained",color:"primary",size:"large",disableElevation:!0,fullWidth:!0,disabled:a||!o||!d}
356,"Solicitar entregador"),u.createElement(Fke,{open:l,onClose:()=>c(!1)}))}function Uve(){const e=xd(i=>i.open),t=xd(i=>i.loading),r=xd(i=>i.setClose),n=u.useCallback(()=>{r()},[r]);return u.createElement(oi,{open:e,title:"Solicitar entregador",loading:t,onClose:n,maxWidth:"sm",onSubmit:void 0,keepMounted:!1},u.createElement(tGt,{onClose:n}))}const rGt=e=>ht.get(e).then(t=>t.data);function Hke(){const{data:e,error:t,isLoading:r,mutate:n}=Jc("/api/v2/company/logistics/delivery_integrations",rGt);return{data:e,isLoading:r,isError:t,mutate:n}}function N2({order:e}){const[t,r]=u.useState(null),n=Po(c=>c.setOpen),{data:i}=Hke(),{setOpen:a}=xd(),o=c=>{r(c.currentTarget)},s=()=>{r(null)},l=u.useMemo(()=>[i?.ifood_shipping_enabled&&{id:"ifoodSobDemanda",Image:u.createElement(E$t,{className:"h-auto w-36"}),label:"Sob Demanda",onClick:n},i?.bee_delivery_enabled&&{id:"beeDelivery",Image:u.createElement("img",{src:TY,alt:"Bee Delivery",className:"h-auto w-36 rounded-8"}),label:"Bee Delivery",onClick:()=>a("beeDelivery")},i?.foody_delivery_enabled&&{id:"foodyDelivery",Image:u.createElement("img",{src:eke,alt:"Foody Delivery",className:"h-auto w-36 rounded-8"}),label:"Foody Delivery",onClick:()=>a("foodyDelivery")},i?.mottu_enabled&&{id:"mottu",Image:u.createElement("img",{src:AY,alt:"Mottu",className:"h-auto w-36 rounded-8"}),label:"Mottu",onClick:()=>a("mottu")}].filter(Boolean),[i,n,a]);if([Bt.closed.status,Bt.canceled.status].includes(e?.status)||!l.length)return null;if(l.length===1){const c=l[0];return u.createElement(u.Fragment,null,u.createElement(fr,{key:c.id,className:"normal-case",onClick:c.onClick},"Solicitar ",c.label),u.createElement(Uve,null))}return u.createElement(u.Fragment,null,l.length>0&&u.createElement(fr,{key:"menu-button",className:"normal-case",onClick:o},"Solicitar entregador"),u.createElement(Uve,null),u.createElement(m4,{open:!!t,anchorEl:t,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},PaperProps:{className:"border-1 border-solid border-grey-border shadow rounded-8",elevation:0}},u.createElement("div",{className:Ft(l.length>2?"grid grid-cols-2":"flex flex-col","space-y-6 px-8 py-12 text-gray-600")},l.map(c=>u.createElement("div",{key:c.id,className:"flex cursor-pointer items-center space-x-16 rounded-8 px-12 py-8 text-16 hover:bg-gray-50",onClick:()=>{c.onClick(),s()}},c.Image,u.createElement("span",null,c.label))))))}function nGt({order:e}){const t=Lr(),{mutate:r}=di(),[n,i]=u.useState(!1),[a,o]=u.useState(!1),[s,l]=u.useState("");u.useEffect(()=>{i(!1)},[]),u.useEffect(()=>{n&&l("")},[n]);const c=u.useCallback(()=>{i(!0)},[]),d=u.useCallback(()=>{i(!1)},[]),f=u.useCallback(async h=>{h.preventDefault();try{if(!s){t.error("Informe o motivo do cancelamento");return}o(!0),await PWt(e.id,s),await r(hs(e.id)),t.success("Entrega cancelada com sucesso!"),d()}catch(p){t.error(p.response?.data?.message||"Não foi possível cancelar a entrega")}o(!1)},[t,s,d,r,e.id]);return u.createElement("div",{className:"mt-12 flex items-center space-x-16 rounded-8 border border-solid border-gray-300 px-16 py-12 text-16"},u.createElement("div",null,u.createElement("img",{src:TY,alt:"Bee Delivery",className:"h-auto w-40 rounded-8"})),u.createElement("div",{className:"flex-1"},u.createElement("div",null,"Entrega via ",u.createElement("strong",null,"Bee Delivery")),e?.delivery_man_fee>=0&&u.createElement("div",null,"Valor da entrega: ",u.createElement("strong",null,me.formatMonetaryValue(e?.delivery_man_fee))),u.createElement("div",null,"Status: ",u.createElement("strong",null,e.delivery_status_label))),![Bt.canceled.status,Bt.closed.status].includes(e.status)&&["SEARCHING","GOING_TO_ORIGIN"].includes(e.delivery_status)&&u.createElement(u.Fragment,null,u.createElement("div",{className:"flex items-center space-x-4"},u.createElement(Ma,{tooltip:"Cancelar entrega",onClick:c},u.createElement(Aa,null))),u.createElement(oi,{open:n,title:"Cancelar entrega",loading:a,onClose:d,maxWidth:"sm",onSubmit:f,keepMounted:!1,confirmText:"Cancelar entrega",cancelText:"Voltar"},u.createElement(Tr,{name:"reason",label:"Motivo do cancelamento",value:s,onChange:h=>l(h.target.value),variant:"outlined",multiline:!0,rows:3,required:!0,fullWidth:!0,autoFocus:!0}))),e.delivery_status==="CANCELED"&&u.createElement(N2,{order:e}))}var kw={},Vve;
356function iGt(){if(Vve)return kw;Vve=1;var e=$t(),t=Wt();Object.defineProperty(kw,"__esModule",{value:!0}),kw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V18z"}),"SyncRounded");return kw.default=i,kw}var aGt=iGt();const oGt=et(aGt),sGt="/assets/foodyDelivery-DfMX04tM.png";function lGt({order:e}){const t=Lr(),{mutate:r}=di(),[n,i]=u.useState(!1),a=Z4(),o=u.useCallback(async()=>{try{i(!0),await a(e?.id,Bt.ready.status),t.success("Status da entrega atualizado com sucesso!")}catch(c){t.error(c.response?.data?.message||"Não foi possível fazer a atualização")}i(!1)},[t,e?.id,a]),s=u.useCallback(async()=>{try{i(!0);const c=await HWt(e?.id);r(hs(e?.id),c,{revalidate:!1}),t.success("Pedido atualizado com sucesso!")}catch(c){t.error(c.response?.data?.message||"Não foi possível fazer a atualização")}i(!1)},[t,r,e?.id]),l=u.useCallback(async()=>{try{i(!0);const c=await zWt(e?.id);r(hs(e?.id),c,{revalidate:!1}),t.success("Pedido atualizado com sucesso!")}catch(c){t.error(c.response?.data?.message||"Não foi possível fazer a atualização")}i(!1)},[t,r,e?.id]);return u.createElement("div",{className:"mt-12 flex items-center space-x-16 rounded-8 border border-solid border-gray-300 px-16 py-12 text-16"},u.createElement("div",null,u.createElement("img",{src:sGt,alt:"Foody Delivery",className:"h-auto w-36"})),u.createElement("div",{className:"flex-1"},u.createElement("div",null,"Entrega via ",u.createElement("strong",null,"Foody Delivery")),u.createElement("div",null,"Status: ",u.createElement("strong",null,e.delivery_status_label))),u.createElement("div",{className:"flex items-center space-x-4"},e.status===Bt.ready.status&&e.delivery_status==="open"&&u.createElement(Ma,{tooltip:"Marcar como pronto",onClick:o,loading:n},u.createElement(_h,null)),!["closed","cancelled"].includes(e.delivery_status)&&u.createElement(Ma,{tooltip:"Atualizar pedido na Foody Delivery",onClick:s,loading:n},u.createElement(oGt,null)),![Bt.canceled.status,Bt.closed.status].includes(e.status)&&e.delivery_status!=="cancelled"&&u.createElement(Ma,{tooltip:"Cancelar entrega",onClick:l},u.createElement(Aa,null)),e.delivery_status==="cancelled"&&u.createElement(N2,{order:e})))}const cGt=["CONFIRMED"];function uGt({order:e}){const t=Lr(),r=Bl(),[n,i]=u.useState(!1),a=Z4(),o=u.useCallback(async()=>{try{await r({title:"Informar pedido pronto",description:"Informar ao entregador ou entregadora parceira que o pedido já está pronto",cancellationText:"Voltar",confirmationText:"Pedido pronto"}),i(!0);try{await a(e?.id,Bt.ready.status),t.success("Operação concluída com sucesso!")}catch(l){const c=l.response?.data?.message||l.message;t.error(c||"Não foi possível concluir a operação")}i(!1)}catch{}},[r,a,e?.id,t]),s=z4(e);return u.createElement("div",{className:"mt-12 overflow-hidden rounded-8 border border-solid border-gray-300 text-16"},s&&u.createElement("div",{className:"w-full bg-red-light px-16 py-8 text-center text-15 font-bold text-white"},"ENTREGA ",e.delivery_description.toUpperCase()),u.createElement("div",{className:"flex items-center space-x-20 py-12 pl-16 pr-8"},u.createElement("div",null,u.createElement(II,{className:"h-auto w-36"})),u.createElement("div",{className:"flex-1"},u.createElement("div",null,"Entrega via ",u.createElement("strong",null,"iFood")),u.createElement("div",null,"Status: ",u.createElement("strong",null,e.delivery_status_label))),u.createElement("div",{className:"flex items-center space-x-4"},cGt.includes(e.delivery_status)&&e.status===Bt.confirmed.status&&u.createElement(Ma,{tooltip:"Avisar pedido pronto",onClick:o,loading:n},u.createElement(_h,null)))))}var Nw={},qve;function dGt(){if(qve)return Nw;qve=1;var e=$t(),t=Wt();Object.defineProperty(Nw,"__esModule",{value:!0}),Nw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.
3561 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"}),"FileCopyOutlined");return Nw.default=i,Nw}var fGt=dGt();const hGt=et(fGt);async function pGt(e,t){return(await ht.get(`/api/v2/orders/ifood/${e}/delivery_availabilities`,{params:{merchant_id:t}})).data}async function mGt(e,t,r,n){return(await ht.post(`/api/v2/orders/ifood/${e}/request_driver`,{merchant_id:n,quote_id:t,payment:r})).data}async function jve(e,t){return(await ht.post(`/api/v2/orders/ifood/${e}/cancel_request_driver`,t)).data}async function vGt(e,t){return(await ht.post(`/api/v2/orders/ifood/${e}/accept_delivery_address_change`,t)).data}async function gGt(e,t){return(await ht.post(`/api/v2/orders/ifood/${e}/deny_delivery_address_change`,t)).data}const yGt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAEEBAMAAAA8Jlc5AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAnUExURUdwTOIAJ+AAJ+UAKaEAE6EAE6EAE6EAE6EAE+sAKqEAE6EAE////1/4dwsAAAALdFJOUwAKGShVeaPC3zv0Gn5JHQAAAAFiS0dEDIGzUWMAAAAHdElNRQfnCgMUNg+dHLGdAAAAAW9yTlQBz6J3mgAACFhJREFUeNrtncFfG0UUx3cD+vlwC4HWj7eUQP3khi2t4glLYsVeqk1SlQtaIK2c2toQ5aYtpOSCJVV7tkBMri3ks/PPuZtNstnNzu57M2/owfn1FD4sfJn5zZs382a2hqGlpaWlpaWlpaWlpaWl9a40mcrkipvb1Vqttl3ZKCzPTCbPFyDTKN1vs2E1NwuHl84PIJsv11lAFrP2NpbT5wMwlS+3WbhONpbPAcC8Vt5nfO2tf6waIHs3CsDpkL07Si2RePkri5X15IU6grEv6vEEzLJ2bygjuAshcDtDDcGH3IEwquadpAKC2ftwApthPU1P8BMCwOkMcobp+zgCxjrrtH0x9i2WwO6LB5QEibsYHwwYviEkuClCwNgZWXwwr4sRMHb6ORHC7I4gAWNP0iQEY+jB4MkisaQpaARXHQpLChvB1fEf0gTjgOlZrR3MLyUJWOdHSYQLdVkEdjwvRTCGnJxC9XNSBuEmAYHcqBiX7wZHR2lhAnkvurLEHUngRVfCjkwIJAkcicbpuTYZwtmBmBO+JyNg7BcxJ9A1gr3gFXGDSecEW5ZIM5A2gt0MeDeQOsFphsdoBKLA6Ok0jUX4i5iAWV8jCcZ2qBHYURKHcJ2cgHVwzZCgyBOCeopCmG4rQDibxyD8rYCAsR8w/bCjBAFjyIsq+sE2JHyJSZUtjQg+USgICq7gEVJRP9gREtwTXykiYOx36HioK0M4BY4J4kxhWNYSDEHVeHDkj07m7GY5VDsKEXyJi3ltv63wd0EQxlX+sVz5OoI8LYKoczA88lRkBLHypQzvtc8fwNr17X0RZmZWqwZSsHpHNviblY1iDqKVYPmQaB7oVApXgEF3RLdICM4KEpVRCgRr94ZoCxB5wZLcWP2EgGBeioAgLkhvcEvnhx35qo/kasV6kJRGkJwpn6WlCQzjz7pMN5AUvhL58nakoprpqXw3dDUTrVXVjRCvLfWNECOT75XO0vk0wnibi4DdNhJVRPyUrXhB9RGXILhjY06mMouvYDq8xGlBc1QRc+lr/7OZfLnWAusk9HhHKlcsjPwrclNsf51nKl+FR7Tu4yHHOxKlfWv0O/lO8NU3pvGnK0Iqdtiq9PB4wJ9xsfUs2AwTO8ifMLRPIXawYGQ7Gp0/3facKJj+PQ8MBmzhwfKG5FxdDOFUsh+8zRrhsknHH1gi4nC43g4eFc4/A/s9F7DPe24UXwis+RAuYh8fBCaJDPihHMJgRHk7c6028mc8luoIrx/7+zTWk1weGR/81RGsHb29mv54eHrJMLK4TRv/RIft0cFMPbblfuF03t8rEB35AwPS14Pd9Im6+4XHAjEisBF8GcXvPT3ufu7nkaido0BVILGFQhhEpp6Pz5ICcSqYd83tIx72EN53P/e7FeWpkdTvWtXdEgP9HQMn9QJK39yokppvC7SrqW5m2aijEC67n/sTr7mFQVgyQgWbM3mtYKJagYeAa4WL/s8oL/BKI7AjC8ERcZzEPE2CwIsLlxEEzLothdCPKr1+s+65VsBlUFKtMBjS/VF43GWaxvTDcAosgtAf0uZqr1Gd02PYw2icVoD9IZ6T+nt2nfUrC9g1lVQreFmTTF1Zygte7giLI+FNKdcKgwxa4vQVLy4AFzVvBg+Ib6XzEIAh1st4xHuChwCc67w1pfhpD+6WHQxhaEAh4xEAAWivR167iZ6T5h5EBbbrUAY+IVjz5Z6yApYohp+fE7s4wD1X8wHsed8+zRxyv62HkOQgQFe4vhXhQtwNyzAdcQjASwF/M0418sUyEoOLAF3hjuyYTc5czZeqrRYYgXvuEHyaKOwnTE4ulMo1YGs85yGA83DesDYX8pvbEIpHXIRVIEIvXwz9GYu5Urwz1rjP34L25XHa4MvMNPLRFBEnrD6FIsRdujBTmUapus/zZ381HiL4WsDdWolU0lwolquhrfGa/xRi6wt26SKxGObPqFPZiEXZCbRSafszGLminIRZmo4UFfiazLwa9mf0JaYtOIJ1D87gVNAcf9Ycfzaja/6YTKyDvs7t+HO78l30Y6ic+EzgWrs5k475DtyG9ImKq/W43WCruU7/roWxOqoZLGt3ZSZJzIAYEj2KSiG3cpgmRFjFItjq1LY3CnQvI/lMAMFRc69SXKbpEnSNxlOrtrexQvCSmmlxhC5Gs1I4FD596Ao5JEbVZs1KMXcoQYGsDPCcUdkoiFNQ3Qqw/VkQ9Kf8IcSBLEF/Ul8LEPAn+fU9158vEBRq7ivh/El8j9KjsP0JpACvJfBqNW1/AqZ3iRAN0m586j2uGAGQekuH6DiNFgiDQhX7hBR/oVDdxa2efotFQNW5RPRvLILy+yP/xCKgDzphFd8RhuqLPA/jEVReYHO0Fo+gOj4uxSOgj5whdRCPoOh+cV+BM3bhUnPLuq+zNABhQvbtRJF6mwQgiBY6YHoDITDMhVK1rQoBevs/tRjyPk8aId6Ikeqe8qZHQB6oz9oU1D1yG4dgmKkGYG8fI5G7FWY2VxIqw3EQDvAIji2u5stU95FP0kIIhrOPTGTOU1GCrkjM+VoKwUgSmPO5HILhFJ4kzflIGsFwYlajtC9sizUKBKe6MCVqTt5ZHiHN5ssCc5l1QIhg90gDXS9nnTQpQrcqijQn9FUYGDlFJ4Qt3sr/xlAK25xVYI/ELyiFeyQLNCdJWOAJZk7s67OwTRFvTuhbUWQoZhZsc/J7BPfaKGElIszZP7KsXtn8Zrg5ce/vklOqEboKUDogRtQ1Z6ApSCcpGIVtzupw0qkiPMcr9XJzYE6BdwsStcXAnLvz7wjB6JnTqih7kT+sKTKLr1T/vw5aWlpaWlpaWlpaWlpaWlpaWv9T/QfGWsxFuyt1bAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0xMC0wM1QyMDo1MzozNCswMDowMHiFtBoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMTAtMDNUMjA6NTM6MzQrMDA6MDAJ2AymAAAAKHRFWHRkYXRlOnRpbWVzdGFtcAAyMDIzLTEwLTAzVDIwOjU0OjE1KzAwOjAwWEM6yQAAAABJRU5ErkJggg==",LB=["CANCELLATION_REQUESTED","CANCELLED","DELIVERY_CANCELLATION_REQUESTED","DELIVERY_CANCELLATION_REQUEST_ACCEPTED","DELIVERY_CANCELLATION_REQUEST_REJECTED","CONCLUDED"],_Gt=["CONFIRMED","REQUEST_DRIVER","REQUEST_DRIVER_SUCCESS"];function bGt({actions:e,loading:t}){const[r,n]=u.useState(null),i=o=>{n(o.currentTarget)},a=()=>{n(null)};return e?.length?e.length===1?u.createElement(Ma,{tooltip:e[0].label,onClick:e[0].onClick,loading:t},e[0].icon):u.createElement(u.Fragment,null,u.createElement(Ma,{tooltip:"Ações",onClick:i,loading:t},u.createElement(lx,null)),u.createElement(Zc,{anchorEl:r,open:!!r,onClose:a,getContentAnchorEl:null,elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},classes:{paper:"border-1 border-solid border-grey-border shadow rounded-8 text-gray-600"}},e.map(o=>u.createElement(ln,{key:o.key,className:"flex items-center space-x-12 py-12 text-16",onClick:()=>{a(),o.onClick()}},o.icon,u.createElement("span",null,o.label))))):null}function EGt({order:e}){const t=Lr(),r=Bl(),{mutate:n}=di(),[i,a]=u.useState(!1),[o,s]=u.useState(!1),[l,c]=u.useState(!1),d=Z4(),f=u.useCallback(async()=>{try{await r({title:"Aceitar alteração de endereço",cancellationText:"Voltar",confirmationText:"Aceitar"}),s(!0);try{const S=await vGt(e?.id);n(qn(e?.id),S,{revalidate:!1}),t.success("Operação concluída com sucesso!")}catch(S){const P=S.response?.data?.message;t.error(P||"Não foi possível concluir a operação")}s(!1)}catch{}},[r,e?.id,n,t]),h=u.useCallback(async()=>{try{await r({title:"Você está rejeitando a solicitação de alteração de endereço",description:"Ao rejeitar a alteração de endereço a sua entrega não estará completamente segura. Certifique-se que haverá alguém no endereço inicial que poderá receber o entregador.",cancellationText:"Voltar",confirmationText:"Rejeitar alteração"}),s(!0);try{const S=await gGt(e?.id);n(qn(e?.id),S,{revalidate:!1}),t.success("Operação concluída com sucesso!")}catch(S){const P=S.response?.data?.message;t.error(P||"Não foi possível concluir a operação")}s(!1)}catch{}},[r,e?.id,n,t]),p=u.useCallback(async()=>{try{await r({title:"Avisar pedido pronto",description:"Informar ao entregador ou entregadora parceira que o pedido já está pronto",cancellationText:"Voltar",confirmationText:"Pedido pronto"}),a(!0);try{await d(e?.id,Bt.ready.status),t.success("Operação concluída com sucesso!")}catch(S){const P=S.response?.data?.message||S.message;t.error(P||"Não foi possível concluir a operação")}a(!1)}catch{}},[r,d,e?.id,t]),g=u.useCallback(async()=>
356{try{await r({title:"Confimar cancelamento da entrega",description:"Esta operação não poderá ser desfeita.",cancellationText:"Voltar",confirmationText:"Cancelar entrega"}),a(!0);try{const S=await jve(e?.id);n(qn(e?.id),S,{revalidate:!1}),t.success("Solicitação enviada com sucesso!")}catch(S){const P=S.response?.data?.message;t.error(P||"Não foi possível cancelar a entrega")}a(!1)}catch{}},[r,e?.id,n,t]),_=u.useCallback(()=>{e.sales_channel==="ifood"?g():c(!0)},[g,e.sales_channel]),b=u.useCallback(async S=>{const{reason:P,cancellationCode:O}=S||{};if(!S)throw new Error("Selecione um motivo para cancelar a entrega");const I={reason:P,cancellation_code:O},N=await jve(e?.id,I);return n(qn(e?.id),N,{revalidate:!1}),t.success("Solicitação enviada com sucesso!"),N},[t,n,e?.id]),E=u.useMemo(()=>[{key:"copy-tracking-url",label:"Copiar link de rastreamento",icon:u.createElement(hGt,null),onClick:()=>{navigator.clipboard?.writeText?.(e.delivery_tracking_url).then(()=>{t.success("Copiado para área de transferência!")}).catch(()=>{t.error("Não foi possível copiar para área de transferência!")})},visible:e.delivery_tracking_url&&!LB.includes(e.delivery_status)},{key:"share-tracking-url",label:"Compartilhar link pelo WhatsApp",icon:u.createElement(q4,null),onClick:()=>{window.open(`https://${me.isMobile()?"api":"web"}.whatsapp.com/send?phone=${e.client?.ddi||"55"}${e.client?.telephone.replace(/\D/g,"")}&text=Olá, acompanhe a entrega em: ${e.delivery_tracking_url}`,"_blank","noopener noreferrer")},visible:e.delivery_tracking_url&&e?.client?.telephone&&!LB.includes(e.delivery_status)},{key:"cancel-delivery",label:"Cancelar entrega",icon:u.createElement(Aa,null),onClick:_,visible:!["closed","canceled"].includes(e.status)&&!LB.includes(e.delivery_status)}].filter(({visible:S})=>S),[t,_,e.client?.ddi,e.client?.telephone,e.delivery_status,e.delivery_tracking_url,e.status]);return u.createElement("div",{className:"mt-12 rounded-8 border border-solid border-gray-300 py-12 pl-16 pr-8 text-16"},u.createElement("div",{className:"flex items-center space-x-20"},u.createElement("div",null,u.createElement("img",{src:yGt,alt:"Sob Demanda",className:"h-auto w-36"})),u.createElement("div",{className:"flex-1"},u.createElement("div",null,"Entrega via ",u.createElement("strong",null,"iFood Sob Demanda")),u.createElement("div",null,"Status: ",u.createElement("strong",null,e.delivery_status_label))),u.createElement("div",{className:"flex items-center space-x-4"},e.status===Bt.confirmed.status&&_Gt.includes(e.delivery_status)&&u.createElement(Ma,{tooltip:"Avisar pedido pronto",onClick:p,loading:i},u.createElement(_h,null)),u.createElement(bGt,{actions:E,loading:i}),e.delivery_status==="CANCELLED"&&u.createElement(N2,{order:e})),u.createElement(ZIe,{order:e,open:l,onClose:()=>c(!1),handleCancel:b,mode:"shipping"})),e.delivery_status==="DELIVERY_ADDRESS_CHANGE_REQUESTED"&&u.createElement("div",{className:"relative mt-12 space-y-4 border-0 border-t-1 border-solid border-gray-200 pt-12"},u.createElement("div",null,u.createElement("strong",null,"Pedido de alteração de endereço pendente"),u.createElement("div",null,e.delivery_status_details||"Rua Teste, 100, Centro, Cidade - UF")),u.createElement("div",{className:"space-x-12"},u.createElement(fr,{variant:"text",size:"small",onClick:h},"Rejeitar"),u.createElement(fr,{variant:"text",color:"primary",size:"small",onClick:f},"Aceitar")),o&&u.createElement("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white bg-opacity-80"},u.createElement(ai,{color:"primary"}))))}function Dy({Icon:e,title:t,value:r,className:n}){return u.createElement("div",{className:Ft("flex items-center space-x-16",n)},u.createElement("div",null,u.createElement("div",{className:"inline-flex rounded-full bg-gray-50 p-8"},e)),u.createElement("div",{className:"truncate"},u.createElement("div",{className:"truncate text-16 font-bold",title:t},t),u.createElement("div",{className:"truncate text-16",title:r},r)))}function wGt(){const{order:e}=gi(),t=at(({orderListener:l})=>l?.serverDiffTimestamp),r=`${e.delivery_address.street}, ${e.delivery_address.house_number||"S/N"}`;let n=`${e.delivery_address.neighborhood}, ${e.delivery_address.city}`;e.delivery_address.zip_code&&(n=`${n} (${e.delivery_address.zip_code.replace(/^(\d{5})(\d{3})$/,"$1-$2")})`);const i=me.correctTime(e.created_at,t),a=i.clone().add(parseInt(e.estimated_time),"minute").format("HH:mm"),o=i.clone().add(parseInt(e.estimated_time+10),"minute").format("HH:mm"),s=`${a} - ${o}`;return u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement("div",{className:"grid grid-cols-1 gap-20 sm:grid-cols-5"},u.createElement(Dy,{Icon:u.createElement(Bke,null),title:r,value:n,className:"sm:col-span-3"}),e.order_timing!=="scheduled"&&e.estimated_time>0&&u.createElement(Dy,{Icon:u.createElement(zke,null),title:"Previsão entrega",value:s,className:"sm:col-span-2"})))}var Dw={},$ve;
356function SGt(){if($ve)return Dw;$ve=1;var e=$t(),t=Wt();Object.defineProperty(Dw,"__esModule",{value:!0}),Dw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z"}),"QueryBuilderRounded");return Dw.default=i,Dw}var CGt=SGt();const xGt=et(CGt),TGt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAA/CAMAAACisaRpAAAApVBMVEUAAAAAf84Afs4Afs0Afs4AgM0Agc4Ag88AgtEAfs3///9brN+42/HC4PMHgs73+/0tlNYkkNSgzuyTyOkQhtDp9Pr7/P4Lg8/s9fvc7fiPxun+/v70+fyv1u95u+RGodtBn9o2mdcZi9Lw9/zi8Pmz2PCn0u2k0O2ay+tQpt08nNnX6vfN5vXI4/SVyepos+FLo9uHwud/vuZwtuNgr+DS6Pa+3vLuyAz3AAAACXRSTlMA8+7YwJpDJT1W3Y10AAACLklEQVRYw+zOyQ0AIAwDQecE998wIhIdJD+mgNWiZJiwg1gknuXs5AtlK3vprltlN73Hzn4OJCckghMCxgkG4QQBZ/zu7x7252CJQCgMw/D6exGiqEgyVExhxrj/S9NBadEce+Pd/Yv/mfn+7t/9XfcCJHo1AIhVlwKMpCGfwgK4ylRBtLW7LlB13aHqij7XXONU0tQHV3Z3CXhdd6e6sNc13kHSGlap3d1gSjouE0nlx80W7xwpfO4/ArHsbo4pb90AzpLjEzRud/Dcg1IlBM4X14MReK2bRWTSEdw+VzfgABSyuwlE0zEkjTs7EUgxnHtdlZju+uJW5nsNeeu6kGqPv23cB3t119sgCIZh+Pi9m6g0zjFrtR9qOzVr14/9/5+2EARPmJ4vfQ4lXgQeAllsY9e03wBZsuTWcDec9u4FVqIZEuea+HNiv6xlwe0AJWkMlXMTyBV8/eGqGNPagpvDICINnJ0rBcMDVt5t0zFissXktuDWUFpPe/eHrAWVBHurgBhiNevugatSypRROfcbMrQE3aiHY5dBM+caongzKeDs3E+AJuyWmJ5z4DrnfozjxtLR6B4Aysk9RS5yOEIvkmpXXdhNoLDDUQHV6JrZ2Hl3Si0n7H5dXHVh9wZbEVfz2rktbN5Dbof74emqC7o9PKYbUkeje4enhNzBazug+V/v28t9ub/jHDWXkzaAVv15Wo0/0Gq8hFbjOzQaj6LV+BmNxvtoNz5Jq/FUACHA1L0E704eAAAAAElFTkSuQmCC",AGt="data:image/webp;base64,UklGRmoDAABXRUJQVlA4WAoAAAAQAAAAVgAAPgAAQUxQSHIAAAABT6CmkRQ4fcdXUZMzAJaIiMCq/jTZcBvZttNcPGQe2rCFkJLbmIw6jKTX8sk1E9F/AUHBiTZI7fIz4GOUpPQ16ErSaVSXq/Rr2I0m45p1G7j3kPkfsvBHFhtZ8n8c6wvWLayHWGehfmNdyHoTdizqYwFWUDgg0gIAAFAQAJ0BKlcAPwA+kUifSqWkoyGoFVjgsBIJYgB4uiW3u8ADbAbgDyAOsg9ADpNf3A/aP2jLoBXnf5DhBlA+wD0M0jU0fyN/SKZaVu8dyaldCfOGrvsSmTxOvye/fGaX32RUig2ufq+hoEATuLwvMb8GVAldV1Dx+ZwkqcnRNaNuf8+H009jP6EpnWAA/vkaq+9+v9Efvk2//YZZWspjD1hprSSdPhbvIszDDA3mfw8xQBVSmymL5OW3ZO1+5jhwz6W/jPf83JLHL4agiqa3eTYbqAnQ3cfYhuE1jVKhRqNHgWdAs6sfzI33tFvxRv5cwPi+0sVSG73+ygh7h/cudASrJNwrVU84XTNq91FCZJRwVgZK7cF+nnRH2OQBhMrMu+//q481pnErzBtyb+MqQnbopiD+efibAx7Na7M4UaxPvw5FY+5xujVsR+KXzEjg3dhVeSXlUZPHeP921+6f4XoTSHSUcI1zIgQ/kyX6/Yskn/7aWR7T3dZi6W39tKL5/CUqeuK6cmf9hevxKqUHWD3Xpi9E9AReqxtJGWnZ2syYEmTHCD/0TMGkAvUUYJUoT7T7GZ4s5/VWz9kvotTJu/FlwiDu//hMD1fXaX44odW1OqP8cvWrYWanz8cYVdQfvxe7RtJgR/8AlMBP/JYqqNul2UFprex/ufOI98F6UpQF1bRdn+IKc2ZAfEHKfZ43KXk80WHx2tkrGepC5LXHrH/1kp32cLC3jgDOoIqQlAgTMos1JqUFDb4gDqrfpxG6asPS5AVK3NzT5iEn6CtIr5y6inanyUUhhg0LLwveD2C/YQoiNReR/k8sZhBoZaWd27IH8wnK+IhX4EfIGG8uBWw7Mdk3fosAQ/kz5S1JrGJp+DjH179l3MB9oQNowfGJQf7CtYKvEd7p11dqYJzqqpm76ZQxwpWPEK+/fKOJpVfGkdRZPxZUJaDJtXGcxVJwAAAA",PGt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAA/CAMAAACisaRpAAAArlBMVEUAAADLABjLABnLABnLABnKABnOABvPABzNABnKABj+/v7okJrlhI/cV2bYQ1TNDSP9+vr66evyxMnxvcPjeYXdXGvWO03SKDzRJDjQGzDKAxr21dj1z9PurrXrnqfpmKHgbXrganjeYnDVNUfULkH88vP77/Dzys7sp6/kfYridIHfZnTbUWHaTFzYSFnQHzTOFSv89PX55Ob44uT3297zxsvwuL7roanlhZDlgo2WB3VsAAAACXRSTlMA8+7YwJpDJT1W3Y10AAABdklEQVRYw+3YyXKCQBSFYRBQGwScEHCe5ylz8v4vlhNTqbZ1e26VleLu/s2HpS3otS5T9hxbMcZ2vLL1NxVXMcet/LLVkuJOqXp5tWDZcAWuq/jj4iNTElO2PCUxnuUoiXEsW0mMbSmZKdzC/f/uwPf9qc5PZMBwe4Bm5mUmBLdbBxSblzkS3BTO681lMoK7hzPQmSHrXYLbBvSl84DsKYL7ASjUuUWuGe4KUKpziGwz3IX5fr7BPRDcHE7/qpfoE8GN4DSjzmyenbI0nf/kQhHcsX83TYY7undHDLcFKJhMkyQMw2TS7iPHDLcB6KzzHRkR3DOcxlU/o3OCG8Fp6YyRT4rgjs27eAfZZ7gj82GxQ64ZbtN8WATIDcNdAorNUxcS3PzmODTQc4J7NL+2sY+JCe4WztA8Di+K4N7cxXfIFsNdAdqbxyFguJtarZbrTJCdR/99VriF+6Cu0P95qf2D1L5Ear8jtI+S2p8J7fvk9pNS+9RvYzPIZj539CsAAAAASUVORK5CYII=",RGt="data:image/webp;base64,UklGRgIDAABXRUJQVlA4WAoAAAAQAAAAVgAAPgAAQUxQSH8AAAABV6A2ktQ2i7chQyHE6kIREcDy3+LZNJzWtu1ElxyqSA2gcVhsLIBOwNFAspNfm6Pm+Fkrov8CgoITbZCybrffv6ZS31dj3jxJjVG3jnTHMl+VcdVawDb3Bmbegyx4kUUfssTI0v/NWAewvmDdwnqIdRbqN9aFrDdpxyqbMR8LAFZQOCBcAgAAsA8AnQEqVwA/AD6RPJZHpaOiITAb+qiwEglqAMIGH0AOO35MM74T/iV9K3zAfqj+1XYW/0fqAf4DqAPQA8rf2Uv239JhPlHO/KaC07/fVeH0NZ8HpLT/jv4WBj9WQLdWk41ixyF769hkHp5Dyn6DEycSTY1ZnPOGpqc64BZqK2uWA45uSwAA/vZq3vN2kTpgXZkPYGduF4TcWarsHrsCirIgpIC4DGTp9SCYFy6S4fMaiDZzLL3U12YbXiNtu4EBLqHM6KCGgKbY6tioG62eoCSJhWRp26TQet3/i9rjWtp+9fw7XtoBi17EDcFipKzNtiOXo9WMUgzDr1L88N6zZ2bw+Yb2Szv7H8jzHbb+0/09nGM8s8Tq8PvqCVn6e+vBb9VF9vNA/r26zt+j/0r5trHojdl56BzuQgwA/+45vBjxvWcdzpEzD2yWpm/TcbJXf1XYS+8qpXcdR87hSGzwfPXE6bBgLG+O4+isKB0F9nv/NJgdTOP5DKIAISSxPj1G2YtBLE6kABBp7uYBPe+1LByRvHT/+W6n894jHlypZAEou70uJmITH+JjzD82RGvxiXe30heqrm7+4x9uSPGRaBuFkNVu5mnAh8KybR7NsYIigoUbLrwV4wMxss4RU9rWr3XaYaDy2MG3Z2D072n30v2r/k35/4dptg3HeAuJEhWElff19KNItLge
356CdSgrrtmU2VKThsz9spV7idDqVRuBVqOrjGaYYECdEH/vfEhZ3VVZFXO9gnG5jkq/Be73uMyOXDfat4RnNIa7yBU/zCPtPncJy6i7awrfMmAAA==",OGt="data:image/webp;base64,UklGRv4DAABXRUJQVlA4WAoAAAAQAAAAVgAAPgAAQUxQSH8AAAABV6AkANA2ysejrmWVFhEBl/bfhqrDbWTbanPFELHUBhaiWLFMqUO3w36lHlPkmYj+m2nbxr2GYMEgdevTgB0mScquBq2WdDTKyVV2N2ytZuMsOhs470Lyb6TwSUqMlLIepJg9/i/8tr/K9gXbLWwPsZ2F9hvbhWxvwh2L9rEAAFZQOCBYAwAAcBIAnQEqVwA/AD6RPJhIpaMiISqyDviwEglsAMruAX7drg3eOTM9u7qcR/R3S3+YD9iPWi9AG8AegB5ZvsuTGXaBGxMFPqj5jPEDR1+gloeDz9YbQb1quxTO0HiD8bAOtIVnvTy9nIKLsQnsBgLqmkrWUrJDOzt8ZyJKWz21Hf5x4d9onOkBHhIMmGEHuwK3o/XoXg+iK2Ag9h0AAP7K13iI/nf3l9dwPG+OhG/cF9xLHrWMz690NiKLNbWKUVEON3SHqOdmT6LIm/lhD7TiRqDqAKHdXVGm7Gd+LoBiIpaNgJ/rjRC40uy1iYGOKqLNkjGCCLYo7tUFGoQvayjnpzjrBWvWp89+ki4lvw8mO3d4Ka9UvOtVTcgiKJigSVjpOzH0cbjXAyYzksstDdCjp6eAKcvei6W+iabkGVzJele8jUkjqO4lga5e3hUJuA+5e9GtTrKmSIVPlHMXD1tyQYP7c0U3xll2WKoF5RZtFGMl0A7BsAn3W6/r8NV8xArLq+9Z5myxTbPYGHlJcUu1TWsdTRzeftxmyXSDR4vBUjaZ4Ehoq3RS+aGXZvCP3oajXx7CJksXmMwOJuUvIVUfXwWf3/xfve7Zm4OqTz3ZYj/AWb2TbVGNG8KIftqMiGbWGp8Or+6uQrmbNMik4GJnMH9Cq8asI6RB2EHEUNFScjXQb5Gp4SofH2ojZDHWksf1JvwFqXlcwlXK3kIEk/bDbjFWTazGlwleIIUFCV/85Ucbf5FYtI1Lxqr4EY7lTJXSaoY/UDOzl3th10Ccny1BxKTRkwgdiG+86aQD7QY2mXnTtPAz9uun+xY0IIjO1gU7oKv2XoqrPKZesrOg3uN9FvjVOwk/yO9+/ZlE3SzqxtA6UYRsLcXXq2NDY9tdBuAch3L/9O92qPb4MbZz6hdIQ/Bq2ehoZGOybdTQuRPXHsoEbwtPMV/pnchPiliAV/aG7W0UalvFwygJcwhkLEw/lT9CJW84OEH8fk1L2ERWI8e6miYAPKoITtF08uQi7ELtyZg6ieb4m+pkqoeoaHHEH9OuLSt2Uz2b7wm+guzf6FKGn6zFr1J6gH0yW/13XSyxfMYFiZ1sAAIYV3d+ZBuVqmY3WflEfrWz3aFTEXcbVP3vvpmEIQAAAA==",IGt={IFOOD:"iFood"},kGt={OFFLINE:"Pagamento via maquininha",ONLINE:"Pagamento online"},NGt={CREDIT:"Cartão de crédito",DEBIT:"Cartão de débito"},pP={AMEX:{label:"American Express",image:TGt},ELO:{label:"Elo",image:AGt},HIPERCARD:{label:"Hipercard",image:PGt},MASTERCARD:{label:"Mastercard",image:RGt},VISA:{label:"Visa",image:OGt}};function FB({payment:e}){let t="Pedido pago",r="Não solicitar pagamento na entrega";return e&&(t=`${kGt[e.paymentType]} ${IGt[e.liability]||e.liability}`,r=NGt[e.method]||e.method,e.brand&&(r=`${r} (${pP[e.brand]?.label||e.brand})`)),u.createElement("div",{className:"flex items-center space-x-16 text-gray-600"},u.createElement("div",{className:"flex items-center"},pP[e?.brand]?.image?u.createElement("img",{src:pP[e.brand]?.image,alt:pP[e.brand]?.label,className:"h-auto w-32"}):u.createElement(As,{className:"h-auto w-32"})),u.createElement("div",{className:"truncate"},u.createElement("div",{className:"truncate text-16 font-bold",title:t},t),u.createElement("div",{className:"truncate text-16",title:r},r)))}function DGt(){const e=Po(l=>l.quoteData),t=Po(l=>l.selectedPayment),r=Po(l=>l.setSelectedPayment),[n,i]=u.useState(null),a=u.useRef(null),o=()=>{i(null)},s=l=>{o(),r(l)};return e?u.createElement("div",{className:"space-y-20 rounded-8 border border-solid border-grey-border-dark p-16 text-gray-600"},u.createElement("div",{className:"grid grid-cols-1 gap-20 sm:grid-cols-2"},u.createElement(Dy,{Icon:u.createElement(jg,null),title:"Valor da entrega",value:me.formatMonetaryValue(e.quote?.netValue)}),u.createElement(Dy,{Icon:u.createElement(xGt,null),title:"Tempo de entrega",value:`${xi(e.deliveryTime?.min/60)}-${xi(e.deliveryTime?.max/60)} min`}),u.createElement(Dy,{Icon:u.createElement(T2,null),title:"Distância",value:e.distance>1e3?`${xi(e.distance)/1e3} km`:`${e.distance} m`}),u.createElement(Dy,{Icon:u.createElement(As,null),title:"Pagamento na entrega",value:e.hasPaymentMethods?"Disponível":"Não disponível"})),e.hasPaymentMethods&&u.createElement(u.Fragment,null,u.createElement("div",{ref:a,className:"flex w-full cursor-pointer items-center space-x-16 rounded-8 border-1 border-solid border-gray-200 bg-gray-50 p-12 text-16 hover:bg-gray-100",onClick:l=>{l.stopPropagation(),i(a.current)}},u.createElement("div",{className:"flex h-full flex-1 items-center space-x-16"},u.createElement(FB,{payment:t})),u.createElement(uc,{className:"text-28 text-gray-400"})),u.createElement(Zc,{anchorEl:n,open:!!n,onClose:o,getContentAnchorEl:null,autoFocus:!1,classes:{paper:"border-1 border-solid border-grey-border mt-8 shadow rounded-8 max-h-320",list:"p-0"},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t&&u.createElement(ln,{key:"reset",onClick:()=>s(null)},u.createElement(FB,null)),e.paymentMethods.filter(l=>l.id!==t?.id).sort((l,c)=>l.brand>
356c.brand?-1:1).map(l=>u.createElement(ln,{key:l.id,onClick:()=>s(l)},u.createElement(FB,{payment:l}))))),u.createElement("div",{className:"text-16 font-light"},"Cotação válida até"," ",u.createElement("strong",{className:"font-bold"},qe(e.expirationAt).isSame(qe(),"day")?qe(e.expirationAt).format("HH:mm"):qe(e.expirationAt).format("DD/MM HH:mm")),". O valor do frete será cobrado na sua fatura do iFood do mês atual.")):null}function MGt(){const e=Po(t=>t.quoteError);return e?u.createElement("div",{className:"flex items-center space-x-16 rounded-8 border-2 border-solid border-red-light p-16 text-gray-600"},u.createElement("div",null,u.createElement("div",{className:"inline-flex rounded-full bg-red-lightest p-8"},u.createElement(M3e,{className:"text-red-dark"}))),u.createElement("div",{className:"text-16 font-semibold text-red-dark"},e.message)):null}const ik=ht.create({baseURL:"https://ifood.cardapioweb.com",timeout:3e3});async function enr(e){return(await ik.post(`/v1/merchants/${e}/disableMerchant`,{},{headers:{Authorization:ht.defaults.headers.common[Fi.authHeaderKey]}})).data}async function tnr(){return(await ik.get("/v1/oauth/userCode",{headers:{Authorization:ht.defaults.headers.common[Fi.authHeaderKey]}})).data}async function rnr(e,t){return(await ik.post("/v1/oauth/authorizationCode",{authorizationCode:e,authorizationCodeVerifier:t},{headers:{Authorization:ht.defaults.headers.common[Fi.authHeaderKey]}})).data}async function nnr(e,t){const r=e==="add"?"add_ifood_merchant_ids":"remove_ifood_merchant_id",n=await ht.post("/api/v1/company/integrations/ifood",{[r]:t});if(n.status!==200||n.data.status===500)throw Error(n.data.message)}async function inr(e){const t=await ht.post("/api/v1/company/integrations/ifood",{ifood_widget_enabled:e});if(t.status!==200||t.data.status===500)throw Error(t.data.message)}async function anr(e){const t=await ht.post("/api/v1/company/integrations/ifood",{auto_close_ifood_orders_with_merchant_delivery:e});if(t.status!==200||t.data.status===500)throw Error(t.data.message)}async function LGt(e){return(await ik.get(e,{headers:{Authorization:ht.defaults.headers.common[Fi.authHeaderKey]}})).data}function FGt(e){const{data:t,isLoading:r,error:n,mutate:i}=Jc(e?`/v1/merchants/${e}/integrationState`:null,LGt,{dedupingInterval:6e4,errorRetryCount:3});return{data:t,isLoading:r,isError:n,mutate:i}}function BGt({merchantId:e,updateMerchantIds:t}){const{data:r,isLoading:n,isError:i}=FGt(e);return u.useEffect(()=>{!n&&!i&&r?.active?t(a=>[...a,r]):t(a=>a.filter(({merchantId:o})=>o!==e))},[r,i,n,e,t]),null}function zGt(){const{order:e}=gi(),{data:t,isLoading:r}=J4e(),[n,i]=u.useState([]),a=Po(g=>g.selectedMerchant),o=Po(g=>g.setSelectedMerchant),s=Po(g=>g.quoteData),l=Po(g=>g.setLoading),[c,d]=u.useState(null),f=u.useRef(null);u.useEffect(()=>{l(r)},[r,l]),u.useEffect(()=>{e.sales_channel!=="ifood"&&n.length>0&&!a?o(n[0]):e.sales_channel==="ifood"&&o({merchantId:e.ifood_merchant_id,merchantName:e.ifood_merchant_name})},[n,e,o]);const h=()=>{d(null)},p=e.sales_channel!=="ifood"&&n.length>1&&!s;return u.createElement(u.Fragment,null,t?.ifood_merchant_ids?.map(g=>u.createElement(BGt,{key:g,merchantId:g,updateMerchantIds:i})),u.createElement("div",{ref:f,className:"overflow-hidden rounded-6 border-1 border-solid border-grey-border-dark"},u.createElement("div",{className:Ft("flex w-full items-center space-x-12 px-16 py-12 text-16",p&&"cursor-pointer hover:bg-gray-50"),onClick:p?g=>{g.stopPropagation(),d(f.current)}:void 0},u.createElement("div",{className:"flex h-full flex-1 items-center space-x-24 truncate"},u.createElement("div",{className:"flex items-center"},u.createElement(II,{className:"h-auto w-32"})),u.createElement("div",{className:"flex flex-col truncate text-16"},u.createElement("span",{className:"truncate text-gray-500"},"Estabelecimento"),u.createElement("span",{className:"truncate font-bold text-gray-600"},a?.merchantName||"Carregando..."))),p&&u.createElement(uc,{className:"text-28 text-gray-400"})),p&&u.createElement(Zc,{anchorEl:c,open:!!c,onClose:h,getContentAnchorEl:null,autoFocus:!1,classes:{paper:"border-1 border-solid border-grey-border mt-8 shadow rounded-8 max-h-360",list:"p-0"},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.filter(g=>g.merchantId!==a?.merchantId).map(g=>u.createElement(ln,{key:g.merchantId,classes:{root:"p-0"}},u.createElement("div",{className:"flex w-full items-center space-x-12 px-16 py-12 text-16",onClick:()=>{h(),o(g)}},u.createElement("div",{className:"flex h-full flex-1 items-center space-x-24 truncate"},u.createElement("div",{className:"flex items-center"},u.createElement(II,{className:"h-auto w-36"})),u.createElement("div",{className:"flex flex-col truncate text-16"},u.createElement("span",{className:"truncate font-bold text-gray-600"},g.merchantName)))))))))}function HGt(){const e=Lr(),{order:t}=gi(),{mutate:r}=di(),n=Bl(),i=Po(E=>E.quoteData),a=Po(E=>E.quoteError),o=Po(E=>E.selectedPayment),s=Po(E=>E.setLoading),l=Po(E=>E.selectedMerchant),c=Po(E=>E.setQuoteData),d=Po(E=>E.setQuoteError),f=Po(E=>E.setClose),[h,p]=u.useState(!1),g=u.useCallback(async()=>{try{s(!0),c(null),d(null);const E=await pGt(t?.id,l?.merchantId);c(E)}catch(E){const S=E.response?.data?.message;
356S&&d(E.response.data),e.error(S||"Não foi possível obter a cotação de entrega")}finally{s(!1)}},[e,t?.id,l,s,c,d]),_=u.useCallback(async()=>{if(t?.sales_channel!=="ifood")try{const E=t?.delivery_address;await s3.validate(E),g()}catch{p(!0)}else g()},[g,t?.delivery_address,t?.sales_channel]),b=u.useCallback(async()=>{try{t?.payment_values?.some(S=>!["paid","authorized"].includes(S.status))&&!o&&await n({title:"Continuar sem pagamento na entrega?",description:"Você não solicitou pagamento na entrega, o entregador do iFood irá considerar o pedido como já pago.",cancellationText:"Voltar",confirmationText:"Continuar"});try{s(!0),d(null);const S=o?{method:o.method,type:o.paymentType,brand:o.brand}:null,P=await mGt(t?.id,i?.id,S,l?.merchantId);r(qn(t?.id),P,{revalidate:!1}),e.success("Solicitação enviada com sucesso!"),f()}catch(S){const P=S.response?.data?.message;P&&d(S.response.data),e.error(P||"Não foi possível obter a cotação de entrega")}finally{s(!1)}}catch{}},[e,n,r,t?.id,t?.payment_values,i?.id,l?.merchantId,o,f,s,d]);return u.createElement("div",{className:"space-y-32"},u.createElement(Fke,{open:h,onClose:()=>p(!1),afterSubmit:g}),u.createElement("div",{className:"space-y-16"},u.createElement(MGt,null),u.createElement(wGt,null),u.createElement(zGt,null),u.createElement(DGt,null)),u.createElement("div",{className:"flex items-center"},i?u.createElement(fr,{onClick:b,variant:"contained",color:"primary",size:"large",disableElevation:!0,fullWidth:!0},"Solicitar entregador"):u.createElement(fr,{onClick:_,variant:"contained",color:"primary",size:"large",disabled:!!a||!l,disableElevation:!0,fullWidth:!0},"Solicitar cotação")))}function UGt(){const e=Po(i=>i.open),t=Po(i=>i.loading),r=Po(i=>i.setClose),n=u.useCallback(()=>{r()},[r]);return u.createElement(oi,{open:e,title:"Solicitar entrega sob demanda iFood",loading:t,onClose:n,maxWidth:"sm",onSubmit:void 0,keepMounted:!1},u.createElement(HGt,null))}function VGt({order:e}){const t=Lr(),{mutate:r}=di(),[n,i]=u.useState(!1),[a,o]=u.useState(!1),[s,l]=u.useState("");u.useEffect(()=>{i(!1)},[]),u.useEffect(()=>{n&&l("")},[n]);const c=u.useCallback(()=>{i(!0)},[]),d=u.useCallback(()=>{i(!1)},[]),f=u.useCallback(async h=>{h.preventDefault();try{if(!s){t.error("Informe o motivo do cancelamento");return}o(!0),await VWt(e.id,s),await r(hs(e.id)),t.success("Entrega cancelada com sucesso!"),d()}catch(p){t.error(p.response?.data?.message||"Não foi possível cancelar a entrega")}o(!1)},[t,s,d,r,e.id]);return u.createElement("div",{className:"mt-12 flex items-center space-x-16 rounded-8 border border-solid border-gray-300 px-16 py-12 text-16"},u.createElement("div",null,u.createElement("img",{src:AY,alt:"Mottu",className:"h-auto w-40 rounded-8"})),u.createElement("div",{className:"flex-1"},u.createElement("div",null,"Entrega via ",u.createElement("strong",null,"Mottu")),e?.delivery_man_fee>=0&&u.createElement("div",null,"Valor da entrega: ",u.createElement("strong",null,me.formatMonetaryValue(e?.delivery_man_fee))),u.createElement("div",null,"Status: ",u.createElement("strong",null,e.delivery_status_label)),e.delivery_status_details&&u.createElement("div",null,e.delivery_status_details)),![Bt.canceled.status,Bt.closed.status].includes(e.status)&&["0","10","120","80"].includes(e.delivery_status)&&u.createElement(u.Fragment,null,u.createElement("div",{className:"flex items-center space-x-4"},u.createElement(Ma,{tooltip:"Cancelar entrega",onClick:c},u.createElement(Aa,null))),u.createElement(oi,{open:n,title:"Cancelar entrega",loading:a,onClose:d,maxWidth:"sm",onSubmit:f,keepMounted:!1,confirmText:"Cancelar entrega",cancelText:"Voltar"},u.createElement(Tr,{name:"reason",label:"Motivo do cancelamento",value:s,onChange:h=>l(h.target.value),variant:"outlined",multiline:!0,rows:3,required:!0,fullWidth:!0,autoFocus:!0}))),["50","70"].includes(e.delivery_status)&&u.createElement(N2,{order:e}))}var Mw={},Wve;function qGt(){if(Wve)return Mw;Wve=1;var e=$t(),t=Wt();Object.defineProperty(Mw,"__esModule",{value:!0}),Mw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement(r.Fragment,null,r.createElement("path",{d:"M12 11.39c0-.65-.39-1.23-.98-1.48L5.44 7.55c-1.48 1.68-2.32 3.7-2.8 5.45h7.75c.89 0 1.61-.72 1.61-1.
35661z"}),r.createElement("path",{d:"M21.96 11.22c-.41-4.41-4.56-7.49-8.98-7.2-2.51.16-4.44.94-5.93 2.04l4.74 2.01c1.33.57 2.2 1.87 2.2 3.32 0 1.99-1.62 3.61-3.61 3.61H2.21C2 16.31 2 17.2 2 17.2v.8c0 1.1.9 2 2 2h10c4.67 0 8.41-4.01 7.96-8.78z"})),"SportsMotorsportsRounded");return Mw.default=i,Mw}var jGt=qGt();const $Gt=et(jGt);function Uke({order:e}){const[t,r]=u.useState(!1),{data:n}=R4(),{data:i}=Hke(),a=Object.values(i||{}).some(Boolean);return!n?.length&&!a?null:u.createElement("div",{className:"mt-12 flex items-center space-x-16 rounded-8 border border-solid border-gray-300 px-16 py-12 text-16"},u.createElement($Gt,{className:"h-auto w-36 text-gray-500"}),u.createElement("div",{className:"flex-1"},e?.delivery_man?u.createElement(u.Fragment,null,u.createElement("strong",null,"Entrega própria"),u.createElement("div",null,"Entregador: ",u.createElement("strong",null,e?.delivery_man?.name)),u.createElement("div",null,"Taxa do entregador:"," ",u.createElement("strong",null,me.formatMonetaryValue(e?.delivery_man_fee))),e?.delivery_route&&u.createElement("div",null,u.createElement("strong",null,"Rota ",e?.delivery_route?.name))):u.createElement("div",{className:"flex items-center justify-between"},n?.length>0&&u.createElement(fr,{className:"normal-case",onClick:()=>r(!0)},"Atribuir entregador próprio"),u.createElement(N2,{order:e}))),e?.delivery_man&&u.createElement("div",{className:"flex items-center space-x-4"},u.createElement(Ma,{tooltip:"Editar entregador",onClick:()=>r(!0)},u.createElement(ps,null))),(n?.length>0||e?.delivery_man)&&u.createElement(VK,{open:t,deliveryFee:e?.delivery_man_fee??e?.delivery_fee??0,deliverymanID:e?.delivery_man?.id,orderId:e?.id,onClose:()=>r(!1)}))}const WGt={ifood:uGt,ifood_shipping:EGt,foody_delivery:lGt,bee_delivery:nGt,mottu:VGt,own_delivery:Uke};function GGt({order:e}){const{data:t}=J4e();if(!e||e.order_type!=="delivery")return null;const r=WGt[e.delivered_by]||Uke,n=t?.ifood_merchant_ids?.length>0&&!["closed","canceled"].includes(e?.status);return u.createElement(u.Fragment,null,u.createElement(r,{order:e}),n&&u.createElement(UGt,null))}const fp=u.forwardRef(({primary:e,secondary:t,tertiary:r,className:n,Icon:i,Action:a,onClick:o,error:s,disabled:l},c)=>{const d=f=>{o&&o(f)};return u.createElement("div",{ref:c,className:Ft(n,"flex w-full items-center space-x-12 px-16 py-12 text-16",s&&"bg-red-lightest",o&&"cursor-pointer hover:bg-gray-50",l&&"cursor-default opacity-50"),onClick:d},u.createElement("div",{className:"flex h-full flex-1 items-center space-x-24 truncate"},u.createElement("div",{className:Ft("flex items-center",s?"text-red-dark":"text-gray-400")},u.createElement(i,{color:"inherit",className:"text-32"})),u.createElement("div",{className:"flex flex-col truncate"},u.createElement("span",{className:Ft("truncate font-semibold",s?"text-red-dark":"text-gray-600")},e),t&&u.createElement("span",{className:Ft("truncate font-light",s?"text-red-light":"text-gray-500")},t),r&&u.createElement("span",{className:Ft("truncate font-light",s?"text-red-light":"text-gray-500")},r))),a)}),sy={order_type:"takeout",delivery_address:null,estimated_time:null,delivery_fee:0,delivery_man_fee:""};function KGt({open:e,onClose:t}){const r=Lr(),{mutate:n}=di(),{hasModule:i}=Ah(),[a,o]=u.useState(!1),[s,l]=u.useState(null),c=at(({globalCompany:Q})=>Q.company.flags?.work_with_delivery),d=at(({globalCompany:Q})=>Q.company?.preparation_time),[f,h]=u.useState(!1),p=_0(),[g,_]=u.useState(sy),b=u.useRef(null),E=u.useRef(null),{order:S}=gi(),P=c&&i(At.DELIVERY_MODULE),O=g?.order_type,I=g?.delivery_fee,N=g?.delivery_address,M=S.order_timing==="immediate",{data:F}=U4(e&&!S?.client?.created_by_system&&S?.client?.id),B=F?.addresses||[];u.useEffect(()=>{e&&_({order_type:S?.order_type||sy.order_type,delivery_address:S?.delivery_address||sy.delivery_address,estimated_time:S?.estimated_time||sy.estimated_time,delivery_fee:S?.delivery_fee||sy.delivery_fee,delivery_man_fee:S?.delivery_man_fee||sy.delivery_man_fee})},[e,S]);const V=(Q,ie=null)=>{if(!S?.client?.id||S?.client?.created_by_system){r.info("Para mudar para entrega, informe o cliente antes.");return}b.current=ie?{deliveryAddress:Q,deliveryFee:{value:ie}}:{deliveryAddress:Q},h(!0)},W=u.useCallback(Q=>{_(ie=>({order_type:"delivery",delivery_address:Q.deliveryAddress,delivery_fee:Q.deliveryFeeValue,delivery_man_fee:Q.deliveryFee?.delivery_man_fee,estimated_time:Q.deliveryFee?.estimated_time?Q.deliveryFee.estimated_time+(d??0):ie.estimated_time}))},[d]),$=()=>{l(null)},X=P&&B?.map(Q=>u.createElement(ln,{key:Q.id,classes:{root:"p-0"}},u.createElement(fp,{primary:`${Q.street}, ${Q.house_number||"S/N"}`,secondary:`${Q.neighborhood}, ${Q.city}/${Q.state}`,Icon:EY,onClick:()=>{$(),V(Q)}}))),re=[O==="delivery"&&N?.street&&u.createElement(ln,{key:"delivery",classes:{root:"p-0"}},u.createElement(fp,{primary:"Editar endereço",secondary:"Modifique o endereço atual",Icon:ps,onClick:()=>{$(),V(N,I)}})),O!=="takeout"&&u.createElement(ln,{key:"takeout",classes:{root:"p-0"}},u.createElement(fp,{primary:"Retirada",secondary:"O cliente retira no estabelecimento",Icon:ix,onClick:()=>{$(),_(Q=>({order_type:"takeout",estimated_time:Q.estimated_time}))}})),O!=="onsite"&&u.createElement(ln,{key:"onsite",classes:{root:"p-0"}},u.createElement(fp,{primary:"Consumo no local",secondary:"O cliente vai consumir no estabelecimento",Icon:KI,onClick:()=>{$(),_(Q=>({order_type:"onsite",estimated_time:Q.estimated_time}))}})),P&&(O!=="delivery"||N?.street)&&u.createElement(ln,{key:"delivery2",classes:{root:"p-0"}},u.createElement(fp,{primary:"Entrega",secondary:N?.street?"Informe um outro endereço":"Informe um endereço de entrega",Icon:GI,onClick:()=>{$(),V(null)}}
356)),...X||[]].filter(Boolean),ae=u.useCallback(async Q=>{Q.preventDefault(),o(!0);try{const ie=await jIe(S?.id,g);n(qn(S?.id),ie,{revalidate:!1}),p&&p(ie),t()}catch(ie){r.error(ie.response?.data?.message||"Não foi possível fazer a atualização")}o(!1)},[r,g,n,t,S?.id,p]);return u.createElement(u.Fragment,null,u.createElement(oi,{open:e,title:"Editar tipo de pedido",loading:a,onClose:t,maxWidth:"xs",onSubmit:ae,keepMounted:!1},u.createElement("div",{className:"space-y-20"},u.createElement("div",{ref:E,className:"overflow-hidden rounded-6 border-1 border-solid border-grey-border-dark"},O==="takeout"&&u.createElement(fp,{primary:"Retirada",Icon:ix,onClick:()=>{l(E.current)},Action:re.length>0&&u.createElement(uc,{className:"text-28 text-gray-400"})}),O==="onsite"&&u.createElement(fp,{primary:"Consumo no local",Icon:KI,onClick:()=>{l(E.current)},Action:re.length>0&&u.createElement(uc,{className:"text-28 text-gray-400"})}),O==="delivery"&&u.createElement(fp,{primary:N?.street?`${N.street}, ${N.house_number||"S/N"}`:"Informar endereço",secondary:N.neighborhood?`${N.neighborhood}, ${N.city}/${N.state}`:"Clique e adicione um endereço",tertiary:parseFloat(I)>=0?me.formatMonetaryValue(I):null,Icon:GI,Action:re.length>0&&u.createElement(uc,{className:"text-28 text-gray-400"}),onClick:Q=>{Q.stopPropagation(),re.length>0?l(E.current):V(N,I)}})),O==="delivery"&&u.createElement(pm,{name:"delivery_fee",value:g.delivery_fee||"",label:"Taxa de entrega",placeholder:"0,00",onChange:Q=>{const ie=Q.target.value;_(le=>({...le,delivery_fee:ie||0}))},variant:"outlined",size:"medium"}),O==="delivery"&&u.createElement(pm,{name:"delivery_man_fee",value:g.delivery_man_fee||"",label:"Taxa do entregador",placeholder:"0,00",onChange:Q=>{const ie=Q.target.value;_(le=>({...le,delivery_man_fee:ie||0}))},variant:"outlined",size:"medium"}),M&&u.createElement(iIe,{name:"estimated_time",value:g.estimated_time,label:"Tempo estimado (minutos)",placeholder:"0",onChange:Q=>{const ie=Q.target.value;_(le=>({...le,estimated_time:ie}))},variant:"outlined",size:"medium"})),u.createElement(Zc,{anchorEl:s,open:!!s,onClose:$,getContentAnchorEl:null,autoFocus:!1,classes:{paper:"border-1 border-solid border-grey-border mt-8 shadow rounded-8 max-h-360",list:"p-0"},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},re.map(Q=>Q))),u.createElement(g4e,{open:f,onClose:()=>h(!1),onSubmit:W,initData:b.current,clientId:S?.client?.id}))}const YGt={delivery:"Endereço de entrega",takeout:"Retirar no estabelecimento",onsite:"Consumir no local",closed_table:"Mesa/Comanda"};function XGt({order:e}){const{orderPermissions:t}=gi(),r=Lr(),{mutate:n}=di(),i=at(({orderListener:p})=>p?.serverDiffTimestamp),[a,o]=u.useState(!1),[s,l]=u.useState(!1),c=u.useCallback(async({latitude:p,longitude:g})=>{const _=e?.client?.id,b=e?.delivery_address;if(!(!_||!b?.id))try{await wY(_,{...b,latitude:p,longitude:g}),n(qn(e.id))}catch{r.error("Não foi possível salvar a localização")}},[e,n,r]);if(!e||!["takeout","onsite"].includes(e.order_type)&&!e.delivery_address)return null;const d=t.editOrderType&&["delivery","takeout","onsite"].includes(e.order_type),f=YGt[e.order_type],h=u.createElement("div",{className:"space-x-12"},e.order_type==="delivery"&&e.delivery_address.latitude&&e.delivery_address.longitude&&u.createElement(Ma,{tooltip:"Ver endereço no mapa",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>l(!0)},u.createElement(T2,null)),d&&u.createElement(Ma,{tooltip:"Editar tipo de pedido",padding:"p-4",tooltipProps:{placement:"top-end"},onClick:()=>o(!0)},u.createElement(ps,null)));return u.createElement("div",{className:"flex flex-col p-16 sm:flex-1"},u.createElement(Fm,{title:f,Icon:EY,Action:h}),u.createElement(GGt,{order:e}),e.order_type==="delivery"&&u.createElement("p",{className:"mt-16 text-16 font-light leading-relaxed"},u.createElement(cd,{text:`${e.delivery_address.street}, ${e.delivery_address.house_number}`},u.createElement("span",{className:"font-semibold"},e.delivery_address.street,", ",e.delivery_address.house_number," ",u.createElement("br",null))),(e.delivery_address.address_block||e.delivery_address.address_lot)&&u.createElement(u.Fragment,null,e.delivery_address.address_block&&u.createElement(cd,{text:`Quadra: ${e.delivery_address.address_block}${e.delivery_address.address_lot?", ":""}`}),e.delivery_address.address_lot&&u.createElement(cd,{text:`Lote: ${e.delivery_address.address_lot}`}),u.createElement("br",null)),u.createElement(cd,{text:e.delivery_address.neighborhood}),","," ",u.createElement(cd,{text:e.delivery_address.city})," ",e.delivery_address.zip_code&&u.createElement(cd,{text:e.delivery_address.zip_code.replace(/\D/g,"")},` (${e.delivery_address.zip_code.replace(/^(\d{5})(\d{3})$/,"$1-$2")})`),e.delivery_address.address_complement&&u.createElement(u.Fragment,null,u.createElement("br",null),u.createElement(cd,{text:e.delivery_address.address_complement})),e.delivery_address.landmark&&u.createElement(u.Fragment,null,u.createElement("br",null),u.createElement(cd,{text:e.delivery_address.landmark}))),e.order_timing!=="scheduled"&&e.estimated_time>0&&u.createElement("div",{className:"mt-12 text-16 leading-relaxed"},u.createElement("div",{className:"font-semibold"},e.order_type==="delivery"&&"Entrega prevista para",e.order_type==="takeout"&&"Retirada prevista para",e.order_type==="onsite"&&"Consumo previsto para"),u.createElement("div",{className:"font-light"},me.correctTime(e.created_at,i).add(parseInt(e.estimated_time),"minute").format("DD/MM [às] HH:mm")," ","-"," ",me.correctTime(e.created_at,i).add(parseInt(e.estimated_time+10),"minute").format("HH:mm"))),u.createElement(VY,{open:s,onClose:()=>l(!1),value:{latitude:e.delivery_address?.latitude,longitude:e.delivery_address?.longitude},onConfirm:c,title:"Localização da entrega"}),d&&u.createElement(KGt,{open:a,onClose:()=>o(!1)}))}function ZGt({open:e,onClose:t,order:r,paymentValues:n}){const i=Lr(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(!1),d=u.useRef(null),f=u.useRef(null),h=_0(),p=P2(E=>E.openDialog),g=u.useCallback(async E=>{s(!0);try{const S=await eMt(r?.id,E),P=await a(qn(r?.id));
356r?.id&&S?.id&&(ll(S)||S.payment_method===mr.pix_auto.id)&&p(r.id,S.id),h&&h(P),t()}catch(S){i.error(S.response?.data?.message||"Não foi possível fazer a atualização")}s(!1)},[i,a,t,p,h,r?.id]),_=u.useMemo(()=>({payments:n,total_order:tg((r?.order_items||[]).filter(({status:E})=>E!=="canceled"),"price")||0,discount:tg(r?.benefits||[],"value")||0,service_fee:r?.service_fee||0,additional_fee:r?.additional_fee||0,delivery_fee:r?.delivery_fee||0}),[r,n]),b=(E,S)=>{d.current=E,f.current=S??null,c(!0)};return u.createElement(oi,{open:e,title:"Adicionar pagamento",loading:o,onClose:t,maxWidth:"xs",keepMounted:!1},u.createElement(G4e,{handlePaymentMethodSelection:b}),u.createElement(Y4e,{open:l,onClose:()=>c(!1),payment:_,selectedPaymentMethodId:d.current,paymentMethodBrandId:f.current,addPayment:g}))}function QGt({payment:e,updatePayment:t}){const r=z4e(),n=Lr(),i=Bl(),{mutate:a}=di(),[o,s]=u.useState(!1),[l,c]=u.useState(null),{order:d,orderPermissions:f}=gi(),h=_0(),p=$=>{c($.currentTarget)},g=()=>{c(null)},_=jK(e),b=$K(e),E=ll(e),S=u.useCallback(()=>{i({title:"Reembolsar pagamento?",description:_?"Tem certeza que deseja reembolsar o pagamento Pix? Essa ação é irreversível.":"O estorno será feito no cartão do cliente. Essa ação é irreversível.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{const X=await(_?t3:D4e)(d?.id,e?.id);await Af(a,qn,d?.id,X),n.success("Pagamento reembolsado com sucesso!")}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao reembolsar pagamento")}s(!1)}).catch(()=>{})},[n,i,a,d?.id,e?.id,_]),P=u.useCallback(()=>{i({title:"Cancelar pagamento Pix?",description:"O pagamento Pix será cancelado e não poderá mais ser realizado. Essa ação é irreversível.",cancellationText:"Voltar",confirmationText:"Cancelar pagamento"}).then(async()=>{s(!0);try{const $=await t3(d?.id,e?.id);await Af(a,qn,d?.id,$),n.success("Pagamento Pix cancelado com sucesso!")}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao cancelar pagamento Pix")}s(!1)}).catch(()=>{})},[n,i,a,d?.id,e?.id]),O=u.useCallback(async()=>{s(!0);try{const $=await M4e(d?.id,e?.id);await Af(a,qn,d?.id,$),n.success("Status atualizado com sucesso!")}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao atualizar status")}s(!1)},[n,a,d?.id,e?.id]),I=u.useCallback(async()=>{s(!0);try{const $=await L4e(d?.id,e?.id);await Af(a,qn,d?.id,$),n.success("Status atualizado com sucesso!")}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao atualizar status")}s(!1)},[n,a,d?.id,e?.id]),N=u.useCallback(()=>{i({title:"Cancelar pagamento na maquininha?",description:"A solicitação será cancelada na maquininha. O status só muda após a confirmação da maquininha.",cancellationText:"Voltar",confirmationText:"Cancelar pagamento"}).then(async()=>{s(!0);try{const $=await F4e(d?.id,e?.id);await Af(a,qn,d?.id,$),n.success("Cancelamento solicitado. Aguarde a confirmação da maquininha.")}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao cancelar pagamento")}s(!1)}).catch(()=>{})},[n,i,a,d?.id,e?.id]),M=u.useCallback(()=>{i({title:"Estornar pagamento na maquininha?",description:"O estorno será solicitado na maquininha. O cliente precisa estar presente e passar o mesmo cartão usado no pagamento. O status só muda após a confirmação na maquininha.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{const $=await B4e(d?.id,e?.id);await Af(a,qn,d?.id,$),n.success('Estorno solicitado na maquininha. Peça ao cliente para passar o mesmo cartão do pagamento e use "Atualizar status" para acompanhar.')}catch($){const X=$.response?.data?.message||$?.message;n.error(X||"Erro ao estornar pagamento")}s(!1)}).catch(()=>{})},[n,i,a,d?.id,e?.id]),F=u.useCallback(()=>{r(d,e)},[d,e,r]),B=u.useCallback(async()=>{i({title:"Confirmar exclusão",description:"Esta operação não pode ser desfeita.",cancellationText:"Voltar",confirmationText:"Confirmar"}).then(async()=>{s(!0);try{await tMt(d?.id,e?.id);const $=await a(qn(d.id));h&&h($),n.success("Pagamento removido com sucesso")}catch($){n.error($.response?.data?.message||"Não foi possível fazer a atualização")}s(!1)}).catch(()=>{})},[n,i,a,h,d.id,e?.id]),V=u.useMemo(()=>e?.payment_type!=="online"&&!P4.includes(e?.payment_method),[e?.payment_method,e?.payment_type]),W=u.useMemo(()=>[f.editPayment&&V&&{id:"edit-payment",name:"Editar",icon:u.createElement(ps,null),onClick:t},f.removePayment&&V&&{id:"remove-payment",name:"Excluir",icon:u.createElement($p,null),onClick:B},e?.status==="paid"&&(b||_)&&{id:"refund-payment",name:"Reembolsar",icon:u.createElement(tx,null),onClick:S},_&&e?.status==="pending"&&{id:"cancel-pix-payment",name:"Cancelar pagamento",icon:u.createElement($p,null),onClick:P},(b||E)&&["paid","refunded"].includes(e?.status)&&{id:"print-payment-receipt",name:"Imprimir",icon:u.createElement(N4e,null),onClick:F},_&&KIe.includes(e?.status)&&e?.pix_expires_at&&qe().isAfter(qe(e.pix_expires_at))&&{id:"update-pix-status",name:"Atualizar status",icon:u.createElement(Wg,null),onClick:O},E&&["sent_to_payment_point","refunding","paid"].includes(e?.status)&&{id:"refresh-smart-pos",name:"Atualizar status",icon:u.createElement(Wg,null),onClick:I},E&&e?.status==="sent_to_payment_point"&&{id:"cancel-smart-pos",name:"Cancelar pagamento",icon:u.createElement($p,null),onClick:N},E&&["paid","refunding"].includes(e?.status)&&{id:"refund-smart-pos",name:"Reembolsar",icon:u.createElement(tx,null),onClick:M}
356].filter(Boolean),[f.editPayment,f.removePayment,V,t,B,b,E,e?.status,e?.pix_expires_at,_,S,P,F,O,I,N,M]);if(!f.editPayment&&!f.removePayment)return null;if(!W.length)return u.createElement(Yn,{title:"Não pode ser editado ou removido",placement:"top-end",arrow:!0,enterTouchDelay:20,classes:{tooltip:"text-14"}},u.createElement("span",null,u.createElement(cr,{disabled:!0,className:"rounded-6 p-4 text-gray-400"},u.createElement(lx,null))));if(o)return u.createElement(cr,{disabled:!0,className:"rounded-6 p-6 text-gray-400"},u.createElement(ai,{size:16,color:"inherit"}));if(W.length===1){const $=W[0];return u.createElement(Ma,{tooltip:$.name,onClick:$.onClick,color:"text-gray-400",padding:"p-4"},$.icon)}return u.createElement(u.Fragment,null,u.createElement(cr,{onClick:p,className:"rounded-6 p-4 text-gray-400"},u.createElement(lx,null)),u.createElement(Zc,{anchorEl:l,open:!!l,onClose:g,getContentAnchorEl:null,elevation:0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:"border-1 border-solid border-grey-border shadow rounded-8 text-gray-600"},keepMounted:!1},W.map($=>u.createElement(ln,{key:$.id,className:"flex items-center space-x-12 py-12 text-16",disabled:!!$.disabled,onClick:()=>{g(),$.onClick()}},$.icon,u.createElement("span",null,$.name)))))}function JGt({payment:e,updatePayment:t,onlyRead:r}){const{order:n,orderPermissions:i}=gi(),a=P2(c=>c.openDialog),o=u.useCallback(()=>{t(e)},[e,t]),s=u.useCallback(()=>{n?.id&&e?.id&&a(n.id,e.id)},[n?.id,e?.id,a]);if(!e)return null;const l=e.brand?.name||e.card_brand;return u.createElement("div",{key:e?.id,className:"space-y-4"},u.createElement("div",{className:"flex w-full items-center justify-between space-x-12"},u.createElement("div",{className:"flex items-center space-x-12"},u.createElement("div",{className:"flex flex-col"},u.createElement("span",null,e.brand?.payment_method_name||"INDEFINIDO",!e.brand?.kind&&l?` (${l})`:""),e.brand?.kind&&u.createElement(k4e,{imageKey:e.brand.kind,name:l})),e.payment_method===mr.pix_auto.id&&e.status==="pending"&&u.createElement(B1,{label:"Ver QRCode",variant:"outlined",size:"small",deleteIcon:u.createElement(X1,null),onDelete:s,onClick:s}),YIe(e)&&u.createElement(B1,{label:"Acompanhar",variant:"outlined",size:"small",deleteIcon:u.createElement(X1,null),onDelete:s,onClick:s})),u.createElement("div",{className:"flex items-center space-x-4"},!r&&u.createElement(q4e,{order:n,payment:e}),u.createElement("div",{className:"flex items-center space-x-12"},(e?.with_payment_point||mr.pix_auto.id===e?.payment_method||ll(e))&&e?.status==="paid"?u.createElement(Qs,{color:"green"},u.createElement("span",{className:"flex items-center space-x-6"},(e?.with_payment_point||ll(e))&&u.createElement(CY,{fontSize:"small"}),mr.pix_auto.id===e?.payment_method&&u.createElement(kK,{className:"h-16",color:"inherit"}),u.createElement("span",null,"Pago"))):u.createElement(Qqt,{order:n,payment:e}),u.createElement("strong",{className:"whitespace-nowrap"},me.formatMonetaryValue(e?.total||0))),(i.editPayment||i.removePayment)&&u.createElement(QGt,{payment:e,updatePayment:o}))),e.payment_method===mr.online_credit_card.id&&e.card_brand&&e.card_number&&u.createElement("div",null,"(",Nd(e.card_brand),") ",`**** ${e.card_number}`),e.payment_type==="online"&&e.status==="paid"&&u.createElement("div",null,u.createElement("strong",null,"OBS:")," Pago online, não cobrar do cliente!"),e.observation&&u.createElement("div",null,u.createElement("strong",null,"OBS:")," ",e.observation),e?.change_of>0&&u.createElement("div",null,"Troco para ",me.formatMonetaryValue(e.change_of),u.createElement("strong",null," (",me.formatMonetaryValue(e.change_of-e?.total),")")))}const eKt=u.memo(JGt);function Gve(e,t){return t?typeof t=="string"?parseFloat(t.replace(",",".")):t:null}const tKt=DY().shape({payment_method_id:rS().transform((e,t)=>t===""||t===null||t===void 0?void 0:e).typeError("Escolha uma forma de pagamento").required("Escolha uma forma de pagamento"),payment_method_brand_id:rS().transform((e,t)=>t===""||t===null||t===void 0?null:e).nullable().optional(),observation:ud().ensure().optional(),change_of:rS().typeError("Informe um número válido").transform(Gve).nullable().optional(),total:rS().typeError("Informe um número válido").transform(Gve).required()}),Kve={payment_method_id:"",payment_method_brand_id:"",observation:"",change_of:"",total:""};function rKt({open:e,onClose:t,orderId:r,selectedPayment:n}){const i=Lr(),{mutate:a}=di(),[o,s]=u.useState(!1),l=_0(),{handleSubmit:c,reset:d,setValue:f,formState:{errors:h},control:p,watch:g}=gke({mode:"onSubmit",resolver:_ke(tKt)}),_=W4e(),b=g("payment_method_id"),E=g("total"),S=me.convertNumberToFloat(g("change_of")),P=u.useMemo(()=>_.filter(F=>
356F.kind!==mr.pix_auto.id),[_]),O=u.useMemo(()=>{if(b===""||b==null)return;const F=Number(b);return _.find(B=>B.id===F)},[_,b]),I=u.useMemo(()=>(O?.brands??[]).filter(F=>!F.system_default),[O]),N=u.useMemo(()=>{if(O?.fixed_fee)return parseFloat(O.fixed_fee);if(O?.percentual_fee){const F=parseFloat(O.percentual_fee);return xi(parseFloat(E)*F/100,2)}return 0},[E,O?.fixed_fee,O?.percentual_fee]);u.useEffect(()=>{if(e)if(n){const F=n.brand.payment_method_id,V=(_.find(X=>X.id===Number(F))?.brands??[]).filter(X=>!X.system_default),W=n.brand?.id,$=V.length>0&&V.some(X=>X.id===W)?W:"";d({...Kve,payment_method_id:F,payment_method_brand_id:$,total:n.total-(n.payment_fee||0),observation:n.observation||"",change_of:n.change_of||""})}else d({...Kve})},[n,e,d,_]);const M=u.useCallback(async F=>{if(I.length>0&&!I.some(B=>B.id===F.payment_method_brand_id)){i.info("Escolha uma bandeira");return}s(!0);try{const B=_.find(X=>X.id===F.payment_method_id),V=F.payment_method_brand_id||JV(B),W={observation:F.observation,total:F.total,change_of:B?.kind===mr.money.id?F.change_of:null,payment_method:B?.kind,payment_method_id:F.payment_method_id,payment_method_brand_id:V};await qIe(r,n?.id,W);const $=await a(qn(r));l&&l($),t()}catch(B){i.error(B.response?.data?.message||"Não foi possível fazer a atualização")}s(!1)},[i,_,a,t,l,r,I,n]);return u.createElement(oi,{open:e,title:"Editar pagamento",loading:o,onClose:t,maxWidth:"xs",onSubmit:c(M),keepMounted:!1},u.createElement("div",{className:"space-y-32"},u.createElement("div",{className:"space-y-20"},u.createElement(tc,{name:"payment_method_id",control:p,render:({field:F})=>u.createElement(Tr,{...F,onChange:B=>{F.onChange(B),f("payment_method_brand_id","")},id:"payment_method_id",label:"Forma de pagamento",error:!!h.payment_method_id,helperText:h?.payment_method_id?.message,variant:"outlined",fullWidth:!0,required:!0,select:!0},P.map(B=>u.createElement(ln,{key:B.id,value:B.id},B.name)))}),I.length>0&&u.createElement(tc,{name:"payment_method_brand_id",control:p,render:({field:F})=>u.createElement(Tr,{...F,id:"payment_method_brand_id",label:"Bandeira",variant:"outlined",fullWidth:!0,required:!0,select:!0,error:!!h.payment_method_brand_id,helperText:h?.payment_method_brand_id?.message},I.map(B=>u.createElement(ln,{key:B.id,value:B.id},B.name||"Bandeira")))}),u.createElement("div",{className:"space-y-12"},u.createElement(tc,{name:"total",control:p,render:({field:F})=>u.createElement(pm,{...F,id:"total",label:"Valor pago",error:!!h.total,helperText:h?.total?.message,size:"medium",variant:"outlined",fullWidth:!0})}),N>0&&u.createElement("div",{className:"text-16 text-gray-600"},"Taxa de pagamento: ",u.createElement("strong",null,me.formatMonetaryValue(N)),".")),u.createElement(tc,{name:"observation",control:p,render:({field:F})=>u.createElement(Tr,{...F,id:"observation",label:"Observações",error:!!h.observation,helperText:h?.observation?.message,variant:"outlined",fullWidth:!0})}),O?.kind===mr.money.id&&u.createElement(tc,{name:"change_of",control:p,render:({field:F})=>u.createElement(pm,{...F,id:"change_of",label:"Troco para",error:!!h.change_of,helperText:h?.change_of?.message,size:"medium",variant:"outlined",fullWidth:!0})}),O?.kind===mr.money.id&&S>0&&S>E&&u.createElement("div",{className:"text-16 text-gray-600"},"Troco: ",u.createElement("strong",null,me.formatMonetaryValue(S-E))))))}function nKt({paymentValues:e,onlyRead:t}){const r=Lr(),[n,i]=u.useState(!1),[a,o]=u.useState(!1),s=u.useRef(null),{order:l,orderPermissions:c}=gi(),d=u.useCallback(h=>{o(!0),s.current=h},[]),f=u.useMemo(()=>{const h=l?.final_value,p=xi(e.filter(_=>!Lm.includes(_.status)).reduce((_,b)=>_+b.total,0),2);return!xi(Math.max(h-p,0),2)},[l?.final_value,e]);return e?u.createElement(u.Fragment,null,c.addPayment&&u.createElement(ZGt,{open:n,onClose:()=>i(!1),order:l,paymentValues:e}),c.editPayment&&u.createElement(rKt,{open:a,onClose:()=>{s.current=null,o(!1)},orderId:l?.id,selectedPayment:s.current}),u.createElement("div",{className:"flex flex-shrink-0 flex-col p-16"},u.createElement(Fm,{title:"Formas de pagamento",Icon:x4e,Action:c.addPayment&&u.createElement(Ma,{tooltip:f?"O valor total do pedido já foi pago":"Adicionar pagamento",padding:"p-4",tooltipProps:{placement:"top-end"},disabled:f,onClick:()=>{f?r.info("O valor total do pedido já foi pago"):i(!0)}},u.createElement(bh,null)),className:"mb-16"}),!e.length&&u.createElement("div",null,u.createElement(fr,{startIcon:u.createElement(bh,{color:"inherit"}),className:"text-gray-500",onClick:()=>i(!0)},"Adicionar pagamento")),e.length>0&&u.createElement("div",{className:"space-y-16 text-16"},e.sort((h,p)=>h.id-p.id).map(h=>u.createElement(eKt,{key:h?.id,payment:h,updatePayment:d,onlyRead:t}))))):null}const iKt=u.memo(nKt);
356function aKt(){const e=gR(h=>h.open),t=gR(h=>h.setClose),r=gR(h=>h.order),n=Uu(),i=at(({globalCompany:h})=>h.company.print_setting),a=u.useRef(!0),o=u.useCallback((h,p)=>{const _=`${p==="temporary_order"?"closed_table":p}_${h}_print_quantity`;return i?.[_]??null},[i]),s=()=>{t()},l=u.useCallback(()=>{if(!r||!a.current)return null;n(r,"standard"),a.current=!1},[r,n]),c=u.useCallback(()=>{l(),t()},[l,t]),d=h=>{h.key==="Enter"&&c()},f=!r||!o("standard",r?.order_type)>0;return u.useEffect(()=>{e&&(a.current=!0)},[e]),f?null:u.createElement(Eo,{open:e,onClose:()=>t(),maxWidth:"xs",fullWidth:!0,onKeyDown:d,disableEnforceFocus:!0,PaperProps:{className:"shadow-md rounded-12"}},u.createElement(Xc,{className:"flex flex-col items-center space-y-24 p-24"},u.createElement("div",{className:"text-20 font-bold text-gray-600"},"Reimprimir pedido?"),u.createElement("div",{className:"mb-32 flex w-full space-x-16"},u.createElement(fr,{onClick:s,color:"primary",variant:"outlined",size:"large",disableElevation:!0,fullWidth:!0},"Fechar"),u.createElement(fr,{onClick:c,color:"primary",variant:"contained",size:"large",disableElevation:!0,fullWidth:!0},"Imprimir"))))}const oKt=u.memo(aKt);function sKt({scheduledDate:e,scheduledPeriod:t,recommendedPreparationStartDate:r}){return e&&t?u.createElement("div",{className:"flex flex-shrink-0 flex-col items-center justify-center bg-gray-100 py-12"},u.createElement("span",{className:"text-20 font-bold"},"AGENDAMENTO PARA"),u.createElement("span",{className:"my-4 text-18"},qe(e,"YYYY/MM/DD").format("ddd, DD [de] MMM")," (",t.replace("-"," - "),")"),r&&u.createElement("span",{className:"mt-12 text-16"},"A preparação deste pedido deve começar dia"," ",u.createElement("strong",null,qe(r).format("DD/MM [às] HH:mm")))):null}qe.locale("pt-BR");function lKt(e){const t=at(({orderListener:o})=>o?.serverDiffTimestamp),r=at(({orderListener:o})=>o?.nowTime);if(!e||!e?.status||!e?.status_changes)return null;const n=e.status,i=Nu(e.status_changes.filter(o=>o.status!=="changed"),["id"],["desc"])[0],a=n===Bt.canceled.status&&e.cancellation_reason;return n===i?.status||n===Bt.waiting_confirmation.status&&i?.status==="created"?u.createElement(u.Fragment,null,u.createElement("div",null,u.createElement("strong",null,Bt[n].name)," há ",qe.duration(r.diff(me.correctTime(i.created_at,t))).humanize()),a&&u.createElement("div",null,"Motivo: ",a)):u.createElement(u.Fragment,null,u.createElement("div",null,u.createElement("strong",null,Bt[n].name)),a&&u.createElement("div",null,"Motivo: ",a))}function onr({order:e,onlyRead:t}){const r=at(({lastOrders:i})=>i?.loading),n=lKt(e);return e?u.createElement(UY,null,u.createElement(pMt,{order:e,onlyRead:t},u.createElement("div",{key:e.id,className:"absolute inset-0 flex flex-col text-15 text-gray-600"},u.createElement(FLt,{order:e,onlyRead:t}),u.createElement(zs,null),u.createElement("div",{className:"w-full space-y-4 px-20 py-8 text-center text-16 text-gray-800",style:{color:Bt[e.status].textColor,backgroundColor:tNt(Bt[e.status].color,.5)}},n),u.createElement(zs,null),u.createElement("div",{className:"relative flex flex-1 flex-col space-y-4 overflow-auto"},e?.change_logs?.length>0&&u.createElement(u.Fragment,null,u.createElement("div",{className:"w-full px-24 py-8 text-center font-bold text-red"},"PEDIDO MODIFICADO"),u.createElement(zs,null)),u.createElement(sKt,{scheduledDate:e.scheduled_date,scheduledPeriod:e.scheduled_period,recommendedPreparationStartDate:[Bt.scheduled_confirmed.status,Bt.waiting_confirmation.status].includes(e.status)&&e.recommended_preparation_start_date}),u.createElement(_$t,{order:e}),e.status===Bt.waiting_cancellation_approval.status&&u.createElement(JLt,{order:e}),u.createElement(n7t,{order:e}),u.createElement(D8t,{client:e.client}),u.createElement(XGt,{order:e}),u.createElement(v$t,{orderItems:e.order_items}),u.createElement(w8t,{order:e}),u.createElement(Z9t,{customFields:e.custom_fields_data}),u.createElement(iKt,{paymentValues:e.payment_values,onlyRead:t}),u.createElement(o7t,{order:e}),u.createElement(x7t,null),u.createElement(oKt,null)),u.createElement(y8t,{order:e,onlyRead:t})),r&&u.createElement("div",{className:"absolute inset-0 z-999 flex flex-col items-center justify-center bg-white opacity-75"},u.createElement(ai,{color:"primary"})))):u.createElement("div",{className:"mx-20 flex h-full flex-1 items-center justify-center text-center"},u.createElement(fo,{color:"textSecondary",variant:"h5"},"Nenhum pedido selecionado"))}var kc;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(kc||(kc={}));function ei(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(!e){var a;if(t===void 0)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;a=new Error(t.replace(/%s/g,function(){return n[o++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}var MY="dnd-core/INIT_COORDS",ak="dnd-core/BEGIN_DRAG",LY="dnd-core/PUBLISH_DRAG_SOURCE",ok="dnd-core/HOVER",sk="dnd-core/DROP",lk="dnd-core/END_DRAG";function Yve(e,t){return{type:MY,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function wR(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wR=function(r){return typeof r}:wR=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wR(e)}function cKt(e,t,r){return t.split(".").reduce(function(n,i){return n&&n[i]?n[i]:r||null},e)}function uKt(e,t){return e.filter(function(r){return r!==t})}function Vke(e){return wR(e)==="object"}function dKt(e,t){var r=new Map,n=function(o){r.set(o,r.has(o)?r.get(o)+1:1)};e.forEach(n),t.forEach(n);var i=[];return r.forEach(function(a,o){a===1&&i.push(o)}),i}function fKt(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var hKt={type:MY,payload:{clientOffset:null,sourceClientOffset:null}};function pKt(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=n.publishSource,a=i===void 0?!0:i,o=n.clientOffset,s=n.getSourceClientOffset,l=e.getMonitor(),c=e.getRegistry();e.dispatch(Yve(o)),mKt(r,l,c);var d=yKt(r,l);if(d===null){e.dispatch(hKt);return}var f=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");vKt(s),f=s(d)}e.dispatch(Yve(o,f));var h=c.getSource(d),p=h.beginDrag(l,d);gKt(p),c.pinSource(d);var g=c.getSourceType(d);return{type:ak,payload:{itemType:g,item:p,sourceId:d,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!a}}}}function mKt(e,t,r){ei(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){ei(r.getSource(n),"Expected sourceIds to be registered.")})}function vKt(e){ei(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function gKt(e){ei(Vke(e),"Item must be an object.")}function yKt(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function _Kt(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:LY}}}function cq(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function bKt(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.clientOffset;EKt(r);var a=r.slice(0),o=e.getMonitor(),s=e.getRegistry();wKt(a,o,s);var l=o.getItemType();return SKt(a,s,l),CKt(a,o,s),{type:ok,payload:{targetIds:a,clientOffset:i||null}}}}function EKt(e){ei(Array.isArray(e),"Expected targetIds to be an array.")}function wKt(e,t,r){ei(t.isDragging(),"Cannot call hover while not dragging."),ei(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var i=e[n];ei(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");var a=r.getTarget(i);ei(a,"Expected targetIds to be registered.")}}function SKt(e,t,r){for(var n=e.length-1;n>=0;n--){var i=e[n],a=t.getTargetType(i);cq(a,r)||e.splice(n,1)}}function CKt(e,t,r){e.forEach(function(n){var i=r.getTarget(n);i.hover(t,n)})}function Xve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 18,669 bytes, lines 356-357
356t%2?Xve(Object(r),!0).forEach(function(n){xKt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xve(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xKt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TKt(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),i=e.getRegistry();AKt(n);var a=OKt(n);a.forEach(function(o,s){var l=PKt(o,s,i,n),c={type:sk,payload:{dropResult:Zve(Zve({},r),l)}};e.dispatch(c)})}}function AKt(e){ei(e.isDragging(),"Cannot call drop while not dragging."),ei(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function PKt(e,t,r,n){var i=r.getTarget(e),a=i?i.drop(n,e):void 0;return RKt(a),typeof a>"u"&&(a=t===0?{}:n.getDropResult()),a}function RKt(e){ei(typeof e>"u"||Vke(e),"Drop result must either be an object or undefined.")}function OKt(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function IKt(e){return function(){var r=e.getMonitor(),n=e.getRegistry();kKt(r);var i=r.getSourceId();if(i!=null){var a=n.getSource(i,!0);a.endDrag(r,i),n.unpinSource()}return{type:lk}}}function kKt(e){ei(e.isDragging(),"Cannot call endDrag while not dragging.")}function NKt(e){return{beginDrag:pKt(e),publishDragSource:_Kt(e),hover:bKt(e),drop:TKt(e),endDrag:IKt(e)}}var DKt=function(t,r){return t===r};function MKt(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function LKt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DKt;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Qve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qve(Object(r),!0).forEach(function(n){FKt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qve(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FKt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ege={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function BKt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ege,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case MY:case ak:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case ok:return MKt(e.clientOffset,r.clientOffset)?e:Jve(Jve({},e),{},{clientOffset:r.clientOffset});case lk:case sk:return ege;default:return e}}var FY="dnd-core/ADD_SOURCE",BY="dnd-core/ADD_TARGET",zY="dnd-core/REMOVE_SOURCE",ck="dnd-core/REMOVE_TARGET";function zKt(e){return{type:FY,payload:{sourceId:e}}}function HKt(e){return{type:BY,payload:{targetId:e}}}function UKt(e){return{type:zY,payload:{sourceId:e}}}function VKt(e){return{type:ck,payload:{targetId:e}}}function tge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tge(Object(r),!0).forEach(function(n){qKt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tge(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qKt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jKt={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function $Kt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jKt,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case ak:return Ac(Ac({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case LY:return Ac(Ac({},e),{},{isSourcePublic:!0});case ok:return Ac(Ac({},e),{},{targetIds:r.targetIds});case ck:return e.targetIds.indexOf(r.targetId)===-1?e:Ac(Ac({},e),{},{targetIds:uKt(e.targetIds,r.targetId)});case sk:return Ac(Ac({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case lk:return Ac(Ac({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function WKt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case FY:case BY:return e+1;case zY:case ck:return e-1;default:return e}}var l3=[],HY=[];l3.__IS_NONE__=!0;HY.__IS_ALL__=!0;function GKt(e,t){if(e===l3)return!1;if(e===HY||typeof t>"u")return!0;var r=fKt(t,e);return r.length>0}function KKt(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case ok:break;case FY:case BY:case ck:case zY:return l3;case ak:case LY:case lk:case sk:default:return HY}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,i=t.prevTargetIds,a=i===void 0?[]:i,o=dKt(n,a),s=o.length>0||!LKt(n,a);if(!s)return l3;var l=a[a.length-1],c=n[n.length-1];return l!==c&&(l&&o.push(l),c&&o.push(c)),o}function YKt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function rge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rge(Object(r),!0).forEach(function(n){XKt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rge(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XKt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZKt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:KKt(e.dirtyHandlerIds,{type:t.type,payload:nge(nge({},t.payload),{},{prevTargetIds:cKt(e,"dragOperation.targetIds",[])})}),dragOffset:BKt(e.dragOffset,t),refCount:WKt(e.refCount,t),dragOperation:$Kt(e.dragOperation,t),stateId:YKt(e.stateId)}}function QKt(e,t){return{x:e.x+t.x,y:e.y+t.y}}function qke(e,t){return{x:e.x-t.x,y:e.y-t.y}}function JKt(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:qke(QKt(t,n),r)}function eYt(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:qke(t,r)}function tYt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rYt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nYt(e,t,r){return t&&rYt(e.prototype,t),e}var iYt=(function(){function e(t,r){tYt(this,e),this.store=t,this.registry=r}return nYt(e,[{key:"subscribeToStateChange",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},a=i.handlerIds;ei(typeof r=="function","listener must be a function."),ei(typeof a>"u"||Array.isArray(a),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,s=function(){var c=n.store.getState(),d=c.stateId;try{var f=d===o||d===o+1&&!GKt(c.dirtyHandlerIds,a);f||r()}finally{o=d}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;ei(typeof r=="function","listener must be a function.");var i=this.store.getState().dragOffset,a=function(){var s=n.store.getState().dragOffset;s!==i&&(i=s,r())};return this.store.subscribe(a)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return ei(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(ei(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(r),a=this.getItemType();return cq(i,a)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(ei(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(r),a=this.getItemType();return i!==a?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var i=n.shallow;if(!this.isDragging())return!1;var a=this.registry.getTargetType(r),o=this.getItemType();if(o&&!cq(a,o))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(r);return i?l===s.length-1:l>-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!!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 JKt(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return eYt(this.store.getState().dragOffset)}}]),e})(),aYt=0;function oYt(){return aYt++}function SR(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?SR=function(r){return typeof r}:SR=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},SR(e)}function sYt(e){ei(typeof e.canDrag=="function","Expected canDrag to be a function."),ei(typeof e.beginDrag=="function","Expected beginDrag to be a function."),ei(typeof e.endDrag=="function","Expected endDrag to be a function.")}function lYt(e){ei(typeof e.canDrop=="function","Expected canDrop to be a function."),ei(typeof e.hover=="function","Expected hover to be a function."),ei(typeof e.drop=="function","Expected beginDrag to be a function.")}function uq(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return uq(r,!1)});return}ei(typeof e=="string"||SR(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const ige=typeof globalThis<"u"?globalThis:self,jke=ige.MutationObserver||ige.WebKitMutationObserver;function $ke(e){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),e()}}}function cYt(e){let t=1;const r=new jke(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const uYt=typeof jke=="function"?cYt:$ke;class dYt{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,i=t.length-this.index;n<i;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=uYt(this.flush),this.requestErrorThrow=$ke(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class fYt{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class hYt{create(t){const r=this.freeTasks,n=r.length?r.pop():new fYt(this.onError,i=>r[r.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Wke=new dYt,pYt=new hYt(Wke.registerPendingError);function mYt(e){Wke.enqueueTask(pYt.create(e))}function vYt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gYt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yYt(e,t,r){return t&&gYt(e.prototype,t),e}function _Yt(e,t){return SYt(e)||wYt(e,t)||EYt(e,t)||bYt()}function bYt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
357In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EYt(e,t){if(e){if(typeof e=="string")return age(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return age(e,t)}}function age(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wYt(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function SYt(e){if(Array.isArray(e))return e}function CYt(e){var t=oYt().toString();switch(e){case kc.SOURCE:return"S".concat(t);case kc.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function oge(e){switch(e[0]){case"S":return kc.SOURCE;case"T":return kc.TARGET;default:ei(!1,"Cannot parse handler ID: ".concat(e))}}function sge(e,t){var r=e.entries(),n=!1;do{var i=r.next(),a=i.done,o=_Yt(i.value,2),s=o[1];if(s===t)return!0;n=!!a}while(!n);return!1}var xYt=(function(){function e(t){vYt(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}return yYt(e,[{key:"addSource",value:function(r,n){uq(r),sYt(n);var i=this.addHandler(kc.SOURCE,r,n);return this.store.dispatch(zKt(i)),i}},{key:"addTarget",value:function(r,n){uq(r,!0),lYt(n);var i=this.addHandler(kc.TARGET,r,n);return this.store.dispatch(HKt(i)),i}},{key:"containsHandler",value:function(r){return sge(this.dragSources,r)||sge(this.dropTargets,r)}},{key:"getSource",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ei(this.isSourceId(r),"Expected a valid source ID.");var i=n&&r===this.pinnedSourceId,a=i?this.pinnedSource:this.dragSources.get(r);return a}},{key:"getTarget",value:function(r){return ei(this.isTargetId(r),"Expected a valid target ID."),this.dropTargets.get(r)}},{key:"getSourceType",value:function(r){return ei(this.isSourceId(r),"Expected a valid source ID."),this.types.get(r)}},{key:"getTargetType",value:function(r){return ei(this.isTargetId(r),"Expected a valid target ID."),this.types.get(r)}},{key:"isSourceId",value:function(r){var n=oge(r);return n===kc.SOURCE}},{key:"isTargetId",value:function(r){var n=oge(r);return n===kc.TARGET}},{key:"removeSource",value:function(r){var n=this;ei(this.getSource(r),"Expected an existing source."),this.store.dispatch(UKt(r)),mYt(function(){n.dragSources.delete(r),n.types.delete(r)})}},{key:"removeTarget",value:function(r){ei(this.getTarget(r),"Expected an existing target."),this.store.dispatch(VKt(r)),this.dropTargets.delete(r),this.types.delete(r)}},{key:"pinSource",value:function(r){var n=this.getSource(r);ei(n,"Expected an existing source."),this.pinnedSourceId=r,this.pinnedSource=n}},{key:"unpinSource",value:function(){ei(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(r,n,i){var a=CYt(r);return this.types.set(a,n),r===kc.SOURCE?this.dragSources.set(a,i):r===kc.TARGET&&this.dropTargets.set(a,i),a}}]),e})();function TYt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AYt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PYt(e,t,r){return t&&AYt(e.prototype,t),e}function RYt(e){var t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return zK(ZKt,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var OYt=(function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;TYt(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var i=t.store.getState().refCount>0;t.backend&&(i&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!i&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=RYt(r);this.store=n,this.monitor=new iYt(n,new xYt(n)),n.subscribe(this.handleRefCountChange)}return PYt(e,[{key:"receiveBackend",value:function(r){this.backend=r}},{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 r=this,n=this.store.dispatch;function i(o){return function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=o.apply(r,l);typeof d<"u"&&n(d)}}var a=NKt(this);return Object.keys(a).reduce(function(o,s){var l=a[s];return o[s]=i(l),o},{})}},{key:"dispatch",value:function(r){this.store.dispatch(r)}}]),e})();function IYt(e,t,r,n){var i=new OYt(n),a=e(i,t,r);return i.receiveBackend(a),i}var kYt=x.createContext({dragDropManager:void 0});function NYt(e,t,r,n){return{dragDropManager:IYt(e,t,r,n)}}function DYt(e,t){return BYt(e)||FYt(e,t)||LYt(e,t)||MYt()}
357function MYt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
358In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LYt(e,t){if(e){if(typeof e=="string")return lge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lge(e,t)}}function lge(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FYt(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function BYt(e){if(Array.isArray(e))return e}function zYt(e,t){if(e==null)return{};var r=HYt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HYt(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var BB=0,Gke=x.memo(function(e){var t=e.children,r=zYt(e,["children"]),n=UYt(r),i=DYt(n,2),a=i[0],o=i[1];return x.useEffect(function(){return o&&BB++,function(){if(o&&(BB--,BB===0)){var s=Kke();s[CR]=null}}},[]),x.createElement(kYt.Provider,{value:a},t)});Gke.displayName="DndProvider";function UYt(e){if("manager"in e){var t={dragDropManager:e.manager};return[t,!1]}var r=VYt(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[r,n]}var CR=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function VYt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kke(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t;return i[CR]||(i[CR]=NYt(e,t,r,n)),i[CR]}function Kke(){return typeof globalThis<"u"?globalThis:window}function cge(e){return e.replace(/\s+/g," ").replace(/[\u200B\u00A0\u200A\u2009\u2002\u2003\n\r\f\v]+/g,"").trim()}const qYt=({open:e,options:t,onCancel:r,onConfirm:n,onClose:i})=>{const{title:a,description:o,confirmationText:s,cancellationText:l,securityKey:c=null}=t,[d,f]=u.useState("");u.useEffect(()=>{e&&f("")},[e]);const h=u.useMemo(()=>{if(!c)return!0;const p=cge(d),g=cge(c);return p===g},[d,c]);return u.createElement(Eo,{open:e,onClose:i,PaperProps:{className:"shadow-md rounded-12"},maxWidth:"xs"},a&&u.createElement("div",{className:"flex flex-shrink-0 items-center justify-between p-20 pb-16"},u.createElement("span",{className:"text-18 font-bold text-gray-700"},a)),o&&u.createElement("div",{className:"space-y-24 px-20 py-16"},u.createElement("div",{className:"whitespace-pre-wrap text-16 text-gray-600"},o),c&&u.createElement("div",{className:"flex flex-col space-y-12"},u.createElement("span",{className:"text-16 text-gray-600"},"Digite ",u.createElement("strong",null,c)," abaixo para prosseguir com a ação"),u.createElement(Tr,{value:d,onChange:p=>f(p.target.value),variant:"outlined",size:"small",fullWidth:!0,autoFocus:!0}))),u.createElement("div",{className:"flex items-center justify-end space-x-16 p-20"},u.createElement(fr,{variant:"outlined",onClick:r,disableElevation:!0},l),u.createElement(fr,{color:"primary",variant:"contained",onClick:n,disabled:!h,disableElevation:!0},s)))},uge={title:"Você tem certeza?",description:"",confirmationText:"Sim",cancellationText:"Cancelar"},UY=({children:e})=>
358{const[t,r]=x.useState({...uge}),[n,i]=x.useState([]),[a,o]=n,s=x.useCallback((f={})=>new Promise((h,p)=>{r({...uge,...f}),i([h,p])}),[]),l=x.useCallback(()=>{i([])},[]),c=x.useCallback(()=>{o&&o(),l()},[o,l]),d=x.useCallback(()=>{a&&a(),l()},[a,l]);return u.createElement(x.Fragment,null,u.createElement(YPe.Provider,{value:s},e),u.createElement(qYt,{open:n.length===2,options:t,onClose:c,onCancel:c,onConfirm:d}))};function jYt(){return sessionStorage.getItem(Fi.accessTokenStorageKey)}const snr=x.createContext();var nS={exports:{}},$Yt=nS.exports,dge;function WYt(){return dge||(dge=1,(function(e,t){(function(r,n){n(t)})($Yt,(function(r){var n="1.9.4";function i(m){var C,D,j,J;for(D=1,j=arguments.length;D<j;D++){J=arguments[D];for(C in J)m[C]=J[C]}return m}var a=Object.create||(function(){function m(){}return function(C){return m.prototype=C,new m}})();function o(m,C){var D=Array.prototype.slice;if(m.bind)return m.bind.apply(m,D.call(arguments,1));var j=D.call(arguments,2);return function(){return m.apply(C,j.length?j.concat(D.call(arguments)):arguments)}}var s=0;function l(m){return"_leaflet_id"in m||(m._leaflet_id=++s),m._leaflet_id}function c(m,C,D){var j,J,_e,He;return He=function(){j=!1,J&&(_e.apply(D,J),J=!1)},_e=function(){j?J=arguments:(m.apply(D,arguments),setTimeout(He,C),j=!0)},_e}function d(m,C,D){var j=C[1],J=C[0],_e=j-J;return m===j&&D?m:((m-J)%_e+_e)%_e+J}function f(){return!1}function h(m,C){if(C===!1)return m;var D=Math.pow(10,C===void 0?6:C);return Math.round(m*D)/D}function p(m){return m.trim?m.trim():m.replace(/^\s+|\s+$/g,"")}function g(m){return p(m).split(/\s+/)}function _(m,C){Object.prototype.hasOwnProperty.call(m,"options")||(m.options=m.options?a(m.options):{});for(var D in C)m.options[D]=C[D];return m.options}function b(m,C,D){var j=[];for(var J in m)j.push(encodeURIComponent(D?J.toUpperCase():J)+"="+encodeURIComponent(m[J]));return(!C||C.indexOf("?")===-1?"?":"&")+j.join("&")}var E=/\{ *([\w_ -]+) *\}/g;function S(m,C){return m.replace(E,function(D,j){var J=C[j];if(J===void 0)throw new Error("No value provided for variable "+D);return typeof J=="function"&&(J=J(C)),J})}var P=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"};function O(m,C){for(var D=0;D<m.length;D++)if(m[D]===C)return D;return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function N(m){return window["webkit"+m]||window["moz"+m]||window["ms"+m]}var M=0;function F(m){var C=+new Date,D=Math.max(0,16-(C-M));return M=C+D,window.setTimeout(m,D)}var B=window.requestAnimationFrame||N("RequestAnimationFrame")||F,V=window.cancelAnimationFrame||N("CancelAnimationFrame")||N("CancelRequestAnimationFrame")||function(m){window.clearTimeout(m)};function W(m,C,D){if(D&&B===F)m.call(C);else return B.call(window,o(m,C))}function $(m){m&&V.call(window,m)}var X={__proto__:null,extend:i,create:a,bind:o,get lastId(){return s},stamp:l,throttle:c,wrapNum:d,falseFn:f,formatNum:h,trim:p,splitWords:g,setOptions:_,getParamString:b,template:S,isArray:P,indexOf:O,emptyImageUrl:I,requestFn:B,cancelFn:V,requestAnimFrame:W,cancelAnimFrame:$};function re(){}re.extend=function(m){var C=function(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},D=C.__super__=this.prototype,j=a(D);j.constructor=C,C.prototype=j;for(var J in this)Object.prototype.hasOwnProperty.call(this,J)&&J!=="prototype"&&J!=="__super__"&&(C[J]=this[J]);return m.statics&&i(C,m.statics),m.includes&&(ae(m.includes),i.apply(null,[j].concat(m.includes))),i(j,m),delete j.statics,delete j.includes,j.options&&(j.options=D.options?a(D.options):{},i(j.options,m.options)),j._initHooks=[],j.callInitHooks=function(){if(!this._initHooksCalled){D.callInitHooks&&D.callInitHooks.call(this),this._initHooksCalled=!0;for(var _e=0,He=j._initHooks.length;_e<He;_e++)j._initHooks[_e].call(this)}},C},re.include=function(m){var C=this.prototype.options;return i(this.prototype,m),m.options&&(this.prototype.options=C,this.mergeOptions(m.options)),this},re.mergeOptions=function(m){return i(this.prototype.options,m),this}
358,re.addInitHook=function(m){var C=Array.prototype.slice.call(arguments,1),D=typeof m=="function"?m:function(){this[m].apply(this,C)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(D),this};function ae(m){if(!(typeof L>"u"||!L||!L.Mixin)){m=P(m)?m:[m];for(var C=0;C<m.length;C++)m[C]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Q={on:function(m,C,D){if(typeof m=="object")for(var j in m)this._on(j,m[j],C);else{m=g(m);for(var J=0,_e=m.length;J<_e;J++)this._on(m[J],C,D)}return this},off:function(m,C,D){if(!arguments.length)delete this._events;else if(typeof m=="object")for(var j in m)this._off(j,m[j],C);else{m=g(m);for(var J=arguments.length===1,_e=0,He=m.length;_e<He;_e++)J?this._off(m[_e]):this._off(m[_e],C,D)}return this},_on:function(m,C,D,j){if(typeof C!="function"){console.warn("wrong listener type: "+typeof C);return}if(this._listens(m,C,D)===!1){D===this&&(D=void 0);var J={fn:C,ctx:D};j&&(J.once=!0),this._events=this._events||{},this._events[m]=this._events[m]||[],this._events[m].push(J)}},_off:function(m,C,D){var j,J,_e;if(this._events&&(j=this._events[m],!!j)){if(arguments.length===1){if(this._firingCount)for(J=0,_e=j.length;J<_e;J++)j[J].fn=f;delete this._events[m];return}if(typeof C!="function"){console.warn("wrong listener type: "+typeof C);return}
358var He=this._listens(m,C,D);if(He!==!1){var lt=j[He];this._firingCount&&(lt.fn=f,this._events[m]=j=j.slice()),j.splice(He,1)}}},fire:function(m,C,D){if(!this.listens(m,D))return this;var j=i({},C,{type:m,target:this,sourceTarget:C&&C.sourceTarget||this});if(this._events){var J=this._events[m];if(J){this._firingCount=this._firingCount+1||1;for(var _e=0,He=J.length;_e<He;_e++){var lt=J[_e],_t=lt.fn;lt.once&&this.off(m,_t,lt.ctx),_t.call(lt.ctx||this,j)}this._firingCount--}}return D&&this._propagateEvent(j),this},listens:function(m,C,D,j){typeof m!="string"&&console.warn('"string" type argument expected');var J=C;typeof C!="function"&&(j=!!C,J=void 0,D=void 0);var _e=this._events&&this._events[m];if(_e&&_e.length&&this._listens(m,J,D)!==!1)return!0;if(j){for(var He in this._eventParents)if(this._eventParents[He].listens(m,C,D,j))return!0}return!1},_listens:function(m,C,D){if(!this._events)return!1;var j=this._events[m]||[];if(!C)return!!j.length;D===this&&(D=void 0);for(var J=0,_e=j.length;J<_e;J++)if(j[J].fn===C&&j[J].ctx===D)return J;return!1},once:function(m,C,D){if(typeof m=="object")for(var j in m)this._on(j,m[j],C,!0);else{m=g(m);for(var J=0,_e=m.length;J<_e;J++)this._on(m[J],C,D,!0)}return this},addEventParent:function(m){return this._eventParents=this._eventParents||{},this._eventParents[l(m)]=m,this},removeEventParent:function(m){return this._eventParents&&delete this._eventParents[l(m)],this},_propagateEvent:function(m){for(var C in this._eventParents)this._eventParents[C].fire(m.type,i({layer:m.target,propagatedFrom:m.target},m),!0)}};Q.addEventListener=Q.on,Q.removeEventListener=Q.clearAllEventListeners=Q.off,Q.addOneTimeEventListener=Q.once,Q.fireEvent=Q.fire,Q.hasEventListeners=Q.listens;var ie=re.extend(Q);function le(m,C,D){this.x=D?Math.round(m):m,this.y=D?Math.round(C):C}var fe=Math.trunc||function(m){return m>0?Math.floor(m):Math.ceil(m)};le.prototype={clone:function(){return new le(this.x,this.y)},add:function(m){return this.clone()._add(de(m))},_add:function(m){return this.x+=m.x,this.y+=m.y,this},subtract:function(m){return this.clone()._subtract(de(m))},_subtract:function(m){return this.x-=m.x,this.y-=m.y,this},divideBy:function(m){return this.clone()._divideBy(m)},_divideBy:function(m){return this.x/=m,this.y/=m,this},multiplyBy:function(m){return this.clone()._multiplyBy(m)},_multiplyBy:function(m){return this.x*=m,this.y*=m,this},scaleBy:function(m){return new le(this.x*m.x,this.y*m.y)},unscaleBy:function(m){return new le(this.x/m.x,this.y/m.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=fe(this.x),this.y=fe(this.y),this},distanceTo:function(m){m=de(m);var C=m.x-this.x,D=m.y-this.y;return Math.sqrt(C*C+D*D)},equals:function(m){return m=de(m),m.x===this.x&&m.y===this.y},contains:function(m){return m=de(m),Math.abs(m.x)<=Math.abs(this.x)&&Math.abs(m.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function de(m,C,D){return m instanceof le?m:P(m)?new le(m[0],m[1]):m==null?m:typeof m=="object"&&"x"in m&&"y"in m?new le(m.x,m.y):new le(m,C,D)}function ge(m,C){if(m)for(var D=C?[m,C]:m,j=0,J=D.length;j<J;j++)this.extend(D[j])}ge.prototype={extend:function(m){var C,D;if(!m)return this;if(m instanceof le||typeof m[0]=="number"||"x"in m)C=D=de(m);else if(m=Ae(m),C=m.min,D=m.max,!C||!D)return this;return!this.min&&!this.max?(this.min=C.clone(),this.max=D.clone()):(this.min.x=Math.min(C.x,this.min.x),this.max.x=Math.max(D.x,this.max.x),this.min.y=Math.min(C.y,this.min.y),this.max.y=Math.max(D.y,this.max.y)),this},getCenter:function(m){return de((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,m)},getBottomLeft:function(){return de(this.min.x,this.max.y)},getTopRight:function(){return de(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)}
358,contains:function(m){var C,D;return typeof m[0]=="number"||m instanceof le?m=de(m):m=Ae(m),m instanceof ge?(C=m.min,D=m.max):C=D=m,C.x>=this.min.x&&D.x<=this.max.x&&C.y>=this.min.y&&D.y<=this.max.y},intersects:function(m){m=Ae(m);var C=this.min,D=this.max,j=m.min,J=m.max,_e=J.x>=C.x&&j.x<=D.x,He=J.y>=C.y&&j.y<=D.y;return _e&&He},overlaps:function(m){m=Ae(m);var C=this.min,D=this.max,j=m.min,J=m.max,_e=J.x>C.x&&j.x<D.x,He=J.y>C.y&&j.y<D.y;return _e&&He},isValid:function(){return!!(this.min&&this.max)},pad:function(m){var C=this.min,D=this.max,j=Math.abs(C.x-D.x)*m,J=Math.abs(C.y-D.y)*m;return Ae(de(C.x-j,C.y-J),de(D.x+j,D.y+J))},equals:function(m){return m?(m=Ae(m),this.min.equals(m.getTopLeft())&&this.max.equals(m.getBottomRight())):!1}};function Ae(m,C){return!m||m instanceof ge?m:new ge(m,C)}function Fe(m,C){if(m)for(var D=C?[m,C]:m,j=0,J=D.length;j<J;j++)this.extend(D[j])}Fe.prototype={extend:function(m){var C=this._southWest,D=this._northEast,j,J;if(m instanceof ce)j=m,J=m;else if(m instanceof Fe){if(j=m._southWest,J=m._northEast,!j||!J)return this}else return m?this.extend(pe(m)||Pe(m)):this;return!C&&!D?(this._southWest=new ce(j.lat,j.lng),this._northEast=new ce(J.lat,J.lng)):(C.lat=Math.min(j.lat,C.lat),C.lng=Math.min(j.lng,C.lng),D.lat=Math.max(J.lat,D.lat),D.lng=Math.max(J.lng,D.lng)),this},pad:function(m){var C=this._southWest,D=this._northEast,j=Math.abs(C.lat-D.lat)*m,J=Math.abs(C.lng-D.lng)*m;return new Fe(new ce(C.lat-j,C.lng-J),new ce(D.lat+j,D.lng+J))},getCenter:function(){return new ce((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new ce(this.getNorth(),this.getWest())},getSouthEast:function(){return new ce(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(m){typeof m[0]=="number"||m instanceof ce||"lat"in m?m=pe(m):m=Pe(m);var C=this._southWest,D=this._northEast,j,J;
358return m instanceof Fe?(j=m.getSouthWest(),J=m.getNorthEast()):j=J=m,j.lat>=C.lat&&J.lat<=D.lat&&j.lng>=C.lng&&J.lng<=D.lng},intersects:function(m){m=Pe(m);var C=this._southWest,D=this._northEast,j=m.getSouthWest(),J=m.getNorthEast(),_e=J.lat>=C.lat&&j.lat<=D.lat,He=J.lng>=C.lng&&j.lng<=D.lng;return _e&&He},overlaps:function(m){m=Pe(m);var C=this._southWest,D=this._northEast,j=m.getSouthWest(),J=m.getNorthEast(),_e=J.lat>C.lat&&j.lat<D.lat,He=J.lng>C.lng&&j.lng<D.lng;return _e&&He},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(m,C){return m?(m=Pe(m),this._southWest.equals(m.getSouthWest(),C)&&this._northEast.equals(m.getNorthEast(),C)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Pe(m,C){return m instanceof Fe?m:new Fe(m,C)}function ce(m,C,D){if(isNaN(m)||isNaN(C))throw new Error("Invalid LatLng object: ("+m+", "+C+")");this.lat=+m,this.lng=+C,D!==void 0&&(this.alt=+D)}ce.prototype={equals:function(m,C){if(!m)return!1;m=pe(m);var D=Math.max(Math.abs(this.lat-m.lat),Math.abs(this.lng-m.lng));return D<=(C===void 0?1e-9:C)},toString:function(m){return"LatLng("+h(this.lat,m)+", "+h(this.lng,m)+")"},distanceTo:function(m){return De.distance(this,pe(m))},wrap:function(){return De.wrapLatLng(this)},toBounds:function(m){var C=180*m/40075017,D=C/Math.cos(Math.PI/180*this.lat);return Pe([this.lat-C,this.lng-D],[this.lat+C,this.lng+D])},clone:function(){return new ce(this.lat,this.lng,this.alt)}};function pe(m,C,D){return m instanceof ce?m:P(m)&&typeof m[0]!="object"?m.length===3?new ce(m[0],m[1],m[2]):m.length===2?new ce(m[0],m[1]):null:m==null?m:typeof m=="object"&&"lat"in m?new ce(m.lat,"lng"in m?m.lng:m.lon,m.alt):C===void 0?null:new ce(m,C,D)}var Ne={latLngToPoint:function(m,C){var D=this.projection.project(m),j=this.scale(C);return this.transformation._transform(D,j)},pointToLatLng:function(m,C){var D=this.scale(C),j=this.transformation.untransform(m,D);return this.projection.unproject(j)},project:function(m){return this.projection.project(m)},unproject:function(m){return this.projection.unproject(m)},scale:function(m){return 256*Math.pow(2,m)},zoom:function(m){return Math.log(m/256)/Math.LN2},getProjectedBounds:function(m){if(this.infinite)return null;var C=this.projection.bounds,D=this.scale(m),j=this.transformation.transform(C.min,D),J=this.transformation.transform(C.max,D);return new ge(j,J)},infinite:!1,wrapLatLng:function(m){var C=this.wrapLng?d(m.lng,this.wrapLng,!0):m.lng,D=this.wrapLat?d(m.lat,this.wrapLat,!0):m.lat,j=m.alt;return new ce(D,C,j)},wrapLatLngBounds:function(m){var C=m.getCenter(),D=this.wrapLatLng(C),j=C.lat-D.lat,J=C.lng-D.lng;if(j===0&&J===0)return m;
358var _e=m.getSouthWest(),He=m.getNorthEast(),lt=new ce(_e.lat-j,_e.lng-J),_t=new ce(He.lat-j,He.lng-J);return new Fe(lt,_t)}},De=i({},Ne,{wrapLng:[-180,180],R:6371e3,distance:function(m,C){var D=Math.PI/180,j=m.lat*D,J=C.lat*D,_e=Math.sin((C.lat-m.lat)*D/2),He=Math.sin((C.lng-m.lng)*D/2),lt=_e*_e+Math.cos(j)*Math.cos(J)*He*He,_t=2*Math.atan2(Math.sqrt(lt),Math.sqrt(1-lt));return this.R*_t}}),Ve=6378137,Ke={R:Ve,MAX_LATITUDE:85.0511287798,project:function(m){var C=Math.PI/180,D=this.MAX_LATITUDE,j=Math.max(Math.min(D,m.lat),-D),J=Math.sin(j*C);return new le(this.R*m.lng*C,this.R*Math.log((1+J)/(1-J))/2)},unproject:function(m){var C=180/Math.PI;return new ce((2*Math.atan(Math.exp(m.y/this.R))-Math.PI/2)*C,m.x*C/this.R)},bounds:(function(){var m=Ve*Math.PI;return new ge([-m,-m],[m,m])})()};function Qe(m,C,D,j){if(P(m)){this._a=m[0],this._b=m[1],this._c=m[2],this._d=m[3];return}this._a=m,this._b=C,this._c=D,this._d=j}Qe.prototype={transform:function(m,C){return this._transform(m.clone(),C)},_transform:function(m,C){return C=C||1,m.x=C*(this._a*m.x+this._b),m.y=C*(this._c*m.y+this._d),m},untransform:function(m,C){return C=C||1,new le((m.x/C-this._b)/this._a,(m.y/C-this._d)/this._c)}};function Ue(m,C,D,j){return new Qe(m,C,D,j)}var ut=i({},De,{code:"EPSG:3857",projection:Ke,transformation:(function(){var m=.5/(Math.PI*Ke.R);return Ue(m,.5,-m,.5)})()}),We=i({},ut,{code:"EPSG:900913"});function ke(m){return document.createElementNS("http://www.w3.org/2000/svg",m)}function Le(m,C){var D="",j,J,_e,He,lt,_t;for(j=0,_e=m.length;j<_e;j++){for(lt=m[j],J=0,He=lt.length;J<He;J++)_t=lt[J],D+=(J?"L":"M")+_t.x+" "+_t.y;D+=C?jt.svg?"z":"x":""}return D||"M0 0"}var Be=document.documentElement.style,Ze="ActiveXObject"in window,Et=Ze&&!document.addEventListener,Yt="msLaunchUri"in navigator&&!("documentMode"in document),sr=wr("webkit"),Kt=wr("android"),Qt=wr("android 2")||wr("android 3"),qt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),hr=Kt&&wr("Google")&&qt<537&&!("AudioNode"in window),rr=!!window.opera,tr=!Yt&&wr("chrome"),dt=wr("gecko")&&!sr&&!rr&&!Ze,bt=!tr&&wr("safari"),nr=wr("phantom"),Ee="OTransition"in Be,Oe=navigator.platform.indexOf("Win")===0,Re=Ze&&"transition"in Be,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Qt,mt="MozPerspective"in Be,st=!window.L_DISABLE_3D&&(Re||pt||mt)&&!Ee&&!nr,ze=typeof orientation<"u"||wr("mobile"),it=ze&&sr,Je=ze&&pt,Jt=!window.PointerEvent&&window.MSPointerEvent,pr=!!(window.PointerEvent||Jt),Fr="ontouchstart"in window||!!window.TouchEvent,Or=!window.L_NO_TOUCH&&(Fr||pr),vn=ze&&rr,cn=ze&&dt,Xr=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Zr=(function(){var m=!1;try{var C=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("testPassiveEventSupport",f,C),window.removeEventListener("testPassiveEventSupport",f,C)}catch{}return m})(),fn=(function(){return!!document.createElement("canvas").getContext})(),vs=!!(document.createElementNS&&ke("svg").createSVGRect),Ar=!!vs&&(function(){var m=document.createElement("div");return m.innerHTML="<svg/>",(m.firstChild&&m.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Ir=!vs&&(function(){try{var m=document.createElement("div");m.innerHTML='<v:shape adj="1"/>';var C=m.firstChild;return C.style.behavior="url(#default#VML)",C&&typeof C.adj=="object"}catch{return!1}})(),Ln=navigator.platform.indexOf("Mac")===0,Wn=navigator.platform.indexOf("Linux")===0;function wr(m){return navigator.userAgent.toLowerCase().indexOf(m)>=0}var jt={ie:Ze,ielt9:Et,edge:Yt,webkit:sr,android:Kt,android23:Qt,androidStock:hr,opera:rr,chrome:tr,gecko:dt,safari:bt,phantom:nr,opera12:Ee,win:Oe,ie3d:Re,webkit3d:pt,gecko3d:mt,any3d:st,mobile:ze,mobileWebkit:it,mobileWebkit3d:Je,msPointer:Jt,pointer:pr,touch:Or,touchNative:Fr,mobileOpera:vn,mobileGecko:cn,retina:Xr,passiveEvents:Zr,canvas:fn,svg:vs,vml:Ir,inlineSvg:Ar,mac:Ln,linux:Wn},gn=jt.msPointer?"MSPointerDown":"pointerdown",Xa=jt.msPointer?"MSPointerMove":"pointermove",la=jt.msPointer?"MSPointerUp":"pointerup",si=jt.msPointer?"MSPointerCancel":"pointercancel",Ho={touchstart:gn,touchmove:Xa,touchend:la,touchcancel:si},gs={touchstart:Ul,touchmove:Hl,touchend:Hl,touchcancel:Hl},ga={},ya=!1;function Ui(m,C,D){return C==="touchstart"&&pl(),gs[C]?(D=gs[C].bind(this,D),m.addEventListener(Ho[C],D,!1),D):(console.warn("wrong event specified:",C),f)}function rs(m,C,D){if(!Ho[C]){console.warn("wrong event specified:",C);return}m.removeEventListener(Ho[C],D,!1)}function Za(m){ga[m.pointerId]=m}function Io(m){ga[m.pointerId]&&(ga[m.pointerId]=m)}function hl(m){delete ga[m.pointerId]}function pl(){ya||(document.addEventListener(gn,Za,!0),document.addEventListener(Xa,Io,!0),document.addEventListener(la,hl,!0),document.addEventListener(si,hl,!0),ya=!0)}function Hl(m,C){if(C.pointerType!==(C.MSPOINTER_TYPE_MOUSE||"mouse")){C.touches=[];for(var D in ga)C.touches.push(ga[D]);C.changedTouches=[C],m(C)}}function Ul(m,C){C.MSPOINTER_TYPE_TOUCH&&C.pointerType===C.MSPOINTER_TYPE_TOUCH&&Ja(C),Hl(m,C)}function qu(m){var C={},D,j;for(j in m)D=m[j],C[j]=D&&D.bind?D.bind(m):D;return m=C,C.type="dblclick",C.detail=2,C.isTrusted=!1,C._simulated=!0,C}var wo=200;function Uo(m,C){m.addEventListener("dblclick",C);var D=0,j;function J(_e){if(_e.detail!==1){j=_e.detail;return}if(!(_e.pointerType==="mouse"||_e.sourceCapabilities&&!_e.sourceCapabilities.firesTouchEvents)){var He=eo(_e);if(!(He.some(function(_t){return _t instanceof HTMLLabelElement&&_t.attributes.for})&&!He.some(function(_t){return _t instanceof HTMLInputElement||_t instanceof HTMLSelectElement}))){var lt=Date.now();lt-D<=wo?(j++,j===2&&C(qu(_e))):j=1,D=lt}}}return m.addEventListener("click",J),{dblclick:C,simDblclick:J}}function ju(m,C){m.removeEventListener("dblclick",C.dblclick),m.removeEventListener("click",C.simDblclick)}var Vl=Ri(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ql=Ri(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_c=ql==="webkitTransition"||ql==="OTransition"?ql+"End":"transitionend";function js(m){return typeof m=="string"?document.getElementById(m):m}function ys(m,C){var D=m.style[C]||m.currentStyle&&m.currentStyle[C];if((!D||D==="auto")&&document.defaultView){var j=document.defaultView.getComputedStyle(m,null);D=j?j[C]:null}return D==="auto"?null:D}function hn(m,C,D){var j=document.createElement(m);return j.className=C||"",D&&D.appendChild(j),j}
358function fi(m){var C=m.parentNode;C&&C.removeChild(m)}function Ai(m){for(;m.firstChild;)m.removeChild(m.firstChild)}function gt(m){var C=m.parentNode;C&&C.lastChild!==m&&C.appendChild(m)}function tt(m){var C=m.parentNode;C&&C.firstChild!==m&&C.insertBefore(m,C.firstChild)}function ft(m,C){if(m.classList!==void 0)return m.classList.contains(C);var D=rn(m);return D.length>0&&new RegExp("(^|\\s)"+C+"(\\s|$)").test(D)}function Tt(m,C){if(m.classList!==void 0)for(var D=g(C),j=0,J=D.length;j<J;j++)m.classList.add(D[j]);else if(!ft(m,C)){var _e=rn(m);Pn(m,(_e?_e+" ":"")+C)}}function vr(m,C){m.classList!==void 0?m.classList.remove(C):Pn(m,p((" "+rn(m)+" ").replace(" "+C+" "," ")))}function Pn(m,C){m.className.baseVal===void 0?m.className=C:m.className.baseVal=C}function rn(m){return m.correspondingElement&&(m=m.correspondingElement),m.className.baseVal===void 0?m.className:m.className.baseVal}function Pi(m,C){"opacity"in m.style?m.style.opacity=C:"filter"in m.style&&_a(m,C)}function _a(m,C){var D=!1,j="DXImageTransform.Microsoft.Alpha";try{D=m.filters.item(j)}catch{if(C===1)return}C=Math.round(C*100),D?(D.Enabled=C!==100,D.Opacity=C):m.style.filter+=" progid:"+j+"(opacity="+C+")"}function Ri(m){for(var C=document.documentElement.style,D=0;D<m.length;D++)if(m[D]in C)return m[D];return!1}function Un(m,C,D){var j=C||new le(0,0);m.style[Vl]=(jt.ie3d?"translate("+j.x+"px,"+j.y+"px)":"translate3d("+j.x+"px,"+j.y+"px,0)")+(D?" scale("+D+")":"")}function Xn(m,C){m._leaflet_pos=C,jt.any3d?Un(m,C):(m.style.left=C.x+"px",m.style.top=C.y+"px")}function Gn(m){return m._leaflet_pos||new le(0,0)}var yi,ns,bc;if("onselectstart"in document)yi=function(){nn(window,"selectstart",Ja)},ns=function(){Oi(window,"selectstart",Ja)};else{var ml=Ri(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);yi=function(){if(ml){var m=document.documentElement.style;bc=m[ml],m[ml]="none"}},ns=function(){ml&&(document.documentElement.style[ml]=bc,bc=void 0)}}function eu(){nn(window,"dragstart",Ja)}function nf(){Oi(window,"dragstart",Ja)}var $s,Qa;function af(m){for(;m.tabIndex===-1;)m=m.parentNode;m.style&&($u(),$s=m,Qa=m.style.outlineStyle,m.style.outlineStyle="none",nn(window,"keydown",$u))}function $u(){$s&&($s.style.outlineStyle=Qa,$s=void 0,Qa=void 0,Oi(window,"keydown",$u))}function Wu(m){do m=m.parentNode;while((!m.offsetWidth||!m.offsetHeight)&&m!==document.body);return m}function Br(m){var C=m.getBoundingClientRect();return{x:C.width/m.offsetWidth||1,y:C.height/m.offsetHeight||1,boundingClientRect:C}}var W_={__proto__:null,TRANSFORM:Vl,TRANSITION:ql,TRANSITION_END:_c,get:js,getStyle:ys,create:hn,remove:fi,empty:Ai,toFront:gt,toBack:tt,hasClass:ft,addClass:Tt,removeClass:vr,setClass:Pn,getClass:rn,setOpacity:Pi,testProp:Ri,setTransform:Un,setPosition:Xn,getPosition:Gn,get disableTextSelection(){return yi},get enableTextSelection(){return ns},disableImageDrag:eu,enableImageDrag:nf,preventOutline:af,restoreOutline:$u,getSizedParentNode:Wu,getScale:Br};function nn(m,C,D,j){if(C&&typeof C=="object")for(var J in C)Nh(m,J,C[J],D);else{C=g(C);for(var _e=0,He=C.length;_e<He;_e++)Nh(m,C[_e],D,j)}return this}var Ws="_leaflet_events";function Oi(m,C,D,j){if(arguments.length===1)Gu(m),delete m[Ws];else if(C&&typeof C=="object")for(var J in C)Dh(m,J,C[J],D);else if(C=g(C),arguments.length===2)Gu(m,function(lt){return O(C,lt)!==-1});else for(var _e=0,He=C.length;_e<He;_e++)Dh(m,C[_e],D,j);return this}function Gu(m,C){for(var D in m[Ws]){var j=D.split(/\d/)[0];(!C||C(j))&&Dh(m,j,null,null,D)}}
358var of={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Nh(m,C,D,j){var J=C+l(D)+(j?"_"+l(j):"");if(m[Ws]&&m[Ws][J])return this;var _e=function(lt){return D.call(j||m,lt||window.event)},He=_e;!jt.touchNative&&jt.pointer&&C.indexOf("touch")===0?_e=Ui(m,C,_e):jt.touch&&C==="dblclick"?_e=Uo(m,_e):"addEventListener"in m?C==="touchstart"||C==="touchmove"||C==="wheel"||C==="mousewheel"?m.addEventListener(of[C]||C,_e,jt.passiveEvents?{passive:!1}:!1):C==="mouseenter"||C==="mouseleave"?(_e=function(lt){lt=lt||window.event,ru(m,lt)&&He(lt)},m.addEventListener(of[C],_e,!1)):m.addEventListener(C,He,!1):m.attachEvent("on"+C,_e),m[Ws]=m[Ws]||{},m[Ws][J]=_e}function Dh(m,C,D,j,J){J=J||C+l(D)+(j?"_"+l(j):"");var _e=m[Ws]&&m[Ws][J];if(!_e)return this;!jt.touchNative&&jt.pointer&&C.indexOf("touch")===0?rs(m,C,_e):jt.touch&&C==="dblclick"?ju(m,_e):"removeEventListener"in m?m.removeEventListener(of[C]||C,_e,!1):m.detachEvent("on"+C,_e),m[Ws][J]=null}function jl(m){return m.stopPropagation?m.stopPropagation():m.originalEvent?m.originalEvent._stopped=!0:m.cancelBubble=!0,this}function qm(m){return Nh(m,"wheel",jl),this}function tu(m){return nn(m,"mousedown touchstart dblclick contextmenu",jl),m._leaflet_disable_click=!0,this}function Ja(m){return m.preventDefault?m.preventDefault():m.returnValue=!1,this}function $l(m){return Ja(m),jl(m),this}function eo(m){if(m.composedPath)return m.composedPath();for(var C=[],D=m.target;D;)C.push(D),D=D.parentNode;return C}function b0(m,C){if(!C)return new le(m.clientX,m.clientY);var D=Br(C),j=D.boundingClientRect;return new le((m.clientX-j.left)/D.x-C.clientLeft,(m.clientY-j.top)/D.y-C.clientTop)}var Mh=jt.linux&&jt.chrome?window.devicePixelRatio:jt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Zi(m){return jt.edge?m.wheelDeltaY/2:m.deltaY&&m.deltaMode===0?-m.deltaY/Mh:m.deltaY&&m.deltaMode===1?-m.deltaY*20:m.deltaY&&m.deltaMode===2?-m.deltaY*60:m.deltaX||m.deltaZ?0:m.wheelDelta?(m.wheelDeltaY||m.wheelDelta)/2:m.detail&&Math.abs(m.detail)<32765?-m.detail*20:m.detail?m.detail/-32765*60:0}function ru(m,C){var D=C.relatedTarget;if(!D)return!0;try{for(;D&&D!==m;)D=D.parentNode}catch{return!1}return D!==m}var G_={__proto__:null,on:nn,off:Oi,stopPropagation:jl,disableScrollPropagation:qm,disableClickPropagation:tu,preventDefault:Ja,stop:$l,getPropagationPath:eo,getMousePosition:b0,getWheelDelta:Zi,isExternalTarget:ru,addListener:nn,removeListener:Oi},E0=ie.extend({run:function(m,C,D,j){this.stop(),this._el=m,this._inProgress=!0,this._duration=D||.25,this._easeOutPower=1/Math.max(j||.5,.2),this._startPos=Gn(m),this._offset=C.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=W(this._animate,this),this._step()},_step:function(m){var C=+new Date-this._startTime,D=this._duration*1e3;C<D?this._runFrame(this._easeOut(C/D),m):(this._runFrame(1),this._complete())},_runFrame:function(m,C){var D=this._startPos.add(this._offset.multiplyBy(m));
358C&&D._round(),Xn(this._el,D),this.fire("step")},_complete:function(){$(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(m){return 1-Math.pow(1-m,this._easeOutPower)}}),Rn=ie.extend({options:{crs:ut,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(m,C){C=_(this,C),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(m),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),C.maxBounds&&this.setMaxBounds(C.maxBounds),C.zoom!==void 0&&(this._zoom=this._limitZoom(C.zoom)),C.center&&C.zoom!==void 0&&this.setView(pe(C.center),C.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ql&&jt.any3d&&!jt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),nn(this._proxy,_c,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(m,C,D){if(C=C===void 0?this._zoom:this._limitZoom(C),m=this._limitCenter(pe(m),C,this.options.maxBounds),D=D||{},this._stop(),this._loaded&&!D.reset&&D!==!0){D.animate!==void 0&&(D.zoom=i({animate:D.animate},D.zoom),D.pan=i({animate:D.animate,duration:D.duration},D.pan));var j=this._zoom!==C?this._tryAnimatedZoom&&this._tryAnimatedZoom(m,C,D.zoom):this._tryAnimatedPan(m,D.pan);if(j)return clearTimeout(this._sizeTimer),this}return this._resetView(m,C,D.pan&&D.pan.noMoveStart),this},setZoom:function(m,C){return this._loaded?this.setView(this.getCenter(),m,{zoom:C}):(this._zoom=m,this)},zoomIn:function(m,C){return m=m||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+m,C)},zoomOut:function(m,C){return m=m||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-m,C)},setZoomAround:function(m,C,D){var j=this.getZoomScale(C),J=this.getSize().divideBy(2),_e=m instanceof le?m:this.latLngToContainerPoint(m),He=_e.subtract(J).multiplyBy(1-1/j),lt=this.containerPointToLatLng(J.add(He));return this.setView(lt,C,{zoom:D})},_getBoundsCenterZoom:function(m,C){C=C||{},m=m.getBounds?m.getBounds():Pe(m);var D=de(C.paddingTopLeft||C.padding||[0,0]),j=de(C.paddingBottomRight||C.padding||[0,0]),J=this.getBoundsZoom(m,!1,D.add(j));if(J=typeof C.maxZoom=="number"?Math.min(C.maxZoom,J):J,J===1/0)return{center:m.getCenter(),zoom:J};
358var _e=j.subtract(D).divideBy(2),He=this.project(m.getSouthWest(),J),lt=this.project(m.getNorthEast(),J),_t=this.unproject(He.add(lt).divideBy(2).add(_e),J);return{center:_t,zoom:J}},fitBounds:function(m,C){if(m=Pe(m),!m.isValid())throw new Error("Bounds are not valid.");var D=this._getBoundsCenterZoom(m,C);return this.setView(D.center,D.zoom,C)},fitWorld:function(m){return this.fitBounds([[-90,-180],[90,180]],m)},panTo:function(m,C){return this.setView(m,this._zoom,{pan:C})},panBy:function(m,C){if(m=de(m).round(),C=C||{},!m.x&&!m.y)return this.fire("moveend");if(C.animate!==!0&&!this.getSize().contains(m))return this._resetView(this.unproject(this.project(this.getCenter()).add(m)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new E0,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),C.noMoveStart||this.fire("movestart"),C.animate!==!1){Tt(this._mapPane,"leaflet-pan-anim");var D=this._getMapPanePos().subtract(m).round();this._panAnim.run(this._mapPane,D,C.duration||.25,C.easeLinearity)}else this._rawPanBy(m),this.fire("move").fire("moveend");return this},flyTo:function(m,C,D){if(D=D||{},D.animate===!1||!jt.any3d)return this.setView(m,C,D);this._stop();var j=this.project(this.getCenter()),J=this.project(m),_e=this.getSize(),He=this._zoom;m=pe(m),C=C===void 0?He:C;var lt=Math.max(_e.x,_e.y),_t=lt*this.getZoomScale(He,C),kt=J.distanceTo(j)||1,dr=1.42,Vr=dr*dr;function Qr(Va){var ff=Va?-1:1,D2=Va?_t:lt,dk=_t*_t-lt*lt+ff*Vr*Vr*kt*kt,X_=2*D2*Vr*kt,P0=dk/X_,Z_=Math.sqrt(P0*P0+1)-P0,Q_=Z_<1e-9?-18:Math.log(Z_);return Q_}function Ia(Va){return(Math.exp(Va)-Math.exp(-Va))/2}function Wr(Va){return(Math.exp(Va)+Math.exp(-Va))/2}function Sn(Va){return Ia(Va)/Wr(Va)}var ba=Qr(0);function fa(Va){return lt*(Wr(ba)/Wr(ba+dr*Va))}function Cn(Va){return lt*(Wr(ba)*Sn(ba+dr*Va)-Ia(ba))/Vr}function xo(Va){return 1-Math.pow(1-Va,1.5)}var Dn=Date.now(),ha=(Qr(1)-ba)/dr,A0=D.duration?1e3*D.duration:1e3*ha*.8;function Y_(){var Va=(Date.now()-Dn)/A0,ff=xo(Va)*ha;Va<=1?(this._flyToFrame=W(Y_,this),this._move(this.unproject(j.add(J.subtract(j).multiplyBy(Cn(ff)/kt)),He),this.getScaleZoom(lt/fa(ff),He),{flyTo:!0})):this._move(m,C)._moveEnd(!0)}return this._moveStart(!0,D.noMoveStart),Y_.call(this),this},flyToBounds:function(m,C){var D=this._getBoundsCenterZoom(m,C);return this.flyTo(D.center,D.zoom,C)},setMaxBounds:function(m){return m=Pe(m),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),m.isValid()?(this.options.maxBounds=m,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(m){var C=this.options.minZoom;return this.options.minZoom=m,this._loaded&&C!==m&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(m):this},setMaxZoom:function(m){var C=this.options.maxZoom;return this.options.maxZoom=m,this._loaded&&C!==m&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(m):this},panInsideBounds:function(m,C){this._enforcingBounds=!0;var D=this.getCenter(),j=this._limitCenter(D,this._zoom,Pe(m));return D.equals(j)||this.panTo(j,C),this._enforcingBounds=!1,this},panInside:function(m,C){C=C||{};var D=de(C.paddingTopLeft||C.padding||[0,0]),j=de(C.paddingBottomRight||C.padding||[0,0]),J=this.project(this.getCenter()),_e=this.project(m),He=this.getPixelBounds(),lt=Ae([He.min.add(D),He.max.subtract(j)]),_t=lt.getSize();if(!lt.contains(_e)){this._enforcingBounds=!0;var kt=_e.subtract(lt.getCenter()),dr=lt.extend(_e).getSize().subtract(_t);J.x+=kt.x<0?-dr.x:dr.x,J.y+=kt.y<0?-dr.y:dr.y,this.panTo(this.unproject(J),C),this._enforcingBounds=!1}return this},invalidateSize:function(m){if(!this._loaded)return this;m=i({animate:!1,pan:!0},m===!0?{animate:!0}:m);var C=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var D=this.getSize(),j=C.divideBy(2).round(),J=D.divideBy(2).round(),_e=j.subtract(J);return!_e.x&&!_e.y?this:(m.animate&&m.pan?this.panBy(_e):(m.pan&&this._rawPanBy(_e),this.fire("move"),m.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:C,newSize:D}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(m){if(m=this._locateOptions=i({timeout:1e4,watch:!1},m),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var C=o(this._handleGeolocationResponse,this),D=o(this._handleGeolocationError,this);return m.watch?this._locationWatchId=navigator.geolocation.watchPosition(C,D,m):navigator.geolocation.getCurrentPosition(C,D,m),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(m){if(this._container._leaflet_id){var C=m.code,D=m.message||(C===1?"permission denied":C===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:C,message:"Geolocation error: "+D+"."})}},_handleGeolocationResponse:function(m){if(this._container._leaflet_id){var C=m.coords.latitude,D=m.coords.longitude,j=new ce(C,D),J=j.toBounds(m.coords.accuracy*2),_e=this._locateOptions;if(_e.setView){var He=this.getBoundsZoom(J);this.setView(j,_e.maxZoom?Math.min(He,_e.maxZoom):He)}var lt={latlng:j,bounds:J,timestamp:m.timestamp};for(var _t in m.coords)typeof m.coords[_t]=="number"&&(lt[_t]=m.coords[_t]);this.fire("locationfound",lt)}},addHandler:function(m,C){if(!C)return this;var D=this[m]=new C(this);return this._handlers.push(D),this.options[m]&&D.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),fi(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var m;for(m in this._layers)this._layers[m].remove();for(m in this._panes)fi(this._panes[m]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(m,C){var D="leaflet-pane"+(m?" leaflet-"+m.replace("Pane","")+"-pane":""),j=hn("div",D,C||this._mapPane);return m&&(this._panes[m]=j),j},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var m=this.getPixelBounds(),C=this.unproject(m.getBottomLeft()),D=this.unproject(m.getTopRight());return new Fe(C,D)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZo
358om===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(m,C,D){m=Pe(m),D=de(D||[0,0]);var j=this.getZoom()||0,J=this.getMinZoom(),_e=this.getMaxZoom(),He=m.getNorthWest(),lt=m.getSouthEast(),_t=this.getSize().subtract(D),kt=Ae(this.project(lt,j),this.project(He,j)).getSize(),dr=jt.any3d?this.options.zoomSnap:1,Vr=_t.x/kt.x,Qr=_t.y/kt.y,Ia=C?Math.max(Vr,Qr):Math.min(Vr,Qr);return j=this.getScaleZoom(Ia,j),dr&&(j=Math.round(j/(dr/100))*(dr/100),j=C?Math.ceil(j/dr)*dr:Math.floor(j/dr)*dr),Math.max(J,Math.min(_e,j))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new le(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(m,C){var D=this._getTopLeftPoint(m,C);return new ge(D,D.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(m){return this.options.crs.getProjectedBounds(m===void 0?this.getZoom():m)},getPane:function(m){return typeof m=="string"?this._panes[m]:m},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(m,C){var D=this.options.crs;return C=C===void 0?this._zoom:C,D.scale(m)/D.scale(C)},getScaleZoom:function(m,C){var D=this.options.crs;C=C===void 0?this._zoom:C;var j=D.zoom(m*D.scale(C));return isNaN(j)?1/0:j},project:function(m,C){return C=C===void 0?this._zoom:C,this.options.crs.latLngToPoint(pe(m),C)},unproject:function(m,C){return C=C===void 0?this._zoom:C,this.options.crs.pointToLatLng(de(m),C)},layerPointToLatLng:function(m){var C=de(m).add(this.getPixelOrigin());return this.unproject(C)},latLngToLayerPoint:function(m){var C=this.project(pe(m))._round();return C._subtract(this.getPixelOrigin())},wrapLatLng:function(m){return this.options.crs.wrapLatLng(pe(m))},wrapLatLngBounds:function(m){return this.options.crs.wrapLatLngBounds(Pe(m))},distance:function(m,C){return this.options.crs.distance(pe(m),pe(C))},containerPointToLayerPoint:function(m){return de(m).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(m){return de(m).add(this._getMapPanePos())},containerPointToLatLng:function(m){var C=this.containerPointToLayerPoint(de(m));return this.layerPointToLatLng(C)},latLngToContainerPoint:function(m){return this.layerPointToContainerPoint(this.latLngToLayerPoint(pe(m)))},mouseEventToContainerPoint:function(m){return b0(m,this._container)},mouseEventToLayerPoint:function(m){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(m))},mouseEventToLatLng:function(m){return this.layerPointToLatLng(this.mouseEventToLayerPoint(m))},_initContainer:function(m){var C=this._container=js(m);if(C){if(C._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");nn(C,"scroll",this._onScroll,this),this._containerId=l(C)},_initLayout:function(){var m=this._container;this._fadeAnimated=this.options.fadeAnimation&&jt.any3d,Tt(m,"leaflet-container"+(jt.touch?" leaflet-touch":"")+(jt.retina?" leaflet-retina":"")+(jt.ielt9?" leaflet-oldie":"")+(jt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var C=ys(m,"position");C!=="absolute"&&C!=="relative"&&C!=="fixed"&&C!=="sticky"&&(m.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var m=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Xn(this._mapPane,new le(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tt(m.markerPane,"leaflet-zoom-hide"),Tt(m.shadowPane,"leaflet-zoom-hide"))},_resetView:function(m,C,D){Xn(this._mapPane,new le(0,0));var j=!this._loaded;this._loaded=!0,C=this._limitZoom(C),this.fire("viewprereset");var J=this._zoom!==C;this._moveStart(J,D)._move(m,C)._moveEnd(J),this.fire("viewreset"),j&&this.fire("load")},_moveStart:function(m,C){return m&&this.fire("zoomstart"),C||this.fire("movestart"),this},_move:function(m,C,D,j){C===void 0&&(C=this._zoom);var J=this._zoom!==C;return this._zoom=C,this._lastCenter=m,this._pixelOrigin=this._getNewPixelOrigin(m),j?D&&D.pinch&&this.fire("zoom",D):((J||D&&D.pinch)&&this.fire("zoom",D),this.fire("move",D)),this},_moveEnd:function(m){return m&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(m){Xn(this._mapPane,this._getMapPanePos().subtract(m))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(m){this._targets={},this._targets[l(this._container)]=this;var C=m?Oi:nn;C(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&C(window,"resize",this._onResize,this),jt.any3d&&this.options.transform3DLimit&&(m?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=W(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var m=this._getMapPanePos();Math.max(Math.abs(m.x),Math.abs(m.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(m,C){for(var D=[],j,J=C==="mouseout"||C==="mouseover",_e=m.target||m.srcElement,He=!1;_e;){if(j=this._targets[l(_e)],j&&(C==="click"||C==="preclick")&&this._draggableMoved(j)){He=!0;break}if(j&&j.listens(C,!0)&&(J&&!ru(_e,m)||(D.push(j),J))||_e===this._container)break;_e=_e.parentNode}return!D.length&&!He&&!J&&this.listens(C,!0)&&(D=[this]),D},_isClickDisabled:function(m){for(;m&&m!==this._container;){if(m._leaflet_disable_click)return!0;m=m.parentNode}}
358,_handleDOMEvent:function(m){var C=m.target||m.srcElement;if(!(!this._loaded||C._leaflet_disable_events||m.type==="click"&&this._isClickDisabled(C))){var D=m.type;D==="mousedown"&&af(C),this._fireDOMEvent(m,D)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(m,C,D){if(m.type==="click"){var j=i({},m);j.type="preclick",this._fireDOMEvent(j,j.type,D)}var J=this._findEventTargets(m,C);if(D){for(var _e=[],He=0;He<D.length;He++)D[He].listens(C,!0)&&_e.push(D[He]);J=_e.concat(J)}if(J.length){C==="contextmenu"&&Ja(m);var lt=J[0],_t={originalEvent:m};if(m.type!=="keypress"&&m.type!=="keydown"&&m.type!=="keyup"){var kt=lt.getLatLng&&(!lt._radius||lt._radius<=10);_t.containerPoint=kt?this.latLngToContainerPoint(lt.getLatLng()):this.mouseEventToContainerPoint(m),_t.layerPoint=this.containerPointToLayerPoint(_t.containerPoint),_t.latlng=kt?lt.getLatLng():this.layerPointToLatLng(_t.layerPoint)}for(He=0;He<J.length;He++)if(J[He].fire(C,_t,!0),_t.originalEvent._stopped||J[He].options.bubblingMouseEvents===!1&&O(this._mouseEvents,C)!==-1)return}},_draggableMoved:function(m){return m=m.dragging&&m.dragging.enabled()?m:this,m.dragging&&m.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var m=0,C=this._handlers.length;m<C;m++)this._handlers[m].disable()},whenReady:function(m,C){return this._loaded?m.call(C||this,{target:this}):this.on("load",m,C),this},_getMapPanePos:function(){return Gn(this._mapPane)||new le(0,0)},_moved:function(){var m=this._getMapPanePos();return m&&!m.equals([0,0])},_getTopLeftPoint:function(m,C){var D=m&&C!==void 0?this._getNewPixelOrigin(m,C):this.getPixelOrigin();return D.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(m,C){var D=this.getSize()._divideBy(2);return this.project(m,C)._subtract(D)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(m,C,D){var j=this._getNewPixelOrigin(D,C);return this.project(m,C)._subtract(j)},_latLngBoundsToNewLayerBounds:function(m,C,D){var j=this._getNewPixelOrigin(D,C);
358return Ae([this.project(m.getSouthWest(),C)._subtract(j),this.project(m.getNorthWest(),C)._subtract(j),this.project(m.getSouthEast(),C)._subtract(j),this.project(m.getNorthEast(),C)._subtract(j)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(m){return this.latLngToLayerPoint(m).subtract(this._getCenterLayerPoint())},_limitCenter:function(m,C,D){if(!D)return m;var j=this.project(m,C),J=this.getSize().divideBy(2),_e=new ge(j.subtract(J),j.add(J)),He=this._getBoundsOffset(_e,D,C);return Math.abs(He.x)<=1&&Math.abs(He.y)<=1?m:this.unproject(j.add(He),C)},_limitOffset:function(m,C){if(!C)return m;var D=this.getPixelBounds(),j=new ge(D.min.add(m),D.max.add(m));return m.add(this._getBoundsOffset(j,C))},_getBoundsOffset:function(m,C,D){var j=Ae(this.project(C.getNorthEast(),D),this.project(C.getSouthWest(),D)),J=j.min.subtract(m.min),_e=j.max.subtract(m.max),He=this._rebound(J.x,-_e.x),lt=this._rebound(J.y,-_e.y);return new le(He,lt)},_rebound:function(m,C){return m+C>0?Math.round(m-C)/2:Math.max(0,Math.ceil(m))-Math.max(0,Math.floor(C))},_limitZoom:function(m){var C=this.getMinZoom(),D=this.getMaxZoom(),j=jt.any3d?this.options.zoomSnap:1;return j&&(m=Math.round(m/j)*j),Math.max(C,Math.min(D,m))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){vr(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(m,C){var D=this._getCenterOffset(m)._trunc();return(C&&C.animate)!==!0&&!this.getSize().contains(D)?!1:(this.panBy(D,C),!0)},_createAnimProxy:function(){var m=this._proxy=hn("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(m),this.on("zoomanim",function(C){var D=Vl,j=this._proxy.style[D];Un(this._proxy,this.project(C.center,C.zoom),this.getZoomScale(C.zoom,1)),j===this._proxy.style[D]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){fi(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var m=this.getCenter(),C=this.getZoom();Un(this._proxy,this.project(m,C),this.getZoomScale(C,1))},_catchTransitionEnd:function(m){this._animatingZoom&&m.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(m,C,D){if(this._animatingZoom)return!0;if(D=D||{},!this._zoomAnimated||D.animate===!1||this._nothingToAnimate()||Math.abs(C-this._zoom)>this.options.zoomAnimationThreshold)return!1;var j=this.getZoomScale(C),J=this._getCenterOffset(m)._divideBy(1-1/j);return D.animate!==!0&&!this.getSize().contains(J)?!1:(W(function(){this._moveStart(!0,D.noMoveStart||!1)._animateZoom(m,C,!0)},this),!0)},_animateZoom:function(m,C,D,j){this._mapPane&&(D&&(this._animatingZoom=!0,this._animateToCenter=m,this._animateToZoom=C,Tt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:m,zoom:C,noUpdate:j}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&vr(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function jm(m,C){return new Rn(m,C)}var an=re.extend({options:{position:"topright"},initialize:function(m){_(this,m)},getPosition:function(){return this.options.position},setPosition:function(m){var C=this._map;return C&&C.removeControl(this),this.options.position=m,C&&C.addControl(this),this},getContainer:function(){return this._container},addTo:function(m){this.remove(),this._map=m;var C=this._container=this.onAdd(m),D=this.getPosition(),j=m._controlCorners[D];return Tt(C,"leaflet-control"),D.indexOf("bottom")!==-1?j.insertBefore(C,j.firstChild):j.appendChild(C),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(fi(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(m){this._map&&m&&m.screenX>0&&m.screenY>0&&this._map.getContainer().focus()}}),sf=function(m){return new an(m)};Rn.include({addControl:function(m){return m.addTo(this),this},removeControl:function(m){return m.remove(),this}
358,_initControlPos:function(){var m=this._controlCorners={},C="leaflet-",D=this._controlContainer=hn("div",C+"control-container",this._container);function j(J,_e){var He=C+J+" "+C+_e;m[J+_e]=hn("div",He,D)}j("top","left"),j("top","right"),j("bottom","left"),j("bottom","right")},_clearControlPos:function(){for(var m in this._controlCorners)fi(this._controlCorners[m]);fi(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var $m=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(m,C,D,j){return D<j?-1:j<D?1:0}},initialize:function(m,C,D){_(this,D),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var j in m)this._addLayer(m[j],j);for(j in C)this._addLayer(C[j],j,!0)},onAdd:function(m){this._initLayout(),this._update(),this._map=m,m.on("zoomend",this._checkDisabledLayers,this);for(var C=0;C<this._layers.length;C++)this._layers[C].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(m){return an.prototype.addTo.call(this,m),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var m=0;m<this._layers.length;m++)this._layers[m].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(m,C){return this._addLayer(m,C),this._map?this._update():this},addOverlay:function(m,C){return this._addLayer(m,C,!0),this._map?this._update():this},removeLayer:function(m){m.off("add remove",this._onLayerChange,this);var C=this._getLayer(l(m));return C&&this._layers.splice(this._layers.indexOf(C),1),this._map?this._update():this},expand:function(){Tt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var m=this._map.getSize().y-(this._container.offsetTop+50);return m<this._section.clientHeight?(Tt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=m+"px"):vr(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return vr(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var m="leaflet-control-layers",C=this._container=hn("div",m),D=this.options.collapsed;C.setAttribute("aria-haspopup",!0),tu(C),qm(C);var j=this._section=hn("section",m+"-list");D&&(this._map.on("click",this.collapse,this),nn(C,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var J=this._layersLink=hn("a",m+"-toggle",C);J.href="#",J.title="Layers",J.setAttribute("role","button"),nn(J,{keydown:function(_e){_e.keyCode===13&&this._expandSafely()},click:function(_e){Ja(_e),this._expandSafely()}},this),D||this.expand(),this._baseLayersList=hn("div",m+"-base",j),this._separator=hn("div",m+"-separator",j),this._overlaysList=hn("div",m+"-overlays",j),C.appendChild(j)},_getLayer:function(m){for(var C=0;C<this._layers.length;C++)if(this._layers[C]&&l(this._layers[C].layer)===m)return this._layers[C]},_addLayer:function(m,C,D){this._map&&m.on("add remove",this._onLayerChange,this),this._layers.push({layer:m,name:C,overlay:D}),this.options.sortLayers&&this._layers.sort(o(function(j,J){return this.options.sortFunction(j.layer,J.layer,j.name,J.name)},this)),this.options.autoZIndex&&m.setZIndex&&(this._lastZIndex++,m.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ai(this._baseLayersList),Ai(this._overlaysList),this._layerControlInputs=[];var m,C,D,j,J=0;for(D=0;D<this._layers.length;D++)j=this._layers[D],this._addItem(j),C=C||j.overlay,m=m||!j.overlay,J+=j.overlay?0:1;return this.options.hideSingleBase&&(m=m&&J>1,this._baseLayersList.style.display=m?"":"none"),this._separator.style.display=C&&m?"":"none",this},_onLayerChange:function(m){this._handlingClick||this._update();var C=this._getLayer(l(m.target)),D=C.overlay?m.type==="add"?"overlayadd":"overlayremove":m.type==="add"?"baselayerchange":null;D&&this._map.fire(D,C)},_createRadioElement:function(m,C){var D='<input type="radio" class="leaflet-control-layers-selector" name="'+m+'"'+(C?' checked="checked"':"")+"/>",j=document.createElement("div");return j.innerHTML=D,j.firstChild}
358,_addItem:function(m){var C=document.createElement("label"),D=this._map.hasLayer(m.layer),j;m.overlay?(j=document.createElement("input"),j.type="checkbox",j.className="leaflet-control-layers-selector",j.defaultChecked=D):j=this._createRadioElement("leaflet-base-layers_"+l(this),D),this._layerControlInputs.push(j),j.layerId=l(m.layer),nn(j,"click",this._onInputClick,this);var J=document.createElement("span");J.innerHTML=" "+m.name;var _e=document.createElement("span");C.appendChild(_e),_e.appendChild(j),_e.appendChild(J);var He=m.overlay?this._overlaysList:this._baseLayersList;return He.appendChild(C),this._checkDisabledLayers(),C},_onInputClick:function(){if(!this._preventClick){var m=this._layerControlInputs,C,D,j=[],J=[];this._handlingClick=!0;for(var _e=m.length-1;_e>=0;_e--)C=m[_e],D=this._getLayer(C.layerId).layer,C.checked?j.push(D):C.checked||J.push(D);for(_e=0;_e<J.length;_e++)this._map.hasLayer(J[_e])&&this._map.removeLayer(J[_e]);for(_e=0;_e<j.length;_e++)this._map.hasLayer(j[_e])||this._map.addLayer(j[_e]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var m=this._layerControlInputs,C,D,j=this._map.getZoom(),J=m.length-1;J>=0;J--)C=m[J],D=this._getLayer(C.layerId).layer,C.disabled=D.options.minZoom!==void 0&&j<D.options.minZoom||D.options.maxZoom!==void 0&&j>D.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var m=this._section;this._preventClick=!0,nn(m,"click",Ja),this.expand();var C=this;setTimeout(function(){Oi(m,"click",Ja),C._preventClick=!1})}}),w0=function(m,C,D){return new $m(m,C,D)},Wm=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(m){var C="leaflet-control-zoom",D=hn("div",C+" leaflet-bar"),j=this.options;return this._zoomInButton=this._createButton(j.zoomInText,j.zoomInTitle,C+"-in",D,this._zoomIn),this._zoomOutButton=this._createButton(j.zoomOutText,j.zoomOutTitle,C+"-out",D,this._zoomOut),this._updateDisabled(),m.on("zoomend zoomlevelschange",this._updateDisabled,this),D},onRemove:function(m){m.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(m){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(m.shiftKey?3:1))},_zoomOut:function(m){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(m.shiftKey?3:1))},_createButton:function(m,C,D,j,J){var _e=hn("a",D,j);return _e.innerHTML=m,_e.href="#",_e.title=C,_e.setAttribute("role","button"),_e.setAttribute("aria-label",C),tu(_e),nn(_e,"click",$l),nn(_e,"click",J,this),nn(_e,"click",this._refocusOnMap,this),_e},_updateDisabled:function(){var m=this._map,C="leaflet-disabled";vr(this._zoomInButton,C),vr(this._zoomOutButton,C),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||m._zoom===m.getMinZoom())&&(Tt(this._zoomOutButton,C),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||m._zoom===m.getMaxZoom())&&(Tt(this._zoomInButton,C),this._zoomInButton.setAttribute("aria-disabled","true"))}});Rn.mergeOptions({zoomControl:!0}),Rn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Wm,this.addControl(this.zoomControl))});var Gm=function(m){return new Wm(m)},Lh=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(m){var C="leaflet-control-scale",D=hn("div",C),j=this.options;return this._addScales(j,C+"-line",D),m.on(j.updateWhenIdle?"moveend":"move",this._update,this),m.whenReady(this._update,this),D},onRemove:function(m){m.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(m,C,D){m.metric&&(this._mScale=hn("div",C,D)),m.imperial&&(this._iScale=hn("div",C,D))},_update:function(){var m=this._map,C=m.getSize().y/2,D=m.distance(m.containerPointToLatLng([0,C]),m.containerPointToLatLng([this.options.maxWidth,C]));this._updateScales(D)},_updateScales:function(m){this.options.metric&&m&&this._updateMetric(m),this.options.imperial&&m&&this._updateImperial(m)}
358,_updateMetric:function(m){var C=this._getRoundNum(m),D=C<1e3?C+" m":C/1e3+" km";this._updateScale(this._mScale,D,C/m)},_updateImperial:function(m){var C=m*3.2808399,D,j,J;C>5280?(D=C/5280,j=this._getRoundNum(D),this._updateScale(this._iScale,j+" mi",j/D)):(J=this._getRoundNum(C),this._updateScale(this._iScale,J+" ft",J/C))},_updateScale:function(m,C,D){m.style.width=Math.round(this.options.maxWidth*D)+"px",m.innerHTML=C},_getRoundNum:function(m){var C=Math.pow(10,(Math.floor(m)+"").length-1),D=m/C;return D=D>=10?10:D>=5?5:D>=3?3:D>=2?2:1,C*D}}),S0=function(m){return new Lh(m)},Wl='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ku=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(jt.inlineSvg?Wl+" ":"")+"Leaflet</a>"},initialize:function(m){_(this,m),this._attributions={}},onAdd:function(m){m.attributionControl=this,this._container=hn("div","leaflet-control-attribution"),tu(this._container);for(var C in m._layers)m._layers[C].getAttribution&&this.addAttribution(m._layers[C].getAttribution());return this._update(),m.on("layeradd",this._addAttribution,this),this._container},onRemove:function(m){m.off("layeradd",this._addAttribution,this)},_addAttribution:function(m){m.layer.getAttribution&&(this.addAttribution(m.layer.getAttribution()),m.layer.once("remove",function(){this.removeAttribution(m.layer.getAttribution())},this))},setPrefix:function(m){return this.options.prefix=m,this._update(),this},addAttribution:function(m){return m?(this._attributions[m]||(this._attributions[m]=0),this._attributions[m]++,this._update(),this):this},removeAttribution:function(m){return m?(this._attributions[m]&&(this._attributions[m]--,this._update()),this):this},_update:function(){if(this._map){var m=[];for(var C in this._attributions)this._attributions[C]&&m.push(C);var D=[];this.options.prefix&&D.push(this.options.prefix),m.length&&D.push(m.join(", ")),this._container.innerHTML=D.join(' <span aria-hidden="true">|</span> ')}}});Rn.mergeOptions({attributionControl:!0}),Rn.addInitHook(function(){this.options.attributionControl&&new Ku().addTo(this)});var Gs=function(m){return new Ku(m)};an.Layers=$m,an.Zoom=Wm,an.Scale=Lh,an.Attribution=Ku,sf.layers=w0,sf.zoom=Gm,sf.scale=S0,sf.attribution=Gs;var Ks=re.extend({initialize:function(m){this._map=m},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ks.addTo=function(m,C){return m.addHandler(C,this),this};var C0={Events:Q},Km=jt.touch?"touchstart mousedown":"mousedown",Gl=ie.extend({options:{clickTolerance:3},initialize:function(m,C,D,j){_(this,j),this._element=m,this._dragStartTarget=C||m,this._preventOutline=D},enable:function(){this._enabled||(nn(this._dragStartTarget,Km,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Gl._dragging===this&&this.finishDrag(!0),Oi(this._dragStartTarget,Km,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(m){if(this._enabled&&(this._moved=!1,!ft(this._element,"leaflet-zoom-anim"))){if(m.touches&&m.touches.length!==1){Gl._dragging===this&&this.finishDrag();return}if(!(Gl._dragging||m.shiftKey||m.which!==1&&m.button!==1&&!m.touches)&&(Gl._dragging=this,this._preventOutline&&af(this._element),eu(),yi(),!this._moving)){this.fire("down");var C=m.touches?m.touches[0]:m,D=Wu(this._element);this._startPoint=new le(C.clientX,C.clientY),this._startPos=Gn(this._element),this._parentScale=Br(D);var j=m.type==="mousedown";nn(document,j?"mousemove":"touchmove",this._onMove,this),nn(document,j?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(m){if(this._enabled){if(m.touches&&m.touches.length>1){this._moved=!0;return}var C=m.touches&&m.touches.length===1?m.touches[0]:m,D=new le(C.clientX,C.clientY)._subtract(this._startPoint);!D.x&&!D.y||Math.abs(D.x)+Math.abs(D.y)<this.options.clickTolerance||(D.x/=this._parentScale.x,D.y/=this._parentScale.y,Ja(m),this._moved||(this.fire("dragstart"),this._moved=!0,Tt(document.body,"leaflet-dragging"),this._lastTarget=m.target||m.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Tt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(D),this._moving=!0,this._lastEvent=m,this._updatePosition())}},_updatePosition:function(){var m={originalEvent:this._lastEvent};this.fire("predrag",m),Xn(this._element,this._newPos),this.fire("drag",m)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(m){vr(document.body,"leaflet-dragging"),this._lastTarget&&(vr(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Oi(document,"mousemove touchmove",this._onMove,this),Oi(document,"mouseup touchend touchcancel",this._onUp,this),nf(),ns();var C=this._moved&&this._moving;this._moving=!1,Gl._dragging=!1,C&&this.fire("dragend",{noInertia:m,distance:this._newPos.distanceTo(this._startPos)})}});function Fh(m,C,D){var j,J=[1,4,2,8],_e,He,lt,_t,kt,dr,Vr,Qr;for(_e=0,dr=m.length;_e<dr;_e++)m[_e]._code=_s(m[_e],C);for(lt=0;lt<4;lt++){for(Vr=J[lt],j=[],_e=0,dr=m.length,He=dr-1;_e<dr;He=_e++)_t=m[_e],kt=m[He],_t._code&Vr?kt._code&Vr||(Qr=lf(kt,_t,Vr,C,D),Qr._code=_s(Qr,C),j.push(Qr)):(kt._code&Vr&&(Qr=lf(kt,_t,Vr,C,D),Qr._code=_s(Qr,C),j.push(Qr)),j.push(_t));m=j}return m}function Ym(m,C){var D,j,J,_e,He,lt,_t,kt,dr;if(!m||m.length===0)throw new Error("latlngs not passed");yn(m)||(console.warn("latlngs are not flat! Only the first ring will be used"),m=m[0]);var Vr=pe([0,0]),Qr=Pe(m),Ia=Qr.getNorthWest().distanceTo(Qr.getSouthWest
358())*Qr.getNorthEast().distanceTo(Qr.getNorthWest());Ia<1700&&(Vr=Bh(m));var Wr=m.length,Sn=[];for(D=0;D<Wr;D++){var ba=pe(m[D]);Sn.push(C.project(pe([ba.lat-Vr.lat,ba.lng-Vr.lng])))}for(lt=_t=kt=0,D=0,j=Wr-1;D<Wr;j=D++)J=Sn[D],_e=Sn[j],He=J.y*_e.x-_e.y*J.x,_t+=(J.x+_e.x)*He,kt+=(J.y+_e.y)*He,lt+=He*3;lt===0?dr=Sn[0]:dr=[_t/lt,kt/lt];var fa=C.unproject(de(dr));return pe([fa.lat+Vr.lat,fa.lng+Vr.lng])}function Bh(m){for(var C=0,D=0,j=0,J=0;J<m.length;J++){var _e=pe(m[J]);C+=_e.lat,D+=_e.lng,j++}return pe([C/j,D/j])}var zh={__proto__:null,clipPolygon:Fh,polygonCenter:Ym,centroid:Bh};function _r(m,C){if(!C||!m.length)return m.slice();var D=C*C;return m=Ys(m,D),m=Xm(m,D),m}function q(m,C,D){return Math.sqrt(Ii(m,C,D,!0))}function Hh(m,C,D){return Ii(m,C,D)}function Xm(m,C){var D=m.length,j=typeof Uint8Array<"u"?Uint8Array:Array,J=new j(D);J[0]=J[D-1]=1,Ec(m,J,C,0,D-1);var _e,He=[];for(_e=0;_e<D;_e++)J[_e]&&He.push(m[_e]);return He}function Ec(m,C,D,j,J){var _e=0,He,lt,_t;for(lt=j+1;lt<=J-1;lt++)_t=Ii(m[lt],m[j],m[J],!0),_t>_e&&(He=lt,_e=_t);_e>D&&(C[He]=1,Ec(m,C,D,j,He),Ec(m,C,D,He,J))}function Ys(m,C){for(var D=[m[0]],j=1,J=0,_e=m.length;j<_e;j++)bs(m[j],m[J])>C&&(D.push(m[j]),J=j);return J<_e-1&&D.push(m[_e-1]),D}var x0;function nu(m,C,D,j,J){var _e=j?x0:_s(m,D),He=_s(C,D),lt,_t,kt;for(x0=He;;){if(!(_e|He))return[m,C];if(_e&He)return!1;lt=_e||He,_t=lf(m,C,lt,D,J),kt=_s(_t,D),lt===_e?(m=_t,_e=kt):(C=_t,He=kt)}}function lf(m,C,D,j,J){var _e=C.x-m.x,He=C.y-m.y,lt=j.min,_t=j.max,kt,dr;return D&8?(kt=m.x+_e*(_t.y-m.y)/He,dr=_t.y):D&4?(kt=m.x+_e*(lt.y-m.y)/He,dr=lt.y):D&2?(kt=_t.x,dr=m.y+He*(_t.x-m.x)/_e):D&1&&(kt=lt.x,dr=m.y+He*(lt.x-m.x)/_e),new le(kt,dr,J)}function _s(m,C){var D=0;return m.x<C.min.x?D|=1:m.x>C.max.x&&(D|=2),m.y<C.min.y?D|=4:m.y>C.max.y&&(D|=8),D}function bs(m,C){var D=C.x-m.x,j=C.y-m.y;return D*D+j*j}function Ii(m,C,D,j){var J=C.x,_e=C.y,He=D.x-J,lt=D.y-_e,_t=He*He+lt*lt,kt;return _t>0&&(kt=((m.x-J)*He+(m.y-_e)*lt)/_t,kt>1?(J=D.x,_e=D.y):kt>0&&(J+=He*kt,_e+=lt*kt)),He=m.x-J,lt=m.y-_e,j?He*He+lt*lt:new le(J,_e)}function yn(m){return!P(m[0])||typeof m[0][0]!="object"&&typeof m[0][0]<"u"}function vl(m){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),yn(m)}function So(m,C){var D,j,J,_e,He,lt,_t,kt;if(!m||m.length===0)throw new Error("latlngs not passed");yn(m)||(console.warn("latlngs are not flat! Only the first ring will be used"),m=m[0]);var dr=pe([0,0]),Vr=Pe(m),Qr=Vr.getNorthWest().distanceTo(Vr.getSouthWest
358())*Vr.getNorthEast().distanceTo(Vr.getNorthWest());Qr<1700&&(dr=Bh(m));var Ia=m.length,Wr=[];for(D=0;D<Ia;D++){var Sn=pe(m[D]);Wr.push(C.project(pe([Sn.lat-dr.lat,Sn.lng-dr.lng])))}for(D=0,j=0;D<Ia-1;D++)j+=Wr[D].distanceTo(Wr[D+1])/2;if(j===0)kt=Wr[0];else for(D=0,_e=0;D<Ia-1;D++)if(He=Wr[D],lt=Wr[D+1],J=He.distanceTo(lt),_e+=J,_e>j){_t=(_e-j)/J,kt=[lt.x-_t*(lt.x-He.x),lt.y-_t*(lt.y-He.y)];break}var ba=C.unproject(de(kt));return pe([ba.lat+dr.lat,ba.lng+dr.lng])}var iu={__proto__:null,simplify:_r,pointToSegmentDistance:q,closestPointOnSegment:Hh,clipSegment:nu,_getEdgeIntersection:lf,_getBitCode:_s,_sqClosestPointOnSegment:Ii,isFlat:yn,_flat:vl,polylineCenter:So},cf={project:function(m){return new le(m.lng,m.lat)},unproject:function(m){return new ce(m.y,m.x)},bounds:new ge([-180,-90],[180,90])},ko={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ge([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(m){var C=Math.PI/180,D=this.R,j=m.lat*C,J=this.R_MINOR/D,_e=Math.sqrt(1-J*J),He=_e*Math.sin(j),lt=Math.tan(Math.PI/4-j/2)/Math.pow((1-He)/(1+He),_e/2);return j=-D*Math.log(Math.max(lt,1e-10)),new le(m.lng*C*D,j)},unproject:function(m){for(var C=180/Math.PI,D=this.R,j=this.R_MINOR/D,J=Math.sqrt(1-j*j),_e=Math.exp(-m.y/D),He=Math.PI/2-2*Math.atan(_e),lt=0,_t=.1,kt;lt<15&&Math.abs(_t)>1e-7;lt++)kt=J*Math.sin(He),kt=Math.pow((1-kt)/(1+kt),J/2),_t=Math.PI/2-2*Math.atan(_e*kt)-He,He+=_t;return new ce(He*C,m.x*C/D)}},Qi={__proto__:null,LonLat:cf,Mercator:ko,SphericalMercator:Ke},gl=i({},De,{code:"EPSG:3395",projection:ko,transformation:(function(){var m=.5/(Math.PI*ko.R);return Ue(m,.5,-m,.5)})()}),Es=i({},De,{code:"EPSG:4326",projection:cf,transformation:Ue(1/180,1,-1/180,.5)}),Uh=i({},Ne,{projection:cf,transformation:Ue(1,0,-1,0),scale:function(m){return Math.pow(2,m)},zoom:function(m){return Math.log(m)/Math.LN2},distance:function(m,C){var D=C.lng-m.lng,j=C.lat-m.lat;return Math.sqrt(D*D+j*j)},infinite:!0});Ne.Earth=De,Ne.EPSG3395=gl,Ne.EPSG3857=ut,Ne.EPSG900913=We,Ne.EPSG4326=Es,Ne.Simple=Uh;var Vo=ie.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(m){return m.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(m){return m&&m.removeLayer(this),this},getPane:function(m){return this._map.getPane(m?this.options[m]||m:this.options.pane)},addInteractiveTarget:function(m){return this._map._targets[l(m)]=this,this},removeInteractiveTarget:function(m){return delete this._map._targets[l(m)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(m){var C=m.target;if(C.hasLayer(this)){if(this._map=C,this._zoomAnimated=C._zoomAnimated,this.getEvents){var D=this.getEvents();C.on(D,this),this.once("remove",function(){C.off(D,this)},this)}this.onAdd(C),this.fire("add"),C.fire("layeradd",{layer:this})}}});Rn.include({addLayer:function(m){if(!m._layerAdd)throw new Error("The provided object is not a Layer.");var C=l(m);return this._layers[C]?this:(this._layers[C]=m,m._mapToAdd=this,m.beforeAdd&&m.beforeAdd(this),this.whenReady(m._layerAdd,m),this)},removeLayer:function(m){var C=l(m);return this._layers[C]?(this._loaded&&m.onRemove(this),delete this._layers[C],this._loaded&&(this.fire("layerremove",{layer:m}),m.fire("remove")),m._map=m._mapToAdd=null,this):this},hasLayer:function(m){return l(m)in this._layers},eachLayer:function(m,C){for(var D in this._layers)m.call(C,this._layers[D]);return this},_addLayers:function(m){m=m?P(m)?m:[m]:[];for(var C=0,D=m.length;C<D;C++)this.addLayer(m[C])},_addZoomLimit:function(m){(!isNaN(m.options.maxZoom)||!isNaN(m.options.minZoom))&&(this._zoomBoundLayers[l(m)]=m,this._updateZoomLevels())},_removeZoomLimit:function(m){var C=l(m);this._zoomBoundLayers[C]&&(delete this._zoomBoundLayers[C],this._updateZoomLevels())},_updateZoomLevels:function(){var m=1/0,C=-1/0,D=this._getZoomSpan();for(var j in this._zoomBoundLayers){var J=this._zoomBoundLayers[j].options;m=J.minZoom===void 0?m:Math.min(m,J.minZoom),C=J.maxZoom===void 0?C:Math.max(C,J.maxZoom)}
358this._layersMaxZoom=C===-1/0?void 0:C,this._layersMinZoom=m===1/0?void 0:m,D!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ws=Vo.extend({initialize:function(m,C){_(this,C),this._layers={};var D,j;if(m)for(D=0,j=m.length;D<j;D++)this.addLayer(m[D])},addLayer:function(m){var C=this.getLayerId(m);return this._layers[C]=m,this._map&&this._map.addLayer(m),this},removeLayer:function(m){var C=m in this._layers?m:this.getLayerId(m);return this._map&&this._layers[C]&&this._map.removeLayer(this._layers[C]),delete this._layers[C],this},hasLayer:function(m){var C=typeof m=="number"?m:this.getLayerId(m);return C in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(m){var C=Array.prototype.slice.call(arguments,1),D,j;for(D in this._layers)j=this._layers[D],j[m]&&j[m].apply(j,C);return this},onAdd:function(m){this.eachLayer(m.addLayer,m)},onRemove:function(m){this.eachLayer(m.removeLayer,m)},eachLayer:function(m,C){for(var D in this._layers)m.call(C,this._layers[D]);return this},getLayer:function(m){return this._layers[m]},getLayers:function(){var m=[];return this.eachLayer(m.push,m),m},setZIndex:function(m){return this.invoke("setZIndex",m)},getLayerId:function(m){return l(m)}}),da=function(m,C){return new ws(m,C)},_i=ws.extend({addLayer:function(m){return this.hasLayer(m)?this:(m.addEventParent(this),ws.prototype.addLayer.call(this,m),this.fire("layeradd",{layer:m}))},removeLayer:function(m){return this.hasLayer(m)?(m in this._layers&&(m=this._layers[m]),m.removeEventParent(this),ws.prototype.removeLayer.call(this,m),this.fire("layerremove",{layer:m})):this},setStyle:function(m){return this.invoke("setStyle",m)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var m=new Fe;for(var C in this._layers){var D=this._layers[C];m.extend(D.getBounds?D.getBounds():D.getLatLng())}return m}}),Vh=function(m,C){return new _i(m,C)},au=re.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(m){_(this,m)},createIcon:function(m){return this._createIcon("icon",m)},createShadow:function(m){return this._createIcon("shadow",m)},_createIcon:function(m,C){var D=this._getIconUrl(m);if(!D){if(m==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var j=this._createImg(D,C&&C.tagName==="IMG"?C:null);return this._setIconStyles(j,m),(this.options.crossOrigin||this.options.crossOrigin==="")&&(j.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),j},_setIconStyles:function(m,C){var D=this.options,j=D[C+"Size"];typeof j=="number"&&(j=[j,j]);var J=de(j),_e=de(C==="shadow"&&D.shadowAnchor||D.iconAnchor||J&&J.divideBy(2,!0));m.className="leaflet-marker-"+C+" "+(D.className||""),_e&&(m.style.marginLeft=-_e.x+"px",m.style.marginTop=-_e.y+"px"),J&&(m.style.width=J.x+"px",m.style.height=J.y+"px")},_createImg:function(m,C){return C=C||document.createElement("img"),C.src=m,C},_getIconUrl:function(m){return jt.retina&&this.options[m+"RetinaUrl"]||this.options[m+"Url"]}});function Yu(m){return new au(m)}var Kl=au.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(m){return typeof Kl.imagePath!="string"&&(Kl.imagePath=this._detectIconPath()),(this.options.imagePath||Kl.imagePath)+au.prototype._getIconUrl.call(this,m)},_stripUrl:function(m){var C=function(D,j,J){var _e=j.exec(D);return _e&&_e[J]};return m=C(m,/^url\((['"])?(.+)\1\)$/,2),m&&C(m,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var m=hn("div","leaflet-default-icon-path",document.body),C=ys(m,"background-image")||ys(m,"backgroundImage");if(document.body.removeChild(m),C=this._stripUrl(C),C)return C;var D=document.querySelector('link[href$="leaflet.css"]');return D?D.href.substring(0,D.href.length-11-1):""}}),qo=Ks.extend({initialize:function(m){this._marker=m},addHooks:function(){var m=this._marker._icon;this._draggable||(this._draggable=new Gl(m,m,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Tt(m,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&vr(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved}
vendor: 4,107 bytes, line 358
358,_adjustPan:function(m){var C=this._marker,D=C._map,j=this._marker.options.autoPanSpeed,J=this._marker.options.autoPanPadding,_e=Gn(C._icon),He=D.getPixelBounds(),lt=D.getPixelOrigin(),_t=Ae(He.min._subtract(lt).add(J),He.max._subtract(lt).subtract(J));if(!_t.contains(_e)){var kt=de((Math.max(_t.max.x,_e.x)-_t.max.x)/(He.max.x-_t.max.x)-(Math.min(_t.min.x,_e.x)-_t.min.x)/(He.min.x-_t.min.x),(Math.max(_t.max.y,_e.y)-_t.max.y)/(He.max.y-_t.max.y)-(Math.min(_t.min.y,_e.y)-_t.min.y)/(He.min.y-_t.min.y)).multiplyBy(j);D.panBy(kt,{animate:!1}),this._draggable._newPos._add(kt),this._draggable._startPos._add(kt),Xn(C._icon,this._draggable._newPos),this._onDrag(m),this._panRequest=W(this._adjustPan.bind(this,m))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(m){this._marker.options.autoPan&&($(this._panRequest),this._panRequest=W(this._adjustPan.bind(this,m)))},_onDrag:function(m){var C=this._marker,D=C._shadow,j=Gn(C._icon),J=C._map.layerPointToLatLng(j);D&&Xn(D,j),C._latlng=J,m.latlng=J,m.oldLatLng=this._oldLatLng,C.fire("move",m).fire("drag",m)},_onDragEnd:function(m){$(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",m)}}),qh=Vo.extend({options:{icon:new Kl,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(m,C){_(this,C),this._latlng=pe(m)},onAdd:function(m){this._zoomAnimated=this._zoomAnimated&&m.options.markerZoomAnimation,this._zoomAnimated&&m.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(m){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&m.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(m){var C=this._latlng;return this._latlng=pe(m),this.update(),this.fire("move",{oldLatLng:C,latlng:this._latlng})},setZIndexOffset:function(m){return this.options.zIndexOffset=m,this.update()},getIcon:function(){return this.options.icon},setIcon:function(m){return this.options.icon=m,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var m=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(m)}return this},_initIcon:function(){var m=this.options,C="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),D=m.icon.createIcon(this._icon),j=!1;D!==this._icon&&(this._icon&&this._removeIcon(),j=!0,m.title&&(D.title=m.title),D.tagName==="IMG"&&(D.alt=m.alt||"")),Tt(D,C),m.keyboard&&(D.tabIndex="0",D.setAttribute("role","button")),this._icon=D,m.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&nn(D,"focus",this._panOnFocus,this);var J=m.icon.createShadow(this._shadow),_e=!1;J!==this._shadow&&(this._removeShadow(),_e=!0),J&&(Tt(J,C),J.alt=""),this._shadow=J,m.opacity<1&&this._updateOpacity(),j&&this.getPane().appendChild(this._icon),this._initInteraction(),J&&_e&&this.getPane(m.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Oi(this._icon,"focus",this._panOnFocus,this),fi(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&fi(this._shadow),this._shadow=null},_setPos:function(m){this._icon&&Xn(this._icon,m),this._shadow&&Xn(this._shadow,m),this._zIndex=m.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(m){this._icon&&(this._icon.style.zIndex=this._zIndex+m)}
358,_animateZoom:function(m){var C=this._map._latLngToNewLayerPoint(this._latlng,m.zoom,m.center).round();this._setPos(C)},_initInteraction:function(){if(this.options.interactive&&(Tt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),qo)){var m=this.options.draggable;this.dragging&&(m=this.dragging.enabled(),this.dragging.disable()),this.dragging=new qo(this),m&&this.dragging.enable()}},setOpacity:function(m){return this.options.opacity=m,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var m=this.options.opacity;this._icon&&Pi(this._icon,m),this._shadow&&Pi(this._shadow,m)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var m=this._map;if(m){var C=this.options.icon.options,D=C.iconSize?de(C.iconSize):de(0,0),j=C.iconAnchor?de(C.iconAnchor):de(0,0);m.panInside(this._latlng,{paddingTopLeft:j,paddingBottomRight:D.subtract(j)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function jh(m,C){return new qh(m,C)}var Ss=Vo.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(m){this._renderer=m.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(m){return _(this,m),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&m&&Object.prototype.hasOwnProperty.call(m,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Xu=Ss.extend({options:{fill:!0,radius:10},initialize:function(m,C){_(this,C),this._latlng=pe(m),this._radius=this.options.radius},setLatLng:function(m){var C=this._latlng;return this._latlng=pe(m),this.redraw(),this.fire("move",{oldLatLng:C,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(m){return this.options.radius=this._radius=m,this.redraw()},getRadius:function(){return this._radius},setStyle:function(m){var C=m&&m.radius||this._radius;return Ss.prototype.setStyle.call(this,m),this.setRadius(C),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var m=this._radius,C=this._radiusY||m,D=this._clickTolerance(),j=[m+D,C+D];this._pxBounds=new ge(this._point.subtract(j),this._point.add(j))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(m){return m.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function T0(m,C){return new Xu(m,C)}var $h=Xu.extend({initialize:function(m,C,D){if(typeof C=="number"&&(C=i({},D,{radius:C})),_(this,C),this._latlng=pe(m),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(m){return this._mRadius=m,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var m=[this._radius,this._radiusY||this._radius];return new Fe(this._map.layerPointToLatLng(this._point.subtract(m)),this._map.layerPointToLatLng(this._point.add(m)))},setStyle:Ss.prototype.setStyle,_project:function(){var m=this._latlng.lng,C=this._latlng.lat,D=this._map,j=D.options.crs;if(j.distance===De.distance){var J=Math.PI/180,_e=this._mRadius/De.R/J,He=D.project([C+_e,m]),lt=D.project([C-_e,m]),_t=He.add(lt).divideBy(2),kt=D.unproject(_t).lat,dr=Math.acos((Math.cos(_e*J)-Math.sin(C*J)*Math.sin(kt*J))/(Math.cos(C*J)*Math.cos(kt*J)))/J;(isNaN(dr)||dr===0)&&(dr=_e/Math.cos(Math.PI/180*C)),this._point=_t.subtract(D.getPixelOrigin()),this._radius=isNaN(dr)?0:_t.x-D.project([kt,m-dr]).x,this._radiusY=_t.
358y-He.y}else{var Vr=j.unproject(j.project(this._latlng).subtract([this._mRadius,0]));this._point=D.latLngToLayerPoint(this._latlng),this._radius=this._point.x-D.latLngToLayerPoint(Vr).x}this._updateBounds()}});function Zm(m,C,D){return new $h(m,C,D)}var Co=Ss.extend({options:{smoothFactor:1,noClip:!1},initialize:function(m,C){_(this,C),this._setLatLngs(m)},getLatLngs:function(){return this._latlngs},setLatLngs:function(m){return this._setLatLngs(m),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(m){for(var C=1/0,D=null,j=Ii,J,_e,He=0,lt=this._parts.length;He<lt;He++)for(var _t=this._parts[He],kt=1,dr=_t.length;kt<dr;kt++){J=_t[kt-1],_e=_t[kt];var Vr=j(m,J,_e,!0);Vr<C&&(C=Vr,D=j(m,J,_e))}return D&&(D.distance=Math.sqrt(C)),D},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return So(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(m,C){return C=C||this._defaultShape(),m=pe(m),C.push(m),this._bounds.extend(m),this.redraw()},_setLatLngs:function(m){this._bounds=new Fe,this._latlngs=this._convertLatLngs(m)},_defaultShape:function(){return yn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(m){for(var C=[],D=yn(m),j=0,J=m.length;j<J;j++)D?(C[j]=pe(m[j]),this._bounds.extend(C[j])):C[j]=this._convertLatLngs(m[j]);return C},_project:function(){var m=new ge;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,m),this._bounds.isValid()&&m.isValid()&&(this._rawPxBounds=m,this._updateBounds())},_updateBounds:function(){var m=this._clickTolerance(),C=new le(m,m);this._rawPxBounds&&(this._pxBounds=new ge([this._rawPxBounds.min.subtract(C),this._rawPxBounds.max.add(C)]))},_projectLatlngs:function(m,C,D){var j=m[0]instanceof ce,J=m.length,_e,He;if(j){for(He=[],_e=0;_e<J;_e++)He[_e]=this._map.latLngToLayerPoint(m[_e]),D.extend(He[_e]);C.push(He)}else for(_e=0;_e<J;_e++)this._projectLatlngs(m[_e],C,D)},_clipPoints:function(){var m=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(m))){if(this.options.noClip){this._parts=this._rings;return}var C=this._parts,D,j,J,_e,He,lt,_t;for(D=0,J=0,_e=this._rings.length;D<_e;D++)for(_t=this._rings[D],j=0,He=_t.length;j<He-1;j++)lt=nu(_t[j],_t[j+1],m,j,!0),lt&&(C[J]=C[J]||[],C[J].push(lt[0]),(lt[1]!==_t[j+1]||j===He-2)&&(C[J].push(lt[1]),J++))}},_simplifyPoints:function(){for(var m=this._parts,C=this.options.smoothFactor,D=0,j=m.length;D<j;D++)m[D]=_r(m[D],C)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(m,C){var D,j,J,_e,He,lt,_t=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(m))return!1;for(D=0,_e=this._parts.length;D<_e;D++)for(lt=this._parts[D],j=0,He=lt.length,J=He-1;j<He;J=j++)if(!(!C&&j===0)&&q(m,lt[J],lt[j])<=_t)return!0;return!1}});function K_(m,C){return new Co(m,C)}Co._flat=vl;var ou=Co.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
358,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ym(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(m){var C=Co.prototype._convertLatLngs.call(this,m),D=C.length;return D>=2&&C[0]instanceof ce&&C[0].equals(C[D-1])&&C.pop(),C},_setLatLngs:function(m){Co.prototype._setLatLngs.call(this,m),yn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return yn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var m=this._renderer._bounds,C=this.options.weight,D=new le(C,C);if(m=new ge(m.min.subtract(D),m.max.add(D)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(m))){if(this.options.noClip){this._parts=this._rings;return}for(var j=0,J=this._rings.length,_e;j<J;j++)_e=Fh(this._rings[j],m,!0),_e.length&&this._parts.push(_e)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(m){var C=!1,D,j,J,_e,He,lt,_t,kt;if(!this._pxBounds||!this._pxBounds.contains(m))return!1;for(_e=0,_t=this._parts.length;_e<_t;_e++)for(D=this._parts[_e],He=0,kt=D.length,lt=kt-1;He<kt;lt=He++)j=D[He],J=D[lt],j.y>m.y!=J.y>m.y&&m.x<(J.x-j.x)*(m.y-j.y)/(J.y-j.y)+j.x&&(C=!C);return C||Co.prototype._containsPoint.call(this,m,!0)}});function Wh(m,C){return new ou(m,C)}var to=_i.extend({initialize:function(m,C){_(this,C),this._layers={},m&&this.addData(m)},addData:function(m){var C=P(m)?m:m.features,D,j,J;if(C){for(D=0,j=C.length;D<j;D++)J=C[D],(J.geometries||J.geometry||J.features||J.coordinates)&&this.addData(J);return this}var _e=this.options;if(_e.filter&&!_e.filter(m))return this;var He=uf(m,_e);return He?(He.feature=y(m),He.defaultOptions=He.options,this.resetStyle(He),_e.onEachFeature&&_e.onEachFeature(m,He),this.addLayer(He)):this},resetStyle:function(m){return m===void 0?this.eachLayer(this.resetStyle,this):(m.options=i({},m.defaultOptions),this._setLayerStyle(m,this.options.style),this)},setStyle:function(m){return this.eachLayer(function(C){this._setLayerStyle(C,m)},this)},_setLayerStyle:function(m,C){m.setStyle&&(typeof C=="function"&&(C=C(m.feature)),m.setStyle(C))}});function uf(m,C){var D=m.type==="Feature"?m.geometry:m,j=D?D.coordinates:null,J=[],_e=C&&C.pointToLayer,He=C&&C.coordsToLatLng||Gh,lt,_t,kt,dr;if(!j&&!D)return null;switch(D.type){case"Point":return lt=He(j),Zn(_e,m,lt,C);case"MultiPoint":for(kt=0,dr=j.length;kt<dr;kt++)lt=He(j[kt]),J.push(Zn(_e,m,lt,C));return new _i(J);case"LineString":case"MultiLineString":return _t=yl(j,D.type==="LineString"?0:1,He),new Co(_t,C);case"Polygon":case"MultiPolygon":return _t=yl(j,D.type==="Polygon"?1:2,He),new ou(_t,C);case"GeometryCollection":for(kt=0,dr=D.geometries.length;kt<dr;kt++){var Vr=uf({geometry:D.geometries[kt],type:"Feature",properties:m.properties},C);Vr&&J.push(Vr)}return new _i(J);case"FeatureCollection":for(kt=0,dr=D.features.length;kt<dr;kt++){var Qr=uf(D.features[kt],C);Qr&&J.push(Qr)}return new _i(J);default:throw new Error("Invalid GeoJSON object.")}}function Zn(m,C,D,j){return m?m(C,D):new qh(D,j&&j.markersInheritOptions&&j)}function Gh(m){return new ce(m[1],m[0],m[2])}function yl(m,C,D){for(var j=[],J=0,_e=m.length,He;J<_e;J++)He=C?yl(m[J],C-1,D):(D||Gh)(m[J]),j.push(He);return j}function Kh(m,C){return m=pe(m),m.alt!==void 0?[h(m.lng,C),h(m.lat,C),h(m.alt,C)]:[h(m.lng,C),h(m.lat,C)]}function df(m,C,D,j){for(var J=[],_e=0,He=m.length;_e<He;_e++)J.push(C?df(m[_e],yn(m[_e])?0:C-1,D,j):Kh(m[_e],j));return!C&&D&&J.length>0&&J.push(J[0].slice()),J}function Nn(m,C){return m.feature?i({},m.feature,{geometry:C}):y(C)}function y(m){return m.type==="Feature"||m.type==="FeatureCollection"?m:{type:"Feature",properties:{},geometry:m}}var T={toGeoJSON:function(m){return Nn(this,{type:"Point",coordinates:Kh(this.getLatLng(),m)})}};qh.include(T),$h.include(T),Xu.include(T),Co.include({toGeoJSON:function(m){var C=!yn(this._latlngs),D=df(this._latlngs,C?1:0,!1,m);return Nn(this,{type:(C?"Multi":"")+"LineString",coordinates:D})}}),ou.include({toGeoJSON:function(m){var C=!yn(this._latlngs),D=C&&!yn(this._latlngs[0]),j=df(this._latlngs,D?2:C?1:0,!0,m);return C||(j=[j]),Nn(this,{type:(D?"Multi":"")+"Polygon",coordinates:j})}}
358),ws.include({toMultiPoint:function(m){var C=[];return this.eachLayer(function(D){C.push(D.toGeoJSON(m).geometry.coordinates)}),Nn(this,{type:"MultiPoint",coordinates:C})},toGeoJSON:function(m){var C=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(C==="MultiPoint")return this.toMultiPoint(m);var D=C==="GeometryCollection",j=[];return this.eachLayer(function(J){if(J.toGeoJSON){var _e=J.toGeoJSON(m);if(D)j.push(_e.geometry);else{var He=y(_e);He.type==="FeatureCollection"?j.push.apply(j,He.features):j.push(He)}}}),D?Nn(this,{geometries:j,type:"GeometryCollection"}):{type:"FeatureCollection",features:j}}});function A(m,C){return new to(m,C)}var k=A,z=Vo.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(m,C,D){this._url=m,this._bounds=Pe(C),_(this,D)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){fi(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(m){return this.options.opacity=m,this._image&&this._updateOpacity(),this},setStyle:function(m){return m.opacity&&this.setOpacity(m.opacity),this},bringToFront:function(){return this._map&&gt(this._image),this},bringToBack:function(){return this._map&&tt(this._image),this},setUrl:function(m){return this._url=m,this._image&&(this._image.src=m),this},setBounds:function(m){return this._bounds=Pe(m),this._map&&this._reset(),this},getEvents:function(){var m={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(m.zoomanim=this._animateZoom),m},setZIndex:function(m){return this.options.zIndex=m,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var m=this._url.tagName==="IMG",C=this._image=m?this._url:hn("img");if(Tt(C,"leaflet-image-layer"),this._zoomAnimated&&Tt(C,"leaflet-zoom-animated"),this.options.className&&Tt(C,this.options.className),C.onselectstart=f,C.onmousemove=f,C.onload=o(this.fire,this,"load"),C.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(C.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),m){this._url=C.src;return}C.src=this._url,C.alt=this.options.alt},_animateZoom:function(m){var C=this._map.getZoomScale(m.zoom),D=this._map._latLngBoundsToNewLayerBounds(this._bounds,m.zoom,m.center).min;Un(this._image,D,C)},_reset:function(){var m=this._image,C=new ge(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),D=C.getSize();Xn(m,C.min),m.style.width=D.x+"px",m.style.height=D.y+"px"},_updateOpacity:function(){Pi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var m=this.options.errorOverlayUrl;m&&this._url!==m&&(this._url=m,this._image.src=m)},getCenter:function(){return this._bounds.getCenter()}}),U=function(m,C,D){return new z(m,C,D)},Y=z.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var m=this._url.tagName==="VIDEO",C=this._image=m?this._url:hn("video");if(Tt(C,"leaflet-image-layer"),this._zoomAnimated&&Tt(C,"leaflet-zoom-animated"),this.options.className&&Tt(C,this.options.className),C.onselectstart=f,C.onmousemove=f,C.onloadeddata=o(this.fire,this,"load"),m){for(var D=C.getElementsByTagName("source"),j=[],J=0;J<D.length;J++)j.push(D[J].src);this._url=D.length>0?j:[C.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(C.style,"objectFit")&&(C.style.objectFit="fill"),C.autoplay=!!this.options.autoplay,C.loop=!!this.options.loop,C.muted=!!this.options.muted,C.playsInl
358ine=!!this.options.playsInline;for(var _e=0;_e<this._url.length;_e++){var He=hn("source");He.src=this._url[_e],C.appendChild(He)}}});function Z(m,C,D){return new Y(m,C,D)}var ue=z.extend({_initImage:function(){var m=this._image=this._url;Tt(m,"leaflet-image-layer"),this._zoomAnimated&&Tt(m,"leaflet-zoom-animated"),this.options.className&&Tt(m,this.options.className),m.onselectstart=f,m.onmousemove=f}});function he(m,C,D){return new ue(m,C,D)}var Se=Vo.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(m,C){m&&(m instanceof ce||P(m))?(this._latlng=pe(m),_(this,C)):(_(this,m),this._source=C),this.options.content&&(this._content=this.options.content)},openOn:function(m){return m=arguments.length?m:this._source._map,m.hasLayer(this)||m.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(m){return this._map?this.close():(arguments.length?this._source=m:m=this._source,this._prepareOpen(),this.openOn(m._map)),this},onAdd:function(m){this._zoomAnimated=m._zoomAnimated,this._container||this._initLayout(),m._fadeAnimated&&Pi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),m._fadeAnimated&&Pi(this._container,1),this.bringToFront(),this.options.interactive&&(Tt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(m){m._fadeAnimated?(Pi(this._container,0),this._removeTimeout=setTimeout(o(fi,void 0,this._container),200)):fi(this._container),this.options.interactive&&(vr(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(m){return this._latlng=pe(m),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(m){return this._content=m,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var m={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(m.zoomanim=this._animateZoom),m},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&gt(this._container),this},bringToBack:function(){return this._map&&tt(this._container),this},_prepareOpen:function(m){var C=this._source;if(!C._map)return!1;if(C instanceof _i){C=null;var D=this._source._layers;for(var j in D)if(D[j]._map){C=D[j];break}if(!C)return!1;this._source=C}if(!m)if(C.getCenter)m=C.getCenter();else if(C.getLatLng)m=C.getLatLng();else if(C.getBounds)m=C.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(m),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var m=this._contentNode,C=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof C=="string")m.innerHTML=C;else{for(;m.hasChildNodes();)m.removeChild(m.firstChild);m.appendChild(C)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var m=this._map.latLngToLayerPoint(this._latlng),C=de(this.options.offset),D=this._getAnchor();this._zoomAnimated?Xn(this._container,m.add(D)):C=C.add(m).add(D);var j=this._containerBottom=-C.y,J=this._containerLeft=-Math.round(this._containerWidth/2)+C.x;this._container.style.bottom=j+"px",this._container.style.left=J+"px"}},_getAnchor:function(){return[0,0]}});Rn.include({_initOverlay:function(m,C,D,j){var J=C;return J instanceof m||(J=new m(j).setContent(C)),D&&J.setLatLng(D),J}}),Vo.include({_initOverlay:function(m,C,D,j){var J=D;return J instanceof m?(_(J,j),J._source=this):(J=C&&!j?C:new m(j,this),J.setContent(D)),J}});var we=Se.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(m){return m=arguments.length?m:this._source._map,!m.hasLayer(this)&&m._popup&&m._popup.options.autoClose&&m.removeLayer(m._popup),m._popup=this,Se.prototype.openOn.call(this,m)},onAdd:function(m){Se.prototype.onAdd.call(this,m),m.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ss||this._source.on("preclick",jl))},onRemove:function(m){Se.prototype.onRemove.call(this,m),m.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ss||this._source.off("preclick",jl))},getEvents:function(){var m=Se.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(m.preclick=this.close),this.options.keepInView&&
358(m.moveend=this._adjustPan),m},_initLayout:function(){var m="leaflet-popup",C=this._container=hn("div",m+" "+(this.options.className||"")+" leaflet-zoom-animated"),D=this._wrapper=hn("div",m+"-content-wrapper",C);if(this._contentNode=hn("div",m+"-content",D),tu(C),qm(this._contentNode),nn(C,"contextmenu",jl),this._tipContainer=hn("div",m+"-tip-container",C),this._tip=hn("div",m+"-tip",this._tipContainer),this.options.closeButton){var j=this._closeButton=hn("a",m+"-close-button",C);j.setAttribute("role","button"),j.setAttribute("aria-label","Close popup"),j.href="#close",j.innerHTML='<span aria-hidden="true">&#215;</span>',nn(j,"click",function(J){Ja(J),this.close()},this)}},_updateLayout:function(){var m=this._contentNode,C=m.style;C.width="",C.whiteSpace="nowrap";var D=m.offsetWidth;D=Math.min(D,this.options.maxWidth),D=Math.max(D,this.options.minWidth),C.width=D+1+"px",C.whiteSpace="",C.height="";var j=m.offsetHeight,J=this.options.maxHeight,_e="leaflet-popup-scrolled";J&&j>J?(C.height=J+"px",Tt(m,_e)):vr(m,_e),this._containerWidth=this._container.offsetWidth},_animateZoom:function(m){var C=this._map._latLngToNewLayerPoint(this._latlng,m.zoom,m.center),D=this._getAnchor();Xn(this._container,C.add(D))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var m=this._map,C=parseInt(ys(this._container,"marginBottom"),10)||0,D=this._container.offsetHeight+C,j=this._containerWidth,J=new le(this._containerLeft,-D-this._containerBottom);J._add(Gn(this._container));var _e=m.layerPointToContainerPoint(J),He=de(this.options.autoPanPadding),lt=de(this.options.autoPanPaddingTopLeft||He),_t=de(this.options.autoPanPaddingBottomRight||He),kt=m.getSize(),dr=0,Vr=0;_e.x+j+_t.x>kt.x&&(dr=_e.x+j-kt.x+_t.x),_e.x-dr-lt.x<0&&(dr=_e.x-lt.x),_e.y+D+_t.y>kt.y&&(Vr=_e.y+D-kt.y+_t.y),_e.y-Vr-lt.y<0&&(Vr=_e.y-lt.y),(dr||Vr)&&(this.options.keepInView&&(this._autopanning=!0),m.fire("autopanstart").panBy([dr,Vr]))}},_getAnchor:function(){return de(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ee=function(m,C){return new we(m,C)};Rn.mergeOptions({closePopupOnClick:!0}),Rn.include({openPopup:function(m,C,D){return this._initOverlay(we,m,C,D).openOn(this),this},closePopup:function(m){return m=arguments.length?m:this._popup,m&&m.close(),this}}),Vo.include({bindPopup:function(m,C){return this._popup=this._initOverlay(we,this._popup,m,C),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(m){return this._popup&&(this instanceof _i||(this._popup._source=this),this._popup._prepareOpen(m||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(m){return this._popup&&this._popup.setContent(m),this},getPopup:function(){return this._popup},_openPopup:function(m){if(!(!this._popup||!this._map)){$l(m);var C=m.layer||m.target;if(this._popup._source===C&&!(C instanceof Ss)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(m.latlng);return}this._popup._source=C,this.openPopup(m.latlng)}},_movePopup:function(m){this._popup.setLatLng(m.latlng)},_onKeyPress:function(m){m.originalEvent.keyCode===13&&this._openPopup(m)}});var oe=Se.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(m){Se.prototype.onAdd.call(this,m),this.setOpacity(this.options.opacity),m.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(m){Se.prototype.onRemove.call(this,m),m.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var m=Se.prototype.getEvents.call(this);return this.options.permanent||(m.preclick=this.close),m},_initLayout:function(){var m="leaflet-tooltip",C=m+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=hn("div",C),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){}
358,_setPosition:function(m){var C,D,j=this._map,J=this._container,_e=j.latLngToContainerPoint(j.getCenter()),He=j.layerPointToContainerPoint(m),lt=this.options.direction,_t=J.offsetWidth,kt=J.offsetHeight,dr=de(this.options.offset),Vr=this._getAnchor();lt==="top"?(C=_t/2,D=kt):lt==="bottom"?(C=_t/2,D=0):lt==="center"?(C=_t/2,D=kt/2):lt==="right"?(C=0,D=kt/2):lt==="left"?(C=_t,D=kt/2):He.x<_e.x?(lt="right",C=0,D=kt/2):(lt="left",C=_t+(dr.x+Vr.x)*2,D=kt/2),m=m.subtract(de(C,D,!0)).add(dr).add(Vr),vr(J,"leaflet-tooltip-right"),vr(J,"leaflet-tooltip-left"),vr(J,"leaflet-tooltip-top"),vr(J,"leaflet-tooltip-bottom"),Tt(J,"leaflet-tooltip-"+lt),Xn(J,m)},_updatePosition:function(){var m=this._map.latLngToLayerPoint(this._latlng);this._setPosition(m)},setOpacity:function(m){this.options.opacity=m,this._container&&Pi(this._container,m)},_animateZoom:function(m){var C=this._map._latLngToNewLayerPoint(this._latlng,m.zoom,m.center);this._setPosition(C)},_getAnchor:function(){return de(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),K=function(m,C){return new oe(m,C)};Rn.include({openTooltip:function(m,C,D){return this._initOverlay(oe,m,C,D).openOn(this),this},closeTooltip:function(m){return m.close(),this}}),Vo.include({bindTooltip:function(m,C){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(oe,this._tooltip,m,C),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(m){if(!(!m&&this._tooltipHandlersAdded)){var C=m?"off":"on",D={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?D.add=this._openTooltip:(D.mouseover=this._openTooltip,D.mouseout=this.closeTooltip,D.click=this._openTooltip,this._map?this._addFocusListeners():D.add=this._addFocusListeners),this._tooltip.options.sticky&&(D.mousemove=this._moveTooltip),this[C](D),this._tooltipHandlersAdded=!m}},openTooltip:function(m){return this._tooltip&&(this instanceof _i||(this._tooltip._source=this),this._tooltip._prepareOpen(m)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(m){return this._tooltip&&this._tooltip.setContent(m),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(m){var C=typeof m.getElement=="function"&&m.getElement();C&&(nn(C,"focus",function(){this._tooltip._source=m,this.openTooltip()},this),nn(C,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(m){var C=typeof m.getElement=="function"&&m.getElement();C&&C.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(m){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var C=this;this._map.once("moveend",function(){C._openOnceFlag=!1,C._openTooltip(m)});return}this._tooltip._source=m.layer||m.target,this.openTooltip(this._tooltip.options.sticky?m.latlng:void 0)}},_moveTooltip:function(m){var C=m.latlng,D,j;this._tooltip.options.sticky&&m.originalEvent&&(D=this._map.mouseEventToContainerPoint(m.originalEvent),j=this._map.containerPointToLayerPoint(D),C=this._map.layerPointToLatLng(j)),this._tooltip.setLatLng(C)}});var ne=au.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(m){var C=m&&m.tagName==="DIV"?m:document.createElement("div"),D=this.options;if(D.html instanceof Element?(Ai(C),C.appendChild(D.html)):C.innerHTML=D.html!==!1?D.html:"",D.bgPos){var j=de(
358D.bgPos);C.style.backgroundPosition=-j.x+"px "+-j.y+"px"}return this._setIconStyles(C,"icon"),C},createShadow:function(){return null}});function se(m){return new ne(m)}au.Default=Kl;var be=Vo.extend({options:{tileSize:256,opacity:1,updateWhenIdle:jt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(m){_(this,m)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(m){m._addZoomLimit(this)},onRemove:function(m){this._removeAllTiles(),fi(this._container),m._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(gt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(tt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(m){return this.options.opacity=m,this._updateOpacity(),this},setZIndex:function(m){return this.options.zIndex=m,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var m=this._clampZoom(this._map.getZoom());m!==this._tileZoom&&(this._tileZoom=m,this._updateLevels()),this._update()}return this},getEvents:function(){var m={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),m.move=this._onMove),this._zoomAnimated&&(m.zoomanim=this._animateZoom),m},createTile:function(){return document.createElement("div")},getTileSize:function(){var m=this.options.tileSize;return m instanceof le?m:new le(m,m)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(m){for(var C=this.getPane().children,D=-m(-1/0,1/0),j=0,J=C.length,_e;j<J;j++)_e=C[j].style.zIndex,C[j]!==this._container&&_e&&(D=m(D,+_e));isFinite(D)&&(this.options.zIndex=D+m(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!jt.ielt9){Pi(this._container,this.options.opacity);var m=+new Date,C=!1,D=!1;for(var j in this._tiles){var J=this._tiles[j];if(!(!J.current||!J.loaded)){var _e=Math.min(1,(m-J.loaded)/200);Pi(J.el,_e),_e<1?C=!0:(J.active?D=!0:this._onOpaqueTile(J),J.active=!0)}}D&&!this._noPrune&&this._pruneTiles(),C&&($(this._fadeFrame),this._fadeFrame=W(this._updateOpacity,this))}},_onOpaqueTile:f,_initContainer:function(){this._container||(this._container=hn("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var m=this._tileZoom,C=this.options.maxZoom;if(m!==void 0){for(var D in this._levels)D=Number(D),this._levels[D].el.children.length||D===m?(this._levels[D].el.style.zIndex=C-Math.abs(m-D),this._onUpdateLevel(D)):(fi(this._levels[D].el),this._removeTilesAtZoom(D),this._onRemoveLevel(D),delete this._levels[D]);var j=this._levels[m],J=this._map;return j||(j=this._levels[m]={},j.el=hn("div","leaflet-tile-container leaflet-zoom-animated",this._container),j.el.style.zIndex=C,j.origin=J.project(J.unproject(J.getPixelOrigin()),m).round(),j.zoom=m,this._setZoomTransform(j,J.getCenter(),J.getZoom()),f(j.el.offsetWidth),this._onCreateLevel(j)),this._level=j,j}},_onUpdateLevel:f,_onRemoveLevel:f,_onCreateLevel:f,_pruneTiles:function(){if(this._map){var m,C,D=this._map.getZoom();if(D>this.options.maxZoom||D<this.options.minZoom){this._removeAllTiles();return}for(m in this._tiles)C=this._tiles[m],C.retain=C.current;for(m in this._tiles)if(C=this._tiles[m],C.current&&!C.active){var j=C.coords;this._retainParent(j.x,j.y,j.z,j.z-5)||this._retainChildren(j.x,j.y,j.z,j.z+2)}for(m in this._tiles)this._tiles[m].retain||this._removeTile(m)}},_removeTilesAtZoom:function(m){for(var C in this._tiles)this._tiles[C].coords.z===m&&this._removeTile(C)},_removeAllTiles:function(){for(var m in this._tiles)this._removeTile(m)},_invalidateAll:function(){for(var m in this._levels)fi(this._levels[m].el),this._onRemoveLevel(Number(m)),delete this._levels[m];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(m,C,D,j){var J=Math.floor(m/2),_e=Math.floor(C/2),He=D-1,lt=new le(+J,+_e);
358lt.z=+He;var _t=this._tileCoordsToKey(lt),kt=this._tiles[_t];return kt&&kt.active?(kt.retain=!0,!0):(kt&&kt.loaded&&(kt.retain=!0),He>j?this._retainParent(J,_e,He,j):!1)},_retainChildren:function(m,C,D,j){for(var J=2*m;J<2*m+2;J++)for(var _e=2*C;_e<2*C+2;_e++){var He=new le(J,_e);He.z=D+1;var lt=this._tileCoordsToKey(He),_t=this._tiles[lt];if(_t&&_t.active){_t.retain=!0;continue}else _t&&_t.loaded&&(_t.retain=!0);D+1<j&&this._retainChildren(J,_e,D+1,j)}},_resetView:function(m){var C=m&&(m.pinch||m.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),C,C)},_animateZoom:function(m){this._setView(m.center,m.zoom,!0,m.noUpdate)},_clampZoom:function(m){var C=this.options;return C.minNativeZoom!==void 0&&m<C.minNativeZoom?C.minNativeZoom:C.maxNativeZoom!==void 0&&C.maxNativeZoom<m?C.maxNativeZoom:m},_setView:function(m,C,D,j){var J=Math.round(C);this.options.maxZoom!==void 0&&J>this.options.maxZoom||this.options.minZoom!==void 0&&J<this.options.minZoom?J=void 0:J=this._clampZoom(J);var _e=this.options.updateWhenZooming&&J!==this._tileZoom;(!j||_e)&&(this._tileZoom=J,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),J!==void 0&&this._update(m),D||this._pruneTiles(),this._noPrune=!!D),this._setZoomTransforms(m,C)},_setZoomTransforms:function(m,C){for(var D in this._levels)this._setZoomTransform(this._levels[D],m,C)},_setZoomTransform:function(m,C,D){var j=this._map.getZoomScale(D,m.zoom),J=m.origin.multiplyBy(j).subtract(this._map._getNewPixelOrigin(C,D)).round();jt.any3d?Un(m.el,J,j):Xn(m.el,J)},_resetGrid:function(){var m=this._map,C=m.options.crs,D=this._tileSize=this.getTileSize(),j=this._tileZoom,J=this._map.getPixelWorldBounds(this._tileZoom);J&&(this._globalTileRange=this._pxBoundsToTileRange(J)),this._wrapX=C.wrapLng&&!this.options.noWrap&&[Math.floor(m.project([0,C.wrapLng[0]],j).x/D.x),Math.ceil(m.project([0,C.wrapLng[1]],j).x/D.y)],this._wrapY=C.wrapLat&&!this.options.noWrap&&[Math.floor(m.project([C.wrapLat[0],0],j).y/D.x),Math.ceil(m.project([C.wrapLat[1],0],j).y/D.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(m){var C=this._map,D=C._animatingZoom?Math.max(C._animateToZoom,C.getZoom()):C.getZoom(),j=C.getZoomScale(D,this._tileZoom),J=C.project(m,this._tileZoom).floor(),_e=C.get
358Size().divideBy(j*2);return new ge(J.subtract(_e),J.add(_e))},_update:function(m){var C=this._map;if(C){var D=this._clampZoom(C.getZoom());if(m===void 0&&(m=C.getCenter()),this._tileZoom!==void 0){var j=this._getTiledPixelBounds(m),J=this._pxBoundsToTileRange(j),_e=J.getCenter(),He=[],lt=this.options.keepBuffer,_t=new ge(J.getBottomLeft().subtract([lt,-lt]),J.getTopRight().add([lt,-lt]));if(!(isFinite(J.min.x)&&isFinite(J.min.y)&&isFinite(J.max.x)&&isFinite(J.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var kt in this._tiles){var dr=this._tiles[kt].coords;(dr.z!==this._tileZoom||!_t.contains(new le(dr.x,dr.y)))&&(this._tiles[kt].current=!1)}if(Math.abs(D-this._tileZoom)>1){this._setView(m,D);return}for(var Vr=J.min.y;Vr<=J.max.y;Vr++)for(var Qr=J.min.x;Qr<=J.max.x;Qr++){var Ia=new le(Qr,Vr);if(Ia.z=this._tileZoom,!!this._isValidTile(Ia)){var Wr=this._tiles[this._tileCoordsToKey(Ia)];Wr?Wr.current=!0:He.push(Ia)}}if(He.sort(function(ba,fa){return ba.distanceTo(_e)-fa.distanceTo(_e)}),He.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Sn=document.createDocumentFragment();for(Qr=0;Qr<He.length;Qr++)this._addTile(He[Qr],Sn);this._level.el.appendChild(Sn)}}}},_isValidTile:function(m){var C=this._map.options.crs;if(!C.infinite){var D=this._globalTileRange;if(!C.wrapLng&&(m.x<D.min.x||m.x>D.max.x)||!C.wrapLat&&(m.y<D.min.y||m.y>D.max.y))return!1}if(!this.options.bounds)return!0;var j=this._tileCoordsToBounds(m);return Pe(this.options.bounds).overlaps(j)},_keyToBounds:function(m){return this._tileCoordsToBounds(this._keyToTileCoords(m))},_tileCoordsToNwSe:function(m){var C=this._map,D=this.getTileSize(),j=m.scaleBy(D),J=j.add(D),_e=C.unproject(j,m.z),He=C.unproject(J,m.z);return[_e,He]},_tileCoordsToBounds:function(m){var C=this._tileCoordsToNwSe(m),D=new Fe(C[0],C[1]);return this.options.noWrap||(D=this._map.wrapLatLngBounds(D)),D},_tileCoordsToKey:function(m){return m.x+":"+m.y+":"+m.z},_keyToTileCoords:function(m){var C=m.split(":"),D=new le(+C[0],+C[1]);return D.z=+C[2],D},_removeTile:function(m){var C=this._tiles[m];C&&(fi(C.el),delete this._tiles[m],this.fire("tileunload",{tile:C.el,coords:this._keyToTileCoords(m)}))},_initTile:function(m){Tt(m,"leaflet-tile");var C=this.getTileSize();m.style.width=C.x+"px",m.style.height=C.y+"px",m.onselectstart=f,m.onmousemove=f,jt.ielt9&&this.options.opacity<1&&Pi(m,this.options.opacity)},_addTile:function(m,C){var D=this._getTilePos(m),j=this._tileCoordsToKey(m),J=this.createTile(this._wrapCoords(m),o(this._tileReady,this,m));this._initTile(J),this.createTile.length<2&&W(o(this._tileReady,this,m,null,J)),Xn(J,D),this._tiles[j]={el:J,coords:m,current:!0},C.appendChild(J),this.fire("tileloadstart",{tile:J,coords:m})},_tileReady:function(m,C,D){C&&this.fire("tileerror",{error:C,tile:D,coords:m});var j=this._tileCoordsToKey(m);D=this._tiles[j],D&&(D.loaded=+new Date,this._map._fadeAnimated?(Pi(D.el,0),$(this._fadeFrame),this._fadeFrame=W(this._updateOpacity,this)):(D.active=!0,this._pruneTiles()),C||(Tt(D.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:D.el,coords:m})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),jt.ielt9||!this._map._fadeAnimated?W(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(m){return m.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(m){var C=new le(this._wrapX?d(m.x,this._wrapX):m.x,this._wrapY?d(m.y,this._wrapY):m.y);return C.z=m.z,C},_pxBoundsToTileRange:function(m){var C=this.getTileSize();return new ge(m.min.unscaleBy(C).floor(),m.max.unscaleBy(C).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var m in this._tiles)if(!this._tiles[m].loaded)return!1;return!0}});function Ie(m){return new be(m)}var Ge=be.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(m,C){this._url=m,C=_(this,C),C.detectRetina&&jt.retina&&C.maxZoom>0?(C.tileSize=Math.floor(C.tileSize/2),C.zoomReverse?(C.zoomOffset--,C.minZoom=Math.min(C.maxZoom,C.minZoom+1)):(C.zoomOffset++,C.maxZoom=Math.max(C.minZoom,C.maxZoom-1)),C.minZoom=Math.max(0,C.minZoom)):C.zoomReverse?C.minZoom=Math.min(C.maxZoom,C.minZoom):C.maxZoom=Math.max(C.minZoom,C.maxZoom),typeof C.subdomains=="string"&&(C.subdomains=C.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(m,C){return this._url===m&&C===void 0&&(C=!0),this._url=m,C||this.redraw(),this},createTile:function(m,C){var D=document.createElement("img");return nn(D,"load",o(this._tileOnLoad,this,C,D)),nn(D,"error",o(this._tileOnError,this,C,D)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(D.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(D.referrerPolicy=this.options.referrerPolicy),D.alt="",D.src=this.getTileUrl(m),D}
358,getTileUrl:function(m){var C={r:jt.retina?"@2x":"",s:this._getSubdomain(m),x:m.x,y:m.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var D=this._globalTileRange.max.y-m.y;this.options.tms&&(C.y=D),C["-y"]=D}return S(this._url,i(C,this.options))},_tileOnLoad:function(m,C){jt.ielt9?setTimeout(o(m,this,null,C),0):m(null,C)},_tileOnError:function(m,C,D){var j=this.options.errorTileUrl;j&&C.getAttribute("src")!==j&&(C.src=j),m(D,C)},_onTileRemove:function(m){m.tile.onload=null},_getZoomForUrl:function(){var m=this._tileZoom,C=this.options.maxZoom,D=this.options.zoomReverse,j=this.options.zoomOffset;return D&&(m=C-m),m+j},_getSubdomain:function(m){var C=Math.abs(m.x+m.y)%this.options.subdomains.length;return this.options.subdomains[C]},_abortLoading:function(){var m,C;for(m in this._tiles)if(this._tiles[m].coords.z!==this._tileZoom&&(C=this._tiles[m].el,C.onload=f,C.onerror=f,!C.complete)){C.src=I;var D=this._tiles[m].coords;fi(C),delete this._tiles[m],this.fire("tileabort",{tile:C,coords:D})}},_removeTile:function(m){var C=this._tiles[m];if(C)return C.el.setAttribute("src",I),be.prototype._removeTile.call(this,m)},_tileReady:function(m,C,D){if(!(!this._map||D&&D.getAttribute("src")===I))return be.prototype._tileReady.call(this,m,C,D)}});function $e(m,C){return new Ge(m,C)}var je=Ge.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(m,C){this._url=m;var D=i({},this.defaultWmsParams);for(var j in C)j in this.options||(D[j]=C[j]);C=_(this,C);var J=C.detectRetina&&jt.retina?2:1,_e=this.getTileSize();D.width=_e.x*J,D.height=_e.y*J,this.wmsParams=D},onAdd:function(m){this._crs=this.options.crs||m.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var C=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[C]=this._crs.code,Ge.prototype.onAdd.call(this,m)},getTileUrl:function(m){var C=this._tileCoordsToNwSe(m),D=this._crs,j=Ae(D.project(C[0]),D.project(C[1])),J=j.min,_e=j.max,He=(this._wmsVersion>=1.3&&this._crs===Es?[J.y,J.x,_e.y,_e.x]:[J.x,J.y,_e.x,_e.y]).join(","),lt=Ge.prototype.getTileUrl.call(this,m);return lt+b(this.wmsParams,lt,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+He},setParams:function(m,C){return i(this.wmsParams,m),C||this.redraw(),this}});function zt(m,C){return new je(m,C)}Ge.WMS=je,$e.wms=zt;var xt=Vo.extend({options:{padding:.1},initialize:function(m){_(this,m),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var m={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(m.zoomanim=this._onAnimZoom),m},_onAnimZoom:function(m){this._updateTransform(m.center,m.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(m,C){var D=this._map.getZoomScale(C,this._zoom),j=this._map.getSize().multiplyBy(.5+this.options.padding),J=this._map.project(this._center,C),_e=j.multiplyBy(-D).add(J).subtract(this._map._getNewPixelOrigin(m,C));jt.any3d?Un(this._container,_e,D):Xn(this._container,_e)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var m in this._layers)this._layers[m]._reset()},_onZoomEnd:function(){for(var m in this._layers)this._layers[m]._project()},_updatePaths:function(){for(var m in this._layers)this._layers[m]._update()},_update:function(){var m=this.options.padding,C=this._map.getSize(),D=this._map.containerPointToLayerPoint(C.multiplyBy(-m)).round();this._bounds=new ge(D,D.add(C.multiplyBy(1+m*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),rt=xt.extend({options:{tolerance:0},getEvents:function(){var m=xt.prototype.getEvents.call(this);return m.viewprereset=this._onViewPreReset,m},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){xt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var m=this._container=document.createElement("canvas");nn(m,"mousemove",this._onMouseMove,this),nn(m,"click dblclick mousedown mouseup contextmenu",this._onClick,this),nn(m,"mouseout",this._handleMouseOut,this),m._leaflet_disable_events=!0,this._ctx=m.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,fi(this._container),Oi(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var m;this._redrawBounds=null;for(var C in this._layers)m=this._layers[C],m._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){xt.prototype._update.call(this);var m=this._bounds,C=this._container,D=m.getSize(),j=jt.retina?2:1;
358Xn(C,m.min),C.width=j*D.x,C.height=j*D.y,C.style.width=D.x+"px",C.style.height=D.y+"px",jt.retina&&this._ctx.scale(2,2),this._ctx.translate(-m.min.x,-m.min.y),this.fire("update")}},_reset:function(){xt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(m){this._updateDashArray(m),this._layers[l(m)]=m;var C=m._order={layer:m,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=C),this._drawLast=C,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(m){this._requestRedraw(m)},_removePath:function(m){var C=m._order,D=C.next,j=C.prev;D?D.prev=j:this._drawLast=j,j?j.next=D:this._drawFirst=D,delete m._order,delete this._layers[l(m)],this._requestRedraw(m)},_updatePath:function(m){this._extendRedrawBounds(m),m._project(),m._update(),this._requestRedraw(m)},_updateStyle:function(m){this._updateDashArray(m),this._requestRedraw(m)},_updateDashArray:function(m){if(typeof m.options.dashArray=="string"){var C=m.options.dashArray.split(/[, ]+/),D=[],j,J;for(J=0;J<C.length;J++){if(j=Number(C[J]),isNaN(j))return;D.push(j)}m.options._dashArray=D}else m.options._dashArray=m.options.dashArray},_requestRedraw:function(m){this._map&&(this._extendRedrawBounds(m),this._redrawRequest=this._redrawRequest||W(this._redraw,this))},_extendRedrawBounds:function(m){if(m._pxBounds){var C=(m.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new ge,this._redrawBounds.extend(m._pxBounds.min.subtract([C,C])),this._redrawBounds.extend(m._pxBounds.max.add([C,C]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var m=this._redrawBounds;if(m){var C=m.getSize();this._ctx.clearRect(m.min.x,m.min.y,C.x,C.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var m,C=this._redrawBounds;if(this._ctx.save(),C){var D=C.getSize();this._ctx.beginPath(),this._ctx.rect(C.min.x,C.min.y,D.x,D.y),this._ctx.clip()}this._drawing=!0;for(var j=this._drawFirst;j;j=j.next)m=j.layer,(!C||m._pxBounds&&m._pxBounds.intersects(C))&&m._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(m,C){if(this._drawing){var D,j,J,_e,He=m._parts,lt=He.length,_t=this._ctx;if(lt){for(_t.beginPath(),D=0;D<lt;D++){for(j=0,J=He[D].length;j<J;j++)_e=He[D][j],_t[j?"lineTo":"moveTo"](_e.x,_e.y);C&&_t.closePath()}this._fillStroke(_t,m)}}},_updateCircle:function(m){if(!(!this._drawing||m._empty())){var C=m._point,D=this._ctx,j=Math.max(Math.round(m._radius),1),J=(Math.max(Math.round(m._radiusY),1)||j)/j;J!==1&&(D.save(),D.scale(1,J)),D.beginPath(),D.arc(C.x,C.y/J,j,0,Math.PI*2,!1),J!==1&&D.restore(),this._fillStroke(D,m)}},_fillStroke:function(m,C){var D=C.options;D.fill&&(m.globalAlpha=D.fillOpacity,m.fillStyle=D.fillColor||D.color,m.fill(D.fillRule||"evenodd")),D.stroke&&D.weight!==0&&(m.setLineDash&&m.setLineDash(C.options&&C.options._dashArray||[]),m.globalAlpha=D.opacity,m.lineWidth=D.weight,m.strokeStyle=D.color,m.lineCap=D.lineCap,m.lineJoin=D.lineJoin,m.stroke())},_onClick:function(m){for(var C=this._map.mouseEventToLayerPoint(m),D,j,J=this._drawFirst;J;J=J.next)D=J.layer,D.options.interactive&&D._containsPoint(C)&&(!(m.type==="click"||m.type==="preclick")||!this._map._draggableMoved(D))&&(j=D);this._fireEvent(j?[j]:!1,m)},_onMouseMove:function(m){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var C=this._map.mouseEventToLayerPoint(m);this._handleMouseHover(m,C)}},_handleMouseOut:function(m){var C=this._hoveredLayer;C&&(vr(this._container,"leaflet-interactive"),this._fireEvent([C],m,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(m,C){if(!this._mouseHoverThrottled){for(var D,j,J=this._drawFirst;J;J=J.next)D=J.layer,D.options.interactive&&D._containsPoint(C)&&(j=D);j!==this._hoveredLayer&&(this._handleMouseOut(m),j&&(Tt(this._container,"leaflet-interactive"),this._fireEvent([j],m,"mouseover"),this._hoveredLayer=j)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,m),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(m,C,D){this._map._fireDOMEvent(C,D||C.type,m)}
358,_bringToFront:function(m){var C=m._order;if(C){var D=C.next,j=C.prev;if(D)D.prev=j;else return;j?j.next=D:D&&(this._drawFirst=D),C.prev=this._drawLast,this._drawLast.next=C,C.next=null,this._drawLast=C,this._requestRedraw(m)}},_bringToBack:function(m){var C=m._order;if(C){var D=C.next,j=C.prev;if(j)j.next=D;else return;D?D.prev=j:j&&(this._drawLast=j),C.prev=null,C.next=this._drawFirst,this._drawFirst.prev=C,this._drawFirst=C,this._requestRedraw(m)}}});function ct(m){return jt.canvas?new rt(m):null}var Lt=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(m){return document.createElement("<lvml:"+m+' class="lvml">')}}catch{}return function(m){return document.createElement("<"+m+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),er={_initContainer:function(){this._container=hn("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(xt.prototype._update.call(this),this.fire("update"))},_initPath:function(m){var C=m._container=Lt("shape");Tt(C,"leaflet-vml-shape "+(this.options.className||"")),C.coordsize="1 1",m._path=Lt("path"),C.appendChild(m._path),this._updateStyle(m),this._layers[l(m)]=m},_addPath:function(m){var C=m._container;this._container.appendChild(C),m.options.interactive&&m.addInteractiveTarget(C)},_removePath:function(m){var C=m._container;fi(C),m.removeInteractiveTarget(C),delete this._layers[l(m)]},_updateStyle:function(m){var C=m._stroke,D=m._fill,j=m.options,J=m._container;J.stroked=!!j.stroke,J.filled=!!j.fill,j.stroke?(C||(C=m._stroke=Lt("stroke")),J.appendChild(C),C.weight=j.weight+"px",C.color=j.color,C.opacity=j.opacity,j.dashArray?C.dashStyle=P(j.dashArray)?j.dashArray.join(" "):j.dashArray.replace(/( *, *)/g," "):C.dashStyle="",C.endcap=j.lineCap.replace("butt","flat"),C.joinstyle=j.lineJoin):C&&(J.removeChild(C),m._stroke=null),j.fill?(D||(D=m._fill=Lt("fill")),J.appendChild(D),D.color=j.fillColor||j.color,D.opacity=j.fillOpacity):D&&(J.removeChild(D),m._fill=null)},_updateCircle:function(m){var C=m._point.round(),D=Math.round(m._radius),j=Math.round(m._radiusY||D);this._setPath(m,m._empty()?"M0 0":"AL "+C.x+","+C.y+" "+D+","+j+" 0,"+65535*360)},_setPath:function(m,C){m._path.v=C},_bringToFront:function(m){gt(m._container)},_bringToBack:function(m){tt(m._container)}},Xt=jt.vml?Lt:ke,Pr=xt.extend({_initContainer:function(){this._container=Xt("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Xt("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){fi(this._container),Oi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){xt.prototype._update.call(this);var m=this._bounds,C=m.getSize(),D=this._container;(!this._svgSize||!this._svgSize.equals(C))&&(this._svgSize=C,D.setAttribute("width",C.x),D.setAttribute("height",C.y)),Xn(D,m.min),D.setAttribute("viewBox",[m.min.x,m.min.y,C.x,C.y].join(" ")),this.fire("update")}},_initPath:function(m){var C=m._path=Xt("path");m.options.className&&Tt(C,m.options.className),m.options.interactive&&Tt(C,"leaflet-interactive"),this._updateStyle(m),this._layers[l(m)]=m},_addPath:function(m){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(m._path),m.addInteractiveTarget(m._path)},_removePath:function(m){fi(m._path),m.removeInteractiveTarget(m._path),delete this._layers[l(m)]},_updatePath:function(m){m._project(),m._update()},_updateStyle:function(m){var C=m._path,D=m.options;C&&(D.stroke?(C.setAttribute("stroke",D.color),C.setAttribute("stroke-opacity",D.opacity),C.setAttribute("stroke-width",D.weight),C.setAttribute("stroke-linecap",D.lineCap),C.setAttribute("stroke-linejoin",D.lineJoin),D.dashArray?C.setAttribute("stroke-dasharray",D.dashArray):C.removeAttribute("stroke-dasharray"),D.dashOffset?C.setAttribute("stroke-dashoffset",D.dashOffset):C.removeAttribute("stroke-dashoffset")):C.setAttribute("stroke","none"),D.fill?(C.setAttribute("fill",D.fillColor||D.color),C.setAttribute("fill-opacity",D.fillOpacity),C.setAttribute("fill-rule",D.fillRule||"evenodd")):C.setAttribute("fill","none"))},_updatePoly:function(m,C){this._setPath(m,Le(m._parts,C))}
358,_updateCircle:function(m){var C=m._point,D=Math.max(Math.round(m._radius),1),j=Math.max(Math.round(m._radiusY),1)||D,J="a"+D+","+j+" 0 1,0 ",_e=m._empty()?"M0 0":"M"+(C.x-D)+","+C.y+J+D*2+",0 "+J+-D*2+",0 ";this._setPath(m,_e)},_setPath:function(m,C){m._path.setAttribute("d",C)},_bringToFront:function(m){gt(m._path)},_bringToBack:function(m){tt(m._path)}});jt.vml&&Pr.include(er);function ot(m){return jt.svg||jt.vml?new Pr(m):null}Rn.include({getRenderer:function(m){var C=m.options.renderer||this._getPaneRenderer(m.options.pane)||this.options.renderer||this._renderer;return C||(C=this._renderer=this._createRenderer()),this.hasLayer(C)||this.addLayer(C),C},_getPaneRenderer:function(m){if(m==="overlayPane"||m===void 0)return!1;var C=this._paneRenderers[m];return C===void 0&&(C=this._createRenderer({pane:m}),this._paneRenderers[m]=C),C},_createRenderer:function(m){return this.options.preferCanvas&&ct(m)||ot(m)}});var wt=ou.extend({initialize:function(m,C){ou.prototype.initialize.call(this,this._boundsToLatLngs(m),C)},setBounds:function(m){return this.setLatLngs(this._boundsToLatLngs(m))}
358,_boundsToLatLngs:function(m){return m=Pe(m),[m.getSouthWest(),m.getNorthWest(),m.getNorthEast(),m.getSouthEast()]}});function It(m,C){return new wt(m,C)}Pr.create=Xt,Pr.pointsToPath=Le,to.geometryToLayer=uf,to.coordsToLatLng=Gh,to.coordsToLatLngs=yl,to.latLngToCoords=Kh,to.latLngsToCoords=df,to.getFeature=Nn,to.asFeature=y,Rn.mergeOptions({boxZoom:!0});var Ht=Ks.extend({initialize:function(m){this._map=m,this._container=m._container,this._pane=m._panes.overlayPane,this._resetStateTimeout=0,m.on("unload",this._destroy,this)},addHooks:function(){nn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){fi(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(m){if(!m.shiftKey||m.which!==1&&m.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),yi(),eu(),this._startPoint=this._map.mouseEventToContainerPoint(m),nn(document,{contextmenu:$l,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(m){this._moved||(this._moved=!0,this._box=hn("div","leaflet-zoom-box",this._container),Tt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(m);var C=new ge(this._point,this._startPoint),D=C.getSize();Xn(this._box,C.min),this._box.style.width=D.x+"px",this._box.style.height=D.y+"px"},_finish:function(){this._moved&&(fi(this._box),vr(this._container,"leaflet-crosshair")),ns(),nf(),Oi(document,{contextmenu:$l,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(m){if(!(m.which!==1&&m.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var C=new Fe(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(C).fire("boxzoomend",{boxZoomBounds:C})}},_onKeyDown:function(m){m.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Rn.addInitHook("addHandler","boxZoom",Ht),Rn.mergeOptions({doubleClickZoom:!0});var Ha=Ks.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(m){var C=this._map,D=C.getZoom(),j=C.options.zoomDelta,J=m.originalEvent.shiftKey?D-j:D+j;C.options.doubleClickZoom==="center"?C.setZoom(J):C.setZoomAround(m.containerPoint,J)}});Rn.addInitHook("addHandler","doubleClickZoom",Ha),Rn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hi=Ks.extend({addHooks:function(){if(!this._draggable){var m=this._map;this._draggable=new Gl(m._mapPane,m._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),m.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),m.on("zoomend",this._onZoomEnd,this),m.whenReady(this._onZoomEnd,this))}Tt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){vr(this._map._container,"leaflet-grab"),vr(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var m=this._map;if(m._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var C=Pe(this._map.options.maxBounds);this._offsetLimit=Ae(this._map.latLngToContainerPoint(C.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(C.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;
358m.fire("movestart").fire("dragstart"),m.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(m){if(this._map.options.inertia){var C=this._lastTime=+new Date,D=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(D),this._times.push(C),this._prunePositions(C)}this._map.fire("move",m).fire("drag",m)},_prunePositions:function(m){for(;this._positions.length>1&&m-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var m=this._map.getSize().divideBy(2),C=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=C.subtract(m).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(m,C){return m-(m-C)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var m=this._draggable._newPos.subtract(this._draggable._startPos),C=this._offsetLimit;m.x<C.min.x&&(m.x=this._viscousLimit(m.x,C.min.x)),m.y<C.min.y&&(m.y=this._viscousLimit(m.y,C.min.y)),m.x>C.max.x&&(m.x=this._viscousLimit(m.x,C.max.x)),m.y>C.max.y&&(m.y=this._viscousLimit(m.y,C.max.y)),this._draggable._newPos=this._draggable._startPos.add(m)}},_onPreDragWrap:function(){var m=this._worldWidth,C=Math.round(m/2),D=this._initialWorldOffset,j=this._draggable._newPos.x,J=(j-C+D)%m+C-D,_e=(j+C+D)%m-C-D,He=Math.abs(J+D)<Math.abs(_e+D)?J:_e;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=He},_onDragEnd:function(m){var C=this._map,D=C.options,j=!D.inertia||m.noInertia||this._times.length<2;if(C.fire("dragend",m),j)C.fire("moveend");else{this._prunePositions(+new Date);var J=this._lastPos.subtract(this._positions[0]),_e=(this._lastTime-this._times[0])/1e3,He=D.easeLinearity,lt=J.multiplyBy(He/_e),_t=lt.distanceTo([0,0]),kt=Math.min(D.inertiaMaxSpeed,_t),dr=lt.multiplyBy(kt/_t),Vr=kt/(D.inertiaDeceleration*He),Qr=dr.multiplyBy(-Vr/2).round();!Qr.x&&!Qr.y?C.fire("moveend"):(Qr=C._limitOffset(Qr,C.options.maxBounds),W(function(){C.panBy(Qr,{duration:Vr,easeLinearity:He,noMoveStart:!0,animate:!0})}))}}});Rn.addInitHook("addHandler","dragging",hi),Rn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var ki=Ks.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(m){this._map=m,this._setPanDelta(m.options.keyboardPanDelta),this._setZoomDelta(m.options.zoomDelta)},addHooks:function(){var m=this._map._container;m.tabIndex<=0&&(m.tabIndex="0"),nn(m,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Oi(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var m=document.body,C=document.documentElement,D=m.scrollTop||C.scrollTop,j=m.scrollLeft||C.scrollLeft;this._map._container.focus(),window.scrollTo(j,D)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(m){var C=this._panKeys={},D=this.keyCodes,j,J;for(j=0,J=D.left.length;j<J;j++)C[D.left[j]]=[-1*m,0];for(j=0,J=D.right.length;j<J;j++)C[D.right[j]]=[m,0];for(j=0,J=D.down.length;j<J;j++)C[D.down[j]]=[0,m];for(j=0,J=D.up.length;j<J;j++)C[D.up[j]]=[0,-1*m]},_setZoomDelta:function(m){var C=this._zoomKeys={},D=this.keyCodes,j,J;for(j=0,J=D.zoomIn.length;j<J;j++)C[D.zoomIn[j]]=m;for(j=0,J=D.zoomOut.length;j<J;j++)C[D.zoomOut[j]]=-m},_addHooks:function(){nn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oi(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(m){if(!(m.altKey||m.ctrlKey||m.metaKey)){var C=m.keyCode,D=this._map,j;if(C in this._panKeys){if(!D._panAnim||!D._panAnim._inProgress)if(j=this._panKeys[C],m.shiftKey&&(j=de(j).multiplyBy(3)),D.options.maxBounds&&(j=D._limitOffset(de(j),D.options.maxBounds)),D.options.worldCopyJump){var J=D.wrapLatLng(D.unproject(D.project(D.getCenter()).add(j)));D.panTo(J)}else D.panBy(j)}else if(C in this._zoomKeys)D.setZoom(D.getZoom()+(m.shiftKey?3:1)*this._zoomKeys[C]);else if(C===27&&D._popup&&D._popup.options.closeOnEscapeKey)D.closePopup();else return;
358$l(m)}}});Rn.addInitHook("addHandler","keyboard",ki),Rn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ji=Ks.extend({addHooks:function(){nn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oi(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(m){var C=Zi(m),D=this._map.options.wheelDebounceTime;this._delta+=C,this._lastMousePos=this._map.mouseEventToContainerPoint(m),this._startTime||(this._startTime=+new Date);var j=Math.max(D-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),j),$l(m)},_performZoom:function(){var m=this._map,C=m.getZoom(),D=this._map.options.zoomSnap||0;m._stop();var j=this._delta/(this._map.options.wheelPxPerZoomLevel*4),J=4*Math.log(2/(1+Math.exp(-Math.abs(j))))/Math.LN2,_e=D?Math.ceil(J/D)*D:J,He=m._limitZoom(C+(this._delta>0?_e:-_e))-C;this._delta=0,this._startTime=null,He&&(m.options.scrollWheelZoom==="center"?m.setZoom(C+He):m.setZoomAround(this._lastMousePos,C+He))}});Rn.addInitHook("addHandler","scrollWheelZoom",Ji);var Oa=600;Rn.mergeOptions({tapHold:jt.touchNative&&jt.safari&&jt.mobile,tapTolerance:15});var Ua=Ks.extend({addHooks:function(){nn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(m){if(clearTimeout(this._holdTimeout),m.touches.length===1){var C=m.touches[0];this._startPos=this._newPos=new le(C.clientX,C.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(nn(document,"touchend",Ja),nn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",C))},this),Oa),nn(document,"touchend touchcancel contextmenu",this._cancel,this),nn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function m(){Oi(document,"touchend",Ja),Oi(document,"touchend touchcancel",m)},_cancel:function(){clearTimeout(this._holdTimeout),Oi(document,"touchend touchcancel contextmenu",this._cancel,this),Oi(document,"touchmove",this._onMove,this)},_onMove:function(m){var C=m.touches[0];this._newPos=new le(C.clientX,C.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(m,C){var D=new MouseEvent(m,{bubbles:!0,cancelable:!0,view:window,screenX:C.screenX,screenY:C.screenY,clientX:C.clientX,clientY:C.clientY});D._simulated=!0,C.target.dispatchEvent(D)}});Rn.addInitHook("addHandler","tapHold",Ua),Rn.mergeOptions({touchZoom:jt.touch,bounceAtZoomLimits:!0});var ea=Ks.extend({addHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),nn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){vr(this._map._container,"leaflet-touch-zoom"),Oi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(m){var C=this._map;if(!(!m.touches||m.touches.length!==2||C._animatingZoom||this._zooming)){var D=C.mouseEventToContainerPoint(m.touches[0]),j=C.mouseEventToContainerPoint(m.touches[1]);this._centerPoint=C.getSize()._divideBy(2),this._startLatLng=C.containerPointToLatLng(this._centerPoint),C.options.touchZoom!=="center"&&(this._pinchStartLatLng=C.containerPointToLatLng(D.add(j)._divideBy(2))),this._startDist=D.distanceTo(j),this._startZoom=C.getZoom(),this._moved=!1,this._zooming=!0,C._stop(),nn(document,"touchmove",this._onTouchMove,this),nn(document,"touchend touchcancel",this._onTouchEnd,this),Ja(m)}},_onTouchMove:function(m){if(!(!m.touches||m.touches.length!==2||!this._zooming)){var C=this._map,D=C.mouseEventToContainerPoint(m.touches[0]),j=C.mouseEventToContainerPoint(m.touches[1]),J=D.distanceTo(j)/this._startDist;if(this._zoom=C.getScaleZoom(J,this._startZoom),!C.options.bounceAtZoomLimits&&(this._zoom<C.getMinZoom()&&J<1||this._zoom>C.getMaxZoom()&&J>1)&&(this._zoom=C._limitZoom(this._zoom)),C.options.touchZoom==="center"){if(this._center=this._startLatLng,J===1)return}else{var _e=D._add(j)._divideBy(2)._subtract(this._centerPoint);if(J===1&&_e.x===0&&_e.y===0)return;this._center=C.unproject(C.project(this._pinchStartLatLng,this._zoom).subtract(_e),this._zoom)}this._moved||(C._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var He=o(C._move,C,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=W(He,this,!0),Ja(m)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,$(this._animRequest),Oi(document,"touchmove",this._onTouchMove,this),Oi(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Rn.addInitHook("addHandler","touchZoom",ea),Rn.BoxZoom=Ht,Rn.DoubleClickZoom=Ha,Rn.Drag=hi,Rn.Keyboard=ki,Rn.ScrollWheelZoom=Ji,Rn.TapHold=Ua,Rn.TouchZoom=ea,r.Bounds=ge,r.Browser=jt,r.CRS=Ne,r.Canvas=rt,r.Circle=$h,r.CircleMarker=Xu,r.Class=re,r.Control=an,r.DivIcon=ne,r.DivOverlay=Se,r.DomEvent=G_,r.DomUtil=W_,r.Draggable=Gl,r.Evented=ie,r.FeatureGroup=_i,r.GeoJSON=to,r.GridLayer=be,r.Handler=Ks,r.Icon=au,r.ImageOverlay=z,r.LatLng=ce,r.LatLngBounds=Fe,r.Layer=Vo,r.LayerGroup=ws,r.LineUtil=iu,r.Map=Rn,r.Marker=qh,r.Mixin=C0,r.Path=Ss,r.Point=le,r.PolyUtil=zh,r.Polygon=ou,r.Polyline=Co,r.Popup=we,r.PosAnimation=E0,r.Projection=Qi,r.Rectangle=wt,r.Renderer=xt,r.SVG=Pr,r.SVGOverlay=ue,r.TileLayer=Ge,r.Tooltip=oe,r.Transformation=Qe,r.Util=X,r.VideoOverlay=Y,r.bind=o,r.bounds=Ae,r.canvas=ct,r.cir
358cle=Zm,r.circleMarker=T0,r.control=sf,r.divIcon=se,r.extend=i,r.featureGroup=Vh,r.geoJSON=A,r.geoJson=k,r.gridLayer=Ie,r.icon=Yu,r.imageOverlay=U,r.latLng=pe,r.latLngBounds=Pe,r.layerGroup=da,r.map=jm,r.marker=jh,r.point=de,r.polygon=Wh,r.polyline=K_,r.popup=ee,r.rectangle=It,r.setOptions=_,r.stamp=l,r.svg=ot,r.svgOverlay=he,r.tileLayer=$e,r.tooltip=K,r.transformation=Ue,r.version=n,r.videoOverlay=Z;var Qm=window.L;r.noConflict=function(){return window.L=Qm,this},window.L=r}))})(nS,nS.exports)),nS.exports}var cx=WYt();const lnr=et(cx),GYt="cb1_26oy_1_710a6d63e2449d386dbcbf4a",KYt="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",YYt=`${KYt}?key=${GYt}`,XYt='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>';function ZYt(e){cx.tileLayer(YYt,{attribution:XYt,subdomains:"abcd"}).addTo(e)}const QYt=[-3.7282529,-38.5359288],JYt=16,eXt=cx.divIcon({className:"point-picker-marker",html:`<svg viewBox="-1 -1 26 34" xmlns="http://www.w3.org/2000/svg" aria-label="Localização">
359    <path d="M12 0C7.03 0 3 4.03 3 9c0 6.75 9 23 9 23s9-16.25 9-23c0-4.97-4.03-9-9-9z"
360      fill="#7c3aed" stroke="#5b21b6" stroke-width="1.5"/>
361    <circle cx="12" cy="9" r="4" fill="white"/>
362  </svg>`,iconSize:[36,48],iconAnchor:[18,48]});function tXt(e){ZYt(e)}function rXt({latitude:e,longitude:t,onChange:r,className:n,style:i}){const a=u.useRef(null),o=u.useRef(null),s=u.useRef(null),l=u.useRef(r);l.current=r;const c=u.useRef(null);if(c.current===null){const d=e!=null&&t!=null&&!Number.isNaN(Number(e))&&!Number.isNaN(Number(t));c.current=d?[Number(e),Number(t)]:QYt}return u.useEffect(()=>{if(!a.current||o.current)return;const d=c.current,f=new cx.Map(a.current,{center:d,zoom:JYt,zoomDelta:.5,zoomSnap:.5});tXt(f),o.current=f;const h=cx.marker(d,{draggable:!0,icon:eXt}).addTo(f);return h.on("dragend",function(){const p=h.getLatLng();l.current({latitude:p.lat,longitude:p.lng})}),f.on("click",function(p){h.setLatLng(p.latlng),l.current({latitude:p.latlng.lat,longitude:p.latlng.lng})}),s.current=h,()=>{f.remove(),o.current=null,s.current=null}},[]),u.useEffect(()=>{const d=o.current,f=s.current;if(!d||!f)return;const h=e!=null?Number(e):null,p=t!=null?Number(t):null;if(h!=null&&p!=null&&!Number.isNaN(h)&&!Number.isNaN(p)){const g=[h,p];f.setLatLng(g),d.setView(g,d.getZoom())}},[e,t]),u.createElement("div",{ref:a,className:n,style:i})}const nXt=-3.7282529,iXt=-38.5359288;function ly(e){if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}function VY({open:e,onClose:t,value:r,onConfirm:n,title:i="Ajustar localização"}){const a=at(({globalCompany:b})=>b.company?.latitude),o=at(({globalCompany:b})=>b.company?.longitude),s=ly(a)??nXt,l=ly(o)??iXt,[c,d]=u.useState(()=>ly(r?.latitude)??s),[f,h]=u.useState(()=>ly(r?.longitude)??l);u.useEffect(()=>{e&&(d(ly(r?.latitude)??s),h(ly(r?.longitude)??l))},[e,r?.latitude,r?.longitude,s,l]);const p=u.useCallback(({latitude:b,longitude:E})=>{d(b),h(E)},[]),g=u.useCallback(b=>{b&&b.preventDefault&&b.preventDefault(),n({latitude:c,longitude:f}),t()},[c,f,n,t]),_=`https://www.google.com/maps/search/?api=1&query=${c},${f}`;return u.createElement(oi,{open:e,title:i,onClose:t,disableSubmitOnEnter:!0,maxWidth:"sm",fullWidth:!0,Actions:u.createElement("div",{className:"flex w-full items-center justify-between"},u.createElement(fr,{component:"a",href:_,target:"_blank",rel:"noopener noreferrer",color:"inherit",size:"small",startIcon:u.createElement(X1,null),disableElevation:!0},"Abrir no Google Maps"),u.createElement("div",{className:"flex space-x-12"},u.createElement(fr,{onClick:t,color:"primary",variant:"outlined",disableElevation:!0},"Cancelar"),u.createElement(fr,{onClick:g,color:"primary",variant:"contained",disableElevation:!0},"Confirmar localização")))},u.createElement("div",{className:"space-y-16"},u.createElement("p",{className:"text-14 text-gray-600"},"Clique no mapa ou arraste o marcador para definir o ponto exato."),u.createElement("div",{className:"w-full overflow-hidden rounded-8 border border-gray-200",style:{height:320}},u.createElement(rXt,{latitude:c,longitude:f,onChange:p,className:"h-full w-full"})),u.createElement("div",{className:"flex space-x-16 text-14 text-gray-700"},u.createElement("span",null,u.createElement("strong",null,"Latitude:")," ",Number(c).toFixed(6)),u.createElement("span",null,u.createElement("strong",null,"Longitude:")," ",Number(f).toFixed(6)))))}function aXt(e=!0){const{data:t,error:r,mutate:n}=Jc(e?"/api/v2/company/subscription":null,wm,{dedupingInterval:2e4});return{data:t,isLoading:!r&&!t,isError:r,mutate:n}}window.$crisp=[];window.CRISP_WEBSITE_ID="e41fcc95-6fab-4ef9-b60f-291802cf7399";window.openCrispChat=()=>{window.$crisp.push(["do","chat:show"]),window.$crisp.push(["do","chat:open"])};const Yke=(e,t)=>{if(window.$crisp.push(["safe",!0]),e.user){window.$crisp.push(["set","user:email",[e.user.email]]),window.$crisp.push(["set","user:nickname",[e.user.name]]);const r={};e.activeCompany?.url_name&&(r.url=`https://app.cardapioweb.com/${e.activeCompany?.url_name}`),e.activeCompany?.city&&(r.geolocation=["BR",e.activeCompany?.city]),window.$crisp.push(["set","user:company",[e.activeCompany?.name,r]]),window.$crisp.push(["set","session:data",["owner_id",e.user.owner_id]])}t&&(window.$crisp.push(["set","session:data",["clickup_id",t.clickup_id]]),window.$crisp.push(["set","session:data",["parceiro_associado",t.affiliate_partner?.name]]),window.$crisp.push(["set","session:data",["plano",t.subscription_plan.name]]),window.$crisp.push(["set","session:data",["tipo_de_plano",t.subscription_plan.billing_frequency]]),window.$crisp.push(["set","session:data",["dia_de_pagamento",t.payment_day]]),window.$crisp.push(["set","session:data",["fim_da_assinatura",t.billing_period_end]])
362),window.$crisp.push(["off","chat:closed"]),window.$crisp.push(["on","chat:closed",()=>{window.$crisp.push(["do","chat:hide"])}]),window.$crisp.push(["off","message:received"]),window.$crisp.push(["on","message:received",r=>{r.from==="operator"&&r.content==="###Atendimento encerrado###"?(window.$crisp.push(["do","message:read"]),window.$crisp.push(["do","session:reset"]),Yke(e,t)):window.openCrispChat()}]),window.$crisp.push(["do","chat:hide"])};function oXt(e){return new Promise(t=>setTimeout(t,e))}function sXt(){const e=at(({auth:i})=>i.user),{isCWOrganization:t}=$x(),r=e?.user&&me.hasPermission(Ye.companyUsers,e.role),{data:n}=aXt(r);return u.useEffect(()=>{async function i(){if(await oXt(1500),["production","staging"].includes("production")&&(window.location.host.includes("cardapioweb.com")||window.location.host.includes("localhost"))&&(!e?.user||t&&n)){const a=window.document.createElement("script");a.type="text/javascript",a.id="crisp-script",a.src="https://client.crisp.chat/l.js",a.async=!0,a.onload=()=>{Yke(e,n)},document.getElementById("crisp-script")===null&&document.body.appendChild(a)}}i()},[t,e,n]),null}const lXt=Rh(e=>({error:{backgroundColor:e.palette.error.dark,color:e.palette.getContrastText(e.palette.error.dark)},message:{display:"flex",alignItems:"center"}}));function cXt(){const e=lXt(),t=An(),{status:r,isFailed:n}=LIe(),[i,a]=u.useState(!1),o=u.useRef(r),s=u.useRef(!1),l=u.useCallback(async()=>{if(!(s.current||!navigator.onLine)){nl.track("Firebase manual reconnect requested",{status:r}),s.current=!0,a(!0);try{const d=await o5();await dG(d)}catch(d){console.error("Firebase retry failed:",d)}finally{s.current=!1,a(!1)}}},[r]);u.useEffect(()=>{const d=o.current;o.current=r,d===Rs.FAILED&&r===Rs.READY&&t(kl({anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:3e3,message:"Atualizações em tempo real restabelecidas.",variant:"success"}))},[t,r]);const c=n&&navigator.onLine;return u.createElement(EPe,{open:c,anchorOrigin:{vertical:"top",horizontal:"center"}},u.createElement(MG,{className:e.error,message:u.createElement("div",{className:e.message},u.createElement(Lg,{className:"mr-8",color:"inherit"},"error_outline"),"Sem conexão em tempo real. Recebimento de novos pedidos e impressão podem ficar indisponíveis."),action:u.createElement(fr,{key:"retry",color:"inherit",size:"small",disabled:i,onClick:l},i?"Tentando...":"Tentar novamente")}))}var uXt=(function(){function e(t){var r=t===void 0?{}:t,n=r.locale,i=r.instance,a=r.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=i||a||qe,this.locale=n}return e.prototype.parse=function(t,r){return t===""?null:this.moment(t,r,!0)},e.prototype.date=function(t){if(t===null)return null;var r=this.moment(t);return r.locale(this.locale),r},e.prototype.isValid=function(t){return this.moment(t).isValid()},e.prototype.isNull=function(t){return t===null},e.prototype.getDiff=function(t,r){return t.diff(r)},e.prototype.isAfter=function(t,r){return t.isAfter(r)},e.prototype.isBefore=function(t,r){return t.isBefore(r)},e.prototype.isAfterDay=function(t,r){return t.isAfter(r,"day")},e.prototype.isBeforeDay=function(t,r){return t.isBefore(r,"day")},e.prototype.isBeforeYear=function(t,r){return t.isBefore(r,"year")},e.prototype.isAfterYear=function(t,r){return t.isAfter(r,"year")},e.prototype.startOfDay=function(t){return t.clone().startOf("day")},e.prototype.endOfDay=function(t){return t.clone().endOf("day")},e.prototype.format=function(t,r){return t.locale(this.locale),t.format(r)},e.prototype.formatNumber=function(t){return t},e.prototype.getHours=function(t){return t.get("hours")},e.prototype.addDays=function(t,r){return r<0?t.clone().subtract(Math.abs(r),"days"):t.clone().add(r,"days")},e.prototype.setHours=function(t,r){return t.clone().hours(r)},e.prototype.getMinutes=function(t){return t.get("minutes")},e.prototype.setMinutes=function(t,r){return t.clone().minutes(r)},e.prototype.getSeconds=function(t){return t.get("seconds")},e.prototype.setSeconds=function(t,r){return t.clone().seconds(r)},e.prototype.getMonth=function(t){return t.get("month")},e.prototype.isSameDay=function(t,r){return t.isSame(r,"day")},e.prototype.isSameMonth=function(t,r){return t.isSame(r,"month")},e.prototype.isSameYear=function(t,r){return t.isSame(r,"year")},e.prototype.isSameHour=function(t,r){return t.isSame(r,"hour")},e.prototype.setMonth=function(t,r){return t.clone().month(r)},e.prototype.getMeridiemText=function(t){return t==="am"?"AM":"PM"},e.prototype.startOfMonth=function(t){return t.clone().startOf("month")},e.prototype.endOfMonth=function(t){return t.clone().endOf("month")},e.prototype.getNextMonth=function(t){return t.clone().add(1,"month")},e.prototype.getPreviousMonth=function(t){return t.clone().subtract(1,"month")},e.prototype.getMonthArray=function(t){for(var r=t.clone().startOf("year"),n=[r];n.length<12;){var i=n[n.length-1];n.push(this.getNextMonth(i))}return n},e.prototype.getYear=function(t){return t.get("year")},e.prototype.setYear=function(t,r){return t.clone().set("year",r)},e.prototype.mergeDateAndTime=function(t,r){return this.setMinutes(this.setHours(t,this.getHours(r)),this.getMinutes(r))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(t,r){return t===null&&r===null?!0:this.moment(t).isSame(r)},e.prototype.getWeekArray=function(t){for(var r=t.clone().startOf("month").startOf("week"),n=t.clone().endOf("month").endOf("week"),i=0,a=r,o=[];a.isBefore(n);){var s=Math.floor(i/7);o[s]=o[s]||[],o[s].push(a),a=a.clone().add(1,"day"),i+=1}return o},e.prototype.getYearRange=function(t,r){for(var n=this.moment(t).startOf("year"),i=this.moment(r).endOf("year"),a=[],o=n;o.isBefore(i);)a.push(o),o=o.clone().add(1,"year");return a},e.prototype.getCalendarHeaderText=function(t){return this.format(t,this.yearMonthFormat)},e.prototype.getYearText=function(t){return this.format(t,"YYYY")},e.prototype.getDatePickerHeaderText=function(t){return this.format(t,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(t){return this.format(t,"MMM D")},e.prototype.getMonthText=function(t){return this.format(t,"MMMM")},e.prototype.getDayText=function(t){return this.format(t,"D")},e.prototype.getHourText=function(t,r){return this.format(t,r?"hh":"HH")},e.prototype.getMinuteText=function(t){return this.format(t,"mm")},e.prototype.getSecondText=function(t){return this.format(t,"ss")},e})(),zB={},HB,fge;function dXt(){if(fge)return HB;fge=1;var e=function(){};return HB=e,HB}var hge;function fXt(){return hge||(hge=1,(function(e){Object.defineProperty(e,"__esMo
362dule",{value:!0});var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};e.default=d;var r=dXt(),n=i(r);function i(f){return f&&f.__esModule?f:{default:f}}var a=function(h){return h&&(typeof h>"u"?"undefined":t(h))==="object"&&!Array.isArray(h)},o="extendCurrValue"+Date.now();function s(f,h,p,g){var _=t(f.extend);if(_==="string"){if(!p)return;var b=p.getRule(f.extend);if(!b)return;if(b===h){(0,n.default)(!1,`[JSS] A rule tries to extend itself \r
363%s`,h);return}var E=b.options.parent;if(E){var S=E.rules.raw[f.extend];c(S,h,p,g)}return}if(Array.isArray(f.extend)){for(var P=0;P<f.extend.length;P++)c(f.extend[P],h,p,g);return}for(var O in f.extend){if(O==="extend"){c(f.extend.extend,h,p,g);continue}if(a(f.extend[O])){O in g||(g[O]={}),c(f.extend[O],h,p,g[O]);continue}g[O]=f.extend[O]}}function l(f,h,p,g){for(var _ in f)if(_!=="extend"){if(a(g[_])&&a(f[_])){c(f[_],h,p,g[_]);continue}if(a(f[_])){g[_]=c(f[_],h,p);continue}g[_]=f[_]}}function c(f,h,p){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return s(f,h,p,g),l(f,h,p,g),g}function d(){function f(p,g,_){return"extend"in p?c(p,g,_):p}function h(p,g,_){if(g!=="extend")return p;if(p==null||p===!1){for(var b in _[o])_.prop(b,null);return _[o]=null,null}for(var E in p)_.prop(E,p[E]);return _[o]=p,null}return{onProcessStyle:f,onChangeValue:h}}})(zB)),zB}var hXt=fXt();const pXt=et(hXt);function Xke(e){var t=null,r=function(){return t==null&&(t=e()),t};return r}function mXt(e,t){return e.filter(function(r){return r!==t})}function vXt(e,t){var r=new Set,n=function(o){return r.add(o)};e.forEach(n),t.forEach(n);var i=[];return r.forEach(function(a){return i.push(a)}),i}function gXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _Xt(e,t,r){return t&&yXt(e.prototype,t),e}var bXt=(function(){function e(t){gXt(this,e),this.entered=[],this.isNodeInDocument=t}return _Xt(e,[{key:"enter",value:function(r){var n=this,i=this.entered.length,a=function(s){return n.isNodeInDocument(s)&&(!s.contains||s.contains(r))};return this.entered=vXt(this.entered.filter(a),[r]),i===0&&this.entered.length>0}},{key:"leave",value:function(r){var n=this.entered.length;return this.entered=mXt(this.entered.filter(this.isNodeInDocument),r),n>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),e})(),Zke=Xke(function(){return/firefox/i.test(navigator.userAgent)}),Qke=Xke(function(){return!!window.safari});function EXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SXt(e,t,r){return t&&wXt(e.prototype,t),e}var pge=(function(){function e(t,r){EXt(this,e);for(var n=t.length,i=[],a=0;a<n;a++)i.push(a);i.sort(function(F,B){return t[F]<t[B]?-1:1});for(var o=[],s=[],l,c,d=0;d<n-1;d++)l=t[d+1]-t[d],c=r[d+1]-r[d],o.push(l),s.push(c/l);for(var f=[s[0]],h=0;h<o.length-1;h++){var p=s[h],g=s[h+1];if(p*g<=0)f.push(0);else{l=o[h];var _=o[h+1],b=l+_;f.push(3*b/((b+_)/p+(b+l)/g))}}f.push(s[s.length-1]);for(var E=[],S=[],P,O=0;O<f.length-1;O++){P=s[O];var I=f[O],N=1/o[O],M=I+f[O+1]-P-P;E.push((P-I-M)*N),S.push(M*N*N)}this.xs=t,this.ys=r,this.c1s=f,this.c2s=E,this.c3s=S}return SXt(e,[{key:"interpolate",value:function(r){var n=this.xs,i=this.ys,a=this.c1s,o=this.c2s,s=this.c3s,l=n.length-1;if(r===n[l])return i[l];for(var c=0,d=s.length-1,f;c<=d;){f=Math.floor(.5*(c+d));var h=n[f];if(h<r)c=f+1;else if(h>r)d=f-1;else return i[f]}l=Math.max(0,d);var p=r-n[l],g=p*p;return i[l]+a[l]*p+o[l]*g+s[l]*p*g}}]),e})(),CXt=1;function Jke(e){var t=e.nodeType===CXt?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top,i=r.left;return{x:i,y:n}}function mP(e){return{x:e.clientX,y:e.clientY}}function xXt(e){var t;
363return e.nodeName==="IMG"&&(Zke()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function TXt(e,t,r,n){var i=e?t.width:r,a=e?t.height:n;return Qke()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function AXt(e,t,r,n,i){var a=xXt(t),o=a?e:t,s=Jke(o),l={x:r.x-s.x,y:r.y-s.y},c=e.offsetWidth,d=e.offsetHeight,f=n.anchorX,h=n.anchorY,p=TXt(a,t,c,d),g=p.dragPreviewWidth,_=p.dragPreviewHeight,b=function(){var M=new pge([0,.5,1],[l.y,l.y/d*_,l.y+_-d]),F=M.interpolate(h);return Qke()&&a&&(F+=(window.devicePixelRatio-1)*_),F},E=function(){var M=new pge([0,.5,1],[l.x,l.x/c*g,l.x+g-c]);return M.interpolate(f)},S=i.offsetX,P=i.offsetY,O=S===0||S,I=P===0||P;return{x:O?S:E(),y:I?P:b()}}var eNe="__NATIVE_FILE__",tNe="__NATIVE_URL__",rNe="__NATIVE_TEXT__";const mge=Object.freeze(Object.defineProperty({__proto__:null,FILE:eNe,TEXT:rNe,URL:tNe},Symbol.toStringTag,{value:"Module"}));function vge(e,t,r){var n=t.reduce(function(i,a){return i||e.getData(a)},"");return n??r}var Lw;function UB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dq=(Lw={},UB(Lw,eNe,{exposeProperties:{files:function(t){return Array.prototype.slice.call(t.files)},items:function(t){return t.items}},matchesTypes:["Files"]}),UB(Lw,tNe,{exposeProperties:{urls:function(t,r){return vge(t,r,"").split(`
364`)}}
364,matchesTypes:["Url","text/uri-list"]}),UB(Lw,rNe,{exposeProperties:{text:function(t,r){return vge(t,r,"")}},matchesTypes:["Text","text/plain"]}),Lw);function PXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OXt(e,t,r){return t&&RXt(e.prototype,t),e}var IXt=(function(){function e(t){PXt(this,e),this.config=t,this.item={},this.initializeExposedProperties()}return OXt(e,[{key:"initializeExposedProperties",value:function(){var r=this;Object.keys(this.config.exposeProperties).forEach(function(n){Object.defineProperty(r.item,n,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(n,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(r){var n=this;if(r){var i={};Object.keys(this.config.exposeProperties).forEach(function(a){i[a]={value:n.config.exposeProperties[a](r,n.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(r,n){return n===r.getSourceId()}},{key:"endDrag",value:function(){}}]),e})();function kXt(e,t){var r=new IXt(dq[e]);return r.loadDataTransfer(t),r}function gge(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(dq).filter(function(r){var n=dq[r].matchesTypes;return n.some(function(i){return t.indexOf(i)>-1})})[0]||null}function NXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MXt(e,t,r){return t&&DXt(e.prototype,t),e}var LXt=(function(){function e(t){NXt(this,e),this.globalContext=t}return MXt(e,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){if(this.window)return this.window.document}}]),e})();function yge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yge(Object(r),!0).forEach(function(n){FXt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yge(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FXt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HXt(e,t,r){return t&&zXt(e.prototype,t),e}var UXt=(function(){function e(t,r){var n=this;BXt(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(i){var a=n.sourceNodes.get(i);return a&&Jke(a)||null},this.endDragNativeItem=function(){n.isDraggingNativeItem()&&(n.actions.endDrag(),n.currentNativeHandle&&n.registry.removeSource(n.currentNativeHandle),n.currentNativeHandle=null,n.currentNativeSource=null)},this.isNodeInDocument=function(i){return!!(i&&n.document&&n.document.body&&document.body.contains(i))},this.endDragIfSourceWasRemovedFromDOM=function(){var i=n.currentDragSourceNode;n.isNodeInDocument(i)||n.clearCurrentDragSourceNode()&&n.actions.endDrag(
364)},this.handleTopDragStartCapture=function(){n.clearCurrentDragSourceNode(),n.dragStartSourceIds=[]},this.handleTopDragStart=function(i){if(!i.defaultPrevented){var a=n.dragStartSourceIds;n.dragStartSourceIds=null;var o=mP(i);n.monitor.isDragging()&&n.actions.endDrag(),n.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:n.getSourceClientOffset,clientOffset:o});var s=i.dataTransfer,l=gge(s);if(n.monitor.isDragging()){if(s&&typeof s.setDragImage=="function"){var c=n.monitor.getSourceId(),d=n.sourceNodes.get(c),f=n.sourcePreviewNodes.get(c)||d;if(f){var h=n.getCurrentSourcePreviewNodeOptions(),p=h.anchorX,g=h.anchorY,_=h.offsetX,b=h.offsetY,E={anchorX:p,anchorY:g},S={offsetX:_,offsetY:b},P=AXt(d,f,o,E,S);s.setDragImage(f,P.x,P.y)}}try{s?.setData("application/json",{})}catch{}n.setCurrentDragSourceNode(i.target);var O=n.getCurrentSourcePreviewNodeOptions(),I=O.captureDraggingState;I?n.actions.publishDragSource():setTimeout(function(){return n.actions.publishDragSource()},0)}else if(l)n.beginDragNativeItem(l);else{if(s&&!s.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}}},this.handleTopDragEndCapture=function(){n.clearCurrentDragSourceNode()&&n.actions.endDrag()},this.handleTopDragEnterCapture=function(i){n.dragEnterTargetIds=[];var a=n.enterLeaveCounter.enter(i.target);if(!(!a||n.monitor.isDragging())){var o=i.dataTransfer,s=gge(o);s&&n.beginDragNativeItem(s,o)}},this.handleTopDragEnter=function(i){var a=n.dragEnterTargetIds;if(n.dragEnterTargetIds=[],!!n.monitor.isDragging()){n.altKeyPressed=i.altKey,Zke()||n.actions.hover(a,{clientOffset:mP(i)});var o=a.some(function(s){return n.monitor.canDropOnTarget(s)});o&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=n.getCurrentDropEffect()))}},this.handleTopDragOverCapture=function(){n.dragOverTargetIds=[]},this.handleTopDragOver=function(i){var a=n.dragOverTargetIds;if(n.dragOverTargetIds=[],!n.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}n.altKeyPressed=i.altKey,n.actions.hover(a||[],{clientOffset:mP(i)});var o=(a||[]).some(function(s){return n.monitor.canDropOnTarget(s)});o?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=n.getCurrentDropEffect())):n.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(i){n.isDraggingNativeItem()&&i.preventDefault();var a=n.enterLeaveCounter.leave(i.target);a&&n.isDraggingNativeItem()&&n.endDragNativeItem()},this.handleTopDropCapture=function(i){if(n.dropTargetIds=[],i.preventDefault(),n.isDraggingNativeItem()){var a;(a=n.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}n.enterLeaveCounter.reset()},this.handleTopDrop=function(i){var a=n.dropTargetIds;n.dropTargetIds=[],n.actions.hover(a,{clientOffset:mP(i)}),n.actions.drop({dropEffect:n.getCurrentDropEffect()}),n.isDraggingNativeItem()?n.endDragNativeItem():n.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(i){var a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new LXt(r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new bXt(this.isNodeInDocument)}return HXt(e,[{key:"profile",value:function(){var r,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((r=this.dragStartSourceIds)===null||r===void 0?void 0:r.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}},{key:"setup",value:function(){if(this.window!==void 0){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){this.window!==void 0&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(r,n,i){var a=this;return this.sourcePreviewNodeOptions.set(r,i),this.sourcePreviewNodes.set(r,n),function(){a.sourcePreviewNodes.delete(r),a.sourcePreviewNodeOptions.delete(r)}}},{key:"connectDragSource",value:function(r,n,i){var a=this;this.sourceNodes.set(r,n),this.sourceNodeOptions.set(r,i);var o=function(c){return a.handleDragStart(c,r)},s=function(c){return a.handleSelectStart(c)};return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",s),function(){a.sourceNodes.delete(r),a.sourceNodeOptions.delete(r),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(r,n){var i=this,a=function(c){return i.handleDragEnter(c,r)},o=function(c){return i.handleDragOver(c,r)},s=function(c){return i.handleDrop(c,r)};return n.addEventListener("dragenter",a),n.addEventListener("dragover",o),n.addEventListener("drop",s),function(){n.removeEventListener("dragenter",a),n.removeEventListener("dragover",o),n.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(r){r.addEventListener&&(r.addEventListener("dragstart",this.handleTopDragStart),r.addEventListener("dragstart",this.handleTopDragStartCapture,!0),r.addEventListener("dragend",this.handleTopDragEndCapture,!0),r.addEventListener("dragenter",this.handleTopDragEnter),r.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),r.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),r.addEventListener("dragover",this.handleTopDragOver),r.addEventListener("dragover",this.handleTopDragOverCapture,!0),r.addEventListener("drop",this.handleTopDrop),r.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(r){r.removeEventListener&&(r.removeEventListener("dragstart",this.handleTopDragStart),r.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),r.removeEventListener("dragend",this.handleTopDragEndCapture,!0),r.removeEventListener("dragenter",this.handleTopDragEnter),r.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),r.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),r.removeEventListener("dragover",this.handleTopDragOver),r.removeEventListener("dragover",this.handleTopDragOverCapture,!0),r.removeEventListener("drop",this.handleTopDrop),r.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var r=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(r);return _ge({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var r=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(r);
364return _ge({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}},{key:"isDraggingNativeItem",value:function(){var r=this.monitor.getItemType();return Object.keys(mge).some(function(n){return mge[n]===r})}},{key:"beginDragNativeItem",value:function(r,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=kXt(r,n),this.currentNativeHandle=this.registry.addSource(r,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(r){var n=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=r;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){return n.window&&n.window.addEventListener("mousemove",n.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){return this.currentDragSourceNode?(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0):!1}},{key:"handleDragStart",value:function(r,n){r.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}},{key:"handleDragEnter",value:function(r,n){this.dragEnterTargetIds.unshift(n)}},{key:"handleDragOver",value:function(r,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}},{key:"handleDrop",value:function(r,n){this.dropTargetIds.unshift(n)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}]),e})(),VXt=function(t,r){return new UXt(t,r)},Wp;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Wp||(Wp={}));var qXt={Left:1},jXt={Left:0};function VB(e){return e.button===void 0||e.button===jXt.Left}function $Xt(e){return e.buttons===void 0||(e.buttons&qXt.Left)===0}function nNe(e){return!!e.targetTouches}var WXt=1;function GXt(e){var t=e.nodeType===WXt?e:e.parentElement;if(t){var r=t.getBoundingClientRect(),n=r.top,i=r.left;return{x:i,y:n}}}function KXt(e,t){if(e.targetTouches.length===1)return c3(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return c3(e.touches[0])}function c3(e,t){return nNe(e)?KXt(e,t):{x:e.clientX,y:e.clientY}}function YXt(e,t,r,n){return Math.sqrt(Math.pow(Math.abs(r-e),2)+Math.pow(Math.abs(n-t),2))}function XXt(e,t,r,n,i){if(!i)return!1;for(var a=Math.atan2(n-t,r-e)*180/Math.PI+180,o=0;o<i.length;++o)if((i[o].start==null||a>=i[o].start)&&(i[o].end==null||a<=i[o].end))return!0;return!1}var bge=(function(){var e=!1;try{addEventListener("test",function(){},Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch{}return e})();function ZXt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QXt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function JXt(e,t,r){return t&&QXt(e.prototype,t),e}var eZt=(function(){function e(t,r){var n=this;ZXt(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=r,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach(function(i){t[i]!=null&&(n[i]=t[i])})}return JXt(e,[{key:"window",get:function(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}},{key:"document",get:function(){if(this.window)return this.window.document}}]),e})(),Fw;function tZt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rZt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nZt(e,t,r){return t&&rZt(e.prototype,t),e}function qB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bw=(Fw={}
vendor: 5,659 bytes, line 364
364,qB(Fw,Wp.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),qB(Fw,Wp.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),qB(Fw,Wp.keyboard,{keydown:"keydown"}),Fw),iZt=(function(){function e(t,r,n){var i=this;tZt(this,e),this.getSourceClientOffset=function(a){var o=i.sourceNodes.get(a);return o&&GXt(o)},this.handleTopMoveStartCapture=function(a){VB(a)&&(i.moveStartSourceIds=[])},this.handleMoveStart=function(a){Array.isArray(i.moveStartSourceIds)&&i.moveStartSourceIds.unshift(a)},this.handleTopMoveStart=function(a){if(VB(a)){var o=c3(a);o&&(nNe(a)&&(i.lastTargetTouchFallback=a.targetTouches[0]),i._mouseClientOffset=o),i.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(a){if(VB(a)){var o=a.type===Bw.touch.start?i.options.delayTouchStart:i.options.delayMouseStart;i.timeout=setTimeout(i.handleTopMoveStart.bind(i,a),o),i.waitingForDelay=!0}},this.handleTopMoveCapture=function(){i.dragOverTargetIds=[]},this.handleMove=function(a,o){i.dragOverTargetIds&&i.dragOverTargetIds.unshift(o)},this.handleTopMove=function(a){if(i.timeout&&clearTimeout(i.timeout),!(!i.document||i.waitingForDelay)){var o=i.moveStartSourceIds,s=i.dragOverTargetIds,l=i.options.enableHoverOutsideTarget,c=c3(a,i.lastTargetTouchFallback);if(c){if(i._isScrolling||!i.monitor.isDragging()&&XXt(i._mouseClientOffset.x||0,i._mouseClientOffset.y||0,c.x,c.y,i.options.scrollAngleRanges)){i._isScrolling=!0;return}if(!i.monitor.isDragging()&&i._mouseClientOffset.hasOwnProperty("x")&&o&&YXt(i._mouseClientOffset.x||0,i._mouseClientOffset.y||0,c.x,c.y)>(i.options.touchSlop?i.options.touchSlop:0)&&(i.moveStartSourceIds=void 0,i.actions.beginDrag(o,{clientOffset:i._mouseClientOffset,getSourceClientOffset:i.getSourceClientOffset,publishSource:!1})),!!i.monitor.isDragging()){var d=i.sourceNodes.get(i.monitor.getSourceId());i.installSourceNodeRemovalObserver(d),i.actions.publishDragSource(),a.cancelable&&a.preventDefault();var f=(s||[]).map(function(P){return i.targetNodes.get(P)}).filter(function(P){return!!P}),h=i.options.getDropTargetElementsAtPoint?i.options.getDropTargetElementsAtPoint(c.x,c.y,f):i.document.elementsFromPoint(c.x,c.y),p=[];for(var g in h)if(h.hasOwnProperty(g)){var _=h[g];for(p.push(_);_;)_=_.parentElement,_&&p.indexOf(_)===-1&&p.push(_)}var b=p.filter(function(P){return f.indexOf(P)>-1}).map(function(P){return i._getDropTargetId(P)}).filter(function(P){return!!P}).filter(function(P,O,I){return I.indexOf(P)===O});if(l)for(var E in i.targetNodes){var S=i.targetNodes.get(E);if(d&&S&&S.contains(d)&&b.indexOf(E)===-1){b.unshift(E);break}}b.reverse(),i.actions.hover(b,{clientOffset:c})}}}},this._getDropTargetId=function(a){for(var o=i.targetNodes.keys(),s=o.next();s.done===!1;){var l=s.value;if(a===i.targetNodes.get(l))return l;s=o.next()}},this.handleTopMoveEndCapture=function(a){if(i._isScrolling=!1,i.lastTargetTouchFallback=void 0,!!$Xt(a)){if(!i.monitor.isDragging()||i.monitor.didDrop()){i.moveStartSourceIds=void 0;return}a.cancelable&&a.preventDefault(),i._mouseClientOffset={},i.uninstallSourceNodeRemovalObserver(),i.actions.drop(),i.actions.endDrag()}},this.handleCancelOnEscape=function(a){a.key==="Escape"&&i.monitor.isDragging()&&(i._mouseClientOffset={},i.uninstallSourceNodeRemovalObserver(),i.actions.endDrag())},this.options=new eZt(n,r),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(Wp.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Wp.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Wp.keyboard)}return nZt(e,[{key:"profile",value:function(){var r;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"setup",value:function(){this.window&&(ei(!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(r,n,i,a){var o=bge?{capture:a,passive:!1}:a;
364this.listenerTypes.forEach(function(s){var l=Bw[s][n];l&&r.addEventListener(l,i,o)})}},{key:"removeEventListener",value:function(r,n,i,a){var o=bge?{capture:a,passive:!1}:a;this.listenerTypes.forEach(function(s){var l=Bw[s][n];l&&r.removeEventListener(l,i,o)})}},{key:"connectDragSource",value:function(r,n){var i=this,a=this.handleMoveStart.bind(this,r);return this.sourceNodes.set(r,n),this.addEventListener(n,"start",a),function(){i.sourceNodes.delete(r),i.removeEventListener(n,"start",a)}}},{key:"connectDragPreview",value:function(r,n,i){var a=this;return this.sourcePreviewNodeOptions.set(r,i),this.sourcePreviewNodes.set(r,n),function(){a.sourcePreviewNodes.delete(r),a.sourcePreviewNodeOptions.delete(r)}}},{key:"connectDropTarget",value:function(r,n){var i=this;if(!this.document)return function(){};var a=function(s){if(!(!i.document||!i.monitor.isDragging())){var l;switch(s.type){case Bw.mouse.move:l={x:s.clientX,y:s.clientY};break;case Bw.touch.move:l={x:s.touches[0].clientX,y:s.touches[0].clientY};break}var c=l!=null?i.document.elementFromPoint(l.x,l.y):void 0,d=c&&n.contains(c);if(c===n||d)return i.handleMove(s,r)}};return this.addEventListener(this.document.body,"move",a),this.targetNodes.set(r,n),function(){i.document&&(i.targetNodes.delete(r),i.removeEventListener(i.document.body,"move",a))}}},{key:"getTopMoveStartHandler",value:function(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}},{key:"installSourceNodeRemovalObserver",value:function(r){var n=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=r,this.draggedSourceNodeRemovalObserver=new MutationObserver(function(){r&&!r.parentElement&&(n.resurrectSourceNode(),n.uninstallSourceNodeRemovalObserver())}),!(!r||!r.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(r.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}}]),e})(),aZt=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return new iZt(t,r,n)};const oZt=1800*1e3;function sZt(e){const t=new URLSearchParams(e),r=t.get("client_id"),n=t.get("state"),i=t.get("redirect_uri"),a=t.get("code_challenge"),o=t.get("code_challenge_method")||"S256",s=t.get("resource");return!r||!n||!i||!a?null:{clientId:r,state:n,redirectUri:i,codeChallenge:a,codeChallengeMethod:o,resource:s}}const lZt=kh((e,t)=>({clientId:null,state:null,redirectUri:null,codeChallenge:null,codeChallengeMethod:"S256",resource:null,capturedAt:null,setParams(r){e({clientId:r.clientId,state:r.state,redirectUri:r.redirectUri,codeChallenge:r.codeChallenge,codeChallengeMethod:r.codeChallengeMethod||"S256",resource:r.resource||null,capturedAt:Date.now()})},clearParams(){e({clientId:null,state:null,redirectUri:null,codeChallenge:null,codeChallengeMethod:"S256",resource:null,capturedAt:null})},hasValidParams(){const{clientId:r,capturedAt:n}=t();return!r||!n?!1:Date.now()-n>oZt?(t().clearParams(),!1):!0},getParams(){const{clientId:r,state:n,redirectUri:i,codeChallenge:a,codeChallengeMethod:o,resource:s}=t();return{clientId:r,state:n,redirectUri:i,codeChallenge:a,codeChallengeMethod:o,resource:s}}})),cZt=["/cw-apps","/mcp/oauth/consent"],uZt=()=>{const e=Z3(),t=lZt(r=>r.setParams);return u.useEffect(()=>{if(!cZt.includes(e.pathname))return;const r=sZt(e.search);r&&t(r)},[e.pathname,e.search,t]),null},dZt={settings:{pageName:"Contas"},auth:Ye.userCreator,userRolePermissions:[Kn.ACCOUNTS],routes:[{path:"/contas/:ownerId",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BV31ycQI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]))))},{path:"/contas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AccountsPage-DFPZ7FOk.js"),__vite__mapDeps([43,44,45,9,10,5,46,47,48,49,50,34,6,26,35,1,32,33,25,21,24,3,27,22,18,36,37,31,38,51]))))}]},fZt={settings:{pageName:"Parceiros"},auth:Ye.internalUserCreator,userRolePermissions:[Kn.AFFILIATE_PARTNER],routes:[{path:"/parceiros",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AffiliatePartnersPage-BoN_nQlK.js"),__vite__mapDeps([52,53,54,55,9,10,37,5,56,57,16,58,59,60,38,61]))))},{path:"/parceiros/:affiliatePartnerId/pagamentos",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BnOb1p2b.js"),__vite__mapDeps([62,56,57,60]))))}]},hZt={settings:{pageName:"Faturas"},auth:Ye.userCreator,routes:[{path:"/faturas-clientes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./BillingsPage-i9hQNwwA.js"),__vite__mapDeps([63,44,17,64,5,11,12,13,8,14,15,16,18,9,10,4]))))}]},pZt={settings:{pageName:"Mapa de clientes"},auth:Ye.admins,routes:[{path:"/mapa-clientes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./ClientMapPage-DqEjJ5lt.js"),__vite__mapDeps([65,49,66,67,68]))))}]},mZt={settings:{pageName:"Estabelecimentos"},auth:Ye.userCreator,userRolePermissions:[Kn.ACCOUNTS],routes:[{path:"/estabelecimentos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CompaniesPage-GBa-qxz7.js"),__vite__mapDeps([69,70,25,34,21,1,44,71,19,20,22,3,23,12,18,5,14,24,26,27,28,29,30]))))}]},vZt={settings:{pageName:"Cupons"},auth:Ye.userCreator,userRolePermissions:[Kn.SUBSCRIPTION_COUPONS],routes:[{path:"/organizacao-cupons",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CouponsPage-0zV1C99p.js"),__vite__mapDeps([72,45,73,21,27,44]))))}]},gZt={settings:{pageName:"Integradoras"},auth:Ye.cwManager,userRolePermissions:[Kn.INTEGRATORS],routes:[{path:"/integradoras",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./IntegratorsPage-CTHYf57a.js"),__vite__mapDeps([74,12,44,75,76,77,78,79,80,56,57,81,82,83]))))}]},yZt={settings:{pageName:"Notificações"},auth:Ye.userCreator,userRolePermissions:[Kn.NOTIFICATIONS],routes:[{path:"/notificacoes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./NotificationsPage-CEFy3Ii5.js"),__vite__mapDeps([84,44,85,86,87,88,20,16,89,31,34,79,28,83]))))}]},_Zt={settings:{pageName:"Faturas da Organização"},auth:Ye.userCreator,routes:[{path:["/faturas-organizacao","/organizacoes/:organizationId"],component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrganizationsBillingsPage-B4uCv_4E.js"),__vite__mapDeps([90,38,39,91,45,9,10,5,40,17,11,12,13,8,14,15,16,18,4,44]))))}]},bZt={settings:{pageName:"Minha Organização"},auth:Ye.admins,routes:[{path:"/minha-organizacao",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrganizationProfilePage-CwwLDmgr.js"),__vite__mapDeps([92,51,8,5,9,10,26,93,77,80,85,94]))))}]},EZt={settings:{pageName:"Organizações"},auth:Ye.internalUserCreator,userRolePermissions:[Kn.ORGANIZATIONS],routes:[{path:"/organizacoes",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrganizationsPage-SXWsaFwJ.js"),__vite__mapDeps([95,91,45,9,10,5,44,64,38]))))}]},wZt={settings:{pageName:"Funcionários"},auth:Ye.admin,routes:[{path:"/funcionarios",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrganizationUsersPage-DEaRXA0W.js"),__vite__mapDeps([96,93,56,57,97,98,99]))))}]},SZt={settings:{pageName:"Planos e módulos"},auth:Ye.userCreator,userRolePermissions:[Kn.PLANS_AND_MODULES],routes:[{path:"/planos-modulos/planos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BmbvWWZd.js"),__vite__mapDeps([100,21,12,101,102,103,104,44]))))},{path:"/planos-modulos/modulos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CzZd9CBB.js"),__vite__mapDeps([105,12,101,102,44]))))}]},CZt={settings:{pageName:"Campos personalizados"},auth:Ye.userCreator,userRolePermissions:[Kn.SUBSCRIPTION_CUSTOM_FIELDS],routes:[{path:"/campos-personalizados-assinatura",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SubscriptionCustomFieldsPage-DQTie-0k.js"),__vite__mapDeps([106,33,107,108,25,104,44]))))}]},xZt={settings:{pageName:"Histórico de atividades"},auth:Ye.userCreator,userRolePermissions:[Kn.SUBSCRIPTION_EVENTS],routes:[{path:"/historico-atividades",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SubscriptionEventsPage-u38Bbmnq.js"),__vite__mapDeps([109,110,111,112,113,44,31]))))}]},TZt=[pZt,yZt,EZt,dZt,mZt,hZt,vZt,SZt,wZt,bZt,_Zt,xZt,CZt,fZt,gZt],AZt={settings:{pageName:"Indicações"},auth:Ye.affiliatePartner,routes:[{path:"/parceiro/estabelecimentos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AffiliatePartnerCompaniesPage-YO7kWHlg.js"),__vite__mapDeps([114,57,19,20,21,22,3]))))}]},PZt={settings:{pageName:"Pagamentos"},auth:Ye.affiliatePartner,routes:[{path:"/parceiro/pagamentos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AffiliatePartnerPaymentsPage-D48DEE2x.js"),__vite__mapDeps([115,62,56,57,60]))))}]},RZt={settings:{pageName:"Minha conta"},auth:Ye.affiliatePartner,routes:[{path:"/parceiro/perfil",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AffiliatePartnerProfilePage-Dp3F7zk2.js"),__vite__mapDeps([116,37,53,54,9,10]))))}]},OZt=[RZt,AZt,PZt],IZt={settings:{pageName:"CW App Store"},auth:Ye.companyUsers,routes:[{path:"/cw-apps/:appId",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./cwMarketplaceAppDetailsPage-BY92wgvc.js"),__vite__mapDeps([117,118,78,119,15,120,16,79,121,122,123,83]))))},{path:"/cw-apps",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./cwMarketPlacePage-DOahimdI.js"),__vite__mapDeps([124,81,122,119,78,125]))))}]},kZt=[IZt],NZt={settings:{pageName:"Dashboard"},auth:Ye.admins,routes:[{path:"/admin-dashboard",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AdminDashboardPage-B5jEyM_R.js"),__vite__mapDeps([126,44]))))}]},DZt=[NZt],MZt={settings:{layout:{banner:!1,navbar:!1,header:!1,footer:!1}},routes:[{path:"/error-404",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./Error404Page-DQJQiDoo.js"),[])))}]},LZt={settings:{layout:{banner:!1,navbar:!1,header:!1,footer:!1}},routes:[{path:"/error-500",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./Error500Page-BHQjEp4t.js"),[])))}]},FZt=[MZt,LZt];var Xs={};const BZt=zq(Ugt);var Ege;function zZt(){if(Ege)return Xs;Ege=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.hexToRgb=r,Xs.rgbToHex=i,Xs.hslToRgb=a,Xs.decomposeColor=o,Xs.recomposeColor=s,Xs.getContrastRatio=l,Xs.getLuminance=c,Xs.emphasize=d,Xs.fade=f,Xs.alpha=h,Xs.darken=p,Xs.lighten=g;var e=BZt;function t(_){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(b,_),E)}function r(_){_=_.substr(1);var b=new RegExp(".{1,".concat(_.length>=6?2:1,"}"),"g"),E=_.match(b);return E&&E[0].length===1&&(E=E.map(function(S){return S+S})),E?"rgb".concat(E.length===4?"a":"","(").concat(E.map(function(S,P){return P<3?parseInt(S,16):Math.round(parseInt(S,16)/255*1e3)/1e3}).join(", "),")"):""}function n(_){var b=_.toString(16);return b.length===1?"0".concat(b):b}function i(_){if(_.indexOf("#")===0)return _;var b=o(_),E=b.values;return"#".concat(E.map(function(S){return n(S)}).join(""))}function a(_){_=o(_);var b=_,E=b.values,S=E[0],P=E[1]/100,O=E[2]/100,I=P*Math.min(O,1-O),N=function(V){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(V+S/30)%12;return O-I*Math.max(Math.min(W-3,9-W,1),-1)},M="rgb",F=[Math.round(N(0)*255),Math.round(N(8)*255),Math.round(N(4)*255)];return _.type==="hsla"&&(M+="a",F.push(E[3])),s({type:M,values:F})}function o(_){if(_.type)return _;if(_.charAt(0)==="#")return o(r(_));var b=_.indexOf("("),E=_.substring(0,b);
364if(["rgb","rgba","hsl","hsla"].indexOf(E)===-1)throw new Error((0,e.formatMuiErrorMessage)(3,_));var S=_.substring(b+1,_.length-1).split(",");return S=S.map(function(P){return parseFloat(P)}),{type:E,values:S}}function s(_){var b=_.type,E=_.values;return b.indexOf("rgb")!==-1?E=E.map(function(S,P){return P<3?parseInt(S,10):S}):b.indexOf("hsl")!==-1&&(E[1]="".concat(E[1],"%"),E[2]="".concat(E[2],"%")),"".concat(b,"(").concat(E.join(", "),")")}function l(_,b){var E=c(_),S=c(b);return(Math.max(E,S)+.05)/(Math.min(E,S)+.05)}function c(_){_=o(_);var b=_.type==="hsl"?o(a(_)).values:_.values;return b=b.map(function(E){return E/=255,E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4)}),Number((.2126*b[0]+.7152*b[1]+.0722*b[2]).toFixed(3))}function d(_){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return c(_)>.5?p(_,b):g(_,b)}function f(_,b){return h(_,b)}function h(_,b){return _=o(_),b=t(b),(_.type==="rgb"||_.type==="hsl")&&(_.type+="a"),_.values[3]=b,s(_)}function p(_,b){if(_=o(_),b=t(b),_.type.indexOf("hsl")!==-1)_.values[2]*=1-b;else if(_.type.indexOf("rgb")!==-1)for(var E=0;E<3;E+=1)_.values[E]*=1-b;return s(_)}function g(_,b){if(_=o(_),b=t(b),_.type.indexOf("hsl")!==-1)_.values[2]+=(100-_.values[2])*b;else if(_.type.indexOf("rgb")!==-1)for(var E=0;E<3;E+=1)_.values[E]+=(255-_.values[E])*b;return s(_)}return Xs}var iNe=zZt(),zw={},wge;function HZt(){if(wge)return zw;wge=1;var e=$t(),t=Wt();Object.defineProperty(zw,"__esModule",{value:!0}),zw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");return zw.default=i,zw}var UZt=HZt();const fq=et(UZt);var Hw={},Sge;function VZt(){if(Sge)return Hw;Sge=1;var e=$t(),t=Wt();Object.defineProperty(Hw,"__esModule",{value:!0}),Hw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");return Hw.default=i,Hw}var qZt=VZt();const hq=et(qZt);var jZt=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function pq(){return pq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pq.apply(this,arguments)}function $Zt(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function vP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WZt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mq(e,t)}function mq(e,t){return mq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mq(e,t)}var uk=(function(e){WZt(t,e);function t(){var n;return n=e.call(this)||this,n.handleExpired=n.handleExpired.bind(vP(n)),n.handleErrored=n.handleErrored.bind(vP(n)),n.handleChange=n.handleChange.bind(vP(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(vP(n)),n}var r=t.prototype;return r.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},r.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},r.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},r.execute=function(){var i=this.getCaptchaFunction("execute");
364if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},r.executeAsync=function(){var i=this;return new Promise(function(a,o){i.executionResolve=a,i.executionReject=o,i.execute()})},r.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},r.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},r.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},r.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},r.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},r.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=i(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},r.componentDidMount=function(){this.explicitRender()},r.componentDidUpdate=function(){this.explicitRender()},r.handleRecaptchaRef=function(i){this.captcha=i},r.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var a=$Zt(i,jZt);return x.createElement("div",pq({},a,{ref:this.handleRecaptchaRef}))},t})(x.Component);uk.displayName="ReCAPTCHA";uk.propTypes={sitekey:xe.string.isRequired,onChange:xe.func,grecaptcha:xe.object,theme:xe.oneOf(["dark","light"]),type:xe.oneOf(["image","audio"]),tabindex:xe.number,onExpired:xe.func,onErrored:xe.func,size:xe.oneOf(["compact","normal","invisible"]),stoken:xe.string,hl:xe.string,badge:xe.oneOf(["bottomright","bottomleft","inline"]),isolated:xe.bool};uk.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};function vq(){return vq=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vq.apply(this,arguments)}function GZt(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function KZt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var fu={},YZt=0;function XZt(e,t){return t=t||{},function(n){var i=n.displayName||n.name||"Component",a=(function(s){KZt(l,s);function l(d,f){var h;return h=s.call(this,d,f)||this,h.state={},h.__scriptURL="",h}var c=l.prototype;return c.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+YZt++),this.__scriptLoaderID},c.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},c.asyncScriptLoaderHandleLoad=function(f){var h=this;this.setState(f,function(){return h.props.asyncScriptOnLoad&&h.props.asyncScriptOnLoad(h.state)})},c.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=fu[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var h in f.observers)f.observers[h](f);delete window[t.callbackName]},c.componentDidMount=function(){var f=this,h=this.setupScriptURL(),p=this.asyncScriptLoaderGetScriptLoaderID(),g=t,_=g.globalName,b=g.callbackName,E=g.scriptId;if(_&&typeof window[_]<"u"&&(fu[h]={loaded:!0,observers:{}}),fu[h]){var S=fu[h];if(S&&(S.loaded||S.errored)){this.asyncScriptLoaderHandleLoad(S);return}S.observers[p]=function(M){return f.asyncScriptLoaderHandleLoad(M)};return}var P={};P[p]=function(M){return f.asyncScriptLoaderHandleLoad(M)},fu[h]={loaded:!1,observers:P};var O=document.createElement("script");O.src=h,O.async=!0;for(var I in t.attributes)O.setAttribute(I,t.attributes[I]);E&&(O.id=E);var N=function(F){if(fu[h]){var B=fu[h],V=B.observers;for(var W in V)F(V[W])&&delete V[W]}};b&&typeof window<"u"&&(window[b]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var M=fu[h];M&&(M.loaded=!0,N(function(F){return b?!1:(F(M),!0)}))},O.onerror=function(){var M=fu[h];M&&(M.errored=!0,N(function(F){return F(M),!0}))},document.body.appendChild(O)},c.componentWillUnmount=function(){var f=this.__scriptURL;if(t.removeOnUnmount===!0)for(var h=document.getElementsByTagName("script"),p=0;p<h.length;p+=1)h[p].src.indexOf(f)>-1&&h[p].parentNode&&h[p].parentNode.removeChild(h[p]);var g=fu[f];g&&(delete g.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete fu[f])},c.render=function(){var f=t.globalName,h=this.props;h.asyncScriptOnLoad;var p=h.forwardedRef,g=GZt(h,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(g[f]=typeof window[f]<"u"?window[f]:void 0),g.ref=p,x.createElement(n,g)},l})(x.Component),o=x.forwardRef(function(s,l){return x.createElement(a,vq({},s,{forwardedRef:l}))});return o.displayName="AsyncScriptLoader("+i+")",o.propTypes={asyncScriptOnLoad:xe.func},cg(o,n)}}var gq="onloadcallback",ZZt="grecaptcha";function yq(){return typeof window<"u"&&window.recaptchaOptions||{}}function QZt(){var e=yq(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+gq+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+gq+"&render=explicit"}const JZt=XZt(QZt,{callbackName:gq,globalName:ZZt,attributes:yq().nonce?{nonce:yq().nonce}:{}})(uk);function eQt({onClick:e}){const[t,r]=u.useState(60),[n,i]=u.useState(!0),a=()=>{i(!0),r(60),e()};return u.useEffect(()=>{let o;return n&&t>0&&(o=setInterval(()=>{r(s=>s===0?(clearInterval(o),i(!1),60):s-1)},1e3)),()=>clearInterval(o)},[n,t]),u.useEffect(()=>{t===0&&i(!1)},[t]),u.createElement(fr,{variant:"text",startIcon:u.createElement(Wg,null),color:"primary",onClick:a,disabled:n,fullWidth:!0},n?`Reenviar em ${t} segundos`:"Reenviar código")}function tQt({otp:e,handleClose:t,loginInfo:r,recaptchaRef:n}){const i=An(),a=Lr(),[o,s]=u.useState(["","","","","",""]),l=at(({auth:b})=>b.login),c=yc("(max-width:600px)"),d=u.useRef(Array(6).fill(null).map(()=>u.createRef())),f=(b,E)=>{if(/^\d*$/.test(E)){const S=[...o];S[b]=E,s(S),E&&b<5&&d.current[b+1].focus()}};u.useEffect(()=>{l.loading||(e?.otp_message&&a.error(e?.otp_message),e?.otp_resent&&(a.success("Código enviado"),s(["","","","","",""])))},[e?.otp_message,e?.otp_resent,a,l.loading]);const h=(b,E)=>{if(E.key==="Backspace"&&b>0&&!o[b]){const S=[...o];S[b-1]="",s(S),d.current[b-1].focus()}},p=b=>{b.preventDefault();const S=b.clipboardData.getData("Text").replace(/\D/g,"").split(""),P=[...o];
364S.forEach((O,I)=>{I<6&&(P[I]=O)}),s(P)};if(!e?.otp_required&&!e?.otp_resent)return null;const g=async(b,E=!1)=>{const S=o.join("");let P=null;n?.current&&(P=await n.current.executeAsync()),E?(i(pI({...r,captcha:P,otp_code:"resend"})),s(["","","","","",""]),d.current[0].focus()):/^[0-9]{3}[0-9]{3}$/.test(S)?(i(pI({...r,captcha:P,otp_code:S})),s(["","","","","",""]),d.current[0].focus()):a.info("Digite o código e tente novamente"),n?.current&&n.current.reset()},_=b=>{b.key==="Enter"&&g()};return u.createElement(Eo,{open:!0,onClose:t,maxWidth:"sm",fullWidth:!0,fullScreen:c,disableEnforceFocus:!0,keepMounted:!1,disableBackdropClick:!0,onKeyDown:_,PaperProps:{className:c?"shadow-md":"shadow-md rounded-12"}},u.createElement(p0,{className:"px-20 py-12"},u.createElement("div",{className:"flex items-center justify-end"},u.createElement(cr,{style:{padding:9},onClick:t},u.createElement(Aa,null)))),u.createElement(Xc,{className:"overflow-auto px-28 pb-28 pt-0"},u.createElement("div",{className:"flex flex-col items-center justify-center space-y-32 text-center text-gray-700"},u.createElement("div",{className:"space-y-4"},u.createElement("div",{className:"max-w-512 text-center text-18 font-light text-gray-600 sm:text-20"},"Digite o código de 6 dígitos que enviamos para:"),u.createElement("div",{className:"text-18 font-bold"},e.otp_contact)),u.createElement("div",null,u.createElement(oL,{container:!0,spacing:1,alignItems:"center"},o.map((b,E)=>u.createElement(u.Fragment,{key:E},u.createElement(oL,{item:!0},u.createElement(Tr,{variant:"outlined",size:"small",value:b,inputRef:S=>d.current[E]=S,onChange:S=>f(E,S.target.value),onKeyDown:S=>h(E,S),onPaste:p,inputProps:{maxLength:1,inputMode:"numeric",pattern:"[0-9]*",style:{textAlign:"center",width:"2rem"}},className:"text-18"})),E===2&&u.createElement(oL,{item:!0},"-")))))),u.createElement("div",{className:"mt-28"},u.createElement(fr,{variant:"contained",color:"primary",className:"mx-auto w-full normal-case","aria-label":"LOG IN",disabled:l.loading,onClick:g,size:"large",disableElevation:!0},l.loading?u.createElement(ai,{style:{color:"#fff"},size:20}):"CONFIRMAR")),u.createElement("div",{className:"mt-24 flex flex-col items-center space-y-12 border-0 border-t-1 border-solid border-gray-200 pt-16"},u.createElement(eQt,{onClick:b=>g(b,!0)}))))}var Uw={},Cge;function rQt(){if(Cge)return Uw;Cge=1;var e=$t(),t=Wt();Object.defineProperty(Uw,"__esModule",{value:!0}),Uw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1zm.59 4.59l4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59zM15 12h4.5L14 6.5V11c0 .55.45 1 1 1z"}),"FileCopyRounded");return Uw.default=i,Uw}var nQt=rQt();const iQt=et(nQt);var Vw={},xge;function aQt(){if(xge)return Vw;xge=1;var e=$t(),t=Wt();Object.defineProperty(Vw,"__esModule",{value:!0}),Vw.default=void 0;var r=t(Dt()),n=e(Gt()),i=(0,n.default)(r.createElement("path",{d:"M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1zM14 4c0 .55.45 1 1 1h2.59l-9.13 9.13c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V3h-6c-.55 0-1 .45-1 1z"}),"LaunchRounded");return Vw.default=i,Vw}var oQt=aQt();const sQt=et(oQt),lQt=e=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"1em",height:"1em",viewBox:"0 0 567.1704 517.30967",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},x.createElement("rect",{x:326.03543,y:307.38928,width:495,height:45,transform:"translate(-385.45426 -17.88532) rotate(-16.24392)",fill:"#3f3d56"}),x.createElement("path",{d:"M386.40028,575.96948,316.35377,335.55639a7.0001,7.0001,0,0,1,4.76257-8.67871L784.8346,191.76928a7.00645,7.00645,0,0,1,8.67871,4.76221l62.05591,212.98877-1.92016.55957L791.59315,197.09106a5.00865,5.00865,0,0,0-6.19922-3.40186L321.67579,328.7976a5.00029,5.00029,0,0,0-3.40186,6.19922l70.04651,240.41309Z",transform:"translate(-316.07106 -191.48811)",fill:"#3f3d56"}),x.createElement("path",{d:"M752.93324,410.51a6.51233,6.51233,0,0,1-6.24341-4.6831l-11.74854-40.32324a6.50734,6.50734,0,0,1,4.42212-8.0586l40.32349-11.74853a6.50722,6.50722,0,0,1,8.05859,4.42285L
364799.494,390.44262a6.50733,6.50733,0,0,1-4.42212,8.05859l-40.32349,11.74854A6.47854,6.47854,0,0,1,752.93324,410.51Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M385.31751,336.3a11.691,11.691,0,0,0-.43017-1.22,11.99972,11.99972,0,0,0-22.90967,6.67,11.37989,11.37989,0,0,0,.29,1.26,12.01924,12.01924,0,0,0,11.52978,8.64,11.74908,11.74908,0,0,0,3.3501-.48A12.01262,12.01262,0,0,0,385.31751,336.3Zm-8.73,12.95a10.01322,10.01322,0,0,1-12.3999-6.8,11.435,11.435,0,0,1-.28027-1.26,9.99681,9.99681,0,0,1,19.04-5.54,8.33837,8.33837,0,0,1,.45019,1.21A10.00446,10.00446,0,0,1,376.58753,349.25006Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M355.88508,344.87a11.00221,11.00221,0,0,1,4.20834-12.0571,11,11,0,1,0,5.81753,19.96694A11.00221,11.00221,0,0,1,355.88508,344.87Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M666.7472,394.43005a6.04249,6.04249,0,0,0-7.44971-4.2L592.90736,408.8l-7.14991,2h44.89991l7.1499-2,24.75-6.92A6.04864,6.04864,0,0,0,666.7472,394.43005Z",transform:"translate(-316.07106 -191.48811)",fill:"#ccc"}),x.createElement("path",{d:"M619.77747,380.56005a6.04513,6.04513,0,0,0-7.45019-4.19l-99.61963,27.86a6.06838,6.06838,0,0,0-4.37012,6.57h25.79l7.15967-2,74.30029-20.78A6.05544,6.05544,0,0,0,619.77747,380.56005Z",transform:"translate(-316.07106 -191.48811)",fill:"#ccc"}),x.createElement("path",{d:"M876.24147,408.79777H393.241a7.00787,7.00787,0,0,0-7,7v286a7.00755,7.00755,0,0,0,7,7H876.24147a7.00786,7.00786,0,0,0,7-7v-286A7.00818,7.00818,0,0,0,876.24147,408.79777Zm5,293a5.00181,5.00181,0,0,1-5,5H393.241a5.0018,5.0018,0,0,1-5-5v-286a5.00213,5.00213,0,0,1,5-5H876.24147a5.00213,5.00213,0,0,1,5,5Z",transform:"translate(-316.07106 -191.48811)",fill:"#3f3d56"}),x.createElement("path",{d:"M440.23744,447.8a12,12,0,1,1,12-12A12.01375,12.01375,0,0,1,440.23744,447.8Zm0-22a10,10,0,1,0,10,10A10.0113,10.0113,0,0,0,440.23744,425.8Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M421.58526,435.8a11.00221,11.00221,0,0,1,7.413-10.39858,11,11,0,1,0,0,20.79717A11.00222,11.00222,0,0,1,421.58526,435.8Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M488.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,488.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M512.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,512.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M536.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,536.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M573.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,573.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M597.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,597.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M621.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,621.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M658.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,658.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M682.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,682.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M706.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,706.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M743.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,743.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M767.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,767.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M791.88112,577.57805a9.01031,9.01031,0,0,1-9-9v-27a9,9,0,0,1,18,0v27A9.01032,9.01032,0,0,1,791.88112,577.57805Z",transform:"translate(-316.07106 -191.48811)",fill:"#ed9521"}),x.createElement("path",{d:"M549.89914,677.745H420.45883a6.04736,6.04736,0,1,1,0-12.09472H549.89914a6.04736,6.04736,0,1,1,0,12.09472Z",transform:"translate(-316.07106 -191.48811)",fill:"#e
3646e6e6"}),x.createElement("path",{d:"M508.39914,651.745H461.95883a6.04736,6.04736,0,1,1,0-12.09472h46.44031a6.04736,6.04736,0,1,1,0,12.09472Z",transform:"translate(-316.07106 -191.48811)",fill:"#e6e6e6"}),x.createElement("rect",{x:71.81005,y:277.08994,width:493,height:2,fill:"#3f3d56"}));function cQt({billing:e,handleClose:t,loginInfo:r}){const n=An(),i=Lr();if(!e||!e.pix_base64_qrcode&&!e.invoice_url)return null;const a=s=>{window.open(s,"_blank","noopener noreferrer")},o=()=>{n(pI(r)),t()};return u.createElement(Eo,{open:!0,onClose:t,maxWidth:"sm",fullWidth:!0,disableEnforceFocus:!0,keepMounted:!1,PaperProps:{className:"shadow-md rounded-12"}},u.createElement(p0,{className:"px-20 py-12"},u.createElement("div",{className:"flex items-center justify-end"},u.createElement(cr,{style:{padding:9},onClick:t},u.createElement(Aa,null)))),u.createElement(Xc,{className:"overflow-auto px-28 pb-28 pt-0"},u.createElement("div",{className:"flex flex-col items-center space-y-20 text-center text-gray-700 sm:space-y-28"},u.createElement("div",{className:"max-w-512 text-20 font-bold sm:text-24"},"Sua assinatura não está ativa!"),e.pix_base64_qrcode?u.createElement(u.Fragment,null,u.createElement("div",{className:"max-w-640 text-18 font-light text-gray-600 sm:text-20"},"A fatura ",u.createElement("span",{className:"font-bold"},e.id," ")," no valor de"," ",u.createElement("span",{className:"font-bold"},me.formatMonetaryValue(e.value)," ")," se venceu no dia"," ",u.createElement("span",{className:"font-bold"},qe(e.due_at).format("DD/MM/YYYY")),". Para desbloquear sua conta, você pode efetuar o pagamento via Pix utilizando o"," ",u.createElement("span",{className:"font-bold"},"QR Code")," ou"," ",u.createElement("span",{className:"font-bold"},"Pix Copia e Cola")," abaixo. A liberação da conta ocorre automaticamente alguns segundos após o pagamento."),u.createElement("div",{className:"flex flex-col items-center space-y-8"},u.createElement("img",{id:"qr-base64",className:"h-224 w-224",alt:"",src:`data:image/png;base64,${e.pix_base64_qrcode}`}),u.createElement("div",{className:"flex cursor-pointer items-center space-x-6 rounded-6 p-8 text-18 font-bold hover:bg-gray-50"},u.createElement(GK.CopyToClipboard,{text:e.pix_payload,onCopy:()=>{i.success("Copiado para área de transferência!")}},u.createElement("div",{className:"flex items-center space-x-6",style:{color:"#ED9521",borderColor:"#ED9521"}},u.createElement(iQt,null)," ",u.createElement("span",{className:"cursor-pointer"},"COPIAR PIX")))))):u.createElement(u.Fragment,null,u.createElement(lQt,{className:"h-auto max-w-192 sm:max-w-256"}),u.createElement("div",{className:"max-w-640 text-18 font-light text-gray-600 sm:text-20"},"A fatura ",u.createElement("span",{className:"font-bold"},e.id)," no valor de"," ",u.createElement("span",{className:"font-bold"},me.formatMonetaryValue(e.value))," se venceu no dia"," ",u.createElement("span",{className:"font-bold"},qe(e.due_at).format("DD/MM/YYYY")),". Para desbloquear sua conta, você pode efetuar o pagamento através do link abaixo. A liberação da conta ocorre automaticamente alguns segundos após o pagamento."),u.createElement("div",{className:"flex cursor-pointer items-center space-x-6 rounded-6 p-8 text-18 font-bold hover:bg-gray-50",style:{color:"#ED9521",borderColor:"#ED9521"},onClick:()=>a(e.invoice_url)},u.createElement(sQt,null)," ",u.createElement("span",null,"PAGAR FATURA")))),u.createElement("div",{className:"mt-20 flex flex-col items-center space-y-12 border-0 border-t-1 border-solid border-gray-200 pt-20 sm:mt-32 sm:pt-32"},u.createElement("div",{className:"max-w-512 text-center text-16 font-light text-gray-600 sm:text-18"},"Após o pagamento, aguarde alguns segundos e clique no botão abaixo para efetuar o login novamente."),u.createElement("div",{className:"flex cursor-pointer justify-center space-x-6 rounded-6 border-cardapio-web p-8 text-18 font-bold text-cardapio-web hover:bg-gray-50",onClick:()=>o()},u.createElement(Wg,null)," ",u.createElement("span",null,"TENTAR NOVAMENTE")))))}function uQt({open:e,handleClose:t}){return u.createElement(Eo,{open:e,onClose:t,maxWidth:"xs",PaperProps:{className:"shadow-md rounded-12"}},u.createElement(p0,null,u.createElement("div",{className:"flex items-center justify-between"},u.createElement("span",null,"E-mail enviado!"),u.createElement(cr,{style:{padding:9},onClick:t},u.createElement(Aa,null)))),u.createElement(Xc,{className:"mb-24"},u.createElement("span",{className:"text-16 font-medium text-gray-600"},"Verifique a caixa de entrada do seu e-mail. Caso o e-mail não chegue dentro de alguns instantes, olhe se ele não foi encaminhado para a caixa de lixo eletrônico ou spam.")))}function dQt({open:e,handleClose:t}){const r=Lr(),[n,i]=u.useState(""),[a,o]=u.useState(!1),[s,l]=u.useState(!1);u.useEffect(()=>{e&&i("")},[e]);function c(d){if(d.preventDefault(),!n||!n.includes("@")||!n.includes(".")){r.error("Informe um e-mail válido");return}o(!0),ht.post("api/v1/authentication/users/password",{email:n}).then(f=>{f.status===202&&(t(),l(!0))}).catch(()=>{r.error("Erro ao enviar email de redefinição",{autoHideDuration:3e3}),i("")}).finally(()=>{o(!1)})}return u.createElement(u.Fragment,null,u.createElement(oi,{open:e,title:"Recuperar senha",loading:a,onClose:t,onSubmit:c,confirmText:"Enviar"},u.createElement("div",{className:"flex flex-col space-y-24"},u.createElement("span",{className:"text-16 text-gray-600"},"Para redefinir sua senha, informe o e-mail cadastrado na sua conta e lhe enviaremos um link com as instruções."),u.createElement(Tr,{value:n,onChange:d=>i(d.target.value),type:"email",variant:"outlined",placeholder:"Informe o seu e-mail"}))),u.createElement(uQt,{open:s,handleClose:()=>l(!1)}))}const fQt=Rh(e=>({root:{background:"radial-gradient("+iNe.darken(e.palette.primary.dark,.5)+" 0%, "+e.palette.primary.dark+" 80%)",color:e.palette.primary.contrastText},link:{textDecoration:"none",color:e.palette.secondary.main}}));function hQt(){const e=An(),t=Lr(),r=fQt(),n=at(({auth:N})=>N.login),i=yc("(max-width:940px)"),a=at(({auth:N})=>N.user.layout),{form:o,handleChange:s}=g_({login:"",password:""}),[l,c]=u.useState({}),[d,f]=u.useState(!1),[h,p]=u.useState(!1),[g,_]=u.useState(!1),[b,E]=u.useState(!1),S=u.useRef(),P=u.useCallback(N=>{N.preventDefault(),E(M=>!M)},[]);u.useEffect(()=>{(window.location.host.includes("cardapioweb.com")||window.location.host.includes("web.app")||window.location.host.includes("localhost"))&&(p(!0),_(!0))},[]);const O=u.useCallback(()=>{const N={};return sc(o.login)||(N.login="Verifique seu usúario/e-mail"),sc(o.password)||(N.password="Verifique sua senha"),Object.keys(N).length>0?(c(N),!1):!0},[o.login,o.password]),I=u.useCallback(async N=>{if(N.preventDefault(),O()&&!n.loading)try{{const M=await S.current.executeAsync();if(!M){t.error("Não foi possível fazer o login, atualize a página e tente novamente.");return}o.captcha=M}e(pI(o)),S.current&&S.current.reset()}catch{t.error("Não foi possível fazer o login, atualize a página e tente novamente")}},[t,e,o,n.loading,O]);
364return n.signInLoading||!a?u.createElement(v0,null):u.createElement("div",{className:Ft(r.root,"flex h-full flex-auto flex-shrink-0 items-center",!g&&"justify-center p-8 sm:p-32",i?"flex-col":"flex-row")},g&&!i&&u.createElement("div",{className:"h-screen flex-1"},u.createElement("img",{src:"/assets/images/loginPage.png",alt:"Imagem de fundo",className:"h-full w-full object-cover"})),u.createElement("div",{className:Ft("flex h-full flex-col items-center justify-center",g?i?"w-400":"sm:w-sm lg:w-md":"w-full")},u.createElement(FAe,{className:Ft("flex w-full flex-col justify-center",i||!g?"max-w-400 rounded-12":"h-full rounded-b")},u.createElement(BAe,{className:"flex flex-col items-center justify-center p-20 sm:p-32"},a?.image&&u.createElement("img",{className:Ft("m-24 sm:m-32",g?"w-200 md:w-224":"w-160"),src:a.image,alt:"logo"}),u.createElement(fo,{variant:"h5",className:"mb-32 mt-16 text-center font-bold"},"ACESSE SUA CONTA"),u.createElement("form",{onSubmit:I,className:"flex w-full flex-col justify-center space-y-24"},u.createElement(Tr,{name:"login",label:"E-mail",value:o.login,onChange:s,error:!!l.login,helperText:l.login,variant:"outlined",autoFocus:!0,fullWidth:!0,required:!0}),u.createElement(Tr,{name:"password",label:"Senha",variant:"outlined",type:b?"text":"password",value:o.password,onChange:s,required:!0,InputProps:{endAdornment:u.createElement(Fg,{position:"end"},u.createElement(Yn,{title:b?"Esconder senha":"Mostrar senha",placement:"top",arrow:!0,classes:{tooltip:"text-14"}},u.createElement("span",null,u.createElement(cr,{onClick:P,size:"small"},b?u.createElement(hq,null):u.createElement(fq,null)))))}}),u.createElement(fr,{type:"submit",variant:"contained",color:"primary",className:"mx-auto w-full normal-case","aria-label":"LOG IN",disabled:n.loading,size:"large",disableElevation:!0},n.loading?u.createElement(ai,{style:{color:"#fff"},size:20}):"ENTRAR"),u.createElement("div",{className:"flex w-full cursor-pointer justify-center text-16 font-semibold text-red-darker hover:text-red-darkest",onClick:()=>f(!0)},"Esqueci minha senha"),h&&u.createElement(u.Fragment,null,u.createElement(zs,{className:"mb-16"}),u.createElement("div",{className:"flex w-full cursor-pointer justify-center font-semibold text-red-darker hover:text-red-darkest",onClick:window.openCrispChat},"Precisa de ajuda? Clique e fale com nosso suporte.")),u.createElement(JZt,{ref:S,sitekey:"6Lf4A0EqAAAAAP-XzHhQm-2QSSctnd65ZkGkkxAY",size:"invisible"})))),u.createElement(cQt,{billing:n?.billing_error?.billing,loginInfo:{login:n?.billing_error?.login,password:n?.billing_error?.password},handleClose:()=>e($vt())}),u.createElement(tQt,{otp:n?.otp_info?.otp,loginInfo:{login:n?.otp_info?.login,password:n?.otp_info?.password},handleClose:()=>e(Wvt()),recaptchaRef:S}),u.createElement(dQt,{open:d,handleClose:()=>f(!1)})))}const pQt={settings:{layout:{banner:!1,navbar:!1,header:!1,footer:!1}},auth:Ye.onlyGuest,routes:[{path:"/login",component:hQt}]},mQt={auth:Ye.user,routes:[{path:"/logout",component:()=>(Ap.dispatch(wgt()),"Saindo...")}]},vQt={settings:{pageName:"Análise de Descontos",eventTrackId:"tela_analise_descontos",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/analise-de-descontos"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/analise-descontos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./BenefitsPage-BkTu1vpN.js"),__vite__mapDeps([127,128,129,112,56,57,130,131,48,132,133,134]))))}]},gQt={settings:{pageName:"Análise de Cancelamentos",eventTrackId:"tela_analise_cancelamentos",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/analise-de-cancelamentos"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/analise-cancelamento",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CancellationPage-fQXi_ze0.js"),__vite__mapDeps([135,56,57,48,112,133,134,29,136,128,129,44]))))}]},yQt={settings:{pageName:"Caixa",eventTrackId:"tela_caixa",helperUrl:"https://ajuda.cardapioweb.com/gestao/caixa"},auth:Ye.companyUsers,userPermissions:[Te.CASH_FLOW_PAGE],routes:[{path:["/caixa","/caixa/abrir","/caixa/fechar","/caixa/sangria","/caixa/suprimento"],component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CashFlowPage-XZqqO7dT.js"),__vite__mapDeps([137,138,139,140,141,98,44,16,13,66]))))}]},_Qt={settings:{pageName:"Clientes",eventTrackId:"tela_clientes",helperUrl:"https://ajuda.cardapioweb.com/gestao/clientes"},auth:Ye.companyUsers,userPermissions:[Te.CLIENT_MANAGEMENT_PAGE],routes:[{path:["/clientes","/clientes/:clientId"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./ClientsPage-729EdOhx.js"),__vite__mapDeps([142,143,144,59,145,146,56,57]))))}]},bQt={settings:{pageName:"Análise da base de clientes",eventTrackId:"tela_analise_base_clientes",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/base-de-clientes"}
364,auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/analise-base-clientes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./ClientsPerformancePage-DakxO470.js"),__vite__mapDeps([147,148,128,149,112,129,50,150,56,57,48,133,134]))))}]},EQt={settings:{pageName:"Cupons",eventTrackId:"tela_cupons",helperUrl:"https://ajuda.cardapioweb.com/aumento-de-vendas/cupons-e-descontos"},auth:Ye.companyUsers,userPermissions:[Te.DISCOUNT_COUPONS_PAGE],routes:[{path:"/cupons",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CouponsPage-DuRy7eVu.js"),__vite__mapDeps([151,152,153,154,56,57]))))}]},wQt={settings:{pageName:"Análise dos clientes",eventTrackId:"tela_analise_clientes",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/clientes"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/analise-clientes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CustomersPerformancePage-BBCvdDH8.js"),__vite__mapDeps([155,128,44,129,112,131,48,133,134]))))}]},SQt={settings:{pageName:"Campos personalizados",eventTrackId:"tela_campos_personalizados",helperUrl:"https://ajuda.cardapioweb.com/gestao/minha-empresa/campos-personalizados"},auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],routes:[{path:["/campos_personalizados","/campos_personalizados/:fieldId"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./CustomFieldsPage-JgN9UkXl.js"),__vite__mapDeps([156,157,44]))))}]},CQt={settings:{pageName:"Fiado - Visão geral",eventTrackId:"tela_fiado_visao_geral",helperUrl:"https://ajuda.cardapioweb.com/gestao/fiado"},auth:Ye.companyUsers,userPermissions:[Te.DEBT_BOOK_PAGES],routes:[{path:"/fiado/dashboard",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CyJh5SyE.js"),__vite__mapDeps([158,159,48,160,161]))))},{path:"/fiado",exact:!0,component:()=>u.createElement(us,{to:"/fiado/dashboard"})}]},xQt={settings:{pageName:"Fiado - Controle das dívidas",eventTrackId:"tela_fiado_controle_dividas"},auth:Ye.companyUsers,userPermissions:[Te.DEBT_BOOK_PAGES],routes:[{path:["/fiado/controle/:clientId","/fiado/controle"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CIqY8gC8.js"),__vite__mapDeps([162,161,44]))))}]},TQt=[xQt,CQt],AQt={settings:{pageName:"Entregadores",eventTrackId:"tela_entregadores",helperUrl:"https://ajuda.cardapioweb.com/gestao/delivery/entregadores"},auth:Ye.companyUsers,userPermissions:[Te.DELIVERY_MANAGEMENT_PAGES],routes:[{path:"/entregadores",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./DeliverymanManagement-JHjnaGte.js"),__vite__mapDeps([163,143,144,59,145,46,164,165,57]))))}]},PQt={settings:{pageName:"Análise de entregas",eventTrackId:"tela_analise_entregas",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/analise-de-entregas"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],modules:[At.DELIVERY_MANAGEMENT_MODULE],routes:[{path:"/analise-entregas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./DeliveryPerformancePage-Bob7KXfI.js"),__vite__mapDeps([166,56,57,130,167,168,169,112,170,171,172,173]))))}]};function RQt(){const e=An(),t=at(({globalCompany:a})=>a?.company?.flags),r=at(({auth:a})=>a.user.activeCompany.id),n=a=>{ht.put(`/api/v1/user/companies/${r}`,{company:{control_flag_attributes:{id:t.id,enable_map_on_delivery_fee_setup:a}}}).then(s=>{s.status===200&&s.data.status!==500?e(Wj()):e(oh())}).catch(()=>e(oh()))},i=t?.enable_map_on_delivery_fee_setup||!1;return r>7320&&i?null:u.createElement("div",{className:"m-16 flex items-center justify-between"},u.createElement(bI,{name:"enableMapOnDeliveryFeeSetup",checked:i,onChange:()=>n(!i),color:"primary",size:"small"}),u.createElement("span",{className:"font-bold"},"Usar versão com mapa"))}const OQt={settings:{pageName:"Áreas de entrega",eventTrackId:"tela_areas_entrega",helperUrl:"https://ajuda.cardapioweb.com/gestao/delivery/areas-de-entrega",HeaderComponent:RQt},auth:Ye.companyUsers,userPermissions:[Te.DELIVERY_MANAGEMENT_PAGES],routes:[{path:"/entrega-taxas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./DeliverySettingsPage-BbWxBvSN.js"),__vite__mapDeps([174,167,67,170,28,175,176,44,177,178,107,108,179,104,50,180]))))}]},IQt={settings:{pageName:"Avaliações",eventTrackId:"tela_avaliacoes",helperUrl:"https://ajuda.cardapioweb.com/gestao/avaliacoes"},auth:Ye.companyUsers,userPermissions:[Te.FEEDBACK_PAGE],routes:[{path:"/avaliacoes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./FeedbackPage-CAjh4Okv.js"),__vite__mapDeps([181,182,183]))))}]},kQt={settings:{pageName:"Fluxo de caixa",eventTrackId:"tela_financeiro_fluxo_caixa",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-financeiro/fluxo-de-caixa-financeiro"},auth:Ye.companyUsers,modules:[At.FINANCIAL_MANAGEMENT_MODULE],userPermissions:[Te.FINANCIAL_CASH_FLOW],routes:[{path:["/financeiro/fluxo-caixa/tabela","/financeiro/fluxo-caixa/grafico","/financeiro/fluxo-caixa/calendario"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-D-RQ5F-f.js"),__vite__mapDeps([184,29,136,185,186,187,188,138,139,189,190,53,54,191,141,192,77,80,140,73,171,193,194,195,196,197,56,57,198,199,112,143,144,59,145,200,201]))))},{path:"/financeiro/fluxo-caixa",exact:!0,component:()=>u.createElement(us,{to:"/financeiro/fluxo-caixa/tabela"})}]},NQt={settings:{pageName:"Análise de pagamentos",eventTrackId:"tela_financeiro_analise_pagamentos",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-financeiro/analise-de-pagamentos-e-recebimentos"},auth:Ye.companyUsers,modules:[At.FINANCIAL_MANAGEMENT_MODULE],userPermissions:[Te.FINANCIAL_EXPENSE_ANALYSIS],routes:[{path:["/financeiro/analise-pagamentos/categorias","/financeiro/analise-pagamentos/centros-custos","/financeiro/analise-pagamentos/fornecedores"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-DSSR5iaQ.js"),__vite__mapDeps([202,203,129,112,138,139,56,5
3647,193,194,195,192,140,196,197]))))},{path:"/financeiro/analise-pagamentos",exact:!0,component:()=>u.createElement(us,{to:"/financeiro/analise-pagamentos/categorias"})}]},DQt={settings:{pageName:"Análise de recebimentos",eventTrackId:"tela_financeiro_analise_recebimentos",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-financeiro/analise-de-pagamentos-e-recebimentos"},auth:Ye.companyUsers,modules:[At.FINANCIAL_MANAGEMENT_MODULE],userPermissions:[Te.FINANCIAL_REVENUE_ANALYSIS],routes:[{path:["/financeiro/analise-recebimentos/categorias","/financeiro/analise-recebimentos/centros-custos","/financeiro/analise-recebimentos/fornecedores"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-DSkRIdna.js"),__vite__mapDeps([204,203,129,112,138,139,56,57,193,194,195,192,140,196,197]))))},{path:"/financeiro/analise-recebimentos",exact:!0,component:()=>u.createElement(us,{to:"/financeiro/analise-recebimentos/categorias"})}]},MQt={settings:{pageName:"Configurações",eventTrackId:"tela_financeiro_configuracoes",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-financeiro/configuracoes-modulo-financeiro"},auth:Ye.companyUsers,modules:[At.FINANCIAL_MANAGEMENT_MODULE],userPermissions:[Te.FINANCIAL_ACCOUNTS_MANAGEMENT,Te.FINANCIAL_CATEGORIES_MANAGEMENT,Te.FINANCIAL_COST_CENTERS_MANAGEMENT,Te.FINANCIAL_SUPPLIERS_MANAGEMENT,Te.FINANCIAL_PAYMENT_METHODS_MANAGEMENT],routes:[{path:["/financeiro/configuracoes/contas","/financeiro/configuracoes/categorias","/financeiro/configuracoes/centros-de-custo","/financeiro/configuracoes/fornecedores","/financeiro/configuracoes/formas-de-pagamento"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BOEAfK9C.js"),__vite__mapDeps([205,206,207,208,209]))))},{path:"/financeiro/configuracoes",exact:!0,component:()=>u.createElement(us,{to:"/financeiro/configuracoes/contas"})}]},LQt={settings:{pageName:"Lançamentos",eventTrackId:"tela_financeiro_lancamentos",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-financeiro/lancamentos",upsellingInfo:{module:At.FINANCIAL_MANAGEMENT_MODULE,title:"gestão financeira",description:"Um módulo para gerenciar suas contas a pagar e receber, controlar seu fluxo de caixa e ter uma visão completa das finanças da sua empresa."}},auth:Ye.companyUsers,userPermissions:[Te.FINANCIAL_REVENUE_TRANSACTIONS,Te.FINANCIAL_EXPENSE_TRANSACTIONS],routes:[{path:"/financeiro/lancamentos",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CqyTQpSb.js"),__vite__mapDeps([210,191,141,185,186,192,77,80,138,139,188,140,73,171,187,193,194,195,196,197,189,190,53,54,143,144,59,145,56,57,198,211]))))},{path:"/financeiro",exact:!0,component:()=>u.createElement(us,{to:"/financeiro/lancamentos"})}]},FQt=[LQt,kQt,NQt,DQt,MQt],BQt={settings:{pageName:"Inutilização de Notas Ficais",eventTrackId:"tela_fiscal_inutilizacao",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-fiscal/inutilizacao-de-notas"},auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],routes:[{path:"/fiscal/inutilizacao",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BbpKMpP7.js"),__vite__mapDeps([212,56,57,16,213,17,214,30,61]))))}]},zQt={settings:{pageName:"Notas fiscais",eventTrackId:"tela_fiscal_notas",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-fiscal/notas-fiscais",upsellingInfo:{module:At.FISCAL,title:"Notas Fiscais",description:"Emita suas NFC-e de forma simples e prática direto pelo nosso sistema."}},auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],routes:[{path:"/fiscal/notas",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-QGAFfp3H.js"),__vite__mapDeps([215,16,216,144,213,17,214,30,61,59,130,56,57,217]))))}]},HQt={settings:{pageName:"Configurações fiscais dos produtos",eventTrackId:"tela_fiscal_produtos",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-fiscal/configurando-a-tributacao-de-produtos-e-complementos",upsellingInfo:{module:At.FISCAL,title:"Notas Fiscais",description:"Emita suas NFC-e de forma simples e prática direto pelo nosso sistema."}},auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],routes:[{path:["/fiscal/produtos","/fiscal/produtos/:productId"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-D-RckYy5.js"),__vite__mapDeps([218,219,153,56,57]))))},{path:["/fiscal/opcoes","/fiscal/opcoes/:subitemId"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-D92N2_vc.js"),__vite__mapDeps([220,219,153,56,57,44,110]))))}]},UQt={settings:{pageName:"Configurações fiscais",eventTrackId:"tela_fiscal_configuracoes",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/modulo-fiscal",upsellingInfo:{module:At.FISCAL,title:"Notas Fiscais",de
364scription:"Emita suas NFC-e de forma simples e prática direto pelo nosso sistema."}},auth:Ye.companyUsers,userPermissions:[Te.FISCAL_PAGES],routes:[{path:"/fiscal/configuracoes",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CxEsRC25.js"),__vite__mapDeps([221,31,5,9,77,80,222,44,88,196]))))},{path:"/fiscal",exact:!0,component:()=>u.createElement(us,{to:"/fiscal/configuracoes"})}]},VQt=[UQt,HQt,zQt,BQt],qQt={settings:{pageName:"KDS",layout:{banner:!1,navbar:!1,header:!1,footer:!1}},auth:Ye.companyUsers,userPermissions:[Te.KDS],routes:[{path:"/kds",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./KdsPage-CLeyBp8E.js"),__vite__mapDeps([223,208,175,146,224,225,226,227,87,228]))))}]},jQt={settings:{pageName:"Últimos pedidos",helperUrl:"https://ajuda.cardapioweb.com/gestao/gestao-de-pedidos"},auth:Ye.companyUsers,userPermissions:[Te.LAST_ORDERS_PAGE],routes:[{path:["/latest-orders/fazer-pedido","/latest-orders/:orderId","/latest-orders"],component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./LatestOrdersPage-UJUqUzjx.js").then(e=>e.L),__vite__mapDeps([229,59,179,28,224,176,230,231,232,133,134,233,234]))))}]},$Qt={settings:{pageName:"Fidelidade - Atividades",eventTrackId:"tela_fidelidade_atividades"},auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],routes:[{path:"/fidelidade/atividades",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-9n8m9Vs9.js"),__vite__mapDeps([235,56,57,130,236,44,237]))))}]},WQt={settings:{pageName:"Fidelidade - Escolha modalidade",eventTrackId:"tela_fidelidade_escolha_modalidade"},auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],routes:[{path:"/fidelidade/escolher-modalidade",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BX38bO7e.js"),[])))}]},GQt={settings:{pageName:"Fidelidade - Visão geral",eventTrackId:"tela_fidelidade_visao_geral",helperUrl:"https://ajuda.cardapioweb.com/aumento-de-vendas/fidelidade",upsellingInfo:{module:At.LOYALTY_PROGRAM,title:"Fidelidade",description:"Que tal aumentar as suas vendas recorrentes e engajar ainda mais a sua base de clientes? Com esse módulo você pode configurar um programa de pontos para seus clientes e permitir que eles troquem esses pontos por produtos ou descontos."}},auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],routes:[{path:"/fidelidade/dashboard",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BP-fXNVI.js"),__vite__mapDeps([238,236,159,48,112,195,44]))))},{path:"/fidelidade",exact:!0,component:()=>u.createElement(us,{to:"/fidelidade/dashboard"})}]},KQt={settings:{pageName:"Fidelidade - Recompensas",eventTrackId:"tela_fidelidade_recompensas"},auth:Ye.companyUsers,userPermissions:[Te.LOYALTY_PAGES],routes:[{path:"/fidelidade/recompensas",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-CGVDfHYp.js"),__vite__mapDeps([239,149,237,153,240,133,134,194,195]))))}]},YQt=[WQt,$Qt,GQt,KQt],XQt={settings:{pageName:"Site Analytics",eventTrackId:"tela_marketing_analytics",beta:!0},auth:Ye.companyUsers,userPermissions:[Te.MARKETING_PAGES],routes:[{path:"/marketing/analytics",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./AnalyticsPage-DWsgWh8m.js"),__vite__mapDeps([241,242,130,128,44,48,112]))))}]},ZQt={settings:{pageName:"Segmentação de clientes",eventTrackId:"tela_segmentacao_clientes"},auth:Ye.companyUsers,userPermissions:[Te.MARKETING_PAGES],routes:[{path:["/marketing/segmentacao"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SegmentationPage-aZuVUhF2.js"),__vite__mapDeps([243,39,244,245,28,217,133,134,225,246,198,88,56,57]))))}]},QQt={settings:{pageName:"WhatsApp",eventTrackId:"tela_whatsapp"},auth:Ye.companyUsers,userPermissions:[Te.MARKETING_PAGES],routes:[{path:"/whatsapp/conexao",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppConnectionPage-BZ7X0l77.js"),__vite__mapDeps([247,248,249,250,251,252,253]))))},{path:"/whatsapp/chatbot",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppChatBotPage-B--tNJKC.js"),__vite__mapDeps([254,85,87,88,248,255,256,257,253]))))},{path:"/whatsapp/templates",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppTemplatesPage-BrJA7zCC.js"),__vite__mapDeps([258,257,253,248,217,256,259,118,255,260,152,250,177,76,261,249,252]))))},{path:"/whatsapp/status-pedido",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppOrderStatusPage-DWO1Sym7.js"),__vite__mapDeps([262,217,248,256,263,255,259,118,260,152,250,85,251,253]))))},{path:"/whatsapp/personalize-chatbot",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppBotPersonalityPage-BAHPWxO3.js"),__vite__mapDeps([264,265,263,248,253]))))},{path:"/whatsapp/extensao",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./WhatsAppExtensionPage-CkUxasL7.js"),[])))},{path:"/whatsapp",exact:!0,component:()=>u.createElement(us,{to:"/whatsapp/conexao"})},{path:["/marketing/whatsapp-meta","/marketing/whatsapp-meta/conversas"],exact:!0,component:()=>u.createElement(us,{to:"/whatsapp/chatbot"})},{path:"/marketing/whatsapp-meta/templates",exact:!0,component:()=>u.createElement(us,{to:"/whatsapp/templates"})},{path:"/marketing/whatsapp-meta/logs",exact:!0,component:()=>u.createElement(us,{to:"/whatsapp/conexao"})}]},JQt={settings:{pageName:"Campanhas via WhatsApp",eventTrackId:"tela_disparo_whatsapp",helperUrl:"https://ajuda.cardapioweb.com/automacao/food-marketing-campanhas-via-whatsapp"},auth:Ye.companyUsers,userPermissions:[Te.MARKETING_PAGES],routes:[{path:["/marketing/whatsapp","/marketing/whatsapp/agendamentos","/marketing/whatsapp/campanhas"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./ZapzapAuth-f06Mb2Ir.js"),__vite__mapDeps([266,267,196,248,252,225,209,268,150,169,242,269,55,244,245,28,217,133,134,246,198,88,270,255,130,251,44,61,165,98,56,5
3647,99,85,271,272,172,265,260,152,110,111,58,273,66,232,274]))))}]},eJt={settings:{pageName:"Catálogo",eventTrackId:"tela_catalogo",helperUrl:"https://ajuda.cardapioweb.com/gestao/catalogo"},auth:Ye.companyUsers,userPermissions:[Te.CATALOG_PAGES],routes:[{path:["/cardapio/produtos","/cardapio/complementos","/cardapio/opcoes"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./MenuPage-BiG56zh2.js").then(e=>e.M),__vite__mapDeps([275,276,225,198,268,107,89,108,104,178,28,144,59,240,153,133,134,194,195,143,145,208,277,22,3,274,172,273,227,66,88,207]))))},{path:"/cardapio/filtros_avancados",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-BDBNNqYD.js"),__vite__mapDeps([278,275,276,225,198,268,107,89,108,104,178,28,144,59,240,153,133,134,194,195,143,145,208,277,22,3,274,172,273,227,66,88,207,56,57]))))},{path:"/cardapio",exact:!0,component:()=>u.createElement(us,{to:"/cardapio/produtos"})}]},tJt={settings:{pageName:"Visão geral estabelecimentos",eventTrackId:"tela_visao_geral_estabelecimentos",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/visao-geral-estabelecimentos"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/analise-estabelecimentos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./MultiCompanyPerformancePage-BDaXALXR.js"),__vite__mapDeps([279,113,48,112,133,134,2,128]))))}]},rJt={settings:{pageName:"Avisos",eventTrackId:"tela_avisos",helperUrl:"https://ajuda.cardapioweb.com/gestao/minha-empresa/avisos"},auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],routes:[{path:"/avisos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./NoticesPage-xjURnogj.js"),__vite__mapDeps([280,93,133,134,246,71]))))}]},nJt={settings:{pageName:"Horários",eventTrackId:"tela_horarios",helperUrl:"https://ajuda.cardapioweb.com/gestao/minha-empresa/horarios"},auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],routes:[{path:"/horarios",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OpeningHoursPage-COe3GaN0.js"),__vite__mapDeps([281,176,282,14]))))}]},iJt={settings:{pageName:"Histórico de pedidos",eventTrackId:"tela_historico_pedidos",helperUrl:"https://ajuda.cardapioweb.com/gestao/historico-de-pedidos"},auth:Ye.companyUsers,userPermissions:[Te.ORDER_HISTORY_PAGE],routes:[{path:["/pedidos","/order-list","/order-list/:orderId"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrdersPage-B0py_Uu3.js"),__vite__mapDeps([283,70,44,71,143,144,59,145]))))}]},aJt={settings:{pageName:"Mesas e Comandas",helperUrl:"https://ajuda.cardapioweb.com/gestao/mesas-e-comandas",upsellingInfo:{module:At.TABLE_MODULE,title:"Mesas e Comandas",description:"Com ele você controla de forma simples e moderna suas vendas presenciais nas mesas. Tanto os garçons como os próprios clientes poderão lançar pedidos, dando agilidade para o seu atendimento e aumentando suas vendas."}},auth:Ye.companyUsers,userPermissions:[Te.TABLE_MANAGEMENT_PAGE],routes:[{path:["/mesas/:orderSessionId","/mesas"],component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OrderSessionManagementPage--Q8dEFsI.js"),__vite__mapDeps([284,230,231,227,44,110,111,285,225,139,286,102,165,228,245,146,118]))))}]},oJt={settings:{pageName:"Formas de pagamento",eventTrackId:"formas_pagamento",helperUrl:"https://ajuda.cardapioweb.com/gestao/minha-empresa/formas-de-pagamentos"},auth:Ye.companyUsers,userPermissions:[Te.PAYMENT_METHODS_PAGE],routes:[{path:"/formas-pagamento",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./PaymentMethodsPage-ethbzoAp.js"),__vite__mapDeps([287,288,231,9,10,5,53,54,206,272,146,261,289])))),exact:!0}]},sJt={settings:{pageName:"Performance",eventTrackId:"tela_performance"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/performance-antigo",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./PerformancePage-Bc-Ww6SM.js"),__vite__mapDeps([290,159,160,182,183,28]))))}]},lJt={settings:{pageName:"Perfil",eventTrackId:"tela_perfil",helperUrl:"https://ajuda.cardapioweb.com/gestao/minha-empresa/perfil"},auth:Ye.companyUsers,userPermissions:[Te.COMPANY_MANAGEMENT_PAGES],routes:[{path:"/profile",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./ProfilePage-BJgjzqEc.js"),__vite__mapDeps([291,54,292,134,8,293,75,76,77,294,273,103,104,176]))))}]},cJt={settings:{pageName:"Análise das vendas",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/analise-de-venda"}
364,auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:["/analise-vendas","/performance"],component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SalesPerformancePage-CS5NIUL0.js"),__vite__mapDeps([295,216,130,56,57,48,112,132,296,133,134,29,136,128,129,208]))))}]},uJt={settings:{pageName:"Análise de categorias",eventTrackId:"tela_analise_categoria",helperUrl:"https://ajuda.cardapioweb.com/gestao/desempenho/catalogo"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/relatorio-produtos/categorias",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SalesCategoryReportPage-bSzscQTL.js"),__vite__mapDeps([297,298,148,118,128,129,112,48,132,296,133,134,29,136,198,274,57,143,144,59,145,56]))))}]},dJt={settings:{pageName:"Análise de produtos",eventTrackId:"tela_analise_produtos_nova"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/relatorio-produtos/produtos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SalesProductsReportPage-DpMSK8nz.js"),__vite__mapDeps([299,298,148,118,128,129,112,48,132,296,133,134,29,136,198,274,57,143,144,59,145,56]))))}]},fJt={settings:{pageName:"Análise de opções",eventTrackId:"tela_analise_opcoes"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/relatorio-produtos/opcoes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SalesSubitemsReportPage-nPXmWbgk.js"),__vite__mapDeps([300,298,148,118,128,129,112,48,132,296,133,134,29,136,198,274,57,143,144,59,145,56]))))}]},hJt=[uJt,dJt,fJt],pJt={settings:{pageName:"Análise dos produtos",eventTrackId:"tela_analise_produtos"},auth:Ye.companyUsers,userPermissions:[Te.PERFORMANCE_PAGES],routes:[{path:"/relatorio-vendas",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SalesReportPage-CUGkz21a.js"),__vite__mapDeps([301,70,44,143,144,59,145,71,302]))))}]},mJt={settings:{pageName:"Configurações",eventTrackId:"tela_configuracoes"},auth:Ye.companyUsers,userPermissions:[Te.SETTINGS_PAGES,Te.SETTINGS_PAGES_PRINTING],routes:[{path:["/configuracoes/geral","/configuracoes/pagamento","/configuracoes/personalizar","/configuracoes/impressao","/configuracoes/agendamento","/configuracoes/mesas","/configuracoes/integracao/:integrationId?","/configuracoes/dispositivos"],exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SettingsPage-Bj7cHj-F.js").then(e=>e.S),__vite__mapDeps([303,208,228,175]))))},{path:"/configuracoes",exact:!0,component:()=>u.createElement(us,{to:"/configuracoes/geral"})}]},vJt={settings:{pageName:"Estoque",eventTrackId:"tela_estoque",helperUrl:"https://ajuda.cardapioweb.com/modulos-do-sistema/estoque-avancado",upsellingInfo:{module:At.ADVANCED_STOCK_CONTROL_MODULE,title:"Estoque Avançado",description:"Com ele você consegue acompanhar em uma única tela todo o seu estoque e ver todas as operações que foram feitas. Além disso, é possível também controlar a ficha técnica dos seus produtos, definir estoque mínimo e muito mais."}},auth:Ye.companyUsers,userPermissions:[Te.STOCK_PAGES],routes:[{path:"/estoque/meu_estoque/produtos/:itemId?",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-Cl_ZIIaS.js"),__vite__mapDeps([304,276,225,305,306,56,57,307,143,144,59,16,175,153,98,99]))))},{path:"/estoque/meu_estoque/opcoes/:subitemId?",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-DgKWHLnb.js"),__vite__mapDeps([308,276,225,305,306,56,57,307,143,144,59,16,175,98,99]))))},{path:"/estoque/meu_estoque/insumos/:foodInputId?",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-Bca7xiv6.js"),__vite__mapDeps([309,225,276,306,56,57,307,143,144,59,16,175,98,208,99]))))},{path:"/estoque/movimentacoes",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-v92uJqSA.js"),__vite__mapDeps([310,242,56,57,276,225,307,143,144,59,16,175]))))},{path:"/estoque",component:()=>u.createElement(us,{to:"/estoque/meu_estoque/produtos"})}]},gJt=[OQt,EQt,jQt,qQt,eJt,iJt,sJt,cJt,tJt,wQt,bQt,gQt,vQt,PQt,pJt,lJt,nJt,oJt,rJt,mJt,vJt,_Qt,SQt,aJt,yQt,AQt,IQt,JQt,QQt,ZQt,XQt,...hJt,...YQt,...TQt,...VQt,...FQt],yJt={settings:{pageName:"Conectar MCP",layout:{banner:!1,navbar:!1,header:!1,footer:!1}},auth:Ye.companyUsers,routes:[{path:"/mcp/oauth/consent",exact:!0,component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./McpOAuthConsentPage-BkaJyUxL.js"),__vite__mapDeps([311,123,312]))))}]},_Jt=[yJt],bJt={settings:{pageName:"Dashboard"},auth:Ye.owner,routes:[{path:"/owner-dashboard/vendas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerDashboardPage-Dd0g6-QU.js"),__vite__mapDeps([313,314]))))},{path:"/owner-dashboard/produtos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerDashboardPage-Dd0g6-QU.js"),__vite__mapDeps([313,314]))))},{path:"/owner-dashboard/faturamento",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerDashboardPage-Dd0g6-QU.js"),__vite__mapDeps([313,314]))))},{path:"/owner-dashboard/acessos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerDashboardPage-Dd0g6-QU.js"),__vite__mapDeps([313,314]))))},{path:"/owner-dashboard",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerDashboardPage-Dd0g6-QU.js"),__vite__mapDeps([313,314]))))}]},EJt={settings:{pageName:"Link multilojas",eventTrackId:"tela_links_multilojas",helperUrl:"https://ajuda.cardapioweb.com/gestao/administrativo/link-de-multilojas"},auth:Ye.owner,routes:[{path:"/links-multilojas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerMultilojasPage-HE48Hu_U.js"),__vite__mapDeps([315,107,3,157,104,22,61,316]))))}]},wJt={settings:{pageName:"Estabelecimentos"},auth:Ye.owner,routes:[{path:"/owner-stores",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./OwnerStoresPage-DKLmx0aj.js"),__vite__mapDeps([317,314]))))}]},SJt={settings:{pageName:"Assinaturas",eventTrackId:"tela_assinaturas",helperUrl:"https://ajuda.cardapioweb.com/gestao/administrativo/assinaturas"},auth:Ye.owner,routes:[{path:"/assinaturas",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SubscriptionsPage-DUXub71s.js"),__vite__mapDeps([318,7,8,9,10,5,4,3,1,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,6,36,37]))))}]},CJt={settings:{pageName:"Usuários",eventTrackId:"tela_usuarios",helperUrl:"https://ajuda.cardapioweb.com/gestao/administrativo/usuarios"},auth:Ye.owner,routes:[{path:"/usuarios",component:u.lazy(()=>me.smartImport(()=>Zt(()=>
364import("./OwnerUsersPage-Bgko0jLE.js"),__vite__mapDeps([319,288,55,88,97,113,44]))))}]},xJt=[bJt,wJt,SJt,CJt,EJt],TJt=[{id:"minLength",name:"mais de 12 caracteres",validation:e=>e.length>12},{id:"number",name:"um número",validation:e=>/.*\d.*/.test(e)},{id:"letter",name:"uma letra",validation:e=>/.*[a-zA-Z].*/.test(e)}];function AJt({password:e,passwordConfirmation:t}){return e?u.createElement("div",{className:"space-y-4"},TJt.map(r=>u.createElement("div",{key:r.id,className:Ft("flex items-center space-x-8",r.validation(e)?"text-green-dark":"text-red-dark")},r.validation(e)?u.createElement(_h,{color:"inherit",fontSize:"small"}):u.createElement(Aa,{color:"inherit",fontSize:"small"}),u.createElement("span",{className:"text-16 font-bold transition-colors"},"A senha deve ter ",r.name))),u.createElement("div",{key:"passwordConfirmation",className:Ft("flex items-center space-x-8",e===t?"text-green-dark":"text-red-dark")},e===t?u.createElement(_h,{color:"inherit",fontSize:"small"}):u.createElement(Aa,{color:"inherit",fontSize:"small"}),u.createElement("span",{className:"text-16 font-bold transition-colors"},"A senha deve ser igual à confirmação"))):null}const PJt=Rh(e=>({root:{background:"radial-gradient("+iNe.darken(e.palette.primary.dark,.5)+" 0%, "+e.palette.primary.dark+" 80%)",color:e.palette.primary.contrastText},link:{textDecoration:"none",color:e.palette.secondary.main}}));function RJt(){const e=PJt(),t=vc(),r=Wbe(),n=at(({auth:I})=>I.user.layout),[i,a]=u.useState(""),[o,s]=u.useState(""),[l,c]=u.useState(!1),[d,f]=u.useState(null),[h,p]=u.useState(""),[g,_]=u.useState(!1),[b,E]=u.useState(!1),S=Lr();u.useEffect(()=>{(window.location.host.includes("cardapioweb.com")||window.location.host.includes("localhost"))&&_(!0)},[]),u.useEffect(()=>{const I=r.get("recovery_password_token"),N=r.get("email");N&&p(N),I&&(f(I),t.replace("/recuperar-senha"))},[t,r]);const P=u.useCallback(I=>{I.preventDefault(),E(N=>!N)},[]);function O(){i?i.length<12?S.error("A senha deve ter pelo menos 12 caracteres",{autoHideDuration:5e3}):/.*[a-zA-Z].*/.test(i)?/.*\d.*/.test(i)?i!==o?S.error("As senhas não são iguais",{autoHideDuration:5e3}):(c(!0),ht.put("api/v1/authentication/users/password",{reset_password_token:d,password:i}).then(I=>{I.status===202?(S.success("Senha alterada com sucesso",{autoHideDuration:5e3}),t.push("/login")):S.error("Não foi possível alterar a senha",{autoHideDuration:5e3})}).catch(()=>S.error("Não foi possível alterar a senha",{autoHideDuration:5e3})).finally(()=>{c(!1)})):S.error("A senha deve ter pelo menos um número",{autoHideDuration:5e3}):S.error("A senha deve ter pelo menos uma letra",{autoHideDuration:5e3}):S.error("Informe uma senha",{autoHideDuration:5e3})}return n?u.createElement("div",{key:"with-token",className:Ft(e.root,"flex h-full flex-auto flex-shrink-0 flex-col items-center justify-center p-8 sm:p-32")},u.createElement("div",{className:"flex w-full flex-col items-center justify-center"},u.createElement(FAe,{className:"w-full max-w-400 rounded-12"},u.createElement(BAe,{className:"flex flex-col items-center justify-center p-20 sm:p-32"},n&&u.createElement("img",{className:Ft("m-24 sm:m-32",g?"w-160 md:w-200":"w-160"),src:n.image||"/assets/images/newLogo.svg",alt:"logo"}),d?u.createElement(u.Fragment,null,u.createElement(fo,{variant:"h6",className:"mb-32 mt-16 text-center"},"REDEFINA SUA SENHA"),u.createElement("div",{className:"flex w-full flex-col justify-center space-y-20"},u.createElement(Tr,{name:"email",label:"E-mail",value:h,variant:"outlined",className:"mb-8",disabled:!0,fullWidth:!0}),u.createElement("div",{className:"w-full space-y-12"},u.createElement(Tr,{name:"password",label:"Nova senha",variant:"outlined",type:b?"text":"password",value:i,onChange:I=>a(I.target.value),required:!0,fullWidth:!0,InputProps:{endAdornment:u.createElement(Fg,{position:"end"},u.createElement(Yn,{title:b?"Esconder senha":"Mostrar senha",placement:"top",arrow:!0,classes:{tooltip:"text-14"}},u.createElement("span",null,u.createElement(cr,{onClick:P,size:"small"},b?u.createElement(hq,null):u.createElement(fq,null)))))}}),u.createElement(AJt,{password:i,passwordConfirmation:o})),u.createElement(Tr,{label:"Confirmar senha",variant:"outlined",type:b?"text":"password",value:o,onChange:I=>s(I.target.value),required:!0,fullWidth:!0,InputProps:{endAdornment:u.createElement(Fg,{position:"end"},u.createElement(Yn,{title:b?"Esconder senha":"Mostrar senha",placement:"top",arrow:!0,classes:{tooltip:"text-14"}},u.createElement("span",null,u.createElement(cr,{onClick:P,size:"small"},b?u.createElement(hq,null):u.createElement(fq,null)))))}}),u.createElement("div",{className:"w-full pt-8"},u.createElement(fr,{variant:"contained",color:"primary",className:"w-full normal-case",size:"large",onClick:O,disableElevation:!0},"CONFIRMAR")),l&&u.createElement("div",{className:"absolute inset-0 flex items-center justify-center",style:{zIndex:5e3,backgroundColor:"rgba(255,255,255,0.7)"}},u.createElement(ai,{color:"primary"})))):u.createElement("div",{className:"mb-20 text-center text-20 font-medium text-gray-600"},"Para redefinir sua senha use o link enviado por e-mail."))))):u.createElement(v0,null)}const OJt={settings:{layout:{banner:!1,navbar:!1,header:!1,footer:!1}},auth:Ye.onlyGuest,routes:[{path:"/recuperar-senha",component:RJt}]},IJt={settings:{pageName:"Análise de closer"},auth:Ye.internalUserCreator,userRolePermissions:[Kn.SELLER_ANALYSIS],routes:[{path:"/recebimentos",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./RevenuePage-CF3DdByj.js"),__vite__mapDeps([320,267,196,35,1,41,14,5,3,42,112]))))}]},kJt=[IJt],NJt={settings:{layout:{banner:!1,navbar:!1,header:!1,footer:!1}},routes:[{path:"/cadastro/:params",component:u.lazy(()=>me.smartImport(()=>Zt(()=>import("./SignUpPage-CCOfWqDX.js"),__vite__mapDeps([47,48,49,50,34,5,9,10,6]))))}]},DJt=[...FZt,pQt,mQt,NJt,OJt],MJt=[...TZt,...DZt,...kJt,...OZt,...DJt,...gJt,...xJt,...kZt,..._Jt],LJt=[{path:"/",exact:!0,auth:Ye.onlyGuest,component:()=>u.createElement(us,{to:"/login"})},{component:()=>u.createElement(us,{to:"/error-404"})}],FJt=[...me.generateRoutesFromConfigs(MJt),...LJt];var qw={},Tge;function BJt(){if(Tge)return qw;Tge=1,Object.defineProperty(qw,"__esModule",{value:!0}),qw.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},t=e;return qw.default=t,qw}var zJt=BJt();const HJt=et(zJt);let _u=window.location.host.split(".").slice(1).join(".");const xv={"rvpedidos.com.br":{primary:{light:"#1587ee",main:"#0368C4",dark:"#00529d"}},"oxemenu.com.br":{primary:{light:"#48216B",main:"#291937",dark:"#130B1A"}},"suri.ai":{primary:{light:"#a0a8e6",main:"#4352CE",dark:"#1c246c"}},"portal.cardapioweb.com":{primary:{light:"#F4EDF7",main:"#A543FA",dark:"#59327A"},secondary:{main:"#FFB600"}},default:{primary:{light:"#a03333",main:"#890000",dark:"#5f0000"}}};(_u.includes("cardapioweb.com")||_u.includes("web.app"))&&(_u="portal.cardapioweb.com");xv[_u]||(_u="default");const UJt={default:{palette:{type:"light",primary:{light:xv[_u]?.primary?.light,main:xv[_u]?.primary?.main,dark:xv[_u]?.primary?.dark},secondary:{light:xv[_u]?.secondary?.light||"#f2ab34",main:xv[_u]?.secondary?.main||"#EF9602",dark:xv[_u]?.secondary?.dark||"#a76901"},error:HJt},status:{danger:"orange"}}};nl.init("24e3fa2cbe5a7fcb0e9d8cb44374f905");function VJt(){const e=at(({auth:r})=>r.user),{organization:t}=$x();return u.useEffect(()=>{e.activeCompany?.id!=null?nl.register({company_id:e.activeCompany.id}):nl.unregister("company_id"),e.user&&e.activeCompany&&(nl.identify(e.user.id),nl.add_group("Company",e.activeCompany.name),nl.people.set({$name:e.user.name,$email:e.user.email,Organization:t?.name,Profile:e.user.profile,Holder:e.user.owner.name,"Holder Email"
364:e.user.owner.email}))},[t,e]),null}function qJt(){const{isCWOrganization:e}=$x(),t=at(({auth:a})=>a.user),r=at(({auth:a})=>a.user.role),n=at(({globalCompany:a})=>a.company?.id),i=u.useMemo(()=>e&&r&&n&&me.hasPermission(Ye.owner,r)&&!jYt(),[e,n,r]);return u.useEffect(()=>{if(i){const a=t.user.owner.created_at,o=window.document.createElement("script");o.type="text/javascript",o.id="wootric-settings",o.async=!0,o.innerHTML=`
365          window.wootricSettings = {
366            name: '${t.user.owner.name}',
367            email: '${t.user.owner.email}',
368            profile: '${t.user.profile}',
369            created_at: ${a?qe(a).format("X"):0},
370            account_token: 'NPS-cd2fdaab',
371            scale_color: 'gradient',
372            properties: {
373              company_id: ${n?.toString()}
374            }
375          };
376        `,window.document.getElementById("wootric-settings")===null&&window.document.body.appendChild(o);const s=window.document.createElement("script");s.type="text/javascript",s.id="wootric-beacon",s.async=!0,s.src="https://cdn.wootric.com/wootric-sdk.js",s.onload=function(){window.wootric("run")},document.getElementById("wootric-beacon")==null&&document.body.appendChild(s)}},[t,n,i]),null}var Rr={},Age;function jJt(){if(Age)return Rr;Age=1;var e={};e.userAgent=!1;var t={};if(r===void 0)var r={};r.lang={extend:function(y,T,A){if(!T||!y)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var k=function(){};if(k.prototype=T.prototype,y.prototype=new k,y.prototype.constructor=y,y.superclass=T.prototype,T.prototype.constructor==Object.prototype.constructor&&(T.prototype.constructor=T),A){var z;for(z in A)y.prototype[z]=A[z];var U=function(){},Y=["toString","valueOf"];try{/MSIE/.test(e.userAgent)&&(U=function(Z,ue){for(z=0;z<Y.length;z=z+1){var he=Y[z],Se=ue[he];typeof Se=="function"&&Se!=Object.prototype[he]&&(Z[he]=Se)}})}catch{}U(y.prototype,A)}}};var n=n||(function(y,T){var A={},k=A.lib={},z=k.Base=(function(){function ee(){}return{extend:function(oe){ee.prototype=this;var K=new ee;return oe&&K.mixIn(oe),K.hasOwnProperty("init")||(K.init=function(){K.$super.init.apply(this,arguments)}),K.init.prototype=K,K.$super=this,K},create:function(){var oe=this.extend();return oe.init.apply(oe,arguments),oe},init:function(){},mixIn:function(oe){for(var K in oe)oe.hasOwnProperty(K)&&(this[K]=oe[K]);oe.hasOwnProperty("toString")&&(this.toString=oe.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),U=k.WordArray=z.extend({init:function(ee,oe){ee=this.words=ee||[],oe!=T?this.sigBytes=oe:this.sigBytes=ee.length*4},toString:function(ee){return(ee||Z).stringify(this)},concat:function(ee){var oe=this.words,K=ee.words,ne=this.sigBytes,se=ee.sigBytes;if(this.clamp(),ne%4)for(var be=0;be<se;be++){var Ie=K[be>>>2]>>>24-be%4*8&255;oe[ne+be>>>2]|=Ie<<24-(ne+be)%4*8}else for(var be=0;be<se;be+=4)oe[ne+be>>>2]=K[be>>>2];return this.sigBytes+=se,this},clamp:function(){var ee=this.words,oe=this.sigBytes;ee[oe>>>2]&=4294967295<<32-oe%4*8,ee.length=y.ceil(oe/4)},clone:function(){var ee=z.clone.call(this);return ee.words=this.words.slice(0),ee},random:function(ee){for(var oe=[],K=0;K<ee;K+=4)oe.push(y.random()*4294967296|0);return new U.init(oe,ee)}}),Y=A.enc={},Z=Y.Hex={stringify:function(ee){for(var oe=ee.words,K=ee.sigBytes,ne=[],se=0;se<K;se++){var be=oe[se>>>2]>>>24-se%4*8&255;ne.push((be>>>4).toString(16)),ne.push((be&15).toString(16))}return ne.join("")},parse:function(ee){for(var oe=ee.length,K=[],ne=0;ne<oe;ne+=2)K[ne>>>3]|=parseInt(ee.substr(ne,2),16)<<24-ne%8*4;return new U.init(K,oe/2)}},ue=Y.Latin1={stringify:function(ee){for(var oe=ee.words,K=ee.sigBytes,ne=[],se=0;se<K;se++){var be=oe[se>>>2]>>>24-se%4*8&255;ne.push(String.fromCharCode(be))}return ne.join("")},parse:function(ee){for(var oe=ee.length,K=[],ne=0;ne<oe;ne++)K[ne>>>2]|=(ee.charCodeAt(ne)&255)<<24-ne%4*8;return new U.init(K,oe)}},he=Y.Utf8={stringify:function(ee){try{return decodeURIComponent(escape(ue.stringify(ee)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(ee){return ue.parse(unescape(encodeURIComponent(ee)))}},Se=k.BufferedBlockAlgorithm=z.extend({reset:function(){this._data=new U.init,this._nDataBytes=0},_append:function(ee){typeof ee=="string"&&(ee=he.parse(ee)),this._data.concat(ee),this._nDataBytes+=ee.sigBytes}
376,_process:function(ee){var oe=this._data,K=oe.words,ne=oe.sigBytes,se=this.blockSize,be=se*4,Ie=ne/be;ee?Ie=y.ceil(Ie):Ie=y.max((Ie|0)-this._minBufferSize,0);var Ge=Ie*se,$e=y.min(Ge*4,ne);if(Ge){for(var je=0;je<Ge;je+=se)this._doProcessBlock(K,je);var zt=K.splice(0,Ge);oe.sigBytes-=$e}return new U.init(zt,$e)},clone:function(){var ee=z.clone.call(this);return ee._data=this._data.clone(),ee},_minBufferSize:0});k.Hasher=Se.extend({cfg:z.extend(),init:function(ee){this.cfg=this.cfg.extend(ee),this.reset()},reset:function(){Se.reset.call(this),this._doReset()},update:function(ee){return this._append(ee),this._process(),this},finalize:function(ee){ee&&this._append(ee);var oe=this._doFinalize();return oe},blockSize:512/32,_createHelper:function(ee){return function(oe,K){return new ee.init(K).finalize(oe)}},_createHmacHelper:function(ee){return function(oe,K){return new we.HMAC.init(ee,K).finalize(oe)}}});var we=A.algo={};return A})(Math);(function(y){var z=n,T=z.lib,A=T.Base,k=T.WordArray,z=z.x64={};z.Word=A.extend({init:function(U,Y){this.high=U,this.low=Y}}),z.WordArray=A.extend({init:function(U,Y){U=this.words=U||[],this.sigBytes=Y!=y?Y:8*U.length},toX32:function(){for(var U=this.words,Y=U.length,Z=[],ue=0;ue<Y;ue++){var he=U[ue];Z.push(he.high),Z.push(he.low)}return k.create(Z,this.sigBytes)},clone:function(){for(var U=A.clone.call(this),Y=U.words=this.words.slice(0),Z=Y.length,ue=0;ue<Z;ue++)Y[ue]=Y[ue].clone();return U}})})(),n.lib.Cipher||(function(y){var oe=n,T=oe.lib,A=T.Base,k=T.WordArray,z=T.BufferedBlockAlgorithm,U=oe.enc.Base64,Y=oe.algo.EvpKDF,Z=T.Cipher=z.extend({cfg:A.extend(),createEncryptor:function(ne,se){return this.create(this._ENC_XFORM_MODE,ne,se)},createDecryptor:function(ne,se){return this.create(this._DEC_XFORM_MODE,ne,se)},init:function(ne,se,be){this.cfg=this.cfg.extend(be),this._xformMode=ne,this._key=se,this.reset()},reset:function(){z.reset.call(this),this._doReset()},process:function(ne){return this._append(ne),this._process()},finalize:function(ne){return ne&&this._append(ne),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(ne){return{encrypt:function(se,be,Ie){return(typeof be=="string"?K:ee).encrypt(ne,se,be,Ie)},decrypt:function(se,be,Ie){return(typeof be=="string"?K:ee).decrypt(ne,se,be,Ie)}}}});T.StreamCipher=Z.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var we=oe.mode={},ue=function(ne,se,be){var Ie=this._iv;Ie?this._iv=y:Ie=this._prevBlock;for(var Ge=0;Ge<be;Ge++)ne[se+Ge]^=Ie[Ge]},he=(T.BlockCipherMode=A.extend({createEncryptor:function(ne,se){return this.Encryptor.create(ne,se)},createDecryptor:function(ne,se){return this.Decryptor.create(ne,se)},init:function(ne,se){this._cipher=ne,this._iv=se}})).extend();he.Encryptor=he.extend({processBlock:function(ne,se){var be=this._cipher,Ie=be.blockSize;ue.call(this,ne,se,Ie),be.encryptBlock(ne,se),this._prevBlock=ne.slice(se,se+Ie)}}),he.Decryptor=he.extend({processBlock:function(ne,se){var be=this._cipher,Ie=be.blockSize,Ge=ne.slice(se,se+Ie);be.decryptBlock(ne,se),ue.call(this,ne,se,Ie),this._prevBlock=Ge}}),we=we.CBC=he,he=(oe.pad={}).Pkcs7={pad:function(ne,se){for(var be=4*se,be=be-ne.sigBytes%be,Ie=be<<24|be<<16|be<<8|be,Ge=[],$e=0;$e<be;$e+=4)Ge.push(Ie);be=k.create(Ge,be),ne.concat(be)},unpad:function(ne){ne.sigBytes-=ne.words[ne.sigBytes-1>>>2]&255}},T.BlockCipher=Z.extend({cfg:Z.cfg.extend({mode:we,padding:he}),reset:function(){Z.reset.call(this);var se=this.cfg,ne=se.iv,se=se.mode;if(this._xformMode==this._ENC_XFORM_MODE)var be=se.createEncryptor;else be=se.createDecryptor,this._minBufferSize=1;this._mode=be.call(se,this,ne&&ne.words)},_doProcessBlock:function(ne,se){this._mode.processBlock(ne,se)},_doFinalize:function(){var ne=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){ne.pad(this._data,this.blockSize);var se=this._process(!0)}else se=this._process(!0),ne.unpad(se);return se},blockSize:4});var Se=T.CipherParams=A.extend({init:function(ne){this.mixIn(ne)},toString:function(ne){return(ne||this.formatter).stringify(this)}}),we=(oe.format={}).OpenSSL={stringify:function(ne){var se=ne.ciphertext;return ne=ne.salt,(ne?k.create([1398893684,1701076831]).concat(ne).concat(se):se).toString(U)},parse:function(ne){ne=U.parse(ne);var se=ne.words;if(se[0]==1398893684&&se[1]==1701076831){var be=k.create(se.slice(2,4));se.splice(0,4),ne.sigBytes-=16}return Se.create({ciphertext:ne,salt:be})}},ee=T.SerializableCipher=A.extend({cfg:A.extend({format:we}),encrypt:function(ne,se,be,Ie){Ie=this.cfg.extend(Ie);var Ge=ne.createEncryptor(be,Ie);return se=Ge.finalize(se),Ge=Ge.cfg,Se.create({ciphertext:se,key:be,iv:Ge.iv,algorithm:ne,mode:Ge.mode,padding:Ge.padding,blockSize:ne.blockSize,formatter:Ie.format})},decrypt:function(ne,se,be,Ie){return Ie=this.cfg.extend(Ie),se=this._parse(se,Ie.format),ne.createDecryptor(be,Ie).finalize(se.ciphertext)},_parse:function(ne,se){return typeof ne=="string"?se.parse(ne,this):ne}}),oe=(oe.kdf={}).OpenSSL={execute:function(ne,se,be,Ie){return Ie||(Ie=k.random(8)),ne=Y.create({keySize:se+be}).compute(ne,Ie),be=k.create(ne.words.slice(se),4*be),ne.sigBytes=4*se,Se.create({key:ne,iv:be,salt:Ie})}},K=T.PasswordBasedCipher=ee.extend({cfg:ee.cfg.extend({kdf:oe}),encrypt:function(ne,se,be,Ie){return Ie=this.cfg.extend(Ie),be=Ie.kdf.execute(be,ne.keySize,ne.ivSize),Ie.iv=be.iv,ne=ee.encrypt.call(this,ne,se,be.key,Ie),ne.mixIn(be),ne},decrypt:function(ne,se,be,Ie){return Ie=this.cfg.extend(Ie),se=this._parse(se,Ie.format),be=Ie.kdf.execute(be,ne.keySize,ne.ivSize,se.salt),Ie.iv=be.iv,ee.decrypt.call(this,ne,se,be.key,Ie)}})})(),(function(){for(var y=n,T=y.lib.BlockCipher,zt=y.algo,A=[],k=[],z=[],U=[],Y=[],Z=[],ue=[],he=[],Se=[],we=[],ee=[],oe=0;256>oe;oe++)ee[oe]=128>oe?oe<<1:oe<<1^283;for(var K=0,ne=0,oe=0;256>oe;oe++){var se=ne^ne<<1^ne<<2^ne<<3^ne<<4,se=se>>>8^se&255^99;A[K]=se,k[se]=K;var be=ee[K],Ie=ee[be],Ge=ee[Ie],$e=257*ee[se]^16843008*se;z[K]=$e<<24|$e>>>8,U[K]=$e<<16|$e>>>16,Y[K]=$e<<8|$e>>>24,Z[K]=$e,$e=16843009*Ge^65537*Ie^257*be^16843008*K,ue[se]=$e<<24|$e>>>8,he[se]=$e<<16|$e>>>16,Se[se]=$e<<8|$e>>>24,we[se]=$e,K?(K=be^ee[ee[ee[Ge^be]]],ne^=ee[ee[ne]]):K=ne=1}var je=[0,1,2,4,8,16,32,64,128,27,54],zt=zt.AES=T.extend({_doReset:function(){for(var ct=this._key,xt=ct.words,rt=ct.sigBytes/4,ct=4*((this._nRounds=rt+6)+1),Lt=this._keySchedule=[],er=0;er<ct;er++)if(er<rt)Lt[er]=xt[er];else{var Xt=Lt[er-1];er%rt?6<rt&&er%rt==4&&(Xt=A[Xt>>>24]<<24|A[Xt>>>16&255]<<16|A[Xt>>>8&255]<<8|A[Xt&255]):(Xt=Xt<<8|Xt>>>24,Xt=A[Xt>>>24]<<24|A[Xt>>>16&255]<<16|A[Xt>>>8&255]<<8|A[Xt&255],Xt^=je[er/rt|0]<<24),Lt[er]=Lt[er-rt]^Xt}for(xt=this._invKeySchedule=[],rt=0;rt<ct;rt++)er=ct-rt,Xt=rt%4?Lt[er]:Lt[er-4],xt[rt]=4>rt||4>=er?Xt:ue[A[Xt>>>24]]^he[A[Xt>>>16&255]]^Se[A[Xt>>>8&255]]^we[A[Xt&255]]},encryptBlock:function(xt,rt){this._doCryptBlock(xt,rt,this._keySchedule,z,U,Y,Z,A)},decryptBlock:function(xt,rt){var ct=xt[rt+1];xt[rt+1]=xt[rt+3],xt[rt+3]=ct,this._doCryptBlock(xt,rt,this._invKeySchedule,ue,he,Se,we,k),ct=xt[rt+1],xt[rt+1]=xt[rt+3],xt[rt+3]=ct},_doCryptBlock:function(xt,rt,ct,Lt,er,Xt,Pr,ot){for(var wt=this._nRounds,Oa=xt[rt]^ct[0],Ua=xt[rt+1]^ct[1],ea=xt[rt+2]^ct[2],Ji=xt[rt+3]^ct[3],It=4,Ht=1;Ht<wt;Ht++)var Ha=Lt[Oa>>>24]^er[Ua>>>16&255]^Xt[ea>>>8&255]^Pr[Ji&255]^ct[It++],hi=Lt[Ua>>>24]^er[ea>>>16&255]^Xt[Ji>>>8&255]^Pr[Oa&255]^ct[It++],ki=Lt[ea>>>24]^er[Ji>>>16&255]^Xt[Oa>>>8&255]^Pr[Ua&255]^ct[It++],Ji=Lt[Ji>>>24]^er[Oa>>>16&255]^Xt[Ua>>>
3768&255]^Pr[ea&255]^ct[It++],Oa=Ha,Ua=hi,ea=ki;Ha=(ot[Oa>>>24]<<24|ot[Ua>>>16&255]<<16|ot[ea>>>8&255]<<8|ot[Ji&255])^ct[It++],hi=(ot[Ua>>>24]<<24|ot[ea>>>16&255]<<16|ot[Ji>>>8&255]<<8|ot[Oa&255])^ct[It++],ki=(ot[ea>>>24]<<24|ot[Ji>>>16&255]<<16|ot[Oa>>>8&255]<<8|ot[Ua&255])^ct[It++],Ji=(ot[Ji>>>24]<<24|ot[Oa>>>16&255]<<16|ot[Ua>>>8&255]<<8|ot[ea&255])^ct[It++],xt[rt]=Ha,xt[rt+1]=hi,xt[rt+2]=ki,xt[rt+3]=Ji},keySize:8});y.AES=T._createHelper(zt)})(),(function(){function y(ee,oe){var K=(this._lBlock>>>ee^this._rBlock)&oe;this._rBlock^=K,this._lBlock^=K<<ee}function T(ee,oe){var K=(this._rBlock>>>ee^this._lBlock)&oe;this._lBlock^=K,this._rBlock^=K<<ee}var A=n,z=A.lib,k=z.WordArray,z=z.BlockCipher,U=A.algo,Y=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],Z=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],ue=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],he
vendor: 7,629 bytes, line 376
376=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],
376Se=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],we=U.DES=z.extend({_doReset:function(){for(var ee=this._key.words,oe=[],K=0;56>K;K++){var ne=Y[K]-1;oe[K]=ee[ne>>>5]>>>31-ne%32&1}for(ee=this._subKeys=[],ne=0;16>ne;ne++){for(var se=ee[ne]=[],be=ue[ne],K=0;24>K;K++)se[K/6|0]|=oe[(Z[K]-1+be)%28]<<31-K%6,se[4+(K/6|0)]|=oe[28+(Z[K+24]-1+be)%28]<<31-K%6;for(se[0]=se[0]<<1|se[0]>>>31,K=1;7>K;K++)se[K]>>>=4*(K-1)+3;se[7]=se[7]<<5|se[7]>>>27}for(oe=this._invSubKeys=[],K=0;16>K;K++)oe[K]=ee[15-K]},encryptBlock:function(ee,oe){this._doCryptBlock(ee,oe,this._subKeys)},decryptBlock:function(ee,oe){this._doCryptBlock(ee,oe,this._invSubKeys)},_doCryptBlock:function(ee,oe,K){this._lBlock=ee[oe],this._rBlock=ee[oe+1],y.call(this,4,252645135),y.call(this,16,65535),T.call(this,2,858993459),T.call(this,8,16711935),y.call(this,1,1431655765);for(var ne=0;16>ne;ne++){for(var se=K[ne],be=this._lBlock,Ie=this._rBlock,Ge=0,$e=0;8>$e;$e++)Ge|=he[$e][((Ie^se[$e])&Se[$e])>>>0];this._lBlock=Ie,this._rBlock=be^Ge}K=this._lBlock,this._lBlock=this._rBlock,this._rBlock=K,y.call(this,1,1431655765),T.call(this,8,16711935),T.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),ee[oe]=this._lBlock,ee[oe+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});A.DES=z._createHelper(we),U=U.TripleDES=z.extend({_doReset:function(){var ee=this._key.words;this._des1=we.createEncryptor(k.create(ee.slice(0,2))),this._des2=we.createEncryptor(k.create(ee.slice(2,4))),this._des3=we.createEncryptor(k.create(ee.slice(4,6)))},encryptBlock:function(ee,oe){this._des1.encryptBlock(ee,oe),this._des2.decryptBlock(ee,oe),this._des3.encryptBlock(ee,oe)},decryptBlock:function(ee,oe){this._des3.decryptBlock(ee,oe),this._des2.encryptBlock(ee,oe),this._des1.decryptBlock(ee,oe)},keySize:6,ivSize:2,blockSize:2}),A.TripleDES=z._createHelper(U)})(),(function(){var y=n,T=y.lib.WordArray;y.enc.Base64={stringify:function(A){var k=A.words,z=A.sigBytes,U=this._map;A.clamp(),A=[];for(var Y=0;Y<z;Y+=3)for(var Z=(k[Y>>>2]>>>24-8*(Y%4)&255)<<16|(k[Y+1>>>2]>>>24-8*((Y+1)%4)&255)<<8|k[Y+2>>>2]>>>
37624-8*((Y+2)%4)&255,ue=0;4>ue&&Y+.75*ue<z;ue++)A.push(U.charAt(Z>>>6*(3-ue)&63));if(k=U.charAt(64))for(;A.length%4;)A.push(k);return A.join("")},parse:function(A){var k=A.length,z=this._map,U=z.charAt(64);U&&(U=A.indexOf(U),U!=-1&&(k=U));for(var U=[],Y=0,Z=0;Z<k;Z++)if(Z%4){var ue=z.indexOf(A.charAt(Z-1))<<2*(Z%4),he=z.indexOf(A.charAt(Z))>>>6-2*(Z%4);U[Y>>>2]|=(ue|he)<<24-8*(Y%4),Y++}return T.create(U,Y)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),(function(y){function T(we,ee,oe,K,ne,se,be){return we=we+(ee&oe|~ee&K)+ne+be,(we<<se|we>>>32-se)+ee}function A(we,ee,oe,K,ne,se,be){return we=we+(ee&K|oe&~K)+ne+be,(we<<se|we>>>32-se)+ee}function k(we,ee,oe,K,ne,se,be){return we=we+(ee^oe^K)+ne+be,(we<<se|we>>>32-se)+ee}function z(we,ee,oe,K,ne,se,be){return we=we+(oe^(ee|~K))+ne+be,(we<<se|we>>>32-se)+ee}for(var U=n,ue=U.lib,Y=ue.WordArray,Z=ue.Hasher,ue=U.algo,he=[],Se=0;64>Se;Se++)he[Se]=4294967296*y.abs(y.sin(Se+1))|0;ue=ue.MD5=Z.extend({_doReset:function(){this._hash=new Y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(we,ee){for(var oe=0;16>oe;oe++){var K=ee+oe,ne=we[K];we[K]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360}var oe=this._hash.words,K=we[ee+0],ne=we[ee+1],se=we[ee+2],be=we[ee+3],Ie=we[ee+4],Ge=we[ee+5],$e=we[ee+6],je=we[ee+7],zt=we[ee+8],xt=we[ee+9],rt=we[ee+10],ct=we[ee+11],Lt=we[ee+12],er=we[ee+13],Xt=we[ee+14],Pr=we[ee+15],ot=oe[0],Ht=oe[1],It=oe[2],wt=oe[3],ot=T(ot,Ht,It,wt,K,7,he[0]),wt=T(wt,ot,Ht,It,ne,12,he[1]),It=T(It,wt,ot,Ht,se,17,he[2]),Ht=T(Ht,It,wt,ot,be,22,he[3]),ot=T(ot,Ht,It,wt,Ie,7,he[4]),wt=T(wt,ot,Ht,It,Ge,12,he[5]),It=T(It,wt,ot,Ht,$e,17,he[6]),Ht=T(Ht,It,wt,ot,je,22,he[7]),ot=T(ot,Ht,It,wt,zt,7,he[8]),wt=T(wt,ot,Ht,It,xt,12,he[9]),It=T(It,wt,ot,Ht,rt,17,he[10]),Ht=T(Ht,It,wt,ot,ct,22,he[11]),ot=T(ot,Ht,It,wt,Lt,7,he[12]),wt=T(wt,ot,Ht,It,er,12,he[13]),It=T(It,wt,ot,Ht,Xt,17,he[14]),Ht=T(Ht,It,wt,ot,Pr,22,he[15]),ot=A(ot,Ht,It,wt,ne,5,he[16]),wt=A(wt,ot,Ht,It,$e,9,he[17]),It=A(It,wt,ot,Ht,ct,14,he[18]),Ht=A(Ht,It,wt,ot,K,20,he[19]),ot=A(ot,Ht,It,wt,Ge,5,he[20]),wt=A(wt,ot,Ht,It,rt,9,he[21]),It=A(It,wt,ot,Ht,Pr,14,he[22]),Ht=A(Ht,It,wt,ot,Ie,20,he[23]),ot=A(ot,Ht,It,wt,xt,5,he[24]),wt=A(wt,ot,Ht,It,Xt,9,he[25]),It=A(It,wt,ot,Ht,be,14,he[26]),Ht=A(Ht,It,wt,ot,zt,20,he[27]),ot=A(ot,Ht,It,wt,er,5,he[28]),wt=A(wt,ot,Ht,It,se,9,he[29]),It=A(It,wt,ot,Ht,je,14,he[30]),Ht=A(Ht,It,wt,ot,Lt,20,he[31]),ot=k(ot,Ht,It,wt,Ge,4,he[32]),wt=k(wt,ot,Ht,It,zt,11,he[33]),It=k(It,wt,ot,Ht,ct,16,he[34]),Ht=k(Ht,It,wt,ot,Xt,23,he[35]),ot=k(ot,Ht,It,wt,ne,4,he[36]),wt=k(wt,ot,Ht,It,Ie,11,he[37]),It=k(It,wt,ot,Ht,je,16,he[38]),Ht=k(Ht,It,wt,ot,rt,23,he[39]),ot=k(ot,Ht,It,wt,er,4,he[40]),wt=k(wt,ot,Ht,It,K,11,he[41]),It=k(It,wt,ot,Ht,be,16,he[42]),Ht=k(Ht,It,wt,ot,$e,23,he[43]),ot=k(ot,Ht,It,wt,xt,4,he[44]),wt=k(wt,ot,Ht,It,Lt,11,he[45]),It=k(It,wt,ot,Ht,Pr,16,he[46]),Ht=k(Ht,It,wt,ot,
376se,23,he[47]),ot=z(ot,Ht,It,wt,K,6,he[48]),wt=z(wt,ot,Ht,It,je,10,he[49]),It=z(It,wt,ot,Ht,Xt,15,he[50]),Ht=z(Ht,It,wt,ot,Ge,21,he[51]),ot=z(ot,Ht,It,wt,Lt,6,he[52]),wt=z(wt,ot,Ht,It,be,10,he[53]),It=z(It,wt,ot,Ht,rt,15,he[54]),Ht=z(Ht,It,wt,ot,ne,21,he[55]),ot=z(ot,Ht,It,wt,zt,6,he[56]),wt=z(wt,ot,Ht,It,Pr,10,he[57]),It=z(It,wt,ot,Ht,$e,15,he[58]),Ht=z(Ht,It,wt,ot,er,21,he[59]),ot=z(ot,Ht,It,wt,Ie,6,he[60]),wt=z(wt,ot,Ht,It,ct,10,he[61]),It=z(It,wt,ot,Ht,se,15,he[62]),Ht=z(Ht,It,wt,ot,xt,21,he[63]);oe[0]=oe[0]+ot|0,oe[1]=oe[1]+Ht|0,oe[2]=oe[2]+It|0,oe[3]=oe[3]+wt|0},_doFinalize:function(){var we=this._data,ee=we.words,oe=8*this._nDataBytes,K=8*we.sigBytes;ee[K>>>5]|=128<<24-K%32;var ne=y.floor(oe/4294967296);for(ee[(K+64>>>9<<4)+15]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360,ee[(K+64>>>9<<4)+14]=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360,we.sigBytes=4*(ee.length+1),this._process(),we=this._hash,ee=we.words,oe=0;4>oe;oe++)K=ee[oe],ee[oe]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360;return we},clone:function(){var we=Z.clone.call(this);return we._hash=this._hash.clone(),we}}),U.MD5=Z._createHelper(ue),U.HmacMD5=Z._createHmacHelper(ue)})(Math),(function(){var y=n,z=y.lib,T=z.WordArray,A=z.Hasher,k=[],z=y.algo.SHA1=A.extend({_doReset:function(){this._hash=new T.init([
3761732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,Y){for(var Z=this._hash.words,ue=Z[0],he=Z[1],Se=Z[2],we=Z[3],ee=Z[4],oe=0;80>oe;oe++){if(16>oe)k[oe]=U[Y+oe]|0;else{var K=k[oe-3]^k[oe-8]^k[oe-14]^k[oe-16];k[oe]=K<<1|K>>>31}K=(ue<<5|ue>>>27)+ee+k[oe],K=20>oe?K+((he&Se|~he&we)+1518500249):40>oe?K+((he^Se^we)+1859775393):60>oe?K+((he&Se|he&we|Se&we)-1894007588):K+((he^Se^we)-899497514),ee=we,we=Se,Se=he<<30|he>>>2,he=ue,ue=K}Z[0]=Z[0]+ue|0,Z[1]=Z[1]+he|0,Z[2]=Z[2]+Se|0,Z[3]=Z[3]+we|0,Z[4]=Z[4]+ee|0},_doFinalize:function(){var U=this._data,Y=U.words,Z=8*this._nDataBytes,ue=8*U.sigBytes;return Y[ue>>>5]|=128<<24-ue%32,Y[(ue+64>>>9<<4)+14]=Math.floor(Z/4294967296),Y[(ue+64>>>9<<4)+15]=Z,U.sigBytes=4*Y.length,this._process(),this._hash},clone:function(){var U=A.clone.call(this);return U._hash=this._hash.clone(),U}});y.SHA1=A._createHelper(z),y.HmacSHA1=A._createHmacHelper(z)})(),(function(y){for(var T=n,oe=T.lib,A=oe.WordArray,k=oe.Hasher,oe=T.algo,z=[],U=[],Y=function(ne){return 4294967296*(ne-(ne|0))|0},Z=2,ue=0;64>ue;){var he;e:{he=Z;for(var Se=y.sqrt(he),we=2;we<=Se;we++)if(!(he%we)){he=!1;break e}he=!0}he&&(8>ue&&(z[ue]=Y(y.pow(Z,.5))),U[ue]=Y(y.pow(Z,1/3)),ue++),Z++}var ee=[],oe=oe.SHA256=k.extend({_doReset:function(){this._hash=new A.init(z.slice(0))},_doProcessBlock:function(K,ne){for(var se=this._hash.words,be=se[0],Ie=se[1],Ge=se[2],$e=se[3],je=se[4],zt=se[5],xt=se[6],rt=se[7],ct=0;64>ct;ct++){if(16>ct)ee[ct]=K[ne+ct]|0;else{var Lt=ee[ct-15],er=ee[ct-2];ee[ct]=((Lt<<25|Lt>>>7)^(Lt<<14|Lt>>>18)^Lt>>>3)+ee[ct-7]+((er<<15|er>>>17)^(er<<13|er>>>19)^er>>>10)+ee[ct-16]}Lt=rt+((je<<26|je>>>6)^(je<<21|je>>>11)^(je<<7|je>>>25))+(je&zt^~je&xt)+U[ct]+ee[ct],er=((be<<30|be>>>2)^(be<<19|be>>>13)^(be<<10|be>>>22))+(be&Ie^be&Ge^Ie&Ge),rt=xt,xt=zt,zt=je,je=$e+Lt|0,$e=Ge,Ge=Ie,Ie=be,be=Lt+er|0}se[0]=se[0]+be|0,se[1]=se[1]+Ie|0,se[2]=se[2]+Ge|0,se[3]=se[3]+$e|0,se[4]=se[4]+je|0,se[5]=se[5]+zt|0,se[6]=se[6]+xt|0,se[7]=se[7]+rt|0},_doFinalize:function(){var K=this._data,ne=K.words,se=8*this._nDataBytes,be=8*K.sigBytes;return ne[be>>>5]|=128<<24-be%32,ne[(be+64>>>9<<4)+14]=y.floor(se/4294967296),ne[(be+64>>>9<<4)+15]=se,K.sigBytes=4*ne.length,this._process(),this._hash},clone:function(){var K=k.clone.call(this);return K._hash=this._hash.clone(),K}});T.SHA256=k._createHelper(oe),T.HmacSHA256=k._createHmacHelper(oe)})(Math),(function(){var y=n,T=y.lib.WordArray,k=y.algo,A=k.SHA256,k=k.SHA224=A.extend({_doReset:function(){this._hash=new T.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var z=A._doFinalize.call(this);return z.sigBytes-=4,z}});y.SHA224=A._createHelper(k),y.HmacSHA224=A._createHmacHelper(k)})(),(function(){function y(){return k.create.apply(k,arguments)}for(var T=n,A=T.lib.Hasher,U=T.x64,k=U.Word,z=U.WordArray,U=T.algo,Y=[y(1116352408,3609767458),y(1899447441,602891725),y(3049323471,3964484399),y(3921009573,2173295548),y(961987163,4081628472),y(1508970993,3053834265),y(2453635748,2937671579),y(2870763221,3664609560),y(3624381080,2734883394),y(310598401,1164996542),y(607225278,1323610764),y(1426881987,3590304994),y(1925078388,4068182383),y(2162078206,991336113),y(2614888103,633803317),y(3248222580,3479774868),y(3835390401,2666613458),y(4022224774,944711139),y(264347078,2341262773),y(604807628,2007800933),y(770255983,1495990901),y(1249150122,1856431235),y(1555081692,3175218132),y(1996064986,2198950837),y(2554220882,3999719339),y(2821834349,766784016),y(2952996808,2566594879),y(3210313671,3203337956),y(3336571891,1034457026),y(3584528711,2466948901),y(113926993,3758326383),y(338241895,168717936),y(666307205,1188179964),y(773529912,1546045734),y(1294757372,1522805485),y(1396182291,2643833823),y(1695183700,2343527390),y(1986661051,1014477480),y(2177026350,1206759142),y(2456956037,344077627),y(2730485921,1290863460),y(2820302411,3158454273),y(3259730800,3505952657),y(3345764771,106217008),y(3516065817,3606008344),y(3600352804,1432725776),y(4094571909,1467031594),y(275423344,851169720),y(430227734,3100823752),y(506948616,1363258195),y(659060556,3750685593),y(883997877,3785050280),y(958139571,3318307427),y(1322822218,3812723403),y(1537002063,2003034995),y(1747873779,3602036899),y(1955562222,1575990012),y(2024104815,1125592928),y(2227730452,2716904306),y(2361852424,442776044),y(2428436474,593698344),y(2756734187,3733110249),y(3204031479,2999351573),y(3329325298,3815920427),y(3391569614,3928383900),y(3515267271,566280711),y(3940187606,3454069534),y(4118630271,4000239992),y(116418474,1914138554),y(174292421,2731055270),y(289380356,3203993006),y(460393269,320620315),y(685471733,587496836),y(852142971,1086792851),y(1017036298,365543100),y(1126000580,2618297676),y(1288033470,3409855158),y(1501505948,4234509866),y(1607167915,987167468),y(1816402316,1246189591)],Z=[],ue=0;80>ue;ue++)Z[ue]=y();U=U.SHA512=A.extend({_doReset:function(){this._hash=new z.init([new k.init(1779033703,4089235720),new k.init(3144134277,2227873595),new k.init(1013904242,4271175723),new k.init(2773480762,1595750129),new k.init(1359893119,2917565137),new k.init(2600822924,725511199),new k.init(528734635,4215389547),new k.init(1541459225,327033209)])},_doProcessBlock:function(he,Se){for(var Ie=this._hash.words,we=Ie[0],ee=Ie[1],oe=Ie[2],K=Ie[3],ne=Ie[4],se=Ie[5],be=Ie[6],Ie=Ie[7],Ge=we.high,$e=we.low,je=ee.high,zt=ee.low,xt=oe.high,rt=oe.low,ct=K.high,Lt=K.low,er=ne.high,Xt=ne.low,Pr=se.high,ot=se.low,wt=be.high,It=be.low,Ht=Ie.high,Ha=Ie.low,hi=Ge,ki=$e,Ji=je,Oa=zt,Ua=xt,ea=rt,Qm=ct,m=Lt,C=er,D=Xt,j=Pr,J=ot,_e=wt,He=It,lt=Ht,_t=Ha,kt=0;80>kt;kt++){var ha=Z[kt];if(16>kt)var dr=ha.high=he[Se+2*kt]|0,Dn=ha.low=he[Se+2*kt+1]|0;else{var dr=Z[kt-15],Dn=dr.high,Wr=dr.low,dr=(Dn>>>1|Wr<<31)^(Dn>>>8|Wr<<24)^Dn>>>7,Wr=(Wr>>>1|Dn<<31)^(Wr>>>8|Dn<<24)^(Wr>>>7|Dn<<25),Sn=Z[kt-2],Dn=Sn.high,Cn=Sn.low,Sn=(Dn>>>19|Cn<<13)^(Dn<<3|Cn>>>29)^Dn>>>6,Cn=(Cn>>>19|Dn<<13)^(Cn<<3|Dn>>>29)^(Cn>>>6|Dn<<26),Dn=Z[kt-7],Vr=Dn.high,Qr=Z[kt-16],xo=Qr.high,Qr=Qr.low,Dn=Wr+Dn.low,dr=dr+Vr+(Dn>>>0<Wr>>>0?1:0),Dn=Dn+Cn,dr=dr+Sn+(Dn>>>0<Cn>>>0?1:0),Dn=Dn+Qr,dr=dr+xo+(Dn>>>0<Qr>>>0?1:0);ha.high=dr,ha.low=Dn}
376var Vr=C&j^~C&_e,Qr=D&J^~D&He,ha=hi&Ji^hi&Ua^Ji&Ua,Ia=ki&Oa^ki&ea^Oa&ea,Wr=(hi>>>28|ki<<4)^(hi<<30|ki>>>2)^(hi<<25|ki>>>7),Sn=(ki>>>28|hi<<4)^(ki<<30|hi>>>2)^(ki<<25|hi>>>7),Cn=Y[kt],ba=Cn.high,fa=Cn.low,Cn=_t+((D>>>14|C<<18)^(D>>>18|C<<14)^(D<<23|C>>>9)),xo=lt+((C>>>14|D<<18)^(C>>>18|D<<14)^(C<<23|D>>>9))+(Cn>>>0<_t>>>0?1:0),Cn=Cn+Qr,xo=xo+Vr+(Cn>>>0<Qr>>>0?1:0),Cn=Cn+fa,xo=xo+ba+(Cn>>>0<fa>>>0?1:0),Cn=Cn+Dn,xo=xo+dr+(Cn>>>0<Dn>>>0?1:0),Dn=Sn+Ia,ha=Wr+ha+(Dn>>>0<Sn>>>0?1:0),lt=_e,_t=He,_e=j,He=J,j=C,J=D,D=m+Cn|0,C=Qm+xo+(D>>>0<m>>>0?1:0)|0,Qm=Ua,m=ea,Ua=Ji,ea=Oa,Ji=hi,Oa=ki,ki=Cn+Dn|0,hi=xo+ha+(ki>>>0<Cn>>>0?1:0)|0}$e=we.low=$e+ki,we.high=Ge+hi+($e>>>0<ki>>>0?1:0),zt=ee.low=zt+Oa,ee.high=je+Ji+(zt>>>0<Oa>>>0?1:0),rt=oe.low=rt+ea,oe.high=xt+Ua+(rt>>>0<ea>>>0?1:0),Lt=K.low=Lt+m,K.high=ct+Qm+(Lt>>>0<m>>>0?1:0),Xt=ne.low=Xt+D,ne.high=er+C+(Xt>>>0<D>>>0?1:0),ot=se.low=ot+J,se.high=Pr+j+(ot>>>0<J>>>0?1:0),It=be.low=It+He,be.high=wt+_e+(It>>>0<He>>>0?1:0),Ha=Ie.low=Ha+_t,Ie.high=Ht+lt+(Ha>>>0<_t>>>0?1:0)},_doFinalize:function(){var he=this._data,Se=he.words,we=8*this._nDataBytes,ee=8*he.sigBytes;return Se[ee>>>5]|=128<<24-ee%32,Se[(ee+128>>>10<<5)+30]=Math.floor(we/4294967296),Se[(ee+128>>>10<<5)+31]=we,he.sigBytes=4*Se.length,this._process(),this._hash.toX32()},clone:function(){var he=A.clone.call(this);return he._hash=this._hash.clone(),he},blockSize:32}),T.SHA512=A._createHelper(U),T.HmacSHA512=A._createHmacHelper(U)})(),(function(){var y=n,z=y.x64,T=z.Word,A=z.WordArray,z=y.algo,k=z.SHA512,z=z.SHA384=k.extend({_doReset:function(){this._hash=new A.init([new T.init(3418070365,3238371032),new T.init(1654270250,914150663),new T.init(2438529370,812702999),new T.init(355462360,4144912697),new T.init(1731405415,4290775857),new T.init(2394180231,1750603025),new T.init(3675008525,1694076839),new T.init(1203062813,3204075428)])},_doFinalize:function(){var U=k._doFinalize.call(this);return U.sigBytes-=16,U}});y.SHA384=k._createHelper(z),y.HmacSHA384=k._createHmacHelper(z)})(),(function(){var y=n,he=y.lib,T=he.WordArray,A=he.Hasher,he=y.algo,k=T.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),z=T.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),U=T.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),Y=T.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Z=T.create([0,1518500249,1859775393,2400959708,2840853838]),ue=T.create([1352829926,1548603684,1836072691,2053994217,0]),he=he.RIPEMD160=A.extend({_doReset:function(){this._hash=T.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Se,we){for(var ee=0;16>ee;ee++){var oe=we+ee,K=Se[oe];Se[oe]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360}var oe=this._hash.words,K=Z.words,ne=ue.words,se=k.words,be=z.words,Ie=U.words,Ge=Y.words,$e,je,zt,xt,rt,ct,Lt,er,Xt,Pr;ct=$e=oe[0],Lt=je=oe[1],er=zt=oe[2],Xt=xt=oe[3],Pr=rt=oe[4];for(var ot,ee=0;80>ee;ee+=1)ot=$e+Se[we+se[ee]]|0,ot=16>ee?ot+((je^zt^xt)+K[0]):32>ee?ot+((je&zt|~je&xt)+K[1]):48>ee?ot+(((je|~zt)^xt)+K[2]):64>ee?ot+((je&xt|zt&~xt)+K[3]):ot+((je^(zt|~xt))+K[4]),ot|=0,ot=ot<<Ie[ee]|ot>>>32-Ie[ee],ot=ot+rt|0,$e=rt,rt=xt,xt=zt<<10|zt>>>22,zt=je,je=ot,ot=ct+Se[we+be[ee]]|0,ot=16>ee?ot+((Lt^(er|~Xt))+ne[0]):32>ee?ot+((Lt&Xt|er&~Xt)+ne[1]):48>ee?ot+(((Lt|~er)^Xt)+ne[2]):64>ee?ot+((Lt&er|~Lt&Xt)+ne[3]):ot+((Lt^er^Xt)+ne[4]),ot|=0,ot=ot<<Ge[ee]|ot>>>32-Ge[ee],ot=ot+Pr|0,ct=Pr,Pr=Xt,Xt=er<<10|er>>>22,er=Lt,Lt=ot;ot=oe[1]+zt+Xt|0,oe[1]=oe[2]+xt+Pr|0,oe[2]=oe[3]+rt+ct|0,oe[3]=oe[4]+$e+Lt|0,oe[4]=oe[0]+je+er|0,oe[0]=ot},_doFinalize:function(){var Se=this._data,we=Se.words,ee=8*this._nDataBytes,oe=8*Se.sigBytes;for(we[oe>>>5]|=128<<24-oe%32,we[(oe+64>>>9<<4)+14]=(ee<<8|ee>>>24)&16711935|(ee<<24|ee>>>8)&4278255360,Se.sigBytes=4*(we.length+1),this._process(),Se=this._hash,we=Se.words,ee=0;5>ee;
376ee++)oe=we[ee],we[ee]=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360;return Se},clone:function(){var Se=A.clone.call(this);return Se._hash=this._hash.clone(),Se}});y.RIPEMD160=A._createHelper(he),y.HmacRIPEMD160=A._createHmacHelper(he)})(),(function(){var y=n,T=y.enc.Utf8;y.algo.HMAC=y.lib.Base.extend({init:function(A,k){A=this._hasher=new A.init,typeof k=="string"&&(k=T.parse(k));var z=A.blockSize,U=4*z;k.sigBytes>U&&(k=A.finalize(k)),k.clamp();for(var Y=this._oKey=k.clone(),Z=this._iKey=k.clone(),ue=Y.words,he=Z.words,Se=0;Se<z;Se++)ue[Se]^=1549556828,he[Se]^=909522486;Y.sigBytes=Z.sigBytes=U,this.reset()},reset:function(){var A=this._hasher;A.reset(),A.update(this._iKey)},update:function(A){return this._hasher.update(A),this},finalize:function(A){var k=this._hasher;return A=k.finalize(A),k.reset(),k.finalize(this._oKey.clone().concat(A))}})})(),(function(){var y=n,k=y.lib,T=k.Base,A=k.WordArray,k=y.algo,z=k.HMAC,U=k.PBKDF2=T.extend({cfg:T.extend({keySize:4,hasher:k.SHA1,iterations:1}),init:function(Y){this.cfg=this.cfg.extend(Y)},compute:function(Y,Z){for(var K=this.cfg,ue=z.create(K.hasher,Y),he=A.create(),Se=A.create([1]),we=he.words,ee=Se.words,oe=K.keySize,K=K.iterations;we.length<oe;){var ne=ue.update(Z).finalize(Se);ue.reset();for(var se=ne.words,be=se.length,Ie=ne,Ge=1;Ge<K;Ge++){Ie=ue.finalize(Ie),ue.reset();for(var $e=Ie.words,je=0;je<be;je++)se[je]^=$e[je]}he.concat(ne),ee[0]++}return he.sigBytes=4*oe,he}});y.PBKDF2=function(Y,Z,ue){return U.create(ue).compute(Y,Z)}})();var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a="=";function o(y){var T,A,k="";for(T=0;T+3<=y.length;T+=3)A=parseInt(y.substring(T,T+3),16),k+=i.charAt(A>>6)+i.charAt(A&63);for(T+1==y.length?(A=parseInt(y.substring(T,T+1),16),k+=i.charAt(A<<2)):T+2==y.length&&(A=parseInt(y.substring(T,T+2),16),k+=i.charAt(A>>2)+i.charAt((A&3)<<4));(k.length&3)>0;)k+=a;return k}function s(y){var T="",A,k=0,z,U;for(A=0;A<y.length&&y.charAt(A)!=a;++A)U=i.indexOf(y.charAt(A)),!(U<0)&&(k==0?(T+=O(U>>2),z=U&3,k=1):k==1?(T+=O(z<<2|U>>4),z=U&15,k=2):k==2?(T+=O(z),T+=O(U>>2),z=U&3,k=3):(T+=O(z<<2|U>>4),T+=O(U&15),k=0));return k==1&&(T+=O(z<<2)),T}function l(y){var T=s(y),A,k=new Array;for(A=0;2*A<T.length;++A)k[A]=parseInt(T.substring(2*A,2*A+2),16);return k}var c;function d(y,T,A){y!=null&&(typeof y=="number"?this.fromNumber(y,T,A):T==null&&typeof y!="string"?this.fromString(y,256):this.fromString(y,T))}function f(){return new d(null)}function h(y,T,A,k,z,U){for(;--U>=0;){var Y=T*this[y++]+A[k]+z;z=Math.floor(Y/67108864),A[k++]=Y&67108863}return z}function p(y,T,A,k,z,U){for(var Y=T&32767,Z=T>>15;--U>=0;){var ue=this[y]&32767,he=this[y++]>>15,Se=Z*ue+he*Y;ue=Y*ue+((Se&32767)<<15)+A[k]+(z&1073741823),z=(ue>>>30)+(Se>>>15)+Z*he+(z>>>30),A[k++]=ue&1073741823}return z}function g(y,T,A,k,z,U){for(var Y=T&16383,Z=T>>14;--U>=0;){var ue=this[y]&16383,he=this[y++]>>14,Se=Z*ue+he*Y;ue=Y*ue+((Se&16383)<<14)+A[k]+z,z=(ue>>28)+(Se>>14)+Z*he,A[k++]=ue&268435455}return z}e.appName=="Microsoft Internet Explorer"?(d.prototype.am=p,c=30):e.appName!="Netscape"?(d.prototype.am=h,c=26):(d.prototype.am=g,c=28),d.prototype.DB=c,d.prototype.DM=(1<<c)-1,d.prototype.DV=1<<c;var _=52;d.prototype.FV=Math.pow(2,_),d.prototype.F1=_-c,d.prototype.F2=2*c-_;var b="0123456789abcdefghijklmnopqrstuvwxyz",E=new Array,S,P;for(S=48,P=0;P<=9;++P)E[S++]=P;for(S=97,P=10;P<36;++P)E[S++]=P;for(S=65,P=10;P<36;++P)E[S++]=P;function O(y){return b.charAt(y)}function I(y,T){var A=E[y.charCodeAt(T)];return A??-1}function N(y){for(var T=this.t-1;T>=0;--T)y[T]=this[T];y.t=this.t,y.s=this.s}function M(y){this.t=1,this.s=y<0?-1:0,y>0?this[0]=y:y<-1?this[0]=y+this.DV:this.t=0}function F(y){var T=f();return T.fromInt(y),T}function B(y,T){var A;if(T==16)A=4;else if(T==8)A=3;else if(T==256)A=8;else if(T==2)A=1;else if(T==32)A=5;else if(T==4)A=2;else{this.fromRadix(y,T);return}this.t=0,this.s=0;for(var k=y.length,z=!1,U=0;--k>=0;){var Y=A==8?y[k]&255:I(y,k);if(Y<0){y.charAt(k)=="-"&&(z=!0);continue}z=!1,U==0?this[this.t++]=Y:U+A>this.DB?(this[this.t-1]|=(Y&(1<<this.DB-U)-1)<<U,this[this.t++]=Y>>this.DB-U):this[this.t-1]|=Y<<U,U+=A,U>=this.DB&&(U-=this.DB)}A==8&&(y[0]&128)!=0&&(this.s=-1,U>0&&(this[this.t-1]|=(1<<this.DB-U)-1<<U)),this.clamp(),z&&d.ZERO.subTo(this,this)}function V(){for(var y=this.s&this.DM;this.t>0&&this[this.t-1]==y;)--this.t}function W(y){if(this.s<0)return"-"+this.negate().toString(y);var T;if(y==16)T=4;else if(y==8)T=3;else if(y==2)T=1;else if(y==32)T=5;else if(y==4)T=2;else return this.toRadix(y);var A=(1<<T)-1,k,z=!1,U="",Y=this.t,Z=this.DB-Y*this.DB%T;if(Y-- >0)for(Z<this.DB&&(k=this[Y]>>Z)>0&&(z=!0,U=O(k));Y>=0;)Z<T?(k=(this[Y]&(1<<Z)-1)<<T-Z,k|=this[--Y]>>(Z+=this.DB-T)):(k=this[Y]>>(Z-=T)&A,Z<=0&&(Z+=this.DB,--Y)),k>0&&(z=!0),z&&(U+=O(k));return z?U:"0"}function $(){var y=f();return d.ZERO.subTo(this,y),y}function X(){return this.s<0?this.negate():this}function re(y){var T=this.s-y.s;if(T!=0)return T;var A=this.t;if(T=A-y.t,T!=0)return this.s<0?-T:T;for(;--A>=0;)if((T=this[A]-y[A])!=0)return T;return 0}function ae(y){var T=1,A;return(A=y>>>16)!=0&&(y=A,T+=16),(A=y>>8)!=0&&(y=A,T+=8),(A=y>>4)!=0&&(y=A,T+=4),(A=y>>2)!=0&&(y=A,T+=2),(A=y>>1)!=0&&(y=A,T+=1),T}function Q(){return this.t<=0?0:this.DB*(this.t-1)+ae(this[this.t-1]^this.s&this.DM)}function ie(y,T){var A;for(A=this.t-1;A>=0;--A)T[A+y]=this[A];for(A=y-1;A>=0;--A)T[A]=0;T.t=this.t+y,T.s=this.s}function le(y,T){for(var A=y;A<this.t;++A)T[A-y]=this[A];T.t=Math.max(this.t-y,0),T.s=this.s}function fe(y,T){var A=y%this.DB,k=this.DB-A,z=(1<<k)-1,U=Math.floor(y/this.DB),Y=this.s<<A&this.DM,Z;for(Z=this.t-1;Z>=0;--Z)T[Z+U+1]=this[Z]>>k|Y,Y=(this[Z]&z)<<A;for(Z=U-1;Z>=0;--Z)T[Z]=0;T[U]=Y,T.t=this.t+U+1,T.s=this.s,T.clamp()}function de(y,T){T.s=this.s;var A=Math.floor(y/this.DB);if(A>=this.t){T.t=0;return}var k=y%this.DB,z=this.DB-k,U=(1<<k)-1;T[0]=this[A]>>k;for(var Y=A+1;Y<this.t;++Y)T[Y-A-1]|=(this[Y]&U)<<z,T[Y-A]=this[Y]>>k;k>0&&(T[this.t-A-1]|=(this.s&U)<<z),T.t=this.t-A,T.clamp()}function ge(y,T){for(var A=0,k=0,z=Math.min(y.t,this.t);A<z;)k+=this[A]-y[A],T[A++]=k&this.DM,k>>=this.DB;if(y.t<this.t){for(k-=y.s;A<this.t;)k+=this[A],T[A++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;A<y.t;)k-=y[A],T[A++]=k&this.DM,k>>=this.DB;k-=y.s}T.s=k<0?-1:0,k<-1?T[A++]=this.DV+k:k>0&&(T[A++]=k),T.t=A,T.clamp()}function Ae(y,T){var A=this.abs(),k=y.abs(),z=A.t;for(T.t=z+k.t;--z>=0;)T[z]=0;for(z=0;z<k.t;++z)T[z+A.t]=A.am(0,k[z],T,z,0,A.t);T.s=0,T.clamp(),this.s!=y.s&&d.ZERO.subTo(T,T)}function Fe(y){for(var T=this.abs(),A=y.t=2*T.t;--A>=0;)y[A]=0;for(A=0;A<T.t-1;++A){var k=T.am(A,T[A],y,2*A,0,1);(y[A+T.t]+=T.am(A+1,2*T[A],y,2*A+1,k,T.t-A-1))>=T.DV&&(y[A+T.t]-=T.DV,y[A+T.t+1]=1)}y.t>0&&(y[y.t-1]+=T.am(A,T[A],y,2*A,0,1)),y.s=0,y.clamp()}function Pe(y,T,A){var k=y.abs();if(!(k.t<=0)){var z=this.abs();if(z.t<k.t){T?.fromInt(0),A!=null&&this.copyTo(A);return}A==null&&(A=f());var U=f(),Y=this.s,Z=y.s,ue=this.DB-ae(k[k.t-1]);ue>0?(k.lShiftTo(ue,U),z.lShiftTo(ue,A)):(k.copyTo(U),z.copyTo(A));var he=U.t,Se=U[he-1];if(Se!=0){var we=Se*(1<<this.F1)+(he>1?U[he-2]>>
376this.F2:0),ee=this.FV/we,oe=(1<<this.F1)/we,K=1<<this.F2,ne=A.t,se=ne-he,be=T??f();for(U.dlShiftTo(se,be),A.compareTo(be)>=0&&(A[A.t++]=1,A.subTo(be,A)),d.ONE.dlShiftTo(he,be),be.subTo(U,U);U.t<he;)U[U.t++]=0;for(;--se>=0;){var Ie=A[--ne]==Se?this.DM:Math.floor(A[ne]*ee+(A[ne-1]+K)*oe);if((A[ne]+=U.am(0,Ie,A,se,0,he))<Ie)for(U.dlShiftTo(se,be),A.subTo(be,A);A[ne]<--Ie;)A.subTo(be,A)}T!=null&&(A.drShiftTo(he,T),Y!=Z&&d.ZERO.subTo(T,T)),A.t=he,A.clamp(),ue>0&&A.rShiftTo(ue,A),Y<0&&d.ZERO.subTo(A,A)}}}function ce(y){var T=f();return this.abs().divRemTo(y,null,T),this.s<0&&T.compareTo(d.ZERO)>0&&y.subTo(T,T),T}function pe(y){this.m=y}function Ne(y){return y.s<0||y.compareTo(this.m)>=0?y.mod(this.m):y}function De(y){return y}function Ve(y){y.divRemTo(this.m,null,y)}function Ke(y,T,A){y.multiplyTo(T,A),this.reduce(A)}function Qe(y,T){y.squareTo(T),this.reduce(T)}pe.prototype.convert=Ne,pe.prototype.revert=De,pe.prototype.reduce=Ve,pe.prototype.mulTo=Ke,pe.prototype.sqrTo=Qe;function Ue(){if(this.t<1)return 0;var y=this[0];if((y&1)==0)return 0;var T=y&3;return T=T*(2-(y&15)*T)&15,T=T*(2-(y&255)*T)&255,T=T*(2-((y&65535)*T&65535))&65535,T=T*(2-y*T%this.DV)%this.DV,T>0?this.DV-T:-T}function ut(y){this.m=y,this.mp=y.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<y.DB-15)-1,this.mt2=2*y.t}function We(y){var T=f();return y.abs().dlShiftTo(this.m.t,T),T.divRemTo(this.m,null,T),y.s<0&&T.compareTo(d.ZERO)>0&&this.m.subTo(T,T),T}function ke(y){var T=f();return y.copyTo(T),this.reduce(T),T}function Le(y){for(;y.t<=this.mt2;)y[y.t++]=0;for(var T=0;T<this.m.t;++T){var A=y[T]&32767,k=A*this.mpl+((A*this.mph+(y[T]>>15)*this.mpl&this.um)<<15)&y.DM;for(A=T+this.m.t,y[A]+=this.m.am(0,k,y,T,0,this.m.t);y[A]>=y.DV;)y[A]-=y.DV,y[++A]++}y.clamp(),y.drShiftTo(this.m.t,y),y.compareTo(this.m)>=0&&y.subTo(this.m,y)}function Be(y,T){y.squareTo(T),this.reduce(T)}function Ze(y,T,A){y.multiplyTo(T,A),this.reduce(A)}ut.prototype.convert=We,ut.prototype.revert=ke,ut.prototype.reduce=Le,ut.prototype.mulTo=Ze,ut.prototype.sqrTo=Be;function Et(){return(this.t>0?this[0]&1:this.s)==0}function Yt(y,T){if(y>4294967295||y<1)return d.ONE;var A=f(),k=f(),z=T.convert(this),U=ae(y)-1;for(z.copyTo(A);--U>=0;)if(T.sqrTo(A,k),(y&1<<U)>0)T.mulTo(k,z,A);else{var Y=A;A=k,k=Y}return T.revert(A)}function sr(y,T){var A;return y<256||T.isEven()?A=new pe(T):A=new ut(T),this.exp(y,A)}d.prototype.copyTo=N,d.prototype.fromInt=M,d.prototype.fromString=B,d.prototype.clamp=V,d.prototype.dlShiftTo=ie,d.prototype.drShiftTo=le,d.prototype.lShiftTo=fe,d.prototype.rShiftTo=de,d.prototype.subTo=ge,d.prototype.multiplyTo=Ae,d.prototype.squareTo=Fe,d.prototype.divRemTo=Pe,d.prototype.invDigit=Ue,d.prototype.isEven=Et,d.prototype.exp=Yt,d.prototype.toString=W,d.prototype.negate=$,d.prototype.abs=X,d.prototype.compareTo=re,d.prototype.bitLength=Q,d.prototype.mod=ce,d.prototype.modPowInt=sr,d.ZERO=F(0),d.ONE=F(1);function Kt(){var y=f();return this.copyTo(y),y}function Qt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function qt(){return this.t==0?this.s:this[0]<<24>>24}function hr(){return this.t==0?this.s:this[0]<<16>>16}function rr(y){return Math.floor(Math.LN2*this.DB/Math.log(y))}function tr(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function dt(y){if(y==null&&(y=10),this.signum()==0||y<2||y>36)return"0";var T=this.chunkSize(y),A=Math.pow(y,T),k=F(A),z=f(),U=f(),Y="";for(this.divRemTo(k,z,U);z.signum()>0;)Y=(A+U.intValue()).toString(y).substr(1)+Y,z.divRemTo(k,z,U);return U.intValue().toString(y)+Y}function bt(y,T){this.fromInt(0),T==null&&(T=10);for(var A=this.chunkSize(T),k=Math.pow(T,A),z=!1,U=0,Y=0,Z=0;Z<y.length;++Z){var ue=I(y,Z);if(ue<0){y.charAt(Z)=="-"&&this.signum()==0&&(z=!0);continue}Y=T*Y+ue,++U>=A&&(this.dMultiply(k),this.dAddOffset(Y,0),U=0,Y=0)}U>0&&(this.dMultiply(Math.pow(T,U)),this.dAddOffset(Y,0)),z&&d.ZERO.subTo(this,this)}function nr(y,T,A){if(typeof T=="number")if(y<2)this.fromInt(1);else for(this.fromNumber(y,A),this.testBit(y-1)||this.bitwiseTo(d.ONE.shiftLeft(y-1),it,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(T);)this.dAddOffset(2,0),this.bitLength()>y&&this.subTo(d.ONE.shiftLeft(y-1),this);else{var k=new Array,z=y&7;k.length=(y>>3)+1,T.nextBytes(k),z>0?k[0]&=(1<<z)-1:k[0]=0,this.fromString(k,256)}}function Ee(){var y=this.t,T=new Array;T[0]=this.s;var A=this.DB-y*this.DB%8,k,z=0;if(y-- >0)for(A<this.DB&&(k=this[y]>>A)!=(this.s&this.DM)>>A&&(T[z++]=k|this.s<<this.DB-A);y>=0;)A<8?(k=(this[y]&(1<<A)-1)<<8-A,k|=this[--y]>>(A+=this.DB-8)):(k=this[y]>>(A-=8)&255,A<=0&&(A+=this.DB,--y)),(k&128)!=0&&(k|=-256),z==0&&(this.s&128)!=(k&128)&&++z,(z>0||k!=this.s)&&(T[z++]=k);return T}function Oe(y){return this.compareTo(y)==0}function Re(y){return this.compareTo(y)<0?this:y}function pt(y){return this.compareTo(y)>0?this:y}function mt(y,T,A){var k,z,U=Math.min(y.t,this.t);for(k=0;k<U;++k)A[k]=T(this[k],y[k]);if(y.t<this.t){for(z=y.s&this.DM,k=U;k<this.t;++k)A[k]=T(this[k],z);A.t=this.t}else{for(z=this.s&this.DM,k=U;k<y.t;++k)A[k]=T(z,y[k]);A.t=y.t}A.s=T(this.s,y.s),A.clamp()}function st(y,T){return y&T}function ze(y){var T=f();return this.bitwiseTo(y,st,T),T}function it(y,T){return y|T}function Je(y){var T=f();return this.bitwiseTo(y,it,T),T}function Jt(y,T){return y^T}function pr(y){var T=f();return this.bitwiseTo(y,Jt,T),T}function Fr(y,T){return y&~T}function Or(y){var T=f();return this.bitwiseTo(y,Fr,T),T}
376function vn(){for(var y=f(),T=0;T<this.t;++T)y[T]=this.DM&~this[T];return y.t=this.t,y.s=~this.s,y}function cn(y){var T=f();return y<0?this.rShiftTo(-y,T):this.lShiftTo(y,T),T}function Xr(y){var T=f();return y<0?this.lShiftTo(-y,T):this.rShiftTo(y,T),T}function Zr(y){if(y==0)return-1;var T=0;return(y&65535)==0&&(y>>=16,T+=16),(y&255)==0&&(y>>=8,T+=8),(y&15)==0&&(y>>=4,T+=4),(y&3)==0&&(y>>=2,T+=2),(y&1)==0&&++T,T}function fn(){for(var y=0;y<this.t;++y)if(this[y]!=0)return y*this.DB+Zr(this[y]);return this.s<0?this.t*this.DB:-1}function vs(y){for(var T=0;y!=0;)y&=y-1,++T;return T}function Ar(){for(var y=0,T=this.s&this.DM,A=0;A<this.t;++A)y+=vs(this[A]^T);return y}function Ir(y){var T=Math.floor(y/this.DB);return T>=this.t?this.s!=0:(this[T]&1<<y%this.DB)!=0}function Ln(y,T){var A=d.ONE.shiftLeft(y);return this.bitwiseTo(A,T,A),A}function Wn(y){return this.changeBit(y,it)}function wr(y){return this.changeBit(y,Fr)}function jt(y){return this.changeBit(y,Jt)}function gn(y,T){for(var A=0,k=0,z=Math.min(y.t,this.t);A<z;)k+=this[A]+y[A],T[A++]=k&this.DM,k>>=this.DB;if(y.t<this.t){for(k+=y.s;A<this.t;)k+=this[A],T[A++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;A<y.t;)k+=y[A],T[A++]=k&this.DM,k>>=this.DB;k+=y.s}T.s=k<0?-1:0,k>0?T[A++]=k:k<-1&&(T[A++]=this.DV+k),T.t=A,T.clamp()}function Xa(y){var T=f();return this.addTo(y,T),T}function la(y){var T=f();return this.subTo(y,T),T}function si(y){var T=f();return this.multiplyTo(y,T),T}function Ho(){var y=f();return this.squareTo(y),y}function gs(y){var T=f();return this.divRemTo(y,T,null),T}function ga(y){var T=f();return this.divRemTo(y,null,T),T}function ya(y){var T=f(),A=f();return this.divRemTo(y,T,A),new Array(T,A)}function Ui(y){this[this.t]=this.am(0,y-1,this,0,0,this.t),++this.t,this.clamp()}function rs(y,T){if(y!=0){for(;this.t<=T;)this[this.t++]=0;for(this[T]+=y;this[T]>=this.DV;)this[T]-=this.DV,++T>=this.t&&(this[this.t++]=0),++this[T]}}function Za(){}function Io(y){return y}function hl(y,T,A){y.multiplyTo(T,A)}function pl(y,T){y.squareTo(T)}Za.prototype.convert=Io,Za.prototype.revert=Io,Za.prototype.mulTo=hl,Za.prototype.sqrTo=pl;function Hl(y){return this.exp(y,new Za)}function Ul(y,T,A){var k=Math.min(this.t+y.t,T);for(A.s=0,A.t=k;k>0;)A[--k]=0;var z;for(z=A.t-this.t;k<z;++k)A[k+this.t]=this.am(0,y[k],A,k,0,this.t);for(z=Math.min(y.t,T);k<z;++k)this.am(0,y[k],A,k,0,T-k);A.clamp()}function qu(y,T,A){--T;var k=A.t=this.t+y.t-T;for(A.s=0;--k>=0;)A[k]=0;for(k=Math.max(T-this.t,0);k<y.t;++k)A[this.t+k-T]=this.am(T-k,y[k],A,0,0,this.t+k-T);A.clamp(),A.drShiftTo(1,A)}function wo(y){this.r2=f(),this.q3=f(),d.ONE.dlShiftTo(2*y.t,this.r2),this.mu=this.r2.divide(y),this.m=y}function Uo(y){if(y.s<0||y.t>2*this.m.t)return y.mod(this.m);if(y.compareTo(this.m)<0)return y;var T=f();return y.copyTo(T),this.reduce(T),T}function ju(y){return y}function Vl(y){for(y.drShiftTo(this.m.t-1,this.r2),y.t>this.m.t+1&&(y.t=this.m.t+1,y.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);y.compareTo(this.r2)<0;)y.dAddOffset(1,this.m.t+1);for(y.subTo(this.r2,y);y.compareTo(this.m)>=0;)y.subTo(this.m,y)}function ql(y,T){y.squareTo(T),this.reduce(T)}function _c(y,T,A){y.multiplyTo(T,A),this.reduce(A)}wo.prototype.convert=Uo,wo.prototype.revert=ju,wo.prototype.reduce=Vl,wo.prototype.mulTo=_c,wo.prototype.sqrTo=ql;function js(y,T){var A=y.bitLength(),k,z=F(1),U;if(A<=0)return z;A<18?k=1:A<48?k=3:A<144?k=4:A<768?k=5:k=6,A<8?U=new pe(T):T.isEven()?U=new wo(T):U=new ut(T);var Y=new Array,Z=3,ue=k-1,he=(1<<k)-1;if(Y[1]=U.convert(this),k>1){var Se=f();for(U.sqrTo(Y[1],Se);Z<=he;)Y[Z]=f(),U.mulTo(Se,Y[Z-2],Y[Z]),Z+=2}var we=y.t-1,ee,oe=!0,K=f(),ne;for(A=ae(y[we])-1;we>=0;){for(A>=ue?ee=y[we]>>A-ue&he:(ee=(y[we]&(1<<A+1)-1)<<ue-A,we>0&&(ee|=y[we-1]>>this.DB+A-ue)),Z=k;(ee&1)==0;)ee>>=1,--Z;if((A-=Z)<0&&(A+=this.DB,--we),oe)Y[ee].copyTo(z),oe=!1;else{for(;Z>1;)U.sqrTo(z,K),U.sqrTo(K,z),Z-=2;Z>0?U.sqrTo(z,K):(ne=z,z=K,K=ne),U.mulTo(K,Y[ee],z)}for(;we>=0&&(y[we]&1<<A)==0;)U.sqrTo(z,K),ne=z,z=K,K=ne,--A<0&&(A=this.DB-1,--we)}return U.revert(z)}function ys(y){var T=this.s<0?this.negate():this.clone(),A=y.s<0?y.negate():y.clone();if(T.compareTo(A)<0){var k=T;T=A,A=k}var z=T.getLowestSetBit(),U=A.getLowestSetBit();if(U<0)return T;for(z<U&&(U=z),U>0&&(T.rShiftTo(U,T),A.rShiftTo(U,A));T.signum()>0;)(z=T.getLowestSetBit())>0&&T.rShiftTo(z,T),(z=A.getLowestSetBit())>0&&A.rShiftTo(z,A),T.compareTo(A)>=0?(T.subTo(A,T),T.rShiftTo(1,T)):(A.subTo(T,A),A.rShiftTo(1,A));return U>0&&A.lShiftTo(U,A),A}function hn(y){if(y<=0)return 0;var T=this.DV%y,A=this.s<0?y-1:0;if(this.t>0)if(T==0)A=this[0]%y;else for(var k=this.t-1;k>=0;--k)A=(T*A+this[k])%y;return A}function fi(y){var T=y.isEven();if(this.isEven()&&T||y.signum()==0)return d.ZERO;for(var A=y.clone(),k=this.clone(),z=F(1),U=F(0),Y=F(0),Z=F(1);A.signum()!=0;){for(;A.isEven();)A.rShiftTo(1,A),T?((!z.isEven()||!U.isEven())&&(z.addTo(this,z),U.subTo(y,U)),z.rShiftTo(1,z)):U.isEven()||U.subTo(y,U),U.rShiftTo(1,U);for(;k.isEven();)k.rShiftTo(1,k),T?((!Y.isEven()||!Z.isEven())&&(Y.addTo(this,Y),Z.subTo(y,Z)),Y.rShiftTo(1,Y)):Z.isEven()||Z.subTo(y,Z),Z.rShiftTo(1,Z);A.compareTo(k)>=0?(A.subTo(k,A),T&&z.subTo(Y,z),U.subTo(Z,U)):(k.subTo(A,k),T&&Y.subTo(z,Y),Z.subTo(U,Z))}if(k.compareTo(d.ONE)!=0)return d.ZERO;if(Z.compareTo(y)>=0)return Z.subtract(y);if(Z.signum()<0)Z.addTo(y,Z);else return Z;return Z.signum()<0?Z.add(y):Z}var Ai=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],gt=(1<<26)/Ai[Ai.length-1];function tt(y){var T,A=this.abs();if(A.t==1&&A[0]<=Ai[Ai.length-1]){for(T=0;T<Ai.length;++T)if(A[0]==Ai[T])return!0;return!1}if(A.isEven())return!1;for(T=1;
376T<Ai.length;){for(var k=Ai[T],z=T+1;z<Ai.length&&k<gt;)k*=Ai[z++];for(k=A.modInt(k);T<z;)if(k%Ai[T++]==0)return!1}return A.millerRabin(y)}function ft(y){var T=this.subtract(d.ONE),A=T.getLowestSetBit();if(A<=0)return!1;var k=T.shiftRight(A);y=y+1>>1,y>Ai.length&&(y=Ai.length);for(var z=f(),U=0;U<y;++U){z.fromInt(Ai[Math.floor(Math.random()*Ai.length)]);var Y=z.modPow(k,this);if(Y.compareTo(d.ONE)!=0&&Y.compareTo(T)!=0){for(var Z=1;Z++<A&&Y.compareTo(T)!=0;)if(Y=Y.modPowInt(2,this),Y.compareTo(d.ONE)==0)return!1;if(Y.compareTo(T)!=0)return!1}}return!0}d.prototype.chunkSize=rr,d.prototype.toRadix=dt,d.prototype.fromRadix=bt,d.prototype.fromNumber=nr,d.prototype.bitwiseTo=mt,d.prototype.changeBit=Ln,d.prototype.addTo=gn,d.prototype.dMultiply=Ui,d.prototype.dAddOffset=rs,d.prototype.multiplyLowerTo=Ul,d.prototype.multiplyUpperTo=qu,d.prototype.modInt=hn,d.prototype.millerRabin=ft,d.prototype.clone=Kt,d.prototype.intValue=Qt,d.prototype.byteValue=qt,d.prototype.shortValue=hr,d.prototype.signum=tr,d.prototype.toByteArray=Ee,d.prototype.equals=Oe,d.prototype.min=Re,d.prototype.max=pt,d.prototype.and=ze,d.prototype.or=Je,d.prototype.xor=pr,d.prototype.andNot=Or,d.prototype.not=vn,d.prototype.shiftLeft=cn,d.prototype.shiftRight=Xr,d.prototype.getLowestSetBit=fn,d.prototype.bitCount=Ar,d.prototype.testBit=Ir,d.prototype.setBit=Wn,d.prototype.clearBit=wr,d.prototype.flipBit=jt,d.prototype.add=Xa,d.prototype.subtract=la,d.prototype.multiply=si,d.prototype.divide=gs,d.prototype.remainder=ga,d.prototype.divideAndRemainder=ya,d.prototype.modPow=js,d.prototype.modInverse=fi,d.prototype.pow=Hl,d.prototype.gcd=ys,d.prototype.isProbablePrime=tt,d.prototype.square=Ho;function Tt(){this.i=0,this.j=0,this.S=new Array}function vr(y){var T,A,k;for(T=0;T<256;++T)this.S[T]=T;for(A=0,T=0;T<256;++T)A=A+this.S[T]+y[T%y.length]&255,k=this.S[T],this.S[T]=this.S[A],this.S[A]=k;this.i=0,this.j=0}function Pn(){var y;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,y=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=y,this.S[y+this.S[this.i]&255]}Tt.prototype.init=vr,Tt.prototype.next=Pn;function rn(){return new Tt}var Pi=256,_a,Ri,Un;function Xn(y){Ri[Un++]^=y&255,Ri[Un++]^=y>>8&255,Ri[Un++]^=y>>16&255,Ri[Un++]^=y>>24&255,Un>=Pi&&(Un-=Pi)}function Gn(){Xn(new Date().getTime())}if(Ri==null){Ri=new Array,Un=0;var yi;if(t!==void 0&&(t.crypto!==void 0||t.msCrypto!==void 0)){var ns=t.crypto||t.msCrypto;if(ns.getRandomValues){var bc=new Uint8Array(32);for(ns.getRandomValues(bc),yi=0;yi<32;++yi)Ri[Un++]=bc[yi]}else if(e.appName=="Netscape"&&e.appVersion<"5"){var ml=t.crypto.random(32);for(yi=0;yi<ml.length;++yi)Ri[Un++]=ml.charCodeAt(yi)&255}}for(;Un<Pi;)yi=Math.floor(65536*Math.random()),Ri[Un++]=yi>>>8,Ri[Un++]=yi&255;Un=0,Gn()}function eu(){if(_a==null){for(Gn(),_a=rn(),_a.init(Ri),Un=0;Un<Ri.length;++Un)Ri[Un]=0;Un=0}return _a.next()}function nf(y){var T;for(T=0;T<y.length;++T)y[T]=eu()}function $s(){}$s.prototype.nextBytes=nf;function Qa(y,T){return new d(y,T)}function af(y,T){if(T<y.length+11)throw"Message too long for RSA";for(var A=new Array,k=y.length-1;k>=0&&T>0;){var z=y.charCodeAt(k--);z<128?A[--T]=z:z>127&&z<2048?(A[--T]=z&63|128,A[--T]=z>>6|192):(A[--T]=z&63|128,A[--T]=z>>6&63|128,A[--T]=z>>12|224)}A[--T]=0;for(var U=new $s,Y=new Array;T>2;){for(Y[0]=0;Y[0]==0;)U.nextBytes(Y);A[--T]=Y[0]}return A[--T]=2,A[--T]=0,new d(A)}function $u(y,T,A){for(var k="",z=0;k.length<T;)k+=A(String.fromCharCode.apply(String,y.concat([(z&4278190080)>>24,(z&16711680)>>16,(z&65280)>>8,z&255]))),z+=1;return k}function Wu(y,T,A,k){var z=q.crypto.MessageDigest,U=q.crypto.Util,Y=null;if(A||(A="sha1"),typeof A=="string"&&(Y=z.getCanonicalAlgName(A),k=z.getHashLength(Y),A=function(ne){return gl(U.hashHex(Es(ne),Y))}),y.length+2*k+2>T)throw"Message too long for RSA";var Z="",ue;for(ue=0;ue<T-y.length-2*k-2;ue+=1)Z+="\0";var he=A("")+Z+"�"+y,Se=new Array(k);new $s().nextBytes(Se);var we=$u(Se,he.length,A),ee=[];for(ue=0;ue<he.length;ue+=1)ee[ue]=he.charCodeAt(ue)^we.charCodeAt(ue);var oe=$u(ee,Se.length,A),K=[0];for(ue=0;ue<Se.length;ue+=1)K[ue+1]=Se[ue]^oe.charCodeAt(ue);return new d(K.concat(ee))}function Br(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function W_(y,T){if(this.isPublic=!0,this.isPrivate=!1,typeof y!="str
376ing")this.n=y,this.e=T;else if(y!=null&&T!=null&&y.length>0&&T.length>0)this.n=Qa(y,16),this.e=parseInt(T,16);else throw"Invalid RSA public key"}function nn(y){return y.modPowInt(this.e,this.n)}function Ws(y){var T=af(y,this.n.bitLength()+7>>3);if(T==null)return null;var A=this.doPublic(T);if(A==null)return null;var k=A.toString(16);return(k.length&1)==0?k:"0"+k}function Oi(y,T,A){var k=Wu(y,this.n.bitLength()+7>>3,T,A);if(k==null)return null;var z=this.doPublic(k);if(z==null)return null;var U=z.toString(16);return(U.length&1)==0?U:"0"+U}Br.prototype.doPublic=nn,Br.prototype.setPublic=W_,Br.prototype.encrypt=Ws,Br.prototype.encryptOAEP=Oi,Br.prototype.type="RSA";function Gu(y,T){for(var A=y.toByteArray(),k=0;k<A.length&&A[k]==0;)++k;if(A.length-k!=T-1||A[k]!=2)return null;for(++k;A[k]!=0;)if(++k>=A.length)return null;for(var z="";++k<A.length;){var U=A[k]&255;U<128?z+=String.fromCharCode(U):U>191&&U<224?(z+=String.fromCharCode((U&31)<<6|A[k+1]&63),++k):(z+=String.fromCharCode((U&15)<<12|(A[k+1]&63)<<6|A[k+2]&63),k+=2)}return z}function of(y,T,A){for(var k="",z=0;k.length<T;)k+=A(y+String.fromCharCode.apply(String,[(z&4278190080)>>24,(z&16711680)>>16,(z&65280)>>8,z&255])),z+=1;return k}function Nh(y,T,A,k){var z=q.crypto.MessageDigest,U=q.crypto.Util,Y=null;A||(A="sha1"),typeof A=="string"&&(Y=z.getCanonicalAlgName(A),k=z.getHashLength(Y),A=function(se){return gl(U.hashHex(Es(se),Y))}),y=y.toByteArray();var we;for(we=0;we<y.length;we+=1)y[we]&=255;for(;y.length<T;)y.unshift(0);if(y=String.fromCharCode.apply(String,y),y.length<2*k+2)throw"Cipher too short";var Z=y.substr(1,k),ue=y.substr(k+1),he=of(ue,k,A),Se=[],we;for(we=0;we<Z.length;we+=1)Se[we]=Z.charCodeAt(we)^he.charCodeAt(we);var ee=of(String.fromCharCode.apply(String,Se),y.length-k,A),oe=[];for(we=0;we<ue.length;we+=1)oe[we]=ue.charCodeAt(we)^ee.charCodeAt(we);if(oe=String.fromCharCode.apply(String,oe),oe.substr(0,k)!==A(""))throw"Hash mismatch";oe=oe.substr(k);var K=oe.indexOf("�"),ne=K!=-1?oe.substr(0,K).lastIndexOf("\0"):-1;if(ne+1!=K)throw"Malformed data";return oe.substr(K+1)}function Dh(y,T,A){if(this.isPrivate=!0,typeof y!="string")this.n=y,this.e=T,this.d=A;else if(y!=null&&T!=null&&y.length>0&&T.length>0)this.n=Qa(y,16),this.e=parseInt(T,16),this.d=Qa(A,16);else throw"Invalid RSA private key"}function jl(y,T,A,k,z,U,Y,Z){if(this.isPrivate=!0,this.isPublic=!1,y==null)throw"RSASetPrivateEx N == null";if(T==null)throw"RSASetPrivateEx E == null";if(y.length==0)throw"RSASetPrivateEx N.length == 0";if(T.length==0)throw"RSASetPrivateEx E.length == 0";if(y!=null&&T!=null&&y.length>0&&T.length>0)this.n=Qa(y,16),this.e=parseInt(T,16),this.d=Qa(A,16),this.p=Qa(k,16),this.q=Qa(z,16),this.dmp1=Qa(U,16),this.dmq1=Qa(Y,16),this.coeff=Qa(Z,16);else throw"Invalid RSA private key in RSASetPrivateEx"}function qm(y,T){var A=new $s,k=y>>1;this.e=parseInt(T,16);for(var z=new d(T,16);;){for(;this.p=new d(y-k,1,A),!(this.p.subtract(d.ONE).gcd(z).compareTo(d.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new d(k,1,A),!(this.q.subtract(d.ONE).gcd(z).compareTo(d.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var U=this.p;this.p=this.q,this.q=U}var Y=this.p.subtract(d.ONE),Z=this.q.subtract(d.ONE),ue=Y.multiply(Z);if(ue.gcd(z).compareTo(d.ONE)==0&&(this.n=this.p.multiply(this.q),this.n.bitLength()==y)){this.d=z.modInverse(ue),this.dmp1=this.d.mod(Y),this.dmq1=this.d.mod(Z),this.coeff=this.q.modInverse(this.p);break}}this.isPrivate=!0}function tu(y){if(this.p==null||this.q==null)return y.modPow(this.d,this.n);for(var T=y.mod(this.p).modPow(this.dmp1,this.p),A=y.mod(this.q).modPow(this.dmq1,this.q);T.compareTo(A)<0;)T=T.add(this.p);return T.subtract(A).multiply(this.coeff).mod(this.p).multiply(this.q).add(A)}function Ja(y){if(y.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");var T=Qa(y,16),A=this.doPrivate(T);return A==null?null:Gu(A,this.n.bitLength()+7>>3)}function $l(y,T,A){if(y.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");var k=Qa(y,16),z=this.doPrivate(k);return z==null?null:Nh(z,this.n.bitLength()+7>>3,T,A)}Br.prototype.doPrivate=tu,Br.prototype.setPrivate=Dh,Br.prototype.setPrivateEx=jl,Br.prototype.generate=qm,Br.prototype.decrypt=Ja,Br.prototype.decryptOAEP=$l;function eo(y,T){this.x=T,this.q=y}function b0(y){return y==this?!0:this.q.equals(y.q)&&this.x.equals(y.x)}function Mh(){return this.x}function Zi(){return new eo(this.q,this.x.negate().mod(this.q))}function ru(y){return new eo(this.q,this.x.add(y.toBigInteger()).mod(this.q))}function G_(y){return new eo(this.q,this.x.subtract(y.toBigInteger()).mod(this.q))}function E0(y){return new eo(this.q,this.x.multiply(y.toBigInteger()).mod(this.q))}function Rn(){return new eo(this.q,this.x.square().mod(this.q))}function jm(y){return new eo(this.q,this.x.multiply(y.toBigInteger().modInverse(this.q)).mod(this.q))}eo.prototype.equals=b0,eo.prototype.toBigInteger=Mh,eo.prototype.negate=Zi,eo.prototype.add=ru,eo.prototype.subtract=G_,eo.prototype.multiply=E0,eo.prototype.square=Rn,eo.prototype.divide=jm;function an(y,T,A,k){this.curve=y,this.x=T,this.y=A,k==null?this.z=d.ONE:this.z=k,this.zinv=null}function sf(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function $m(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function w0(y){if(y==this)return!0;
376if(this.isInfinity())return y.isInfinity();if(y.isInfinity())return this.isInfinity();var T,A;return T=y.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(y.z)).mod(this.curve.q),T.equals(d.ZERO)?(A=y.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(y.z)).mod(this.curve.q),A.equals(d.ZERO)):!1}function Wm(){return this.x==null&&this.y==null?!0:this.z.equals(d.ZERO)&&!this.y.toBigInteger().equals(d.ZERO)}function Gm(){return new an(this.curve,this.x,this.y.negate(),this.z)}function Lh(y){if(this.isInfinity())return y;if(y.isInfinity())return this;var T=y.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(y.z)).mod(this.curve.q),A=y.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(y.z)).mod(this.curve.q);if(d.ZERO.equals(A))return d.ZERO.equals(T)?this.twice():this.curve.getInfinity();var k=new d("3"),z=this.x.toBigInteger(),U=this.y.toBigInteger();y.x.toBigInteger(),y.y.toBigInteger();var Y=A.square(),Z=Y.multiply(A),ue=z.multiply(Y),he=T.square().multiply(this.z),Se=he.subtract(ue.shiftLeft(1)).multiply(y.z).subtract(Z).multiply(A).mod(this.curve.q),we=ue.multiply(k).multiply(T).subtract(U.multiply(Z)).subtract(he.multiply(T)).multiply(y.z).add(T.multiply(Z)).mod(this.curve.q),ee=Z.multiply(this.z).multiply(y.z).mod(this.curve.q);return new an(this.curve,this.curve.fromBigInteger(Se),this.curve.fromBigInteger(we),ee)}function S0(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var y=new d("3"),T=this.x.toBigInteger(),A=this.y.toBigInteger(),k=A.multiply(this.z),z=k.multiply(A).mod(this.curve.q),U=this.curve.a.toBigInteger(),Y=T.square().multiply(y);d.ZERO.equals(U)||(Y=Y.add(this.z.square().multiply(U))),Y=Y.mod(this.curve.q);var Z=Y.square().subtract(T.shiftLeft(3).multiply(z)).shiftLeft(1).multiply(k).mod(this.curve.q),ue=Y.multiply(y).multiply(T).subtract(z.shiftLeft(1)).shiftLeft(2).multiply(z).subtract(Y.square().multiply(Y)).mod(this.curve.q),he=k.square().multiply(k).shiftLeft(3).mod(this.curve.q);return new an(this.curve,this.curve.fromBigInteger(Z),this.curve.fromBigInteger(ue),he)}function Wl(y){if(this.isInfinity())return this;if(y.signum()==0)return this.curve.getInfinity();var T=y,A=T.multiply(new d("3")),k=this.negate(),z=this,U=this.curve.q.subtract(y),Y=U.multiply(new d("3")),Z=new an(this.curve,this.x,this.y),ue=Z.negate(),he;for(he=A.bitLength()-2;he>0;--he){z=z.twice();var Se=A.testBit(he),we=T.testBit(he);Se!=we&&(z=z.add(Se?this:k))}for(he=Y.bitLength()-2;he>0;--he){Z=Z.twice();var ee=Y.testBit(he),oe=U.testBit(he);ee!=oe&&(Z=Z.add(ee?Z:ue))}return z}function Ku(y,T,A){var k;y.bitLength()>A.bitLength()?k=y.bitLength()-1:k=A.bitLength()-1;for(var z=this.curve.getInfinity(),U=this.add(T);k>=0;)z=z.twice(),y.testBit(k)?A.testBit(k)?z=z.add(U):z=z.add(this):A.testBit(k)&&(z=z.add(T)),--k;return z}an.prototype.getX=sf,an.prototype.getY=$m,an.prototype.equals=w0,an.prototype.isInfinity=Wm,an.prototype.negate=Gm,an.prototype.add=Lh,an.prototype.twice=S0,an.prototype.multiply=Wl,an.prototype.multiplyTwo=Ku;function Gs(y,T,A){this.q=y,this.a=this.fromBigInteger(T),this.b=this.fromBigInteger(A),this.infinity=new an(this,null,null)}function Ks(){return this.q}function C0(){return this.a}function Km(){return this.b}function Gl(y){return y==this?!0:this.q.equals(y.q)&&this.a.equals(y.a)&&this.b.equals(y.b)}function Fh(){return this.infinity}function Ym(y){return new eo(this.q,y)}function Bh(y){switch(parseInt(y.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var T=(y.length-2)/2,A=y.substr(2,T),k=y.substr(T+2,T);return new an(this,this.fromBigInteger(new d(A,16)),this.fromBigInteger(new d(k,16)));default:return null}}Gs.prototype.getQ=Ks,Gs.prototype.getA=C0,Gs.prototype.getB=Km,Gs.prototype.equals=Gl,Gs.prototype.getInfinity=Fh,Gs.prototype.fromBigInteger=Ym,Gs.prototype.decodePointHex=Bh,eo.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},an.prototype.getEncoded=function(y){var T=function(U,Y){var Z=U.toByteArrayUnsigned();if(Y<Z.length)Z=Z.slice(Z.length-Y);else for(;Y>Z.length;)Z.unshift(0);return Z},A=this.getX().toBigInteger(),k=this.getY().toBigInteger(),z=T(A,32);return y?k.isEven()?z.unshift(2):z.unshift(3):(z.unshift(4),z=z.concat(T(k,32))),z},an.decodeFrom=function(y,T){T[0];var A=T.length-1,k=T.slice(1,1+A/2),z=T.slice(1+A/2,1+A);k.unshift(0),z.unshift(0);
376var U=new d(k),Y=new d(z);return new an(y,y.fromBigInteger(U),y.fromBigInteger(Y))},an.decodeFromHex=function(y,T){T.substr(0,2);var A=T.length-2,k=T.substr(2,A/2),z=T.substr(2+A/2,A/2),U=new d(k,16),Y=new d(z,16);return new an(y,y.fromBigInteger(U),y.fromBigInteger(Y))},an.prototype.add2D=function(y){if(this.isInfinity())return y;if(y.isInfinity())return this;if(this.x.equals(y.x))return this.y.equals(y.y)?this.twice():this.curve.getInfinity();var T=y.x.subtract(this.x),A=y.y.subtract(this.y),k=A.divide(T),z=k.square().subtract(this.x).subtract(y.x),U=k.multiply(this.x.subtract(z)).subtract(this.y);return new an(this.curve,z,U)},an.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var y=this.curve.fromBigInteger(d.valueOf(2)),T=this.curve.fromBigInteger(d.valueOf(3)),A=this.x.square().multiply(T).add(this.curve.a).divide(this.y.multiply(y)),k=A.square().subtract(this.x.multiply(y)),z=A.multiply(this.x.subtract(k)).subtract(this.y);return new an(this.curve,k,z)},an.prototype.multiply2D=function(y){if(this.isInfinity())return this;if(y.signum()==0)return this.curve.getInfinity();var T=y,A=T.multiply(new d("3")),k=this.negate(),z=this,U;for(U=A.bitLength()-2;U>0;--U){z=z.twice();var Y=A.testBit(U),Z=T.testBit(U);Y!=Z&&(z=z.add2D(Y?this:k))}return z},an.prototype.isOnCurve=function(){var y=this.getX().toBigInteger(),T=this.getY().toBigInteger(),A=this.curve.getA().toBigInteger(),k=this.curve.getB().toBigInteger(),z=this.curve.getQ(),U=T.multiply(T).mod(z),Y=y.multiply(y).multiply(y).add(A.multiply(y)).add(k).mod(z);return U.equals(Y)},an.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},an.prototype.validate=function(){var y=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var T=this.getX().toBigInteger(),A=this.getY().toBigInteger();if(T.compareTo(d.ONE)<0||T.compareTo(y.subtract(d.ONE))>0)throw new Error("x coordinate out of bounds");if(A.compareTo(d.ONE)<0||A.compareTo(y.subtract(d.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(y).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var zh=(function(){var y="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",T='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',A='(?:"'+T+'*")',k=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+y+"|"+A+")","g"),z=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),U={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
377`,r:"\r",t:"	"};function Y(Se,we,ee){return we?U[we]:String.fromCharCode(parseInt(ee,16))}var Z=new String(""),ue="\\",he=Object.hasOwnProperty;return function(Se,we){var ee=Se.match(k),oe,K=ee[0],ne=!1;K==="{"?oe={}:K==="["?oe=[]:(oe=[],ne=!0);for(var se,be=[oe],Ie=1-ne,Ge=ee.length;Ie<Ge;++Ie){K=ee[Ie];var $e;switch(K.charCodeAt(0)){default:$e=be[0],$e[se||$e.length]=+K,se=void 0;break;case 34:if(K=K.substring(1,K.length-1),K.indexOf(ue)!==-1&&(K=K.replace(z,Y)),$e=be[0],!se)if($e instanceof Array)se=$e.length;else{se=K||Z;break}$e[se]=K,se=void 0;break;case 91:$e=be[0],be.unshift($e[se||$e.length]=[]),se=void 0;break;case 93:be.shift();break;case 102:$e=be[0],$e[se||$e.length]=!1,se=void 0;break;case 110:$e=be[0],$e[se||$e.length]=null,se=void 0;break;case 116:$e=be[0],$e[se||$e.length]=!0,se=void 0;break;case 123:$e=be[0],be.unshift($e[se||$e.length]={}),se=void 0;break;case 125:be.shift();break}}if(ne){if(be.length!==1)throw new Error;oe=oe[0]}else if(be.length)throw new Error;if(we){var je=function(zt,xt){var rt=zt[xt];if(rt&&typeof rt=="object"){var ct=null;for(var Lt in rt)if(he.call(rt,Lt)&&rt!==zt){var er=je(rt,Lt);er!==void 0?rt[Lt]=er:(ct||(ct=[]),ct.push(Lt))}if(ct)for(var Xt=ct.length;--Xt>=0;
377)delete rt[ct[Xt]]}return we.call(zt,xt,rt)};oe=je({"":oe},"")}return oe}})();(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),q.asn1.ASN1Util=new function(){this.integerToByteHex=function(y){var T=y.toString(16);return T.length%2==1&&(T="0"+T),T},this.bigIntToMinTwosComplementsHex=function(y){var T=y.toString(16);if(T.substr(0,1)!="-")T.length%2==1?T="0"+T:T.match(/^[0-7]/)||(T="00"+T);else{var A=T.substr(1),k=A.length;k%2==1?k+=1:T.match(/^[0-7]/)||(k+=2);for(var z="",U=0;U<k;U++)z+="f";var Y=new d(z,16),Z=Y.xor(y).add(d.ONE);T=Z.toString(16).replace(/^-/,"")}return T},this.getPEMStringFromHex=function(y,T){return da(y,T)},this.newObject=function(y){var T=q,A=T.asn1,k=A.DERBoolean,z=A.DERInteger,U=A.DERBitString,Y=A.DEROctetString,Z=A.DERNull,ue=A.DERObjectIdentifier,he=A.DEREnumerated,Se=A.DERUTF8String,we=A.DERNumericString,ee=A.DERPrintableString,oe=A.DERTeletexString,K=A.DERIA5String,ne=A.DERUTCTime,se=A.DERGeneralizedTime,be=A.DERVisibleString,Ie=A.DERBMPString,Ge=A.DERSequence,$e=A.DERSet,je=A.DERTaggedObject,zt=A.ASN1Util.newObject,xt=Object.keys(y);if(xt.length!=1)throw"key of param shall be only one.";var rt=xt[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+rt+":")==-1)throw new Error("undefined key: "+rt);if(rt=="bool")return new k(y[rt]);if(rt=="int")return new z(y[rt]);if(rt=="bitstr")return new U(y[rt]);if(rt=="octstr")return new Y(y[rt]);if(rt=="null")return new Z(y[rt]);if(rt=="oid")return new ue(y[rt]);if(rt=="enum")return new he(y[rt]);if(rt=="utf8str")return new Se(y[rt]);if(rt=="numstr")return new we(y[rt]);if(rt=="prnstr")return new ee(y[rt]);if(rt=="telstr")return new oe(y[rt]);if(rt=="ia5str")return new K(y[rt]);if(rt=="utctime")return new ne(y[rt]);if(rt=="gentime")return new se(y[rt]);if(rt=="visstr")return new be(y[rt]);if(rt=="bmpstr")return new Ie(y[rt]);if(rt=="seq"){for(var ct=y[rt],Lt=[],er=0;er<ct.length;er++){var Xt=zt(ct[er]);Lt.push(Xt)}return new Ge({array:Lt})}if(rt=="set"){for(var ct=y[rt],Lt=[],er=0;er<ct.length;er++){var Xt=zt(ct[er]);Lt.push(Xt)}return new $e({array:Lt})}if(rt=="tag"){var Pr=y[rt];if(Object.prototype.toString.call(Pr)==="[object Array]"&&Pr.length==3){var ot=zt(Pr[2]);return new je({tag:Pr[0],explicit:Pr[1],obj:ot})}else{var wt={};if(Pr.explicit!==void 0&&(wt.explicit=Pr.explicit),Pr.tag!==void 0&&(wt.tag=Pr.tag),Pr.obj===void 0)throw"obj shall be specified for 'tag'.";return wt.obj=zt(Pr.obj),new je(wt)}}},this.jsonToASN1HEX=function(y){var T=this.newObject(y);return T.getEncodedHex()}},q.asn1.ASN1Util.oidHexToInt=function(y){for(var z="",T=parseInt(y.substr(0,2),16),A=Math.floor(T/40),k=T%40,z=A+"."+k,U="",Y=2;Y<y.length;Y+=2){var Z=parseInt(y.substr(Y,2),16),ue=("00000000"+Z.toString(2)).slice(-8);if(U=U+ue.substr(1,7),ue.substr(0,1)=="0"){var he=new d(U,2);z=z+"."+he.toString(10),U=""}}return z},q.asn1.ASN1Util.oidIntToHex=function(y){var T=function(Z){var ue=Z.toString(16);return ue.length==1&&(ue="0"+ue),ue},A=function(Z){var ue="",he=new d(Z,10),Se=he.toString(2),we=7-Se.length%7;we==7&&(we=0);for(var ee="",oe=0;oe<we;oe++)ee+="0";Se=ee+Se;for(var oe=0;oe<Se.length-1;oe+=7){var K=Se.substr(oe,7);oe!=Se.length-7&&(K="1"+K),ue+=T(parseInt(K,2))}return ue};if(!y.match(/^[0-9.]+$/))throw"malformed oid string: "+y;var k="",z=y.split("."),U=parseInt(z[0])*40+parseInt(z[1]);k+=T(U),z.splice(0,2);for(var Y=0;Y<z.length;Y++)k+=A(z[Y]);return k},q.asn1.ASN1Object=function(){var y="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+y.length+",v="+this.hV;var T=this.hV.length/2,A=T.toString(16);if(A.length%2==1&&(A="0"+A),T<128)return A;var k=A.length/2;if(k>15)throw"ASN.1 length too long to represent by 8x: n = "+T.toString(16);var z=128+k;return z.toString(16)+A},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},q.asn1.DERAbstractString=function(y){q.asn1.DERAbstractString.superclass.constructor.call(this),this.get
377String=function(){return this.s},this.setString=function(T){this.hTLV=null,this.isModified=!0,this.s=T,this.hV=ko(this.s).toLowerCase()},this.setStringHex=function(T){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=T},this.getFreshValueHex=function(){return this.hV},typeof y<"u"&&(typeof y=="string"?this.setString(y):typeof y.str<"u"?this.setString(y.str):typeof y.hex<"u"&&this.setStringHex(y.hex))},r.lang.extend(q.asn1.DERAbstractString,q.asn1.ASN1Object),q.asn1.DERAbstractTime=function(y){q.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(T){var A=T.getTime()+T.getTimezoneOffset()*6e4,k=new Date(A);return k},this.formatDate=function(T,A,k){var z=this.zeroPadding,U=this.localDateToUTC(T),Y=String(U.getFullYear());A=="utc"&&(Y=Y.substr(2,2));var Z=z(String(U.getMonth()+1),2),ue=z(String(U.getDate()),2),he=z(String(U.getHours()),2),Se=z(String(U.getMinutes()),2),we=z(String(U.getSeconds()),2),ee=Y+Z+ue+he+Se+we;if(k===!0){var oe=U.getMilliseconds();if(oe!=0){var K=z(String(oe),3);K=K.replace(/[0]+$/,""),ee=ee+"."+K}}return ee+"Z"},this.zeroPadding=function(T,A){return T.length>=A?T:new Array(A-T.length+1).join("0")+T},this.getString=function(){return this.s},this.setString=function(T){this.hTLV=null,this.isModified=!0,this.s=T,this.hV=Ys(T)},this.setByDateValue=function(T,A,k,z,U,Y){var Z=new Date(Date.UTC(T,A-1,k,z,U,Y,0));this.setByDate(Z)},this.getFreshValueHex=function(){return this.hV}},r.lang.extend(q.asn1.DERAbstractTime,q.asn1.ASN1Object),q.asn1.DERAbstractStructured=function(y){q.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(T){this.hTLV=null,this.isModified=!0,this.asn1Array=T},this.appendASN1Object=function(T){this.hTLV=null,this.isModified=!0,this.asn1Array.push(T)},this.asn1Array=new Array,typeof y<"u"&&typeof y.array<"u"&&(this.asn1Array=y.array)},r.lang.extend(q.asn1.DERAbstractStructured,q.asn1.ASN1Object),q.asn1.DERBoolean=function(){q.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},r.lang.extend(q.asn1.DERBoolean,q.asn1.ASN1Object),q.asn1.DERInteger=function(y){q.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(T){this.hTLV=null,this.isModified=!0,this.hV=q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(T)},this.setByInteger=function(T){var A=new d(String(T),10);this.setByBigInteger(A)},this.setValueHex=function(T){this.hV=T},this.getFreshValueHex=function(){return this.hV},typeof y<"u"&&(typeof y.bigint<"u"?this.setByBigInteger(y.bigint):typeof y.int<"u"?this.setByInteger(y.int):typeof y=="number"?this.setByInteger(y):typeof y.hex<"u"&&this.setValueHex(y.hex))},r.lang.extend(q.asn1.DERInteger,q.asn1.ASN1Object),q.asn1.DERBitString=function(y){if(y!==void 0&&typeof y.obj<"u"){var T=q.asn1.ASN1Util.newObject(y.obj);y.hex="00"+T.getEncodedHex()}q.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(A){this.hTLV=null,this.isModified=!0,this.hV=A},this.setUnusedBitsAndHexValue=function(A,k){if(A<0||7<A)throw"unused bits shall be from 0 to 7: u = "+A;var z="0"+A;this.hTLV=null,this.isModified=!0,this.hV=z+k},this.setByBinaryString=function(A){A=A.replace(/0+$/,"");var k=8-A.length%8;k==8&&(k=0);for(var z=0;z<=k;z++)A+="0";for(var U="",z=0;z<A.length-1;z+=8){var Y=A.substr(z,8),Z=parseInt(Y,2).toString(16);Z.length==1&&(Z="0"+Z),U+=Z}this.hTLV=null,this.isModified=!0,this.hV="0"+k+U},this.setByBooleanArray=function(A){for(var k="",z=0;z<A.length;z++)A[z]==!0?k+="1":k+="0";this.setByBinaryString(k)},this.newFalseArray=function(A){for(var k=new Array(A),z=0;z<A;z++)k[z]=!1;return k},this.getFreshValueHex=function(){return this.hV},typeof y<"u"&&(typeof y=="string"&&y.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(y):typeof y.hex<"u"?this.setHexValueIncludingUnusedBits(y.hex):typeof y.bin<"u"?this.setByBinaryString(y.bin):typeof y.array<"u"&&this.setByBooleanArray(y.array))},r.lang.extend(q.asn1.DERBitString,q.asn1.ASN1Object),q.asn1.DEROctetString=function(y){if(y!==void 0&&typeof y.obj<"u"){var T=q.asn1.ASN1Util.newObject(y.obj);y.hex=T.getEncodedHex()}q.asn1.DEROctetString.superclass.constructor.call(this,y),this.hT="04"},r.lang.extend(q.asn1.DEROctetString,q.asn1.DERAbstractString),q.asn1.DERNull=function(){q.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},r.lang.extend(q.asn1.DERNull,q.asn1.ASN1Object),q.asn1.DERObjectIdentifier=function(y){var T=function(k){var z=k.toString(16);return z.length==1&&(z="0"+z),z},A=function(k){var z="",U=new d(k,10),Y=U.toString(2),Z=7-Y.length%7;Z==7&&(Z=0);for(var ue="",he=0;he<Z;he++)ue+="0";Y=ue+Y;for(var he=0;he<Y.length-1;he+=7){var Se=Y.substr(he,7);he!=Y.length-7&&(Se="1"+Se),z+=T(parseInt(Se,2))}return z};q.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(k){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=k},this.setValueOidString=function(k){if(!k.match(/^[0-9.]+$/))throw"malformed oid string: "+k;var z="",U=k.split("."),Y=parseInt(U[0])*40+parseInt(U[1]);z+=T(Y),U.splice(0,2);for(var Z=0;Z<U.length;Z++)z+=A(U[Z]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=z},this.setValueName=function(k){var z=q.asn1.x509.OID.name2oid(k);if(z!=="")this.setValueOidString(z);else throw"DERObjectIdentifier oidName undefined: "+k},this.getFreshValueHex=function(){return this.hV},y!==void 0&&(typeof y=="string"?y.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(y):this.setValueName(y):y.oid!==void 0?this.setValueOidString(y.oid):y.hex!==void 0?this.setValueHex(y.hex):y.name!==void 0&&this.setValueName(y.name))},r.lang.extend(q.asn1.DERObjectIdentifier,q.asn1.ASN1Object),q.asn1.DEREnumerated=function(y){q.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(T){this.hTLV=null,this.isModified=!0,this.hV=q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(T)},this.setByInteger=function(T){var A=new d(String(T),10);this.setByBigInteger(A)},this.setValueHex=function(T){this.hV=T},this.getFreshValueHex=function(){return this.hV},typeof y<"u"&&(typeof y.int<"u"?this.setByInteger(y.int):typeof y=="number"?this.setByInteger(y):typeof y.hex<"u"&&this.setValueHex(y.hex))},r.lang.extend(q.asn1.DEREnumerated,q.asn1.ASN1Object),q.asn1.DERUTF8String=function(y){q.asn1.DERUTF8String.superclass.constructor.call(this,y),this.hT="0c"},r.lang.extend(q.asn1.DERUTF8String,q.asn1.DERAbstractString),q.asn1.DERNumericString=function(y){q.asn1.DERNumericString.superclass.constructor.call(this,y),this.hT="12"},r.lang.extend(q.asn1.DERNumericString,q.asn1.DERAbstractString),q.asn1.DERPrintableString=function(y){q.asn1.DERPrintableString.superclass.constructor.call(this,y),this.hT="13"},r.lang.extend(q.asn1.DERPrintableString,q.asn1.DERAbstractString),q.asn1.DERTeletexString=function(y){q.asn1.DERTeletexString.superclass.constructor.call(this,y),this.hT="14"},r.lang.extend(q.asn1.DERTeletexString,q.asn1.DERAbstractString),q.asn1.DERIA5String=function(y){q.asn1.DERIA5String.superclass.constructor.call(this,y),this.hT="16"},r.lang.extend(q.asn1.DERIA5String,q.asn1.DERAbstractString),q.asn1.DERVisibleString=function(y){q.asn1.DERIA5String.superclass.constructor.call(this,y),this.hT="1a"},r.lang.extend(q.asn1.DERVisibleString,q.asn1.DERAbstractString),q.asn1.DERBMPString=function(y){q.asn1.DERBMPString.superclass.constructor.call(this,y),this.hT="1e"},r.lang.extend(q.asn1.DERBMPString,q.asn1.DERAbstractString),q.asn1.DERUTCTime=function(y){q.asn1.DERUTCTime.superclass.constructor.call(this,y),this.hT="17",this.setByDate=function(T){this.hTLV=null,this.isModified=!0,this.date=T,this.s=this.formatDate(this.date,"utc"),this.hV=Ys(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=Ys(this.s)),this.hV},y!==void 0&&(y.str!==void 0?this.setString(y.str):typeof y=="string"&&y.match(/^[0-9]{12}Z$/)?this.setString(y):y.hex!==void 0?this.setStringHex(y.hex):y.date!==void 0&&this.setByDate(y.date))},r.lang.extend(q.asn1.DERUTCTime,q.asn1.DERAbstractTime),q.asn1.DERGeneralizedTime=function(y){q.asn1.DERGeneralizedTime.superclass.constructor.call(this,y),this.hT="18",this.withMillis=!1,this.setByDate=function(T){this.hTLV=null,this.isModified=!0,this.date=T,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=Ys(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=Ys(this.s)),this.hV},y!==void 0&&(y.str!==void 0?this.setString(y.str):typeof y=="string"&&y.match(/^[0-9]{14}Z$/)?this.setString(y):y.hex!==void 0?this.setStringHex(y.hex):y.date!==void 0&&this.setByDate(y.date),y.millis===!0&&(this.withMillis=!0))},r.lang.extend(q.asn1.DERGeneralizedTime,q.asn1.DERAbstractTime),q.asn1.DERSequence=function(y){q.asn1.DERSequence.superclass.constructor.call(this,y),this.hT="30",this.getFreshValueHex=function(){for(var T="",A=0;A<this.asn1Array.length;A++){var k=this.asn1Array[A];T+=k.getEncodedHex()}return this.hV=T,this.hV}},r.lang.extend(q.asn1.DERSequence,q.asn1.DERAbstractStructured),q.asn1.DERSet=function(y){q.asn1.DERSet.superclass.constructor.call(this,y),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var T=new Array,A=0;A<this.asn1Array.length;A++){var k=this.asn1Array[A];T.push(k.getEncodedHex())}return this.sortFlag==!0&&T.sort(),this.hV=T.join(""),this.hV},typeof y<"u"&&typeof y.sortflag<"u"&&y.sortflag==!1&&(this.sortFlag=!1)},r.lang.extend(q.asn1.DERSet,q.asn1.DERAbstractStructured),q.asn1.DERTaggedObject=function(y){q.asn1.DERTaggedObject.
377superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(T,A,k){this.hT=A,this.isExplicit=T,this.asn1Object=k,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=k.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,A),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof y<"u"&&(typeof y.tag<"u"&&(this.hT=y.tag),typeof y.explicit<"u"&&(this.isExplicit=y.explicit),typeof y.obj<"u"&&(this.asn1Object=y.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},r.lang.extend(q.asn1.DERTaggedObject,q.asn1.ASN1Object);var _r=new function(){};_r.getLblen=function(y,T){if(y.substr(T+2,1)!="8")return 1;var A=parseInt(y.substr(T+3,1));return A==0?-1:0<A&&A<10?A+1:-2},_r.getL=function(y,T){var A=_r.getLblen(y,T);return A<1?"":y.substr(T+2,A*2)},_r.getVblen=function(y,T){var A,k;return A=_r.getL(y,T),A==""?-1:(A.substr(0,1)==="8"?k=new d(A.substr(2),16):k=new d(A,16),k.intValue())},_r.getVidx=function(y,T){var A=_r.getLblen(y,T);return A<0?A:T+(A+1)*2},_r.getV=function(y,T){var A=_r.getVidx(y,T),k=_r.getVblen(y,T);return y.substr(A,k*2)},_r.getTLV=function(y,T){return y.substr(T,2)+_r.getL(y,T)+_r.getV(y,T)},_r.getNextSiblingIdx=function(y,T){var A=_r.getVidx(y,T),k=_r.getVblen(y,T);return A+k*2},_r.getChildIdx=function(y,T){var A=_r,k=new Array,z=A.getVidx(y,T);y.substr(T,2)=="03"?k.push(z+2):k.push(z);for(var U=A.getVblen(y,T),Y=z,Z=0;;){var ue=A.getNextSiblingIdx(y,Y);if(ue==null||ue-z>=U*2||Z>=200)break;k.push(ue),Y=ue,Z++}return k},_r.getNthChildIdx=function(y,T,A){var k=_r.getChildIdx(y,T);return k[A]},_r.getIdxbyList=function(y,T,A,k){var z=_r,U,Y;if(A.length==0){if(k!==void 0&&y.substr(T,2)!==k)throw Error("checking tag doesn't match: "+y.substr(T,2)+"!="+k);return T}return U=A.shift(),Y=z.getChildIdx(y,T),z.getIdxbyList(y,Y[U],A,k)},_r.getIdxbyListEx=function(y,T,A,k){var z=_r,U,Y;if(A.length==0)return k!==void 0&&y.substr(T,2)!==k?-1:T;U=A.shift(),Y=z.getChildIdx(y,T);for(var Z=0,ue=0;ue<Y.length;ue++){var he=y.substr(Y[ue],2);if(typeof U=="number"&&!z.isContextTag(he)&&Z==U||typeof U=="string"&&z.isContextTag(he,U))return z.getIdxbyListEx(y,Y[ue],A,k);z.isContextTag(he)||Z++}return-1},_r.getTLVbyList=function(y,T,A,k){var z=_r,U=z.getIdxbyList(y,T,A);if(U===void 0)throw new Error("can't find nthList object");if(k!==void 0&&y.substr(U,2)!=k)throw new Error("checking tag doesn't match: "+y.substr(U,2)+"!="+k);return z.getTLV(y,U)},_r.getTLVbyListEx=function(y,T,A,k){var z=_r,U=z.getIdxbyListEx(y,T,A,k);return U==-1?null:z.getTLV(y,U)},_r.getVbyList=function(y,T,A,k,z){var U=_r,Y,Z;if(Y=U.getIdxbyList(y,T,A,k),Y===void 0)throw"can't find nthList object";return Z=U.getV(y,Y),z===!0&&(Z=Z.substr(2)),Z},_r.getVbyListEx=function(y,T,A,k,z){var U=_r,Y,Z;return Y=U.getIdxbyListEx(y,T,A,k),Y==-1?null:(Z=U.getV(y,Y),y.substr(Y,2)=="03"&&z!==!1&&(Z=Z.substr(2)),Z)},_r.hextooidstr=function(y){var T=function(we,ee){return we.length>=ee?we:new Array(ee-we.length+1).join("0")+we},A=[],k=y.substr(0,2),z=parseInt(k,16);A[0]=new String(Math.floor(z/40)),A[1]=new String(z%40);for(var U=y.substr(2),Y=[],Z=0;Z<U.length/2;Z++)Y.push(parseInt(U.substr(Z*2,2),16));for(var ue=[],he="",Z=0;Z<Y.length;Z++)Y[Z]&128?he=he+T((Y[Z]&127).toString(2),7):(he=he+T((Y[Z]&127).toString(2),7),ue.push(new String(parseInt(he,2))),he="");var Se=A.join(".");return ue.length>0&&(Se=Se+"."+ue.join(".")),Se},_r.dump=function(y,T,A,k){var z=_r,U=z.getV,Y=z.dump,Z=z.getChildIdx,ue=y;y instanceof q.asn1.ASN1Object&&(ue=y.getEncodedHex());var he=function(xt,rt){if(xt.length<=rt*2)return xt;var ct=xt.substr(0,rt)+"..(total "+xt.length/2+"bytes).."+xt.substr(xt.length-rt,rt);return ct};T===void 0&&(T={ommit_long_octet:32}),A===void 0&&(A=0),k===void 0&&(k="");var Se=T.ommit_long_octet,je=ue.substr(A,2);if(je=="01"){var we=U(ue,A);return we=="00"?k+`BOOLEAN FALSE
378`:k+`BOOLEAN TRUE
379`}if(je=="02"){var we=U(ue,A);return k+"INTEGER "+he(we,Se)+`
380`}if(je=="03"){var we=U(ue,A);if(z.isASN1HEX(we.substr(2))){var ee=k+`BITSTRING, encapsulates
381`;
381return ee=ee+Y(we.substr(2),T,0,k+"  "),ee}else return k+"BITSTRING "+he(we,Se)+`
382`}if(je=="04"){var we=U(ue,A);if(z.isASN1HEX(we)){var ee=k+`OCTETSTRING, encapsulates
383`;return ee=ee+Y(we,T,0,k+"  "),ee}else return k+"OCTETSTRING "+he(we,Se)+`
384`}if(je=="05")return k+`NULL
385`;if(je=="06"){var oe=U(ue,A),K=q.asn1.ASN1Util.oidHexToInt(oe),ne=q.asn1.x509.OID.oid2name(K),se=K.replace(/\./g," ");return ne!=""?k+"ObjectIdentifier "+ne+" ("+se+`)
386`:k+"ObjectIdentifier ("+se+`)
387`}if(je=="0c")return k+"UTF8String '"+Qi(U(ue,A))+`'
388`;if(je=="13")return k+"PrintableString '"+Qi(U(ue,A))+`'
389`;if(je=="14")return k+"TeletexString '"+Qi(U(ue,A))+`'
390`;if(je=="16")return k+"IA5String '"+Qi(U(ue,A))+`'
391`;if(je=="17")return k+"UTCTime "+Qi(U(ue,A))+`
392`;if(je=="18")return k+"GeneralizedTime "+Qi(U(ue,A))+`
393`;if(je=="1a")return k+"VisualString '"+Qi(U(ue,A))+`'
394`;if(je=="1e")return k+"BMPString '"+Qi(U(ue,A))+`'
395`;if(je=="30"){if(ue.substr(A,4)=="3000")return k+`SEQUENCE {}
396`;var ee=k+`SEQUENCE
397`,be=Z(ue,A),Ie=T;if((be.length==2||be.length==3)&&ue.substr(be[0],2)=="06"&&ue.substr(be[be.length-1],2)=="04"){var ne=z.oidname(U(ue,be[0])),Ge=JSON.parse(JSON.stringify(T));Ge.x509ExtName=ne,Ie=Ge}for(var $e=0;$e<be.length;$e++)ee=ee+Y(ue,Ie,be[$e],k+"  ");return ee}if(je=="31"){for(var ee=k+`SET
398`,be=Z(ue,A),$e=0;$e<be.length;$e++)ee=ee+Y(ue,T,be[$e],k+"  ");return ee}var je=parseInt(je,16);if((je&128)!=0){var zt=je&31;if((je&32)!=0){for(var ee=k+"["+zt+`]
399`,be=Z(ue,A),$e=0;$e<be.length;$e++)ee=ee+Y(ue,T,be[$e],k+"  ");return ee}else{var we=U(ue,A);we.substr(0,8)=="68747470"&&(we=Qi(we)),T.x509ExtName==="subjectAltName"&&zt==2&&(we=Qi(we));var ee=k+"["+zt+"] "+we+`
400`;return ee}}return k+"UNKNOWN("+je+") "+U(ue,A)+`
401`},_r.isContextTag=function(y,T){y=y.toLowerCase();var A,k;try{A=parseInt(y,16)}catch{return-1}if(T===void 0)return(A&192)==128;try{var z=T.match(/^\[[0-9]+\]$/);return z==null||(k=parseInt(T.substr(1,T.length-1),10),k>31)?!1:(A&192)==128&&(A&31)==k}catch{return!1}},_r.isASN1HEX=function(y){var T=_r;if(y.length%2==1)return!1;var A=T.getVblen(y,0),k=y.substr(0,2),z=T.getL(y,0),U=y.length-k.length-z.length;return U==A*2},_r.checkStrictDER=function(y,T,A,k,z){var U=_r;if(A===void 0){if(typeof y!="string")throw new Error("not hex string");if(y=y.toLowerCase(),!q.lang.String.isHex(y))throw new Error("not hex string");A=y.length,k=y.length/2,k<128?z=1:z=Math.ceil(k.toString(16))+1}var Y=U.getL(y,T);if(Y.length>z*2)throw new Error("L of TLV too long: idx="+T);var Z=U.getVblen(y,T);if(Z>k)throw new Error("value of L too long than hex: idx="+T);var ue=U.getTLV(y,T),he=ue.length-2-U.getL(y,T).length;if(he!==Z*2)throw new Error("V string length and L's value not the same:"+he+"/"+Z*2);if(T===0&&y.length!=ue.length)throw new Error("total length and TLV length unmatch:"+y.length+"!="+ue.length);var Se=y.substr(T,2);if(Se==="02"){var we=U.getVidx(y,T);if(y.substr(we,2)=="00"&&y.charCodeAt(we+2)<56)throw new Error("not least zeros for DER INTEGER")}if(parseInt(Se,16)&32){for(var ee=U.getVblen(y,T),oe=0,K=U.getChildIdx(y,T),ne=0;ne<K.length;ne++){var se=U.getTLV(y,K[ne]);oe+=se.length,U.checkStrictDER(y,K[ne],A,k,z)}if(ee*2!=oe)throw new Error("sum of children's TLV length and L unmatch: "+ee*2+"!="+oe)}},_r.oidname=function(y){var T=q.asn1;q.lang.String.isHex(y)&&(y=T.ASN1Util.oidHexToInt(y));var A=T.x509.OID.oid2name(y);return A===""&&(A=y),A},(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),(typeof q.asn1.x509>"u"||!q.asn1.x509)&&(q.asn1.x509={}),q.asn1.x509.Certificate=function(y){q.asn1.x509.Certificate.superclass.constructor.call(this);var T=q;T.crypto;var A=T.asn1,k=A.DERSequence,z=A.DERBitString;this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg;var U=new q.crypto.Signature({alg:this.asn1SignatureAlg.nameAlg});U.init(this.prvKey),U.updateHex(this.asn1TBSCert.getEncodedHex()),this.hexSig=U.sign(),this.asn1Sig=new z({hex:"00"+this.hexSig});var Y=new k({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=Y.getEncodedHex(),this.isModified=!1},this.setSignatureHex=function(U){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg,this.hexSig=U,this.asn1Sig=new z({hex:"00"+this.hexSig});var Y=new k({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=Y.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(this.isModified==!1&&this.hTLV!=null)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){var U=Vo(this.getEncodedHex());return`-----BEGIN CERTIFICATE-----\r
402`+U+`\r
403-----END CERTIFICATE-----\r
404`},y!==void 0&&(y.tbscertobj!==void 0&&(this.asn1TBSCert=y.tbscertobj),y.prvkeyobj!==void 0&&(this.prvKey=y.prvkeyobj))},r.lang.extend(q.asn1.x509.Certificate,q.asn1.ASN1Object),q.asn1.x509.TBSCertificate=function(y){q.asn1.x509.TBSCertificate.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERSequence,z=A.DERInteger,U=A.DERTaggedObject,Y=A.x509,Z=Y.Time,ue=Y.X500Name,he=Y.SubjectPublicKeyInfo;this._initialize=function(){this.asn1Array=new Array,this.asn1Version=new U({obj:new z({int:2})}),this.asn1SerialNumber=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1NotBefore=null,this.asn1NotAfter=null,this.asn1Subject=null,this.asn1SubjPKey=null,this.extensionsArray=new Array},this.setSerialNumberByParam=function(Se){this.asn1SerialNumber=new z(Se)},this.setSignatureAlgByParam=function(Se){this.asn1SignatureAlg=new Y.AlgorithmIdentifier(Se)},this.setIssuerByParam=function(Se){this.asn1Issuer=new ue(Se)},this.setNotBeforeByParam=function(Se){this.asn1NotBefore=new Z(Se)},this.setNotAfterByParam=function(Se){this.asn1NotAfter=new Z(Se)}
404,this.setSubjectByParam=function(Se){this.asn1Subject=new ue(Se)},this.setSubjectPublicKey=function(Se){this.asn1SubjPKey=new he(Se)},this.setSubjectPublicKeyByGetKey=function(Se){var we=Zn.getKey(Se);this.asn1SubjPKey=new he(we)},this.appendExtension=function(Se){this.extensionsArray.push(Se)},this.appendExtensionByName=function(Se,we){q.asn1.x509.Extension.appendByNameToArray(Se,we,this.extensionsArray)},this.getEncodedHex=function(){if(this.asn1NotBefore==null||this.asn1NotAfter==null)throw"notBefore and/or notAfter not set";var Se=new k({array:[this.asn1NotBefore,this.asn1NotAfter]});if(this.asn1Array=new Array,this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SerialNumber),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(Se),this.asn1Array.push(this.asn1Subject),this.asn1Array.push(this.asn1SubjPKey),this.extensionsArray.length>0){var we=new k({array:this.extensionsArray}),ee=new U({explicit:!0,tag:"a3",obj:we});this.asn1Array.push(ee)}var oe=new k({array:this.asn1Array});return this.hTLV=oe.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},r.lang.extend(q.asn1.x509.TBSCertificate,q.asn1.ASN1Object),q.asn1.x509.Extension=function(y){q.asn1.x509.Extension.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERObjectIdentifier,z=A.DEROctetString;A.DERBitString;var U=A.DERBoolean,Y=A.DERSequence;this.getEncodedHex=function(){var Z=new k({oid:this.oid}),ue=new z({hex:this.getExtnValueHex()}),he=new Array;he.push(Z),this.critical&&he.push(new U),he.push(ue);var Se=new Y({array:he});return Se.getEncodedHex()},this.critical=!1,y!==void 0&&y.critical!==void 0&&(this.critical=y.critical)},r.lang.extend(q.asn1.x509.Extension,q.asn1.ASN1Object),q.asn1.x509.Extension.appendByNameToArray=function(y,T,A){var k=y.toLowerCase(),z=q.asn1.x509;if(k=="basicconstraints"){var U=new z.BasicConstraints(T);A.push(U)}else if(k=="keyusage"){var U=new z.KeyUsage(T);A.push(U)}else if(k=="crldistributionpoints"){var U=new z.CRLDistributionPoints(T);A.push(U)}else if(k=="extkeyusage"){var U=new z.ExtKeyUsage(T);A.push(U)}else if(k=="authoritykeyidentifier"){var U=new z.AuthorityKeyIdentifier(T);A.push(U)}else if(k=="subjectkeyidentifier"){var U=new z.SubjectKeyIdentifier(T);A.push(U)}else if(k=="authorityinfoaccess"){var U=new z.AuthorityInfoAccess(T);A.push(U)}else if(k=="subjectaltname"){var U=new z.SubjectAltName(T);A.push(U)}else if(k=="issueraltname"){var U=new z.IssuerAltName(T);A.push(U)}else if(k=="certificatepolicies"){var U=new z.CertificatePolicies(T);A.push(U)}else throw new Error("unsupported extension name: "+y)},q.asn1.x509.KeyUsage=function(y){q.asn1.x509.KeyUsage.superclass.constructor.call(this,y);var T=Nn.KEYUSAGE_NAME;if(this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.15",y!==void 0&&(y.bin!==void 0&&(this.asn1ExtnValue=new q.asn1.DERBitString(y)),y.names!==void 0&&y.names.length!==void 0)){for(var A=y.names,k="000000000",z=0;z<A.length;z++)for(var U=0;U<T.length;U++)A[z]===T[U]&&(k=k.substring(0,U)+"1"+k.substring(U+1,k.length));this.asn1ExtnValue=new q.asn1.DERBitString({bin:k})}},r.lang.extend(q.asn1.x509.KeyUsage,q.asn1.x509.Extension),q.asn1.x509.BasicConstraints=function(y){q.asn1.x509.BasicConstraints.superclass.constructor.call(this,y),this.getExtnValueHex=function(){var T=new Array;this.cA&&T.push(new q.asn1.DERBoolean),this.pathLen>-1&&T.push(new q.asn1.DERInteger({int:this.pathLen}));var A=new q.asn1.DERSequence({array:T});return this.asn1ExtnValue=A,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,y!==void 0&&(y.cA!==void 0&&(this.cA=y.cA),y.pathLen!==void 0&&(this.pathLen=y.pathLen))},r.lang.extend(q.asn1.x509.BasicConstraints,q.asn1.x509.Extension),q.asn1.x509.CRLDistributionPoints=function(y){q.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,y);var T=q,A=T.asn1,k=A.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.setByDPArray=function(z){this.asn1ExtnValue=new A.DERSequence({array:z})},this.setByOneURI=function(z){var U=new k.GeneralNames([{uri:z}]),Y=new k.DistributionPointName(U),Z=new k.DistributionPoint({dpobj:Y});this.setByDPArray([Z])},this.oid="2.5.29.31",y!==void 0&&(y.array!==void 0?this.setByDPArray(y.array):y.uri!==void 0&&this.setByOneURI(y.uri))},r.lang.extend(q.asn1.x509.CRLDistributionPoints,q.asn1.x509.Extension),q.asn1.x509.CertificatePolicies=function(y){q.asn1.x509.CertificatePolicies.superclass.constructor.call(this,y);var T=q,A=T.asn1,k=A.x509,z=A.DERSequence,U=k.PolicyInformation;this.params=null,this.getExtnValueHex=function(){for(var Y=[],Z=0;Z<this.params.array.length;Z++)Y.push(new U(this.params.array[Z]));var ue=new z({array:Y});return this.asn1ExtnValue=ue,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.32",y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.x509.CertificatePolicies,q.asn1.x509.Extension),q.asn1.x509.PolicyInformation=function(y){q.asn1.x509.PolicyInformation.superclass.constructor.call(this,y);var T=q.asn1,A=T.DERSequence,k=T.DERObjectIdentifier,z=T.x509.PolicyQualifierInfo;this.params=null,this.getEncodedHex=function(){if(this.params.policyoid===void 0&&this.params.array===void 0)throw new Error("parameter oid and array missing");var U=[new k({oid:this.params.policyoid})];if(this.params.array!==void 0){for(var Y=[],Z=0;Z<this.params.array.length;Z++)Y.push(new z(this.params.array[Z]));Y.length>0&&U.push(new A({array:Y}))}var ue=new A({array:U});return ue.getEncodedHex()},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.x509.PolicyInformation,q.asn1.ASN1Object),q.asn1.x509.PolicyQualifierInfo=function(y){q.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,y);var T=q.asn1,A=T.DERSequence,k=T.DERIA5String,z=T.DERObjectIdentifier,U=T.x509.UserNotice;this.params=null,this.getEncodedHex=function(){if(this.params.cps!==void 0){var Y=new A({array:[new z({oid:"1.3.6.1.5.5.7.2.1"}),new k({str:this.params.cps})]});return Y.getEncodedHex()}if(this.params.unotice!=null){var Y=new A({array:[new z({oid:"1.3.6.1.5.5.7.2.2"}),new U(this.params.unotice)]});return Y.getEncodedHex()}},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.x509.PolicyQualifierInfo,q.asn1.ASN1Object),q.asn1.x509.UserNotice=function(y){q.asn1.x509.UserNotice.superclass.constructor.call(this,y);var T=q.asn1.DERSequence;q.asn1.DERInteger;var A=q.asn1.x509.DisplayText,k=q.asn1.x509.NoticeReference;this.params=null,this.getEncodedHex=function(){var z=[];this.params.noticeref!==void 0&&z.push(new k(this.params.noticeref)),this.params.exptext!==void 0&&z.push(new A(this.params.exptext));var U=new T({array:z});return U.getEncodedHex()},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.x509.UserNotice,q.asn1.ASN1Object),q.asn1.x509.NoticeReference=function(y){q.asn1.x509.NoticeReference.superclass.constructor.call(this,y);var T=q.asn1.DERSequence,A=q.asn1.DERInteger,k=q.asn1.x509.DisplayText;this.params=null,this.getEncodedHex=function(){var z=[];if(this.params.org!==void 0&&z.push(new k(this.params.org)),this.params.noticenum!==void 0){for(var U=[],Y=this.params.noticenum,Z=0;Z<Y.length;Z++)U.push(new A(Y[Z]));z.push(new T({array:U}))}if(z.length==0)throw new Error("parameter is empty");var ue=new T({array:z});return ue.getEncodedHex()},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.x509.NoticeReference,q.asn1.ASN1Object),q.asn1.x509.DisplayText=function(y){q.asn1.x509.DisplayText.superclass.constructor.call(this,y),this.hT="0c",y!==void 0&&(y.type==="ia5"?this.hT="16":y.type==="vis"?this.hT="1a":y.type==="bmp"&&(this.hT="1e"))},r.lang.extend(q.asn1.x509.DisplayText,q.asn1.DERAbstractString),q.asn1.x509.ExtKeyUsage=function(y){q.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,y);var T=q,A=T.asn1;this.setPurposeArray=function(k){this.asn1ExtnValue=new A.DERSequence;for(var z=0;z<k.length;z++){var U=new A.DERObjectIdentifier(k[z]);this.asn1ExtnValue.appendASN1Object(U)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.37",y!==void 0&&y.array!==void 0&&this.setPurposeArray(y.array)},r.lang.extend(q.asn1.x509.ExtKeyUsage,q.asn1.x509.Extension),q.asn1.x509.AuthorityKeyIdentifier=function(y){q.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,y);var T=q,A=T.asn1,k=A.DERTaggedObject,z=A.x509.GeneralNames;T.crypto.Util.isKey,this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var U=new Array;this.asn1KID&&U.push(new k({explicit:!1,tag:"80",obj:this.asn1KID})),this.asn1CertIssuer&&U.push(new k({explicit:!1,tag:"a1",obj:new z([{dn:this.asn1CertIssuer}])})),this.asn1CertSN&&U.push(new k({explicit:!1,tag:"82",obj:this.asn1CertSN}));var Y=new A.DERSequence({array:U});return this.asn1ExtnValue=Y,this.asn1ExtnValue.getEncodedHex()}
404,this.setKIDByParam=function(U){if(U.str!==void 0||U.hex!==void 0)this.asn1KID=new q.asn1.DEROctetString(U);else if(typeof U=="object"&&q.crypto.Util.isKey(U)||typeof U=="string"&&U.indexOf("BEGIN ")!=-1){var Y=U;typeof U=="string"&&(Y=Zn.getKey(U));var Z=Zn.getKeyID(Y);this.asn1KID=new q.asn1.DEROctetString({hex:Z})}},this.setCertIssuerByParam=function(U){U.str!==void 0||U.ldapstr!==void 0||U.hex!==void 0||U.certsubject!==void 0||U.certissuer!==void 0?this.asn1CertIssuer=new q.asn1.x509.X500Name(U):typeof U=="string"&&U.indexOf("BEGIN ")!=-1&&U.indexOf("CERTIFICATE")!=-1&&(this.asn1CertIssuer=new q.asn1.x509.X500Name({certissuer:U}))},this.setCertSNByParam=function(U){if(U.str!==void 0||U.bigint!==void 0||U.hex!==void 0)this.asn1CertSN=new q.asn1.DERInteger(U);else if(typeof U=="string"&&U.indexOf("BEGIN ")!=-1&&U.indexOf("CERTIFICATE")){var Y=new Nn;Y.readCertPEM(U);var Z=Y.getSerialNumberHex();this.asn1CertSN=new q.asn1.DERInteger({hex:Z})}},this.oid="2.5.29.35",y!==void 0&&(y.kid!==void 0&&this.setKIDByParam(y.kid),y.issuer!==void 0&&this.setCertIssuerByParam(y.issuer),y.sn!==void 0&&this.setCertSNByParam(y.sn),y.issuersn!==void 0&&typeof y.issuersn=="string"&&y.issuersn.indexOf("BEGIN ")!=-1&&y.issuersn.indexOf("CERTIFICATE")&&(this.setCertSNByParam(y.issuersn),this.setCertIssuerByParam(y.issuersn)))},r.lang.extend(q.asn1.x509.AuthorityKeyIdentifier,q.asn1.x509.Extension),q.asn1.x509.SubjectKeyIdentifier=function(y){q.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this,y);var T=q,A=T.asn1,k=A.DEROctetString;this.asn1KID=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=this.asn1KID,this.asn1ExtnValue.getEncodedHex()},this.setKIDByParam=function(z){if(z.str!==void 0||z.hex!==void 0)this.asn1KID=new k(z);else if(typeof z=="object"&&q.crypto.Util.isKey(z)||typeof z=="string"&&z.indexOf("BEGIN")!=-1){var U=z;typeof z=="string"&&(U=Zn.getKey(z));var Y=Zn.getKeyID(U);this.asn1KID=new q.asn1.DEROctetString({hex:Y})}},this.oid="2.5.29.14",y!==void 0&&y.kid!==void 0&&this.setKIDByParam(y.kid)},r.lang.extend(q.asn1.x509.SubjectKeyIdentifier,q.asn1.x509.Extension),q.asn1.x509.AuthorityInfoAccess=function(y){q.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,y),this.setAccessDescriptionArray=function(T){for(var A=new Array,k=q,z=k.asn1,U=z.DERSequence,Y=0;Y<T.length;Y++){var Z=new z.DERObjectIdentifier(T[Y].accessMethod),ue=new z.x509.GeneralName(T[Y].accessLocation),he=new U({array:[Z,ue]});A.push(he)}this.asn1ExtnValue=new U({array:A})},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="1.3.6.1.5.5.7.1.1",y!==void 0&&y.array!==void 0&&this.setAccessDescriptionArray(y.array)},r.lang.extend(q.asn1.x509.AuthorityInfoAccess,q.asn1.x509.Extension),q.asn1.x509.SubjectAltName=function(y){q.asn1.x509.SubjectAltName.superclass.constructor.call(this,y),this.setNameArray=function(T){this.asn1ExtnValue=new q.asn1.x509.GeneralNames(T)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.17",y!==void 0&&y.array!==void 0&&this.setNameArray(y.array)},r.lang.extend(q.asn1.x509.SubjectAltName,q.asn1.x509.Extension),q.asn1.x509.IssuerAltName=function(y){q.asn1.x509.IssuerAltName.superclass.constructor.call(this,y),this.setNameArray=function(T){this.asn1ExtnValue=new q.asn1.x509.GeneralNames(T)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.18",y!==void 0&&y.array!==void 0&&this.setNameArray(y.array)},r.lang.extend(q.asn1.x509.IssuerAltName,q.asn1.x509.Extension),q.asn1.x509.CRL=function(y){q.asn1.x509.CRL.superclass.constructor.call(this),this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCertList.asn1SignatureAlg,sig=new q.crypto.Signature({alg:this.asn1SignatureAlg.nameAlg,prov:"cryptojs/jsrsa"}),sig.init(this.prvKey),sig.updateHex(this.asn1TBSCertList.getEncodedHex()),this.hexSig=sig.sign(),this.asn1Sig=new q.asn1.DERBitString({hex:"00"+this.hexSig});var T=new q.asn1.DERSequence({array:[this.asn1TBSCertList,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=T.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(this.isModified==!1&&this.hTLV!=null)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){var T=Vo(this.getEncodedHex());return`-----BEGIN X509 CRL-----\r
405`+T+`\r
406-----END X509 CRL-----\r
407`},y!==void 0&&(y.tbsobj!==void 0&&(this.asn1TBSCertList=y.tbsobj),y.prvkeyobj!==void 0&&(this.prvKey=y.prvkeyobj))},r.lang.extend(q.asn1.x509.CRL,q.asn1.ASN1Object),q.asn1.x509.TBSCertList=function(y){q.asn1.x509.TBSCertList.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERSequence,z=A.x509,U=z.Time;this.setSignatureAlgByParam=function(Y){this.asn1SignatureAlg=new z.AlgorithmIdentifier(Y)},this.setIssuerByParam=function(Y){this.asn1Issuer=new z.X500Name(Y)},this.setThisUpdateByParam=function(Y){this.asn1ThisUpdate=new U(Y)},this.setNextUpdateByParam=function(Y){this.asn1NextUpdate=new U(Y)},this.addRevokedCert=function(Y,Z){var ue={};Y!=null&&Y!=null&&(ue.sn=Y),Z!=null&&Z!=null&&(ue.time=Z);var he=new z.CRLEntry(ue);this.aRevokedCert.push(he)},this.getEncodedHex=function(){if(this.asn1Array=new Array,this.asn1Version!=null&&this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(this.asn1ThisUpdate),this.asn1NextUpdate!=null&&this.asn1Array.push(this.asn1NextUpdate),this.aRevokedCert.length>0){var Y=new k({array:this.aRevokedCert});this.asn1Array.push(Y)}var Z=new k({array:this.asn1Array});return this.hTLV=Z.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize=function(){this.asn1Version=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1ThisUpdate=null,this.asn1NextUpdate=null,this.aRevokedCert=new Array},this._initialize()},r.lang.extend(q.asn1.x509.TBSCertList,q.asn1.ASN1Object),q.asn1.x509.CRLEntry=function(y){q.asn1.x509.CRLEntry.superclass.constructor.call(this);var T=q,A=T.asn1;this.setCertSerial=function(k){this.sn=new A.DERInteger(k)},this.setRevocationDate=function(k){this.time=new A.x509.Time(k)},this.getEncodedHex=function(){var k=new A.DERSequence({array:[this.sn,this.time]});return this.TLV=k.getEncodedHex(),this.TLV},y!==void 0&&(y.time!==void 0&&this.setRevocationDate(y.time),y.sn!==void 0&&this.setCertSerial(y.sn))},r.lang.extend(q.asn1.x509.CRLEntry,q.asn1.ASN1Object),q.asn1.x509.X500Name=function(y){q.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=new Array;var T=q,A=T.asn1,k=A.x509;if(this.setByString=function(U){var Y=U.split("/");Y.shift();for(var Z=[],ue=0;ue<Y.length;ue++)if(Y[ue].match(/^[^=]+=.+$/))Z.push(Y[ue]);else{var he=Z.length-1;Z[he]=Z[he]+"/"+Y[ue]}for(var ue=0;ue<Z.length;ue++)this.asn1Array.push(new k.RDN({str:Z[ue]}))},this.setByLdapString=function(U){var Y=k.X500Name.ldapToCompat(U);this.setByString(Y)},this.setByObject=function(U){for(var Y in U)if(U.hasOwnProperty(Y)){var Z=new q.asn1.x509.RDN({str:Y+"="+U[Y]});this.asn1Array?this.asn1Array.push(Z):this.asn1Array=[Z]}},this.getEncodedHex=function(){if(typeof this.hTLV=="string")return this.hTLV;var U=new A.DERSequence({array:this.asn1Array});return this.hTLV=U.getEncodedHex(),this.hTLV},y!==void 0)if(y.str!==void 0)this.setByString(y.str);else if(y.ldapstr!==void 0)this.setByLdapString(y.ldapstr);else if(y.hex!==void 0)this.hTLV=y.hex;else if(y.certissuer!==void 0){var z=new Nn;z.readCertPEM(y.certissuer),this.hTLV=z.getIssuerHex()}
407else if(y.certsubject!==void 0){var z=new Nn;z.readCertPEM(y.certsubject),this.hTLV=z.getSubjectHex()}else typeof y=="object"&&y.certsubject===void 0&&y.certissuer===void 0&&this.setByObject(y)},r.lang.extend(q.asn1.x509.X500Name,q.asn1.ASN1Object),q.asn1.x509.X500Name.compatToLDAP=function(y){if(y.substr(0,1)!=="/")throw"malformed input";y=y.substr(1);var T=y.split("/");return T.reverse(),T=T.map(function(A){return A.replace(/,/,"\\,")}),T.join(",")},q.asn1.x509.X500Name.onelineToLDAP=function(y){return q.asn1.x509.X500Name.compatToLDAP(y)},q.asn1.x509.X500Name.ldapToCompat=function(y){for(var T=y.split(","),A=!1,k=[],z=0;T.length>0;z++){var U=T.shift();if(A===!0){var Y=k.pop(),Z=(Y+","+U).replace(/\\,/g,",");k.push(Z),A=!1}else k.push(U);U.substr(-1,1)==="\\"&&(A=!0)}return k=k.map(function(ue){return ue.replace("/","\\/")}),k.reverse(),"/"+k.join("/")},q.asn1.x509.X500Name.ldapToOneline=function(y){return q.asn1.x509.X500Name.ldapToCompat(y)},q.asn1.x509.RDN=function(y){q.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=new Array,this.addByString=function(T){this.asn1Array.push(new q.asn1.x509.AttributeTypeAndValue({str:T}))},this.addByMultiValuedString=function(T){for(var A=q.asn1.x509.RDN.parseString(T),k=0;k<A.length;k++)this.addByString(A[k])},this.getEncodedHex=function(){var T=new q.asn1.DERSet({array:this.asn1Array});return this.TLV=T.getEncodedHex(),this.TLV},y!==void 0&&y.str!==void 0&&this.addByMultiValuedString(y.str)},r.lang.extend(q.asn1.x509.RDN,q.asn1.ASN1Object),q.asn1.x509.RDN.parseString=function(y){for(var T=y.split(/\+/),A=!1,k=[],z=0;T.length>0;z++){var U=T.shift();if(A===!0){var Y=k.pop(),Z=(Y+"+"+U).replace(/\\\+/g,"+");k.push(Z),A=!1}else k.push(U);U.substr(-1,1)==="\\"&&(A=!0)}for(var ue=!1,he=[],z=0;k.length>0;z++){var U=k.shift();if(ue===!0){var Se=he.pop();if(U.match(/"$/)){var Z=(Se+"+"+U).replace(/^([^=]+)="(.*)"$/,"$1=$2");he.push(Z),ue=!1}else he.push(Se+"+"+U)}else he.push(U);U.match(/^[^=]+="/)&&(ue=!0)}return he},q.asn1.x509.AttributeTypeAndValue=function(y){q.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);var T="utf8",A=q,k=A.asn1;this.setByString=function(z){var U=z.match(/^([^=]+)=(.+)$/);if(U)this.setByAttrTypeAndValueStr(U[1],U[2]);else throw"malformed attrTypeAndValueStr: "+z},this.setByAttrTypeAndValueStr=function(z,U){this.typeObj=q.asn1.x509.OID.atype2obj(z);var Y=T;z=="C"&&(Y="prn"),this.valueObj=this.getValueObj(Y,U)},this.getValueObj=function(z,U){if(z=="utf8")return new k.DERUTF8String({str:U});if(z=="prn")return new k.DERPrintableString({str:U});if(z=="tel")return new k.DERTeletexString({str:U});if(z=="ia5")return new k.DERIA5String({str:U});throw"unsupported directory string type: type="+z+" value="+U},this.getEncodedHex=function(){var z=new k.DERSequence({array:[this.typeObj,this.valueObj]});return this.TLV=z.getEncodedHex(),this.TLV},y!==void 0&&y.str!==void 0&&this.setByString(y.str)},r.lang.extend(q.asn1.x509.AttributeTypeAndValue,q.asn1.ASN1Object),q.asn1.x509.SubjectPublicKeyInfo=function(y){q.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERInteger,z=A.DERBitString,U=A.DERObjectIdentifier,Y=A.DERSequence,Z=A.ASN1Util.newObject,ue=A.x509,he=ue.AlgorithmIdentifier,Se=T.crypto;Se.ECDSA,Se.DSA,this.getASN1Object=function(){if(this.asn1AlgId==null||this.asn1SubjPKey==null)throw"algId and/or subjPubKey not set";var we=new Y({array:[this.asn1AlgId,this.asn1SubjPKey]});return we},this.getEncodedHex=function(){var we=this.getASN1Object();return this.hTLV=we.getEncodedHex(),this.hTLV},this.setPubKey=function(we){try{if(we instanceof Br){var ee=Z({seq:[{int:{bigint:we.n}},{int:{int:we.e}}]}),oe=ee.getEncodedHex();this.asn1AlgId=new he({name:"rsaEncryption"}),this.asn1SubjPKey=new z({hex:"00"+oe})}}catch{}try{if(we instanceof q.crypto.ECDSA){var K=new U({name:we.curveName});this.asn1AlgId=new he({name:"ecPublicKey",asn1params:K}),this.asn1SubjPKey=new z({hex:"00"+we.pubKeyHex})}}catch{}try{if(we instanceof q.crypto.DSA){var K=new Z({seq:[{int:{bigint:we.p}},{int:{bigint:we.q}},{int:{bigint:we.g}}]});this.asn1AlgId=new he({name:"dsa",asn1params:K});var ne=new k({bigint:we.y});this.asn1SubjPKey=new z({hex:"00"+ne.getEncodedHex()})}}catch{}},y!==void 0&&this.setPubKey(y)},r.lang.extend(q.asn1.x509.SubjectPublicKeyInfo,q.asn1.ASN1Object),q.asn1.x509.Time=function(y){q.asn1.x509.Time.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERUTCTime,z=A.DERGeneralizedTime;this.setTimeParams=function(U){this.timeParams=U},this.getEncodedHex=function(){var U=null;return this.timeParams!=null?this.type=="utc"?U=new k(this.timeParams):U=new z(this.timeParams):this.type=="utc"?U=new k:U=new z,this.TLV=U.getEncodedHex(),this.TLV},this.type="utc",y!==void 0&&(y.type!==void 0?this.type=y.type:y.str!==void 0&&(y.str.match(/^[0-9]{12}
407Z$/)&&(this.type="utc"),y.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=y)},r.lang.extend(q.asn1.x509.Time,q.asn1.ASN1Object),q.asn1.x509.AlgorithmIdentifier=function(y){q.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var T=q,A=T.asn1,k=A.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.getEncodedHex=function(){if(this.nameAlg===null&&this.asn1Alg===null)throw new Error("algorithm not specified");if(this.nameAlg!==null){var U=null;for(var Y in k)Y===this.nameAlg&&(U=k[Y]);if(U!==null)return this.hTLV=U,this.hTLV}this.nameAlg!==null&&this.asn1Alg===null&&(this.asn1Alg=A.x509.OID.name2obj(this.nameAlg));var Z=[this.asn1Alg];this.asn1Params!==null&&Z.push(this.asn1Params);var ue=new A.DERSequence({array:Z});return this.hTLV=ue.getEncodedHex(),this.hTLV},y!==void 0&&(y.name!==void 0&&(this.nameAlg=y.name),y.asn1params!==void 0&&(this.asn1Params=y.asn1params),y.paramempty!==void 0&&(this.paramEmpty=y.paramempty)),this.asn1Params===null&&this.paramEmpty===!1&&this.nameAlg!==null){var z=this.nameAlg.toLowerCase();z.substr(-7,7)!=="withdsa"&&z.substr(-9,9)!=="withecdsa"&&(this.asn1Params=new A.DERNull)}},r.lang.extend(q.asn1.x509.AlgorithmIdentifier,q.asn1.ASN1Object),q.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"},q.asn1.x509.GeneralName=function(y){q.asn1.x509.GeneralName.superclass.constructor.call(this);var T={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87"},A=q,k=A.asn1;k.DERSequence;var z=k.DEROctetString,U=k.DERIA5String,Y=k.DERTaggedObject,Z=k.ASN1Object,ue=k.x509.X500Name,he=_i;this.explicit=!1,this.setByParam=function(Se){var we=null;if(Se!==void 0){if(Se.rfc822!==void 0&&(this.type="rfc822",we=new U({str:Se[this.type]})),Se.dns!==void 0&&(this.type="dns",we=new U({str:Se[this.type]})),Se.uri!==void 0&&(this.type="uri",we=new U({str:Se[this.type]})),Se.dn!==void 0&&(this.type="dn",this.explicit=!0,typeof Se.dn=="string"?we=new ue({str:Se.dn}):Se.dn instanceof q.asn1.x509.X500Name?we=Se.dn:we=new ue(Se.dn)),Se.ldapdn!==void 0&&(this.type="dn",this.explicit=!0,we=new ue({ldapstr:Se.ldapdn})),Se.certissuer!==void 0){this.type="dn",this.explicit=!0;var ee=Se.certissuer,oe=null;if(ee.match(/^[0-9A-Fa-f]+$/),ee.indexOf("-----BEGIN ")!=-1&&(oe=he(ee)),oe==null)throw"certissuer param not cert";var K=new Nn;K.hex=oe;var ne=K.getIssuerHex();we=new Z,we.hTLV=ne}if(Se.certsubj!==void 0){this.type="dn",this.explicit=!0;var ee=Se.certsubj,oe=null;if(ee.match(/^[0-9A-Fa-f]+$/),ee.indexOf("-----BEGIN ")!=-1&&(oe=he(ee)),oe==null)throw"certsubj param not cert";var K=new Nn;K.hex=oe;var ne=K.getSubjectHex();we=new Z,we.hTLV=ne}if(Se.ip!==void 0){this.type="ip",this.explicit=!1;var se=Se.ip,be,Ie="malformed IP address";if(se.match(/^[0-9.]+[.][0-9.]+$/)){if(be=to("["+se.split(".").join(",")+"]"),be.length!==8)throw Ie}else if(se.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/))be=Xu(se);else if(se.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))be=se;else throw Ie;we=new z({hex:be})}if(this.type==null)throw"unsupported type in params="+Se;this.asn1Obj=new Y({explicit:this.explicit,tag:T[this.type],obj:we})}},this.getEncodedHex=function(){return this.asn1Obj.getEncodedHex()},y!==void 0&&this.setByParam(y)},r.lang.extend(q.asn1.x509.GeneralName,q.asn1.ASN1Object),q.asn1.x509.GeneralNames=function(y){q.asn1.x509.GeneralNames.superclass.constructor.call(this);var T=q,A=T.asn1;this.setByParamArray=function(k){for(var z=0;z<k.length;z++){var U=new A.x509.GeneralName(k[z]);this.asn1Array.push(U)}},this.getEncodedHex=function(){var k=new A.DERSequence({array:this.asn1Array});return k.getEncodedHex()},this.asn1Array=new Array,typeof y<"u"&&this.setByParamArray(y)},r.lang.extend(q.asn1.x509.GeneralNames,q.asn1.ASN1Object),q.asn1.x509.DistributionPointName=function(y){q.asn1.x509.DistributionPointName.superclass.constructor.call(this);var T=q,A=T.asn1,k=A.DERTaggedObject;
407if(this.getEncodedHex=function(){if(this.type!="full")throw"currently type shall be 'full': "+this.type;return this.asn1Obj=new k({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.getEncodedHex(),this.hTLV},y!==void 0)if(A.x509.GeneralNames.prototype.isPrototypeOf(y))this.type="full",this.tag="a0",this.asn1V=y;else throw"This class supports GeneralNames only as argument"},r.lang.extend(q.asn1.x509.DistributionPointName,q.asn1.ASN1Object),q.asn1.x509.DistributionPoint=function(y){q.asn1.x509.DistributionPoint.superclass.constructor.call(this);var T=q,A=T.asn1;this.getEncodedHex=function(){var k=new A.DERSequence;if(this.asn1DP!=null){var z=new A.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});k.appendASN1Object(z)}return this.hTLV=k.getEncodedHex(),this.hTLV},y!==void 0&&y.dpobj!==void 0&&(this.asn1DP=y.dpobj)},r.lang.extend(q.asn1.x509.DistributionPoint,q.asn1.ASN1Object),q.asn1.x509.OID=new function(y){this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.name2oidList={sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",ecPublicKey:"1.2.840.10045.2.1",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",extensionRequest:"1.2.840.113549.1.9.14"},this.objCache={},this.name2obj=function(T){if(typeof this.objCache[T]<"u")return this.objCache[T];if(typeof this.name2oidList[T]>
407"u")throw"Name of ObjectIdentifier not defined: "+T;var A=this.name2oidList[T],k=new q.asn1.DERObjectIdentifier({oid:A});return this.objCache[T]=k,k},this.atype2obj=function(T){if(typeof this.objCache[T]<"u")return this.objCache[T];if(typeof this.atype2oidList[T]>"u")throw"AttributeType name undefined: "+T;var A=this.atype2oidList[T],k=new q.asn1.DERObjectIdentifier({oid:A});return this.objCache[T]=k,k}},q.asn1.x509.OID.oid2name=function(y){var T=q.asn1.x509.OID.name2oidList;for(var A in T)if(T[A]==y)return A;return""},q.asn1.x509.OID.oid2atype=function(y){var T=q.asn1.x509.OID.atype2oidList;for(var A in T)if(T[A]==y)return A;return y},q.asn1.x509.OID.name2oid=function(y){var T=q.asn1.x509.OID.name2oidList;return T[y]===void 0?"":T[y]},q.asn1.x509.X509Util={},q.asn1.x509.X509Util.newCertPEM=function(y){var T=q.asn1.x509,A=T.TBSCertificate,k=T.Certificate,z=new A;if(y.serial!==void 0)z.setSerialNumberByParam(y.serial);else throw"serial number undefined.";if(typeof y.sigalg.name=="string")z.setSignatureAlgByParam(y.sigalg);else throw"unproper signature algorithm name";if(y.issuer!==void 0)z.setIssuerByParam(y.issuer);else throw"issuer name undefined.";if(y.notbefore!==void 0)z.setNotBeforeByParam(y.notbefore);else throw"notbefore undefined.";if(y.notafter!==void 0)z.setNotAfterByParam(y.notafter);else throw"notafter undefined.";if(y.subject!==void 0)z.setSubjectByParam(y.subject);else throw"subject name undefined.";if(y.sbjpubkey!==void 0)z.setSubjectPublicKeyByGetKey(y.sbjpubkey);else throw"subject public key undefined.";if(y.ext!==void 0&&y.ext.length!==void 0)for(var U=0;U<y.ext.length;U++)for(key in y.ext[U])z.appendExtensionByName(key,y.ext[U][key]);if(y.cakey===void 0&&y.sighex===void 0)throw"param cakey and sighex undefined.";var Y=null,Z=null;return y.cakey&&(y.cakey.isPrivate===!0?Y=y.cakey:Y=Zn.getKey.apply(null,y.cakey),Z=new k({tbscertobj:z,prvkeyobj:Y}),Z.sign()),y.sighex&&(Z=new k({tbscertobj:z}),Z.setSignatureHex(y.sighex)),Z.getPEMString()},(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),(typeof q.asn1.cms>"u"||!q.asn1.cms)&&(q.asn1.cms={}),q.asn1.cms.Attribute=function(y){var T=q,A=T.asn1;A.cms.Attribute.superclass.constructor.call(this),this.getEncodedHex=function(){var k,z,U;k=new A.DERObjectIdentifier({oid:this.attrTypeOid}),z=new A.DERSet({array:this.valueList});try{z.getEncodedHex()}catch(Y){throw"fail valueSet.getEncodedHex in Attribute(1)/"+Y}U=new A.DERSequence({array:[k,z]});try{this.hTLV=U.getEncodedHex()}catch(Y){throw"failed seq.getEncodedHex in Attribute(2)/"+Y}return this.hTLV}},r.lang.extend(q.asn1.cms.Attribute,q.asn1.ASN1Object),q.asn1.cms.ContentType=function(y){var T=q,A=T.asn1;A.cms.ContentType.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.3";var k=null;if(typeof y<"u"){var k=new A.DERObjectIdentifier(y);this.valueList=[k]}},r.lang.extend(q.asn1.cms.ContentType,q.asn1.cms.Attribute),q.asn1.cms.MessageDigest=function(y){var T=q,A=T.asn1,k=A.DEROctetString,z=A.cms;if(z.MessageDigest.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.4",y!==void 0)if(y.eciObj instanceof z.EncapsulatedContentInfo&&typeof y.hashAlg=="string"){var U=y.eciObj.eContentValueHex,Y=y.hashAlg,Z=T.crypto.Util.hashHex(U,Y),ue=new k({hex:Z});ue.getEncodedHex(),this.valueList=[ue]}else{var ue=new k(y);ue.getEncodedHex(),this.valueList=[ue]}},r.lang.extend(q.asn1.cms.MessageDigest,q.asn1.cms.Attribute),q.asn1.cms.SigningTime=function(y){var T=q,A=T.asn1;if(A.cms.SigningTime.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.5",y!==void 0){var k=new A.x509.Time(y);try{k.getEncodedHex()}catch(z){throw"SigningTime.getEncodedHex() failed/"+z}this.valueList=[k]}},r.lang.extend(q.asn1.cms.SigningTime,q.asn1.cms.Attribute),q.asn1.cms.SigningCertificate=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.cms;T.crypto,z.SigningCertificate.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.12",this.setCerts=function(U){for(var Y=[],Z=0;Z<U.length;Z++){var ue=_i(U[Z]),he=T.crypto.Util.hashHex(ue,"sha1"),Se=new A.DEROctetString({hex:he});Se.getEncodedHex();var we=new z.IssuerSerial({cert:U[Z]});we.getEncodedHex();var ee=new k({array:[Se,we]});ee.getEncodedHex(),Y.push(ee)}var oe=new k({array:Y});oe.getEncodedHex(),this.valueList=[oe]},y!==void 0&&typeof y.array=="object"&&this.setCerts(y.array)},r.lang.extend(q.asn1.cms.SigningCertificate,q.asn1.cms.Attribute),q.asn1.cms.SigningCertificateV2=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.x509,U=A.cms,Y=T.crypto;if(U.SigningCertificateV2.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.47",this.setCerts=function(ue,he){for(var Se=[],we=0;we<ue.length;we++){var ee=_i(ue[we]),oe=[];he!=="sha256"&&oe.push(new z.AlgorithmIdentifier({name:he}));var K=Y.Util.hashHex(ee,he),ne=new A.DEROctetString({hex:K});ne.getEncodedHex(),oe.push(ne);var se=new U.IssuerSerial({cert:ue[we]});se.getEncodedHex(),oe.push(se);var be=new k({array:oe});
407be.getEncodedHex(),Se.push(be)}var Ie=new k({array:Se});Ie.getEncodedHex(),this.valueList=[Ie]},y!==void 0&&typeof y.array=="object"){var Z="sha256";typeof y.hashAlg=="string"&&(Z=y.hashAlg),this.setCerts(y.array,Z)}},r.lang.extend(q.asn1.cms.SigningCertificateV2,q.asn1.cms.Attribute),q.asn1.cms.IssuerSerial=function(y){var T=q,A=T.asn1,k=A.DERInteger,z=A.cms,U=A.x509,Y=U.X500Name,Z=U.GeneralNames,ue=Nn;z.IssuerSerial.superclass.constructor.call(this),this.setByCertPEM=function(he){var Se=_i(he),we=new ue;we.hex=Se;var ee=we.getIssuerHex();this.dIssuer=new Y,this.dIssuer.hTLV=ee;var oe=we.getSerialNumberHex();this.dSerial=new k({hex:oe})},this.getEncodedHex=function(){var he=new Z([{dn:this.dIssuer}]),Se=new A.DERSequence({array:[he,this.dSerial]});return this.hTLV=Se.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y=="string"&&y.indexOf("-----BEGIN ")!=-1&&this.setByCertPEM(y),y.issuer&&y.serial&&(y.issuer instanceof Y?this.dIssuer=y.issuer:this.dIssuer=new Y(y.issuer),y.serial instanceof k?this.dSerial=y.serial:this.dSerial=new k(y.serial)),typeof y.cert=="string"&&this.setByCertPEM(y.cert))},r.lang.extend(q.asn1.cms.IssuerSerial,q.asn1.ASN1Object),q.asn1.cms.IssuerAndSerialNumber=function(y){var T=q,A=T.asn1,k=A.DERInteger,z=A.cms,U=A.x509,Y=U.X500Name,Z=Nn;z.IssuerAndSerialNumber.superclass.constructor.call(this),this.setByCertPEM=function(ue){var he=_i(ue),Se=new Z;Se.hex=he;var we=Se.getIssuerHex();this.dIssuer=new Y,this.dIssuer.hTLV=we;var ee=Se.getSerialNumberHex();this.dSerial=new k({hex:ee})},this.getEncodedHex=function(){var ue=new A.DERSequence({array:[this.dIssuer,this.dSerial]});return this.hTLV=ue.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y=="string"&&y.indexOf("-----BEGIN ")!=-1&&this.setByCertPEM(y),y.issuer&&y.serial&&(y.issuer instanceof Y?this.dIssuer=y.issuer:this.dIssuer=new Y(y.issuer),y.serial instanceof k?this.dSerial=y.serial:this.dSerial=new k(y.serial)),typeof y.cert=="string"&&this.setByCertPEM(y.cert))},r.lang.extend(q.asn1.cms.IssuerAndSerialNumber,q.asn1.ASN1Object),q.asn1.cms.AttributeList=function(y){var T=q,A=T.asn1,k=A.cms;k.AttributeList.superclass.constructor.call(this),this.list=new Array,this.sortFlag=!0,this.add=function(z){z instanceof k.Attribute&&this.list.push(z)},this.length=function(){return this.list.length},this.clear=function(){this.list=new Array,this.hTLV=null,this.hV=null},this.getEncodedHex=function(){if(typeof this.hTLV=="string")return this.hTLV;var z=new A.DERSet({array:this.list,sortflag:this.sortFlag});return this.hTLV=z.getEncodedHex(),this.hTLV},y!==void 0&&typeof y.sortflag<"u"&&y.sortflag==!1&&(this.sortFlag=!1)},r.lang.extend(q.asn1.cms.AttributeList,q.asn1.ASN1Object),q.asn1.cms.SignerInfo=function(y){var T=q,A=T.asn1,k=A.DERTaggedObject,z=A.cms,U=z.AttributeList,Y=z.ContentType,Z=z.EncapsulatedContentInfo,ue=z.MessageDigest,he=z.SignedData,Se=A.x509,we=Se.AlgorithmIdentifier,ee=T.crypto,oe=Zn;z.SignerInfo.superclass.constructor.call(this),this.dCMSVersion=new A.DERInteger({int:1}),this.dSignerIdentifier=null,this.dDigestAlgorithm=null,this.dSignedAttrs=new U,this.dSigAlg=null,this.dSig=null,this.dUnsignedAttrs=new U,this.setSignerIdentifier=function(K){typeof K=="string"&&K.indexOf("CERTIFICATE")!=-1&&K.indexOf("BEGIN")!=-1&&K.indexOf("END")!=-1&&(this.dSignerIdentifier=new z.IssuerAndSerialNumber({cert:K}))},this.setForContentAndHash=function(K){K!==void 0&&(K.eciObj instanceof Z&&(this.dSignedAttrs.add(new Y({oid:"1.2.840.113549.1.7.1"})),this.dSignedAttrs.add(new ue({eciObj:K.eciObj,hashAlg:K.hashAlg}))),K.sdObj!==void 0&&K.sdObj instanceof he&&K.sdObj.digestAlgNameList.join(":").indexOf(K.hashAlg)==-1&&K.sdObj.digestAlgNameList.push(K.hashAlg),typeof K.hashAlg=="string"&&(this.dDigestAlgorithm=new we({name:K.hashAlg})))},this.sign=function(K,ne){this.dSigAlg=new we({name:ne});var se=this.dSignedAttrs.getEncodedHex(),be=oe.getKey(K),Ie=new ee.Signature({alg:ne});Ie.init(be),Ie.updateHex(se);var Ge=Ie.sign();this.dSig=new A.DEROctetString({hex:Ge})},this.addUnsigned=function(K){this.hTLV=null,this.dUnsignedAttrs.hTLV=null,this.dUnsignedAttrs.add(K)},this.getEncodedHex=function(){if(this.dSignedAttrs instanceof U&&this.dSignedAttrs.length()==0)throw"SignedAttrs length = 0 (empty)";var K=new k({obj:this.dSignedAttrs,tag:"a0",explicit:!1}),ne=null;this.dUnsignedAttrs.length()>0&&(ne=new k({obj:this.dUnsignedAttrs,tag:"a1",explicit:!1}));var se=[this.dCMSVersion,this.dSignerIdentifier,this.dDigestAlgorithm,K,this.dSigAlg,this.dSig];ne!=null&&se.push(ne);var be=new A.DERSequence({array:se});return this.hTLV=be.getEncodedHex(),this.hTLV}},r.lang.extend(q.asn1.cms.SignerInfo,q.asn1.ASN1Object),q.asn1.cms.EncapsulatedContentInfo=function(y){var T=q,A=T.asn1,k=A.DERTaggedObject,z=A.DERSequence,U=A.DERObjectIdentifier,Y=A.DEROctetString,Z=A.cms;Z.EncapsulatedContentInfo.superclass.constructor.call(this),this.dEContentType=new U({name:"data"}),this.dEContent=null,this.isDetached=!1,this.eContentValueHex=null,this.setContentType=function(ue){ue.match(/^[0-2][.][0-9.]+$/)?this.dEContentType=new U({oid:ue}):this.dEContentType=new U({name:ue})},this.setContentValue=function(ue){ue!==void 0&&(typeof ue.hex=="string"?this.eContentValueHex=ue.hex:typeof ue.str=="string"&&(this.eContentValueHex=ko(ue.str)))},this.setContentValueHex=function(ue){this.eContentValueHex=ue},this.setContentValueStr=function(ue){this.eContentValueHex=ko(ue)},this.getEncodedHex=function(){if(typeof this.eContentValueHex!="string")throw"eContentValue not yet set";var ue=new Y({hex:this.eContentValueHex});this.dEContent=new k({obj:ue,tag:"a0",explicit:!0});var he=[this.dEContentType];this.isDetached||he.push(this.dEContent);var Se=new z({array:he});return this.hTLV=Se.getEncodedHex(),this.hTLV}},r.lang.extend(q.asn1.cms.EncapsulatedContentInfo,q.asn1.ASN1Object),q.asn1.cms.ContentInfo=function(y){var T=q,A=T.asn1,k=A.DERTaggedObject,z=A.DERSequence,U=A.x509;q.asn1.cms.ContentInfo.superclass.constructor.call(this),this.dContentType=null,this.dContent=null,this.setContentType=function(Y){typeof Y=="string"&&(this.dContentType=U.OID.name2obj(Y))},this.getEncodedHex=function(){var Y=new k({obj:this.dContent,tag:"a0",explicit:!0}),Z=new z({array:[this.dContentType,Y]});return this.hTLV=Z.getEncodedHex(),this.hTLV},y!==void 0&&(y.type&&this.setContentType(y.type),y.obj&&y.obj instanceof A.ASN1Object&&(this.dContent=y.obj))},r.lang.extend(q.asn1.cms.ContentInfo,q.asn1.ASN1Object),q.asn1.cms.SignedData=function(y){var T=q,A=T.asn1,k=A.ASN1Object,z=A.DERInteger,U=A.DERSet,Y=A.DERSequence,Z=A.DERTaggedObject,ue=A.cms,he=ue.EncapsulatedContentInfo,Se=ue.SignerInfo,we=ue.ContentInfo,ee=A.x509,oe=ee.AlgorithmIdentifier;q.asn1.cms.SignedData.superclass.constructor.call(this),this.dCMSVersion=new z({int:1}),this.dDigestAlgs=null,this.digestAlgNameList=[],this.dEncapContentInfo=new he,this.dCerts=null,this.certificateList=[],this.crlList=[],this.signerInfoList=[new Se],this.addCertificatesByPEM=function(K){var ne=_i(K),se=new k;se.hTLV=ne,this.certificateList.push(se)},this.getEncodedHex=function(){if(typeof this.hTLV=="string")return this.hTLV;if(this.dDigestAlgs==null){for(var K=[],ne=0;ne<this.digestAlgNameList.length;ne++){var se=this.digestAlgNameList[ne],be=new oe({name:se});K.push(be)}this.dDigestAlgs=new U({array:K})}var Ie=[this.dCMSVersion,this.dDigestAlgs,this.dEncapContentInfo];if(this.dCerts==null&&this.certificateList.length>0){var Ge=new U({array:this.certificateList});this.dCerts=new Z({obj:Ge,tag:"a0",explicit:!1})}this.dCerts!=null&&Ie.push(this.dCerts);var $e=new U({array:this.signerInfoList});Ie.push($e);var je=new Y({array:Ie});return this.hTLV=je.getEncodedHex(),this.hTLV},this.getContentInfo=function(){this.getEncodedHex();var K=new we({type:"signed-data",obj:this});return K},this.getContentInfoEncodedHex=function(){var K=this.getContentInfo(),ne=K.getEncodedHex();return ne},this.getPEM=function(){return da(this.getContentInfoEncodedHex(),"CMS")}},r.lang.extend(q.asn1.cms.SignedData,q.asn1.ASN1Object),q.asn1.cms.CMSUtil=new function(){},q.asn1.cms.CMSUtil.newSignedData=function(y){var T=q,A=T.asn1,k=A.cms,z=k.SignerInfo,U=k.SignedData,Y=k.SigningTime,Z=k.SigningCertificate,ue=k.SigningCertificateV2,he=A.cades,Se=he.SignaturePolicyIdentifier,we=new U;if(we.dEncapContentInfo.setContentValue(y.content),typeof y.detached=="boolean"&&(we.dEncapContentInfo.isDetached=y.detached),typeof y.certs=="object")for(var ee=0;
407ee<y.certs.length;ee++)we.addCertificatesByPEM(y.certs[ee]);we.signerInfoList=[];for(var ee=0;ee<y.signerInfos.length;ee++){var oe=y.signerInfos[ee],K=new z;K.setSignerIdentifier(oe.signerCert),K.setForContentAndHash({sdObj:we,eciObj:we.dEncapContentInfo,hashAlg:oe.hashAlg});for(attrName in oe.sAttr){var ne=oe.sAttr[attrName];if(attrName=="SigningTime"){var se=new Y(ne);K.dSignedAttrs.add(se)}if(attrName=="SigningCertificate"){var se=new Z(ne);K.dSignedAttrs.add(se)}if(attrName=="SigningCertificateV2"){var se=new ue(ne);K.dSignedAttrs.add(se)}if(attrName=="SignaturePolicyIdentifier"){var se=new Se(ne);K.dSignedAttrs.add(se)}}K.sign(oe.signerPrvKey,oe.sigAlg),we.signerInfoList.push(K)}return we},q.asn1.cms.CMSUtil.verifySignedData=function(y){var T=q,A=T.asn1,k=A.cms;k.SignerInfo,k.SignedData,k.SigningTime,k.SigningCertificate,k.SigningCertificateV2;var z=A.cades;z.SignaturePolicyIdentifier;var U=T.lang.String.isHex,Y=_r,Z=Y.getVbyList,ue=Y.getTLVbyList,he=Y.getIdxbyList,Se=Y.getChildIdx,we=Y.getTLV,ee=Y.oidname,oe=T.crypto.Util.hashHex;y.cms===void 0&&U(y.cms);var K=y.cms,ne=function(rt,ct){for(var Lt,er=3;er<6;er++)if(Lt=he(rt,0,[1,0,er]),Lt!==void 0){var Xt=rt.substr(Lt,2);Xt==="a0"&&(ct.certsIdx=Lt),Xt==="a1"&&(ct.revinfosIdx=Lt),Xt==="31"&&(ct.signerinfosIdx=Lt)}},se=function(rt,ct){var Lt=ct.signerinfosIdx;if(Lt!==void 0){var er=Se(rt,Lt);ct.signerInfoIdxList=er;for(var Xt=0;Xt<er.length;Xt++){var Pr=er[Xt],ot={idx:Pr};be(rt,ot),ct.signerInfos.push(ot)}}},be=function(rt,ct){var Lt=ct.idx;ct.signerid_issuer1=ue(rt,Lt,[1,0],"30"),ct.signerid_serial1=Z(rt,Lt,[1,1],"02"),ct.hashalg=ee(Z(rt,Lt,[2,0],"06"));var er=he(rt,Lt,[3],"a0");ct.idxSignedAttrs=er,Ie(rt,ct,er);var Xt=Se(rt,Lt),Pr=Xt.length;if(Pr<6)throw"malformed SignerInfo";ct.sigalg=ee(Z(rt,Lt,[Pr-2,0],"06")),ct.sigval=Z(rt,Lt,[Pr-1],"04")},Ie=function(rt,ct,Lt){var er=Se(rt,Lt);ct.signedAttrIdxList=er;for(var Xt=0;Xt<er.length;Xt++){var Pr=er[Xt],ot=Z(rt,Pr,[0],"06"),wt;ot==="2a864886f70d010905"?(wt=Qi(Z(rt,Pr,[1,0])),ct.saSigningTime=wt):ot==="2a864886f70d010904"&&(wt=Z(rt,Pr,[1,0],"04"),ct.saMessageDigest=wt)}},Ge=function(rt,ct){if(Z(rt,0,[0],"06")!=="2a864886f70d010702")return ct;ct.cmsType="signedData",ct.econtent=Z(rt,0,[1,0,2,1,0]),ne(rt,ct),ct.signerInfos=[],se(rt,ct)},$e=function(rt,ct){for(var Lt=ct.parse.signerInfos,er=Lt.length,Xt=!0,Pr=0;Pr<er;Pr++){var ot=Lt[Pr];zt(rt,ct,ot),ot.isValid||(Xt=!1)}ct.isValid=Xt},je=function(rt,ct,Lt,er){var Xt=ct.parse.certsIdx,Pr;if(ct.certs===void 0){Pr=[],ct.certkeys=[];for(var ot=Se(rt,Xt),wt=0;wt<ot.length;wt++){var It=we(rt,ot[wt]),Ht=new Nn;Ht.readCertHex(It),Pr[wt]=Ht,ct.certkeys[wt]=Ht.getPublicKey()}ct.certs=Pr}else Pr=ct.certs;ct.cccc=Pr.length,ct.cccci=ot.length;for(var wt=0;wt<Pr.length;wt++){var Ha=Ht.getIssuerHex(),hi=Ht.getSerialNumberHex();Lt.signerid_issuer1===Ha&&Lt.signerid_serial1===hi&&(Lt.certkey_idx=wt)}},zt=function(rt,ct,Lt,er){Lt.verifyDetail={};var Xt=Lt.verifyDetail,Pr=ct.parse.econtent,ot=Lt.hashalg,wt=Lt.saMessageDigest;Xt.validMessageDigest=!1,oe(Pr,ot)===wt&&(Xt.validMessageDigest=!0),je(rt,ct,Lt),Xt.validSignatureValue=!1;var It=Lt.sigalg,Ht="31"+we(rt,Lt.idxSignedAttrs).substr(2);Lt.signedattrshex=Ht;var Ha=ct.certs[Lt.certkey_idx].getPublicKey(),hi=new q.crypto.Signature({alg:It});hi.init(Ha),hi.updateHex(Ht);var ki=hi.verify(Lt.sigval);Xt.validSignatureValue_isValid=ki,ki===!0&&(Xt.validSignatureValue=!0),Lt.isValid=!1,Xt.validMessageDigest&&Xt.validSignatureValue&&(Lt.isValid=!0)},xt={isValid:!1,parse:{}};return Ge(K,xt.parse),$e(K,xt),xt},(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),(typeof q.asn1.tsp>"u"||!q.asn1.tsp)&&(q.asn1.tsp={}),q.asn1.tsp.Accuracy=function(y){var T=q,A=T.asn1,k=A.DERInteger,z=A.DERSequence,U=A.DERTaggedObject;A.tsp.Accuracy.superclass.constructor.call(this),this.seconds=null,this.millis=null,this.micros=null,this.getEncodedHex=function(){var Y=null,Z=null,ue=null,he=[];if(this.seconds!=null&&(Y=new k({int:this.seconds}),he.push(Y)),this.millis!=null){var Se=new k({int:this.millis});Z=new U({obj:Se,tag:"80",explicit:!1}),he.push(Z)}if(this.micros!=null){var we=new k({int:this.micros});ue=new U({obj:we,tag:"81",explicit:!1}),he.push(ue)}var ee=new z({array:he});return this.hTLV=ee.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y.seconds=="number"&&(this.seconds=y.seconds),typeof y.millis=="number"&&(this.millis=y.millis),typeof y.micros=="number"&&(this.micros=y.micros))},r.lang.extend(q.asn1.tsp.Accuracy,q.asn1.ASN1Object),q.asn1.tsp.MessageImprint=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.DEROctetString,U=A.x509,Y=U.AlgorithmIdentifier;A.tsp.MessageImprint.superclass.constructor.call(this),this.dHashAlg=null,this.dHashValue=null,this.getEncodedHex=function(){if(typeof this.hTLV=="string")return this.hTLV;var Z=new k({array:[this.dHashAlg,this.dHashValue]});return Z.getEncodedHex()},y!==void 0&&(typeof y.hashAlg=="string"&&(this.dHashAlg=new Y({name:y.hashAlg})),typeof y.hashValue=="string"&&(this.dHashValue=new z({hex:y.hashValue})))},r.lang.extend(q.asn1.tsp.MessageImprint,q.asn1.ASN1Object),q.asn1.tsp.TimeStampReq=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.DERInteger,U=A.DERBoolean,Y=A.DERObjectIdentifier,Z=A.tsp,ue=Z.MessageImprint;Z.TimeStampReq.superclass.constructor.call(this),this.dVersion=new z({int:1}),this.dMessageImprint=null,this.dPolicy=null,this.dNonce=null,this.certReq=!0,this.setMessageImprint=function(he){if(he instanceof ue){this.dMessageImprint=he;return}typeof he=="object"&&(this.dMessageImprint=new ue(he))},this.getEncodedHex=function(){if(this.dMessageImprint==null)throw"messageImprint shall be specified";var he=[this.dVersion,this.dMessageImprint];this.dPolicy!=null&&he.push(this.dPolicy),this.dNonce!=null&&he.push(this.dNonce),this.certReq&&he.push(new U);var Se=new k({array:he});return this.hTLV=Se.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y.mi=="object"&&this.setMessageImprint(y.mi),typeof y.policy=="object"&&(this.dPolicy=new Y(y.policy)),typeof y.nonce=="object"&&(this.dNonce=new z(y.nonce)),typeof y.certreq=="boolean"&&(this.certReq=y.certreq))},r.lang.extend(q.asn1.tsp.TimeStampReq,q.asn1.ASN1Object),q.asn1.tsp.TSTInfo=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.DERInteger,U=A.DERBoolean,Y=A.DERGeneralizedTime,Z=A.DERObjectIdentifier,ue=A.tsp,he=ue.MessageImprint,Se=ue.Accuracy,we=A.x509.X500Name;if(ue.TSTInfo.superclass.constructor.call(this),this.dVersion=new z({int:1}),this.dPolicy=null,this.dMessageImprint=null,this.dSerialNumber=null,this.dGenTime=null,this.dAccuracy=null,this.dOrdering=null,this.dNonce=null,this.dTsa=null,this.getEncodedHex=function(){var ee=[this.dVersion];if(this.dPolicy==null)throw"policy shall be specified.";if(ee.push(this.dPolicy),this.dMessageImprint==null)throw"messageImprint shall be specified.";if(ee.push(this.dMessageImprint),this.dSerialNumber==null)throw"serialNumber shall be specified.";if(ee.push(this.dSerialNumber),this.dGenTime==null)throw"genTime shall be specified.";ee.push(this.dGenTime),this.dAccuracy!=null&&ee.push(this.dAccuracy),this.dOrdering!=null&&ee.push(this.dOrdering),this.dNonce!=null&&ee.push(this.dNonce),this.dTsa!=null&&ee.push(this.dTsa);var oe=new k({array:ee});return this.hTLV=oe.getEncodedHex(),this.hTLV},y!==void 0){if(typeof y.policy=="string"){if(!y.policy.match(/^[0-9.]+$/))throw"policy shall be oid like 0.1.4.134";this.dPolicy=new Z({oid:y.policy})}y.messageImprint!==void 0&&(this.dMessageImprint=new he(y.messageImprint)),y.serialNumber!==void 0&&(this.dSerialNumber=new z(y.seri
407alNumber)),y.genTime!==void 0&&(this.dGenTime=new Y(y.genTime)),y.accuracy!==void 0&&(this.dAccuracy=new Se(y.accuracy)),y.ordering!==void 0&&y.ordering==!0&&(this.dOrdering=new U),y.nonce!==void 0&&(this.dNonce=new z(y.nonce)),y.tsa!==void 0&&(this.dTsa=new we(y.tsa))}},r.lang.extend(q.asn1.tsp.TSTInfo,q.asn1.ASN1Object),q.asn1.tsp.TimeStampResp=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.ASN1Object,U=A.tsp,Y=U.PKIStatusInfo;U.TimeStampResp.superclass.constructor.call(this),this.dStatus=null,this.dTST=null,this.getEncodedHex=function(){if(this.dStatus==null)throw"status shall be specified";var Z=[this.dStatus];this.dTST!=null&&Z.push(this.dTST);var ue=new k({array:Z});return this.hTLV=ue.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y.status=="object"&&(this.dStatus=new Y(y.status)),y.tst!==void 0&&y.tst instanceof z&&(this.dTST=y.tst.getContentInfo()))},r.lang.extend(q.asn1.tsp.TimeStampResp,q.asn1.ASN1Object),q.asn1.tsp.PKIStatusInfo=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.tsp,U=z.PKIStatus,Y=z.PKIFreeText,Z=z.PKIFailureInfo;z.PKIStatusInfo.superclass.constructor.call(this),this.dStatus=null,this.dStatusString=null,this.dFailureInfo=null,this.getEncodedHex=function(){if(this.dStatus==null)throw"status shall be specified";var ue=[this.dStatus];this.dStatusString!=null&&ue.push(this.dStatusString),this.dFailureInfo!=null&&ue.push(this.dFailureInfo);var he=new k({array:ue});return this.hTLV=he.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y.status=="object"&&(this.dStatus=new U(y.status)),typeof y.statstr=="object"&&(this.dStatusString=new Y({array:y.statstr})),typeof y.failinfo=="object"&&(this.dFailureInfo=new Z(y.failinfo)))},r.lang.extend(q.asn1.tsp.PKIStatusInfo,q.asn1.ASN1Object),q.asn1.tsp.PKIStatus=function(y){var T=q,A=T.asn1,k=A.DERInteger,z=A.tsp,U=z.PKIStatus;if(z.PKIStatus.superclass.constructor.call(this),this.getEncodedHex=function(){return this.hTLV=this.dStatus.getEncodedHex(),this.hTLV},y!==void 0)if(y.name!==void 0){var Y=U.valueList;if(Y[y.name]===void 0)throw"name undefined: "+y.name;this.dStatus=new k({int:Y[y.name]})}else this.dStatus=new k(y)},r.lang.extend(q.asn1.tsp.PKIStatus,q.asn1.ASN1Object),q.asn1.tsp.PKIStatus.valueList={granted:0,grantedWithMods:1,rejection:2,waiting:3,revocationWarning:4,revocationNotification:5},q.asn1.tsp.PKIFreeText=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.DERUTF8String,U=A.tsp;U.PKIFreeText.superclass.constructor.call(this),this.textList=[],this.getEncodedHex=function(){for(var Y=[],Z=0;Z<this.textList.length;Z++)Y.push(new z({str:this.textList[Z]}));var ue=new k({array:Y});return this.hTLV=ue.getEncodedHex(),this.hTLV},y!==void 0&&typeof y.array=="object"&&(this.textList=y.array)},r.lang.extend(q.asn1.tsp.PKIFreeText,q.asn1.ASN1Object),q.asn1.tsp.PKIFailureInfo=function(y){var T=q,A=T.asn1,k=A.DERBitString,z=A.tsp,U=z.PKIFailureInfo;if(U.superclass.constructor.call(this),this.value=null,this.getEncodedHex=function(){if(this.value==null)throw"value shall be specified";var Z=new Number(this.value).toString(2),ue=new k;return ue.setByBinaryString(Z),this.hTLV=ue.getEncodedHex(),this.hTLV},y!==void 0)if(typeof y.name=="string"){var Y=U.valueList;if(Y[y.name]===void 0)throw"name undefined: "+y.name;this.value=Y[y.name]}else typeof y.int=="number"&&(this.value=y.int)},r.lang.extend(q.asn1.tsp.PKIFailureInfo,q.asn1.ASN1Object),q.asn1.tsp.PKIFailureInfo.valueList={badAlg:0,badRequest:2,badDataFormat:5,timeNotAvailable:14,unacceptedPolicy:15,unacceptedExtension:16,addInfoNotAvailable:17,systemFailure:25},q.asn1.tsp.AbstractTSAAdapter=function(y){this.getTSTHex=function(T,A){throw"not implemented yet"}},q.asn1.tsp.SimpleTSAAdapter=function(y){var T=q,A=T.asn1,k=A.tsp,z=T.crypto.Util.hashHex;k.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(U,Y){var Z=z(U,Y);this.params.tstInfo.messageImprint={hashAlg:Y,hashValue:Z},this.params.tstInfo.serialNumber={int:this.serial++};var ue=Math.floor(Math.random()*1e9);this.params.tstInfo.nonce={int:ue};var he=k.TSPUtil.newTimeStampToken(this.params);return he.getContentInfoEncodedHex()},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.tsp.SimpleTSAAdapter,q.asn1.tsp.AbstractTSAAdapter),q.asn1.tsp.FixedTSAAdapter=function(y){var T=q,A=T.asn1,k=A.tsp,z=T.crypto.Util.hashHex;k.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(U,Y){var Z=z(U,Y);this.params.tstInfo.messageImprint={hashAlg:Y,hashValue:Z};var ue=k.TSPUtil.newTimeStampToken(this.params);return ue.getContentInfoEncodedHex()},y!==void 0&&(this.params=y)},r.lang.extend(q.asn1.tsp.FixedTSAAdapter,q.asn1.tsp.AbstractTSAAdapter),q.asn1.tsp.TSPUtil=new function(){},q.asn1.tsp.TSPUtil.newTimeStampToken=function(y){var T=q,A=T.asn1,k=A.cms;A.tsp;var z=A.tsp.TSTInfo,U=new k.SignedData,Y=new z(y.tstInfo),Z=Y.getEncodedHex();if(U.dEncapContentInfo.setContentValue({hex:Z}),U.dEncapContentInfo.setContentType("tstinfo"),typeof y.certs=="object")for(var ue=0;
407ue<y.certs.length;ue++)U.addCertificatesByPEM(y.certs[ue]);var he=U.signerInfoList[0];he.setSignerIdentifier(y.signerCert),he.setForContentAndHash({sdObj:U,eciObj:U.dEncapContentInfo,hashAlg:y.hashAlg});var Se=new k.SigningCertificate({array:[y.signerCert]});return he.dSignedAttrs.add(Se),he.sign(y.signerPrvKey,y.sigAlg),U},q.asn1.tsp.TSPUtil.parseTimeStampReq=function(y){var T=_r,A=T.getChildIdx,k=T.getV,z=T.getTLV,U={};U.certreq=!1;var Y=A(y,0);if(Y.length<2)throw"TimeStampReq must have at least 2 items";var Z=z(y,Y[1]);U.mi=q.asn1.tsp.TSPUtil.parseMessageImprint(Z);for(var ue=2;ue<Y.length;ue++){var he=Y[ue],Se=y.substr(he,2);if(Se=="06"){var we=k(y,he);U.policy=T.hextooidstr(we)}Se=="02"&&(U.nonce=k(y,he)),Se=="01"&&(U.certreq=!0)}return U},q.asn1.tsp.TSPUtil.parseMessageImprint=function(y){var T=_r,A=T.getChildIdx,k=T.getV,z=T.getIdxbyList,U={};if(y.substr(0,2)!="30")throw"head of messageImprint hex shall be '30'";A(y,0);var Y=z(y,0,[0,0]),Z=k(y,Y),ue=T.hextooidstr(Z),he=q.asn1.x509.OID.oid2name(ue);if(he=="")throw"hashAlg name undefined: "+ue;var Se=he,we=z(y,0,[1]);return U.hashAlg=Se,U.hashValue=k(y,we),U},(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),(typeof q.asn1.cades>"u"||!q.asn1.cades)&&(q.asn1.cades={}),q.asn1.cades.SignaturePolicyIdentifier=function(y){var T=q,A=T.asn1,k=A.DERObjectIdentifier,z=A.DERSequence,U=A.cades,Y=U.OtherHashAlgAndValue;if(U.SignaturePolicyIdentifier.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.15",y!==void 0&&typeof y.oid=="string"&&typeof y.hash=="object"){var Z=new k({oid:y.oid}),ue=new Y(y.hash),he=new z({array:[Z,ue]});this.valueList=[he]}}
407,r.lang.extend(q.asn1.cades.SignaturePolicyIdentifier,q.asn1.cms.Attribute),q.asn1.cades.OtherHashAlgAndValue=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.DEROctetString,U=A.x509,Y=U.AlgorithmIdentifier,Z=A.cades,ue=Z.OtherHashAlgAndValue;ue.superclass.constructor.call(this),this.dAlg=null,this.dHash=null,this.getEncodedHex=function(){var he=new k({array:[this.dAlg,this.dHash]});return this.hTLV=he.getEncodedHex(),this.hTLV},y!==void 0&&typeof y.alg=="string"&&typeof y.hash=="string"&&(this.dAlg=new Y({name:y.alg}),this.dHash=new z({hex:y.hash}))},r.lang.extend(q.asn1.cades.OtherHashAlgAndValue,q.asn1.ASN1Object),q.asn1.cades.SignatureTimeStamp=function(y){var T=q,A=T.asn1,k=A.ASN1Object;A.x509;var z=A.cades;if(z.SignatureTimeStamp.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.14",this.tstHex=null,y!==void 0){if(y.res!==void 0&&!(typeof y.res=="string"&&y.res.match(/^[0-9A-Fa-f]+$/))){if(!(y.res instanceof k))throw"res param shall be ASN1Object or hex string"}if(y.tst!==void 0){if(typeof y.tst=="string"&&y.tst.match(/^[0-9A-Fa-f]+$/)){var U=new k;this.tstHex=y.tst,U.hTLV=this.tstHex,U.getEncodedHex(),this.valueList=[U]}else if(!(y.tst instanceof k))throw"tst param shall be ASN1Object or hex string"}}}
407,r.lang.extend(q.asn1.cades.SignatureTimeStamp,q.asn1.cms.Attribute),q.asn1.cades.CompleteCertificateRefs=function(y){var T=q,A=T.asn1,k=A.cades;k.CompleteCertificateRefs.superclass.constructor.call(this),this.attrTypeOid="1.2.840.113549.1.9.16.2.21",this.setByArray=function(z){this.valueList=[];for(var U=0;U<z.length;U++){var Y=new k.OtherCertID(z[U]);this.valueList.push(Y)}},y!==void 0&&typeof y=="object"&&typeof y.length=="number"&&this.setByArray(y)},r.lang.extend(q.asn1.cades.CompleteCertificateRefs,q.asn1.cms.Attribute),q.asn1.cades.OtherCertID=function(y){var T=q,A=T.asn1,k=A.cms,z=A.cades;z.OtherCertID.superclass.constructor.call(this),this.hasIssuerSerial=!0,this.dOtherCertHash=null,this.dIssuerSerial=null,this.setByCertPEM=function(U){this.dOtherCertHash=new z.OtherHash(U),this.hasIssuerSerial&&(this.dIssuerSerial=new k.IssuerAndSerialNumber(U))},this.getEncodedHex=function(){if(this.hTLV!=null)return this.hTLV;if(this.dOtherCertHash==null)throw"otherCertHash not set";var U=[this.dOtherCertHash];this.dIssuerSerial!=null&&U.push(this.dIssuerSerial);var Y=new A.DERSequence({array:U});return this.hTLV=Y.getEncodedHex(),this.hTLV},y!==void 0&&(typeof y=="string"&&y.indexOf("-----BEGIN ")!=-1&&this.setByCertPEM(y),typeof y=="object"&&(y.hasis===!1&&(this.hasIssuerSerial=!1),typeof y.cert=="string"&&this.setByCertPEM(y.cert)))}
407,r.lang.extend(q.asn1.cades.OtherCertID,q.asn1.ASN1Object),q.asn1.cades.OtherHash=function(y){var T=q,A=T.asn1;A.cms;var k=A.cades,z=k.OtherHashAlgAndValue,U=T.crypto.Util.hashHex;if(k.OtherHash.superclass.constructor.call(this),this.alg="sha256",this.dOtherHash=null,this.setByCertPEM=function(Y){if(Y.indexOf("-----BEGIN ")==-1)throw"certPEM not to seem PEM format";var Z=_i(Y),ue=U(Z,this.alg);this.dOtherHash=new z({alg:this.alg,hash:ue})},this.getEncodedHex=function(){if(this.dOtherHash==null)throw"OtherHash not set";return this.dOtherHash.getEncodedHex()},y!==void 0)if(typeof y=="string")if(y.indexOf("-----BEGIN ")!=-1)this.setByCertPEM(y);else if(y.match(/^[0-9A-Fa-f]+$/))this.dOtherHash=new A.DEROctetString({hex:y});else throw"unsupported string value for params";else typeof y=="object"&&(typeof y.cert=="string"?(typeof y.alg=="string"&&(this.alg=y.alg),this.setByCertPEM(y.cert)):this.dOtherHash=new z(y))},r.lang.extend(q.asn1.cades.OtherHash,q.asn1.ASN1Object),q.asn1.cades.CAdESUtil=new function(){},q.asn1.cades.CAdESUtil.addSigTS=function(y,T,A){},q.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned=function(y){var T=_r,A=T.getChildIdx,k=T.getTLV,z=T.getTLVbyList;T.getTLVbyListEx;var U=T.getIdxbyList;T.getIdxbyListEx;var Y=q,Z=Y.asn1,ue=Z.ASN1Object,he=Z.cms,Se=he.SignedData,we=Z.cades,ee=we.CAdESUtil,oe={};if(z(y,0,[0])!="06092a864886f70d010702")throw"hex is not CMS SignedData";var K=U(y,0,[1,0]),ne=A(y,K);if(ne.length<4)throw"num of SignedData elem shall be 4 at least";var se=ne.shift();oe.version=k(y,se);var be=ne.shift();oe.algs=k(y,be);var Ie=ne.shift();oe.encapcontent=k(y,Ie),oe.certs=null,oe.revs=null,oe.si=[];var Ge=ne.shift();y.substr(Ge,2)=="a0"&&(oe.certs=k(y,Ge),Ge=ne.shift()),y.substr(Ge,2)=="a1"&&(oe.revs=k(y,Ge),Ge=ne.shift());var $e=Ge;if(y.substr($e,2)!="31")throw"Can't find signerInfos";for(var je=A(y,$e),zt=0;zt<je.length;zt++){var xt=je[zt],rt=ee.parseSignerInfoForAddingUnsigned(y,xt,zt);oe.si[zt]=rt}var ct=null;oe.obj=new Se,ct=new ue,ct.hTLV=oe.version,oe.obj.dCMSVersion=ct,ct=new ue,ct.hTLV=oe.algs,oe.obj.dDigestAlgs=ct,ct=new ue,ct.hTLV=oe.encapcontent,oe.obj.dEncapContentInfo=ct,ct=new ue,ct.hTLV=oe.certs,oe.obj.dCerts=ct,oe.obj.signerInfoList=[];for(var zt=0;zt<oe.si.length;zt++)oe.obj.signerInfoList.push(oe.si[zt].obj);return oe},q.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned=function(y,T,A){var k=_r,z=k.getChildIdx,U=k.getTLV,Y=k.getV,Z=q,ue=Z.asn1,he=ue.ASN1Object,Se=ue.cms,we=Se.AttributeList,ee=Se.SignerInfo,oe={},K=z(y,T);if(K.length!=6)throw"not supported items for SignerInfo (!=6)";var ne=K.shift();oe.version=U(y,ne);var se=K.shift();oe.si=U(y,se);var be=K.shift();oe.digalg=U(y,be);var Ie=K.shift();oe.sattrs=U(y,Ie);var Ge=K.shift();oe.sigalg=U(y,Ge);var $e=K.shift();oe.sig=U(y,$e),oe.sigval=Y(y,$e);var je=null;return oe.obj=new ee,je=new he,je.hTLV=oe.version,oe.obj.dCMSVersion=je,je=new he,je.hTLV=oe.si,oe.obj.dSignerIdentifier=je,je=new he,je.hTLV=oe.digalg,oe.obj.dDigestAlgorithm=je,je=new he,je.hTLV=oe.sattrs,oe.obj.dSignedAttrs=je,je=new he,je.hTLV=oe.sigalg,oe.obj.dSigAlg=je,je=new he,je.hTLV=oe.sig,oe.obj.dSig=je,oe.obj.dUnsignedAttrs=new we,oe},(typeof q.asn1.csr>"u"||!q.asn1.csr)&&(q.asn1.csr={}),q.asn1.csr.CertificationRequest=function(y){var T=q,A=T.asn1,k=A.DERBitString,z=A.DERSequence,U=A.csr,Y=A.x509;U.CertificationRequest.superclass.constructor.call(this),this.sign=function(Z,ue){this.prvKey==null&&(this.prvKey=ue),this.asn1SignatureAlg=new Y.AlgorithmIdentifier({name:Z});var he=new T.crypto.Signature({alg:Z});he.init(this.prvKey),he.updateHex(this.asn1CSRInfo.getEncodedHex()),this.hexSig=he.sign(),this.asn1Sig=new k({hex:"00"+this.hexSig});var Se=new z({array:[this.asn1CSRInfo,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=Se.getEncodedHex(),this.isModified=!1},this.getPEMString=function(){return da(this.getEncodedHex(),"CERTIFICATE REQUEST")},this.getEncodedHex=function(){if(this.isModified==!1&&this.hTLV!=null)return this.hTLV;throw"not signed yet"},y!==void 0&&y.csrinfo!==void 0&&(this.asn1CSRInfo=y.csrinfo)},r.lang.extend(q.asn1.csr.CertificationRequest,q.asn1.ASN1Object),q.asn1.csr.CertificationRequestInfo=function(y){var T=q,A=T.asn1,k=A.DERInteger,z=A.DERSequence,U=A.DERSet,Y=A.DERNull,Z=A.DERTaggedObject,ue=A.DERObjectIdentifier,he=A.csr,Se=A.x509,we=Se.X500Name,ee=Se.Extension,oe=Zn;he.CertificationRequestInfo.superclass.constructor.call(this),this._initialize=function(){this.asn1Array=new Array,this.asn1Version=new k({int:0}),this.asn1Subject=null,this.asn1SubjPKey=null,this.extensionsArray=new Array}
407,this.setSubjectByParam=function(K){this.asn1Subject=new we(K)},this.setSubjectPublicKeyByGetKey=function(K){var ne=oe.getKey(K);this.asn1SubjPKey=new Se.SubjectPublicKeyInfo(ne)},this.appendExtensionByName=function(K,ne){ee.appendByNameToArray(K,ne,this.extensionsArray)},this.getEncodedHex=function(){if(this.asn1Array=new Array,this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1Subject),this.asn1Array.push(this.asn1SubjPKey),this.extensionsArray.length>0){var K=new z({array:this.extensionsArray}),ne=new U({array:[K]}),se=new z({array:[new ue({oid:"1.2.840.113549.1.9.14"}),ne]}),be=new Z({explicit:!0,tag:"a0",obj:se});this.asn1Array.push(be)}else{var be=new Z({explicit:!1,tag:"a0",obj:new Y});this.asn1Array.push(be)}var Ie=new z({array:this.asn1Array});return this.hTLV=Ie.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},r.lang.extend(q.asn1.csr.CertificationRequestInfo,q.asn1.ASN1Object),q.asn1.csr.CSRUtil=new function(){},q.asn1.csr.CSRUtil.newCSRPEM=function(y){var T=Zn,A=q.asn1.csr;if(y.subject===void 0)throw"parameter subject undefined";if(y.sbjpubkey===void 0)throw"parameter sbjpubkey undefined";if(y.sigalg===void 0)throw"parameter sigalg undefined";if(y.sbjprvkey===void 0)throw"parameter sbjpubkey undefined";var k=new A.CertificationRequestInfo;if(k.setSubjectByParam(y.subject),k.setSubjectPublicKeyByGetKey(y.sbjpubkey),y.ext!==void 0&&y.ext.length!==void 0)for(var z=0;z<y.ext.length;z++)for(key in y.ext[z])k.appendExtensionByName(key,y.ext[z][key]);var U=new A.CertificationRequest({csrinfo:k}),Y=T.getKey(y.sbjprvkey);U.sign(y.sigalg,Y);var Z=U.getPEMString();return Z},q.asn1.csr.CSRUtil.getInfo=function(y){var T=_r,A=T.getTLVbyListEx,k={};if(k.subject={},k.pubkey={},y.indexOf("-----BEGIN CERTIFICATE REQUEST")==-1)throw"argument is not PEM file";var z=_i(y,"CERTIFICATE REQUEST");try{k.subject.hex=A(z,0,[0,1])}catch{}try{k.subject.name=Nn.hex2dn(k.subject.hex)}catch{}k.pubkey.hex=A(z,0,[0,2]),k.pubkey.obj=Zn.getKey(k.pubkey.hex,null,"pkcs8pub");try{k.ext=[];var U=new Nn;U.parseExt(y),k.ext.push({subjectAltName:{array:U.getExtSubjectAltName2()}})}catch{}return k},(typeof q>"u"||!q)&&(q={}),(typeof q.asn1>"u"||!q.asn1)&&(q.asn1={}),(typeof q.asn1.ocsp>"u"||!q.asn1.ocsp)&&(q.asn1.ocsp={}),q.asn1.ocsp.DEFAULT_HASH="sha1",q.asn1.ocsp.CertID=function(y){var T=q,A=T.asn1,k=A.DEROctetString,z=A.DERInteger,U=A.DERSequence,Y=A.x509,Z=Y.AlgorithmIdentifier,ue=A.ocsp,he=ue.DEFAULT_HASH,Se=T.crypto,we=Se.Util.hashHex,ee=Nn,oe=_r;if(ue.CertID.superclass.constructor.call(this),this.dHashAlg=null,this.dIssuerNameHash=null,this.dIssuerKeyHash=null,this.dSerialNumber=null,this.setByValue=function(se,be,Ie,Ge){Ge===void 0&&(Ge=he),this.dHashAlg=new Z({name:Ge}),this.dIssuerNameHash=new k({hex:se}),this.dIssuerKeyHash=new k({hex:be}),this.dSerialNumber=new z({hex:Ie})},this.setByCert=function(se,be,Ie){Ie===void 0&&(Ie=he);var Ge=new ee;Ge.readCertPEM(be);var $e=new ee;$e.readCertPEM(se);var je=$e.getPublicKeyHex(),zt=oe.getTLVbyList(je,0,[1,0],"30"),xt=Ge.getSerialNumberHex(),rt=we($e.getSubjectHex(),Ie),ct=we(zt,Ie);this.setByValue(rt,ct,xt,Ie),this.hoge=Ge.getSerialNumberHex()},this.getEncodedHex=function(){if(this.dHashAlg===null&&this.dIssuerNameHash===null&&this.dIssuerKeyHash===null&&this.dSerialNumber===null)throw"not yet set values";var se=[this.dHashAlg,this.dIssuerNameHash,this.dIssuerKeyHash,this.dSerialNumber],be=new U({array:se});return this.hTLV=be.getEncodedHex(),this.hTLV},y!==void 0){var K=y;if(K.issuerCert!==void 0&&K.subjectCert!==void 0){var ne=he;K.alg===void 0&&(ne=void 0),this.setByCert(K.issuerCert,K.subjectCert,ne)}else if(K.namehash!==void 0&&K.keyhash!==void 0&&K.serial!==void 0){var ne=he;K.alg===void 0&&(ne=void 0),this.setByValue(K.namehash,K.keyhash,K.serial,ne)}else throw"invalid constructor arguments"}},r.lang.extend(q.asn1.ocsp.CertID,q.asn1.ASN1Object),q.asn1.ocsp.Request=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.ocsp;if(z.Request.superclass.constructor.call(this),this.dReqCert=null,this.dExt=null,this.getEncodedHex=function(){var Y=[];if(this.dReqCert===null)throw"reqCert not set";Y.push(this.dReqCert);var Z=new k({array:Y});return this.hTLV=Z.getEncodedHex(),this.hTLV},typeof y<"u"){var U=new z.CertID(y);this.dReqCert=U}},r.lang.extend(q.asn1.ocsp.Request,q.asn1.ASN1Object),q.asn1.ocsp.TBSRequest=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.ocsp;z.TBSRequest.superclass.constructor.call(this),this.version=0,this.dRequestorName=null,this.dRequestList=[],this.dRequestExt=null,this.setRequestListByParam=function(U){for(var Y=[],Z=0;Z<U.length;
407Z++){var ue=new z.Request(U[0]);Y.push(ue)}this.dRequestList=Y},this.getEncodedHex=function(){var U=[];if(this.version!==0)throw"not supported version: "+this.version;if(this.dRequestorName!==null)throw"requestorName not supported";var Y=new k({array:this.dRequestList});if(U.push(Y),this.dRequestExt!==null)throw"requestExtensions not supported";var Z=new k({array:U});return this.hTLV=Z.getEncodedHex(),this.hTLV},y!==void 0&&y.reqList!==void 0&&this.setRequestListByParam(y.reqList)},r.lang.extend(q.asn1.ocsp.TBSRequest,q.asn1.ASN1Object),q.asn1.ocsp.OCSPRequest=function(y){var T=q,A=T.asn1,k=A.DERSequence,z=A.ocsp;if(z.OCSPRequest.superclass.constructor.call(this),this.dTbsRequest=null,this.dOptionalSignature=null,this.getEncodedHex=function(){var Y=[];if(this.dTbsRequest!==null)Y.push(this.dTbsRequest);else throw"tbsRequest not set";if(this.dOptionalSignature!==null)throw"optionalSignature not supported";var Z=new k({array:Y});return this.hTLV=Z.getEncodedHex(),this.hTLV},y!==void 0&&y.reqList!==void 0){var U=new z.TBSRequest(y);this.dTbsRequest=U}},r.lang.extend(q.asn1.ocsp.OCSPRequest,q.asn1.ASN1Object),q.asn1.ocsp.OCSPUtil={},q.asn1.ocsp.OCSPUtil.getRequestHex=function(y,T,A){var k=q,z=k.asn1,U=z.ocsp;A===void 0&&(A=U.DEFAULT_HASH);var Y={alg:A,issuerCert:y,subjectCert:T},Z=new U.OCSPRequest({reqList:[Y]});return Z.getEncodedHex()},q.asn1.ocsp.OCSPUtil.getOCSPResponseInfo=function(y){var T=_r,A=T.getVbyList,k=T.getVbyListEx,z=T.getIdxbyList;T.getIdxbyListEx;var U=T.getV,Y={};try{var Z=k(y,0,[0],"0a");Y.responseStatus=parseInt(Z,16)}catch{}if(Y.responseStatus!==0)return Y;try{var ue=z(y,0,[1,0,1,0,0,2,0,1]);y.substr(ue,2)==="80"?Y.certStatus="good":y.substr(ue,2)==="a1"?(Y.certStatus="revoked",Y.revocationTime=Qi(A(y,ue,[0]))):y.substr(ue,2)==="82"&&(Y.certStatus="unknown")}catch{}try{var he=z(y,0,[1,0,1,0,0,2,0,2]);Y.thisUpdate=Qi(U(y,he))}catch{}try{var Se=z(y,0,[1,0,1,0,0,2,0,3]);y.substr(Se,2)==="a0"&&(Y.nextUpdate=Qi(A(y,Se,[0])))}catch{}return Y};var q;(typeof q>"u"||!q)&&(q={}),(typeof q.lang>"u"||!q.lang)&&(q.lang={}),q.lang.String=function(){};function Hh(y){for(var T=new Array,A=0;A<y.length;A++)T[A]=y.charCodeAt(A);return T}function Xm(y){for(var T="",A=0;A<y.length;A++)T=T+String.fromCharCode(y[A]);return T}function Ec(y){for(var T="",A=0;A<y.length;A++){var k=y[A].toString(16);k.length==1&&(k="0"+k),T=T+k}return T}function Ys(y){return Ec(Hh(y))}function x0(y){return o(Ys(y))}function nu(y){return _s(o(Ys(y)))}function lf(y){return Xm(l(bs(y)))}function _s(y){return y=y.replace(/\=/g,""),y=y.replace(/\+/g,"-"),y=y.replace(/\//g,"_"),y}function bs(y){return y.length%4==2?y=y+"==":y.length%4==3&&(y=y+"="),y=y.replace(/-/g,"+"),y=y.replace(/_/g,"/"),y}function Ii(y){return y.length%2==1&&(y="0"+y),_s(o(y))}function yn(y){return s(bs(y))}var vl,So;typeof Buffer=="function"?(vl=function(y){return _s(new Buffer(y,"utf8").toString("base64"))},So=function(y){return new Buffer(bs(y),"base64").toString("utf8")}
407):(vl=function(y){return Ii(jh(Co(y)))},So=function(y){return decodeURIComponent(Ss(yn(y)))});function iu(y){return o(jh(Co(y)))}function cf(y){return decodeURIComponent(Ss(s(y)))}function ko(y){return jh(Co(y))}function Qi(y){return decodeURIComponent(Ss(y))}function gl(y){for(var T="",A=0;A<y.length-1;A+=2)T+=String.fromCharCode(parseInt(y.substr(A,2),16));return T}function Es(y){for(var T="",A=0;A<y.length;A++)T+=("0"+y.charCodeAt(A).toString(16)).slice(-2);return T}function Uh(y){return o(y)}function Vo(y){var T=Uh(y),A=T.replace(/(.{64})/g,`$1\r
408`);return A=A.replace(/\r\n$/,""),A}function ws(y){var T=y.replace(/[^0-9A-Za-z\/+=]*/g,""),A=s(T);return A}function da(y,T){var A=Vo(y);return"-----BEGIN "+T+`-----\r
409`+A+`\r
410-----END `+T+`-----\r
411`}function _i(y,T){if(y.indexOf("-----BEGIN ")==-1)throw"can't find PEM header: "+T;return T!==void 0?(y=y.replace(new RegExp("^[^]*-----BEGIN "+T+"-----"),""),y=y.replace(new RegExp("-----END "+T+"-----[^]*$"),"")):(y=y.replace(/^[^]*-----BEGIN [^-]+-----/,""),y=y.replace(/-----END [^-]+-----[^]*$/,"")),ws(y)}function Vh(y){if(y.length%2!=0)throw"input is not even length";if(y.match(/^[0-9A-Fa-f]+$/)==null)throw"input is not hexadecimal";for(var T=new ArrayBuffer(y.length/2),A=new DataView(T),k=0;k<y.length/2;k++)A.setUint8(k,parseInt(y.substr(k*2,2),16));return T}function au(y){for(var T="",A=new DataView(y),k=0;k<y.byteLength;k++)T+=("00"+A.getUint8(k).toString(16)).slice(-2);return T}function Yu(y){var T,A,k,z,U,Y,Z,ue,he,Se,we;if(we=y.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/),we)return ue=we[1],T=parseInt(ue),ue.length===2&&(50<=T&&T<100?T=1900+T:0<=T&&T<50&&(T=2e3+T)),A=parseInt(we[2])-1,k=parseInt(we[3]),z=parseInt(we[4]),U=parseInt(we[5]),Y=parseInt(we[6]),Z=0,he=we[7],he!==""&&(Se=(he.substr(1)+"00").substr(0,3),Z=parseInt(Se)),Date.UTC(T,A,k,z,U,Y,Z);throw"unsupported zulu format: "+y}function Kl(y){var T=Yu(y);return~~(T/1e3)}function qo(y){return new Date(Yu(y))}function qh(y,T,A){var k,z=y.getUTCFullYear();if(T){if(z<1950||2049<z)throw"not proper year for UTCTime: "+z;k=(""+z).slice(-2)}else k=("000"+z).slice(-4);if(k+=("0"+(y.getUTCMonth()+1)).slice(-2),k+=("0"+y.getUTCDate()).slice(-2),k+=("0"+y.getUTCHours()).slice(-2),k+=("0"+y.getUTCMinutes()).slice(-2),k+=("0"+y.getUTCSeconds()).slice(-2),A){var U=y.getUTCMilliseconds();U!==0&&(U=("00"+U).slice(-3),U=U.replace(/0+$/g,""),k+="."+U)}return k+="Z",k}function jh(y){return y.replace(/%/g,"")}function Ss(y){return y.replace(/(..)/g,"%$1")}function Xu(y){var T="malformed IPv6 address";if(!y.match(/^[0-9A-Fa-f:]+$/))throw T;y=y.toLowerCase();var A=y.split(":").length-1;if(A<2)throw T;var k=":".repeat(7-A+2);y=y.replace("::",k);var z=y.split(":");if(z.length!=8)throw T;for(var U=0;U<8;U++)z[U]=("0000"+z[U]).slice(-4);return z.join("")}function T0(y){if(!y.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";y=y.toLowerCase();for(var T=y.match(/.{1,4}/g),A=0;A<8;A++)T[A]=T[A].replace(/^0+/,""),T[A]==""&&(T[A]="0");y=":"+T.join(":")+":";var k=y.match(/:(0:){2,}/g);if(k===null)return y.slice(1,-1);for(var z="",A=0;A<k.length;A++)k[A].length>z.length&&(z=k[A]);return y=y.replace(z,"::"),y.slice(1,-1)}function $h(y){var T="malformed hex value";if(!y.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw T;if(y.length==8){var A;try{return A=parseInt(y.substr(0,2),16)+"."+parseInt(y.substr(2,2),16)+"."+parseInt(y.substr(4,2),16)+"."+parseInt(y.substr(6,2),16),A}catch{throw T}}else return y.length==32?T0(y):y}function Zm(y){var T="malformed IP address";if(y=y.toLowerCase(y),y.match(/^[0-9.]+$/)){var A=y.split(".");if(A.length!==4)throw T;var k="";try{for(var z=0;z<4;z++){var U=parseInt(A[z]);k+=("0"+U.toString(16)).slice(-2)}return k}catch{throw T}}else{if(y.match(/^[0-9a-f:]+$/)&&y.indexOf(":")!==-1)return Xu(y);throw T}}function Co(y){for(var T=encodeURIComponent(y),A="",k=0;k<T.length;k++)T[k]=="%"?(A=A+T.substr(k,3),k=k+2):A=A+"%"+Ys(T[k]);return A}function K_(y){return y=y.replace(/\r\n/mg,`
412`),y}function ou(y){return y=y.replace(/\r\n/mg,`
413`),y=y.replace(/\n/mg,`\r
414`),y}q.lang.String.isInteger=function(y){return y.match(/^[0-9]+$/)?!0:!!y.match(/^-[0-9]+$/)},q.lang.String.isHex=function(y){return!!(y.length%2==0&&(y.match(/^[0-9a-f]+$/)||y.match(/^[0-9A-F]+$/)))},q.lang.String.isBase64=function(y){return y=y.replace(/\s+/g,""),
414!!(y.match(/^[0-9A-Za-z+\/]+={0,3}$/)&&y.length%4==0)},q.lang.String.isBase64URL=function(y){return y.match(/[+/=]/)?!1:(y=bs(y),q.lang.String.isBase64(y))},q.lang.String.isIntegerArray=function(y){return y=y.replace(/\s+/g,""),!!y.match(/^\[[0-9,]+\]$/)};function Wh(y){return y.length%2==1?"0"+y:y.substr(0,1)>"7"?"00"+y:y}function to(y){y=y.replace(/^\s*\[\s*/,""),y=y.replace(/\s*\]\s*$/,""),y=y.replace(/\s*/g,"");try{var T=y.split(/,/).map(function(A,k,z){var U=parseInt(A);if(U<0||255<U)throw"integer not in range 0-255";var Y=("00"+U.toString(16)).slice(-2);return Y}).join("");return T}catch(A){throw"malformed integer array string: "+A}}var uf=function(y,T){var A=y.length;y.length>T.length&&(A=T.length);for(var k=0;k<A;k++)if(y.charCodeAt(k)!=T.charCodeAt(k))return k;return y.length!=T.length?A:-1};(typeof q>"u"||!q)&&(q={}),(typeof q.crypto>"u"||!q.crypto)&&(q.crypto={}),q.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:n.algo.MD5,sha1:n.algo.SHA1,sha224:n.algo.SHA224,sha256:n.algo.SHA256,sha384:n.algo.SHA384,sha512:n.algo.SHA512,ripemd160:n.algo.RIPEMD160},this.getDigestInfoHex=function(y,T){if(typeof this.DIGESTINFOHEAD[T]>"u")throw"alg not supported in Util.DIGESTINFOHEAD: "+T;return this.DIGESTINFOHEAD[T]+y},this.getPaddedDigestInfoHex=function(y,T,A){var k=this.getDigestInfoHex(y,T),z=A/4;if(k.length+22>z)throw"key is too short for SigAlg: keylen="+A+","+T;
414for(var U="0001",Y="00"+k,Z="",ue=z-U.length-Y.length,he=0;he<ue;he+=2)Z+="ff";var Se=U+Z+Y;return Se},this.hashString=function(y,T){var A=new q.crypto.MessageDigest({alg:T});return A.digestString(y)},this.hashHex=function(y,T){var A=new q.crypto.MessageDigest({alg:T});return A.digestHex(y)},this.sha1=function(y){return this.hashString(y,"sha1")},this.sha256=function(y){return this.hashString(y,"sha256")},this.sha256Hex=function(y){return this.hashHex(y,"sha256")},this.sha512=function(y){return this.hashString(y,"sha512")},this.sha512Hex=function(y){return this.hashHex(y,"sha512")},this.isKey=function(y){return y instanceof Br||y instanceof q.crypto.DSA||y instanceof q.crypto.ECDSA}},q.crypto.Util.md5=function(y){var T=new q.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return T.digestString(y)},q.crypto.Util.ripemd160=function(y){var T=new q.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return T.digestString(y)},q.crypto.Util.SECURERANDOMGEN=new $s,q.crypto.Util.getRandomHexOfNbytes=function(y){var T=new Array(y);
414return q.crypto.Util.SECURERANDOMGEN.nextBytes(T),Ec(T)},q.crypto.Util.getRandomBigIntegerOfNbytes=function(y){return new d(q.crypto.Util.getRandomHexOfNbytes(y),16)},q.crypto.Util.getRandomHexOfNbits=function(y){var T=y%8,A=(y-T)/8,k=new Array(A+1);return q.crypto.Util.SECURERANDOMGEN.nextBytes(k),k[0]=(255<<T&255^255)&k[0],Ec(k)},q.crypto.Util.getRandomBigIntegerOfNbits=function(y){return new d(q.crypto.Util.getRandomHexOfNbits(y),16)},q.crypto.Util.getRandomBigIntegerZeroToMax=function(y){for(var T=y.bitLength();;){var A=q.crypto.Util.getRandomBigIntegerOfNbits(T);if(y.compareTo(A)!=-1)return A}},q.crypto.Util.getRandomBigIntegerMinToMax=function(y,T){var A=y.compareTo(T);if(A==1)throw"biMin is greater than biMax";if(A==0)return y;var k=T.subtract(y),z=q.crypto.Util.getRandomBigIntegerZeroToMax(k);return z.add(y)},q.crypto.MessageDigest=function(y){this.setAlgAndProvider=function(T,A){if(T=q.crypto.MessageDigest.getCanonicalAlgName(T),T!==null&&A===void 0&&(A=q.crypto.Util.DEFAULTPROVIDER[T]),":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(T)!=-1&&A=="cryptojs"){try{this.md=q.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[T].create()}catch(k){throw"setAlgAndProvider hash alg set fail alg="+T+"/"+k}this.updateString=function(k){this.md.update(k)},this.updateHex=function(k){var z=n.enc.Hex.parse(k);this.md.update(z)},this.digest=function(){var k=this.md.finalize();return k.toString(n.enc.Hex)},this.digestString=function(k){return this.updateString(k),this.digest()},this.digestHex=function(k){return this.updateHex(k),this.digest()}}if(":sha256:".indexOf(T)!=-1&&A=="sjcl"){try{this.md=new sjcl.hash.sha256}catch(k){throw"setAlgAndProvider hash alg set fail alg="+T+"/"+k}this.updateString=function(k){this.md.update(k)},this.updateHex=function(k){var z=sjcl.codec.hex.toBits(k);this.md.update(z)},this.digest=function(){var k=this.md.finalize();return sjcl.codec.hex.fromBits(k)},this.digestString=function(k){return this.updateString(k),this.digest()},this.digestHex=function(k){return this.updateHex(k),this.digest()}}},this.updateString=function(T){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(T){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(T){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(T){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},y!==void 0&&y.alg!==void 0&&(this.algName=y.alg,y.prov===void 0&&(this.provName=q.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},q.crypto.MessageDigest.getCanonicalAlgName=function(y){return typeof y=="string"&&(y=y.toLowerCase(),y=y.replace(/-/,"")),y},q.crypto.MessageDigest.getHashLength=function(y){var T=q.crypto.MessageDigest,A=T.getCanonicalAlgName(y);if(T.HASHLENGTH[A]===void 0)throw"not supported algorithm: "+y;return T.HASHLENGTH[A]},q.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},q.crypto.Mac=function(y){this.setAlgAndProvider=function(T,A){if(T=T.toLowerCase(),T==null&&(T="hmacsha1"),T=T.toLowerCase(),T.substr(0,4)!="hmac")throw"setAlgAndProvider unsupported HMAC alg: "+T;A===void 0&&(A=q.crypto.Util.DEFAULTPROVIDER[T]),this.algProv=T+"/"+A;var k=T.substr(4);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(k)!=-1&&A=="cryptojs"){try{var z=q.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[k];this.mac=n.algo.HMAC.create(z,this.pass)}catch(U){throw"setAlgAndProvider hash alg set fail hashAlg="+k+"/"+U}this.updateString=function(U){this.mac.update(U)},this.updateHex=function(U){var Y=n.enc.Hex.parse(U);this.mac.update(Y)},this.doFinal=function(){var U=this.mac.finalize();return U.toString(n.enc.Hex)},this.doFinalString=function(U){return this.updateString(U),this.doFinal()},this.doFinalHex=function(U){return this.updateHex(U),this.doFinal()}}},this.updateString=function(T){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(T){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(T){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(T){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(T){if(typeof T=="string"){var A=T;(T.length%2==1||!T.match(/^[0-9A-Fa-f]+$/))&&(A=Es(T)),this.pass=n.enc.Hex.parse(A);return}if(typeof T!="object")throw"KJUR.crypto.Mac unsupported password type: "+T;var A=null;if(T.hex!==void 0){if(T.hex.length%2!=0||!T.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+T.hex;A=T.hex}if(T.utf8!==void 0&&(A=ko(T.utf8)),T.rstr!==void 0&&(A=Es(T.rstr)),T.b64!==void 0&&(A=s(T.b64)),T.b64u!==void 0&&(A=yn(T.b64u)),A==null)throw"KJUR.crypto.Mac unsupported password type: "+T;this.pass=n.enc.Hex.parse(A)},y!==void 0&&(y.pass!==void 0&&this.setPassword(y.pass),y.alg!==void 0&&(this.algName=y.alg,y.prov===void 0&&(this.provName=q.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},q.crypto.Signature=function(y){var T=null;if(this._setAlgNames=function(){var A=this.algName.match(/^(.+)with(.+)$/);A&&(this.mdAlgName=A[1].toLowerCase(),this.pubkeyAlgName=A[2].toLowerCase(),this.pubkeyAlgName=="rsaandmgf1"&&this.mdAlgName=="sha"&&(this.mdAlgName="sha1"))},this._zeroPaddingOfSignature=function(A,k){for(var z="",U=k/4-A.length,Y=0;Y<U;Y++)z=z+"0";return z+A},this.setAlgAndProvider=function(A,k){if(this._setAlgNames(),k!="cryptojs/jsrsa")throw new Error("provider not supported: "+k);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)!=-1){try{this.md=new q.crypto.MessageDigest({alg:this.mdAlgName})}catch(z){throw new Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+z)}this.init=function(z,U){var Y=null;try{U===void 0?Y=Zn.getKey(z):Y=Zn.getKey(z,U)}catch(Z){throw"init failed:"+Z}if(Y.isPrivate===!0)this.prvKey=Y,this.state="SIGN";else if(Y.isPublic===!0)this.pubKey=Y,this.state="VERIFY";else throw"init failed.:"+Y},this.updateString=function(z){this.md.updateString(z)},this.updateHex=function(z){this.md.updateHex(z)},this.sign=function(){if(this.sHashHex=this.md.digest(),this.prvKey===void 0&&this.ecprvhex!==void 0&&this.eccurvename!==void 0&&q.crypto.ECDSA!==void 0&&(this.prvKey=new q.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex})),this.prvKey instanceof Br&&this.pubkeyAlgName==="rsaandmgf1")this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof Br&&this.pubkeyAlgName==="rsa")this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof q.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else if(this.prvKey instanceof q.crypto.DSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;return this.hSign},this.signString=function(z){return this.updateString(z),this.sign()},this.signHex=function(z){return this.updateHex(z),this.sign()},this.verify=function(z){if(this.sHashHex=this.md.digest(),this.pubKey===void 0&&this.ecpubhex!==void 0&&this.eccurvename!==void 0&&q.crypto.ECDSA!==void 0&&(this.pubKey=new q.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex})),this.pubKey instanceof Br&&this.pubkeyAlgName==="rsaandmgf1")return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,z,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof Br&&this.pubkeyAlgName==="rsa")return this.pubKey.verifyWithMessageHash(this.sHashHex,z);
414if(q.crypto.ECDSA!==void 0&&this.pubKey instanceof q.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,z);if(q.crypto.DSA!==void 0&&this.pubKey instanceof q.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,z);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(A,k){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(A){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(A){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(A){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(A){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(A){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=y,y!==void 0&&(y.alg!==void 0&&(this.algName=y.alg,y.prov===void 0?this.provName=q.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=y.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),y.psssaltlen!==void 0&&(this.pssSaltLen=y.psssaltlen),y.prvkeypem!==void 0)){if(y.prvkeypas!==void 0)throw"both prvkeypem and prvkeypas parameters not supported";try{var T=Zn.getKey(y.prvkeypem);this.init(T)}catch(A){throw"fatal error to load pem private key: "+A}}},q.crypto.Cipher=function(y){},q.crypto.Cipher.encrypt=function(y,T,A){if(T instanceof Br&&T.isPublic){var k=q.crypto.Cipher.getAlgByKeyAndName(T,A);if(k==="RSA")return T.encrypt(y);if(k==="RSAOAEP")return T.encryptOAEP(y,"sha1");var z=k.match(/^RSAOAEP(\d+)$/);if(z!==null)return T.encryptOAEP(y,"sha"+z[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+A}else throw"Cipher.encrypt: unsupported key or algorithm"},q.crypto.Cipher.decrypt=function(y,T,A){if(T instanceof Br&&T.isPrivate){var k=q.crypto.Cipher.getAlgByKeyAndName(T,A);if(k==="RSA")return T.decrypt(y);if(k==="RSAOAEP")return T.decryptOAEP(y,"sha1");var z=k.match(/^RSAOAEP(\d+)$/);if(z!==null)return T.decryptOAEP(y,"sha"+z[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+A}else throw"Cipher.decrypt: unsupported key or algorithm"},q.crypto.Cipher.getAlgByKeyAndName=function(y,T){if(y instanceof Br){if(":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(T)!=-1)return T;if(T==null)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+T}throw"getAlgByKeyAndName: not supported algorithm name: "+T},q.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},(typeof q>"u"||!q)&&(q={}),(typeof q.crypto>"u"||!q.crypto)&&(q.crypto={}),q.crypto.ECDSA=function(y){var T="secp256r1",A=Error,k=d,z=an,U=q.crypto.ECDSA,Y=q.crypto.ECParameterDB,Z=U.getName,ue=_r,he=ue.getVbyListEx,Se=ue.isASN1HEX,we=new $s;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(ee){return new k(ee.bitLength(),we).mod(ee.subtract(k.ONE)).add(k.ONE)},this.setNamedCurve=function(ee){this.ecparams=Y.getByName(ee),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=ee},this.setPrivateKeyHex=function(ee){this.isPrivate=!0,this.prvKeyHex=ee},this.setPublicKeyHex=function(ee){this.isPublic=!0,this.pubKeyHex=ee},this.getPublicKeyXYHex=function(){var ee=this.pubKeyHex;if(ee.substr(0,2)!=="04")throw"this method supports uncompressed format(04) only";var oe=this.ecparams.keylen/4;if(ee.length!==2+oe*2)throw"malformed public key hex length";var K={};return K.x=ee.substr(2,oe),K.y=ee.substr(2+oe),K}
414,this.getShortNISTPCurveName=function(){var ee=this.curveName;return ee==="secp256r1"||ee==="NIST P-256"||ee==="P-256"||ee==="prime256v1"?"P-256":ee==="secp384r1"||ee==="NIST P-384"||ee==="P-384"?"P-384":null},this.generateKeyPairHex=function(){var ee=this.ecparams.n,oe=this.getBigRandom(ee),K=this.ecparams.G.multiply(oe),ne=K.getX().toBigInteger(),se=K.getY().toBigInteger(),be=this.ecparams.keylen/4,Ie=("0000000000"+oe.toString(16)).slice(-be),Ge=("0000000000"+ne.toString(16)).slice(-be),$e=("0000000000"+se.toString(16)).slice(-be),je="04"+Ge+$e;return this.setPrivateKeyHex(Ie),this.setPublicKeyHex(je),{ecprvhex:Ie,ecpubhex:je}},this.signWithMessageHash=function(ee){return this.signHex(ee,this.prvKeyHex)},this.signHex=function(ee,oe){var K=new k(oe,16),ne=this.ecparams.n,se=new k(ee.substring(0,this.ecparams.keylen/4),16);do var be=this.getBigRandom(ne),Ie=this.ecparams.G,Ge=Ie.multiply(be),$e=Ge.getX().toBigInteger().mod(ne);while($e.compareTo(k.ZERO)<=0);var je=be.modInverse(ne).multiply(se.add(K.multiply($e))).mod(ne);return U.biRSSigToASN1Sig($e,je)},this.sign=function(ee,oe){var K=oe,ne=this.ecparams.n,se=k.fromByteArrayUnsigned(ee);do var be=this.getBigRandom(ne),Ie=this.ecparams.G,Ge=Ie.multiply(be),$e=Ge.getX().toBigInteger().mod(ne);while($e.compareTo(d.ZERO)<=0);var je=be.modInverse(ne).multiply(se.add(K.multiply($e))).mod(ne);return this.serializeSig($e,je)},this.verifyWithMessageHash=function(ee,oe){return this.verifyHex(ee,oe,this.pubKeyHex)},this.verifyHex=function(ee,oe,K){try{var ne,se,be=U.parseSigHex(oe);ne=be.r,se=be.s;var Ie=z.decodeFromHex(this.ecparams.curve,K),Ge=new k(ee.substring(0,this.ecparams.keylen/4),16);return this.verifyRaw(Ge,ne,se,Ie)}catch{return!1}},this.verify=function(ee,oe,K){var ne,se;if(Bitcoin.Util.isArray(oe)){var be=this.parseSig(oe);ne=be.r,se=be.s}else if(typeof oe=="object"&&oe.r&&oe.s)ne=oe.r,se=oe.s;else throw"Invalid value for signature";var Ie;if(K instanceof an)Ie=K;else if(Bitcoin.Util.isArray(K))Ie=z.decodeFrom(this.ecparams.curve,K);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var Ge=k.fromByteArrayUnsigned(ee);return this.verifyRaw(Ge,ne,se,Ie)},this.verifyRaw=function(ee,oe,K,ne){var se=this.ecparams.n,be=this.ecparams.G;if(oe.compareTo(k.ONE)<0||oe.compareTo(se)>=0||K.compareTo(k.ONE)<0||K.compareTo(se)>=0)return!1;var Ie=K.modInverse(se),Ge=ee.multiply(Ie).mod(se),$e=oe.multiply(Ie).mod(se),je=be.multiply(Ge).add(ne.multiply($e)),zt=je.getX().toBigInteger().mod(se);return zt.equals(oe)},this.serializeSig=function(ee,oe){var K=ee.toByteArraySigned(),ne=oe.toByteArraySigned(),se=[];return se.push(2),se.push(K.length),se=se.concat(K),se.push(2),se.push(ne.length),se=se.concat(ne),se.unshift(se.length),se.unshift(48),se},this.parseSig=function(ee){var oe;if(ee[0]!=48)throw new Error("Signature not a valid DERSequence");if(oe=2,ee[oe]!=2)throw new Error("First element in signature must be a DERInteger");var K=ee.slice(oe+2,oe+2+ee[oe+1]);if(oe+=2+ee[oe+1],ee[oe]!=2)throw new Error("Second element in signature must be a DERInteger");var ne=ee.slice(oe+2,oe+2+ee[oe+1]);oe+=2+ee[oe+1];var se=k.fromByteArrayUnsigned(K),be=k.fromByteArrayUnsigned(ne);return{r:se,s:be}},this.parseSigCompact=function(ee){if(ee.length!==65)throw"Signature has the wrong length";var oe=ee[0]-27;if(oe<0||oe>7)throw"Invalid signature type";var K=this.ecparams.n,ne=k.fromByteArrayUnsigned(ee.slice(1,33)).mod(K),se=k.fromByteArrayUnsigned(ee.slice(33,65)).mod(K);return{r:ne,s:se,i:oe}},this.readPKCS5PrvKeyHex=function(ee){if(Se(ee)===!1)throw new Error("not ASN.1 hex string");var oe,K,ne;try{oe=he(ee,0,["[0]",0],"06"),K=he(ee,0,[1],"04");try{ne=he(ee,0,["[1]",0],"03")}catch{}}catch{throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=Z(oe),this.curveName===void 0)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(ne),this.setPrivateKeyHex(K),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(ee){if(Se(ee)===!1)throw new A("not ASN.1 hex string");var oe,K,ne,se;try{oe=he(ee,0,[1,0],"06"),K=he(ee,0,[1,1],"06"),ne=he(ee,0,[2,0,1],"04");try{se=he(ee,0,[2,0,"[1]",0],"03")}catch{}}catch{throw new A("malformed PKCS#8 plain ECC private key")}if(this.curveName=Z(K),this.curveName===void 0)throw new A("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(se),this.setPrivateKeyHex(ne),this.isPublic=!1},this.readPKCS8PubKeyHex=function(ee){if(Se(ee)===!1)throw new A("not ASN.1 hex string");var oe,K,ne;try{oe=he(ee,0,[0,0],"06"),K=he(ee,0,[0,1],"06"),ne=he(ee,0,[1],"03")}catch{throw new A("malformed PKCS#8 ECC public key")}if(this.curveName=Z(K),this.curveName===null)throw new A("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(ne)},this.readCertPubKeyHex=function(ee,oe){if(Se(ee)===!1)throw new A("not ASN.1 hex string");var K,ne;try{K=he(ee,0,[0,5,0,1],"06"),ne=he(ee,0,[0,5,1],"03")}catch{throw new A("malformed X.509 certificate ECC public key")}if(this.curveName=Z(K),this.curveName===null)throw new A("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(ne)},y!==void 0&&y.curve!==void 0&&(this.curveName=y.curve),this.curveName===void 0&&(this.curveName=T),this.setNamedCurve(this.curveName),y!==void 0&&(y.prv!==void 0&&this.setPrivateKeyHex(y.prv),y.pub!==void 0&&this.setPublicKeyHex(y.pub))},q.crypto.ECDSA.parseSigHex=function(y){var T=q.crypto.ECDSA.parseSigHexInHexRS(y),A=new d(T.r,16),k=new d(T.s,16);return{r:A,s:k}},q.crypto.ECDSA.parseSigHexInHexRS=function(y){var T=_r,A=T.getChildIdx,k=T.getV;if(T.checkStrictDER(y,0),y.substr(0,2)!="30")throw new Error("signature is not a ASN.1 sequence");var z=A(y,0);if(z.length!=2)throw new Error("signature shall have two elements");var U=z[0],Y=z[1];if(y.substr(U,2)!="02")throw new Error("1st item not ASN.1 integer");if(y.substr(Y,2)!="02")throw new Error("2nd item not ASN.1 integer");var Z=k(y,U),ue=k(y,Y);return{r:Z,s:ue}},q.crypto.ECDSA.asn1SigToConcatSig=function(y){var T=q.crypto.ECDSA.parseSigHexInHexRS(y),A=T.r,k=T.s;if(A.substr(0,2)=="00"&&A.length%32==2&&(A=A.substr(2)),k.substr(0,2)=="00"&&k.length%32==2&&(k=k.substr(2)),A.length%32==30&&(A="00"+A),k.length%32==30&&(k="00"+k),A.length%32!=0)throw"unknown ECDSA sig r length error";if(k.length%32!=0)throw"unknown ECDSA sig s length error";return A+k},q.crypto.ECDSA.concatSigToASN1Sig=function(y){if(y.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig  length error";var T=y.substr(0,y.length/2),A=y.substr(y.length/2);return q.crypto.ECDSA.hexRSSigToASN1Sig(T,A)},q.crypto.ECDSA.hexRSSigToASN1Sig=function(y,T){var A=new d(y,16),k=new d(T,16);return q.crypto.ECDSA.biRSSigToASN1Sig(A,k)},q.crypto.ECDSA.biRSSigToASN1Sig=function(y,T){var A=q.asn1,k=new A.DERInteger({bigint:y}),z=new A.DERInteger({bigint:T}),U=new A.DERSequence({array:[k,z]});return U.getEncodedHex()}
414,q.crypto.ECDSA.getName=function(y){return y==="2b8104001f"?"secp192k1":y==="2a8648ce3d030107"?"secp256r1":y==="2b8104000a"?"secp256k1":y==="2b81040021"?"secp224r1":y==="2b81040022"?"secp384r1":"|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(y)!==-1?"secp256r1":"|secp256k1|".indexOf(y)!==-1?"secp256k1":"|secp224r1|NIST P-224|P-224|".indexOf(y)!==-1?"secp224r1":"|secp384r1|NIST P-384|P-384|".indexOf(y)!==-1?"secp384r1":null},(typeof q>"u"||!q)&&(q={}),(typeof q.crypto>"u"||!q.crypto)&&(q.crypto={}),q.crypto.ECParameterDB=new function(){var y={},T={};function A(k){return new d(k,16)}this.getByName=function(k){var z=k;if(typeof T[z]<"u"&&(z=T[k]),typeof y[z]<"u")return y[z];throw"unregistered EC curve name: "+z},this.regist=function(k,z,U,Y,Z,ue,he,Se,we,ee,oe,K){y[k]={};var ne=A(U),se=A(Y),be=A(Z),Ie=A(ue),Ge=A(he),$e=new Gs(ne,se,be),je=$e.decodePointHex("04"+Se+we);y[k].name=k,y[k].keylen=z,y[k].curve=$e,y[k].G=je,y[k].n=Ie,y[k].h=Ge,y[k].oid=oe,y[k].info=K;for(var zt=0;zt<ee.length;zt++)T[ee[zt]]=k}},q.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),q.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),q.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),q.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),q.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),q.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),q.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),q.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),q.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),q.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]),(typeof q>"u"||!q)&&(q={}),(typeof q.crypto>"u"||!q.crypto)&&(q.crypto={}),q.crypto.DSA=function(){var y=_r;y.getVbyList;var T=y.getVbyListEx,A=y.isASN1HEX,k=d;this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.isPrivate=!1,this.isPublic=!1,this.setPrivate=function(z,U,Y,Z,ue){this.isPrivate=!0,this.p=z,this.q=U,this.g=Y,this.y=Z,this.x=ue},this.setPrivateHex=function(z,U,Y,Z,ue){var he,Se,we,ee,oe;he=new d(z,16),Se=new d(U,16),we=new d(Y,16),typeof Z=="string"&&Z.length>1?ee=new d(Z,16):ee=null,oe=new d(ue,16),this.setPrivate(he,Se,we,ee,oe)},this.setPublic=function(z,U,Y,Z){this.isPublic=!0,this.p=z,this.q=U,this.g=Y,this.y=Z,this.x=null},this.setPublicHex=function(z,U,Y,Z){var ue,he,Se,we;ue=new d(z,16),he=new d(U,16),Se=new d(Y,16),we=new d(Z,16),this.setPublic(ue,he,Se,we)},this.signWithMessageHash=function(z){var U=this.p,Y=this.q,Z=this.g;this.y;var ue=this.x,he=q.crypto.Util.getRandomBigIntegerMinToMax(d.ONE.add(d.ONE),Y.subtract(d.ONE)),Se=z.substr(0,Y.bitLength()/4),we=new d(Se,16),ee=Z.modPow(he,U).mod(Y),oe=he.modInverse(Y).multiply(we.add(ue.multiply(ee))).mod(Y),K=q.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:ee}},{int:{bigint:oe}}]});return K},this.verifyWithMessageHash=function(z,U){var Y=this.p,Z=this.q,ue=this.g,he=this.y,Se=this.parseASN1Signature(U),we=Se[0],ee=Se[1],oe=z.substr(0,Z.bitLength()/4),K=new d(oe,16);if(d.ZERO.compareTo(we)>0||we.compareTo(Z)>0||d.ZERO.compareTo(ee)>=0||ee.compareTo(Z)>0)throw"invalid DSA signature";var ne=ee.modInverse(Z),se=K.multiply(ne).mod(Z),be=we.multiply(ne).mod(Z),Ie=ue.modPow(se,Y).multiply(he.modPow(be,Y)).mod(Y).mod(Z);return Ie.compareTo(we)==0},this.parseASN1Signature=function(z){try{var U=new k(T(z,0,[0],"02"),16),Y=new k(T(z,0,[1],"02"),16);return[U,Y]}catch{throw new Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(z){var U,Y,Z,ue,he;if(A(z)===!1)throw new Error("not ASN.1 hex string");try{U=T(z,0,[1],"02"),Y=T(z,0,[2],"02"),Z=T(z,0,[3],"02"),ue=T(z,0,[4],"02"),he=T(z,0,[5],"02")}catch{throw new Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(U,Y,Z,ue,he)},this.readPKCS8PrvKeyHex=function(z){var U,Y,Z,ue;if(A(z)===!1)throw new Error("not ASN.1 hex string");try{U=T(z,0,[1,1,0],"02"),Y=T(z,0,[1,1,1],"02"),Z=T(z,0,[1,1,2],"02"),ue=T(z,0,[2,0],"02")}catch{throw new Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(U,Y,Z,null,ue)},this.readPKCS8PubKeyHex=function(z){var U,Y,Z,ue;if(A(z)===!1)throw new Error("not ASN.1 hex string");try{U=T(z,0,[0,1,0],"02"),Y=T(z,0,[0,1,1],"02"),Z=T(z,0,[0,1,2],"02"),ue=T(z,0,[1,0],"02")}catch{throw new Error("malformed PKCS#8 DSA public key")}this.setPublicHex(U,Y,Z,ue)},this.readCertPubKeyHex=function(z,U){var Y,Z,ue,he;if(A(z)===!1)throw new Error("not ASN.1 hex string");try{Y=T(z,0,[0,5,0,1,0],"02"),Z=T(z,0,[0,5,0,1,1],"02"),ue=T(z,0,[0,5,0,1,2],"02"),he=T(z,0,[0,5,1,0],"02")}catch{throw new Error("malformed X.509 certificate DSA public key")}this.setPublicHex(Y,Z,ue,he)}};var Zn=(function(){var y=function(K,ne,se){return k(n.AES,K,ne,se)},T=function(K,ne,se){return k(n.TripleDES,K,ne,se)},A=function(K,ne,se){return k(n.DES,K,ne,se)},k=function(K,ne,se,be){var Ie=n.enc.Hex.parse(ne),Ge=n.enc.Hex.parse(se),$e=n.enc.Hex.parse(be),je={};
414je.key=Ge,je.iv=$e,je.ciphertext=Ie;var zt=K.decrypt(je,Ge,{iv:$e});return n.enc.Hex.stringify(zt)},z=function(K,ne,se){return Z(n.AES,K,ne,se)},U=function(K,ne,se){return Z(n.TripleDES,K,ne,se)},Y=function(K,ne,se){return Z(n.DES,K,ne,se)},Z=function(K,ne,se,be){var Ie=n.enc.Hex.parse(ne),Ge=n.enc.Hex.parse(se),$e=n.enc.Hex.parse(be),je=K.encrypt(Ie,Ge,{iv:$e}),zt=n.enc.Hex.parse(je.toString()),xt=n.enc.Base64.stringify(zt);return xt},ue={"AES-256-CBC":{proc:y,eproc:z,keylen:32,ivlen:16},"AES-192-CBC":{proc:y,eproc:z,keylen:24,ivlen:16},"AES-128-CBC":{proc:y,eproc:z,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:T,eproc:U,keylen:24,ivlen:8},"DES-CBC":{proc:A,eproc:Y,keylen:8,ivlen:8}},he=function(K){var ne=n.lib.WordArray.random(K),se=n.enc.Hex.stringify(ne);return se},Se=function(K){var ne={},se=K.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));se&&(ne.cipher=se[1],ne.ivsalt=se[2]);var be=K.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));be&&(ne.type=be[1]);var Ie=-1,Ge=0;K.indexOf(`\r
415\r
416`)!=-1&&(Ie=K.indexOf(`\r
417\r
418`),Ge=2),K.indexOf(`
419
420`)!=-1&&(Ie=K.indexOf(`
421
422`),Ge=1);var $e=K.indexOf("-----END");if(Ie!=-1&&$e!=-1){var je=K.substring(Ie+Ge*2,$e-Ge);je=je.replace(/\s+/g,""),ne.data=je}return ne},we=function(K,ne,se){for(var be=se.substring(0,16),Ie=n.enc.Hex.parse(be),Ge=n.enc.Utf8.parse(ne),$e=ue[K].keylen+ue[K].ivlen,je="",zt=null;;){var xt=n.algo.MD5.create();if(zt!=null&&xt.update(zt),xt.update(Ge),xt.update(Ie),zt=xt.finalize(),je=je+n.enc.Hex.stringify(zt),je.length>=$e*2)break}var rt={};return rt.keyhex=je.substr(0,ue[K].keylen*2),rt.ivhex=je.substr(ue[K].keylen*2,ue[K].ivlen*2),rt},ee=function(K,ne,se,be){var Ie=n.enc.Base64.parse(K),Ge=n.enc.Hex.stringify(Ie),$e=ue[ne].proc,je=$e(Ge,se,be);return je},oe=function(K,ne,se,be){var Ie=ue[ne].eproc,Ge=Ie(K,se,be);return Ge};return{version:"1.0.0",parsePKCS5PEM:function(K){return Se(K)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(K,ne,se){return we(K,ne,se)},decryptKeyB64:function(K,ne,se,be){return ee(K,ne,se,be)},getDecryptedKeyHex:function(K,ne){var se=Se(K),be=se.cipher,Ie=se.ivsalt,Ge=se.data,$e=we(be,ne,Ie),je=$e.keyhex,zt=ee(Ge,be,je,Ie);return zt},getEncryptedPKCS5PEMFromPrvKeyHex:function(K,ne,se,be,Ie){var ct="";if((typeof be>"u"||be==null)&&(be="AES-256-CBC"),typeof ue[be]>"u")throw"KEYUTIL unsupported algorithm: "+be;if(typeof Ie>"u"||Ie==null){var Ge=ue[be].ivlen,$e=he(Ge);Ie=$e.toUpperCase()}var je=we(be,se,Ie),zt=je.keyhex,xt=oe(ne,be,zt,Ie),rt=xt.replace(/(.{64})/g,`$1\r
423`),ct="-----BEGIN "+K+` PRIVATE KEY-----\r
424`;return ct+=`Proc-Type: 4,ENCRYPTED\r
425`,ct+="DEK-Info: "+be+","+Ie+`\r
426`,ct+=`\r
427`,ct+=rt,ct+=`\r
428-----END `+K+` PRIVATE KEY-----\r
429`,ct},parseHexOfEncryptedPKCS8:function(K){var ne=_r,se=ne.getChildIdx,be=ne.getV,Ie={},Ge=se(K,0);if(Ge.length!=2)throw"malformed format: SEQUENCE(0).items != 2: "+Ge.length;Ie.ciphertext=be(K,Ge[1]);var $e=se(K,Ge[0]);if($e.length!=2)throw"malformed format: SEQUENCE(0.0).items != 2: "+$e.length;if(be(K,$e[0])!="2a864886f70d01050d")throw"this only supports pkcs5PBES2";var je=se(K,$e[1]);if($e.length!=2)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+je.length;var zt=se(K,je[1]);if(zt.length!=2)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+zt.length;if(be(K,zt[0])!="2a864886f70d0307")throw"this only supports TripleDES";Ie.encryptionSchemeAlg="TripleDES",Ie.encryptionSchemeIV=be(K,zt[1]);var xt=se(K,je[0]);if(xt.length!=2)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+xt.length;if(be(K,xt[0])!="2a864886f70d01050c")throw"this only supports pkcs5PBKDF2";var rt=se(K,xt[1]);if(rt.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+rt.length;Ie.pbkdf2Salt=be(K,rt[0]);var ct=be(K,rt[1]);try{Ie.pbkdf2Iter=parseInt(ct,16)}catch{throw"malformed format pbkdf2Iter: "+ct}return Ie},getPBKDF2KeyHexFromParam:function(K,ne){var se=n.enc.Hex.parse(K.pbkdf2Salt),be=K.pbkdf2Iter,Ie=n.PBKDF2(ne,se,{keySize:192/32,iterations:be}),Ge=n.enc.Hex.stringify(Ie);return Ge},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(K,ne){var se=_i(K,"ENCRYPTED PRIVATE KEY"),be=this.parseHexOfEncryptedPKCS8(se),Ie=Zn.getPBKDF2KeyHexFromParam(be,ne),Ge={};Ge.ciphertext=n.enc.Hex.parse(be.ciphertext);var $e=n.enc.Hex.parse(Ie),je=n.enc.Hex.parse(be.encryptionSchemeIV),zt=n.TripleDES.decrypt(Ge,$e,{iv:je}),xt=n.enc.Hex.stringify(zt);return xt},getKeyFromEncryptedPKCS8PEM:function(K,ne){var se=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(K,ne),be=this.getKeyFromPlainPrivateP
429KCS8Hex(se);return be},parsePlainPrivatePKCS8Hex:function(K){var ne=_r,se=ne.getChildIdx,be=ne.getV,Ie={};if(Ie.algparam=null,K.substr(0,2)!="30")throw"malformed plain PKCS8 private key(code:001)";var Ge=se(K,0);if(Ge.length!=3)throw"malformed plain PKCS8 private key(code:002)";if(K.substr(Ge[1],2)!="30")throw"malformed PKCS8 private key(code:003)";var $e=se(K,Ge[1]);if($e.length!=2)throw"malformed PKCS8 private key(code:004)";if(K.substr($e[0],2)!="06")throw"malformed PKCS8 private key(code:005)";if(Ie.algoid=be(K,$e[0]),K.substr($e[1],2)=="06"&&(Ie.algparam=be(K,$e[1])),K.substr(Ge[2],2)!="04")throw"malformed PKCS8 private key(code:006)";return Ie.keyidx=ne.getVidx(K,Ge[2]),Ie},getKeyFromPlainPrivatePKCS8PEM:function(K){var ne=_i(K,"PRIVATE KEY"),se=this.getKeyFromPlainPrivatePKCS8Hex(ne);return se},getKeyFromPlainPrivatePKCS8Hex:function(K){var ne=this.parsePlainPrivatePKCS8Hex(K),se;if(ne.algoid=="2a864886f70d010101")se=new Br;else if(ne.algoid=="2a8648ce380401")se=new q.crypto.DSA;else if(ne.algoid=="2a8648ce3d0201")se=new q.crypto.ECDSA;else throw"unsupported private key algorithm";return se.readPKCS8PrvKeyHex(K),se},_getKeyFromPublicPKCS8Hex:function(K){var ne,se=_r.getVbyList(K,0,[0,0],"06");if(se==="2a864886f70d010101")ne=new Br;else if(se==="2a8648ce380401")ne=new q.crypto.DSA;else if(se==="2a8648ce3d0201")ne=new q.crypto.ECDSA;else throw"unsupported PKCS#8 public key hex";return ne.readPKCS8PubKeyHex(K),ne},parsePublicRawRSAKeyHex:function(K){var ne=_r,se=ne.getChildIdx,be=ne.getV,Ie={};if(K.substr(0,2)!="30")throw"malformed RSA key(code:001)";var Ge=se(K,0);if(Ge.length!=2)throw"malformed RSA key(code:002)";if(K.substr(Ge[0],2)!="02")throw"malformed RSA key(code:003)";if(Ie.n=be(K,Ge[0]),K.substr(Ge[1],2)!="02")throw"malformed RSA key(code:004)";return Ie.e=be(K,Ge[1]),Ie},parsePublicPKCS8Hex:function(K){var ne=_r,se=ne.getChildIdx,be=ne.getV,Ie={};Ie.algparam=null;var Ge=se(K,0);if(Ge.length!=2)throw"outer DERSequence shall have 2 elements: "+Ge.length;var $e=Ge[0];if(K.substr($e,2)!="30")throw"malformed PKCS8 public key(code:001)";var je=se(K,$e);if(je.length!=2)throw"malformed PKCS8 public key(code:002)";if(K.substr(je[0],2)!="06")throw"malformed PKCS8 public key(code:003)";if(Ie.algoid=be(K,je[0]),K.substr(je[1],2)=="06"?Ie.algparam=be(K,je[1]):K.substr(je[1],2)=="30"&&(Ie.algparam={},Ie.algparam.p=ne.getVbyList(K,je[1],[0],"02"),Ie.algparam.q=ne.getVbyList(K,je[1],[1],"02"),Ie.algparam.g=ne.getVbyList(K,je[1],[2],"02")),K.substr(Ge[1],2)!="03")throw"malformed PKCS8 public key(code:004)";return Ie.key=be(K,Ge[1]).substr(2),Ie}}})();Zn.getKey=function(y,T,A){var k=_r,z=k.getChildIdx;k.getV;var U=k.getVbyList,Y=q.crypto,Z=Y.ECDSA,ue=Y.DSA,he=Br,Se=_i,we=Zn;if(typeof he<"u"&&y instanceof he||typeof Z<"u"&&y instanceof Z||typeof ue<"u"&&y instanceof ue)return y;if(y.curve!==void 0&&y.xy!==void 0&&y.d===void 0)return new Z({pub:y.xy,curve:y.curve});if(y.curve!==void 0&&y.d!==void 0)return new Z({prv:y.d,curve:y.curve});if(y.kty===void 0&&y.n!==void 0&&y.e!==void 0&&y.d===void 0){var ee=new he;return ee.setPublic(y.n,y.e),ee}if(y.kty===void 0&&y.n!==void 0&&y.e!==void 0&&y.d!==void 0&&y.p!==void 0&&y.q!==void 0&&y.dp!==void 0&&y.dq!==void 0&&y.co!==void 0&&y.qi===void 0){var ee=new he;return ee.setPrivateEx(y.n,y.e,y.d,y.p,y.q,y.dp,y.dq,y.co),ee}if(y.kty===void 0&&y.n!==void 0&&y.e!==void 0&&y.d!==void 0&&y.p===void 0){var ee=new he;return ee.setPrivate(y.n,y.e,y.d),ee}if(y.p!==void 0&&y.q!==void 0&&y.g!==void 0&&y.y!==void 0&&y.x===void 0){var ee=new ue;return ee.setPublic(y.p,y.q,y.g,y.y),ee}if(y.p!==void 0&&y.q!==void 0&&y.g!==void 0&&y.y!==void 0&&y.x!==void 0){var ee=new ue;return ee.setPrivate(y.p,y.q,y.g,y.y,y.x),ee}if(y.kty==="RSA"&&y.n!==void 0&&y.e!==void 0&&y.d===void 0){var ee=new he;return ee.setPublic(yn(y.n),yn(y.e)),ee}if(y.kty==="RSA"&&y.n!==void 0&&y.e!==void 0&&y.d!==void 0&&y.p!==void 0&&y.q!==void 0&&y.dp!==void 0&&y.dq!==void 0&&y.qi!==void 0){var ee=new he;return ee.setPrivateEx(yn(y.n),yn(y.e),yn(y.d),yn(y.p),yn(y.q),yn(y.dp),yn(y.dq),yn(y.qi)),ee}if(y.kty==="RSA"&&y.n!==void 0&&y.e!==void 0&&y.d!==void 0){var ee=new he;return ee.setPrivate(yn(y.n),yn(y.e),yn(y.d)),ee}if(y.kty==="EC"&&y.crv!==void 0&&y.x!==void 0&&y.y!==void 0&&y.d===void 0){var oe=new Z({curve:y.crv}),K=oe.ecparams.keylen/4,ne=("0000000000"+yn(y.x)).slice(-K),se=("0000000000"+yn(y.y)).slice(-K),be="04"+ne+se;return oe.setPublicKeyHex(be),oe}if(y.kty==="EC"&&y.crv!==void 0&&y.x!==void 0&&y.y!==void 0&&y.d!==void 0){var oe=new Z({curve:y.crv}),K=oe.ecparams.keylen/4,ne=("0000000000"+yn(y.x)).slice(-K),se=("0000000000"+yn(y.y)).slice(-K),be="04"+ne+se,Ie=("0000000000"+yn(y.d)).slice(-K);return oe.setPublicKeyHex(be),oe.setPrivateKeyHex(Ie),oe}if(A==="pkcs5prv"){var Ge=y,k=_r,$e,ee;if($e=z(Ge,0),$e.length===9)ee=new he,ee.readPKCS5PrvKeyHex(Ge);else if($e.length===6)ee=new ue,ee.readPKCS5PrvKeyHex(Ge);else if($e.length>2&&Ge.substr($e[1],2)==="04")ee=new Z,ee.readPKCS5PrvKeyHex(Ge);else throw"unsupported PKCS#1/5 hexadecimal key";return ee}
429if(A==="pkcs8prv"){var ee=we.getKeyFromPlainPrivatePKCS8Hex(y);return ee}if(A==="pkcs8pub")return we._getKeyFromPublicPKCS8Hex(y);if(A==="x509pub")return Nn.getPublicKeyFromCertHex(y);if(y.indexOf("-END CERTIFICATE-",0)!=-1||y.indexOf("-END X509 CERTIFICATE-",0)!=-1||y.indexOf("-END TRUSTED CERTIFICATE-",0)!=-1)return Nn.getPublicKeyFromCertPEM(y);if(y.indexOf("-END PUBLIC KEY-")!=-1){var je=_i(y,"PUBLIC KEY");return we._getKeyFromPublicPKCS8Hex(je)}if(y.indexOf("-END RSA PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")==-1){var zt=Se(y,"RSA PRIVATE KEY");return we.getKey(zt,null,"pkcs5prv")}if(y.indexOf("-END DSA PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")==-1){var xt=Se(y,"DSA PRIVATE KEY"),rt=U(xt,0,[1],"02"),ct=U(xt,0,[2],"02"),Lt=U(xt,0,[3],"02"),er=U(xt,0,[4],"02"),Xt=U(xt,0,[5],"02"),ee=new ue;return ee.setPrivate(new d(rt,16),new d(ct,16),new d(Lt,16),new d(er,16),new d(Xt,16)),ee}if(y.indexOf("-END EC PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")==-1){var zt=Se(y,"EC PRIVATE KEY");return we.getKey(zt,null,"pkcs5prv")}if(y.indexOf("-END PRIVATE KEY-")!=-1)return we.getKeyFromPlainPrivatePKCS8PEM(y);if(y.indexOf("-END RSA PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")!=-1){var Pr=we.getDecryptedKeyHex(y,T),ot=new Br;return ot.readPKCS5PrvKeyHex(Pr),ot}if(y.indexOf("-END EC PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")!=-1){var xt=we.getDecryptedKeyHex(y,T),ee=U(xt,0,[1],"04"),wt=U(xt,0,[2,0],"06"),It=U(xt,0,[3,0],"03").substr(2),Ht="";if(q.crypto.OID.oidhex2name[wt]!==void 0)Ht=q.crypto.OID.oidhex2name[wt];else throw"undefined OID(hex) in KJUR.crypto.OID: "+wt;var oe=new Z({curve:Ht});return oe.setPublicKeyHex(It),oe.setPrivateKeyHex(ee),oe.isPublic=!1,oe}if(y.indexOf("-END DSA PRIVATE KEY-")!=-1&&y.indexOf("4,ENCRYPTED")!=-1){var xt=we.getDecryptedKeyHex(y,T),rt=U(xt,0,[1],"02"),ct=U(xt,0,[2],"02"),Lt=U(xt,0,[3],"02"),er=U(xt,0,[4],"02"),Xt=U(xt,0,[5],"02"),ee=new ue;return ee.setPrivate(new d(rt,16),new d(ct,16),new d(Lt,16),new d(er,16),new d(Xt,16)),ee}if(y.indexOf("-END ENCRYPTED PRIVATE KEY-")!=-1)return we.getKeyFromEncryptedPKCS8PEM(y,T);throw new Error("not supported argument")},Zn.generateKeypair=function(y,T){if(y=="RSA"){var A=T,k=new Br;k.generate(A,"10001"),k.isPrivate=!0,k.isPublic=!0;var z=new Br,U=k.n.toString(16),Y=k.e.toString(16);z.setPublic(U,Y),z.isPrivate=!1,z.isPublic=!0;var Z={};return Z.prvKeyObj=k,Z.pubKeyObj=z,Z}else if(y=="EC"){var ue=T,he=new q.crypto.ECDSA({curve:ue}),Se=he.generateKeyPairHex(),k=new q.crypto.ECDSA({curve:ue});k.setPublicKeyHex(Se.ecpubhex),k.setPrivateKeyHex(Se.ecprvhex),k.isPrivate=!0,k.isPublic=!1;var z=new q.crypto.ECDSA({curve:ue});z.setPublicKeyHex(Se.ecpubhex),z.isPrivate=!1,z.isPublic=!0;var Z={};return Z.prvKeyObj=k,Z.pubKeyObj=z,Z}else throw"unknown algorithm: "+y},Zn.getPEM=function(y,T,A,k,z,U){var Y=q,Z=Y.asn1,ue=Z.DERObjectIdentifier,he=Z.DERInteger,Se=Z.ASN1Util.newObject,we=Z.x509,ee=we.SubjectPublicKeyInfo,oe=Y.crypto,K=oe.DSA,ne=oe.ECDSA,se=Br;function be(wt){var It=Se({seq:[{int:0},{int:{bigint:wt.n}},{int:wt.e},{int:{bigint:wt.d}},{int:{bigint:wt.p}},{int:{bigint:wt.q}},{int:{bigint:wt.dmp1}},{int:{bigint:wt.dmq1}},{int:{bigint:wt.coeff}}]});return It}function Ie(wt){var It=Se({seq:[{int:1},{octstr:{hex:wt.prvKeyHex}},{tag:["a0",!0,{oid:{name:wt.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+wt.pubKeyHex}}]}]});return It}function Ge(wt){var It=Se({seq:[{int:0},{int:{bigint:wt.p}},{int:{bigint:wt.q}},{int:{bigint:wt.g}},{int:{bigint:wt.y}},{int:{bigint:wt.x}}]});return It}if((se!==void 0&&y instanceof se||K!==void 0&&y instanceof K||ne!==void 0&&y instanceof ne)&&y.isPublic==!0&&(T===void 0||T=="PKCS8PUB")){var $e=new ee(y),je=$e.getEncodedHex();return da(je,"PUBLIC KEY")}if(T=="PKCS1PRV"&&se!==void 0&&y instanceof se&&(A===void 0||A==null)&&y.isPrivate==!0){var $e=be(y),je=$e.getEncodedHex();return da(je,"RSA PRIVATE KEY")}if(T=="PKCS1PRV"&&ne!==void 0&&y instanceof ne&&(A===void 0||A==null)&&y.isPrivate==!0){var zt=new ue({name:y.curveName}),xt=zt.getEncodedHex(),rt=Ie(y),ct=rt.getEncodedHex(),Lt="";return Lt+=da(xt,"EC PARAMETERS"),Lt+=da(ct,"EC PRIVATE KEY"),Lt}if(T=="PKCS1PRV"&&K!==void 0&&y instanceof K&&(A===void 0||A==null)&&y.isPrivate==!0){var $e=Ge(y),je=$e.getEncodedHex();return da(je,"DSA PRIVATE KEY")}if(T=="PKCS5PRV"&&se!==void 0&&y instanceof se&&A!==void 0&&A!=null&&y.isPrivate==!0){var $e=be(y),je=$e.getEncodedHex();return k===void 0&&(k="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",je,A,k,U)}if(T=="PKCS5PRV"&&ne!==void 0&&y instanceof ne&&A!==void 0&&A!=null&&y.isPrivate==!0){var $e=Ie(y),je=$e.getEncodedHex();return k===void 0&&(k="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",je,A,k,U)}if(T=="PKCS5PRV"&&K!==void 0&&y instanceof K&&A!==void 0&&A!=null&&y.isPrivate==!0){var $e=Ge(y),je=$e.getEncodedHex();return k===void 0&&(k="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",je,A,k,U)}var er=function(wt,It){var Ht=Xt(wt,It),Ha=new Se({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:Ht.pbkdf2Salt}},{int:Ht.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:Ht.encryptionSchemeIV}}]}]}]},{octstr:{hex:Ht.ciphertext}}]});return Ha.getEncodedHex()},Xt=function(wt,It){var Ht=100,Ha=n.lib.WordArray.random(8),hi="DES-EDE3-CBC",ki=n.lib.WordArray.random(8),Ji=n.PBKDF2(It,Ha,{keySize:192/32,iterations:Ht}
429),Oa=n.enc.Hex.parse(wt),Ua=n.TripleDES.encrypt(Oa,Ji,{iv:ki})+"",ea={};return ea.ciphertext=Ua,ea.pbkdf2Salt=n.enc.Hex.stringify(Ha),ea.pbkdf2Iter=Ht,ea.encryptionSchemeAlg=hi,ea.encryptionSchemeIV=n.enc.Hex.stringify(ki),ea};if(T=="PKCS8PRV"&&se!=null&&y instanceof se&&y.isPrivate==!0){var Pr=be(y),ot=Pr.getEncodedHex(),$e=Se({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:ot}}]}),je=$e.getEncodedHex();if(A===void 0||A==null)return da(je,"PRIVATE KEY");var ct=er(je,A);return da(ct,"ENCRYPTED PRIVATE KEY")}if(T=="PKCS8PRV"&&ne!==void 0&&y instanceof ne&&y.isPrivate==!0){var Pr=new Se({seq:[{int:1},{octstr:{hex:y.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+y.pubKeyHex}}]}]}),ot=Pr.getEncodedHex(),$e=Se({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:y.curveName}}]},{octstr:{hex:ot}}]}),je=$e.getEncodedHex();if(A===void 0||A==null)return da(je,"PRIVATE KEY");var ct=er(je,A);return da(ct,"ENCRYPTED PRIVATE KEY")}if(T=="PKCS8PRV"&&K!==void 0&&y instanceof K&&y.isPrivate==!0){var Pr=new he({bigint:y.x}),ot=Pr.getEncodedHex(),$e=Se({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:y.p}},{int:{bigint:y.q}},{int:{bigint:y.g}}]}]},{octstr:{hex:ot}}]}),je=$e.getEncodedHex();if(A===void 0||A==null)return da(je,"PRIVATE KEY");var ct=er(je,A);return da(ct,"ENCRYPTED PRIVATE KEY")}throw"unsupported object nor format"},Zn.getKeyFromCSRPEM=function(y){var T=_i(y,"CERTIFICATE REQUEST"),A=Zn.getKeyFromCSRHex(T);return A},Zn.getKeyFromCSRHex=function(y){var T=Zn.parseCSRHex(y),A=Zn.getKey(T.p8pubkeyhex,null,"pkcs8pub");return A},Zn.parseCSRHex=function(y){var T=_r,A=T.getChildIdx,k=T.getTLV,z={},U=y;if(U.substr(0,2)!="30")throw"malformed CSR(code:001)";var Y=A(U,0);if(Y.length<1)throw"malformed CSR(code:002)";if(U.substr(Y[0],2)!="30")throw"malformed CSR(code:003)";var Z=A(U,Y[0]);if(Z.length<3)throw"malformed CSR(code:004)";return z.p8pubkeyhex=k(U,Z[2]),z},Zn.getKeyID=function(y){var T=Zn,A=_r;typeof y=="string"&&y.indexOf("BEGIN ")!=-1&&(y=T.getKey(y));var k=_i(T.getPEM(y)),z=A.getIdxbyList(k,0,[1]),U=A.getV(k,z).substring(2);return q.crypto.Util.hashHex(U,"sha1")},Zn.getJWKFromKey=function(y){var T={};if(y instanceof Br&&y.isPrivate)return T.kty="RSA",T.n=Ii(y.n.toString(16)),T.e=Ii(y.e.toString(16)),T.d=Ii(y.d.toString(16)),T.p=Ii(y.p.toString(16)),T.q=Ii(y.q.toString(16)),T.dp=Ii(y.dmp1.toString(16)),T.dq=Ii(y.dmq1.toString(16)),T.qi=Ii(y.coeff.toString(16)),T;if(y instanceof Br&&y.isPublic)return T.kty="RSA",T.n=Ii(y.n.toString(16)),T.e=Ii(y.e.toString(16)),T;if(y instanceof q.crypto.ECDSA&&y.isPrivate){var A=y.getShortNISTPCurveName();if(A!=="P-256"&&A!=="P-384")throw"unsupported curve name for JWT: "+A;var k=y.getPublicKeyXYHex();return T.kty="EC",T.crv=A,T.x=Ii(k.x),T.y=Ii(k.y),T.d=Ii(y.prvKeyHex),T}else if(y instanceof q.crypto.ECDSA&&y.isPublic){var A=y.getShortNISTPCurveName();if(A!=="P-256"&&A!=="P-384")throw"unsupported curve name for JWT: "+A;var k=y.getPublicKeyXYHex();return T.kty="EC",T.crv=A,T.x=Ii(k.x),T.y=Ii(k.y),T}throw"not supported key object"},Br.getPosArrayOfChildrenFromHex=function(y){return _r.getChildIdx(y,0)},Br.getHexValueArrayOfChildrenFromHex=function(y){var T=_r,A=T.getV,ee=Br.getPosArrayOfChildrenFromHex(y),k=A(y,ee[0]),z=A(y,ee[1]),U=A(y,ee[2]),Y=A(y,ee[3]),Z=A(y,ee[4]),ue=A(y,ee[5]),he=A(y,ee[6]),Se=A(y,ee[7]),we=A(y,ee[8]),ee=new Array;return ee.push(k,z,U,Y,Z,ue,he,Se,we),ee},Br.prototype.readPrivateKeyFromPEMString=function(y){var T=_i(y),A=Br.getHexValueArrayOfChildrenFromHex(T);this.setPrivateEx(A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8])},Br.prototype.readPKCS5PrvKeyHex=function(y){var T=Br.getHexValueArrayOfChildrenFromHex(y);this.setPrivateEx(T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8])},Br.prototype.readPKCS8PrvKeyHex=function(y){var T,A,k,z,U,Y,Z,ue,he=_r,Se=he.getVbyListEx;if(he.isASN1HEX(y)===!1)throw new Error("not ASN.1 hex string");try{T=Se(y,0,[2,0,1],"02"),A=Se(y,0,[2,0,2],"02"),k=Se(y,0,[2,0,3],"02"),z=Se(y,0,[2,0,4],"02"),U=Se(y,0,[2,0,5],"02"),Y=Se(y,0,[2,0,6],"02"),Z=Se(y,0,[2,0,7],"02"),ue=Se(y,0,[2,0,8],"02")}catch{throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(T,A,k,z,U,Y,Z,ue)},Br.prototype.readPKCS5PubKeyHex=function(y){var T=_r,A=T.getV;if(T.isASN1HEX(y)===!1)throw"keyHex is not ASN.1 hex string";var k=T.getChildIdx(y,0);if(k.length!==2||y.substr(k[0],2)!=="02"||y.substr(k[1],2)!=="02")throw"wrong hex for PKCS#5 public key";var z=A(y,k[0]),U=A(y,k[1]);this.setPublic(z,U)},Br.prototype.readPKCS8PubKeyHex=function(y){var T=_r;if(T.isASN1HEX(y)===!1)throw new Error("not ASN.1 hex string");if(T.getTLVbyListEx(y,0,[0,0])!=="06092a864886f70d010101")throw new Error("not PKCS8 RSA public key");var A=T.getTLVbyListEx(y,0,[1,0]);this.readPKCS5PubKeyHex(A)},Br.prototype.readCertPubKeyHex=function(y,T){var A,k;A=new Nn,A.readCertHex(y),k=A.getPublicKeyHex(),this.readPKCS8PubKeyHex(k)};var Gh=new RegExp("[^0-9a-f]","gi");function yl(y,T){for(var A="",k=T/4-y.length,z=0;z<k;z++)A=A+"0";return A+y}Br.prototype.sign=function(y,T){var A=function(z){return q.crypto.Util.hashString(z,T)},k=A(y);return this.signWithMessageHash(k,T)},Br.prototype.signWithMessageHash=function(y,T){var A=q.crypto.Util.getPaddedDigestInfoHex(y,T,this.n.bitLength()),k=Qa(A,16),z=this.doPr
429ivate(k),U=z.toString(16);return yl(U,this.n.bitLength())};function Kh(y,T,A){for(var k="",z=0;k.length<T;)k+=gl(A(Es(y+String.fromCharCode.apply(String,[(z&4278190080)>>24,(z&16711680)>>16,(z&65280)>>8,z&255])))),z+=1;return k}Br.prototype.signPSS=function(y,T,A){var k=function(U){return q.crypto.Util.hashHex(U,T)},z=k(Es(y));return A===void 0&&(A=-1),this.signWithMessageHashPSS(z,T,A)},Br.prototype.signWithMessageHashPSS=function(y,T,A){var k=gl(y),z=k.length,U=this.n.bitLength()-1,Y=Math.ceil(U/8),Z,ue=function(se){return q.crypto.Util.hashHex(se,T)};if(A===-1||A===void 0)A=z;else if(A===-2)A=Y-z-2;else if(A<-2)throw"invalid salt length";if(Y<z+A+2)throw"data too long";var he="";A>0&&(he=new Array(A),new $s().nextBytes(he),he=String.fromCharCode.apply(String,he));var Se=gl(ue(Es("\0\0\0\0\0\0\0\0"+k+he))),we=[];for(Z=0;Z<Y-A-z-2;Z+=1)we[Z]=0;var ee=String.fromCharCode.apply(String,we)+"�"+he,oe=Kh(Se,ee.length,ue),K=[];for(Z=0;Z<ee.length;Z+=1)K[Z]=ee.charCodeAt(Z)^oe.charCodeAt(Z);var ne=65280>>8*Y-U&255;for(K[0]&=~ne,Z=0;Z<z;Z++)K.push(Se.charCodeAt(Z));return K.push(188),yl(this.doPrivate(new d(K)).toString(16),this.n.bitLength())};function df(y){for(var T in q.crypto.Util.DIGESTINFOHEAD){var A=q.crypto.Util.DIGESTINFOHEAD[T],k=A.length;if(y.substring(0,k)==A){var z=[T,y.substring(k)];return z}}return[]}Br.prototype.verify=function(y,T){T=T.replace(Gh,""),T=T.replace(/[ \n]+/g,"");var A=Qa(T,16);if(A.bitLength()>this.n.bitLength())return 0;var k=this.doPublic(A),z=k.toString(16).replace(/^1f+00/,""),U=df(z);if(U.length==0)return!1;var Y=U[0],Z=U[1],ue=function(Se){return q.crypto.Util.hashString(Se,Y)},he=ue(y);return Z==he},Br.prototype.verifyWithMessageHash=function(y,T){if(T.length!=Math.ceil(this.n.bitLength()/4))return!1;var A=Qa(T,16);if(A.bitLength()>this.n.bitLength())return 0;var k=this.doPublic(A),z=k.toString(16).replace(/^1f+00/,""),U=df(z);if(U.length==0)return!1;U[0];var Y=U[1];return Y==y},Br.prototype.verifyPSS=function(y,T,A,k){var z=function(Y){return q.crypto.Util.hashHex(Y,A)},U=z(Es(y));return k===void 0&&(k=-1),this.verifyWithMessageHashPSS(U,T,A,k)},Br.prototype.verifyWithMessageHashPSS=function(y,T,A,k){if(T.length!=Math.ceil(this.n.bitLength()/4))return!1;var z=new d(T,16),U=function(Ie){return q.crypto.Util.hashHex(Ie,A)},Y=gl(y),Z=Y.length,ue=this.n.bitLength()-1,he=Math.ceil(ue/8),Se;if(k===-1||k===void 0)k=Z;else if(k===-2)k=he-Z-2;else if(k<-2)throw"invalid salt length";if(he<Z+k+2)throw"data too long";var we=this.doPublic(z).toByteArray();for(Se=0;Se<we.length;Se+=1)we[Se]&=255;for(;we.length<he;)we.unshift(0);if(we[he-1]!==188)throw"encoded message does not end in 0xbc";we=String.fromCharCode.apply(String,we);var ee=we.substr(0,he-Z-1),oe=we.substr(ee.length,Z),K=65280>>8*he-ue&255;if((ee.charCodeAt(0)&K)!==0)throw"bits beyond keysize not zero";var ne=Kh(oe,ee.length,U),se=[];for(Se=0;Se<ee.length;Se+=1)se[Se]=ee.charCodeAt(Se)^ne.charCodeAt(Se);se[0]&=~K;var be=he-Z-k-2;for(Se=0;Se<be;Se+=1)if(se[Se]!==0)throw"leftmost octets not zero";if(se[be]!==1)throw"0x01 marker not found";return oe===gl(U(Es("\0\0\0\0\0\0\0\0"+Y+String.fromCharCode.apply(String,se.slice(-k)))))},Br.SALT_LEN_HLEN=-1,Br.SALT_LEN_MAX=-2,Br.SALT_LEN_RECOVER=-2;function Nn(){var y=_r,T=y.getChildIdx,A=y.getV,k=y.getTLV,z=y.getVbyList,U=y.getVbyListEx,Y=y.getTLVbyList,Z=y.getTLVbyListEx,ue=y.getIdxbyList,he=y.getVidx,Se=y.oidname,we=Nn,ee=_i,oe;try{oe=q.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch{}this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return this.hex===null||this.version!==0?this.version:Y(this.hex,0,[0,0])!=="a003020102"?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return z(this.hex,0,[0,1+this.foffset],"02")},this.getSignatureAlgorithmField=function(){var K=Z(this.hex,0,[0,1]);for(var ne in oe)if(K===oe[ne])return ne;return Se(U(this.hex,0,[0,1,0],"06"))},this.getIssuerHex=function(){return Y(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return we.hex2dn(this.getIssuerHex())},this.getSubjectHex=function(){return Y(this.hex,0,[0,5+this.foffset],"30")}
429,this.getSubjectString=function(){return we.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var K=z(this.hex,0,[0,4+this.foffset,0]);return K=K.replace(/(..)/g,"%$1"),K=decodeURIComponent(K),K},this.getNotAfter=function(){var K=z(this.hex,0,[0,4+this.foffset,1]);return K=K.replace(/(..)/g,"%$1"),K=decodeURIComponent(K),K},this.getPublicKeyHex=function(){return y.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return ue(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var K=this.getPublicKeyIdx();return ue(this.hex,K,[1,0],"30")},this.getPublicKey=function(){return Zn.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){return Se(z(this.hex,0,[1,0],"06"))},this.getSignatureValueHex=function(){return z(this.hex,0,[2],"03",!0)},this.verifySignature=function(K){var ne=this.getSignatureAlgorithmField(),se=this.getSignatureValueHex(),be=Y(this.hex,0,[0],"30"),Ie=new q.crypto.Signature({alg:ne});return Ie.init(K),Ie.updateHex(be),Ie.verify(se)},this.parseExt=function(K){var ne,se,be;if(K===void 0){if(be=this.hex,this.version!==3)return-1;ne=ue(be,0,[0,7,0],"30"),se=T(be,ne)}else{be=_i(K);var Ie=ue(be,0,[0,3,0,0],"06");if(A(be,Ie)!="2a864886f70d01090e"){this.aExtInfo=new Array;return}ne=ue(be,0,[0,3,0,1,0],"30"),se=T(be,ne),this.hex=be}this.aExtInfo=new Array;for(var Ge=0;Ge<se.length;Ge++){var $e={};$e.critical=!1;var je=T(be,se[Ge]),zt=0;je.length===3&&($e.critical=!0,zt=1),$e.oid=y.hextooidstr(z(be,se[Ge],[0],"06"));var xt=ue(be,se[Ge],[1+zt]);$e.vidx=he(be,xt),this.aExtInfo.push($e)}},this.getExtInfo=function(K){var ne=this.aExtInfo,se=K;if(K.match(/^[0-9.]+$/)||(se=q.asn1.x509.OID.name2oid(K)),se!==""){for(var be=0;be<ne.length;be++)if(ne[be].oid===se)return ne[be]}},this.getExtBasicConstraints=function(){var K=this.getExtInfo("basicConstraints");if(K===void 0)return K;var ne=A(this.hex,K.vidx);if(ne==="")return{};if(ne==="0101ff")return{cA:!0};if(ne.substr(0,8)==="0101ff02"){var se=A(ne,6),be=parseInt(se,16);return{cA:!0,pathLen:be}}throw"basicConstraints parse error"},this.getExtKeyUsageBin=function(){var K=this.getExtInfo("keyUsage");if(K===void 0)return"";var ne=A(this.hex,K.vidx);if(ne.length%2!=0||ne.length<=2)throw new Error("malformed key usage value");var se=parseInt(ne.substr(0,2)),be=parseInt(ne.substr(2),16).toString(2);return be=("0000000"+be).slice(-8),be.substr(0,be.length-se)},this.getExtKeyUsageString=function(){for(var K=this.getExtKeyUsageBin(),ne=new Array,se=0;se<K.length;se++)K.substr(se,1)=="1"&&ne.push(Nn.KEYUSAGE_NAME[se]);return ne.join(",")},this.getExtSubjectKeyIdentifier=function(){var K=this.getExtInfo("subjectKeyIdentifier");return K===void 0?K:A(this.hex,K.vidx)},this.getExtAuthorityKeyIdentifier=function(){var K=this.getExtInfo("authorityKeyIdentifier");if(K===void 0)return K;for(var ne={},se=k(this.hex,K.vidx),be=T(se,0),Ie=0;Ie<be.length;Ie++)se.substr(be[Ie],2)==="80"&&(ne.kid=A(se,be[Ie]));return ne},this.getExtExtKeyUsageName=function(){var K=this.getExtInfo("extKeyUsage");if(K===void 0)return K;var ne=new Array,se=k(this.hex,K.vidx);if(se==="")return ne;for(var be=T(se,0),Ie=0;Ie<be.length;Ie++)ne.push(Se(A(se,be[Ie])));return ne},this.getExtSubjectAltName=function(){for(var K=this.getExtSubjectAltName2(),ne=new Array,se=0;se<K.length;se++)K[se][0]==="DNS"&&ne.push(K[se][1]);return ne},this.getExtSubjectAltName2=function(){var K,ne,se,be=this.getExtInfo("subjectAltName");if(be===void 0)return be;for(var Ie=new Array,Ge=k(this.hex,be.vidx),$e=T(Ge,0),je=0;je<$e.length;je++)se=Ge.substr($e[je],2),K=A(Ge,$e[je]),se==="81"&&(ne=Qi(K),Ie.push(["MAIL",ne])),se==="82"&&(ne=Qi(K),Ie.push(["DNS",ne])),se==="84"&&(ne=Nn.hex2dn(K,0),Ie.push(["DN",ne])),se==="86"&&(ne=Qi(K),Ie.push(["URI",ne])),se==="87"&&(ne=$h(K),Ie.push(["IP",ne]));return Ie},this.getExtCRLDistributionPointsURI=function(){var K=this.getExtInfo("cRLDistributionPoints");if(K===void 0)return K;for(var ne=new Array,se=T(this.hex,K.vidx),be=0;be<se.length;be++)try{var Ie=z(this.hex,se[be],[0,0,0],"86"),Ge=Qi(Ie);ne.push(Ge)}catch{}return ne},this.getExtAIAInfo=function(){var K=this.getExtInfo("authorityInfoAccess");if(K===void 0)return K;for(var ne={ocsp:[],caissuer:[]},se=T(this.hex,K.vidx),be=0;be<se.length;be++){var Ie=z(this.hex,se[be],[0],"06"),Ge=z(this.hex,se[be],[1],"86");Ie==="2b06010505073001"&&ne.ocsp.push(Qi(Ge)),Ie==="2b06010505073002"&&ne.caissuer.push(Qi(Ge))}return ne},this.getExtCertificatePolicies=function(){var K=this.getExtInfo("certificatePolicies");if(K===void 0)return K;for(var ne=k(this.hex,K.vidx),se=[],be=T(ne,0),Ie=0;Ie<be.length;Ie++){var Ge={},$e=T(ne,be[Ie]);if(Ge.id=Se(A(ne,$e[0])),$e.length===2)for(var je=T(ne,$e[1]),zt=0;zt<je.length;zt++){var xt=z(ne,je[zt],[0],"06");xt==="2b06010505070201"?Ge.cps=Qi(z(ne,je[zt],[1])):xt==="2b06010505070202"&&(Ge.unotice=Qi(z(ne,je[zt],[1,0])))}se.push(Ge)}return se},this.readCertPEM=function(K){this.readCertHex(ee(K))},this.readCertHex=function(K){this.hex=K,this.getVersion();try{ue(this.hex,0,[0,7],"a3"),this.parseExt()}catch{}},this.getInfo=function(){var K,ne,se;if(K=`Basic Fields
430`,K+="  serial number: "+this.getSerialNumberHex()+`
431`,K+="  signature algorithm: "+this.getSignatureAlgorithmField()+`
432`,K+="  issuer: "+this.getIssuerString()+`
433`,K+="  notBefore: "+this.getNotBefore()+`
434`,K+="  notAfter: "+this.getNotAfter()+`
435`,K+="  subject: "+this.getSubjectString()+`
436`,K+=`  subject public key info: 
437`,ne=this.getPublicKey(),K+="    key algorithm: "+ne.type+`
438`,ne.type==="RSA"&&(K+="    n="+Wh(ne.n.toString(16)).substr(0,16)+`...
439`,K+="    e="+Wh(ne.e.toString(16))+`
440`),se=this.aExtInfo,se!=null){K+=`X509v3 Extensions:
441`;for(var be=0;be<se.length;be++){var Ie=se[be],Ge=q.asn1.x509.OID.oid2name(Ie.oid);
441Ge===""&&(Ge=Ie.oid);var $e="";if(Ie.critical===!0&&($e="CRITICAL"),K+="  "+Ge+" "+$e+`:
442`,Ge==="basicConstraints"){var je=this.getExtBasicConstraints();je.cA===void 0?K+=`    {}
443`:(K+="    cA=true",je.pathLen!==void 0&&(K+=", pathLen="+je.pathLen),K+=`
444`)}else if(Ge==="keyUsage")K+="    "+this.getExtKeyUsageString()+`
445`;else if(Ge==="subjectKeyIdentifier")K+="    "+this.getExtSubjectKeyIdentifier()+`
446`;else if(Ge==="authorityKeyIdentifier"){var zt=this.getExtAuthorityKeyIdentifier();zt.kid!==void 0&&(K+="    kid="+zt.kid+`
447`)}else if(Ge==="extKeyUsage"){var xt=this.getExtExtKeyUsageName();K+="    "+xt.join(", ")+`
448`}else if(Ge==="subjectAltName"){var rt=this.getExtSubjectAltName2();K+="    "+rt+`
449`}else if(Ge==="cRLDistributionPoints"){var ct=this.getExtCRLDistributionPointsURI();K+="    "+ct+`
450`}else if(Ge==="authorityInfoAccess"){var Lt=this.getExtAIAInfo();Lt.ocsp!==void 0&&(K+="    ocsp: "+Lt.ocsp.join(",")+`
451`),Lt.caissuer!==void 0&&(K+="    caissuer: "+Lt.caissuer.join(",")+`
452`)}else if(Ge==="certificatePolicies")for(var er=this.getExtCertificatePolicies(),Xt=0;Xt<er.length;Xt++)er[Xt].id!==void 0&&(K+="    policy oid: "+er[Xt].id+`
453`),er[Xt].cps!==void 0&&(K+="    cps: "+er[Xt].cps+`
454`)}}return K+="signature algorithm: "+this.getSignatureAlgorithmName()+`
455`,K+="signature: "+this.getSignatureValueHex().substr(0,16)+`...
456`,K}}return Nn.hex2dn=function(y,T){if(T===void 0&&(T=0),y.substr(T,2)!=="30")throw"malformed DN";for(var A=new Array,k=_r.getChildIdx(y,T),z=0;z<k.length;z++)A.push(Nn.hex2rdn(y,k[z]));return A=A.map(function(U){return U.replace("/","\\/")}),"/"+A.join("/")},Nn.hex2rdn=function(y,T){if(T===void 0&&(T=0),y.substr(T,2)!=="31")throw"malformed RDN";for(var A=new Array,k=_r.getChildIdx(y,T),z=0;z<k.length;z++)A.push(Nn.hex2attrTypeValue(y,k[z]));return A=A.map(function(U){return U.replace("+","\\+")}),A.join("+")},Nn.hex2attrTypeValue=function(y,T){var A=_r,k=A.getV;if(T===void 0&&(T=0),y.substr(T,2)!=="30")throw"malformed attribute type and value";var z=A.getChildIdx(y,T);z.length!==2||y.substr(z[0],2);var U=k(y,z[0]),Y=q.asn1.ASN1Util.oidHexToInt(U),Z=q.asn1.x509.OID.oid2atype(Y),ue=k(y,z[1]),he=gl(ue);return Z+"="+he},Nn.getPublicKeyFromCertHex=function(y){var T=new Nn;return T.readCertHex(y),T.getPublicKey()},Nn.getPublicKeyFromCertPEM=function(y){var T=new Nn;return T.readCertPEM(y),T.getPublicKey()},Nn.getPublicKeyInfoPropOfCertPEM=function(y){var T=_r,A=T.getVbyList,k={},z,U;return k.algparam=null,z=new Nn,z.readCertPEM(y),U=z.getPublicKeyHex(),k.keyhex=A(U,0,[1],"03").substr(2),k.algoid=A(U,0,[0,0],"06"),k.algoid==="2a8648ce3d0201"&&(k.algparam=A(U,0,[0,1],"06")),k},Nn.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],(typeof q>"u"||!q)&&(q={}),(typeof q.jws>"u"||!q.jws)&&(q.jws={}),q.jws.JWS=function(){var y=q,T=y.jws.JWS,A=T.isSafeJSONString;this.parseJWS=function(k,z){if(!(this.parsedJWS!==void 0&&(z||this.parsedJWS.sigvalH!==void 0))){var U=k.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(U==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var Y=U[1],Z=U[2],ue=U[3],he=Y+"."+Z;if(this.parsedJWS={},this.parsedJWS.headB64U=Y,this.parsedJWS.payloadB64U=Z,this.parsedJWS.sigvalB64U=ue,this.parsedJWS.si=he,!z){var Se=yn(ue),we=Qa(Se,16);this.parsedJWS.sigvalH=Se,this.parsedJWS.sigvalBI=we}var ee=So(Y),oe=So(Z);if(this.parsedJWS.headS=ee,this.parsedJWS.payloadS=oe,!A(ee,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+ee}}},q.jws.JWS.sign=function(y,T,A,k,z){var U=q,Y=U.jws,Z=Y.JWS,ue=Z.readSafeJSONString,he=Z.isSafeJSONString,Se=U.crypto;Se.ECDSA;var we=Se.Mac,ee=Se.Signature,oe=JSON,K,ne,se;if(typeof T!="string"&&typeof T!="object")throw"spHeader must be JSON string or object: "+T;if(typeof T=="object"&&(ne=T,K=oe.stringify(ne)),typeof T=="string"){if(K=T,!he(K))throw"JWS Head is not safe JSON string: "+K;ne=ue(K)}if(se=A,typeof A=="object"&&(se=oe.stringify(A)),(y==""||y==null)&&ne.alg!==void 0&&(y=ne.alg),y!=""&&y!=null&&ne.alg===void 0&&(ne.alg=y,K=oe.stringify(ne)),y!==ne.alg)throw"alg and sHeader.alg doesn't match: "+y+"!="+ne.alg;var be=null;if(Z.jwsalg2sigalg[y]===void 0)throw"unsupported alg name: "+y;be=Z.jwsalg2sigalg[y];var Ie=vl(K),Ge=vl(se),$e=Ie+"."+Ge,je="";if(be.substr(0,4)=="Hmac"){if(k===void 0)throw"mac key shall be specified for HS* alg";var zt=new we({alg:be,prov:"cryptojs",pass:k});zt.updateString($e),je=zt.doFinal()}else if(be.indexOf("withECDSA")!=-1){var xt=new ee({alg:be});xt.init(k,z),xt.updateString($e);var rt=xt.sign();je=q.crypto.ECDSA.asn1SigToConcatSig(rt)}else if(be!="none"){var xt=new ee({alg:be});xt.init(k,z),xt.updateString($e),je=xt.sign()}var ct=Ii(je);return $e+"."+ct},q.jws.JWS.verify=function(y,T,A){var k=q,z=k.jws,U=z.JWS,Y=U.readSafeJSONString,Z=k.crypto,ue=Z.ECDSA,he=Z.Mac,Se=Z.Signature,we;typeof Br!==void 0&&(we=Br);var ee=y.split(".");if(ee.length!==3)return!1;var oe=ee[0],K=ee[1],ne=oe+"."+K,se=yn(ee[2]),be=Y(So(ee[0])),Ie=null,Ge=null;
456if(be.alg===void 0)throw"algorithm not specified in header";if(Ie=be.alg,Ge=Ie.substr(0,2),A!=null&&Object.prototype.toString.call(A)==="[object Array]"&&A.length>0){var $e=":"+A.join(":")+":";if($e.indexOf(":"+Ie+":")==-1)throw"algorithm '"+Ie+"' not accepted in the list"}if(Ie!="none"&&T===null)throw"key shall be specified to verify.";if(typeof T=="string"&&T.indexOf("-----BEGIN ")!=-1&&(T=Zn.getKey(T)),(Ge=="RS"||Ge=="PS")&&!(T instanceof we))throw"key shall be a RSAKey obj for RS* and PS* algs";if(Ge=="ES"&&!(T instanceof ue))throw"key shall be a ECDSA obj for ES* algs";var je=null;if(U.jwsalg2sigalg[be.alg]===void 0)throw"unsupported alg name: "+Ie;if(je=U.jwsalg2sigalg[Ie],je=="none")throw"not supported";if(je.substr(0,4)=="Hmac"){var zt=null;if(T===void 0)throw"hexadecimal key shall be specified for HMAC";var xt=new he({alg:je,pass:T});return xt.updateString(ne),zt=xt.doFinal(),se==zt}else if(je.indexOf("withECDSA")!=-1){var rt=null;try{rt=ue.concatSigToASN1Sig(se)}catch{return!1}var ct=new Se({alg:je});return ct.init(T),ct.updateString(ne),ct.verify(rt)}else{var ct=new Se({alg:je});return ct.init(T),ct.updateString(ne),ct.verify(se)}},q.jws.JWS.parse=function(y){var T=y.split("."),A={},k,z,U;if(T.length!=2&&T.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return k=T[0],z=T[1],T.length==3&&(U=T[2]),A.headerObj=q.jws.JWS.readSafeJSONString(So(k)),A.payloadObj=q.jws.JWS.readSafeJSONString(So(z)),A.headerPP=JSON.stringify(A.headerObj,null,"  "),A.payloadObj==null?A.payloadPP=So(z):A.payloadPP=JSON.stringify(A.payloadObj,null,"  "),U!==void 0&&(A.sigHex=yn(U)),A},q.jws.JWS.verifyJWT=function(y,T,A){var k=q,z=k.jws,U=z.JWS,Y=U.readSafeJSONString,Z=U.inArray,ue=U.includedArray,he=y.split("."),Se=he[0],we=he[1];yn(he[2]);var ee=Y(So(Se)),oe=Y(So(we));if(ee.alg===void 0)return!1;if(A.alg===void 0)throw"acceptField.alg shall be specified";if(!Z(ee.alg,A.alg)||oe.iss!==void 0&&typeof A.iss=="object"&&!Z(oe.iss,A.iss)||oe.sub!==void 0&&typeof A.sub=="object"&&!Z(oe.sub,A.sub))return!1;if(oe.aud!==void 0&&typeof A.aud=="object"){if(typeof oe.aud=="string"){if(!Z(oe.aud,A.aud))return!1}else if(typeof oe.aud=="object"&&!ue(oe.aud,A.aud))return!1}var K=z.IntDate.getNow();return A.verifyAt!==void 0&&typeof A.verifyAt=="number"&&(K=A.verifyAt),(A.gracePeriod===void 0||typeof A.gracePeriod!="number")&&(A.gracePeriod=0),!(oe.exp!==void 0&&typeof oe.exp=="number"&&oe.exp+A.gracePeriod<K||oe.nbf!==void 0&&typeof oe.nbf=="number"&&K<oe.nbf-A.gracePeriod||oe.iat!==void 0&&typeof oe.iat=="number"&&K<oe.iat-A.gracePeriod||oe.jti!==void 0&&A.jti!==void 0&&oe.jti!==A.jti||!U.verify(y,T,A.alg))},q.jws.JWS.includedArray=function(y,T){var A=q.jws.JWS.inArray;if(y===null||typeof y!="object"||typeof y.length!="number")return!1;for(var k=0;k<y.length;k++)if(!A(y[k],T))return!1;return!0},q.jws.JWS.inArray=function(y,T){if(T===null||typeof T!="object"||typeof T.length!="number")return!1;for(var A=0;A<T.length;A++)if(T[A]==y)return!0;return!1},q.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},q.jws.JWS.isSafeJSONString=function(y,T,A){var k=null;try{return k=zh(y),typeof k!="object"||k.constructor===Array?0:(T&&(T[A]=k),1)}catch{return 0}},q.jws.JWS.readSafeJSONString=function(y){var T=null;try{return T=zh(y),typeof T!="object"||T.constructor===Array?null:T}catch{return null}},q.jws.JWS.getEncodedSignatureValueFromJWS=function(y){var T=y.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(T==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return T[1]},q.jws.JWS.getJWKthumbprint=function(y){if(y.kty!=="RSA"&&y.kty!=="EC"&&y.kty!=="oct")throw"unsupported algorithm for JWK Thumprint";var T="{";if(y.kty==="RSA"){if(typeof y.n!="string"||typeof y.e!="string")throw"wrong n and e value for RSA key";T+='"e":"'+y.e+'",',T+='"kty":"'+y.kty+'",',T+='"n":"'+y.n+'"}'}else if(y.kty==="EC"){if(typeof y.crv!="string"||typeof y.x!="string"||typeof y.y!="str
456ing")throw"wrong crv, x and y value for EC key";T+='"crv":"'+y.crv+'",',T+='"kty":"'+y.kty+'",',T+='"x":"'+y.x+'",',T+='"y":"'+y.y+'"}'}else if(y.kty==="oct"){if(typeof y.k!="string")throw"wrong k value for oct(symmetric) key";T+='"kty":"'+y.kty+'",',T+='"k":"'+y.k+'"}'}var A=Es(T),k=q.crypto.Util.hashHex(A,"sha256"),z=Ii(k);return z},q.jws.IntDate={},q.jws.IntDate.get=function(y){var T=q.jws.IntDate,A=T.getNow,k=T.getZulu;if(y=="now")return A();if(y=="now + 1hour")return A()+3600;if(y=="now + 1day")return A()+3600*24;if(y=="now + 1month")return A()+3600*24*30;if(y=="now + 1year")return A()+3600*24*365;if(y.match(/Z$/))return k(y);if(y.match(/^[0-9]+$/))return parseInt(y);throw"unsupported format: "+y},q.jws.IntDate.getZulu=function(y){return Kl(y)},q.jws.IntDate.getNow=function(){var y=~~(new Date/1e3);return y},q.jws.IntDate.intDate2UTCString=function(y){var T=new Date(y*1e3);return T.toUTCString()},q.jws.IntDate.intDate2Zulu=function(y){var T=new Date(y*1e3),A=("0000"+T.getUTCFullYear()).slice(-4),k=("00"+(T.getUTCMonth()+1)).slice(-2),z=("00"+T.getUTCDate()).slice(-2),U=("00"+T.getUTCHours()).slice(-2),Y=("00"+T.getUTCMinutes()).slice(-2),Z=("00"+T.getUTCSeconds()).slice(-2);return A+k+z+U+Y+Z+"Z"},(typeof q>"u"||!q)&&(q={}),(typeof q.jws>"u"||!q.jws)&&(q.jws={}),q.jws.JWSJS=function(){var y=q,T=y.jws,A=T.JWS,k=A.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(z){this.init();var U=z.split(".");if(U.length!=3)throw"malformed input JWS";this.aHeader.push(U[0]),this.sPayload=U[1],this.aSignature.push(U[2])},this.addSignature=function(z,U,Y,Z){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var ue=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var he=q.jws.JWS.sign(z,U,this.sPayload,Y,Z),Se=he.split("."),we=Se[0],ee=Se[2];this.aHeader.push(Se[0]),this.aSignature.push(Se[2])}catch(oe){throw this.aHeader.length>ue&&this.aHeader.pop(),this.aSignature.length>ue&&this.aSignature.pop(),"addSignature failed: "+oe}},this.verifyAll=function(z){if(this.aHeader.length!==z.length||this.aSignature.length!==z.length)return!1;for(var U=0;U<z.length;U++){var Y=z[U];if(Y.length!==2)return!1;var Z=this.verifyNth(U,Y[0],Y[1]);if(Z===!1)return!1}return!0},this.verifyNth=function(z,U,Y){if(this.aHeader.length<=z||this.aSignature.length<=z)return!1;var Z=this.aHeader[z],ue=this.aSignature[z],he=Z+"."+this.sPayload+"."+ue,Se=!1;try{Se=A.verify(he,U,Y)}catch{return!1}return Se},this.readJWSJS=function(z){if(typeof z=="string"){var U=k(z);if(U==null)throw"argument is not safe JSON object string";this.aHeader=U.headers,this.sPayload=U.payload,this.aSignature=U.signatures}else try{if(z.headers.length>0)this.aHeader=z.headers;else throw"malformed header";if(typeof z.payload=="string")this.sPayload=z.payload;else throw"malformed signatures";if(z.signatures.length>0)this.aSignature=z.signatures;else throw"malformed signatures"}catch(Y){throw"malformed JWS-JS JSON object: "+Y}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}},Rr.SecureRandom=$s,Rr.rng_seed_time=Gn,Rr.BigInteger=d,Rr.RSAKey=Br,Rr.ECDSA=q.crypto.ECDSA,Rr.DSA=q.crypto.DSA,Rr.Signature=q.crypto.Signature,Rr.MessageDigest=q.crypto.MessageDigest,Rr.Mac=q.crypto.Mac,Rr.Cipher=q.crypto.Cipher,Rr.KEYUTIL=Zn,Rr.ASN1HEX=_r,Rr.X509=Nn,Rr.CryptoJS=n,Rr.b64tohex=s,Rr.b64toBA=l,Rr.ECFieldElementFp=eo,Rr.ECPointFp=an,Rr.ECCurveFp=Gs,Rr.stoBA=Hh,Rr.BAtos=Xm,Rr.BAtohex=Ec,Rr.stohex=Ys,Rr.stob64=x0,Rr.stob64u=nu,Rr.b64utos=lf,Rr.b64tob64u=_s,Rr.b64utob64=bs,Rr.hex2b64=o,Rr.hextob64u=Ii,Rr.b64utohex=yn,Rr.utf8tob64u=vl,Rr.b64utoutf8=So,Rr.utf8tob64=iu,Rr.b64toutf8=cf,Rr.utf8tohex=ko,Rr.hextoutf8=Qi,Rr.hextorstr=gl,Rr.rstrtohex=Es,Rr.hextob64=Uh,Rr.hextob64nl=Vo,Rr.b64nltohex=ws,Rr.hextopem=da,Rr.pemtohex=_i,Rr.hextoArrayBuffer=Vh,Rr.ArrayBuffertohex=au,Rr.zulutomsec=Yu,Rr.zulutosec=Kl,Rr.zulutodate=qo,Rr.datetozulu=qh,Rr.uricmptohex=jh,Rr.hextouricmp=Ss,Rr.ipv6tohex=Xu,Rr.hextoipv6=T0,Rr.hextoip=$h,Rr.iptohex=Zm,Rr.encodeURIComponentAll=Co,Rr.newline_toUnix=K_,Rr.newline_toDos=ou,Rr.hextoposhex=Wh,Rr.intarystrtohex=to,Rr.strdiffidx=uf,Rr.KJUR=q,Rr.crypto=q.crypto,Rr.asn1=q.asn1,Rr.jws=q.jws,Rr.lang=q.lang,Rr}var $Jt=jJt();const gP=et($Jt);Wo.security.setCertificatePromise(function(e){e(`-----BEGIN CERTIFICATE-----
457MIIEDzCCAvegAwIBAgIJAPz6etTG8xiNMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYD
458VQQGEwJCUjERMA8GA1UECAwIQ2VhcsODwqExEjAQBgNVBAcMCUZvcnRhbGV6YTEV
459MBMGA1UECgwMQ2FyZGFwaW8gV2ViMQswCQYDVQQLDAJUSTEaMBgGA1UEAwwRKi5j
460YXJkYXBpb3dlYi5jb20xJjAkBgkqhkiG9w0BCQEWF2NvbnRhdG9AY2FyZGFwaW93
461ZWIuY29tMCAXDTIwMDYyMTAyMTUzNFoYDzIwNTExMjE1MDIxNTM0WjCBnDELMAkG
462A1UEBhMCQlIxETAPBgNVBAgMCENlYXLDg8KhMRIwEAYDVQQHDAlGb3J0YWxlemEx
463FTATBgNVBAoMDENhcmRhcGlvIFdlYjELMAkGA1UECwwCVEkxGjAYBgNVBAMMESou
464Y2FyZGFwaW93ZWIuY29tMSYwJAYJKoZIhvcNAQkBFhdjb250YXRvQGNhcmRhcGlv
465d2ViLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALIyV4Akj9uB
466/j6Ii3eSBBS2bh+xE2eQaMuwL5sSCnmDvFaJf7hA7y8+EM1nk2ZZOIaiJYBPAlrZ
467Y+gN3glXIvzdUjMBaYnAeTKOMCwA5pMlCFqIopFVlCjQ+EpgijlSUqMN2RX88weF
468Im7w5e9o9SxOoRNHA8QS0FJ6OI2aO6VUTYQhHCdTRcjCy89Qw0fUJnQM93a9dg4p
469jpl10UCHF45gLkt7HdRNI50tb9G3lh+uqpAp9l/AWWI5oldsfUcTOEeAXPo6pQ8/
470ZvE8wketdINkU1RLZ29lXzapeYeWn1Rvud6DcCZb6ungIOnOqfYxYZxep2byR5MV
4715zfswA0Mf7MCAwEAAaNQME4wHQYDVR0OBBYEFKAJR5vy1jL+0QdSHVfwVzCH/FiU
472MB8GA1UdIwQYMBaAFKAJR5vy1jL+0QdSHVfwVzCH/FiUMAwGA1UdEwQFMAMBAf8w
473DQYJKoZIhvcNAQELBQADggEBAH3yiVdorrbiiKTDiLLn6YaL8ACTW9uu+lyh9gZX
474uOr4XoeIK+tIfhcOwmjfnYt6ZTjr5g3ux0hnQymQ9mZpcpXqHq7FPnndR16Hz8FY
475c9Fn4bxwuZYVghyiHs7glVSN/eq+dQUvHtMtrtauz8Ow0talCcqI6d4kMOK4i03H
476dBcG4nrWP6IOCVepl6IqNgAuJ2l+JDhT27Tf3j3ma7OqX5uUhF7qiMJi9VxqMc1R
477u4n6f441BTjhaITwCEfxOiA9e//0Uztp2GId85VlWE8E26Y/UAnJeAL7BkGH73Ui
4782zpAyQGhO9DWyw0Xe4BG8cY7Bc/9J580KsLQZUb3fbodz0M=
479-----END CERTIFICATE-----`)});const WJt=`-----BEGIN PRIVATE KEY-----
480MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCyMleAJI/bgf4+
481iIt3kgQUtm4fsRNnkGjLsC+bEgp5g7xWiX+4QO8vPhDNZ5NmWTiGoiWATwJa2WPo
482Dd4JVyL83VIzAWmJwHkyjjAsAOaTJQhaiKKRVZQo0PhKYIo5UlKjDdkV/PMHhSJu
4838OXvaPUsTqETRwPEEtBSejiNmjulVE2EIRwnU0XIwsvPUMNH1CZ0DPd2vXYOKY6Z
484ddFAhxeOYC5Lex3UTSOdLW/Rt5YfrqqQKfZfwFliOaJXbH1HEzhHgFz6OqUPP2bx
485PMJHrXSDZFNUS2dvZV82qXmHlp9Ub7neg3AmW+rp4CDpzqn2MWGcXqdm8keTFec3
4867MANDH+zAgMBAAECggEAYCqa3iTdHfFBbC30VksOuL7bH29IsZNVetdSWbWawYk+
487ktURgDZK3ov4NWG4QnvT7ZSD+IKrGqxHJmyVbyT/VMd8HNqeQiEFRytFA/pYdQB/
488SZyDXzt4Aa8Ez97ZuaWbwzMt/JfN8DkBJC4NaO6ToZ2tf+HLPn2Iv3oGGyUpG0dF
489JfNEzV9lLEX7mCftM3gkZKxyJKpUxX9Huws+oXk09Obetz8cLunyO5Nh0b4TZWoN
490uQ0tJV922rbxkEpXHJTnhs9QIjtf/SuPP6wZbADv6tTTJvvYuo25DviWK6rVanur
491bfWBF3jEV1FlythagEHbEAUSPdTNqnTHwCkyfYdwgQKBgQDV25+TUR/cPo0TlvYI
492RJxBgkXHcL5aoTJDcFoDbitlgJBaLNNRy6c/Jyn9YTRlop4xnPif7U61tWwHx28f
493vundW05BZFi3GoPAREE/tzTJPdiSiDw6cnh7dkzxE2btLJCevnK9QmSzzKz/HltM
494nLVS30iv8Mv1L80vX867g3Rs2wKBgQDVT7viH04Wl7yj6Kap5+f8XH3jSmiK5Rcp
495Yod++m4QGykI4p+MsxPJ5nutd0nEld3IUNzd3pPyWk3GhKt9ywNluVz3Jto2RqS/
496FqK7qIr/Jj4d0tdqNKRABMs2Bgr53LPOy0jujhQVH3lzPKtSDbZ1y/dvIY6GvV4C
4976WyTg+fECQKBgQDI0ygkKC9aHOdQORgrpXpyzgoHAunOo8dWqx/sTr2z4Kot9CAx
498lKQm2vlEds7EjpQtlPGpBSk/2/Fp0K+aySZGd2KiZ8AjmmOU3sPDOKD6Rfilige8
499/xgDIJGaZZTnLk1UtRV8guecLJ1cKb6k0Bg6jXFtvxtY0R3G2hqB3i0rtwKBgHNj
5002oML5DYchxMzu1SV+sxtTDwz+DGKk+jzP9DUr81Oo/gGf8Cg7sd9QtIngWQynfLK
501q2/qA6ZKa2BETHCT7ZaNm1inT8ukk2I7YHSbS/WSPm/rqlPtfhyTe0oSIsXfOfVX
502ynAhs4Npr01DOHn+qQE4APXA9VS2A7EXjICQDkPhAoGAUbh69tOP8Ola+gqw9G4k
503HMHql23DLe32UD4B4TuTzStw0RixjPiu41m930JDTUiDnZU+w0QRuGuOYrk+ZeQe
504ntV/s8qKAxmvNyzQ52U768o2R/1UiGkCEyUTG3tun2SJCuTzQ2QDLqnilyAXJQ7u
505zW5P9AaGzx3Kwe9En+ACwvk=
506-----END PRIVATE KEY-----`;Wo.security.setSignatureAlgorithm("SHA512");Wo.security.setSignaturePromise(function(e){return function(t,r){try{const n=gP.KEYUTIL.getKey(WJt),i=new gP.Signature({alg:"SHA512withRSA"});i.init(n),i.updateString(e);const a=i.sign();t(gP.stob64(gP.hextorstr(a)))}catch(n){r(n)}}});const GJt=u.lazy(()=>me.smartImport(()=>Zt(()=>import("./index-Djaihcm0.js"),__vite__mapDeps([321,322,198,154,88,94,59,4,3,44,200,179,233,216,168,12,288,102,165,269,323,81,119,78,125,120,217,144,87,86,20,16,89,80,222,82,324]))));ht.defaults.baseURL="https://dashboard.cardapioweb.com";function KJt(e){return["/api/v1/company/orders","/api/v2/company/orders","/api/v2/orders/order_sessions","/api/v2/orders/order_items","/api/v2/orders/kds","/api/v2/user","/api/v1/company/integrations/ifood","/api/v1/company/client/search","/api/v1/company/clients","/api/v2/auth"].some(r=>e.startsWith(r))&&!e.includes("/api/v1/company/orders/")}ht.interceptors.request.use(e=>(KJt(e.url)||(e.baseURL="https://api.cardapioweb.com"),e),e=>Promise.reject(e));const YJt=()=>u.createElement("div",{className:"flex h-full w-full flex-col items-center justify-center"},u.createElement(zG,{style:{color:"#890000",fontSize:"16rem"}}),u.createElement("h3",{className:"mt-48 text-center text-4xl font-medium leading-normal text-gray-900"},"Ops! Aconteceu algo inesperado!"),u.createElement("div",{className:"mx-28 max-w-512 text-center"},u.createElement("p",{className:"text-xl leading-relaxed text-gray-500"},"Tente atualizar a página. Se o problema persistir, entre em contato com a nossa equipe de suporte."))),XJt=hAe({...UJt.default,typography:{fontFamily:["Muli","Roboto",'"Helvetica"',"Arial","sans-serif"].join(","),fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,useNextVariants:!0,suppressDeprecationWarnings:!0,htmlFontSize:10,body1:{fontSize:"1.4rem"},body2:{fontSize:"1.4rem"}}}),ZJt=_G(),QJt=o4({plugins:[...ZJt.plugins,pXt()],insertionPoint:document.getElementById("jss-insertion-point")}),JJt=mAe();Rc.init();function eer(){return u.createElement(g_t,{jss:QJt,generateClassName:JJt},u.createElement(R_t,{theme:XJt},u.createElement(u.Suspense,{fallback:u.createElement(v0,null)}
506,u.createElement($1e.Provider,{value:{routes:FJt}},u.createElement(qKe,{store:Ap},u.createElement(A7e,{fallback:YJt},u.createElement(Rgt,null,u.createElement(S_,{history:ac},u.createElement(F8t,{utils:uXt},u.createElement(k2t,{classes:{message:"truncate",contentRoot:"flex flex-nowrap"},dense:!0,maxSnack:4,preventDuplicate:!0,autoHideDuration:3e3},u.createElement(R6t,null,u.createElement(Gke,{backend:me.isMobile()?aZt:VXt,options:{delayTouchStart:300}},u.createElement(uZt,null),u.createElement(Igt,null,u.createElement(qJt,null),u.createElement(VJt,null),u.createElement(sXt,null),u.createElement(GJt,null),u.createElement(r2t,null),u.createElement(cXt,null),u.createElement(N2t,null))))))))))))))}y7e({dsn:"https://[email protected]/5554188",release:"7b427317b23c4ac4e97e21fadd92931a234203b5",environment:"production",integrations:[aye({onerror:!1,onunhandledrejection:!1}),P7e({history:ac})],ignoreErrors:[/Java object is gone/i,/Error invoking postMessage/i,/Java exception was raised during method invocation/i]});vy.render(u.createElement(u.StrictMode,null,u.createElement(eer,null)),document.getElementById("root"));export{Ah as $,zo as A,Nt as B,ai as C,Eo as D,dl as E,Nl as F,Zo as G,_kt as H,cr as I,c2 as J,zq as K,V_ as L,Zc as M,$x as N,onr as O,aXt as P,ht as Q,u as R,SY as S,fo as T,Ud as U,me as V,Lr as W,f4 as X,fr as Y,jYt as Z,ve as _,Mt as a,B4 as a$,At as a0,Zt as a1,$1e as a2,Z3 as a3,VU as a4,v0 as a5,Ft as a6,Py as a7,hxt as a8,Ker as a9,J4e as aA,$C as aB,FGt as aC,Te as aD,oV as aE,Ter as aF,UY as aG,hGt as aH,q4 as aI,Ll as aJ,fLt as aK,X4t as aL,MPe as aM,Tr as aN,Nd as aO,sQt as aP,y$t as aQ,Wj as aR,Fg as aS,dHt as aT,bh as aU,m4 as aV,rLt as aW,E2 as aX,Jd as aY,LIe as aZ,Rc as a_,ker as aa,ts as ab,d0 as ac,Ber as ad,Lg as ae,Per as af,XYe as ag,zs as ah,a5 as ai,Bl as aj,qi as ak,yQe as al,o5 as am,nAe as an,oi as ao,YAe as ap,aV as aq,Rle as ar,UC as as,ZI as at,$er as au,_h as av,e4t as aw,Oh as ax,M3e as ay,qg as az,mi as b,C_ as b$,VC as b0,HIe as b1,Bhe as b2,nl as b3,Yhe as b4,gke as b5,_ke as b6,tc as b7,AJt as b8,DY as b9,sZt as bA,jbe as bB,Z5t as bC,um as bD,Mtr as bE,h4 as bF,zd as bG,B1 as bH,Kn as bI,di as bJ,tS as bK,Jc as bL,IZe as bM,kh as bN,xHt as bO,lIe as bP,v4e as bQ,eUt as bR,GK as bS,dm as bT,Bd as bU,rS as bV,xWt as bW,KI as bX,Zer as bY,e$ as bZ,aZe as b_,ud as ba,Jrr as bb,fq as bc,hq as bd,eIe as be,Mg as bf,bI as bg,hm as bh,Qs as bi,ps as bj,Ma as bk,Wer as bl,qAe as bm,Yer as bn,Xer as bo,r0 as bp,Jxt as bq,kPe as br,Cjt as bs,Qd as bt,Ier as bu,lZt as bv,uve as bw,Hu as bx,OPe as by,wPe as bz,Ut as c,Fl as c$,R_t as c0,pm as c1,aIe as c2,iIe as c3,aqt as c4,lWt as c5,jg as c6,YI as c7,dIe as c8,$p as c9,a4t as cA,sWt as cB,qEt as cC,qC as cD,Bg as cE,lx as cF,NK as cG,VI as cH,zke as cI,T5e as cJ,B5t as cK,e4 as cL,kl as cM,Ltr as cN,Ntr as cO,g_ as cP,uc as cQ,_v as cR,cm as cS,qc as cT,i7t as cU,f4t as cV,Fi as cW,Der as cX,N5t as cY,Btr as cZ,bY as c_,wm as ca,Em as cb,Dtr as cc,Ptr as cd,Wg as ce,Oo as cf,x4e as cg,I7t as ch,dkt as ci,E8t as cj,lOe as ck,oh as cl,Y9t as cm,cx as cn,ZYt as co,sc as cp,u_ as cq,ms as cr,zer as cs,c4e as ct,C4 as cu,P5t as cv,ztr as cw,tY as cx,kke as cy,T4 as cz,zr as d,GIe as d$,KK as d0,gPe as d1,Dm as d2,wV as d3,rer as d4,BKe as d5,Uu as d6,I4e as d7,Yrr as d8,NV as d9,oL as dA,Mer as dB,snr as dC,oIe as dD,inr as dE,ik as dF,aOe as dG,YRt as dH,Jn as dI,hd as dJ,hye as dK,D7e as dL,sTt as dM,H7t as dN,Qrr as dO,Nu as dP,x4 as dQ,Zrr as dR,z_ as dS,tg as dT,f8t as dU,As as dV,I8t as dW,tx as dX,QI as dY,Rd as dZ,e3e as d_,HI as da,Bt as db,crr as dc,Ap as dd,Bc as de,U6t as df,j6t as dg,srr as dh,q6t as di,$6t as dj,V6t as dk,H6t as dl,orr as dm,z6t as dn,arr as dp,B6t as dq,UIe as dr,lrr as ds,urr as dt,G6t as du,frr as dv,Aer as dw,drr as dx,EPe as dy,MG as dz,$t as e,lnr as e$,kYt as e0,ei as e1,Ky as e2,xe as e3,e3 as e4,XV as e5,xi as e6,ktr as e7,Gbe as e8,Pc as e9,Err as eA,QV as eB,Gfe as eC,Irr as eD,fqt as eE,_p as eF,EV as eG,jC as eH,mLt as eI,Ihe as eJ,vo as eK,ri as eL,vi as eM,Hn as eN,kn as eO,Utr as eP,nIe as eQ,vrr as eR,hrr as eS,prr as eT,gK as eU,yrr as eV,grr as eW,mrr as eX,R4 as eY,QRt as eZ,MAe as e_,j4e as ea,l_e as eb,Fxt as ec,DS as ed,mr as ee,N4e as ef,VUt as eg,i6t as eh,Xtr as ei,a6t as ej,s6t as ek,o6t as el,Ztr as em,Qtr as en,B3e as eo,F1 as ep,Cqt as eq,ZVt as er,iVt as es,IVt as et,zUt as eu,UUt as ev,JG as ew,Orr as ex,Eqt as ey,bqt as ez,Wt as f,DWt as f$,$Gt as f0,Nbe as f1,A5e as f2,ier as f3,T2 as f4,h7t as f5,AG as f6,XUt as f7,Cr as f8,Qce as f9,irr as fA,Jtr as fB,BOt as fC,M6t as fD,D6t as fE,k6t as fF,I6t as fG,O6t as fH,rrr as fI,Gjt as fJ,Htr as fK,U4e as f
506L,P2 as fM,z4e as fN,Nrr as fO,hs as fP,H4e as fQ,CY as fR,L4e as fS,Af as fT,F4e as fU,YIe as fV,krr as fW,ll as fX,Mrr as fY,V4e as fZ,Drr as f_,Qo as fa,Yr as fb,Id as fc,vy as fd,D7 as fe,EY as ff,GV as fg,BF as fh,she as fi,Bke as fj,UI as fk,cLt as fl,lLt as fm,ix as fn,hIe as fo,QTe as fp,x_ as fq,bm as fr,vK as fs,jx as ft,PFt as fu,trr as fv,brr as fw,nrr as fx,WK as fy,X6t as fz,Dt as g,Ns as g$,rqt as g0,qtr as g1,$St as g2,iZe as g3,sZe as g4,Hq as g5,Rt as g6,cl as g7,S4 as g8,eg as g9,GI as gA,nY as gB,iQt as gC,rIe as gD,F4 as gE,Rh as gF,Ya as gG,yp as gH,Atr as gI,NIt as gJ,ef as gK,WOe as gL,xtr as gM,htr as gN,wtr as gO,Ctr as gP,Str as gQ,ERt as gR,Ttr as gS,atr as gT,bRt as gU,Etr as gV,ltr as gW,cR as gX,ZIt as gY,ptr as gZ,UOe as g_,cIe as ga,PPe as gb,JI as gc,KZe as gd,zG as ge,ogt as gf,sgt as gg,P7t as gh,LF as gi,rY as gj,uTt as gk,li as gl,qer as gm,jer as gn,Itr as go,Rtr as gp,Otr as gq,e0 as gr,Oer as gs,Jer as gt,sIe as gu,D2t as gv,vIt as gw,w5t as gx,lxt as gy,BEt as gz,Gt as h,VVt as h$,vtr as h0,gtr as h1,mtr as h2,ytr as h3,_tr as h4,$Re as h5,XIt as h6,WIt as h7,otr as h8,$It as h9,qd as hA,h_ as hB,Ext as hC,cCt as hD,CPe as hE,xPe as hF,Qer as hG,TPe as hH,NS as hI,Ru as hJ,RCt as hK,I_t as hL,XXe as hM,NOe as hN,c_e as hO,kOe as hP,DOe as hQ,xrr as hR,jVt as hS,Srr as hT,Rrr as hU,Trr as hV,Arr as hW,zl as hX,Crr as hY,Prr as hZ,qVt as h_,vOe as ha,Os as hb,mOe as hc,fK as hd,pOe as he,ttr as hf,ntr as hg,AOt as hh,wOe as hi,kd as hj,btr as hk,Vg as hl,ftr as hm,rtr as hn,itr as ho,zOe as hp,dtr as hq,qG as hr,_m as hs,X2t as ht,o$ as hu,Hg as hv,str as hw,j_ as hx,fV as hy,Tp as hz,et as i,L5t as i$,UVt as i0,HVt as i1,zVt as i2,BVt as i3,xjt as i4,fl as i5,JMt as i6,g8t as i7,czt as i8,V4 as i9,zqt as iA,uzt as iB,NMt as iC,zrr as iD,Hrr as iE,uNt as iF,pMt as iG,m6t as iH,i5 as iI,Hqt as iJ,Frr as iK,Lrr as iL,P4 as iM,Vtr as iN,kI as iO,Qkt as iP,w4e as iQ,kK as iR,f0 as iS,qIt as iT,xer as iU,UXe as iV,egt as iW,$2t as iX,sEe as iY,aEe as iZ,lZe as i_,Vrr as ia,Urr as ib,Lm as ic,XIe as id,Brr as ie,mNt as ig,n5 as ih,jfe as ii,xY as ij,G4e as ik,Y4e as il,MK as im,Wrr as io,Grr as ip,UK as iq,p6t as ir,Krr as is,Ljt as it,$rr as iu,iY as iv,lY as iw,jrr as ix,ig as iy,qrr as iz,Yn as j,m8t as j$,W2t as j0,gEe as j1,hRt as j2,wrr as j3,g$t as j4,p3t as j5,u_e as j6,Ftr as j7,Her as j8,Ver as j9,AI as jA,_Pt as jB,Zf as jC,ZOe as jD,PK as jE,LOe as jF,r8t as jG,Xrr as jH,x$t as jI,xOt as jJ,cOe as jK,Xf as jL,TOt as jM,u3t as jN,gOe as jO,yOe as jP,Kf as jQ,dZe as jR,Rx as jS,FOe as jT,ctr as jU,utr as jV,Pz as jW,hF as jX,Xqt as jY,o4e as jZ,t3e as j_,Uer as ja,Gbt as jb,yne as jc,Tkt as jd,JV as je,GOe as jf,_2 as jg,QPe as jh,xI as ji,W1 as jj,sPt as jk,jG as jl,lPt as jm,$G as jn,Jce as jo,etr as jp,pV as jq,wI as jr,mPt as js,vPt as jt,gPt as ju,x3t as jv,xRe as jw,GG as jx,AK as jy,w3t as jz,ln as k,BDt as k0,co as k1,LMt as k2,$3e as k3,$jt as k4,$tr as k5,p8t as k6,Wtr as k7,jtr as k8,Gtr as k9,X5e as kA,II as kB,NBt as kC,sGt as kD,Vs as kE,FAe as kF,X1 as kG,Ytr as ka,Ktr as kb,ONt as kc,qn as kd,ner as ke,TDt as kf,dEe as kg,zMt as kh,Ax as ki,Z4 as kj,WYt as kk,Gke as kl,VXt as km,err as kn,i$ as ko,Rer as kp,tnr as kq,rnr as kr,nnr as ks,anr as kt,enr as ku,QBt as kv,Y4 as kw,ky as kx,FBt as ky,MBt as kz,qe as l,Wbe as m,vc as n,yc as o,_rr as p,p0 as q,x as r,Aa as s,Xc as t,f2 as u,An as v,yr as w,at as x,Ye as y,Ger as z};
507
508//# debugId=29975569-e1f0-5dce-b6bb-3aa43f8d0ae2

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.